@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,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Operate experience live patch, with no Operate runtime dependency.
|
|
3
|
+
*
|
|
4
|
+
* The dashboard server needs this one builder. Importing it from the projection module put the
|
|
5
|
+
* package root on the Operate runtime, so it lives here instead. The private helpers are copied
|
|
6
|
+
* rather than shared: the projection module has 111 `fail` and 46 `clone` call sites, and these
|
|
7
|
+
* duplicates are meant to die with it.
|
|
8
|
+
*/
|
|
9
|
+
import { PipelineError } from '../errors.mjs';
|
|
10
|
+
import { assertOperateExperienceArtifactV2 } from '../contracts.mjs';
|
|
11
|
+
import { sha256Jcs } from '../canonical-json.mjs';
|
|
12
|
+
|
|
13
|
+
const PROTOCOL_VERSION = '2.0.0';
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
function fail(code, message, context = {}) {
|
|
18
|
+
throw new PipelineError(code, message, '', { retryable: false, context });
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
function clone(value) {
|
|
22
|
+
return structuredClone(value);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function freeze(value) {
|
|
26
|
+
if (value && typeof value === 'object' && !Object.isFrozen(value)) {
|
|
27
|
+
for (const nested of Object.values(value)) freeze(nested);
|
|
28
|
+
Object.freeze(value);
|
|
29
|
+
}
|
|
30
|
+
return value;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
function without(value, field) {
|
|
34
|
+
return Object.fromEntries(Object.entries(value).filter(([key]) => key !== field));
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
function stableId(prefix, value) {
|
|
38
|
+
return `${prefix}_${sha256Jcs(value).slice('sha256:'.length, 'sha256:'.length + 32)}`;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function assertCanonicalView(view) {
|
|
42
|
+
assertOperateExperienceArtifactV2('operate-experience-view', view);
|
|
43
|
+
if (view.viewHash !== sha256Jcs(without(view, 'viewHash'))) fail('E_OPERATE_BINDING_MISMATCH', 'Experience viewHash does not equal its canonical content.');
|
|
44
|
+
return view;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function validInstant(value, field) {
|
|
48
|
+
if (typeof value !== 'string' || Number.isNaN(Date.parse(value))) fail('RESULT_CONTRACT_INVALID', `${field} must be an RFC 3339 instant.`);
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export function buildOperateExperienceLivePatchV2(previous, next, { createdAt = next?.generatedAt } = {}) {
|
|
53
|
+
assertCanonicalView(previous); assertCanonicalView(next);
|
|
54
|
+
for (const field of ['scopeId', 'domainId', 'domainVersion', 'actorId', 'accessLevel']) if (previous[field] !== next[field]) fail('E_OPERATE_BINDING_MISMATCH', `Live patch binding changed at ${field}.`);
|
|
55
|
+
if (next.eventHead.sequence !== previous.eventHead.sequence + 1
|
|
56
|
+
|| (previous.eventHead.sequence > 0 && next.eventHead.hash === previous.eventHead.hash)) {
|
|
57
|
+
fail('STATE_TRANSITION_INVALID', 'Live patch requires one exact contiguous, non-forking Event-head advance.');
|
|
58
|
+
}
|
|
59
|
+
validInstant(createdAt, 'createdAt');
|
|
60
|
+
const paths = ['status', 'attention', 'domainMetrics', 'cycles', 'inbox', 'actions', 'evidence', 'claims', 'rationale', 'outcomes', 'learnings', 'history', 'replay', 'allowedActions', 'omissions', 'export'];
|
|
61
|
+
const operations = paths.filter((path) => sha256Jcs(previous[path]) !== sha256Jcs(next[path])).map((path) => ({ op: 'replace', path: `/${path}`, valueHash: sha256Jcs(next[path]), value: clone(next[path]) }));
|
|
62
|
+
const base = { kind: 'operate-experience-live-patch', schemaVersion: '1.0.0', protocolVersion: PROTOCOL_VERSION, patchId: stableId('xpatch', { from: previous.viewHash, to: next.viewHash }), scopeId: next.scopeId, domainId: next.domainId, domainVersion: next.domainVersion, actorId: next.actorId, fromEventHead: clone(previous.eventHead), toEventHead: clone(next.eventHead), fromViewHash: previous.viewHash, toViewHash: next.viewHash, operations, createdAt };
|
|
63
|
+
const patch = { ...base, patchHash: sha256Jcs(base) };
|
|
64
|
+
assertOperateExperienceArtifactV2('operate-experience-live-patch', patch);
|
|
65
|
+
return freeze(patch);
|
|
66
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Planning-bridge contracts with no Operate runtime dependency.
|
|
3
|
+
*
|
|
4
|
+
* These assertions are needed by the protocol loader and the pipeline's origin reader, neither of
|
|
5
|
+
* which should reach into the Operate runtime to get them. The Operate side imports them back.
|
|
6
|
+
*/
|
|
7
|
+
import { PipelineError } from '../errors.mjs';
|
|
8
|
+
import { assertOperateExperienceArtifactV2 } from '../contracts.mjs';
|
|
9
|
+
import { sha256Jcs } from '../canonical-json.mjs';
|
|
10
|
+
|
|
11
|
+
const PROTOCOL_VERSION = '2.0.0';
|
|
12
|
+
|
|
13
|
+
const FORBIDDEN_KEY = /(?:hidden|chain[-_]?of[-_]?thought|reasoning|raw[-_]?prompt|credential|secret|token|private[-_]?path|rejected[-_]?advice)/iu;
|
|
14
|
+
const FORBIDDEN_TEXT = /(?:\/Users\/|\/home\/|[A-Za-z]:\\|-----BEGIN [A-Z ]+PRIVATE KEY-----|\b(?:api[-_]?key|access[-_]?token|password)\b\s*[:=])/iu;
|
|
15
|
+
|
|
16
|
+
function fail(code, message, context = {}) {
|
|
17
|
+
throw new PipelineError(code, message, '', { retryable: false, context });
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function without(value, field) { return Object.fromEntries(Object.entries(value).filter(([key]) => key !== field)); }
|
|
21
|
+
|
|
22
|
+
function sameScope(value, scope) { return Boolean(scope) && value?.scopeId === scope.scopeId && value?.domainId === scope.domainId && value?.domainVersion === scope.domainVersion; }
|
|
23
|
+
function sameHead(left, right) { return left?.sequence === right?.sequence && left?.hash === right?.hash; }
|
|
24
|
+
|
|
25
|
+
function assertNoSensitiveContext(value, path = '$') {
|
|
26
|
+
if (typeof value === 'string' && FORBIDDEN_TEXT.test(value)) fail('EVIDENCE_ACCESS_DENIED', `Access-safe planning context contains prohibited private material at ${path}.`);
|
|
27
|
+
if (!value || typeof value !== 'object') return;
|
|
28
|
+
for (const [key, nested] of Object.entries(value)) {
|
|
29
|
+
if (FORBIDDEN_KEY.test(key)) fail('EVIDENCE_ACCESS_DENIED', `Access-safe planning context contains prohibited field ${path}.${key}.`);
|
|
30
|
+
assertNoSensitiveContext(nested, `${path}.${key}`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function assertOperatingPlanningProposalV1(proposal) {
|
|
35
|
+
assertOperateExperienceArtifactV2('operating-planning-proposal', proposal);
|
|
36
|
+
assertNoSensitiveContext(proposal);
|
|
37
|
+
if (proposal.proposalHash !== sha256Jcs(without(proposal, 'proposalHash'))) fail('E_OPERATE_BINDING_MISMATCH', 'Planning proposal hash does not equal its canonical content.');
|
|
38
|
+
const route = proposal.deliveryRoute;
|
|
39
|
+
if (!sameScope(route, proposal) || !sameHead(route.eventHead, proposal.eventHead)
|
|
40
|
+
|| route.action.actionId !== proposal.action.actionId || route.action.revision !== proposal.action.revision
|
|
41
|
+
|| route.action.actionHash !== proposal.action.actionHash || route.routeHash !== sha256Jcs(without(route, 'routeHash'))) {
|
|
42
|
+
fail('E_OPERATE_BINDING_MISMATCH', 'Planning proposal delivery route does not bind its exact scope, Action, and Event head.');
|
|
43
|
+
}
|
|
44
|
+
const chair = proposal.acceptedPerspectiveSummaries.filter(({ roleKind }) => roleKind === 'chair');
|
|
45
|
+
const challenger = proposal.acceptedPerspectiveSummaries.filter(({ roleKind }) => roleKind === 'challenger');
|
|
46
|
+
const advisors = proposal.acceptedPerspectiveSummaries.filter(({ roleKind }) => roleKind === 'advisor');
|
|
47
|
+
const normative = proposal.acceptedPerspectiveSummaries.filter(({ normative: isNormative }) => isNormative);
|
|
48
|
+
if (chair.length !== 1 || challenger.length !== 1 || advisors.length < 1 || normative.length !== 1 || normative[0] !== chair[0]
|
|
49
|
+
|| chair[0].stance !== 'synthesis' || chair[0].artifactId !== proposal.decision.sourceArtifactId
|
|
50
|
+
|| proposal.action.sourceArtifactId !== proposal.decision.sourceArtifactId || chair[0].summary !== proposal.decision.rationale
|
|
51
|
+
|| proposal.acceptedPerspectiveSummaries.some((perspective) => perspective.roleVersion !== PROTOCOL_VERSION)) {
|
|
52
|
+
fail('E_OPERATE_BINDING_MISMATCH', 'Planning proposal requires exact advisor/Challenger context and exactly one normative Chair synthesis equal to the Decision rationale.');
|
|
53
|
+
}
|
|
54
|
+
const decisionEvidenceIds = [...proposal.decision.evidenceRefIds].sort();
|
|
55
|
+
const projectedEvidenceIds = proposal.evidence.map(({ evidenceRefId }) => evidenceRefId).sort();
|
|
56
|
+
if (new Set(projectedEvidenceIds).size !== projectedEvidenceIds.length || sha256Jcs(decisionEvidenceIds) !== sha256Jcs(projectedEvidenceIds)
|
|
57
|
+
|| proposal.evidence.some((entry) => entry.accessState === 'restricted' ? entry.summary !== null : typeof entry.summary !== 'string')) {
|
|
58
|
+
fail('E_OPERATE_BINDING_MISMATCH', 'Planning proposal evidence does not equal the exact access-safe Decision evidence set.');
|
|
59
|
+
}
|
|
60
|
+
if (proposal.metric.metricId !== proposal.action.metricId || proposal.verification.metricId !== proposal.metric.metricId
|
|
61
|
+
|| proposal.verification.metricHash !== proposal.metric.metricHash || proposal.verification.verificationPlanId !== proposal.action.verificationPlanId) fail('E_OPERATE_BINDING_MISMATCH', 'Planning proposal metric and verification identities are not exact.');
|
|
62
|
+
if (proposal.preview.digest !== sha256Jcs({ proposalId: proposal.proposalId, correlationId: proposal.correlationId, eventHead: proposal.eventHead, framing: proposal.framing, actorId: proposal.actor.actorId })
|
|
63
|
+
|| proposal.preview.issuedAt !== proposal.createdAt || Date.parse(proposal.preview.expiresAt) <= Date.parse(proposal.preview.issuedAt)) {
|
|
64
|
+
fail('E_OPERATE_BINDING_MISMATCH', 'Planning proposal preview digest, actor, or expiry is not exact.');
|
|
65
|
+
}
|
|
66
|
+
if (proposal.state === 'approved') {
|
|
67
|
+
const reviewBase = { ...without(proposal, 'proposalHash'), revision: 1, predecessorProposalHash: null, state: 'review-required', confirmation: null };
|
|
68
|
+
const reviewHash = sha256Jcs(reviewBase);
|
|
69
|
+
const confirmation = proposal.confirmation;
|
|
70
|
+
if (proposal.revision !== 2 || proposal.predecessorProposalHash !== reviewHash || confirmation.reviewProposalHash !== reviewHash
|
|
71
|
+
|| confirmation.reviewProposalRevision !== 1 || !sameHead(confirmation.eventHead, proposal.eventHead)
|
|
72
|
+
|| confirmation.previewDigest !== proposal.preview.digest || confirmation.actorId !== proposal.actor.actorId
|
|
73
|
+
|| confirmation.previewExpiresAt !== proposal.preview.expiresAt || confirmation.confirmationHash !== sha256Jcs(without(confirmation, 'confirmationHash'))
|
|
74
|
+
|| Date.parse(confirmation.confirmedAt) < Date.parse(proposal.preview.issuedAt)
|
|
75
|
+
|| Date.parse(confirmation.confirmedAt) > Date.parse(confirmation.previewExpiresAt)) fail('E_OPERATE_BINDING_MISMATCH', 'Approved proposal lacks exact, timely human confirmation proof.');
|
|
76
|
+
}
|
|
77
|
+
return proposal;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function assertOperatingOriginV1(origin) {
|
|
81
|
+
assertOperateExperienceArtifactV2('operating-origin', origin); assertNoSensitiveContext(origin);
|
|
82
|
+
if (origin.originHash !== sha256Jcs(without(origin, 'originHash')) || origin.verification.metricId !== origin.metric.metricId || origin.verification.metricHash !== origin.metric.metricHash) fail('E_OPERATE_BINDING_MISMATCH', 'Operating origin hash or metric/verification binding is invalid.');
|
|
83
|
+
return origin;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export function assertOperatingDeliveryEvidenceV1(evidence) {
|
|
87
|
+
assertOperateExperienceArtifactV2('operating-delivery-evidence', evidence); assertNoSensitiveContext(evidence);
|
|
88
|
+
assertDeliveryClassification(evidence.classification, evidence.artifacts);
|
|
89
|
+
if (evidence.deliveryEvidenceHash !== sha256Jcs(without(evidence, 'deliveryEvidenceHash')) || evidence.outcomeStatus !== 'verification-required'
|
|
90
|
+
|| evidence.verification.metricId !== evidence.metric.metricId || evidence.verification.metricHash !== evidence.metric.metricHash
|
|
91
|
+
|| ((evidence.deliveryStatus === 'rolled-back') !== (evidence.rollback !== null))
|
|
92
|
+
|| (evidence.rollback !== null && (evidence.rollback.originalShipRunId !== evidence.shipRun.runId || evidence.rollback.status !== 'succeeded'))) fail('E_OPERATE_BINDING_MISMATCH', 'Delivery evidence is not exact or attempts to substitute verification, rollback custody, or claim Outcome closure.');
|
|
93
|
+
return evidence;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
function assertDeliveryClassification(classification, artifacts) {
|
|
97
|
+
const rank = { public: 0, internal: 1, confidential: 2, restricted: 3 };
|
|
98
|
+
if (!(classification in rank) || !Array.isArray(artifacts)
|
|
99
|
+
|| artifacts.some((artifact) => !(artifact.classification in rank) || rank[artifact.classification] > rank[classification])) {
|
|
100
|
+
fail('E_OPERATE_BINDING_MISMATCH', 'Delivery classification cannot narrow accepted Artifact classification.');
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export {
|
|
105
|
+
FORBIDDEN_KEY,
|
|
106
|
+
FORBIDDEN_TEXT,
|
|
107
|
+
PROTOCOL_VERSION,
|
|
108
|
+
assertDeliveryClassification,
|
|
109
|
+
assertNoSensitiveContext,
|
|
110
|
+
fail,
|
|
111
|
+
sameHead,
|
|
112
|
+
sameScope,
|
|
113
|
+
without,
|
|
114
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export interface ResolvedProtocolSchema { kind: string; protocolVersion: string; path: string; schema: Record<string, unknown> }
|
|
2
|
+
export interface ProtocolValidationError { path: string; rule: string; detail: string }
|
|
3
|
+
export declare const PROTOCOL_SCHEMA_REGISTRY: Readonly<Record<string, Readonly<Record<string, string>>>>;
|
|
4
|
+
export declare const OPERATE_EXPERIENCE_CONTRACT_KINDS_V2: readonly string[];
|
|
5
|
+
export declare const OPERATING_DELIVERY_ROUTES_V1: readonly string[];
|
|
6
|
+
export declare const OPERATE_ROLE_MANDATES_V2: readonly Readonly<Record<string, unknown>>[];
|
|
7
|
+
export declare const OPERATE_EXTENSION_CONTRACT_KINDS_V2: readonly string[];
|
|
8
|
+
export declare const OPERATE_EVIDENCE_CONTRACT_KINDS_V2: readonly string[];
|
|
9
|
+
export declare const OPERATE_EVIDENCE_KINDS_V2: readonly string[];
|
|
10
|
+
export declare const OPERATE_EVIDENCE_EDGE_RELATIONS_V2: readonly string[];
|
|
11
|
+
export declare const OPERATE_EVIDENCE_RESOLVER_ERROR_CODES_V2: readonly string[];
|
|
12
|
+
export declare const OPERATE_OPERATING_INTELLIGENCE_CONTRACT_KINDS_V2: readonly string[];
|
|
13
|
+
export declare const OPERATE_OPERATING_PROJECTION_IDENTITIES_V2: readonly string[];
|
|
14
|
+
export declare const OPERATE_OPERATING_PROVIDER_REGISTRATION_CONTRACT_KINDS_V2: readonly string[];
|
|
15
|
+
export declare const OPERATE_GOVERNED_EXECUTION_CONTRACT_KINDS_V2: readonly string[];
|
|
16
|
+
export declare const OPERATE_GOVERNED_PROVIDER_REGISTRATION_CONTRACT_KINDS_V2: readonly string[];
|
|
17
|
+
export declare const OPERATE_GOVERNED_EFFECT_CLASSES_V2: readonly string[];
|
|
18
|
+
export declare const OPERATE_GOVERNED_POLICY_OUTCOMES_V2: readonly string[];
|
|
19
|
+
export declare const OPERATE_GOVERNED_POLICY_TIERS_V2: readonly string[];
|
|
20
|
+
export declare const OPERATE_GOVERNED_CORE_PROHIBITIONS_V2: readonly Readonly<Record<string, unknown>>[];
|
|
21
|
+
export declare const OPERATE_GOVERNED_RECOVERY_CLASSIFICATIONS_V2: readonly string[];
|
|
22
|
+
export declare const OPERATE_GOVERNED_OPERATION_STATES_V2: readonly string[];
|
|
23
|
+
export declare const OPERATE_GOVERNED_OPERATION_TERMINAL_STATES_V2: readonly string[];
|
|
24
|
+
export declare const OPERATE_EXECUTION_VERIFICATION_STATUSES_V2: readonly string[];
|
|
25
|
+
export declare const OPERATE_HYPOTHESIS_VERIFICATION_STATUSES_V2: readonly string[];
|
|
26
|
+
export declare const OPERATE_GOVERNED_TOOL_OPERATIONS_V2: readonly string[];
|
|
27
|
+
export declare const OPERATE_AUTHORITY_GUARD_IDS_V2: readonly string[];
|
|
28
|
+
export declare const OPERATE_PUBLIC_DOMAIN_CONTRACT_BINDINGS_V2: Readonly<Record<string, unknown>>;
|
|
29
|
+
export declare function findOperateCoreProhibitionV2(values: unknown): Readonly<Record<string, unknown>> | null;
|
|
30
|
+
export declare function assertOperateIntelligencePlanContractV2<T>(value: T): T;
|
|
31
|
+
export declare function loadOperateRoleMandateV2(roleId: string, options?: { roleVersion?: string }): Readonly<Record<string, unknown>>;
|
|
32
|
+
export declare function assertOperateRoleOutputContractV2<T>(roleId: string, outputContract: T, options?: { roleVersion?: string }): T;
|
|
33
|
+
export declare function listProtocolSchemas(): Array<{ kind: string; protocolVersion: string; path: string }>;
|
|
34
|
+
export declare function resolveProtocolSchema(kind: string, options?: { protocolVersion?: string }): ResolvedProtocolSchema;
|
|
35
|
+
export declare function resolveOperateExperienceSchemaV2(kind: string, options?: { protocolVersion?: string }): ResolvedProtocolSchema;
|
|
36
|
+
export declare function validateProtocolArtifact(kind: string, value: unknown, options?: { protocolVersion?: string }): ProtocolValidationError[];
|
|
37
|
+
export declare function validateDashboardBootstrapV1(value: unknown): ProtocolValidationError[];
|
|
38
|
+
export declare function assertDashboardBootstrapV1<T>(value: T): T;
|
|
39
|
+
export declare function validateOperateExperienceArtifactV2(kind: string, value: unknown): ProtocolValidationError[];
|
|
40
|
+
export declare function assertOperateExperienceArtifactV2<T>(kind: string, value: T): T;
|
|
41
|
+
export declare function assertProtocolArtifact<T>(kind: string, value: T, options?: { protocolVersion?: string }): T;
|
|
42
|
+
export declare function assertOperateGovernedExtensionRegistrationV2<T>(kind: string, value: T): T;
|