Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/sourceos-interaction-substrate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: SourceOS Interaction Substrate

on:
pull_request:
branches: ["main"]
paths:
- "schemas/SourceOSInteractionEvent.json"
- "examples/sourceos-interaction-event.json"
- "docs/contract-additions/sourceos-interaction-substrate.md"
- "tools/validate_sourceos_interaction_examples.py"
- ".github/workflows/sourceos-interaction-substrate.yml"
push:
branches: ["main", "work/noetica-agentterm-interaction-substrate"]
paths:
- "schemas/SourceOSInteractionEvent.json"
- "examples/sourceos-interaction-event.json"
- "docs/contract-additions/sourceos-interaction-substrate.md"
- "tools/validate_sourceos_interaction_examples.py"
- ".github/workflows/sourceos-interaction-substrate.yml"

permissions:
contents: read

jobs:
validate-sourceos-interaction:
name: Validate interaction substrate example
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"

- name: Install validator dependencies
run: python -m pip install --upgrade pip jsonschema

- name: Validate SourceOS interaction example
run: python tools/validate_sourceos_interaction_examples.py
103 changes: 103 additions & 0 deletions docs/contract-additions/sourceos-interaction-substrate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# SourceOS Interaction Substrate v0.1

Status: Proposed
Date: 2026-05-22

## Purpose

This contract defines the shared interaction substrate for Noetica, AgentTerm, Matrix rooms, Prophet Workspace workrooms, Superconscious task submission, AgentPlane evidence, Policy Fabric decisions, Agent Registry grants, Memory Mesh scope, Slash Topics, and replay surfaces.

The architectural rule is simple: Noetica and AgentTerm are different surfaces over the same governed interaction substrate.

Noetica owns the browser chat, model-selection, steering UX, and inline governance trail. AgentTerm owns the terminal-native / Matrix-first operator console, room/thread flow, approvals, event tailing, and trace rendering. Neither surface owns model routing, memory durability, tool grants, policy admission, or execution evidence.

## Relationship to OpsHistory

`OpsHistoryEvent` remains the local-first operational event ledger. `SourceOSInteractionEvent` is the noetic/chat/task projection that can be embedded in, referenced by, or derived from OpsHistory.

The intended binding is:

```text
Noetica message/send/result
-> SourceOSInteractionEvent
-> OpsHistoryEvent
-> AgentTerm tail/render/replay
-> Memory Mesh context-pack request or AgentPlane evidence ref, when policy admits
```

AgentTerm can emit the same event shape from Matrix, terminal commands, or operator approvals:

```text
Matrix / terminal command
-> SourceOSInteractionEvent
-> Policy Fabric decision
-> Agent Registry grant resolution
-> Superconscious / AgentPlane task
-> Noetica or AgentTerm governance-trail rendering
```

## Normative boundaries

1. A surface may render a governance trail, but Policy Fabric owns policy decisions.
2. A surface may request or display model routing, but model-router or the SourceOS route authority owns route decisions in `sourceos` mode.
3. A surface may request memory scope, but Memory Mesh owns recall and writeback.
4. A surface may list participants, but Agent Registry owns non-human identity, grants, sessions, revocation, and runtime authority.
5. A surface may display evidence, but AgentPlane owns execution evidence and replay artifacts.
6. A surface may declare steering intent, but blackbox prompting must not be represented as mechanistic SAE steering.
7. A surface may carry bounded summaries inline, but raw secrets, credentials, unrestricted browser history, unrestricted shell output, and private chain-of-thought are not valid payloads.
8. Redaction tombstones must propagate through OpsHistory and invalidate derived context packs, memory writebacks, exports, and replay surfaces.

## Required producers

- `SocioProphet/Noetica`: emit `SourceOSInteractionEvent` for standalone provider calls, SourceOS submissions, steering intent, governance trace updates, and task completion or failure.
- `SourceOS-Linux/agent-term`: emit the same event shape for terminal / Matrix / operator commands, approvals, room-thread bindings, task submissions, and trace rendering.
- `SocioProphet/superconscious`: accept or emit this event shape at the task boundary without becoming the memory, policy, or evidence authority.
- `SocioProphet/agentplane`: attach run, evidence, and replay refs rather than scraping raw surface state.
- `SocioProphet/memory-mesh`: receive bounded context-pack references, not unbounded transcripts.
- `SocioProphet/agent-registry`: resolve non-human participants and grants before enablement.
- `SocioProphet/policy-fabric`: decide side effects, context release, memory writeback, bridge/export, redaction, and replay admission.

## Minimum event content

A conforming event records:

- event identity and class;
- emitting surface;
- execution mode;
- conversation/workroom/topic/thread scope;
- actor and participants;
- optional task status/model/provider projection;
- optional steering intent;
- governance trace;
- payload disclosure posture;
- source event refs;
- redaction refs;
- integrity envelope.

