openplanr 2.2640.8 → 2.2640.9
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 +8 -0
- package/dist/dashboard/.vite/manifest.json +1 -1
- package/dist/dashboard/assets/{index-COZ36pFn.js → index-D7R6tnlX.js} +2 -2
- package/dist/dashboard/assets/{index-COZ36pFn.js.map → index-D7R6tnlX.js.map} +1 -1
- package/dist/dashboard/dashboard-manifest.json +8 -8
- package/dist/dashboard/index.html +1 -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 +2 -2
- package/lib/host-packages/claude/openplanr/.claude-plugin/plugin.json +1 -1
- package/lib/host-packages/claude/openplanr/.openplanr-content.json +165 -33
- package/lib/host-packages/claude/openplanr/README.md +22 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-artifact-shell.mjs +3 -11
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-chunked-workspace-client.mjs +555 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/{design-pako-esm.mjs → design-compression.mjs} +2 -1521
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-document.mjs +133 -12
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-encrypted-workspace-client.mjs +647 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-entities.mjs +17 -67
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-handoff.mjs +14 -16
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/{design-planr-home.mjs → design-loopback-server.mjs} +15 -36
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-owner-custody.mjs +121 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-resource-pack.mjs +698 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-review.mjs +798 -796
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-runtime-home.mjs +39 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-runtime-support-5cb7531bede8.mjs +24 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-share.mjs +138 -765
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/{design-escape.mjs → design-shared-artifact-support-dependencies-design-support-protocol-contracts-3d9b1a86.mjs} +158 -156
- package/lib/host-packages/{openai/openplanr/runtime/design/scripts/design-artifact-sources.mjs → claude/openplanr/runtime/design/scripts/design-shared-artifact-support-protocol-contracts-ea2cd15e.mjs} +1 -1
- package/lib/host-packages/{openai/openplanr/runtime/design/scripts/design-bounded-json-data.mjs → claude/openplanr/runtime/design/scripts/design-shared-protocol-contracts-31a760fc.mjs} +241 -454
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-shared-protocol-contracts-75a938cc.mjs +222 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-upload-spool.mjs +198 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design.mjs +12 -5
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/01-module-runtime.js +18 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/02-artifact-review-ui.js +809 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +5193 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/04-compression.js +4175 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/05-artifact-sharing.js +65 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/06-artifact-review-ui.js +1755 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/07-artifact-sharing.js +62 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/08-artifact-review-ui.js +2600 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +123 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/package.json +3 -3
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/01-module-runtime.js +34 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +992 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/03-react-dom-client-fiber-foundations.js +2513 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/04-react-dom-client-reconciliation-hooks.js +1919 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/05-react-dom-client-render-phases.js +1759 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/06-react-dom-client-commit-effects.js +1551 -0
- 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 +1121 -0
- 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 +2183 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +705 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/10-react.js +27 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/11-artifact-review-ui.js +13 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-design-review-experience.js +3561 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-studio-shell.js +184 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-interface-primitives.js +5045 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-interface-primitives.js +1698 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-studio-shell.js +455 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/17-design-studio.js +1844 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +257 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +1 -1
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +4966 -0
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/design.mjs +240 -5192
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +1 -1
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/backend-diagnostics.mjs +6 -2
- package/lib/host-packages/cursor/openplanr/.openplanr-content.json +164 -32
- package/lib/host-packages/cursor/openplanr/manifest.json +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/backend-diagnostics.mjs +6 -2
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-artifact-shell.mjs +3 -11
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-chunked-workspace-client.mjs +555 -0
- package/lib/host-packages/{openai/openplanr/runtime/design/scripts/design-pako-esm.mjs → cursor/openplanr/runtime/design/scripts/design-compression.mjs} +2 -1521
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-document.mjs +133 -12
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-encrypted-workspace-client.mjs +647 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-entities.mjs +17 -67
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-handoff.mjs +14 -16
- package/lib/host-packages/{openai/openplanr/runtime/design/scripts/design-planr-home.mjs → cursor/openplanr/runtime/design/scripts/design-loopback-server.mjs} +15 -36
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-owner-custody.mjs +121 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-resource-pack.mjs +698 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-review.mjs +798 -796
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-runtime-home.mjs +39 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-runtime-support-5cb7531bede8.mjs +24 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-share.mjs +138 -765
- package/lib/host-packages/{openai/openplanr/runtime/design/scripts/design-escape.mjs → cursor/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-3d9b1a86.mjs} +158 -156
- package/lib/host-packages/{claude/openplanr/runtime/design/scripts/design-artifact-sources.mjs → cursor/openplanr/runtime/design/scripts/design-shared-artifact-support-protocol-contracts-ea2cd15e.mjs} +1 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/{design-bounded-json-data.mjs → design-shared-protocol-contracts-31a760fc.mjs} +241 -454
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-shared-protocol-contracts-75a938cc.mjs +222 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-upload-spool.mjs +198 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design.mjs +12 -5
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/01-module-runtime.js +18 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/02-artifact-review-ui.js +809 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +5193 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/04-compression.js +4175 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/05-artifact-sharing.js +65 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/06-artifact-review-ui.js +1755 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/07-artifact-sharing.js +62 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/08-artifact-review-ui.js +2600 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +123 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/package.json +3 -3
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/01-module-runtime.js +34 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +992 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/03-react-dom-client-fiber-foundations.js +2513 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/04-react-dom-client-reconciliation-hooks.js +1919 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/05-react-dom-client-render-phases.js +1759 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/06-react-dom-client-commit-effects.js +1551 -0
- 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 +1121 -0
- 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 +2183 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +705 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/10-react.js +27 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/11-artifact-review-ui.js +13 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-design-review-experience.js +3561 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-studio-shell.js +184 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-interface-primitives.js +5045 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-interface-primitives.js +1698 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-studio-shell.js +455 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/17-design-studio.js +1844 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +257 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +1 -1
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +4966 -0
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/design.mjs +240 -5192
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +1 -1
- package/lib/host-packages/openai/.claude-plugin/marketplace.json +2 -2
- package/lib/host-packages/openai/openplanr/.codex-plugin/plugin.json +1 -1
- package/lib/host-packages/openai/openplanr/.openplanr-content.json +164 -32
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-artifact-shell.mjs +3 -11
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-chunked-workspace-client.mjs +555 -0
- package/lib/host-packages/{cursor/openplanr/runtime/design/scripts/design-pako-esm.mjs → openai/openplanr/runtime/design/scripts/design-compression.mjs} +2 -1521
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-document.mjs +133 -12
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-encrypted-workspace-client.mjs +647 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-entities.mjs +17 -67
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-handoff.mjs +14 -16
- package/lib/host-packages/{cursor/openplanr/runtime/design/scripts/design-planr-home.mjs → openai/openplanr/runtime/design/scripts/design-loopback-server.mjs} +15 -36
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-owner-custody.mjs +121 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-resource-pack.mjs +698 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-review.mjs +798 -796
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-runtime-home.mjs +39 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-runtime-support-5cb7531bede8.mjs +24 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-share.mjs +138 -765
- package/lib/host-packages/{cursor/openplanr/runtime/design/scripts/design-escape.mjs → openai/openplanr/runtime/design/scripts/design-shared-artifact-support-dependencies-design-support-protocol-contracts-3d9b1a86.mjs} +158 -156
- package/lib/host-packages/{cursor/openplanr/runtime/design/scripts/design-artifact-sources.mjs → openai/openplanr/runtime/design/scripts/design-shared-artifact-support-protocol-contracts-ea2cd15e.mjs} +1 -1
- package/lib/host-packages/{claude/openplanr/runtime/design/scripts/design-bounded-json-data.mjs → openai/openplanr/runtime/design/scripts/design-shared-protocol-contracts-31a760fc.mjs} +241 -454
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-shared-protocol-contracts-75a938cc.mjs +222 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-upload-spool.mjs +198 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design.mjs +12 -5
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/01-module-runtime.js +18 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/02-artifact-review-ui.js +809 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/03-protocol-contracts.js +5193 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/04-compression.js +4175 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/05-artifact-sharing.js +65 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/06-artifact-review-ui.js +1755 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/07-artifact-sharing.js +62 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources/08-artifact-review-ui.js +2600 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js.sources.json +123 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/package.json +3 -3
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/01-module-runtime.js +34 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/02-react.js +992 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/03-react-dom-client-fiber-foundations.js +2513 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/04-react-dom-client-reconciliation-hooks.js +1919 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/05-react-dom-client-render-phases.js +1759 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/06-react-dom-client-commit-effects.js +1551 -0
- 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 +1121 -0
- 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 +2183 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/09-react-dom-client-public-roots.js +705 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/10-react.js +27 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/11-artifact-review-ui.js +13 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-design-review-experience.js +3561 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/13-studio-shell.js +184 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/14-interface-primitives.js +5045 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/15-interface-primitives.js +1698 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-studio-shell.js +455 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/17-design-studio.js +1844 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +257 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +1 -1
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/design-protocol-contracts.mjs +4966 -0
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/design.mjs +240 -5192
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +1 -1
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/backend-diagnostics.mjs +6 -2
- package/package.json +2 -2
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-generated-b0798298053515fd.mjs +0 -18
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +0 -5
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js +0 -25597
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-generated-b0798298053515fd.mjs +0 -18
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +0 -5
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js +0 -25597
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-generated-b0798298053515fd.mjs +0 -18
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/templates/artifact-review-stage.js +0 -5
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js +0 -25597
|
@@ -1,218 +1,52 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import {
|
|
2
|
+
assertPlainData,
|
|
3
|
+
canonicalizeJson,
|
|
4
|
+
deepFreeze,
|
|
5
|
+
sha256Hex
|
|
6
|
+
} from "./design-shared-protocol-contracts-75a938cc.mjs";
|
|
7
|
+
|
|
8
|
+
// packages/protocol/src/bounded-json-data.mjs
|
|
9
|
+
function assertLargeObjectData(value) {
|
|
10
|
+
const pending = [[value, 0]], visited = /* @__PURE__ */ new Set();
|
|
11
|
+
let nodes = 0;
|
|
12
|
+
for (let next = pending.pop(); next; next = pending.pop()) {
|
|
13
|
+
const [item2, depth, exit] = next;
|
|
14
|
+
if (exit) {
|
|
15
|
+
visited.delete(item2);
|
|
16
|
+
continue;
|
|
14
17
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
if (!
|
|
37
|
-
throw new TypeError(
|
|
38
|
-
|
|
18
|
+
if (++nodes > 25e4 || depth > 40)
|
|
19
|
+
throw new RangeError("Large object complexity exceeds its limit.");
|
|
20
|
+
if (item2 && typeof item2 === "object") {
|
|
21
|
+
if (visited.has(item2)) throw new TypeError("Large objects require acyclic plain data.");
|
|
22
|
+
visited.add(item2);
|
|
23
|
+
pending.push([item2, depth, true]);
|
|
24
|
+
const array = Array.isArray(item2);
|
|
25
|
+
const prototype = Object.getPrototypeOf(item2);
|
|
26
|
+
if (array ? prototype !== Array.prototype : prototype !== Object.prototype && prototype !== null)
|
|
27
|
+
throw new TypeError("Large objects require plain data.");
|
|
28
|
+
const descriptors = Object.getOwnPropertyDescriptors(item2);
|
|
29
|
+
const keys = Reflect.ownKeys(descriptors);
|
|
30
|
+
const length = array ? descriptors.length.value : null;
|
|
31
|
+
if (array && keys.length !== length + 1)
|
|
32
|
+
throw new TypeError("Large objects require dense JSON arrays.");
|
|
33
|
+
for (const key of keys) {
|
|
34
|
+
if (typeof key !== "string" || ["__proto__", "constructor", "prototype"].includes(key))
|
|
35
|
+
throw new TypeError("Large objects cannot contain unsafe or symbolic keys.");
|
|
36
|
+
const descriptor = descriptors[key];
|
|
37
|
+
if (!("value" in descriptor))
|
|
38
|
+
throw new TypeError("Large objects cannot contain accessors.");
|
|
39
|
+
if (!(array && key === "length") && !descriptor.enumerable)
|
|
40
|
+
throw new TypeError("Large objects require enumerable JSON fields.");
|
|
41
|
+
if (array && key !== "length" && (!Number.isSafeInteger(Number(key)) || Number(key) < 0 || Number(key) >= length || String(Number(key)) !== key))
|
|
42
|
+
throw new TypeError("Large objects require numeric JSON array indices.");
|
|
43
|
+
pending.push([descriptor.value, depth + 1]);
|
|
39
44
|
}
|
|
40
|
-
return `[${entries2.join(",")}]`;
|
|
41
45
|
}
|
|
42
|
-
const prototype = Object.getPrototypeOf(value);
|
|
43
|
-
if (prototype !== Object.prototype && prototype !== null) {
|
|
44
|
-
throw new TypeError(`JCS requires a plain JSON object at ${path}.`);
|
|
45
|
-
}
|
|
46
|
-
const entries = Object.keys(value).sort().map((key) => {
|
|
47
|
-
assertUnicodeScalarString(key, `${path} key`);
|
|
48
|
-
return `${JSON.stringify(key)}:${serialize(value[key], `${path}.${key}`, seen)}`;
|
|
49
|
-
});
|
|
50
|
-
return `{${entries.join(",")}}`;
|
|
51
|
-
} finally {
|
|
52
|
-
seen.delete(value);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
function canonicalizeJson(value) {
|
|
56
|
-
return serialize(value, "$", /* @__PURE__ */ new Set());
|
|
57
|
-
}
|
|
58
|
-
var SHA256_K = /* @__PURE__ */ new Int32Array([
|
|
59
|
-
1116352408,
|
|
60
|
-
1899447441,
|
|
61
|
-
3049323471,
|
|
62
|
-
3921009573,
|
|
63
|
-
961987163,
|
|
64
|
-
1508970993,
|
|
65
|
-
2453635748,
|
|
66
|
-
2870763221,
|
|
67
|
-
3624381080,
|
|
68
|
-
310598401,
|
|
69
|
-
607225278,
|
|
70
|
-
1426881987,
|
|
71
|
-
1925078388,
|
|
72
|
-
2162078206,
|
|
73
|
-
2614888103,
|
|
74
|
-
3248222580,
|
|
75
|
-
3835390401,
|
|
76
|
-
4022224774,
|
|
77
|
-
264347078,
|
|
78
|
-
604807628,
|
|
79
|
-
770255983,
|
|
80
|
-
1249150122,
|
|
81
|
-
1555081692,
|
|
82
|
-
1996064986,
|
|
83
|
-
2554220882,
|
|
84
|
-
2821834349,
|
|
85
|
-
2952996808,
|
|
86
|
-
3210313671,
|
|
87
|
-
3336571891,
|
|
88
|
-
3584528711,
|
|
89
|
-
113926993,
|
|
90
|
-
338241895,
|
|
91
|
-
666307205,
|
|
92
|
-
773529912,
|
|
93
|
-
1294757372,
|
|
94
|
-
1396182291,
|
|
95
|
-
1695183700,
|
|
96
|
-
1986661051,
|
|
97
|
-
2177026350,
|
|
98
|
-
2456956037,
|
|
99
|
-
2730485921,
|
|
100
|
-
2820302411,
|
|
101
|
-
3259730800,
|
|
102
|
-
3345764771,
|
|
103
|
-
3516065817,
|
|
104
|
-
3600352804,
|
|
105
|
-
4094571909,
|
|
106
|
-
275423344,
|
|
107
|
-
430227734,
|
|
108
|
-
506948616,
|
|
109
|
-
659060556,
|
|
110
|
-
883997877,
|
|
111
|
-
958139571,
|
|
112
|
-
1322822218,
|
|
113
|
-
1537002063,
|
|
114
|
-
1747873779,
|
|
115
|
-
1955562222,
|
|
116
|
-
2024104815,
|
|
117
|
-
2227730452,
|
|
118
|
-
2361852424,
|
|
119
|
-
2428436474,
|
|
120
|
-
2756734187,
|
|
121
|
-
3204031479,
|
|
122
|
-
3329325298
|
|
123
|
-
]);
|
|
124
|
-
var rotr = (value, bits) => value >>> bits | value << 32 - bits;
|
|
125
|
-
function sha256Hex(value) {
|
|
126
|
-
const candidate = typeof value === "string" ? new TextEncoder().encode(value) : value;
|
|
127
|
-
if (!ArrayBuffer.isView(candidate) || Object.prototype.toString.call(candidate) !== "[object Uint8Array]") {
|
|
128
|
-
throw new TypeError("sha256Hex expects a string or Uint8Array.");
|
|
129
|
-
}
|
|
130
|
-
const input = new Uint8Array(candidate.buffer, candidate.byteOffset, candidate.byteLength);
|
|
131
|
-
const paddedLength = Math.ceil((input.length + 9) / 64) * 64;
|
|
132
|
-
const bytes = new Uint8Array(paddedLength);
|
|
133
|
-
bytes.set(input);
|
|
134
|
-
bytes[input.length] = 128;
|
|
135
|
-
const view = new DataView(bytes.buffer);
|
|
136
|
-
const bitLength = BigInt(input.length) * 8n;
|
|
137
|
-
view.setUint32(paddedLength - 8, Number(bitLength >> 32n & 0xffffffffn));
|
|
138
|
-
view.setUint32(paddedLength - 4, Number(bitLength & 0xffffffffn));
|
|
139
|
-
let h0 = 1779033703;
|
|
140
|
-
let h1 = 3144134277;
|
|
141
|
-
let h2 = 1013904242;
|
|
142
|
-
let h3 = 2773480762;
|
|
143
|
-
let h4 = 1359893119;
|
|
144
|
-
let h5 = 2600822924;
|
|
145
|
-
let h6 = 528734635;
|
|
146
|
-
let h7 = 1541459225;
|
|
147
|
-
const words = new Int32Array(64);
|
|
148
|
-
for (let offset = 0; offset < bytes.length; offset += 64) {
|
|
149
|
-
for (let index2 = 0; index2 < 16; index2 += 1) words[index2] = view.getUint32(offset + index2 * 4);
|
|
150
|
-
for (let index2 = 16; index2 < 64; index2 += 1) {
|
|
151
|
-
const s0 = rotr(words[index2 - 15], 7) ^ rotr(words[index2 - 15], 18) ^ words[index2 - 15] >>> 3;
|
|
152
|
-
const s1 = rotr(words[index2 - 2], 17) ^ rotr(words[index2 - 2], 19) ^ words[index2 - 2] >>> 10;
|
|
153
|
-
words[index2] = words[index2 - 16] + s0 + words[index2 - 7] + s1 | 0;
|
|
154
|
-
}
|
|
155
|
-
let a = h0;
|
|
156
|
-
let b = h1;
|
|
157
|
-
let c = h2;
|
|
158
|
-
let d = h3;
|
|
159
|
-
let e = h4;
|
|
160
|
-
let f = h5;
|
|
161
|
-
let g = h6;
|
|
162
|
-
let h = h7;
|
|
163
|
-
for (let index2 = 0; index2 < 64; index2 += 1) {
|
|
164
|
-
const s1 = rotr(e, 6) ^ rotr(e, 11) ^ rotr(e, 25);
|
|
165
|
-
const choice = e & f ^ ~e & g;
|
|
166
|
-
const temp1 = h + s1 + choice + SHA256_K[index2] + words[index2] | 0;
|
|
167
|
-
const s0 = rotr(a, 2) ^ rotr(a, 13) ^ rotr(a, 22);
|
|
168
|
-
const majority = a & b ^ a & c ^ b & c;
|
|
169
|
-
const temp2 = s0 + majority | 0;
|
|
170
|
-
h = g;
|
|
171
|
-
g = f;
|
|
172
|
-
f = e;
|
|
173
|
-
e = d + temp1 | 0;
|
|
174
|
-
d = c;
|
|
175
|
-
c = b;
|
|
176
|
-
b = a;
|
|
177
|
-
a = temp1 + temp2 | 0;
|
|
178
|
-
}
|
|
179
|
-
h0 = h0 + a | 0;
|
|
180
|
-
h1 = h1 + b | 0;
|
|
181
|
-
h2 = h2 + c | 0;
|
|
182
|
-
h3 = h3 + d | 0;
|
|
183
|
-
h4 = h4 + e | 0;
|
|
184
|
-
h5 = h5 + f | 0;
|
|
185
|
-
h6 = h6 + g | 0;
|
|
186
|
-
h7 = h7 + h | 0;
|
|
187
|
-
}
|
|
188
|
-
return [h0, h1, h2, h3, h4, h5, h6, h7].map((part) => (part >>> 0).toString(16).padStart(8, "0")).join("");
|
|
189
|
-
}
|
|
190
|
-
function deepFreeze(value) {
|
|
191
|
-
if (value && typeof value === "object" && !Object.isFrozen(value)) {
|
|
192
|
-
for (const nested of Object.values(value)) deepFreeze(nested);
|
|
193
|
-
Object.freeze(value);
|
|
194
46
|
}
|
|
47
|
+
assertPlainData(value, "Large object data");
|
|
195
48
|
return value;
|
|
196
49
|
}
|
|
197
|
-
function assertPlainDataAt(value, label, depth, seen) {
|
|
198
|
-
if (depth > 64) throw new TypeError(`${label} exceeds the maximum nesting depth.`);
|
|
199
|
-
if (value === null || ["string", "boolean"].includes(typeof value)) return;
|
|
200
|
-
if (typeof value === "number" && Number.isFinite(value)) return;
|
|
201
|
-
if (typeof value !== "object" || seen.has(value))
|
|
202
|
-
throw new TypeError(`${label} must be finite, acyclic JSON.`);
|
|
203
|
-
if (!Array.isArray(value) && ![Object.prototype, null].includes(Object.getPrototypeOf(value)))
|
|
204
|
-
throw new TypeError(`${label} must contain only plain JSON objects.`);
|
|
205
|
-
seen.add(value);
|
|
206
|
-
for (const [key, descriptor] of Object.entries(Object.getOwnPropertyDescriptors(value))) {
|
|
207
|
-
if (["__proto__", "prototype", "constructor"].includes(key) || !Object.hasOwn(descriptor, "value"))
|
|
208
|
-
throw new TypeError(`${label} contains a forbidden property.`);
|
|
209
|
-
assertPlainDataAt(descriptor.value, label, depth + 1, seen);
|
|
210
|
-
}
|
|
211
|
-
seen.delete(value);
|
|
212
|
-
}
|
|
213
|
-
function assertPlainData(value, label) {
|
|
214
|
-
assertPlainDataAt(value, label, 0, /* @__PURE__ */ new Set());
|
|
215
|
-
}
|
|
216
50
|
|
|
217
51
|
// packages/protocol/src/json-schema.mjs
|
|
218
52
|
var typeOf = (v) => {
|
|
@@ -503,247 +337,6 @@ var validateJson = (value, schema6, {
|
|
|
503
337
|
return errs;
|
|
504
338
|
};
|
|
505
339
|
|
|
506
|
-
// packages/protocol/src/design-contracts.mjs
|
|
507
|
-
var DESIGN_DOCUMENT_VERSION = "1.0.0";
|
|
508
|
-
var freeze = (value) => {
|
|
509
|
-
if (value && typeof value === "object") {
|
|
510
|
-
for (const nested of Object.values(value)) freeze(nested);
|
|
511
|
-
Object.freeze(value);
|
|
512
|
-
}
|
|
513
|
-
return value;
|
|
514
|
-
};
|
|
515
|
-
var DESIGN_DOCUMENT_SCHEMA = freeze({
|
|
516
|
-
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
517
|
-
$id: "https://openplanr.dev/schemas/v1.9.0/design-document.schema.json",
|
|
518
|
-
"x-openplanr-contract": { id: "design-document", version: "1.9.0" },
|
|
519
|
-
title: "OpenPlanr authored design document",
|
|
520
|
-
type: "object",
|
|
521
|
-
additionalProperties: false,
|
|
522
|
-
required: [
|
|
523
|
-
"kind",
|
|
524
|
-
"schemaVersion",
|
|
525
|
-
"id",
|
|
526
|
-
"title",
|
|
527
|
-
"brief",
|
|
528
|
-
"frames",
|
|
529
|
-
"screens",
|
|
530
|
-
"screenOrder",
|
|
531
|
-
"variants",
|
|
532
|
-
"selectedVariant",
|
|
533
|
-
"defaultView"
|
|
534
|
-
],
|
|
535
|
-
properties: {
|
|
536
|
-
kind: { const: "openplanr-design-document" },
|
|
537
|
-
schemaVersion: { const: DESIGN_DOCUMENT_VERSION },
|
|
538
|
-
id: { $ref: "#/$defs/id" },
|
|
539
|
-
title: { $ref: "#/$defs/text" },
|
|
540
|
-
brief: {
|
|
541
|
-
type: "object",
|
|
542
|
-
additionalProperties: false,
|
|
543
|
-
required: ["text", "source", "provenance"],
|
|
544
|
-
properties: {
|
|
545
|
-
text: { $ref: "#/$defs/text" },
|
|
546
|
-
source: { enum: ["spec", "png", "describe"] },
|
|
547
|
-
provenance: { enum: ["spec", "inferred"] },
|
|
548
|
-
references: { type: "array", items: { $ref: "#/$defs/text" }, uniqueItems: true }
|
|
549
|
-
}
|
|
550
|
-
},
|
|
551
|
-
designSystem: {
|
|
552
|
-
type: "object",
|
|
553
|
-
additionalProperties: false,
|
|
554
|
-
properties: {
|
|
555
|
-
path: { $ref: "#/$defs/localPath" },
|
|
556
|
-
tokens: { $ref: "#/$defs/localPath" },
|
|
557
|
-
spacing: {
|
|
558
|
-
type: "array",
|
|
559
|
-
minItems: 1,
|
|
560
|
-
uniqueItems: true,
|
|
561
|
-
items: { type: "number", minimum: 0, maximum: 16384 }
|
|
562
|
-
}
|
|
563
|
-
}
|
|
564
|
-
},
|
|
565
|
-
assets: { $ref: "#/$defs/paths" },
|
|
566
|
-
frames: {
|
|
567
|
-
type: "array",
|
|
568
|
-
minItems: 1,
|
|
569
|
-
items: {
|
|
570
|
-
type: "object",
|
|
571
|
-
additionalProperties: false,
|
|
572
|
-
required: ["id", "label", "width", "height"],
|
|
573
|
-
properties: {
|
|
574
|
-
id: { $ref: "#/$defs/id" },
|
|
575
|
-
label: { $ref: "#/$defs/text" },
|
|
576
|
-
width: { type: "integer", minimum: 1, maximum: 16384 },
|
|
577
|
-
height: { type: "integer", minimum: 1, maximum: 16384 }
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
},
|
|
581
|
-
screens: {
|
|
582
|
-
type: "array",
|
|
583
|
-
minItems: 1,
|
|
584
|
-
items: {
|
|
585
|
-
type: "object",
|
|
586
|
-
additionalProperties: false,
|
|
587
|
-
required: ["id", "title", "source"],
|
|
588
|
-
properties: {
|
|
589
|
-
id: { $ref: "#/$defs/id" },
|
|
590
|
-
title: { $ref: "#/$defs/text" },
|
|
591
|
-
description: { $ref: "#/$defs/text" },
|
|
592
|
-
source: { $ref: "#/$defs/source" },
|
|
593
|
-
anchors: { $ref: "#/$defs/ids" }
|
|
594
|
-
}
|
|
595
|
-
}
|
|
596
|
-
},
|
|
597
|
-
screenOrder: { type: "array", minItems: 1, items: { $ref: "#/$defs/id" }, uniqueItems: true },
|
|
598
|
-
flows: {
|
|
599
|
-
type: "array",
|
|
600
|
-
items: {
|
|
601
|
-
type: "object",
|
|
602
|
-
additionalProperties: false,
|
|
603
|
-
required: ["id", "title", "screens"],
|
|
604
|
-
properties: {
|
|
605
|
-
id: { $ref: "#/$defs/id" },
|
|
606
|
-
title: { $ref: "#/$defs/text" },
|
|
607
|
-
screens: { type: "array", minItems: 1, items: { $ref: "#/$defs/id" } }
|
|
608
|
-
}
|
|
609
|
-
}
|
|
610
|
-
},
|
|
611
|
-
variants: {
|
|
612
|
-
type: "array",
|
|
613
|
-
minItems: 1,
|
|
614
|
-
items: {
|
|
615
|
-
type: "object",
|
|
616
|
-
additionalProperties: false,
|
|
617
|
-
required: ["id", "label", "status"],
|
|
618
|
-
properties: {
|
|
619
|
-
id: { $ref: "#/$defs/id" },
|
|
620
|
-
label: { $ref: "#/$defs/text" },
|
|
621
|
-
description: { $ref: "#/$defs/text" },
|
|
622
|
-
status: { enum: ["ready", "failed"] },
|
|
623
|
-
issue: { $ref: "#/$defs/text" },
|
|
624
|
-
sources: { type: "object", additionalProperties: { $ref: "#/$defs/source" } }
|
|
625
|
-
},
|
|
626
|
-
if: { properties: { status: { const: "failed" } } },
|
|
627
|
-
then: { required: ["issue"] }
|
|
628
|
-
}
|
|
629
|
-
},
|
|
630
|
-
selectedVariant: { $ref: "#/$defs/id" },
|
|
631
|
-
defaultView: { enum: ["canvas", "prototype", "walkthrough"] }
|
|
632
|
-
},
|
|
633
|
-
$defs: {
|
|
634
|
-
id: { type: "string", minLength: 1, maxLength: 128, pattern: "^[A-Za-z][A-Za-z0-9_-]*$" },
|
|
635
|
-
text: { type: "string", minLength: 1, pattern: "\\S" },
|
|
636
|
-
ids: { type: "array", items: { $ref: "#/$defs/id" }, uniqueItems: true },
|
|
637
|
-
localPath: {
|
|
638
|
-
type: "string",
|
|
639
|
-
minLength: 1,
|
|
640
|
-
description: "Path relative to the authored document directory. No URL, traversal, encoded path, query or fragment.",
|
|
641
|
-
pattern: "^(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)(?!.*[/ ]$)[^\\\\:\\u0000-\\u001F%?#]+$"
|
|
642
|
-
},
|
|
643
|
-
paths: { type: "array", items: { $ref: "#/$defs/localPath" }, uniqueItems: true },
|
|
644
|
-
source: {
|
|
645
|
-
type: "object",
|
|
646
|
-
additionalProperties: false,
|
|
647
|
-
required: ["html"],
|
|
648
|
-
properties: {
|
|
649
|
-
html: { $ref: "#/$defs/localPath" },
|
|
650
|
-
styles: { $ref: "#/$defs/paths" },
|
|
651
|
-
scripts: { $ref: "#/$defs/paths" }
|
|
652
|
-
}
|
|
653
|
-
}
|
|
654
|
-
}
|
|
655
|
-
});
|
|
656
|
-
function validateDesignDocument(value) {
|
|
657
|
-
const errors = validateJson(value, DESIGN_DOCUMENT_SCHEMA).map(
|
|
658
|
-
({ path, detail }) => `${path}: ${detail}`
|
|
659
|
-
);
|
|
660
|
-
if (errors.length > 0) return { ok: false, errors };
|
|
661
|
-
for (const field of ["frames", "screens", "flows", "variants"]) {
|
|
662
|
-
const seen = /* @__PURE__ */ new Set();
|
|
663
|
-
for (const [index2, item2] of (value[field] ?? []).entries()) {
|
|
664
|
-
if (seen.has(item2.id))
|
|
665
|
-
errors.push(`$.${field}[${index2}].id: duplicate identity '${item2.id}'`);
|
|
666
|
-
seen.add(item2.id);
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
const screenIds = new Set(value.screens.map(({ id: id7 }) => id7));
|
|
670
|
-
const orderedIds = new Set(value.screenOrder);
|
|
671
|
-
for (const id7 of value.screenOrder) {
|
|
672
|
-
if (!screenIds.has(id7)) errors.push(`$.screenOrder: unknown screen '${id7}'`);
|
|
673
|
-
}
|
|
674
|
-
for (const id7 of screenIds) {
|
|
675
|
-
if (!orderedIds.has(id7)) errors.push(`$.screenOrder: missing screen '${id7}'`);
|
|
676
|
-
}
|
|
677
|
-
for (const [index2, flow] of (value.flows ?? []).entries()) {
|
|
678
|
-
for (const id7 of flow.screens) {
|
|
679
|
-
if (!screenIds.has(id7)) errors.push(`$.flows[${index2}].screens: unknown screen '${id7}'`);
|
|
680
|
-
}
|
|
681
|
-
}
|
|
682
|
-
for (const [index2, variant] of value.variants.entries()) {
|
|
683
|
-
for (const id7 of Object.keys(variant.sources ?? {})) {
|
|
684
|
-
if (!screenIds.has(id7)) errors.push(`$.variants[${index2}].sources: unknown screen '${id7}'`);
|
|
685
|
-
}
|
|
686
|
-
}
|
|
687
|
-
const selected = value.variants.find(({ id: id7 }) => id7 === value.selectedVariant);
|
|
688
|
-
if (!selected) errors.push(`$.selectedVariant: unknown variant '${value.selectedVariant}'`);
|
|
689
|
-
else if (selected.status !== "ready")
|
|
690
|
-
errors.push("$.selectedVariant: selected variant must be ready");
|
|
691
|
-
for (const [index2, spacing] of (value.designSystem?.spacing ?? []).entries()) {
|
|
692
|
-
if (!Number.isFinite(spacing))
|
|
693
|
-
errors.push(`$.designSystem.spacing[${index2}]: expected a finite spacing value`);
|
|
694
|
-
}
|
|
695
|
-
return { ok: errors.length === 0, errors };
|
|
696
|
-
}
|
|
697
|
-
function assertDesignDocument(value) {
|
|
698
|
-
const result = validateDesignDocument(value);
|
|
699
|
-
if (!result.ok) throw new TypeError(`Invalid design document:
|
|
700
|
-
${result.errors.join("\n")}`);
|
|
701
|
-
return value;
|
|
702
|
-
}
|
|
703
|
-
|
|
704
|
-
// packages/protocol/src/bounded-json-data.mjs
|
|
705
|
-
function assertLargeObjectData(value) {
|
|
706
|
-
const pending = [[value, 0]], visited = /* @__PURE__ */ new Set();
|
|
707
|
-
let nodes = 0;
|
|
708
|
-
for (let next = pending.pop(); next; next = pending.pop()) {
|
|
709
|
-
const [item2, depth, exit] = next;
|
|
710
|
-
if (exit) {
|
|
711
|
-
visited.delete(item2);
|
|
712
|
-
continue;
|
|
713
|
-
}
|
|
714
|
-
if (++nodes > 25e4 || depth > 40)
|
|
715
|
-
throw new RangeError("Large object complexity exceeds its limit.");
|
|
716
|
-
if (item2 && typeof item2 === "object") {
|
|
717
|
-
if (visited.has(item2)) throw new TypeError("Large objects require acyclic plain data.");
|
|
718
|
-
visited.add(item2);
|
|
719
|
-
pending.push([item2, depth, true]);
|
|
720
|
-
const array = Array.isArray(item2);
|
|
721
|
-
const prototype = Object.getPrototypeOf(item2);
|
|
722
|
-
if (array ? prototype !== Array.prototype : prototype !== Object.prototype && prototype !== null)
|
|
723
|
-
throw new TypeError("Large objects require plain data.");
|
|
724
|
-
const descriptors = Object.getOwnPropertyDescriptors(item2);
|
|
725
|
-
const keys = Reflect.ownKeys(descriptors);
|
|
726
|
-
const length = array ? descriptors.length.value : null;
|
|
727
|
-
if (array && keys.length !== length + 1)
|
|
728
|
-
throw new TypeError("Large objects require dense JSON arrays.");
|
|
729
|
-
for (const key of keys) {
|
|
730
|
-
if (typeof key !== "string" || ["__proto__", "constructor", "prototype"].includes(key))
|
|
731
|
-
throw new TypeError("Large objects cannot contain unsafe or symbolic keys.");
|
|
732
|
-
const descriptor = descriptors[key];
|
|
733
|
-
if (!("value" in descriptor))
|
|
734
|
-
throw new TypeError("Large objects cannot contain accessors.");
|
|
735
|
-
if (!(array && key === "length") && !descriptor.enumerable)
|
|
736
|
-
throw new TypeError("Large objects require enumerable JSON fields.");
|
|
737
|
-
if (array && key !== "length" && (!Number.isSafeInteger(Number(key)) || Number(key) < 0 || Number(key) >= length || String(Number(key)) !== key))
|
|
738
|
-
throw new TypeError("Large objects require numeric JSON array indices.");
|
|
739
|
-
pending.push([descriptor.value, depth + 1]);
|
|
740
|
-
}
|
|
741
|
-
}
|
|
742
|
-
}
|
|
743
|
-
assertPlainData(value, "Large object data");
|
|
744
|
-
return value;
|
|
745
|
-
}
|
|
746
|
-
|
|
747
340
|
// packages/protocol/src/enterprise-contract-validation.mjs
|
|
748
341
|
var timestamp = { pattern: "^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(?:\\.\\d{3})?Z$" };
|
|
749
342
|
var unsafeKeys = /* @__PURE__ */ new Set(["__proto__", "prototype", "constructor"]);
|
|
@@ -4760,6 +4353,204 @@ var DIAGRAM_AUTHORING_CAPABILITIES = deepFreeze({
|
|
|
4760
4353
|
unsupportedGrammars: DIAGRAM_REGISTRIES["diagram-grammars.json"].grammars.map((entry) => entry.grammarId).filter((value) => !profileIds.includes(value))
|
|
4761
4354
|
});
|
|
4762
4355
|
|
|
4356
|
+
// packages/protocol/src/design-contracts.mjs
|
|
4357
|
+
var DESIGN_DOCUMENT_VERSION = "1.0.0";
|
|
4358
|
+
var freeze = (value) => {
|
|
4359
|
+
if (value && typeof value === "object") {
|
|
4360
|
+
for (const nested of Object.values(value)) freeze(nested);
|
|
4361
|
+
Object.freeze(value);
|
|
4362
|
+
}
|
|
4363
|
+
return value;
|
|
4364
|
+
};
|
|
4365
|
+
var DESIGN_DOCUMENT_SCHEMA = freeze({
|
|
4366
|
+
$schema: "https://json-schema.org/draft/2020-12/schema",
|
|
4367
|
+
$id: "https://openplanr.dev/schemas/v1.9.0/design-document.schema.json",
|
|
4368
|
+
"x-openplanr-contract": { id: "design-document", version: "1.9.0" },
|
|
4369
|
+
title: "OpenPlanr authored design document",
|
|
4370
|
+
type: "object",
|
|
4371
|
+
additionalProperties: false,
|
|
4372
|
+
required: [
|
|
4373
|
+
"kind",
|
|
4374
|
+
"schemaVersion",
|
|
4375
|
+
"id",
|
|
4376
|
+
"title",
|
|
4377
|
+
"brief",
|
|
4378
|
+
"frames",
|
|
4379
|
+
"screens",
|
|
4380
|
+
"screenOrder",
|
|
4381
|
+
"variants",
|
|
4382
|
+
"selectedVariant",
|
|
4383
|
+
"defaultView"
|
|
4384
|
+
],
|
|
4385
|
+
properties: {
|
|
4386
|
+
kind: { const: "openplanr-design-document" },
|
|
4387
|
+
schemaVersion: { const: DESIGN_DOCUMENT_VERSION },
|
|
4388
|
+
id: { $ref: "#/$defs/id" },
|
|
4389
|
+
title: { $ref: "#/$defs/text" },
|
|
4390
|
+
brief: {
|
|
4391
|
+
type: "object",
|
|
4392
|
+
additionalProperties: false,
|
|
4393
|
+
required: ["text", "source", "provenance"],
|
|
4394
|
+
properties: {
|
|
4395
|
+
text: { $ref: "#/$defs/text" },
|
|
4396
|
+
source: { enum: ["spec", "png", "describe"] },
|
|
4397
|
+
provenance: { enum: ["spec", "inferred"] },
|
|
4398
|
+
references: { type: "array", items: { $ref: "#/$defs/text" }, uniqueItems: true }
|
|
4399
|
+
}
|
|
4400
|
+
},
|
|
4401
|
+
designSystem: {
|
|
4402
|
+
type: "object",
|
|
4403
|
+
additionalProperties: false,
|
|
4404
|
+
properties: {
|
|
4405
|
+
path: { $ref: "#/$defs/localPath" },
|
|
4406
|
+
tokens: { $ref: "#/$defs/localPath" },
|
|
4407
|
+
spacing: {
|
|
4408
|
+
type: "array",
|
|
4409
|
+
minItems: 1,
|
|
4410
|
+
uniqueItems: true,
|
|
4411
|
+
items: { type: "number", minimum: 0, maximum: 16384 }
|
|
4412
|
+
}
|
|
4413
|
+
}
|
|
4414
|
+
},
|
|
4415
|
+
assets: { $ref: "#/$defs/paths" },
|
|
4416
|
+
frames: {
|
|
4417
|
+
type: "array",
|
|
4418
|
+
minItems: 1,
|
|
4419
|
+
items: {
|
|
4420
|
+
type: "object",
|
|
4421
|
+
additionalProperties: false,
|
|
4422
|
+
required: ["id", "label", "width", "height"],
|
|
4423
|
+
properties: {
|
|
4424
|
+
id: { $ref: "#/$defs/id" },
|
|
4425
|
+
label: { $ref: "#/$defs/text" },
|
|
4426
|
+
width: { type: "integer", minimum: 1, maximum: 16384 },
|
|
4427
|
+
height: { type: "integer", minimum: 1, maximum: 16384 }
|
|
4428
|
+
}
|
|
4429
|
+
}
|
|
4430
|
+
},
|
|
4431
|
+
screens: {
|
|
4432
|
+
type: "array",
|
|
4433
|
+
minItems: 1,
|
|
4434
|
+
items: {
|
|
4435
|
+
type: "object",
|
|
4436
|
+
additionalProperties: false,
|
|
4437
|
+
required: ["id", "title", "source"],
|
|
4438
|
+
properties: {
|
|
4439
|
+
id: { $ref: "#/$defs/id" },
|
|
4440
|
+
title: { $ref: "#/$defs/text" },
|
|
4441
|
+
description: { $ref: "#/$defs/text" },
|
|
4442
|
+
source: { $ref: "#/$defs/source" },
|
|
4443
|
+
anchors: { $ref: "#/$defs/ids" }
|
|
4444
|
+
}
|
|
4445
|
+
}
|
|
4446
|
+
},
|
|
4447
|
+
screenOrder: { type: "array", minItems: 1, items: { $ref: "#/$defs/id" }, uniqueItems: true },
|
|
4448
|
+
flows: {
|
|
4449
|
+
type: "array",
|
|
4450
|
+
items: {
|
|
4451
|
+
type: "object",
|
|
4452
|
+
additionalProperties: false,
|
|
4453
|
+
required: ["id", "title", "screens"],
|
|
4454
|
+
properties: {
|
|
4455
|
+
id: { $ref: "#/$defs/id" },
|
|
4456
|
+
title: { $ref: "#/$defs/text" },
|
|
4457
|
+
screens: { type: "array", minItems: 1, items: { $ref: "#/$defs/id" } }
|
|
4458
|
+
}
|
|
4459
|
+
}
|
|
4460
|
+
},
|
|
4461
|
+
variants: {
|
|
4462
|
+
type: "array",
|
|
4463
|
+
minItems: 1,
|
|
4464
|
+
items: {
|
|
4465
|
+
type: "object",
|
|
4466
|
+
additionalProperties: false,
|
|
4467
|
+
required: ["id", "label", "status"],
|
|
4468
|
+
properties: {
|
|
4469
|
+
id: { $ref: "#/$defs/id" },
|
|
4470
|
+
label: { $ref: "#/$defs/text" },
|
|
4471
|
+
description: { $ref: "#/$defs/text" },
|
|
4472
|
+
status: { enum: ["ready", "failed"] },
|
|
4473
|
+
issue: { $ref: "#/$defs/text" },
|
|
4474
|
+
sources: { type: "object", additionalProperties: { $ref: "#/$defs/source" } }
|
|
4475
|
+
},
|
|
4476
|
+
if: { properties: { status: { const: "failed" } } },
|
|
4477
|
+
then: { required: ["issue"] }
|
|
4478
|
+
}
|
|
4479
|
+
},
|
|
4480
|
+
selectedVariant: { $ref: "#/$defs/id" },
|
|
4481
|
+
defaultView: { enum: ["canvas", "prototype", "walkthrough"] }
|
|
4482
|
+
},
|
|
4483
|
+
$defs: {
|
|
4484
|
+
id: { type: "string", minLength: 1, maxLength: 128, pattern: "^[A-Za-z][A-Za-z0-9_-]*$" },
|
|
4485
|
+
text: { type: "string", minLength: 1, pattern: "\\S" },
|
|
4486
|
+
ids: { type: "array", items: { $ref: "#/$defs/id" }, uniqueItems: true },
|
|
4487
|
+
localPath: {
|
|
4488
|
+
type: "string",
|
|
4489
|
+
minLength: 1,
|
|
4490
|
+
description: "Path relative to the authored document directory. No URL, traversal, encoded path, query or fragment.",
|
|
4491
|
+
pattern: "^(?!/)(?!.*(?:^|/)\\.{1,2}(?:/|$))(?!.*//)(?!.*[/ ]$)[^\\\\:\\u0000-\\u001F%?#]+$"
|
|
4492
|
+
},
|
|
4493
|
+
paths: { type: "array", items: { $ref: "#/$defs/localPath" }, uniqueItems: true },
|
|
4494
|
+
source: {
|
|
4495
|
+
type: "object",
|
|
4496
|
+
additionalProperties: false,
|
|
4497
|
+
required: ["html"],
|
|
4498
|
+
properties: {
|
|
4499
|
+
html: { $ref: "#/$defs/localPath" },
|
|
4500
|
+
styles: { $ref: "#/$defs/paths" },
|
|
4501
|
+
scripts: { $ref: "#/$defs/paths" }
|
|
4502
|
+
}
|
|
4503
|
+
}
|
|
4504
|
+
}
|
|
4505
|
+
});
|
|
4506
|
+
function validateDesignDocument(value) {
|
|
4507
|
+
const errors = validateJson(value, DESIGN_DOCUMENT_SCHEMA).map(
|
|
4508
|
+
({ path, detail }) => `${path}: ${detail}`
|
|
4509
|
+
);
|
|
4510
|
+
if (errors.length > 0) return { ok: false, errors };
|
|
4511
|
+
for (const field of ["frames", "screens", "flows", "variants"]) {
|
|
4512
|
+
const seen = /* @__PURE__ */ new Set();
|
|
4513
|
+
for (const [index2, item2] of (value[field] ?? []).entries()) {
|
|
4514
|
+
if (seen.has(item2.id))
|
|
4515
|
+
errors.push(`$.${field}[${index2}].id: duplicate identity '${item2.id}'`);
|
|
4516
|
+
seen.add(item2.id);
|
|
4517
|
+
}
|
|
4518
|
+
}
|
|
4519
|
+
const screenIds = new Set(value.screens.map(({ id: id7 }) => id7));
|
|
4520
|
+
const orderedIds = new Set(value.screenOrder);
|
|
4521
|
+
for (const id7 of value.screenOrder) {
|
|
4522
|
+
if (!screenIds.has(id7)) errors.push(`$.screenOrder: unknown screen '${id7}'`);
|
|
4523
|
+
}
|
|
4524
|
+
for (const id7 of screenIds) {
|
|
4525
|
+
if (!orderedIds.has(id7)) errors.push(`$.screenOrder: missing screen '${id7}'`);
|
|
4526
|
+
}
|
|
4527
|
+
for (const [index2, flow] of (value.flows ?? []).entries()) {
|
|
4528
|
+
for (const id7 of flow.screens) {
|
|
4529
|
+
if (!screenIds.has(id7)) errors.push(`$.flows[${index2}].screens: unknown screen '${id7}'`);
|
|
4530
|
+
}
|
|
4531
|
+
}
|
|
4532
|
+
for (const [index2, variant] of value.variants.entries()) {
|
|
4533
|
+
for (const id7 of Object.keys(variant.sources ?? {})) {
|
|
4534
|
+
if (!screenIds.has(id7)) errors.push(`$.variants[${index2}].sources: unknown screen '${id7}'`);
|
|
4535
|
+
}
|
|
4536
|
+
}
|
|
4537
|
+
const selected = value.variants.find(({ id: id7 }) => id7 === value.selectedVariant);
|
|
4538
|
+
if (!selected) errors.push(`$.selectedVariant: unknown variant '${value.selectedVariant}'`);
|
|
4539
|
+
else if (selected.status !== "ready")
|
|
4540
|
+
errors.push("$.selectedVariant: selected variant must be ready");
|
|
4541
|
+
for (const [index2, spacing] of (value.designSystem?.spacing ?? []).entries()) {
|
|
4542
|
+
if (!Number.isFinite(spacing))
|
|
4543
|
+
errors.push(`$.designSystem.spacing[${index2}]: expected a finite spacing value`);
|
|
4544
|
+
}
|
|
4545
|
+
return { ok: errors.length === 0, errors };
|
|
4546
|
+
}
|
|
4547
|
+
function assertDesignDocument(value) {
|
|
4548
|
+
const result = validateDesignDocument(value);
|
|
4549
|
+
if (!result.ok) throw new TypeError(`Invalid design document:
|
|
4550
|
+
${result.errors.join("\n")}`);
|
|
4551
|
+
return value;
|
|
4552
|
+
}
|
|
4553
|
+
|
|
4763
4554
|
// packages/protocol/src/workspace-contracts.mjs
|
|
4764
4555
|
var DESIGN_WORKSPACE_VERSION = "1.0.0";
|
|
4765
4556
|
var DESIGN_WORKSPACE_API = "/api/v1/design-workspaces";
|
|
@@ -5506,10 +5297,6 @@ function assertLargeObjectContract(value, kind) {
|
|
|
5506
5297
|
}
|
|
5507
5298
|
|
|
5508
5299
|
export {
|
|
5509
|
-
canonicalizeJson,
|
|
5510
|
-
sha256Hex,
|
|
5511
|
-
deepFreeze,
|
|
5512
|
-
assertPlainData,
|
|
5513
5300
|
validateJson,
|
|
5514
5301
|
assertDesignDocument,
|
|
5515
5302
|
DESIGN_WORKSPACE_VERSION,
|