@openplanr/protocol 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +82 -0
- package/lib/dashboard/closed-json-contract.mjs +141 -0
- package/lib/dashboard/generated/operate-experience-surface-schema-data.mjs +67 -0
- package/lib/dashboard/generated/operate-review-schema-data.mjs +35 -0
- package/lib/dashboard/generated/operate-schema-token-codec.mjs +127 -0
- package/lib/dashboard/operate-experience-audit-display-contract.d.mts +196 -0
- package/lib/dashboard/operate-experience-audit-display-contract.mjs +700 -0
- package/lib/dashboard/operate-experience-display-contract.d.mts +572 -0
- package/lib/dashboard/operate-experience-display-contract.mjs +1007 -0
- package/lib/dashboard/operate-experience-surface-contract.d.mts +157 -0
- package/lib/dashboard/operate-experience-surface-contract.mjs +91 -0
- package/lib/dashboard/operate-review-contract.d.mts +34 -0
- package/lib/dashboard/operate-review-contract.mjs +175 -0
- package/lib/dashboard/operate-review-display-workspace-contract.d.mts +54 -0
- package/lib/dashboard/operate-review-display-workspace-contract.mjs +258 -0
- package/lib/dashboard/operate-review-payload-safety.d.mts +7 -0
- package/lib/dashboard/operate-review-payload-safety.mjs +42 -0
- package/lib/dashboard/operate-review-workspace-projection-v2.d.mts +218 -0
- package/lib/protocol/index.d.ts +2638 -0
- package/package.json +115 -0
- package/registries/commands.json +1952 -0
- package/registries/diagram-grammars.json +2407 -0
- package/registries/diagram-semantic-patterns.json +111 -0
- package/registries/output-paths.json +40 -0
- package/registries/outputs.json +864 -0
- package/registries/roles.json +661 -0
- package/registries/rules.json +261 -0
- package/registries/skill-host-profiles.json +247 -0
- package/registries/skill-modules.json +1112 -0
- package/registries/skill-routing.json +389 -0
- package/registries/skills.json +1545 -0
- package/registries/task-kinds.json +220 -0
- package/registry/adapters.json +110 -0
- package/registry/artifact-theme.json +60 -0
- package/registry/evaluation-graders.json +303 -0
- package/registry/evaluation-host-profiles.json +131 -0
- package/registry/frozen-commands.json +15 -0
- package/registry/landing-operations.json +20 -0
- package/registry/landing-workflows.json +70 -0
- package/registry/live-evidence-providers.json +1 -0
- package/registry/operate-v2-contracts.json +5965 -0
- package/registry/professional-skills.json +115 -0
- package/registry/roles.json +14 -0
- package/registry/ship-review-specialists.json +42 -0
- package/schemas/v1.0.0/design-approved.schema.json +35 -0
- package/schemas/v1.0.0/design-feedback.schema.json +169 -0
- package/schemas/v1.0.0/design-manifest.schema.json +90 -0
- package/schemas/v1.0.0/design-session.schema.json +73 -0
- package/schemas/v1.0.0/graph.schema.json +100 -0
- package/schemas/v1.0.0/pipeline-shipped.schema.json +154 -0
- package/schemas/v1.0.0/run-manifest.schema.json +81 -0
- package/schemas/v1.0.0/spec.schema.json +120 -0
- package/schemas/v1.0.0/stack.schema.json +184 -0
- package/schemas/v1.0.0/story.schema.json +95 -0
- package/schemas/v1.0.0/task.schema.json +171 -0
- package/schemas/v1.0.0/taste-profile.schema.json +96 -0
- package/schemas/v1.1.0/adapter-registry.schema.json +72 -0
- package/schemas/v1.1.0/artifact-envelope.schema.json +142 -0
- package/schemas/v1.1.0/artifact-paste.schema.json +49 -0
- package/schemas/v1.1.0/artifact-review.schema.json +97 -0
- package/schemas/v1.1.0/artifact-room-descriptor.schema.json +39 -0
- package/schemas/v1.1.0/artifact-room-event.schema.json +184 -0
- package/schemas/v1.1.0/artifact-room-signed-event.schema.json +58 -0
- package/schemas/v1.1.0/artifact-theme.schema.json +139 -0
- package/schemas/v1.1.0/browser-qa-gate.schema.json +21 -0
- package/schemas/v1.1.0/browser-qa-result.schema.json +24 -0
- package/schemas/v1.1.0/browser-qa-session.schema.json +12 -0
- package/schemas/v1.1.0/ecosystem-manifest.schema.json +46 -0
- package/schemas/v1.1.0/investigation-diagnosis.schema.json +12 -0
- package/schemas/v1.1.0/investigation-event.schema.json +15 -0
- package/schemas/v1.1.0/investigation-experiment.schema.json +17 -0
- package/schemas/v1.1.0/investigation-fix.schema.json +11 -0
- package/schemas/v1.1.0/investigation-hypothesis.schema.json +6 -0
- package/schemas/v1.1.0/investigation-observation.schema.json +10 -0
- package/schemas/v1.1.0/investigation-receipt.schema.json +7 -0
- package/schemas/v1.1.0/investigation-record.schema.json +7 -0
- package/schemas/v1.1.0/investigation-request.schema.json +34 -0
- package/schemas/v1.1.0/planning-review-event.schema.json +64 -0
- package/schemas/v1.1.0/planning-review-receipt.schema.json +19 -0
- package/schemas/v1.1.0/planning-review-record.schema.json +176 -0
- package/schemas/v1.1.0/planning-review-state.schema.json +19 -0
- package/schemas/v1.1.0/professional-skills.schema.json +105 -0
- package/schemas/v1.1.0/professional-specification.schema.json +111 -0
- package/schemas/v1.1.0/provenance-event.schema.json +82 -0
- package/schemas/v1.1.0/role-registry.schema.json +28 -0
- package/schemas/v1.1.0/runtime-lock.schema.json +39 -0
- package/schemas/v1.1.0/ship-closure.schema.json +353 -0
- package/schemas/v1.1.0/ship-review-specialist-registry.schema.json +29 -0
- package/schemas/v1.1.0/ship-risk-classification.schema.json +48 -0
- package/schemas/v1.1.0/specialist-review-result.schema.json +19 -0
- package/schemas/v1.10.0/design-review-bundle.schema.json +584 -0
- package/schemas/v1.10.0/design-review-context.schema.json +191 -0
- package/schemas/v1.10.0/design-review-handoff.schema.json +407 -0
- package/schemas/v1.10.0/design-review-metadata-payload.schema.json +106 -0
- package/schemas/v1.11.0/design-review-metadata-payload.schema.json +107 -0
- package/schemas/v1.12.0/enterprise-access-context.schema.json +217 -0
- package/schemas/v1.12.0/enterprise-agent-handoff.schema.json +508 -0
- package/schemas/v1.12.0/enterprise-artifact-revision.schema.json +87 -0
- package/schemas/v1.12.0/enterprise-change-proposal.schema.json +359 -0
- package/schemas/v1.12.0/enterprise-evidence-reference.schema.json +147 -0
- package/schemas/v1.12.0/enterprise-review-thread.schema.json +278 -0
- package/schemas/v1.12.0/enterprise-sync-state.schema.json +169 -0
- package/schemas/v1.2.0/adapter-registry.schema.json +83 -0
- package/schemas/v1.2.0/dashboard-bootstrap.schema.json +219 -0
- package/schemas/v1.2.0/ecosystem-release-operation.schema.json +90 -0
- package/schemas/v1.2.0/ecosystem-saga.schema.json +54 -0
- package/schemas/v1.2.0/evidence-diagnostic.schema.json +77 -0
- package/schemas/v1.2.0/guided-answer-envelope.schema.json +73 -0
- package/schemas/v1.2.0/guided-confirmation.schema.json +128 -0
- package/schemas/v1.2.0/guided-question.schema.json +242 -0
- package/schemas/v1.2.0/guided-questionnaire.schema.json +278 -0
- package/schemas/v1.2.0/guided-session.schema.json +141 -0
- package/schemas/v1.2.0/landing-confirmation.schema.json +17 -0
- package/schemas/v1.2.0/landing-event.schema.json +12 -0
- package/schemas/v1.2.0/landing-operation-registry.schema.json +16 -0
- package/schemas/v1.2.0/landing-phase-receipt.schema.json +19 -0
- package/schemas/v1.2.0/landing-plan.schema.json +36 -0
- package/schemas/v1.2.0/landing-receipt.schema.json +12 -0
- package/schemas/v1.2.0/landing-workflow-catalog.schema.json +143 -0
- package/schemas/v1.2.0/operate-action-display-workspace.schema.json +119 -0
- package/schemas/v1.2.0/operate-cycle-display-workspace.schema.json +109 -0
- package/schemas/v1.2.0/operate-executive-board-display-surface.schema.json +72 -0
- package/schemas/v1.2.0/operate-experience-audit-display-surface.schema.json +328 -0
- package/schemas/v1.2.0/operate-experience-display-surface.schema.json +46 -0
- package/schemas/v1.2.0/operate-experience-surface.schema.json +590 -0
- package/schemas/v1.2.0/operate-recovery-display-surface.schema.json +85 -0
- package/schemas/v1.2.0/structured-action.schema.json +91 -0
- package/schemas/v1.3.0/adapter-registry.schema.json +84 -0
- package/schemas/v1.3.0/ecosystem-manifest.schema.json +120 -0
- package/schemas/v1.3.0/release-compatibility-claim.schema.json +46 -0
- package/schemas/v1.3.0/release-ledger-receipt.schema.json +45 -0
- package/schemas/v1.3.0/release-ledger.schema.json +60 -0
- package/schemas/v1.4.0/adapter-registry.schema.json +62 -0
- package/schemas/v1.4.0/evaluation-aggregate-report.schema.json +166 -0
- package/schemas/v1.4.0/evaluation-budget.schema.json +49 -0
- package/schemas/v1.4.0/evaluation-corpus.schema.json +93 -0
- package/schemas/v1.4.0/evaluation-fixture.schema.json +64 -0
- package/schemas/v1.4.0/evaluation-gate-policy.schema.json +33 -0
- package/schemas/v1.4.0/evaluation-grader-registration.schema.json +141 -0
- package/schemas/v1.4.0/evaluation-grader-registry.schema.json +20 -0
- package/schemas/v1.4.0/evaluation-host-profile-registry.schema.json +20 -0
- package/schemas/v1.4.0/evaluation-host-profile.schema.json +73 -0
- package/schemas/v1.4.0/evaluation-observation.schema.json +76 -0
- package/schemas/v1.4.0/evaluation-run-result.schema.json +84 -0
- package/schemas/v1.4.0/evaluation-scenario.schema.json +231 -0
- package/schemas/v1.4.0/evaluation-waiver.schema.json +65 -0
- package/schemas/v1.4.0/skill-certification-receipt.schema.json +103 -0
- package/schemas/v1.5.0/command-catalog.schema.json +296 -0
- package/schemas/v1.5.0/common.schema.json +261 -0
- package/schemas/v1.5.0/generated-asset-manifest.schema.json +313 -0
- package/schemas/v1.5.0/implementation-result.schema.json +152 -0
- package/schemas/v1.5.0/migration-preservation-manifest.schema.json +749 -0
- package/schemas/v1.5.0/output-catalog.schema.json +210 -0
- package/schemas/v1.5.0/output-path-catalog.schema.json +81 -0
- package/schemas/v1.5.0/role-registry.schema.json +261 -0
- package/schemas/v1.5.0/rule-catalog.schema.json +130 -0
- package/schemas/v1.5.0/skill-catalog.schema.json +303 -0
- package/schemas/v1.5.0/task-kind-registry.schema.json +167 -0
- package/schemas/v1.5.0/task-manifest.schema.json +373 -0
- package/schemas/v1.5.0/task-output-manifest.schema.json +462 -0
- package/schemas/v1.6.0/common.schema.json +462 -0
- package/schemas/v1.6.0/diagram-consumer-reference.schema.json +167 -0
- package/schemas/v1.6.0/diagram-document.schema.json +699 -0
- package/schemas/v1.6.0/diagram-fidelity-report.schema.json +137 -0
- package/schemas/v1.6.0/diagram-manifest.schema.json +162 -0
- package/schemas/v1.6.0/diagram-quality-report.schema.json +148 -0
- package/schemas/v1.6.0/diagram-review-binding.schema.json +132 -0
- package/schemas/v1.6.0/diagram-semantic-pattern-registry.schema.json +90 -0
- package/schemas/v1.6.0/diagram-type-registry.schema.json +373 -0
- package/schemas/v1.6.0/generated-asset-manifest.schema.json +103 -0
- package/schemas/v1.6.0/skill-catalog.schema.json +84 -0
- package/schemas/v1.6.0/skill-completion-receipt.schema.json +72 -0
- package/schemas/v1.6.0/skill-consent-record.schema.json +74 -0
- package/schemas/v1.6.0/skill-host-profile-registry.schema.json +526 -0
- package/schemas/v1.6.0/skill-learning-record.schema.json +116 -0
- package/schemas/v1.6.0/skill-module-registry.schema.json +108 -0
- package/schemas/v1.6.0/skill-routing-registry.schema.json +93 -0
- package/schemas/v1.6.0/skill-session.schema.json +73 -0
- package/schemas/v1.6.0/skill-source.schema.json +169 -0
- package/schemas/v1.7.0/common.schema.json +464 -0
- package/schemas/v1.7.0/generated-asset-manifest.schema.json +103 -0
- package/schemas/v1.7.0/planning-id-sequence.schema.json +50 -0
- package/schemas/v1.7.0/request-authority.schema.json +71 -0
- package/schemas/v1.7.0/skill-catalog.schema.json +84 -0
- package/schemas/v1.7.0/skill-completion-receipt.schema.json +72 -0
- package/schemas/v1.7.0/skill-consent-record.schema.json +74 -0
- package/schemas/v1.7.0/skill-host-profile-registry.schema.json +526 -0
- package/schemas/v1.7.0/skill-learning-record.schema.json +116 -0
- package/schemas/v1.7.0/skill-module-registry.schema.json +108 -0
- package/schemas/v1.7.0/skill-routing-registry.schema.json +93 -0
- package/schemas/v1.7.0/skill-session.schema.json +73 -0
- package/schemas/v1.7.0/skill-source.schema.json +169 -0
- package/schemas/v1.7.0/spec.schema.json +117 -0
- package/schemas/v1.7.0/story.schema.json +107 -0
- package/schemas/v1.7.0/task.schema.json +217 -0
- package/schemas/v1.8.0/common.schema.json +96 -0
- package/schemas/v1.8.0/skill-package.schema.json +63 -0
- package/schemas/v1.8.0/utility-command-catalog.schema.json +82 -0
- package/schemas/v1.9.0/design-document.schema.json +306 -0
- package/schemas/v1.9.0/design-review-bundle.schema.json +346 -0
- package/schemas/v1.9.0/design-review-workspace.schema.json +108 -0
- package/schemas/v1.9.0/design-workspace-create.schema.json +170 -0
- package/schemas/v1.9.0/design-workspace-event.schema.json +97 -0
- package/schemas/v1.9.0/design-workspace-revision.schema.json +56 -0
- package/schemas/v2.0.0/agent-runtime-manifest.schema.json +59 -0
- package/schemas/v2.0.0/business-operating-snapshot-projection.schema.json +14 -0
- package/schemas/v2.0.0/operate-allowed-action.schema.json +181 -0
- package/schemas/v2.0.0/operate-api-envelope.schema.json +225 -0
- package/schemas/v2.0.0/operate-capability-provider-registration.schema.json +30 -0
- package/schemas/v2.0.0/operate-domain-registration.schema.json +284 -0
- package/schemas/v2.0.0/operate-evidence-provider-registration.schema.json +55 -0
- package/schemas/v2.0.0/operate-evidence-resolver-registration.schema.json +46 -0
- package/schemas/v2.0.0/operate-executor-registration.schema.json +27 -0
- package/schemas/v2.0.0/operate-experience-live-patch.schema.json +47 -0
- package/schemas/v2.0.0/operate-experience-preview.schema.json +51 -0
- package/schemas/v2.0.0/operate-experience-view.schema.json +281 -0
- package/schemas/v2.0.0/operate-live-evidence-provider-registration.schema.json +48 -0
- package/schemas/v2.0.0/operate-live-evidence-provider-registry.schema.json +17 -0
- package/schemas/v2.0.0/operate-metric-provider-registration.schema.json +12 -0
- package/schemas/v2.0.0/operate-policy-provider-registration.schema.json +33 -0
- package/schemas/v2.0.0/operate-review-bound-submission.schema.json +29 -0
- package/schemas/v2.0.0/operate-review-display-workspace.schema.json +390 -0
- package/schemas/v2.0.0/operate-snapshot-provider-registration.schema.json +16 -0
- package/schemas/v2.0.0/operate-tool-call.schema.json +172 -0
- package/schemas/v2.0.0/operate-verification-provider-registration.schema.json +12 -0
- package/schemas/v2.0.0/operating-action-policy.schema.json +31 -0
- package/schemas/v2.0.0/operating-action-verification-plan.schema.json +13 -0
- package/schemas/v2.0.0/operating-action.schema.json +86 -0
- package/schemas/v2.0.0/operating-advisor-result.schema.json +394 -0
- package/schemas/v2.0.0/operating-approval-record.schema.json +23 -0
- package/schemas/v2.0.0/operating-approval-requirement.schema.json +31 -0
- package/schemas/v2.0.0/operating-artifact.schema.json +52 -0
- package/schemas/v2.0.0/operating-assignment.schema.json +437 -0
- package/schemas/v2.0.0/operating-assumption.schema.json +16 -0
- package/schemas/v2.0.0/operating-capability-availability.schema.json +15 -0
- package/schemas/v2.0.0/operating-capability-grant.schema.json +14 -0
- package/schemas/v2.0.0/operating-challenger-review.schema.json +204 -0
- package/schemas/v2.0.0/operating-checkpoint.schema.json +43 -0
- package/schemas/v2.0.0/operating-claim.schema.json +17 -0
- package/schemas/v2.0.0/operating-connector-checkpoint.schema.json +28 -0
- package/schemas/v2.0.0/operating-context-capture.schema.json +74 -0
- package/schemas/v2.0.0/operating-cycle-input-binding.schema.json +30 -0
- package/schemas/v2.0.0/operating-cycle.schema.json +42 -0
- package/schemas/v2.0.0/operating-decision-ledger.schema.json +237 -0
- package/schemas/v2.0.0/operating-decision.schema.json +137 -0
- package/schemas/v2.0.0/operating-delivery-evidence.schema.json +46 -0
- package/schemas/v2.0.0/operating-delivery-route.schema.json +43 -0
- package/schemas/v2.0.0/operating-delta.schema.json +13 -0
- package/schemas/v2.0.0/operating-domain-projection.schema.json +15 -0
- package/schemas/v2.0.0/operating-event-trigger.schema.json +11 -0
- package/schemas/v2.0.0/operating-event.schema.json +505 -0
- package/schemas/v2.0.0/operating-evidence-candidate.schema.json +88 -0
- package/schemas/v2.0.0/operating-evidence-edge.schema.json +39 -0
- package/schemas/v2.0.0/operating-evidence-graph.schema.json +25 -0
- package/schemas/v2.0.0/operating-evidence-observation.schema.json +48 -0
- package/schemas/v2.0.0/operating-evidence-ref.schema.json +51 -0
- package/schemas/v2.0.0/operating-evidence-resolution.schema.json +54 -0
- package/schemas/v2.0.0/operating-execution-result.schema.json +23 -0
- package/schemas/v2.0.0/operating-executive-board.schema.json +78 -0
- package/schemas/v2.0.0/operating-finding.schema.json +116 -0
- package/schemas/v2.0.0/operating-governed-operation.schema.json +54 -0
- package/schemas/v2.0.0/operating-intelligence-input-bundle.schema.json +128 -0
- package/schemas/v2.0.0/operating-intelligence-plan.schema.json +302 -0
- package/schemas/v2.0.0/operating-learning-receipt.schema.json +31 -0
- package/schemas/v2.0.0/operating-learning.schema.json +13 -0
- package/schemas/v2.0.0/operating-live-evidence-consent-record.schema.json +42 -0
- package/schemas/v2.0.0/operating-live-evidence-ingestion.schema.json +31 -0
- package/schemas/v2.0.0/operating-measurement-plan.schema.json +18 -0
- package/schemas/v2.0.0/operating-measurement-schedule-receipt.schema.json +7 -0
- package/schemas/v2.0.0/operating-measurement-schedule.schema.json +16 -0
- package/schemas/v2.0.0/operating-metric-observation.schema.json +15 -0
- package/schemas/v2.0.0/operating-metric.schema.json +18 -0
- package/schemas/v2.0.0/operating-model-state.schema.json +36 -0
- package/schemas/v2.0.0/operating-objective.schema.json +21 -0
- package/schemas/v2.0.0/operating-origin.schema.json +31 -0
- package/schemas/v2.0.0/operating-outcome-evaluation.schema.json +46 -0
- package/schemas/v2.0.0/operating-outcome.schema.json +13 -0
- package/schemas/v2.0.0/operating-planning-proposal.schema.json +45 -0
- package/schemas/v2.0.0/operating-policy-evaluation.schema.json +28 -0
- package/schemas/v2.0.0/operating-review-read.schema.json +217 -0
- package/schemas/v2.0.0/operating-review-receipt.schema.json +64 -0
- package/schemas/v2.0.0/operating-review.schema.json +47 -0
- package/schemas/v2.0.0/operating-risk.schema.json +96 -0
- package/schemas/v2.0.0/operating-rollback-plan.schema.json +10 -0
- package/schemas/v2.0.0/operating-rollback-result.schema.json +20 -0
- package/schemas/v2.0.0/operating-runtime-state.schema.json +289 -0
- package/schemas/v2.0.0/operating-scenario.schema.json +13 -0
- package/schemas/v2.0.0/operating-snapshot.schema.json +38 -0
- package/schemas/v2.0.0/operating-submission.schema.json +34 -0
- package/schemas/v2.0.0/operating-trace-matrix.schema.json +176 -0
- package/schemas/v2.0.0/operating-work-change-set.schema.json +89 -0
- package/schemas/v2.0.0/operating-work-ledger.schema.json +40 -0
- package/schemas/v2.0.0/software-operating-snapshot-projection.schema.json +14 -0
- package/src/browser-contracts.d.mts +5 -0
- package/src/browser-contracts.mjs +40 -0
- package/src/canonical-json.d.mts +5 -0
- package/src/canonical-json.mjs +142 -0
- package/src/compat/live-evidence-v2.mjs +1019 -0
- package/src/compat/operate-experience-live-patch.mjs +66 -0
- package/src/compat/operating-planning-contracts.mjs +114 -0
- package/src/contracts.d.mts +42 -0
- package/src/contracts.mjs +990 -0
- package/src/design-contracts.d.mts +62 -0
- package/src/design-contracts.mjs +186 -0
- package/src/design-publication-contracts.d.mts +4 -0
- package/src/design-publication-contracts.mjs +85 -0
- package/src/diagram-contracts.d.mts +19 -0
- package/src/diagram-contracts.mjs +28 -0
- package/src/enterprise-contracts.d.mts +107 -0
- package/src/enterprise-contracts.mjs +463 -0
- package/src/errors.d.mts +11 -0
- package/src/errors.mjs +109 -0
- package/src/generated/canonical-registries.mjs +5554 -0
- package/src/generated/contract-catalog-v2.mjs +7076 -0
- package/src/generated/diagram-registries.mjs +2529 -0
- package/src/index.d.mts +10 -0
- package/src/index.mjs +40 -0
- package/src/json-schema.d.mts +7 -0
- package/src/json-schema.mjs +283 -0
- package/src/planning-contracts.d.mts +10 -0
- package/src/planning-contracts.mjs +53 -0
- package/src/registries.d.mts +40 -0
- package/src/registries.mjs +261 -0
- package/src/review-experience-contracts.d.mts +11 -0
- package/src/review-experience-contracts.mjs +103 -0
- package/src/semver.d.mts +2 -0
- package/src/semver.mjs +7 -0
- package/src/skill-source-contracts.d.mts +25 -0
- package/src/skill-source-contracts.mjs +105 -0
- package/src/task-contracts.d.mts +7 -0
- package/src/task-contracts.mjs +130 -0
- package/src/workspace-contracts.d.mts +26 -0
- package/src/workspace-contracts.mjs +83 -0
|
@@ -0,0 +1,2638 @@
|
|
|
1
|
+
export type JsonPrimitive = string | number | boolean | null;
|
|
2
|
+
export type JsonValue = JsonPrimitive | JsonValue[] | { [key: string]: JsonValue };
|
|
3
|
+
|
|
4
|
+
export interface ProtocolValidationError {
|
|
5
|
+
path: string;
|
|
6
|
+
rule: string;
|
|
7
|
+
detail: string;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface ProtocolSchemaContract {
|
|
11
|
+
kind: string;
|
|
12
|
+
protocolVersion: string;
|
|
13
|
+
path: string;
|
|
14
|
+
schema: Record<string, JsonValue>;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface DashboardQueryRootV1 {
|
|
18
|
+
actorId: string;
|
|
19
|
+
projectId: `sha256:${string}`;
|
|
20
|
+
scopeId: string;
|
|
21
|
+
domainId: string;
|
|
22
|
+
domainVersion: string;
|
|
23
|
+
generation: number;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface DashboardBootstrapV1 {
|
|
27
|
+
kind: 'dashboard-bootstrap';
|
|
28
|
+
schemaVersion: '1.0.0';
|
|
29
|
+
protocolVersion: '1.2.0';
|
|
30
|
+
ui: { buildId: string | null; expectedBuildId: string | null; assetManifestHash: string | null };
|
|
31
|
+
server: { packageVersion: string };
|
|
32
|
+
capabilities: {
|
|
33
|
+
planningGraph: { schemaVersion: '1.0.0' };
|
|
34
|
+
operateExperience: { protocolVersion: '2.0.0'; schemaVersion: '1.0.0' };
|
|
35
|
+
operateCommands: { protocolVersion: '2.0.0'; transportVersion: '1.0.0'; available: boolean };
|
|
36
|
+
diagnostics: { schemaVersion: '1.0.0'; available: boolean };
|
|
37
|
+
};
|
|
38
|
+
project: {
|
|
39
|
+
projectId: `sha256:${string}`;
|
|
40
|
+
name: string;
|
|
41
|
+
branch: string;
|
|
42
|
+
/** Exact unordered set containing Planning and Operate once each. */
|
|
43
|
+
products: readonly ['planning', 'operate'] | readonly ['operate', 'planning'];
|
|
44
|
+
};
|
|
45
|
+
queryRoots: {
|
|
46
|
+
planning: DashboardQueryRootV1 | null;
|
|
47
|
+
operate: DashboardQueryRootV1 | null;
|
|
48
|
+
};
|
|
49
|
+
origin: `http://${'127.0.0.1' | 'localhost'}:${number}`;
|
|
50
|
+
compatibility: {
|
|
51
|
+
status: 'compatible' | 'incompatible';
|
|
52
|
+
reasonCodes: Array<
|
|
53
|
+
| 'DASHBOARD_MANIFEST_MISSING'
|
|
54
|
+
| 'DASHBOARD_MANIFEST_INVALID'
|
|
55
|
+
| 'DASHBOARD_ASSET_MISSING'
|
|
56
|
+
| 'DASHBOARD_BUILD_MISMATCH'
|
|
57
|
+
>;
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export interface OperatingEventHeadV2 {
|
|
62
|
+
sequence: number;
|
|
63
|
+
hash: string | null;
|
|
64
|
+
protocolVersions: ['2.0.0'];
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export type OperateProtocolVersionV2 = '2.0.0';
|
|
68
|
+
export type OperatePhase1CycleStateV2 =
|
|
69
|
+
| 'created'
|
|
70
|
+
| 'observing'
|
|
71
|
+
| 'advising'
|
|
72
|
+
| 'challenging'
|
|
73
|
+
| 'synthesizing'
|
|
74
|
+
| 'awaiting_review'
|
|
75
|
+
| 'approved'
|
|
76
|
+
| 'executing'
|
|
77
|
+
| 'verifying'
|
|
78
|
+
| 'closed'
|
|
79
|
+
| 'blocked'
|
|
80
|
+
| 'failed'
|
|
81
|
+
| 'cancelled';
|
|
82
|
+
export type OperatingAssignmentStateV2 =
|
|
83
|
+
| 'pending'
|
|
84
|
+
| 'available'
|
|
85
|
+
| 'claimed'
|
|
86
|
+
| 'running'
|
|
87
|
+
| 'submitted'
|
|
88
|
+
| 'validated'
|
|
89
|
+
| 'rejected'
|
|
90
|
+
| 'abandoned'
|
|
91
|
+
| 'failed';
|
|
92
|
+
export type OperatingReviewStateV2 =
|
|
93
|
+
| 'pending'
|
|
94
|
+
| 'approved'
|
|
95
|
+
| 'changes_requested'
|
|
96
|
+
| 'rejected'
|
|
97
|
+
| 'cancelled';
|
|
98
|
+
export type OperatePhase1AssignmentKindV2 = 'advisor' | 'challenger' | 'chair';
|
|
99
|
+
export type OperatingAssignmentKindV2 = OperatePhase1AssignmentKindV2 | 'context-capture' | 'execution' | 'verification';
|
|
100
|
+
export type OperatePhase1TriggerV2 = { kind: 'manual' };
|
|
101
|
+
export type OperateToolNameV2 =
|
|
102
|
+
| 'operate.cycle.start'
|
|
103
|
+
| 'operate.cycle.get'
|
|
104
|
+
| 'operate.cycle.resume'
|
|
105
|
+
| 'operate.assignment.claim'
|
|
106
|
+
| 'operate.assignment.submit'
|
|
107
|
+
| 'operate.artifact.get'
|
|
108
|
+
| 'operate.review.get'
|
|
109
|
+
| 'operate.review.submit'
|
|
110
|
+
| 'operate.action.approve'
|
|
111
|
+
| 'operate.action.execute'
|
|
112
|
+
| 'operate.action.rollback';
|
|
113
|
+
|
|
114
|
+
export interface ContractRefV2 {
|
|
115
|
+
schemaId: string;
|
|
116
|
+
schemaVersion: string;
|
|
117
|
+
mediaType: string;
|
|
118
|
+
encoding: 'utf-8' | 'binary';
|
|
119
|
+
maxBytes: number;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
export interface OperatingCycleV2 {
|
|
123
|
+
kind: 'operating-cycle';
|
|
124
|
+
schemaVersion: '1.0.0';
|
|
125
|
+
protocolVersion: '2.0.0';
|
|
126
|
+
cycleId: string;
|
|
127
|
+
scopeId: string;
|
|
128
|
+
domainId: string;
|
|
129
|
+
domainVersion: string;
|
|
130
|
+
state: OperatePhase1CycleStateV2;
|
|
131
|
+
inputBindingId: string;
|
|
132
|
+
contractVersions: Record<string, string>;
|
|
133
|
+
trigger: OperatePhase1TriggerV2;
|
|
134
|
+
focus: string[];
|
|
135
|
+
health: 'normal' | 'quiet' | 'partial' | 'blocked';
|
|
136
|
+
activeReviewId: string | null;
|
|
137
|
+
createdAt: string;
|
|
138
|
+
updatedAt: string;
|
|
139
|
+
closedAt?: string | null;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
export interface OperatingCycleInputBindingV2 {
|
|
143
|
+
kind: 'operating-cycle-input-binding';
|
|
144
|
+
schemaVersion: '1.0.0';
|
|
145
|
+
protocolVersion: '2.0.0';
|
|
146
|
+
inputBindingId: string;
|
|
147
|
+
cycleId: string;
|
|
148
|
+
scopeId: string;
|
|
149
|
+
domainId: string;
|
|
150
|
+
domainVersion: string;
|
|
151
|
+
sourceArtifactIds: string[];
|
|
152
|
+
runtimeBinding: {
|
|
153
|
+
runtime: 'codex' | 'claude-code' | 'cursor';
|
|
154
|
+
adapterVersion: string;
|
|
155
|
+
};
|
|
156
|
+
capturedAt: string;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export interface OperatingAssignmentMandateV2 {
|
|
160
|
+
scope: string;
|
|
161
|
+
allowedEvidence: string[];
|
|
162
|
+
allowedCapabilities: Array<'repository.read' | 'planr.read' | 'git.read' | 'artifact.read' | 'artifact.submit'>;
|
|
163
|
+
forbiddenEffects: Array<'repository.write' | 'production.deploy' | 'payment.change' | 'customer-contact' | 'publish' | 'spend' | 'ship' | 'governed-execution'>;
|
|
164
|
+
capabilityCeiling: 'read-only';
|
|
165
|
+
skillId: string;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface OperatingRoleInputAbsenceV2 {
|
|
169
|
+
absenceId: string;
|
|
170
|
+
kind: 'role';
|
|
171
|
+
roleId: string;
|
|
172
|
+
roleKind: 'advisor' | 'challenger' | 'chair';
|
|
173
|
+
roleVersion: string;
|
|
174
|
+
absenceCode: string;
|
|
175
|
+
reason: string;
|
|
176
|
+
recoveryDisposition: string;
|
|
177
|
+
sourceAssignmentId: string | null;
|
|
178
|
+
sourceEventId: string | null;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export interface OperatingEvidenceInputAbsenceV2 {
|
|
182
|
+
absenceId: string;
|
|
183
|
+
kind: 'evidence';
|
|
184
|
+
requirementId: string;
|
|
185
|
+
evidenceKinds: OperateEvidenceKindV2[];
|
|
186
|
+
sourceContracts: OperateVersionedIdentityV2[];
|
|
187
|
+
absenceCode: 'not-available' | 'not-authorized' | 'resolution-failed' | 'stale';
|
|
188
|
+
reason: string;
|
|
189
|
+
recoveryDisposition: string;
|
|
190
|
+
sourceEvidenceRefIds: string[];
|
|
191
|
+
sourceEventIds: string[];
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
export type OperatingAssignmentInputAbsenceV2 =
|
|
195
|
+
| OperatingRoleInputAbsenceV2
|
|
196
|
+
| OperatingEvidenceInputAbsenceV2;
|
|
197
|
+
|
|
198
|
+
export interface OperatingAnalysisProfileV2 {
|
|
199
|
+
id: string;
|
|
200
|
+
version: string;
|
|
201
|
+
questionIds: string[];
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export interface OperatingEvidenceRequirementV2 {
|
|
205
|
+
requirementId: string;
|
|
206
|
+
description: string;
|
|
207
|
+
necessity: 'required' | 'preferred';
|
|
208
|
+
acceptedEvidenceKinds: OperateEvidenceKindV2[];
|
|
209
|
+
minimumEvidenceRefs: number;
|
|
210
|
+
maximumEvidenceRefs: number;
|
|
211
|
+
acceptedFreshness: OperateEvidenceFreshnessV2[];
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
export interface OperatingResultRequirementV2 {
|
|
215
|
+
requirementId: string;
|
|
216
|
+
description: string;
|
|
217
|
+
target: 'analysis' | 'claims' | 'measurements' | 'risks' | 'alternatives' | 'gaps' | 'recommendation' | 'findings' | 'dissent' | 'decisions' | 'source-dispositions' | 'question-coverage';
|
|
218
|
+
appliesToOutcomes: Array<'always' | 'recommendation' | 'partial' | 'quiet'>;
|
|
219
|
+
minimumItems: number;
|
|
220
|
+
maximumItems: number;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
export interface OperatingIssuedEvidenceV2 {
|
|
224
|
+
requirementId: string;
|
|
225
|
+
evidenceRefId: string;
|
|
226
|
+
evidenceArtifactId: string;
|
|
227
|
+
rawHash: string;
|
|
228
|
+
canonicalHash: string | null;
|
|
229
|
+
classification: OperateEvidenceClassificationV2;
|
|
230
|
+
freshness: OperateEvidenceFreshnessV2;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
export interface OperatingInputBundleBindingV2 {
|
|
234
|
+
bundleId: string;
|
|
235
|
+
bundleArtifactId: string;
|
|
236
|
+
bundleRawHash: string;
|
|
237
|
+
bundleCanonicalHash: string | null;
|
|
238
|
+
sourceArtifactIds: string[];
|
|
239
|
+
issuedEvidence: OperatingIssuedEvidenceV2[];
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export interface OperatingAssignmentIntelligenceContextV2 {
|
|
243
|
+
intelligencePlanId: string;
|
|
244
|
+
snapshotId: string;
|
|
245
|
+
scopeId: string;
|
|
246
|
+
domainId: string;
|
|
247
|
+
domainVersion: string;
|
|
248
|
+
sourceArtifactId: string;
|
|
249
|
+
sourceArtifactIds: string[];
|
|
250
|
+
evidenceRefIds: string[];
|
|
251
|
+
inputBundle: OperatingInputBundleBindingV2;
|
|
252
|
+
decisionOwnerActorId: string;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
interface OperatingAssignmentBaseV2 {
|
|
256
|
+
kind: 'operating-assignment';
|
|
257
|
+
schemaVersion: '1.0.0';
|
|
258
|
+
protocolVersion: '2.0.0';
|
|
259
|
+
assignmentId: string;
|
|
260
|
+
cycleId: string;
|
|
261
|
+
roleId: string;
|
|
262
|
+
objective: string;
|
|
263
|
+
state: OperatingAssignmentStateV2;
|
|
264
|
+
dependsOn: string[];
|
|
265
|
+
dependencyPolicy:
|
|
266
|
+
| { kind: 'none' }
|
|
267
|
+
| { kind: 'all-required' }
|
|
268
|
+
| { kind: 'threshold'; minimumSatisfied: number; allowedTerminalOutcomes: Array<'abandoned' | 'failed'> };
|
|
269
|
+
inputArtifactIds: string[];
|
|
270
|
+
inputAbsences: OperatingAssignmentInputAbsenceV2[];
|
|
271
|
+
outputContract: ContractRefV2;
|
|
272
|
+
capabilityGrantId: string | null;
|
|
273
|
+
governedOperationId?: string | null;
|
|
274
|
+
attemptPolicy: { maxAttempts: number; attempt: number; timeoutMs: number };
|
|
275
|
+
claim: { actorId: string; actorKind: 'agent' | 'human'; runtime: string; claimId: string } | null;
|
|
276
|
+
terminalOutcome: {
|
|
277
|
+
outcome: 'abandoned' | 'failed';
|
|
278
|
+
eventId: string;
|
|
279
|
+
code: string;
|
|
280
|
+
reason: string;
|
|
281
|
+
recoveryDisposition: string;
|
|
282
|
+
} | null;
|
|
283
|
+
createdAt: string;
|
|
284
|
+
availableAt: string | null;
|
|
285
|
+
completedAt: string | null;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
interface OperatingIntelligenceAssignmentBaseV2 extends OperatingAssignmentBaseV2 {
|
|
289
|
+
roleVersion: string;
|
|
290
|
+
analysisRubric: OperateAnalysisRubricV2;
|
|
291
|
+
analysisProfile: OperatingAnalysisProfileV2;
|
|
292
|
+
evidenceRequirements: OperatingEvidenceRequirementV2[];
|
|
293
|
+
resultRequirements: OperatingResultRequirementV2[];
|
|
294
|
+
mandate: OperatingAssignmentMandateV2;
|
|
295
|
+
intelligenceContext: OperatingAssignmentIntelligenceContextV2;
|
|
296
|
+
governedOperationId?: null;
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
/** An Advisor always receives the exact Advisor result contract. */
|
|
300
|
+
export interface OperatingAdvisorAssignmentV2 extends OperatingIntelligenceAssignmentBaseV2 {
|
|
301
|
+
assignmentKind: 'advisor';
|
|
302
|
+
outputContract: ContractRefV2 & {
|
|
303
|
+
schemaId: 'operating-advisor-result'; schemaVersion: '2.0.0';
|
|
304
|
+
mediaType: 'application/json'; encoding: 'utf-8';
|
|
305
|
+
};
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
/** A Challenger always receives the exact Challenger review contract. */
|
|
309
|
+
export interface OperatingChallengerAssignmentV2 extends OperatingIntelligenceAssignmentBaseV2 {
|
|
310
|
+
assignmentKind: 'challenger';
|
|
311
|
+
outputContract: ContractRefV2 & {
|
|
312
|
+
schemaId: 'operating-challenger-review'; schemaVersion: '2.0.0';
|
|
313
|
+
mediaType: 'application/json'; encoding: 'utf-8';
|
|
314
|
+
};
|
|
315
|
+
}
|
|
316
|
+
|
|
317
|
+
/** A Chair always receives the Decision Ledger contract. */
|
|
318
|
+
export interface OperatingChairAssignmentV2 extends OperatingIntelligenceAssignmentBaseV2 {
|
|
319
|
+
assignmentKind: 'chair';
|
|
320
|
+
outputContract: ContractRefV2 & {
|
|
321
|
+
schemaId: 'operating-decision-ledger'; schemaVersion: '2.0.0';
|
|
322
|
+
mediaType: 'application/json'; encoding: 'utf-8';
|
|
323
|
+
};
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
export type OperatingIntelligenceAssignmentV2 =
|
|
327
|
+
| OperatingAdvisorAssignmentV2
|
|
328
|
+
| OperatingChallengerAssignmentV2
|
|
329
|
+
| OperatingChairAssignmentV2;
|
|
330
|
+
|
|
331
|
+
/** Execution and verification retain their existing governed-work compatibility. */
|
|
332
|
+
export interface OperatingGovernedAssignmentV2 extends OperatingAssignmentBaseV2 {
|
|
333
|
+
assignmentKind: 'execution' | 'verification';
|
|
334
|
+
roleVersion?: string;
|
|
335
|
+
analysisRubric?: OperateAnalysisRubricV2;
|
|
336
|
+
analysisProfile?: never;
|
|
337
|
+
evidenceRequirements?: never;
|
|
338
|
+
resultRequirements?: never;
|
|
339
|
+
mandate?: OperatingAssignmentMandateV2;
|
|
340
|
+
intelligenceContext?: null;
|
|
341
|
+
governedOperationId?: string | null;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
/** A pre-intelligence, runtime-owned capture of exact Cycle context bytes. */
|
|
345
|
+
export interface OperatingContextCaptureAssignmentV2 extends OperatingAssignmentBaseV2 {
|
|
346
|
+
assignmentKind: 'context-capture';
|
|
347
|
+
roleVersion?: never;
|
|
348
|
+
analysisRubric?: null;
|
|
349
|
+
analysisProfile?: never;
|
|
350
|
+
evidenceRequirements?: never;
|
|
351
|
+
resultRequirements?: never;
|
|
352
|
+
mandate?: null;
|
|
353
|
+
intelligenceContext?: null;
|
|
354
|
+
outputContract: ContractRefV2 & (
|
|
355
|
+
| { schemaId: 'operating-context-capture'; schemaVersion: '2.0.0'; mediaType: 'application/json'; encoding: 'utf-8' }
|
|
356
|
+
| { schemaId: 'operating-intelligence-input-bundle'; schemaVersion: '2.0.0'; mediaType: 'application/json'; encoding: 'utf-8' }
|
|
357
|
+
);
|
|
358
|
+
governedOperationId?: null;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
export type OperatingAssignmentV2 =
|
|
362
|
+
| OperatingIntelligenceAssignmentV2
|
|
363
|
+
| OperatingGovernedAssignmentV2
|
|
364
|
+
| OperatingContextCaptureAssignmentV2;
|
|
365
|
+
|
|
366
|
+
/** A bounded, cycle-scoped human review; it is not persistent operating work. */
|
|
367
|
+
export interface OperatingReviewV2 {
|
|
368
|
+
kind: 'operating-review';
|
|
369
|
+
schemaVersion: '1.0.0';
|
|
370
|
+
protocolVersion: '2.0.0';
|
|
371
|
+
reviewId: string;
|
|
372
|
+
cycleId: string;
|
|
373
|
+
ownerActorId: string;
|
|
374
|
+
subject?:
|
|
375
|
+
| { type: 'cycle'; cycleId: string }
|
|
376
|
+
| ({ type: 'action' } & OperateActionIdentityV2);
|
|
377
|
+
state: OperatingReviewStateV2;
|
|
378
|
+
disposition: Exclude<OperatingReviewStateV2, 'pending'> | null;
|
|
379
|
+
workDispositions: OperatingWorkDispositionV2[];
|
|
380
|
+
createdAt: string;
|
|
381
|
+
updatedAt: string;
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/** A human Review's durable, explicit disposition of persistent work. */
|
|
385
|
+
export interface OperatingWorkDispositionV2 {
|
|
386
|
+
entityType: 'operating-finding' | 'operating-decision' | 'operating-action';
|
|
387
|
+
entityId: string;
|
|
388
|
+
disposition: 'accepted' | 'approved' | 'rejected' | 'resolved' | 'deferred' | 'superseded' | 'cancelled';
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
export interface OperatingSubmissionV2 {
|
|
392
|
+
kind: 'operating-submission';
|
|
393
|
+
schemaVersion: '1.0.0';
|
|
394
|
+
protocolVersion: '2.0.0';
|
|
395
|
+
submissionId: string;
|
|
396
|
+
assignmentId: string;
|
|
397
|
+
cycleId: string;
|
|
398
|
+
state: 'issued' | 'accepted' | 'rejected';
|
|
399
|
+
rawHash: string | null;
|
|
400
|
+
canonicalHash: string | null;
|
|
401
|
+
sizeBytes: number | null;
|
|
402
|
+
artifactId: string | null;
|
|
403
|
+
acceptanceEventIds: string[];
|
|
404
|
+
responseData: JsonValue | null;
|
|
405
|
+
issuedAt: string;
|
|
406
|
+
resolvedAt: string | null;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
export interface OperatingArtifactV2 {
|
|
410
|
+
kind: 'operating-artifact';
|
|
411
|
+
schemaVersion: '1.0.0';
|
|
412
|
+
protocolVersion: '2.0.0';
|
|
413
|
+
artifactId: string;
|
|
414
|
+
artifactType: string;
|
|
415
|
+
assignmentId: string;
|
|
416
|
+
cycleId: string;
|
|
417
|
+
scopeId: string;
|
|
418
|
+
domainId: string;
|
|
419
|
+
domainVersion: string;
|
|
420
|
+
schemaId: string;
|
|
421
|
+
artifactSchemaVersion: string;
|
|
422
|
+
mediaType: string;
|
|
423
|
+
encoding: 'utf-8' | 'binary';
|
|
424
|
+
rawHash: string;
|
|
425
|
+
canonicalHash: string | null;
|
|
426
|
+
sizeBytes: number;
|
|
427
|
+
storageClass: 'machine-local';
|
|
428
|
+
sensitivity: 'public' | 'internal' | 'confidential' | 'restricted';
|
|
429
|
+
retentionClass: string;
|
|
430
|
+
producer: { actorId: string; roleId: string; runtime: string };
|
|
431
|
+
inputArtifactIds: string[];
|
|
432
|
+
governedOperationId?: string | null;
|
|
433
|
+
authorityRecordIds?: string[];
|
|
434
|
+
createdAt: string;
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export type OperateEvidenceKindV2 = 'git' | 'filesystem' | 'planr' | 'operate-artifact';
|
|
438
|
+
export type OperateEvidenceClassificationV2 = 'public' | 'internal' | 'confidential' | 'restricted';
|
|
439
|
+
export type OperateEvidenceFreshnessV2 = 'current' | 'historical' | 'stale';
|
|
440
|
+
export type OperateEvidenceEdgeRelationV2 = 'supportedBy' | 'contradictedBy';
|
|
441
|
+
export type OperateEvidenceReadCapabilityV2 =
|
|
442
|
+
| 'evidence.git.read'
|
|
443
|
+
| 'evidence.filesystem.read'
|
|
444
|
+
| 'evidence.planr.read'
|
|
445
|
+
| 'evidence.operate-artifact.read';
|
|
446
|
+
export type OperateEvidenceResolverErrorCodeV2 =
|
|
447
|
+
| 'SOURCE_NOT_FOUND' | 'REVISION_NOT_FOUND' | 'OBJECT_TYPE_MISMATCH' | 'PATH_NOT_FOUND'
|
|
448
|
+
| 'LINE_RANGE_INVALID' | 'ANCESTRY_MISMATCH' | 'ARTIFACT_NOT_FOUND' | 'ARTIFACT_HASH_MISMATCH'
|
|
449
|
+
| 'SOURCE_UNTRACKED' | 'SOURCE_STALE' | 'CAPABILITY_DENIED' | 'CONSENT_REQUIRED'
|
|
450
|
+
| 'SENSITIVITY_BLOCKED' | 'SECRET_DETECTED' | 'UNSUPPORTED_EVIDENCE_KIND'
|
|
451
|
+
| 'EVIDENCE_PROVIDER_UNAVAILABLE' | 'EVIDENCE_RESOLVER_UNREGISTERED'
|
|
452
|
+
| 'EVIDENCE_RESOLVER_UNAVAILABLE' | 'EVIDENCE_RESOLVER_VERSION_UNSUPPORTED'
|
|
453
|
+
| 'EVIDENCE_SOURCE_SCOPE_MISMATCH' | 'EVIDENCE_LOCATOR_INVALID';
|
|
454
|
+
export interface OperateEvidenceImplementationRefV2 { id: string; version: string; }
|
|
455
|
+
export type OperateEvidenceLocatorV2 =
|
|
456
|
+
| { repositoryId: string; revision: string; objectType?: 'commit' | 'tree' | 'blob' | 'tag'; path?: string; lines?: { start: number; end: number }; ancestry?: { ancestorRevision: string } }
|
|
457
|
+
| { sourceRootId: string; path: string }
|
|
458
|
+
| { projectId: string; artifactId: string; artifactType: string; path?: string; contentHash?: string }
|
|
459
|
+
| { artifactId: string; expectedArtifactType: string; expectedSchemaId: string; expectedSchemaVersion: string; expectedRawHash?: string; expectedCanonicalHash?: string };
|
|
460
|
+
export interface OperatingEvidenceCandidateV2 {
|
|
461
|
+
kind: 'operating-evidence-candidate'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
462
|
+
candidateId: string; scopeId: string; domainId: string; domainVersion: string; sourceArtifactId: string;
|
|
463
|
+
evidenceKind: OperateEvidenceKindV2; locator: OperateEvidenceLocatorV2;
|
|
464
|
+
provider: OperateEvidenceImplementationRefV2; resolver: OperateEvidenceImplementationRefV2;
|
|
465
|
+
}
|
|
466
|
+
export type OperatingEvidenceRefV2 = Omit<OperatingEvidenceCandidateV2, 'kind'> & {
|
|
467
|
+
kind: 'operating-evidence-ref'; evidenceRefId: string;
|
|
468
|
+
classification: OperateEvidenceClassificationV2; freshness: OperateEvidenceFreshnessV2;
|
|
469
|
+
evidenceArtifactId: string; evidenceArtifactRawHash: string; evidenceArtifactCanonicalHash: string | null;
|
|
470
|
+
resolvedAt: string;
|
|
471
|
+
};
|
|
472
|
+
export interface OperatingEvidenceResolutionV2 {
|
|
473
|
+
kind: 'operating-evidence-resolution'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
474
|
+
resolutionId: string; candidateId: string; scopeId: string; domainId: string; domainVersion: string;
|
|
475
|
+
sourceArtifactId: string; evidenceKind: OperateEvidenceKindV2;
|
|
476
|
+
provider: OperateEvidenceImplementationRefV2; resolver: OperateEvidenceImplementationRefV2;
|
|
477
|
+
outcome: 'resolved' | 'rejected'; evidenceRefId: string | null; evidenceArtifactId: string | null;
|
|
478
|
+
error: { code: OperateEvidenceResolverErrorCodeV2; retryable: boolean; context: Record<string, string> } | null;
|
|
479
|
+
resolvedAt: string;
|
|
480
|
+
}
|
|
481
|
+
export interface OperatingEvidenceEdgeV2 {
|
|
482
|
+
kind: 'operating-evidence-edge'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
483
|
+
edgeId: string; scopeId: string; domainId: string; domainVersion: string; sourceArtifactId: string;
|
|
484
|
+
localClaimId: string; relation: OperateEvidenceEdgeRelationV2; evidenceRefId: string;
|
|
485
|
+
createdBy: { kind: 'runtime'; id: string }; createdAt: string; confidence: number;
|
|
486
|
+
classification: OperateEvidenceClassificationV2;
|
|
487
|
+
}
|
|
488
|
+
export interface OperatingEvidenceGraphV2 {
|
|
489
|
+
kind: 'operating-evidence-graph'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
490
|
+
scopeId: string; domainId: string; domainVersion: string; generatedAt: string;
|
|
491
|
+
evidenceRefs: OperatingEvidenceRefV2[]; edges: OperatingEvidenceEdgeV2[];
|
|
492
|
+
}
|
|
493
|
+
export interface OperateEvidenceProviderRegistrationV2 {
|
|
494
|
+
kind: 'operate-evidence-provider-registration'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
495
|
+
providerId: string; providerVersion: string; supportedEvidenceKinds: OperateEvidenceKindV2[];
|
|
496
|
+
inputContract: { schemaId: 'operating-evidence-candidate'; schemaVersion: '2.0.0' };
|
|
497
|
+
outputContract: { schemaId: 'operating-evidence-resolution'; schemaVersion: '2.0.0' };
|
|
498
|
+
effectClass: 'local-read-only'; requiredCapabilities: OperateEvidenceReadCapabilityV2[];
|
|
499
|
+
classificationCeiling: OperateEvidenceClassificationV2; retentionClass: 'ephemeral' | 'project' | 'restricted-machine-local';
|
|
500
|
+
provenance: { packageName: string; packageVersion: string; integrity: string };
|
|
501
|
+
conformanceDigest: string;
|
|
502
|
+
implementation: { kind: 'built-in'; id: string };
|
|
503
|
+
fallback: { kind: 'unavailable'; errorCode: 'EVIDENCE_PROVIDER_UNAVAILABLE' };
|
|
504
|
+
}
|
|
505
|
+
export interface OperateEvidenceResolverRegistrationV2 {
|
|
506
|
+
kind: 'operate-evidence-resolver-registration'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
507
|
+
resolverId: string; resolverVersion: string; supportedEvidenceKinds: OperateEvidenceKindV2[];
|
|
508
|
+
inputContract: { schemaId: 'operating-evidence-candidate'; schemaVersion: '2.0.0' };
|
|
509
|
+
outputContract: { schemaId: 'operating-evidence-resolution'; schemaVersion: '2.0.0' };
|
|
510
|
+
evidenceRefContract: { schemaId: 'operating-evidence-ref'; schemaVersion: '2.0.0' };
|
|
511
|
+
effectClass: 'local-read-only'; requiredCapabilities: OperateEvidenceReadCapabilityV2[];
|
|
512
|
+
classificationCeiling: OperateEvidenceClassificationV2; retentionClass: 'ephemeral' | 'project' | 'restricted-machine-local';
|
|
513
|
+
errorCodes: OperateEvidenceResolverErrorCodeV2[];
|
|
514
|
+
provenance: { packageName: string; packageVersion: string; integrity: string };
|
|
515
|
+
conformanceDigest: string;
|
|
516
|
+
implementation: { kind: 'built-in'; id: string };
|
|
517
|
+
fallback: { kind: 'unavailable'; errorCode: 'EVIDENCE_RESOLVER_UNAVAILABLE' };
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
export interface OperateDomainContractBindingV2 {
|
|
521
|
+
apiDomainId: string;
|
|
522
|
+
id: string;
|
|
523
|
+
version: string;
|
|
524
|
+
}
|
|
525
|
+
/** Explicit public API-domain identity; domain names are never derived by convention. */
|
|
526
|
+
export interface PublicOperateDomainContractBindingV2 extends OperateDomainContractBindingV2 {
|
|
527
|
+
apiDomainId: 'business' | 'software';
|
|
528
|
+
id: 'business-domain' | 'software-domain';
|
|
529
|
+
version: '1.0.0';
|
|
530
|
+
}
|
|
531
|
+
export interface OperatingObjectiveV2 {
|
|
532
|
+
kind: 'operating-objective'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
533
|
+
objectiveId: string; scopeId: string; domainId: string; domainVersion: string; title: string;
|
|
534
|
+
status: 'open' | 'at-risk' | 'achieved' | 'deferred' | 'superseded'; ownerActorId: string | null;
|
|
535
|
+
horizon: string; successCriteria: string[]; metricIds: string[]; evidenceRefIds: string[];
|
|
536
|
+
sourceArtifactId: string; createdAt: string; updatedAt: string;
|
|
537
|
+
}
|
|
538
|
+
export interface OperatingMetricV2 {
|
|
539
|
+
kind: 'operating-metric'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
540
|
+
metricId: string; scopeId: string; domainId: string; domainVersion: string; title: string;
|
|
541
|
+
unit: string; aggregation: 'latest' | 'sum' | 'average' | 'minimum' | 'maximum' | 'ratio';
|
|
542
|
+
window: string; target: number | null; threshold: number | null; observationIds: string[];
|
|
543
|
+
freshness: 'current' | 'historical' | 'stale' | 'unknown'; evidenceRefIds: string[];
|
|
544
|
+
sourceArtifactId: string; createdAt: string; updatedAt: string;
|
|
545
|
+
}
|
|
546
|
+
export interface OperatingMetricObservationV2 {
|
|
547
|
+
kind: 'operating-metric-observation'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
548
|
+
observationId: string; metricId: string; scopeId: string; domainId: string; domainVersion: string;
|
|
549
|
+
value: number; unit: string; observedAt: string; snapshotId: string; evidenceRefIds: string[]; sourceArtifactId: string;
|
|
550
|
+
}
|
|
551
|
+
export interface OperatingRiskBaseV2 {
|
|
552
|
+
kind: 'operating-risk'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
553
|
+
riskId: string; scopeId: string; domainId: string; domainVersion: string;
|
|
554
|
+
title: string; statement: string;
|
|
555
|
+
state: 'open' | 'monitoring' | 'mitigated' | 'closed' | 'superseded'; likelihood: number; impact: number; exposure: number;
|
|
556
|
+
ownerActorId: string | null; mitigations: string[]; triggerIds: string[]; evidenceRefIds: string[];
|
|
557
|
+
sourceArtifactId: string; closedAt: string | null; createdAt: string; updatedAt: string;
|
|
558
|
+
revisionId: string; revision: number; predecessorRevisionId: string | null;
|
|
559
|
+
}
|
|
560
|
+
export interface OperatingGenericRiskV2 extends OperatingRiskBaseV2 {
|
|
561
|
+
origin: 'generic';
|
|
562
|
+
}
|
|
563
|
+
export interface OperatingIntelligenceRiskV2 extends OperatingRiskBaseV2 {
|
|
564
|
+
origin: 'operating-intelligence';
|
|
565
|
+
sourceCycleId: string; sourceAssignmentId: string; sourceLocalRiskId: string; sourceClaimIds: string[];
|
|
566
|
+
sourceImpact: OperatingFindingSeverityV2; exposureStatement: string; exposedSurfaces: string[];
|
|
567
|
+
mitigation: string; reversibility: string;
|
|
568
|
+
}
|
|
569
|
+
export type OperatingRiskV2 = OperatingGenericRiskV2 | OperatingIntelligenceRiskV2;
|
|
570
|
+
export interface OperatingAssumptionV2 {
|
|
571
|
+
kind: 'operating-assumption'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
572
|
+
assumptionId: string; scopeId: string; domainId: string; domainVersion: string; statement: string; confidence: number;
|
|
573
|
+
status: 'active' | 'validated' | 'invalidated' | 'closed' | 'superseded'; invalidationConditions: string[];
|
|
574
|
+
affectedDecisionIds: string[]; affectedActionIds: string[]; evidenceRefIds: string[]; sourceArtifactId: string;
|
|
575
|
+
closedAt: string | null; createdAt: string; updatedAt: string;
|
|
576
|
+
revisionId: string; revision: number; predecessorRevisionId: string | null;
|
|
577
|
+
}
|
|
578
|
+
export interface OperatingClaimV2 {
|
|
579
|
+
kind: 'operating-claim'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
580
|
+
claimId: string; scopeId: string; domainId: string; domainVersion: string; statement: string;
|
|
581
|
+
epistemicStatus: 'known' | 'strongly-supported' | 'probable' | 'speculative' | 'unknown'; confidence: number;
|
|
582
|
+
supportingEvidenceRefIds: string[]; contradictingEvidenceRefIds: string[]; assumptionIds: string[];
|
|
583
|
+
changeCondition: string; sourceArtifactId: string; createdAt: string;
|
|
584
|
+
}
|
|
585
|
+
export interface OperatingModelStateV2 {
|
|
586
|
+
kind: 'operating-model-state'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
587
|
+
stateId: string; scopeId: string; domainId: string; domainVersion: string; snapshotId: string; runtimeHash: string;
|
|
588
|
+
objectives: OperatingObjectiveV2[]; metrics: OperatingMetricV2[]; findings: OperatingFindingV2[];
|
|
589
|
+
decisions: OperatingDecisionV2[]; actions: OperatingActionV2[]; risks: OperatingRiskV2[]; assumptions: OperatingAssumptionV2[];
|
|
590
|
+
generatedAt: string;
|
|
591
|
+
}
|
|
592
|
+
export interface OperatingSnapshotV2 {
|
|
593
|
+
kind: 'operating-snapshot'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
594
|
+
snapshotId: string; scopeId: string; domainId: string; domainVersion: string; domainContract: OperateDomainContractBindingV2;
|
|
595
|
+
stateId: string; runtimeHash: string; previousSnapshotId: string | null; sourceArtifactIds: string[]; evidenceRefIds: string[];
|
|
596
|
+
sourceRevisions: Array<{ sourceArtifactId: string; revision: string; evidenceRefIds?: string[] }>; createdAt: string;
|
|
597
|
+
}
|
|
598
|
+
export interface OperatingDomainProjectionV2 {
|
|
599
|
+
kind: 'operating-domain-projection'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
600
|
+
projectionId: string; scopeId: string; domainId: string; domainVersion: string; domainContract: OperateDomainContractBindingV2;
|
|
601
|
+
snapshotId: string; stateId: string; sourceArtifactIds: string[]; projectionContract: { schemaId: string; schemaVersion: string }; derivedAt: string;
|
|
602
|
+
}
|
|
603
|
+
export interface BusinessOperatingSnapshotProjectionV2 extends Omit<OperatingDomainProjectionV2, 'kind' | 'domainId' | 'domainContract'> {
|
|
604
|
+
kind: 'business-operating-snapshot-projection'; domainId: 'business';
|
|
605
|
+
domainContract: { apiDomainId: 'business'; id: 'business-domain'; version: '1.0.0' };
|
|
606
|
+
}
|
|
607
|
+
export interface SoftwareOperatingSnapshotProjectionV2 extends Omit<OperatingDomainProjectionV2, 'kind' | 'domainId' | 'domainContract'> {
|
|
608
|
+
kind: 'software-operating-snapshot-projection'; domainId: 'software';
|
|
609
|
+
domainContract: { apiDomainId: 'software'; id: 'software-domain'; version: '1.0.0' };
|
|
610
|
+
}
|
|
611
|
+
export interface OperatingDeltaV2 {
|
|
612
|
+
kind: 'operating-delta'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
613
|
+
deltaId: string; scopeId: string; domainId: string; domainVersion: string; priorSnapshotId: string | null; currentSnapshotId: string;
|
|
614
|
+
sourceRevisionChanges: Array<{ subjectId: string; kind: 'added' | 'removed' | 'changed' | 'stale' | 'conflict'; evidenceRefIds?: string[] }>;
|
|
615
|
+
metricChanges: Array<{ subjectId: string; kind: 'added' | 'removed' | 'changed' | 'stale' | 'conflict'; evidenceRefIds?: string[] }>;
|
|
616
|
+
staleEvidenceRefIds: string[]; conflictingEvidenceRefIds: string[]; invalidatedAssumptionIds: string[]; exposedRiskIds: string[]; decisionRevisitIds: string[]; sourceArtifactId: string; derivedAt: string;
|
|
617
|
+
}
|
|
618
|
+
export interface OperatingIntelligencePlanV2 {
|
|
619
|
+
kind: 'operating-intelligence-plan'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
620
|
+
planId: string; scopeId: string; domainId: string; domainVersion: string; snapshotId: string; deltaId: string;
|
|
621
|
+
selectedRoles: Array<{ roleId: string; roleKind: 'advisor' | 'challenger' | 'chair'; roleVersion: string; inputArtifactIds: string[]; outputContract: { schemaId: string; schemaVersion: string }; dependsOnRoleIds: string[]; reason: string }>;
|
|
622
|
+
omittedRoles: Array<{ roleId: string; roleKind: 'advisor' | 'challenger' | 'chair'; roleVersion: string; reason: string }>;
|
|
623
|
+
challengerRequired: boolean; scenarioRequest: { requested: boolean; reason: string }; sourceArtifactId: string; decisionOwnerActorId: string; createdAt: string;
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
export interface OperatingStateProjectionRecordV2 {
|
|
627
|
+
recordId: string;
|
|
628
|
+
recordKind: 'objective' | 'metric' | 'finding' | 'decision' | 'action' | 'risk' | 'assumption';
|
|
629
|
+
title: string;
|
|
630
|
+
state: string;
|
|
631
|
+
evidenceRefIds: string[];
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
export interface OperatingIntelligenceInputBundleV2 {
|
|
635
|
+
kind: 'operating-intelligence-input-bundle'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
636
|
+
bundleId: string; cycleId: string; snapshotId: string; deltaId: string; scopeId: string; domainId: string; domainVersion: string;
|
|
637
|
+
snapshot: OperatingSnapshotV2; delta: OperatingDeltaV2;
|
|
638
|
+
operatingState: {
|
|
639
|
+
kind: 'operating-state-projection'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
640
|
+
sourceStateId: string; sourceRuntimeHash: string; scopeId: string; domainId: string; domainVersion: string; snapshotId: string;
|
|
641
|
+
selectionPolicy: 'deterministic-priority-v1';
|
|
642
|
+
objectives: OperatingStateProjectionRecordV2[]; metrics: OperatingStateProjectionRecordV2[]; findings: OperatingStateProjectionRecordV2[];
|
|
643
|
+
decisions: OperatingStateProjectionRecordV2[]; actions: OperatingStateProjectionRecordV2[]; risks: OperatingStateProjectionRecordV2[];
|
|
644
|
+
assumptions: OperatingStateProjectionRecordV2[];
|
|
645
|
+
coverage: Record<'objectives' | 'metrics' | 'findings' | 'decisions' | 'actions' | 'risks' | 'assumptions', { included: number; total: number; omitted: number }>;
|
|
646
|
+
projectedAt: string;
|
|
647
|
+
};
|
|
648
|
+
sourceArtifactIds: string[];
|
|
649
|
+
assignmentBinding: {
|
|
650
|
+
assignmentId: string; roleId: string; roleKind: 'advisor' | 'challenger' | 'chair'; roleVersion: string;
|
|
651
|
+
analysisProfile: OperatingAnalysisProfileV2; evidenceRequirements: OperatingEvidenceRequirementV2[];
|
|
652
|
+
resultRequirements: OperatingResultRequirementV2[]; issuedEvidence: OperatingIssuedEvidenceV2[];
|
|
653
|
+
evidenceAbsences: OperatingEvidenceInputAbsenceV2[];
|
|
654
|
+
};
|
|
655
|
+
createdAt: string;
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
export interface OperatingAdvisorQuestionAnswerV2 {
|
|
659
|
+
questionId: string; answer: string; claimIds: string[]; measurementIds: string[]; riskIds: string[]; evidenceRefIds: string[]; absenceIds: string[];
|
|
660
|
+
}
|
|
661
|
+
export interface OperatingAdvisorProfileInsightV2 {
|
|
662
|
+
localAnalysisId: string; title: string; statement: string; claimIds: string[]; measurementIds: string[];
|
|
663
|
+
riskIds: string[]; alternativeIds: string[]; evidenceRefIds: string[]; absenceIds: string[];
|
|
664
|
+
}
|
|
665
|
+
type OperatingAdvisorProfileAnalysisV2 = {
|
|
666
|
+
profileId: 'strategy-finance' | 'technology-risk' | 'product-activation' | 'growth-market' | 'operations-customer' | 'software-delivery';
|
|
667
|
+
executiveQuestionAnswers: OperatingAdvisorQuestionAnswerV2[];
|
|
668
|
+
} & Record<string, OperatingAdvisorProfileInsightV2[] | OperatingAdvisorProfileInsightV2 | null | string | OperatingAdvisorQuestionAnswerV2[]>;
|
|
669
|
+
export interface OperatingAdvisorClaimV2 {
|
|
670
|
+
localClaimId: string; statement: string; epistemicStatus: 'known' | 'strongly-supported' | 'probable' | 'speculative' | 'unknown';
|
|
671
|
+
confidence: number; supportingEvidenceRefIds: string[]; contradictingEvidenceRefIds: string[]; assumptionIds: string[]; changeCondition: string;
|
|
672
|
+
}
|
|
673
|
+
export type OperatingAdvisorMeasureKindV2 = 'runway' | 'margin' | 'funnel' | 'channel-economics' | 'capacity' | 'throughput' | 'exposure' | 'scenario' | 'metric-trend';
|
|
674
|
+
export type OperatingAdvisorMeasurementV2 = {
|
|
675
|
+
localMeasurementId: string; kind: OperatingAdvisorMeasureKindV2; name: string; period: string;
|
|
676
|
+
evidenceRefIds: string[]; interpretation: string; confidence: number;
|
|
677
|
+
} & Record<string, JsonValue>;
|
|
678
|
+
export interface OperatingAdvisorRiskV2 {
|
|
679
|
+
localRiskId: string; title: string; statement: string; likelihood: number; impact: 'low' | 'medium' | 'high' | 'critical';
|
|
680
|
+
exposure: string; exposedSurfaces: string[]; claimIds: string[]; evidenceRefIds: string[]; mitigation: string; reversibility: string;
|
|
681
|
+
}
|
|
682
|
+
export interface OperatingAdvisorAlternativeV2 {
|
|
683
|
+
localAlternativeId: string; title: string; description: string; supportingClaimIds: string[]; evidenceRefIds: string[];
|
|
684
|
+
tradeoffs: string[]; costOfDelay: string; reversibility: string;
|
|
685
|
+
}
|
|
686
|
+
export interface OperatingIntelligenceGapV2 {
|
|
687
|
+
localGapId: string; inputAbsenceId: string; requirementId: string; impact: string; recoveryPath: string;
|
|
688
|
+
}
|
|
689
|
+
export type OperatingChallengerGapV2 =
|
|
690
|
+
| {
|
|
691
|
+
localGapId: string; inputAbsenceId: string; kind: 'evidence'; requirementId: string;
|
|
692
|
+
impact: string; recoveryPath: string;
|
|
693
|
+
}
|
|
694
|
+
| {
|
|
695
|
+
localGapId: string; inputAbsenceId: string; kind: 'role'; roleId: string;
|
|
696
|
+
roleKind: 'advisor' | 'challenger' | 'chair'; roleVersion: string; sourceAssignmentId: string | null;
|
|
697
|
+
impact: string; recoveryPath: string;
|
|
698
|
+
};
|
|
699
|
+
export interface OperatingAdvisorRecommendationV2 {
|
|
700
|
+
localRecommendationId: string; title: string; proposal: string; rationaleClaimIds: string[]; alternativeIds: string[];
|
|
701
|
+
riskIds: string[]; confidence: number; expectedUpside: string; expectedDownside: string; uncertainty: string;
|
|
702
|
+
reversibility: string; successMeasurementIds: string[]; revisitConditions: string[];
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
export interface OperatingAdvisorResultV2 {
|
|
706
|
+
kind: 'operating-advisor-result'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
707
|
+
assignmentId: string; roleId: string; roleVersion: string; analysisProfile: OperatingAnalysisProfileV2;
|
|
708
|
+
intelligencePlanId: string; snapshotId: string; scopeId: string; domainId: string; domainVersion: string;
|
|
709
|
+
outcome: 'recommendation' | 'partial' | 'quiet'; summary: string; analysisMarkdown: string; inputAbsenceIds: string[];
|
|
710
|
+
analysis: OperatingAdvisorProfileAnalysisV2; claims: OperatingAdvisorClaimV2[]; measurements: OperatingAdvisorMeasurementV2[];
|
|
711
|
+
risks: OperatingAdvisorRiskV2[]; alternatives: OperatingAdvisorAlternativeV2[]; gaps: OperatingIntelligenceGapV2[];
|
|
712
|
+
recommendation: OperatingAdvisorRecommendationV2 | null;
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
export type OperatingContextCaptureV2 = {
|
|
716
|
+
kind: 'operating-context-capture';
|
|
717
|
+
schemaVersion: '1.0.0';
|
|
718
|
+
protocolVersion: '2.0.0';
|
|
719
|
+
scope: { scopeId: string; domainId: string; domainVersion: string };
|
|
720
|
+
} & (
|
|
721
|
+
| { contextKind: 'cycle-evidence'; focus: string[]; trigger: { kind: 'manual' } }
|
|
722
|
+
| {
|
|
723
|
+
contextKind: 'cycle-manifest';
|
|
724
|
+
evidenceCandidates: OperatingEvidenceCandidateV2[];
|
|
725
|
+
evidenceClaimLinks: Array<{
|
|
726
|
+
sourceArtifactId: string;
|
|
727
|
+
localClaimId: string;
|
|
728
|
+
relation: 'supportedBy' | 'contradictedBy';
|
|
729
|
+
confidence: number;
|
|
730
|
+
}>;
|
|
731
|
+
}
|
|
732
|
+
);
|
|
733
|
+
|
|
734
|
+
export interface OperatingChallengerReviewV2 {
|
|
735
|
+
kind: 'operating-challenger-review'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
736
|
+
assignmentId: string; roleId: string; roleVersion: string; analysisProfile: OperatingAnalysisProfileV2;
|
|
737
|
+
intelligencePlanId: string; snapshotId: string; scopeId: string; domainId: string; domainVersion: string;
|
|
738
|
+
summary: string; analysisMarkdown: string; inputAbsenceIds: string[]; advisorArtifactIds: string[];
|
|
739
|
+
reviewedClaims: Array<{ advisorArtifactId: string; localClaimId: string }>;
|
|
740
|
+
questionCoverage: Array<{
|
|
741
|
+
questionId: string; disposition: 'answered' | 'gap' | 'not-applicable'; answer: string;
|
|
742
|
+
findingIds: string[]; alternativeIds: string[]; dissentIds: string[]; gapIds: string[]; justification: string | null;
|
|
743
|
+
}>;
|
|
744
|
+
findings: Array<{
|
|
745
|
+
localFindingId: string; title: string; statement: string;
|
|
746
|
+
type: 'unsupported' | 'contradicted' | 'correlated-reasoning' | 'missing-alternative' | 'unpriced-downside' | 'irreversibility-mismatch' | 'overconfidence' | 'scope-violation';
|
|
747
|
+
severity: 'low' | 'medium' | 'high' | 'critical'; confidence: number;
|
|
748
|
+
targets: Array<{ advisorArtifactId: string; analysisIds: string[]; claimIds: string[]; measurementIds: string[]; riskIds: string[]; recommendationIds: string[] }>;
|
|
749
|
+
supportingEvidenceRefIds: string[]; contradictingEvidenceRefIds: string[]; rationale: string; correctionCondition: string;
|
|
750
|
+
}>;
|
|
751
|
+
missingAlternatives: Array<{ localAlternativeId: string; title: string; description: string; targets: Array<{ advisorArtifactId: string; analysisIds: string[]; claimIds: string[]; measurementIds: string[]; riskIds: string[]; recommendationIds: string[] }>; evidenceRefIds: string[]; tradeoffs: string[] }>;
|
|
752
|
+
dissent: Array<{ localDissentId: string; findingIds: string[]; statement: string; evidenceRefIds: string[]; resolutionCondition: string }>;
|
|
753
|
+
gaps: OperatingChallengerGapV2[];
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
export function assertOperateIntelligencePlanContractV2(
|
|
757
|
+
value: OperatingIntelligencePlanV2,
|
|
758
|
+
): OperatingIntelligencePlanV2;
|
|
759
|
+
export interface OperatingDecisionLedgerV2 {
|
|
760
|
+
kind: 'operating-decision-ledger'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
761
|
+
assignmentId: string; roleId: string; roleVersion: string; analysisProfile: OperatingAnalysisProfileV2;
|
|
762
|
+
ledgerId: string; scopeId: string; domainId: string; domainVersion: string; snapshotId: string; intelligencePlanId: string; summary: string;
|
|
763
|
+
advisorArtifactIds: string[]; challengerArtifactId: string | null;
|
|
764
|
+
advisorAbsenceGaps: OperatingRoleInputAbsenceV2[]; evidenceGaps: OperatingEvidenceInputAbsenceV2[];
|
|
765
|
+
questionCoverage: Array<{
|
|
766
|
+
questionId: string; disposition: 'answered' | 'gap' | 'not-applicable'; answer: string;
|
|
767
|
+
decisionIds: string[]; findingIds: string[]; dissentIds: string[]; absenceIds: string[]; justification: string | null;
|
|
768
|
+
}>;
|
|
769
|
+
decisions: Array<{
|
|
770
|
+
localDecisionId: string; title: string; question: string; outcome: string; rationale: string;
|
|
771
|
+
sourceClaimRefs: Array<{ advisorArtifactId: string; localClaimId: string }>;
|
|
772
|
+
sourceRecommendationRefs: Array<{ advisorArtifactId: string; localRecommendationId: string }>;
|
|
773
|
+
challengerFindingIds: string[]; evidenceRefIds: string[];
|
|
774
|
+
alternativeDispositions: Array<{ sourceArtifactId: string; localAlternativeId: string; title: string; disposition: 'accepted' | 'rejected' | 'deferred'; rationale: string }>;
|
|
775
|
+
confidence: number; assumptionIds: string[]; upside: string; downside: string; uncertainty: string; reversibility: string;
|
|
776
|
+
ownerActorId: string; revisitConditions: string[]; dissentIds: string[]; actionHypotheses: OperatingActionHypothesisV2[];
|
|
777
|
+
}>;
|
|
778
|
+
sourceDispositions: Array<{ sourceArtifactId: string; sourceKind: 'advisor-outcome' | 'advisor-recommendation' | 'challenger-finding' | 'challenger-dissent'; localSourceId: string; sourceOutcome: 'partial' | 'quiet' | null; disposition: 'accepted' | 'rejected' | 'deferred' | 'noted'; localDecisionId: string | null; rationale: string }>;
|
|
779
|
+
dissent: Array<{ sourceArtifactId: string; localDissentId: string; findingIds: string[]; statement: string; evidenceRefIds: string[]; resolutionCondition: string }>;
|
|
780
|
+
sourceArtifactId: string;
|
|
781
|
+
}
|
|
782
|
+
export interface OperatingActionHypothesisV2 {
|
|
783
|
+
localActionHypothesisId: string; title: string; objectiveId: string; ownerActorId: string | null; accountabilityDisposition: 'unowned' | 'blocked' | null;
|
|
784
|
+
expectedResult: string; metricId: string; baseline: number; target: number; verificationWindow: string;
|
|
785
|
+
verificationMethod: string; sourceClaimRefs: Array<{ advisorArtifactId: string; localClaimId: string }>;
|
|
786
|
+
sourceFindingIds: string[]; dependsOnActionHypothesisIds: string[];
|
|
787
|
+
}
|
|
788
|
+
export interface OperatingActionVerificationPlanV2 {
|
|
789
|
+
kind: 'operating-action-verification-plan'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
790
|
+
verificationPlanId: string; actionId: string; scopeId: string; domainId: string; domainVersion: string; metricId: string;
|
|
791
|
+
baseline: number; target: number; window: string; method: string;
|
|
792
|
+
observationRequest: { kind: 'future-observation' | 'future-analysis'; reason: string }; evaluationRules: string[]; revisitDecisionIds: string[]; sourceArtifactId: string; createdAt: string;
|
|
793
|
+
}
|
|
794
|
+
export interface OperatingOutcomeV2 {
|
|
795
|
+
kind: 'operating-outcome'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
796
|
+
outcomeId: string; actionId: string; scopeId: string; domainId: string; domainVersion: string; verificationPlanId: string;
|
|
797
|
+
status: 'succeeded' | 'failed' | 'blocked' | 'cancelled' | 'insufficient-evidence'; observationIds: string[]; evidenceRefIds: string[]; sourceArtifactId: string; observedAt: string;
|
|
798
|
+
}
|
|
799
|
+
export interface OperatingLearningV2 {
|
|
800
|
+
kind: 'operating-learning'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
801
|
+
learningId: string; scopeId: string; domainId: string; domainVersion: string; statement: string; outcomeId: string;
|
|
802
|
+
assumptionIds: string[]; decisionIds: string[]; evidenceRefIds: string[]; sourceArtifactId: string; createdAt: string;
|
|
803
|
+
}
|
|
804
|
+
export type OperatingExecutionVerificationStatusV2 =
|
|
805
|
+
| 'success' | 'failure' | 'blocked' | 'uncertain' | 'partial' | 'cancelled' | 'rolled-back';
|
|
806
|
+
export type OperatingHypothesisVerificationStatusV2 =
|
|
807
|
+
| 'pending' | 'confirmed' | 'failed' | 'blocked' | 'cancelled' | 'revisit';
|
|
808
|
+
export interface OperatingVerificationFeedbackV2 {
|
|
809
|
+
actionId: string; verificationPlanId: string;
|
|
810
|
+
executionStatus: OperatingExecutionVerificationStatusV2;
|
|
811
|
+
hypothesisStatus: OperatingHypothesisVerificationStatusV2;
|
|
812
|
+
executionCompleted: boolean; hypothesisConfirmed: boolean; revisit: boolean; cycleClosed: boolean;
|
|
813
|
+
provenance: {
|
|
814
|
+
outcomeId: string | null; learningId: string | null; deltaId: string | null; snapshotId: string | null;
|
|
815
|
+
sourceArtifactId: string; observationIds: string[]; evidenceRefIds: string[];
|
|
816
|
+
};
|
|
817
|
+
}
|
|
818
|
+
export interface OperatingScenarioV2 {
|
|
819
|
+
kind: 'operating-scenario'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
820
|
+
scenarioId: string; scopeId: string; domainId: string; domainVersion: string; snapshotId: string;
|
|
821
|
+
base: OperatingScenarioCaseV2; upside: OperatingScenarioCaseV2; downside: OperatingScenarioCaseV2;
|
|
822
|
+
breakEven: string; assumptionIds: string[]; evidenceRefIds: string[]; uncertainty: string; sourceArtifactId: string; createdAt: string;
|
|
823
|
+
}
|
|
824
|
+
export interface OperatingScenarioCaseV2 { statement: string; assumptionIds: string[]; evidenceRefIds: string[]; sourceArtifactId: string; }
|
|
825
|
+
export interface OperatingEventTriggerV2 {
|
|
826
|
+
kind: 'operating-event-trigger'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
827
|
+
triggerId: string; scopeId: string; domainId: string; domainVersion: string; snapshotId: string;
|
|
828
|
+
condition: string; evidenceRefIds: string[]; requestedWork: 'observation' | 'cycle'; sourceArtifactId: string; createdAt: string;
|
|
829
|
+
}
|
|
830
|
+
export interface OperateSignalProviderRegistrationV2 {
|
|
831
|
+
providerId: string; providerVersion: string;
|
|
832
|
+
supportedDomains: Array<{ apiDomainId: string; domainContractId: string; domainContractVersion: string }>;
|
|
833
|
+
inputContract: { schemaId: string; schemaVersion: '2.0.0' }; outputContract: { schemaId: string; schemaVersion: '2.0.0' };
|
|
834
|
+
accessMode: 'accepted-input-only' | 'declared-read-only'; returnSemantics: 'candidate'; errorCodes: Array<'OPERATING_PROVIDER_INPUT_INVALID' | 'OPERATING_PROVIDER_UNAVAILABLE'>;
|
|
835
|
+
provenance: { packageName: string; packageVersion: string; integrity: string }; conformanceDigest: string; implementation: { kind: 'built-in'; id: string }; fallback: { kind: 'unavailable'; errorCode: 'OPERATING_PROVIDER_UNAVAILABLE' };
|
|
836
|
+
}
|
|
837
|
+
export interface OperateSnapshotProviderRegistrationV2 extends OperateSignalProviderRegistrationV2 { kind: 'operate-snapshot-provider-registration'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0'; }
|
|
838
|
+
export interface OperateMetricProviderRegistrationV2 extends OperateSignalProviderRegistrationV2 { kind: 'operate-metric-provider-registration'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0'; }
|
|
839
|
+
export interface OperateVerificationProviderRegistrationV2 extends OperateSignalProviderRegistrationV2 { kind: 'operate-verification-provider-registration'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0'; }
|
|
840
|
+
|
|
841
|
+
export type OperateErrorCodeV2 =
|
|
842
|
+
| 'ARTIFACT_NOT_FOUND'
|
|
843
|
+
| 'ARTIFACT_HASH_MISMATCH'
|
|
844
|
+
| 'ANCESTRY_MISMATCH'
|
|
845
|
+
| 'ASSIGNMENT_ALREADY_CLAIMED'
|
|
846
|
+
| 'ASSIGNMENT_ALREADY_SUBMITTED'
|
|
847
|
+
| 'ASSIGNMENT_NOT_AVAILABLE'
|
|
848
|
+
| 'CAPABILITY_DENIED'
|
|
849
|
+
| 'CONCURRENT_MODIFICATION'
|
|
850
|
+
| 'CONTRACT_VERSION_UNSUPPORTED'
|
|
851
|
+
| 'CONSENT_REQUIRED'
|
|
852
|
+
| 'CYCLE_NOT_FOUND'
|
|
853
|
+
| 'CYCLE_TERMINAL'
|
|
854
|
+
| 'DOMAIN_CONTRACT_UNSUPPORTED'
|
|
855
|
+
| 'EVIDENCE_LOCATOR_INVALID'
|
|
856
|
+
| 'EVIDENCE_PROVIDER_UNAVAILABLE'
|
|
857
|
+
| 'EVIDENCE_RESOLUTION_FAILED'
|
|
858
|
+
| 'EVIDENCE_RESOLVER_UNAVAILABLE'
|
|
859
|
+
| 'EVIDENCE_RESOLVER_UNREGISTERED'
|
|
860
|
+
| 'EVIDENCE_RESOLVER_VERSION_UNSUPPORTED'
|
|
861
|
+
| 'EVIDENCE_SOURCE_SCOPE_MISMATCH'
|
|
862
|
+
| 'LINE_RANGE_INVALID'
|
|
863
|
+
| 'OBJECT_TYPE_MISMATCH'
|
|
864
|
+
| 'OPERATING_PROVIDER_INPUT_INVALID'
|
|
865
|
+
| 'OPERATING_PROVIDER_UNAVAILABLE'
|
|
866
|
+
| 'OPERATING_SCOPE_INVALID'
|
|
867
|
+
| 'PATH_NOT_FOUND'
|
|
868
|
+
| 'REVIEW_NOT_AUTHORIZED'
|
|
869
|
+
| 'REVIEW_NOT_FOUND'
|
|
870
|
+
| 'REVIEW_NOT_PENDING'
|
|
871
|
+
| 'RESULT_CONTRACT_INVALID'
|
|
872
|
+
| 'REVISION_NOT_FOUND'
|
|
873
|
+
| 'SECRET_DETECTED'
|
|
874
|
+
| 'SENSITIVITY_BLOCKED'
|
|
875
|
+
| 'SOURCE_NOT_FOUND'
|
|
876
|
+
| 'SOURCE_STALE'
|
|
877
|
+
| 'SOURCE_UNTRACKED'
|
|
878
|
+
| 'STATE_TRANSITION_INVALID'
|
|
879
|
+
| 'SUBMISSION_ID_CONFLICT'
|
|
880
|
+
| 'UNSUPPORTED_EVIDENCE_KIND'
|
|
881
|
+
| 'ACTION_NOT_FOUND'
|
|
882
|
+
| 'ACTION_REVISION_MISMATCH'
|
|
883
|
+
| 'POLICY_EVALUATION_REJECTED'
|
|
884
|
+
| 'POLICY_EVALUATION_DEFERRED'
|
|
885
|
+
| 'POLICY_PROHIBITED'
|
|
886
|
+
| 'APPROVAL_REQUIRED'
|
|
887
|
+
| 'APPROVAL_INVALID'
|
|
888
|
+
| 'APPROVAL_EXPIRED'
|
|
889
|
+
| 'CAPABILITY_UNAVAILABLE'
|
|
890
|
+
| 'CAPABILITY_GRANT_INVALID'
|
|
891
|
+
| 'CAPABILITY_GRANT_CONSUMED'
|
|
892
|
+
| 'CAPABILITY_PROVIDER_UNAVAILABLE'
|
|
893
|
+
| 'POLICY_PROVIDER_UNAVAILABLE'
|
|
894
|
+
| 'EXECUTOR_UNAVAILABLE'
|
|
895
|
+
| 'OPERATION_CONFLICT'
|
|
896
|
+
| 'OPERATION_UNCERTAIN'
|
|
897
|
+
| 'ROLLBACK_NOT_ELIGIBLE';
|
|
898
|
+
|
|
899
|
+
export interface OperateToolRequestMapV2 {
|
|
900
|
+
'operate.cycle.start': {
|
|
901
|
+
scope: { scopeId: string; domainId: string; domainVersion: string };
|
|
902
|
+
focus: string[];
|
|
903
|
+
trigger: OperatePhase1TriggerV2;
|
|
904
|
+
mode: 'standard' | 'preview';
|
|
905
|
+
ownerActorId: string;
|
|
906
|
+
deliveryRoute?: 'contained-execution' | 'planning-work' | 'human-external' | 'observe-only';
|
|
907
|
+
};
|
|
908
|
+
'operate.cycle.get': { cycleId: string };
|
|
909
|
+
'operate.cycle.resume': { cycleId: string };
|
|
910
|
+
'operate.assignment.claim': {
|
|
911
|
+
assignmentId: string;
|
|
912
|
+
actor: OperatePublicActorV2;
|
|
913
|
+
};
|
|
914
|
+
'operate.assignment.submit': {
|
|
915
|
+
assignmentId: string;
|
|
916
|
+
submissionId: string;
|
|
917
|
+
actor: OperatePublicActorV2;
|
|
918
|
+
mediaType: string;
|
|
919
|
+
encoding: 'utf-8' | 'binary';
|
|
920
|
+
contentBase64: string;
|
|
921
|
+
};
|
|
922
|
+
'operate.artifact.get': {
|
|
923
|
+
artifactId: string;
|
|
924
|
+
representation: 'raw' | 'canonical' | 'metadata' | 'decoded-json';
|
|
925
|
+
actor: OperatePublicActorV2;
|
|
926
|
+
scope: { scopeId: string; domainId: string; domainVersion: string };
|
|
927
|
+
assignmentId: string | null;
|
|
928
|
+
};
|
|
929
|
+
'operate.review.get': {
|
|
930
|
+
reviewId: string;
|
|
931
|
+
cycleId: string;
|
|
932
|
+
actor: OperatePublicActorV2 & { kind: 'human' };
|
|
933
|
+
scope: { scopeId: string; domainId: string; domainVersion: string };
|
|
934
|
+
};
|
|
935
|
+
'operate.review.submit': {
|
|
936
|
+
reviewId: string;
|
|
937
|
+
cycleId: string;
|
|
938
|
+
actor: OperatePublicActorV2 & { kind: 'human' };
|
|
939
|
+
scope: { scopeId: string; domainId: string; domainVersion: string };
|
|
940
|
+
disposition: Exclude<OperatingReviewStateV2, 'pending'>;
|
|
941
|
+
workDispositions: OperatingWorkDispositionV2[];
|
|
942
|
+
};
|
|
943
|
+
'operate.action.approve': {
|
|
944
|
+
action: OperateActionIdentityV2;
|
|
945
|
+
decision: 'approved' | 'rejected' | 'deferred';
|
|
946
|
+
};
|
|
947
|
+
'operate.action.execute': { action: OperateActionIdentityV2 };
|
|
948
|
+
'operate.action.rollback': {
|
|
949
|
+
action: OperateActionIdentityV2;
|
|
950
|
+
originalOperationId: string;
|
|
951
|
+
rollbackPlanId: string;
|
|
952
|
+
};
|
|
953
|
+
}
|
|
954
|
+
|
|
955
|
+
export type OperateAllowedActionV2<TTool extends OperateToolNameV2 = OperateToolNameV2> = {
|
|
956
|
+
[TCurrentTool in TTool]: {
|
|
957
|
+
tool: TCurrentTool;
|
|
958
|
+
arguments: OperateToolRequestMapV2[TCurrentTool];
|
|
959
|
+
label: string;
|
|
960
|
+
effect: 'read-only' | 'machine-local-write' | 'project-write';
|
|
961
|
+
};
|
|
962
|
+
}[TTool];
|
|
963
|
+
|
|
964
|
+
export interface OperatePublicActorV2 {
|
|
965
|
+
actorId: string;
|
|
966
|
+
kind: 'agent' | 'human';
|
|
967
|
+
runtime: string;
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
export interface OperateErrorContextV2 {
|
|
971
|
+
operation?: string;
|
|
972
|
+
cycleId?: string;
|
|
973
|
+
assignmentId?: string;
|
|
974
|
+
submissionId?: string;
|
|
975
|
+
submissionState?: string;
|
|
976
|
+
reviewId?: string;
|
|
977
|
+
ownerActorId?: string;
|
|
978
|
+
state?: string;
|
|
979
|
+
maxBytes?: number;
|
|
980
|
+
}
|
|
981
|
+
|
|
982
|
+
export interface OperateErrorV2 {
|
|
983
|
+
code: OperateErrorCodeV2;
|
|
984
|
+
message: string;
|
|
985
|
+
retryable: boolean;
|
|
986
|
+
context: OperateErrorContextV2;
|
|
987
|
+
}
|
|
988
|
+
|
|
989
|
+
export interface OperatingCycleViewV2 {
|
|
990
|
+
cycle: OperatingCycleV2;
|
|
991
|
+
progress: {
|
|
992
|
+
total: number;
|
|
993
|
+
pending: number;
|
|
994
|
+
available: number;
|
|
995
|
+
active: number;
|
|
996
|
+
submitted: number;
|
|
997
|
+
validated: number;
|
|
998
|
+
rejected: number;
|
|
999
|
+
terminal: number;
|
|
1000
|
+
};
|
|
1001
|
+
availableAssignments: OperatingAssignmentV2[];
|
|
1002
|
+
acceptedArtifactIds: string[];
|
|
1003
|
+
persistentWork: {
|
|
1004
|
+
ledger: OperatingWorkLedgerV2;
|
|
1005
|
+
cycleLinks: OperatingWorkCycleLinkV2[];
|
|
1006
|
+
};
|
|
1007
|
+
actions: OperateAllowedActionV2[];
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
export interface OperatingAssignmentClaimV2 {
|
|
1011
|
+
assignment: OperatingAssignmentV2 & { state: 'running' };
|
|
1012
|
+
capabilities: string[];
|
|
1013
|
+
submissionId: string;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
export interface OperatingSubmissionAcceptanceV2 {
|
|
1017
|
+
accepted: true;
|
|
1018
|
+
artifactId: string;
|
|
1019
|
+
rawHash: string;
|
|
1020
|
+
sizeBytes: number;
|
|
1021
|
+
assignmentState: 'validated';
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
export interface OperatingReviewDecisionSummaryBaseV2 {
|
|
1025
|
+
decisionId: string; title: string; question: string; outcome: string | null; rationale: string;
|
|
1026
|
+
confidence: number; ownerActorId: string; expectedUpside: string; expectedDownside: string;
|
|
1027
|
+
revisitConditions: string[]; dissent: string[]; evidenceRefIds: string[];
|
|
1028
|
+
}
|
|
1029
|
+
export interface OperatingReviewPersistentWorkDecisionSummaryV2 extends OperatingReviewDecisionSummaryBaseV2 {
|
|
1030
|
+
origin: 'persistent-work';
|
|
1031
|
+
}
|
|
1032
|
+
export interface OperatingReviewIntelligenceDecisionSummaryV2 extends OperatingReviewDecisionSummaryBaseV2 {
|
|
1033
|
+
origin: 'operating-intelligence'; uncertainty: string; reversibility: string; dissentIds: string[];
|
|
1034
|
+
}
|
|
1035
|
+
export type OperatingReviewDecisionSummaryV2 =
|
|
1036
|
+
| OperatingReviewPersistentWorkDecisionSummaryV2
|
|
1037
|
+
| OperatingReviewIntelligenceDecisionSummaryV2;
|
|
1038
|
+
|
|
1039
|
+
export interface OperatingReviewFindingSummaryBaseV2 {
|
|
1040
|
+
findingId: string; title: string; statement: string; state: OperatingFindingStateV2;
|
|
1041
|
+
ownerActorId: string | null; revisitAt: string | null;
|
|
1042
|
+
}
|
|
1043
|
+
export interface OperatingReviewPersistentWorkFindingSummaryV2 extends OperatingReviewFindingSummaryBaseV2 {
|
|
1044
|
+
origin: 'persistent-work';
|
|
1045
|
+
}
|
|
1046
|
+
export interface OperatingReviewIntelligenceFindingSummaryV2 extends OperatingReviewFindingSummaryBaseV2 {
|
|
1047
|
+
origin: 'operating-intelligence'; findingType: OperatingFindingTypeV2; severity: OperatingFindingSeverityV2;
|
|
1048
|
+
confidence: number; supportingEvidenceRefIds: string[]; contradictingEvidenceRefIds: string[];
|
|
1049
|
+
}
|
|
1050
|
+
export type OperatingReviewFindingSummaryV2 =
|
|
1051
|
+
| OperatingReviewPersistentWorkFindingSummaryV2
|
|
1052
|
+
| OperatingReviewIntelligenceFindingSummaryV2;
|
|
1053
|
+
|
|
1054
|
+
export interface OperatingReviewRoleGapSummaryV2 {
|
|
1055
|
+
absenceId: string;
|
|
1056
|
+
kind: 'role';
|
|
1057
|
+
roleId: string;
|
|
1058
|
+
roleKind: 'advisor' | 'challenger' | 'chair';
|
|
1059
|
+
roleVersion: string;
|
|
1060
|
+
sourceAssignmentId: string | null;
|
|
1061
|
+
reason: string;
|
|
1062
|
+
recoveryDisposition: string;
|
|
1063
|
+
}
|
|
1064
|
+
|
|
1065
|
+
export interface OperatingReviewEvidenceGapSummaryV2 {
|
|
1066
|
+
absenceId: string;
|
|
1067
|
+
kind: 'evidence';
|
|
1068
|
+
requirementId: string;
|
|
1069
|
+
sourceContracts: OperateVersionedIdentityV2[];
|
|
1070
|
+
reason: string;
|
|
1071
|
+
recoveryDisposition: string;
|
|
1072
|
+
}
|
|
1073
|
+
|
|
1074
|
+
export type OperatingReviewGapSummaryV2 =
|
|
1075
|
+
| OperatingReviewRoleGapSummaryV2
|
|
1076
|
+
| OperatingReviewEvidenceGapSummaryV2;
|
|
1077
|
+
|
|
1078
|
+
export interface OperatingReviewReadV2 {
|
|
1079
|
+
kind: 'operating-review-read'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
1080
|
+
cycleId: string; eventHead: { sequence: number; hash: string | null };
|
|
1081
|
+
scope: { scopeId: string; domainId: string; domainVersion: string };
|
|
1082
|
+
reader: OperatePublicActorV2 & { kind: 'human' };
|
|
1083
|
+
review: OperatingReviewV2;
|
|
1084
|
+
seatStatus: Array<{ roleId: string; roleKind: 'advisor' | 'challenger' | 'chair'; roleVersion: string; state: 'pending' | 'available' | 'running' | 'validated' | 'rejected' | 'abandoned' | 'failed'; artifactId: string | null; absenceIds: string[] }>;
|
|
1085
|
+
decisions: OperatingReviewDecisionSummaryV2[];
|
|
1086
|
+
actions: Array<{ actionId: string; title: string; state: OperatingActionStateV2; ownerActorId: string | null; sourceDecisionId: string | null; expectedResult: string; metricId: string | null; baseline: number | null; target: number | null; verificationWindow: string; verificationMethod: string }>;
|
|
1087
|
+
findings: OperatingReviewFindingSummaryV2[];
|
|
1088
|
+
dissent: Array<{ sourceArtifactId: string; localDissentId: string; statement: string; resolutionCondition: string }>;
|
|
1089
|
+
gaps: OperatingReviewGapSummaryV2[];
|
|
1090
|
+
dispositionChoices: Array<{
|
|
1091
|
+
choiceId: string; choiceHash: string; label: string;
|
|
1092
|
+
submitArguments: OperateToolRequestMapV2['operate.review.submit'];
|
|
1093
|
+
}>;
|
|
1094
|
+
readAt: string;
|
|
1095
|
+
}
|
|
1096
|
+
|
|
1097
|
+
export interface OperateReviewBoundSubmissionV1 {
|
|
1098
|
+
kind: 'operate-review-bound-submission'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
1099
|
+
expectedReadEventHead: { sequence: number; hash: string | null };
|
|
1100
|
+
choiceId: string; choiceHash: string;
|
|
1101
|
+
submitArguments: OperateToolRequestMapV2['operate.review.submit'];
|
|
1102
|
+
note: string | null;
|
|
1103
|
+
boundSubmissionHash: string;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
export interface OperatingReviewReceiptV2 {
|
|
1107
|
+
kind: 'operating-review-receipt'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
1108
|
+
receiptId: string; cycleId: string;
|
|
1109
|
+
readEventHead: { sequence: number; hash: string | null };
|
|
1110
|
+
eventHead: { sequence: number; hash: string | null };
|
|
1111
|
+
scope: { scopeId: string; domainId: string; domainVersion: string };
|
|
1112
|
+
actor: OperatePublicActorV2 & { kind: 'human' };
|
|
1113
|
+
review: OperatingReviewV2;
|
|
1114
|
+
decision: Exclude<OperatingReviewStateV2, 'pending'>;
|
|
1115
|
+
seatStatus: OperatingReviewReadV2['seatStatus'];
|
|
1116
|
+
decisions: OperatingReviewReadV2['decisions'];
|
|
1117
|
+
actions: OperatingReviewReadV2['actions'];
|
|
1118
|
+
findings: OperatingReviewReadV2['findings'];
|
|
1119
|
+
dissent: OperatingReviewReadV2['dissent'];
|
|
1120
|
+
gaps: OperatingReviewReadV2['gaps'];
|
|
1121
|
+
dispositionChoices: OperatingReviewReadV2['dispositionChoices'];
|
|
1122
|
+
appliedChoiceId: string; appliedChoiceHash: string;
|
|
1123
|
+
appliedWorkDispositions: OperatingWorkDispositionV2[];
|
|
1124
|
+
boundSubmission?: OperateReviewBoundSubmissionV1;
|
|
1125
|
+
summary: { decisionCount: number; actionCount: number; findingCount: number; dissentCount: number; gapCount: number; message: string };
|
|
1126
|
+
committedAt: string;
|
|
1127
|
+
}
|
|
1128
|
+
|
|
1129
|
+
export interface OperatingActionApprovalV2 {
|
|
1130
|
+
action: OperatingActionV2;
|
|
1131
|
+
evaluation: OperatingPolicyEvaluationV2;
|
|
1132
|
+
requirements: OperatingApprovalRequirementV2[];
|
|
1133
|
+
approvals: OperatingApprovalRecordV2[];
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
export type OperatingArtifactRepresentationV2 =
|
|
1137
|
+
| { metadata: OperatingArtifactV2; representation: 'metadata' }
|
|
1138
|
+
| { metadata: OperatingArtifactV2; representation: 'raw' | 'canonical'; contentBase64: string }
|
|
1139
|
+
| { metadata: OperatingArtifactV2; representation: 'decoded-json'; contentJson: JsonValue };
|
|
1140
|
+
|
|
1141
|
+
export interface OperateToolResponseMapV2 {
|
|
1142
|
+
'operate.cycle.start': OperatingCycleViewV2;
|
|
1143
|
+
'operate.cycle.get': OperatingCycleViewV2;
|
|
1144
|
+
'operate.cycle.resume': OperatingCycleViewV2;
|
|
1145
|
+
'operate.assignment.claim': OperatingAssignmentClaimV2;
|
|
1146
|
+
'operate.assignment.submit': OperatingSubmissionAcceptanceV2;
|
|
1147
|
+
'operate.artifact.get': OperatingArtifactRepresentationV2;
|
|
1148
|
+
'operate.review.get': OperatingReviewReadV2;
|
|
1149
|
+
'operate.review.submit': OperatingReviewReceiptV2;
|
|
1150
|
+
'operate.action.approve': OperatingActionApprovalV2;
|
|
1151
|
+
'operate.action.execute': OperatingGovernedOperationV2;
|
|
1152
|
+
'operate.action.rollback': OperatingGovernedOperationV2;
|
|
1153
|
+
}
|
|
1154
|
+
|
|
1155
|
+
export type OperateApiSuccessV2<TTool extends OperateToolNameV2 = OperateToolNameV2> = {
|
|
1156
|
+
[TCurrentTool in TTool]: {
|
|
1157
|
+
ok: true;
|
|
1158
|
+
operation: TCurrentTool;
|
|
1159
|
+
data: OperateToolResponseMapV2[TCurrentTool];
|
|
1160
|
+
allowedActions: OperateAllowedActionV2[];
|
|
1161
|
+
};
|
|
1162
|
+
}[TTool];
|
|
1163
|
+
|
|
1164
|
+
export type OperateApiFailureV2<TTool extends OperateToolNameV2 = OperateToolNameV2> = {
|
|
1165
|
+
[TCurrentTool in TTool]: {
|
|
1166
|
+
ok: false;
|
|
1167
|
+
operation: TCurrentTool;
|
|
1168
|
+
error: OperateErrorV2;
|
|
1169
|
+
allowedActions: OperateAllowedActionV2[];
|
|
1170
|
+
};
|
|
1171
|
+
}[TTool];
|
|
1172
|
+
|
|
1173
|
+
export type OperateApiEnvelopeV2<TTool extends OperateToolNameV2 = OperateToolNameV2> =
|
|
1174
|
+
| OperateApiSuccessV2<TTool>
|
|
1175
|
+
| OperateApiFailureV2<TTool>;
|
|
1176
|
+
|
|
1177
|
+
export type OperateToolCallV2 = {
|
|
1178
|
+
[TTool in OperateToolNameV2]:
|
|
1179
|
+
| {
|
|
1180
|
+
kind: 'operate-tool-call';
|
|
1181
|
+
schemaVersion: '1.0.0';
|
|
1182
|
+
protocolVersion: '2.0.0';
|
|
1183
|
+
direction: 'request';
|
|
1184
|
+
operation: TTool;
|
|
1185
|
+
request: OperateToolRequestMapV2[TTool];
|
|
1186
|
+
}
|
|
1187
|
+
| {
|
|
1188
|
+
kind: 'operate-tool-call';
|
|
1189
|
+
schemaVersion: '1.0.0';
|
|
1190
|
+
protocolVersion: '2.0.0';
|
|
1191
|
+
direction: 'response';
|
|
1192
|
+
operation: TTool;
|
|
1193
|
+
response: OperateApiEnvelopeV2<TTool>;
|
|
1194
|
+
};
|
|
1195
|
+
}[OperateToolNameV2];
|
|
1196
|
+
|
|
1197
|
+
export type OperatingEventTypeV2 =
|
|
1198
|
+
| 'cycle.input-bound'
|
|
1199
|
+
| 'assignment.created'
|
|
1200
|
+
| 'assignment.available'
|
|
1201
|
+
| 'assignment.claimed'
|
|
1202
|
+
| 'assignment.started'
|
|
1203
|
+
| 'assignment.submitted'
|
|
1204
|
+
| 'artifact.created'
|
|
1205
|
+
| 'assignment.validated'
|
|
1206
|
+
| 'assignment.rejected'
|
|
1207
|
+
| 'assignment.abandoned'
|
|
1208
|
+
| 'assignment.failed'
|
|
1209
|
+
| 'executive-board.materialized'
|
|
1210
|
+
| 'review.created'
|
|
1211
|
+
| 'review.submitted'
|
|
1212
|
+
| 'work-change-set.materialized'
|
|
1213
|
+
| 'action.authority-promoted'
|
|
1214
|
+
| 'evidence.resolved'
|
|
1215
|
+
| 'evidence.rejected'
|
|
1216
|
+
| 'operating-state.materialized'
|
|
1217
|
+
| 'snapshot.materialized'
|
|
1218
|
+
| 'metric.observed'
|
|
1219
|
+
| 'claim.recorded'
|
|
1220
|
+
| 'finding.recorded'
|
|
1221
|
+
| 'risk.recorded'
|
|
1222
|
+
| 'assumption.recorded'
|
|
1223
|
+
| 'decision.revised'
|
|
1224
|
+
| 'delta.derived'
|
|
1225
|
+
| 'intelligence.plan-recorded'
|
|
1226
|
+
| 'decision-ledger.materialized'
|
|
1227
|
+
| 'verification.plan-recorded'
|
|
1228
|
+
| 'outcome.recorded'
|
|
1229
|
+
| 'learning.recorded'
|
|
1230
|
+
| 'scenario.recorded'
|
|
1231
|
+
| 'trigger.recorded'
|
|
1232
|
+
| 'domain-projection.rebuilt'
|
|
1233
|
+
| 'policy.evaluated'
|
|
1234
|
+
| 'approval.recorded'
|
|
1235
|
+
| 'capability.availability-recorded'
|
|
1236
|
+
| 'capability.granted'
|
|
1237
|
+
| 'operation.intent-recorded'
|
|
1238
|
+
| 'execution.result-recorded'
|
|
1239
|
+
| 'rollback.plan-recorded'
|
|
1240
|
+
| 'rollback.result-recorded'
|
|
1241
|
+
| 'action.approved'
|
|
1242
|
+
| 'action.cancelled'
|
|
1243
|
+
| 'action.rejected'
|
|
1244
|
+
| 'action.deferred'
|
|
1245
|
+
| 'action.reopened'
|
|
1246
|
+
| 'action.queued'
|
|
1247
|
+
| 'action.started'
|
|
1248
|
+
| 'action.completed'
|
|
1249
|
+
| 'action.blocked'
|
|
1250
|
+
| 'cycle.approved'
|
|
1251
|
+
| 'cycle.executing'
|
|
1252
|
+
| 'cycle.verifying'
|
|
1253
|
+
| 'cycle.closed';
|
|
1254
|
+
|
|
1255
|
+
export interface OperatingIntelligenceEventPayloadV2<TRecord> {
|
|
1256
|
+
snapshotId: string;
|
|
1257
|
+
stateId: string;
|
|
1258
|
+
record: TRecord;
|
|
1259
|
+
}
|
|
1260
|
+
|
|
1261
|
+
export interface OperatingEventPayloadMapV2 {
|
|
1262
|
+
'cycle.input-bound': {
|
|
1263
|
+
inputBindingId: string;
|
|
1264
|
+
scopeId: string;
|
|
1265
|
+
domainId: string;
|
|
1266
|
+
domainVersion: string;
|
|
1267
|
+
contractVersions: Record<string, string>;
|
|
1268
|
+
};
|
|
1269
|
+
'assignment.created': OperatingAssignmentV2 & {
|
|
1270
|
+
state: 'pending';
|
|
1271
|
+
availableAt: null;
|
|
1272
|
+
completedAt: null;
|
|
1273
|
+
claim: null;
|
|
1274
|
+
};
|
|
1275
|
+
'assignment.available': {
|
|
1276
|
+
assignmentId: string;
|
|
1277
|
+
releaseId: string;
|
|
1278
|
+
dependencyProofs: Array<
|
|
1279
|
+
| { assignmentId: string; outcome: 'validated'; eventId: string; artifactId: string }
|
|
1280
|
+
| { assignmentId: string; outcome: 'abandoned' | 'failed'; eventId: string; absence: { code: string; reason: string; recoveryDisposition: string } }
|
|
1281
|
+
>;
|
|
1282
|
+
dependencyEventIds: string[];
|
|
1283
|
+
};
|
|
1284
|
+
'assignment.claimed': {
|
|
1285
|
+
assignmentId: string;
|
|
1286
|
+
actorId: string;
|
|
1287
|
+
actorKind: 'agent' | 'human';
|
|
1288
|
+
runtime: string;
|
|
1289
|
+
claimId: string;
|
|
1290
|
+
submissionId: string;
|
|
1291
|
+
};
|
|
1292
|
+
'assignment.started': { assignmentId: string; attempt: number };
|
|
1293
|
+
'assignment.submitted': {
|
|
1294
|
+
assignmentId: string;
|
|
1295
|
+
submissionId: string;
|
|
1296
|
+
rawHash: string;
|
|
1297
|
+
canonicalHash: string | null;
|
|
1298
|
+
sizeBytes: number;
|
|
1299
|
+
mediaType: string;
|
|
1300
|
+
encoding: 'utf-8' | 'binary';
|
|
1301
|
+
};
|
|
1302
|
+
'artifact.created': OperatingArtifactV2;
|
|
1303
|
+
'assignment.validated': {
|
|
1304
|
+
assignmentId: string;
|
|
1305
|
+
submissionId: string;
|
|
1306
|
+
artifactId: string;
|
|
1307
|
+
validatorVersion: string;
|
|
1308
|
+
};
|
|
1309
|
+
'assignment.rejected': {
|
|
1310
|
+
assignmentId: string;
|
|
1311
|
+
submissionId: string;
|
|
1312
|
+
violations: Array<{ path: string; code: string; message: string }>;
|
|
1313
|
+
attempt: number;
|
|
1314
|
+
attemptsRemaining: number;
|
|
1315
|
+
};
|
|
1316
|
+
'assignment.abandoned': {
|
|
1317
|
+
assignmentId: string;
|
|
1318
|
+
reasonCode: string;
|
|
1319
|
+
reason: string;
|
|
1320
|
+
recoveryDisposition: string;
|
|
1321
|
+
};
|
|
1322
|
+
'assignment.failed': {
|
|
1323
|
+
assignmentId: string;
|
|
1324
|
+
errorCode: string;
|
|
1325
|
+
reason: string;
|
|
1326
|
+
recoveryStatus: string;
|
|
1327
|
+
};
|
|
1328
|
+
'executive-board.materialized': OperatingExecutiveBoardMaterializedV2;
|
|
1329
|
+
'review.created': OperatingReviewV2 & {
|
|
1330
|
+
state: 'pending';
|
|
1331
|
+
disposition: null;
|
|
1332
|
+
workDispositions: [];
|
|
1333
|
+
};
|
|
1334
|
+
'review.submitted': {
|
|
1335
|
+
reviewId: string;
|
|
1336
|
+
disposition: Exclude<OperatingReviewStateV2, 'pending'>;
|
|
1337
|
+
workDispositions: OperatingWorkDispositionV2[];
|
|
1338
|
+
receiptProjection: {
|
|
1339
|
+
read: OperatingReviewReadV2;
|
|
1340
|
+
appliedChoiceId: string;
|
|
1341
|
+
appliedChoiceHash: string;
|
|
1342
|
+
boundSubmission?: OperateReviewBoundSubmissionV1;
|
|
1343
|
+
};
|
|
1344
|
+
};
|
|
1345
|
+
'work-change-set.materialized': OperatingWorkChangeSetMaterializationV2;
|
|
1346
|
+
'action.authority-promoted': {
|
|
1347
|
+
before: OperatingActionV2;
|
|
1348
|
+
authority: {
|
|
1349
|
+
actionKind: OperateVersionedIdentityV2;
|
|
1350
|
+
requestedCapability: OperateVersionedIdentityV2;
|
|
1351
|
+
targetBinding: OperateTargetBindingV2;
|
|
1352
|
+
effectClass: OperateGovernedEffectClassV2;
|
|
1353
|
+
preconditionArtifactIds: string[];
|
|
1354
|
+
executionBinding: {
|
|
1355
|
+
policyId: string;
|
|
1356
|
+
policyVersion: string;
|
|
1357
|
+
rollbackRequired: boolean;
|
|
1358
|
+
verificationRequired: true;
|
|
1359
|
+
};
|
|
1360
|
+
updatedAt: string;
|
|
1361
|
+
};
|
|
1362
|
+
action: OperatingActionV2;
|
|
1363
|
+
};
|
|
1364
|
+
'evidence.resolved': {
|
|
1365
|
+
resolution: OperatingEvidenceResolutionV2 & { outcome: 'resolved'; evidenceRefId: string; evidenceArtifactId: string; error: null };
|
|
1366
|
+
evidenceRef: OperatingEvidenceRefV2;
|
|
1367
|
+
evidenceArtifact: OperatingArtifactV2;
|
|
1368
|
+
edges: OperatingEvidenceEdgeV2[];
|
|
1369
|
+
requestHash: string;
|
|
1370
|
+
outcomeHash: string;
|
|
1371
|
+
};
|
|
1372
|
+
'evidence.rejected': {
|
|
1373
|
+
resolution: OperatingEvidenceResolutionV2 & { outcome: 'rejected'; evidenceRefId: null; evidenceArtifactId: null; error: NonNullable<OperatingEvidenceResolutionV2['error']> };
|
|
1374
|
+
requestHash: string;
|
|
1375
|
+
outcomeHash: string;
|
|
1376
|
+
};
|
|
1377
|
+
'operating-state.materialized': OperatingModelStateV2;
|
|
1378
|
+
'snapshot.materialized': OperatingSnapshotV2;
|
|
1379
|
+
'metric.observed': OperatingIntelligenceEventPayloadV2<OperatingMetricObservationV2>;
|
|
1380
|
+
'claim.recorded': OperatingIntelligenceEventPayloadV2<OperatingClaimV2>;
|
|
1381
|
+
'finding.recorded': OperatingIntelligenceEventPayloadV2<OperatingFindingV2>;
|
|
1382
|
+
'risk.recorded': OperatingIntelligenceEventPayloadV2<OperatingRiskV2>;
|
|
1383
|
+
'assumption.recorded': OperatingIntelligenceEventPayloadV2<OperatingAssumptionV2>;
|
|
1384
|
+
'decision.revised': OperatingIntelligenceEventPayloadV2<OperatingDecisionV2>;
|
|
1385
|
+
'delta.derived': OperatingIntelligenceEventPayloadV2<OperatingDeltaV2>;
|
|
1386
|
+
'intelligence.plan-recorded': OperatingIntelligencePlanV2;
|
|
1387
|
+
'decision-ledger.materialized': OperatingDecisionLedgerV2;
|
|
1388
|
+
'verification.plan-recorded': OperatingActionVerificationPlanV2;
|
|
1389
|
+
'outcome.recorded': OperatingOutcomeV2;
|
|
1390
|
+
'learning.recorded': OperatingLearningV2;
|
|
1391
|
+
'scenario.recorded': OperatingIntelligenceEventPayloadV2<OperatingScenarioV2>;
|
|
1392
|
+
'trigger.recorded': OperatingIntelligenceEventPayloadV2<OperatingEventTriggerV2>;
|
|
1393
|
+
'domain-projection.rebuilt': OperatingDomainProjectionV2;
|
|
1394
|
+
'policy.evaluated': OperatingPolicyEvaluationV2;
|
|
1395
|
+
'approval.recorded': OperatingApprovalRecordV2;
|
|
1396
|
+
'capability.availability-recorded': OperatingCapabilityAvailabilityV2;
|
|
1397
|
+
'capability.granted': OperatingCapabilityGrantV2;
|
|
1398
|
+
'operation.intent-recorded': {
|
|
1399
|
+
operation: OperatingGovernedOperationV2;
|
|
1400
|
+
request: {
|
|
1401
|
+
payload: { artifactId: string; contentHash: string };
|
|
1402
|
+
rollbackBaseline: { artifactId: string; contentHash: string } | null;
|
|
1403
|
+
targetBeforeHash: string;
|
|
1404
|
+
};
|
|
1405
|
+
terminal: {
|
|
1406
|
+
resultId: string;
|
|
1407
|
+
resultArtifactId: string;
|
|
1408
|
+
submissionId: string;
|
|
1409
|
+
eventIds: { submitted: string; artifactCreated: string; validated: string; resultRecorded: string };
|
|
1410
|
+
completedAt: string;
|
|
1411
|
+
correlationId: string;
|
|
1412
|
+
uncertainty: {
|
|
1413
|
+
resultId: string;
|
|
1414
|
+
resultArtifactId: string;
|
|
1415
|
+
submissionId: string;
|
|
1416
|
+
eventIds: { submitted: string; artifactCreated: string; validated: string; resultRecorded: string };
|
|
1417
|
+
};
|
|
1418
|
+
};
|
|
1419
|
+
};
|
|
1420
|
+
'execution.result-recorded': {
|
|
1421
|
+
result: OperatingExecutionResultV2;
|
|
1422
|
+
receipt: OperatingExecutionReceiptProofV2 | null;
|
|
1423
|
+
};
|
|
1424
|
+
'rollback.plan-recorded': OperatingRollbackPlanV2;
|
|
1425
|
+
'rollback.result-recorded': OperatingRollbackResultV2;
|
|
1426
|
+
'action.approved': OperatingActionApprovedPayloadV2;
|
|
1427
|
+
'action.cancelled': OperatingActionCancelledPayloadV2;
|
|
1428
|
+
'action.rejected': OperatingActionRejectedPayloadV2;
|
|
1429
|
+
'action.deferred': OperatingActionDeferredPayloadV2;
|
|
1430
|
+
'action.reopened': OperatingActionReopenedPayloadV2;
|
|
1431
|
+
'action.queued': OperatingActionQueuedPayloadV2;
|
|
1432
|
+
'action.started': OperatingActionStartedPayloadV2;
|
|
1433
|
+
'action.completed': OperatingActionCompletedPayloadV2;
|
|
1434
|
+
'action.blocked': OperatingActionBlockedPayloadV2;
|
|
1435
|
+
'cycle.approved': OperatingCycleApprovedPayloadV2;
|
|
1436
|
+
'cycle.executing': OperatingCycleExecutingPayloadV2;
|
|
1437
|
+
'cycle.verifying': OperatingCycleVerifyingPayloadV2;
|
|
1438
|
+
'cycle.closed': OperatingCycleClosedPayloadV2;
|
|
1439
|
+
}
|
|
1440
|
+
|
|
1441
|
+
export interface OperatingActionTransitionPayloadV2<TFrom extends OperatingActionStateV2, TTo extends OperatingActionStateV2> {
|
|
1442
|
+
action: OperateActionIdentityV2; from: TFrom; to: TTo; operationId: string | null; resultId: string | null; reasonCode: string | null;
|
|
1443
|
+
}
|
|
1444
|
+
export interface OperatingCycleTransitionPayloadV2<TFrom extends OperatingCycleV2['state'], TTo extends OperatingCycleV2['state']> {
|
|
1445
|
+
cycleId: string; from: TFrom; to: TTo; actionId: string | null; operationId: string | null; resultId: string | null; reasonCode: string | null;
|
|
1446
|
+
}
|
|
1447
|
+
export type OperatingActionApprovedPayloadV2 =
|
|
1448
|
+
OperatingActionTransitionPayloadV2<'proposed', 'approved'> & { operationId: null; resultId: null; reasonCode: null };
|
|
1449
|
+
export type OperatingActionCancelledPayloadV2 =
|
|
1450
|
+
| (OperatingActionTransitionPayloadV2<'approved', 'cancelled'> & { operationId: null; resultId: null; reasonCode: string })
|
|
1451
|
+
| (OperatingActionTransitionPayloadV2<'queued' | 'in_progress', 'cancelled'> & { operationId: string; resultId: null; reasonCode: string });
|
|
1452
|
+
export type OperatingActionRejectedPayloadV2 =
|
|
1453
|
+
OperatingActionTransitionPayloadV2<'proposed', 'rejected'> & { operationId: null; resultId: null; reasonCode: string };
|
|
1454
|
+
export type OperatingActionDeferredPayloadV2 =
|
|
1455
|
+
OperatingActionTransitionPayloadV2<'proposed', 'deferred'> & { operationId: null; resultId: null; reasonCode: string };
|
|
1456
|
+
export type OperatingActionReopenedPayloadV2 =
|
|
1457
|
+
OperatingActionTransitionPayloadV2<'deferred', 'proposed'> & { operationId: null; resultId: null; reasonCode: null };
|
|
1458
|
+
export type OperatingActionQueuedPayloadV2 =
|
|
1459
|
+
| (OperatingActionTransitionPayloadV2<'approved', 'queued'> & { operationId: string; resultId: null; reasonCode: null })
|
|
1460
|
+
| (OperatingActionTransitionPayloadV2<'blocked', 'queued'> & { operationId: string; resultId: string; reasonCode: string });
|
|
1461
|
+
export type OperatingActionStartedPayloadV2 =
|
|
1462
|
+
| (OperatingActionTransitionPayloadV2<'queued', 'in_progress'> & { operationId: string; resultId: null; reasonCode: null })
|
|
1463
|
+
| (OperatingActionTransitionPayloadV2<'blocked', 'in_progress'> & { operationId: string; resultId: string; reasonCode: string });
|
|
1464
|
+
export type OperatingActionCompletedPayloadV2 =
|
|
1465
|
+
OperatingActionTransitionPayloadV2<'in_progress', 'completed'> & { operationId: string; resultId: string; reasonCode: null };
|
|
1466
|
+
export type OperatingActionBlockedPayloadV2 =
|
|
1467
|
+
OperatingActionTransitionPayloadV2<'queued' | 'in_progress', 'blocked'> & { operationId: string; resultId: string; reasonCode: string };
|
|
1468
|
+
export type OperatingCycleApprovedPayloadV2 =
|
|
1469
|
+
OperatingCycleTransitionPayloadV2<'awaiting_review', 'approved'> & { actionId: null; operationId: null; resultId: null; reasonCode: null };
|
|
1470
|
+
export type OperatingCycleExecutingPayloadV2 =
|
|
1471
|
+
OperatingCycleTransitionPayloadV2<'approved', 'executing'> & { actionId: string; operationId: string; resultId: null; reasonCode: null };
|
|
1472
|
+
export type OperatingCycleVerifyingPayloadV2 =
|
|
1473
|
+
| (OperatingCycleTransitionPayloadV2<'executing', 'verifying'> & { actionId: string; operationId: string; resultId: string; reasonCode: null })
|
|
1474
|
+
| (OperatingCycleTransitionPayloadV2<'approved', 'verifying'> & { actionId: string; operationId: null; resultId: null; reasonCode: string });
|
|
1475
|
+
export type OperatingCycleClosedPayloadV2 =
|
|
1476
|
+
| (OperatingCycleTransitionPayloadV2<'verifying', 'closed'> & { actionId: string; operationId: string; resultId: string; reasonCode: string | null })
|
|
1477
|
+
| (OperatingCycleTransitionPayloadV2<'verifying', 'closed'> & { actionId: string; operationId: null; resultId: null; reasonCode: string })
|
|
1478
|
+
| (OperatingCycleTransitionPayloadV2<'approved', 'closed'> & { actionId: null; operationId: null; resultId: null; reasonCode: string });
|
|
1479
|
+
|
|
1480
|
+
export interface OperatingEventBaseV2 {
|
|
1481
|
+
kind: 'operating-event';
|
|
1482
|
+
schemaVersion: '1.0.0';
|
|
1483
|
+
protocolVersion: '2.0.0';
|
|
1484
|
+
eventId: string;
|
|
1485
|
+
sequence: number;
|
|
1486
|
+
timestamp: string;
|
|
1487
|
+
cycleId: string;
|
|
1488
|
+
entityId: string;
|
|
1489
|
+
actor: { kind: 'human' | 'engine' | 'runtime'; id: string };
|
|
1490
|
+
causationId: string | null;
|
|
1491
|
+
correlationId: string;
|
|
1492
|
+
previousEventHash: string | null;
|
|
1493
|
+
requestHash?: string;
|
|
1494
|
+
eventHash: string;
|
|
1495
|
+
}
|
|
1496
|
+
|
|
1497
|
+
export type OperatingEventV2<TEvent extends OperatingEventTypeV2 = OperatingEventTypeV2> = {
|
|
1498
|
+
[TCurrentEvent in TEvent]: OperatingEventBaseV2 & {
|
|
1499
|
+
type: TCurrentEvent;
|
|
1500
|
+
payload: OperatingEventPayloadMapV2[TCurrentEvent];
|
|
1501
|
+
};
|
|
1502
|
+
}[TEvent];
|
|
1503
|
+
|
|
1504
|
+
export interface OperatingSubmissionReplayEntryV2 {
|
|
1505
|
+
submissionId: string;
|
|
1506
|
+
assignmentId: string;
|
|
1507
|
+
rawHash: string;
|
|
1508
|
+
canonicalHash: string | null;
|
|
1509
|
+
sizeBytes: number;
|
|
1510
|
+
artifactId: string;
|
|
1511
|
+
acceptanceEventIds: string[];
|
|
1512
|
+
responseData: JsonValue;
|
|
1513
|
+
}
|
|
1514
|
+
|
|
1515
|
+
export interface OperatingReviewReceiptReplayProjectionV2 {
|
|
1516
|
+
read: OperatingReviewReadV2;
|
|
1517
|
+
appliedChoiceId: string;
|
|
1518
|
+
appliedChoiceHash: string;
|
|
1519
|
+
boundSubmission?: OperateReviewBoundSubmissionV1;
|
|
1520
|
+
}
|
|
1521
|
+
|
|
1522
|
+
interface OperatingEventReplayEntryBaseV2 {
|
|
1523
|
+
eventId: string;
|
|
1524
|
+
eventHash: string;
|
|
1525
|
+
payloadHash: string;
|
|
1526
|
+
sequence: number;
|
|
1527
|
+
cycleId: string;
|
|
1528
|
+
entityId: string;
|
|
1529
|
+
timestamp: string;
|
|
1530
|
+
actor: { kind: 'human' | 'engine' | 'runtime'; id: string };
|
|
1531
|
+
causationId: string | null;
|
|
1532
|
+
correlationId: string;
|
|
1533
|
+
previousEventHash: string | null;
|
|
1534
|
+
requestHash?: string;
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
export type OperatingEventReplayEntryV2 = OperatingEventReplayEntryBaseV2 & (
|
|
1538
|
+
| { type: 'review.submitted'; receiptProjection: OperatingReviewReceiptReplayProjectionV2 }
|
|
1539
|
+
| { type: Exclude<OperatingEventTypeV2, 'review.submitted'>; receiptProjection?: never }
|
|
1540
|
+
);
|
|
1541
|
+
|
|
1542
|
+
export interface OperatingExecutionReceiptProofV2 {
|
|
1543
|
+
operationId: string;
|
|
1544
|
+
requestFingerprint: string;
|
|
1545
|
+
target: { kind: string; id: string };
|
|
1546
|
+
before: { revision: string; stateHash: string };
|
|
1547
|
+
after: { revision: string; stateHash: string };
|
|
1548
|
+
changed: boolean;
|
|
1549
|
+
synthetic: boolean;
|
|
1550
|
+
effectCount: 1;
|
|
1551
|
+
}
|
|
1552
|
+
|
|
1553
|
+
export interface OperatingWorkChangeSetReplayEntryV2 {
|
|
1554
|
+
artifactId: string;
|
|
1555
|
+
canonicalHash: string;
|
|
1556
|
+
eventId: string;
|
|
1557
|
+
findingIds: string[];
|
|
1558
|
+
decisionIds: string[];
|
|
1559
|
+
actionIds: string[];
|
|
1560
|
+
}
|
|
1561
|
+
|
|
1562
|
+
export interface OperatingEvidenceResolutionReplayEntryV2 {
|
|
1563
|
+
resolutionId: string; candidateId: string; sourceArtifactId: string; outcome: 'resolved' | 'rejected';
|
|
1564
|
+
evidenceRefId: string | null; evidenceArtifactId: string | null; eventId: string;
|
|
1565
|
+
requestHash: string; outcomeHash: string;
|
|
1566
|
+
}
|
|
1567
|
+
|
|
1568
|
+
export interface OperatingOperationReplayEntryV2 {
|
|
1569
|
+
operationId: string;
|
|
1570
|
+
operationKind: 'execute' | 'rollback';
|
|
1571
|
+
requestFingerprint: string;
|
|
1572
|
+
actionId: string;
|
|
1573
|
+
actionRevision: number;
|
|
1574
|
+
actionHash: string;
|
|
1575
|
+
intentEventId: string;
|
|
1576
|
+
operationHash: string;
|
|
1577
|
+
payloadArtifactId: string;
|
|
1578
|
+
payloadHash: string;
|
|
1579
|
+
baselineArtifactId: string | null;
|
|
1580
|
+
baselineHash: string | null;
|
|
1581
|
+
targetBeforeHash: string;
|
|
1582
|
+
reservedResultId: string;
|
|
1583
|
+
reservedResultArtifactId: string;
|
|
1584
|
+
reservedSubmissionId: string;
|
|
1585
|
+
reservedTerminalEventIds: { submitted: string; artifactCreated: string; validated: string; resultRecorded: string };
|
|
1586
|
+
reservedUncertaintyResultId: string;
|
|
1587
|
+
reservedUncertaintyResultArtifactId: string;
|
|
1588
|
+
reservedUncertaintySubmissionId: string;
|
|
1589
|
+
reservedUncertaintyTerminalEventIds: { submitted: string; artifactCreated: string; validated: string; resultRecorded: string };
|
|
1590
|
+
reservedCompletedAt: string;
|
|
1591
|
+
reservedCorrelationId: string;
|
|
1592
|
+
terminalResultId: string | null;
|
|
1593
|
+
terminalReceipt: OperatingExecutionReceiptProofV2 | null;
|
|
1594
|
+
}
|
|
1595
|
+
|
|
1596
|
+
export interface OperatingRuntimeStateV2Base {
|
|
1597
|
+
kind: 'operating-runtime-state';
|
|
1598
|
+
schemaVersion: '1.0.0';
|
|
1599
|
+
protocolVersion: '2.0.0';
|
|
1600
|
+
generatedAt: string;
|
|
1601
|
+
eventHead: OperatingEventHeadV2;
|
|
1602
|
+
cycles: OperatingCycleV2[];
|
|
1603
|
+
inputBindings: OperatingCycleInputBindingV2[];
|
|
1604
|
+
assignments: OperatingAssignmentV2[];
|
|
1605
|
+
reviews: OperatingReviewV2[];
|
|
1606
|
+
executiveBoards?: OperatingExecutiveBoardMaterializedV2[];
|
|
1607
|
+
submissions: OperatingSubmissionV2[];
|
|
1608
|
+
artifacts: OperatingArtifactV2[];
|
|
1609
|
+
findings: OperatingFindingV2[];
|
|
1610
|
+
decisions: OperatingDecisionV2[];
|
|
1611
|
+
actions: OperatingActionV2[];
|
|
1612
|
+
submissionReplayIndex: OperatingSubmissionReplayEntryV2[];
|
|
1613
|
+
workChangeSetReplayIndex: OperatingWorkChangeSetReplayEntryV2[];
|
|
1614
|
+
evidenceRefs?: OperatingEvidenceRefV2[];
|
|
1615
|
+
evidenceResolutions?: OperatingEvidenceResolutionV2[];
|
|
1616
|
+
evidenceEdges?: OperatingEvidenceEdgeV2[];
|
|
1617
|
+
evidenceResolutionReplayIndex?: OperatingEvidenceResolutionReplayEntryV2[];
|
|
1618
|
+
operatingModelStates?: OperatingModelStateV2[];
|
|
1619
|
+
operatingSnapshots?: OperatingSnapshotV2[];
|
|
1620
|
+
objectives?: OperatingObjectiveV2[];
|
|
1621
|
+
metrics?: OperatingMetricV2[];
|
|
1622
|
+
metricObservations?: OperatingMetricObservationV2[];
|
|
1623
|
+
risks?: OperatingRiskV2[];
|
|
1624
|
+
assumptions?: OperatingAssumptionV2[];
|
|
1625
|
+
claims?: OperatingClaimV2[];
|
|
1626
|
+
domainProjections?: OperatingDomainProjectionV2[];
|
|
1627
|
+
deltas?: OperatingDeltaV2[];
|
|
1628
|
+
intelligencePlans?: OperatingIntelligencePlanV2[];
|
|
1629
|
+
decisionLedgers?: OperatingDecisionLedgerV2[];
|
|
1630
|
+
verificationPlans?: OperatingActionVerificationPlanV2[];
|
|
1631
|
+
outcomes?: OperatingOutcomeV2[];
|
|
1632
|
+
learnings?: OperatingLearningV2[];
|
|
1633
|
+
scenarios?: OperatingScenarioV2[];
|
|
1634
|
+
eventTriggers?: OperatingEventTriggerV2[];
|
|
1635
|
+
eventReplayIndex: OperatingEventReplayEntryV2[];
|
|
1636
|
+
}
|
|
1637
|
+
|
|
1638
|
+
export type OperatingAuthorityHistoryV2 =
|
|
1639
|
+
| {
|
|
1640
|
+
actionPolicies?: never; policyEvaluations?: never; approvalRequirements?: never;
|
|
1641
|
+
approvalRecords?: never; capabilityAvailability?: never; capabilityGrants?: never;
|
|
1642
|
+
governedOperations?: never; executionResults?: never; rollbackPlans?: never;
|
|
1643
|
+
rollbackResults?: never; operationReplayIndex?: never;
|
|
1644
|
+
}
|
|
1645
|
+
| {
|
|
1646
|
+
actionPolicies: OperatingActionPolicyV2[];
|
|
1647
|
+
policyEvaluations: OperatingPolicyEvaluationV2[];
|
|
1648
|
+
approvalRequirements: OperatingApprovalRequirementV2[];
|
|
1649
|
+
approvalRecords: OperatingApprovalRecordV2[];
|
|
1650
|
+
capabilityAvailability: OperatingCapabilityAvailabilityV2[];
|
|
1651
|
+
capabilityGrants: OperatingCapabilityGrantV2[];
|
|
1652
|
+
governedOperations: OperatingGovernedOperationV2[];
|
|
1653
|
+
executionResults: OperatingExecutionResultV2[];
|
|
1654
|
+
rollbackPlans: OperatingRollbackPlanV2[];
|
|
1655
|
+
rollbackResults: OperatingRollbackResultV2[];
|
|
1656
|
+
operationReplayIndex: OperatingOperationReplayEntryV2[];
|
|
1657
|
+
};
|
|
1658
|
+
export type OperatingRuntimeStateV2 = OperatingRuntimeStateV2Base & OperatingAuthorityHistoryV2;
|
|
1659
|
+
|
|
1660
|
+
export interface OperatingCheckpointV2Base {
|
|
1661
|
+
kind: 'operating-checkpoint';
|
|
1662
|
+
schemaVersion: '1.0.0';
|
|
1663
|
+
protocolVersion: '2.0.0';
|
|
1664
|
+
createdAt: string;
|
|
1665
|
+
eventHead: OperatingEventHeadV2;
|
|
1666
|
+
runtimeStateHash: string;
|
|
1667
|
+
eventReplayIndexHash: string;
|
|
1668
|
+
recordDigests: string[];
|
|
1669
|
+
blobHashes: string[];
|
|
1670
|
+
recoveryVersion: string;
|
|
1671
|
+
}
|
|
1672
|
+
export type OperatingCheckpointAuthorityHashesV2 =
|
|
1673
|
+
| { operationReplayIndexHash?: never; authorityHistoryHash?: never }
|
|
1674
|
+
| { operationReplayIndexHash: string; authorityHistoryHash: string };
|
|
1675
|
+
export type OperatingCheckpointV2 = OperatingCheckpointV2Base & OperatingCheckpointAuthorityHashesV2;
|
|
1676
|
+
|
|
1677
|
+
export interface OperateRoleOutputContractV2 {
|
|
1678
|
+
schemaId: typeof OPERATE_RUNTIME_CONTRACT_KINDS[number];
|
|
1679
|
+
schemaVersion: '2.0.0';
|
|
1680
|
+
mediaType: string;
|
|
1681
|
+
maxBytes: number;
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1684
|
+
export interface OperateRoleMandateV2 {
|
|
1685
|
+
id: OperatePhase1AssignmentKindV2;
|
|
1686
|
+
version: '2.0.0';
|
|
1687
|
+
output: OperateRoleOutputContractV2;
|
|
1688
|
+
limits: {
|
|
1689
|
+
maxProposals: number;
|
|
1690
|
+
maxActions: number;
|
|
1691
|
+
};
|
|
1692
|
+
}
|
|
1693
|
+
|
|
1694
|
+
export interface OperateAnalysisRubricV2 {
|
|
1695
|
+
requiredQuestions: string[];
|
|
1696
|
+
requiredEvidence: string[];
|
|
1697
|
+
failureModes: string[];
|
|
1698
|
+
artifactQualityBar: string[];
|
|
1699
|
+
outOfScope: string[];
|
|
1700
|
+
}
|
|
1701
|
+
|
|
1702
|
+
export interface OperateDomainRegistrationV2 {
|
|
1703
|
+
kind: 'operate-domain-registration';
|
|
1704
|
+
schemaVersion: '1.0.0';
|
|
1705
|
+
protocolVersion: '2.0.0';
|
|
1706
|
+
domainId: string;
|
|
1707
|
+
domainVersion: string;
|
|
1708
|
+
domainContract?: OperateDomainContractBindingV2;
|
|
1709
|
+
provenance: { packageName: string; packageVersion: string; integrity: string };
|
|
1710
|
+
roles: Array<{ roleId: string; roleKind: OperatePhase1AssignmentKindV2; label: string; roleVersion: '2.0.0'; output: OperateRoleOutputContractV2; analysisRubric: OperateAnalysisRubricV2; dependencyPolicy: { id: 'none' | 'all-required' | 'threshold'; version: '1.0.0' }; requirements: string[] }>;
|
|
1711
|
+
vocabulary: Array<{ term: string; definition: string }>;
|
|
1712
|
+
projectionContracts: Array<{ schemaId: string; schemaVersion: string }>;
|
|
1713
|
+
actionKinds: Array<{ id: string; version: string }>;
|
|
1714
|
+
requestedCapabilities: Array<{ id: string; version: string; reason: string }>;
|
|
1715
|
+
policyRequirements?: Array<{
|
|
1716
|
+
actionKind: OperateVersionedIdentityV2;
|
|
1717
|
+
capability: OperateVersionedIdentityV2;
|
|
1718
|
+
policy: OperateVersionedIdentityV2;
|
|
1719
|
+
}>;
|
|
1720
|
+
requirements: string[];
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
export interface AgentRuntimeManifestV2 {
|
|
1724
|
+
kind: 'agent-runtime-manifest';
|
|
1725
|
+
schemaVersion: '1.0.0';
|
|
1726
|
+
protocolVersion: '2.0.0';
|
|
1727
|
+
runtimeId: string;
|
|
1728
|
+
runtimeVersion: string;
|
|
1729
|
+
}
|
|
1730
|
+
|
|
1731
|
+
export type OperatingFindingStateV2 = 'open' | 'accepted' | 'resolved' | 'rejected' | 'deferred' | 'superseded';
|
|
1732
|
+
export type OperatingDecisionStateV2 = 'proposed' | 'approved' | 'rejected' | 'deferred' | 'superseded';
|
|
1733
|
+
export type OperatingActionStateV2 = 'proposed' | 'approved' | 'queued' | 'in_progress' | 'completed' | 'blocked' | 'rejected' | 'deferred' | 'cancelled';
|
|
1734
|
+
export type OperatingFindingTypeV2 = 'unsupported' | 'contradicted' | 'correlated-reasoning' | 'missing-alternative' | 'unpriced-downside' | 'irreversibility-mismatch' | 'overconfidence' | 'scope-violation';
|
|
1735
|
+
export type OperatingFindingSeverityV2 = 'low' | 'medium' | 'high' | 'critical';
|
|
1736
|
+
|
|
1737
|
+
export interface OperatingFindingBaseV2 {
|
|
1738
|
+
kind: 'operating-finding'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
1739
|
+
findingId: string; scopeId: string; domainId: string; domainVersion: string;
|
|
1740
|
+
sourceCycleId: string; sourceArtifactId: string; title: string; statement: string;
|
|
1741
|
+
state: OperatingFindingStateV2; ownerActorId: string | null; revisitAt: string | null;
|
|
1742
|
+
createdAt: string; updatedAt: string;
|
|
1743
|
+
}
|
|
1744
|
+
export interface OperatingPersistentWorkFindingV2 extends OperatingFindingBaseV2 {
|
|
1745
|
+
origin: 'persistent-work';
|
|
1746
|
+
}
|
|
1747
|
+
export interface OperatingIntelligenceFindingV2 extends OperatingFindingBaseV2 {
|
|
1748
|
+
origin: 'operating-intelligence'; sourceAssignmentId: string; sourceLocalFindingId: string;
|
|
1749
|
+
findingType: OperatingFindingTypeV2; severity: OperatingFindingSeverityV2; confidence: number;
|
|
1750
|
+
targets: Array<{ advisorArtifactId: string; analysisIds: string[]; claimIds: string[]; measurementIds: string[]; riskIds: string[]; recommendationIds: string[] }>;
|
|
1751
|
+
supportingEvidenceRefIds: string[]; contradictingEvidenceRefIds: string[];
|
|
1752
|
+
rationale: string; correctionCondition: string;
|
|
1753
|
+
}
|
|
1754
|
+
export type OperatingFindingV2 = OperatingPersistentWorkFindingV2 | OperatingIntelligenceFindingV2;
|
|
1755
|
+
|
|
1756
|
+
export interface OperatingDecisionBaseV2 {
|
|
1757
|
+
kind: 'operating-decision'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
1758
|
+
decisionId: string; scopeId: string; domainId: string; domainVersion: string;
|
|
1759
|
+
sourceCycleId: string; sourceArtifactId: string; title: string; question: string;
|
|
1760
|
+
outcome: string | null; rationale: string; state: OperatingDecisionStateV2;
|
|
1761
|
+
ownerActorId: string; revisitAt: string | null; revision: number;
|
|
1762
|
+
predecessorDecisionId: string | null; historyDecisionIds: string[]; createdAt: string; updatedAt: string;
|
|
1763
|
+
evidenceRefIds: string[]; alternatives: string[]; confidence: number; assumptionIds: string[];
|
|
1764
|
+
expectedUpside: string; expectedDownside: string;
|
|
1765
|
+
dissent: string[]; reopenConditions: string[]; revisitConditions: string[];
|
|
1766
|
+
}
|
|
1767
|
+
export interface OperatingPersistentWorkDecisionV2 extends OperatingDecisionBaseV2 {
|
|
1768
|
+
origin: 'persistent-work';
|
|
1769
|
+
}
|
|
1770
|
+
export interface OperatingIntelligenceDecisionV2 extends OperatingDecisionBaseV2 {
|
|
1771
|
+
origin: 'operating-intelligence'; sourceAssignmentId: string; sourceLocalDecisionId: string;
|
|
1772
|
+
sourceClaimRefs: Array<{ advisorArtifactId: string; localClaimId: string }>; claimIds: string[];
|
|
1773
|
+
sourceRecommendationRefs: Array<{ advisorArtifactId: string; localRecommendationId: string }>;
|
|
1774
|
+
challengerFindingIds: string[]; findingIds: string[];
|
|
1775
|
+
alternativeDispositions: Array<{ sourceArtifactId: string; localAlternativeId: string; title: string; disposition: 'accepted' | 'rejected' | 'deferred'; rationale: string }>;
|
|
1776
|
+
uncertainty: string; reversibility: string; dissentIds: string[];
|
|
1777
|
+
}
|
|
1778
|
+
export type OperatingDecisionV2 = OperatingPersistentWorkDecisionV2 | OperatingIntelligenceDecisionV2;
|
|
1779
|
+
export interface OperatingActionV2Base {
|
|
1780
|
+
kind: 'operating-action'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
1781
|
+
actionId: string; scopeId: string; domainId: string; domainVersion: string;
|
|
1782
|
+
sourceCycleId: string; sourceArtifactId: string; title: string; state: OperatingActionStateV2;
|
|
1783
|
+
ownerActorId: string | null; accountabilityDisposition: 'unowned' | 'blocked' | null;
|
|
1784
|
+
sourceDecisionId: string | null; sourceFindingIds: string[]; dependsOnActionIds: string[];
|
|
1785
|
+
objectiveId: string; expectedResult: string; metricId: string;
|
|
1786
|
+
baseline: number; target: number; verificationWindow: string; verificationPlanId: string;
|
|
1787
|
+
createdAt: string; updatedAt: string;
|
|
1788
|
+
}
|
|
1789
|
+
export type OperatingActionAuthorityTupleV2 =
|
|
1790
|
+
| {
|
|
1791
|
+
revisionId?: never; revision?: never; predecessorRevisionId?: never; actionHash?: never;
|
|
1792
|
+
actionKind?: never; requestedCapability?: never; targetBinding?: never; effectClass?: never;
|
|
1793
|
+
preconditionArtifactIds?: never; executionBinding?: never;
|
|
1794
|
+
}
|
|
1795
|
+
| {
|
|
1796
|
+
revisionId: string; revision: number; predecessorRevisionId: string | null; actionHash: string;
|
|
1797
|
+
actionKind: OperateVersionedIdentityV2; requestedCapability: OperateVersionedIdentityV2;
|
|
1798
|
+
targetBinding: OperateTargetBindingV2; effectClass: OperateGovernedEffectClassV2;
|
|
1799
|
+
preconditionArtifactIds: string[];
|
|
1800
|
+
executionBinding: {
|
|
1801
|
+
policyId: string;
|
|
1802
|
+
policyVersion: string;
|
|
1803
|
+
rollbackRequired: boolean;
|
|
1804
|
+
verificationRequired: true;
|
|
1805
|
+
};
|
|
1806
|
+
};
|
|
1807
|
+
export type OperatingActionV2 = OperatingActionV2Base & OperatingActionAuthorityTupleV2;
|
|
1808
|
+
export interface OperatingFindingDraftV2 {
|
|
1809
|
+
draftRef: string; title: string; statement: string; state: Extract<OperatingFindingStateV2, 'open' | 'deferred'>;
|
|
1810
|
+
ownerActorId: string | null; revisitAt: string | null;
|
|
1811
|
+
}
|
|
1812
|
+
export interface OperatingDecisionDraftV2 {
|
|
1813
|
+
draftRef: string; title: string; question: string; rationale: string; ownerActorId: string; revisitAt: string | null;
|
|
1814
|
+
evidenceRefIds: string[]; alternatives: string[]; confidence: number; assumptionIds: string[];
|
|
1815
|
+
expectedUpside: string; expectedDownside: string; dissent: string[]; reopenConditions: string[]; revisitConditions: string[];
|
|
1816
|
+
}
|
|
1817
|
+
export interface OperatingActionDraftV2 {
|
|
1818
|
+
draftRef: string; title: string; ownerActorId: string | null; accountabilityDisposition: 'unowned' | 'blocked' | null;
|
|
1819
|
+
sourceDecisionDraftRef: string | null; sourceFindingDraftRefs: string[]; dependsOnActionDraftRefs: string[];
|
|
1820
|
+
objectiveId: string; expectedResult: string; metricId: string;
|
|
1821
|
+
baseline: number; target: number; verificationWindow: string; verificationPlanId: string;
|
|
1822
|
+
}
|
|
1823
|
+
export interface OperatingWorkChangeSetV2 {
|
|
1824
|
+
kind: 'operating-work-change-set'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
1825
|
+
cycleId: string; scopeId: string; domainId: string; domainVersion: string;
|
|
1826
|
+
findings: OperatingFindingDraftV2[]; decisions: OperatingDecisionDraftV2[]; actions: OperatingActionDraftV2[];
|
|
1827
|
+
}
|
|
1828
|
+
export interface OperatingWorkChangeSetMaterializationV2 {
|
|
1829
|
+
artifactId: string; canonicalHash: string; changeSet: OperatingWorkChangeSetV2;
|
|
1830
|
+
findings: OperatingFindingV2[]; decisions: OperatingDecisionV2[]; actions: OperatingActionV2[];
|
|
1831
|
+
}
|
|
1832
|
+
export interface OperatingWorkCycleLinkV2 {
|
|
1833
|
+
entityKind: 'finding' | 'decision' | 'action';
|
|
1834
|
+
entityId: string;
|
|
1835
|
+
cycleId: string;
|
|
1836
|
+
relation: 'source' | 'touched' | 'carried-forward';
|
|
1837
|
+
}
|
|
1838
|
+
export interface OperatingWorkLedgerV2 {
|
|
1839
|
+
kind: 'operating-work-ledger'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
1840
|
+
scopeId: string; domainId: string; domainVersion: string; generatedAt: string;
|
|
1841
|
+
findings: OperatingFindingV2[]; decisions: OperatingDecisionV2[]; actions: OperatingActionV2[];
|
|
1842
|
+
cycleLinks: OperatingWorkCycleLinkV2[];
|
|
1843
|
+
}
|
|
1844
|
+
|
|
1845
|
+
export type OperateGovernedEffectClassV2 = 'read-only' | 'machine-local-write' | 'project-write' | 'provider-call' | 'external-effect' | 'destructive';
|
|
1846
|
+
export type OperateGovernedPolicyOutcomeV2 = 'automatic' | 'named-single-party' | 'named-multi-party' | 'threshold' | 'deferred' | 'rejected' | 'prohibited';
|
|
1847
|
+
export type OperateGovernedOperationStateV2 = 'authorized' | 'intent-recorded' | 'dispatching' | 'succeeded' | 'failed' | 'partial' | 'uncertain' | 'blocked' | 'cancelled' | 'rolled-back';
|
|
1848
|
+
export interface OperateVersionedIdentityV2 { id: string; version: string; }
|
|
1849
|
+
export interface OperateActionIdentityV2 { actionId: string; revision: number; actionHash: string; }
|
|
1850
|
+
export interface OperateTargetBindingV2 { kind: string; id: string; revision: string; }
|
|
1851
|
+
export interface OperateGovernedContractRefV2 { schemaId: string; schemaVersion: '2.0.0'; }
|
|
1852
|
+
export interface OperateGovernedProviderProvenanceV2 { packageName: string; packageVersion: string; integrity: string; }
|
|
1853
|
+
export interface OperateGovernedImplementationV2 { source: 'built-in' | 'public-optional' | 'external'; id: string; }
|
|
1854
|
+
export type OperatePolicyTierV2 = 'core' | 'project' | 'domain';
|
|
1855
|
+
export interface OperateGovernedRegistrationProfileV2 {
|
|
1856
|
+
supportedActionKinds: OperateVersionedIdentityV2[];
|
|
1857
|
+
errorContract: OperateGovernedContractRefV2;
|
|
1858
|
+
errorCodes: OperateErrorCodeV2[];
|
|
1859
|
+
timeoutPolicy: { timeoutMs: number; onTimeout: 'fail-closed' };
|
|
1860
|
+
retryPolicy: { maxAttempts: number; backoff: 'none' | 'fixed'; retryableErrorCodes: OperateErrorCodeV2[] };
|
|
1861
|
+
idempotency: { keySource: 'runtime-derived-request-fingerprint'; replay: 'return-recorded-result'; intrinsicallyIdempotent: boolean };
|
|
1862
|
+
reconciliation: OperateGovernedReconciliationV2;
|
|
1863
|
+
health: { status: 'available' | 'degraded' | 'unavailable'; checkedAt: string; expiresAt: string; healthHash: string };
|
|
1864
|
+
versionCompatibility: { protocolVersion: '2.0.0'; minimumRuntimeVersion: string; maximumRuntimeVersion: string | null };
|
|
1865
|
+
}
|
|
1866
|
+
export type OperateGovernedReconciliationV2 =
|
|
1867
|
+
| { supported: false; mode: 'none' }
|
|
1868
|
+
| { supported: true; mode: 'deterministic' };
|
|
1869
|
+
export interface OperatingActionPolicyV2 {
|
|
1870
|
+
kind: 'operating-action-policy'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
1871
|
+
policyId: string; policyVersion: string; domainId: string; actionKind: OperateVersionedIdentityV2; capability: OperateVersionedIdentityV2;
|
|
1872
|
+
effectClasses: OperateGovernedEffectClassV2[]; targetKinds: string[]; decisionMode: OperateGovernedPolicyOutcomeV2; approvalRequirementIds: string[];
|
|
1873
|
+
rollbackRequired: boolean; verificationRequired: boolean; tier: OperatePolicyTierV2; precedence: 100 | 200 | 300; narrowingOnly: boolean; provenance: { providerId: string; providerVersion: string; sourceHash: string }; policyHash: string;
|
|
1874
|
+
}
|
|
1875
|
+
export interface OperatingPolicyEvaluationV2 {
|
|
1876
|
+
kind: 'operating-policy-evaluation'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0'; evaluationId: string;
|
|
1877
|
+
policy: { policyId: string; policyVersion: string; policyHash: string }; policyTier: OperatePolicyTierV2; precedence: 100 | 200 | 300; appliedPolicyRefs: Array<{ policyId: string; policyVersion: string; policyHash: string }>; action: OperateActionIdentityV2; capability: OperateVersionedIdentityV2;
|
|
1878
|
+
target: OperateTargetBindingV2; effectClass: OperateGovernedEffectClassV2; outcome: OperateGovernedPolicyOutcomeV2; approvalRequirementIds: string[];
|
|
1879
|
+
reasonCodes: string[]; evaluatedBy: { providerId: string; providerVersion: string }; evaluatedAt: string; inputHash: string; evaluationHash: string;
|
|
1880
|
+
}
|
|
1881
|
+
export interface OperatingApprovalRequirementV2 {
|
|
1882
|
+
kind: 'operating-approval-requirement'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0'; requirementId: string; evaluationId: string;
|
|
1883
|
+
policy: { policyId: string; policyVersion: string; policyHash: string }; action: OperateActionIdentityV2; scopeId: string; domainId: string; domainVersion: string; capability: OperateVersionedIdentityV2; target: OperateTargetBindingV2; effectClass: Exclude<OperateGovernedEffectClassV2, 'destructive'>; parties: Array<{ partyId: string; actorKind: 'human' | 'engine'; actorId: string | null; requiredCapability: OperateVersionedIdentityV2 }>; mode: Extract<OperateGovernedPolicyOutcomeV2, 'automatic' | 'named-single-party' | 'named-multi-party' | 'threshold'>;
|
|
1884
|
+
namedActorIds: string[]; requiredActorKinds: Array<'human' | 'engine'>; threshold: number; expiresAt: string | null; consumable: boolean; scopeHash: string;
|
|
1885
|
+
}
|
|
1886
|
+
export interface OperatingApprovalRecordV2 {
|
|
1887
|
+
kind: 'operating-approval-record'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0'; approvalId: string; requirementId: string; evaluationId: string;
|
|
1888
|
+
policy: { policyId: string; policyVersion: string; policyHash: string }; action: OperateActionIdentityV2; scopeId: string; domainId: string; domainVersion: string; capability: OperateVersionedIdentityV2; target: OperateTargetBindingV2; effectClass: Exclude<OperateGovernedEffectClassV2, 'destructive'>; partyId: string; actor: { kind: 'human' | 'engine'; actorId: string; capability: OperateVersionedIdentityV2 };
|
|
1889
|
+
decision: 'approved' | 'rejected' | 'deferred'; scopeHash: string; issuedAt: string; expiresAt: string | null; consumedByOperationId: string | null; recordHash: string;
|
|
1890
|
+
}
|
|
1891
|
+
export interface OperatingCapabilityAvailabilityV2 {
|
|
1892
|
+
kind: 'operating-capability-availability'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0'; availabilityId: string;
|
|
1893
|
+
provider: { providerId: string; providerVersion: string }; capability: OperateVersionedIdentityV2; target: OperateTargetBindingV2;
|
|
1894
|
+
effectCeiling: Exclude<OperateGovernedEffectClassV2, 'destructive'>; status: 'available' | 'unavailable' | 'degraded'; reasonCode: string; checkedAt: string; expiresAt: string; availabilityHash: string;
|
|
1895
|
+
}
|
|
1896
|
+
export interface OperatingCapabilityGrantV2 {
|
|
1897
|
+
kind: 'operating-capability-grant'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0'; grantId: string; issuer: { kind: 'runtime'; id: string };
|
|
1898
|
+
assignmentId: string; action: OperateActionIdentityV2; evaluationId: string; approvalIds: string[]; operationId: string; capability: OperateVersionedIdentityV2;
|
|
1899
|
+
target: OperateTargetBindingV2; effectClass: Exclude<OperateGovernedEffectClassV2, 'destructive'>; useLimit: 1; issuedAt: string; expiresAt: string; consumedAt: string | null; revokedAt: string | null; scopeHash: string; grantHash: string;
|
|
1900
|
+
}
|
|
1901
|
+
export interface OperatingGovernedOperationV2 {
|
|
1902
|
+
kind: 'operating-governed-operation'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0'; operationId: string; operationKind: 'execute' | 'rollback'; action: OperateActionIdentityV2;
|
|
1903
|
+
assignmentId: string; requestFingerprint: string; evaluationId: string; approvalIds: string[]; grantId: string; capability: OperateVersionedIdentityV2; target: OperateTargetBindingV2;
|
|
1904
|
+
effectClass: Exclude<OperateGovernedEffectClassV2, 'destructive'>; executor: { executorId: string; executorVersion: string }; connector: OperateVersionedIdentityV2 | null; preconditionArtifactIds: string[]; inputArtifactIds: string[]; verificationPlanId: string; rollbackClass: 'not-applicable' | 'reversible' | 'compensating' | 'manual'; state: OperateGovernedOperationStateV2;
|
|
1905
|
+
intentEventId: string; resultId: string | null; rollbackPlanId: string | null; parentOperationId: string | null; createdAt: string; updatedAt: string; operationHash: string;
|
|
1906
|
+
}
|
|
1907
|
+
export interface OperatingExecutionResultV2 { kind: 'operating-execution-result'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0'; resultId: string; operationId: string; operationKind: 'execute'; requestFingerprint: string; action: OperateActionIdentityV2; assignmentId: string; evaluationId: string; approvalIds: string[]; grantId: string; capability: OperateVersionedIdentityV2; target: OperateTargetBindingV2; effectClass: Exclude<OperateGovernedEffectClassV2, 'destructive'>; executor: { executorId: string; executorVersion: string }; connector: OperateVersionedIdentityV2 | null; status: 'succeeded' | 'failed' | 'partial' | 'uncertain' | 'blocked'; targetBeforeHash: string; targetAfterHash: string | null; baselineArtifactId: string | null; baselineHash: string | null; inputArtifactIds: string[]; outputArtifactIds: string[]; effectSummary: { changed: boolean; summary: string; affectedTargetIds: string[] }; resultArtifactId: string; verificationPlanId: string; rollbackPlanId: string | null; eventIds: string[]; completedAt: string; resultHash: string; }
|
|
1908
|
+
export interface OperatingRollbackPlanV2 { kind: 'operating-rollback-plan'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0'; rollbackPlanId: string; operationId: string; executionResultId: string; action: OperateActionIdentityV2; eligibility: 'eligible' | 'required' | 'unsupported' | 'prohibited' | 'expired' | 'stale' | 'uncertain'; capability: OperateVersionedIdentityV2; effectClass: Exclude<OperateGovernedEffectClassV2, 'destructive'>; executor: { executorId: string; executorVersion: string }; baselineArtifactId: string; baselineHash: string; steps: Array<{ stepId: string; description: string; expectedTargetHash: string }>; verificationPlanId: string; expiresAt: string; planHash: string; }
|
|
1909
|
+
export interface OperatingRollbackResultV2 { kind: 'operating-rollback-result'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0'; rollbackResultId: string; rollbackOperationId: string; operationKind: 'rollback'; requestFingerprint: string; originalOperationId: string; executionResultId: string; rollbackPlanId: string; action: OperateActionIdentityV2; assignmentId: string; evaluationId: string; approvalIds: string[]; grantId: string; capability: OperateVersionedIdentityV2; target: OperateTargetBindingV2; effectClass: Exclude<OperateGovernedEffectClassV2, 'destructive'>; executor: { executorId: string; executorVersion: string }; connector: OperateVersionedIdentityV2 | null; status: 'succeeded' | 'failed' | 'partial' | 'uncertain' | 'blocked'; targetBeforeHash: string; targetAfterHash: string | null; baselineArtifactId: string | null; baselineHash: string | null; inputArtifactIds: string[]; outputArtifactIds: string[]; effectSummary: { changed: boolean; summary: string; affectedTargetIds: string[] }; resultArtifactId: string; verificationPlanId: string; eventIds: string[]; completedAt: string; resultHash: string; }
|
|
1910
|
+
export interface OperateCapabilityProviderRegistrationV2 extends OperateGovernedRegistrationProfileV2 {
|
|
1911
|
+
kind: 'operate-capability-provider-registration'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
1912
|
+
providerId: string; providerVersion: string; capabilities: OperateVersionedIdentityV2[]; supportedDomains: string[]; supportedTargetKinds: string[];
|
|
1913
|
+
effectCeiling: Exclude<OperateGovernedEffectClassV2, 'destructive'>; inputContract: OperateGovernedContractRefV2; outputContract: OperateGovernedContractRefV2;
|
|
1914
|
+
provenance: OperateGovernedProviderProvenanceV2; conformanceDigest: string; implementation: OperateGovernedImplementationV2;
|
|
1915
|
+
fallback: { kind: 'unavailable'; errorCode: 'CAPABILITY_PROVIDER_UNAVAILABLE' };
|
|
1916
|
+
}
|
|
1917
|
+
export interface OperatePolicyProviderRegistrationV2 extends OperateGovernedRegistrationProfileV2 {
|
|
1918
|
+
kind: 'operate-policy-provider-registration'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
1919
|
+
providerId: string; providerVersion: string; policyRefs: OperateVersionedIdentityV2[]; supportedDomains: string[];
|
|
1920
|
+
effectCeiling: Exclude<OperateGovernedEffectClassV2, 'destructive'>; tier: OperatePolicyTierV2; precedence: 100 | 200 | 300; narrowingOnly: boolean; inputContract: OperateGovernedContractRefV2; outputContract: OperateGovernedContractRefV2;
|
|
1921
|
+
provenance: OperateGovernedProviderProvenanceV2; conformanceDigest: string; implementation: OperateGovernedImplementationV2;
|
|
1922
|
+
fallback: { kind: 'unavailable'; errorCode: 'POLICY_PROVIDER_UNAVAILABLE' };
|
|
1923
|
+
}
|
|
1924
|
+
export interface OperateExecutorRegistrationV2 extends OperateGovernedRegistrationProfileV2 {
|
|
1925
|
+
kind: 'operate-executor-registration'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0';
|
|
1926
|
+
executorId: string; executorVersion: string; operationKinds: Array<'execute' | 'rollback'>; capabilities: OperateVersionedIdentityV2[];
|
|
1927
|
+
supportedDomains: string[]; supportedTargetKinds: string[]; effectCeiling: Exclude<OperateGovernedEffectClassV2, 'destructive'>;
|
|
1928
|
+
inputContract: OperateGovernedContractRefV2; outputContract: OperateGovernedContractRefV2; rollbackContract: OperateGovernedContractRefV2;
|
|
1929
|
+
provenance: OperateGovernedProviderProvenanceV2; conformanceDigest: string; implementation: OperateGovernedImplementationV2;
|
|
1930
|
+
fallback: { kind: 'unavailable'; errorCode: 'EXECUTOR_UNAVAILABLE' };
|
|
1931
|
+
}
|
|
1932
|
+
export interface OperateGovernedExtensionRegistryV2 {
|
|
1933
|
+
capabilityProviders: readonly OperateCapabilityProviderRegistrationV2[];
|
|
1934
|
+
policyProviders: readonly OperatePolicyProviderRegistrationV2[];
|
|
1935
|
+
executors: readonly OperateExecutorRegistrationV2[];
|
|
1936
|
+
}
|
|
1937
|
+
export interface OperateTrustedExecutorBindingV2 {
|
|
1938
|
+
kind: 'operate-trusted-executor-binding';
|
|
1939
|
+
schemaVersion: '1.0.0';
|
|
1940
|
+
protocolVersion: '2.0.0';
|
|
1941
|
+
executor: { executorId: string; executorVersion: string };
|
|
1942
|
+
implementation: OperateGovernedImplementationV2;
|
|
1943
|
+
connector: OperateVersionedIdentityV2;
|
|
1944
|
+
registrationHash: string;
|
|
1945
|
+
bindingHash: string;
|
|
1946
|
+
}
|
|
1947
|
+
|
|
1948
|
+
export type OperatingDeliveryRouteKindV1 = 'contained-execution' | 'planning-work' | 'human-external' | 'observe-only';
|
|
1949
|
+
export type OperateExperienceAccessLevelV1 = 'public' | 'internal' | 'confidential' | 'restricted';
|
|
1950
|
+
declare const positiveOperateExperienceEventSequenceV1Brand: unique symbol;
|
|
1951
|
+
export type PositiveOperateExperienceEventSequenceV1 = number & { readonly [positiveOperateExperienceEventSequenceV1Brand]: 'positive-operate-experience-event-sequence' };
|
|
1952
|
+
export type OperateExperienceEventHeadV1 =
|
|
1953
|
+
| { sequence: 0; hash: null }
|
|
1954
|
+
| { sequence: PositiveOperateExperienceEventSequenceV1; hash: string };
|
|
1955
|
+
export interface OperatingDeliveryRouteV1 {
|
|
1956
|
+
kind: 'operating-delivery-route'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0'; routeId: string;
|
|
1957
|
+
scopeId: string; domainId: string; domainVersion: string;
|
|
1958
|
+
action: { actionId: string; revision: number; actionHash: string };
|
|
1959
|
+
eventHead: OperateExperienceEventHeadV1; route: OperatingDeliveryRouteKindV1;
|
|
1960
|
+
rationale: string; createdAt: string; routeHash: string;
|
|
1961
|
+
}
|
|
1962
|
+
export interface OperateExperienceAttentionV1 { attentionId: string; kind: 'decision' | 'approval' | 'action' | 'verification' | 'outcome' | 'uncertainty'; subjectId: string; priority: number; title: string; whyNow: string; consequence: string; state: string; dueAt: string | null; evidenceRefIds: string[] }
|
|
1963
|
+
export interface OperateExperienceDomainMetricV1 { metricId: string; title: string | null; value: number | null; unit: string | null; change: null | { kind: 'added' | 'removed' | 'changed' | 'stale' | 'conflict'; priorValue: number | null; currentValue: number | null; deltaValue: number | null; deltaId: string | null }; window: string | null; freshness: 'current' | 'historical' | 'stale' | 'unknown'; state: 'current' | 'historical' | 'stale' | 'unknown' | 'unavailable' | 'restricted'; target: number | null; threshold: number | null; evidenceRefIds: string[]; snapshot: null | { snapshotId: string; createdAt: string }; delta: null | { deltaId: string; priorSnapshotId: string | null; currentSnapshotId: string; derivedAt: string }; dueVerification: Array<{ verificationPlanId: string; actionId: string; state: string | null; dueAt: string | null; window: string | null; deepLink: string | null }>; accessReason: 'access-denied' | null }
|
|
1964
|
+
export interface OperateExperienceCycleStageV1 { id: 'observe' | 'understand' | 'decide' | 'govern' | 'act' | 'verify' | 'learn'; state: 'complete' | 'current' | 'available' | 'blocked' | 'skipped' | 'failed' | 'uncertain' | 'revisited' | 'waiting'; reason: string | null; inputArtifactIds: string[]; outputArtifactIds: string[]; gates: Array<{ kind: 'review' | 'approval' | 'execution' | 'verification' | 'learning'; subjectId: string; state: string }>; evidenceGapIds: string[]; uncertaintyIds: string[]; persistentActionIds: string[] }
|
|
1965
|
+
export interface OperateExperienceAssignmentV1 { assignmentId: string; title: string | null; role: string | null; ownerLabel: string | null; state: string; dueAt: string | null; next: null | { label: string; tool: string }; deepLink: string; dependencies: Array<{ assignmentId: string; state: string | null; resolved: boolean }>; blockers: string[]; inputArtifactIds: string[]; outputArtifactIds: string[] }
|
|
1966
|
+
export interface OperateExperienceCycleV1 { cycleId: string; state: string; health: string; focus: string[]; createdAt: string; updatedAt: string; stages: OperateExperienceCycleStageV1[]; assignments: OperateExperienceAssignmentV1[]; dependencies: Array<{ subjectKind: 'assignment' | 'action'; subjectId: string; dependsOn: Array<{ assignmentId?: string; actionId?: string; state: string | null; resolved: boolean }> }>; blockers: Array<{ subjectKind: 'assignment' | 'action'; subjectId: string; blockingSubjectIds: string[] }>; persistentActionIds: string[]; replayCheckpoint: OperateExperienceReplayV1['checkpoint']; deepLink: string }
|
|
1967
|
+
export interface OperateExperienceInboxItemV1 {
|
|
1968
|
+
itemId: string; kind: 'decision' | 'approval' | 'verification'; subjectId: string;
|
|
1969
|
+
ownerActorId: string; state: string; title: string; consequence: string;
|
|
1970
|
+
expiresAt: string | null; blocking: boolean;
|
|
1971
|
+
evidence: Array<{ evidenceRefId: string; classification: OperateExperienceAccessLevelV1; accessState: 'available' | 'restricted'; relation: 'support' | 'contradiction' | 'informs' | 'evaluates' }>;
|
|
1972
|
+
requiredParties: Array<{ partyId: string; actorKind: 'human' | 'engine'; actorId: string | null; requiredCapability: OperateVersionedIdentityV2; state: 'required' | 'recorded' | 'redacted'; redacted: boolean }>;
|
|
1973
|
+
redactions: OperateExperienceOmissionV1[];
|
|
1974
|
+
actionLocator: null | { subjectId: string; actionDigest: string };
|
|
1975
|
+
navigationLocator: null | { kind: 'review'; cycleId: string; reviewId: string; deepLink: string; readActionDigest: string };
|
|
1976
|
+
unavailableReason: null | { code: string; message: string };
|
|
1977
|
+
}
|
|
1978
|
+
export interface OperateExperienceResultV1 { resultId: string; operationId: string; status: string; completedAt: string; effectSummary: null | { changed: boolean; summary: string; affectedTargetIds: string[] }; targetBeforeHash: string | null; targetAfterHash: string | null; accessReason: 'access-denied' | null; deepLink: string }
|
|
1979
|
+
export interface OperateExperienceActionV1 { actionId: string; revision: number; actionHash: string; title: string; state: string; ownerActorId: string | null; expectedResult: string; verificationPlanId: string; deliveryRoute: OperatingDeliveryRouteV1; dependencyActionIds: string[]; executions: OperateExperienceResultV1[]; rollbacks: OperateExperienceResultV1[]; deepLink: string }
|
|
1980
|
+
export interface OperateExperienceCausalLinkV1 { kind: 'claim' | 'local-claim' | 'decision' | 'action' | 'outcome'; subjectId: string; relation: 'support' | 'contradiction' | 'informs' | 'evaluates'; deepLink: string }
|
|
1981
|
+
export interface OperateExperienceResolutionErrorV1 { resolutionId: string; error: null | { code: string; retryable: boolean; context: Record<string, string> }; resolvedAt: string }
|
|
1982
|
+
export interface OperateExperienceEvidenceV1 { evidenceRefId: string; classification: OperateExperienceAccessLevelV1; accessState: 'available' | 'restricted'; freshness: 'current' | 'historical' | 'stale'; evidenceKind: 'git' | 'filesystem' | 'planr' | 'operate-artifact' | null; resolvedAt: string | null; claimStatus: 'supported' | 'contradicted' | 'uncertain' | 'unknown' | 'restricted'; supportClaimIds: string[]; contradictClaimIds: string[]; source: null | { evidenceKind: 'git' | 'filesystem' | 'planr' | 'operate-artifact'; provider: { id: string; version: string }; resolver: { id: string; version: string } }; producer: null | { actorId: string; roleId: string; runtime: string }; observedAt: string | null; scope: { scopeId: string; domainId: string; domainVersion: string }; sensitivity: OperateExperienceAccessLevelV1; provenance: null | { sourceArtifactId: string; evidenceArtifactId: string; rawHash: string; canonicalHash: string | null; sizeBytes: number; mediaType: string; accessLevel: OperateExperienceAccessLevelV1 }; confidence: number | null; gaps: string[]; errors: OperateExperienceResolutionErrorV1[]; accessReason: 'access-denied' | null; causalLinks: OperateExperienceCausalLinkV1[]; deepLink: string }
|
|
1983
|
+
export interface OperateExperienceClaimV1 { claimId: string; status: 'supported' | 'contradicted' | 'uncertain' | 'unknown' | 'restricted'; epistemicStatus: 'known' | 'strongly-supported' | 'probable' | 'speculative' | 'unknown'; statement: string | null; supportEvidenceRefIds: string[]; contradictEvidenceRefIds: string[]; source: null | { artifactId: string; artifactType: string; producer: { actorId: string; roleId: string; runtime: string }; observedAt: string; rawHash: string; canonicalHash: string | null }; producer: null | { actorId: string; roleId: string; runtime: string }; observedAt: string; scope: { scopeId: string; domainId: string; domainVersion: string }; sensitivity: OperateExperienceAccessLevelV1; provenance: null | { artifactId: string; rawHash: string; canonicalHash: string | null }; confidence: number | null; gaps: string[]; errors: OperateExperienceResolutionErrorV1[]; accessReason: 'access-denied' | null; causalLinks: OperateExperienceCausalLinkV1[]; deepLink: string }
|
|
1984
|
+
export interface OperateExperienceRationaleV1 { nodeId: string; kind: 'claim' | 'recommendation' | 'challenge' | 'synthesis' | 'decision' | 'action' | 'result' | 'outcome' | 'learning' | 'revisit'; subjectId: string; summary: string; artifactId: string | null; evidenceRefIds: string[] }
|
|
1985
|
+
export interface OperateExperienceOutcomeV1 { outcomeId: string; actionId: string; verificationPlanId: string; status: string; metric: null | { metricId: string; metricHash: string; baseline: number | null; target: number | null; observed: number | null; unit: string | null; window: string | null; dueAt: string | null; freshness: 'current' | 'historical' | 'stale' | 'unknown'; confidence: number | null }; observationIds: string[]; evidenceRefIds: string[]; observedAt: string; decision: null | { decisionId: string; revision: number; state: string; deepLink: string }; execution: OperateExperienceResultV1[]; rollback: OperateExperienceResultV1[]; verification: null | { verificationPlanId: string; verificationPlanHash: string; metricId: string; metricHash: string; method: string | null; evaluationRules: string[]; observationRequest: null | { kind: 'future-observation' | 'future-analysis'; reason: string }; accessReason: 'access-denied' | null }; nextObservation: null | { kind: 'future-observation' | 'future-analysis'; reason: string; dueAt: string | null }; revisit: null | { decisionIds: string[]; conditions: string[] }; snapshot: null | { snapshotId: string; createdAt: string }; delta: null | { deltaId: string; priorSnapshotId: string | null; currentSnapshotId: string; derivedAt: string }; accessReason: 'access-denied' | null; deepLink: string }
|
|
1986
|
+
export interface OperateExperienceLearningV1 { learningId: string; outcomeId: string; statement: string; decisionIds: string[]; evidenceRefIds: string[]; createdAt: string }
|
|
1987
|
+
export interface OperateExperienceHistoryV1 { eventId: string; sequence: number; type: string; entityId: string; actorKind: string; actorId: string | null; timestamp: string; correlationId: string; eventHash: string; change: { subjectKind: string | null; summary: string | null }; why: string | null; authority: null | { evaluationId: string; approvalIds: string[]; grantId: string; capability: { id: string; version: string } }; evidenceRefIds: string[]; prior: { previousEventHash: string | null; causationId: string | null }; result: null | { status: string; completedAt: string | null }; next: null | { label: string; tool: string }; deepLinks: string[]; beforeAfter: null | { deltaId: string; kind: 'added' | 'removed' | 'changed' | 'stale' | 'conflict'; priorSnapshotId: string | null; currentSnapshotId: string } }
|
|
1988
|
+
export interface OperateExperienceReplayV1 { checkpoint: null | { createdAt: string; eventHead: OperateExperienceEventHeadV1; runtimeStateHash: string; eventReplayIndexHash: string; recoveryVersion: string }; tail: { startSequence: number | null; endSequence: number | null; eventCount: number; eventReplayIndexHash: string }; finalHead: OperateExperienceEventHeadV1; liveAccessUsed: false; parityProof: { sourceStateHash: string; eventReplayIndexHash: string; checkpointVerified: boolean; finalEventHashMatches: boolean; stateParityVerified: boolean }; filterDimensions: Array<'cycle' | 'action' | 'decision' | 'actor' | 'operation' | 'result' | 'event-type' | 'date'>; redactions: OperateExperienceOmissionV1[] }
|
|
1989
|
+
export interface OperateExperienceOmissionV1 { classification: OperateExperienceAccessLevelV1; count: number; reason: 'access-denied' | 'body-never-projected' | 'identity-redacted' }
|
|
1990
|
+
export interface OperateExperienceViewV1 {
|
|
1991
|
+
kind: 'operate-experience-view'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0'; viewId: string;
|
|
1992
|
+
scopeId: string; domainId: string; domainVersion: string; actorId: string; accessLevel: OperateExperienceAccessLevelV1;
|
|
1993
|
+
generatedAt: string; eventHead: OperateExperienceEventHeadV1; sourceStateHash: string;
|
|
1994
|
+
status: 'ready' | 'read-only' | 'stale' | 'partial' | 'blocked' | 'offline' | 'incompatible' | 'corrupt';
|
|
1995
|
+
attention: OperateExperienceAttentionV1[]; domainMetrics: OperateExperienceDomainMetricV1[]; cycles: OperateExperienceCycleV1[]; inbox: OperateExperienceInboxItemV1[]; actions: OperateExperienceActionV1[]; evidence: OperateExperienceEvidenceV1[];
|
|
1996
|
+
claims: OperateExperienceClaimV1[]; rationale: OperateExperienceRationaleV1[]; outcomes: OperateExperienceOutcomeV1[]; learnings: OperateExperienceLearningV1[]; history: OperateExperienceHistoryV1[]; replay: OperateExperienceReplayV1;
|
|
1997
|
+
allowedActions: Array<{ subjectId: string; action: OperateAllowedActionV2 }>;
|
|
1998
|
+
omissions: OperateExperienceOmissionV1[]; export: { formats: Array<'html' | 'json'>; accessSafe: true; redactionCount: number }; viewHash: string;
|
|
1999
|
+
}
|
|
2000
|
+
export type OperateExperiencePatchOperationV1 =
|
|
2001
|
+
| { op: 'replace'; path: '/status'; valueHash: string; value: OperateExperienceViewV1['status'] }
|
|
2002
|
+
| { op: 'replace'; path: '/attention'; valueHash: string; value: OperateExperienceAttentionV1[] }
|
|
2003
|
+
| { op: 'replace'; path: '/domainMetrics'; valueHash: string; value: OperateExperienceDomainMetricV1[] }
|
|
2004
|
+
| { op: 'replace'; path: '/cycles'; valueHash: string; value: OperateExperienceCycleV1[] }
|
|
2005
|
+
| { op: 'replace'; path: '/inbox'; valueHash: string; value: OperateExperienceInboxItemV1[] }
|
|
2006
|
+
| { op: 'replace'; path: '/actions'; valueHash: string; value: OperateExperienceActionV1[] }
|
|
2007
|
+
| { op: 'replace'; path: '/evidence'; valueHash: string; value: OperateExperienceEvidenceV1[] }
|
|
2008
|
+
| { op: 'replace'; path: '/claims'; valueHash: string; value: OperateExperienceClaimV1[] }
|
|
2009
|
+
| { op: 'replace'; path: '/rationale'; valueHash: string; value: OperateExperienceRationaleV1[] }
|
|
2010
|
+
| { op: 'replace'; path: '/outcomes'; valueHash: string; value: OperateExperienceOutcomeV1[] }
|
|
2011
|
+
| { op: 'replace'; path: '/learnings'; valueHash: string; value: OperateExperienceLearningV1[] }
|
|
2012
|
+
| { op: 'replace'; path: '/history'; valueHash: string; value: OperateExperienceHistoryV1[] }
|
|
2013
|
+
| { op: 'replace'; path: '/replay'; valueHash: string; value: OperateExperienceReplayV1 }
|
|
2014
|
+
| { op: 'replace'; path: '/allowedActions'; valueHash: string; value: OperateExperienceViewV1['allowedActions'] }
|
|
2015
|
+
| { op: 'replace'; path: '/omissions'; valueHash: string; value: OperateExperienceOmissionV1[] }
|
|
2016
|
+
| { op: 'replace'; path: '/export'; valueHash: string; value: OperateExperienceViewV1['export'] };
|
|
2017
|
+
export interface OperateExperienceLivePatchV1 {
|
|
2018
|
+
kind: 'operate-experience-live-patch'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0'; patchId: string;
|
|
2019
|
+
scopeId: string; domainId: string; domainVersion: string; actorId: string;
|
|
2020
|
+
fromEventHead: OperateExperienceEventHeadV1; toEventHead: OperateExperienceEventHeadV1;
|
|
2021
|
+
fromViewHash: string; toViewHash: string;
|
|
2022
|
+
operations: OperateExperiencePatchOperationV1[];
|
|
2023
|
+
createdAt: string; patchHash: string;
|
|
2024
|
+
}
|
|
2025
|
+
export interface OperateExperiencePreviewV1 {
|
|
2026
|
+
kind: 'operate-experience-preview'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0'; previewId: string;
|
|
2027
|
+
scopeId: string; domainId: string; domainVersion: string; actorId: string;
|
|
2028
|
+
subject: OperateExperiencePreviewSubjectV1;
|
|
2029
|
+
eventHead: OperateExperienceEventHeadV1; sourceViewHash: string; actionDigest: string; allowedAction: OperateAllowedActionV2;
|
|
2030
|
+
authority: 'allowed' | 'refused' | 'read-only'; consequence: string; reasonCodes: string[];
|
|
2031
|
+
transition: {
|
|
2032
|
+
kind: 'review' | 'approval' | 'verification' | 'execution' | 'rollback';
|
|
2033
|
+
targets: Array<{ kind: string; id: string; revision: number | string | null; hash: string | null; disposition: string | null }>;
|
|
2034
|
+
reversible: boolean; nextState: string;
|
|
2035
|
+
threshold: null | { required: number; recorded: number; remaining: number; parties: OperateExperienceInboxItemV1['requiredParties'] };
|
|
2036
|
+
};
|
|
2037
|
+
issuedAt: string; expiresAt: string; previewHash: string;
|
|
2038
|
+
}
|
|
2039
|
+
export type OperateExperiencePreviewSubjectV1 =
|
|
2040
|
+
| { kind: 'cycle' | 'assignment' | 'artifact' | 'review'; id: string; revision: null; hash: string }
|
|
2041
|
+
| { kind: 'decision' | 'action'; id: string; revision: number; hash: string };
|
|
2042
|
+
export interface OperatingPlanningProposalV1 {
|
|
2043
|
+
kind: 'operating-planning-proposal'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0'; proposalId: string; correlationId: string;
|
|
2044
|
+
revision: number; predecessorProposalHash: string | null; state: 'review-required' | 'approved' | 'expired' | 'withdrawn' | 'superseded';
|
|
2045
|
+
confirmation: null | { confirmationId: string; reviewProposalHash: string; reviewProposalRevision: 1; eventHead: OperateExperienceEventHeadV1; previewDigest: string; actorId: string; decision: 'approved'; confirmedAt: string; previewExpiresAt: string; confirmationHash: string };
|
|
2046
|
+
scopeId: string; domainId: string; domainVersion: string; cycleId: string; eventHead: OperateExperienceEventHeadV1;
|
|
2047
|
+
decision: { decisionId: string; revision: number; decisionHash: string; sourceArtifactId: string; title: string; outcome: string; rationale: string; confidence: number; evidenceRefIds: string[] };
|
|
2048
|
+
action: { actionId: string; revision: number; actionHash: string; sourceArtifactId: string; title: string; expectedResult: string; metricId: string; verificationPlanId: string };
|
|
2049
|
+
deliveryRoute: OperatingDeliveryRouteV1;
|
|
2050
|
+
acceptedPerspectiveSummaries: Array<{ roleId: string; roleVersion: string; roleKind: 'advisor' | 'challenger' | 'chair'; artifactId: string; artifactHash: string; accessClassification: OperateExperienceAccessLevelV1; disposition: 'accepted'; normative: boolean; stance: 'support' | 'object' | 'constraint' | 'unknown' | 'synthesis'; summary: string; constraints: string[]; uncertainties: string[] }>;
|
|
2051
|
+
evidence: Array<{ evidenceRefId: string; artifactId: string; artifactHash: string; classification: OperateExperienceAccessLevelV1; accessState: 'available' | 'restricted'; relation: 'support' | 'contradiction' | 'gap'; freshness: 'current' | 'historical' | 'stale' | 'unknown'; confidence: number; summary: string | null; limitations: string[] }>;
|
|
2052
|
+
omissions: Array<{ classification: OperateExperienceAccessLevelV1; count: number; reason: 'access-denied' | 'hidden-reasoning-excluded' | 'raw-prompt-excluded' | 'rejected-advice-excluded' | 'restricted-body-excluded' }>;
|
|
2053
|
+
framing: { title: string; slug: string; problem: string; objective: string; users: string[]; scope: string[]; nonScope: string[]; risks: string[]; constraints: string[]; requirements: string[]; acceptanceOutcomes: string[] };
|
|
2054
|
+
metric: { metricId: string; metricHash: string };
|
|
2055
|
+
verification: { verificationPlanId: string; verificationPlanHash: string; metricId: string; metricHash: string; baseline: number; target: number; window: string; method: string; revisitConditions: string[] };
|
|
2056
|
+
actor: { actorId: string; kind: 'human' }; preview: { digest: string; issuedAt: string; expiresAt: string };
|
|
2057
|
+
planningCommand: 'planr operate planning create-spec'; createdAt: string; proposalHash: string;
|
|
2058
|
+
}
|
|
2059
|
+
export interface OperatingOriginV1 {
|
|
2060
|
+
kind: 'operating-origin'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0'; correlationId: string; proposalId: string; proposalRevision: 2; proposalHash: string;
|
|
2061
|
+
scopeId: string; domainId: string; domainVersion: string; cycleId: string; eventHead: OperateExperienceEventHeadV1;
|
|
2062
|
+
decision: { id: string; revision: number; hash: string }; action: { id: string; revision: number; hash: string };
|
|
2063
|
+
metric: { metricId: string; metricHash: string }; verification: { verificationPlanId: string; verificationPlanHash: string; metricId: string; metricHash: string; window: string };
|
|
2064
|
+
evidence: Array<{ evidenceRefId: string; artifactId: string; artifactHash: string; classification: OperateExperienceAccessLevelV1; accessState: 'available' | 'restricted' }>;
|
|
2065
|
+
spec: { specId: string; slug: string; contentHash: string; status: 'shaping' };
|
|
2066
|
+
actor: { actorId: string; kind: 'human' }; transaction: { transactionId: string; receiptHash: string; planningProvenanceEventId: string };
|
|
2067
|
+
createdAt: string; originHash: string;
|
|
2068
|
+
}
|
|
2069
|
+
export interface OperatingDeliveryEvidenceV1 {
|
|
2070
|
+
kind: 'operating-delivery-evidence'; schemaVersion: '1.0.0'; protocolVersion: '2.0.0'; deliveryEvidenceId: string; correlationId: string; proposalId: string; proposalRevision: 2;
|
|
2071
|
+
scopeId: string; domainId: string; domainVersion: string; decision: { id: string; revision: number; hash: string }; action: { id: string; revision: number; hash: string };
|
|
2072
|
+
metric: { metricId: string; metricHash: string }; verification: { verificationPlanId: string; verificationPlanHash: string; metricId: string; metricHash: string; window: string }; spec: { specId: string; contentHash: string; originHash: string };
|
|
2073
|
+
planRun: { runId: string; runtime: string; packageVersion: string; provenanceEventId: string; provenanceEventHash: string; status: 'succeeded' | 'blocked' | 'failed' | 'skipped' };
|
|
2074
|
+
shipRun: { runId: string; runtime: string; packageVersion: string; manifestHash: string; provenanceEventId: string; provenanceEventHash: string; status: 'succeeded' | 'blocked' | 'failed' | 'skipped' }; tasks: Array<{ taskId: string; status: 'done' | 'blocked' | 'failed' | 'skipped'; artifactHash: string }>;
|
|
2075
|
+
changedSurfaces: string[]; qa: { status: 'passed' | 'failed' | 'skipped'; reportHash: string | null; summary: string };
|
|
2076
|
+
limitations: string[]; artifacts: Array<{ artifactId: string; hash: string; classification: OperateExperienceAccessLevelV1 }>;
|
|
2077
|
+
classification: OperateExperienceAccessLevelV1; summary: string; deliveryStatus: 'succeeded' | 'blocked' | 'failed' | 'rolled-back';
|
|
2078
|
+
rollback: null | { rollbackPlanId: string; rollbackPlanArtifactId: string; rollbackPlanHash: string; rollbackResultId: string; rollbackResultArtifactId: string; rollbackResultHash: string; rollbackReceiptId: string; rollbackReceiptArtifactId: string; rollbackReceiptHash: string; rollbackProvenanceEventId: string; originalShipRunId: string; rollbackRunId: string; targetBeforeHash: string; targetAfterHash: string; status: 'succeeded'; completedAt: string };
|
|
2079
|
+
outcomeStatus: 'verification-required'; createdAt: string; deliveryEvidenceHash: string;
|
|
2080
|
+
}
|
|
2081
|
+
|
|
2082
|
+
export const OPERATE_RUNTIME_PROTOCOL_VERSION: '2.0.0';
|
|
2083
|
+
export const OPERATE_RUNTIME_CONTRACT_KINDS: readonly [
|
|
2084
|
+
'operating-cycle',
|
|
2085
|
+
'operating-cycle-input-binding',
|
|
2086
|
+
'operating-assignment',
|
|
2087
|
+
'operating-review',
|
|
2088
|
+
'operating-submission',
|
|
2089
|
+
'operating-artifact',
|
|
2090
|
+
'operating-event',
|
|
2091
|
+
'operating-runtime-state',
|
|
2092
|
+
'operating-checkpoint',
|
|
2093
|
+
'operate-allowed-action',
|
|
2094
|
+
'operate-api-envelope',
|
|
2095
|
+
'operate-tool-call',
|
|
2096
|
+
'operate-domain-registration',
|
|
2097
|
+
'agent-runtime-manifest',
|
|
2098
|
+
'operating-finding',
|
|
2099
|
+
'operating-decision',
|
|
2100
|
+
'operating-action',
|
|
2101
|
+
'operating-work-change-set',
|
|
2102
|
+
'operating-work-ledger',
|
|
2103
|
+
'operating-evidence-candidate',
|
|
2104
|
+
'operating-evidence-ref',
|
|
2105
|
+
'operating-evidence-resolution',
|
|
2106
|
+
'operate-evidence-provider-registration',
|
|
2107
|
+
'operate-evidence-resolver-registration',
|
|
2108
|
+
'operating-evidence-edge',
|
|
2109
|
+
'operating-evidence-graph',
|
|
2110
|
+
'operating-model-state',
|
|
2111
|
+
'operating-snapshot',
|
|
2112
|
+
'operating-objective',
|
|
2113
|
+
'operating-metric',
|
|
2114
|
+
'operating-metric-observation',
|
|
2115
|
+
'operating-risk',
|
|
2116
|
+
'operating-assumption',
|
|
2117
|
+
'operating-claim',
|
|
2118
|
+
'operating-domain-projection',
|
|
2119
|
+
'business-operating-snapshot-projection',
|
|
2120
|
+
'software-operating-snapshot-projection',
|
|
2121
|
+
'operating-delta',
|
|
2122
|
+
'operating-intelligence-plan',
|
|
2123
|
+
'operating-decision-ledger',
|
|
2124
|
+
'operating-action-verification-plan',
|
|
2125
|
+
'operating-outcome',
|
|
2126
|
+
'operating-learning',
|
|
2127
|
+
'operating-scenario',
|
|
2128
|
+
'operating-event-trigger',
|
|
2129
|
+
'operate-snapshot-provider-registration',
|
|
2130
|
+
'operate-metric-provider-registration',
|
|
2131
|
+
'operate-verification-provider-registration',
|
|
2132
|
+
'operating-action-policy',
|
|
2133
|
+
'operating-policy-evaluation',
|
|
2134
|
+
'operating-approval-requirement',
|
|
2135
|
+
'operating-approval-record',
|
|
2136
|
+
'operating-capability-availability',
|
|
2137
|
+
'operating-capability-grant',
|
|
2138
|
+
'operating-governed-operation',
|
|
2139
|
+
'operating-execution-result',
|
|
2140
|
+
'operating-rollback-plan',
|
|
2141
|
+
'operating-rollback-result',
|
|
2142
|
+
'operate-capability-provider-registration',
|
|
2143
|
+
'operate-policy-provider-registration',
|
|
2144
|
+
'operate-executor-registration',
|
|
2145
|
+
'operating-advisor-result',
|
|
2146
|
+
'operating-challenger-review',
|
|
2147
|
+
'operating-context-capture',
|
|
2148
|
+
'operating-intelligence-input-bundle',
|
|
2149
|
+
'operating-review-read',
|
|
2150
|
+
'operating-review-receipt',
|
|
2151
|
+
'operating-trace-matrix',
|
|
2152
|
+
'operating-executive-board',
|
|
2153
|
+
'operate-live-evidence-provider-registration',
|
|
2154
|
+
'operate-live-evidence-provider-registry',
|
|
2155
|
+
'operating-live-evidence-consent-record',
|
|
2156
|
+
'operating-connector-checkpoint',
|
|
2157
|
+
'operating-live-evidence-ingestion',
|
|
2158
|
+
'operating-measurement-plan',
|
|
2159
|
+
'operating-measurement-schedule',
|
|
2160
|
+
'operating-measurement-schedule-receipt',
|
|
2161
|
+
'operating-evidence-observation',
|
|
2162
|
+
'operating-outcome-evaluation',
|
|
2163
|
+
'operating-learning-receipt',
|
|
2164
|
+
];
|
|
2165
|
+
export const OPERATE_LIVE_EVIDENCE_CONTRACT_KINDS_V2: readonly [
|
|
2166
|
+
'operate-live-evidence-provider-registration',
|
|
2167
|
+
'operate-live-evidence-provider-registry',
|
|
2168
|
+
'operating-live-evidence-consent-record',
|
|
2169
|
+
'operating-connector-checkpoint',
|
|
2170
|
+
'operating-live-evidence-ingestion',
|
|
2171
|
+
'operating-measurement-plan',
|
|
2172
|
+
'operating-measurement-schedule',
|
|
2173
|
+
'operating-measurement-schedule-receipt',
|
|
2174
|
+
'operating-evidence-observation',
|
|
2175
|
+
'operating-outcome-evaluation',
|
|
2176
|
+
'operating-learning-receipt',
|
|
2177
|
+
];
|
|
2178
|
+
export const LANDING_CONTRACT_KINDS_V1: readonly [
|
|
2179
|
+
'landing-plan',
|
|
2180
|
+
'landing-confirmation',
|
|
2181
|
+
'landing-event',
|
|
2182
|
+
'landing-phase-receipt',
|
|
2183
|
+
'landing-receipt',
|
|
2184
|
+
'landing-operation-registry',
|
|
2185
|
+
];
|
|
2186
|
+
export const RELEASE_LEDGER_CONTRACT_KINDS_V1: readonly [
|
|
2187
|
+
'release-ledger',
|
|
2188
|
+
'release-compatibility-claim',
|
|
2189
|
+
'release-ledger-receipt',
|
|
2190
|
+
'ecosystem-manifest',
|
|
2191
|
+
];
|
|
2192
|
+
export const OPERATE_ROLE_MANDATES_V2: readonly OperateRoleMandateV2[];
|
|
2193
|
+
export const OPERATE_EXTENSION_CONTRACT_KINDS_V2: readonly [
|
|
2194
|
+
'agent-runtime-manifest',
|
|
2195
|
+
'operate-capability-provider-registration',
|
|
2196
|
+
'operate-domain-registration',
|
|
2197
|
+
'operate-evidence-provider-registration',
|
|
2198
|
+
'operate-evidence-resolver-registration',
|
|
2199
|
+
'operate-executor-registration',
|
|
2200
|
+
'operate-metric-provider-registration',
|
|
2201
|
+
'operate-policy-provider-registration',
|
|
2202
|
+
'operate-snapshot-provider-registration',
|
|
2203
|
+
'operate-verification-provider-registration',
|
|
2204
|
+
];
|
|
2205
|
+
export const OPERATE_EVIDENCE_CONTRACT_KINDS_V2: readonly [
|
|
2206
|
+
'operate-evidence-provider-registration',
|
|
2207
|
+
'operate-evidence-resolver-registration',
|
|
2208
|
+
'operating-evidence-candidate',
|
|
2209
|
+
'operating-evidence-edge',
|
|
2210
|
+
'operating-evidence-graph',
|
|
2211
|
+
'operating-evidence-ref',
|
|
2212
|
+
'operating-evidence-resolution',
|
|
2213
|
+
];
|
|
2214
|
+
export const OPERATE_EVIDENCE_KINDS_V2: readonly ['filesystem', 'git', 'operate-artifact', 'planr'];
|
|
2215
|
+
export const OPERATE_EVIDENCE_EDGE_RELATIONS_V2: readonly ['contradictedBy', 'supportedBy'];
|
|
2216
|
+
export const OPERATE_EVIDENCE_RESOLVER_ERROR_CODES_V2: readonly OperateEvidenceResolverErrorCodeV2[];
|
|
2217
|
+
export const OPERATE_OPERATING_INTELLIGENCE_CONTRACT_KINDS_V2: readonly [
|
|
2218
|
+
'business-operating-snapshot-projection',
|
|
2219
|
+
'operating-action-verification-plan',
|
|
2220
|
+
'operating-advisor-result',
|
|
2221
|
+
'operating-assumption',
|
|
2222
|
+
'operating-challenger-review',
|
|
2223
|
+
'operating-claim',
|
|
2224
|
+
'operating-decision-ledger',
|
|
2225
|
+
'operating-delta',
|
|
2226
|
+
'operating-domain-projection',
|
|
2227
|
+
'operating-event-trigger',
|
|
2228
|
+
'operating-intelligence-input-bundle',
|
|
2229
|
+
'operating-intelligence-plan',
|
|
2230
|
+
'operating-learning',
|
|
2231
|
+
'operating-metric',
|
|
2232
|
+
'operating-metric-observation',
|
|
2233
|
+
'operating-model-state',
|
|
2234
|
+
'operating-objective',
|
|
2235
|
+
'operating-outcome',
|
|
2236
|
+
'operating-risk',
|
|
2237
|
+
'operating-scenario',
|
|
2238
|
+
'operating-snapshot',
|
|
2239
|
+
'operate-metric-provider-registration',
|
|
2240
|
+
'operate-snapshot-provider-registration',
|
|
2241
|
+
'operate-verification-provider-registration',
|
|
2242
|
+
'software-operating-snapshot-projection',
|
|
2243
|
+
];
|
|
2244
|
+
export const OPERATE_OPERATING_PROJECTION_IDENTITIES_V2: readonly [
|
|
2245
|
+
'business-operating-snapshot-projection@1.0.0',
|
|
2246
|
+
'software-operating-snapshot-projection@1.0.0',
|
|
2247
|
+
];
|
|
2248
|
+
export const OPERATE_OPERATING_PROVIDER_REGISTRATION_CONTRACT_KINDS_V2: readonly [
|
|
2249
|
+
'operate-metric-provider-registration',
|
|
2250
|
+
'operate-snapshot-provider-registration',
|
|
2251
|
+
'operate-verification-provider-registration',
|
|
2252
|
+
];
|
|
2253
|
+
export const OPERATE_GOVERNED_EXECUTION_CONTRACT_KINDS_V2: readonly [
|
|
2254
|
+
'operate-capability-provider-registration',
|
|
2255
|
+
'operate-executor-registration',
|
|
2256
|
+
'operate-policy-provider-registration',
|
|
2257
|
+
'operating-action-policy',
|
|
2258
|
+
'operating-approval-record',
|
|
2259
|
+
'operating-approval-requirement',
|
|
2260
|
+
'operating-capability-availability',
|
|
2261
|
+
'operating-capability-grant',
|
|
2262
|
+
'operating-execution-result',
|
|
2263
|
+
'operating-governed-operation',
|
|
2264
|
+
'operating-policy-evaluation',
|
|
2265
|
+
'operating-rollback-plan',
|
|
2266
|
+
'operating-rollback-result',
|
|
2267
|
+
];
|
|
2268
|
+
export const OPERATE_GOVERNED_PROVIDER_REGISTRATION_CONTRACT_KINDS_V2: readonly ['operate-capability-provider-registration', 'operate-executor-registration', 'operate-policy-provider-registration'];
|
|
2269
|
+
export const OPERATE_GOVERNED_EFFECT_CLASSES_V2: readonly OperateGovernedEffectClassV2[];
|
|
2270
|
+
export const OPERATE_GOVERNED_POLICY_OUTCOMES_V2: readonly OperateGovernedPolicyOutcomeV2[];
|
|
2271
|
+
export const OPERATE_GOVERNED_POLICY_TIERS_V2: readonly [
|
|
2272
|
+
Readonly<{ id: 'core'; precedence: 300; narrowingOnly: false }>,
|
|
2273
|
+
Readonly<{ id: 'project'; precedence: 200; narrowingOnly: true }>,
|
|
2274
|
+
Readonly<{ id: 'domain'; precedence: 100; narrowingOnly: true }>,
|
|
2275
|
+
];
|
|
2276
|
+
export const OPERATE_GOVERNED_CORE_PROHIBITIONS_V2: readonly [
|
|
2277
|
+
'credential-change', 'customer-contact', 'destructive', 'funds-transfer', 'payment-transfer',
|
|
2278
|
+
'production-deploy', 'production-merge', 'publication', 'secret-mutation',
|
|
2279
|
+
];
|
|
2280
|
+
export const OPERATE_GOVERNED_RECOVERY_CLASSIFICATIONS_V2: readonly [
|
|
2281
|
+
'applied', 'not-applied', 'partial', 'unknown',
|
|
2282
|
+
];
|
|
2283
|
+
export const OPERATE_EXPERIENCE_CONTRACT_KINDS_V2: readonly [
|
|
2284
|
+
'operate-experience-live-patch', 'operate-experience-preview', 'operate-experience-view', 'operate-review-display-workspace',
|
|
2285
|
+
'operating-delivery-evidence', 'operating-delivery-route', 'operating-origin', 'operating-planning-proposal',
|
|
2286
|
+
];
|
|
2287
|
+
export const OPERATING_DELIVERY_ROUTES_V1: readonly [
|
|
2288
|
+
'contained-execution', 'human-external', 'observe-only', 'planning-work',
|
|
2289
|
+
];
|
|
2290
|
+
export function findOperateCoreProhibitionV2(
|
|
2291
|
+
values: string | readonly string[],
|
|
2292
|
+
): typeof OPERATE_GOVERNED_CORE_PROHIBITIONS_V2[number] | null;
|
|
2293
|
+
export const OPERATE_GOVERNED_OPERATION_STATES_V2: readonly OperateGovernedOperationStateV2[];
|
|
2294
|
+
export const OPERATE_GOVERNED_OPERATION_TERMINAL_STATES_V2: readonly [
|
|
2295
|
+
'blocked', 'failed', 'partial', 'succeeded', 'uncertain',
|
|
2296
|
+
];
|
|
2297
|
+
export const OPERATE_EXECUTION_VERIFICATION_STATUSES_V2: readonly OperatingExecutionVerificationStatusV2[];
|
|
2298
|
+
export const OPERATE_HYPOTHESIS_VERIFICATION_STATUSES_V2: readonly OperatingHypothesisVerificationStatusV2[];
|
|
2299
|
+
export const OPERATE_GOVERNED_TOOL_OPERATIONS_V2: readonly [
|
|
2300
|
+
Readonly<{ id: 'operate.action.approve'; effect: 'project-write'; argumentProfile: 'action-approve'; docsSection: 'action-approve' }>,
|
|
2301
|
+
Readonly<{ id: 'operate.action.execute'; effect: 'project-write'; argumentProfile: 'action-execute'; docsSection: 'action-execute' }>,
|
|
2302
|
+
Readonly<{ id: 'operate.action.rollback'; effect: 'project-write'; argumentProfile: 'action-rollback'; docsSection: 'action-rollback' }>,
|
|
2303
|
+
];
|
|
2304
|
+
export const OPERATE_AUTHORITY_GUARD_IDS_V2: readonly [
|
|
2305
|
+
'action-approval-authorized',
|
|
2306
|
+
'action-execution-authorized',
|
|
2307
|
+
'action-rollback-authorized',
|
|
2308
|
+
'review-submit-authorized',
|
|
2309
|
+
];
|
|
2310
|
+
export const OPERATE_PUBLIC_DOMAIN_CONTRACT_BINDINGS_V2: Readonly<Record<'business' | 'software', PublicOperateDomainContractBindingV2>>;
|
|
2311
|
+
export const PROTOCOL_SCHEMA_REGISTRY: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
2312
|
+
|
|
2313
|
+
export function loadProtocolContract(
|
|
2314
|
+
kind: string,
|
|
2315
|
+
options: { protocolVersion: string },
|
|
2316
|
+
): ProtocolSchemaContract;
|
|
2317
|
+
export function loadOperateRuntimeContract(
|
|
2318
|
+
kind: typeof OPERATE_RUNTIME_CONTRACT_KINDS[number],
|
|
2319
|
+
options: { protocolVersion: '2.0.0' },
|
|
2320
|
+
): ProtocolSchemaContract;
|
|
2321
|
+
export function loadOperateLiveEvidenceContract(
|
|
2322
|
+
kind: typeof OPERATE_LIVE_EVIDENCE_CONTRACT_KINDS_V2[number],
|
|
2323
|
+
options: { protocolVersion: '2.0.0' },
|
|
2324
|
+
): ProtocolSchemaContract;
|
|
2325
|
+
export function loadLandingContract(
|
|
2326
|
+
kind: typeof LANDING_CONTRACT_KINDS_V1[number],
|
|
2327
|
+
options: { protocolVersion: '1.2.0' },
|
|
2328
|
+
): ProtocolSchemaContract;
|
|
2329
|
+
export function loadReleaseLedgerContract(
|
|
2330
|
+
kind: typeof RELEASE_LEDGER_CONTRACT_KINDS_V1[number],
|
|
2331
|
+
options: { protocolVersion: '1.3.0' },
|
|
2332
|
+
): ProtocolSchemaContract;
|
|
2333
|
+
export function loadOperateExtensionContract(
|
|
2334
|
+
kind: typeof OPERATE_EXTENSION_CONTRACT_KINDS_V2[number],
|
|
2335
|
+
options: { protocolVersion: '2.0.0' },
|
|
2336
|
+
): ProtocolSchemaContract;
|
|
2337
|
+
export function loadOperateEvidenceContract(
|
|
2338
|
+
kind: typeof OPERATE_EVIDENCE_CONTRACT_KINDS_V2[number],
|
|
2339
|
+
options: { protocolVersion: '2.0.0' },
|
|
2340
|
+
): ProtocolSchemaContract;
|
|
2341
|
+
export function loadOperateOperatingIntelligenceContract(
|
|
2342
|
+
kind: typeof OPERATE_OPERATING_INTELLIGENCE_CONTRACT_KINDS_V2[number],
|
|
2343
|
+
options: { protocolVersion: '2.0.0' },
|
|
2344
|
+
): ProtocolSchemaContract;
|
|
2345
|
+
export function loadOperateGovernedExecutionContract(
|
|
2346
|
+
kind: typeof OPERATE_GOVERNED_EXECUTION_CONTRACT_KINDS_V2[number],
|
|
2347
|
+
options: { protocolVersion: '2.0.0' },
|
|
2348
|
+
): ProtocolSchemaContract;
|
|
2349
|
+
export function readOperatingGovernedOperationV2(
|
|
2350
|
+
value: unknown,
|
|
2351
|
+
options: { protocolVersion: '2.0.0' },
|
|
2352
|
+
): OperatingGovernedOperationV2;
|
|
2353
|
+
export function readOperatingExecutionResultV2(
|
|
2354
|
+
value: unknown,
|
|
2355
|
+
options: { protocolVersion: '2.0.0' },
|
|
2356
|
+
): OperatingExecutionResultV2;
|
|
2357
|
+
export function readOperatingRollbackPlanV2(
|
|
2358
|
+
value: unknown,
|
|
2359
|
+
options: { protocolVersion: '2.0.0' },
|
|
2360
|
+
): OperatingRollbackPlanV2;
|
|
2361
|
+
export function readOperatingRollbackResultV2(
|
|
2362
|
+
value: unknown,
|
|
2363
|
+
options: { protocolVersion: '2.0.0' },
|
|
2364
|
+
): OperatingRollbackResultV2;
|
|
2365
|
+
export function loadOperateGovernedExtensionContract(
|
|
2366
|
+
kind: typeof OPERATE_GOVERNED_PROVIDER_REGISTRATION_CONTRACT_KINDS_V2[number],
|
|
2367
|
+
options: { protocolVersion: '2.0.0' },
|
|
2368
|
+
): ProtocolSchemaContract;
|
|
2369
|
+
export function loadOperateExperienceContract(
|
|
2370
|
+
kind: typeof OPERATE_EXPERIENCE_CONTRACT_KINDS_V2[number],
|
|
2371
|
+
options: { protocolVersion: '2.0.0' },
|
|
2372
|
+
): ProtocolSchemaContract;
|
|
2373
|
+
export function readOperateExperienceViewV1(value: unknown, options: { protocolVersion: '2.0.0' }): OperateExperienceViewV1;
|
|
2374
|
+
export function readOperatingPlanningProposalV1(value: unknown, options: { protocolVersion: '2.0.0' }): OperatingPlanningProposalV1;
|
|
2375
|
+
export function readOperatingOriginV1(value: unknown, options: { protocolVersion: '2.0.0' }): OperatingOriginV1;
|
|
2376
|
+
export function readOperatingDeliveryEvidenceV1(value: unknown, options: { protocolVersion: '2.0.0' }): OperatingDeliveryEvidenceV1;
|
|
2377
|
+
export function loadOperateRoleMandate(
|
|
2378
|
+
roleId: OperatePhase1AssignmentKindV2,
|
|
2379
|
+
options: { roleVersion: '2.0.0' },
|
|
2380
|
+
): OperateRoleMandateV2;
|
|
2381
|
+
export function assertOperateRoleOutputContract(
|
|
2382
|
+
roleId: OperatePhase1AssignmentKindV2,
|
|
2383
|
+
outputContract: OperateRoleOutputContractV2,
|
|
2384
|
+
options: { roleVersion: '2.0.0' },
|
|
2385
|
+
): OperateRoleOutputContractV2 & { path: string };
|
|
2386
|
+
|
|
2387
|
+
export function readOperatingRuntimeStateV2(
|
|
2388
|
+
value: OperatingRuntimeStateV2,
|
|
2389
|
+
options: { protocolVersion: '2.0.0' },
|
|
2390
|
+
): OperatingRuntimeStateV2;
|
|
2391
|
+
export function assertOperateRuntimeBindingsV2(input: {
|
|
2392
|
+
cycle: OperatingCycleV2;
|
|
2393
|
+
inputBinding: OperatingCycleInputBindingV2;
|
|
2394
|
+
assignment: OperatingAssignmentV2;
|
|
2395
|
+
submission: OperatingSubmissionV2;
|
|
2396
|
+
runtimeBinding: OperatingCycleInputBindingV2['runtimeBinding'];
|
|
2397
|
+
runtimeState: OperatingRuntimeStateV2;
|
|
2398
|
+
checkpoint: OperatingCheckpointV2;
|
|
2399
|
+
}): {
|
|
2400
|
+
cycle: OperatingCycleV2;
|
|
2401
|
+
inputBinding: OperatingCycleInputBindingV2;
|
|
2402
|
+
assignment: OperatingAssignmentV2;
|
|
2403
|
+
submission: OperatingSubmissionV2;
|
|
2404
|
+
runtimeBinding: OperatingCycleInputBindingV2['runtimeBinding'];
|
|
2405
|
+
runtimeState: OperatingRuntimeStateV2;
|
|
2406
|
+
checkpoint: OperatingCheckpointV2;
|
|
2407
|
+
};
|
|
2408
|
+
|
|
2409
|
+
export function listProtocolSchemas(): Array<{ kind: string; protocolVersion: string; path: string }>;
|
|
2410
|
+
export function resolveProtocolSchema(
|
|
2411
|
+
kind: string,
|
|
2412
|
+
options: { protocolVersion: string },
|
|
2413
|
+
): ProtocolSchemaContract;
|
|
2414
|
+
export function resolveOperateExperienceSchemaV2(
|
|
2415
|
+
kind: typeof OPERATE_EXPERIENCE_CONTRACT_KINDS_V2[number],
|
|
2416
|
+
options: { protocolVersion: '2.0.0' },
|
|
2417
|
+
): ProtocolSchemaContract;
|
|
2418
|
+
export function assertOperateExperienceArtifactV2<T>(kind: typeof OPERATE_EXPERIENCE_CONTRACT_KINDS_V2[number], value: T): T;
|
|
2419
|
+
export function validateOperateExperienceArtifactV2(
|
|
2420
|
+
kind: typeof OPERATE_EXPERIENCE_CONTRACT_KINDS_V2[number], value: unknown,
|
|
2421
|
+
): ProtocolValidationError[];
|
|
2422
|
+
export function validateProtocolArtifact(
|
|
2423
|
+
kind: string,
|
|
2424
|
+
value: unknown,
|
|
2425
|
+
options?: { protocolVersion?: string },
|
|
2426
|
+
): ProtocolValidationError[];
|
|
2427
|
+
export function validateDashboardBootstrapV1(value: unknown): ProtocolValidationError[];
|
|
2428
|
+
export function assertDashboardBootstrapV1(value: DashboardBootstrapV1): DashboardBootstrapV1;
|
|
2429
|
+
export function assertProtocolArtifact<T>(
|
|
2430
|
+
kind: string,
|
|
2431
|
+
value: T,
|
|
2432
|
+
options?: { protocolVersion?: string },
|
|
2433
|
+
): T;
|
|
2434
|
+
export function assertOperateGovernedExtensionRegistrationV2<T>(
|
|
2435
|
+
kind: typeof OPERATE_GOVERNED_PROVIDER_REGISTRATION_CONTRACT_KINDS_V2[number],
|
|
2436
|
+
value: T,
|
|
2437
|
+
): T;
|
|
2438
|
+
export function canonicalizeJson(value: JsonValue): string;
|
|
2439
|
+
export function sha256Jcs(value: JsonValue): string;
|
|
2440
|
+
|
|
2441
|
+
/**
|
|
2442
|
+
* Operating trace-matrix types.
|
|
2443
|
+
*
|
|
2444
|
+
* They live here rather than beside the builder because the dashboard's review workspace
|
|
2445
|
+
* declaration needs them, and reaching into the Operate runtime for a type put the
|
|
2446
|
+
* dashboard on that runtime. The builder imports them back.
|
|
2447
|
+
*/
|
|
2448
|
+
|
|
2449
|
+
export type OperatingTraceNodeKindV2 =
|
|
2450
|
+
| 'requirement' | 'absence' | 'seat' | 'assignment' | 'artifact' | 'claim'
|
|
2451
|
+
| 'evidence-ref' | 'finding' | 'decision' | 'action' | 'disposition'
|
|
2452
|
+
| 'verification' | 'outcome';
|
|
2453
|
+
|
|
2454
|
+
export type OperatingTraceProofStateV2 =
|
|
2455
|
+
| 'not-applicable' | 'pending' | 'terminal' | 'accepted' | 'rejected' | 'failed'
|
|
2456
|
+
| 'abandoned' | 'verified' | 'stale' | 'supported' | 'contradicted' | 'contested'
|
|
2457
|
+
| 'unverified' | 'absent' | 'restricted' | 'proposed' | 'governed' | 'completed'
|
|
2458
|
+
| 'insufficient';
|
|
2459
|
+
|
|
2460
|
+
export type OperatingTraceRelationV2 =
|
|
2461
|
+
| 'declares' | 'assigned-to' | 'issued-as' | 'records' | 'produces' | 'contains'
|
|
2462
|
+
| 'supported-by' | 'contradicted-by' | 'informs' | 'challenges' | 'decides'
|
|
2463
|
+
| 'proposes' | 'disposes' | 'governed-by' | 'verified-by' | 'observed-as';
|
|
2464
|
+
|
|
2465
|
+
export interface OperatingTraceLocatorV2<TKind extends OperatingTraceNodeKindV2 = OperatingTraceNodeKindV2> {
|
|
2466
|
+
readonly kind: TKind;
|
|
2467
|
+
readonly id: string;
|
|
2468
|
+
readonly contract: Readonly<{ id: string; version: '2.0.0' }>;
|
|
2469
|
+
readonly scopeId: string;
|
|
2470
|
+
readonly domainId: string;
|
|
2471
|
+
readonly domainVersion: string;
|
|
2472
|
+
readonly cycleId: string;
|
|
2473
|
+
}
|
|
2474
|
+
|
|
2475
|
+
interface OperatingTraceNodeBaseV2<
|
|
2476
|
+
TKind extends OperatingTraceNodeKindV2,
|
|
2477
|
+
TProof extends OperatingTraceProofStateV2,
|
|
2478
|
+
> {
|
|
2479
|
+
readonly locator: OperatingTraceLocatorV2<TKind>;
|
|
2480
|
+
readonly accessState: 'available' | 'restricted' | 'absent';
|
|
2481
|
+
readonly proofState: TProof;
|
|
2482
|
+
readonly inboundEdgeIds: readonly string[];
|
|
2483
|
+
readonly outboundEdgeIds: readonly string[];
|
|
2484
|
+
}
|
|
2485
|
+
|
|
2486
|
+
export type OperatingTraceNodeV2 =
|
|
2487
|
+
| OperatingTraceNodeBaseV2<'requirement', 'pending'>
|
|
2488
|
+
| OperatingTraceNodeBaseV2<'absence', 'absent'>
|
|
2489
|
+
| OperatingTraceNodeBaseV2<'seat', 'not-applicable' | 'absent'>
|
|
2490
|
+
| OperatingTraceNodeBaseV2<'assignment', 'pending' | 'terminal' | 'rejected' | 'failed' | 'abandoned'>
|
|
2491
|
+
| OperatingTraceNodeBaseV2<'artifact', 'accepted' | 'restricted'>
|
|
2492
|
+
| OperatingTraceNodeBaseV2<'claim', 'supported' | 'contradicted' | 'contested' | 'unverified' | 'restricted'>
|
|
2493
|
+
| OperatingTraceNodeBaseV2<'evidence-ref', 'verified' | 'stale' | 'unverified' | 'restricted'>
|
|
2494
|
+
| OperatingTraceNodeBaseV2<'finding', 'proposed' | 'restricted'>
|
|
2495
|
+
| OperatingTraceNodeBaseV2<'decision', 'proposed' | 'governed' | 'restricted'>
|
|
2496
|
+
| OperatingTraceNodeBaseV2<'action', 'proposed' | 'governed' | 'completed' | 'insufficient'>
|
|
2497
|
+
| OperatingTraceNodeBaseV2<'disposition', 'governed'>
|
|
2498
|
+
| OperatingTraceNodeBaseV2<'verification', 'governed'>
|
|
2499
|
+
| OperatingTraceNodeBaseV2<'outcome', 'verified' | 'insufficient'>;
|
|
2500
|
+
|
|
2501
|
+
export interface OperatingTraceEndpointV2<TKind extends OperatingTraceNodeKindV2 = OperatingTraceNodeKindV2> {
|
|
2502
|
+
readonly kind: TKind;
|
|
2503
|
+
readonly id: string;
|
|
2504
|
+
}
|
|
2505
|
+
|
|
2506
|
+
interface OperatingTraceEdgeBaseV2<
|
|
2507
|
+
TRelation extends OperatingTraceRelationV2,
|
|
2508
|
+
TFrom extends OperatingTraceNodeKindV2,
|
|
2509
|
+
TTo extends OperatingTraceNodeKindV2,
|
|
2510
|
+
> {
|
|
2511
|
+
readonly edgeId: string;
|
|
2512
|
+
readonly relation: TRelation;
|
|
2513
|
+
readonly from: OperatingTraceEndpointV2<TFrom>;
|
|
2514
|
+
readonly to: OperatingTraceEndpointV2<TTo>;
|
|
2515
|
+
}
|
|
2516
|
+
|
|
2517
|
+
export type OperatingTraceEdgeV2 =
|
|
2518
|
+
| OperatingTraceEdgeBaseV2<'declares', 'absence', 'requirement'>
|
|
2519
|
+
| OperatingTraceEdgeBaseV2<'assigned-to', 'requirement', 'seat'>
|
|
2520
|
+
| OperatingTraceEdgeBaseV2<'issued-as', 'seat', 'assignment'>
|
|
2521
|
+
| OperatingTraceEdgeBaseV2<'records', 'absence', 'seat' | 'assignment'>
|
|
2522
|
+
| OperatingTraceEdgeBaseV2<'produces', 'assignment', 'artifact'>
|
|
2523
|
+
| OperatingTraceEdgeBaseV2<'contains', 'artifact', 'claim'>
|
|
2524
|
+
| OperatingTraceEdgeBaseV2<'supported-by', 'claim', 'evidence-ref'>
|
|
2525
|
+
| OperatingTraceEdgeBaseV2<'contradicted-by', 'claim', 'evidence-ref'>
|
|
2526
|
+
| OperatingTraceEdgeBaseV2<'informs', 'claim' | 'evidence-ref', 'finding' | 'decision'>
|
|
2527
|
+
| OperatingTraceEdgeBaseV2<'challenges', 'finding', 'decision'>
|
|
2528
|
+
| OperatingTraceEdgeBaseV2<'decides', 'artifact', 'decision'>
|
|
2529
|
+
| OperatingTraceEdgeBaseV2<'proposes', 'decision', 'action'>
|
|
2530
|
+
| OperatingTraceEdgeBaseV2<'disposes', 'artifact' | 'finding' | 'decision', 'disposition'>
|
|
2531
|
+
| OperatingTraceEdgeBaseV2<'governed-by', 'action', 'verification'>
|
|
2532
|
+
| OperatingTraceEdgeBaseV2<'verified-by', 'action', 'outcome'>
|
|
2533
|
+
| OperatingTraceEdgeBaseV2<'observed-as', 'verification', 'outcome'>;
|
|
2534
|
+
|
|
2535
|
+
export type OperatingTraceOmissionV2 =
|
|
2536
|
+
| Readonly<{
|
|
2537
|
+
omissionId: string;
|
|
2538
|
+
kind: 'restricted';
|
|
2539
|
+
subject: OperatingTraceNodeKindV2;
|
|
2540
|
+
subjectId: string;
|
|
2541
|
+
reasonCode: 'OPERATE_TRACE_ACCESS_RESTRICTED';
|
|
2542
|
+
incidentEdgeCount: number;
|
|
2543
|
+
}>
|
|
2544
|
+
| Readonly<{
|
|
2545
|
+
omissionId: string;
|
|
2546
|
+
kind: 'absent';
|
|
2547
|
+
subject: 'absence';
|
|
2548
|
+
subjectId: string;
|
|
2549
|
+
reasonCode: 'OPERATE_TRACE_TYPED_ABSENCE' | 'OPERATE_TRACE_ROLE_NOT_SELECTED';
|
|
2550
|
+
incidentEdgeCount: number;
|
|
2551
|
+
}>;
|
|
2552
|
+
|
|
2553
|
+
export interface OperatingTraceProofV2 {
|
|
2554
|
+
readonly terminalAssignments: number;
|
|
2555
|
+
readonly acceptedArtifacts: number;
|
|
2556
|
+
readonly verifiedEvidence: number;
|
|
2557
|
+
readonly staleEvidence: number;
|
|
2558
|
+
readonly supportedClaims: number;
|
|
2559
|
+
readonly contradictedClaims: number;
|
|
2560
|
+
readonly unverifiedClaims: number;
|
|
2561
|
+
readonly restrictedNodes: number;
|
|
2562
|
+
readonly typedAbsences: number;
|
|
2563
|
+
readonly verifiedActions: number;
|
|
2564
|
+
}
|
|
2565
|
+
|
|
2566
|
+
export interface OperatingTraceMatrixV2 {
|
|
2567
|
+
readonly kind: 'operating-trace-matrix';
|
|
2568
|
+
readonly schemaVersion: '1.0.0';
|
|
2569
|
+
readonly protocolVersion: '2.0.0';
|
|
2570
|
+
readonly matrixId: string;
|
|
2571
|
+
readonly scopeId: string;
|
|
2572
|
+
readonly domainId: string;
|
|
2573
|
+
readonly domainVersion: string;
|
|
2574
|
+
readonly cycleId: string;
|
|
2575
|
+
readonly eventHead: OperatingEventHeadV2;
|
|
2576
|
+
readonly limits: Readonly<{ maxNodes: 8192; maxEdges: 32768; truncated: false }>;
|
|
2577
|
+
readonly nodes: readonly OperatingTraceNodeV2[];
|
|
2578
|
+
readonly edges: readonly OperatingTraceEdgeV2[];
|
|
2579
|
+
readonly omissions: readonly OperatingTraceOmissionV2[];
|
|
2580
|
+
readonly proof: Readonly<OperatingTraceProofV2>;
|
|
2581
|
+
readonly matrixHash: string;
|
|
2582
|
+
}
|
|
2583
|
+
|
|
2584
|
+
/**
|
|
2585
|
+
* Operating executive-board types.
|
|
2586
|
+
*
|
|
2587
|
+
* The protocol's own event map and runtime state name the materialized board, so the types
|
|
2588
|
+
* live here rather than beside the builder. The builder imports them back.
|
|
2589
|
+
*/
|
|
2590
|
+
|
|
2591
|
+
export interface OperatingExecutiveBoardSeatBindingV2 {
|
|
2592
|
+
readonly roleId: string;
|
|
2593
|
+
readonly roleKind: 'advisor' | 'challenger' | 'chair';
|
|
2594
|
+
readonly roleVersion: string;
|
|
2595
|
+
readonly assignmentId: string | null;
|
|
2596
|
+
readonly artifactId: string | null;
|
|
2597
|
+
readonly absenceId: string | null;
|
|
2598
|
+
}
|
|
2599
|
+
|
|
2600
|
+
interface OperatingExecutiveBoardBaseV2 {
|
|
2601
|
+
readonly kind: 'operating-executive-board';
|
|
2602
|
+
readonly schemaVersion: '1.0.0';
|
|
2603
|
+
readonly protocolVersion: '2.0.0';
|
|
2604
|
+
readonly boardId: string;
|
|
2605
|
+
readonly scopeId: string;
|
|
2606
|
+
readonly domainId: 'business';
|
|
2607
|
+
readonly domainVersion: string;
|
|
2608
|
+
readonly cycleId: string;
|
|
2609
|
+
readonly planId: string;
|
|
2610
|
+
readonly ledgerId: string;
|
|
2611
|
+
readonly reviewId: string;
|
|
2612
|
+
readonly reviewHash: string;
|
|
2613
|
+
readonly sourceEventHead: OperatingEventHeadV2;
|
|
2614
|
+
readonly seatBindings: readonly Readonly<OperatingExecutiveBoardSeatBindingV2>[];
|
|
2615
|
+
readonly findingIds: readonly string[];
|
|
2616
|
+
readonly decisionIds: readonly string[];
|
|
2617
|
+
readonly actionIds: readonly string[];
|
|
2618
|
+
readonly traceMatrix: OperatingTraceMatrixV2;
|
|
2619
|
+
readonly createdAt: string;
|
|
2620
|
+
readonly semanticHash: string;
|
|
2621
|
+
readonly boardHash: string;
|
|
2622
|
+
}
|
|
2623
|
+
|
|
2624
|
+
export interface OperatingExecutiveBoardMaterializedV2 extends OperatingExecutiveBoardBaseV2 {
|
|
2625
|
+
readonly projectionMode: 'materialized';
|
|
2626
|
+
readonly authoritativeForMutation: true;
|
|
2627
|
+
readonly materializedEventId: string;
|
|
2628
|
+
}
|
|
2629
|
+
|
|
2630
|
+
export interface OperatingExecutiveBoardCompatibilityV2 extends OperatingExecutiveBoardBaseV2 {
|
|
2631
|
+
readonly projectionMode: 'compatibility';
|
|
2632
|
+
readonly authoritativeForMutation: false;
|
|
2633
|
+
readonly materializedEventId: null;
|
|
2634
|
+
}
|
|
2635
|
+
|
|
2636
|
+
export type OperatingExecutiveBoardV2 =
|
|
2637
|
+
| OperatingExecutiveBoardMaterializedV2
|
|
2638
|
+
| OperatingExecutiveBoardCompatibilityV2;
|