Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
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
15 changes: 15 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# TriTRPC transport and agent-sandbox control-plane ownership.
# This file protects workflow, transport-profile, schema, fixture, and verifier surfaces.

.github/workflows/* @mdheller
.github/CODEOWNERS @mdheller
.github/copilot-instructions.md @mdheller

README.md @mdheller
Makefile @mdheller

docs/CAPABILITY_FABRIC_SEMANTIC_SOURCE.md @mdheller
docs/AGENT_SANDBOX_TRANSPORT_PROFILE.md @mdheller
schemas/jsonschema/agent-sandbox-transport.v0.schema.json @mdheller
fixtures/agent_sandbox_transport/* @mdheller
tools/verify_agent_sandbox_transport.py @mdheller
17 changes: 17 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Copilot instructions for TriTRPC

TriTRPC is the transport authority for deterministic ternary-native RPC framing, fixtures, canonical byte encoding, envelope ordering, AEAD/AAD boundaries, and transport-level verifier behavior.

Do not redefine Capability Fabric semantic objects in this repository. Canonical semantics live in `SocioProphet/socioprophet-standards-knowledge`.

When working on agent sandbox lifecycle artifacts:

1. Treat this repository as the transport and fixture layer only.
2. Reference the standards objects instead of redefining them.
3. Preserve no-push failure invariants for infrastructure/model/tool failures.
4. Do not modify `.github/workflows/**`, `.github/CODEOWNERS`, or transport verifier scripts without explicit maintainer review.
5. Do not convert rate-limit, MCP, model, tool, attestation, or runner-bootstrap failures into successful writes.
6. Prefer deterministic fixtures, canonical JSON, digest binding, and cross-language verifier behavior.
7. Keep runtime implementation concerns in AgentPlane, Prophet Platform, or workspace-controller repositories rather than in TriTRPC transport docs.

For ordinary code changes, keep `make verify` passing.
23 changes: 23 additions & 0 deletions .github/workflows/agent-sandbox-transport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: agent-sandbox-transport

on:
pull_request:
paths:
- 'docs/AGENT_SANDBOX_TRANSPORT_PROFILE.md'
- 'schemas/jsonschema/agent-sandbox-transport.v0.schema.json'
- 'fixtures/agent_sandbox_transport/**'
- 'tools/verify_agent_sandbox_transport.py'
- '.github/workflows/agent-sandbox-transport.yml'
workflow_dispatch:

permissions:
contents: read

jobs:
verify-agent-sandbox-transport:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
- name: Verify agent sandbox transport fixtures
run: python tools/verify_agent_sandbox_transport.py
145 changes: 145 additions & 0 deletions docs/AGENT_SANDBOX_TRANSPORT_PROFILE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
# Agent Sandbox Transport Profile for TriTRPC (v0.1 draft)

## Status

Draft transport profile. This document is intentionally scoped to TriTRPC carriage, serialization, digest binding, fixture behavior, and verifier behavior.

Canonical lifecycle semantics live in `SocioProphet/socioprophet-standards-knowledge`:

- `docs/standards/044-agent-sandbox-lifecycle.md`
- `schemas/jsonschema/capability-fabric/agent-sandbox-lifecycle.v0.schema.json`

TriTRPC MUST NOT redefine the semantic meaning of `AgentSandboxSpec`, `AgentGenesisManifest`, `AgentFailureBundle`, or `AgentSandboxReceipt`.

## Purpose

This profile defines how agent sandbox lifecycle artifacts are carried over deterministic TriTRPC-style transport surfaces.

It covers:
- typed artifact carriage;
- canonical JSON serialization for examples and fixtures;
- digest and reference binding;
- failure-bundle transport invariants;
- deterministic verification expectations.

It does not define:
- actor trust semantics;
- controllability class semantics;
- proof-strength semantics;
- admission policy meaning;
- runtime placement policy.

Those belong to the Capability Fabric standards source.

## Transport object classes

TriTRPC MAY carry the following lifecycle object classes as typed payloads or typed attachments:

- `application/vnd.socioprophet.agent-sandbox-spec+json;v=0`
- `application/vnd.socioprophet.agent-genesis-manifest+json;v=0`
- `application/vnd.socioprophet.agent-failure-bundle+json;v=0`
- `application/vnd.socioprophet.agent-sandbox-receipt+json;v=0`

A TriTRPC frame carrying one of these objects SHOULD bind:
- object media type;
- canonical payload digest;
- semantic schema reference;
- producer identity or attestation reference;
- parent sandbox or phase reference.

## Canonical JSON profile

For JSON fixtures and transport examples, canonicalization MUST use:
- UTF-8 encoding;
- sorted object keys;
- no insignificant whitespace;
- exact string values for enum-like fields;
- SHA-256 digest over the canonical byte string.

Digest strings use:

```text
sha256:<lowercase-hex-digest>
```

## Typed blob envelope

A transport-facing lifecycle blob SHOULD use this shape:

```json
{
"schema_version": "tritrpc-agent-sandbox-transport.v0",
"blob_id": "blob_agent_sandbox_spec_0001",
"media_type": "application/vnd.socioprophet.agent-sandbox-spec+json;v=0",
"semantic_schema_ref": "capability-fabric:agent-sandbox-lifecycle.v0#/AgentSandboxSpec",
"payload_digest": "sha256:...",
"payload": { "...": "..." },
"attestation_ref": "github-attestation://..."
}
```

TriTRPC implementations MAY carry `payload` inline for fixtures and small objects, or replace it with a `payload_ref` for large artifacts.

## Failure-bundle no-push invariant

A transport profile MUST preserve the failure-policy invariant from the canonical standard:

- infrastructure/model/tool failures MUST NOT be represented as write-authorized outcomes;
- `allow_partial_push` MUST be false for infrastructure failure bundles;
- `allow_push_after_infra_failure` MUST be false for infrastructure failure bundles;
- failure bundles SHOULD be sealed as artifacts or receipts, not converted into branch mutations.

This is specifically intended to prevent the observed coding-agent failure mode where a model quota error enters a commit/push path during teardown.

## Inception and genesis carriage

An inception phase SHOULD emit an `AgentSandboxSpec` typed blob.

A genesis phase SHOULD emit an `AgentGenesisManifest` typed blob.

The genesis manifest SHOULD reference:
- the exact control-plane revision;
- the target workspace revision;
- tool policy;
- egress policy;
- credential policy;
- failure policy;
- receipt policy.

TriTRPC transport fixtures SHOULD prove that these references and digests are stable under canonical serialization.

## Receipt carriage

Every phase receipt carried by TriTRPC SHOULD include:
- phase;
- outcome;
- payload digest;
- signature or attestation reference;
- parent sandbox identifier.

Receipts MAY be carried as standalone typed blobs or bundled with the corresponding object.

## Verification expectations

A TriTRPC transport verifier SHOULD check:
1. media type is recognized;
2. semantic schema reference points to the standards source;
3. canonical JSON digest matches payload;
4. failure bundles preserve no-push invariants;
5. phase receipt digest references are internally consistent;
6. protected-path or write-policy semantics are referenced, not redefined.

## Repository placement

This repository owns:
- this transport profile;
- example typed lifecycle blobs;
- transport verifier scripts;
- deterministic fixtures proving digest/reference behavior.

The standards repository owns:
- lifecycle object semantics;
- field meaning;
- controllability classes;
- proof-strength constraints;
- receipt obligations.
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"schema_version": "tritrpc-agent-sandbox-transport.v0",
"blob_id": "blob_agent_failure_bundle_0001",
"media_type": "application/vnd.socioprophet.agent-failure-bundle+json;v=0",
"semantic_schema_ref": "capability-fabric:agent-sandbox-lifecycle.v0#/AgentFailureBundle",
"payload_digest": "sha256:bc7bf0ac87b530c1c64543511fd07ede7509684a0cc2fb18cda9c64e2c72351b",
"payload": {
"schema_version": "agent-sandbox-lifecycle.v0",
"sandbox_id": "sandbox_tritrpc_pr_comment_0001",
"failure_kind": "model_rate_limited",
"failure_class": "INFRASTRUCTURE",
"retry_after_seconds": 1094,
"allow_partial_push": false,
"allow_push_after_infra_failure": false,
"evidence_refs": [
"github-actions-log://SocioProphet/TriTRPC/actions/runs/copilot-example#user_model_rate_limited"
],
"sealed_at": "2026-05-04T00:00:00Z"
},
"attestation_ref": "github-attestation://example/failure-bundle/0001",
"parent_ref": "sandbox_tritrpc_pr_comment_0001"
}
2 changes: 1 addition & 1 deletion rust/tritrpc_v1/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ pub mod avroenc {
out.extend(enc_string(comp));
out
}
pub fn enc_Error(code: i32, msg: &str, details: Option<&[u8]>) -> Vec<u8> {
pub fn enc_error(code: i32, msg: &str, details: Option<&[u8]>) -> Vec<u8> {
let mut out = Vec::new();
out.extend(enc_int(code));
out.extend(enc_string(msg));
Expand Down
37 changes: 37 additions & 0 deletions schemas/jsonschema/agent-sandbox-transport.v0.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "https://schemas.socioprophet.example/tritrpc/agent-sandbox-transport.v0.schema.json",
"title": "TriTRPC Agent Sandbox Transport Blob v0",
"type": "object",
"additionalProperties": false,
"required": [
"schema_version",
"blob_id",
"media_type",
"semantic_schema_ref",
"payload_digest"
],
"properties": {
"schema_version": { "type": "string", "const": "tritrpc-agent-sandbox-transport.v0" },
"blob_id": { "type": "string", "minLength": 1 },
"media_type": {
"type": "string",
"enum": [
"application/vnd.socioprophet.agent-sandbox-spec+json;v=0",
"application/vnd.socioprophet.agent-genesis-manifest+json;v=0",
"application/vnd.socioprophet.agent-failure-bundle+json;v=0",
"application/vnd.socioprophet.agent-sandbox-receipt+json;v=0"
]
},
"semantic_schema_ref": { "type": "string", "pattern": "^capability-fabric:agent-sandbox-lifecycle\\.v0#/.+" },
"payload_digest": { "type": "string", "pattern": "^sha256:[0-9a-f]{64}$" },
"payload": { "type": "object" },
"payload_ref": { "type": "string" },
"attestation_ref": { "type": "string" },
"parent_ref": { "type": "string" }
},
"oneOf": [
{ "required": ["payload"] },
{ "required": ["payload_ref"] }
]
}
95 changes: 95 additions & 0 deletions spec/drafts/path_h_semantic_wire/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
# Path-H Semantic Wire Fixtures

Status: draft fixture slice
Scope: TritRPC Path-H hot-path control frames bound to Semantic SerDes projections

## Purpose

This slice adds executable fixture coverage for the Path-H semantic-wire contract.
It complements the Path-H qutrit / hybrid control annex by binding the hot
control frame to Semantic SerDes objects without placing full semantic payloads
or quantum states on the hot path.

The contract is:

```text
SemanticCell / SHIR assertion
-> SemanticControlCodebook
-> WireSemanticProjection
-> RouteProjectionBundle
-> Path-H hot frame
-> receipt / replay / projection-loss report
```

## Hot-path rule

Path-H semantic frames carry only compact handles and ternary coordinates:

- `CTRL243`
- `route_h`
- `projection_id`
- `sem243_ref`
- `state243_ref`
- `schema_h`
- `context_h`
- `bundle_h`
- replay epoch and sequence coordinates

They must not carry:

- full semantic payloads
- sensitive policy objects
- n-ary assertion graphs
- trainable semantic tensors
- quantum states

## Required invariants

The validator in `tools/verify_path_h_semantic_wire.py` enforces these draft
invariants:

1. `CTRL243.profile` must be `2` for Path-H.
2. Path-H semantic control must use quantum or hybrid lane, never classical.
3. Every semantic frame must include `route_h` and `projection_id`.
4. Every semantic frame must include `sem243_ref` and `state243_ref`.
5. Sensitive or full semantic payloads must remain off the hot path.
6. Strict codebook epoch fixtures must not drift from the frame epoch.
7. Lossy semantic lowering must cite a projection-loss report.
8. BSM3 frames must use one of the nine canonical qutrit BSM3 codes.

## Fixtures

Positive fixtures live under:

```text
spec/drafts/path_h_semantic_wire/fixtures/valid/
```

Negative fixtures live under:

```text
spec/drafts/path_h_semantic_wire/fixtures/invalid/
```

Negative fixtures include `expected_error` so they act as regression tests for
specific failure modes, not only generic failure.

## Validation

Run:

```bash
python tools/verify_path_h_semantic_wire.py
```

or through the repository verification surface:

```bash
make path-h-semantic-wire
```

## Boundary with Semantic SerDes

Semantic SerDes owns the source meaning, codebook, projection, route bundle,
receipts, and projection-loss reports. This repository owns the Path-H hot-frame
invariants that make those handles safe to move over TritRPC.
Loading
Loading