openplanr 3.3.0 → 3.5.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/CHANGELOG.md +80 -0
- package/dist/cli/commands/artifact-design-share.d.ts +9 -0
- package/dist/cli/commands/artifact-design-share.d.ts.map +1 -0
- package/dist/cli/commands/artifact-design-share.js +200 -0
- package/dist/cli/commands/artifact-design-share.js.map +1 -0
- package/dist/cli/commands/artifact.d.ts.map +1 -1
- package/dist/cli/commands/artifact.js +5 -18
- package/dist/cli/commands/artifact.js.map +1 -1
- package/dist/cli/commands/design.d.ts +3 -0
- package/dist/cli/commands/design.d.ts.map +1 -0
- package/dist/cli/commands/design.js +137 -0
- package/dist/cli/commands/design.js.map +1 -0
- package/dist/cli/commands/groups/operations.d.ts.map +1 -1
- package/dist/cli/commands/groups/operations.js +2 -0
- package/dist/cli/commands/groups/operations.js.map +1 -1
- package/dist/cli/commands/ship.d.ts.map +1 -1
- package/dist/cli/commands/ship.js +2 -0
- package/dist/cli/commands/ship.js.map +1 -1
- package/dist/dashboard/.vite/manifest.json +2 -2
- package/dist/dashboard/assets/index-B-l_941W.js +75 -0
- package/dist/dashboard/assets/index-B-l_941W.js.map +1 -0
- package/dist/dashboard/assets/index-Cv4Vwhuw.css +2 -0
- package/dist/dashboard/dashboard-manifest.json +14 -14
- package/dist/dashboard/index.html +2 -2
- package/dist/services/design-artifact-service.d.ts +42 -1
- package/dist/services/design-artifact-service.d.ts.map +1 -1
- package/dist/services/design-artifact-service.js +198 -19
- package/dist/services/design-artifact-service.js.map +1 -1
- package/dist/services/runtime-manager/runtime-package.js +1 -1
- package/dist/services/runtime-manager/runtime-package.js.map +1 -1
- package/dist/services/ship-checks/contract.d.ts +3 -1
- package/dist/services/ship-checks/contract.d.ts.map +1 -1
- package/dist/services/ship-checks/contract.js +1 -1
- package/dist/services/ship-checks/contract.js.map +1 -1
- package/dist/services/ship-checks/discover.d.ts.map +1 -1
- package/dist/services/ship-checks/discover.js +2 -1
- package/dist/services/ship-checks/discover.js.map +1 -1
- package/dist/services/ship-checks/package-contents.d.ts +4 -0
- package/dist/services/ship-checks/package-contents.d.ts.map +1 -0
- package/dist/services/ship-checks/package-contents.js +91 -0
- package/dist/services/ship-checks/package-contents.js.map +1 -0
- package/dist/services/ship-checks/packages.d.ts +2 -0
- package/dist/services/ship-checks/packages.d.ts.map +1 -1
- package/dist/services/ship-checks/packages.js +4 -0
- package/dist/services/ship-checks/packages.js.map +1 -1
- package/dist/services/ship-checks/scope.js +2 -1
- package/dist/services/ship-checks/scope.js.map +1 -1
- package/dist/utils/splice-managed-block.js +1 -1
- package/dist/utils/splice-managed-block.js.map +1 -1
- package/docs/CLI.md +67 -1
- package/lib/host-packages/adapter-registry.json +5 -5
- package/lib/host-packages/capability-map.json +1 -1
- package/lib/host-packages/claude/.claude-plugin/marketplace.json +3 -3
- package/lib/host-packages/claude/openplanr/.claude-plugin/plugin.json +6 -6
- package/lib/host-packages/claude/openplanr/.openplanr-content.json +57 -429
- package/lib/host-packages/claude/openplanr/README.md +16 -16
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/shared/task-context-resolution.md +4 -4
- package/lib/host-packages/claude/openplanr/skills/artifact/references/design-sharing.md +2 -2
- package/lib/host-packages/claude/openplanr/skills/delegate/SKILL.md +2 -1
- package/lib/host-packages/claude/openplanr/skills/delegate/references/integration-review.md +26 -20
- package/lib/host-packages/claude/openplanr/skills/delegate/references/operator-guide.md +25 -1
- package/lib/host-packages/claude/openplanr/skills/delegate/references/run-handoff.md +2 -2
- package/lib/host-packages/claude/openplanr/skills/delegate/references/worktree-custody.md +17 -9
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/adapters/claude.mjs +15 -3
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/adapters/codex.mjs +38 -2
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/adapters/native.mjs +5 -0
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/custody.mjs +217 -10
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/handoff.mjs +1080 -0
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/integrate.mjs +96 -201
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/integration-files.mjs +3 -382
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/presentation.mjs +29 -12
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/run-contract.mjs +11 -0
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/run-execution.mjs +1 -1
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/run-lifecycle.mjs +14 -10
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/run-preparation.mjs +4 -0
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/run-record.mjs +2 -2
- package/lib/host-packages/claude/openplanr/skills/design/SKILL.md +23 -12
- package/lib/host-packages/claude/openplanr/skills/design/references/design-system.md +2 -2
- package/lib/host-packages/claude/openplanr/skills/design/references/generation.md +3 -3
- package/lib/host-packages/claude/openplanr/skills/design/references/hosted-canvas.md +6 -3
- package/lib/host-packages/claude/openplanr/skills/design/references/review.md +6 -6
- package/lib/host-packages/claude/openplanr/skills/design/references/team-review.md +3 -4
- package/lib/host-packages/claude/openplanr/skills/design/references/utilities.md +78 -32
- package/lib/host-packages/claude/openplanr/skills/design-loop/SKILL.md +15 -7
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/design-system.md +2 -2
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/generation.md +3 -3
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/review.md +6 -6
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/team-review.md +3 -4
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/utilities.md +78 -32
- package/lib/host-packages/claude/openplanr/skills/design-review/SKILL.md +25 -5
- package/lib/host-packages/claude/openplanr/skills/design-review/references/design-system.md +2 -2
- package/lib/host-packages/claude/openplanr/skills/design-review/references/generation.md +3 -3
- package/lib/host-packages/claude/openplanr/skills/design-review/references/review.md +6 -6
- package/lib/host-packages/claude/openplanr/skills/design-review/references/team-review.md +3 -4
- package/lib/host-packages/claude/openplanr/skills/design-review/references/utilities.md +78 -32
- package/lib/host-packages/claude/openplanr/skills/investigate/SKILL.md +1 -0
- package/lib/host-packages/claude/openplanr/skills/investigate/references/fail-first.md +40 -0
- package/lib/host-packages/claude/openplanr/skills/plan/SKILL.md +7 -3
- package/lib/host-packages/claude/openplanr/skills/ship/SKILL.md +22 -10
- package/lib/host-packages/claude/openplanr/skills/ship/references/fail-first.md +40 -0
- package/lib/host-packages/claude/openplanr/skills/ship/references/result-contract.md +7 -3
- package/lib/host-packages/cursor/openplanr/.openplanr-content.json +55 -427
- package/lib/host-packages/cursor/openplanr/manifest.json +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-artifact/references/design-sharing.md +2 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/references/integration-review.md +26 -20
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/references/operator-guide.md +25 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/references/run-handoff.md +2 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/references/worktree-custody.md +17 -9
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/adapters/claude.mjs +15 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/adapters/codex.mjs +38 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/adapters/native.mjs +5 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/custody.mjs +217 -10
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/handoff.mjs +1080 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/integrate.mjs +96 -201
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/integration-files.mjs +3 -382
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/presentation.mjs +29 -12
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/run-contract.mjs +11 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/run-execution.mjs +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/run-lifecycle.mjs +14 -10
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/run-preparation.mjs +4 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/run-record.mjs +2 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate.mdc +2 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/design-system.md +2 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/generation.md +3 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/hosted-canvas.md +6 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/review.md +6 -6
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/team-review.md +3 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/utilities.md +78 -32
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/design-system.md +2 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/generation.md +3 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/review.md +6 -6
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/team-review.md +3 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/utilities.md +78 -32
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop.mdc +15 -7
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/design-system.md +2 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/generation.md +3 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/review.md +6 -6
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/team-review.md +3 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/utilities.md +78 -32
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review.mdc +25 -5
- package/lib/host-packages/cursor/openplanr/rules/planr-design.mdc +23 -12
- package/lib/host-packages/cursor/openplanr/rules/planr-investigate/references/fail-first.md +40 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-investigate.mdc +1 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-plan.mdc +7 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-ship/references/fail-first.md +40 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-ship/references/result-contract.md +7 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-ship.mdc +22 -10
- package/lib/host-packages/openai/.claude-plugin/marketplace.json +3 -3
- package/lib/host-packages/openai/openplanr/.codex-plugin/plugin.json +2 -2
- package/lib/host-packages/openai/openplanr/.openplanr-content.json +62 -434
- package/lib/host-packages/openai/openplanr/skills/artifact/references/design-sharing.md +2 -2
- package/lib/host-packages/openai/openplanr/skills/delegate/SKILL.md +2 -1
- package/lib/host-packages/openai/openplanr/skills/delegate/openplanr.skill.json +1 -1
- package/lib/host-packages/openai/openplanr/skills/delegate/references/integration-review.md +26 -20
- package/lib/host-packages/openai/openplanr/skills/delegate/references/operator-guide.md +25 -1
- package/lib/host-packages/openai/openplanr/skills/delegate/references/run-handoff.md +2 -2
- package/lib/host-packages/openai/openplanr/skills/delegate/references/worktree-custody.md +17 -9
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/adapters/claude.mjs +15 -3
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/adapters/codex.mjs +38 -2
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/adapters/native.mjs +5 -0
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/custody.mjs +217 -10
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/handoff.mjs +1080 -0
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/integrate.mjs +96 -201
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/integration-files.mjs +3 -382
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/presentation.mjs +29 -12
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/run-contract.mjs +11 -0
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/run-execution.mjs +1 -1
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/run-lifecycle.mjs +14 -10
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/run-preparation.mjs +4 -0
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/run-record.mjs +2 -2
- package/lib/host-packages/openai/openplanr/skills/design/SKILL.md +23 -12
- package/lib/host-packages/openai/openplanr/skills/design/openplanr.skill.json +0 -11
- package/lib/host-packages/openai/openplanr/skills/design/references/design-system.md +2 -2
- package/lib/host-packages/openai/openplanr/skills/design/references/generation.md +3 -3
- package/lib/host-packages/openai/openplanr/skills/design/references/hosted-canvas.md +6 -3
- package/lib/host-packages/openai/openplanr/skills/design/references/review.md +6 -6
- package/lib/host-packages/openai/openplanr/skills/design/references/team-review.md +3 -4
- package/lib/host-packages/openai/openplanr/skills/design/references/utilities.md +78 -32
- package/lib/host-packages/openai/openplanr/skills/design-loop/SKILL.md +15 -7
- package/lib/host-packages/openai/openplanr/skills/design-loop/openplanr.skill.json +0 -11
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/design-system.md +2 -2
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/generation.md +3 -3
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/review.md +6 -6
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/team-review.md +3 -4
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/utilities.md +78 -32
- package/lib/host-packages/openai/openplanr/skills/design-review/SKILL.md +25 -5
- package/lib/host-packages/openai/openplanr/skills/design-review/openplanr.skill.json +0 -11
- package/lib/host-packages/openai/openplanr/skills/design-review/references/design-system.md +2 -2
- package/lib/host-packages/openai/openplanr/skills/design-review/references/generation.md +3 -3
- package/lib/host-packages/openai/openplanr/skills/design-review/references/review.md +6 -6
- package/lib/host-packages/openai/openplanr/skills/design-review/references/team-review.md +3 -4
- package/lib/host-packages/openai/openplanr/skills/design-review/references/utilities.md +78 -32
- package/lib/host-packages/openai/openplanr/skills/investigate/SKILL.md +1 -0
- package/lib/host-packages/openai/openplanr/skills/investigate/openplanr.skill.json +12 -1
- package/lib/host-packages/openai/openplanr/skills/investigate/references/fail-first.md +40 -0
- package/lib/host-packages/openai/openplanr/skills/plan/SKILL.md +7 -3
- package/lib/host-packages/openai/openplanr/skills/plan/openplanr.skill.json +0 -11
- package/lib/host-packages/openai/openplanr/skills/ship/SKILL.md +22 -10
- package/lib/host-packages/openai/openplanr/skills/ship/openplanr.skill.json +12 -1
- package/lib/host-packages/openai/openplanr/skills/ship/references/fail-first.md +40 -0
- package/lib/host-packages/openai/openplanr/skills/ship/references/result-contract.md +7 -3
- package/package.json +8 -8
- package/dist/dashboard/assets/index-BU5fzjyz.css +0 -1
- package/dist/dashboard/assets/index-B_96uzCl.js +0 -572
- package/dist/dashboard/assets/index-B_96uzCl.js.map +0 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-artifact-shell.mjs +0 -1774
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-chunked-workspace-client.mjs +0 -555
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-compression.mjs +0 -4180
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-document.mjs +0 -2937
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-encrypted-workspace-client.mjs +0 -647
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-entities.mjs +0 -439
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-handoff.mjs +0 -1576
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-loopback-server.mjs +0 -359
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-owner-custody.mjs +0 -129
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-parse5-parser.mjs +0 -3970
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-parse5-tokenizer.mjs +0 -3501
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-resource-pack.mjs +0 -698
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-review.mjs +0 -3385
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-runtime-home.mjs +0 -39
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-runtime-support-25485dbf1cb2.mjs +0 -24
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-sandbox-guards.mjs +0 -1102
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-share.mjs +0 -1993
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-3d9b1a86.mjs +0 -1113
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-shared-artifact-support-protocol-contracts-ea2cd15e.mjs +0 -505
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-shared-protocol-contracts-75a938cc.mjs +0 -222
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-shared-protocol-contracts-b5f28f94.mjs +0 -5907
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-upload-spool.mjs +0 -198
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design.mjs +0 -1430
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +0 -2050
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/lib/artifact/ui/studio-shell.css +0 -2
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/01-module-runtime.js +0 -18
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/02-artifact-review-ui.js +0 -809
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +0 -5693
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/04-compression.js +0 -4175
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/05-artifact-sharing.js +0 -65
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/06-artifact-review-ui.js +0 -1755
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/07-artifact-sharing.js +0 -62
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/08-artifact-review-ui.js +0 -2633
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +0 -124
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/package.json +0 -65
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/enhancements.css +0 -388
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/handoff-center.css +0 -81
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/share.css +0 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/share.js +0 -133
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +0 -1159
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/01-module-runtime.js +0 -30
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +0 -900
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/03-react-dom-client-fiber-foundations.js +0 -2261
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/04-react-dom-client-reconciliation-hooks.js +0 -1595
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/05-react-dom-client-render-phases.js +0 -1467
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/06-react-dom-client-commit-effects.js +0 -1860
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/07-react-dom-client-work-loop-scheduling.js +0 -914
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/08-react-dom-client-dom-events-properties-hydration.js +0 -2578
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +0 -582
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/10-react.js +0 -17
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/11-artifact-review-ui.js +0 -12
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-protocol-contracts.js +0 -285
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-design-review-experience.js +0 -2773
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-studio-shell.js +0 -134
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-canvas-engine.js +0 -2207
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-design-review-experience.js +0 -16
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/17-studio-shell.js +0 -8
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/18-interface-primitives.js +0 -3883
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/19-interface-primitives.js +0 -966
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/20-studio-shell.js +0 -520
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/21-design-studio.js +0 -1597
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +0 -311
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +0 -159
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/registries/artifact-theme.json +0 -64
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +0 -90
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +0 -142
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +0 -49
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +0 -97
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +0 -584
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +0 -191
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +0 -407
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +0 -106
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-handoff-readiness.schema.json +0 -398
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-implementation-handoff.schema.json +0 -518
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-planning-lineage.schema.json +0 -106
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +0 -107
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.14.0/artifact-theme.schema.json +0 -316
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.16.0/artifact-envelope.schema.json +0 -408
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.16.0/design-review-bundle.schema.json +0 -590
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0/design-document.schema.json +0 -506
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0/design-review-bundle.schema.json +0 -822
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +0 -346
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +0 -108
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +0 -170
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +0 -97
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +0 -56
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +0 -5468
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/design.mjs +0 -2844
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +0 -21
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +0 -159
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +0 -97
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/integration-transaction.mjs +0 -958
- package/lib/host-packages/claude/openplanr/skills/design/scripts/design.mjs +0 -12
- package/lib/host-packages/claude/openplanr/skills/design-loop/scripts/design.mjs +0 -12
- package/lib/host-packages/claude/openplanr/skills/design-review/scripts/design.mjs +0 -12
- package/lib/host-packages/claude/openplanr/skills/plan/scripts/design.mjs +0 -12
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/integration-transaction.mjs +0 -958
- package/lib/host-packages/cursor/openplanr/rules/planr-design/scripts/design.mjs +0 -12
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/scripts/design.mjs +0 -12
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/scripts/design.mjs +0 -12
- package/lib/host-packages/cursor/openplanr/rules/planr-plan/scripts/design.mjs +0 -12
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-artifact-shell.mjs +0 -1774
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-chunked-workspace-client.mjs +0 -555
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-compression.mjs +0 -4180
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-document.mjs +0 -2937
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-encrypted-workspace-client.mjs +0 -647
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-entities.mjs +0 -439
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-handoff.mjs +0 -1576
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-loopback-server.mjs +0 -359
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-owner-custody.mjs +0 -129
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-parse5-parser.mjs +0 -3970
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-parse5-tokenizer.mjs +0 -3501
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-resource-pack.mjs +0 -698
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-review.mjs +0 -3385
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-runtime-home.mjs +0 -39
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-runtime-support-25485dbf1cb2.mjs +0 -24
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-sandbox-guards.mjs +0 -1102
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-share.mjs +0 -1993
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-3d9b1a86.mjs +0 -1113
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-shared-artifact-support-protocol-contracts-ea2cd15e.mjs +0 -505
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-shared-protocol-contracts-75a938cc.mjs +0 -222
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-shared-protocol-contracts-b5f28f94.mjs +0 -5907
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-upload-spool.mjs +0 -198
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design.mjs +0 -1430
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +0 -2050
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/lib/artifact/ui/studio-shell.css +0 -2
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/01-module-runtime.js +0 -18
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/02-artifact-review-ui.js +0 -809
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +0 -5693
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/04-compression.js +0 -4175
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/05-artifact-sharing.js +0 -65
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/06-artifact-review-ui.js +0 -1755
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/07-artifact-sharing.js +0 -62
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/08-artifact-review-ui.js +0 -2633
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +0 -124
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/package.json +0 -65
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/enhancements.css +0 -388
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/handoff-center.css +0 -81
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/share.css +0 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/share.js +0 -133
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +0 -1159
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/01-module-runtime.js +0 -30
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +0 -900
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/03-react-dom-client-fiber-foundations.js +0 -2261
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/04-react-dom-client-reconciliation-hooks.js +0 -1595
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/05-react-dom-client-render-phases.js +0 -1467
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/06-react-dom-client-commit-effects.js +0 -1860
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/07-react-dom-client-work-loop-scheduling.js +0 -914
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/08-react-dom-client-dom-events-properties-hydration.js +0 -2578
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +0 -582
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/10-react.js +0 -17
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/11-artifact-review-ui.js +0 -12
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-protocol-contracts.js +0 -285
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-design-review-experience.js +0 -2773
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-studio-shell.js +0 -134
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-canvas-engine.js +0 -2207
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-design-review-experience.js +0 -16
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/17-studio-shell.js +0 -8
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/18-interface-primitives.js +0 -3883
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/19-interface-primitives.js +0 -966
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/20-studio-shell.js +0 -520
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/21-design-studio.js +0 -1597
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +0 -311
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +0 -159
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/registries/artifact-theme.json +0 -64
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +0 -90
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +0 -142
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +0 -49
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +0 -97
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +0 -584
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +0 -191
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +0 -407
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +0 -106
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-handoff-readiness.schema.json +0 -398
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-implementation-handoff.schema.json +0 -518
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-planning-lineage.schema.json +0 -106
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +0 -107
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.14.0/artifact-theme.schema.json +0 -316
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.16.0/artifact-envelope.schema.json +0 -408
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.16.0/design-review-bundle.schema.json +0 -590
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0/design-document.schema.json +0 -506
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0/design-review-bundle.schema.json +0 -822
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +0 -346
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +0 -108
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +0 -170
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +0 -97
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +0 -56
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +0 -5468
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/design.mjs +0 -2844
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +0 -21
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +0 -159
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +0 -97
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-artifact-shell.mjs +0 -1774
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-chunked-workspace-client.mjs +0 -555
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-compression.mjs +0 -4180
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-document.mjs +0 -2937
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-encrypted-workspace-client.mjs +0 -647
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-entities.mjs +0 -439
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-handoff.mjs +0 -1576
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-loopback-server.mjs +0 -359
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-owner-custody.mjs +0 -129
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-parse5-parser.mjs +0 -3970
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-parse5-tokenizer.mjs +0 -3501
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-resource-pack.mjs +0 -698
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-review.mjs +0 -3385
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-runtime-home.mjs +0 -39
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-runtime-support-25485dbf1cb2.mjs +0 -24
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-sandbox-guards.mjs +0 -1102
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-share.mjs +0 -1993
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-3d9b1a86.mjs +0 -1113
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-shared-artifact-support-protocol-contracts-ea2cd15e.mjs +0 -505
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-shared-protocol-contracts-75a938cc.mjs +0 -222
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-shared-protocol-contracts-b5f28f94.mjs +0 -5907
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-upload-spool.mjs +0 -198
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design.mjs +0 -1430
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +0 -2050
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/lib/artifact/ui/studio-shell.css +0 -2
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/01-module-runtime.js +0 -18
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/02-artifact-review-ui.js +0 -809
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +0 -5693
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/04-compression.js +0 -4175
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/05-artifact-sharing.js +0 -65
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/06-artifact-review-ui.js +0 -1755
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/07-artifact-sharing.js +0 -62
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/08-artifact-review-ui.js +0 -2633
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +0 -124
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/package.json +0 -65
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/enhancements.css +0 -388
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/handoff-center.css +0 -81
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/share.css +0 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/share.js +0 -133
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +0 -1159
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/01-module-runtime.js +0 -30
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +0 -900
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/03-react-dom-client-fiber-foundations.js +0 -2261
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/04-react-dom-client-reconciliation-hooks.js +0 -1595
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/05-react-dom-client-render-phases.js +0 -1467
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/06-react-dom-client-commit-effects.js +0 -1860
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/07-react-dom-client-work-loop-scheduling.js +0 -914
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/08-react-dom-client-dom-events-properties-hydration.js +0 -2578
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +0 -582
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/10-react.js +0 -17
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/11-artifact-review-ui.js +0 -12
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-protocol-contracts.js +0 -285
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-design-review-experience.js +0 -2773
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-studio-shell.js +0 -134
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-canvas-engine.js +0 -2207
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-design-review-experience.js +0 -16
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/17-studio-shell.js +0 -8
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/18-interface-primitives.js +0 -3883
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/19-interface-primitives.js +0 -966
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/20-studio-shell.js +0 -520
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/21-design-studio.js +0 -1597
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +0 -311
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +0 -159
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/registries/artifact-theme.json +0 -64
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.0.0/design-manifest.schema.json +0 -90
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-envelope.schema.json +0 -142
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-paste.schema.json +0 -49
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +0 -97
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-bundle.schema.json +0 -584
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-context.schema.json +0 -191
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-handoff.schema.json +0 -407
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.10.0/design-review-metadata-payload.schema.json +0 -106
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-handoff-readiness.schema.json +0 -398
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-implementation-handoff.schema.json +0 -518
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-planning-lineage.schema.json +0 -106
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.11.0/design-review-metadata-payload.schema.json +0 -107
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.14.0/artifact-theme.schema.json +0 -316
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.16.0/artifact-envelope.schema.json +0 -408
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.16.0/design-review-bundle.schema.json +0 -590
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0/design-document.schema.json +0 -506
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.22.0/design-review-bundle.schema.json +0 -822
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-bundle.schema.json +0 -346
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-review-workspace.schema.json +0 -108
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-create.schema.json +0 -170
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-event.schema.json +0 -97
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/schemas/v1.9.0/design-workspace-revision.schema.json +0 -56
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +0 -5468
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/design.mjs +0 -2844
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/runtime/notices/THIRD_PARTY_NOTICES.txt +0 -21
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +0 -159
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/runtime/packages/protocol/schemas/v1.1.0/artifact-review.schema.json +0 -97
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/integration-transaction.mjs +0 -958
- package/lib/host-packages/openai/openplanr/skills/design/scripts/design.mjs +0 -12
- package/lib/host-packages/openai/openplanr/skills/design-loop/scripts/design.mjs +0 -12
- package/lib/host-packages/openai/openplanr/skills/design-review/scripts/design.mjs +0 -12
- package/lib/host-packages/openai/openplanr/skills/plan/scripts/design.mjs +0 -12
|
@@ -1,647 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
canonicalizeJson,
|
|
3
|
-
sha256Hex
|
|
4
|
-
} from "./design-shared-protocol-contracts-75a938cc.mjs";
|
|
5
|
-
|
|
6
|
-
// packages/artifact/lib/artifact/internal/workspace-address.mjs
|
|
7
|
-
function createWorkspaceAddress({
|
|
8
|
-
label,
|
|
9
|
-
reviewPath,
|
|
10
|
-
defaultBaseUrl = "https://share.openplanr.dev"
|
|
11
|
-
}) {
|
|
12
|
-
function normalizeWorkspaceBase(baseUrl = defaultBaseUrl) {
|
|
13
|
-
const url = new URL(baseUrl);
|
|
14
|
-
if (url.username || url.password || url.search || url.hash || url.pathname !== "/" || url.protocol !== "https:" && !(url.protocol === "http:" && ["localhost", "127.0.0.1", "[::1]"].includes(url.hostname)))
|
|
15
|
-
throw new TypeError(
|
|
16
|
-
`${label} sharing requires an HTTPS origin or a local development server.`
|
|
17
|
-
);
|
|
18
|
-
return url.origin;
|
|
19
|
-
}
|
|
20
|
-
function workspaceReviewUrl(access) {
|
|
21
|
-
if (!/^[A-Za-z0-9_-]{22,64}$/.test(access.id))
|
|
22
|
-
throw new TypeError(`Invalid ${label.toLowerCase()} workspace identity.`);
|
|
23
|
-
return `${normalizeWorkspaceBase(access.baseUrl)}${reviewPath}/${access.id}`;
|
|
24
|
-
}
|
|
25
|
-
return { normalizeWorkspaceBase, workspaceReviewUrl };
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
// packages/artifact/lib/artifact/encrypted-workspace-client.mjs
|
|
29
|
-
function createEncryptedWorkspaceClient({
|
|
30
|
-
domain,
|
|
31
|
-
apiPath,
|
|
32
|
-
reviewPath,
|
|
33
|
-
label,
|
|
34
|
-
compatibilityMessage,
|
|
35
|
-
compatibilityCode = "E_WORKSPACE_UNSUPPORTED",
|
|
36
|
-
defaultBaseUrl = "https://share.openplanr.dev",
|
|
37
|
-
version = "1.0.0",
|
|
38
|
-
maxBytes = 5 * 1024 * 1024,
|
|
39
|
-
maxEventBytes = 256 * 1024,
|
|
40
|
-
schemas,
|
|
41
|
-
assertContract,
|
|
42
|
-
assertBundle,
|
|
43
|
-
assertFeedback,
|
|
44
|
-
bundleDigest,
|
|
45
|
-
digestInput = (bundle) => bundle,
|
|
46
|
-
packBundle = async (bundle) => bundle,
|
|
47
|
-
unpackBundle = async (bundle) => bundle
|
|
48
|
-
}) {
|
|
49
|
-
if (!domain || !apiPath?.startsWith("/") || !reviewPath?.startsWith("/") || !label)
|
|
50
|
-
throw new TypeError("An encrypted workspace requires an explicit domain and routes.");
|
|
51
|
-
const encoder = new TextEncoder();
|
|
52
|
-
const decoder = new TextDecoder("utf-8", { fatal: true });
|
|
53
|
-
const tokenPattern = /^[A-Za-z0-9_-]{43}$/;
|
|
54
|
-
const idPattern = /^[A-Za-z0-9_-]{22,64}$/;
|
|
55
|
-
const ec = { name: "ECDSA", namedCurve: "P-256" };
|
|
56
|
-
const signatureAlgorithm = { name: "ECDSA", hash: "SHA-256" };
|
|
57
|
-
const omitSignature = ({ signature: _signature, ...value }) => value;
|
|
58
|
-
const operationError = (message, code, status) => Object.assign(new Error(message), { code, ...status ? { status } : {} });
|
|
59
|
-
function encodeWorkspaceBytes(bytes) {
|
|
60
|
-
let binary = "";
|
|
61
|
-
for (let offset = 0; offset < bytes.length; offset += 8192)
|
|
62
|
-
binary += String.fromCharCode(...bytes.subarray(offset, offset + 8192));
|
|
63
|
-
return btoa(binary).replaceAll("+", "-").replaceAll("/", "_").replace(/=+$/u, "");
|
|
64
|
-
}
|
|
65
|
-
function decodeWorkspaceBytes(value) {
|
|
66
|
-
if (typeof value !== "string" || !/^[A-Za-z0-9_-]+$/u.test(value))
|
|
67
|
-
throw new TypeError("Invalid encoded workspace value.");
|
|
68
|
-
const decoded = Uint8Array.from(
|
|
69
|
-
atob(value.replaceAll("-", "+").replaceAll("_", "/")),
|
|
70
|
-
(char) => char.charCodeAt(0)
|
|
71
|
-
);
|
|
72
|
-
if (encodeWorkspaceBytes(decoded) !== value)
|
|
73
|
-
throw new TypeError("Noncanonical encoded workspace value.");
|
|
74
|
-
return decoded;
|
|
75
|
-
}
|
|
76
|
-
function newWorkspaceToken() {
|
|
77
|
-
return encodeWorkspaceBytes(crypto.getRandomValues(new Uint8Array(32)));
|
|
78
|
-
}
|
|
79
|
-
function newWorkspaceId() {
|
|
80
|
-
return encodeWorkspaceBytes(crypto.getRandomValues(new Uint8Array(18)));
|
|
81
|
-
}
|
|
82
|
-
const { normalizeWorkspaceBase, workspaceReviewUrl } = createWorkspaceAddress({
|
|
83
|
-
label,
|
|
84
|
-
reviewPath,
|
|
85
|
-
defaultBaseUrl
|
|
86
|
-
});
|
|
87
|
-
async function tokenMaterial(token, id, purpose) {
|
|
88
|
-
if (!tokenPattern.test(token) || decodeWorkspaceBytes(token).length !== 32 || !idPattern.test(id))
|
|
89
|
-
throw new TypeError("Enter the complete generated access token.");
|
|
90
|
-
const key = await crypto.subtle.importKey("raw", decodeWorkspaceBytes(token), "HKDF", false, [
|
|
91
|
-
"deriveBits"
|
|
92
|
-
]);
|
|
93
|
-
return new Uint8Array(
|
|
94
|
-
await crypto.subtle.deriveBits(
|
|
95
|
-
{
|
|
96
|
-
name: "HKDF",
|
|
97
|
-
hash: "SHA-256",
|
|
98
|
-
salt: encoder.encode(id),
|
|
99
|
-
info: encoder.encode(`${domain}/${purpose}`)
|
|
100
|
-
},
|
|
101
|
-
key,
|
|
102
|
-
256
|
|
103
|
-
)
|
|
104
|
-
);
|
|
105
|
-
}
|
|
106
|
-
async function deriveWorkspaceAuthentication(token, id) {
|
|
107
|
-
return encodeWorkspaceBytes(await tokenMaterial(token, id, "reviewer-auth"));
|
|
108
|
-
}
|
|
109
|
-
function canonicalWorkspacePublicKey(value) {
|
|
110
|
-
if (value?.kty !== "EC" || value.crv !== "P-256" || !tokenPattern.test(value.x ?? "") || !tokenPattern.test(value.y ?? "") || "d" in value) {
|
|
111
|
-
throw new TypeError(`Invalid ${label.toLowerCase()} workspace public key.`);
|
|
112
|
-
}
|
|
113
|
-
return { kty: "EC", crv: "P-256", x: value.x, y: value.y };
|
|
114
|
-
}
|
|
115
|
-
async function createWorkspaceSigner() {
|
|
116
|
-
const pair = await crypto.subtle.generateKey(ec, true, ["sign", "verify"]);
|
|
117
|
-
return {
|
|
118
|
-
privateKey: encodeWorkspaceBytes(
|
|
119
|
-
new Uint8Array(await crypto.subtle.exportKey("pkcs8", pair.privateKey))
|
|
120
|
-
),
|
|
121
|
-
publicKey: canonicalWorkspacePublicKey(await crypto.subtle.exportKey("jwk", pair.publicKey))
|
|
122
|
-
};
|
|
123
|
-
}
|
|
124
|
-
async function signWorkspaceValue(value, privateKey) {
|
|
125
|
-
const key = await crypto.subtle.importKey(
|
|
126
|
-
"pkcs8",
|
|
127
|
-
decodeWorkspaceBytes(privateKey),
|
|
128
|
-
ec,
|
|
129
|
-
false,
|
|
130
|
-
["sign"]
|
|
131
|
-
);
|
|
132
|
-
const signature = await crypto.subtle.sign(
|
|
133
|
-
signatureAlgorithm,
|
|
134
|
-
key,
|
|
135
|
-
encoder.encode(canonicalizeJson(omitSignature(value)))
|
|
136
|
-
);
|
|
137
|
-
return { ...omitSignature(value), signature: encodeWorkspaceBytes(new Uint8Array(signature)) };
|
|
138
|
-
}
|
|
139
|
-
async function verifyWorkspaceSignature(value, publicKey) {
|
|
140
|
-
try {
|
|
141
|
-
const key = await crypto.subtle.importKey("jwk", publicKey, ec, false, ["verify"]);
|
|
142
|
-
return await crypto.subtle.verify(
|
|
143
|
-
signatureAlgorithm,
|
|
144
|
-
key,
|
|
145
|
-
decodeWorkspaceBytes(value.signature),
|
|
146
|
-
encoder.encode(canonicalizeJson(omitSignature(value)))
|
|
147
|
-
);
|
|
148
|
-
} catch {
|
|
149
|
-
return false;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
async function seal(value, rawKey, context, limit = maxBytes) {
|
|
153
|
-
const bytes = encoder.encode(canonicalizeJson(value));
|
|
154
|
-
if (bytes.length + 16 > limit)
|
|
155
|
-
throw Object.assign(
|
|
156
|
-
new RangeError(
|
|
157
|
-
`Encrypted ${label.toLowerCase()} data exceeds the ${Math.floor(limit / 1024)} KB upload limit.`
|
|
158
|
-
),
|
|
159
|
-
{ code: "E_WORKSPACE_PAYLOAD_TOO_LARGE", status: 413 }
|
|
160
|
-
);
|
|
161
|
-
const key = await crypto.subtle.importKey("raw", rawKey, "AES-GCM", false, ["encrypt"]);
|
|
162
|
-
const iv = crypto.getRandomValues(new Uint8Array(12));
|
|
163
|
-
const ciphertext = await crypto.subtle.encrypt(
|
|
164
|
-
{ name: "AES-GCM", iv, additionalData: encoder.encode(canonicalizeJson(context)) },
|
|
165
|
-
key,
|
|
166
|
-
bytes
|
|
167
|
-
);
|
|
168
|
-
return {
|
|
169
|
-
iv: encodeWorkspaceBytes(iv),
|
|
170
|
-
ciphertext: encodeWorkspaceBytes(new Uint8Array(ciphertext))
|
|
171
|
-
};
|
|
172
|
-
}
|
|
173
|
-
async function unseal(value, rawKey, context, limit = maxBytes) {
|
|
174
|
-
const bytes = decodeWorkspaceBytes(value.ciphertext);
|
|
175
|
-
if (bytes.length > limit)
|
|
176
|
-
throw new RangeError(`Shared ${label.toLowerCase()} data exceeds its size limit.`);
|
|
177
|
-
const key = await crypto.subtle.importKey("raw", rawKey, "AES-GCM", false, ["decrypt"]);
|
|
178
|
-
const plaintext = await crypto.subtle.decrypt(
|
|
179
|
-
{
|
|
180
|
-
name: "AES-GCM",
|
|
181
|
-
iv: decodeWorkspaceBytes(value.iv),
|
|
182
|
-
additionalData: encoder.encode(canonicalizeJson(context))
|
|
183
|
-
},
|
|
184
|
-
key,
|
|
185
|
-
bytes
|
|
186
|
-
);
|
|
187
|
-
return JSON.parse(decoder.decode(plaintext));
|
|
188
|
-
}
|
|
189
|
-
const keyringContext = (id, epoch) => ({ type: "keyring", workspaceId: id, epoch });
|
|
190
|
-
const revisionContext = (id, revision) => ({
|
|
191
|
-
type: "revision",
|
|
192
|
-
workspaceId: id,
|
|
193
|
-
id: revision.id,
|
|
194
|
-
epoch: revision.epoch,
|
|
195
|
-
reviewOf: revision.reviewOf
|
|
196
|
-
});
|
|
197
|
-
const eventContext = (id, event) => ({
|
|
198
|
-
type: "event",
|
|
199
|
-
workspaceId: id,
|
|
200
|
-
id: event.id,
|
|
201
|
-
epoch: event.epoch,
|
|
202
|
-
revisionId: event.revisionId,
|
|
203
|
-
reviewOf: event.reviewOf
|
|
204
|
-
});
|
|
205
|
-
function workspaceEnvelopeDigest(value) {
|
|
206
|
-
return bundleDigest(value);
|
|
207
|
-
}
|
|
208
|
-
async function wrapKeyring(custody, token = custody.token, epoch = custody.epoch, keys = custody.keys) {
|
|
209
|
-
return seal(
|
|
210
|
-
{ keys, ownerPublicKey: custody.ownerPublicKey },
|
|
211
|
-
await tokenMaterial(token, custody.id, "key-wrap"),
|
|
212
|
-
keyringContext(custody.id, epoch)
|
|
213
|
-
);
|
|
214
|
-
}
|
|
215
|
-
async function prepareRevision(custody, bundle) {
|
|
216
|
-
assertBundle(bundle);
|
|
217
|
-
const header = {
|
|
218
|
-
id: newWorkspaceId(),
|
|
219
|
-
epoch: custody.epoch,
|
|
220
|
-
reviewOf: workspaceEnvelopeDigest(digestInput(bundle)),
|
|
221
|
-
createdAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
222
|
-
};
|
|
223
|
-
return signWorkspaceValue(
|
|
224
|
-
{
|
|
225
|
-
...header,
|
|
226
|
-
...await seal(
|
|
227
|
-
await packBundle(bundle),
|
|
228
|
-
decodeWorkspaceBytes(custody.keys[custody.epoch]),
|
|
229
|
-
revisionContext(custody.id, header)
|
|
230
|
-
)
|
|
231
|
-
},
|
|
232
|
-
custody.ownerPrivateKey
|
|
233
|
-
);
|
|
234
|
-
}
|
|
235
|
-
async function prepareWorkspace(bundle, { baseUrl = defaultBaseUrl } = {}) {
|
|
236
|
-
const signer = await createWorkspaceSigner();
|
|
237
|
-
const custody = {
|
|
238
|
-
schemaVersion: version,
|
|
239
|
-
id: newWorkspaceId(),
|
|
240
|
-
baseUrl: normalizeWorkspaceBase(baseUrl),
|
|
241
|
-
token: newWorkspaceToken(),
|
|
242
|
-
ownerAuth: newWorkspaceToken(),
|
|
243
|
-
ownerPrivateKey: signer.privateKey,
|
|
244
|
-
ownerPublicKey: signer.publicKey,
|
|
245
|
-
epoch: 1,
|
|
246
|
-
keys: { 1: newWorkspaceToken() },
|
|
247
|
-
version: 0
|
|
248
|
-
};
|
|
249
|
-
custody.keyring = await wrapKeyring(custody);
|
|
250
|
-
custody.pendingCreate = await signWorkspaceValue(
|
|
251
|
-
{
|
|
252
|
-
schemaVersion: version,
|
|
253
|
-
id: custody.id,
|
|
254
|
-
ownerPublicKey: custody.ownerPublicKey,
|
|
255
|
-
ownerAuthHash: sha256Hex(custody.ownerAuth),
|
|
256
|
-
reviewerAuthHash: sha256Hex(await deriveWorkspaceAuthentication(custody.token, custody.id)),
|
|
257
|
-
epoch: 1,
|
|
258
|
-
keyring: custody.keyring,
|
|
259
|
-
revision: await prepareRevision(custody, bundle),
|
|
260
|
-
operationId: newWorkspaceId()
|
|
261
|
-
},
|
|
262
|
-
custody.ownerPrivateKey
|
|
263
|
-
);
|
|
264
|
-
assertContract(custody.pendingCreate, schemas.create);
|
|
265
|
-
return custody;
|
|
266
|
-
}
|
|
267
|
-
async function request(access, suffix = "", {
|
|
268
|
-
method = "GET",
|
|
269
|
-
body,
|
|
270
|
-
fetchImpl = globalThis.fetch,
|
|
271
|
-
owner = Boolean(access.ownerAuth),
|
|
272
|
-
timeoutMs = 2e4
|
|
273
|
-
} = {}) {
|
|
274
|
-
if (!idPattern.test(access.id))
|
|
275
|
-
throw new TypeError(`Invalid ${label.toLowerCase()} workspace identity.`);
|
|
276
|
-
const authorization = owner ? access.ownerAuth : await deriveWorkspaceAuthentication(access.token, access.id);
|
|
277
|
-
const headers = { Authorization: `Bearer ${authorization}`, Accept: "application/json" };
|
|
278
|
-
if (body) headers["Content-Type"] = "application/json";
|
|
279
|
-
let response;
|
|
280
|
-
try {
|
|
281
|
-
response = await fetchImpl(
|
|
282
|
-
`${normalizeWorkspaceBase(access.baseUrl)}${apiPath}/${access.id}${suffix}`,
|
|
283
|
-
{
|
|
284
|
-
method,
|
|
285
|
-
headers,
|
|
286
|
-
body: body ? JSON.stringify(body) : void 0,
|
|
287
|
-
redirect: "error",
|
|
288
|
-
cache: "no-store",
|
|
289
|
-
credentials: "omit",
|
|
290
|
-
signal: AbortSignal.timeout(timeoutMs)
|
|
291
|
-
}
|
|
292
|
-
);
|
|
293
|
-
} catch {
|
|
294
|
-
throw operationError(
|
|
295
|
-
`${label} sharing is unreachable. Check the connection and retry; the previous review is unchanged.`,
|
|
296
|
-
"E_WORKSPACE_NETWORK"
|
|
297
|
-
);
|
|
298
|
-
}
|
|
299
|
-
if (!response.ok) await throwResponseError(response, method);
|
|
300
|
-
return readResponse(response);
|
|
301
|
-
}
|
|
302
|
-
async function throwResponseError(response, method) {
|
|
303
|
-
if (response.status === 404 && method === "PUT" && compatibilityMessage) {
|
|
304
|
-
const error2 = new Error(compatibilityMessage);
|
|
305
|
-
error2.code = compatibilityCode;
|
|
306
|
-
error2.status = 404;
|
|
307
|
-
throw error2;
|
|
308
|
-
}
|
|
309
|
-
const messages = {
|
|
310
|
-
401: "Access token is incorrect or has been rotated.",
|
|
311
|
-
403: "This review is unavailable or this action requires its owner.",
|
|
312
|
-
404: "This shared review could not be found.",
|
|
313
|
-
409: "The shared review changed. Refresh its status before retrying.",
|
|
314
|
-
410: "This shared review has been revoked or deleted.",
|
|
315
|
-
413: `This ${label.toLowerCase()} exceeds the sharing upload limit.`,
|
|
316
|
-
429: "Too many requests. Wait a moment and retry.",
|
|
317
|
-
503: `${label} sharing is temporarily unavailable. Retry shortly.`
|
|
318
|
-
};
|
|
319
|
-
const error = new Error(
|
|
320
|
-
messages[response.status] ?? `${label} sharing failed (${response.status}). Retry shortly.`
|
|
321
|
-
);
|
|
322
|
-
error.status = response.status;
|
|
323
|
-
error.code = `E_WORKSPACE_HTTP_${response.status}`;
|
|
324
|
-
try {
|
|
325
|
-
const reader = response.body?.getReader();
|
|
326
|
-
const body = reader && JSON.parse(decoder.decode(await responseBytes(reader, 4096)));
|
|
327
|
-
if (typeof body?.error === "string" && /^[A-Za-z][A-Za-z0-9_-]{0,127}$/u.test(body.error))
|
|
328
|
-
error.code = body.error;
|
|
329
|
-
} catch {
|
|
330
|
-
}
|
|
331
|
-
if (response.status === 429) {
|
|
332
|
-
const header = response.headers.get("retry-after");
|
|
333
|
-
const seconds = header && /^\d+(?:\.\d+)?$/u.test(header.trim()) ? Number(header) : header ? (Date.parse(header) - Date.now()) / 1e3 : NaN;
|
|
334
|
-
if (Number.isFinite(seconds) && seconds >= 0)
|
|
335
|
-
error.retryAfterSeconds = Math.min(3600, Math.max(1, Math.ceil(seconds)));
|
|
336
|
-
}
|
|
337
|
-
throw error;
|
|
338
|
-
}
|
|
339
|
-
async function responseBytes(reader, limit) {
|
|
340
|
-
const chunks = [];
|
|
341
|
-
let length = 0;
|
|
342
|
-
try {
|
|
343
|
-
for (; ; ) {
|
|
344
|
-
const { value, done } = await reader.read();
|
|
345
|
-
if (done) break;
|
|
346
|
-
length += value.length;
|
|
347
|
-
if (length > limit) {
|
|
348
|
-
await reader.cancel();
|
|
349
|
-
throw new RangeError(`${label} service returned an oversized response.`);
|
|
350
|
-
}
|
|
351
|
-
chunks.push(value);
|
|
352
|
-
}
|
|
353
|
-
} catch (error) {
|
|
354
|
-
if (error instanceof RangeError) throw error;
|
|
355
|
-
throw new Error("The sharing response was interrupted. Retry the pending operation.");
|
|
356
|
-
}
|
|
357
|
-
const bytes = new Uint8Array(length);
|
|
358
|
-
let offset = 0;
|
|
359
|
-
for (const chunk of chunks) {
|
|
360
|
-
bytes.set(chunk, offset);
|
|
361
|
-
offset += chunk.length;
|
|
362
|
-
}
|
|
363
|
-
return bytes;
|
|
364
|
-
}
|
|
365
|
-
async function readResponse(response) {
|
|
366
|
-
if (response.status === 204) return {};
|
|
367
|
-
const reader = response.body?.getReader();
|
|
368
|
-
if (!reader) throw new Error(`${label} service returned an empty response.`);
|
|
369
|
-
try {
|
|
370
|
-
return JSON.parse(decoder.decode(await responseBytes(reader, maxBytes * 1.5 + 65536)));
|
|
371
|
-
} catch (cause) {
|
|
372
|
-
throw Object.assign(
|
|
373
|
-
operationError(
|
|
374
|
-
"The sharing response could not be verified. Retry the pending operation.",
|
|
375
|
-
"E_WORKSPACE_RESPONSE_INVALID"
|
|
376
|
-
),
|
|
377
|
-
{ cause }
|
|
378
|
-
);
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
async function commitWorkspace(custody, options = {}) {
|
|
382
|
-
if (!custody.pendingCreate) return getWorkspace(custody, options);
|
|
383
|
-
const result = await request(custody, "", {
|
|
384
|
-
...options,
|
|
385
|
-
method: "PUT",
|
|
386
|
-
body: custody.pendingCreate
|
|
387
|
-
});
|
|
388
|
-
assertContract(result, schemas.workspace);
|
|
389
|
-
if (result.id !== custody.id || result.version !== 1 || result.epoch !== 1 || result.currentRevision !== custody.pendingCreate.revision.id || canonicalizeJson(result.ownerPublicKey) !== canonicalizeJson(custody.ownerPublicKey) || canonicalizeJson(result.keyring) !== canonicalizeJson(custody.keyring))
|
|
390
|
-
throw new Error("The sharing creation receipt is invalid. Retry the saved operation.");
|
|
391
|
-
custody.version = result.version;
|
|
392
|
-
custody.currentRevision = result.currentRevision;
|
|
393
|
-
delete custody.pendingCreate;
|
|
394
|
-
return result;
|
|
395
|
-
}
|
|
396
|
-
async function getWorkspace(access, options = {}) {
|
|
397
|
-
const result = assertContract(await request(access, "", options), schemas.workspace);
|
|
398
|
-
if (result.id !== access.id) throw new Error("Shared review identity mismatch.");
|
|
399
|
-
const ring = await unseal(
|
|
400
|
-
result.keyring,
|
|
401
|
-
await tokenMaterial(access.token, access.id, "key-wrap"),
|
|
402
|
-
keyringContext(access.id, result.epoch)
|
|
403
|
-
);
|
|
404
|
-
if (canonicalizeJson(ring.ownerPublicKey) !== canonicalizeJson(result.ownerPublicKey) || access.ownerPublicKey && canonicalizeJson(access.ownerPublicKey) !== canonicalizeJson(result.ownerPublicKey))
|
|
405
|
-
throw new Error("Shared review owner identity changed.");
|
|
406
|
-
if (!ring.keys?.[result.epoch] || Object.entries(ring.keys).some(
|
|
407
|
-
([keyEpoch, key]) => !/^[1-9][0-9]*$/u.test(keyEpoch) || !tokenPattern.test(key)
|
|
408
|
-
))
|
|
409
|
-
throw new Error("Invalid shared review key history.");
|
|
410
|
-
Object.assign(access, {
|
|
411
|
-
keys: ring.keys,
|
|
412
|
-
ownerPublicKey: result.ownerPublicKey,
|
|
413
|
-
epoch: result.epoch,
|
|
414
|
-
keyring: result.keyring,
|
|
415
|
-
version: result.version,
|
|
416
|
-
currentRevision: result.currentRevision,
|
|
417
|
-
commentsPaused: result.commentsPaused
|
|
418
|
-
});
|
|
419
|
-
return result;
|
|
420
|
-
}
|
|
421
|
-
async function listWorkspaceRevisions(access, { after = "", ...options } = {}) {
|
|
422
|
-
if (after && !idPattern.test(after)) throw new TypeError("Invalid revision cursor.");
|
|
423
|
-
return request(
|
|
424
|
-
access,
|
|
425
|
-
`/revisions${after ? `?after=${encodeURIComponent(after)}` : ""}`,
|
|
426
|
-
options
|
|
427
|
-
);
|
|
428
|
-
}
|
|
429
|
-
async function decryptWorkspaceRevision(access, revisionId = access.currentRevision, options = {}) {
|
|
430
|
-
if (!access.keys) await getWorkspace(access, options);
|
|
431
|
-
if (!idPattern.test(revisionId))
|
|
432
|
-
throw new TypeError(`Invalid ${label.toLowerCase()} revision.`);
|
|
433
|
-
const revision = assertContract(
|
|
434
|
-
await request(access, `/revisions/${revisionId}`, options),
|
|
435
|
-
schemas.revision
|
|
436
|
-
);
|
|
437
|
-
if (revision.id !== revisionId || !await verifyWorkspaceSignature(revision, access.ownerPublicKey))
|
|
438
|
-
throw new Error(`The published ${label.toLowerCase()} signature is invalid.`);
|
|
439
|
-
if (!access.keys[revision.epoch])
|
|
440
|
-
throw new Error("The access token cannot open this revision.");
|
|
441
|
-
const bundle = assertBundle(
|
|
442
|
-
await unpackBundle(
|
|
443
|
-
await unseal(
|
|
444
|
-
revision,
|
|
445
|
-
decodeWorkspaceBytes(access.keys[revision.epoch]),
|
|
446
|
-
revisionContext(access.id, revision)
|
|
447
|
-
)
|
|
448
|
-
)
|
|
449
|
-
);
|
|
450
|
-
if (workspaceEnvelopeDigest(digestInput(bundle)) !== revision.reviewOf)
|
|
451
|
-
throw new Error(`Published ${label.toLowerCase()} content does not match its revision.`);
|
|
452
|
-
return { ...bundle, workspaceRevision: revision.id, reviewOf: revision.reviewOf };
|
|
453
|
-
}
|
|
454
|
-
async function prepareWorkspaceMutation(custody, action, payload = void 0) {
|
|
455
|
-
if (custody.pendingCreate)
|
|
456
|
-
throw new Error("Finish creating this shared review before changing it.");
|
|
457
|
-
if (custody.pendingMutation)
|
|
458
|
-
throw new Error("A sharing operation is pending. Retry it before making another change.");
|
|
459
|
-
const body = {
|
|
460
|
-
operationId: newWorkspaceId(),
|
|
461
|
-
expectedVersion: custody.version,
|
|
462
|
-
epoch: custody.epoch
|
|
463
|
-
};
|
|
464
|
-
let next = {};
|
|
465
|
-
if (action === "publish") body.revision = await prepareRevision(custody, payload);
|
|
466
|
-
else if (action === "rotate") {
|
|
467
|
-
const token = newWorkspaceToken();
|
|
468
|
-
const epoch = custody.epoch + 1;
|
|
469
|
-
const keys = { ...custody.keys, [epoch]: newWorkspaceToken() };
|
|
470
|
-
const keyring = await wrapKeyring(custody, token, epoch, keys);
|
|
471
|
-
Object.assign(body, {
|
|
472
|
-
epoch,
|
|
473
|
-
reviewerAuthHash: sha256Hex(await deriveWorkspaceAuthentication(token, custody.id)),
|
|
474
|
-
keyring
|
|
475
|
-
});
|
|
476
|
-
next = { token, epoch, keys, keyring };
|
|
477
|
-
} else if (["pause", "resume", "revoke", "delete"].includes(action)) body.action = action;
|
|
478
|
-
else throw new TypeError(`Unknown ${label.toLowerCase()} sharing operation.`);
|
|
479
|
-
custody.pendingMutation = {
|
|
480
|
-
action,
|
|
481
|
-
body: await signWorkspaceValue(body, custody.ownerPrivateKey),
|
|
482
|
-
next
|
|
483
|
-
};
|
|
484
|
-
return custody.pendingMutation;
|
|
485
|
-
}
|
|
486
|
-
function assertDeletionReceipt(custody, result) {
|
|
487
|
-
if (result.schemaVersion !== version || result.id !== custody.id || result.deleted !== true || Object.keys(result).some((key) => !["schemaVersion", "id", "deleted"].includes(key)))
|
|
488
|
-
throw new Error("The deletion receipt is invalid. Retry the saved operation.");
|
|
489
|
-
}
|
|
490
|
-
function assertMutationReceipt(custody, pending, result) {
|
|
491
|
-
if (pending.action === "delete") return assertDeletionReceipt(custody, result);
|
|
492
|
-
assertContract(result, schemas.workspace);
|
|
493
|
-
const expectedRevision = pending.action === "publish" ? pending.body.revision.id : custody.currentRevision;
|
|
494
|
-
if (result.id !== custody.id || result.version !== pending.body.expectedVersion + 1 || result.epoch !== pending.body.epoch || result.currentRevision !== expectedRevision || canonicalizeJson(result.ownerPublicKey) !== canonicalizeJson(custody.ownerPublicKey) || canonicalizeJson(result.keyring) !== canonicalizeJson(pending.next.keyring ?? custody.keyring) || ["pause", "resume"].includes(pending.action) && result.commentsPaused !== (pending.action === "pause"))
|
|
495
|
-
throw new Error("The sharing operation receipt is invalid. Retry the saved operation.");
|
|
496
|
-
}
|
|
497
|
-
async function commitWorkspaceMutation(custody, options = {}) {
|
|
498
|
-
const pending = custody.pendingMutation;
|
|
499
|
-
if (!pending) throw new Error("No sharing operation is pending.");
|
|
500
|
-
const suffix = ["publish", "rotate"].includes(pending.action) ? pending.action : "manage";
|
|
501
|
-
const result = await request(custody, `/${suffix}`, {
|
|
502
|
-
...options,
|
|
503
|
-
method: "POST",
|
|
504
|
-
body: pending.body
|
|
505
|
-
});
|
|
506
|
-
assertMutationReceipt(custody, pending, result);
|
|
507
|
-
Object.assign(custody, pending.next, { version: pending.body.expectedVersion + 1 });
|
|
508
|
-
if (pending.action === "publish") custody.currentRevision = pending.body.revision.id;
|
|
509
|
-
if (pending.action === "pause" || pending.action === "resume")
|
|
510
|
-
custody.commentsPaused = pending.action === "pause";
|
|
511
|
-
if (pending.action === "revoke" || pending.action === "delete")
|
|
512
|
-
custody.status = pending.action === "revoke" ? "revoked" : "deleted";
|
|
513
|
-
delete custody.pendingMutation;
|
|
514
|
-
return result;
|
|
515
|
-
}
|
|
516
|
-
async function publishWorkspace(custody, bundle, options = {}) {
|
|
517
|
-
await prepareWorkspaceMutation(custody, "publish", bundle);
|
|
518
|
-
return commitWorkspaceMutation(custody, options);
|
|
519
|
-
}
|
|
520
|
-
async function rotateWorkspace(custody, options = {}) {
|
|
521
|
-
await prepareWorkspaceMutation(custody, "rotate");
|
|
522
|
-
return commitWorkspaceMutation(custody, options);
|
|
523
|
-
}
|
|
524
|
-
async function manageWorkspace(custody, action, options = {}) {
|
|
525
|
-
await prepareWorkspaceMutation(custody, action);
|
|
526
|
-
return commitWorkspaceMutation(custody, options);
|
|
527
|
-
}
|
|
528
|
-
async function prepareWorkspaceEvent(access, payload, { revisionId = access.currentRevision, reviewOf = payload.reviewOf, signer } = {}) {
|
|
529
|
-
if (!access.keys) throw new Error("Unlock the shared review before commenting.");
|
|
530
|
-
assertFeedback(payload);
|
|
531
|
-
const identity = signer ?? await createWorkspaceSigner();
|
|
532
|
-
const publicKey = canonicalWorkspacePublicKey(identity.publicKey);
|
|
533
|
-
const header = { id: newWorkspaceId(), revisionId, reviewOf, epoch: access.epoch };
|
|
534
|
-
const event = await signWorkspaceValue(
|
|
535
|
-
{
|
|
536
|
-
...header,
|
|
537
|
-
...await seal(
|
|
538
|
-
payload,
|
|
539
|
-
decodeWorkspaceBytes(access.keys[access.epoch]),
|
|
540
|
-
eventContext(access.id, header),
|
|
541
|
-
maxEventBytes
|
|
542
|
-
),
|
|
543
|
-
publicKey
|
|
544
|
-
},
|
|
545
|
-
identity.privateKey
|
|
546
|
-
);
|
|
547
|
-
return assertContract(event, schemas.event);
|
|
548
|
-
}
|
|
549
|
-
async function appendWorkspaceEvent(access, payload, { preparedEvent, signer, revisionId, reviewOf, ...options } = {}) {
|
|
550
|
-
const event = preparedEvent ?? await prepareWorkspaceEvent(access, payload, {
|
|
551
|
-
signer,
|
|
552
|
-
revisionId,
|
|
553
|
-
reviewOf: reviewOf ?? payload.reviewOf
|
|
554
|
-
});
|
|
555
|
-
const result = await request(access, "/events", { ...options, method: "POST", body: event });
|
|
556
|
-
if (!result || typeof result !== "object" || Array.isArray(result) || !Number.isSafeInteger(result.sequence) || result.sequence < 1 || !result.event || typeof result.event !== "object" || Array.isArray(result.event))
|
|
557
|
-
throw new Error("The feedback receipt is invalid. Retry the saved operation.");
|
|
558
|
-
const { sequence: eventSequence, ...received } = result.event;
|
|
559
|
-
if (eventSequence !== void 0 && eventSequence !== result.sequence || canonicalizeJson(received) !== canonicalizeJson(event))
|
|
560
|
-
throw new Error(
|
|
561
|
-
"The feedback receipt does not match the saved event. Retry the saved operation."
|
|
562
|
-
);
|
|
563
|
-
return { event: { ...received, sequence: result.sequence }, sequence: result.sequence };
|
|
564
|
-
}
|
|
565
|
-
function assertEventPage(page, after) {
|
|
566
|
-
if (!Array.isArray(page.events) || page.events.length > 100 || !Number.isSafeInteger(page.cursor) || page.cursor < after || typeof page.hasMore !== "boolean")
|
|
567
|
-
throw new Error("Invalid shared feedback page.");
|
|
568
|
-
}
|
|
569
|
-
async function decryptEvent(access, record, sequence) {
|
|
570
|
-
assertContract(record, schemas.event);
|
|
571
|
-
if (!await verifyWorkspaceSignature(record, record.publicKey))
|
|
572
|
-
throw new Error("Signature verification failed.");
|
|
573
|
-
if (!access.keys[record.epoch]) throw new Error("The encryption epoch is unavailable.");
|
|
574
|
-
const payload = await unseal(
|
|
575
|
-
record,
|
|
576
|
-
decodeWorkspaceBytes(access.keys[record.epoch]),
|
|
577
|
-
eventContext(access.id, record),
|
|
578
|
-
maxEventBytes
|
|
579
|
-
);
|
|
580
|
-
assertFeedback(payload);
|
|
581
|
-
if (payload.reviewOf !== record.reviewOf) throw new Error("Feedback revision is invalid.");
|
|
582
|
-
return { ...record, sequence, payload };
|
|
583
|
-
}
|
|
584
|
-
function eventFromPage(item, pageIds, previousSequence, cursor) {
|
|
585
|
-
const { sequence, ...record } = item?.event ? { ...item.event, sequence: item.sequence } : item ?? {};
|
|
586
|
-
if (!Number.isSafeInteger(sequence) || sequence <= previousSequence || sequence > cursor)
|
|
587
|
-
throw new Error("Invalid shared feedback sequence.");
|
|
588
|
-
if (typeof record.id !== "string" || pageIds.has(record.id))
|
|
589
|
-
throw new Error("Invalid shared feedback event identity.");
|
|
590
|
-
pageIds.add(record.id);
|
|
591
|
-
return { sequence, record };
|
|
592
|
-
}
|
|
593
|
-
async function readWorkspaceEvents(access, { after = 0, ...options } = {}) {
|
|
594
|
-
if (!Number.isSafeInteger(after) || after < 0) throw new TypeError("Invalid feedback cursor.");
|
|
595
|
-
if (!access.keys) await getWorkspace(access, options);
|
|
596
|
-
const page = await request(access, `/events?after=${after}`, options);
|
|
597
|
-
assertEventPage(page, after);
|
|
598
|
-
const events = [], issues = [], pageIds = /* @__PURE__ */ new Set();
|
|
599
|
-
let previousSequence = after;
|
|
600
|
-
for (const item of page.events) {
|
|
601
|
-
const { sequence, record } = eventFromPage(item, pageIds, previousSequence, page.cursor);
|
|
602
|
-
previousSequence = sequence;
|
|
603
|
-
try {
|
|
604
|
-
events.push(await decryptEvent(access, record, sequence));
|
|
605
|
-
} catch {
|
|
606
|
-
issues.push({
|
|
607
|
-
sequence,
|
|
608
|
-
id: typeof record.id === "string" && idPattern.test(record.id) ? record.id : null,
|
|
609
|
-
reason: "Invalid encrypted feedback; not imported."
|
|
610
|
-
});
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
return { ...page, events, issues };
|
|
614
|
-
}
|
|
615
|
-
return {
|
|
616
|
-
encodeWorkspaceBytes,
|
|
617
|
-
decodeWorkspaceBytes,
|
|
618
|
-
newWorkspaceToken,
|
|
619
|
-
newWorkspaceId,
|
|
620
|
-
normalizeWorkspaceBase,
|
|
621
|
-
workspaceReviewUrl,
|
|
622
|
-
deriveWorkspaceAuthentication,
|
|
623
|
-
canonicalWorkspacePublicKey,
|
|
624
|
-
createWorkspaceSigner,
|
|
625
|
-
signWorkspaceValue,
|
|
626
|
-
verifyWorkspaceSignature,
|
|
627
|
-
workspaceEnvelopeDigest,
|
|
628
|
-
prepareWorkspace,
|
|
629
|
-
commitWorkspace,
|
|
630
|
-
getWorkspace,
|
|
631
|
-
listWorkspaceRevisions,
|
|
632
|
-
decryptWorkspaceRevision,
|
|
633
|
-
prepareWorkspaceMutation,
|
|
634
|
-
commitWorkspaceMutation,
|
|
635
|
-
publishWorkspace,
|
|
636
|
-
rotateWorkspace,
|
|
637
|
-
manageWorkspace,
|
|
638
|
-
prepareWorkspaceEvent,
|
|
639
|
-
appendWorkspaceEvent,
|
|
640
|
-
readWorkspaceEvents
|
|
641
|
-
};
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
export {
|
|
645
|
-
createWorkspaceAddress,
|
|
646
|
-
createEncryptedWorkspaceClient
|
|
647
|
-
};
|