@planu/cli 4.14.1 → 5.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 +35 -1
- package/LICENSE +55 -12
- package/README.md +10 -2
- package/dist/cli/commands/install.d.ts +1 -12
- package/dist/cli/commands/install.js +9 -65
- package/dist/cli/commands/job.js +4 -3
- package/dist/cli/commands/spec.js +2 -2
- package/dist/cli/commands/validate.js +2 -2
- package/dist/cli/router.js +1 -3
- package/dist/config/environment-schema.json +1 -3
- package/dist/config/official-sdd-tools.d.ts +4 -0
- package/dist/config/official-sdd-tools.js +35 -0
- package/dist/config/product-public.d.ts +139 -3
- package/dist/config/product-public.js +8 -1
- package/dist/config/product-public.json +7 -36
- package/dist/config/registries/hosts/codex.json +20 -363
- package/dist/config/release-policy.json +84 -2
- package/dist/config/runtime-policy.json +12 -1
- package/dist/config/skill-templates/planu-resume-work.md +2 -2
- package/dist/core/index.d.ts +1 -1
- package/dist/core/spec-validator.d.ts +4 -4
- package/dist/core/spec-validator.js +1 -1
- package/dist/engine/abortable-process-runner.d.ts +20 -2
- package/dist/engine/abortable-process-runner.js +243 -74
- package/dist/engine/ambiguity-scorer.js +4 -26
- package/dist/engine/auth/scope-mapper.js +1 -7
- package/dist/engine/autopilot/state-updater.js +4 -4
- package/dist/engine/cascade-hooks/hooks/review-enricher.hook.js +9 -6
- package/dist/engine/cascade-hooks/state-drift-detector.d.ts +3 -3
- package/dist/engine/cascade-hooks/state-drift-detector.js +1 -1
- package/dist/engine/ci-generator/planu-config.js +1 -7
- package/dist/engine/clarification-gate/gate.d.ts +3 -3
- package/dist/engine/code-scanner/layer-scanner.js +6 -22
- package/dist/engine/core-bridge.d.ts +3 -3
- package/dist/engine/cost-guardrails.d.ts +1 -1
- package/dist/engine/cost-guardrails.js +1 -1
- package/dist/engine/criterion-identity.d.ts +1 -0
- package/dist/engine/criterion-identity.js +7 -0
- package/dist/engine/dashboard/data-loader.js +2 -7
- package/dist/engine/dashboard/templates-layout.js +0 -3
- package/dist/engine/dashboard/templates-project.js +1 -13
- package/dist/engine/docs-site-generator/data-collector.d.ts +1 -1
- package/dist/engine/docs-site-generator/data-collector.js +7 -28
- package/dist/engine/docs-site-generator/tools-renderer.js +3 -10
- package/dist/engine/evidence-gates/artifact-reader.d.ts +10 -1
- package/dist/engine/evidence-gates/artifact-reader.js +115 -2
- package/dist/engine/evidence-gates/lifecycle-gate.js +4 -3
- package/dist/engine/evidence-gates/reconciliation-freshness.d.ts +11 -0
- package/dist/engine/evidence-gates/reconciliation-freshness.js +72 -0
- package/dist/engine/evidence-index/done-drift.d.ts +1 -1
- package/dist/engine/evidence-index/done-drift.js +40 -18
- package/dist/engine/execution/context.js +3 -0
- package/dist/engine/execution/durable-job-heartbeat-runtime.d.ts +4 -0
- package/dist/engine/execution/durable-job-heartbeat-runtime.js +400 -0
- package/dist/engine/execution/job-runtime.d.ts +30 -0
- package/dist/engine/execution/job-runtime.js +114 -6
- package/dist/engine/execution/public-job-sanitizer.d.ts +4 -0
- package/dist/engine/execution/public-job-sanitizer.js +31 -0
- package/dist/engine/execution/validate-job-executor.d.ts +12 -1
- package/dist/engine/execution/validate-job-executor.js +549 -86
- package/dist/engine/execution/validate-job-payload.js +107 -50
- package/dist/engine/execution/validate-job-recovery.js +1 -1
- package/dist/engine/execution/validate-worker-runtime.d.ts +5 -0
- package/dist/engine/execution/validate-worker-runtime.js +90 -2
- package/dist/engine/execution/validate-worker-thread.js +17 -24
- package/dist/engine/handoff-artifacts/schemas.d.ts +2 -1
- package/dist/engine/handoff-artifacts/schemas.js +33 -0
- package/dist/engine/handoff-packager.d.ts +19 -0
- package/dist/engine/handoff-packager.js +415 -13
- package/dist/engine/hooks/effort-configurator.js +1 -1
- package/dist/engine/impact-detector/test-break-predictor.js +3 -3
- package/dist/engine/impact-detector/tool-registration.js +1 -1
- package/dist/engine/implementation-contract/renderer.js +23 -8
- package/dist/engine/lifecycle-reconciliation-io.d.ts +11 -0
- package/dist/engine/lifecycle-reconciliation-io.js +180 -0
- package/dist/engine/lifecycle-reconciliation.d.ts +16 -0
- package/dist/engine/lifecycle-reconciliation.js +406 -0
- package/dist/engine/local-first/tool-classification.js +2 -0
- package/dist/engine/macos-keychain-native-port.d.ts +5 -0
- package/dist/engine/macos-keychain-native-port.js +19 -7
- package/dist/engine/migrations/remove-commercial-state.d.ts +3 -0
- package/dist/engine/migrations/remove-commercial-state.js +343 -0
- package/dist/engine/network-policy.js +1 -0
- package/dist/engine/planu-core.darwin-arm64.node.manifest.json +7 -7
- package/dist/engine/planu-core.darwin-arm64.node.sbom.json +10 -10
- package/dist/engine/planu-core.darwin-x64.node.manifest.json +7 -7
- package/dist/engine/planu-core.darwin-x64.node.sbom.json +10 -10
- package/dist/engine/planu-core.linux-arm64-gnu.node.manifest.json +7 -7
- package/dist/engine/planu-core.linux-arm64-gnu.node.sbom.json +10 -10
- package/dist/engine/planu-core.linux-arm64-musl.node.manifest.json +7 -7
- package/dist/engine/planu-core.linux-arm64-musl.node.sbom.json +10 -10
- package/dist/engine/planu-core.linux-x64-gnu.node.manifest.json +7 -7
- package/dist/engine/planu-core.linux-x64-gnu.node.sbom.json +10 -10
- package/dist/engine/planu-core.linux-x64-musl.node.manifest.json +7 -7
- package/dist/engine/planu-core.linux-x64-musl.node.sbom.json +10 -10
- package/dist/engine/planu-core.win32-arm64-msvc.node.manifest.json +7 -7
- package/dist/engine/planu-core.win32-arm64-msvc.node.sbom.json +10 -10
- package/dist/engine/planu-core.win32-x64-msvc.node.manifest.json +7 -7
- package/dist/engine/planu-core.win32-x64-msvc.node.sbom.json +10 -10
- package/dist/engine/readiness-checker.d.ts +1 -16
- package/dist/engine/readiness-checker.js +27 -88
- package/dist/engine/runtime-policy.d.ts +2 -0
- package/dist/engine/runtime-policy.js +42 -5
- package/dist/engine/runtime-security/rate-limiter.js +0 -1
- package/dist/engine/safety/contained-project-file.d.ts +3 -0
- package/dist/engine/safety/contained-project-file.js +23 -0
- package/dist/engine/scope-boundaries/contradiction-checker.js +63 -1
- package/dist/engine/scope-boundaries/scope-validator.js +45 -7
- package/dist/engine/session/checkpoint-writer.js +0 -9
- package/dist/engine/spec-format/acceptance-criteria.d.ts +6 -2
- package/dist/engine/spec-format/acceptance-criteria.js +77 -18
- package/dist/engine/spec-format/markdown-sections.d.ts +14 -0
- package/dist/engine/spec-format/markdown-sections.js +105 -0
- package/dist/engine/spec-format/read-technical-section.js +33 -5
- package/dist/engine/spec-format/technical-md-populator.js +3 -2
- package/dist/engine/spec-format/unified-spec-builder.d.ts +7 -0
- package/dist/engine/spec-format/unified-spec-builder.js +202 -0
- package/dist/engine/spec-migrator/canonical-deduplicator.d.ts +18 -0
- package/dist/engine/spec-migrator/canonical-deduplicator.js +479 -0
- package/dist/engine/spec-migrator/filesystem-import.d.ts +4 -8
- package/dist/engine/spec-migrator/filesystem-import.js +121 -14
- package/dist/engine/spec-migrator/frontmatter-parser.js +32 -15
- package/dist/engine/spec-migrator/index.d.ts +1 -0
- package/dist/engine/spec-migrator/index.js +1 -0
- package/dist/engine/spec-state-machine/transition-spec.d.ts +6 -1
- package/dist/engine/spec-state-machine/transition-spec.js +10 -1
- package/dist/engine/technical-enricher/index.js +16 -8
- package/dist/engine/technical-enricher/render-enriched.d.ts +1 -0
- package/dist/engine/technical-enricher/render-enriched.js +42 -14
- package/dist/engine/telemetry/health-checker.js +53 -17
- package/dist/engine/telemetry/telemetry-client.js +26 -8
- package/dist/engine/text-signal-boundaries.d.ts +2 -0
- package/dist/engine/text-signal-boundaries.js +25 -2
- package/dist/engine/time/relative-date.d.ts +3 -0
- package/dist/engine/time/relative-date.js +16 -0
- package/dist/engine/timing/budget.d.ts +11 -0
- package/dist/engine/timing/budget.js +27 -9
- package/dist/engine/token-optimizer/analytics.d.ts +1 -1
- package/dist/engine/token-optimizer/analytics.js +5 -6
- package/dist/engine/usage-tracker/core.d.ts +2 -2
- package/dist/engine/usage-tracker/core.js +1 -2
- package/dist/engine/usage-tracker/index.d.ts +0 -3
- package/dist/engine/usage-tracker/index.js +0 -3
- package/dist/engine/usage-tracker/stats.d.ts +2 -2
- package/dist/engine/usage-tracker/stats.js +1 -28
- package/dist/engine/validation/durable-validation.d.ts +1 -1
- package/dist/engine/validation/durable-validation.js +3 -82
- package/dist/engine/validation/validation-freshness.d.ts +11 -1
- package/dist/engine/validation/validation-freshness.js +231 -91
- package/dist/engine/validation/validation-receipt.d.ts +9 -6
- package/dist/engine/validation/validation-receipt.js +84 -24
- package/dist/engine/validation/validation-source-digest.d.ts +2 -0
- package/dist/engine/validation/validation-source-digest.js +86 -0
- package/dist/engine/validation/validation-submission.d.ts +5 -4
- package/dist/engine/validation/validation-submission.js +25 -11
- package/dist/engine/validation/validation-worktree.d.ts +21 -0
- package/dist/engine/validation/validation-worktree.js +260 -0
- package/dist/engine/validation-impact-planner.d.ts +14 -2
- package/dist/engine/validation-impact-planner.js +0 -3
- package/dist/engine/validator/dor-dod.d.ts +1 -0
- package/dist/engine/validator/dor-dod.js +5 -3
- package/dist/engine/validator/extractors.d.ts +1 -5
- package/dist/engine/validator/extractors.js +24 -69
- package/dist/engine/validator/spec-compliance-runner.d.ts +12 -24
- package/dist/engine/validator/spec-compliance-runner.js +429 -211
- package/dist/engine/validator.js +35 -22
- package/dist/index.js +4 -16
- package/dist/resources/usage-stats-resource.js +2 -18
- package/dist/security/adapters/linux-secret-service.js +7 -3
- package/dist/security/adapters/windows-credential-manager.js +6 -4
- package/dist/server/routes/specs.js +10 -0
- package/dist/storage/base-store.d.ts +1 -1
- package/dist/storage/base-store.js +1 -1
- package/dist/storage/feedback-remote.d.ts +2 -3
- package/dist/storage/feedback-remote.js +45 -31
- package/dist/storage/global-store.d.ts +1 -17
- package/dist/storage/global-store.js +1 -42
- package/dist/storage/index.d.ts +0 -2
- package/dist/storage/index.js +0 -2
- package/dist/storage/migrations/canonical-storage.js +124 -11
- package/dist/storage/runtime-db.d.ts +9 -0
- package/dist/storage/runtime-db.js +64 -8
- package/dist/storage/spec-store.d.ts +14 -2
- package/dist/storage/spec-store.js +104 -14
- package/dist/storage/status-store/atomic-status-write.d.ts +5 -0
- package/dist/storage/status-store/atomic-status-write.js +57 -0
- package/dist/storage/status-store/file-lock.js +30 -11
- package/dist/storage/status-store/self-healing.js +3 -3
- package/dist/storage/status-store/version-sync.d.ts +2 -1
- package/dist/storage/status-store/version-sync.js +35 -40
- package/dist/storage/usage-store.d.ts +1 -5
- package/dist/storage/usage-store.js +0 -35
- package/dist/tools/auto-update-handler.d.ts +3 -3
- package/dist/tools/auto-update-handler.js +3 -3
- package/dist/tools/challenge-spec/resilience-challenge-scenarios.d.ts +2 -1
- package/dist/tools/challenge-spec/resilience-challenge-scenarios.js +10 -7
- package/dist/tools/challenge-spec/scenario-collector.js +1 -1
- package/dist/tools/challenge-spec/scenarios-data.js +1 -1
- package/dist/tools/challenge-spec/scenarios-utils.d.ts +1 -1
- package/dist/tools/challenge-spec/scenarios-utils.js +35 -11
- package/dist/tools/challenge-spec.js +5 -5
- package/dist/tools/check-readiness.js +1 -1
- package/dist/tools/configure-telemetry.js +30 -2
- package/dist/tools/create-spec/spec-builder.js +0 -11
- package/dist/tools/create-spec.d.ts +1 -0
- package/dist/tools/create-spec.js +444 -239
- package/dist/tools/git/branch-ops.d.ts +1 -1
- package/dist/tools/git/branch-ops.js +3 -2
- package/dist/tools/init-project/handler.js +10 -12
- package/dist/tools/init-project/host-assets-writer.js +26 -1
- package/dist/tools/init-project/lint-scaffolder.d.ts +3 -3
- package/dist/tools/init-project/migration-runner.d.ts +2 -4
- package/dist/tools/init-project/migration-runner.js +3 -2
- package/dist/tools/init-project/portable-index-reconciler.d.ts +4 -0
- package/dist/tools/init-project/portable-index-reconciler.js +14 -0
- package/dist/tools/init-project/result-builder.js +1 -3
- package/dist/tools/jobs/handlers.js +38 -6
- package/dist/tools/list-specs.js +5 -26
- package/dist/tools/merge-risk-handler.js +2 -2
- package/dist/tools/package-handoff.js +2 -0
- package/dist/tools/reconcile-spec.js +0 -27
- package/dist/tools/register-agent-squad-tools.js +2 -2
- package/dist/tools/register-platform-tools/design-stack-tools.js +11 -11
- package/dist/tools/register-platform-tools/lifecycle-infra-tools.js +7 -7
- package/dist/tools/register-sdd-tools.d.ts +1 -1
- package/dist/tools/register-sdd-tools.js +2 -29
- package/dist/tools/register-spec-tools/analysis-tools.js +8 -8
- package/dist/tools/register-spec-tools/core-spec-tools.js +17 -8
- package/dist/tools/safe-handler.d.ts +5 -13
- package/dist/tools/safe-handler.js +7 -23
- package/dist/tools/schemas/index.d.ts +1 -1
- package/dist/tools/schemas/index.js +1 -1
- package/dist/tools/schemas/output-schemas.d.ts +0 -23
- package/dist/tools/schemas/output-schemas.js +0 -28
- package/dist/tools/schemas/spec.d.ts +4 -0
- package/dist/tools/schemas/spec.js +3 -0
- package/dist/tools/schemas/validate-output-schema.d.ts +11 -0
- package/dist/tools/schemas/validate-output-schema.js +7 -0
- package/dist/tools/spec-prompt-handler.js +3 -3
- package/dist/tools/sync-spec-state-handler.d.ts +1 -1
- package/dist/tools/sync-spec-state-handler.js +1 -1
- package/dist/tools/tool-entry.d.ts +4 -4
- package/dist/tools/tool-entry.js +3 -3
- package/dist/tools/tool-registry/core-tools.js +31 -15
- package/dist/tools/tool-registry/group-infra.js +27 -110
- package/dist/tools/tool-registry/group-quality-compliance.js +26 -26
- package/dist/tools/tool-registry/inventory.d.ts +2 -0
- package/dist/tools/tool-registry/inventory.js +2 -0
- package/dist/tools/tool-registry-helpers.d.ts +3 -3
- package/dist/tools/tool-registry-helpers.js +3 -3
- package/dist/tools/tool-usage-report/registered-tools.d.ts +1 -1
- package/dist/tools/tool-usage-report/registered-tools.js +3 -15
- package/dist/tools/update-status/approval-gates.js +3 -0
- package/dist/tools/update-status/done-receipt-verifier.js +40 -27
- package/dist/tools/update-status/evidence-gate.js +36 -1
- package/dist/tools/update-status/file-sync.d.ts +2 -1
- package/dist/tools/update-status/file-sync.js +57 -6
- package/dist/tools/update-status/index.d.ts +2 -0
- package/dist/tools/update-status/index.js +95 -58
- package/dist/tools/update-status/response-builder.js +3 -3
- package/dist/tools/update-status/side-effects.d.ts +2 -0
- package/dist/tools/update-status/side-effects.js +2 -2
- package/dist/tools/update-status/transition-guard.js +32 -15
- package/dist/tools/update-status-actions.d.ts +4 -2
- package/dist/tools/update-status-actions.js +16 -14
- package/dist/tools/usage-report.js +1 -16
- package/dist/tools/usage-stats.js +1 -18
- package/dist/tools/usage-tracking.d.ts +4 -0
- package/dist/tools/usage-tracking.js +20 -0
- package/dist/tools/validate-lint.d.ts +1 -0
- package/dist/tools/validate-lint.js +1 -1
- package/dist/tools/validate.d.ts +2 -1
- package/dist/tools/validate.js +114 -34
- package/dist/transports/http-transport.js +6 -8
- package/dist/transports/mcp-types.d.ts +0 -2
- package/dist/transports/session-context.js +1 -1
- package/dist/types/cascade-hooks.d.ts +1 -1
- package/dist/types/ci.d.ts +0 -4
- package/dist/types/clarification-token.d.ts +1 -1
- package/dist/types/claude-code-runtime.d.ts +0 -27
- package/dist/types/commercial-migration.d.ts +17 -0
- package/dist/types/commercial-migration.js +2 -0
- package/dist/types/common/primitives.d.ts +0 -2
- package/dist/types/core-bridge.d.ts +4 -10
- package/dist/types/dashboard.d.ts +3 -7
- package/dist/types/docs.d.ts +0 -1
- package/dist/types/durable-job.d.ts +4 -4
- package/dist/types/durable-validation.d.ts +100 -2
- package/dist/types/durable-validation.js +165 -1
- package/dist/types/errors/structured-error.d.ts +3 -3
- package/dist/types/estimation.d.ts +2 -0
- package/dist/types/evidence-gates.d.ts +9 -1
- package/dist/types/execution.d.ts +2 -0
- package/dist/types/gemini-integration.d.ts +0 -11
- package/dist/types/handoff-artifacts.d.ts +41 -0
- package/dist/types/hooks-advanced.d.ts +0 -13
- package/dist/types/impact-detection.d.ts +2 -2
- package/dist/types/index.d.ts +2 -6
- package/dist/types/index.js +1 -5
- package/dist/types/kiro-integration.d.ts +0 -6
- package/dist/types/network-policy.d.ts +1 -1
- package/dist/types/project/lint-scaffolder.d.ts +1 -1
- package/dist/types/runtime-policy.d.ts +11 -0
- package/dist/types/session-safeguard.d.ts +0 -31
- package/dist/types/spec/canonical-repair.d.ts +81 -0
- package/dist/types/spec/canonical-repair.js +2 -0
- package/dist/types/spec/core.d.ts +14 -0
- package/dist/types/spec/index.d.ts +1 -0
- package/dist/types/spec/index.js +1 -0
- package/dist/types/spec/inputs.d.ts +29 -0
- package/dist/types/spec-format.d.ts +24 -0
- package/dist/types/telemetry.d.ts +4 -1
- package/dist/types/transport.d.ts +0 -2
- package/dist/types/usage.d.ts +1 -36
- package/dist/types/usage.js +1 -1
- package/dist/types/validate-worker.d.ts +6 -0
- package/dist/types/validation-receipt.d.ts +1 -1
- package/dist/types/validation.d.ts +2 -2
- package/package.json +16 -12
- package/planu-native.json +1 -1
- package/planu-plugin.json +23 -40
- package/scripts/lib/pending-release-file.mjs +93 -0
- package/src/i18n/messages/en.json +0 -41
- package/src/i18n/messages/es.json +0 -41
- package/src/i18n/messages/pt.json +0 -41
- package/dist/cli/commands/activate.d.ts +0 -14
- package/dist/cli/commands/activate.js +0 -174
- package/dist/config/license-plans.json +0 -251
- package/dist/config/product-public.ts +0 -148
- package/dist/config/server-instructions.ts +0 -121
- package/dist/config/version-defaults.ts +0 -76
- package/dist/config/version.ts +0 -21
- package/dist/engine/ai-integration/gemini/settings-generator.d.ts +0 -4
- package/dist/engine/ai-integration/gemini/settings-generator.js +0 -195
- package/dist/engine/ai-integration/kiro/hooks-generator.d.ts +0 -6
- package/dist/engine/ai-integration/kiro/hooks-generator.js +0 -75
- package/dist/engine/hooks/full-spectrum-generator.d.ts +0 -32
- package/dist/engine/hooks/full-spectrum-generator.js +0 -117
- package/dist/engine/license-validator/config-loader.d.ts +0 -5
- package/dist/engine/license-validator/config-loader.js +0 -16
- package/dist/engine/license-validator/core.d.ts +0 -15
- package/dist/engine/license-validator/core.js +0 -151
- package/dist/engine/license-validator/fingerprint.d.ts +0 -3
- package/dist/engine/license-validator/fingerprint.js +0 -17
- package/dist/engine/license-validator/lemon-squeezy.d.ts +0 -5
- package/dist/engine/license-validator/lemon-squeezy.js +0 -55
- package/dist/engine/license-validator.d.ts +0 -5
- package/dist/engine/license-validator.js +0 -6
- package/dist/engine/product-intelligence/index.d.ts +0 -7
- package/dist/engine/product-intelligence/index.js +0 -211
- package/dist/engine/session/auto-save.d.ts +0 -18
- package/dist/engine/session/auto-save.js +0 -98
- package/dist/engine/session/context-snapshot.d.ts +0 -8
- package/dist/engine/session/context-snapshot.js +0 -49
- package/dist/engine/session/memory-sync.d.ts +0 -12
- package/dist/engine/session/memory-sync.js +0 -34
- package/dist/engine/session/session-diff.d.ts +0 -11
- package/dist/engine/session/session-diff.js +0 -42
- package/dist/engine/session/session-merge.d.ts +0 -12
- package/dist/engine/session/session-merge.js +0 -55
- package/dist/engine/session-safeguard/checkpoint-runner.d.ts +0 -4
- package/dist/engine/session-safeguard/checkpoint-runner.js +0 -70
- package/dist/engine/session-safeguard/learnings-buffer.d.ts +0 -15
- package/dist/engine/session-safeguard/learnings-buffer.js +0 -91
- package/dist/engine/session-safeguard/precompaction-drain.d.ts +0 -10
- package/dist/engine/session-safeguard/precompaction-drain.js +0 -82
- package/dist/engine/session-safeguard/unpushed-detector.d.ts +0 -7
- package/dist/engine/session-safeguard/unpushed-detector.js +0 -59
- package/dist/engine/spec-changelog/core.d.ts +0 -16
- package/dist/engine/spec-changelog/core.js +0 -176
- package/dist/engine/spec-changelog/diff.d.ts +0 -18
- package/dist/engine/spec-changelog/diff.js +0 -121
- package/dist/engine/spec-changelog/index.d.ts +0 -3
- package/dist/engine/spec-changelog/index.js +0 -4
- package/dist/engine/trial-engine.d.ts +0 -5
- package/dist/engine/trial-engine.js +0 -14
- package/dist/engine/usage-tracker/rate-check.d.ts +0 -7
- package/dist/engine/usage-tracker/rate-check.js +0 -18
- package/dist/engine/usage-tracker/rate-limiter.d.ts +0 -14
- package/dist/engine/usage-tracker/rate-limiter.js +0 -73
- package/dist/engine/usage-tracker/trial.d.ts +0 -27
- package/dist/engine/usage-tracker/trial.js +0 -49
- package/dist/engine/webhook/event-handlers.d.ts +0 -25
- package/dist/engine/webhook/event-handlers.js +0 -89
- package/dist/engine/webhook/index.d.ts +0 -4
- package/dist/engine/webhook/index.js +0 -5
- package/dist/engine/webhook/server.d.ts +0 -12
- package/dist/engine/webhook/server.js +0 -249
- package/dist/engine/webhook/signature.d.ts +0 -16
- package/dist/engine/webhook/signature.js +0 -49
- package/dist/storage/license-store.d.ts +0 -6
- package/dist/storage/license-store.js +0 -63
- package/dist/storage/session-store.d.ts +0 -20
- package/dist/storage/session-store.js +0 -136
- package/dist/tools/activate-license.d.ts +0 -6
- package/dist/tools/activate-license.js +0 -132
- package/dist/tools/checkpoint-handler.d.ts +0 -3
- package/dist/tools/checkpoint-handler.js +0 -130
- package/dist/tools/export-session.d.ts +0 -3
- package/dist/tools/export-session.js +0 -90
- package/dist/tools/license-gate.d.ts +0 -18
- package/dist/tools/license-gate.js +0 -222
- package/dist/tools/license-status.d.ts +0 -3
- package/dist/tools/license-status.js +0 -93
- package/dist/tools/list-sessions.d.ts +0 -3
- package/dist/tools/list-sessions.js +0 -46
- package/dist/tools/planu-session-checkpoint.d.ts +0 -6
- package/dist/tools/planu-session-checkpoint.js +0 -42
- package/dist/tools/restore-session.d.ts +0 -3
- package/dist/tools/restore-session.js +0 -71
- package/dist/tools/spec-history.d.ts +0 -3
- package/dist/tools/spec-history.js +0 -59
- package/dist/tools/webhook.d.ts +0 -6
- package/dist/tools/webhook.js +0 -150
- package/dist/types/changelog.d.ts +0 -49
- package/dist/types/changelog.js +0 -3
- package/dist/types/licensing.d.ts +0 -109
- package/dist/types/licensing.js +0 -4
- package/dist/types/product-intelligence.d.ts +0 -60
- package/dist/types/product-intelligence.js +0 -3
- package/dist/types/session.d.ts +0 -84
- package/dist/types/session.js +0 -3
- package/dist/types/webhook.d.ts +0 -62
- package/dist/types/webhook.js +0 -4
|
@@ -7,40 +7,9 @@ export type AutopushResult = {
|
|
|
7
7
|
reason: 'disabled' | 'nothing-to-push' | 'diverged' | 'no-upstream';
|
|
8
8
|
message: string;
|
|
9
9
|
};
|
|
10
|
-
export interface UnpushedCommitInfo {
|
|
11
|
-
count: number;
|
|
12
|
-
branch: string;
|
|
13
|
-
/** Hours since the oldest unpushed commit was authored. */
|
|
14
|
-
oldestAgeHours: number;
|
|
15
|
-
}
|
|
16
10
|
export interface SessionContextFreshnessResult {
|
|
17
11
|
stale: boolean;
|
|
18
12
|
/** Age in days of session-context.md relative to newest spec.md (negative means session-context is newer). */
|
|
19
13
|
ageDays: number;
|
|
20
14
|
}
|
|
21
|
-
export type LearningCategory = 'bug' | 'pattern' | 'decision' | 'estimate';
|
|
22
|
-
export type LearningSource = 'autopilot' | 'user';
|
|
23
|
-
export interface LearningEntry {
|
|
24
|
-
timestamp: string;
|
|
25
|
-
category: LearningCategory;
|
|
26
|
-
content: string;
|
|
27
|
-
source: LearningSource;
|
|
28
|
-
}
|
|
29
|
-
export interface LearningsBuffer {
|
|
30
|
-
version: 1;
|
|
31
|
-
entries: LearningEntry[];
|
|
32
|
-
}
|
|
33
|
-
export interface CheckpointRunnerOptions {
|
|
34
|
-
projectPath: string;
|
|
35
|
-
dryRun?: boolean;
|
|
36
|
-
autopush?: boolean;
|
|
37
|
-
autopushBranches?: string[];
|
|
38
|
-
}
|
|
39
|
-
export interface CheckpointResult {
|
|
40
|
-
sessionContextRefreshed: boolean;
|
|
41
|
-
learningsFlushed: number;
|
|
42
|
-
unpushedCommits: UnpushedCommitInfo | null;
|
|
43
|
-
pushed?: AutopushResult;
|
|
44
|
-
humanSummary: string;
|
|
45
|
-
}
|
|
46
15
|
//# sourceMappingURL=session-safeguard.d.ts.map
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { SpecStatus } from '../common/index.js';
|
|
2
|
+
import type { Spec } from './core.js';
|
|
3
|
+
export interface LifecycleOverride {
|
|
4
|
+
readonly canonicalUuid: string;
|
|
5
|
+
readonly retainedStatus: SpecStatus;
|
|
6
|
+
readonly reason: string;
|
|
7
|
+
}
|
|
8
|
+
export interface CanonicalRepairManifest {
|
|
9
|
+
readonly projectId: string;
|
|
10
|
+
readonly sourceDigest: string;
|
|
11
|
+
readonly sourceProjectAliases: readonly string[];
|
|
12
|
+
readonly canonicalSourceProjectAlias: string;
|
|
13
|
+
readonly foreignOwnerSingletonIds: readonly string[];
|
|
14
|
+
readonly lifecycleOverrides?: Readonly<Record<string, LifecycleOverride>>;
|
|
15
|
+
}
|
|
16
|
+
export interface CanonicalRepairPlan {
|
|
17
|
+
readonly changed: boolean;
|
|
18
|
+
readonly projectId: string;
|
|
19
|
+
readonly sourceDigest: string;
|
|
20
|
+
readonly manifestDigest: string;
|
|
21
|
+
readonly planDigest: string;
|
|
22
|
+
readonly resultDigest: string;
|
|
23
|
+
readonly duplicateGroups: number;
|
|
24
|
+
readonly foreignOwnerSingletons: number;
|
|
25
|
+
readonly fieldChanges: readonly Record<string, unknown>[];
|
|
26
|
+
readonly artifactId: string;
|
|
27
|
+
readonly resultBytes: Buffer;
|
|
28
|
+
readonly finalizationDegraded?: boolean;
|
|
29
|
+
}
|
|
30
|
+
export interface CanonicalRepairReview {
|
|
31
|
+
readonly reviewer: string;
|
|
32
|
+
readonly verdict: string;
|
|
33
|
+
readonly sourceDigest: string;
|
|
34
|
+
readonly manifestDigest: string;
|
|
35
|
+
readonly planDigest: string;
|
|
36
|
+
readonly resultDigest: string;
|
|
37
|
+
}
|
|
38
|
+
export interface RepairCanonicalStoreInput {
|
|
39
|
+
readonly projectId: string;
|
|
40
|
+
readonly manifestPath: string;
|
|
41
|
+
readonly dryRun?: boolean;
|
|
42
|
+
readonly reviewPath?: string;
|
|
43
|
+
readonly expectedSourceDigest?: string;
|
|
44
|
+
readonly expectedManifestDigest?: string;
|
|
45
|
+
readonly expectedPlanDigest?: string;
|
|
46
|
+
readonly expectedResultDigest?: string;
|
|
47
|
+
readonly authorizationReason?: string;
|
|
48
|
+
/** Test-only I/O seam; normal callers always use durable filesystem operations. */
|
|
49
|
+
readonly io?: CanonicalRepairIo;
|
|
50
|
+
}
|
|
51
|
+
export interface CanonicalRepairIo {
|
|
52
|
+
readonly readFile?: (path: string) => Promise<Buffer>;
|
|
53
|
+
readonly writeAtomic?: (path: string, bytes: Buffer | string) => Promise<void>;
|
|
54
|
+
readonly mkdir?: (path: string) => Promise<void>;
|
|
55
|
+
readonly withLock?: <T>(projectId: string, fn: () => Promise<T>) => Promise<T>;
|
|
56
|
+
}
|
|
57
|
+
export interface CanonicalRepairReceipt {
|
|
58
|
+
readonly schemaVersion: 1;
|
|
59
|
+
readonly state: 'prepared' | 'committed';
|
|
60
|
+
readonly projectId: string;
|
|
61
|
+
readonly reviewer: string;
|
|
62
|
+
readonly verdict: string;
|
|
63
|
+
readonly authorizationReason: string;
|
|
64
|
+
readonly sourceDigest: string;
|
|
65
|
+
readonly manifestDigest: string;
|
|
66
|
+
readonly planDigest: string;
|
|
67
|
+
readonly resultDigest: string;
|
|
68
|
+
readonly backupArtifactId: string;
|
|
69
|
+
readonly backupDigest: string;
|
|
70
|
+
readonly removedRows: readonly Spec[];
|
|
71
|
+
readonly singletonOwnershipChanges: readonly Record<string, unknown>[];
|
|
72
|
+
readonly retainedUuids: readonly Record<string, unknown>[];
|
|
73
|
+
readonly aliasesAdded: readonly Record<string, unknown>[];
|
|
74
|
+
readonly fieldChanges: readonly Record<string, unknown>[];
|
|
75
|
+
}
|
|
76
|
+
/** Internal parsed representation of the legacy or enveloped canonical store. */
|
|
77
|
+
export interface CanonicalRepairRawStore {
|
|
78
|
+
readonly envelope: boolean;
|
|
79
|
+
readonly rows: Spec[];
|
|
80
|
+
}
|
|
81
|
+
//# sourceMappingURL=canonical-repair.d.ts.map
|
|
@@ -15,8 +15,16 @@ export interface StatusHistoryEntry {
|
|
|
15
15
|
readonly transitionId?: string;
|
|
16
16
|
/** Optional work scheduled after the durable transition boundary. */
|
|
17
17
|
readonly pendingBackgroundActions?: readonly string[];
|
|
18
|
+
/** Opaque binding to the repository root authorized to execute pending work. */
|
|
19
|
+
readonly transitionRootBinding?: string;
|
|
18
20
|
/** Durable execution state for optional post-commit work. */
|
|
19
21
|
readonly postCommitTasks?: readonly PostCommitTaskReceipt[];
|
|
22
|
+
/** SPEC-1232 request bound in the same canonical status mutation. */
|
|
23
|
+
readonly reconciliationRequestId?: string;
|
|
24
|
+
/** SPEC-1232 deterministic request/evidence binding digest. */
|
|
25
|
+
readonly reconciliationBindingDigest?: string;
|
|
26
|
+
/** Lifecycle trigger persisted with the canonical transition receipt. */
|
|
27
|
+
readonly trigger?: string;
|
|
20
28
|
}
|
|
21
29
|
export type PostCommitTaskStatus = 'pending' | 'running' | 'done' | 'failed';
|
|
22
30
|
export interface PostCommitTaskReceipt {
|
|
@@ -41,6 +49,12 @@ export interface Spec {
|
|
|
41
49
|
id: string;
|
|
42
50
|
/** SPEC-601: Globally unique identifier for cross-project portability. */
|
|
43
51
|
uuid?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Historical canonical UUIDs retained after an administrative identity repair.
|
|
54
|
+
* An alias is an identity, not display metadata: it must be unique across the
|
|
55
|
+
* complete canonical store and may never duplicate a primary UUID.
|
|
56
|
+
*/
|
|
57
|
+
uuidAliases?: string[];
|
|
44
58
|
title: string;
|
|
45
59
|
slug: string;
|
|
46
60
|
feature?: string;
|
package/dist/types/spec/index.js
CHANGED
|
@@ -2,6 +2,9 @@ import type { SpecStatus, SpecType, SpecScope, SpecTarget, ToolResult } from '..
|
|
|
2
2
|
import type { Actuals } from '../estimation.js';
|
|
3
3
|
import type { ProjectKnowledge } from '../project.js';
|
|
4
4
|
import type { Spec, ChecklistCategory, SpecDiagram, SpecSplitSuggestion, ReconcileChange } from './core.js';
|
|
5
|
+
export interface ReconciliationInvocationContext {
|
|
6
|
+
surface: 'local-mcp' | 'http' | 'dashboard' | 'direct' | 'unknown';
|
|
7
|
+
}
|
|
5
8
|
export interface CreateSpecInput {
|
|
6
9
|
title: string;
|
|
7
10
|
description: string;
|
|
@@ -89,6 +92,12 @@ export interface UpdateStatusInput {
|
|
|
89
92
|
* Must be ≥30 characters explaining why the spec is being reopened.
|
|
90
93
|
*/
|
|
91
94
|
reason?: string;
|
|
95
|
+
/** Stable idempotency key for a trusted implementing → review reconciliation. */
|
|
96
|
+
reconciliationRequestId?: string;
|
|
97
|
+
/** Latest canonical implementing transition receipt expected by reconciliation. */
|
|
98
|
+
expectedImplementingTransitionId?: string;
|
|
99
|
+
/** SHA-256 digest of the independent changes-requested validation report. */
|
|
100
|
+
implementationReviewDigest?: string;
|
|
92
101
|
/**
|
|
93
102
|
* SPEC-769: Force-approve a spec that scored below 70 on the readiness gate.
|
|
94
103
|
* When true, the transition proceeds and qualityWarnings[] is written to spec.md frontmatter.
|
|
@@ -200,6 +209,26 @@ export interface SpecMigrationDeps {
|
|
|
200
209
|
listSpecs: (projectId: string) => Promise<Spec[]>;
|
|
201
210
|
updateSpec: (projectId: string, specId: string, updates: Partial<Spec>) => Promise<Spec>;
|
|
202
211
|
}
|
|
212
|
+
export type FilesystemImportFailureCode = 'READ_FAILED' | 'INVALID_CONTRACT' | 'CREATE_FAILED' | 'INCOMPATIBLE_IDENTITY';
|
|
213
|
+
export interface FilesystemImportFailure {
|
|
214
|
+
specId: string;
|
|
215
|
+
path: string;
|
|
216
|
+
code: FilesystemImportFailureCode;
|
|
217
|
+
}
|
|
218
|
+
export interface FilesystemImportResult {
|
|
219
|
+
importedCount: number;
|
|
220
|
+
importedSpecIds: string[];
|
|
221
|
+
failures: FilesystemImportFailure[];
|
|
222
|
+
errors: string[];
|
|
223
|
+
}
|
|
224
|
+
export interface FilesystemImportDeps {
|
|
225
|
+
listSpecs: (projectId: string) => Promise<Spec[]>;
|
|
226
|
+
createSpec: (projectId: string, spec: Spec) => Promise<Spec>;
|
|
227
|
+
getSpecFresh?: (projectId: string, specId: string) => Promise<Spec | null>;
|
|
228
|
+
}
|
|
229
|
+
export interface PortableIndexReconciliationResult extends FilesystemImportResult {
|
|
230
|
+
repositoryFilesChanged: string[];
|
|
231
|
+
}
|
|
203
232
|
export type ChallengeSpecFocus = 'failures' | 'concurrency' | 'scale' | 'security' | 'data-consistency';
|
|
204
233
|
export type { ScopeFilter, ScopeFilterConfig } from './core.js';
|
|
205
234
|
export interface SplitAnalysisInput {
|
|
@@ -152,4 +152,28 @@ export interface ImplementationContractIssue {
|
|
|
152
152
|
code: 'contract_missing' | 'contract_subsection_missing' | 'contract_subsection_empty' | 'contract_filler' | 'contract_needs_decision' | 'contract_unmapped_criterion' | 'contract_manual_verification_vague';
|
|
153
153
|
message: string;
|
|
154
154
|
}
|
|
155
|
+
export type UnifiedSpecCandidateIssueCode = 'MISSING_REQUIRED_SECTION' | 'DUPLICATE_REQUIRED_SECTION' | 'MISORDERED_REQUIRED_SECTION' | 'EMBEDDED_REQUIRED_SECTION' | 'UNRESOLVED_CONTRACT_PLACEHOLDER' | 'MISSING_EXECUTABLE_CRITERIA' | 'UNGROUNDED_FILE_OWNERSHIP';
|
|
156
|
+
export interface UnifiedSpecCandidateIssue {
|
|
157
|
+
code: UnifiedSpecCandidateIssueCode;
|
|
158
|
+
message: string;
|
|
159
|
+
section?: string;
|
|
160
|
+
path?: string;
|
|
161
|
+
}
|
|
162
|
+
export interface UnifiedSpecCandidateValidation {
|
|
163
|
+
valid: boolean;
|
|
164
|
+
issues: UnifiedSpecCandidateIssue[];
|
|
165
|
+
}
|
|
166
|
+
export interface CanonicalUnifiedSpecInput {
|
|
167
|
+
leanSpecBody: string;
|
|
168
|
+
sourceDescription: string;
|
|
169
|
+
technicalBody: string;
|
|
170
|
+
implementationContract: string;
|
|
171
|
+
criteria: LeanCriterion[];
|
|
172
|
+
files: {
|
|
173
|
+
create: LeanFileEntry[];
|
|
174
|
+
modify: LeanFileEntry[];
|
|
175
|
+
test: LeanFileEntry[];
|
|
176
|
+
};
|
|
177
|
+
outOfScope: string[];
|
|
178
|
+
}
|
|
155
179
|
//# sourceMappingURL=spec-format.d.ts.map
|
|
@@ -4,7 +4,7 @@ export interface GeoData {
|
|
|
4
4
|
city: string;
|
|
5
5
|
timezone: string;
|
|
6
6
|
}
|
|
7
|
-
export type TelemetryEventName = 'init_project' | 'create_spec' | 'tool_used' | 'tool_error' | 'tool_blocked'
|
|
7
|
+
export type TelemetryEventName = 'init_project' | 'create_spec' | 'tool_used' | 'tool_error' | 'tool_blocked'
|
|
8
8
|
/** SPEC-705: Emitted when agent parallelism is downgraded due to host RAM constraints. */
|
|
9
9
|
| 'ram_guardrail_downgrade'
|
|
10
10
|
/** SPEC-727: Emitted when a panel is aborted because two specialists share the same (modelId, promptHash). */
|
|
@@ -31,7 +31,10 @@ export interface ConfigureTelemetryInput {
|
|
|
31
31
|
}
|
|
32
32
|
export interface TelemetryResult {
|
|
33
33
|
action: string;
|
|
34
|
+
/** Current versioned consent, independent from runtime delivery configuration. */
|
|
34
35
|
enabled: boolean;
|
|
36
|
+
/** A valid endpoint and a non-empty operator token are both available. */
|
|
37
|
+
configured: boolean;
|
|
35
38
|
consentVersion?: number;
|
|
36
39
|
message: string;
|
|
37
40
|
}
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
export type TransportType = 'stdio' | 'http';
|
|
2
2
|
export interface HttpSessionContext {
|
|
3
|
-
/** License key provided via HTTP header for this session */
|
|
4
|
-
licenseKey?: string;
|
|
5
3
|
/** MCP session ID */
|
|
6
4
|
sessionId: string;
|
|
7
5
|
/** Aborts when the active HTTP response loses its client connection. */
|
package/dist/types/usage.d.ts
CHANGED
|
@@ -1,30 +1,15 @@
|
|
|
1
|
-
import type { PricingTier } from './common/primitives.js';
|
|
2
1
|
export interface UsageEvent {
|
|
3
2
|
/** Tool name that was called */
|
|
4
3
|
readonly toolName: string;
|
|
5
|
-
/** Tier at the time of the call */
|
|
6
|
-
readonly tier: PricingTier;
|
|
7
4
|
/** ISO 8601 timestamp */
|
|
8
5
|
readonly timestamp: string;
|
|
9
|
-
/** Whether the call succeeded
|
|
6
|
+
/** Whether the call succeeded */
|
|
10
7
|
readonly success: boolean;
|
|
11
8
|
}
|
|
12
9
|
export interface UsageLog {
|
|
13
10
|
/** Array of usage events */
|
|
14
11
|
readonly events: readonly UsageEvent[];
|
|
15
12
|
}
|
|
16
|
-
export interface DailyUsage {
|
|
17
|
-
/** Date string YYYY-MM-DD */
|
|
18
|
-
readonly date: string;
|
|
19
|
-
/** Number of tool calls today */
|
|
20
|
-
readonly callCount: number;
|
|
21
|
-
/** ISO 8601 timestamp of the last tool call */
|
|
22
|
-
readonly lastCallAt: string;
|
|
23
|
-
}
|
|
24
|
-
export interface TrialState {
|
|
25
|
-
/** ISO 8601 timestamp of the first Planu execution ever */
|
|
26
|
-
readonly firstRunAt: string;
|
|
27
|
-
}
|
|
28
13
|
export interface ToolHealthEntry {
|
|
29
14
|
readonly name: string;
|
|
30
15
|
readonly totalCalls: number;
|
|
@@ -38,8 +23,6 @@ export interface UsageStats {
|
|
|
38
23
|
readonly totalCalls: number;
|
|
39
24
|
/** Calls grouped by tool name */
|
|
40
25
|
readonly callsByTool: Record<string, number>;
|
|
41
|
-
/** Calls grouped by tier */
|
|
42
|
-
readonly callsByTier: Record<string, number>;
|
|
43
26
|
/** Top N most-used tools */
|
|
44
27
|
readonly topTools: readonly {
|
|
45
28
|
readonly name: string;
|
|
@@ -49,29 +32,11 @@ export interface UsageStats {
|
|
|
49
32
|
readonly activeSpecs: number;
|
|
50
33
|
/** Number of active projects */
|
|
51
34
|
readonly activeProjects: number;
|
|
52
|
-
/** Current tier */
|
|
53
|
-
readonly currentTier: PricingTier;
|
|
54
|
-
/** Days since first run */
|
|
55
|
-
readonly daysSinceFirstRun: number;
|
|
56
|
-
/** Whether in trial period */
|
|
57
|
-
readonly isTrialActive: boolean;
|
|
58
|
-
/** Remaining daily calls (Starter only, -1 for unlimited) */
|
|
59
|
-
readonly remainingDailyCalls: number;
|
|
60
35
|
/** Per-tool health breakdown — sorted by error rate descending (most broken first) */
|
|
61
36
|
readonly toolHealthBreakdown: readonly ToolHealthEntry[];
|
|
62
37
|
/** Tool names with 0 calls in the reporting period (candidates for removal) */
|
|
63
38
|
readonly deadTools: readonly string[];
|
|
64
39
|
}
|
|
65
|
-
export interface RateLimitResult {
|
|
66
|
-
/** Whether the call is allowed */
|
|
67
|
-
readonly allowed: boolean;
|
|
68
|
-
/** If not allowed, the reason */
|
|
69
|
-
readonly reason: 'daily_limit' | 'cooldown' | null;
|
|
70
|
-
/** Human-readable message */
|
|
71
|
-
readonly message: string;
|
|
72
|
-
/** Remaining daily calls (-1 = unlimited) */
|
|
73
|
-
readonly remainingCalls: number;
|
|
74
|
-
}
|
|
75
40
|
export interface UsageStatsInput {
|
|
76
41
|
readonly period?: '7d' | '30d' | 'all';
|
|
77
42
|
}
|
package/dist/types/usage.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
// types/usage.ts — Usage tracking and analytics types for Planu SDD MCP Server.
|
|
2
|
-
// Supports local telemetry
|
|
2
|
+
// Supports neutral local telemetry and usage reporting.
|
|
3
3
|
export {};
|
|
4
4
|
//# sourceMappingURL=usage.js.map
|
|
@@ -37,6 +37,12 @@ export interface ValidateWorkerProgress {
|
|
|
37
37
|
readonly phase: string;
|
|
38
38
|
readonly command: string;
|
|
39
39
|
readonly durationMs: number;
|
|
40
|
+
/** Number of validation gates that have reached a terminal state. */
|
|
41
|
+
readonly completedGates: number;
|
|
42
|
+
/** Stable gate count for the current validation run. */
|
|
43
|
+
readonly totalGates: number;
|
|
44
|
+
/** ISO timestamp of the most recent semantic progress transition. */
|
|
45
|
+
readonly lastProgressAt: string;
|
|
40
46
|
readonly filesScanned?: number;
|
|
41
47
|
readonly status: 'running' | 'passed' | 'failed' | 'cancelled';
|
|
42
48
|
readonly remediation?: string;
|
|
@@ -93,7 +93,7 @@ export interface ValidationReceiptPersistence {
|
|
|
93
93
|
readCurrent(projectId: string, specId: string): Promise<ValidationReceipt | undefined>;
|
|
94
94
|
readCurrentBindings(projectId: string, specId: string): Promise<ValidationReceiptBindings | undefined>;
|
|
95
95
|
projectCurrentBindings(bindings: ValidationReceiptBindings): Promise<void>;
|
|
96
|
-
invalidateCurrentBindings(projectId: string, specId: string): Promise<void>;
|
|
96
|
+
invalidateCurrentBindings(projectId: string, specId: string, receiptId?: string): Promise<void>;
|
|
97
97
|
readLog(logDigest: string): Promise<Buffer | undefined>;
|
|
98
98
|
logPath(logDigest: string): string;
|
|
99
99
|
}
|
|
@@ -18,13 +18,13 @@ export interface ValidationError {
|
|
|
18
18
|
}
|
|
19
19
|
/**
|
|
20
20
|
* A non-blocking issue. Same shape as ValidationError; severity is implicit
|
|
21
|
-
* from array placement in
|
|
21
|
+
* from array placement in SpecValidationResult.
|
|
22
22
|
*/
|
|
23
23
|
export type ValidationWarning = ValidationError;
|
|
24
24
|
/**
|
|
25
25
|
* Unified result returned by validateSpecFormat().
|
|
26
26
|
*/
|
|
27
|
-
export interface
|
|
27
|
+
export interface SpecValidationResult {
|
|
28
28
|
valid: boolean;
|
|
29
29
|
errors: ValidationError[];
|
|
30
30
|
warnings: ValidationWarning[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@planu/cli",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.0",
|
|
4
4
|
"description": "Planu — MCP Server for Spec Driven Development with native Rust acceleration for hot paths. Cross-platform (Linux/macOS/Windows, x64/arm64, glibc/musl).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"dist/",
|
|
13
13
|
"!dist/**/*.map",
|
|
14
14
|
"!dist/engine/*.node",
|
|
15
|
+
"scripts/lib/pending-release-file.mjs",
|
|
15
16
|
"src/i18n/messages/",
|
|
16
17
|
"planu-native.json",
|
|
17
18
|
"planu-plugin.json",
|
|
@@ -34,14 +35,14 @@
|
|
|
34
35
|
"packageName": "@planu/core"
|
|
35
36
|
},
|
|
36
37
|
"optionalDependencies": {
|
|
37
|
-
"@planu/core-darwin-arm64": "
|
|
38
|
-
"@planu/core-darwin-x64": "
|
|
39
|
-
"@planu/core-linux-arm64-gnu": "
|
|
40
|
-
"@planu/core-linux-arm64-musl": "
|
|
41
|
-
"@planu/core-linux-x64-gnu": "
|
|
42
|
-
"@planu/core-linux-x64-musl": "
|
|
43
|
-
"@planu/core-win32-arm64-msvc": "
|
|
44
|
-
"@planu/core-win32-x64-msvc": "
|
|
38
|
+
"@planu/core-darwin-arm64": "5.0.0",
|
|
39
|
+
"@planu/core-darwin-x64": "5.0.0",
|
|
40
|
+
"@planu/core-linux-arm64-gnu": "5.0.0",
|
|
41
|
+
"@planu/core-linux-arm64-musl": "5.0.0",
|
|
42
|
+
"@planu/core-linux-x64-gnu": "5.0.0",
|
|
43
|
+
"@planu/core-linux-x64-musl": "5.0.0",
|
|
44
|
+
"@planu/core-win32-arm64-msvc": "5.0.0",
|
|
45
|
+
"@planu/core-win32-x64-msvc": "5.0.0"
|
|
45
46
|
},
|
|
46
47
|
"engines": {
|
|
47
48
|
"node": ">=24.0.0"
|
|
@@ -53,6 +54,9 @@
|
|
|
53
54
|
"build:rust:check-tools": "bash scripts/build-rust-local.sh --check-tools",
|
|
54
55
|
"check:native-version-parity": "node scripts/check-native-version-parity.mjs",
|
|
55
56
|
"check:release-authorities": "node scripts/check-release-authorities.mjs",
|
|
57
|
+
"check:commercial-surfaces": "node scripts/check-commercial-surfaces.mjs",
|
|
58
|
+
"check:tool-registration": "bash scripts/check-tool-registration.sh",
|
|
59
|
+
"generate:host-tool-registry": "node scripts/generate-host-tool-registry.mjs",
|
|
56
60
|
"release:local": "bash scripts/release-local.sh",
|
|
57
61
|
"release:local:all": "bash scripts/release-local.sh --all",
|
|
58
62
|
"release:publish": "bash scripts/release-local.sh --all --publish",
|
|
@@ -81,8 +85,8 @@
|
|
|
81
85
|
"native:project-graph:e2e": "PLANU_NATIVE_E2E=1 vitest run tests/integration/native-project-graph-e2e.test.ts",
|
|
82
86
|
"native:project-graph:benchmark": "node scripts/benchmark-native-performance.mjs --operation project_graph_query --samples 30 --warmups 5 --project-path . --spec-id SPEC-1119 --json",
|
|
83
87
|
"benchmark:execution-kernel": "pnpm build && node scripts/benchmark-execution-kernel.mjs",
|
|
84
|
-
"check": "pnpm typecheck && pnpm lint && pnpm format:check && pnpm check:release-authorities && pnpm check:public-privacy && pnpm check:website-proof && pnpm check:donation-assets && pnpm check:website-public-assets",
|
|
85
|
-
"check:strict": "pnpm check && pnpm check:environment-schema && pnpm audit:hardcodes && pnpm audit:deadcode && pnpm audit:circular && pnpm audit:types && pnpm audit:security && pnpm audit:licenses && pnpm audit:i18n",
|
|
88
|
+
"check": "pnpm typecheck && pnpm lint && pnpm format:check && pnpm check:release-authorities && pnpm check:commercial-surfaces && pnpm check:tool-registration && pnpm check:public-privacy && pnpm check:website-proof && pnpm check:donation-assets && pnpm check:website-public-assets",
|
|
89
|
+
"check:strict": "pnpm check && pnpm generate:host-tool-registry -- --check && pnpm check:native-version-parity && pnpm check:environment-schema && pnpm audit:hardcodes && pnpm audit:deadcode && pnpm audit:circular && pnpm audit:types && pnpm audit:security && pnpm audit:licenses && pnpm audit:i18n",
|
|
86
90
|
"check:reliability": "node scripts/check-reliability-policies.mjs",
|
|
87
91
|
"check:environment-schema": "node scripts/check-environment-schema.mjs",
|
|
88
92
|
"test:contracts": "vitest run tests/contracts tests/integration/package-consumer-hono.test.ts",
|
|
@@ -113,7 +117,7 @@
|
|
|
113
117
|
"prepublishOnly": "bash scripts/prepublish-guard.sh",
|
|
114
118
|
"prepack": "pnpm build:ts && pnpm package:size",
|
|
115
119
|
"test:debug": "vitest run --inspect-brk --single-thread",
|
|
116
|
-
"validate": "pnpm typecheck && pnpm verify:typescript-migration && pnpm lint && pnpm format:check && pnpm test",
|
|
120
|
+
"validate": "pnpm build && pnpm typecheck && pnpm verify:typescript-migration && pnpm lint && pnpm format:check && pnpm test",
|
|
117
121
|
"docker:build": "docker build -t planu .",
|
|
118
122
|
"docker:run": "docker compose up",
|
|
119
123
|
"publish:blog": "node scripts/publish-blog.mjs",
|
package/planu-native.json
CHANGED
package/planu-plugin.json
CHANGED
|
@@ -2,66 +2,49 @@
|
|
|
2
2
|
"name": "dev.planu.cli",
|
|
3
3
|
"displayName": "Planu — Spec Driven Development",
|
|
4
4
|
"description": "Manage software specs, estimations, and autonomous SDD workflows. Language-agnostic MCP server for Claude Code.",
|
|
5
|
-
"version": "
|
|
5
|
+
"version": "5.0.0",
|
|
6
6
|
"icon": "assets/plugin/icon.svg",
|
|
7
|
-
"command": [
|
|
8
|
-
"npx",
|
|
9
|
-
"@planu/cli@latest"
|
|
10
|
-
],
|
|
7
|
+
"command": ["npx", "@planu/cli@latest"],
|
|
11
8
|
"packageName": "@planu/cli",
|
|
12
9
|
"capabilities": {
|
|
13
10
|
"tools": [
|
|
14
11
|
"planu_status",
|
|
12
|
+
"session_checkpoint",
|
|
15
13
|
"facilitate",
|
|
16
14
|
"init_project",
|
|
17
15
|
"clarify_requirements",
|
|
18
16
|
"create_spec",
|
|
17
|
+
"list_specs",
|
|
19
18
|
"challenge_spec",
|
|
20
19
|
"check_readiness",
|
|
21
20
|
"update_status",
|
|
21
|
+
"update_status_batch",
|
|
22
22
|
"package_handoff",
|
|
23
23
|
"validate",
|
|
24
|
+
"get_job",
|
|
25
|
+
"watch_job",
|
|
26
|
+
"cancel_job",
|
|
27
|
+
"restart_job",
|
|
24
28
|
"reconcile_spec",
|
|
25
29
|
"create_rule",
|
|
26
30
|
"create_skill",
|
|
27
|
-
"skill_search"
|
|
31
|
+
"skill_search",
|
|
32
|
+
"configure_code_graph",
|
|
33
|
+
"code_graph_status",
|
|
34
|
+
"submit_feedback",
|
|
35
|
+
"triage_feedback",
|
|
36
|
+
"resolve_feedback",
|
|
37
|
+
"sync_feedback",
|
|
38
|
+
"feedback_status"
|
|
28
39
|
],
|
|
29
|
-
"resources": [
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
"planu://project/status",
|
|
33
|
-
"planu://roadmap"
|
|
34
|
-
],
|
|
35
|
-
"prompts": [
|
|
36
|
-
"create-spec-from-idea",
|
|
37
|
-
"review-spec-readiness",
|
|
38
|
-
"generate-implementation-plan"
|
|
39
|
-
],
|
|
40
|
-
"subagents": [
|
|
41
|
-
"sdd-orchestrator",
|
|
42
|
-
"spec-challenger",
|
|
43
|
-
"test-generator"
|
|
44
|
-
]
|
|
45
|
-
},
|
|
46
|
-
"compatibility": {
|
|
47
|
-
"minimumHostVersion": "1.0.0",
|
|
48
|
-
"requiredFeatures": [
|
|
49
|
-
"mcp-tools",
|
|
50
|
-
"file-editing"
|
|
51
|
-
]
|
|
40
|
+
"resources": ["planu://specs/list", "planu://specs/{id}", "planu://project/status", "planu://roadmap"],
|
|
41
|
+
"prompts": ["create-spec-from-idea", "review-spec-readiness", "generate-implementation-plan"],
|
|
42
|
+
"subagents": ["sdd-orchestrator", "spec-challenger", "test-generator"]
|
|
52
43
|
},
|
|
44
|
+
"compatibility": { "minimumHostVersion": "1.0.0", "requiredFeatures": ["mcp-tools", "file-editing"] },
|
|
53
45
|
"repository": "https://github.com/planu-dev/planu",
|
|
54
46
|
"author": "Planu",
|
|
55
|
-
"license": "
|
|
47
|
+
"license": "SEE LICENSE IN LICENSE",
|
|
56
48
|
"homepage": "https://planu.dev",
|
|
57
|
-
"keywords": [
|
|
58
|
-
"sdd",
|
|
59
|
-
"spec-driven-development",
|
|
60
|
-
"mcp",
|
|
61
|
-
"specs",
|
|
62
|
-
"planning",
|
|
63
|
-
"ai",
|
|
64
|
-
"bdd",
|
|
65
|
-
"tdd"
|
|
66
|
-
]
|
|
49
|
+
"keywords": ["sdd", "spec-driven-development", "mcp", "specs", "planning", "ai", "bdd", "tdd"]
|
|
67
50
|
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { mkdir, readFile, rename, rm, stat, writeFile } from 'node:fs/promises';
|
|
2
|
+
|
|
3
|
+
const DEFAULT_TIMEOUT_MS = 5_000;
|
|
4
|
+
const POLL_INTERVAL_MS = 10;
|
|
5
|
+
const ABANDONED_LOCK_MS = 30_000;
|
|
6
|
+
|
|
7
|
+
function delay(milliseconds) {
|
|
8
|
+
return new Promise((resolve) => setTimeout(resolve, milliseconds));
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
function isProcessAlive(pid) {
|
|
12
|
+
try {
|
|
13
|
+
process.kill(pid, 0);
|
|
14
|
+
return true;
|
|
15
|
+
} catch (error) {
|
|
16
|
+
return error?.code !== 'ESRCH';
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
async function removeAbandonedLock(lockPath) {
|
|
21
|
+
try {
|
|
22
|
+
const owner = JSON.parse(await readFile(`${lockPath}/owner.json`, 'utf8'));
|
|
23
|
+
if (Number.isInteger(owner.pid) && owner.pid > 0 && !isProcessAlive(owner.pid)) {
|
|
24
|
+
await rm(lockPath, { recursive: true, force: true });
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
} catch {
|
|
28
|
+
try {
|
|
29
|
+
const lockStat = await stat(lockPath);
|
|
30
|
+
if (Date.now() - lockStat.mtimeMs > ABANDONED_LOCK_MS) {
|
|
31
|
+
await rm(lockPath, { recursive: true, force: true });
|
|
32
|
+
return true;
|
|
33
|
+
}
|
|
34
|
+
} catch {
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
return false;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
async function acquireLock(pendingPath, { timeoutMs, signal }) {
|
|
42
|
+
const lockPath = `${pendingPath}.lock`;
|
|
43
|
+
const deadline = Date.now() + timeoutMs;
|
|
44
|
+
while (true) {
|
|
45
|
+
if (signal?.aborted) throw new Error('pending release lock acquisition aborted');
|
|
46
|
+
try {
|
|
47
|
+
await mkdir(lockPath);
|
|
48
|
+
await writeFile(
|
|
49
|
+
`${lockPath}/owner.json`,
|
|
50
|
+
`${JSON.stringify({ pid: process.pid, createdAt: new Date().toISOString() })}\n`,
|
|
51
|
+
{ flag: 'wx', mode: 0o600 },
|
|
52
|
+
);
|
|
53
|
+
return lockPath;
|
|
54
|
+
} catch (error) {
|
|
55
|
+
if (error?.code !== 'EEXIST') {
|
|
56
|
+
await rm(lockPath, { recursive: true, force: true });
|
|
57
|
+
throw error;
|
|
58
|
+
}
|
|
59
|
+
if (await removeAbandonedLock(lockPath)) continue;
|
|
60
|
+
if (Date.now() >= deadline) {
|
|
61
|
+
throw new Error(`timed out waiting for pending release lock: ${lockPath}`);
|
|
62
|
+
}
|
|
63
|
+
await delay(POLL_INTERVAL_MS);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export async function withPendingReleaseLock(pendingPath, options, task) {
|
|
69
|
+
const lockPath = await acquireLock(pendingPath, {
|
|
70
|
+
timeoutMs: options?.timeoutMs ?? DEFAULT_TIMEOUT_MS,
|
|
71
|
+
signal: options?.signal,
|
|
72
|
+
});
|
|
73
|
+
try {
|
|
74
|
+
return await task();
|
|
75
|
+
} finally {
|
|
76
|
+
await rm(lockPath, { recursive: true, force: true });
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export async function writePendingReleaseLedger(pendingPath, entries) {
|
|
81
|
+
const temporaryPath = `${pendingPath}.${process.pid}.${Date.now()}.tmp`;
|
|
82
|
+
try {
|
|
83
|
+
await writeFile(temporaryPath, `${JSON.stringify(entries, null, 2)}\n`, {
|
|
84
|
+
encoding: 'utf8',
|
|
85
|
+
flag: 'wx',
|
|
86
|
+
mode: 0o644,
|
|
87
|
+
});
|
|
88
|
+
await rename(temporaryPath, pendingPath);
|
|
89
|
+
} catch (error) {
|
|
90
|
+
await rm(temporaryPath, { force: true });
|
|
91
|
+
throw error;
|
|
92
|
+
}
|
|
93
|
+
}
|