openplanr 2.2641.1 → 3.0.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 +44 -0
- package/README.md +1 -1
- package/dist/cli/commands/artifact.js +1 -1
- package/dist/cli/commands/artifact.js.map +1 -1
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +19 -4
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/github.d.ts.map +1 -1
- package/dist/cli/commands/github.js +7 -10
- package/dist/cli/commands/github.js.map +1 -1
- package/dist/cli/commands/linear.js +1 -1
- package/dist/cli/commands/linear.js.map +1 -1
- package/dist/cli/commands/report.d.ts.map +1 -1
- package/dist/cli/commands/report.js +28 -32
- package/dist/cli/commands/report.js.map +1 -1
- package/dist/cli/commands/upgrade.d.ts.map +1 -1
- package/dist/cli/commands/upgrade.js +12 -10
- package/dist/cli/commands/upgrade.js.map +1 -1
- package/dist/cli/error-boundary.d.ts.map +1 -1
- package/dist/cli/error-boundary.js +2 -1
- package/dist/cli/error-boundary.js.map +1 -1
- package/dist/dashboard/.vite/manifest.json +1 -1
- package/dist/dashboard/assets/{index-DGyC7RDz.js → index-Csby7_ur.js} +2 -2
- package/dist/dashboard/assets/{index-DGyC7RDz.js.map → index-Csby7_ur.js.map} +1 -1
- package/dist/dashboard/dashboard-manifest.json +8 -8
- package/dist/dashboard/index.html +1 -1
- package/dist/models/schema.d.ts +0 -4
- package/dist/models/schema.d.ts.map +1 -1
- package/dist/models/schema.js +0 -2
- package/dist/models/schema.js.map +1 -1
- package/dist/models/types.d.ts +1 -4
- package/dist/models/types.d.ts.map +1 -1
- package/dist/services/credentials-service.js +1 -1
- package/dist/services/credentials-service.js.map +1 -1
- package/dist/services/distribution-service.d.ts +1 -4
- package/dist/services/distribution-service.d.ts.map +1 -1
- package/dist/services/distribution-service.js +1 -60
- package/dist/services/distribution-service.js.map +1 -1
- package/dist/services/github-service.d.ts +7 -4
- package/dist/services/github-service.d.ts.map +1 -1
- package/dist/services/github-service.js +16 -15
- package/dist/services/github-service.js.map +1 -1
- package/dist/services/linear-push-service.d.ts +3 -4
- package/dist/services/linear-push-service.d.ts.map +1 -1
- package/dist/services/linear-push-service.js +5 -6
- package/dist/services/linear-push-service.js.map +1 -1
- package/dist/services/runtime-change-summary.d.ts +4 -0
- package/dist/services/runtime-change-summary.d.ts.map +1 -1
- package/dist/services/runtime-change-summary.js +7 -0
- package/dist/services/runtime-change-summary.js.map +1 -1
- package/dist/services/runtime-manager/doctor.js +1 -1
- package/dist/services/runtime-manager/doctor.js.map +1 -1
- package/dist/services/runtime-manager/runtime-package.d.ts +15 -0
- package/dist/services/runtime-manager/runtime-package.d.ts.map +1 -1
- package/dist/services/runtime-manager/runtime-package.js +50 -10
- package/dist/services/runtime-manager/runtime-package.js.map +1 -1
- package/dist/services/runtime-manager-service.d.ts +11 -0
- package/dist/services/runtime-manager-service.d.ts.map +1 -1
- package/dist/services/runtime-manager-service.js +88 -16
- package/dist/services/runtime-manager-service.js.map +1 -1
- package/dist/services/spec-service.d.ts.map +1 -1
- package/dist/services/spec-service.js +34 -69
- package/dist/services/spec-service.js.map +1 -1
- package/dist/services/upgrade-report.d.ts +2 -2
- package/dist/services/upgrade-report.d.ts.map +1 -1
- package/dist/services/upgrade-report.js +11 -2
- package/dist/services/upgrade-report.js.map +1 -1
- package/dist/services/upgrade-service.d.ts +8 -2
- package/dist/services/upgrade-service.d.ts.map +1 -1
- package/dist/services/upgrade-service.js +44 -12
- package/dist/services/upgrade-service.js.map +1 -1
- package/dist/templates/rules/shared/capability-map.md.hbs +1 -1
- package/docs/CLI.md +14 -15
- package/docs/TROUBLESHOOTING.md +9 -6
- package/install.ps1 +3 -3
- package/install.sh +3 -3
- package/lib/host-packages/adapter-registry.json +5 -5
- package/lib/host-packages/capability-map.json +8 -8
- package/lib/host-packages/claude/.claude-plugin/marketplace.json +2 -2
- package/lib/host-packages/claude/openplanr/.claude-plugin/plugin.json +2 -2
- package/lib/host-packages/claude/openplanr/.openplanr-content.json +91 -75
- package/lib/host-packages/claude/openplanr/README.md +8 -12
- package/lib/host-packages/claude/openplanr/agents/planr-backend.md +49 -55
- package/lib/host-packages/claude/openplanr/agents/planr-database.md +56 -92
- package/lib/host-packages/claude/openplanr/agents/planr-designer.md +35 -51
- package/lib/host-packages/claude/openplanr/agents/planr-devops.md +37 -51
- package/lib/host-packages/claude/openplanr/agents/planr-documentation.md +29 -52
- package/lib/host-packages/claude/openplanr/agents/planr-entity-scaffold.md +24 -23
- package/lib/host-packages/claude/openplanr/agents/planr-frontend.md +46 -58
- package/lib/host-packages/claude/openplanr/agents/planr-qa.md +4 -2
- package/lib/host-packages/claude/openplanr/agents/planr-specification.md +54 -51
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/backend.md +21 -65
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/designer.md +5 -6
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/devops.md +2 -3
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/doc-gen.md +3 -4
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/frontend.md +19 -64
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/default/specification.md +10 -12
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/backend.md +19 -62
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/designer.md +3 -4
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/devops.md +2 -3
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/doc-gen.md +2 -3
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/frontend.md +16 -59
- package/lib/host-packages/claude/openplanr/references/agents/shared/modes/spec-driven/specification.md +9 -11
- package/lib/host-packages/claude/openplanr/references/pipeline/stacks/database/mongodb.md +4 -4
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-review.mjs +24 -9
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/design-share.mjs +3 -3
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/artifact/lib/artifact/ui/studio-shell.css +1 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -4
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/enhancements.css +14 -4
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/share.js +1 -1
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +14 -5
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-design-review-experience.js +28 -0
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-studio-shell.js +105 -27
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +6 -6
- package/lib/host-packages/claude/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/design.mjs +1 -1
- package/lib/host-packages/claude/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/claude/openplanr/skills/artifact/SKILL.md +2 -2
- package/lib/host-packages/claude/openplanr/skills/artifact/references/diagram-sharing.md +1 -1
- package/lib/host-packages/claude/openplanr/skills/ceo-review/SKILL.md +0 -1
- package/lib/host-packages/claude/openplanr/skills/ceo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/claude/openplanr/skills/chair-review/SKILL.md +6 -2
- package/lib/host-packages/claude/openplanr/skills/challenger-review/SKILL.md +6 -2
- package/lib/host-packages/claude/openplanr/skills/cmo-review/SKILL.md +0 -1
- package/lib/host-packages/claude/openplanr/skills/cmo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/claude/openplanr/skills/coo-review/SKILL.md +0 -1
- package/lib/host-packages/claude/openplanr/skills/coo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/claude/openplanr/skills/cpo-review/SKILL.md +0 -1
- package/lib/host-packages/claude/openplanr/skills/cpo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/claude/openplanr/skills/cto-review/SKILL.md +0 -1
- package/lib/host-packages/claude/openplanr/skills/cto-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/claude/openplanr/skills/delegate/SKILL.md +8 -1
- package/lib/host-packages/claude/openplanr/skills/delegate/references/capsule-contract.md +17 -2
- package/lib/host-packages/claude/openplanr/skills/delegate/references/operator-guide.md +7 -5
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/adapters/claude.mjs +11 -4
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/adapters/native.mjs +1 -1
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/backend-diagnostics.mjs +14 -48
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/context.mjs +84 -22
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/credentials.mjs +167 -0
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/presentation.mjs +3 -2
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/run-contract.mjs +5 -7
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/run-preparation.mjs +5 -3
- package/lib/host-packages/claude/openplanr/skills/delegate/scripts/run-record.mjs +2 -3
- package/lib/host-packages/claude/openplanr/skills/design/references/utilities.md +1 -1
- package/lib/host-packages/claude/openplanr/skills/design-loop/references/utilities.md +1 -1
- package/lib/host-packages/claude/openplanr/skills/design-review/references/utilities.md +1 -1
- package/lib/host-packages/claude/openplanr/skills/diagram/references/diagram-sharing.md +1 -1
- package/lib/host-packages/claude/openplanr/skills/doctor/SKILL.md +4 -1
- package/lib/host-packages/claude/openplanr/skills/doctor/references/upgrade.md +8 -0
- package/lib/host-packages/claude/openplanr/skills/operate/SKILL.md +5 -3
- package/lib/host-packages/claude/openplanr/skills/plan/SKILL.md +10 -4
- package/lib/host-packages/claude/openplanr/skills/sprint/SKILL.md +5 -4
- package/lib/host-packages/claude/openplanr/skills/sprint/references/tracker-connections.md +70 -0
- package/lib/host-packages/claude/openplanr/skills/status/SKILL.md +4 -3
- package/lib/host-packages/claude/openplanr/skills/status/references/tracker-connections.md +70 -0
- package/lib/host-packages/claude/openplanr/skills/sync/SKILL.md +11 -20
- package/lib/host-packages/claude/openplanr/skills/sync/references/tracker-connections.md +70 -0
- package/lib/host-packages/claude/openplanr/skills/sync/scripts/sync.mjs +2 -2
- package/lib/host-packages/cursor/openplanr/.openplanr-content.json +63 -47
- package/lib/host-packages/cursor/openplanr/manifest.json +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-artifact/references/diagram-sharing.md +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-artifact.mdc +2 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-ceo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-chair-review.mdc +6 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-challenger-review.mdc +6 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-cmo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-coo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-cpo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-cto-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/references/capsule-contract.md +17 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/references/operator-guide.md +7 -5
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/adapters/claude.mjs +11 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/adapters/native.mjs +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/backend-diagnostics.mjs +14 -48
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/context.mjs +84 -22
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/credentials.mjs +167 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/presentation.mjs +3 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/run-contract.mjs +5 -7
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/run-preparation.mjs +5 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate/scripts/run-record.mjs +2 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-delegate.mdc +8 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design/references/utilities.md +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design-loop/references/utilities.md +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-design-review/references/utilities.md +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-diagram/references/diagram-sharing.md +1 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-doctor/references/upgrade.md +8 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-doctor.mdc +4 -1
- package/lib/host-packages/cursor/openplanr/rules/planr-operate.mdc +5 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-plan.mdc +10 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-sprint/references/tracker-connections.md +70 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-sprint.mdc +5 -4
- package/lib/host-packages/cursor/openplanr/rules/planr-status/references/tracker-connections.md +70 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-status.mdc +4 -3
- package/lib/host-packages/cursor/openplanr/rules/planr-sync/references/tracker-connections.md +70 -0
- package/lib/host-packages/cursor/openplanr/rules/planr-sync/scripts/sync.mjs +2 -2
- package/lib/host-packages/cursor/openplanr/rules/planr-sync.mdc +11 -20
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-review.mjs +24 -9
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/design-share.mjs +3 -3
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/artifact/lib/artifact/ui/studio-shell.css +1 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -4
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/enhancements.css +14 -4
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/share.js +1 -1
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +14 -5
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-design-review-experience.js +28 -0
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-studio-shell.js +105 -27
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +6 -6
- package/lib/host-packages/cursor/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/design.mjs +1 -1
- package/lib/host-packages/cursor/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +2 -2
- 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 +72 -56
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-review.mjs +24 -9
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/design-share.mjs +3 -3
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/artifact/lib/artifact/ui/studio-shell.css +1 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/package.json +4 -4
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/enhancements.css +14 -4
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/share.js +1 -1
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.css +14 -5
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/12-design-review-experience.js +28 -0
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources/16-studio-shell.js +105 -27
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/design/templates/studio/studio.js.sources.json +6 -6
- package/lib/host-packages/openai/openplanr/runtime/design/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/design.mjs +1 -1
- package/lib/host-packages/openai/openplanr/runtime/plan/scripts/runtime/packages/protocol/package.json +2 -2
- package/lib/host-packages/openai/openplanr/skills/artifact/SKILL.md +2 -2
- package/lib/host-packages/openai/openplanr/skills/artifact/references/diagram-sharing.md +1 -1
- package/lib/host-packages/openai/openplanr/skills/ceo-review/SKILL.md +0 -1
- package/lib/host-packages/openai/openplanr/skills/ceo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/openai/openplanr/skills/chair-review/SKILL.md +6 -2
- package/lib/host-packages/openai/openplanr/skills/challenger-review/SKILL.md +6 -2
- package/lib/host-packages/openai/openplanr/skills/cmo-review/SKILL.md +0 -1
- package/lib/host-packages/openai/openplanr/skills/cmo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/openai/openplanr/skills/coo-review/SKILL.md +0 -1
- package/lib/host-packages/openai/openplanr/skills/coo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/openai/openplanr/skills/cpo-review/SKILL.md +0 -1
- package/lib/host-packages/openai/openplanr/skills/cpo-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/openai/openplanr/skills/cto-review/SKILL.md +0 -1
- package/lib/host-packages/openai/openplanr/skills/cto-review/references/operate-advisor-contract.md +25 -4
- package/lib/host-packages/openai/openplanr/skills/delegate/SKILL.md +8 -1
- package/lib/host-packages/openai/openplanr/skills/delegate/openplanr.skill.json +11 -0
- package/lib/host-packages/openai/openplanr/skills/delegate/references/capsule-contract.md +17 -2
- package/lib/host-packages/openai/openplanr/skills/delegate/references/operator-guide.md +7 -5
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/adapters/claude.mjs +11 -4
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/adapters/native.mjs +1 -1
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/backend-diagnostics.mjs +14 -48
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/context.mjs +84 -22
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/credentials.mjs +167 -0
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/presentation.mjs +3 -2
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/run-contract.mjs +5 -7
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/run-preparation.mjs +5 -3
- package/lib/host-packages/openai/openplanr/skills/delegate/scripts/run-record.mjs +2 -3
- package/lib/host-packages/openai/openplanr/skills/design/references/utilities.md +1 -1
- package/lib/host-packages/openai/openplanr/skills/design-loop/references/utilities.md +1 -1
- package/lib/host-packages/openai/openplanr/skills/design-review/references/utilities.md +1 -1
- package/lib/host-packages/openai/openplanr/skills/diagram/references/diagram-sharing.md +1 -1
- package/lib/host-packages/openai/openplanr/skills/doctor/SKILL.md +4 -1
- package/lib/host-packages/openai/openplanr/skills/doctor/references/upgrade.md +8 -0
- package/lib/host-packages/openai/openplanr/skills/operate/SKILL.md +5 -3
- package/lib/host-packages/openai/openplanr/skills/plan/SKILL.md +10 -4
- package/lib/host-packages/openai/openplanr/skills/sprint/SKILL.md +5 -4
- package/lib/host-packages/openai/openplanr/skills/sprint/openplanr.skill.json +11 -0
- package/lib/host-packages/openai/openplanr/skills/sprint/references/tracker-connections.md +70 -0
- package/lib/host-packages/openai/openplanr/skills/status/SKILL.md +4 -3
- package/lib/host-packages/openai/openplanr/skills/status/openplanr.skill.json +11 -0
- package/lib/host-packages/openai/openplanr/skills/status/references/tracker-connections.md +70 -0
- package/lib/host-packages/openai/openplanr/skills/sync/SKILL.md +11 -20
- package/lib/host-packages/openai/openplanr/skills/sync/openplanr.skill.json +11 -0
- package/lib/host-packages/openai/openplanr/skills/sync/references/tracker-connections.md +70 -0
- package/lib/host-packages/openai/openplanr/skills/sync/scripts/sync.mjs +2 -2
- package/lib/integrations.mjs +2 -2
- package/lib/node-runtime.d.mts +1 -1
- package/lib/node-runtime.mjs +2 -7
- package/package.json +4 -5
- package/bin/planr.js +0 -7
- package/dist/services/connectors/adapters/business-metrics.d.ts +0 -5
- package/dist/services/connectors/adapters/business-metrics.d.ts.map +0 -1
- package/dist/services/connectors/adapters/business-metrics.js +0 -41
- package/dist/services/connectors/adapters/business-metrics.js.map +0 -1
- package/dist/services/connectors/adapters/deployment-health.d.ts +0 -18
- package/dist/services/connectors/adapters/deployment-health.d.ts.map +0 -1
- package/dist/services/connectors/adapters/deployment-health.js +0 -67
- package/dist/services/connectors/adapters/deployment-health.js.map +0 -1
- package/dist/services/connectors/adapters/github.d.ts +0 -5
- package/dist/services/connectors/adapters/github.d.ts.map +0 -1
- package/dist/services/connectors/adapters/github.js +0 -31
- package/dist/services/connectors/adapters/github.js.map +0 -1
- package/dist/services/connectors/adapters/linear-jira.d.ts +0 -5
- package/dist/services/connectors/adapters/linear-jira.d.ts.map +0 -1
- package/dist/services/connectors/adapters/linear-jira.js +0 -26
- package/dist/services/connectors/adapters/linear-jira.js.map +0 -1
- package/dist/services/connectors/adapters/posthog.d.ts +0 -5
- package/dist/services/connectors/adapters/posthog.d.ts.map +0 -1
- package/dist/services/connectors/adapters/posthog.js +0 -31
- package/dist/services/connectors/adapters/posthog.js.map +0 -1
- package/dist/services/connectors/adapters/sentry.d.ts +0 -5
- package/dist/services/connectors/adapters/sentry.d.ts.map +0 -1
- package/dist/services/connectors/adapters/sentry.js +0 -31
- package/dist/services/connectors/adapters/sentry.js.map +0 -1
- package/dist/services/connectors/checkpoint-custody.d.ts +0 -45
- package/dist/services/connectors/checkpoint-custody.d.ts.map +0 -1
- package/dist/services/connectors/checkpoint-custody.js +0 -499
- package/dist/services/connectors/checkpoint-custody.js.map +0 -1
- package/dist/services/connectors/connector-registry.d.ts +0 -144
- package/dist/services/connectors/connector-registry.d.ts.map +0 -1
- package/dist/services/connectors/connector-registry.js +0 -423
- package/dist/services/connectors/connector-registry.js.map +0 -1
- package/dist/services/connectors/connector-runtime.d.ts +0 -208
- package/dist/services/connectors/connector-runtime.d.ts.map +0 -1
- package/dist/services/connectors/connector-runtime.js +0 -1305
- package/dist/services/connectors/connector-runtime.js.map +0 -1
- package/dist/services/connectors/credential-custody.d.ts +0 -96
- package/dist/services/connectors/credential-custody.d.ts.map +0 -1
- package/dist/services/connectors/credential-custody.js +0 -390
- package/dist/services/connectors/credential-custody.js.map +0 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import path from 'node:path';
|
|
5
5
|
import { loadConfig } from '../../services/config-service.js';
|
|
6
|
-
import { pushReportAsGitHubIssue
|
|
6
|
+
import { pushReportAsGitHubIssue } from '../../services/distribution-service.js';
|
|
7
7
|
import { validateClaimsHaveAnchors, validateRemoteEvidence, } from '../../services/evidence-service.js';
|
|
8
8
|
import { lintWithProjectConfig } from '../../services/report-linter-service.js';
|
|
9
9
|
import { generateStakeholderReport, writeReportOutputs } from '../../services/report-service.js';
|
|
@@ -36,7 +36,7 @@ export function registerReportCommand(program) {
|
|
|
36
36
|
.option('--stdout', 'print markdown to stdout instead of writing file')
|
|
37
37
|
.option('--lint', 'run report linter on generated markdown')
|
|
38
38
|
.option('--strict-evidence', 'fail if bullet claims under ## headings lack URLs or #issue references', false)
|
|
39
|
-
.option('--push <targets>', 'comma-separated destinations: github
|
|
39
|
+
.option('--push <targets>', 'comma-separated destinations: github')
|
|
40
40
|
.option('--dry-run', 'with --push: show actions only', false)
|
|
41
41
|
.action(async (typeArg, opts) => {
|
|
42
42
|
const projectDir = program.opts().projectDir;
|
|
@@ -58,6 +58,21 @@ export function registerReportCommand(program) {
|
|
|
58
58
|
process.exit(1);
|
|
59
59
|
}
|
|
60
60
|
const fmt = fmtRaw;
|
|
61
|
+
// Validate every target before writing or pushing anything, so a rejected one never follows a push.
|
|
62
|
+
const pushTargets = (opts.push ?? '')
|
|
63
|
+
.split(/,\s*/)
|
|
64
|
+
.map((target) => target.trim().toLowerCase())
|
|
65
|
+
.filter(Boolean);
|
|
66
|
+
for (const target of pushTargets) {
|
|
67
|
+
if (target === 'slack') {
|
|
68
|
+
logger.error('--push slack was removed in this version; OpenPlanr no longer keeps a Slack webhook. Use --push github, or post the written report yourself.');
|
|
69
|
+
process.exit(1);
|
|
70
|
+
}
|
|
71
|
+
if (target !== 'github') {
|
|
72
|
+
logger.error(`Unknown --push target "${target}". Use: github`);
|
|
73
|
+
process.exit(1);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
61
76
|
logger.heading(`Report: ${reportType}`);
|
|
62
77
|
const { markdown, html, context } = await generateStakeholderReport(projectDir, config, {
|
|
63
78
|
reportType,
|
|
@@ -115,36 +130,17 @@ export function registerReportCommand(program) {
|
|
|
115
130
|
logger.success(`Wrote ${path.relative(projectDir, mdPath)}`);
|
|
116
131
|
if (htmlPath)
|
|
117
132
|
logger.success(`Wrote ${path.relative(projectDir, htmlPath)}`);
|
|
118
|
-
if (
|
|
119
|
-
const
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
dryRun: opts.dryRun,
|
|
130
|
-
});
|
|
131
|
-
if (res.ok)
|
|
132
|
-
logger.success(res.message + (res.url ? ` ${res.url}` : ''));
|
|
133
|
-
else
|
|
134
|
-
logger.error(res.message);
|
|
135
|
-
}
|
|
136
|
-
else if (t === 'slack') {
|
|
137
|
-
const res = await pushReportToSlack(config, markdown, { dryRun: opts.dryRun });
|
|
138
|
-
if (res.ok)
|
|
139
|
-
logger.success(res.message);
|
|
140
|
-
else
|
|
141
|
-
logger.error(res.message);
|
|
142
|
-
}
|
|
143
|
-
else {
|
|
144
|
-
logger.error(`Unknown --push target "${t}". Use: github, slack`);
|
|
145
|
-
process.exit(1);
|
|
146
|
-
}
|
|
147
|
-
}
|
|
133
|
+
if (pushTargets.includes('github')) {
|
|
134
|
+
const title = `[${CLI_COMMAND} report] ${config.projectName} — ${reportType} (${new Date().toISOString().split('T')[0]})`;
|
|
135
|
+
const res = await pushReportAsGitHubIssue({
|
|
136
|
+
title,
|
|
137
|
+
body: markdown,
|
|
138
|
+
dryRun: opts.dryRun,
|
|
139
|
+
});
|
|
140
|
+
if (res.ok)
|
|
141
|
+
logger.success(res.message + (res.url ? ` ${res.url}` : ''));
|
|
142
|
+
else
|
|
143
|
+
logger.error(res.message);
|
|
148
144
|
}
|
|
149
145
|
});
|
|
150
146
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../../src/cli/commands/report.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,
|
|
1
|
+
{"version":3,"file":"report.js","sourceRoot":"","sources":["../../../src/cli/commands/report.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,IAAI,MAAM,WAAW,CAAC;AAG7B,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC9D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EACL,yBAAyB,EACzB,sBAAsB,GACvB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,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":"upgrade.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/upgrade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/upgrade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoBzC;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,QAsH3E"}
|
|
@@ -2,7 +2,7 @@ import { isNonInteractive } from '../../services/interactive-state.js';
|
|
|
2
2
|
import { runPendingMigrations } from '../../services/migration-registry.js';
|
|
3
3
|
import { promptConfirm } from '../../services/prompt-service.js';
|
|
4
4
|
import { printNextSteps, printReconciliationStatus, printUpgradeReport, } from '../../services/upgrade-report.js';
|
|
5
|
-
import { executeCliHalfUpgrade, planCliUpgrade, reconcileInstalledTuple, upgradeNextSteps, } from '../../services/upgrade-service.js';
|
|
5
|
+
import { executeCliHalfUpgrade, planCliUpgrade, reconcileInstalledTuple, upgradeNextSteps, withAgentNextSteps, } from '../../services/upgrade-service.js';
|
|
6
6
|
import { CLI_COMMAND } from '../../utils/constants.js';
|
|
7
7
|
import { display, logger } from '../../utils/logger.js';
|
|
8
8
|
/**
|
|
@@ -16,12 +16,12 @@ export function registerUpgradeCommand(program, _cliVersion) {
|
|
|
16
16
|
.description('Reconcile the installed OpenPlanr tuple against the published compatible set');
|
|
17
17
|
upgrade
|
|
18
18
|
.command('status')
|
|
19
|
-
.description('Report whether the
|
|
19
|
+
.description('Report whether the CLI and coding agents are aligned, behind, or incompatible')
|
|
20
20
|
.option('--json', 'machine-readable output', false)
|
|
21
21
|
.action(async (opts) => {
|
|
22
22
|
const projectDir = program.opts().projectDir;
|
|
23
|
-
const result = await reconcileInstalledTuple(projectDir);
|
|
24
23
|
const nextSteps = await upgradeNextSteps(projectDir);
|
|
24
|
+
const result = withAgentNextSteps(await reconcileInstalledTuple(projectDir), nextSteps);
|
|
25
25
|
if (opts.json) {
|
|
26
26
|
display.line(JSON.stringify({ ...result, nextSteps }));
|
|
27
27
|
}
|
|
@@ -40,7 +40,7 @@ export function registerUpgradeCommand(program, _cliVersion) {
|
|
|
40
40
|
display.keyValue('Published host package', result.published.skills.version);
|
|
41
41
|
display.keyValue('Published pipeline', result.published.pipeline.version);
|
|
42
42
|
}
|
|
43
|
-
printReconciliationStatus(result);
|
|
43
|
+
printReconciliationStatus(result, nextSteps);
|
|
44
44
|
if (nextSteps.length > 0)
|
|
45
45
|
printNextSteps(nextSteps);
|
|
46
46
|
}
|
|
@@ -62,25 +62,27 @@ export function registerUpgradeCommand(program, _cliVersion) {
|
|
|
62
62
|
const notes = opts.notes;
|
|
63
63
|
const reconciliation = await reconcileInstalledTuple(projectDir);
|
|
64
64
|
const plan = planCliUpgrade(reconciliation);
|
|
65
|
-
// Nothing for the CLI to install. The coding agents can still trail it,
|
|
66
|
-
//
|
|
65
|
+
// Nothing for the CLI to install. The coding agents can still trail it, so their
|
|
66
|
+
// commands are listed.
|
|
67
67
|
if (!plan.proceed || !plan.targetCliVersion) {
|
|
68
68
|
const nextSteps = await upgradeNextSteps(projectDir);
|
|
69
|
+
const current = withAgentNextSteps(reconciliation, nextSteps);
|
|
70
|
+
const reason = planCliUpgrade(current).reason;
|
|
69
71
|
if (opts.json) {
|
|
70
72
|
display.line(JSON.stringify({
|
|
71
73
|
applied: false,
|
|
72
|
-
reason
|
|
74
|
+
reason,
|
|
73
75
|
nextSteps,
|
|
74
76
|
pluginHalfCommands: nextSteps.map((step) => step.command),
|
|
75
|
-
reconciliation,
|
|
77
|
+
reconciliation: current,
|
|
76
78
|
}));
|
|
77
79
|
}
|
|
78
80
|
else {
|
|
79
|
-
logger.info(
|
|
81
|
+
logger.info(reason);
|
|
80
82
|
if (nextSteps.length > 0)
|
|
81
83
|
printNextSteps(nextSteps);
|
|
82
84
|
}
|
|
83
|
-
if (
|
|
85
|
+
if (current.status === 'incompatible')
|
|
84
86
|
process.exitCode = 1;
|
|
85
87
|
return;
|
|
86
88
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upgrade.js","sourceRoot":"","sources":["../../../src/cli/commands/upgrade.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EACL,cAAc,EACd,yBAAyB,EACzB,kBAAkB,GAEnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,uBAAuB,EACvB,gBAAgB,
|
|
1
|
+
{"version":3,"file":"upgrade.js","sourceRoot":"","sources":["../../../src/cli/commands/upgrade.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,kCAAkC,CAAC;AACjE,OAAO,EACL,cAAc,EACd,yBAAyB,EACzB,kBAAkB,GAEnB,MAAM,kCAAkC,CAAC;AAC1C,OAAO,EACL,qBAAqB,EACrB,cAAc,EACd,uBAAuB,EACvB,gBAAgB,EAChB,kBAAkB,GACnB,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAExD;;;;GAIG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAgB,EAAE,WAAmB;IAC1E,MAAM,OAAO,GAAG,OAAO;SACpB,OAAO,CAAC,SAAS,CAAC;SAClB,WAAW,CAAC,8EAA8E,CAAC,CAAC;IAE/F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,CAAC;AACP,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-boundary.d.ts","sourceRoot":"","sources":["../../src/cli/error-boundary.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,KAAK,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrE,CAAC;
|
|
1
|
+
{"version":3,"file":"error-boundary.d.ts","sourceRoot":"","sources":["../../src/cli/error-boundary.ts"],"names":[],"mappings":"AAYA,MAAM,MAAM,kBAAkB,GAAG;IAC/B,EAAE,EAAE,KAAK,CAAC;IACV,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,WAAW,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACrE,CAAC;AAWF,qBAAa,gBAAiB,SAAQ,KAAK;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;gBAG1B,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,GAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAA;KAAO;IAS1E,MAAM,IAAI,kBAAkB;CAS7B;AAED,4EAA4E;AAC5E,wBAAgB,oBAAoB,CAClC,KAAK,EAAE,OAAO,EACd,QAAQ,GAAE,QAAQ,CAAC;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAE,CAAM,GAC3D,kBAAkB,CAqFpB"}
|
|
@@ -11,9 +11,10 @@ const SYSTEM_CODES = new Set([
|
|
|
11
11
|
const MAX_PUBLIC_TEXT = 1_000;
|
|
12
12
|
function boundedPublicText(value, fallback) {
|
|
13
13
|
const source = typeof value === 'string' && value.trim() ? value.trim() : fallback;
|
|
14
|
+
// Only absolute paths are private; a relative path such as `skills/x.mjs` stays readable.
|
|
14
15
|
return source
|
|
15
16
|
.split(/\n\s*at\s/u, 1)[0]
|
|
16
|
-
.replace(/(?:[A-Za-z]:\\|\/)(?:[^\s"'`,:]+[\\/])*[^\s"'`,:]*/gu, '<path>')
|
|
17
|
+
.replace(/(?<![\w.~@-])(?:[A-Za-z]:\\|\/)(?:[^\s"'`,:]+[\\/])*[^\s"'`,:]*/gu, '<path>')
|
|
17
18
|
.slice(0, MAX_PUBLIC_TEXT);
|
|
18
19
|
}
|
|
19
20
|
export class CliBoundaryError extends Error {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-boundary.js","sourceRoot":"","sources":["../../src/cli/error-boundary.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,GAAG,8DAA8D,CAAC;AACnF,MAAM,YAAY,GAAG,IAAI,GAAG,CAAC;IAC3B,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,OAAO;CACR,CAAC,CAAC;AACH,MAAM,eAAe,GAAG,KAAK,CAAC;AAW9B,SAAS,iBAAiB,CAAC,KAAc,EAAE,QAAgB;I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;QACL,EAAE,EAAE,KAAK;QACT,IAAI;QACJ,OAAO;QACP,GAAG,CAAC,OAAO,aAAa,KAAK,QAAQ,IAAI,aAAa,CAAC,IAAI,EAAE;YAC3D,CAAC,CAAC,EAAE,QAAQ,EAAE,iBAAiB,CAAC,aAAa,EAAE,6BAA6B,CAAC,EAAE;YAC/E,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACtC,GAAG,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC/C,CAAC;AACJ,CAAC"}
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"src": "../../../node_modules/@fontsource-variable/geist/files/geist-vietnamese-wght-normal.woff2"
|
|
45
45
|
},
|
|
46
46
|
"index.html": {
|
|
47
|
-
"file": "assets/index-
|
|
47
|
+
"file": "assets/index-Csby7_ur.js",
|
|
48
48
|
"name": "index",
|
|
49
49
|
"src": "index.html",
|
|
50
50
|
"isEntry": true,
|
|
@@ -553,5 +553,5 @@ Error generating stack: `+d.message+`
|
|
|
553
553
|
`),C=(b=I.find(S=>S.startsWith("event:")))==null?void 0:b.slice(6).trim(),O=I.filter(S=>S.startsWith("data:")).map(S=>S.slice(5).trimStart()).join(`
|
|
554
554
|
`);O&&e.reconciler.ingestSseFrame(O,C),x=m.indexOf(`
|
|
555
555
|
|
|
556
|
-
`)}if(w.done){if(m.trim())return he("$","Planning live response ended mid-frame");break}}}finally{A.releaseLock()}})().catch(h=>{if(!t.signal.aborted)throw h instanceof ee?h:new ee("$","Planning live response failed safely")}).finally(()=>{var h;return(h=e.signal)==null?void 0:h.removeEventListener("abort",a)});return Object.freeze({completion:l,close:()=>{var h;t.abort(),e.reconciler.dispose(),(h=e.signal)==null||h.removeEventListener("abort",a)}})}const B4=Object.freeze({connectSse:E4,createSseReconciler:h4,encodeCheckpoint:y4,fetchGraph:A4,parseGraphEnvelope:Su}),v4=Object.freeze(Object.defineProperty({__proto__:null,planningRuntime:B4},Symbol.toStringTag,{value:"Module"})),b4=Object.freeze({create:Ve}),w4=Object.freeze({ValidationError:ee,isValidatedState:Pe,parseSafeError:Uw,parseState:so,statePolicy:oo}),x4=Object.freeze({parse:Ha}),j4=Object.freeze({connectSse:aI,createSseReconciler:nI}),Q4=Object.freeze({identity:b4,projection:w4,routing:x4,transport:j4}),I4=Object.freeze(Object.defineProperty({__proto__:null,dashboardRuntime:Q4},Symbol.toStringTag,{value:"Module"})),{operateRuntime:Xe}=JP,{planningRuntime:Hc}=v4,{dashboardRuntime:Ne}=I4,XI=new Set(["ready","read-only","stale","partial","blocked","offline"]),Pr=Ne.projection.parseState({kind:"booting",binding:null,data:null,reasonCodes:[],error:null,mutationEnabled:!1,policy:Ne.projection.statePolicy("booting")}),WI=Ne.routing.parse("#/overview");function e0(e){return`DASHBOARD_${e.toUpperCase().replace("-","_")}`}function pr(e){return Ne.projection.parseState({kind:"loading",binding:e,data:null,reasonCodes:[],error:null,mutationEnabled:!1,policy:Ne.projection.statePolicy("loading")},{currentBinding:e})}function t0(e,t=null){return Ne.projection.parseState({kind:"unavailable",binding:e,data:null,reasonCodes:["DASHBOARD_UNAVAILABLE"],error:t,mutationEnabled:!1,policy:Ne.projection.statePolicy("unavailable")},{currentBinding:e})}function yr(e,t=!1){const s=(e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{}).code==="DASHBOARD_RESPONSE_INVALID"||e instanceof Ne.projection.ValidationError;return Ne.projection.parseSafeError({code:t||!s?"DASHBOARD_READ_FAILED":"DASHBOARD_RESPONSE_INVALID",retryable:!1,context:{operation:"dashboard.projection.read"}})}function Ya(e,t){const a=t??yr(void 0);if(a.code!=="DASHBOARD_RESPONSE_INVALID")return t0(e,a);const s=Ne.projection.parseSafeError({code:"DASHBOARD_RESPONSE_INVALID",retryable:!1,context:{}});return Ne.projection.parseState({kind:"corrupt",binding:null,data:null,reasonCodes:["DASHBOARD_CORRUPT"],error:s,mutationEnabled:!1,policy:Ne.projection.statePolicy("corrupt")})}function C4(e,t,a,s,c=!1,l=null){if(!XI.has(e))throw new Error("Unsupported owner presentation state.");return Ne.projection.parseState({kind:e,binding:t,data:a,reasonCodes:e==="ready"?[]:[e0(e)],error:l,mutationEnabled:e==="ready"&&c,policy:Ne.projection.statePolicy(e)},{currentBinding:t,validateData:s})}function S4(e,t){return!Ne.projection.isValidatedState(e)||e.binding===null||e.data===null?e:Ne.projection.parseState({kind:"stale",binding:e.binding,data:e.data,reasonCodes:["DASHBOARD_STALE"],error:t,mutationEnabled:!1,policy:Ne.projection.statePolicy("stale")},{currentBinding:e.binding,validateData:a=>a!==null})}function O4(e,t){return Ne.projection.parseState({kind:e,binding:t,data:null,reasonCodes:[e0(e)],error:null,mutationEnabled:!1,policy:Ne.projection.statePolicy(e)},{currentBinding:t})}function Fr(e,t){const a=B.useRef(t);a.current=t;const s=B.useRef(e);s.current=e;const c=B.useRef(null),l=B.useRef(null),[u,f]=B.useState(0),[h,A]=B.useState(()=>Object.freeze({key:null,revision:0,phase:"idle",data:null,error:null})),y=B.useCallback(()=>f(j=>j+1),[]),m=B.useCallback(()=>{var O;if(c.current!==null)return c.current;const j=s.current;if(j===null)return Promise.reject(new Error("Owner read is unavailable."));const I=new AbortController;(O=l.current)==null||O.abort(),l.current=I,A(S=>Object.freeze({key:j,revision:S.revision,phase:"loading",data:S.key===j?S.data:null,error:null}));const C=a.current(I.signal).then(S=>{if(I.signal.aborted||s.current!==j)throw new DOMException("Cancelled","AbortError");return A(_=>Object.freeze({key:j,revision:_.revision,phase:"ready",data:S,error:null})),S}).catch(S=>{throw!I.signal.aborted&&s.current===j&&A(_=>Object.freeze({key:j,revision:_.revision,phase:"failed",data:_.key===j?_.data:null,error:yr(S,_.key===j&&_.data!==null)})),S}).finally(()=>{c.current===C&&(c.current=null),l.current===I&&(l.current=null)});return c.current=C,C},[]);B.useEffect(()=>{var I;if((I=l.current)==null||I.abort(),l.current=null,c.current=null,e===null){A(Object.freeze({key:null,revision:u,phase:"idle",data:null,error:null}));return}const j=new AbortController;return A(C=>Object.freeze({key:e,revision:u,phase:"loading",data:C.key===e?C.data:null,error:null})),a.current(j.signal).then(C=>{j.signal.aborted||A(Object.freeze({key:e,revision:u,phase:"ready",data:C,error:null}))}).catch(C=>{j.signal.aborted||A(O=>Object.freeze({key:e,revision:u,phase:"failed",data:O.key===e?O.data:null,error:yr(C,O.key===e&&O.data!==null)}))}),()=>j.abort()},[e,u]);const E=h.key===e&&h.revision===u,b=E?h.phase:e===null?"idle":"loading",w=E?h.data:null,x=E?h.error:null;return B.useMemo(()=>Object.freeze({phase:b,data:w,error:x,refetch:y,reconcile:m}),[w,x,b,m,y])}function _4(e){return e===null?null:JSON.stringify(e)}function N4(e){return e.product==="planning"?e:WI}function R4(e){return e.kind==="operate.evidence"||e.kind==="operate.evidence-item"?"evidence":e.kind==="operate.outcomes"?"outcomes":e.kind==="operate.outcome"?"outcome":e.kind==="operate.history"?"history":null}function tu(e){return e.kind==="operate.actions"||e.kind==="operate.action"||e.kind==="operate.action-planning"||e.kind==="operate.inbox"||e.kind==="operate.inbox-item"||e.kind==="operate.recovery"}function D4(e){return e.kind==="operate.action-planning"?{kind:"operate.action",product:"operate",subjectId:e.subjectId}:e}function Vr(e){return Object.freeze({eventHead:e.payload.eventHead,viewHash:e.payload.viewHash})}function Io(e){const t=e.payload.status;if(!XI.has(t))throw new Ne.projection.ValidationError("$.payload.status","contains an unsupported display status");return t}function T4(e){return e.payload.status==="terminal"?"read-only":Io(e)}function Ew(e,t){if(e.data===null)return e.phase==="loading"||e.phase==="idle"?pr(t):Ya(t,e.error);const a=Ne.identity.create({...t,eventHead:e.data.payload.sourceEventHead,viewHash:e.data.payload.sourceViewHash});return Ei(e,a,e.data,Xe.review.createValidator(a),T4(e.data),e.data.payload.mutationEnabled)}function Ei(e,t,a,s,c,l=!1){const u=e.phase==="failed"?"stale":e.phase==="loading"||e.phase==="idle"?"refreshing":c;try{return C4(u,t,a,s,l,u==="stale"?e.error??yr(void 0,!0):null)}catch(f){return Ya(t,yr(f))}}function Bw(e,t){if(e.data===null)return e.phase==="loading"||e.phase==="idle"?pr(t):Ya(t,e.error);const a=Ne.identity.create({...t,eventHead:e.data.cursor.eventHead,viewHash:e.data.cursor.viewHash});return Ei(e,a,e.data,s=>{try{return Hc.parseGraphEnvelope(s,t),!0}catch{return!1}},"ready")}function vw(e,t,a,s){var u;if(e.data===null)return e.phase==="loading"||e.phase==="idle"?pr(t):Ya(t,e.error);const c=Ne.identity.create({...t,...Vr(e.data)}),l=a==="today"?Xe.today.createValidator(c):Xe.cycles.createListValidator(c);return e.phase!=="ready"?Ei(e,c,e.data,l,Io(e.data),e.data.payload.mutationEnabled):a==="today"&&e.data.payload.surface==="today"&&e.data.payload.status==="ready"&&e.data.payload.data.activeCycle===null?l(e.data)?s?s.phase==="loading"||s.phase==="idle"?Ei(Object.freeze({...e,phase:"loading",error:null}),c,e.data,l,"ready"):s.phase==="failed"?Ei(Object.freeze({...e,phase:"failed",error:s.error}),c,e.data,l,"ready"):((u=s.data)==null?void 0:u.payload.surface)!=="cycles"?Ya(c,yr(new Ne.projection.ValidationError("$.payload.surface","does not contain the required cycles display"))):O4(s.data.payload.data.cycles.length===0?"first-use":"empty",c):pr(c):Ya(c,yr(new Ne.projection.ValidationError("$.data","failed its owner-boundary contract"))):Ei(e,c,e.data,l,Io(e.data),e.data.payload.mutationEnabled)}function k4(e){if(e.subjectId===null)throw new Error("Action display identity requires a subject.");return Ne.identity.create({...e,route:`#/operate/actions/${encodeURIComponent(e.subjectId)}`})}function bw(e,t,a){if(e.data===null)return e.phase==="loading"||e.phase==="idle"?pr(t):Ya(t,e.error);const s=Ne.identity.create({...t,...Vr(e.data)});let c;if(a.kind==="operate.actions")c=Xe.actions.createListValidator(s);else if(a.kind==="operate.action"||a.kind==="operate.action-planning"){const l=a.kind==="operate.action-planning"?k4(s):s;c=Xe.actions.createDetailValidator(l)}else if(a.kind==="operate.inbox"||a.kind==="operate.inbox-item")c=Xe.actions.createInboxValidator(s);else if(a.kind==="operate.recovery")c=Xe.actions.createRecoveryValidator(s);else return t0(s);return Ei(e,s,e.data,c,Io(e.data),a.kind==="operate.action-planning"?!1:e.data.payload.mutationEnabled)}function M4(e,t){var ye,Ee;const a=(e==null?void 0:e.origin)??null,s=JSON.stringify(t),[c,l]=B.useState(null),u=(e==null?void 0:e.queryRoots.planning)??null,f=(e==null?void 0:e.queryRoots.operate)??null,h=B.useMemo(()=>N4(t),[t]),A=B.useMemo(()=>u?Xe.transport.identityFromRoot(u,WI):null,[u]),y=B.useMemo(()=>u?Xe.transport.identityFromRoot(u,h):null,[u,h]),m=Fr(A?JSON.stringify(A):null,R=>{if(!a||!A)throw new Error("Planning query root is unavailable.");return Hc.fetchGraph({origin:a,identity:A,signal:R})}),E=_4(f),b=Fr(E,R=>{if(!a||!f)throw new Error("Operate query root is unavailable.");return Xe.transport.fetchRootDisplay({origin:a,root:f,surface:"today",signal:R})}),w=Fr(E,R=>{if(!a||!f)throw new Error("Operate query root is unavailable.");return Xe.transport.fetchRootDisplay({origin:a,root:f,surface:"cycles",signal:R})}),x=((ye=b.data)==null?void 0:ye.payload.surface)==="today"?b.data:null,j=(x==null?void 0:x.payload.surface)==="today"?((Ee=x.payload.data.activeCycle)==null?void 0:Ee.cycleId)??null:null,I=t.kind==="operate.cycle"?t.subjectId:t.kind==="operate.review"?t.cycleId:j,C=x?Vr(x):null,O=B.useMemo(()=>f&&t.product==="operate"&&I&&C?Xe.transport.identityFromRoot(f,t,{cycleId:I,eventHead:C.eventHead,viewHash:C.viewHash}):null,[C,f,t,I]),S=a&&f&&O?JSON.stringify({root:f,binding:O}):null,_=B.useMemo(()=>f&&t.kind==="operate.review"?Xe.transport.identityFromRoot(f,t,{cycleId:t.cycleId}):null,[f,t]),k=a&&_?JSON.stringify({root:f,route:_.route}):null,N=Fr(k,R=>{if(!a||!f||t.kind!=="operate.review")throw new Error("Operate Review query custody is incomplete.");return Xe.review.fetch({origin:a,root:f,cycleId:t.cycleId,reviewId:t.subjectId,signal:R})}),z=B.useMemo(()=>D4(t),[t]),M=B.useMemo(()=>f&&tu(t)&&I&&C?Xe.transport.identityFromRoot(f,z,{cycleId:I,eventHead:C.eventHead,viewHash:C.viewHash}):null,[z,C,f,t,I]),L=a&&f&&M?JSON.stringify({root:f,binding:M}):null,Z=R4(t),F=Fr(Z?S:null,R=>{if(!a||!f||!I||!Z)throw new Error("Operate audit query custody is incomplete.");return Xe.transport.fetchAuditDisplay({origin:a,root:f,route:t,surface:Z,cycleId:I,signal:R})}),oe=Fr(t.kind==="operate.cycle"?S:null,R=>{if(!a||!f||t.kind!=="operate.cycle")throw new Error("Operate Cycle query custody is incomplete.");return Xe.transport.fetchCycleDisplay({origin:a,root:f,cycleId:t.subjectId,signal:R})}),re=Fr(tu(t)?L:null,R=>{if(!a||!M)throw new Error("Operate route display custody is incomplete.");if(t.kind==="operate.actions")return Xe.actions.fetchList({origin:a,identity:M,signal:R});if(t.kind==="operate.action"||t.kind==="operate.action-planning")return Xe.actions.fetchDetail({origin:a,identity:M,signal:R});if(t.kind==="operate.inbox"||t.kind==="operate.inbox-item")return Xe.actions.fetchInbox({origin:a,identity:M,signal:R});if(t.kind==="operate.recovery")return Xe.actions.fetchRecovery({origin:a,identity:M,signal:R});throw new Error("Operate route does not own a bound display read.")}),pe=B.useMemo(()=>y?Bw(m,y):Pr,[y,m]),Y=B.useMemo(()=>{if(!f)return null;const R=Ne.routing.parse("#/operate/today");return Xe.transport.identityFromRoot(f,R,{cycleId:j})},[j,f]),V=B.useMemo(()=>Y?vw(b,Y,"today",w):Pr,[w,Y,b]),te=B.useMemo(()=>{if(!V.binding||!I)return null;const R=Xe.today.resolveModel({current:V},V.binding);return(R==null?void 0:R.kind)==="surface"?Xe.review.uniqueNavigationForCycle(R,I):null},[I,V]),le=B.useMemo(()=>f?Xe.transport.identityFromRoot(f,Ne.routing.parse("#/operate/cycles")):null,[f]),fe=B.useMemo(()=>le?vw(w,le,"cycles"):Pr,[le,w]),T=B.useMemo(()=>{var ne;if(!f||((ne=w.data)==null?void 0:ne.payload.surface)!=="cycles")return Object.freeze([]);const R=Vr(w.data),J=Ne.routing.parse("#/operate/cycles");return Object.freeze(w.data.payload.data.cycles.map(Ae=>Xe.transport.identityFromRoot(f,J,{cycleId:Ae.cycleId,eventHead:R.eventHead,viewHash:R.viewHash})))},[w,f]),X=B.useMemo(()=>{if(t.product==="planning")return Object.freeze({binding:pe.binding,projection:pe});if(t.product!=="operate"||!f)return Object.freeze({binding:null,projection:Pr});if(t.kind==="operate.today")return Object.freeze({binding:V.binding,projection:V});if(t.kind==="operate.cycles")return Object.freeze({binding:fe.binding,projection:fe});if(t.kind==="operate.review"){if(!_)return Object.freeze({binding:null,projection:Pr});const J=Ew(N,_);return Object.freeze({binding:J.binding,projection:J})}if(!C||!I)return Object.freeze({binding:null,projection:Pr});const R=O;if(!R)return Object.freeze({binding:null,projection:Pr});if(t.kind==="operate.cycle"){if(oe.data===null){const ne=oe.phase==="loading"||oe.phase==="idle"?pr(R):Ya(R,oe.error);return Object.freeze({binding:ne.binding,projection:ne})}const J=Ne.identity.create({...R,...Vr(oe.data)});return Object.freeze({binding:J,projection:Ei(oe,J,oe.data,Xe.cycles.createDetailValidator(J),Io(oe.data),oe.data.payload.mutationEnabled)})}if(Z){if(F.data===null){const Ae=F.phase==="loading"||F.phase==="idle"?pr(R):Ya(R,F.error);return Object.freeze({binding:Ae.binding,projection:Ae})}const J=Ne.identity.create({...R,...Vr(F.data)}),ne=Z==="evidence"?Xe.audit.createEvidenceValidator(J):Z==="outcomes"||Z==="outcome"?Xe.audit.createOutcomeValidator(J):Xe.audit.createHistoryValidator(J);return Object.freeze({binding:J,projection:Ei(F,J,F.data,ne,Io(F.data),!1)})}return tu(t)?Object.freeze({binding:R,projection:bw(re,R,t)}):Object.freeze({binding:R,projection:pr(R)})},[F,Z,re,O,oe,C,fe,f,pe,N,_,t,I,V]);B.useEffect(()=>{l(R=>R!==null&&R.routeKey!==s?null:R)},[s]);const se=B.useMemo(()=>c!==null&&c.routeKey===s&&(!Ne.projection.isValidatedState(X.projection)||X.projection.data===null)?Object.freeze({binding:c.binding,projection:c.projection}):X,[c,X,s]);B.useEffect(()=>{if(!a||!m.data||m.phase!=="ready"||!A)return;const R=Ne.identity.create({...A,eventHead:m.data.cursor.eventHead,viewHash:m.data.cursor.viewHash});let J=!0;const ne=Hc.createSseReconciler({identity:R,initial:m.data,isCurrent:()=>J,onSnapshot:()=>{},onPatch:()=>m.refetch(),onRefetch:()=>m.refetch(),onStale:()=>m.refetch()}),Ae=Hc.connectSse({origin:a,identity:R,reconciler:ne,lastEventId:Hc.encodeCheckpoint(m.data.cursor)});return Ae.completion.catch(()=>{}),()=>{J=!1,Ae.close()}},[a,A,m]),B.useEffect(()=>{if(!a||!f||!x||!Y)return;const R=Vr(x),J=Ne.identity.create({...Y,...R});let ne=!0;const Ae=Ne.transport.createSseReconciler({identity:J,isCurrent:()=>ne,onSnapshot:(xe,Ze)=>{var Ie,ce;(Ze.eventHead.sequence!==((Ie=R.eventHead)==null?void 0:Ie.sequence)||Ze.eventHead.hash!==((ce=R.eventHead)==null?void 0:ce.hash)||Ze.viewHash!==R.viewHash)&&(b.refetch(),w.refetch())},onPatch:()=>{b.refetch(),w.refetch()},onRefetch:()=>{b.refetch(),w.refetch()},onStale:()=>{b.refetch(),w.refetch()}}),we=Ne.transport.connectSse({origin:a,identity:J,reconciler:Ae});return we.completion.catch(()=>{}),()=>{ne=!1,we.close()}},[w,a,f,x,Y,b]);const de=B.useCallback(async()=>{const R=se;R.binding!==null&&Ne.projection.isValidatedState(R.projection)&&R.projection.data!==null&&l(Object.freeze({routeKey:s,binding:R.binding,projection:R.projection}));try{let J;if(t.kind==="operate.review"&&_){const ne=await N.reconcile();J=Ew(Object.freeze({phase:"ready",data:ne,error:null,refetch:N.refetch,reconcile:N.reconcile}),_)}else if(tu(t)&&O){const ne=await re.reconcile();J=bw(Object.freeze({phase:"ready",data:ne,error:null,refetch:re.refetch,reconcile:re.reconcile}),O,t)}else if(t.product==="planning"&&y){const ne=await m.reconcile();J=Bw(Object.freeze({phase:"ready",data:ne,error:null,refetch:m.refetch,reconcile:m.reconcile}),y)}else throw new Ne.projection.ValidationError("$.route","does not own an exact reconciliation read");if(!Ne.projection.isValidatedState(J)||J.data===null)throw new Ne.projection.ValidationError("$.projection","did not return a verified projection");return l(null),J}catch(J){const ne=R.binding!==null&&Ne.projection.isValidatedState(R.projection)&&R.projection.data!==null,Ae=yr(J,ne),we=ne?S4(R.projection,Ae):R.binding===null?R.projection:Ya(R.binding,Ae);return ne&&R.binding!==null&&l(Object.freeze({routeKey:s,binding:R.binding,projection:we})),we}},[re,O,se,y,m,N,_,t,s]);return Object.freeze({binding:se.binding,projection:se.projection,planningProjection:pe,operateCyclesProjection:fe,operateSearchBindings:T,operateReviewNavigation:te,refetchCurrent:de})}function ww(e){return e!==void 0?e:typeof window>"u"?"":window.location.hash}function G4(e,t){return e!==void 0||typeof window>"u"?()=>{}:(window.addEventListener("hashchange",t),()=>window.removeEventListener("hashchange",t))}function Y4({buildId:e,initialHash:t,identity:a,connection:s,bootstrap:c,bootPhase:l,bootDetail:u}){const f=B.useSyncExternalStore(S=>G4(t,S),()=>ww(t),()=>ww(t)),h=c===void 0&&s===void 0,[A,y]=B.useState(c??null),[m,E]=B.useState(l??(h?"checking":"compatible")),[b,w]=B.useState(u??null);B.useEffect(()=>{if(!h)return;const S=new AbortController;return E("checking"),w("Waiting for OpenPlanr to return a validated bootstrap envelope."),bP(e,{signal:S.signal}).then(_=>{y(_.bootstrap),E(_.phase==="compatible"?"compatible":_.phase),w(_.detail)}).catch(()=>{}),()=>S.abort()},[e,h]);const x=B.useMemo(()=>s??j1(A,e,b),[A,b,e,s]),j=B.useMemo(()=>a??Q1(A),[A,a]),I=B.useMemo(()=>Ha(f),[f]),C=I.kind==="system.diagnostics"||m==="incompatible"||x.state==="incompatible",O=M4(m==="compatible"&&x.state!=="incompatible"&&I.product!==null?A:null,I);return r.jsxs(E1,{buildId:e,initialHash:C?Pa(Mw):t,identity:j,connection:x,bootstrap:A,bootPhase:m,bootDetail:b,binding:O.binding,projection:O.projection,planningProjection:O.planningProjection,operateCyclesProjection:O.operateCyclesProjection,operateSearchBindings:O.operateSearchBindings,operateReviewNavigation:O.operateReviewNavigation,refetchCurrent:O.refetchCurrent,children:[r.jsx(v1,{}),r.jsx(gP,{})]})}const n0=document.querySelector("#root");if(!n0)throw new Error("OpenPlanr dashboard root element is missing.");TS.createRoot(n0).render(r.jsx(B.StrictMode,{children:r.jsx(Y4,{buildId:"dashboard-0.1.16-2af088d236b70ca8"})}));
|
|
557
|
-
//# sourceMappingURL=index-
|
|
556
|
+
`)}if(w.done){if(m.trim())return he("$","Planning live response ended mid-frame");break}}}finally{A.releaseLock()}})().catch(h=>{if(!t.signal.aborted)throw h instanceof ee?h:new ee("$","Planning live response failed safely")}).finally(()=>{var h;return(h=e.signal)==null?void 0:h.removeEventListener("abort",a)});return Object.freeze({completion:l,close:()=>{var h;t.abort(),e.reconciler.dispose(),(h=e.signal)==null||h.removeEventListener("abort",a)}})}const B4=Object.freeze({connectSse:E4,createSseReconciler:h4,encodeCheckpoint:y4,fetchGraph:A4,parseGraphEnvelope:Su}),v4=Object.freeze(Object.defineProperty({__proto__:null,planningRuntime:B4},Symbol.toStringTag,{value:"Module"})),b4=Object.freeze({create:Ve}),w4=Object.freeze({ValidationError:ee,isValidatedState:Pe,parseSafeError:Uw,parseState:so,statePolicy:oo}),x4=Object.freeze({parse:Ha}),j4=Object.freeze({connectSse:aI,createSseReconciler:nI}),Q4=Object.freeze({identity:b4,projection:w4,routing:x4,transport:j4}),I4=Object.freeze(Object.defineProperty({__proto__:null,dashboardRuntime:Q4},Symbol.toStringTag,{value:"Module"})),{operateRuntime:Xe}=JP,{planningRuntime:Hc}=v4,{dashboardRuntime:Ne}=I4,XI=new Set(["ready","read-only","stale","partial","blocked","offline"]),Pr=Ne.projection.parseState({kind:"booting",binding:null,data:null,reasonCodes:[],error:null,mutationEnabled:!1,policy:Ne.projection.statePolicy("booting")}),WI=Ne.routing.parse("#/overview");function e0(e){return`DASHBOARD_${e.toUpperCase().replace("-","_")}`}function pr(e){return Ne.projection.parseState({kind:"loading",binding:e,data:null,reasonCodes:[],error:null,mutationEnabled:!1,policy:Ne.projection.statePolicy("loading")},{currentBinding:e})}function t0(e,t=null){return Ne.projection.parseState({kind:"unavailable",binding:e,data:null,reasonCodes:["DASHBOARD_UNAVAILABLE"],error:t,mutationEnabled:!1,policy:Ne.projection.statePolicy("unavailable")},{currentBinding:e})}function yr(e,t=!1){const s=(e!==null&&typeof e=="object"&&!Array.isArray(e)?e:{}).code==="DASHBOARD_RESPONSE_INVALID"||e instanceof Ne.projection.ValidationError;return Ne.projection.parseSafeError({code:t||!s?"DASHBOARD_READ_FAILED":"DASHBOARD_RESPONSE_INVALID",retryable:!1,context:{operation:"dashboard.projection.read"}})}function Ya(e,t){const a=t??yr(void 0);if(a.code!=="DASHBOARD_RESPONSE_INVALID")return t0(e,a);const s=Ne.projection.parseSafeError({code:"DASHBOARD_RESPONSE_INVALID",retryable:!1,context:{}});return Ne.projection.parseState({kind:"corrupt",binding:null,data:null,reasonCodes:["DASHBOARD_CORRUPT"],error:s,mutationEnabled:!1,policy:Ne.projection.statePolicy("corrupt")})}function C4(e,t,a,s,c=!1,l=null){if(!XI.has(e))throw new Error("Unsupported owner presentation state.");return Ne.projection.parseState({kind:e,binding:t,data:a,reasonCodes:e==="ready"?[]:[e0(e)],error:l,mutationEnabled:e==="ready"&&c,policy:Ne.projection.statePolicy(e)},{currentBinding:t,validateData:s})}function S4(e,t){return!Ne.projection.isValidatedState(e)||e.binding===null||e.data===null?e:Ne.projection.parseState({kind:"stale",binding:e.binding,data:e.data,reasonCodes:["DASHBOARD_STALE"],error:t,mutationEnabled:!1,policy:Ne.projection.statePolicy("stale")},{currentBinding:e.binding,validateData:a=>a!==null})}function O4(e,t){return Ne.projection.parseState({kind:e,binding:t,data:null,reasonCodes:[e0(e)],error:null,mutationEnabled:!1,policy:Ne.projection.statePolicy(e)},{currentBinding:t})}function Fr(e,t){const a=B.useRef(t);a.current=t;const s=B.useRef(e);s.current=e;const c=B.useRef(null),l=B.useRef(null),[u,f]=B.useState(0),[h,A]=B.useState(()=>Object.freeze({key:null,revision:0,phase:"idle",data:null,error:null})),y=B.useCallback(()=>f(j=>j+1),[]),m=B.useCallback(()=>{var O;if(c.current!==null)return c.current;const j=s.current;if(j===null)return Promise.reject(new Error("Owner read is unavailable."));const I=new AbortController;(O=l.current)==null||O.abort(),l.current=I,A(S=>Object.freeze({key:j,revision:S.revision,phase:"loading",data:S.key===j?S.data:null,error:null}));const C=a.current(I.signal).then(S=>{if(I.signal.aborted||s.current!==j)throw new DOMException("Cancelled","AbortError");return A(_=>Object.freeze({key:j,revision:_.revision,phase:"ready",data:S,error:null})),S}).catch(S=>{throw!I.signal.aborted&&s.current===j&&A(_=>Object.freeze({key:j,revision:_.revision,phase:"failed",data:_.key===j?_.data:null,error:yr(S,_.key===j&&_.data!==null)})),S}).finally(()=>{c.current===C&&(c.current=null),l.current===I&&(l.current=null)});return c.current=C,C},[]);B.useEffect(()=>{var I;if((I=l.current)==null||I.abort(),l.current=null,c.current=null,e===null){A(Object.freeze({key:null,revision:u,phase:"idle",data:null,error:null}));return}const j=new AbortController;return A(C=>Object.freeze({key:e,revision:u,phase:"loading",data:C.key===e?C.data:null,error:null})),a.current(j.signal).then(C=>{j.signal.aborted||A(Object.freeze({key:e,revision:u,phase:"ready",data:C,error:null}))}).catch(C=>{j.signal.aborted||A(O=>Object.freeze({key:e,revision:u,phase:"failed",data:O.key===e?O.data:null,error:yr(C,O.key===e&&O.data!==null)}))}),()=>j.abort()},[e,u]);const E=h.key===e&&h.revision===u,b=E?h.phase:e===null?"idle":"loading",w=E?h.data:null,x=E?h.error:null;return B.useMemo(()=>Object.freeze({phase:b,data:w,error:x,refetch:y,reconcile:m}),[w,x,b,m,y])}function _4(e){return e===null?null:JSON.stringify(e)}function N4(e){return e.product==="planning"?e:WI}function R4(e){return e.kind==="operate.evidence"||e.kind==="operate.evidence-item"?"evidence":e.kind==="operate.outcomes"?"outcomes":e.kind==="operate.outcome"?"outcome":e.kind==="operate.history"?"history":null}function tu(e){return e.kind==="operate.actions"||e.kind==="operate.action"||e.kind==="operate.action-planning"||e.kind==="operate.inbox"||e.kind==="operate.inbox-item"||e.kind==="operate.recovery"}function D4(e){return e.kind==="operate.action-planning"?{kind:"operate.action",product:"operate",subjectId:e.subjectId}:e}function Vr(e){return Object.freeze({eventHead:e.payload.eventHead,viewHash:e.payload.viewHash})}function Io(e){const t=e.payload.status;if(!XI.has(t))throw new Ne.projection.ValidationError("$.payload.status","contains an unsupported display status");return t}function T4(e){return e.payload.status==="terminal"?"read-only":Io(e)}function Ew(e,t){if(e.data===null)return e.phase==="loading"||e.phase==="idle"?pr(t):Ya(t,e.error);const a=Ne.identity.create({...t,eventHead:e.data.payload.sourceEventHead,viewHash:e.data.payload.sourceViewHash});return Ei(e,a,e.data,Xe.review.createValidator(a),T4(e.data),e.data.payload.mutationEnabled)}function Ei(e,t,a,s,c,l=!1){const u=e.phase==="failed"?"stale":e.phase==="loading"||e.phase==="idle"?"refreshing":c;try{return C4(u,t,a,s,l,u==="stale"?e.error??yr(void 0,!0):null)}catch(f){return Ya(t,yr(f))}}function Bw(e,t){if(e.data===null)return e.phase==="loading"||e.phase==="idle"?pr(t):Ya(t,e.error);const a=Ne.identity.create({...t,eventHead:e.data.cursor.eventHead,viewHash:e.data.cursor.viewHash});return Ei(e,a,e.data,s=>{try{return Hc.parseGraphEnvelope(s,t),!0}catch{return!1}},"ready")}function vw(e,t,a,s){var u;if(e.data===null)return e.phase==="loading"||e.phase==="idle"?pr(t):Ya(t,e.error);const c=Ne.identity.create({...t,...Vr(e.data)}),l=a==="today"?Xe.today.createValidator(c):Xe.cycles.createListValidator(c);return e.phase!=="ready"?Ei(e,c,e.data,l,Io(e.data),e.data.payload.mutationEnabled):a==="today"&&e.data.payload.surface==="today"&&e.data.payload.status==="ready"&&e.data.payload.data.activeCycle===null?l(e.data)?s?s.phase==="loading"||s.phase==="idle"?Ei(Object.freeze({...e,phase:"loading",error:null}),c,e.data,l,"ready"):s.phase==="failed"?Ei(Object.freeze({...e,phase:"failed",error:s.error}),c,e.data,l,"ready"):((u=s.data)==null?void 0:u.payload.surface)!=="cycles"?Ya(c,yr(new Ne.projection.ValidationError("$.payload.surface","does not contain the required cycles display"))):O4(s.data.payload.data.cycles.length===0?"first-use":"empty",c):pr(c):Ya(c,yr(new Ne.projection.ValidationError("$.data","failed its owner-boundary contract"))):Ei(e,c,e.data,l,Io(e.data),e.data.payload.mutationEnabled)}function k4(e){if(e.subjectId===null)throw new Error("Action display identity requires a subject.");return Ne.identity.create({...e,route:`#/operate/actions/${encodeURIComponent(e.subjectId)}`})}function bw(e,t,a){if(e.data===null)return e.phase==="loading"||e.phase==="idle"?pr(t):Ya(t,e.error);const s=Ne.identity.create({...t,...Vr(e.data)});let c;if(a.kind==="operate.actions")c=Xe.actions.createListValidator(s);else if(a.kind==="operate.action"||a.kind==="operate.action-planning"){const l=a.kind==="operate.action-planning"?k4(s):s;c=Xe.actions.createDetailValidator(l)}else if(a.kind==="operate.inbox"||a.kind==="operate.inbox-item")c=Xe.actions.createInboxValidator(s);else if(a.kind==="operate.recovery")c=Xe.actions.createRecoveryValidator(s);else return t0(s);return Ei(e,s,e.data,c,Io(e.data),a.kind==="operate.action-planning"?!1:e.data.payload.mutationEnabled)}function M4(e,t){var ye,Ee;const a=(e==null?void 0:e.origin)??null,s=JSON.stringify(t),[c,l]=B.useState(null),u=(e==null?void 0:e.queryRoots.planning)??null,f=(e==null?void 0:e.queryRoots.operate)??null,h=B.useMemo(()=>N4(t),[t]),A=B.useMemo(()=>u?Xe.transport.identityFromRoot(u,WI):null,[u]),y=B.useMemo(()=>u?Xe.transport.identityFromRoot(u,h):null,[u,h]),m=Fr(A?JSON.stringify(A):null,R=>{if(!a||!A)throw new Error("Planning query root is unavailable.");return Hc.fetchGraph({origin:a,identity:A,signal:R})}),E=_4(f),b=Fr(E,R=>{if(!a||!f)throw new Error("Operate query root is unavailable.");return Xe.transport.fetchRootDisplay({origin:a,root:f,surface:"today",signal:R})}),w=Fr(E,R=>{if(!a||!f)throw new Error("Operate query root is unavailable.");return Xe.transport.fetchRootDisplay({origin:a,root:f,surface:"cycles",signal:R})}),x=((ye=b.data)==null?void 0:ye.payload.surface)==="today"?b.data:null,j=(x==null?void 0:x.payload.surface)==="today"?((Ee=x.payload.data.activeCycle)==null?void 0:Ee.cycleId)??null:null,I=t.kind==="operate.cycle"?t.subjectId:t.kind==="operate.review"?t.cycleId:j,C=x?Vr(x):null,O=B.useMemo(()=>f&&t.product==="operate"&&I&&C?Xe.transport.identityFromRoot(f,t,{cycleId:I,eventHead:C.eventHead,viewHash:C.viewHash}):null,[C,f,t,I]),S=a&&f&&O?JSON.stringify({root:f,binding:O}):null,_=B.useMemo(()=>f&&t.kind==="operate.review"?Xe.transport.identityFromRoot(f,t,{cycleId:t.cycleId}):null,[f,t]),k=a&&_?JSON.stringify({root:f,route:_.route}):null,N=Fr(k,R=>{if(!a||!f||t.kind!=="operate.review")throw new Error("Operate Review query custody is incomplete.");return Xe.review.fetch({origin:a,root:f,cycleId:t.cycleId,reviewId:t.subjectId,signal:R})}),z=B.useMemo(()=>D4(t),[t]),M=B.useMemo(()=>f&&tu(t)&&I&&C?Xe.transport.identityFromRoot(f,z,{cycleId:I,eventHead:C.eventHead,viewHash:C.viewHash}):null,[z,C,f,t,I]),L=a&&f&&M?JSON.stringify({root:f,binding:M}):null,Z=R4(t),F=Fr(Z?S:null,R=>{if(!a||!f||!I||!Z)throw new Error("Operate audit query custody is incomplete.");return Xe.transport.fetchAuditDisplay({origin:a,root:f,route:t,surface:Z,cycleId:I,signal:R})}),oe=Fr(t.kind==="operate.cycle"?S:null,R=>{if(!a||!f||t.kind!=="operate.cycle")throw new Error("Operate Cycle query custody is incomplete.");return Xe.transport.fetchCycleDisplay({origin:a,root:f,cycleId:t.subjectId,signal:R})}),re=Fr(tu(t)?L:null,R=>{if(!a||!M)throw new Error("Operate route display custody is incomplete.");if(t.kind==="operate.actions")return Xe.actions.fetchList({origin:a,identity:M,signal:R});if(t.kind==="operate.action"||t.kind==="operate.action-planning")return Xe.actions.fetchDetail({origin:a,identity:M,signal:R});if(t.kind==="operate.inbox"||t.kind==="operate.inbox-item")return Xe.actions.fetchInbox({origin:a,identity:M,signal:R});if(t.kind==="operate.recovery")return Xe.actions.fetchRecovery({origin:a,identity:M,signal:R});throw new Error("Operate route does not own a bound display read.")}),pe=B.useMemo(()=>y?Bw(m,y):Pr,[y,m]),Y=B.useMemo(()=>{if(!f)return null;const R=Ne.routing.parse("#/operate/today");return Xe.transport.identityFromRoot(f,R,{cycleId:j})},[j,f]),V=B.useMemo(()=>Y?vw(b,Y,"today",w):Pr,[w,Y,b]),te=B.useMemo(()=>{if(!V.binding||!I)return null;const R=Xe.today.resolveModel({current:V},V.binding);return(R==null?void 0:R.kind)==="surface"?Xe.review.uniqueNavigationForCycle(R,I):null},[I,V]),le=B.useMemo(()=>f?Xe.transport.identityFromRoot(f,Ne.routing.parse("#/operate/cycles")):null,[f]),fe=B.useMemo(()=>le?vw(w,le,"cycles"):Pr,[le,w]),T=B.useMemo(()=>{var ne;if(!f||((ne=w.data)==null?void 0:ne.payload.surface)!=="cycles")return Object.freeze([]);const R=Vr(w.data),J=Ne.routing.parse("#/operate/cycles");return Object.freeze(w.data.payload.data.cycles.map(Ae=>Xe.transport.identityFromRoot(f,J,{cycleId:Ae.cycleId,eventHead:R.eventHead,viewHash:R.viewHash})))},[w,f]),X=B.useMemo(()=>{if(t.product==="planning")return Object.freeze({binding:pe.binding,projection:pe});if(t.product!=="operate"||!f)return Object.freeze({binding:null,projection:Pr});if(t.kind==="operate.today")return Object.freeze({binding:V.binding,projection:V});if(t.kind==="operate.cycles")return Object.freeze({binding:fe.binding,projection:fe});if(t.kind==="operate.review"){if(!_)return Object.freeze({binding:null,projection:Pr});const J=Ew(N,_);return Object.freeze({binding:J.binding,projection:J})}if(!C||!I)return Object.freeze({binding:null,projection:Pr});const R=O;if(!R)return Object.freeze({binding:null,projection:Pr});if(t.kind==="operate.cycle"){if(oe.data===null){const ne=oe.phase==="loading"||oe.phase==="idle"?pr(R):Ya(R,oe.error);return Object.freeze({binding:ne.binding,projection:ne})}const J=Ne.identity.create({...R,...Vr(oe.data)});return Object.freeze({binding:J,projection:Ei(oe,J,oe.data,Xe.cycles.createDetailValidator(J),Io(oe.data),oe.data.payload.mutationEnabled)})}if(Z){if(F.data===null){const Ae=F.phase==="loading"||F.phase==="idle"?pr(R):Ya(R,F.error);return Object.freeze({binding:Ae.binding,projection:Ae})}const J=Ne.identity.create({...R,...Vr(F.data)}),ne=Z==="evidence"?Xe.audit.createEvidenceValidator(J):Z==="outcomes"||Z==="outcome"?Xe.audit.createOutcomeValidator(J):Xe.audit.createHistoryValidator(J);return Object.freeze({binding:J,projection:Ei(F,J,F.data,ne,Io(F.data),!1)})}return tu(t)?Object.freeze({binding:R,projection:bw(re,R,t)}):Object.freeze({binding:R,projection:pr(R)})},[F,Z,re,O,oe,C,fe,f,pe,N,_,t,I,V]);B.useEffect(()=>{l(R=>R!==null&&R.routeKey!==s?null:R)},[s]);const se=B.useMemo(()=>c!==null&&c.routeKey===s&&(!Ne.projection.isValidatedState(X.projection)||X.projection.data===null)?Object.freeze({binding:c.binding,projection:c.projection}):X,[c,X,s]);B.useEffect(()=>{if(!a||!m.data||m.phase!=="ready"||!A)return;const R=Ne.identity.create({...A,eventHead:m.data.cursor.eventHead,viewHash:m.data.cursor.viewHash});let J=!0;const ne=Hc.createSseReconciler({identity:R,initial:m.data,isCurrent:()=>J,onSnapshot:()=>{},onPatch:()=>m.refetch(),onRefetch:()=>m.refetch(),onStale:()=>m.refetch()}),Ae=Hc.connectSse({origin:a,identity:R,reconciler:ne,lastEventId:Hc.encodeCheckpoint(m.data.cursor)});return Ae.completion.catch(()=>{}),()=>{J=!1,Ae.close()}},[a,A,m]),B.useEffect(()=>{if(!a||!f||!x||!Y)return;const R=Vr(x),J=Ne.identity.create({...Y,...R});let ne=!0;const Ae=Ne.transport.createSseReconciler({identity:J,isCurrent:()=>ne,onSnapshot:(xe,Ze)=>{var Ie,ce;(Ze.eventHead.sequence!==((Ie=R.eventHead)==null?void 0:Ie.sequence)||Ze.eventHead.hash!==((ce=R.eventHead)==null?void 0:ce.hash)||Ze.viewHash!==R.viewHash)&&(b.refetch(),w.refetch())},onPatch:()=>{b.refetch(),w.refetch()},onRefetch:()=>{b.refetch(),w.refetch()},onStale:()=>{b.refetch(),w.refetch()}}),we=Ne.transport.connectSse({origin:a,identity:J,reconciler:Ae});return we.completion.catch(()=>{}),()=>{ne=!1,we.close()}},[w,a,f,x,Y,b]);const de=B.useCallback(async()=>{const R=se;R.binding!==null&&Ne.projection.isValidatedState(R.projection)&&R.projection.data!==null&&l(Object.freeze({routeKey:s,binding:R.binding,projection:R.projection}));try{let J;if(t.kind==="operate.review"&&_){const ne=await N.reconcile();J=Ew(Object.freeze({phase:"ready",data:ne,error:null,refetch:N.refetch,reconcile:N.reconcile}),_)}else if(tu(t)&&O){const ne=await re.reconcile();J=bw(Object.freeze({phase:"ready",data:ne,error:null,refetch:re.refetch,reconcile:re.reconcile}),O,t)}else if(t.product==="planning"&&y){const ne=await m.reconcile();J=Bw(Object.freeze({phase:"ready",data:ne,error:null,refetch:m.refetch,reconcile:m.reconcile}),y)}else throw new Ne.projection.ValidationError("$.route","does not own an exact reconciliation read");if(!Ne.projection.isValidatedState(J)||J.data===null)throw new Ne.projection.ValidationError("$.projection","did not return a verified projection");return l(null),J}catch(J){const ne=R.binding!==null&&Ne.projection.isValidatedState(R.projection)&&R.projection.data!==null,Ae=yr(J,ne),we=ne?S4(R.projection,Ae):R.binding===null?R.projection:Ya(R.binding,Ae);return ne&&R.binding!==null&&l(Object.freeze({routeKey:s,binding:R.binding,projection:we})),we}},[re,O,se,y,m,N,_,t,s]);return Object.freeze({binding:se.binding,projection:se.projection,planningProjection:pe,operateCyclesProjection:fe,operateSearchBindings:T,operateReviewNavigation:te,refetchCurrent:de})}function ww(e){return e!==void 0?e:typeof window>"u"?"":window.location.hash}function G4(e,t){return e!==void 0||typeof window>"u"?()=>{}:(window.addEventListener("hashchange",t),()=>window.removeEventListener("hashchange",t))}function Y4({buildId:e,initialHash:t,identity:a,connection:s,bootstrap:c,bootPhase:l,bootDetail:u}){const f=B.useSyncExternalStore(S=>G4(t,S),()=>ww(t),()=>ww(t)),h=c===void 0&&s===void 0,[A,y]=B.useState(c??null),[m,E]=B.useState(l??(h?"checking":"compatible")),[b,w]=B.useState(u??null);B.useEffect(()=>{if(!h)return;const S=new AbortController;return E("checking"),w("Waiting for OpenPlanr to return a validated bootstrap envelope."),bP(e,{signal:S.signal}).then(_=>{y(_.bootstrap),E(_.phase==="compatible"?"compatible":_.phase),w(_.detail)}).catch(()=>{}),()=>S.abort()},[e,h]);const x=B.useMemo(()=>s??j1(A,e,b),[A,b,e,s]),j=B.useMemo(()=>a??Q1(A),[A,a]),I=B.useMemo(()=>Ha(f),[f]),C=I.kind==="system.diagnostics"||m==="incompatible"||x.state==="incompatible",O=M4(m==="compatible"&&x.state!=="incompatible"&&I.product!==null?A:null,I);return r.jsxs(E1,{buildId:e,initialHash:C?Pa(Mw):t,identity:j,connection:x,bootstrap:A,bootPhase:m,bootDetail:b,binding:O.binding,projection:O.projection,planningProjection:O.planningProjection,operateCyclesProjection:O.operateCyclesProjection,operateSearchBindings:O.operateSearchBindings,operateReviewNavigation:O.operateReviewNavigation,refetchCurrent:O.refetchCurrent,children:[r.jsx(v1,{}),r.jsx(gP,{})]})}const n0=document.querySelector("#root");if(!n0)throw new Error("OpenPlanr dashboard root element is missing.");TS.createRoot(n0).render(r.jsx(B.StrictMode,{children:r.jsx(Y4,{buildId:"dashboard-0.1.18-642d0e2451a256dc"})}));
|
|
557
|
+
//# sourceMappingURL=index-Csby7_ur.js.map
|