@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,157 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
JsonValue,
|
|
3
|
+
OperateExperienceAccessLevelV1,
|
|
4
|
+
OperateExperienceAttentionV1,
|
|
5
|
+
OperateExperienceCycleV1,
|
|
6
|
+
OperateExperienceDomainMetricV1,
|
|
7
|
+
OperateExperienceEventHeadV1,
|
|
8
|
+
OperateExperienceInboxItemV1,
|
|
9
|
+
OperateExperienceActionV1,
|
|
10
|
+
OperateExperienceOutcomeV1,
|
|
11
|
+
OperateExperienceLearningV1,
|
|
12
|
+
OperateExperienceEvidenceV1,
|
|
13
|
+
OperateExperienceClaimV1,
|
|
14
|
+
OperateExperienceRationaleV1,
|
|
15
|
+
OperateExperienceHistoryV1,
|
|
16
|
+
OperateExperienceReplayV1,
|
|
17
|
+
OperateExperienceViewV1,
|
|
18
|
+
ProtocolValidationError,
|
|
19
|
+
} from "../protocol/index.js";
|
|
20
|
+
import type { OperateSharedTruthSummaryV1 } from "./operate-review-workspace-projection-v2.mjs";
|
|
21
|
+
|
|
22
|
+
export type OperateExperienceSurfaceStatusV1 =
|
|
23
|
+
OperateExperienceViewV1["status"];
|
|
24
|
+
export interface OperateExperienceSurfaceBaseV1 {
|
|
25
|
+
ok: true;
|
|
26
|
+
kind: "operate-experience-surface";
|
|
27
|
+
schemaVersion: "1.0.0";
|
|
28
|
+
protocolVersion: "2.0.0";
|
|
29
|
+
surface:
|
|
30
|
+
| "today"
|
|
31
|
+
| "inbox"
|
|
32
|
+
| "cycles"
|
|
33
|
+
| "cycle"
|
|
34
|
+
| "actions"
|
|
35
|
+
| "action"
|
|
36
|
+
| "evidence"
|
|
37
|
+
| "outcomes"
|
|
38
|
+
| "outcome"
|
|
39
|
+
| "history"
|
|
40
|
+
| "search"
|
|
41
|
+
| "export";
|
|
42
|
+
readOnly: true;
|
|
43
|
+
mutationEnabled: boolean;
|
|
44
|
+
scopeId: string;
|
|
45
|
+
domainId: string;
|
|
46
|
+
domainVersion: string;
|
|
47
|
+
actorId: string;
|
|
48
|
+
accessLevel: OperateExperienceAccessLevelV1;
|
|
49
|
+
generatedAt: string;
|
|
50
|
+
eventHead: OperateExperienceEventHeadV1;
|
|
51
|
+
viewHash: string;
|
|
52
|
+
truthSummary: OperateSharedTruthSummaryV1;
|
|
53
|
+
status: OperateExperienceSurfaceStatusV1;
|
|
54
|
+
reasonCodes: string[];
|
|
55
|
+
}
|
|
56
|
+
export type OperateExperienceTodaySurfaceV1 = OperateExperienceSurfaceBaseV1 & {
|
|
57
|
+
surface: "today";
|
|
58
|
+
data: {
|
|
59
|
+
attention: OperateExperienceAttentionV1[];
|
|
60
|
+
domainMetrics: OperateExperienceDomainMetricV1[];
|
|
61
|
+
activeCycle: OperateExperienceCycleV1 | null;
|
|
62
|
+
inbox: OperateExperienceInboxItemV1[];
|
|
63
|
+
actions: OperateExperienceActionV1[];
|
|
64
|
+
outcomes: OperateExperienceOutcomeV1[];
|
|
65
|
+
allowedActions: OperateExperienceViewV1["allowedActions"];
|
|
66
|
+
};
|
|
67
|
+
};
|
|
68
|
+
export type OperateExperienceSurfaceV1 = OperateExperienceSurfaceBaseV1 &
|
|
69
|
+
(
|
|
70
|
+
| { surface: "today"; data: OperateExperienceTodaySurfaceV1["data"] }
|
|
71
|
+
| {
|
|
72
|
+
surface: "inbox";
|
|
73
|
+
data: {
|
|
74
|
+
inbox: OperateExperienceInboxItemV1[];
|
|
75
|
+
requestBinding: {
|
|
76
|
+
projectId: string;
|
|
77
|
+
generation: number;
|
|
78
|
+
subjectId: string | null;
|
|
79
|
+
};
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
| { surface: "cycles"; data: { cycles: OperateExperienceCycleV1[] } }
|
|
83
|
+
| { surface: "cycle"; data: { cycle: OperateExperienceCycleV1 } }
|
|
84
|
+
| {
|
|
85
|
+
surface: "actions";
|
|
86
|
+
data: {
|
|
87
|
+
actions: OperateExperienceActionV1[];
|
|
88
|
+
requestBinding: { projectId: string; generation: number };
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
| {
|
|
92
|
+
surface: "action";
|
|
93
|
+
data: {
|
|
94
|
+
action: OperateExperienceActionV1;
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
| {
|
|
98
|
+
surface: "evidence";
|
|
99
|
+
data: {
|
|
100
|
+
evidence: OperateExperienceEvidenceV1[];
|
|
101
|
+
claims: OperateExperienceClaimV1[];
|
|
102
|
+
rationale: OperateExperienceRationaleV1[];
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
| {
|
|
106
|
+
surface: "outcomes";
|
|
107
|
+
data: {
|
|
108
|
+
domainMetrics: OperateExperienceDomainMetricV1[];
|
|
109
|
+
outcomes: OperateExperienceOutcomeV1[];
|
|
110
|
+
learnings: OperateExperienceLearningV1[];
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
| {
|
|
114
|
+
surface: "outcome";
|
|
115
|
+
data: {
|
|
116
|
+
outcome: OperateExperienceOutcomeV1;
|
|
117
|
+
learnings: OperateExperienceLearningV1[];
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
| {
|
|
121
|
+
surface: "history";
|
|
122
|
+
data: {
|
|
123
|
+
history: OperateExperienceHistoryV1[];
|
|
124
|
+
replay: OperateExperienceReplayV1;
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
| {
|
|
128
|
+
surface: "search";
|
|
129
|
+
data: {
|
|
130
|
+
query: string;
|
|
131
|
+
results: Array<{
|
|
132
|
+
kind: string;
|
|
133
|
+
subjectId: string;
|
|
134
|
+
title: string;
|
|
135
|
+
summary: string;
|
|
136
|
+
state: string;
|
|
137
|
+
deepLink?: string;
|
|
138
|
+
}>;
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
| {
|
|
142
|
+
surface: "export";
|
|
143
|
+
data: {
|
|
144
|
+
format: "json" | "html";
|
|
145
|
+
mediaType: "application/json" | "text/html; charset=utf-8";
|
|
146
|
+
content: string;
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
export function validateOperateExperienceSurfaceV1(
|
|
152
|
+
value: unknown,
|
|
153
|
+
): ProtocolValidationError[];
|
|
154
|
+
export function assertOperateExperienceSurfaceV1<T>(value: T): T;
|
|
155
|
+
export const OPERATE_EXPERIENCE_SURFACE_SCHEMA_V1: Readonly<
|
|
156
|
+
Record<string, JsonValue>
|
|
157
|
+
>;
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { validateJson } from '../../src/json-schema.mjs';
|
|
2
|
+
import {
|
|
3
|
+
OPERATE_ALLOWED_ACTION_SCHEMA as allowedActionSchema,
|
|
4
|
+
OPERATING_DELIVERY_ROUTE_SCHEMA as deliveryRouteSchema,
|
|
5
|
+
OPERATING_EVIDENCE_RESOLUTION_SCHEMA as evidenceResolutionSchema,
|
|
6
|
+
OPERATING_EXECUTION_RESULT_SCHEMA as executionResultSchema,
|
|
7
|
+
OPERATE_EXPERIENCE_VIEW_SCHEMA as experienceViewSchema,
|
|
8
|
+
OPERATING_FINDING_SCHEMA as findingSchema,
|
|
9
|
+
OPERATING_GOVERNED_OPERATION_SCHEMA as governedOperationSchema,
|
|
10
|
+
OPERATING_REVIEW_SCHEMA as reviewSchema,
|
|
11
|
+
OPERATING_TRACE_MATRIX_SCHEMA as traceMatrixSchema,
|
|
12
|
+
OPERATE_REVIEW_DISPLAY_WORKSPACE_SCHEMA as reviewWorkspaceSchema,
|
|
13
|
+
OPERATE_EXPERIENCE_SURFACE_SCHEMA as surfaceSchema,
|
|
14
|
+
} from "./generated/operate-experience-surface-schema-data.mjs";
|
|
15
|
+
|
|
16
|
+
const schemas = new Map([
|
|
17
|
+
["operate-experience-view.schema.json", experienceViewSchema],
|
|
18
|
+
["operating-finding.schema.json", findingSchema],
|
|
19
|
+
["operate-allowed-action.schema.json", allowedActionSchema],
|
|
20
|
+
["operating-delivery-route.schema.json", deliveryRouteSchema],
|
|
21
|
+
["operating-evidence-resolution.schema.json", evidenceResolutionSchema],
|
|
22
|
+
["operating-execution-result.schema.json", executionResultSchema],
|
|
23
|
+
["operating-governed-operation.schema.json", governedOperationSchema],
|
|
24
|
+
["operating-review.schema.json", reviewSchema],
|
|
25
|
+
["operating-trace-matrix.schema.json", traceMatrixSchema],
|
|
26
|
+
["operate-review-display-workspace.schema.json", reviewWorkspaceSchema],
|
|
27
|
+
]);
|
|
28
|
+
|
|
29
|
+
function jsonPointer(root, fragment) {
|
|
30
|
+
if (!fragment || fragment === "#") return root;
|
|
31
|
+
if (!fragment.startsWith("#/")) return null;
|
|
32
|
+
return fragment
|
|
33
|
+
.slice(2)
|
|
34
|
+
.split("/")
|
|
35
|
+
.map((part) => part.replaceAll("~1", "/").replaceAll("~0", "~"))
|
|
36
|
+
.reduce((value, part) => value?.[part], root);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
function resolveSurfaceRef(reference) {
|
|
40
|
+
const [path, pointer = ""] = reference.split("#");
|
|
41
|
+
const filename = path.split("/").at(-1);
|
|
42
|
+
const rootSchema = schemas.get(filename);
|
|
43
|
+
if (!rootSchema) return null;
|
|
44
|
+
return {
|
|
45
|
+
schema: jsonPointer(rootSchema, pointer ? `#${pointer}` : "#"),
|
|
46
|
+
rootSchema,
|
|
47
|
+
base: filename,
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export function validateOperateExperienceSurfaceV1(value) {
|
|
52
|
+
const errors = validateJson(value, surfaceSchema, {
|
|
53
|
+
base: "schemas/v1.2.0/operate-experience-surface.schema.json",
|
|
54
|
+
resolveRef: resolveSurfaceRef,
|
|
55
|
+
});
|
|
56
|
+
if (errors.length > 0) return errors;
|
|
57
|
+
const summary = value.truthSummary;
|
|
58
|
+
if (
|
|
59
|
+
summary.sourceViewHash !== value.viewHash ||
|
|
60
|
+
summary.sourceEventHead.sequence !== value.eventHead.sequence ||
|
|
61
|
+
summary.sourceEventHead.hash !== value.eventHead.hash ||
|
|
62
|
+
summary.stages.total !== summary.stages.cycles * 7 ||
|
|
63
|
+
summary.evidence.linked > summary.evidence.total ||
|
|
64
|
+
summary.proof.linkedEvidence !== summary.evidence.linked ||
|
|
65
|
+
summary.seats.total !==
|
|
66
|
+
summary.seats.terminal + summary.seats.active + summary.seats.pending
|
|
67
|
+
) {
|
|
68
|
+
return [{
|
|
69
|
+
path: "$.truthSummary",
|
|
70
|
+
rule: "sharedTruth",
|
|
71
|
+
detail: "does not bind one internally consistent shared truth summary",
|
|
72
|
+
}];
|
|
73
|
+
}
|
|
74
|
+
return [];
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export function assertOperateExperienceSurfaceV1(value) {
|
|
78
|
+
const errors = validateOperateExperienceSurfaceV1(value);
|
|
79
|
+
if (errors.length > 0) {
|
|
80
|
+
const error = new TypeError(
|
|
81
|
+
`operate-experience-surface: ${errors[0].path} ${errors[0].detail}`,
|
|
82
|
+
);
|
|
83
|
+
error.code = "E_OPERATE_EXPERIENCE_SURFACE_INVALID";
|
|
84
|
+
throw error;
|
|
85
|
+
}
|
|
86
|
+
return value;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export const OPERATE_EXPERIENCE_SURFACE_SCHEMA_V1 = Object.freeze(
|
|
90
|
+
structuredClone(surfaceSchema),
|
|
91
|
+
);
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
OperateReviewBoundSubmissionV1,
|
|
3
|
+
OperatingReviewReceiptV2,
|
|
4
|
+
} from '../protocol/index.js';
|
|
5
|
+
|
|
6
|
+
export {
|
|
7
|
+
assertOperateReviewDisplayWorkspaceV1,
|
|
8
|
+
} from './operate-review-display-workspace-contract.mjs';
|
|
9
|
+
|
|
10
|
+
export type {
|
|
11
|
+
OperateReviewDisplayWorkspaceExpectedBindingV1,
|
|
12
|
+
OperateReviewDisplayWorkspaceIntegrityV1,
|
|
13
|
+
OperateReviewDisplayWorkspaceV1,
|
|
14
|
+
} from './operate-review-display-workspace-contract.mjs';
|
|
15
|
+
|
|
16
|
+
export type {
|
|
17
|
+
OperateReviewBoundSubmissionV1,
|
|
18
|
+
OperatingReviewReceiptV2,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const OPERATE_REVIEW_BOUND_SUBMISSION_DOMAIN:
|
|
22
|
+
'openplanr:operate-review-bound-submission:project-write:operating-review@2.0.0#/$defs/workDisposition:1.0.0';
|
|
23
|
+
|
|
24
|
+
export function computeOperatingReviewBoundSubmissionHashV1(
|
|
25
|
+
value: Omit<OperateReviewBoundSubmissionV1, 'boundSubmissionHash'> | OperateReviewBoundSubmissionV1,
|
|
26
|
+
): string;
|
|
27
|
+
|
|
28
|
+
export function assertOperatingReviewBoundSubmissionV1(
|
|
29
|
+
value: unknown,
|
|
30
|
+
): OperateReviewBoundSubmissionV1;
|
|
31
|
+
|
|
32
|
+
export function assertOperatingReviewReceiptV2(
|
|
33
|
+
value: unknown,
|
|
34
|
+
): OperatingReviewReceiptV2;
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { validateJson } from '../../src/json-schema.mjs';
|
|
2
|
+
import {
|
|
3
|
+
exactEventHead,
|
|
4
|
+
exactJson,
|
|
5
|
+
jcsHash,
|
|
6
|
+
safeDataClone,
|
|
7
|
+
} from './closed-json-contract.mjs';
|
|
8
|
+
import {
|
|
9
|
+
OPERATE_REVIEW_BOUND_SUBMISSION_SCHEMA_REVIEW_SLICE as boundSubmissionSchema,
|
|
10
|
+
OPERATING_ASSIGNMENT_SCHEMA_REVIEW_SLICE as assignmentSchema,
|
|
11
|
+
OPERATING_REVIEW_READ_SCHEMA_REVIEW_SLICE as reviewReadSchema,
|
|
12
|
+
OPERATING_REVIEW_RECEIPT_SCHEMA_REVIEW_SLICE as reviewReceiptSchema,
|
|
13
|
+
OPERATING_REVIEW_SCHEMA_REVIEW_SLICE as reviewSchema,
|
|
14
|
+
} from './generated/operate-review-schema-data.mjs';
|
|
15
|
+
import { assertOperateReviewWorkspacePayloadSafeV1 } from './operate-review-payload-safety.mjs';
|
|
16
|
+
|
|
17
|
+
export {
|
|
18
|
+
assertOperateReviewDisplayWorkspaceV1,
|
|
19
|
+
} from './operate-review-display-workspace-contract.mjs';
|
|
20
|
+
|
|
21
|
+
export const OPERATE_REVIEW_BOUND_SUBMISSION_DOMAIN =
|
|
22
|
+
'openplanr:operate-review-bound-submission:project-write:operating-review@2.0.0#/$defs/workDisposition:1.0.0';
|
|
23
|
+
|
|
24
|
+
const schemas = new Map([
|
|
25
|
+
['operate-review-bound-submission.schema.json', boundSubmissionSchema],
|
|
26
|
+
['operating-assignment.schema.json', assignmentSchema],
|
|
27
|
+
['operating-review-read.schema.json', reviewReadSchema],
|
|
28
|
+
['operating-review-receipt.schema.json', reviewReceiptSchema],
|
|
29
|
+
['operating-review.schema.json', reviewSchema],
|
|
30
|
+
]);
|
|
31
|
+
|
|
32
|
+
function jsonPointer(root, fragment) {
|
|
33
|
+
if (!fragment || fragment === '#') return root;
|
|
34
|
+
if (!fragment.startsWith('#/')) return null;
|
|
35
|
+
return fragment
|
|
36
|
+
.slice(2)
|
|
37
|
+
.split('/')
|
|
38
|
+
.map((part) => part.replaceAll('~1', '/').replaceAll('~0', '~'))
|
|
39
|
+
.reduce((value, part) => value?.[part], root);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
function resolveSchemaRef(reference) {
|
|
43
|
+
const [path, pointer = ''] = reference.split('#');
|
|
44
|
+
const filename = path.split('/').at(-1);
|
|
45
|
+
const rootSchema = schemas.get(filename);
|
|
46
|
+
if (!rootSchema) return null;
|
|
47
|
+
return {
|
|
48
|
+
schema: jsonPointer(rootSchema, pointer ? `#${pointer}` : '#'),
|
|
49
|
+
rootSchema,
|
|
50
|
+
base: filename,
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
function fail(code, message) {
|
|
55
|
+
const error = new TypeError(message);
|
|
56
|
+
error.code = code;
|
|
57
|
+
throw error;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
function assertClosedSchema(value, schema, base, code, message) {
|
|
61
|
+
let clone;
|
|
62
|
+
try {
|
|
63
|
+
clone = safeDataClone(value);
|
|
64
|
+
const errors = validateJson(clone, schema, { base, resolveRef: resolveSchemaRef });
|
|
65
|
+
if (errors.length > 0) fail(code, message);
|
|
66
|
+
} catch (error) {
|
|
67
|
+
if (error?.code === code) throw error;
|
|
68
|
+
fail(code, message);
|
|
69
|
+
}
|
|
70
|
+
return clone;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function boundSubmissionHashPayload(value) {
|
|
74
|
+
return {
|
|
75
|
+
domain: OPERATE_REVIEW_BOUND_SUBMISSION_DOMAIN,
|
|
76
|
+
expectedReadEventHead: value.expectedReadEventHead,
|
|
77
|
+
choiceId: value.choiceId,
|
|
78
|
+
choiceHash: value.choiceHash,
|
|
79
|
+
submitArguments: value.submitArguments,
|
|
80
|
+
note: value.note,
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function computeOperatingReviewBoundSubmissionHashV1(value) {
|
|
85
|
+
return jcsHash(boundSubmissionHashPayload(safeDataClone(value)));
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function assertOperatingReviewBoundSubmissionV1(value) {
|
|
89
|
+
const candidate = assertClosedSchema(
|
|
90
|
+
value,
|
|
91
|
+
boundSubmissionSchema,
|
|
92
|
+
'schemas/v2.0.0/operate-review-bound-submission.schema.json',
|
|
93
|
+
'RESULT_CONTRACT_INVALID',
|
|
94
|
+
'The bound Review submission does not satisfy its closed integrity contract.',
|
|
95
|
+
);
|
|
96
|
+
if (candidate.choiceHash !== jcsHash(candidate.submitArguments)
|
|
97
|
+
|| candidate.boundSubmissionHash !== computeOperatingReviewBoundSubmissionHashV1(candidate)) {
|
|
98
|
+
fail(
|
|
99
|
+
'RESULT_CONTRACT_INVALID',
|
|
100
|
+
'The bound Review submission does not satisfy its closed integrity contract.',
|
|
101
|
+
);
|
|
102
|
+
}
|
|
103
|
+
return value;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function exactChoiceBinding(choice, receipt) {
|
|
107
|
+
return choice.choiceHash === jcsHash(choice.submitArguments)
|
|
108
|
+
&& choice.submitArguments.reviewId === receipt.review.reviewId
|
|
109
|
+
&& choice.submitArguments.cycleId === receipt.cycleId
|
|
110
|
+
&& exactJson(choice.submitArguments.actor, receipt.actor)
|
|
111
|
+
&& exactJson(choice.submitArguments.scope, receipt.scope);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function exactReceiptSemantics(receipt) {
|
|
115
|
+
const choices = receipt.dispositionChoices;
|
|
116
|
+
const choiceIds = new Set(choices.map(({ choiceId }) => choiceId));
|
|
117
|
+
const choiceHashes = new Set(choices.map(({ choiceHash }) => choiceHash));
|
|
118
|
+
if (choiceIds.size !== choices.length
|
|
119
|
+
|| choiceHashes.size !== choices.length
|
|
120
|
+
|| choices.some((choice) => !exactChoiceBinding(choice, receipt))
|
|
121
|
+
|| receipt.review.reviewId.length === 0
|
|
122
|
+
|| receipt.review.cycleId !== receipt.cycleId
|
|
123
|
+
|| receipt.review.ownerActorId !== receipt.actor.actorId
|
|
124
|
+
|| receipt.review.state !== receipt.decision
|
|
125
|
+
|| receipt.review.disposition !== receipt.decision
|
|
126
|
+
|| !exactJson(receipt.review.workDispositions, receipt.appliedWorkDispositions)
|
|
127
|
+
|| receipt.eventHead.sequence !== receipt.readEventHead.sequence + 1) {
|
|
128
|
+
return false;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
const applied = choices.filter((choice) => (
|
|
132
|
+
choice.choiceId === receipt.appliedChoiceId
|
|
133
|
+
&& choice.choiceHash === receipt.appliedChoiceHash
|
|
134
|
+
));
|
|
135
|
+
if (applied.length !== 1) return false;
|
|
136
|
+
const [choice] = applied;
|
|
137
|
+
if (choice.submitArguments.disposition !== receipt.decision
|
|
138
|
+
|| !exactJson(choice.submitArguments.workDispositions, receipt.appliedWorkDispositions)
|
|
139
|
+
|| receipt.summary.decisionCount !== receipt.decisions.length
|
|
140
|
+
|| receipt.summary.actionCount !== receipt.actions.length
|
|
141
|
+
|| receipt.summary.findingCount !== receipt.findings.length
|
|
142
|
+
|| receipt.summary.dissentCount !== receipt.dissent.length
|
|
143
|
+
|| receipt.summary.gapCount !== receipt.gaps.length) {
|
|
144
|
+
return false;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
if (receipt.boundSubmission === undefined) return true;
|
|
148
|
+
try {
|
|
149
|
+
assertOperatingReviewBoundSubmissionV1(receipt.boundSubmission);
|
|
150
|
+
} catch {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
return exactEventHead(receipt.boundSubmission.expectedReadEventHead, receipt.readEventHead)
|
|
154
|
+
&& receipt.boundSubmission.choiceId === choice.choiceId
|
|
155
|
+
&& receipt.boundSubmission.choiceHash === choice.choiceHash
|
|
156
|
+
&& exactJson(receipt.boundSubmission.submitArguments, choice.submitArguments);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
export function assertOperatingReviewReceiptV2(value) {
|
|
160
|
+
const candidate = assertClosedSchema(
|
|
161
|
+
value,
|
|
162
|
+
reviewReceiptSchema,
|
|
163
|
+
'schemas/v2.0.0/operating-review-receipt.schema.json',
|
|
164
|
+
'E_OPERATE_REVIEW_RECEIPT_INVALID',
|
|
165
|
+
'The operating Review receipt does not satisfy its closed integrity contract.',
|
|
166
|
+
);
|
|
167
|
+
assertOperateReviewWorkspacePayloadSafeV1(candidate);
|
|
168
|
+
if (!exactReceiptSemantics(candidate)) {
|
|
169
|
+
fail(
|
|
170
|
+
'E_OPERATE_REVIEW_RECEIPT_INVALID',
|
|
171
|
+
'The operating Review receipt does not satisfy its closed integrity contract.',
|
|
172
|
+
);
|
|
173
|
+
}
|
|
174
|
+
return value;
|
|
175
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { JsonValue, ProtocolValidationError } from '../protocol/index.js';
|
|
2
|
+
import type { OperateReviewWorkspacePayloadV1 } from './operate-review-workspace-projection-v2.mjs';
|
|
3
|
+
|
|
4
|
+
export const OPERATE_REVIEW_DISPLAY_WORKSPACE_DOMAIN:
|
|
5
|
+
'openplanr:operate-review-display-workspace:1.0.0';
|
|
6
|
+
|
|
7
|
+
export type OperateReviewDisplayWorkspaceIntegrityV1 = Readonly<{
|
|
8
|
+
algorithm: 'sha-256-jcs';
|
|
9
|
+
domain: typeof OPERATE_REVIEW_DISPLAY_WORKSPACE_DOMAIN;
|
|
10
|
+
sourceArtifactKind: OperateReviewWorkspacePayloadV1['sourceArtifactKind'];
|
|
11
|
+
sourceViewHash: string;
|
|
12
|
+
sourceArtifactHash: string;
|
|
13
|
+
contentHash: string;
|
|
14
|
+
}>;
|
|
15
|
+
|
|
16
|
+
export type OperateReviewDisplayWorkspaceV1 = Readonly<{
|
|
17
|
+
kind: 'operate-review-display-workspace';
|
|
18
|
+
schemaVersion: '1.0.0';
|
|
19
|
+
protocolVersion: '2.0.0';
|
|
20
|
+
payload: OperateReviewWorkspacePayloadV1;
|
|
21
|
+
integrity: OperateReviewDisplayWorkspaceIntegrityV1;
|
|
22
|
+
}>;
|
|
23
|
+
|
|
24
|
+
export type OperateReviewDisplayWorkspaceExpectedBindingV1 = Readonly<{
|
|
25
|
+
actorId: string;
|
|
26
|
+
scopeId: string;
|
|
27
|
+
domainId: string;
|
|
28
|
+
domainVersion: string;
|
|
29
|
+
cycleId: string;
|
|
30
|
+
reviewId: string;
|
|
31
|
+
sourceArtifactKind: OperateReviewWorkspacePayloadV1['sourceArtifactKind'];
|
|
32
|
+
sourceArtifactHash: string;
|
|
33
|
+
sourceEventHead: OperateReviewWorkspacePayloadV1['sourceEventHead'];
|
|
34
|
+
sourceReadEventHead: OperateReviewWorkspacePayloadV1['sourceReadEventHead'];
|
|
35
|
+
sourceViewHash: string;
|
|
36
|
+
}>;
|
|
37
|
+
|
|
38
|
+
export function validateOperateReviewDisplayWorkspaceV1(
|
|
39
|
+
value: unknown,
|
|
40
|
+
expected?: OperateReviewDisplayWorkspaceExpectedBindingV1,
|
|
41
|
+
): ProtocolValidationError[];
|
|
42
|
+
|
|
43
|
+
export function assertOperateReviewDisplayWorkspaceV1<T>(
|
|
44
|
+
value: T,
|
|
45
|
+
expected?: OperateReviewDisplayWorkspaceExpectedBindingV1,
|
|
46
|
+
): T;
|
|
47
|
+
|
|
48
|
+
export function issueOperateReviewDisplayWorkspaceV1(
|
|
49
|
+
payload: OperateReviewWorkspacePayloadV1,
|
|
50
|
+
): OperateReviewDisplayWorkspaceV1;
|
|
51
|
+
|
|
52
|
+
export const OPERATE_REVIEW_DISPLAY_WORKSPACE_SCHEMA_V1: Readonly<
|
|
53
|
+
Record<string, JsonValue>
|
|
54
|
+
>;
|