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
|
@@ -40,8 +40,8 @@ repository notes, credentials or an entire specification into shared context.
|
|
|
40
40
|
Open the design with `openplanr artifact <design-document.json>` after editing context;
|
|
41
41
|
the route validates and renders it. If it reports a draft error and falls back to
|
|
42
42
|
the previous working revision, fix that error before sharing the changed context.
|
|
43
|
-
When working through
|
|
44
|
-
|
|
43
|
+
When working through a design skill instead,
|
|
44
|
+
use `openplanr design validate`, `render` and `open`. Inspect
|
|
45
45
|
Welcome for the correct design title, purpose and review questions, then use the
|
|
46
46
|
explicit Share or Publish action. If browser inspection is unavailable, state
|
|
47
47
|
that the welcome is unverified. Changing the context file alone does not update
|
|
@@ -68,7 +68,8 @@ digest-acceptance step or permanently frozen setup baseline. See
|
|
|
68
68
|
|
|
69
69
|
Use the returned pinned helper for subsequent actions. `dispatch`, bounded `wait`
|
|
70
70
|
and `status` expose the exact session, native progress, inactivity and phase timings.
|
|
71
|
-
Native tools, permissions, configuration and implementation loops remain native
|
|
71
|
+
Native tools, permissions, configuration and implementation loops remain native, except
|
|
72
|
+
that Claude Code or Codex with no configured permission mode starts in its edit mode.
|
|
72
73
|
Do not add bypass/force/yolo flags, blanket tool exclusions or silent model fallbacks.
|
|
73
74
|
Local backend probes are compatibility diagnostics, not a separate execution policy.
|
|
74
75
|
They read model metadata without submitting inference, loading models or sending
|
|
@@ -26,32 +26,38 @@ parent host's normal execution controls and configuration. They are not an OpenP
|
|
|
26
26
|
OS sandbox. Arguments, exits, timings and bounded private failure diagnostics are
|
|
27
27
|
saved separately from native-agent check claims.
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
29
|
+
`review` commits the worktree's non-ignored state as the run branch tip and reviews
|
|
30
|
+
`git diff base tip`. Verification runs in the owned worktree at that tip: checks see
|
|
31
|
+
HEAD plus the selected files plus the delegate's changes, not the parent checkout's
|
|
32
|
+
other uncommitted files, which the report lists. Ordinary ignored build/cache outputs
|
|
33
|
+
are allowed. If preparation, a check or generation changes reviewable
|
|
34
|
+
source/tests/configuration/generated files, the old review is invalid: inspect the
|
|
35
|
+
updated candidate and review again before acceptance.
|
|
35
36
|
|
|
36
37
|
Failed checks keep the candidate blocked. `baselineComparison: true` explicitly
|
|
37
|
-
requests a relevant failed-check comparison
|
|
38
|
-
|
|
38
|
+
requests a relevant failed-check comparison in a temporary worktree at the base
|
|
39
|
+
commit; it is diagnostic and cannot turn a failure into acceptance. Dependencies are
|
|
40
|
+
not copied there, so include their setup in `preparation`. Earlier attempt evidence remains private. Narrowing a
|
|
39
41
|
previously failed check set requires `checkSelectionReason`. With no applicable
|
|
40
42
|
automated check, `reviewOnlyReason` allows explicitly unverified review-only
|
|
41
43
|
integration; zero checks never produces a verified outcome.
|
|
42
44
|
|
|
43
45
|
## Checkout protection and recovery
|
|
44
46
|
|
|
45
|
-
The
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
47
|
+
The per-repository lock, scope/Preserve checks and the reviewed tip protect checkout
|
|
48
|
+
writes. `apply` saves a restore point (`git stash create`) under the private ref
|
|
49
|
+
`refs/planr-delegate/<runId>/restore`, then runs `git apply --check` and `git apply`
|
|
50
|
+
with the saved `patch.diff`. A parent edit elsewhere in a changed file merges; an
|
|
51
|
+
overlapping parent edit blocks with its path and leaves the checkout untouched.
|
|
52
|
+
Concurrent user edits are never overwritten or rolled back.
|
|
51
53
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
54
|
+
If `git apply` fails without writing, for example after a parent save between its check
|
|
55
|
+
and the write, the run returns to review with the conflicting paths. An apply
|
|
56
|
+
interrupted between its check and completion must use `recover`, which compares each
|
|
57
|
+
patch path with its pre- and post-apply content. A fully applied patch can be accepted;
|
|
58
|
+
rollback (default) restores only paths that match their post-apply content and keeps
|
|
59
|
+
file permissions. Keep conflicting user edits. Do not bypass a rejected helper by manually applying
|
|
60
|
+
its patch.
|
|
55
61
|
|
|
56
62
|
Successful native integration closes the exact run, saves evidence/report and
|
|
57
63
|
removes only its owned worktree unless retained. `status` recovers the five-field
|
|
@@ -61,8 +67,8 @@ deployment are outside this helper.
|
|
|
61
67
|
Experimental generic protocol-v1 adapters and older pinned helpers retain their
|
|
62
68
|
original check interface and lifecycle; native v2 does not expand their permissions.
|
|
63
69
|
|
|
64
|
-
|
|
70
|
+
## Process custody and runs pinned to older helpers
|
|
65
71
|
|
|
66
|
-
|
|
72
|
+
Process custody stops the owned process group; intentionally detached services and processes outside that group remain the native harness/operator responsibility. Independent commands must finish their work before returning success. Cleanup checks that the owned worktree is still at the accepted tip after ownership reads, just before removal; a changed worktree is retained for inspection.
|
|
67
73
|
|
|
68
|
-
|
|
74
|
+
A run prepared by an older helper, without a run branch, finishes review, apply and recovery through that pinned helper. The current helper refuses its custody instead of integrating it.
|
|
@@ -114,7 +114,31 @@ a GGUF filename or display label is not automatically its request ID. Apply an
|
|
|
114
114
|
explicit model override only to this run through the existing native options;
|
|
115
115
|
rewrite or enroll a saved profile only when the user requests it.
|
|
116
116
|
|
|
117
|
-
|
|
117
|
+
When the CLI's own settings choose no permission mode, dispatch and resume start
|
|
118
|
+
Claude Code with `--permission-mode acceptEdits` and Codex with `--sandbox
|
|
119
|
+
workspace-write`, so a stock install can edit files in its worktree. In
|
|
120
|
+
`acceptEdits`, Claude also runs `mkdir`, `touch`, `rm`, `rmdir`, `mv`, `cp` and `sed`
|
|
121
|
+
without asking, for paths in the worktree and the added context directory. A
|
|
122
|
+
configured mode always wins: Claude `permissions.defaultMode` in user, project, local
|
|
123
|
+
or managed settings files, or Codex `sandbox_mode` in `config.toml` or the project's
|
|
124
|
+
`.codex/config.toml`, outside an inactive profile. Unreadable or oversized settings
|
|
125
|
+
count as configured. Cursor runs with `--trust`. Other shell commands still follow
|
|
126
|
+
the CLI's allowlist and approval settings, and no bypass flag is passed.
|
|
127
|
+
|
|
128
|
+
Limits of this check: it reads settings files only, so system or MDM-delivered
|
|
129
|
+
policies and Codex managed configuration are not seen. A Codex profile selected in
|
|
130
|
+
one file but defined in the other is not matched. A project-level Claude
|
|
131
|
+
`defaultMode`, including `"auto"`, counts as configured. The check runs again on each
|
|
132
|
+
`resume`, so a settings change between turns can change the flag.
|
|
133
|
+
|
|
134
|
+
If the CLI still denies an action, delegation
|
|
135
|
+
reports attention rather than widening access. Resolve access in that CLI’s own configuration or explicitly authorized exact-session invocation, then continue the recorded session. Model summaries are never sufficient evidence of implementation.
|
|
136
|
+
|
|
137
|
+
Cursor's CLI writes its own state back to `~/.cursor/cli-config.json` when a run
|
|
138
|
+
ends, so `permissions.allow` entries added while a run is active can be lost. Add
|
|
139
|
+
the commands the task needs (for example `Shell(pnpm)`) before `dispatch`. After an
|
|
140
|
+
`E_ADAPTER_PERMISSION` attention state, wait until the run has stopped, edit the
|
|
141
|
+
allowlist, then `resume` the same run.
|
|
118
142
|
|
|
119
143
|
## Diagnostics and unused runs
|
|
120
144
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Run/session lifecycle
|
|
2
2
|
|
|
3
|
-
Each new run has private
|
|
4
|
-
|
|
3
|
+
Each new run has private v3 records, a complete readable capsule, one owned worktree
|
|
4
|
+
on its run branch and a pinned helper snapshot. Records contain configuration references,
|
|
5
5
|
not credential values. Old runs route operations through their unchanged pinned
|
|
6
6
|
helpers; there is no automatic migration or permission expansion.
|
|
7
7
|
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
# Worktree and context custody
|
|
2
2
|
|
|
3
|
-
One run owns one
|
|
4
|
-
dirty state, preserving starting bytes,
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
One run owns one locked worktree on its own branch, `planr-delegate/<runId>`, outside
|
|
4
|
+
the user's checkout. Only selected dirty state is copied, preserving starting bytes,
|
|
5
|
+
deletion and the Git executable bit, then committed as the run's base commit without
|
|
6
|
+
repository hooks. Full required ignored planning and repository instructions live in
|
|
7
|
+
the readable capsule. The source checkout and unrelated worktrees remain independent.
|
|
7
8
|
|
|
8
|
-
Custody records bind the run, worktree ownership,
|
|
9
|
-
|
|
10
|
-
and
|
|
9
|
+
Custody records bind the run, worktree ownership, base commit, selected source state,
|
|
10
|
+
Preserve paths and the repository's refs. The delegate may commit; the run branch must
|
|
11
|
+
stay checked out and descend from its base. The branch checked out in the parent at
|
|
12
|
+
prepare may not be deleted or moved to a commit that contains the run's base, and a
|
|
13
|
+
restore ref may not be deleted while its run is still applying or interrupted. Any
|
|
14
|
+
other ref change, such as a branch switch, amend, reset, stash, fetch or tag, is a
|
|
15
|
+
report warning.
|
|
16
|
+
Preserve changes, scope violations, submodule (gitlink) changes, including ones that
|
|
17
|
+
`ignore` settings hide, and patches the parent
|
|
18
|
+
checkout no longer accepts block acceptance. Integration scope constrains accepted
|
|
11
19
|
changes; it does not sandbox every native tool operation. Native tools, hooks,
|
|
12
20
|
plugins and MCP run under the native harness's permissions and trusted configuration.
|
|
13
21
|
|
|
@@ -16,10 +24,10 @@ and join the candidate; no manual digest acceptance or immutable setup-path list
|
|
|
16
24
|
needed. Ignored dependencies/build/cache outputs are ordinary worktree outputs.
|
|
17
25
|
|
|
18
26
|
Successful native integration removes only the owned worktree by checking its
|
|
19
|
-
ownership token and Git registration. Retention can be requested before dispatch.
|
|
27
|
+
ownership token and Git registration, then deletes its run branch. Retention can be requested before dispatch.
|
|
20
28
|
Failures/interruption retain custody. The private run keeps context, accepted patch,
|
|
21
29
|
verification evidence, report and exact native session reference after cleanup.
|
|
22
30
|
Old runs continue through their pinned helper; never broaden their policy or migrate
|
|
23
31
|
their records automatically.
|
|
24
32
|
|
|
25
|
-
|
|
33
|
+
Runs prepared by older helpers use detached worktrees and their own integration; they finish through that pinned helper.
|
|
@@ -5,9 +5,9 @@ import { capsuleDirectory } from './capsule.mjs';
|
|
|
5
5
|
import { AdapterError, destinationFromEndpoint, invokeProcess } from './generic.mjs';
|
|
6
6
|
import {
|
|
7
7
|
createNativeProgress,
|
|
8
|
+
EDIT_DEFAULT_EXECUTION_POLICY,
|
|
8
9
|
knownDestination,
|
|
9
10
|
NATIVE_CAPABILITIES,
|
|
10
|
-
NATIVE_EXECUTION_POLICY,
|
|
11
11
|
nativeFailure,
|
|
12
12
|
nativeObserver,
|
|
13
13
|
nativeTurn,
|
|
@@ -26,7 +26,7 @@ function routingVariables(env) {
|
|
|
26
26
|
);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
// Keeps
|
|
29
|
+
// Keeps routing variables and whether a default permission mode is set; callers expose source labels.
|
|
30
30
|
async function readClaudeRoutingSettings(profile, env, cwd, options = {}) {
|
|
31
31
|
const managedRoot =
|
|
32
32
|
options.managedRoot ??
|
|
@@ -108,6 +108,7 @@ async function readClaudeRoutingSettings(profile, env, cwd, options = {}) {
|
|
|
108
108
|
inspected.push({
|
|
109
109
|
source,
|
|
110
110
|
env: routingVariables(settings.env ?? {}),
|
|
111
|
+
...(settings.permissions?.defaultMode !== undefined ? { defaultMode: true } : {}),
|
|
111
112
|
...(settings.policyHelper ? { opaqueRouting: true } : {}),
|
|
112
113
|
});
|
|
113
114
|
} catch (error) {
|
|
@@ -202,6 +203,16 @@ export async function resolveClaudeRouting(profile, env, cwd, options) {
|
|
|
202
203
|
};
|
|
203
204
|
}
|
|
204
205
|
|
|
206
|
+
// Edit access only when no settings file chooses a mode; unreadable settings count as chosen.
|
|
207
|
+
export async function claudeWriteFlags(profile, env, cwd, options) {
|
|
208
|
+
try {
|
|
209
|
+
const settings = await readClaudeRoutingSettings(profile, env, cwd, options);
|
|
210
|
+
return settings.some((entry) => entry.defaultMode) ? [] : ['--permission-mode', 'acceptEdits'];
|
|
211
|
+
} catch {
|
|
212
|
+
return [];
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
|
|
205
216
|
export async function resolveClaudeDestination(profile, env, cwd) {
|
|
206
217
|
return (await resolveClaudeRouting(profile, env, cwd)).destination;
|
|
207
218
|
}
|
|
@@ -263,6 +274,7 @@ async function execute({
|
|
|
263
274
|
profile.executable,
|
|
264
275
|
[
|
|
265
276
|
...profile.argv,
|
|
277
|
+
...(await claudeWriteFlags(profile, env, cwd)),
|
|
266
278
|
'--print',
|
|
267
279
|
'--output-format',
|
|
268
280
|
'stream-json',
|
|
@@ -317,7 +329,7 @@ export const claudeAdapter = Object.freeze({
|
|
|
317
329
|
return {
|
|
318
330
|
capabilities: NATIVE_CAPABILITIES,
|
|
319
331
|
...routing,
|
|
320
|
-
executionPolicy:
|
|
332
|
+
executionPolicy: EDIT_DEFAULT_EXECUTION_POLICY,
|
|
321
333
|
};
|
|
322
334
|
},
|
|
323
335
|
run: execute,
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { readFile, stat } from 'node:fs/promises';
|
|
1
2
|
import { join } from 'node:path';
|
|
2
3
|
import { capsuleDirectory } from './capsule.mjs';
|
|
3
4
|
import { AdapterError, invokeProcess } from './generic.mjs';
|
|
4
5
|
import {
|
|
5
6
|
createNativeProgress,
|
|
7
|
+
EDIT_DEFAULT_EXECUTION_POLICY,
|
|
6
8
|
knownDestination,
|
|
7
9
|
NATIVE_CAPABILITIES,
|
|
8
|
-
NATIVE_EXECUTION_POLICY,
|
|
9
10
|
nativeFailure,
|
|
10
11
|
nativeObserver,
|
|
11
12
|
nativeTurn,
|
|
@@ -31,6 +32,39 @@ export async function resolveCodexDestination(profile, env) {
|
|
|
31
32
|
return knownDestination(endpoint);
|
|
32
33
|
}
|
|
33
34
|
|
|
35
|
+
// Any uncommented sandbox_mode key outside an inactive [profiles.<name>] table counts as set.
|
|
36
|
+
function sandboxModeSet(config) {
|
|
37
|
+
const active = /^\s*profile\s*=\s*["']([^"']+)["']/mu.exec(config.split(/^\s*\[/mu)[0])?.[1];
|
|
38
|
+
let skipped = false;
|
|
39
|
+
for (const line of config.split('\n')) {
|
|
40
|
+
const header = /^\s*\[\s*profiles\.(?:"([^"]+)"|'([^']+)'|([A-Za-z0-9_-]+))\s*\]/u.exec(line);
|
|
41
|
+
if (header) skipped = (header[1] ?? header[2] ?? header[3]) !== active;
|
|
42
|
+
else if (/^\s*\[/u.test(line)) skipped = false;
|
|
43
|
+
if (!skipped && /^[^#]*\bsandbox_mode["']?\s*=/u.test(line)) return true;
|
|
44
|
+
}
|
|
45
|
+
return false;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// Missing config means no sandbox choice; unreadable or oversized config counts as a choice.
|
|
49
|
+
async function codexConfigChoosesSandbox(path) {
|
|
50
|
+
let config;
|
|
51
|
+
try {
|
|
52
|
+
if ((await stat(path)).size > 64 * 1024) return true;
|
|
53
|
+
config = await readFile(path, 'utf8');
|
|
54
|
+
} catch (error) {
|
|
55
|
+
return error.code !== 'ENOENT';
|
|
56
|
+
}
|
|
57
|
+
return sandboxModeSet(config);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// Workspace writes only when neither the user nor the project config chooses a sandbox.
|
|
61
|
+
export async function codexWriteFlags(profile, env, cwd) {
|
|
62
|
+
const home = profile.configDir || env.CODEX_HOME || join(env.HOME ?? '', '.codex');
|
|
63
|
+
for (const path of [join(home, 'config.toml'), join(cwd, '.codex', 'config.toml')])
|
|
64
|
+
if (await codexConfigChoosesSandbox(path)) return [];
|
|
65
|
+
return ['--sandbox', 'workspace-write'];
|
|
66
|
+
}
|
|
67
|
+
|
|
34
68
|
async function execute({
|
|
35
69
|
profile,
|
|
36
70
|
cwd,
|
|
@@ -84,6 +118,8 @@ async function execute({
|
|
|
84
118
|
const args = [
|
|
85
119
|
...profile.argv,
|
|
86
120
|
'exec',
|
|
121
|
+
// `exec resume` takes no sandbox flag of its own; the parent `exec` flag applies.
|
|
122
|
+
...(await codexWriteFlags(profile, env, cwd)),
|
|
87
123
|
...(sessionId ? ['resume'] : []),
|
|
88
124
|
'--json',
|
|
89
125
|
...(!sessionId ? ['--add-dir', directory] : []),
|
|
@@ -141,7 +177,7 @@ export const codexAdapter = Object.freeze({
|
|
|
141
177
|
return {
|
|
142
178
|
capabilities: NATIVE_CAPABILITIES,
|
|
143
179
|
destination: await resolveCodexDestination(profile, env),
|
|
144
|
-
executionPolicy:
|
|
180
|
+
executionPolicy: EDIT_DEFAULT_EXECUTION_POLICY,
|
|
145
181
|
};
|
|
146
182
|
},
|
|
147
183
|
run: execute,
|
|
@@ -20,6 +20,11 @@ export const NATIVE_EXECUTION_POLICY = Object.freeze({
|
|
|
20
20
|
extensions:
|
|
21
21
|
'Trusted native hooks, plugins and MCP may execute code or contact additional services. OpenPlanr does not sandbox these extensions.',
|
|
22
22
|
});
|
|
23
|
+
// Claude Code and Codex start in their edit mode when native settings choose none.
|
|
24
|
+
export const EDIT_DEFAULT_EXECUTION_POLICY = Object.freeze({
|
|
25
|
+
...NATIVE_EXECUTION_POLICY,
|
|
26
|
+
permissions: 'native-managed; edit mode when none is configured',
|
|
27
|
+
});
|
|
23
28
|
export const NATIVE_MANAGED_DESTINATION = Object.freeze({
|
|
24
29
|
class: 'native-managed',
|
|
25
30
|
origin: 'native-managed',
|
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
} from 'node:fs/promises';
|
|
18
18
|
import { basename, dirname, isAbsolute, join, relative, resolve, sep } from 'node:path';
|
|
19
19
|
import { promisify } from 'node:util';
|
|
20
|
+
import { readRunRecord } from './run-record.mjs';
|
|
20
21
|
|
|
21
22
|
const execFileAsync = promisify(execFile);
|
|
22
23
|
export const CUSTODY_SCHEMA_VERSION = '1.0.0';
|
|
@@ -68,6 +69,148 @@ async function git(root, args, { allowFailure = false } = {}) {
|
|
|
68
69
|
}
|
|
69
70
|
}
|
|
70
71
|
|
|
72
|
+
function gitInput(root, args, input) {
|
|
73
|
+
return new Promise((resolveOutput, reject) => {
|
|
74
|
+
const child = execFile(
|
|
75
|
+
'git',
|
|
76
|
+
args,
|
|
77
|
+
{ cwd: root, encoding: 'buffer', maxBuffer: 32 * 1024 * 1024 },
|
|
78
|
+
(error, stdout) => {
|
|
79
|
+
const operation = args.find((arg) => !arg.startsWith('-'));
|
|
80
|
+
if (error)
|
|
81
|
+
reject(
|
|
82
|
+
new CustodyError('E_CUSTODY_GIT', `Git operation failed: ${operation}`, {
|
|
83
|
+
operation,
|
|
84
|
+
exitCode: error.code,
|
|
85
|
+
}),
|
|
86
|
+
);
|
|
87
|
+
else resolveOutput(stdout);
|
|
88
|
+
},
|
|
89
|
+
);
|
|
90
|
+
// Git may exit without reading stdin; its exit status, not the closed pipe, is the result.
|
|
91
|
+
child.stdin.on('error', (error) => {
|
|
92
|
+
if (error.code === 'EPIPE') return;
|
|
93
|
+
const operation = args.find((arg) => !arg.startsWith('-'));
|
|
94
|
+
reject(
|
|
95
|
+
new CustodyError('E_CUSTODY_GIT', `Git operation input failed: ${operation}`, {
|
|
96
|
+
operation,
|
|
97
|
+
cause: error.code,
|
|
98
|
+
}),
|
|
99
|
+
);
|
|
100
|
+
});
|
|
101
|
+
child.stdin.end(input);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export const RUN_BRANCH_PREFIX = 'planr-delegate/';
|
|
106
|
+
// Repository hooks, signing and the user's identity never apply to run commits.
|
|
107
|
+
export const HOOKLESS_COMMIT = [
|
|
108
|
+
'-c',
|
|
109
|
+
'core.hooksPath=/dev/null',
|
|
110
|
+
'-c',
|
|
111
|
+
'commit.gpgSign=false',
|
|
112
|
+
'-c',
|
|
113
|
+
'user.name=planr-delegate',
|
|
114
|
+
'-c',
|
|
115
|
+
'user.email=planr-delegate@localhost',
|
|
116
|
+
'commit',
|
|
117
|
+
'--no-verify',
|
|
118
|
+
'--allow-empty',
|
|
119
|
+
'-q',
|
|
120
|
+
'-m',
|
|
121
|
+
];
|
|
122
|
+
const RESTORE_REF = /^refs\/planr-delegate\/[^/]+\/restore$/u;
|
|
123
|
+
|
|
124
|
+
async function refSnapshot(root, branch) {
|
|
125
|
+
const refs = {};
|
|
126
|
+
for (const line of (await git(root, ['for-each-ref', '--format=%(refname)%00%(objectname)']))
|
|
127
|
+
.toString('utf8')
|
|
128
|
+
.split('\n')) {
|
|
129
|
+
const [name, oid] = line.split('\0');
|
|
130
|
+
if (oid && name !== `refs/heads/${branch}`) refs[name] = oid;
|
|
131
|
+
}
|
|
132
|
+
return refs;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
async function isAncestor(root, ancestor, descendant) {
|
|
136
|
+
return (
|
|
137
|
+
(await git(root, ['merge-base', '--is-ancestor', ancestor, descendant], {
|
|
138
|
+
allowFailure: true,
|
|
139
|
+
})) !== null
|
|
140
|
+
);
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// A restore ref is gone legitimately once its run applied, recovered or was cleaned up.
|
|
144
|
+
async function unresolvedRun(runDirectory, runId) {
|
|
145
|
+
if (!runDirectory) return true;
|
|
146
|
+
try {
|
|
147
|
+
const { integration } = await readRunRecord(runId, { directory: runDirectory });
|
|
148
|
+
return ['applying', 'interrupted'].includes(integration?.status);
|
|
149
|
+
} catch (error) {
|
|
150
|
+
if (['ENOENT', 'E_RUN_ID'].includes(error.code)) return false;
|
|
151
|
+
throw error;
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
async function branchViolations(root, record) {
|
|
156
|
+
const violations = [];
|
|
157
|
+
const head = (await git(root, ['symbolic-ref', '-q', 'HEAD'], { allowFailure: true }))
|
|
158
|
+
?.toString('utf8')
|
|
159
|
+
.trim();
|
|
160
|
+
const branchRef = `refs/heads/${record.branch}`;
|
|
161
|
+
if (head !== branchRef)
|
|
162
|
+
violations.push({ code: 'E_CUSTODY_BRANCH', expected: record.branch, actual: head ?? null });
|
|
163
|
+
else if (
|
|
164
|
+
(await git(root, ['show-ref', '--verify', '--quiet', branchRef], { allowFailure: true })) ===
|
|
165
|
+
null
|
|
166
|
+
)
|
|
167
|
+
violations.push({ code: 'E_CUSTODY_BRANCH', expected: record.branch, actual: null });
|
|
168
|
+
else if (!(await isAncestor(root, record.base, 'HEAD')))
|
|
169
|
+
violations.push({ code: 'E_CUSTODY_BASE', base: record.base });
|
|
170
|
+
const parent = record.repositoryRoot;
|
|
171
|
+
const before = record.refs ?? {};
|
|
172
|
+
const now = await refSnapshot(parent, record.branch);
|
|
173
|
+
const reported = new Set([`refs/planr-delegate/${record.runId}/restore`]);
|
|
174
|
+
const previous = before[record.parentBranch] ?? record.initialHead;
|
|
175
|
+
const moved = record.parentBranch ? (now[record.parentBranch] ?? null) : undefined;
|
|
176
|
+
// Owner commits, amends and resets warn; only delegate work descends from base.
|
|
177
|
+
if (
|
|
178
|
+
moved === null ||
|
|
179
|
+
(moved && moved !== previous && (await isAncestor(parent, record.base, moved)))
|
|
180
|
+
) {
|
|
181
|
+
reported.add(record.parentBranch);
|
|
182
|
+
violations.push({
|
|
183
|
+
code: 'E_CUSTODY_PARENT_BRANCH',
|
|
184
|
+
ref: record.parentBranch,
|
|
185
|
+
expected: previous,
|
|
186
|
+
actual: moved,
|
|
187
|
+
});
|
|
188
|
+
}
|
|
189
|
+
for (const name of Object.keys(before))
|
|
190
|
+
if (
|
|
191
|
+
RESTORE_REF.test(name) &&
|
|
192
|
+
!reported.has(name) &&
|
|
193
|
+
!now[name] &&
|
|
194
|
+
(await unresolvedRun(record.runDirectory, name.split('/')[2]))
|
|
195
|
+
) {
|
|
196
|
+
reported.add(name);
|
|
197
|
+
violations.push({ code: 'E_CUSTODY_RESTORE_REF', ref: name });
|
|
198
|
+
}
|
|
199
|
+
const changed = [...new Set([...Object.keys(now), ...Object.keys(before)])]
|
|
200
|
+
.filter((name) => !reported.has(name) && now[name] !== before[name])
|
|
201
|
+
.sort();
|
|
202
|
+
const warnings = changed.length
|
|
203
|
+
? [
|
|
204
|
+
{
|
|
205
|
+
code: 'W_CUSTODY_REFS',
|
|
206
|
+
refs: changed.slice(0, 20),
|
|
207
|
+
...(changed.length > 20 ? { omitted: changed.length - 20 } : {}),
|
|
208
|
+
},
|
|
209
|
+
]
|
|
210
|
+
: [];
|
|
211
|
+
return { violations, warnings };
|
|
212
|
+
}
|
|
213
|
+
|
|
71
214
|
function digest(bytes) {
|
|
72
215
|
return createHash('sha256').update(bytes).digest('hex');
|
|
73
216
|
}
|
|
@@ -425,6 +568,8 @@ export async function createWorktreeCustody({
|
|
|
425
568
|
worktreeParent,
|
|
426
569
|
runId = randomUUID(),
|
|
427
570
|
native = false,
|
|
571
|
+
branch = false,
|
|
572
|
+
runDirectory,
|
|
428
573
|
} = {}) {
|
|
429
574
|
if (
|
|
430
575
|
!repositoryRoot ||
|
|
@@ -504,7 +649,11 @@ export async function createWorktreeCustody({
|
|
|
504
649
|
JSON.stringify({ runId, custodyToken, repositoryRoot: root, worktreePath }),
|
|
505
650
|
{ mode: 0o600, flag: 'wx' },
|
|
506
651
|
);
|
|
507
|
-
|
|
652
|
+
const branchName = `${RUN_BRANCH_PREFIX}${runId}`;
|
|
653
|
+
if (branch) {
|
|
654
|
+
await git(root, ['worktree', 'add', '-b', branchName, '--', worktreePath, initialHead]);
|
|
655
|
+
await git(root, ['worktree', 'lock', '--reason', `planr-delegate ${runId}`, worktreePath]);
|
|
656
|
+
} else await git(root, ['worktree', 'add', '--detach', '--', worktreePath, initialHead]);
|
|
508
657
|
const checkoutFiles = native
|
|
509
658
|
? await initialCheckoutFiles(worktreePath, initialHead, paths)
|
|
510
659
|
: {};
|
|
@@ -526,6 +675,33 @@ export async function createWorktreeCustody({
|
|
|
526
675
|
}
|
|
527
676
|
startingFiles[path] = await fileState(worktreePath, path);
|
|
528
677
|
}
|
|
678
|
+
let handoff = {};
|
|
679
|
+
if (branch) {
|
|
680
|
+
if (paths.length)
|
|
681
|
+
await gitInput(
|
|
682
|
+
worktreePath,
|
|
683
|
+
[
|
|
684
|
+
'--literal-pathspecs',
|
|
685
|
+
'add',
|
|
686
|
+
'--force',
|
|
687
|
+
'--pathspec-from-file=-',
|
|
688
|
+
'--pathspec-file-nul',
|
|
689
|
+
],
|
|
690
|
+
`${paths.join('\0')}\0`,
|
|
691
|
+
);
|
|
692
|
+
await git(worktreePath, [...HOOKLESS_COMMIT, `planr-delegate base ${runId}`]);
|
|
693
|
+
handoff = {
|
|
694
|
+
handoff: 'branch',
|
|
695
|
+
branch: branchName,
|
|
696
|
+
base: (await git(worktreePath, ['rev-parse', 'HEAD'])).toString('utf8').trim(),
|
|
697
|
+
parentBranch:
|
|
698
|
+
(await git(root, ['symbolic-ref', '-q', 'HEAD'], { allowFailure: true }))
|
|
699
|
+
?.toString('utf8')
|
|
700
|
+
.trim() || null,
|
|
701
|
+
refs: await refSnapshot(root, branchName),
|
|
702
|
+
...(runDirectory ? { runDirectory } : {}),
|
|
703
|
+
};
|
|
704
|
+
}
|
|
529
705
|
const preservedFiles = {};
|
|
530
706
|
for (const path of protectedPaths)
|
|
531
707
|
preservedFiles[path] = await protectedState(worktreePath, path);
|
|
@@ -537,6 +713,7 @@ export async function createWorktreeCustody({
|
|
|
537
713
|
repositoryRoot: root,
|
|
538
714
|
worktreePath,
|
|
539
715
|
initialHead,
|
|
716
|
+
...handoff,
|
|
540
717
|
initialIndex: await indexState(worktreePath),
|
|
541
718
|
sourceIndex,
|
|
542
719
|
selectedPaths: paths,
|
|
@@ -600,7 +777,7 @@ export async function inspectWorktreeSetup(record, options = {}) {
|
|
|
600
777
|
const before =
|
|
601
778
|
record.setupFiles?.[path] ??
|
|
602
779
|
record.startingFiles?.[path] ??
|
|
603
|
-
(await headFileState(record.worktreePath, path, record.initialHead));
|
|
780
|
+
(await headFileState(record.worktreePath, path, record.base ?? record.initialHead));
|
|
604
781
|
const after = await captureFileState(record.worktreePath, path);
|
|
605
782
|
if (
|
|
606
783
|
!sameGitState(
|
|
@@ -621,13 +798,20 @@ export async function validateWorktreeCustody(
|
|
|
621
798
|
throw new CustodyError('E_CUSTODY_RECORD', 'A custody record is required.');
|
|
622
799
|
const root = await assertRepository(record.worktreePath);
|
|
623
800
|
const violations = [];
|
|
801
|
+
let warnings = [];
|
|
624
802
|
await assertRepository(record.repositoryRoot);
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
803
|
+
if (record.handoff === 'branch') {
|
|
804
|
+
const branch = await branchViolations(root, record);
|
|
805
|
+
violations.push(...branch.violations);
|
|
806
|
+
warnings = branch.warnings;
|
|
807
|
+
} else {
|
|
808
|
+
// Source HEAD/index may advance on unrelated paths; integration checks each destination.
|
|
809
|
+
const head = (await git(root, ['rev-parse', 'HEAD'])).toString('utf8').trim();
|
|
810
|
+
if (head !== record.initialHead)
|
|
811
|
+
violations.push({ code: 'E_CUSTODY_HEAD', expected: record.initialHead, actual: head });
|
|
812
|
+
const currentIndex = await indexState(root);
|
|
813
|
+
if (currentIndex !== record.initialIndex) violations.push({ code: 'E_CUSTODY_INDEX' });
|
|
814
|
+
}
|
|
631
815
|
if (!native && record.engineConfiguration) {
|
|
632
816
|
const currentConfiguration = await captureEngineConfiguration(root);
|
|
633
817
|
for (const path of Object.keys(record.engineConfiguration))
|
|
@@ -640,7 +824,7 @@ export async function validateWorktreeCustody(
|
|
|
640
824
|
// Abandonment supplies its own complete raw-byte filesystem inventory. Avoid
|
|
641
825
|
// Git status there because it may invoke configured clean filters as a side effect.
|
|
642
826
|
const currentStatus = inspectStatus ? await status(root) : { changedPaths: [], stagedPaths: [] };
|
|
643
|
-
if (currentStatus.stagedPaths.length)
|
|
827
|
+
if (currentStatus.stagedPaths.length && record.handoff !== 'branch')
|
|
644
828
|
violations.push({ code: 'E_CUSTODY_STAGED', paths: currentStatus.stagedPaths });
|
|
645
829
|
for (const path of record.preservePaths) {
|
|
646
830
|
let now;
|
|
@@ -666,7 +850,12 @@ export async function validateWorktreeCustody(
|
|
|
666
850
|
)
|
|
667
851
|
violations.push({ code: 'E_CUSTODY_SETUP_CHANGED', path });
|
|
668
852
|
}
|
|
669
|
-
return {
|
|
853
|
+
return {
|
|
854
|
+
valid: violations.length === 0,
|
|
855
|
+
violations,
|
|
856
|
+
warnings,
|
|
857
|
+
changedPaths: currentStatus.changedPaths,
|
|
858
|
+
};
|
|
670
859
|
}
|
|
671
860
|
|
|
672
861
|
export async function cleanupWorktreeCustody(record, { disposition, beforeRemove } = {}) {
|
|
@@ -731,12 +920,23 @@ export async function cleanupWorktreeCustody(record, { disposition, beforeRemove
|
|
|
731
920
|
if (registered) {
|
|
732
921
|
// Validate accepted contents after ownership reads, immediately before native removal.
|
|
733
922
|
if (present) await beforeRemove?.(target);
|
|
923
|
+
if (record.handoff === 'branch' && worktreeLocked(listed, target))
|
|
924
|
+
await git(root, ['worktree', 'unlock', target]);
|
|
734
925
|
await git(root, ['worktree', 'remove', '--force', '--', target]);
|
|
735
926
|
} else if (present)
|
|
736
927
|
throw new CustodyError(
|
|
737
928
|
'E_CUSTODY_CLEANUP',
|
|
738
929
|
'Present worktree is not registered to this repository.',
|
|
739
930
|
);
|
|
931
|
+
if (record.handoff === 'branch')
|
|
932
|
+
for (const ref of [
|
|
933
|
+
`refs/heads/${record.branch}`,
|
|
934
|
+
`refs/planr-delegate/${record.runId}/restore`,
|
|
935
|
+
])
|
|
936
|
+
if (
|
|
937
|
+
(await git(root, ['show-ref', '--verify', '--quiet', ref], { allowFailure: true })) !== null
|
|
938
|
+
)
|
|
939
|
+
await git(root, ['update-ref', '-d', ref]);
|
|
740
940
|
await rm(physicalParent, { recursive: true, force: true });
|
|
741
941
|
return {
|
|
742
942
|
removed: target,
|
|
@@ -744,3 +944,10 @@ export async function cleanupWorktreeCustody(record, { disposition, beforeRemove
|
|
|
744
944
|
...(!present && !registered ? { alreadyRemoved: true } : {}),
|
|
745
945
|
};
|
|
746
946
|
}
|
|
947
|
+
|
|
948
|
+
function worktreeLocked(listed, target) {
|
|
949
|
+
const block = listed.split('\n\n').find((entry) => entry.startsWith(`worktree ${target}\n`));
|
|
950
|
+
return Boolean(
|
|
951
|
+
block?.split('\n').some((line) => line === 'locked' || line.startsWith('locked ')),
|
|
952
|
+
);
|
|
953
|
+
}
|