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
35 changes: 35 additions & 0 deletions .github/workflows/validate-ops-history.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: validate-ops-history

on:
pull_request:
branches:
- main
push:
branches:
- main
- ops-history-spec-hardening
workflow_dispatch:

permissions:
contents: read

jobs:
validate-ops-history:
name: Validate OpsHistory contracts
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: Validate OpsHistory schema examples
run: |
python3 -m pip install jsonschema
python3 tools/validate_ops_history_examples.py

- name: Validate all repo examples through Makefile
run: make validate
63 changes: 63 additions & 0 deletions docs/contract-additions/ops-history-catalog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# OpsHistory Contract Catalog

Status: additive contract catalog for OpsHistory, BearHistory, local-first service manifests, operational receipts, context-pack references, and redaction tombstones.

This catalog supplements `schemas/README.md` and `examples/README.md` while the schema index is being normalized.

## Schema additions

| File | Type | URN prefix |
| --- | --- | --- |
| `OpsHistoryEvent.json` | OpsHistoryEvent | `urn:srcos:ops-history-event:` |
| `OpsHistorySyncPolicy.json` | OpsHistorySyncPolicy | `urn:srcos:ops-history-sync-policy:` |
| `LocalFirstServiceManifest.json` | LocalFirstServiceManifest | `urn:srcos:local-first-service:` |
| `BearHistoryEvent.json` | BearHistoryEvent | `urn:srcos:bearhistory-event:` |
| `BearHistorySyncPolicy.json` | BearHistorySyncPolicy | `urn:srcos:bearhistory-sync-policy:` |
| `ShellReceiptEvent.json` | ShellReceiptEvent | `urn:srcos:shell-receipt-event:` |
| `OpsHistoryContextPackRef.json` | OpsHistoryContextPackRef | `urn:srcos:context-pack:` |
| `RedactionTombstone.json` | RedactionTombstone | `urn:srcos:redaction-tombstone:` |

## Example additions

| File | Schema type | Description |
| --- | --- | --- |
| `ops-history-event.json` | OpsHistoryEvent | Bounded agent handoff event with summary payload mode and policy/evidence refs. |
| `ops-history-sync-policy.json` | OpsHistorySyncPolicy | Topology-aware local-first propagation policy with redaction-priority lane. |
| `local-first-service-manifest.json` | LocalFirstServiceManifest | `ops-historyd` user service manifest with D-Bus endpoints, durable store, subscription posture, and redaction priority. |
| `bearhistory-event.json` | BearHistoryEvent | BearBrowser agent-runtime navigation metadata with profile-boundary assertions. |
| `bearhistory-sync-policy.json` | BearHistorySyncPolicy | Human-secure deny-by-default and agent-runtime policy-gated browser sync/export posture. |
| `shell-receipt-event.json` | ShellReceiptEvent | Metadata-only operational receipt with content capture disabled by default. |
| `ops-history-context-pack-ref.json` | OpsHistoryContextPackRef | Bounded context-pack reference for Memory Mesh and AgentPlane handoff. |
| `redaction-tombstone.json` | RedactionTombstone | Critical-priority invalidation object for context, memory, artifact, and replica cleanup. |

## Validation

Run:

```bash
make validate-ops-history-examples
```

or:

```bash
python3 tools/validate_ops_history_examples.py
```

The root `make validate` target includes the OpsHistory validator.

## Consumer repos

The intended first consumers are:

- `SourceOS-Linux/agent-term`
- `SourceOS-Linux/BearBrowser`
- `SourceOS-Linux/sourceos-shell`
- `SocioProphet/memory-mesh`
- `SocioProphet/policy-fabric`
- `SocioProphet/agent-registry`
- `SocioProphet/agentplane`

## Contract discipline

These contracts are safe-default scaffolds. They do not authorize live sync, browser export, memory writeback, bridge/export, artifact exposure, or agent context hydration by themselves. Those actions require Policy Fabric decisions and Agent Registry authority.
34 changes: 34 additions & 0 deletions semantic/ops-history-vocabulary.jsonld
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"@context": {
"srcos": "https://schemas.srcos.ai/v2/",
"prov": "http://www.w3.org/ns/prov#",
"OpsHistoryEvent": "srcos:OpsHistoryEvent",
"OpsHistorySyncPolicy": "srcos:OpsHistorySyncPolicy",
"LocalFirstServiceManifest": "srcos:LocalFirstServiceManifest",
"BearHistoryEvent": "srcos:BearHistoryEvent",
"BearHistorySyncPolicy": "srcos:BearHistorySyncPolicy",
"ShellReceiptEvent": "srcos:ShellReceiptEvent",
"OpsHistoryContextPackRef": "srcos:OpsHistoryContextPackRef",
"RedactionTombstone": "srcos:RedactionTombstone",
"eventId": "srcos:eventId",
"eventClass": "srcos:eventClass",
"actorRef": "srcos:actorRef",
"agentRegistryRef": "srcos:agentRegistryRef",
"policyDecisionRefs": "srcos:policyDecisionRefs",
"evidenceRefs": "srcos:evidenceRefs",
"artifactRefs": "srcos:artifactRefs",
"redactionRefs": "srcos:redactionRefs",
"payloadMode": "srcos:payloadMode",
"contextPackRef": "srcos:contextPackRef",
"tombstoneId": "srcos:tombstoneId",
"serviceId": "srcos:serviceId",
"profileClass": "srcos:profileClass",
"sourcePlane": "srcos:sourcePlane",
"occurredAt": "prov:generatedAtTime",
"issuedAt": "prov:generatedAtTime"
},
"@id": "https://schemas.srcos.ai/v2/semantic/ops-history-vocabulary.jsonld",
"@type": "srcos:Vocabulary",
"name": "OpsHistory Vocabulary",
"description": "JSON-LD vocabulary additions for OpsHistory, BearHistory, local-first services, operational receipts, context-pack refs, and redaction tombstones."
}
Loading