core/workbench-ui/api-schema-snapshot.json
Shay 4cba6f488c feat(workbench): Wave M Phase C legibility — pipeline record, contemplation, identity continuity
Lands the Phase C "make cognition legible" slice plus Phase A residue, all
backend-reader-first over real engine data (no theater, read-only doctrine
intact, zero serving-path imports).

C1-a — Cognitive pipeline record (persistence-first, per #729 worthiness edit):
  - workbench/pipeline_record.py: curated CognitivePipelineRecord over the real
    CognitiveTurnResult (input → intent → proposition_graph → articulation_target
    → realizer → walk_telemetry → trace_hash). Raw field multivectors are
    DELIBERATELY excluded; _assert_no_raw_field_payload recursively rejects raw
    field keys, and validate_pipeline_record fails closed on missing/duplicate
    stages, non-recorded status, or dangling edges — the UI can never receive a
    partial record that claims to be complete.
  - test_workbench_pipeline_record.py: non-vacuous guards — missing stage,
    monkeypatched new required stage, and injected raw {"F": [...]} each raise.

C2-a — Contemplation as a process: /contemplation route over real persisted
  contemplation/runs/*.json (glob reader; honest-empty when absent).

C4-a — Identity continuity (L10/L11): RunDetail.identity_continuity + Runs
  Identity tab, sourced from the real core.engine_identity (engine_identity /
  parent_engine_identity lineage relation, re-derived to verify).

Demo Theater: renders backend-owned proof-promotion + entailment DAGs.

Phase A residue: density preference wired end-to-end (settings → shell → tokens);
  cross-route consistency touch-ups.

Infra: local API CORS now echoes only validated 127.0.0.1/localhost origins
  (hostname-checked, not arbitrary reflection) so Vite fallback ports work.
  Route chunk-split keeps the build warning-free.

Cleanup: corrected the stale ADR-0175 practice-lane assertions (build_report is
  6 correct / 0 wrong / 44 refused after the current serving lane; wrong=0 held)
  and the two registry-derived count tests (LeftNav + CommandPalette 12 → 13 for
  the new Contemplation route).

Docs: runtime_contracts.md (pipeline-record contract), UI-UX-GUIDE,
  api-contract-v1, data-shapes-v1, wave-M-worthiness, phase-a-residue-ledger.

Validation: 106 workbench/practice Python tests green (incl. wrong=0 lane +
  pipeline-record fail-closed guards); 459/459 frontend; pnpm build clean;
  git diff --check clean. No generate.derivation / reliability_gate / stream /
  field.propagate / vault.store imports.
2026-06-13 15:44:31 -07:00

468 lines
13 KiB
JSON

{
"dataclasses": {
"LeewayEvidence": {
"fields": {
"class_name": "str",
"license": "Literal['PROPOSE', 'SERVE', 'blocked', 'unknown']",
"theta": "float | None",
"claim_disclosure": "Literal['approximate', 'verified', 'proposal_only', 'none']",
"source_digest": "str | None",
"calibration_evidence_ref": "str | None"
}
},
"RuntimeStatus": {
"fields": {
"backend": "Literal['numpy', 'mlx', 'rust', 'unknown']",
"git_revision": "str",
"engine_state_present": "bool",
"checkpoint_revision": "str",
"revision_warning": "bool",
"active_session_id": "str | None",
"mutation_mode": "MutationMode"
}
},
"TurnVerdict": {
"fields": {
"outcome": "Literal['cleared', 'violated', 'unassessable']",
"runtime_detail": "str"
}
},
"ProposalRef": {
"fields": {
"candidate_id": "str",
"source_kind": "str"
}
},
"CognitivePipelineStage": {
"fields": {
"stage_id": "CognitivePipelineStageKind",
"label": "str",
"status": "PipelineEvidenceStatus",
"summary": "str",
"detail": "dict[str, Any]"
}
},
"CognitivePipelineEdge": {
"fields": {
"from_stage": "CognitivePipelineStageKind",
"to_stage": "CognitivePipelineStageKind",
"label": "str | None"
}
},
"CognitivePipelineRecord": {
"fields": {
"schema_version": "Literal['cognitive_pipeline_record_v1']",
"status": "PipelineEvidenceStatus",
"missing_reason": "str | None",
"trace_hash": "str | None",
"versor_condition": "float | None",
"field_digest": "str | None",
"stages": "list[CognitivePipelineStage]",
"edges": "list[CognitivePipelineEdge]"
}
},
"ChatTurnResult": {
"fields": {
"prompt": "str",
"surface": "str",
"articulation_surface": "str | None",
"walk_surface": "str | None",
"grounding_source": "GroundingSource",
"epistemic_state": "EpistemicStateValue",
"normative_clearance": "NormativeClearanceValue",
"normative_detail": "str",
"trace_hash": "str | None",
"refusal_emitted": "bool",
"hedge_injected": "bool",
"mutation_mode": "MutationMode",
"identity_verdict": "TurnVerdict | None",
"safety_verdict": "TurnVerdict | None",
"ethics_verdict": "TurnVerdict | None",
"proposal_candidates": "list[ProposalRef]",
"turn_cost_ms": "int",
"checkpoint_emitted": "bool",
"leeway_evidence": "LeewayEvidence | None",
"pipeline_record": "CognitivePipelineRecord | None",
"turn_id": "int | None"
}
},
"TurnJournalSummarySchema": {
"fields": {
"turn_id": "int",
"timestamp": "str",
"prompt_excerpt": "str",
"surface_excerpt": "str",
"trace_hash": "str | None",
"grounding_source": "GroundingSource",
"trace_integrity": "TraceIntegrity"
}
},
"TurnJournalEntrySchema": {
"fields": {
"turn_id": "int",
"timestamp": "str",
"trace_hash": "str | None",
"prompt": "str",
"surface": "str",
"articulation_surface": "str | None",
"walk_surface": "str | None",
"grounding_source": "GroundingSource",
"epistemic_state": "EpistemicStateValue",
"normative_clearance": "NormativeClearanceValue",
"verdicts": "dict[str, Any]",
"refusal_emitted": "bool",
"hedge_injected": "bool",
"proposal_candidates": "list[dict[str, Any]]",
"turn_cost_ms": "int",
"checkpoint_emitted": "bool",
"trace_integrity": "TraceIntegrity",
"journal_digest": "str",
"leeway_evidence": "LeewayEvidence | None",
"pipeline_record": "CognitivePipelineRecord | None"
}
},
"ArtifactRef": {
"fields": {
"artifact_id": "str",
"kind": "Literal['trace', 'eval_result', 'proposal', 'contemplation_report', 'telemetry', 'engine_state_manifest', 'unknown']",
"path": "str",
"digest": "str | None",
"created_at": "str | None"
}
},
"ArtifactDetail": {
"fields": {
"content_type": "Literal['json', 'jsonl', 'text', 'unknown']",
"content": "Any"
}
},
"ProposalSummary": {
"fields": {
"proposal_id": "str",
"state": "Literal['pending', 'accepted', 'rejected', 'withdrawn', 'unknown']",
"source_kind": "str",
"replay_equivalent": "bool | None",
"created_at": "str | None",
"downstream_effect": "Literal['unknown', 'none', 'observed']"
}
},
"ProposalDetail": {
"fields": {
"proposed_chain": "Any",
"replay_evidence": "Any",
"source": "Any",
"evidence": "list[Any]",
"artifact_refs": "list[ArtifactRef]",
"suggested_cli": "str | None",
"leeway_evidence": "LeewayEvidence | None"
}
},
"EvalLaneSummary": {
"fields": {
"lane": "str",
"versions": "list[str]",
"read_only": "bool",
"description": "str | None"
}
},
"EvalRunResult": {
"fields": {
"lane": "str",
"version": "str",
"split": "str",
"passed": "bool | None",
"metrics": "dict[str, Any]",
"cases": "list[Any]",
"source_digest": "str | None"
}
},
"DemoDagNode": {
"fields": {
"node_id": "str",
"label": "str",
"summary": "str",
"detail": "dict[str, Any]"
}
},
"DemoDagEdge": {
"fields": {
"from_node": "str",
"to_node": "str",
"label": "str | None"
}
},
"DemoEvidenceDag": {
"fields": {
"graph_id": "str",
"graph_kind": "DemoEvidenceDagKind",
"title": "str",
"source_digest": "str | None",
"nodes": "list[DemoDagNode]",
"edges": "list[DemoDagEdge]"
}
},
"DemoScenarioSummary": {
"fields": {
"scenario_id": "str",
"title": "str",
"expected_status": "str",
"evidence_class": "EvidenceClass",
"proposer_wrong": "bool",
"what_this_proves": "str",
"what_this_does_not_prove": "str"
}
},
"DemoSummary": {
"fields": {
"demo_id": "str",
"title": "str",
"description": "str",
"evidence_class": "EvidenceClass",
"scenario_count": "int",
"read_only": "bool",
"scenarios": "list[DemoScenarioSummary]"
}
},
"DemoScenarioRunResult": {
"fields": {
"scenario_id": "str",
"status": "str",
"passed": "bool",
"proposer_wrong": "bool",
"evidence_class": "EvidenceClass",
"decision_reason": "str | None",
"trace_hash": "str | None",
"problems": "list[str]",
"response": "Any",
"evidence_dag": "DemoEvidenceDag | None"
}
},
"DemoRunResult": {
"fields": {
"demo_id": "str",
"all_passed": "bool",
"what_this_proves": "str",
"what_this_does_not_prove": "str",
"scenarios": "list[DemoScenarioRunResult]"
}
},
"ContemplationScene": {
"fields": {
"scene_id": "str",
"claim": "str",
"detail": "dict[str, Any]"
}
},
"ContemplationRunSummary": {
"fields": {
"run_id": "str",
"source_path": "str",
"source_digest": "str | None",
"prompt": "str | None",
"cold_subject": "str | None",
"scene_count": "int",
"learning_arc_closed": "bool | None",
"all_claims_supported": "bool | None",
"active_corpus_byte_identical": "bool | None"
}
},
"ContemplationRunDetail": {
"fields": {
"before": "dict[str, Any] | None",
"after": "dict[str, Any] | None",
"engine_chain": "dict[str, Any] | None",
"scenes": "list[ContemplationScene]"
}
},
"TurnReplayDivergence": {
"fields": {
"path": "str",
"original": "Any",
"replay": "Any",
"severity": "TurnReplayDivergenceSeverity"
}
},
"TurnReplayComparison": {
"fields": {
"turn_id": "int",
"comparison_basis": "TurnReplayBasis",
"origin_state": "TurnReplayOriginState",
"original_trace_hash": "str | None",
"replay_trace_hash": "str | None",
"equivalent": "bool",
"replay_turn_cost_ms": "int",
"divergences": "list[TurnReplayDivergence]",
"leeway_evidence": "LeewayEvidence | None"
}
},
"MathReasoningStep": {
"fields": {
"step_index": "int",
"step_kind": "str",
"claim": "str",
"justification": "str",
"input_pointers": "list[str]",
"output_payload": "Any"
}
},
"MathProposalSummary": {
"fields": {
"proposal_id": "str",
"domain": "Literal['math']",
"shape_category": "str",
"proposed_change_kind": "str",
"structural_commonality": "str",
"evidence_count": "int",
"replay_equivalence_hash": "str"
}
},
"MathProposalDetail": {
"fields": {
"wrong_zero_assertion": "str",
"proposed_change_payload": "Any",
"reasoning_trace_id": "str",
"reasoning_trace_steps": "list[MathReasoningStep]",
"evidence_hashes": "list[str]",
"handler_name": "str | None",
"suggested_ratify_cli": "str | None",
"leeway_evidence": "LeewayEvidence | None"
}
},
"MathRatifyResult": {
"fields": {
"proposal_id": "str",
"change_kind": "str",
"handler_name": "str",
"routing_status": "Literal['routed', 'not_implemented']",
"message": "str",
"suggested_cli": "str | None",
"applied": "bool",
"target_path": "str | None",
"evidence_hash": "str | None"
}
},
"PackSummary": {
"fields": {
"pack_id": "str",
"source": "PackSource",
"manifest_path": "str",
"version": "str | None",
"language": "str | None",
"modality": "str | None",
"determinism_class": "str | None",
"checksum": "str | None",
"checksums": "dict[str, str]"
}
},
"PackDetail": {
"fields": {
"manifest_digest": "str",
"manifest": "dict[str, Any]"
}
},
"AuditEvent": {
"fields": {
"event_id": "str",
"source": "AuditSource",
"source_path": "str",
"timestamp": "str | None",
"event_type": "str",
"mutation_boundary": "bool",
"summary": "str",
"ref_id": "str | None",
"payload_digest": "str",
"payload": "Any"
}
},
"IdentityContinuity": {
"fields": {
"status": "IdentityContinuityStatus",
"engine_identity": "str | None",
"parent_engine_identity": "str | None",
"current_engine_identity": "str | None",
"written_at_revision": "str | None",
"current_revision": "str",
"lineage_relation": "IdentityLineageRelation",
"verification_summary": "str",
"evidence_gap": "str | None"
}
},
"RunSummary": {
"fields": {
"session_id": "str",
"source": "RunSource",
"turn_count": "int",
"started_at": "str | None",
"updated_at": "str | None",
"checkpoint_present": "bool",
"checkpoint_revision": "str | None",
"artifact_refs": "list[ArtifactRef]",
"evidence_gap": "str | None"
}
},
"RunTurnRef": {
"fields": {
"turn_id": "int",
"trace_hash": "str | None",
"timestamp": "str",
"trace_path": "str",
"surface_excerpt": "str",
"trace_integrity": "TraceIntegrity"
}
},
"RunDetail": {
"fields": {
"turns": "list[RunTurnRef]",
"manifest": "dict[str, Any] | None",
"identity_continuity": "IdentityContinuity | None"
}
},
"VaultSummary": {
"fields": {
"source_path": "str",
"entry_count": "int",
"store_count": "int",
"reproject_interval": "int",
"max_entries": "int | None",
"persisted": "bool"
}
},
"VaultEntry": {
"fields": {
"entry_index": "int",
"epistemic_status": "str",
"epistemic_state": "str",
"metadata": "dict[str, Any]",
"versor_digest": "str | None"
}
},
"CalibrationClass": {
"fields": {
"class_name": "str",
"correct": "int",
"wrong": "int",
"refused": "int",
"committed": "int",
"reliability_floor": "float",
"coverage": "float",
"propose_required": "float",
"propose_licensed": "bool",
"serve_required": "float",
"serve_licensed": "bool",
"source_path": "str",
"source_digest": "str"
}
},
"ServingMetrics": {
"fields": {
"lane": "str",
"correct": "int",
"refused": "int",
"wrong": "int",
"sample_count": "int",
"source_path": "str",
"source_digest": "str"
}
}
}
}