## Surface obligations

Noetica must show the governance trace inline beside model output. AgentTerm must render the same trace in terminal/Matrix/operator form. Both must preserve enough fields for replay and audit.

Noetica-specific obligations:

- standalone mode still emits route evidence, request hash, evidence hash, provider, latency, memory posture, and policy posture;
- sourceos mode emits the same shape even when live submission is unavailable or blocked;
- steering UI emits explicit `steeringIntent` status and does not conflate prompt engineering with mechanistic steering.

AgentTerm-specific obligations:

- terminal, Matrix, and slash-command actions become interaction events before dispatch;
- high-risk actions require Policy Fabric decisions and Agent Registry grants before execution;
- AgentTerm can render Noetica / Superconscious / AgentPlane traces without owning cognition, routing, memory, or execution authority.

## Non-goals

This contract does not replace `OpsHistoryEvent`. It does not define model-provider SDK behavior. It does not define Matrix transport semantics. It does not create a new memory store. It does not permit unrestricted transcript replication. It does not grant tool authority.

## Acceptance criteria

- `schemas/SourceOSInteractionEvent.json` validates.
- `examples/sourceos-interaction-event.json` validates.
- Noetica can emit the example shape from a standalone chat completion.
- AgentTerm can ingest and render the example governance trail without live Matrix or live provider credentials.
- All side-effecting follow-on behavior remains behind policy and grant gates.
97 changes: 97 additions & 0 deletions examples/sourceos-interaction-event.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"interactionEventId": "urn:srcos:interaction-event:noetica-standalone-complete-0001",
"type": "SourceOSInteractionEvent",
"specVersion": "2.0.0",
"eventClass": "interaction.task_completed",
"occurredAt": "2026-05-22T16:20:00Z",
"surface": {
"surfaceKind": "noetica",
"sourcePlane": "SocioProphet/Noetica",
"clientRef": "web:noetica:local-demo"
},
"mode": "standalone",
"session": {
"sessionId": "noetica-session-local",
"conversationRef": "urn:srcos:conversation:noetica-local-demo",
"roomRef": null,
"threadRef": "urn:srcos:thread:noetica-local-demo",
"workroomRef": "urn:srcos:workroom:professional-intelligence-demo",
"topicRef": "urn:srcos:topic:professional-intelligence",
"opsHistoryEventRef": "urn:srcos:ops-history-event:noetica-local-demo-0001"
},
"actor": {
"actorRef": "urn:srcos:subject:user:operator",
"actorKind": "human",
"agentRegistryRef": null,
"onBehalfOfRef": "urn:srcos:workroom:professional-intelligence-demo"
},
"participants": [
{
"role": "user",
"participantRef": "urn:srcos:subject:user:operator",
"agentRegistryRef": null
},
{
"role": "assistant",
"participantRef": "urn:srcos:agent:noetica",
"agentRegistryRef": "urn:srcos:agent-registry:noetica"
},
{
"role": "provider",
"participantRef": "provider:openai",
"agentRegistryRef": null
}
],
"task": {
"taskRef": "urn:srcos:task:noetica-standalone-0001",
"status": "success",
"modelHint": "gpt-4.1",
"modelRouted": "gpt-4.1",
"provider": "openai",
"latencyMs": 842
},
"steeringIntent": {
"steeringKind": "none",
"featureRef": null,
"strength": null,
"status": "noop"
},
"governanceTrace": {
"policyAdmitted": true,
"policyRef": "noetica://standalone/local-policy",
"policyDecisionRefs": [
"urn:srcos:decision:noetica-standalone-admit-0001"
],
"grantRefs": [
"call:openai"
],
"memoryScopeRef": "noetica-session-local",
"memoryWritten": false,
"contextPackRefs": [],
"requestHash": "sha256:1111111111111111111111111111111111111111111111111111111111111111",
"evidenceHash": "sha256:2222222222222222222222222222222222222222222222222222222222222222",
"providerRouteEvidenceRef": "urn:srcos:evidence:provider-route:noetica-standalone-0001",
"agentPlaneRunRef": null,
"evidenceRefs": [
"urn:srcos:evidence:noetica-standalone-0001"
],
"replayRef": "urn:srcos:replay:noetica-standalone-0001"
},
"payloadMode": "summary",
"payload": {
"summary": "Noetica completed a standalone provider call and emitted a governance trace consumable by AgentTerm.",
"egress": {
"contactedExternalProvider": true,
"sentPrompt": true,
"promptEgressDefault": "external-provider"
}
},
"sourceEventRefs": [
"urn:srcos:ops-history-event:noetica-local-demo-0001"
],
"redactionRefs": [],
"integrity": {
"eventHash": "sha256:3333333333333333333333333333333333333333333333333333333333333333",
"signature": null
}
}
Loading
Loading