@unbrained/pm-cli 2026.11.5 → 2026.11.7
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/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +20 -0
- package/dist/cli/expected-revisions.js +1 -1
- package/dist/cli/main.js +1 -1
- package/dist/cli/register-operations.js +1 -1
- package/dist/cli/runtime/close-fields-retry.js +2 -0
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/chunk-3DI6CEF3.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-6VRX2CM7.js → chunk-4PPWVIIT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7ZRCYESH.js → chunk-5KHLV7JU.js} +47 -47
- package/dist/cli-bundle/chunks/{chunk-JI2GDE4I.js → chunk-BQ5O3CBF.js} +51 -51
- package/dist/cli-bundle/chunks/{chunk-F6NDMKZ4.js → chunk-COKKWMSC.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-D53G3NOE.js +6 -0
- package/dist/cli-bundle/chunks/{chunk-LS3GI3H4.js → chunk-ETHAZC3F.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-F3B2ULHB.js +122 -0
- package/dist/cli-bundle/chunks/chunk-JZWFZH2K.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-335BZ75D.js → chunk-KPAVZILX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OH6WQ7VT.js → chunk-MQOZNGPS.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-O6TIOKCM.js +9 -0
- package/dist/cli-bundle/chunks/{chunk-XLSHFYXZ.js → chunk-OIBSKKCO.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HRFGFIYU.js → chunk-OJZG7Y6S.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HRCMORE7.js → chunk-QG6FLDM4.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-D7KYPRK4.js → chunk-RFI4O6NU.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OJDMJT7Y.js → chunk-TGQPCNAD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DAX3AOFI.js → chunk-VM6OGNQC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-S4LPZ4TN.js → chunk-WS2N4TQW.js} +7 -7
- package/dist/cli-bundle/chunks/{chunk-UEGXWXUZ.js → chunk-WXVMPLBY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-2RPORE7M.js → chunk-WYIDX67P.js} +30 -30
- package/dist/cli-bundle/chunks/{chunk-7DEKAXVA.js → chunk-XSEDESNW.js} +2 -2
- package/dist/cli-bundle/chunks/item-revision-SPEKTFBB.js +2 -0
- package/dist/cli-bundle/chunks/item-transaction-BT55TQXE.js +2 -0
- package/dist/cli-bundle/chunks/{mutation-admission-INMM3HHG.js → mutation-admission-LUXUKISJ.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-5Y5JKWU5.js → register-list-query-DU4W7VJU.js} +3 -3
- package/dist/cli-bundle/chunks/{register-mutation-WC7OSQID.js → register-mutation-IC2C53QK.js} +2 -2
- package/dist/cli-bundle/chunks/register-operations-AHDWE2G3.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-RRFOS7IT.js → register-setup-7BGG3CI3.js} +2 -2
- package/dist/cli-bundle/chunks/{stage-E3MMV4TV.js → stage-S5BYWLGY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-CPMSL4HS.js → chunk-4EXRRSDS.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-4LDOL6U7.js +26 -0
- package/dist/cli-bundle/focused-chunks/chunk-A46YSPRF.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-RFTJZ5VB.js → chunk-AI2PYNFI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-AJ2I377F.js +44 -0
- package/dist/cli-bundle/focused-chunks/{chunk-NQ7GYFOX.js → chunk-BIDF4KO7.js} +5 -5
- package/dist/cli-bundle/focused-chunks/{chunk-VWWTIX5L.js → chunk-CWFNQQZE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-D3U7FOZR.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-F62XGAAY.js → chunk-G2VIY6XA.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-MG7C3JUY.js → chunk-GFF6BITP.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-LW64TINU.js → chunk-IIBWXNW3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-AHWJPZSJ.js → chunk-IYJRFJHT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-D2TBEBNW.js → chunk-J5N42SKC.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-MC7IE7D7.js → chunk-JRJOFMI7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-CZM75DE3.js → chunk-KL33JMPC.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-E56OXRYH.js → chunk-LH4C7BLB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-YMGB2O4E.js → chunk-LTQEYE2L.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-LTTMERPN.js +12 -0
- package/dist/cli-bundle/focused-chunks/{chunk-7KK66ISG.js → chunk-LW4TN5ZM.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-XHOBYCVE.js → chunk-MESFDQ3H.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-G4QP365K.js → chunk-MWTBAI3V.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-TWULNB3N.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-C6P6HPCX.js → chunk-XAC6NP7U.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-GS3JC5UU.js → chunk-XG3TBYQK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-XMZAFKVP.js +91 -0
- package/dist/cli-bundle/focused-chunks/item-revision-ELI6NGMY.js +2 -0
- package/dist/cli-bundle/focused-chunks/{item-transaction-AEAYVVHA.js → item-transaction-GUGAUY77.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{mutation-admission-4WM7TNHZ.js → mutation-admission-54FI37AA.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{stage-WV7QXR4C.js → stage-OHDJ43T2.js} +2 -2
- package/dist/cli-bundle/main.js +31 -31
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +1 -1
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +57 -57
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +2 -2
- package/dist/core/store/item-mutation-precondition.d.ts +58 -0
- package/dist/core/store/item-mutation-precondition.js +1 -1
- package/dist/sdk/command-line.d.ts +5 -1
- package/dist/sdk/command-line.js +1 -1
- package/dist/sdk/governance/health/projection.js +1 -1
- package/dist/sdk/governance/health.d.ts +3 -3
- package/dist/sdk/governance/health.js +2 -2
- package/dist/sdk/lifecycle/close.js +1 -1
- package/dist/sdk/lifecycle/item-revision.d.ts +15 -4
- package/dist/sdk/lifecycle/item-revision.js +1 -1
- package/dist/sdk/output/list-envelope.d.ts +18 -7
- package/dist/sdk/output/list-envelope.js +1 -1
- package/dist/sdk/output-projection.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/query/get.d.ts +16 -6
- package/dist/sdk/query/get.js +1 -1
- package/dist/sdk/query/search/response.js +1 -1
- package/dist/sdk/runtime.js +1 -1
- package/docs/CLOSE_EVIDENCE_RECOVERY.md +36 -2
- package/docs/COMMANDS.md +10 -1
- package/docs/GET_READ_EVIDENCE.md +24 -3
- package/docs/OUTPUT_PROJECTION_CONTRACTS.md +7 -0
- package/docs/RELEASING.md +41 -6
- package/docs/SDK.md +24 -7
- package/marketplace.json +1 -1
- package/package.json +1 -1
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/package.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/package.json +1 -1
- package/plugins/pm-codex/plugin.json +1 -1
- package/runtime-dependencies.json +1 -1
- package/dist/cli/after-command-context-usage.d.ts +0 -21
- package/dist/cli/argv-utils.d.ts +0 -12
- package/dist/cli/bootstrap-args.d.ts +0 -6
- package/dist/cli/bundle-integrity.d.ts +0 -49
- package/dist/cli/command-namespaces.d.ts +0 -9
- package/dist/cli/commander-usage.d.ts +0 -73
- package/dist/cli/commands/annotations/comments.d.ts +0 -2
- package/dist/cli/commands/annotations/docs.d.ts +0 -6
- package/dist/cli/commands/annotations/files.d.ts +0 -6
- package/dist/cli/commands/annotations/learnings.d.ts +0 -2
- package/dist/cli/commands/annotations/notes.d.ts +0 -2
- package/dist/cli/commands/extension/describe.d.ts +0 -2
- package/dist/cli/commands/extension/extension.d.ts +0 -6
- package/dist/cli/commands/extension/scaffold.d.ts +0 -2
- package/dist/cli/commands/extension/shared.d.ts +0 -2
- package/dist/cli/commands/governance/gc.d.ts +0 -6
- package/dist/cli/commands/governance/health.d.ts +0 -6
- package/dist/cli/commands/governance/telemetry.d.ts +0 -6
- package/dist/cli/commands/governance/validate.d.ts +0 -9
- package/dist/cli/commands/history/activity.d.ts +0 -6
- package/dist/cli/commands/history/history-compact.d.ts +0 -7
- package/dist/cli/commands/history/history-redact.d.ts +0 -8
- package/dist/cli/commands/history/history-repair.d.ts +0 -7
- package/dist/cli/commands/history/history.d.ts +0 -2
- package/dist/cli/commands/history/restore.d.ts +0 -6
- package/dist/cli/commands/lifecycle/append.d.ts +0 -6
- package/dist/cli/commands/lifecycle/claim.d.ts +0 -2
- package/dist/cli/commands/lifecycle/close-many.d.ts +0 -2
- package/dist/cli/commands/lifecycle/close.d.ts +0 -6
- package/dist/cli/commands/lifecycle/copy.d.ts +0 -6
- package/dist/cli/commands/lifecycle/create.d.ts +0 -10
- package/dist/cli/commands/lifecycle/delete.d.ts +0 -6
- package/dist/cli/commands/lifecycle/focus.d.ts +0 -6
- package/dist/cli/commands/lifecycle/plan.d.ts +0 -9
- package/dist/cli/commands/lifecycle/update-many.d.ts +0 -6
- package/dist/cli/commands/lifecycle/update.d.ts +0 -10
- package/dist/cli/commands/query/aggregate.d.ts +0 -2
- package/dist/cli/commands/query/context.d.ts +0 -6
- package/dist/cli/commands/query/deps.d.ts +0 -6
- package/dist/cli/commands/query/duplicates.d.ts +0 -6
- package/dist/cli/commands/query/eval.d.ts +0 -6
- package/dist/cli/commands/query/get.d.ts +0 -6
- package/dist/cli/commands/query/graph.d.ts +0 -7
- package/dist/cli/commands/query/list.d.ts +0 -6
- package/dist/cli/commands/query/next.d.ts +0 -6
- package/dist/cli/commands/query/search.d.ts +0 -6
- package/dist/cli/commands/query/stats.d.ts +0 -6
- package/dist/cli/commands/test/test-all.d.ts +0 -6
- package/dist/cli/commands/test/test-runs.d.ts +0 -6
- package/dist/cli/commands/test/test.d.ts +0 -6
- package/dist/cli/commands/workspace/config.d.ts +0 -6
- package/dist/cli/commands/workspace/contracts.d.ts +0 -2
- package/dist/cli/commands/workspace/init.d.ts +0 -6
- package/dist/cli/commands/workspace/merge.d.ts +0 -8
- package/dist/cli/commands/workspace/profile.d.ts +0 -6
- package/dist/cli/commands/workspace/schema.d.ts +0 -7
- package/dist/cli/commands/workspace/upgrade.d.ts +0 -2
- package/dist/cli/context-intent-invocation.d.ts +0 -2
- package/dist/cli/description-stdin.d.ts +0 -2
- package/dist/cli/error-guidance.d.ts +0 -276
- package/dist/cli/expected-revisions.d.ts +0 -55
- package/dist/cli/extension-command-help.d.ts +0 -137
- package/dist/cli/extension-command-options.d.ts +0 -37
- package/dist/cli/extension-recovery.d.ts +0 -31
- package/dist/cli/help-content.d.ts +0 -57
- package/dist/cli/help-json-payload.d.ts +0 -83
- package/dist/cli/invocation-profile.d.ts +0 -26
- package/dist/cli/main.d.ts +0 -263
- package/dist/cli/migration-gates.d.ts +0 -55
- package/dist/cli/option-values.d.ts +0 -3
- package/dist/cli/preflight-warnings.d.ts +0 -11
- package/dist/cli/register-annotations.d.ts +0 -11
- package/dist/cli/register-assurance.d.ts +0 -8
- package/dist/cli/register-files-lookup.d.ts +0 -9
- package/dist/cli/register-history-activity.d.ts +0 -8
- package/dist/cli/register-history-author.d.ts +0 -8
- package/dist/cli/register-history-maintenance.d.ts +0 -9
- package/dist/cli/register-list-query.d.ts +0 -27
- package/dist/cli/register-mutation-options.d.ts +0 -10
- package/dist/cli/register-mutation.d.ts +0 -16
- package/dist/cli/register-operations.d.ts +0 -85
- package/dist/cli/register-setup.d.ts +0 -16
- package/dist/cli/register-structured-mutation.d.ts +0 -15
- package/dist/cli/registration-helpers.d.ts +0 -2
- package/dist/cli/runtime/activation.d.ts +0 -51
- package/dist/cli/runtime/field-route-retry.d.ts +0 -15
- package/dist/cli/runtime/invocation-options.d.ts +0 -43
- package/dist/cli/runtime/projection-retry.d.ts +0 -9
- package/dist/cli/runtime/selection.d.ts +0 -35
- package/dist/cli/runtime/telemetry-outcome.d.ts +0 -20
- package/dist/cli/runtime-compatibility-boundary.d.ts +0 -17
- package/dist/cli/schema/registration.d.ts +0 -4
- package/dist/cli/schema-registration-helpers.d.ts +0 -24
- package/dist/cli/search-refresh.d.ts +0 -2
- package/dist/cli/stats-analytics-json.d.ts +0 -9
- package/dist/cli/telemetry-flush.d.ts +0 -2
- package/dist/cli-bundle/chunks/chunk-5GWEY4P6.js +0 -122
- package/dist/cli-bundle/chunks/chunk-AUEKTX7V.js +0 -6
- package/dist/cli-bundle/chunks/chunk-FRNMQM45.js +0 -2
- package/dist/cli-bundle/chunks/chunk-HNGLDMSZ.js +0 -9
- package/dist/cli-bundle/chunks/chunk-YKXATU2G.js +0 -3
- package/dist/cli-bundle/chunks/item-revision-OJJVPQY7.js +0 -2
- package/dist/cli-bundle/chunks/item-transaction-QEPBUCMY.js +0 -2
- package/dist/cli-bundle/chunks/register-operations-PO63DBZH.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-5PMJOJCZ.js +0 -44
- package/dist/cli-bundle/focused-chunks/chunk-G5PJCR7R.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-M6V7UMWL.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-MK4HV4JO.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-O7EI33NP.js +0 -91
- package/dist/cli-bundle/focused-chunks/chunk-SNOXXRSJ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-UPJUTP2V.js +0 -12
- package/dist/cli-bundle/focused-chunks/item-revision-CTDO4H3I.js +0 -2
- package/dist/cli.d.ts +0 -13
- package/dist/core/checkpoint/checkpoint-gc.d.ts +0 -61
- package/dist/core/checkpoint/mutation-context.d.ts +0 -10
- package/dist/core/diagnostics/remediation.d.ts +0 -52
- package/dist/core/extensions/activation-transaction.d.ts +0 -22
- package/dist/core/extensions/command-visibility-tier.d.ts +0 -8
- package/dist/core/extensions/exporter-output-contract.d.ts +0 -12
- package/dist/core/extensions/extension-candidate.d.ts +0 -26
- package/dist/core/extensions/extension-runtime-helpers.d.ts +0 -16
- package/dist/core/extensions/module-graph-snapshot.d.ts +0 -19
- package/dist/core/extensions/preflight-ownership.d.ts +0 -5
- package/dist/core/extensions/read-output-contract.d.ts +0 -5
- package/dist/core/extensions/reserved-host-flags.d.ts +0 -18
- package/dist/core/extensions/service-ownership.d.ts +0 -8
- package/dist/core/extensions/version-diagnostics.d.ts +0 -2
- package/dist/core/fs/atomic-create.d.ts +0 -7
- package/dist/core/fs/index.d.ts +0 -6
- package/dist/core/fs/path-utils.d.ts +0 -2
- package/dist/core/history/drift-cache.d.ts +0 -4
- package/dist/core/history/drift-scan.d.ts +0 -51
- package/dist/core/history/index.d.ts +0 -6
- package/dist/core/history/tombstone.d.ts +0 -3
- package/dist/core/history/version-address.d.ts +0 -13
- package/dist/core/item/index.d.ts +0 -9
- package/dist/core/item/item-type-definition.d.ts +0 -51
- package/dist/core/item/toon-decode.d.ts +0 -25
- package/dist/core/lock/index.d.ts +0 -6
- package/dist/core/lock/lock-confinement.d.ts +0 -55
- package/dist/core/lock/lock-gc.d.ts +0 -93
- package/dist/core/output/mutation-projection.d.ts +0 -13
- package/dist/core/output/query-summary.d.ts +0 -30
- package/dist/core/search/staleness.d.ts +0 -23
- package/dist/core/sentry/sensitive-assignments.d.ts +0 -9
- package/dist/core/shared/conflict-markers.d.ts +0 -18
- package/dist/core/shared/index.d.ts +0 -9
- package/dist/core/shared/memo.d.ts +0 -7
- package/dist/core/store/index.d.ts +0 -9
- package/dist/core/store/settings-concurrency.d.ts +0 -7
- package/dist/core/telemetry/read-sampling.d.ts +0 -8
- package/dist/core/test/item-test-run-tracking.d.ts +0 -12
- package/dist/core/validate/estimate-defaults.d.ts +0 -21
- package/dist/core/validate/linked-artifact-reference.d.ts +0 -20
- package/dist/mcp/http-server.d.ts +0 -60
- package/dist/mcp/legacy-adapter.d.ts +0 -59
- package/dist/mcp/runtime-capabilities.d.ts +0 -57
- package/dist/mcp/server.d.ts +0 -101
- package/dist/sdk/cli-contracts/bootstrap-command-scanner.d.ts +0 -23
- package/dist/sdk/cli-contracts/registration-helpers.d.ts +0 -123
- package/dist/sdk/cli-contracts/schemas/assurance-definition.d.ts +0 -796
- package/dist/sdk/cli-contracts/string-lists.d.ts +0 -9
- package/dist/sdk/cli-contracts/tool-parameter-tables.d.ts +0 -35
- package/dist/sdk/context/usage-egress.d.ts +0 -9
- package/dist/sdk/dependencies/context-budget-recovery.d.ts +0 -21
- package/dist/sdk/dependency-flag-validation.d.ts +0 -32
- package/dist/sdk/extension/author-manifest.d.ts +0 -22
- package/dist/sdk/extension/bundled-catalog.d.ts +0 -35
- package/dist/sdk/extension/concurrency.d.ts +0 -7
- package/dist/sdk/extension/copy-scope.d.ts +0 -2
- package/dist/sdk/extension/custom-field-collisions.d.ts +0 -6
- package/dist/sdk/extension/install-receipts.d.ts +0 -7
- package/dist/sdk/extension/install-snapshot.d.ts +0 -34
- package/dist/sdk/extension/managed-update-status.d.ts +0 -3
- package/dist/sdk/extension/runtime-summary.d.ts +0 -9
- package/dist/sdk/extension/scaffold.d.ts +0 -38
- package/dist/sdk/generated/error-code-catalog-rows.d.ts +0 -39
- package/dist/sdk/generated/generated-error-code-catalog-part-1.d.ts +0 -8
- package/dist/sdk/generated/generated-error-code-catalog-part-2.d.ts +0 -8
- package/dist/sdk/governance/assurance-limits.d.ts +0 -7
- package/dist/sdk/governance/defect-recurrence-signals.d.ts +0 -10
- package/dist/sdk/governance/health-merge-evidence.d.ts +0 -23
- package/dist/sdk/governance/tracked-runtime-cache.d.ts +0 -24
- package/dist/sdk/governance/validate-history-drift.d.ts +0 -7
- package/dist/sdk/history/attestation-scan.d.ts +0 -16
- package/dist/sdk/history-mcp.d.ts +0 -17
- package/dist/sdk/lifecycle/checkpoint-rollback.d.ts +0 -15
- package/dist/sdk/lifecycle/core-field-recovery.d.ts +0 -33
- package/dist/sdk/lifecycle/core-item-fields.d.ts +0 -6
- package/dist/sdk/lifecycle/event-validation-messages.d.ts +0 -6
- package/dist/sdk/lifecycle/hierarchy-mutation-lock.d.ts +0 -15
- package/dist/sdk/lifecycle/legacy-none-tokens.d.ts +0 -71
- package/dist/sdk/lifecycle/mcp-actions.d.ts +0 -24
- package/dist/sdk/lifecycle/metadata-normalizers.d.ts +0 -8
- package/dist/sdk/lifecycle/mutation-facet-contracts.d.ts +0 -6
- package/dist/sdk/lifecycle/mutation-option-validation.d.ts +0 -2
- package/dist/sdk/lifecycle/recurrence-parsers.d.ts +0 -34
- package/dist/sdk/lifecycle/release-handoff.d.ts +0 -12
- package/dist/sdk/lifecycle/repeatable-metadata-parsers.d.ts +0 -18
- package/dist/sdk/lifecycle/repeated-terminal-state.d.ts +0 -45
- package/dist/sdk/merge/abandoned-receipts.d.ts +0 -15
- package/dist/sdk/merge/history-scalar-rebase.d.ts +0 -9
- package/dist/sdk/merge/ignored-artifacts.d.ts +0 -13
- package/dist/sdk/merge/indexed-receipt-blobs.d.ts +0 -4
- package/dist/sdk/merge/receipt-file-boundary.d.ts +0 -23
- package/dist/sdk/merge/settlement-hook.d.ts +0 -12
- package/dist/sdk/merge/stage.d.ts +0 -13
- package/dist/sdk/merge/worktree-config.d.ts +0 -11
- package/dist/sdk/query/light-metadata.d.ts +0 -3
- package/dist/sdk/query/window-pagination.d.ts +0 -20
- package/dist/sdk/read-output/extension.d.ts +0 -7
- package/dist/sdk/read-output/provenance.d.ts +0 -20
- package/dist/sdk/read-output/surfaces.d.ts +0 -27
- package/dist/sdk/runtime/actions.d.ts +0 -4
- package/dist/sdk/runtime/mutation-admission.d.ts +0 -2
- package/dist/sdk/runtime/mutation-value-validation.d.ts +0 -16
- package/dist/sdk/runtime/schema.d.ts +0 -4
- package/dist/sdk/runtime-action-aliases.d.ts +0 -7
- package/dist/sdk/runtime-extended-actions.d.ts +0 -27
- package/dist/sdk/runtime-stats-options.d.ts +0 -9
- package/dist/sdk/test/command-args.d.ts +0 -4
- package/dist/sdk/test/command-resolution.d.ts +0 -5
- package/dist/sdk/test/entry.d.ts +0 -18
- package/dist/sdk/test/execution-receipts.d.ts +0 -34
- package/dist/sdk/test/receipt-index-snapshot.d.ts +0 -2
- package/dist/sdk/test/workspace-snapshot.d.ts +0 -11
- package/dist/sdk/traceability/runtime-files-lookup.d.ts +0 -8
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Shared machine-executable remediation registry.
|
|
3
|
-
*
|
|
4
|
-
* `pm health` and `pm validate` both emit stable, colon-delimited warning tokens
|
|
5
|
-
* (for example `history_drift_missing_stream:pm-abcd` or
|
|
6
|
-
* `validate_resolution_missing_fields:3`). Agents that gate on these commands
|
|
7
|
-
* previously had to hardcode the mapping from a warning code to the `pm` command
|
|
8
|
-
* that fixes it. This module is the single source of truth for that mapping so
|
|
9
|
-
* `pm health --json` (per-check `remediation_map`) and `pm validate --fix-hints`
|
|
10
|
-
* (per-check `fix_hints`) can both surface executable remediation without any
|
|
11
|
-
* duplicated, drift-prone lookup tables.
|
|
12
|
-
*
|
|
13
|
-
* Semantics of {@link RemediationEntry.command}: the suggested next `pm` command
|
|
14
|
-
* an operator/agent should run to resolve findings with that code. Per-item
|
|
15
|
-
* findings use an `<id>` placeholder (callers that have the concrete id may
|
|
16
|
-
* substitute it); findings whose only fix is a manual file edit point at the
|
|
17
|
-
* most useful diagnostic/repair command and describe the manual step in
|
|
18
|
-
* {@link RemediationEntry.summary}.
|
|
19
|
-
*/
|
|
20
|
-
/** Maps a stable diagnostic warning code to the command and summary that resolve it. */
|
|
21
|
-
export interface RemediationEntry {
|
|
22
|
-
/** Stable warning-code prefix this entry resolves. A warning matches when it equals this code or begins with `<code>:`. Registry codes are mutually exclusive under that colon-boundary rule (no code is a `:`-delimited prefix of another — e.g. `settings:id_prefix_empty` is distinct from a bare `settings`, which is intentionally not registered), so `resolveRemediation` uses first-match with no ordering dependency. */
|
|
23
|
-
readonly code:string;
|
|
24
|
-
/** Executable `pm` command (or imperative) that resolves the finding. May contain an `<id>` placeholder. */
|
|
25
|
-
readonly command:string;
|
|
26
|
-
/** One-line description of what the command does / which manual step it covers. */
|
|
27
|
-
readonly summary:string;
|
|
28
|
-
}
|
|
29
|
-
/** Registry of every non-extension `pm health` / `pm validate` warning code and its remediation. Extension findings keep their richer, contextual `details.triage.remediation` produced by the extension health triage and are intentionally excluded here (see pm-0hnu: "all non-extension checks"). */
|
|
30
|
-
export declare const REMEDIATION_REGISTRY:readonly RemediationEntry[];
|
|
31
|
-
/**
|
|
32
|
-
* Resolve the remediation entry for a warning token, or `undefined` when no
|
|
33
|
-
* entry is registered. A warning matches an entry when it equals the entry code
|
|
34
|
-
* or begins with `<code>:` (the colon boundary keeps sibling codes such as
|
|
35
|
-
* `validate_lifecycle_dependency_cycles` and
|
|
36
|
-
* `validate_lifecycle_dependency_cycles_error` disjoint).
|
|
37
|
-
*
|
|
38
|
-
* First match is intentional and correct: registry codes are mutually exclusive
|
|
39
|
-
* under the colon-boundary rule, so at most one entry can ever match a warning
|
|
40
|
-
* and order is irrelevant. That invariant is enforced by a test (see
|
|
41
|
-
* remediation-registry.spec.ts "keeps every registry code mutually exclusive"),
|
|
42
|
-
* which is why this stays a simple linear scan rather than a longest-prefix
|
|
43
|
-
* search — a longest-prefix tie-break is unreachable with disjoint codes.
|
|
44
|
-
*
|
|
45
|
-
* Accepts unknown input defensively (this is an exported helper SDK consumers
|
|
46
|
-
* may call from untyped JS): a non-string `warning` resolves to `undefined`.
|
|
47
|
-
*/
|
|
48
|
-
export declare function resolveRemediation(warning:string):RemediationEntry | undefined;
|
|
49
|
-
/** Build a compact `remediation_map` (code -> command) for a set of warning tokens. First match wins per code; unknown codes are skipped. Used by `pm health --json` per-check details and as the source of deduped executable commands for `pm validate --fix-hints`. */
|
|
50
|
-
export declare function buildRemediationMap(warnings:Iterable<string>):Record<string,string>;
|
|
51
|
-
/** Build a deduped, ordered list of executable remediation commands for a set of warning tokens (one command per distinct matched code). Used by `pm validate --fix-hints` for checks that do not already emit per-row remediation commands. */
|
|
52
|
-
export declare function buildRemediationCommands(warnings:Iterable<string>):string[];
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module core/extensions/activation-transaction
|
|
3
|
-
*
|
|
4
|
-
* Captures and restores extension registries around one activation attempt.
|
|
5
|
-
*/
|
|
6
|
-
import type { ExtensionCommandRegistry,ExtensionHookRegistry,ExtensionParserRegistry,ExtensionPreflightRegistry,ExtensionRegistrationRegistry,ExtensionRendererRegistry,ExtensionServiceRegistry } from "./extension-types.js";
|
|
7
|
-
interface MutableExtensionActivationState {
|
|
8
|
-
hooks:ExtensionHookRegistry;
|
|
9
|
-
commands:ExtensionCommandRegistry;
|
|
10
|
-
parsers:ExtensionParserRegistry;
|
|
11
|
-
preflight:ExtensionPreflightRegistry;
|
|
12
|
-
services:ExtensionServiceRegistry;
|
|
13
|
-
renderers:ExtensionRendererRegistry;
|
|
14
|
-
registrations:ExtensionRegistrationRegistry;
|
|
15
|
-
}
|
|
16
|
-
/**
|
|
17
|
-
* Return a rollback operation that restores every mutable registry to its
|
|
18
|
-
* current length, making one extension activation atomic without cloning
|
|
19
|
-
* handlers or user values.
|
|
20
|
-
*/
|
|
21
|
-
export declare function captureExtensionActivationRollback(state:MutableExtensionActivationState):() => void;
|
|
22
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module core/extensions/command-visibility-tier
|
|
3
|
-
*
|
|
4
|
-
* Validates extension command visibility metadata.
|
|
5
|
-
*/
|
|
6
|
-
import type { CommandDefinition } from "./extension-types.js";
|
|
7
|
-
/** Validate optional command metadata strings and the closed visibility tier. */
|
|
8
|
-
export declare function assertCommandDefinitionMetadataStrings(definition:CommandDefinition):void;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module core/extensions/exporter-output-contract
|
|
3
|
-
*
|
|
4
|
-
* Validates SDK-declared exporter artifact channels independently from extension activation.
|
|
5
|
-
*/
|
|
6
|
-
import type { CommandHandlerContext,ExporterRegistrationOptions,ImportExportContext,RegisteredExporterArtifactOutputContract } from "./extension-types.js";
|
|
7
|
-
/** Validates and normalizes the public artifact-channel metadata for one exporter registration. */
|
|
8
|
-
export declare function normalizeExporterArtifactOutput(value:unknown):RegisteredExporterArtifactOutputContract;
|
|
9
|
-
/** Enforces importer/exporter channel ownership and applies the stdout-specific derived description. */
|
|
10
|
-
export declare function resolveImportExportArtifactOutput(method:"registerImporter" | "registerExporter",resolvedOptions:ExporterRegistrationOptions,descriptionWasDeclared:boolean):RegisteredExporterArtifactOutputContract | undefined;
|
|
11
|
-
/** Snapshots a host command invocation into the stable importer/exporter context contract. */
|
|
12
|
-
export declare function buildImportExportContext(context:CommandHandlerContext,registration:string,action:"import" | "export"):ImportExportContext;
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module core/extensions/extension-candidate
|
|
3
|
-
*
|
|
4
|
-
* Projects static scan evidence into an import-ready extension candidate.
|
|
5
|
-
*/
|
|
6
|
-
import type { ExtensionCandidate,ExtensionContributionInventory,ExtensionLayer,ExtensionManifest } from "./extension-types.js";
|
|
7
|
-
/** Managed package identity attached to a discovered extension directory. */
|
|
8
|
-
export interface ExtensionCandidateSourceIdentity {
|
|
9
|
-
/** Registry package name when known. */
|
|
10
|
-
package_name?:string;
|
|
11
|
-
/** Install-source aliases accepted by lifecycle commands. */
|
|
12
|
-
aliases:string[];
|
|
13
|
-
/** Persisted install-time contribution snapshot. */
|
|
14
|
-
contributions?:ExtensionContributionInventory;
|
|
15
|
-
}
|
|
16
|
-
/** Build an import-ready discovery candidate only after every static gate passes. */
|
|
17
|
-
export declare function buildReadyExtensionCandidate(params:{
|
|
18
|
-
layer:ExtensionLayer;
|
|
19
|
-
directory:string;
|
|
20
|
-
manifestPath:string;
|
|
21
|
-
entryPath:string;
|
|
22
|
-
manifest:ExtensionManifest;
|
|
23
|
-
sourceIdentity:ExtensionCandidateSourceIdentity | undefined;
|
|
24
|
-
extensionReady:boolean;
|
|
25
|
-
enabledForLoad:boolean;
|
|
26
|
-
}):ExtensionCandidate | null;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module core/extensions/extension-runtime-helpers
|
|
3
|
-
*
|
|
4
|
-
* Implements extension runtime contracts and governance for Extension Runtime Helpers.
|
|
5
|
-
*/
|
|
6
|
-
import type { GlobalOptions } from "../shared/command-types.js";
|
|
7
|
-
/** Implements normalize command name for the public runtime surface of this module. */
|
|
8
|
-
export declare function normalizeCommandName(command:string):string;
|
|
9
|
-
/** Implements default global options for the public runtime surface of this module. */
|
|
10
|
-
export declare function defaultGlobalOptions():GlobalOptions;
|
|
11
|
-
/** Implements clone command options snapshot for the public runtime surface of this module. */
|
|
12
|
-
export declare function cloneCommandOptionsSnapshot(options:Record<string,unknown> | undefined):Record<string,unknown>;
|
|
13
|
-
/** Implements clone global options snapshot for the public runtime surface of this module. */
|
|
14
|
-
export declare function cloneGlobalOptionsSnapshot(options:GlobalOptions | undefined):GlobalOptions;
|
|
15
|
-
/** Implements clone context snapshot for the public runtime surface of this module. */
|
|
16
|
-
export declare function cloneContextSnapshot<T>(value:T):T;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/** Extension paths and identity required to create a complete graph snapshot. */
|
|
2
|
-
export interface ExtensionModuleGraphSnapshotSource {
|
|
3
|
-
/** Extension precedence layer used to keep snapshot directories distinct. */
|
|
4
|
-
layer:string;
|
|
5
|
-
/** Extension directory identifier used to keep snapshot directories distinct. */
|
|
6
|
-
directory:string;
|
|
7
|
-
/** Absolute path to the extension manifest inside its source directory. */
|
|
8
|
-
manifest_path:string;
|
|
9
|
-
/** Absolute path to the extension entry module. */
|
|
10
|
-
entry_path:string;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Copy an extension directory into a fresh graph root and return its entry path.
|
|
14
|
-
*
|
|
15
|
-
* Copying the complete directory gives every relative transitive import a new
|
|
16
|
-
* absolute URL, preventing a same-process install verification from reusing
|
|
17
|
-
* stale ESM cache entries.
|
|
18
|
-
*/
|
|
19
|
-
export declare function snapshotExtensionModuleGraph(snapshotRoot:string,extension:ExtensionModuleGraphSnapshotSource):Promise<string>;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ExtensionPreflightRegistry,PreflightOverride,RegisteredExtensionPreflightOverride,ScopedPreflightOverrideDefinition } from "./extension-types.js";
|
|
2
|
-
/** Normalize one callback or scoped definition into a registered handler payload. */
|
|
3
|
-
export declare function normalizePreflightOverride(override:PreflightOverride | ScopedPreflightOverrideDefinition):Pick<RegisteredExtensionPreflightOverride,"run" | "commands">;
|
|
4
|
-
/** Report pairwise overlap while permitting disjoint scoped ownership. */
|
|
5
|
-
export declare function collectPreflightCollisionWarnings(preflight:ExtensionPreflightRegistry):string[];
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { ExtensionCommandReadOutput } from "./extension-types.js";
|
|
2
|
-
/** Reject malformed, ambiguous or unsafe row declarations and retain an immutable snapshot. */
|
|
3
|
-
export declare function normalizeExtensionReadOutput(value:unknown,command?:string,action?:string):ExtensionCommandReadOutput | undefined;
|
|
4
|
-
/** Preserve native dispatch authority when packages declare custom read commands. */
|
|
5
|
-
export declare function isNativeExtensionOutputCommand(command:string):boolean;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module core/extensions/reserved-host-flags
|
|
3
|
-
*
|
|
4
|
-
* Declares the pm host flags that extension commands must never shadow.
|
|
5
|
-
*/
|
|
6
|
-
/** Describes one host-owned flag spelling reserved from extension registration. */
|
|
7
|
-
export interface ReservedExtensionHostFlag {
|
|
8
|
-
/** Canonical long flag owned by the pm host. */
|
|
9
|
-
flag:string;
|
|
10
|
-
/** Compatibility aliases that are equally host-owned. */
|
|
11
|
-
aliases?:readonly string[];
|
|
12
|
-
/** Optional value label retained by the public CLI contract projection. */
|
|
13
|
-
value_name?:string;
|
|
14
|
-
}
|
|
15
|
-
/** Host-owned flags inherited by every subcommand, including extension commands. */
|
|
16
|
-
export declare const RESERVED_EXTENSION_HOST_FLAGS:readonly ReservedExtensionHostFlag[];
|
|
17
|
-
/** Every canonical and aliased host flag spelling reserved from extensions. */
|
|
18
|
-
export declare const RESERVED_EXTENSION_HOST_FLAG_NAMES:ReadonlySet<string>;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module core/extensions/service-ownership
|
|
3
|
-
*
|
|
4
|
-
* Validates host-enforced ownership metadata for extension service overrides.
|
|
5
|
-
*/
|
|
6
|
-
import type { ServiceOverrideOwnership } from "./extension-types.js";
|
|
7
|
-
/** Validate one service ownership declaration and return its normalized pass-through flag. */
|
|
8
|
-
export declare function normalizeServiceOverrideOwnership(ownership:ServiceOverrideOwnership):boolean;
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Stage bytes beside the destination, then atomically link them into an absent
|
|
3
|
-
* pathname. A competing creator wins without being overwritten. Hard-link
|
|
4
|
-
* failures other than EEXIST propagate; no unsafe overwrite fallback is used.
|
|
5
|
-
* Publication provides atomic visibility, not fsync-backed power-loss durability.
|
|
6
|
-
*/
|
|
7
|
-
export declare function createFileAtomic(targetPath:string,contents:string):Promise<boolean>;
|
package/dist/core/fs/index.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
/** Remove the derived drift cache after a history mutation; a missing or concurrently removed cache is already invalidated. */
|
|
2
|
-
export declare function invalidateHistoryDriftCache(pmRoot:string):Promise<void>;
|
|
3
|
-
/** Resolve a conventional tracker root from a history stream path and invalidate its derived verification cache. */
|
|
4
|
-
export declare function invalidateHistoryDriftCacheForPath(historyPath:string):Promise<void>;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { type HistoryIdentityDiscontinuity } from "./identity.js";
|
|
2
|
-
import type { ItemMetadata } from "../../types/index.js";
|
|
3
|
-
/** Documents the drift scan result payload exchanged by command, SDK, and package integrations. */
|
|
4
|
-
export interface DriftScanResult {
|
|
5
|
-
/** Repeated genesis ordinals and observed sequence, keyed by affected item. */
|
|
6
|
-
identityDiscontinuities?:Array<HistoryIdentityDiscontinuity & {
|
|
7
|
-
item_id:string;
|
|
8
|
-
}>;
|
|
9
|
-
/** Value that configures or reports missing streams for this contract. */
|
|
10
|
-
missingStreams:string[];
|
|
11
|
-
/** Value that configures or reports unreadable streams for this contract. */
|
|
12
|
-
unreadableStreams:string[];
|
|
13
|
-
/** Value that configures or reports hash mismatches for this contract. */
|
|
14
|
-
hashMismatches:string[];
|
|
15
|
-
/** Value that configures or reports chain mismatches for this contract. */
|
|
16
|
-
chainMismatches:string[];
|
|
17
|
-
/** Streams written with a hash capability newer than this runtime understands. */
|
|
18
|
-
versionSkews:string[];
|
|
19
|
-
/** Value that configures or reports drifted items for this contract. */
|
|
20
|
-
driftedItems:string[];
|
|
21
|
-
/** Governed singleton files whose JSON differs from workspace-history replay. */
|
|
22
|
-
workspaceStateMismatches:string[];
|
|
23
|
-
/** Governed singleton files absent from disk. */
|
|
24
|
-
workspaceStateMissing:string[];
|
|
25
|
-
/** Governed singleton files unreadable as safe workspace-local JSON. */
|
|
26
|
-
workspaceStateUnreadable:string[];
|
|
27
|
-
}
|
|
28
|
-
/** Controls how cached history stream verification is trusted when the file stat tuple still matches a previous scan. */
|
|
29
|
-
export type DriftCacheHitVerification = "content_hash" | "metadata";
|
|
30
|
-
/** Documents the history drift scan options shared by health, validate, and repair callers. */
|
|
31
|
-
export interface DriftScanOptions {
|
|
32
|
-
/** Value that configures or reports cache hit verification for this contract. */
|
|
33
|
-
cacheHitVerification?:DriftCacheHitVerification;
|
|
34
|
-
}
|
|
35
|
-
/** Strictly verify one item using the shared stream verifier without reading or writing the corpus cache or inspecting workspace histories and documents. */
|
|
36
|
-
export declare function scanItemHistoryDrift(pmRoot:string,item:ItemMetadata & {
|
|
37
|
-
body:string;
|
|
38
|
-
}):Promise<DriftScanResult>;
|
|
39
|
-
/**
|
|
40
|
-
* Scan every item's history stream for drift (missing/unreadable streams, broken
|
|
41
|
-
* hash chains, and item/history hash mismatches).
|
|
42
|
-
*
|
|
43
|
-
* Full chain re-verification of a large history tree is the dominant cost of
|
|
44
|
-
* `pm health`. We cache the per-stream verification keyed by the history file's
|
|
45
|
-
* mtime/ctime/size plus content hash. Strict callers keep recomputing the
|
|
46
|
-
* content hash on metadata hits; latency-sensitive health checks can opt into
|
|
47
|
-
* trusting the stat tuple and skip rereading unchanged streams.
|
|
48
|
-
*/
|
|
49
|
-
export declare function scanHistoryDrift(pmRoot:string,items:Array<ItemMetadata & {
|
|
50
|
-
body:string;
|
|
51
|
-
}>,options?:DriftScanOptions):Promise<DriftScanResult>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module core/history/version-address
|
|
3
|
-
* Stable ordinal addressing for streams whose retained prefix is a checkpoint.
|
|
4
|
-
*/
|
|
5
|
-
import type { HistoryEntry } from "../../types/index.js";
|
|
6
|
-
/**
|
|
7
|
-
* Return the number added to physical one-based positions to obtain durable
|
|
8
|
-
* version addresses. Legacy checkpoints cannot prove their original ordinal;
|
|
9
|
-
* refusing them prevents silently selecting a different historical state.
|
|
10
|
-
*/
|
|
11
|
-
export declare function historyVersionOffset(history:readonly HistoryEntry[],allowUnknown:true):number | null;
|
|
12
|
-
/** Resolve a required durable offset, refusing ambiguous legacy checkpoints. */
|
|
13
|
-
export declare function historyVersionOffset(history:readonly HistoryEntry[],allowUnknown?:false):number;
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module core/item/item-type-definition
|
|
3
|
-
*
|
|
4
|
-
* Defines item parsing, formatting, and lifecycle helpers for Item Type Definition.
|
|
5
|
-
*/
|
|
6
|
-
import type { ItemTypeCommandOptionPolicy,ItemTypeDefinition,ItemTypeOptionDefinition } from "../../types/index.js";
|
|
7
|
-
/**
|
|
8
|
-
* Shared, pure normalization for {@link ItemTypeDefinition} objects, single-sourced
|
|
9
|
-
* across the runtime item-type registry and settings persistence (pm-v798).
|
|
10
|
-
*
|
|
11
|
-
* The only genuine difference between the two callers is how a command-option
|
|
12
|
-
* policy's `command` field is resolved:
|
|
13
|
-
* - the runtime registry consumes untrusted extension/file definitions, so it
|
|
14
|
-
* must trim+lowercase and reject anything that is not "create"/"update";
|
|
15
|
-
* - settings persistence operates on already-validated definitions, so it keeps
|
|
16
|
-
* the typed `command` value verbatim.
|
|
17
|
-
*
|
|
18
|
-
* That single difference is injected via {@link NormalizeItemTypeDefinitionOptions.resolvePolicyCommand};
|
|
19
|
-
* everything else (name trim, optional folder, aliases, required_create_* fields,
|
|
20
|
-
* options normalization, policy dedupe key + stable sort) is shared.
|
|
21
|
-
*/
|
|
22
|
-
/** Dedupe + sort a string list: trim, drop blanks, unique, locale-sorted. */
|
|
23
|
-
export declare function normalizeItemTypeStringList(values:string[] | undefined):string[];
|
|
24
|
-
/** Normalize one type-option definition, or null when its key is blank. */
|
|
25
|
-
export declare function normalizeItemTypeOption(option:ItemTypeOptionDefinition):ItemTypeOptionDefinition | null;
|
|
26
|
-
/** Resolves a raw policy `command` value to the canonical "create"/"update" type, or null to drop the policy. Lets each layer plug in its own strictness. */
|
|
27
|
-
export type ResolvePolicyCommand = (command:string) => ItemTypeCommandOptionPolicy["command"] | null;
|
|
28
|
-
/** Pass-through resolver used by settings persistence: the value is already typed "create" | "update" by the settings validator, so it is kept verbatim. */
|
|
29
|
-
export declare const keepPolicyCommand:ResolvePolicyCommand;
|
|
30
|
-
/** Strict resolver used by the runtime registry: trims + lowercases and rejects anything other than "create"/"update". */
|
|
31
|
-
export declare const strictPolicyCommand:ResolvePolicyCommand;
|
|
32
|
-
/** Normalize one command-option policy, or null when invalid (blank option / rejected command). */
|
|
33
|
-
export declare function normalizeItemTypeCommandOptionPolicy(policy:ItemTypeCommandOptionPolicy,resolvePolicyCommand:ResolvePolicyCommand):ItemTypeCommandOptionPolicy | null;
|
|
34
|
-
/** Dedupe by `${command}:${option-lowercased}` and stable-sort by command then option. */
|
|
35
|
-
export declare function normalizeItemTypeCommandOptionPolicies(policies:ItemTypeCommandOptionPolicy[] | undefined,resolvePolicyCommand:ResolvePolicyCommand):ItemTypeCommandOptionPolicy[];
|
|
36
|
-
/** Documents the normalize item type definition options payload exchanged by command, SDK, and package integrations. */
|
|
37
|
-
export interface NormalizeItemTypeDefinitionOptions {
|
|
38
|
-
/** How to resolve a raw policy `command` value (defaults to {@link keepPolicyCommand}). */
|
|
39
|
-
resolvePolicyCommand?:ResolvePolicyCommand;
|
|
40
|
-
}
|
|
41
|
-
/** Validate an execution role before a settings or extension definition enters scheduling. Unknown values fail instead of silently enabling dispatch. */
|
|
42
|
-
export declare function parseItemExecutionRole(value:unknown):ItemTypeDefinition["execution_role"];
|
|
43
|
-
/**
|
|
44
|
-
* Normalize a full {@link ItemTypeDefinition}, returning null when the name is blank.
|
|
45
|
-
*
|
|
46
|
-
* Optional collection fields (`folder`, `aliases`, `required_create_fields`,
|
|
47
|
-
* `required_create_repeatables`, `options`, `command_option_policies`) are only
|
|
48
|
-
* emitted when present on the input (presence-preserving) so the distinction
|
|
49
|
-
* between "unset" and "set-but-empty" survives the round-trip.
|
|
50
|
-
*/
|
|
51
|
-
export declare function normalizeItemTypeDefinition(definition:ItemTypeDefinition,options?:NormalizeItemTypeDefinitionOptions):ItemTypeDefinition | null;
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/** Public contract for toon scalar bracket escape upstream pr, shared by SDK and presentation-layer consumers. */
|
|
2
|
-
export declare const TOON_SCALAR_BRACKET_ESCAPE_UPSTREAM_PR:"https://github.com/toon-format/toon/pull/314";
|
|
3
|
-
/** Historical tracking for the scalar-bracket decoder defect fixed upstream in TOON 2.3.1. */
|
|
4
|
-
export declare const TOON_SCALAR_BRACKET_ESCAPE_TRACKING:{
|
|
5
|
-
readonly dependency:"@toon-format/toon";
|
|
6
|
-
readonly affected_versions:"<=2.3.0";
|
|
7
|
-
readonly resolved_version:"2.3.1";
|
|
8
|
-
readonly upstream_pr:"https://github.com/toon-format/toon/pull/314";
|
|
9
|
-
readonly workaround_status:"removed";
|
|
10
|
-
};
|
|
11
|
-
/** Documents the toon decode result payload exchanged by command, SDK, and package integrations. */
|
|
12
|
-
export interface ToonDecodeResult {
|
|
13
|
-
/** The decoded TOON document. */
|
|
14
|
-
value:unknown;
|
|
15
|
-
/** Always false since TOON 2.3.1 fixed strict scalar-bracket decoding upstream. */
|
|
16
|
-
usedScalarBracketEscape:boolean;
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* Decode a TOON item document with the dependency's strict parser.
|
|
20
|
-
*
|
|
21
|
-
* TOON 2.3.1 resolves the quoted scalar bracket defect previously handled by a
|
|
22
|
-
* local retry. Keeping one strict decode path avoids masking malformed input and
|
|
23
|
-
* records `usedScalarBracketEscape: false` for result-shape compatibility.
|
|
24
|
-
*/
|
|
25
|
-
export declare function decodeToonItemContent(content:string):ToonDecodeResult;
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import { type FileHandle } from "node:fs/promises";
|
|
2
|
-
import { PmCliError } from "../shared/errors.js";
|
|
3
|
-
/** Typed refusal code for a lock path that leaves, or could leave, the tracker. */
|
|
4
|
-
export declare const LOCK_PATH_UNSAFE_CODE = "lock_path_unsafe";
|
|
5
|
-
/**
|
|
6
|
-
* Device and inode identity of a confined lock directory or lock entry, as
|
|
7
|
-
* exact bigints: numeric stats lose precision above Number.MAX_SAFE_INTEGER
|
|
8
|
-
* (64-bit file ids on NTFS, ReFS and some network filesystems), where two
|
|
9
|
-
* distinct entries could compare equal.
|
|
10
|
-
*/
|
|
11
|
-
export interface LockEntryIdentity {
|
|
12
|
-
/** Device that holds the entry. */
|
|
13
|
-
readonly dev:bigint;
|
|
14
|
-
/** Inode of the entry on that device. */
|
|
15
|
-
readonly ino:bigint;
|
|
16
|
-
}
|
|
17
|
-
/** Stable failure classes reported in the `reason` of a lock_path_unsafe refusal. */
|
|
18
|
-
export type LockPathUnsafeReason = "lock_path_outside_tracker" | "lock_directory_symlink" | "lock_directory_not_directory" | "lock_entry_symlink" | "lock_directory_replaced";
|
|
19
|
-
/** Build the typed refusal for a lock path that cannot be proven confined. */
|
|
20
|
-
export declare function buildLockPathUnsafeError(params:{
|
|
21
|
-
pmRoot:string;
|
|
22
|
-
lockPath:string;
|
|
23
|
-
id:string;
|
|
24
|
-
reason:LockPathUnsafeReason;
|
|
25
|
-
component?:string;
|
|
26
|
-
}):PmCliError;
|
|
27
|
-
/**
|
|
28
|
-
* Verify that every path component between the tracker root and the lock's
|
|
29
|
-
* parent directory is a real directory, never a symlink. Returns the parent's
|
|
30
|
-
* identity. A missing component returns null when `allowMissing` (the caller's
|
|
31
|
-
* own creation or absence handling then applies) and otherwise rethrows the
|
|
32
|
-
* native error. The tracker root itself may be a symlink; confinement is
|
|
33
|
-
* relative to it.
|
|
34
|
-
*/
|
|
35
|
-
export declare function inspectConfinedLockDirectory(pmRoot:string,lockPath:string,id:string,allowMissing:false):Promise<LockEntryIdentity>;
|
|
36
|
-
/** Inspect the lock directory, returning null when a component is missing and absence is allowed. */
|
|
37
|
-
export declare function inspectConfinedLockDirectory(pmRoot:string,lockPath:string,id:string,allowMissing?:boolean):Promise<LockEntryIdentity | null>;
|
|
38
|
-
/** Refuse a lock entry that is itself a symlink instead of waiting on it as a peer's lock. */
|
|
39
|
-
export declare function assertLockEntryNotSymlink(pmRoot:string,lockPath:string,id:string):Promise<void>;
|
|
40
|
-
/**
|
|
41
|
-
* Prove that the lock just created through `handle` is the entry at `lockPath`
|
|
42
|
-
* inside the same confined directory observed before creation. A directory
|
|
43
|
-
* swapped between the check and the create means the lock landed elsewhere, so
|
|
44
|
-
* the acquisition refuses with lock_path_unsafe instead of returning a lease
|
|
45
|
-
* that excludes no one. The stray entry is left in place: Node has no
|
|
46
|
-
* descriptor-relative unlink, and a path-based unlink after the identity check
|
|
47
|
-
* could delete a same-name replacement outside the tracker.
|
|
48
|
-
*/
|
|
49
|
-
export declare function verifyConfinedLockCreation(params:{
|
|
50
|
-
pmRoot:string;
|
|
51
|
-
lockPath:string;
|
|
52
|
-
id:string;
|
|
53
|
-
handle:FileHandle;
|
|
54
|
-
directory:LockEntryIdentity;
|
|
55
|
-
}):Promise<void>;
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* lock-gc.ts — Stale lock file garbage collector.
|
|
3
|
-
*
|
|
4
|
-
* Safety-first policy: if a lock file cannot be read or parsed, it is RETAINED
|
|
5
|
-
* rather than deleted. We only remove locks whose staleness can be conclusively
|
|
6
|
-
* determined from the embedded lease or positive same-host owner-death evidence.
|
|
7
|
-
* Deletion is revalidated under the writer cleanup gate.
|
|
8
|
-
*
|
|
9
|
-
* Staleness formula: (now_ms - Date.parse(created_at)) > ttl_seconds * 1000
|
|
10
|
-
* Zero ttl means any lock older than 0 ms is stale. Negative ttl means always stale.
|
|
11
|
-
*/
|
|
12
|
-
/** Documents the stale lock scan entry payload exchanged by command, SDK, and package integrations. */
|
|
13
|
-
export interface StaleLockScanEntry {
|
|
14
|
-
/** e.g. "pm-abc1.lock" */
|
|
15
|
-
file:string;
|
|
16
|
-
/** parsed id, or null if unparseable */
|
|
17
|
-
id:string | null;
|
|
18
|
-
/** Value that configures or reports owner for this contract. */
|
|
19
|
-
owner:string | null;
|
|
20
|
-
/** ISO 8601 timestamp recording when created occurred. */
|
|
21
|
-
created_at:string | null;
|
|
22
|
-
/** Value that configures or reports ttl seconds for this contract. */
|
|
23
|
-
ttl_seconds:number | null;
|
|
24
|
-
/** floor((now - created_at)/1000), null if unparseable */
|
|
25
|
-
age_seconds:number | null;
|
|
26
|
-
/** True only when lease expiry or positive original-owner death is established. */
|
|
27
|
-
stale:boolean;
|
|
28
|
-
/** Value that configures or reports reason for this contract. */
|
|
29
|
-
reason:"expired" | "owner_dead" | "active" | "unparseable";
|
|
30
|
-
/** Verified original-process liveness, when the receipt supports same-host observation. */
|
|
31
|
-
owner_state?:"alive" | "dead" | "unknown";
|
|
32
|
-
/** Valid recorded PID, available for diagnosis without revealing host coordinates. */
|
|
33
|
-
pid?:number;
|
|
34
|
-
}
|
|
35
|
-
/** Documents the lock gc hooks payload exchanged by command, SDK, and package integrations. */
|
|
36
|
-
export interface LockGcHooks {
|
|
37
|
-
/** Value that configures or reports on read for this contract. */
|
|
38
|
-
onRead?:(lockPath:string) => Promise<string[]> | string[];
|
|
39
|
-
/** Value that configures or reports on write for this contract. */
|
|
40
|
-
onWrite?:(lockPath:string) => Promise<string[]> | string[];
|
|
41
|
-
}
|
|
42
|
-
/** Documents the lock gc options payload exchanged by command, SDK, and package integrations. */
|
|
43
|
-
export interface LockGcOptions {
|
|
44
|
-
/** Value that configures or reports dry run for this contract. */
|
|
45
|
-
dryRun:boolean;
|
|
46
|
-
/** epoch ms; defaults to Date.now() — injectable for deterministic tests */
|
|
47
|
-
now?:number;
|
|
48
|
-
/** Value that configures or reports hooks for this contract. */
|
|
49
|
-
hooks?:LockGcHooks;
|
|
50
|
-
}
|
|
51
|
-
/** Documents the lock gc result payload exchanged by command, SDK, and package integrations. */
|
|
52
|
-
export interface LockGcResult {
|
|
53
|
-
/** number of *.lock files examined */
|
|
54
|
-
scanned:number;
|
|
55
|
-
/** relative paths like "locks/pm-abc1.lock" (removed, or would-remove under dryRun) */
|
|
56
|
-
removed:string[];
|
|
57
|
-
/** relative paths retained (active OR unparseable — never delete what we can't reason about) */
|
|
58
|
-
retained:string[];
|
|
59
|
-
/** Value that configures or reports warnings for this contract. */
|
|
60
|
-
warnings:string[];
|
|
61
|
-
/** one per scanned *.lock file, sorted by file name asc */
|
|
62
|
-
entries:StaleLockScanEntry[];
|
|
63
|
-
}
|
|
64
|
-
/** Fine-grained classification outcome for one readable lock file's content. `unparseable_json` and `invalid_timestamp` both surface as the coarse `reason: "unparseable"` on the scan entry (gc retains both), but stay distinct here so callers can emit precise warnings. */
|
|
65
|
-
export type LockClassificationDetail = "active" | "expired" | "owner_dead" | "unparseable_json" | "invalid_timestamp";
|
|
66
|
-
/** Documents the lock content classification payload exchanged by command, SDK, and package integrations. */
|
|
67
|
-
export interface LockContentClassification {
|
|
68
|
-
/** Value that configures or reports detail for this contract. */
|
|
69
|
-
detail:LockClassificationDetail;
|
|
70
|
-
/** Value that configures or reports entry for this contract. */
|
|
71
|
-
entry:StaleLockScanEntry;
|
|
72
|
-
}
|
|
73
|
-
/** Pure TTL classification retained for callers that cannot observe the owner process. Health and GC additionally share conservative same-host liveness observation. */
|
|
74
|
-
export declare function classifyLockContent(file:string,raw:string,nowMs:number):LockContentClassification;
|
|
75
|
-
/** Documents the lock health scan payload exchanged by command, SDK, and package integrations. */
|
|
76
|
-
export interface LockHealthScan {
|
|
77
|
-
/** number of *.lock files examined (ghost files that vanish mid-scan are skipped) */
|
|
78
|
-
scanned:number;
|
|
79
|
-
/** Number of active lock entries represented by this result. */
|
|
80
|
-
active_lock_count:number;
|
|
81
|
-
/** Number of stale lock entries represented by this result. */
|
|
82
|
-
stale_lock_count:number;
|
|
83
|
-
/** Number of unreadable lock entries represented by this result. */
|
|
84
|
-
unreadable_lock_count:number;
|
|
85
|
-
/** invalid JSON, wrong shape, or an unparseable created_at timestamp */
|
|
86
|
-
unparseable_lock_count:number;
|
|
87
|
-
/** At most twenty verified dead-owner receipts for actionable full health diagnosis. */
|
|
88
|
-
owner_dead_lock_samples?:StaleLockScanEntry[];
|
|
89
|
-
}
|
|
90
|
-
/** Read-only locks scan for `pm health`: classifies every lock file with the same policy `pm gc --scope locks` uses but never removes anything. */
|
|
91
|
-
export declare function scanLockHealth(pmRoot:string,now?:number):Promise<LockHealthScan>;
|
|
92
|
-
/** Implements run lock gc for the public runtime surface of this module. */
|
|
93
|
-
export declare function runLockGc(pmRoot:string,options:LockGcOptions):Promise<LockGcResult>;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
/** Controls whether mutation output keeps full changed fields or compact counts. */
|
|
2
|
-
export type ChangedFieldsMode = "full" | "compact";
|
|
3
|
-
/** Documents the mutation projection options payload exchanged by command, SDK, and package integrations. */
|
|
4
|
-
export interface MutationProjectionOptions {
|
|
5
|
-
/** Defaults to "full" (unchanged output). "compact" drops the array, keeping a count. */
|
|
6
|
-
changedFields?:ChangedFieldsMode;
|
|
7
|
-
/** Return the default agent envelope: id, status, changed-field count, and close reason. */
|
|
8
|
-
compactEnvelope?:boolean;
|
|
9
|
-
/** Return only id/status for single-item mutation envelopes. */
|
|
10
|
-
idOnly?:boolean;
|
|
11
|
-
}
|
|
12
|
-
/** Returns a copy of a mutation result with the envelope `changed_fields` arrays replaced by `changed_field_count` when compact mode is requested. Inputs that are not a mutation envelope (or full mode) are returned unchanged (same reference). */
|
|
13
|
-
export declare function projectMutationResult(result:unknown,options?:MutationProjectionOptions):unknown;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Applied-query echo for agent-facing list/search results (pm-rmjy).
|
|
3
|
-
*
|
|
4
|
-
* Narrow MCP tools accept filters nested inside `options: {}`, so an agent has
|
|
5
|
-
* no structured confirmation of which filters were actually applied or which
|
|
6
|
-
* projection mode resolved. `withQuerySummary` attaches a small `query_summary`
|
|
7
|
-
* block ({ filters, projection }) to the result so the feedback loop closes
|
|
8
|
-
* without the agent re-echoing its inputs.
|
|
9
|
-
*/
|
|
10
|
-
/** Compact echo of filters and projection mode applied to list/search responses. */
|
|
11
|
-
export interface QuerySummary {
|
|
12
|
-
/** Value that configures or reports filters for this contract. */
|
|
13
|
-
filters:Record<string,unknown>;
|
|
14
|
-
/** Value that configures or reports projection for this contract. */
|
|
15
|
-
projection:string;
|
|
16
|
-
}
|
|
17
|
-
/** Resolve the projection label implied by list/search projection options. Used when the result payload itself carries no projection metadata (the compact summary paths omit it for token efficiency). */
|
|
18
|
-
export declare function resolveQueryProjectionLabel(options:Record<string,unknown>):string;
|
|
19
|
-
/**
|
|
20
|
-
* Attach a `query_summary` to a list/search result.
|
|
21
|
-
*
|
|
22
|
-
* `brief` is the most specific requested label, so it wins outright (the list
|
|
23
|
-
* command reports brief as projection mode "compact" with narrowed fields).
|
|
24
|
-
* Otherwise the result's own `projection.mode` states the resolved mode for
|
|
25
|
-
* verbose payloads, and the options-derived label covers the compact summary
|
|
26
|
-
* paths that omit projection metadata.
|
|
27
|
-
*/
|
|
28
|
-
export declare function withQuerySummary<T extends Record<string,unknown>>(result:T,options:Record<string,unknown>):T & {
|
|
29
|
-
query_summary:QuerySummary;
|
|
30
|
-
};
|