@unbrained/pm-cli 2026.10.4 → 2026.10.5
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 +2 -2
- package/CHANGELOG.md +11 -0
- package/dist/cli/after-command-context-usage.js +1 -1
- package/dist/cli/argv-utils.js +1 -1
- package/dist/cli/bootstrap-args.js +1 -1
- package/dist/cli/bundle-integrity.js +2 -2
- package/dist/cli/command-namespaces.js +1 -1
- package/dist/cli/commander-usage.d.ts +1 -1
- package/dist/cli/commander-usage.js +7 -4
- package/dist/cli/commands/annotations/comments.js +1 -1
- package/dist/cli/commands/annotations/docs.js +1 -1
- package/dist/cli/commands/annotations/files.js +1 -1
- package/dist/cli/commands/annotations/learnings.js +1 -1
- package/dist/cli/commands/annotations/notes.js +1 -1
- package/dist/cli/commands/extension/describe.js +1 -1
- package/dist/cli/commands/extension/extension.js +1 -1
- package/dist/cli/commands/extension/scaffold.js +1 -1
- package/dist/cli/commands/extension/shared.js +1 -1
- package/dist/cli/commands/governance/gc.js +1 -1
- package/dist/cli/commands/governance/health.js +1 -1
- package/dist/cli/commands/governance/telemetry.js +1 -1
- package/dist/cli/commands/governance/validate.js +1 -1
- package/dist/cli/commands/history/activity.js +1 -1
- package/dist/cli/commands/history/history-compact.js +1 -1
- package/dist/cli/commands/history/history-redact.js +1 -1
- package/dist/cli/commands/history/history-repair.js +1 -1
- package/dist/cli/commands/history/history.js +1 -1
- package/dist/cli/commands/history/restore.js +1 -1
- package/dist/cli/commands/lifecycle/append.js +1 -1
- package/dist/cli/commands/lifecycle/claim.js +1 -1
- package/dist/cli/commands/lifecycle/close-many.js +1 -1
- package/dist/cli/commands/lifecycle/close.js +1 -1
- package/dist/cli/commands/lifecycle/copy.js +1 -1
- package/dist/cli/commands/lifecycle/create.js +1 -1
- package/dist/cli/commands/lifecycle/delete.js +1 -1
- package/dist/cli/commands/lifecycle/focus.js +1 -1
- package/dist/cli/commands/lifecycle/plan.js +1 -1
- package/dist/cli/commands/lifecycle/update-many.js +1 -1
- package/dist/cli/commands/lifecycle/update.js +1 -1
- package/dist/cli/commands/query/aggregate.js +1 -1
- package/dist/cli/commands/query/context.js +1 -1
- package/dist/cli/commands/query/deps.js +1 -1
- package/dist/cli/commands/query/duplicates.js +1 -1
- package/dist/cli/commands/query/eval.js +1 -1
- package/dist/cli/commands/query/get.js +1 -1
- package/dist/cli/commands/query/graph.js +1 -1
- package/dist/cli/commands/query/list.js +1 -1
- package/dist/cli/commands/query/next.js +1 -1
- package/dist/cli/commands/query/search.js +1 -1
- package/dist/cli/commands/query/stats.js +1 -1
- package/dist/cli/commands/test/test-all.js +1 -1
- package/dist/cli/commands/test/test-runs.js +1 -1
- package/dist/cli/commands/test/test.js +1 -1
- package/dist/cli/commands/workspace/config.js +1 -1
- package/dist/cli/commands/workspace/contracts.js +1 -1
- package/dist/cli/commands/workspace/init.js +1 -1
- package/dist/cli/commands/workspace/merge.js +1 -1
- package/dist/cli/commands/workspace/profile.js +1 -1
- package/dist/cli/commands/workspace/schema.js +1 -1
- package/dist/cli/commands/workspace/upgrade.js +1 -1
- package/dist/cli/context-intent-invocation.js +1 -1
- package/dist/cli/description-stdin.js +1 -1
- package/dist/cli/error-guidance.js +3 -1
- package/dist/cli/extension-command-help.js +5 -3
- package/dist/cli/extension-command-options.js +1 -1
- package/dist/cli/extension-recovery.js +1 -1
- package/dist/cli/help-content.js +5 -2
- package/dist/cli/help-json-payload.js +6 -3
- package/dist/cli/invocation-profile.js +2 -2
- package/dist/cli/main.js +5 -5
- package/dist/cli/migration-gates.js +1 -1
- package/dist/cli/option-values.js +1 -1
- package/dist/cli/public.js +1 -1
- package/dist/cli/register-annotations.js +1 -1
- package/dist/cli/register-assurance.js +1 -1
- package/dist/cli/register-files-lookup.js +1 -1
- package/dist/cli/register-history-activity.js +1 -1
- package/dist/cli/register-history-author.js +1 -1
- package/dist/cli/register-history-maintenance.js +2 -2
- package/dist/cli/register-list-query.js +10 -10
- package/dist/cli/register-mutation-options.js +1 -1
- package/dist/cli/register-mutation.js +2 -2
- package/dist/cli/register-operations.js +1 -1
- package/dist/cli/register-setup.js +1 -1
- package/dist/cli/register-structured-mutation.js +1 -1
- package/dist/cli/registration-helpers.js +1 -1
- package/dist/cli/runtime/activation.js +1 -1
- package/dist/cli/runtime/invocation-options.js +1 -1
- package/dist/cli/runtime/projection-retry.js +1 -1
- package/dist/cli/runtime/selection.js +1 -1
- package/dist/cli/runtime/telemetry-outcome.js +1 -1
- package/dist/cli/runtime-compatibility-boundary.js +4 -4
- package/dist/cli/schema/registration.js +2 -2
- package/dist/cli/schema-registration-helpers.js +1 -1
- package/dist/cli/search-refresh.js +1 -1
- package/dist/cli/stats-analytics-json.js +1 -1
- package/dist/cli/telemetry-flush.js +1 -1
- package/dist/cli-bundle/bundle-manifest.json +163 -163
- package/dist/cli-bundle/chunks/chunk-3CYOBJUK.js +3 -0
- package/dist/cli-bundle/chunks/chunk-5MNOWZPN.js +3 -0
- package/dist/cli-bundle/chunks/chunk-AJ7H6XUF.js +20 -0
- package/dist/cli-bundle/chunks/chunk-D332RXZ7.js +80 -0
- package/dist/cli-bundle/chunks/chunk-HRJ6G6ZG.js +31 -0
- package/dist/cli-bundle/chunks/chunk-KRVI56QE.js +6 -0
- package/dist/cli-bundle/chunks/chunk-N4YGSG6F.js +238 -0
- package/dist/cli-bundle/chunks/{chunk-7CE2DJMA.js → chunk-OOLYASYJ.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-R7CG2DB7.js +2 -0
- package/dist/cli-bundle/chunks/chunk-TGMONGWX.js +2 -0
- package/dist/cli-bundle/chunks/chunk-UZ7BIUCI.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-GZMWISWW.js → chunk-VZ63DEVJ.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-WFZ4UEOB.js +2 -0
- package/dist/cli-bundle/chunks/chunk-YVBRASXO.js +8 -0
- package/dist/cli-bundle/chunks/{chunk-SMKHR6BM.js → chunk-Z66DWDAU.js} +87 -87
- package/dist/cli-bundle/chunks/{register-list-query-QBGXO5JJ.js → register-list-query-75QXHIFH.js} +11 -11
- package/dist/cli-bundle/chunks/register-mutation-YS54SCHG.js +20 -0
- package/dist/cli-bundle/chunks/register-operations-6KHZQSYJ.js +2 -0
- package/dist/cli-bundle/chunks/register-setup-RTATEN2M.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-Q6DJ5DFQ.js → chunk-2CVX3KR3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-5C3IDDW7.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-467EW5RL.js → chunk-ABV67XCC.js} +3 -3
- package/dist/cli-bundle/focused-chunks/chunk-B5RSLVE6.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-C224METM.js +20 -0
- package/dist/cli-bundle/focused-chunks/chunk-CLDPTMQY.js +6 -0
- package/dist/cli-bundle/focused-chunks/chunk-DDRN42PB.js +8 -0
- package/dist/cli-bundle/focused-chunks/{chunk-7O4NUJVO.js → chunk-DOVTUKJQ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-ECBOPEJE.js +75 -0
- package/dist/cli-bundle/focused-chunks/chunk-GITOYRUW.js +165 -0
- package/dist/cli-bundle/focused-chunks/chunk-GUIF3WVC.js +30 -0
- package/dist/cli-bundle/focused-chunks/chunk-LE4JUCRR.js +3 -0
- package/dist/cli-bundle/focused-chunks/{chunk-HFAW3FJQ.js → chunk-PSXFFQFT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-RHIH6XIW.js +12 -0
- package/dist/cli-bundle/focused-chunks/chunk-UDYRVBOZ.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-XV5RV4ZT.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-JCVMOSWQ.js → chunk-YMU42COG.js} +2 -2
- package/dist/cli-bundle/main.js +27 -27
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +2 -2
- package/dist/cli-bundle/sdk-core.js +32 -32
- 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 +55 -55
- 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 +10 -10
- package/dist/cli.js +1 -1
- package/dist/core/checkpoint/checkpoint-gc.js +1 -1
- package/dist/core/checkpoint/mutation-checkpoint.js +2 -2
- package/dist/core/config/nested-settings.js +1 -1
- package/dist/core/config/positional-value.js +1 -1
- package/dist/core/diagnostics/remediation.js +1 -1
- package/dist/core/extensions/activation-summary-markdown.js +2 -1
- package/dist/core/extensions/activation-summary.js +1 -1
- package/dist/core/extensions/activation-transaction.js +1 -1
- package/dist/core/extensions/capability-usage.js +1 -1
- package/dist/core/extensions/command-hook-context.js +1 -1
- package/dist/core/extensions/command-metadata-contract.js +1 -1
- package/dist/core/extensions/command-visibility-tier.js +1 -1
- package/dist/core/extensions/contribution-inventory.js +1 -1
- package/dist/core/extensions/exporter-output-contract.js +1 -1
- package/dist/core/extensions/extension-candidate.js +1 -1
- package/dist/core/extensions/extension-capability-aliases.js +1 -1
- package/dist/core/extensions/extension-hook-runtime.js +1 -1
- package/dist/core/extensions/extension-policy.js +1 -1
- package/dist/core/extensions/extension-registries.js +1 -1
- package/dist/core/extensions/extension-runtime-helpers.js +1 -1
- package/dist/core/extensions/extension-types.js +1 -1
- package/dist/core/extensions/flag-definition-validation.js +1 -1
- package/dist/core/extensions/flag-value-types.js +1 -1
- package/dist/core/extensions/index.js +1 -1
- package/dist/core/extensions/item-field-types.js +1 -1
- package/dist/core/extensions/item-fields.js +1 -1
- package/dist/core/extensions/loader.js +1 -1
- package/dist/core/extensions/manifest-parser.js +1 -1
- package/dist/core/extensions/manifest-schema.js +1 -1
- package/dist/core/extensions/module-graph-snapshot.js +1 -1
- package/dist/core/extensions/preflight-ownership.js +1 -1
- package/dist/core/extensions/registration-contracts.js +1 -1
- package/dist/core/extensions/registration-validation.js +1 -1
- package/dist/core/extensions/registration-values.js +1 -1
- package/dist/core/extensions/reserved-host-flags.js +1 -1
- package/dist/core/extensions/runtime-registrations.js +1 -1
- package/dist/core/extensions/service-ownership.js +1 -1
- package/dist/core/extensions/version-compat.js +1 -1
- package/dist/core/fs/atomic-create.js +1 -1
- package/dist/core/fs/fs-utils.js +2 -2
- package/dist/core/fs/host-environment-errors.js +1 -1
- package/dist/core/fs/index.js +1 -1
- package/dist/core/fs/path-utils.js +1 -1
- package/dist/core/governance/content-fields.js +1 -1
- package/dist/core/governance/issue-codes.js +1 -1
- package/dist/core/governance/metadata-coverage.js +1 -1
- package/dist/core/history/digest.js +1 -1
- package/dist/core/history/drift-cache.js +3 -3
- package/dist/core/history/drift-scan.d.ts +4 -0
- package/dist/core/history/drift-scan.js +1 -1
- package/dist/core/history/event-classification.js +1 -1
- package/dist/core/history/event-index.js +8 -7
- package/dist/core/history/history-compact-bulk.js +1 -1
- package/dist/core/history/history-diff.js +1 -1
- package/dist/core/history/history-rewrite.js +1 -1
- package/dist/core/history/history-storage-stats.js +1 -1
- package/dist/core/history/history-stream-policy.js +1 -1
- package/dist/core/history/history.js +2 -2
- package/dist/core/history/identity.js +1 -1
- package/dist/core/history/index.js +1 -1
- package/dist/core/history/operation-contract.js +1 -1
- package/dist/core/history/projection.js +1 -1
- package/dist/core/history/read.js +1 -1
- package/dist/core/history/replay.js +2 -1
- package/dist/core/history/tombstone.js +1 -1
- package/dist/core/history/version-address.js +1 -1
- package/dist/core/history/workspace-history.js +2 -2
- package/dist/core/io/body-file.js +1 -1
- package/dist/core/io/bulk-ids-input.js +2 -1
- package/dist/core/item/actionability.js +1 -1
- package/dist/core/item/dependency-reference.js +1 -1
- package/dist/core/item/id.js +1 -1
- package/dist/core/item/index.js +1 -1
- package/dist/core/item/item-format-version.js +1 -1
- package/dist/core/item/item-format.js +6 -4
- package/dist/core/item/item-record.js +1 -1
- package/dist/core/item/item-type-definition.js +1 -1
- package/dist/core/item/parent-reference-policy.js +1 -1
- package/dist/core/item/parse.js +8 -2
- package/dist/core/item/plan-lifecycle.js +1 -1
- package/dist/core/item/priority.js +1 -1
- package/dist/core/item/sprint-release-format.js +1 -1
- package/dist/core/item/status-filter.js +1 -1
- package/dist/core/item/status.js +1 -1
- package/dist/core/item/toon-decode.js +1 -1
- package/dist/core/item/type-registry.js +1 -1
- package/dist/core/item/type-synonyms.js +1 -1
- package/dist/core/lock/index.js +1 -1
- package/dist/core/lock/lock-gc.js +1 -1
- package/dist/core/lock/lock.js +3 -3
- package/dist/core/output/mutation-projection.js +1 -1
- package/dist/core/output/output-control.js +1 -1
- package/dist/core/output/output.js +22 -10
- package/dist/core/output/query-summary.js +1 -1
- package/dist/core/output/tabular.js +3 -1
- package/dist/core/packages/manifest.js +1 -1
- package/dist/core/packages/root.js +1 -1
- package/dist/core/policy/workflow-policy-schema.js +1 -1
- package/dist/core/policy/workflow-policy-store.js +1 -1
- package/dist/core/policy/workflow-policy.js +1 -1
- package/dist/core/profile/profile-describe.js +1 -1
- package/dist/core/profile/profile-lint.js +1 -1
- package/dist/core/profile/profile-plan.js +1 -1
- package/dist/core/profile/profile-presets.js +25 -1
- package/dist/core/reproducibility/context.js +1 -1
- package/dist/core/schema/fields-file.js +2 -2
- package/dist/core/schema/item-types-file.js +2 -2
- package/dist/core/schema/runtime-field-filters.js +1 -1
- package/dist/core/schema/runtime-field-values.js +1 -1
- package/dist/core/schema/runtime-schema.js +2 -2
- package/dist/core/schema/status-defs-file.js +2 -2
- package/dist/core/schema/status-token.js +1 -1
- package/dist/core/schema/type-inference.js +1 -1
- package/dist/core/schema/type-presets.js +1 -1
- package/dist/core/schema/type-workflows.js +1 -1
- package/dist/core/search/background-refresh.js +2 -2
- package/dist/core/search/bm25.js +1 -1
- package/dist/core/search/cache.js +2 -2
- package/dist/core/search/corpus.js +1 -1
- package/dist/core/search/embedding-batches.js +1 -1
- package/dist/core/search/eval-thresholds.js +1 -1
- package/dist/core/search/eval.js +1 -1
- package/dist/core/search/http-client.js +1 -1
- package/dist/core/search/providers.js +1 -1
- package/dist/core/search/relevance.js +1 -1
- package/dist/core/search/semantic-defaults.js +1 -1
- package/dist/core/search/staleness.js +1 -1
- package/dist/core/search/vector-stores.js +2 -2
- package/dist/core/search/vectorization-metadata.js +1 -1
- package/dist/core/sentry/helpers.js +1 -1
- package/dist/core/sentry/instrument.js +1 -1
- package/dist/core/session/session-state.js +1 -1
- package/dist/core/shared/agent-session-context.js +1 -1
- package/dist/core/shared/author.js +5 -1
- package/dist/core/shared/command-line.js +1 -1
- package/dist/core/shared/command-types.js +1 -1
- package/dist/core/shared/conflict-markers.js +1 -1
- package/dist/core/shared/constants.js +1 -1
- package/dist/core/shared/errors.js +1 -1
- package/dist/core/shared/html-entity-decode.js +1 -1
- package/dist/core/shared/index.js +1 -1
- package/dist/core/shared/item-metadata-contract.js +1 -1
- package/dist/core/shared/lazy-module.js +1 -1
- package/dist/core/shared/levenshtein.js +1 -1
- package/dist/core/shared/memo.js +1 -1
- package/dist/core/shared/numeric-parsers.js +1 -1
- package/dist/core/shared/option-alias-visibility.js +1 -1
- package/dist/core/shared/primitives.js +1 -1
- package/dist/core/shared/secret-rules.js +1 -1
- package/dist/core/shared/serial-queue.js +1 -1
- package/dist/core/shared/serialization.js +1 -1
- package/dist/core/shared/split-comma-list.js +1 -1
- package/dist/core/shared/text-normalization.js +1 -1
- package/dist/core/shared/time.js +2 -1
- package/dist/core/store/index.js +1 -1
- package/dist/core/store/item-format-migration.js +1 -1
- package/dist/core/store/item-metadata-cache.js +1 -1
- package/dist/core/store/item-metadata-query-index.js +7 -7
- package/dist/core/store/item-metadata-read-work.js +1 -1
- package/dist/core/store/item-store.js +1 -1
- package/dist/core/store/paths.js +1 -1
- package/dist/core/store/settings-concurrency.js +1 -1
- package/dist/core/store/settings-read-cache.js +1 -1
- package/dist/core/store/settings-validator.js +1 -1
- package/dist/core/store/settings.js +3 -3
- package/dist/core/store/tracker-preflight.js +1 -1
- package/dist/core/telemetry/consent.js +2 -2
- package/dist/core/telemetry/observability.js +1 -1
- package/dist/core/telemetry/policy.js +1 -1
- package/dist/core/telemetry/read-sampling.js +2 -2
- package/dist/core/telemetry/runtime.js +9 -5
- package/dist/core/test/background-runs.js +3 -3
- package/dist/core/test/item-test-run-tracking.js +1 -1
- package/dist/core/test/run-selectors.js +1 -1
- package/dist/core/validate/estimate-defaults.js +1 -1
- package/dist/core/validate/fix-planning.js +1 -1
- package/dist/core/validate/linked-artifact-reference.js +1 -1
- package/dist/core/validate/missing-by-type.js +1 -1
- package/dist/core/validate/missing-link-owners.js +1 -1
- package/dist/core/validate/stale-file-classification.js +1 -1
- package/dist/mcp/http-server.js +6 -4
- package/dist/mcp/legacy-adapter.js +1 -1
- package/dist/mcp/runtime-capabilities.js +1 -1
- package/dist/mcp/server.js +4 -4
- package/dist/mcp/tool-definitions.js +1 -1
- package/dist/sdk/actionability.js +1 -1
- package/dist/sdk/agent/closed-domain-contracts.js +1 -1
- package/dist/sdk/agent/command-recovery.js +1 -1
- package/dist/sdk/agent/command-suggestions.js +1 -1
- package/dist/sdk/agent/create-option-policy.js +1 -1
- package/dist/sdk/agent/identity-config.js +1 -1
- package/dist/sdk/agent/item-addressing.js +1 -1
- package/dist/sdk/agent/refusal-closure-census.js +2 -1
- package/dist/sdk/agent/refusal-closure.js +1 -1
- package/dist/sdk/agent/refusal-corpus-contracts.js +1 -1
- package/dist/sdk/agent/refusal-reachability.js +3 -1
- package/dist/sdk/agent/subcommand-recovery.js +1 -1
- package/dist/sdk/agent/task-transcript-contracts.js +1 -1
- package/dist/sdk/agent/tracker-preflight-contracts.js +1 -1
- package/dist/sdk/agent-capability-contracts.js +3 -1
- package/dist/sdk/agent-session-context.js +1 -1
- package/dist/sdk/annotations.js +1 -1
- package/dist/sdk/author-attribution.js +1 -1
- package/dist/sdk/authoring.js +1 -1
- package/dist/sdk/cli-bootstrap.js +1 -1
- package/dist/sdk/cli-contracts/agent-output-contracts.js +5 -3
- package/dist/sdk/cli-contracts/bootstrap-command-scanner.js +1 -1
- package/dist/sdk/cli-contracts/command-aliases.js +1 -1
- package/dist/sdk/cli-contracts/command-exit-contracts.js +1 -1
- package/dist/sdk/cli-contracts/commander-mutation-options.js +1 -1
- package/dist/sdk/cli-contracts/commander-types.js +1 -1
- package/dist/sdk/cli-contracts/completeness.js +1 -1
- package/dist/sdk/cli-contracts/enum-contracts.js +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +1 -1
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +2 -1
- package/dist/sdk/cli-contracts/grammar-contracts.js +1 -1
- package/dist/sdk/cli-contracts/registration-helpers.js +7 -7
- package/dist/sdk/cli-contracts/runtime-contracts.js +1 -1
- package/dist/sdk/cli-contracts/schemas/assurance-definition.js +1 -1
- package/dist/sdk/cli-contracts/string-lists.js +1 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +1 -1
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +1 -1
- package/dist/sdk/cli-contracts/typed-action-inputs.js +1 -1
- package/dist/sdk/cli-contracts.js +1 -1
- package/dist/sdk/cli-program.js +1 -1
- package/dist/sdk/command-line.js +1 -1
- package/dist/sdk/comments.js +1 -1
- package/dist/sdk/compile-cache.js +1 -1
- package/dist/sdk/completion/bash.js +2 -1
- package/dist/sdk/completion/fish.js +13 -7
- package/dist/sdk/completion/shared.js +1 -1
- package/dist/sdk/completion/zsh.js +14 -8
- package/dist/sdk/completion.js +1 -1
- package/dist/sdk/compose.js +1 -1
- package/dist/sdk/config.js +1 -1
- package/dist/sdk/context/recency.js +1 -1
- package/dist/sdk/context/semantic-session-attribution.js +1 -1
- package/dist/sdk/context/usage-egress.js +1 -1
- package/dist/sdk/context/usage-ledger.js +6 -3
- package/dist/sdk/context-intent-contracts.js +1 -1
- package/dist/sdk/context-intent-runtime.js +1 -1
- package/dist/sdk/context-packing.js +1 -1
- package/dist/sdk/context-relevance.js +1 -1
- package/dist/sdk/context-signal-store.js +2 -2
- package/dist/sdk/context-usage.js +1 -1
- package/dist/sdk/contracts.js +1 -1
- package/dist/sdk/core-governance.js +1 -1
- package/dist/sdk/core.js +1 -1
- package/dist/sdk/corpus-shape.js +1 -1
- package/dist/sdk/define.js +1 -1
- package/dist/sdk/dependencies.js +1 -1
- package/dist/sdk/dependency-flag-validation.js +1 -1
- package/dist/sdk/dependency-provenance.js +1 -1
- package/dist/sdk/docs.js +1 -1
- package/dist/sdk/duplicates.js +1 -1
- package/dist/sdk/environment/agent-environment.js +1 -1
- package/dist/sdk/environment/host-environment-errors.js +1 -1
- package/dist/sdk/environment/project-runtime-compatibility.js +2 -1
- package/dist/sdk/environment/source-context.js +1 -1
- package/dist/sdk/environment/tracker-preflight.js +1 -1
- package/dist/sdk/error-code-catalog.js +1 -1
- package/dist/sdk/error-runtime.js +1 -1
- package/dist/sdk/errors.js +1 -1
- package/dist/sdk/eval.js +1 -1
- package/dist/sdk/extension/author-manifest.js +1 -1
- package/dist/sdk/extension/bundled-catalog.js +1 -1
- package/dist/sdk/extension/concurrency.js +1 -1
- package/dist/sdk/extension/copy-scope.js +1 -1
- package/dist/sdk/extension/custom-field-collisions.js +1 -1
- package/dist/sdk/extension/describe.js +4 -2
- package/dist/sdk/extension/doctor.js +1 -1
- package/dist/sdk/extension/install-plan.js +1 -1
- package/dist/sdk/extension/install-receipts.js +1 -1
- package/dist/sdk/extension/install-runtime.js +3 -3
- package/dist/sdk/extension/install-snapshot.js +1 -1
- package/dist/sdk/extension/install-sources.js +5 -5
- package/dist/sdk/extension/managed-state.js +2 -2
- package/dist/sdk/extension/migrations.js +2 -2
- package/dist/sdk/extension/output-ownership.js +1 -1
- package/dist/sdk/extension/runtime-summary.js +1 -1
- package/dist/sdk/extension/scaffold.js +11 -4
- package/dist/sdk/extension/shared.js +1 -1
- package/dist/sdk/extension/source-resolution.js +1 -1
- package/dist/sdk/extension/static-inventory.js +1 -1
- package/dist/sdk/extension/update-check.js +1 -1
- package/dist/sdk/extension-command-context.js +1 -1
- package/dist/sdk/extension-contracts.js +1 -1
- package/dist/sdk/extension.js +1 -1
- package/dist/sdk/files.js +1 -1
- package/dist/sdk/flag-invocation-contracts.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +1 -1
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +1 -1
- package/dist/sdk/generated-error-code-catalog.js +1 -1
- package/dist/sdk/governance/assurance-action-contracts.js +1 -1
- package/dist/sdk/governance/assurance-action.js +1 -1
- package/dist/sdk/governance/assurance-limits.js +1 -1
- package/dist/sdk/governance/assurance-mutation-error.js +1 -1
- package/dist/sdk/governance/assurance-presets.js +1 -1
- package/dist/sdk/governance/assurance-runtime.js +1 -1
- package/dist/sdk/governance/assurance.js +4 -4
- package/dist/sdk/governance/boundary-fixtures.js +1 -1
- package/dist/sdk/governance/closure-timestamps.js +1 -1
- package/dist/sdk/governance/coverage-assurance.js +1 -1
- package/dist/sdk/governance/defect-recurrence-coverage.js +1 -1
- package/dist/sdk/governance/defect-recurrence-graph.js +1 -1
- package/dist/sdk/governance/defect-recurrence-signals.js +1 -1
- package/dist/sdk/governance/defect-recurrence.js +1 -1
- package/dist/sdk/governance/extension-host-version.js +1 -1
- package/dist/sdk/governance/gc.js +1 -1
- package/dist/sdk/governance/health-merge-evidence.js +1 -1
- package/dist/sdk/governance/health.js +2 -1
- package/dist/sdk/governance/hierarchy-validation.js +1 -1
- package/dist/sdk/governance/linked-file-report.js +1 -1
- package/dist/sdk/governance/merge-receipt-history.js +1 -1
- package/dist/sdk/governance/provenance-health.js +4 -1
- package/dist/sdk/governance/reindex.js +5 -4
- package/dist/sdk/governance/stale-work.js +1 -1
- package/dist/sdk/governance/status-role-diagnostics.js +1 -1
- package/dist/sdk/governance/storage-integrity.js +1 -1
- package/dist/sdk/governance/tracked-runtime-cache.js +1 -1
- package/dist/sdk/governance/upgrade.js +2 -2
- package/dist/sdk/governance/validate-history-drift.js +1 -1
- package/dist/sdk/governance/validate-item-reader.js +1 -1
- package/dist/sdk/governance/validate-normalization.js +1 -1
- package/dist/sdk/governance/validate.js +1 -1
- package/dist/sdk/governance/workflow-completeness.js +1 -1
- package/dist/sdk/governance/workflow-policy.js +3 -3
- package/dist/sdk/governance/workspace-position.js +2 -1
- package/dist/sdk/governance.js +1 -1
- package/dist/sdk/graph/adapter.js +1 -1
- package/dist/sdk/graph/analytics.js +1 -1
- package/dist/sdk/graph/assembly.js +1 -1
- package/dist/sdk/graph/cache.js +1 -1
- package/dist/sdk/graph/centrality.js +1 -1
- package/dist/sdk/graph/conformance.js +1 -1
- package/dist/sdk/graph/deadline-scheduling.js +1 -1
- package/dist/sdk/graph/durable-cache.js +1 -1
- package/dist/sdk/graph/governance-contracts.js +1 -1
- package/dist/sdk/graph/governance.js +1 -1
- package/dist/sdk/graph/hierarchy-integrity.js +1 -1
- package/dist/sdk/graph/index.js +1 -1
- package/dist/sdk/graph/lifecycle-coverage.js +1 -1
- package/dist/sdk/graph/mutation-advisory.js +1 -1
- package/dist/sdk/graph/query-contracts.js +1 -1
- package/dist/sdk/graph/remediation.js +1 -1
- package/dist/sdk/graph/run.js +1 -1
- package/dist/sdk/graph/scheduling.js +1 -1
- package/dist/sdk/graph/traversal.js +1 -1
- package/dist/sdk/graph/workspace-relationship-kind-registry.js +1 -1
- package/dist/sdk/graph.js +1 -1
- package/dist/sdk/guide-topics.js +1 -1
- package/dist/sdk/guide.js +8 -1
- package/dist/sdk/history/attestation-command.js +1 -1
- package/dist/sdk/history/attestation-contract.js +1 -1
- package/dist/sdk/history/attestation-scan.js +1 -1
- package/dist/sdk/history/attestation.js +1 -1
- package/dist/sdk/history/maintenance.js +1 -1
- package/dist/sdk/history/salvage.js +3 -2
- package/dist/sdk/history/subject.js +1 -1
- package/dist/sdk/history-analytics.js +1 -1
- package/dist/sdk/history-compact.js +1 -1
- package/dist/sdk/history-mcp.js +1 -1
- package/dist/sdk/history-provenance.js +1 -1
- package/dist/sdk/history-read.js +1 -1
- package/dist/sdk/history-redact.js +1 -1
- package/dist/sdk/history-repair.js +1 -1
- package/dist/sdk/improvement-ledger-validation.js +1 -1
- package/dist/sdk/improvement-ledger.js +2 -2
- package/dist/sdk/index.js +1 -1
- package/dist/sdk/init-agent-guidance.js +16 -2
- package/dist/sdk/init.js +16 -2
- package/dist/sdk/invocation-author.js +1 -1
- package/dist/sdk/item-children.js +1 -1
- package/dist/sdk/item-metadata-index.js +1 -1
- package/dist/sdk/item-schedule.js +1 -1
- package/dist/sdk/item-transaction.js +1 -1
- package/dist/sdk/learnings.js +1 -1
- package/dist/sdk/lifecycle/append.js +4 -2
- package/dist/sdk/lifecycle/claim.js +1 -1
- package/dist/sdk/lifecycle/close-many.js +1 -1
- package/dist/sdk/lifecycle/close.js +1 -1
- package/dist/sdk/lifecycle/copy.js +1 -1
- package/dist/sdk/lifecycle/create.js +1 -1
- package/dist/sdk/lifecycle/delete.js +1 -1
- package/dist/sdk/lifecycle/event-validation-messages.js +1 -1
- package/dist/sdk/lifecycle/focus.js +1 -1
- package/dist/sdk/lifecycle/hierarchy-mutation-lock.js +1 -1
- package/dist/sdk/lifecycle/legacy-none-tokens.js +1 -1
- package/dist/sdk/lifecycle/lifecycle-transitions.js +1 -1
- package/dist/sdk/lifecycle/mcp-actions.js +1 -1
- package/dist/sdk/lifecycle/metadata-normalizers.js +1 -1
- package/dist/sdk/lifecycle/mutation-command-options.js +1 -1
- package/dist/sdk/lifecycle/plan-mutation-receipt.js +1 -1
- package/dist/sdk/lifecycle/plan.js +1 -1
- package/dist/sdk/lifecycle/recurrence-parsers.js +1 -1
- package/dist/sdk/lifecycle/reopen.js +1 -1
- package/dist/sdk/lifecycle/repeatable-metadata-parsers.js +2 -1
- package/dist/sdk/lifecycle/restore.js +1 -1
- package/dist/sdk/lifecycle/shared-unset-fields.js +1 -1
- package/dist/sdk/lifecycle/task-composition.js +1 -1
- package/dist/sdk/lifecycle/update-many.js +1 -1
- package/dist/sdk/lifecycle/update.js +2 -1
- package/dist/sdk/lifecycle-completion.js +1 -1
- package/dist/sdk/lifecycle-policy.js +1 -1
- package/dist/sdk/linked-artifacts.js +2 -1
- package/dist/sdk/mcp/apps.js +1 -1
- package/dist/sdk/mcp/authorization.js +1 -1
- package/dist/sdk/mcp/discovery.js +1 -1
- package/dist/sdk/mcp/interactions.js +1 -1
- package/dist/sdk/mcp/protocol.js +1 -1
- package/dist/sdk/mcp/skills.js +3 -1
- package/dist/sdk/mcp/subscriptions.js +1 -1
- package/dist/sdk/mcp/tasks.js +2 -2
- package/dist/sdk/mcp/transport.js +1 -1
- package/dist/sdk/merge/abandoned-receipts.js +1 -1
- package/dist/sdk/merge/driver.js +1 -1
- package/dist/sdk/merge/index.js +1 -1
- package/dist/sdk/merge/install.js +4 -2
- package/dist/sdk/merge/receipt-file-boundary.js +1 -1
- package/dist/sdk/merge/receipt-operation.js +1 -1
- package/dist/sdk/merge/receipt-schema.js +1 -1
- package/dist/sdk/merge/receipts.js +4 -4
- package/dist/sdk/merge/reconcile.js +1 -1
- package/dist/sdk/merge/three-way.js +3 -2
- package/dist/sdk/merge/worktree-config.js +1 -1
- package/dist/sdk/merge.js +1 -1
- package/dist/sdk/mutation-events.js +1 -1
- package/dist/sdk/mutation-guard.js +1 -1
- package/dist/sdk/notes.js +1 -1
- package/dist/sdk/output-contracts.js +1 -1
- package/dist/sdk/output-projection.js +1 -1
- package/dist/sdk/output-token-accounting.js +1 -1
- package/dist/sdk/output.js +2 -1
- package/dist/sdk/ownership-source.js +1 -1
- package/dist/sdk/package-import-adapters.js +1 -1
- package/dist/sdk/package-migrations.js +1 -1
- package/dist/sdk/package-runtime-options.js +1 -1
- package/dist/sdk/pagination.js +1 -1
- package/dist/sdk/profile.js +5 -1
- package/dist/sdk/provenance.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/query/activity.js +1 -1
- package/dist/sdk/query/aggregate.js +1 -1
- package/dist/sdk/query/calendar.js +4 -1
- package/dist/sdk/query/complete-list.js +1 -1
- package/dist/sdk/query/context.js +2 -1
- package/dist/sdk/query/duplicate-candidates.js +1 -1
- package/dist/sdk/query/get.d.ts +14 -2
- package/dist/sdk/query/get.js +1 -1
- package/dist/sdk/query/history.js +1 -1
- package/dist/sdk/query/item-filter-options.js +1 -1
- package/dist/sdk/query/light-metadata.js +1 -1
- package/dist/sdk/query/list-filter-shared.js +1 -1
- package/dist/sdk/query/list.js +1 -1
- package/dist/sdk/query/multi-value-filters.js +1 -1
- package/dist/sdk/query/next-ready-budget.js +1 -1
- package/dist/sdk/query/next.js +2 -1
- package/dist/sdk/query/parsers.js +1 -1
- package/dist/sdk/query/projection-contracts.js +1 -1
- package/dist/sdk/query/search/corpus.js +2 -1
- package/dist/sdk/query/search/filters.js +1 -1
- package/dist/sdk/query/search/input.js +1 -1
- package/dist/sdk/query/search/lexical.js +1 -1
- package/dist/sdk/query/search/response.js +1 -1
- package/dist/sdk/query/search/semantic.js +3 -2
- package/dist/sdk/query/search/types.js +1 -1
- package/dist/sdk/query/search-contracts.js +1 -1
- package/dist/sdk/query/search-pagination.js +1 -1
- package/dist/sdk/query/search-rendering.js +1 -1
- package/dist/sdk/query/search.js +1 -1
- package/dist/sdk/query/workspace-contracts.js +1 -1
- package/dist/sdk/query.js +1 -1
- package/dist/sdk/read-output/continuation.js +1 -1
- package/dist/sdk/read-output/options.js +1 -1
- package/dist/sdk/read-output/provenance.js +1 -1
- package/dist/sdk/read-output-budget.js +1 -1
- package/dist/sdk/read-output-contracts.js +1 -1
- package/dist/sdk/read-output-rows.js +1 -1
- package/dist/sdk/read-output-session.js +1 -1
- package/dist/sdk/relationship-analytics.js +1 -1
- package/dist/sdk/relationship-context.js +1 -1
- package/dist/sdk/relationship-history.js +7 -4
- package/dist/sdk/relationship-kinds/contract.js +1 -1
- package/dist/sdk/relationship-migration.js +1 -1
- package/dist/sdk/relationships.js +1 -1
- package/dist/sdk/reproducibility/process.js +1 -1
- package/dist/sdk/runtime/actions.js +1 -1
- package/dist/sdk/runtime/context.js +1 -1
- package/dist/sdk/runtime/schema-preview.js +1 -1
- package/dist/sdk/runtime/schema.js +1 -1
- package/dist/sdk/runtime-action-aliases.js +1 -1
- package/dist/sdk/runtime-extended-actions.js +1 -1
- package/dist/sdk/runtime-input.js +1 -1
- package/dist/sdk/runtime-primitives.js +1 -1
- package/dist/sdk/runtime-public-contracts.js +1 -1
- package/dist/sdk/runtime-stats-options.js +1 -1
- package/dist/sdk/runtime.js +1 -1
- package/dist/sdk/scheduling-shortcuts.js +1 -1
- package/dist/sdk/schema-migration.js +4 -3
- package/dist/sdk/schema.js +7 -1
- package/dist/sdk/search-refresh-worker.js +1 -1
- package/dist/sdk/similarity-scoring.js +1 -1
- package/dist/sdk/similarity.js +1 -1
- package/dist/sdk/start-task-status.js +1 -1
- package/dist/sdk/stats.js +1 -1
- package/dist/sdk/structured-mutations.js +1 -1
- package/dist/sdk/telemetry-flush.js +1 -1
- package/dist/sdk/telemetry.js +4 -3
- package/dist/sdk/templates.js +26 -2
- package/dist/sdk/test/batch.js +2 -2
- package/dist/sdk/test/entry.js +1 -1
- package/dist/sdk/test/execution.js +6 -5
- package/dist/sdk/test/json-path.js +1 -1
- package/dist/sdk/test/linked-command-detection.js +1 -1
- package/dist/sdk/test/measurements.js +1 -1
- package/dist/sdk/test/parsers.js +1 -1
- package/dist/sdk/test/runs.js +1 -1
- package/dist/sdk/test/trust.js +2 -2
- package/dist/sdk/test/workspace-snapshot.js +1 -1
- package/dist/sdk/testing.js +7 -4
- package/dist/sdk/traceability/runtime-files-lookup.js +1 -1
- package/dist/sdk/traceability/source-traceability.js +2 -1
- package/dist/sdk/tracker-root-discovery.js +1 -1
- package/dist/sdk/workspace-contracts-cache.js +1 -1
- package/dist/sdk/workspace-contracts.js +1 -1
- package/dist/sdk/workspace-memory.js +2 -2
- package/dist/sdk/workspace-recipe.js +1 -1
- package/dist/sdk/workspace-snapshot.js +5 -4
- package/dist/sdk/workspace-transaction-gc.js +1 -1
- package/dist/sdk/workspace-transaction.js +2 -2
- package/dist/sdk/workspace.js +3 -2
- package/dist/types/index.js +1 -1
- package/dist/types.js +1 -1
- package/docs/AGENT_EVIDENCE_CONSISTENCY.md +88 -0
- package/docs/GET_READ_EVIDENCE.md +68 -0
- package/docs/README.md +2 -0
- package/marketplace.json +2 -2
- 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/extensions/vcs/index.ts +4 -2
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/package.json +2 -2
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/package.json +2 -2
- package/plugins/pm-codex/plugin.json +1 -1
- package/scripts/finalize-build.mjs +3 -2
- package/dist/cli-bundle/chunks/chunk-7UVXKI7K.js +0 -2
- package/dist/cli-bundle/chunks/chunk-D7Z2ZMJL.js +0 -3
- package/dist/cli-bundle/chunks/chunk-DEZPZOQ7.js +0 -2
- package/dist/cli-bundle/chunks/chunk-J52QIRRZ.js +0 -80
- package/dist/cli-bundle/chunks/chunk-JDKD3WGG.js +0 -6
- package/dist/cli-bundle/chunks/chunk-JQ7DW663.js +0 -2
- package/dist/cli-bundle/chunks/chunk-QXIDOOWT.js +0 -20
- package/dist/cli-bundle/chunks/chunk-SGFQQXFD.js +0 -2
- package/dist/cli-bundle/chunks/chunk-V3U77H3V.js +0 -31
- package/dist/cli-bundle/chunks/chunk-XZDWAYJC.js +0 -3
- package/dist/cli-bundle/chunks/chunk-Y6VRBTP3.js +0 -238
- package/dist/cli-bundle/chunks/chunk-YAAFYFS4.js +0 -8
- package/dist/cli-bundle/chunks/register-mutation-53ZLT4RX.js +0 -20
- package/dist/cli-bundle/chunks/register-operations-OBK2FXUU.js +0 -2
- package/dist/cli-bundle/chunks/register-setup-HM3OCBH2.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2JFYR56O.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-32EVUSS4.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-5GUSO2P4.js +0 -20
- package/dist/cli-bundle/focused-chunks/chunk-6XBRADQQ.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-CURTIIQT.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-IJUWEEEB.js +0 -6
- package/dist/cli-bundle/focused-chunks/chunk-JMJK2L4Z.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-KG3H4UZZ.js +0 -30
- package/dist/cli-bundle/focused-chunks/chunk-MHQ2XICU.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-RJV6QVJE.js +0 -75
- package/dist/cli-bundle/focused-chunks/chunk-ZE2JZ7R6.js +0 -12
- package/dist/cli-bundle/focused-chunks/chunk-ZLEN4HZD.js +0 -165
package/dist/cli.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="84b9d77a-1a51-5563-a210-e9c8640c56de")}catch{}})();import fs from"node:fs";import*as nodeModule from"node:module";import os from"node:os";import path from"node:path";import{fileURLToPath}from"node:url";import{runCliWithBundleIntegrity}from"./cli/bundle-integrity.js";import{runRuntimeCompatibleCli}from"./cli/runtime-compatibility-boundary.js";import{registerInvocationProfile}from"./cli/invocation-profile.js";import{pruneCompileCacheGenerations,resolveCompileCacheGeneration}from"./sdk/compile-cache.js";function enableNodeCompileCache(){const{enableCompileCache}=nodeModule;if(typeof enableCompileCache!="function"||process.env.PM_CLI_DISABLE_COMPILE_CACHE==="1")return;const userCacheKey=typeof process.getuid=="function"?String(process.getuid()):os.userInfo().username.replace(/[^a-zA-Z0-9._-]/g,"_"),configuredCacheDir=process.env.PM_CLI_COMPILE_CACHE_DIR,defaultCacheRoot=path.join(os.tmpdir(),`pm-cli-node-compile-cache-${userCacheKey}`),generation=resolveCompileCacheGeneration(readPackageVersionForPath(fileURLToPath(import.meta.url))),cacheDir=configuredCacheDir??path.join(defaultCacheRoot,generation);try{configuredCacheDir===void 0&&pruneCompileCacheGenerations(defaultCacheRoot,generation),enableCompileCache(cacheDir)}catch{}}function findPackageJson(startPath){let current=path.dirname(path.resolve(startPath));for(;;){const candidate=path.join(current,"package.json");if(fs.existsSync(candidate))return candidate;const parent=path.dirname(current);if(parent===current)return;current=parent}}function printFastVersionIfRequested(){const versionArgs=process.argv.slice(2).filter(arg=>arg!=="--no-extensions"&&arg!=="--profile");if(versionArgs.length!==1||versionArgs[0]!=="--version"&&versionArgs[0]!=="-V")return!1;const version=readPackageVersionForPath(fileURLToPath(import.meta.url));return version===void 0?!1:(console.log(version),!0)}function readPackageVersionForPath(startPath){const packageJsonPath=findPackageJson(startPath);if(packageJsonPath)try{const parsed=JSON.parse(fs.readFileSync(packageJsonPath,"utf8"));return typeof parsed.version!="string"?void 0:parsed.version}catch{return}}const _testOnly={enableNodeCompileCache,findPackageJson,printFastVersionIfRequested,readPackageVersionForPath};if(registerInvocationProfile(process.argv.slice(2)),!printFastVersionIfRequested()){enableNodeCompileCache();const cliEntrypointPath=fileURLToPath(import.meta.url),executingVersion=readPackageVersionForPath(cliEntrypointPath),invocationArgv=process.argv.slice(2);await runRuntimeCompatibleCli({executingVersion,projectRoot:process.cwd(),argv:invocationArgv,allowStale:process.env.PM_ALLOW_STALE_CLI==="1",run:()=>runCliWithBundleIntegrity(invocationArgv,cliEntrypointPath,()=>import("./cli-bundle/main.js"),process.stderr.write.bind(process.stderr)),writeError:process.stderr.write.bind(process.stderr)})}export{_testOnly};
|
|
3
3
|
//# sourceMappingURL=cli.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4fe37a62-2d0f-55f6-bb98-7162e7e8b8fe")}catch{}})();import{isFileMissingError}from"../fs/fs-utils.js";import fs from"node:fs/promises";import path from"node:path";const MILLISECONDS_PER_DAY=864e5;function readCheckpointCreatedAt(raw){let parsed;try{parsed=JSON.parse(raw)}catch{return null}if(typeof parsed!="object"||parsed===null||Array.isArray(parsed))return null;const createdAt=parsed.created_at;return typeof createdAt=="string"?createdAt:null}async function collectCheckpointFiles(checkpointsDir,warnings){let dirEntries;try{dirEntries=await fs.readdir(checkpointsDir,{withFileTypes:!0})}catch(error){if(isFileMissingError(error))return[];throw error}const files=[];for(const entry of dirEntries)if(entry.isDirectory()){const subdir=path.join(checkpointsDir,entry.name);let nested;try{nested=await fs.readdir(subdir)}catch(error){isFileMissingError(error)||warnings.push(`checkpoint_subdir_unreadable:${entry.name}`);continue}for(const file of nested)file.endsWith(".json")&&files.push(`${entry.name}/${file}`)}else entry.name.endsWith(".json")&&files.push(entry.name);return files.sort()}async function runCheckpointGc(pmRoot,options){const{dryRun,hooks}=options,nowMs=options.now??Date.now(),retentionMs=Math.max(0,options.retentionDays)*MILLISECONDS_PER_DAY,checkpointsDir=path.join(pmRoot,"checkpoints"),result={scanned:0,removed:[],retained:[],warnings:[],entries:[]},files=await collectCheckpointFiles(checkpointsDir,result.warnings);for(const relName of files){const absPath=path.join(checkpointsDir,relName),relPath=`checkpoints/${relName}`;result.scanned+=1,hooks?.onRead&&result.warnings.push(...await hooks.onRead(absPath));let raw;try{raw=await fs.readFile(absPath,"utf8")}catch(readError){if(isFileMissingError(readError)){result.scanned-=1;continue}result.warnings.push(`checkpoint_unreadable:${relName}`),result.retained.push(relPath),result.entries.push({file:relPath,created_at:null,age_seconds:null,stale:!1,reason:"unparseable"});continue}const createdAt=readCheckpointCreatedAt(raw),createdAtMs=createdAt===null?Number.NaN:Date.parse(createdAt);if(!Number.isFinite(createdAtMs)){result.warnings.push(`checkpoint_unparseable:${relName}`),result.retained.push(relPath),result.entries.push({file:relPath,created_at:createdAt,age_seconds:null,stale:!1,reason:"unparseable"});continue}const ageMs=nowMs-createdAtMs,entry={file:relPath,created_at:createdAt,age_seconds:Math.floor(ageMs/1e3),stale:ageMs>retentionMs,reason:ageMs>retentionMs?"expired":"active"};if(!entry.stale){result.retained.push(relPath),result.entries.push(entry);continue}if(!dryRun){try{await fs.unlink(absPath)}catch(unlinkError){if(!isFileMissingError(unlinkError)){result.warnings.push(`checkpoint_remove_failed:${relName}`),result.retained.push(relPath),result.entries.push(entry);continue}}hooks?.onWrite&&result.warnings.push(...await hooks.onWrite(absPath))}result.removed.push(relPath),result.entries.push(entry)}return result}export{runCheckpointGc};
|
|
2
2
|
//# sourceMappingURL=checkpoint-gc.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
`;if(!await createFileAtomic(filePath,raw)&&await readFileIfExists(filePath)!==raw)
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="da661b46-841c-526d-88bc-976e007e8fbe")}catch{}})();import{readFile}from"node:fs/promises";import path from"node:path";import{pathExists,readFileIfExists}from"../fs/fs-utils.js";import{createFileAtomic}from"../fs/atomic-create.js";import{EXIT_CODE}from"../shared/constants.js";import{PmCliError}from"../shared/errors.js";import{toErrorMessage}from"../shared/primitives.js";import{nowIso}from"../shared/time.js";function normalizeCheckpointId(raw){const trimmed=raw.trim();if(!trimmed)throw new PmCliError("--rollback requires a non-empty checkpoint ID",EXIT_CODE.USAGE);if(!/^[a-zA-Z0-9._-]+$/.test(trimmed))throw new PmCliError("--rollback checkpoint ID must match [a-zA-Z0-9._-]+",EXIT_CODE.USAGE);return trimmed}function createCheckpointId(prefix,nowValue){const compactTimestamp=nowValue.replace(/[-:.TZ]/g,"").slice(0,14),randomSuffix=Math.random().toString(36).slice(2,8);return`${prefix}-${compactTimestamp}-${randomSuffix}`}function checkpointDirectoryPath(pmRoot,subdir){return path.join(pmRoot,"checkpoints",subdir)}function checkpointFilePath(pmRoot,subdir,checkpointId){return path.join(checkpointDirectoryPath(pmRoot,subdir),`${checkpointId}.json`)}async function writeMutationCheckpoint(pmRoot,subdir,checkpointId,payload){const filePath=checkpointFilePath(pmRoot,subdir,checkpointId),raw=`${JSON.stringify(payload,null,2)}
|
|
2
|
+
`;if(!await createFileAtomic(filePath,raw)&&await readFileIfExists(filePath)!==raw)throw new PmCliError(`Checkpoint ${checkpointId} already exists with different contents; use a new checkpoint ID.`,EXIT_CODE.CONFLICT);return filePath}function parseCheckpointItems(record,checkpointId){if(!Array.isArray(record.items))throw new PmCliError(`Checkpoint ${checkpointId} is missing items`,EXIT_CODE.GENERIC_FAILURE);return record.items.map(entry=>{if(!entry||typeof entry!="object")throw new PmCliError(`Checkpoint ${checkpointId} contains an invalid item entry`,EXIT_CODE.GENERIC_FAILURE);const row=entry;if(typeof row.id!="string"||row.id.trim().length===0)throw new PmCliError(`Checkpoint ${checkpointId} contains an item entry without ID`,EXIT_CODE.GENERIC_FAILURE);if(typeof row.target_updated_at!="string"||row.target_updated_at.trim().length===0)throw new PmCliError(`Checkpoint ${checkpointId} contains an item entry without target_updated_at`,EXIT_CODE.GENERIC_FAILURE);return{id:row.id.trim(),target_updated_at:row.target_updated_at.trim()}})}async function loadMutationCheckpoint(pmRoot,subdir,rawCheckpointId,schemaVersion){const normalizedId=normalizeCheckpointId(rawCheckpointId),filePath=checkpointFilePath(pmRoot,subdir,normalizedId);if(!await pathExists(filePath))throw new PmCliError(`Checkpoint ${normalizedId} not found`,EXIT_CODE.NOT_FOUND);const raw=await readFile(filePath,"utf8");let parsed;try{parsed=JSON.parse(raw)}catch(error){throw new PmCliError(`Checkpoint ${normalizedId} contains invalid JSON: ${toErrorMessage(error)}`,EXIT_CODE.GENERIC_FAILURE)}if(!parsed||typeof parsed!="object")throw new PmCliError(`Checkpoint ${normalizedId} is invalid`,EXIT_CODE.GENERIC_FAILURE);const record=parsed;if(record.schema_version!==schemaVersion)throw new PmCliError(`Checkpoint ${normalizedId} has unsupported schema version`,EXIT_CODE.GENERIC_FAILURE);const items=parseCheckpointItems(record,normalizedId);return{record,items,path:filePath,id:typeof record.id=="string"?record.id:normalizedId,created_at:typeof record.created_at=="string"?record.created_at:nowIso(),author:typeof record.author=="string"?record.author:"unknown"}}async function restoreCheckpointItems(items,restore){const rows=[],restoredIds=[];for(const entry of items)try{const restored=await restore(entry.id,entry.target_updated_at);rows.push({id:entry.id,status:"restored",changed_fields:restored.changed_fields,warnings:restored.warnings}),restoredIds.push(entry.id)}catch(error){rows.push({id:entry.id,status:"failed",error:toErrorMessage(error)})}return{rows,restored_ids:restoredIds,failed_count:rows.filter(row=>row.status==="failed").length}}export{checkpointDirectoryPath,checkpointFilePath,createCheckpointId,loadMutationCheckpoint,normalizeCheckpointId,restoreCheckpointItems,writeMutationCheckpoint};
|
|
3
3
|
//# sourceMappingURL=mutation-checkpoint.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!(function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2d4017d7-771b-53a1-ae56-71df7e1a0ac4")}catch(e2){}})();const NESTED_SETTING_DESCRIPTORS=[{key:"search_provider",path:"search.provider",kind:"string",summary:"Search embedding provider name (e.g. openai, ollama, or an extension provider)."},{key:"search_default_mode",path:"search.default_mode",kind:"string",choices:["auto","keyword","semantic","hybrid"],summary:"Mode a bare pm search runs in: auto (hybrid when semantic search is explicitly configured and runnable, else keyword), or a pinned keyword, semantic, or hybrid."},{key:"search_mutation_refresh_policy",path:"search.mutation_refresh_policy",kind:"string",choices:["cache_only","semantic_configured","semantic_auto"],summary:"Mutation-time search refresh policy: cache_only, semantic_configured, or semantic_auto."},{key:"search_query_expansion_enabled",path:"search.query_expansion.enabled",kind:"boolean",summary:"Enable or disable query expansion for semantic/hybrid search."},{key:"search_query_expansion_provider",path:"search.query_expansion.provider",kind:"string",summary:"Query expansion provider name (built-in openai/ollama or extension provider)."},{key:"search_rerank_enabled",path:"search.rerank.enabled",kind:"boolean",summary:"Enable or disable post-retrieval reranking for hybrid search."},{key:"search_rerank_model",path:"search.rerank.model",kind:"string",summary:"Rerank model name override used by built-in providers."},{key:"search_rerank_top_k",path:"search.rerank.top_k",kind:"integer",min:1,summary:"Number of top hybrid candidates to rerank when rerank is enabled."},{key:"search_embedding_model",path:"search.embedding_model",kind:"string",summary:"Default embedding model name (overrides provider-specific model when set)."},{key:"search_embedding_corpus_max_characters",path:"search.embedding_corpus_max_characters",kind:"integer",min:1,summary:"Maximum semantic corpus characters per item before truncation."},{key:"search_embedding_batch_size",path:"search.embedding_batch_size",kind:"integer",min:1,summary:"Number of items embedded per request batch."},{key:"search_embedding_timeout_ms",path:"search.embedding_timeout_ms",kind:"integer",min:1,summary:"Per-request embedding timeout in milliseconds."},{key:"search_score_threshold",path:"search.score_threshold",kind:"number",summary:"Minimum score for a hit to be returned (0 keeps all matches)."},{key:"search_hybrid_semantic_weight",path:"search.hybrid_semantic_weight",kind:"ratio",summary:"Hybrid mode semantic weight in [0, 1] (1-weight goes to keyword)."},{key:"search_max_results",path:"search.max_results",kind:"integer",min:1,summary:"Default upper bound on search hits when --limit is not supplied."},{key:"search_bm25_k1",path:"search.bm25.k1",kind:"number",min:0,summary:"Offline BM25 term-frequency saturation (k1); higher saturates repeated terms slower (default 1.2)."},{key:"search_bm25_b",path:"search.bm25.b",kind:"ratio",summary:"Offline BM25 document-length normalization (b) in [0, 1]; 0 disables, 1 fully normalizes (default 0.75)."},{key:"openai_base_url",path:"providers.openai.base_url",kind:"string",summary:"OpenAI-compatible API base URL (LM Studio/vLLM also use this)."},{key:"openai_api_key",path:"providers.openai.api_key",kind:"string",summary:"OpenAI-compatible API key."},{key:"openai_model",path:"providers.openai.model",kind:"string",summary:"OpenAI-compatible embedding model name."},{key:"ollama_base_url",path:"providers.ollama.base_url",kind:"string",summary:"Ollama API base URL (typically http://localhost:11434)."},{key:"ollama_model",path:"providers.ollama.model",kind:"string",summary:"Ollama embedding model name (e.g. nomic-embed-text)."},{key:"vector_store_adapter",path:"vector_store.adapter",kind:"string",summary:"Vector store adapter name (lancedb, qdrant, or an extension adapter)."},{key:"vector_store_collection_name",path:"vector_store.collection_name",kind:"string",non_empty:true,summary:"Vector collection/table name shared by Qdrant and LanceDB adapters."},{key:"qdrant_url",path:"vector_store.qdrant.url",kind:"string",summary:"Qdrant HTTP API URL."},{key:"qdrant_api_key",path:"vector_store.qdrant.api_key",kind:"string",summary:"Qdrant API key (empty if running unauthenticated)."},{key:"lancedb_path",path:"vector_store.lancedb.path",kind:"string",summary:"LanceDB storage path (relative to pm root or absolute)."},{key:"id_prefix",path:"id_prefix",kind:"string",non_empty:true,summary:'Prefix for generated item IDs (e.g. "pm" produces pm-xxxx).'},{key:"author_default",path:"author_default",kind:"string",non_empty:true,summary:"Default author recorded on mutations when --author is not supplied."},{key:"agent_identity_probes_enabled",path:"agent_identity.probes_enabled",kind:"boolean",summary:"Allow privacy-bounded local harness provenance probes; no network or subprocess access is permitted."},{key:"mutation_guard_require_attributed_author",path:"mutation_guard.require_attributed_author",kind:"boolean",summary:"Reject mutations whose effective author resolves to unknown."},{key:"mutation_guard_secret_guard",path:"mutation_guard.secret_guard",kind:"string",choices:["off","advise","block"],summary:"Detect credential-shaped mutation content: off, advise, or block."},{key:"mutation_guard_stale_in_progress_hours",path:"mutation_guard.stale_in_progress_hours",kind:"integer",min:1,summary:"Age threshold for unclaimed in-progress work surfaced by health."},{key:"governance_duplicate_detection_mode",path:"governance.duplicate_detection_mode",kind:"string",choices:["off","advisory","strict"],summary:"Create/copy duplicate governance: off, advisory, or strict explicit-bypass enforcement."},{key:"governance_duplicate_detection_threshold",path:"governance.duplicate_detection_threshold",kind:"ratio",summary:"Minimum shared similarity score in [0, 1] for create/copy duplicate governance."},{key:"governance_duplicate_detection_limit",path:"governance.duplicate_detection_limit",kind:"integer",min:0,max:20,summary:"Maximum likely duplicates returned by create/copy governance (0-20)."},{key:"output_default_format",path:"output.default_format",kind:"string",choices:["toon","json"],summary:"Default output format for commands that support it: toon or json."},{key:"ux_deprecation_hints",path:"ux.deprecation_hints",kind:"boolean",summary:"Emit one stderr migration hint for deprecated command aliases."},{key:"locks_ttl_seconds",path:"locks.ttl_seconds",kind:"integer",min:1,summary:"Claim/lock time-to-live in seconds before a stale lock can be reclaimed."},{key:"locks_wait_ms",path:"locks.wait_ms",kind:"integer",min:0,summary:"Bounded jittered wait in milliseconds before a contended item mutation fails with lock_conflict; 0 fails fast. PM_LOCK_WAIT_MS overrides per invocation."},{key:"ids_token_length",path:"ids.token_length",kind:"integer",min:4,max:12,summary:"Random base36 token length for newly minted item ids (4-12, default 4). Raise it to shrink cross-branch id collision odds in concurrent multi-agent workflows (pm-pibw)."},{key:"checkpoints_retention_days",path:"checkpoints.retention_days",kind:"integer",min:1,summary:"Age in days above which pm gc --scope checkpoints prunes bulk-mutation rollback checkpoints."},{key:"schema_unknown_field_policy",path:"schema.unknown_field_policy",kind:"string",choices:["allow","warn","reject"],summary:"How item I/O handles metadata keys not in the field registry: allow, warn, or reject."},{key:"history_compact_policy_enabled",path:"history.compact_policy.enabled",kind:"boolean",summary:"Enable the history-compaction advisory: pm health warns on over-threshold streams."},{key:"history_compact_policy_max_entries",path:"history.compact_policy.max_entries",kind:"integer",min:1,summary:"Entry count above which a history stream is flagged (and the default pm history-compact --all-over threshold)."},{key:"history_compact_policy_trigger",path:"history.compact_policy.trigger",kind:"string",choices:["health_warn","auto"],summary:"History-compaction policy intent: health_warn (advisory only) or auto (scheduled sweeps expected)."}];const DESCRIPTOR_BY_KEY=new Map(NESTED_SETTING_DESCRIPTORS.flatMap(descriptor=>[[descriptor.key,descriptor],[descriptor.path.toLowerCase().replaceAll("-","_"),descriptor]]));function resolveNestedSettingDescriptor(raw){if(typeof raw!=="string"){return void 0}const normalized=raw.trim().toLowerCase().replaceAll("-","_");if(normalized.length===0){return void 0}return DESCRIPTOR_BY_KEY.get(normalized)}function parseNestedBooleanValue(descriptor,rawValue){const normalized=rawValue.trim().toLowerCase();if(normalized==="true"||normalized==="1"||normalized==="yes"||normalized==="on"){return{ok:true,parsed:{descriptor,value:true}}}if(normalized==="false"||normalized==="0"||normalized==="no"||normalized==="off"){return{ok:true,parsed:{descriptor,value:false}}}return{ok:false,error:{message:`Config set ${descriptor.key} requires a boolean value (true|false), got "${rawValue}"`}}}function parseNestedStringValue(descriptor,rawValue,trimmed){if(descriptor.non_empty===true&&trimmed.length===0){return{ok:false,error:{message:`Config set ${descriptor.key} requires a non-empty value`}}}if(descriptor.choices&&!descriptor.choices.includes(trimmed)){return{ok:false,error:{message:`Config set ${descriptor.key} must be one of ${descriptor.choices.join("|")}, got "${rawValue}"`}}}return{ok:true,parsed:{descriptor,value:trimmed}}}function parseFiniteNestedNumber(descriptor,rawValue,trimmed){if(trimmed.length===0){return{ok:false,error:{message:`Config set ${descriptor.key} requires a non-empty value`}}}const parsed=Number(trimmed);if(!Number.isFinite(parsed)){return{ok:false,error:{message:`Config set ${descriptor.key} requires a finite number, got "${rawValue}"`}}}return{ok:true,value:parsed}}function parseNestedIntegerValue(descriptor,rawValue,value){if(!Number.isInteger(value)||value<0){return{ok:false,error:{message:`Config set ${descriptor.key} requires a non-negative integer, got "${rawValue}"`}}}if(descriptor.min!==void 0&&value<descriptor.min){return{ok:false,error:{message:`Config set ${descriptor.key} requires an integer >= ${descriptor.min}, got "${rawValue}" (the runtime silently ignores 0 here and falls back to the default)`}}}if(descriptor.max!==void 0&&value>descriptor.max){return{ok:false,error:{message:`Config set ${descriptor.key} requires an integer <= ${descriptor.max}, got "${rawValue}"`}}}return{ok:true,parsed:{descriptor,value}}}function parseNestedRatioValue(descriptor,rawValue,value){if(value<0||value>1){return{ok:false,error:{message:`Config set ${descriptor.key} requires a number in [0, 1], got "${rawValue}"`}}}return{ok:true,parsed:{descriptor,value}}}function parseNestedNumberValue(descriptor,rawValue,value){if(descriptor.min!==void 0&&value<descriptor.min){return{ok:false,error:{message:`Config set ${descriptor.key} requires a number >= ${descriptor.min}, got "${rawValue}"`}}}return{ok:true,parsed:{descriptor,value}}}function parseNestedSettingValue(descriptor,rawValue){if(typeof rawValue!=="string"){return{ok:false,error:{message:`Config set ${descriptor.key} requires a string value`}}}const trimmed=rawValue.trim();if(descriptor.kind==="boolean"){return parseNestedBooleanValue(descriptor,rawValue)}if(descriptor.kind==="string"){return parseNestedStringValue(descriptor,rawValue,trimmed)}const parsed=parseFiniteNestedNumber(descriptor,rawValue,trimmed);if(!parsed.ok){return{ok:false,error:parsed.error}}if(descriptor.kind==="integer"){return parseNestedIntegerValue(descriptor,rawValue,parsed.value)}if(descriptor.kind==="ratio"){return parseNestedRatioValue(descriptor,rawValue,parsed.value)}return parseNestedNumberValue(descriptor,rawValue,parsed.value)}function readNestedSettingValue(settings,descriptor){const segments=descriptor.path.split(".");let cursor=settings;for(const segment of segments){if(typeof cursor!=="object"||cursor===null){return null}const property=Object.getOwnPropertyDescriptor(cursor,segment);if(!property||!Object.hasOwn(property,"value")){return null}cursor=property.value}if(typeof cursor==="string"||typeof cursor==="number"||typeof cursor==="boolean"){return cursor}return null}function writeNestedSettingValue(settings,descriptor,value){const segments=descriptor.path.split(".");if(segments.some(segment=>segment.length===0||["__proto__","constructor","prototype"].includes(segment))){throw new Error("Unsafe settings path")}let cursor=settings;for(let index=0;index<segments.length-1;index+=1){const segment=segments[index];const existing=Object.getOwnPropertyDescriptor(cursor,segment)?.value;if(typeof existing!=="object"||existing===null||Array.isArray(existing)){const next={};Object.defineProperty(cursor,segment,{value:next,writable:true,enumerable:true,configurable:true});cursor=next}else{cursor=existing}}const leafKey=segments[segments.length-1];const previous=Object.getOwnPropertyDescriptor(cursor,leafKey)?.value;if(previous===value){return false}Object.defineProperty(cursor,leafKey,{value,writable:true,enumerable:true,configurable:true});return true}export{NESTED_SETTING_DESCRIPTORS,parseNestedSettingValue,readNestedSettingValue,resolveNestedSettingDescriptor,writeNestedSettingValue};
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2ae4f6da-17c5-5024-89a2-bb0a4be9a683")}catch{}})();const NESTED_SETTING_DESCRIPTORS=[{key:"search_provider",path:"search.provider",kind:"string",summary:"Search embedding provider name (e.g. openai, ollama, or an extension provider)."},{key:"search_default_mode",path:"search.default_mode",kind:"string",choices:["auto","keyword","semantic","hybrid"],summary:"Mode a bare pm search runs in: auto (hybrid when semantic search is explicitly configured and runnable, else keyword), or a pinned keyword, semantic, or hybrid."},{key:"search_mutation_refresh_policy",path:"search.mutation_refresh_policy",kind:"string",choices:["cache_only","semantic_configured","semantic_auto"],summary:"Mutation-time search refresh policy: cache_only, semantic_configured, or semantic_auto."},{key:"search_query_expansion_enabled",path:"search.query_expansion.enabled",kind:"boolean",summary:"Enable or disable query expansion for semantic/hybrid search."},{key:"search_query_expansion_provider",path:"search.query_expansion.provider",kind:"string",summary:"Query expansion provider name (built-in openai/ollama or extension provider)."},{key:"search_rerank_enabled",path:"search.rerank.enabled",kind:"boolean",summary:"Enable or disable post-retrieval reranking for hybrid search."},{key:"search_rerank_model",path:"search.rerank.model",kind:"string",summary:"Rerank model name override used by built-in providers."},{key:"search_rerank_top_k",path:"search.rerank.top_k",kind:"integer",min:1,summary:"Number of top hybrid candidates to rerank when rerank is enabled."},{key:"search_embedding_model",path:"search.embedding_model",kind:"string",summary:"Default embedding model name (overrides provider-specific model when set)."},{key:"search_embedding_corpus_max_characters",path:"search.embedding_corpus_max_characters",kind:"integer",min:1,summary:"Maximum semantic corpus characters per item before truncation."},{key:"search_embedding_batch_size",path:"search.embedding_batch_size",kind:"integer",min:1,summary:"Number of items embedded per request batch."},{key:"search_embedding_timeout_ms",path:"search.embedding_timeout_ms",kind:"integer",min:1,summary:"Per-request embedding timeout in milliseconds."},{key:"search_score_threshold",path:"search.score_threshold",kind:"number",summary:"Minimum score for a hit to be returned (0 keeps all matches)."},{key:"search_hybrid_semantic_weight",path:"search.hybrid_semantic_weight",kind:"ratio",summary:"Hybrid mode semantic weight in [0, 1] (1-weight goes to keyword)."},{key:"search_max_results",path:"search.max_results",kind:"integer",min:1,summary:"Default upper bound on search hits when --limit is not supplied."},{key:"search_bm25_k1",path:"search.bm25.k1",kind:"number",min:0,summary:"Offline BM25 term-frequency saturation (k1); higher saturates repeated terms slower (default 1.2)."},{key:"search_bm25_b",path:"search.bm25.b",kind:"ratio",summary:"Offline BM25 document-length normalization (b) in [0, 1]; 0 disables, 1 fully normalizes (default 0.75)."},{key:"openai_base_url",path:"providers.openai.base_url",kind:"string",summary:"OpenAI-compatible API base URL (LM Studio/vLLM also use this)."},{key:"openai_api_key",path:"providers.openai.api_key",kind:"string",summary:"OpenAI-compatible API key."},{key:"openai_model",path:"providers.openai.model",kind:"string",summary:"OpenAI-compatible embedding model name."},{key:"ollama_base_url",path:"providers.ollama.base_url",kind:"string",summary:"Ollama API base URL (typically http://localhost:11434)."},{key:"ollama_model",path:"providers.ollama.model",kind:"string",summary:"Ollama embedding model name (e.g. nomic-embed-text)."},{key:"vector_store_adapter",path:"vector_store.adapter",kind:"string",summary:"Vector store adapter name (lancedb, qdrant, or an extension adapter)."},{key:"vector_store_collection_name",path:"vector_store.collection_name",kind:"string",non_empty:!0,summary:"Vector collection/table name shared by Qdrant and LanceDB adapters."},{key:"qdrant_url",path:"vector_store.qdrant.url",kind:"string",summary:"Qdrant HTTP API URL."},{key:"qdrant_api_key",path:"vector_store.qdrant.api_key",kind:"string",summary:"Qdrant API key (empty if running unauthenticated)."},{key:"lancedb_path",path:"vector_store.lancedb.path",kind:"string",summary:"LanceDB storage path (relative to pm root or absolute)."},{key:"id_prefix",path:"id_prefix",kind:"string",non_empty:!0,summary:'Prefix for generated item IDs (e.g. "pm" produces pm-xxxx).'},{key:"author_default",path:"author_default",kind:"string",non_empty:!0,summary:"Default author recorded on mutations when --author is not supplied."},{key:"agent_identity_probes_enabled",path:"agent_identity.probes_enabled",kind:"boolean",summary:"Allow privacy-bounded local harness provenance probes; no network or subprocess access is permitted."},{key:"mutation_guard_require_attributed_author",path:"mutation_guard.require_attributed_author",kind:"boolean",summary:"Reject mutations whose effective author resolves to unknown."},{key:"mutation_guard_secret_guard",path:"mutation_guard.secret_guard",kind:"string",choices:["off","advise","block"],summary:"Detect credential-shaped mutation content: off, advise, or block."},{key:"mutation_guard_stale_in_progress_hours",path:"mutation_guard.stale_in_progress_hours",kind:"integer",min:1,summary:"Age threshold for unclaimed in-progress work surfaced by health."},{key:"governance_duplicate_detection_mode",path:"governance.duplicate_detection_mode",kind:"string",choices:["off","advisory","strict"],summary:"Create/copy duplicate governance: off, advisory, or strict explicit-bypass enforcement."},{key:"governance_duplicate_detection_threshold",path:"governance.duplicate_detection_threshold",kind:"ratio",summary:"Minimum shared similarity score in [0, 1] for create/copy duplicate governance."},{key:"governance_duplicate_detection_limit",path:"governance.duplicate_detection_limit",kind:"integer",min:0,max:20,summary:"Maximum likely duplicates returned by create/copy governance (0-20)."},{key:"output_default_format",path:"output.default_format",kind:"string",choices:["toon","json"],summary:"Default output format for commands that support it: toon or json."},{key:"ux_deprecation_hints",path:"ux.deprecation_hints",kind:"boolean",summary:"Emit one stderr migration hint for deprecated command aliases."},{key:"locks_ttl_seconds",path:"locks.ttl_seconds",kind:"integer",min:1,summary:"Claim/lock time-to-live in seconds before a stale lock can be reclaimed."},{key:"locks_wait_ms",path:"locks.wait_ms",kind:"integer",min:0,summary:"Bounded jittered wait in milliseconds before a contended item mutation fails with lock_conflict; 0 fails fast. PM_LOCK_WAIT_MS overrides per invocation."},{key:"ids_token_length",path:"ids.token_length",kind:"integer",min:4,max:12,summary:"Random base36 token length for newly minted item ids (4-12, default 4). Raise it to shrink cross-branch id collision odds in concurrent multi-agent workflows (pm-pibw)."},{key:"checkpoints_retention_days",path:"checkpoints.retention_days",kind:"integer",min:1,summary:"Age in days above which pm gc --scope checkpoints prunes bulk-mutation rollback checkpoints."},{key:"schema_unknown_field_policy",path:"schema.unknown_field_policy",kind:"string",choices:["allow","warn","reject"],summary:"How item I/O handles metadata keys not in the field registry: allow, warn, or reject."},{key:"history_compact_policy_enabled",path:"history.compact_policy.enabled",kind:"boolean",summary:"Enable the history-compaction advisory: pm health warns on over-threshold streams."},{key:"history_compact_policy_max_entries",path:"history.compact_policy.max_entries",kind:"integer",min:1,summary:"Entry count above which a history stream is flagged (and the default pm history-compact --all-over threshold)."},{key:"history_compact_policy_trigger",path:"history.compact_policy.trigger",kind:"string",choices:["health_warn","auto"],summary:"History-compaction policy intent: health_warn (advisory only) or auto (scheduled sweeps expected)."}],DESCRIPTOR_BY_KEY=new Map(NESTED_SETTING_DESCRIPTORS.flatMap(descriptor=>[[descriptor.key,descriptor],[descriptor.path.toLowerCase().replaceAll("-","_"),descriptor]]));function resolveNestedSettingDescriptor(raw){if(typeof raw!="string")return;const normalized=raw.trim().toLowerCase().replaceAll("-","_");if(normalized.length!==0)return DESCRIPTOR_BY_KEY.get(normalized)}function parseNestedBooleanValue(descriptor,rawValue){const normalized=rawValue.trim().toLowerCase();return normalized==="true"||normalized==="1"||normalized==="yes"||normalized==="on"?{ok:!0,parsed:{descriptor,value:!0}}:normalized==="false"||normalized==="0"||normalized==="no"||normalized==="off"?{ok:!0,parsed:{descriptor,value:!1}}:{ok:!1,error:{message:`Config set ${descriptor.key} requires a boolean value (true|false), got "${rawValue}"`}}}function parseNestedStringValue(descriptor,rawValue,trimmed){return descriptor.non_empty===!0&&trimmed.length===0?{ok:!1,error:{message:`Config set ${descriptor.key} requires a non-empty value`}}:descriptor.choices&&!descriptor.choices.includes(trimmed)?{ok:!1,error:{message:`Config set ${descriptor.key} must be one of ${descriptor.choices.join("|")}, got "${rawValue}"`}}:{ok:!0,parsed:{descriptor,value:trimmed}}}function parseFiniteNestedNumber(descriptor,rawValue,trimmed){if(trimmed.length===0)return{ok:!1,error:{message:`Config set ${descriptor.key} requires a non-empty value`}};const parsed=Number(trimmed);return Number.isFinite(parsed)?{ok:!0,value:parsed}:{ok:!1,error:{message:`Config set ${descriptor.key} requires a finite number, got "${rawValue}"`}}}function parseNestedIntegerValue(descriptor,rawValue,value){return!Number.isInteger(value)||value<0?{ok:!1,error:{message:`Config set ${descriptor.key} requires a non-negative integer, got "${rawValue}"`}}:descriptor.min!==void 0&&value<descriptor.min?{ok:!1,error:{message:`Config set ${descriptor.key} requires an integer >= ${descriptor.min}, got "${rawValue}" (the runtime silently ignores 0 here and falls back to the default)`}}:descriptor.max!==void 0&&value>descriptor.max?{ok:!1,error:{message:`Config set ${descriptor.key} requires an integer <= ${descriptor.max}, got "${rawValue}"`}}:{ok:!0,parsed:{descriptor,value}}}function parseNestedRatioValue(descriptor,rawValue,value){return value<0||value>1?{ok:!1,error:{message:`Config set ${descriptor.key} requires a number in [0, 1], got "${rawValue}"`}}:{ok:!0,parsed:{descriptor,value}}}function parseNestedNumberValue(descriptor,rawValue,value){return descriptor.min!==void 0&&value<descriptor.min?{ok:!1,error:{message:`Config set ${descriptor.key} requires a number >= ${descriptor.min}, got "${rawValue}"`}}:{ok:!0,parsed:{descriptor,value}}}function parseNestedSettingValue(descriptor,rawValue){if(typeof rawValue!="string")return{ok:!1,error:{message:`Config set ${descriptor.key} requires a string value`}};const trimmed=rawValue.trim();if(descriptor.kind==="boolean")return parseNestedBooleanValue(descriptor,rawValue);if(descriptor.kind==="string")return parseNestedStringValue(descriptor,rawValue,trimmed);const parsed=parseFiniteNestedNumber(descriptor,rawValue,trimmed);return parsed.ok?descriptor.kind==="integer"?parseNestedIntegerValue(descriptor,rawValue,parsed.value):descriptor.kind==="ratio"?parseNestedRatioValue(descriptor,rawValue,parsed.value):parseNestedNumberValue(descriptor,rawValue,parsed.value):{ok:!1,error:parsed.error}}function readNestedSettingValue(settings,descriptor){const segments=descriptor.path.split(".");let cursor=settings;for(const segment of segments){if(typeof cursor!="object"||cursor===null)return null;const property=Object.getOwnPropertyDescriptor(cursor,segment);if(!property||!Object.hasOwn(property,"value"))return null;cursor=property.value}return typeof cursor=="string"||typeof cursor=="number"||typeof cursor=="boolean"?cursor:null}function writeNestedSettingValue(settings,descriptor,value){const segments=descriptor.path.split(".");if(segments.some(segment=>segment.length===0||["__proto__","constructor","prototype"].includes(segment)))throw new Error("Unsafe settings path");let cursor=settings;for(let index=0;index<segments.length-1;index+=1){const segment=segments[index],existing=Object.getOwnPropertyDescriptor(cursor,segment)?.value;if(typeof existing!="object"||existing===null||Array.isArray(existing)){const next={};Object.defineProperty(cursor,segment,{value:next,writable:!0,enumerable:!0,configurable:!0}),cursor=next}else cursor=existing}const leafKey=segments[segments.length-1];return Object.getOwnPropertyDescriptor(cursor,leafKey)?.value===value?!1:(Object.defineProperty(cursor,leafKey,{value,writable:!0,enumerable:!0,configurable:!0}),!0)}export{NESTED_SETTING_DESCRIPTORS,parseNestedSettingValue,readNestedSettingValue,resolveNestedSettingDescriptor,writeNestedSettingValue};
|
|
2
2
|
//# sourceMappingURL=nested-settings.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="78e92b9c-f3da-594e-8158-00409222308f")}catch{}})();const FORMAT_KEYS=new Set(["item_format"]),CRITERIA_KEYS=new Set(["definition_of_done","metadata_required_fields","lifecycle_stale_blocker_reason_patterns","lifecycle_closure_like_blocked_reason_patterns","lifecycle_closure_like_resolution_patterns","lifecycle_closure_like_actual_result_patterns"]),POLICY_KEYS=new Set(["history_missing_stream_policy","sprint_release_format_policy","parent_reference_policy","metadata_validation_profile","governance_preset","governance_ownership_enforcement","governance_create_mode_default","governance_close_validation_default","governance_require_close_reason","governance_create_default_type","governance_workflow_enforcement","governance_parent_reference_policy","governance_metadata_validation_profile","governance_force_required_for_stale_lock","test_result_tracking","untrusted_linked_test_execution","telemetry_tracking","agent_identity_vocabulary"]),ENABLED_DISABLED_POLICY_KEYS=new Set(["governance_require_close_reason","governance_force_required_for_stale_lock","test_result_tracking","untrusted_linked_test_execution","telemetry_tracking"]),ENABLED_DISABLED_SYNONYMS={off:"disabled",on:"enabled",true:"enabled",false:"disabled",enabled:"enabled",disabled:"disabled"};function toCanonicalKey(keyOrAlias){const normalized=keyOrAlias.trim().toLowerCase().replaceAll("-","_");if(FORMAT_KEYS.has(normalized)||CRITERIA_KEYS.has(normalized)||POLICY_KEYS.has(normalized)||normalized==="context")return normalized}function normalizeEnabledDisabled(value){const normalized=value.trim().toLowerCase();return ENABLED_DISABLED_SYNONYMS[normalized]??value}function resolveConfigPositionalValue(canonicalKeyOrAlias,value){const key=toCanonicalKey(canonicalKeyOrAlias);return key===void 0?{routable:!1,reason:`Unknown config key "${canonicalKeyOrAlias}" cannot route a positional value.`}:key==="context"?{routable:!1,reason:"Config set context does not accept a positional value. Use --default-depth, --activity-limit, --stale-threshold-days, or --section-<name> flags."}:FORMAT_KEYS.has(key)?{routable:!0,flag:"format",value}:CRITERIA_KEYS.has(key)?{routable:!0,flag:"criterion",values:[value]}:{routable:!0,flag:"policy",value:ENABLED_DISABLED_POLICY_KEYS.has(key)?normalizeEnabledDisabled(value):value}}export{resolveConfigPositionalValue};
|
|
2
2
|
//# sourceMappingURL=positional-value.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
!(function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="fac6b840-f5f1-51f6-b643-99b48ac864ba")}catch(e2){}})();const REMEDIATION_REGISTRY=Object.freeze([{code:"missing_directory",command:"pm init",summary:"Recreate missing tracker directories (pm init is idempotent and restores the scaffold)."},{code:"settings_read_fs_error",command:"pm config list --json",summary:"settings.json could not be read as a regular file and pm fell back to defaults; repair the reported path or permissions, then re-run."},{code:"settings_read_invalid_json",command:"pm config list --json",summary:"settings.json is not valid JSON and pm fell back to defaults; fix the syntax error in the reported path, then re-run."},{code:"settings_read_invalid_schema",command:"pm config list --json",summary:"settings.json failed schema validation and pm fell back to defaults; correct the reported key in the file, then re-run."},{code:"settings_read_merge_failed",command:"pm config list --json",summary:"Global/project settings could not be merged; reconcile the conflicting keys in the reported settings files."},{code:"settings:id_prefix_empty",command:"pm config list --json",summary:'id_prefix is empty; set a non-empty "id_prefix" in settings.json so generated item ids are well-formed.'},{code:"settings:locks_ttl_non_positive",command:"pm config list --json",summary:'locks.ttl_seconds must be positive; set a positive "locks.ttl_seconds" in settings.json.'},{code:"telemetry_state_invalid_json",command:"pm health --check-telemetry",summary:"Local telemetry state file is corrupt; pm recreates it on the next flush. Advisory only."},{code:"telemetry_queue_invalid_rows",command:"pm health --check-telemetry",summary:"The telemetry queue has unparseable rows; they are skipped on the next flush. Advisory only."},{code:"telemetry_queue_pending",command:"pm health --check-telemetry",summary:"Telemetry events are queued; they flush automatically on the next reachable command. Advisory only."},{code:"telemetry_queue_high_retries",command:"pm telemetry flush",summary:"Some queued telemetry events are near retry exhaustion; flush now and verify endpoint reachability before entries are dropped."},{code:"telemetry_endpoint_probe_failed",command:"pm health --check-telemetry",summary:"The telemetry endpoint is unreachable; events stay queued until it recovers. Advisory only."},{code:"telemetry_endpoint_probe_http_status",command:"pm health --check-telemetry",summary:"The telemetry endpoint returned a non-success status; events stay queued until it recovers. Advisory only."},{code:"telemetry_schema_version_behind",command:"pm health --check-telemetry",summary:"Client schema is behind server; upgrade pm-cli to emit the latest event shape."},{code:"telemetry_otel_export_failing",command:"pm health --check-telemetry",summary:"OTLP trace spans are queued but the traces endpoint export is failing; spans retry automatically on the next reachable command, or set PM_TELEMETRY_OTEL_DISABLED=1 to skip OTLP export. Advisory only."},{code:"merge_driver_configuration_missing",command:"pm merge install",summary:"Install the clone-local Git drivers required by the tracker merge fence."},{code:"merge_driver_configuration_drift",command:"pm merge install",summary:"Reinstall clone-local Git drivers after runtime or package paths change."},{code:"merge_fence_missing",command:"pm merge install",summary:"Install the active tracker's committed Git merge attributes."},{code:"merge_fence_drift",command:"pm merge install",summary:"Restore the active tracker's merge mappings while retaining sibling tracker fences."},{code:"validate_merge_driver_configuration",command:"pm merge install",summary:"Restore missing or drifted clone-local Git merge driver commands."},{code:"integrity_item_unreadable",command:"pm validate --check-files --verbose-diagnostics",summary:"An item file could not be read; restore or repair the file at the reported path."},{code:"integrity_item_parse_failed",command:"pm validate --check-files --verbose-diagnostics",summary:"An item file failed to parse; fix the malformed item metadata at the reported path."},{code:"integrity_item_conflict_marker",command:"pm validate --check-files --verbose-diagnostics",summary:"An item file contains Git conflict markers; resolve the <<<<<<< / >>>>>>> markers at the reported line."},{code:"integrity_history_unreadable",command:"pm history-repair <id>",summary:"A history stream could not be read; re-anchor the affected item's history chain."},{code:"integrity_history_invalid_json",command:"pm history-repair <id>",summary:"A history stream contains invalid JSON; re-anchor the affected item's history chain."},{code:"integrity_history_conflict_marker",command:"pm history-repair <id>",summary:"A history stream contains Git conflict markers; resolve the markers, then re-anchor the chain."},{code:"validate_storage_unreadable_items",command:"pm validate --check-storage-integrity --verbose-diagnostics",summary:"An on-disk item file cannot be parsed (for example a botched merge resolution with stale TOON count headers); repair or restore the file at the reported path \u2014 list commands silently skip it while pm get hard-errors."},{code:"validate_storage_duplicate_item_ids",command:"pm validate --check-storage-integrity --verbose-diagnostics",summary:"One item id is claimed by multiple item documents \u2014 usually two branches minting the same id for different items before merging (GH-600). Keep one document, recreate the other item under a fresh id (pm copy, then delete the colliding file), and consider raising ids.token_length for concurrent multi-agent work."},{code:"validate_storage_history_conflict_markers",command:"pm merge driver history <base> <ours> <theirs>",summary:"A history stream contains unresolved Git conflict markers; re-merge it with the pm history merge driver (or resolve the markers by hand), then run pm history-repair for the item."},{code:"validate_storage_unparseable_history",command:"pm history-repair <id>",summary:"A history stream's newest line is not valid JSONL; repair or restore the stream before further mutations."},{code:"validate_storage_resurrected_items",command:"pm delete <id>",summary:"A live item's newest history operation is a delete: a delete/modify merge silently resurrected it. Decide the winner \u2014 re-delete the item, or keep it and append a mutation documenting the revival."},{code:"validate_storage_unparseable_config",command:"pm merge driver json <base> <ours> <theirs>",summary:"settings.json or a schema file cannot be parsed, so pm silently falls back to defaults; re-merge it with the pm JSON merge driver or fix the file by hand, then rerun pm validate."},{code:"validate_merge_fence_drift",command:"pm merge install",summary:"The committed .gitattributes merge fence no longer matches the active schema's type folders or tracker JSONL stores; rerun pm merge install (and commit .gitattributes) so every tracker artifact keeps its field-aware merge driver."},{code:"validate_storage_tracked_runtime_cache_files",command:"git rm --cached -r -- <tracked-runtime-directories>",summary:"Clone-local tracker runtime artifacts are committed. Run the exact tracked_runtime_cache.remediation_command, commit the index-only removals and managed .gitignore fence, then rerun validation."},{code:"integrity_item_outdated_format_version",command:"pm validate --verbose-diagnostics",summary:"An item predates the current storage format version; a pm storage migration rewrites it. Use --verbose-diagnostics to list the affected items."},{code:"integrity_item_ahead_format_version",command:"npm install -g @unbrained/pm-cli@latest",summary:"An item was written by a newer pm format version than this runtime supports; upgrade pm to read and validate it safely."},{code:"tracked_runtime_cache_files",command:"git rm --cached -r -- <tracked-runtime-directories>",summary:"Clone-local tracker runtime artifacts are committed. Run the exact tracked_runtime_cache.remediation_command from the integrity check, commit the index-only removals, and keep the managed .gitignore fence."},{code:"merge_decisions_unreviewed",command:"pm merge reconcile --dry-run",summary:"Review the pending merge receipts, re-apply any intended discarded values, then run pm merge reconcile; lossy receipts require explicit --force acceptance."},{code:"merge_receipts_pending",command:"pm merge reconcile",summary:"A lossless merge receipt is still pending; run pm merge reconcile to settle it (optionally preview first with --dry-run) so a green health gate certifies receipt settlement, not only intact data."},{code:"merge_receipt_evidence_invalid",command:"pm merge report --include-reconciled --json",summary:"One or more receipt candidates failed bounded-file, schema, identity, or copy-consistency validation; inspect the report's privacy-safe source, receipt id, and reason before repairing only the named evidence."},{code:"merge_receipt_history_reference_missing",command:"pm merge reconcile --dry-run",summary:"Review the bounded coordinates and recover available evidence first; for exact pre-durable clone-local-only references, rerun with --force so pm appends an audited disposition and proves the health finding is cleared without rewriting history."},{code:"validate_merge_decisions_unreviewed",command:"pm merge reconcile --dry-run",summary:"Review the pending merge receipts before reconciliation; history-repair alone does not settle them, and lossy receipts require explicit --force acceptance."},{code:"history_drift_missing_stream",command:"pm history-repair <id>",summary:"The item has no history stream; re-anchor the chain to rebuild it (pm history-repair --all repairs every drifted stream in one pass)."},{code:"history_drift_unreadable_stream",command:"pm history-repair <id>",summary:"The item's history stream is unreadable; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass)."},{code:"history_drift_hash_mismatch",command:"pm history-repair <id>",summary:"The item's content hash no longer matches its history; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass)."},{code:"history_drift_chain_mismatch",command:"pm history-repair <id>",summary:"The item's history chain is broken; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass)."},{code:"history_drift_version_skew",command:"npm install -g @unbrained/pm-cli@latest",summary:"A history stream declares an item hash version this runtime does not support; upgrade pm to verify the chain instead of re-anchoring it."},{code:"history_drift_merge_receipt",command:"pm merge reconcile",summary:"Canonical path, changed-field, and merged-value hash evidence attributes this drift to a pending receipt; run reconciliation (optionally preview first with --dry-run) instead of repairing history directly."},{code:"history_stream_over_compact_threshold",command:"pm history-compact <id>",summary:"The history stream exceeds the configured compaction threshold; compact it (pm history-compact --all-streams sweeps every over-threshold stream in one pass)."},{code:"history_unknown_author_events",command:'pm history-author-acknowledge --all-actionable --attributed-author "<principal>" --reviewer "<reviewer>" --reason "<evidence>"',summary:"Review the actionable coordinates, then record an append-only attribution disposition for the complete current set."},{code:"provenance_value_domain_invalid",command:"pm history-repair --all --normalize-provenance",summary:"Remove invalid bounded provenance observations from affected streams and append privacy-safe aggregate repair receipts."},{code:"validate_history_unknown_author_events",command:'pm history-author-acknowledge --all-actionable --attributed-author "<principal>" --reviewer "<reviewer>" --reason "<evidence>"',summary:"Review the actionable coordinates, then record an append-only attribution disposition for the complete current set."},{code:"locks_stale_count",command:"pm gc --scope locks",summary:"Stale item-claim locks (embedded ttl elapsed) can block mutations; sweep them \u2014 gc retains active and unparseable locks."},{code:"locks_unreadable",command:"pm gc --scope locks --dry-run",summary:"Some lock files could not be read; preview the sweep and inspect the unreadable files manually \u2014 gc never deletes what it cannot read."},{code:"extension_update_health_partial_coverage",command:"pm extension --adopt-all --project",summary:"Update-health coverage is partial because unmanaged extensions were skipped; adopt the existing installs into managed metadata so the update scan covers them (use --global for global-scope extensions, or pm package --adopt-all when working with packages)."},{code:"vectorization_stale_items_remaining",command:"pm health --refresh-vectors",summary:"Some items have stale embeddings; refresh vectors so semantic search results stay current."},{code:"vectorization_embedding_identity_changed",command:"pm reindex --mode semantic",summary:"Embedding provider/model changed since the last index; run a semantic reindex to rebuild vectors."},{code:"validate_metadata_missing_closed_at",command:"pm validate --check-metadata --auto-fix --fix-scope timestamps --dry-run",summary:"Preview closure dates proven by verified lifecycle history; inspect residuals and omit --dry-run to apply only proven dates."},{code:"validate_metadata_missing_acceptance_criteria",command:'pm update <id> --acceptance-criteria "<criteria>"',summary:"Backfill the missing acceptance criteria on the reported item(s)."},{code:"validate_metadata_missing_estimate",command:'pm update <id> --estimate "<estimate>"',summary:"Backfill the missing estimate on the reported item(s)."},{code:"validate_metadata_missing_close_reason",command:'pm update <id> --close-reason "<reason>"',summary:"Backfill the missing close reason on the reported closed item(s)."},{code:"validate_metadata_missing_reviewer",command:'pm update <id> --reviewer "<name>"',summary:"Backfill the missing reviewer on the reported item(s)."},{code:"validate_metadata_missing_risk",command:'pm update <id> --risk "<level>"',summary:"Backfill the missing risk on the reported item(s)."},{code:"validate_metadata_missing_confidence",command:'pm update <id> --confidence "<level>"',summary:"Backfill the missing confidence on the reported item(s)."},{code:"validate_metadata_missing_sprint",command:'pm update <id> --sprint "<sprint>"',summary:"Backfill the missing sprint on the reported item(s)."},{code:"validate_metadata_missing_release",command:'pm update <id> --release "<release>"',summary:"Backfill the missing release on the reported item(s)."},{code:"validate_metadata_custom_profile_missing_required_fields",command:'pm config set metadata-required-fields --criterion "<field>"',summary:"Config-driven finding: the custom metadata profile has no required fields configured and falls back to core, so configure the fields rather than mutating items."},{code:"validate_metadata_duplicate_issue_codes",command:'pm update <id> --title "<distinct title>"',summary:"Two or more items share one logical issue code (GH-235); give each a distinct title so the derived code is unique, or close the redundant item with pm close <id> --duplicate-of <canonical-id> (closed-as-duplicate items are excluded from the check)."},{code:"validate_resolution_missing_fields",command:'pm update <id> --resolution "<how resolved>"',summary:"Backfill resolution / expected_result / actual_result on the reported closed item(s)."},{code:"validate_lifecycle_active_closure_like_metadata",command:"pm update <id> --unset <closure-like-field>",summary:"Clear the closure-like field the validator flags on this active item \u2014 the detail row names it (resolution / actual-result / blocked-reason) \u2014 or close the item if it is actually done."},{code:"validate_lifecycle_active_terminal_parent",command:"pm update <id> --parent <active-parent-id>",summary:"Reopen the terminal parent or move the active child under a non-terminal parent."},{code:"validate_lifecycle_stale_blockers",command:"pm update <id> --unset blocked-by --unset blocked-reason",summary:"Resolve the stale blocker the validator flags: clear blocked-by/blocked-reason when they linger on a non-blocked item or report a resolved blocker; if instead a blocked item is missing blocker context, add the context or move it out of a blocked status."},{code:"validate_lifecycle_dependency_cycles_error",command:"pm update <id> --dep-remove <dep-id>",summary:"Break the dependency cycle by removing one edge from the reported cycle."},{code:"validate_lifecycle_dependency_cycles",command:"pm update <id> --dep-remove <dep-id>",summary:"Break the dependency cycle by removing one edge from the reported cycle."},{code:"validate_hierarchy_parent_cycle_error",command:"pm update <id> --parent <other-id>",summary:"Break the parent-hierarchy cycle by reparenting one item in the reported cycle to a non-cyclic parent (or clear it with pm update <id> --unset parent)."},{code:"validate_hierarchy_parent_cycle",command:"pm update <id> --parent <other-id>",summary:"Break the parent-hierarchy cycle by reparenting one item in the reported cycle to a non-cyclic parent (or clear it with pm update <id> --unset parent)."},{code:"validate_files_missing_linked_paths",command:"pm <files|docs> <id> --remove <path>",summary:"The check spans both item.files and item.docs under one code: restore the missing linked artifact, or unlink it with pm files (linked file) or pm docs (linked doc)."},{code:"validate_files_orphaned_paths",command:"pm <files|docs> <id> --add <path>",summary:"Link the orphaned artifact with pm files (file) or pm docs (doc), or remove it from the workspace."},{code:"validate_files_tracked_all_strict_forces_pm_internals",command:"pm validate --check-files --include-pm-internals",summary:"tracked-all-strict scan flagged pm internals; re-run with --include-pm-internals or a softer --scan-mode."},{code:"validate_history_drift_missing_streams",command:"pm history-repair <id>",summary:"Re-anchor the history chains of the items missing a history stream."},{code:"validate_history_drift_unreadable_streams",command:"pm history-repair <id>",summary:"Re-anchor the history chains of the items with an unreadable history stream."},{code:"validate_history_drift_hash_mismatches",command:"pm history-repair <id>",summary:"Re-anchor the history chains of the items whose content hash drifted."},{code:"validate_history_drift_chain_mismatches",command:"pm history-repair <id>",summary:"Re-anchor the history chains of the items with a broken history chain."},{code:"validate_history_drift_version_skews",command:"npm install -g @unbrained/pm-cli@latest",summary:"One or more history streams declare an item hash version this runtime does not support; upgrade pm to verify the chains instead of re-anchoring them."},{code:"validate_command_references_stale_pm_ids",command:'pm update <id> --replace-tests --test "command=<corrected-command>" [--test ...]',summary:"Correct the stale pm-ID inside the item's linked test command (the check scans tests[].command, not the body). --replace-tests overwrites the entire tests list, so re-include the item's other linked tests in the same call."},{code:"validate_format_version_outdated_items",command:"pm validate --verbose-diagnostics",summary:"One or more items predate the current storage format version; a pm storage migration rewrites them. Use --verbose-diagnostics to list the affected items."},{code:"validate_format_version_ahead_items",command:"npm install -g @unbrained/pm-cli@latest",summary:"One or more items were written by a newer pm format version than this runtime supports; upgrade pm to read and validate them safely."}]);function resolveRemediation(warning){if(typeof warning!=="string"){return void 0}const normalized=warning.trim();for(const entry of REMEDIATION_REGISTRY){if(normalized===entry.code||normalized.startsWith(`${entry.code}:`)){return entry}}return void 0}function buildRemediationMap(warnings){const map={};for(const warning of warnings){const entry=resolveRemediation(warning);if(entry!==void 0&&!Object.prototype.hasOwnProperty.call(map,entry.code)){map[entry.code]=entry.command}}return map}function buildRemediationCommands(warnings){return Object.values(buildRemediationMap(warnings))}export{REMEDIATION_REGISTRY,buildRemediationCommands,buildRemediationMap,resolveRemediation};
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3d7db45e-123f-596b-afc7-b698f2b2f45c")}catch{}})();const REMEDIATION_REGISTRY=Object.freeze([{code:"missing_directory",command:"pm init",summary:"Recreate missing tracker directories (pm init is idempotent and restores the scaffold)."},{code:"settings_read_fs_error",command:"pm config list --json",summary:"settings.json could not be read as a regular file and pm fell back to defaults; repair the reported path or permissions, then re-run."},{code:"settings_read_invalid_json",command:"pm config list --json",summary:"settings.json is not valid JSON and pm fell back to defaults; fix the syntax error in the reported path, then re-run."},{code:"settings_read_invalid_schema",command:"pm config list --json",summary:"settings.json failed schema validation and pm fell back to defaults; correct the reported key in the file, then re-run."},{code:"settings_read_merge_failed",command:"pm config list --json",summary:"Global/project settings could not be merged; reconcile the conflicting keys in the reported settings files."},{code:"settings:id_prefix_empty",command:"pm config list --json",summary:'id_prefix is empty; set a non-empty "id_prefix" in settings.json so generated item ids are well-formed.'},{code:"settings:locks_ttl_non_positive",command:"pm config list --json",summary:'locks.ttl_seconds must be positive; set a positive "locks.ttl_seconds" in settings.json.'},{code:"telemetry_state_invalid_json",command:"pm health --check-telemetry",summary:"Local telemetry state file is corrupt; pm recreates it on the next flush. Advisory only."},{code:"telemetry_queue_invalid_rows",command:"pm health --check-telemetry",summary:"The telemetry queue has unparseable rows; they are skipped on the next flush. Advisory only."},{code:"telemetry_queue_pending",command:"pm health --check-telemetry",summary:"Telemetry events are queued; they flush automatically on the next reachable command. Advisory only."},{code:"telemetry_queue_high_retries",command:"pm telemetry flush",summary:"Some queued telemetry events are near retry exhaustion; flush now and verify endpoint reachability before entries are dropped."},{code:"telemetry_endpoint_probe_failed",command:"pm health --check-telemetry",summary:"The telemetry endpoint is unreachable; events stay queued until it recovers. Advisory only."},{code:"telemetry_endpoint_probe_http_status",command:"pm health --check-telemetry",summary:"The telemetry endpoint returned a non-success status; events stay queued until it recovers. Advisory only."},{code:"telemetry_schema_version_behind",command:"pm health --check-telemetry",summary:"Client schema is behind server; upgrade pm-cli to emit the latest event shape."},{code:"telemetry_otel_export_failing",command:"pm health --check-telemetry",summary:"OTLP trace spans are queued but the traces endpoint export is failing; spans retry automatically on the next reachable command, or set PM_TELEMETRY_OTEL_DISABLED=1 to skip OTLP export. Advisory only."},{code:"merge_driver_configuration_missing",command:"pm merge install",summary:"Install the clone-local Git drivers required by the tracker merge fence."},{code:"merge_driver_configuration_drift",command:"pm merge install",summary:"Reinstall clone-local Git drivers after runtime or package paths change."},{code:"merge_fence_missing",command:"pm merge install",summary:"Install the active tracker's committed Git merge attributes."},{code:"merge_fence_drift",command:"pm merge install",summary:"Restore the active tracker's merge mappings while retaining sibling tracker fences."},{code:"validate_merge_driver_configuration",command:"pm merge install",summary:"Restore missing or drifted clone-local Git merge driver commands."},{code:"integrity_item_unreadable",command:"pm validate --check-files --verbose-diagnostics",summary:"An item file could not be read; restore or repair the file at the reported path."},{code:"integrity_item_parse_failed",command:"pm validate --check-files --verbose-diagnostics",summary:"An item file failed to parse; fix the malformed item metadata at the reported path."},{code:"integrity_item_conflict_marker",command:"pm validate --check-files --verbose-diagnostics",summary:"An item file contains Git conflict markers; resolve the <<<<<<< / >>>>>>> markers at the reported line."},{code:"integrity_history_unreadable",command:"pm history-repair <id>",summary:"A history stream could not be read; re-anchor the affected item's history chain."},{code:"integrity_history_invalid_json",command:"pm history-repair <id>",summary:"A history stream contains invalid JSON; re-anchor the affected item's history chain."},{code:"integrity_history_conflict_marker",command:"pm history-repair <id>",summary:"A history stream contains Git conflict markers; resolve the markers, then re-anchor the chain."},{code:"validate_storage_unreadable_items",command:"pm validate --check-storage-integrity --verbose-diagnostics",summary:"An on-disk item file cannot be parsed (for example a botched merge resolution with stale TOON count headers); repair or restore the file at the reported path \u2014 list commands silently skip it while pm get hard-errors."},{code:"validate_storage_duplicate_item_ids",command:"pm validate --check-storage-integrity --verbose-diagnostics",summary:"One item id is claimed by multiple item documents \u2014 usually two branches minting the same id for different items before merging (GH-600). Keep one document, recreate the other item under a fresh id (pm copy, then delete the colliding file), and consider raising ids.token_length for concurrent multi-agent work."},{code:"validate_storage_history_conflict_markers",command:"pm merge driver history <base> <ours> <theirs>",summary:"A history stream contains unresolved Git conflict markers; re-merge it with the pm history merge driver (or resolve the markers by hand), then run pm history-repair for the item."},{code:"validate_storage_unparseable_history",command:"pm history-repair <id>",summary:"A history stream's newest line is not valid JSONL; repair or restore the stream before further mutations."},{code:"validate_storage_resurrected_items",command:"pm delete <id>",summary:"A live item's newest history operation is a delete: a delete/modify merge silently resurrected it. Decide the winner \u2014 re-delete the item, or keep it and append a mutation documenting the revival."},{code:"validate_storage_unparseable_config",command:"pm merge driver json <base> <ours> <theirs>",summary:"settings.json or a schema file cannot be parsed, so pm silently falls back to defaults; re-merge it with the pm JSON merge driver or fix the file by hand, then rerun pm validate."},{code:"validate_merge_fence_drift",command:"pm merge install",summary:"The committed .gitattributes merge fence no longer matches the active schema's type folders or tracker JSONL stores; rerun pm merge install (and commit .gitattributes) so every tracker artifact keeps its field-aware merge driver."},{code:"validate_storage_tracked_runtime_cache_files",command:"git rm --cached -r -- <tracked-runtime-directories>",summary:"Clone-local tracker runtime artifacts are committed. Run the exact tracked_runtime_cache.remediation_command, commit the index-only removals and managed .gitignore fence, then rerun validation."},{code:"integrity_item_outdated_format_version",command:"pm validate --verbose-diagnostics",summary:"An item predates the current storage format version; a pm storage migration rewrites it. Use --verbose-diagnostics to list the affected items."},{code:"integrity_item_ahead_format_version",command:"npm install -g @unbrained/pm-cli@latest",summary:"An item was written by a newer pm format version than this runtime supports; upgrade pm to read and validate it safely."},{code:"tracked_runtime_cache_files",command:"git rm --cached -r -- <tracked-runtime-directories>",summary:"Clone-local tracker runtime artifacts are committed. Run the exact tracked_runtime_cache.remediation_command from the integrity check, commit the index-only removals, and keep the managed .gitignore fence."},{code:"merge_decisions_unreviewed",command:"pm merge reconcile --dry-run",summary:"Review the pending merge receipts, re-apply any intended discarded values, then run pm merge reconcile; lossy receipts require explicit --force acceptance."},{code:"merge_receipts_pending",command:"pm merge reconcile",summary:"A lossless merge receipt is still pending; run pm merge reconcile to settle it (optionally preview first with --dry-run) so a green health gate certifies receipt settlement, not only intact data."},{code:"merge_receipt_evidence_invalid",command:"pm merge report --include-reconciled --json",summary:"One or more receipt candidates failed bounded-file, schema, identity, or copy-consistency validation; inspect the report's privacy-safe source, receipt id, and reason before repairing only the named evidence."},{code:"merge_receipt_history_reference_missing",command:"pm merge reconcile --dry-run",summary:"Review the bounded coordinates and recover available evidence first; for exact pre-durable clone-local-only references, rerun with --force so pm appends an audited disposition and proves the health finding is cleared without rewriting history."},{code:"validate_merge_decisions_unreviewed",command:"pm merge reconcile --dry-run",summary:"Review the pending merge receipts before reconciliation; history-repair alone does not settle them, and lossy receipts require explicit --force acceptance."},{code:"history_drift_missing_stream",command:"pm history-repair <id>",summary:"The item has no history stream; re-anchor the chain to rebuild it (pm history-repair --all repairs every drifted stream in one pass)."},{code:"history_drift_unreadable_stream",command:"pm history-repair <id>",summary:"The item's history stream is unreadable; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass)."},{code:"history_drift_hash_mismatch",command:"pm history-repair <id>",summary:"The item's content hash no longer matches its history; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass)."},{code:"history_drift_chain_mismatch",command:"pm history-repair <id>",summary:"The item's history chain is broken; re-anchor the chain (pm history-repair --all repairs every drifted stream in one pass)."},{code:"history_drift_version_skew",command:"npm install -g @unbrained/pm-cli@latest",summary:"A history stream declares an item hash version this runtime does not support; upgrade pm to verify the chain instead of re-anchoring it."},{code:"history_drift_merge_receipt",command:"pm merge reconcile",summary:"Canonical path, changed-field, and merged-value hash evidence attributes this drift to a pending receipt; run reconciliation (optionally preview first with --dry-run) instead of repairing history directly."},{code:"history_stream_over_compact_threshold",command:"pm history-compact <id>",summary:"The history stream exceeds the configured compaction threshold; compact it (pm history-compact --all-streams sweeps every over-threshold stream in one pass)."},{code:"history_unknown_author_events",command:'pm history-author-acknowledge --all-actionable --attributed-author "<principal>" --reviewer "<reviewer>" --reason "<evidence>"',summary:"Review the actionable coordinates, then record an append-only attribution disposition for the complete current set."},{code:"provenance_value_domain_invalid",command:"pm history-repair --all --normalize-provenance",summary:"Remove invalid bounded provenance observations from affected streams and append privacy-safe aggregate repair receipts."},{code:"validate_history_unknown_author_events",command:'pm history-author-acknowledge --all-actionable --attributed-author "<principal>" --reviewer "<reviewer>" --reason "<evidence>"',summary:"Review the actionable coordinates, then record an append-only attribution disposition for the complete current set."},{code:"locks_stale_count",command:"pm gc --scope locks",summary:"Stale item-claim locks (embedded ttl elapsed) can block mutations; sweep them \u2014 gc retains active and unparseable locks."},{code:"locks_unreadable",command:"pm gc --scope locks --dry-run",summary:"Some lock files could not be read; preview the sweep and inspect the unreadable files manually \u2014 gc never deletes what it cannot read."},{code:"extension_update_health_partial_coverage",command:"pm extension --adopt-all --project",summary:"Update-health coverage is partial because unmanaged extensions were skipped; adopt the existing installs into managed metadata so the update scan covers them (use --global for global-scope extensions, or pm package --adopt-all when working with packages)."},{code:"vectorization_stale_items_remaining",command:"pm health --refresh-vectors",summary:"Some items have stale embeddings; refresh vectors so semantic search results stay current."},{code:"vectorization_embedding_identity_changed",command:"pm reindex --mode semantic",summary:"Embedding provider/model changed since the last index; run a semantic reindex to rebuild vectors."},{code:"validate_metadata_missing_closed_at",command:"pm validate --check-metadata --auto-fix --fix-scope timestamps --dry-run",summary:"Preview closure dates proven by verified lifecycle history; inspect residuals and omit --dry-run to apply only proven dates."},{code:"validate_metadata_missing_acceptance_criteria",command:'pm update <id> --acceptance-criteria "<criteria>"',summary:"Backfill the missing acceptance criteria on the reported item(s)."},{code:"validate_metadata_missing_estimate",command:'pm update <id> --estimate "<estimate>"',summary:"Backfill the missing estimate on the reported item(s)."},{code:"validate_metadata_missing_close_reason",command:'pm update <id> --close-reason "<reason>"',summary:"Backfill the missing close reason on the reported closed item(s)."},{code:"validate_metadata_missing_reviewer",command:'pm update <id> --reviewer "<name>"',summary:"Backfill the missing reviewer on the reported item(s)."},{code:"validate_metadata_missing_risk",command:'pm update <id> --risk "<level>"',summary:"Backfill the missing risk on the reported item(s)."},{code:"validate_metadata_missing_confidence",command:'pm update <id> --confidence "<level>"',summary:"Backfill the missing confidence on the reported item(s)."},{code:"validate_metadata_missing_sprint",command:'pm update <id> --sprint "<sprint>"',summary:"Backfill the missing sprint on the reported item(s)."},{code:"validate_metadata_missing_release",command:'pm update <id> --release "<release>"',summary:"Backfill the missing release on the reported item(s)."},{code:"validate_metadata_custom_profile_missing_required_fields",command:'pm config set metadata-required-fields --criterion "<field>"',summary:"Config-driven finding: the custom metadata profile has no required fields configured and falls back to core, so configure the fields rather than mutating items."},{code:"validate_metadata_duplicate_issue_codes",command:'pm update <id> --title "<distinct title>"',summary:"Two or more items share one logical issue code (GH-235); give each a distinct title so the derived code is unique, or close the redundant item with pm close <id> --duplicate-of <canonical-id> (closed-as-duplicate items are excluded from the check)."},{code:"validate_resolution_missing_fields",command:'pm update <id> --resolution "<how resolved>"',summary:"Backfill resolution / expected_result / actual_result on the reported closed item(s)."},{code:"validate_lifecycle_active_closure_like_metadata",command:"pm update <id> --unset <closure-like-field>",summary:"Clear the closure-like field the validator flags on this active item \u2014 the detail row names it (resolution / actual-result / blocked-reason) \u2014 or close the item if it is actually done."},{code:"validate_lifecycle_active_terminal_parent",command:"pm update <id> --parent <active-parent-id>",summary:"Reopen the terminal parent or move the active child under a non-terminal parent."},{code:"validate_lifecycle_stale_blockers",command:"pm update <id> --unset blocked-by --unset blocked-reason",summary:"Resolve the stale blocker the validator flags: clear blocked-by/blocked-reason when they linger on a non-blocked item or report a resolved blocker; if instead a blocked item is missing blocker context, add the context or move it out of a blocked status."},{code:"validate_lifecycle_dependency_cycles_error",command:"pm update <id> --dep-remove <dep-id>",summary:"Break the dependency cycle by removing one edge from the reported cycle."},{code:"validate_lifecycle_dependency_cycles",command:"pm update <id> --dep-remove <dep-id>",summary:"Break the dependency cycle by removing one edge from the reported cycle."},{code:"validate_hierarchy_parent_cycle_error",command:"pm update <id> --parent <other-id>",summary:"Break the parent-hierarchy cycle by reparenting one item in the reported cycle to a non-cyclic parent (or clear it with pm update <id> --unset parent)."},{code:"validate_hierarchy_parent_cycle",command:"pm update <id> --parent <other-id>",summary:"Break the parent-hierarchy cycle by reparenting one item in the reported cycle to a non-cyclic parent (or clear it with pm update <id> --unset parent)."},{code:"validate_files_missing_linked_paths",command:"pm <files|docs> <id> --remove <path>",summary:"The check spans both item.files and item.docs under one code: restore the missing linked artifact, or unlink it with pm files (linked file) or pm docs (linked doc)."},{code:"validate_files_orphaned_paths",command:"pm <files|docs> <id> --add <path>",summary:"Link the orphaned artifact with pm files (file) or pm docs (doc), or remove it from the workspace."},{code:"validate_files_tracked_all_strict_forces_pm_internals",command:"pm validate --check-files --include-pm-internals",summary:"tracked-all-strict scan flagged pm internals; re-run with --include-pm-internals or a softer --scan-mode."},{code:"validate_history_drift_missing_streams",command:"pm history-repair <id>",summary:"Re-anchor the history chains of the items missing a history stream."},{code:"validate_history_drift_unreadable_streams",command:"pm history-repair <id>",summary:"Re-anchor the history chains of the items with an unreadable history stream."},{code:"validate_history_drift_hash_mismatches",command:"pm history-repair <id>",summary:"Re-anchor the history chains of the items whose content hash drifted."},{code:"validate_history_drift_chain_mismatches",command:"pm history-repair <id>",summary:"Re-anchor the history chains of the items with a broken history chain."},{code:"validate_history_drift_version_skews",command:"npm install -g @unbrained/pm-cli@latest",summary:"One or more history streams declare an item hash version this runtime does not support; upgrade pm to verify the chains instead of re-anchoring them."},{code:"validate_command_references_stale_pm_ids",command:'pm update <id> --replace-tests --test "command=<corrected-command>" [--test ...]',summary:"Correct the stale pm-ID inside the item's linked test command (the check scans tests[].command, not the body). --replace-tests overwrites the entire tests list, so re-include the item's other linked tests in the same call."},{code:"validate_format_version_outdated_items",command:"pm validate --verbose-diagnostics",summary:"One or more items predate the current storage format version; a pm storage migration rewrites them. Use --verbose-diagnostics to list the affected items."},{code:"validate_format_version_ahead_items",command:"npm install -g @unbrained/pm-cli@latest",summary:"One or more items were written by a newer pm format version than this runtime supports; upgrade pm to read and validate them safely."}]);function resolveRemediation(warning){if(typeof warning!="string")return;const normalized=warning.trim();for(const entry of REMEDIATION_REGISTRY)if(normalized===entry.code||normalized.startsWith(`${entry.code}:`))return entry}function buildRemediationMap(warnings){const map={};for(const warning of warnings){const entry=resolveRemediation(warning);entry!==void 0&&!Object.prototype.hasOwnProperty.call(map,entry.code)&&(map[entry.code]=entry.command)}return map}function buildRemediationCommands(warnings){return Object.values(buildRemediationMap(warnings))}export{REMEDIATION_REGISTRY,buildRemediationCommands,buildRemediationMap,resolveRemediation};
|
|
2
2
|
//# sourceMappingURL=remediation.js.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3984f1ef-1703-5a83-a4fa-ec1cdc738572")}catch{}})();const MIN_HEADING_LEVEL=1,MAX_HEADING_LEVEL=6,SURFACE_SECTIONS=[["commands","Commands"],["command_overrides","Command overrides"],["flag_commands","Flag commands"],["item_types","Item types"],["item_fields","Item fields"],["migrations","Migrations"],["profiles","Profiles"],["importers","Importers"],["exporters","Exporters"],["search_providers","Search providers"],["vector_store_adapters","Vector store adapters"],["assurance_providers","Assurance measurement providers"],["hooks","Lifecycle hooks"],["parser_overrides","Parser overrides"],["service_overrides","Service overrides"],["renderer_overrides","Renderer overrides"]];function headingPrefix(level){return"#".repeat(level)}function code(value){if(!value.includes("`"))return`\`${value}\``;let longestRun=0,currentRun=0;for(const char of value)currentRun=char==="`"?currentRun+1:0,longestRun=Math.max(longestRun,currentRun);const fence="`".repeat(longestRun+1),pad=value.startsWith("`")||value.endsWith("`")?" ":"";return`${fence}${pad}${value}${pad}${fence}`}function renderCapabilitiesLine(capabilities){return capabilities.length===0?"Capabilities: _none registered_":`Capabilities: ${capabilities.map(code).join(", ")}`}function renderSection(heading,level,entries){const lines=[`${headingPrefix(level)} ${heading}`,""];return entries.length===0?(lines.push("_None._",""),lines):(lines.push(...entries.map(entry=>`- ${code(entry)}`),""),lines)}function renderPreflightSection(count,level,includeEmpty){return count===0&&!includeEmpty?[]:[`${headingPrefix(level)} Preflight overrides`,"",count>0?`- ${count} registered (this surface carries no per-entry identifier)`:"_None._",""]}function renderExtensionSurfaceMarkdown(summary,options={}){const titleLevel=options.headingLevel??2;if(!Number.isInteger(titleLevel)||titleLevel<1||titleLevel>6)throw new RangeError(`headingLevel must be an integer in [1, 6], received ${String(options.headingLevel)}`);const sectionLevel=Math.min(titleLevel+1,6),includeEmpty=options.includeEmpty===!0,title=options.title??"Extension surfaces",lines=[`${headingPrefix(titleLevel)} ${title}`,""];(includeEmpty||summary.capabilities.length>0)&&lines.push(renderCapabilitiesLine(summary.capabilities),"");for(const[field,heading]of SURFACE_SECTIONS){const entries=summary[field]??[];entries.length===0&&!includeEmpty||lines.push(...renderSection(heading,sectionLevel,entries))}return lines.push(...renderPreflightSection(summary.preflight_overrides,sectionLevel,includeEmpty)),!(summary.preflight_overrides>0||SURFACE_SECTIONS.some(([field])=>(summary[field]?.length??0)>0))&&!includeEmpty&&lines.push("_This extension registers no surfaces._",""),`${lines.join(`
|
|
2
|
+
`).trimEnd()}
|
|
2
3
|
`}export{renderExtensionSurfaceMarkdown};
|
|
3
4
|
//# sourceMappingURL=activation-summary-markdown.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="184c43e0-a543-5b0b-ac09-9139ba5ded6a")}catch{}})();import{collectUsedExtensionCapabilities,normalizeExtensionName}from"./capability-usage.js";const HOOK_REGISTRY_FIELD_TO_KIND=[["beforeCommand","before_command"],["beforeMutation","before_mutation"],["afterCommand","after_command"],["onWrite","on_write"],["onRead","on_read"],["onIndex","on_index"]];function describeExtensionActivation(activation,options={}){const filters=new Set;options.extensionName!==void 0&&filters.add(normalizeExtensionName(options.extensionName));for(const name of options.extensionNames??[])filters.add(normalizeExtensionName(name));const matches=name=>filters.size===0||filters.has(normalizeExtensionName(name)),collect=(entries,identify)=>sortUnique(entries.filter(entry=>matches(entry.name)).map(identify)),collectFlat=(entries,expand)=>sortUnique(entries.filter(entry=>matches(entry.name)).flatMap(expand)),{registrations,commands,parsers,preflight,services,renderers,hooks}=activation,relationshipKinds=collectFlat(registrations.relationship_kinds??[],entry=>entry.definitions.map(definition=>definition.kind)),rendererOwnership=renderers.overrides.filter(entry=>matches(entry.name)&&((entry.commands?.length??0)>0||entry.resultDiscriminator!==void 0)).map(entry=>({format:entry.format,commands:[...entry.commands??[]],result_discriminator:entry.resultDiscriminator!==void 0})).sort((left,right)=>left.format.localeCompare(right.format)),assuranceProviders=collect(registrations.assurance_providers??[],entry=>entry.definition.id);return{capabilities:collectUsedExtensionCapabilities(activation,options),commands:collect(registrations.commands,entry=>entry.command),command_overrides:collect(commands.overrides,entry=>entry.command),command_handlers:collect(commands.handlers,entry=>entry.command),hooks:HOOK_REGISTRY_FIELD_TO_KIND.filter(([field])=>hooks[field].some(entry=>matches(entry.name))).map(([,kind])=>kind),flag_commands:collect(registrations.flags,entry=>entry.target_command),item_types:collectFlat(registrations.item_types,entry=>entry.types.map(type=>type.name)),item_fields:collectFlat(registrations.item_fields,entry=>entry.fields.map(field=>field.name)),...relationshipKinds.length>0?{relationship_kinds:relationshipKinds}:{},migrations:collectFlat(registrations.migrations,entry=>typeof entry.definition.id=="string"?[entry.definition.id]:[]),profiles:collect(registrations.profiles,entry=>entry.profile.name),importers:collect(registrations.importers,entry=>entry.importer),exporters:collect(registrations.exporters,entry=>entry.exporter),search_providers:collect(registrations.search_providers,entry=>entry.definition.name),vector_store_adapters:collect(registrations.vector_store_adapters,entry=>entry.definition.name),...assuranceProviders.length>0?{assurance_providers:assuranceProviders}:{},parser_overrides:collect(parsers.overrides,entry=>entry.command),service_overrides:collect(services.overrides,entry=>entry.service),renderer_overrides:collect(renderers.overrides,entry=>entry.format),...rendererOwnership.length>0?{renderer_ownership:rendererOwnership}:{},preflight_overrides:preflight.overrides.filter(entry=>matches(entry.name)).length,preflight_ownership:preflight.overrides.filter(entry=>matches(entry.name)).map(entry=>({commands:[...entry.commands??[]]}))}}function sortUnique(values){return[...new Set(values)].sort((left,right)=>left.localeCompare(right))}export{describeExtensionActivation};
|
|
2
2
|
//# sourceMappingURL=activation-summary.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="559b05dc-0290-5a7c-97b9-ef1e5e8670ba")}catch{}})();function captureExtensionActivationRollback(state){const lengths={beforeCommand:state.hooks.beforeCommand.length,beforeMutation:state.hooks.beforeMutation.length,afterCommand:state.hooks.afterCommand.length,onWrite:state.hooks.onWrite.length,onRead:state.hooks.onRead.length,onIndex:state.hooks.onIndex.length,commandOverrides:state.commands.overrides.length,commandHandlers:state.commands.handlers.length,parserOverrides:state.parsers.overrides.length,preflightOverrides:state.preflight.overrides.length,serviceOverrides:state.services.overrides.length,rendererOverrides:state.renderers.overrides.length,registrations:Object.fromEntries(Object.entries(state.registrations).map(([key,value])=>[key,value.length]))};return()=>{state.hooks.beforeCommand.length=lengths.beforeCommand,state.hooks.beforeMutation.length=lengths.beforeMutation,state.hooks.afterCommand.length=lengths.afterCommand,state.hooks.onWrite.length=lengths.onWrite,state.hooks.onRead.length=lengths.onRead,state.hooks.onIndex.length=lengths.onIndex,state.commands.overrides.length=lengths.commandOverrides,state.commands.handlers.length=lengths.commandHandlers,state.parsers.overrides.length=lengths.parserOverrides,state.preflight.overrides.length=lengths.preflightOverrides,state.services.overrides.length=lengths.serviceOverrides,state.renderers.overrides.length=lengths.rendererOverrides;for(const[key,length]of Object.entries(lengths.registrations))state.registrations[key].length=length}}export{captureExtensionActivationRollback};
|
|
2
2
|
//# sourceMappingURL=activation-transaction.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d8844150-afb4-5f2e-a005-4cfb8482660c")}catch{}})();import{normalizeKnownExtensionCapability}from"./extension-capability-aliases.js";const EXTENSION_CAPABILITY_REGISTRATION_SURFACES={commands:["registerCommand","command override","command handler"],renderers:["registerRenderer"],hooks:["hooks.beforeCommand","hooks.beforeMutation","hooks.afterCommand","hooks.onWrite","hooks.onRead","hooks.onIndex"],schema:["registerFlags","registerItemFields","registerItemTypes","registerRelationshipKinds","registerMigration","registerProfile"],importers:["registerImporter","registerExporter"],search:["registerSearchProvider","registerVectorStoreAdapter"],parser:["registerParser"],preflight:["registerPreflight"],services:["registerService","registerAssuranceMeasurementProvider"]},USAGE_KEY_SEPARATOR=":";function usageKey(layer,name){return`${layer}${USAGE_KEY_SEPARATOR}${normalizeExtensionName(name)}`}function usageKeyName(key){return key.slice(key.indexOf(USAGE_KEY_SEPARATOR)+1)}function normalizeExtensionName(name){return name.trim().toLowerCase()}function normalizeDeclaredCapabilities(capabilities){if(!Array.isArray(capabilities))return[];const known=new Set;for(const capability of capabilities){const normalized=normalizeKnownExtensionCapability(capability);normalized!==null&&known.add(normalized)}return[...known].sort((left,right)=>left.localeCompare(right))}function attributeCapabilityUsage(activation){const usage=new Map,record=(entries,capability)=>{for(const entry of entries){const key=usageKey(entry.layer,entry.name);let exercised=usage.get(key);exercised===void 0&&(exercised=new Set,usage.set(key,exercised)),exercised.add(capability)}},{registrations,commands,parsers,preflight,services,renderers,hooks}=activation;return record(registrations.commands,"commands"),record(commands.overrides,"commands"),record(commands.handlers,"commands"),record(registrations.flags,"schema"),record(registrations.item_fields,"schema"),record(registrations.item_types,"schema"),record(registrations.relationship_kinds??[],"schema"),record(registrations.migrations,"schema"),record(registrations.profiles,"schema"),record(registrations.importers,"importers"),record(registrations.exporters,"importers"),record(registrations.search_providers,"search"),record(registrations.vector_store_adapters,"search"),record(parsers.overrides,"parser"),record(preflight.overrides,"preflight"),record(services.overrides,"services"),record(registrations.assurance_providers??[],"services"),record(renderers.overrides,"renderers"),record(hooks.beforeCommand,"hooks"),record(hooks.beforeMutation,"hooks"),record(hooks.afterCommand,"hooks"),record(hooks.onWrite,"hooks"),record(hooks.onRead,"hooks"),record(hooks.onIndex,"hooks"),usage}function collectUsedExtensionCapabilities(activation,options={}){const usage=attributeCapabilityUsage(activation),filters=new Set;options.extensionName!==void 0&&filters.add(normalizeExtensionName(options.extensionName));for(const name of options.extensionNames??[])filters.add(normalizeExtensionName(name));const used=new Set;for(const[key,capabilities]of usage)if(!(filters.size>0&&!filters.has(usageKeyName(key))))for(const capability of capabilities)used.add(capability);return[...used].sort((left,right)=>left.localeCompare(right))}function reconcileExtensionCapabilityUsage(loaded,activation){const usage=attributeCapabilityUsage(activation),reconciliations=[];for(const extension of loaded){const declared=normalizeDeclaredCapabilities(extension.capabilities);if(declared.length===0)continue;const exercised=usage.get(usageKey(extension.layer,extension.name))??new Set,used=[...exercised].sort((left,right)=>left.localeCompare(right)),unused=declared.filter(capability=>!exercised.has(capability));reconciliations.push({layer:extension.layer,name:extension.name,declared,used,unused})}return reconciliations}export{EXTENSION_CAPABILITY_REGISTRATION_SURFACES,collectUsedExtensionCapabilities,normalizeExtensionName,reconcileExtensionCapabilityUsage};
|
|
2
2
|
//# sourceMappingURL=capability-usage.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b1a38f8c-8f65-59e2-bddf-ed0606a0f0b5")}catch{}})();import{createEmptyExtensionHookRegistry}from"./extension-registries.js";function createCoreCommandHookContext(options){return{...options,hooks:createEmptyExtensionHookRegistry(),profileEnabled:!!options.globalOptions.profile,migrationBlockers:[]}}export{createCoreCommandHookContext};
|
|
2
2
|
//# sourceMappingURL=command-hook-context.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="34536eba-0f92-5599-a807-5b39b000e733")}catch{}})();const EXTENSION_COMMAND_CAPABILITY_FAMILIES=Object.freeze(["workspace","intake","context","lifecycle","evidence","graph","quality","automation","extensions","internal"]);export{EXTENSION_COMMAND_CAPABILITY_FAMILIES};
|
|
2
2
|
//# sourceMappingURL=command-metadata-contract.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="60fd882d-7c92-5be5-bf46-7e3c128bfb58")}catch{}})();import{assertOptionalStringField}from"./registration-validation.js";import{EXTENSION_COMMAND_CAPABILITY_FAMILIES}from"./command-metadata-contract.js";const COMMAND_CAPABILITY_FAMILIES=new Set(EXTENSION_COMMAND_CAPABILITY_FAMILIES);function assertCommandCapabilityFamily(family){if(family!==void 0&&!COMMAND_CAPABILITY_FAMILIES.has(String(family)))throw new Error(`registerCommand definition.family must be one of: ${EXTENSION_COMMAND_CAPABILITY_FAMILIES.join(", ")}`)}function assertCommandDefinitionMetadataStrings(definition){assertOptionalStringField("registerCommand definition.action",definition.action),assertOptionalStringField("registerCommand definition.family",definition.family),assertOptionalStringField("registerCommand definition.description",definition.description),assertOptionalStringField("registerCommand definition.intent",definition.intent),assertOptionalStringField("registerCommand definition.tier",definition.tier);const tier=definition.tier;if(tier!==void 0&&tier!=="core"&&tier!=="standard"&&tier!=="full"&&tier!=="internal")throw new Error("registerCommand definition.tier must be core, standard, full, or internal");assertCommandCapabilityFamily(definition.family)}export{assertCommandDefinitionMetadataStrings};
|
|
2
2
|
//# sourceMappingURL=command-visibility-tier.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="615b4955-a30d-5d45-a86d-4bcf7bd9bd7a")}catch{}})();import{normalizeCommandName}from"./extension-runtime-helpers.js";const COMMAND_PATH_FIELDS=new Set(["commands","command_overrides","command_handlers","flag_commands","parser_overrides"]),STRING_LIST_FIELDS=["commands","command_overrides","command_handlers","hooks","flag_commands","item_types","item_fields","relationship_kinds","migrations","profiles","importers","exporters","search_providers","vector_store_adapters","assurance_providers","parser_overrides","service_overrides","renderer_overrides"];function applyContributionStringLists(record,inventory){for(const field of STRING_LIST_FIELDS){const raw=record[field];if(raw===void 0)continue;if(!Array.isArray(raw)||raw.some(entry=>typeof entry!="string"))return!1;const values=raw.map(entry=>COMMAND_PATH_FIELDS.has(field)?normalizeCommandName(entry):entry.trim()).filter(entry=>entry.length>0);inventory[field]=[...new Set(values)].sort((left,right)=>left.localeCompare(right))}return!0}function normalizeRendererOwnership(value){if(!Array.isArray(value))return null;const ownership=[];for(const rawEntry of value){if(typeof rawEntry!="object"||rawEntry===null)return null;const entry=rawEntry;if(entry.format!=="json"&&entry.format!=="toon"||!Array.isArray(entry.commands)||entry.commands.some(command=>typeof command!="string")||typeof entry.result_discriminator!="boolean")return null;ownership.push({format:entry.format,commands:[...new Set(entry.commands.map(command=>normalizeCommandName(command)))].sort((left,right)=>left.localeCompare(right)),result_discriminator:entry.result_discriminator})}return ownership.sort((left,right)=>left.format.localeCompare(right.format))}function normalizePreflightOwnership(value){if(!Array.isArray(value))return null;const ownership=[];for(const rawEntry of value){if(typeof rawEntry!="object"||rawEntry===null)return null;const commands=rawEntry.commands;if(!Array.isArray(commands)||commands.some(command=>typeof command!="string"))return null;ownership.push({commands:[...new Set(commands.map(command=>normalizeCommandName(command)))].filter(command=>command.length>0).sort((left,right)=>left.localeCompare(right))})}return ownership}function normalizeExtensionContributionInventory(value){if(value==null)return;if(typeof value!="object"||Array.isArray(value))return null;const record=value;if(record.schema_version!==1)return null;const inventory={schema_version:1};if(!applyContributionStringLists(record,inventory))return null;const preflightCount=record.preflight_overrides;if(preflightCount!==void 0&&(!Number.isInteger(preflightCount)||preflightCount<0))return null;typeof preflightCount=="number"&&(inventory.preflight_overrides=preflightCount);const rawRendererOwnership=record.renderer_ownership;if(rawRendererOwnership!==void 0){const ownership=normalizeRendererOwnership(rawRendererOwnership);if(ownership===null)return null;inventory.renderer_ownership=ownership}const rawPreflightOwnership=record.preflight_ownership;if(rawPreflightOwnership!==void 0){const ownership=normalizePreflightOwnership(rawPreflightOwnership);if(ownership===null)return null;inventory.preflight_ownership=ownership}return inventory}function createExtensionContributionInventory(summary){return{schema_version:1,commands:summary.commands,command_overrides:summary.command_overrides,command_handlers:summary.command_handlers,hooks:summary.hooks,flag_commands:summary.flag_commands,item_types:summary.item_types,item_fields:summary.item_fields,...summary.relationship_kinds?{relationship_kinds:summary.relationship_kinds}:{},migrations:summary.migrations,profiles:summary.profiles,importers:summary.importers,exporters:summary.exporters,search_providers:summary.search_providers,vector_store_adapters:summary.vector_store_adapters,...summary.assurance_providers?{assurance_providers:summary.assurance_providers}:{},parser_overrides:summary.parser_overrides,service_overrides:summary.service_overrides,renderer_overrides:summary.renderer_overrides,...summary.renderer_ownership?{renderer_ownership:summary.renderer_ownership}:{},preflight_overrides:summary.preflight_overrides,...summary.preflight_ownership?{preflight_ownership:summary.preflight_ownership}:{}}}export{createExtensionContributionInventory,normalizeExtensionContributionInventory};
|
|
2
2
|
//# sourceMappingURL=contribution-inventory.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="07cb237c-3956-5997-85f8-972d2ee490d0")}catch{}})();import{cloneContextSnapshot}from"./extension-runtime-helpers.js";import{asRegistrationRecord,assertOptionalStringField}from"./registration-validation.js";function normalizeExporterArtifactOutput(value){const candidate=asRegistrationRecord("registerExporter options.output",value),allowedKeys=new Set(["channel","receipt","media_type"]);for(const key of Object.keys(candidate))if(!allowedKeys.has(key))throw new TypeError(`registerExporter options.output contains unsupported field ${key}`);if(candidate.channel!=="stdout"&&candidate.channel!=="file")throw new TypeError("registerExporter options.output.channel must be stdout|file");if(candidate.receipt!==void 0&&candidate.receipt!=="suppress"&&candidate.receipt!=="render")throw new TypeError("registerExporter options.output.receipt must be suppress|render");if(candidate.channel==="stdout"&&candidate.receipt==="render")throw new TypeError("registerExporter stdout artifacts cannot render a host receipt");return assertOptionalStringField("registerExporter options.output.media_type",candidate.media_type),{channel:candidate.channel,receipt:candidate.receipt??(candidate.channel==="stdout"?"suppress":"render"),...typeof candidate.media_type=="string"?{media_type:candidate.media_type}:{}}}function resolveImportExportArtifactOutput(method,resolvedOptions,descriptionWasDeclared){if(method==="registerImporter"&&resolvedOptions.output!==void 0)throw new TypeError("registerImporter options.output is exporter-only");if(method!=="registerExporter"||resolvedOptions.output===void 0)return;const output=normalizeExporterArtifactOutput(resolvedOptions.output);return!descriptionWasDeclared&&output.channel==="stdout"&&(resolvedOptions.description="Export items with the registered extension adapter. Artifact bytes are written exclusively to stdout and the host receipt is suppressed by default."),output}function buildImportExportContext(context,registration,action){return{registration,action,command:context.command,args:cloneContextSnapshot(context.args),options:cloneContextSnapshot(context.options),global:cloneContextSnapshot(context.global),pm_root:context.pm_root,source_workspace_root:context.source_workspace_root,repo_root:context.repo_root,pm_root_rel:context.pm_root_rel,...context.sdk===void 0?{}:{sdk:context.sdk}}}export{buildImportExportContext,normalizeExporterArtifactOutput,resolveImportExportArtifactOutput};
|
|
2
2
|
//# sourceMappingURL=exporter-output-contract.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="fc2e7eac-cd1c-5885-aa27-e98455008a4f")}catch{}})();function buildReadyExtensionCandidate(params){return!params.extensionReady||!params.enabledForLoad?null:{layer:params.layer,directory:params.directory,manifest_path:params.manifestPath,entry_path:params.entryPath,manifest:params.manifest,source_package:params.sourceIdentity?.package_name,source_aliases:params.sourceIdentity?.aliases,contributions:params.sourceIdentity?.contributions}}export{buildReadyExtensionCandidate};
|
|
2
2
|
//# sourceMappingURL=extension-candidate.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7359c10a-4c56-57ea-8254-fc26b19e5c84")}catch{}})();import{KNOWN_EXTENSION_CAPABILITIES,EXTENSION_CAPABILITY_CONTRACT_VERSION,EXTENSION_CAPABILITY_LEGACY_ALIASES}from"./extension-types.js";import{levenshteinDistanceWithinLimit}from"../shared/levenshtein.js";function normalizeNames(values){return[...new Set(values.map(value=>value.trim()).filter(value=>value.length>0))].sort((a,b)=>a.localeCompare(b))}function isKnownExtensionCapability(value){return KNOWN_EXTENSION_CAPABILITIES.includes(value)}function normalizeKnownExtensionCapability(value){const normalized=value.trim().toLowerCase();return isKnownExtensionCapability(normalized)?normalized:null}function collectUnknownExtensionCapabilities(capabilities){return capabilities.filter(capability=>!isKnownExtensionCapability(capability))}function resolveLegacyExtensionCapabilityAlias(capability){const normalized=capability.trim().toLowerCase();return normalized.length===0?null:EXTENSION_CAPABILITY_LEGACY_ALIASES[normalized]??null}function normalizeManifestCapabilities(rawCapabilities){const normalizedCapabilities=normalizeNames([...rawCapabilities].map(value=>value.toLowerCase())),remappedCapabilities=[],legacyAliases=[];for(const capability of normalizedCapabilities){const legacyAliasTarget=resolveLegacyExtensionCapabilityAlias(capability);if(legacyAliasTarget){remappedCapabilities.push(legacyAliasTarget),legacyAliases.push({alias:capability,target:legacyAliasTarget});continue}remappedCapabilities.push(capability)}const dedupedLegacyAliases=[...new Map(legacyAliases.map(entry=>[`${entry.alias}>${entry.target}`,entry])).values()].sort((left,right)=>left.alias.localeCompare(right.alias));return{capabilities:normalizeNames(remappedCapabilities),legacy_aliases:dedupedLegacyAliases}}function suggestKnownExtensionCapability(capability){const normalized=capability.trim().toLowerCase();if(normalized.length===0)return null;const legacyAlias=resolveLegacyExtensionCapabilityAlias(normalized);if(legacyAlias)return legacyAlias;const maxDistance=Math.max(1,Math.floor(normalized.length*.34));let bestMatch=null,bestDistance=Number.POSITIVE_INFINITY;for(const candidate of KNOWN_EXTENSION_CAPABILITIES){const distance=levenshteinDistanceWithinLimit(normalized,candidate,maxDistance);distance!==null&&distance<bestDistance&&(bestDistance=distance,bestMatch=candidate)}return bestMatch}function formatUnknownExtensionCapabilityWarning(layer,name,capability){const allowed=KNOWN_EXTENSION_CAPABILITIES.join(","),suggested=suggestKnownExtensionCapability(capability)??"none";return`extension_capability_unknown:${layer}:${name}:${capability}:allowed=${allowed}:suggested=${suggested}`}function formatLegacyExtensionCapabilityAliasWarning(layer,name,aliases){const aliasesToken=aliases.map(entry=>`${entry.alias}>${entry.target}`).join(",");return`extension_capability_legacy_alias:${layer}:${name}:aliases=${aliasesToken}`}function parseUnknownExtensionCapabilityWarning(warning){const match=/^extension_capability_unknown:(global|project):([^:]+):([^:]+):allowed=([^:]+):suggested=([^:]+)$/.exec(warning.trim());if(!match)return null;const[,layerRaw,name,capability,allowedRaw,suggestedRaw]=match,layer=layerRaw,allowed_capabilities=allowedRaw.split(",").map(value=>value.trim()).filter(value=>value.length>0),legacyAlias=resolveLegacyExtensionCapabilityAlias(capability),suggested_capability=(suggestedRaw==="none"?void 0:suggestedRaw)??legacyAlias??void 0;return{layer,name,capability,allowed_capabilities,capability_contract_version:EXTENSION_CAPABILITY_CONTRACT_VERSION,suggested_capability,suggestion_source:suggested_capability?legacyAlias===suggested_capability?"legacy_alias":"nearest_match":void 0,legacy_alias_target:legacyAlias??void 0}}function parseLegacyExtensionCapabilityAliasWarning(warning){const match=/^extension_capability_legacy_alias:(global|project):([^:]+):aliases=(.+)$/.exec(warning.trim());if(!match)return[];const[,layerRaw,name,aliasesRaw]=match,layer=layerRaw,allowedCapabilities=[...KNOWN_EXTENSION_CAPABILITIES],parsed=[];for(const token of aliasesRaw.split(",")){const[rawAlias,rawTarget]=token.split(">"),alias=rawAlias?.trim(),target=rawTarget?.trim().toLowerCase();!alias||!target||!isKnownExtensionCapability(target)||parsed.push({layer,name,capability:alias,allowed_capabilities:allowedCapabilities,capability_contract_version:EXTENSION_CAPABILITY_CONTRACT_VERSION,suggested_capability:target,suggestion_source:"legacy_alias",legacy_alias_target:target})}return parsed}export{collectUnknownExtensionCapabilities,formatLegacyExtensionCapabilityAliasWarning,formatUnknownExtensionCapabilityWarning,isKnownExtensionCapability,normalizeKnownExtensionCapability,normalizeManifestCapabilities,normalizeNames,parseLegacyExtensionCapabilityAliasWarning,parseUnknownExtensionCapabilityWarning,resolveLegacyExtensionCapabilityAlias,suggestKnownExtensionCapability};
|
|
2
2
|
//# sourceMappingURL=extension-capability-aliases.js.map
|