@unbrained/pm-cli 2026.11.21 → 2026.11.23
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/.agents/skills/pm-developer/SKILL.md +1 -1
- package/.claude-plugin/marketplace.json +1 -1
- 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.js +11 -11
- 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 +5 -5
- package/dist/cli/expected-revisions.js +1 -1
- package/dist/cli/extension-command-help.js +6 -6
- package/dist/cli/extension-recovery.js +1 -1
- package/dist/cli/help-content.js +5 -5
- package/dist/cli/help-json-payload.js +7 -7
- 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/preflight-warnings.js +3 -3
- 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 +0 -1
- package/dist/cli/register-mutation.js +6 -6
- 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/annotation-option-retry.js +1 -1
- package/dist/cli/runtime/close-fields-retry.js +1 -1
- package/dist/cli/runtime/field-route-retry.js +1 -1
- package/dist/cli/runtime/invocation-options.js +1 -1
- package/dist/cli/runtime/invocation-rewrites.js +1 -1
- package/dist/cli/runtime/projection-retry.js +1 -1
- package/dist/cli/runtime/read-output-mutation-retry.js +1 -1
- package/dist/cli/runtime/refusal-credential-redaction.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 +15 -15
- 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 +1 -1
- package/dist/cli-bundle/chunks/chunk-2UQU7HRR.js +9 -0
- package/dist/cli-bundle/chunks/chunk-5DUP4AZA.js +2 -0
- package/dist/cli-bundle/chunks/chunk-5WZZ5XEN.js +3 -0
- package/dist/cli-bundle/chunks/chunk-6H36ZHMI.js +2 -0
- package/dist/cli-bundle/chunks/chunk-6MYJLOSG.js +2 -0
- package/dist/cli-bundle/chunks/chunk-AA52P34H.js +3 -0
- package/dist/cli-bundle/chunks/chunk-AEOHUSUI.js +2289 -0
- package/dist/cli-bundle/chunks/chunk-BSRIVYTM.js +8 -0
- package/dist/cli-bundle/chunks/chunk-CFWLQFJM.js +71 -0
- package/dist/cli-bundle/chunks/chunk-D6PDUKUG.js +9 -0
- package/dist/cli-bundle/chunks/chunk-ENKXRSFZ.js +31 -0
- package/dist/cli-bundle/chunks/chunk-F2Z6XLZB.js +3 -0
- package/dist/cli-bundle/chunks/chunk-FJOEL75F.js +2 -0
- package/dist/cli-bundle/chunks/chunk-GDXCAC52.js +2 -0
- package/dist/cli-bundle/chunks/chunk-H7JEXRIN.js +6 -0
- package/dist/cli-bundle/chunks/chunk-J2PDAVBC.js +2 -0
- package/dist/cli-bundle/chunks/chunk-KE7HMBEW.js +2 -0
- package/dist/cli-bundle/chunks/chunk-KZHIBEJL.js +33 -0
- package/dist/cli-bundle/chunks/chunk-NGJ5ERBF.js +115 -0
- package/dist/cli-bundle/chunks/chunk-NQ54T7T2.js +2 -0
- package/dist/cli-bundle/chunks/chunk-O7JHS64G.js +3 -0
- package/dist/cli-bundle/chunks/chunk-OKEZF7HU.js +2 -0
- package/dist/cli-bundle/chunks/chunk-OKIKF4FD.js +2 -0
- package/dist/cli-bundle/chunks/chunk-OPJF254V.js +9 -0
- package/dist/cli-bundle/chunks/chunk-PZA7QECY.js +1 -0
- package/dist/cli-bundle/chunks/chunk-RWA5YZ5X.js +2 -0
- package/dist/cli-bundle/chunks/chunk-S32NGRQM.js +2 -0
- package/dist/cli-bundle/chunks/chunk-SLFRSZK6.js +1 -0
- package/dist/cli-bundle/chunks/chunk-TZY5MVJF.js +125 -0
- package/dist/cli-bundle/chunks/chunk-YYT3MIRF.js +3 -0
- package/dist/cli-bundle/chunks/chunk-ZPS4B6SI.js +8 -0
- package/dist/cli-bundle/chunks/context-budget-recovery-M5RFUEFG.js +2 -0
- package/dist/cli-bundle/chunks/indexed-receipt-blobs-BPYKN5Q7.js +4 -0
- package/dist/cli-bundle/chunks/{item-revision-R5SZPJZ5.js → item-revision-FMD4KWBB.js} +2 -2
- package/dist/cli-bundle/chunks/item-transaction-SEHTH7N2.js +2 -0
- package/dist/cli-bundle/chunks/mutation-actor-SFGYIRPW.js +2 -0
- package/dist/cli-bundle/chunks/mutation-admission-57LBSKQI.js +2 -0
- package/dist/cli-bundle/chunks/{register-list-query-SPGPS3OS.js → register-list-query-L4IBU64P.js} +11 -11
- package/dist/cli-bundle/chunks/register-mutation-6NUOPHZ3.js +21 -0
- package/dist/cli-bundle/chunks/register-operations-JGYVORNN.js +2 -0
- package/dist/cli-bundle/chunks/register-setup-C44SIXEH.js +2 -0
- package/dist/cli-bundle/chunks/settlement-hook-6MR32OOC.js +7 -0
- package/dist/cli-bundle/chunks/stage-PQ7AB63N.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-6LKTEKHS.js +6 -0
- package/dist/cli-bundle/focused-chunks/chunk-6LPXMFLM.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-A6VEMCRR.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-AIDL2ZNT.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-BKPUUW5O.js +1 -0
- package/dist/cli-bundle/focused-chunks/chunk-BWOVFE5B.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-HMDQDRV2.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-I66IKYKP.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-IIP6LZ5E.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-IR2J3NOT.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-IROZDIDX.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-ITKDHSBR.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-K53OIT5J.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-LQYYPXUK.js +26 -0
- package/dist/cli-bundle/focused-chunks/chunk-NQTEE66P.js +13 -0
- package/dist/cli-bundle/focused-chunks/chunk-O7Z73ALG.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-OTMMOKPM.js +91 -0
- package/dist/cli-bundle/focused-chunks/chunk-OXOCZJC6.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-QLAHEDT6.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-QQIIMMFU.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-RIE3SJSE.js +9 -0
- package/dist/cli-bundle/focused-chunks/chunk-TD544C74.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-UFTUNBMY.js +27 -0
- package/dist/cli-bundle/focused-chunks/chunk-X6CXWWNB.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-XRS3VNC6.js +44 -0
- package/dist/cli-bundle/focused-chunks/chunk-XYPEZGTR.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-Y2ESLKCF.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-YSJKQLFR.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-Z2X7HH3C.js +102 -0
- package/dist/cli-bundle/focused-chunks/chunk-ZHWPCVQL.js +78 -0
- package/dist/cli-bundle/focused-chunks/context-budget-recovery-CSJV3TY3.js +2 -0
- package/dist/cli-bundle/focused-chunks/indexed-receipt-blobs-EGEJMG3G.js +4 -0
- package/dist/cli-bundle/focused-chunks/{item-revision-3V3UIP5X.js → item-revision-YDACCDVY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/item-transaction-UKEQCTKB.js +2 -0
- package/dist/cli-bundle/focused-chunks/mutation-actor-AS465LRX.js +2 -0
- package/dist/cli-bundle/focused-chunks/mutation-admission-E5UHJZFE.js +2 -0
- package/dist/cli-bundle/focused-chunks/settlement-hook-FMLGKG7J.js +7 -0
- package/dist/cli-bundle/focused-chunks/stage-36J7YLGI.js +2 -0
- package/dist/cli-bundle/main.js +27 -27
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +5 -5
- package/dist/cli-bundle/sdk-core.js +1 -1
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +72 -60
- 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 +13 -13
- 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/checkpoint/mutation-context.js +1 -1
- 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 -2
- 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/mutation-actor-snapshot.js +1 -1
- package/dist/core/extensions/mutation-actor.js +1 -1
- package/dist/core/extensions/preflight-ownership.js +1 -1
- package/dist/core/extensions/read-output-contract.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/extensions/version-diagnostics.js +1 -1
- package/dist/core/fs/atomic-create.js +1 -1
- package/dist/core/fs/file-glob.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/bridge.js +2 -0
- package/dist/core/history/digest.js +1 -1
- package/dist/core/history/drift-cache.js +3 -3
- 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 +11 -11
- 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.d.ts +12 -0
- 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.d.ts +9 -0
- package/dist/core/history/read.js +1 -1
- package/dist/core/history/replay.d.ts +46 -5
- package/dist/core/history/replay.js +2 -2
- package/dist/core/history/stream-summary.js +2 -2
- 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 -2
- package/dist/core/item/actionability.js +1 -1
- package/dist/core/item/deferred-fields.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 +7 -7
- package/dist/core/item/item-record.js +1 -1
- package/dist/core/item/item-type-definition.js +1 -1
- package/dist/core/item/literal-mutation-input.js +1 -1
- package/dist/core/item/parent-reference-policy.js +1 -1
- package/dist/core/item/parse.js +8 -8
- 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-confinement.js +1 -1
- package/dist/core/lock/lock-gc.js +1 -1
- package/dist/core/lock/lock-owner.js +1 -1
- package/dist/core/lock/lock.js +4 -4
- package/dist/core/output/linked-test-projection.js +5 -5
- package/dist/core/output/mutation-projection.js +1 -1
- package/dist/core/output/output-control.js +1 -1
- package/dist/core/output/output.js +19 -19
- package/dist/core/output/query-summary.js +1 -1
- package/dist/core/output/tabular.js +3 -3
- 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.d.ts +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 +4 -4
- 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/sentry/sensitive-assignments.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 -5
- package/dist/core/shared/command-line.js +1 -1
- package/dist/core/shared/command-types.js +0 -1
- package/dist/core/shared/conflict-markers.js +1 -1
- package/dist/core/shared/constants.js +1 -1
- package/dist/core/shared/error-details.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/output-unicode.js +1 -1
- package/dist/core/shared/primitives.js +1 -1
- package/dist/core/shared/process-tree.js +2 -2
- package/dist/core/shared/secret-rules.js +5 -5
- 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 -2
- package/dist/core/shared/url-credentials.js +1 -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 +11 -11
- package/dist/core/store/item-metadata-read-work.js +1 -1
- package/dist/core/store/item-mutation-precondition.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-sections.js +2 -2
- package/dist/core/store/settings-validator.js +1 -1
- package/dist/core/store/settings.d.ts +3 -1
- package/dist/core/store/settings.js +6 -6
- package/dist/core/store/sqlite-runtime.js +1 -1
- package/dist/core/store/tracker-preflight.js +1 -1
- package/dist/core/store/transaction-coordinator-scope.js +1 -1
- package/dist/core/telemetry/consent.js +3 -3
- 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 -9
- package/dist/core/test/background-runs.js +4 -4
- 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 +5 -5
- 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/linked-resource-recovery.js +1 -1
- package/dist/sdk/agent/refusal-closure-census.js +2 -2
- package/dist/sdk/agent/refusal-corpus-contracts.js +1 -1
- package/dist/sdk/agent/subcommand-recovery.js +1 -1
- package/dist/sdk/agent-capability-contracts.js +3 -3
- 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/cli-bootstrap.js +1 -1
- package/dist/sdk/cli-contracts/agent-output-contracts.js +5 -5
- 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 -2
- 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.d.ts +2 -2
- package/dist/sdk/cli-contracts/typed-action-inputs.js +0 -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 -2
- package/dist/sdk/completion/fish.js +74 -73
- package/dist/sdk/completion/shared.js +1 -1
- package/dist/sdk/completion/zsh.js +77 -76
- package/dist/sdk/completion.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 -6
- 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/dependencies/context-budget-recovery.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/host-environment-errors.js +1 -1
- package/dist/sdk/environment/project-runtime-compatibility.js +2 -2
- 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/command-options.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 +3 -3
- 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/managed-update-status.js +1 -1
- package/dist/sdk/extension/migrations.js +2 -2
- package/dist/sdk/extension/native-command-options.js +1 -1
- 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 -11
- 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 +2 -2
- 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/error-code-catalog-rows.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 +0 -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/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 +2 -2
- package/dist/sdk/governance/extension-host-version.js +1 -1
- package/dist/sdk/governance/gc.js +1 -1
- package/dist/sdk/governance/health/history-drift-remedies.js +2 -0
- package/dist/sdk/governance/health/projection.js +1 -1
- package/dist/sdk/governance/health-merge-evidence.js +1 -1
- package/dist/sdk/governance/health.js +2 -2
- package/dist/sdk/governance/hierarchy-validation.js +1 -1
- package/dist/sdk/governance/in-progress-work-health.js +1 -1
- package/dist/sdk/governance/lifecycle-dependency-cycles.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 -4
- package/dist/sdk/governance/reindex.js +5 -5
- 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-deferred-fields.js +1 -1
- 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 -2
- 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/cardinality-integrity.js +1 -1
- package/dist/sdk/graph/centrality.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/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/guide-topics.js +1 -1
- package/dist/sdk/guide.js +7 -7
- package/dist/sdk/history/append-only-repair.d.ts +30 -0
- package/dist/sdk/history/append-only-repair.js +6 -0
- package/dist/sdk/history/attestation-command.js +2 -2
- 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.d.ts +8 -2
- package/dist/sdk/history/maintenance.js +1 -1
- package/dist/sdk/history/reanchor-refusal.js +2 -0
- package/dist/sdk/history/reseed.d.ts +15 -0
- package/dist/sdk/history/reseed.js +2 -0
- package/dist/sdk/history/salvage.d.ts +19 -8
- package/dist/sdk/history/salvage.js +5 -3
- 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.d.ts +8 -2
- 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.d.ts +1 -1
- package/dist/sdk/init-agent-guidance.js +10 -10
- package/dist/sdk/init.js +14 -14
- 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.d.ts +33 -1
- package/dist/sdk/item-transaction.js +1 -1
- package/dist/sdk/learnings.js +1 -1
- package/dist/sdk/lifecycle/append.js +3 -3
- package/dist/sdk/lifecycle/checkpoint-rollback.js +1 -1
- package/dist/sdk/lifecycle/claim.js +1 -1
- package/dist/sdk/lifecycle/cli-input.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/core-field-recovery.js +1 -1
- package/dist/sdk/lifecycle/core-item-fields.js +1 -1
- package/dist/sdk/lifecycle/create-deferrals.js +1 -1
- package/dist/sdk/lifecycle/create.js +1 -1
- package/dist/sdk/lifecycle/delete.js +1 -1
- package/dist/sdk/lifecycle/dependency-removal.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/item-revision.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 +0 -1
- package/dist/sdk/lifecycle/mutation-facet-contracts.js +1 -1
- package/dist/sdk/lifecycle/mutation-option-validation.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/release-handoff.js +1 -1
- package/dist/sdk/lifecycle/reopen.js +1 -1
- package/dist/sdk/lifecycle/repeatable-metadata-parsers.js +2 -2
- package/dist/sdk/lifecycle/repeated-terminal-state.js +1 -1
- package/dist/sdk/lifecycle/restore.js +1 -1
- package/dist/sdk/lifecycle/shared-unset-fields.js +1 -1
- package/dist/sdk/lifecycle/start-blockers.js +1 -1
- package/dist/sdk/lifecycle/structured-mutation-plan.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 -2
- package/dist/sdk/lifecycle/workflow-transition.js +1 -1
- package/dist/sdk/lifecycle-completion.js +1 -1
- package/dist/sdk/lifecycle-policy.js +1 -1
- package/dist/sdk/linked-artifacts.js +2 -2
- package/dist/sdk/mcp/apps.js +5 -5
- package/dist/sdk/mcp/authorization.js +1 -1
- package/dist/sdk/mcp/discovery.js +1 -1
- package/dist/sdk/mcp/executable.js +4 -4
- package/dist/sdk/mcp/interactions.js +1 -1
- package/dist/sdk/mcp/protocol.js +1 -1
- package/dist/sdk/mcp/skills.js +3 -3
- 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 +7 -7
- package/dist/sdk/merge/history-scalar-rebase.js +1 -1
- package/dist/sdk/merge/ignored-artifacts.js +1 -1
- package/dist/sdk/merge/index.js +1 -1
- package/dist/sdk/merge/indexed-receipt-blobs.js +2 -2
- package/dist/sdk/merge/install.js +6 -6
- 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/settlement-hook.js +4 -4
- package/dist/sdk/merge/stage.js +1 -1
- package/dist/sdk/merge/three-way.d.ts +22 -3
- package/dist/sdk/merge/three-way.js +9 -3
- package/dist/sdk/merge/worktree-config.js +2 -2
- 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/fit-envelope.js +1 -1
- package/dist/sdk/output/list-envelope.js +1 -1
- package/dist/sdk/output/table-rows.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 -2
- 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 -5
- 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 -4
- package/dist/sdk/query/complete-list.js +1 -1
- package/dist/sdk/query/context.js +2 -2
- package/dist/sdk/query/declared-blockers.js +1 -1
- package/dist/sdk/query/duplicate-candidates.js +1 -1
- package/dist/sdk/query/get-facet-roots.js +1 -1
- package/dist/sdk/query/get.js +1 -1
- package/dist/sdk/query/history.js +1 -1
- package/dist/sdk/query/item-filter-options.js +0 -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-ranking-policy.js +1 -1
- package/dist/sdk/query/next-ready-budget.js +1 -1
- package/dist/sdk/query/next.js +2 -2
- 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 -2
- 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 -3
- package/dist/sdk/query/search/types.js +0 -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/window-pagination.js +1 -1
- package/dist/sdk/query/workspace-contracts.js +1 -1
- package/dist/sdk/read-output/continuation.js +1 -1
- package/dist/sdk/read-output/extension.js +1 -1
- package/dist/sdk/read-output/options.js +1 -1
- package/dist/sdk/read-output/positional-rows.js +1 -1
- package/dist/sdk/read-output/provenance.js +1 -1
- package/dist/sdk/read-output/session-result.js +0 -1
- package/dist/sdk/read-output/surfaces.js +1 -1
- package/dist/sdk/read-output/tail-retention.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 +6 -6
- package/dist/sdk/relationship-kinds/contract.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/mutation-admission.js +1 -1
- package/dist/sdk/runtime/mutation-value-validation.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.d.ts +8 -2
- package/dist/sdk/runtime-input.js +1 -1
- package/dist/sdk/runtime-primitives.d.ts +1 -1
- package/dist/sdk/runtime-primitives.js +1 -1
- package/dist/sdk/runtime-public-contracts.js +0 -1
- package/dist/sdk/runtime-stats-options.js +1 -1
- package/dist/sdk/runtime.d.ts +9 -0
- package/dist/sdk/runtime.js +1 -1
- package/dist/sdk/scheduling-shortcuts.js +1 -1
- package/dist/sdk/schema/field-option-collisions.js +2 -0
- package/dist/sdk/schema-migration.js +4 -4
- package/dist/sdk/schema.js +7 -7
- 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.d.ts +5 -5
- package/dist/sdk/structured-mutations.js +1 -1
- package/dist/sdk/telemetry-flush.js +1 -1
- package/dist/sdk/telemetry.js +4 -4
- package/dist/sdk/templates.js +3 -3
- package/dist/sdk/test/batch.js +2 -2
- package/dist/sdk/test/command-args.js +1 -1
- package/dist/sdk/test/command-resolution.js +2 -2
- package/dist/sdk/test/entry.js +2 -2
- package/dist/sdk/test/execution-receipts.js +2 -2
- package/dist/sdk/test/execution.js +5 -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/prerequisites.js +1 -1
- package/dist/sdk/test/receipt-index-snapshot.js +1 -1
- package/dist/sdk/test/run-phases.js +1 -1
- package/dist/sdk/test/runs.js +1 -1
- package/dist/sdk/test/trust.js +2 -2
- package/dist/sdk/test/update.js +1 -1
- package/dist/sdk/test/workspace-snapshot.js +1 -1
- package/dist/sdk/traceability/runtime-files-lookup.js +1 -1
- package/dist/sdk/traceability/source-traceability.js +2 -2
- package/dist/sdk/tracker-root-discovery.js +1 -1
- package/dist/sdk/transactions/item-finalization.js +2 -0
- 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-snapshot.js +5 -5
- package/dist/sdk/workspace-transaction-gc.js +1 -1
- package/dist/sdk/workspace-transaction.js +2 -2
- package/dist/sdk/workspace.js +6 -6
- package/dist/types/index.js +1 -1
- package/dist/types.d.ts +20 -0
- package/dist/types.js +1 -1
- package/docs/AGENT_GUIDE.md +1 -1
- package/docs/AGENT_RUNTIME_PRIMITIVES.md +1 -1
- package/docs/COMMANDS.md +7 -3
- package/docs/EXTENSIONS.md +1 -1
- package/docs/HISTORY_RECOVERY.md +229 -5
- package/docs/README.md +2 -2
- package/docs/SDK.md +174 -5
- package/docs/SDK_CONTEXT_COORDINATION.md +3 -2
- package/marketplace.json +1 -1
- package/node_modules/tar/package.json +2 -3
- package/package.json +31 -2
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/package.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/package.json +1 -1
- package/plugins/pm-codex/plugin.json +1 -1
- package/runtime-dependencies.json +1 -1
- package/scripts/finalize-build.mjs +63 -24
- package/scripts/prepare-build-cache.mjs +28 -1
- package/dist/cli-bundle/chunks/chunk-2DXRTIC6.js +0 -21
- package/dist/cli-bundle/chunks/chunk-5647LU3A.js +0 -2287
- package/dist/cli-bundle/chunks/chunk-6QLEXRUG.js +0 -9
- package/dist/cli-bundle/chunks/chunk-AHQB7W2H.js +0 -3
- package/dist/cli-bundle/chunks/chunk-BKSVHOWI.js +0 -2
- package/dist/cli-bundle/chunks/chunk-CASX6SFI.js +0 -2
- package/dist/cli-bundle/chunks/chunk-CIKGG34F.js +0 -2
- package/dist/cli-bundle/chunks/chunk-D6ILFXZY.js +0 -2
- package/dist/cli-bundle/chunks/chunk-DEZPZOQ7.js +0 -2
- package/dist/cli-bundle/chunks/chunk-IB7UB5TE.js +0 -2
- package/dist/cli-bundle/chunks/chunk-IUIOTAF6.js +0 -9
- package/dist/cli-bundle/chunks/chunk-JVGRFU5H.js +0 -3
- package/dist/cli-bundle/chunks/chunk-KQIZ34SF.js +0 -3
- package/dist/cli-bundle/chunks/chunk-KVBIMFUG.js +0 -6
- package/dist/cli-bundle/chunks/chunk-LQBWLNZJ.js +0 -3
- package/dist/cli-bundle/chunks/chunk-NCFCBKIP.js +0 -2
- package/dist/cli-bundle/chunks/chunk-NT5AKFE5.js +0 -31
- package/dist/cli-bundle/chunks/chunk-PJXKA4QU.js +0 -125
- package/dist/cli-bundle/chunks/chunk-RMIRNYRG.js +0 -71
- package/dist/cli-bundle/chunks/chunk-RULHZRFN.js +0 -2
- package/dist/cli-bundle/chunks/chunk-S6HB3WL2.js +0 -2
- package/dist/cli-bundle/chunks/chunk-SA4BNP3Q.js +0 -2
- package/dist/cli-bundle/chunks/chunk-SPPHDVZE.js +0 -2
- package/dist/cli-bundle/chunks/chunk-SRVTCYAU.js +0 -2
- package/dist/cli-bundle/chunks/chunk-WELSVDPU.js +0 -2
- package/dist/cli-bundle/chunks/chunk-XHJ3H5PL.js +0 -3
- package/dist/cli-bundle/chunks/chunk-XWHJIRNV.js +0 -8
- package/dist/cli-bundle/chunks/chunk-YJEBK7HU.js +0 -8
- package/dist/cli-bundle/chunks/chunk-YKJKQ7DM.js +0 -115
- package/dist/cli-bundle/chunks/chunk-YMUSRWV4.js +0 -9
- package/dist/cli-bundle/chunks/chunk-YR2KEBHP.js +0 -2
- package/dist/cli-bundle/chunks/context-budget-recovery-L2WP5S26.js +0 -2
- package/dist/cli-bundle/chunks/indexed-receipt-blobs-ITTXIN4K.js +0 -4
- package/dist/cli-bundle/chunks/item-transaction-7DFCG73I.js +0 -2
- package/dist/cli-bundle/chunks/mutation-actor-3TG636XG.js +0 -2
- package/dist/cli-bundle/chunks/mutation-admission-LICSDNNO.js +0 -2
- package/dist/cli-bundle/chunks/register-mutation-WWVECKFQ.js +0 -21
- package/dist/cli-bundle/chunks/register-operations-L6HFJNWD.js +0 -2
- package/dist/cli-bundle/chunks/register-setup-K7UFG5TD.js +0 -2
- package/dist/cli-bundle/chunks/settlement-hook-BXN5LEQD.js +0 -7
- package/dist/cli-bundle/chunks/stage-57KH3KAC.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-3IRCYJI5.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-3V53UBHN.js +0 -9
- package/dist/cli-bundle/focused-chunks/chunk-532WZV65.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-7A4QWNZX.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-C3O6JJPO.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-CR7CGEB2.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-CU2BRAOX.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-CWWKRI5P.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-EGN2HFRU.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-GHQVM6K6.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-HGFNL5XI.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-I5LGPUWH.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-IQK5NPMG.js +0 -13
- package/dist/cli-bundle/focused-chunks/chunk-J63D6QST.js +0 -6
- package/dist/cli-bundle/focused-chunks/chunk-JMQJBZQ5.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-LNHUE4VV.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-MKM5NKD7.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-NP72ZDXE.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-OSLQD5VH.js +0 -102
- package/dist/cli-bundle/focused-chunks/chunk-QGKLRXP7.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-QSJW6NSQ.js +0 -66
- package/dist/cli-bundle/focused-chunks/chunk-RPE6IX26.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-SRDQSA6M.js +0 -91
- package/dist/cli-bundle/focused-chunks/chunk-SVOOGGAK.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-UOC6257J.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-URJ2E6AS.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-WXMI4AV5.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-XCJSHNXK.js +0 -27
- package/dist/cli-bundle/focused-chunks/chunk-XQQSSKJI.js +0 -44
- package/dist/cli-bundle/focused-chunks/chunk-YOAYY3HE.js +0 -2
- package/dist/cli-bundle/focused-chunks/context-budget-recovery-5MKOCGY5.js +0 -2
- package/dist/cli-bundle/focused-chunks/indexed-receipt-blobs-AF4U3F3D.js +0 -4
- package/dist/cli-bundle/focused-chunks/item-transaction-HLBW7B3J.js +0 -2
- package/dist/cli-bundle/focused-chunks/mutation-actor-62HKR5IO.js +0 -2
- package/dist/cli-bundle/focused-chunks/mutation-admission-X4PF2SG3.js +0 -2
- package/dist/cli-bundle/focused-chunks/settlement-hook-ARYCZQY4.js +0 -7
- package/dist/cli-bundle/focused-chunks/stage-O7T7CXBB.js +0 -2
- package/dist/sdk/agent/refusal-closure.js +0 -2
- package/dist/sdk/agent/refusal-reachability.js +0 -4
- package/dist/sdk/agent/task-transcript-contracts.js +0 -2
- package/dist/sdk/agent/tracker-preflight-contracts.js +0 -2
- package/dist/sdk/authoring.js +0 -2
- package/dist/sdk/compose.js +0 -2
- package/dist/sdk/contracts.js +0 -2
- package/dist/sdk/core-governance.js +0 -2
- package/dist/sdk/core.js +0 -2
- package/dist/sdk/corpus-shape.js +0 -2
- package/dist/sdk/define.js +0 -2
- package/dist/sdk/environment/agent-environment.js +0 -2
- package/dist/sdk/governance/artifact-ledgers.js +0 -2
- package/dist/sdk/governance/coverage-assurance.js +0 -2
- package/dist/sdk/governance/reliability.js +0 -2
- package/dist/sdk/governance.js +0 -2
- package/dist/sdk/graph/adapter.js +0 -2
- package/dist/sdk/graph/conformance.js +0 -2
- package/dist/sdk/graph/index.js +0 -2
- package/dist/sdk/graph.js +0 -2
- package/dist/sdk/index.js +0 -2
- package/dist/sdk/query.js +0 -2
- package/dist/sdk/relationship-migration.js +0 -2
- package/dist/sdk/testing.js +0 -8
- package/dist/sdk/workspace-recipe.js +0 -2
- package/docs/AGENT_PROVENANCE_ADR.md +0 -206
- package/docs/DEFECT_RECURRENCE.md +0 -257
- package/docs/PERFORMANCE.md +0 -204
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{Ia as ye,pa as pe}from"./chunk-CFWLQFJM.js";import{La as de,R as oe,W as _e,ma as S,pd as ge,ua as N}from"./chunk-TZY5MVJF.js";import{I as me,r as v,u as ue,v as fe,w as k}from"./chunk-2UQU7HRR.js";import{Ac as se,Ba as b,Ka as I,La as te,Sa as A,Ua as re,Va as ne,Wi as le,hc as ie,ji as ce,lb as C,pj as T,yb as ae}from"./chunk-NGJ5ERBF.js";import{A as c,C as l,E as $}from"./chunk-YYT3MIRF.js";var He=/^[a-z0-9]+(?:-[a-z0-9]+)*$/u;function he(e){let t=e?.trim();if(!t||t==="__proto__"||t.length>128)throw new Error("A legacy author must contain 1-128 characters.");return t}function Ye(e){let t=e?.trim().toLowerCase();if(!t||!He.test(t))throw new Error("A canonical harness must be a lowercase dash-separated namespace.");return t}function We(e){return Object.fromEntries(Object.entries(e).sort(([t],[r])=>t.localeCompare(r)))}function Be(e,t){let r=new Set;for(let n of(e??[]).slice(0,1e4)){let i=n.trim().slice(0,128);i.length===0||i.startsWith("harness:")||Object.hasOwn(t,i)||r.add(i)}return r.size}function Xe(e,t){let r=he(t.legacy_author),n=Ye(t.canonical_harness);if(r===n||r===`harness:${n}`||r.startsWith("harness:"))throw new Error(`The legacy author "${r}" is already canonical and must not be aliased.`);return e[r]===n?!1:(e[r]=n,!0)}function Qe(e,t){if(t.operation==="add")return Xe(e,t);if(t.operation==="remove"){let n=he(t.legacy_author);return Object.hasOwn(e,n)?(delete e[n],!0):!1}if(t.operation==="clear"){let n=Object.keys(e).length>0;for(let i of Object.keys(e))delete e[i];return n}let r=t.operation;throw new Error(`Unsupported vocabulary operation: ${String(r)}`)}function U(e){return{version:e?.version??1,alias_count:Object.keys(e?.aliases??{}).length}}function ve(e,t){let r=e?.version??1,n={...e?.aliases},i=Qe(n,t),a={version:i?r+1:r,aliases:We(n)};return{vocabulary:a,preview:{operation:t.operation,changed:i,version_before:r,version_after:a.version,alias_count:Object.keys(a.aliases).length,residual_author_count:Be(t.observed_authors,a.aliases)}}}var E=[{key:"context_default_depth",path:"context.default_depth",kind:"string",choices:b,summary:"Default context depth."},{key:"context_activity_limit",path:"context.activity_limit",kind:"integer",min:1,max:Number.MAX_SAFE_INTEGER,decimal_only:!0,summary:"Default context activity row limit; positive decimal integer."},{key:"context_stale_threshold_days",path:"context.stale_threshold_days",kind:"integer",min:1,max:Number.MAX_SAFE_INTEGER,decimal_only:!0,summary:"Days before context marks an item stale; positive decimal integer."},...["hierarchy","activity","progress","recently_created","unparented","blockers","files","workload","staleness","tests"].map(e=>({key:`context_sections_${e}`,path:`context.sections.${e}`,kind:"boolean",summary:`Include ${e} in default context output.`})),{key:"context_next_ranking_policy",path:"context.next_ranking_policy",kind:"string",choices:["priority_floor","weighted"],summary:"Ready-queue order for pm next with the built-in scorer: priority_floor (resume in-progress work, then priority tiers, relevance within a tier) or weighted (blended relevance order). An extension context_relevance scorer keeps its own order."},{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:"Wait budget in milliseconds before a contended lock fails with lock_conflict; item-store mutations, restore and the hierarchy lock treat it as a no-progress window that each observed owner handoff restarts (120 s total cap), other locks as a fixed total; 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)."}],Je=new Map(E.flatMap(e=>[[e.key,e],[e.path.toLowerCase().replaceAll("-","_"),e]]));function L(e){if(typeof e!="string")return;let t=e.trim().toLowerCase().replaceAll("-","_");if(t.length!==0)return Je.get(t)}function Ze(e,t){let r=t.trim().toLowerCase();return r==="true"||r==="1"||r==="yes"||r==="on"?{ok:!0,parsed:{descriptor:e,value:!0}}:r==="false"||r==="0"||r==="no"||r==="off"?{ok:!0,parsed:{descriptor:e,value:!1}}:{ok:!1,error:{message:`Config set ${e.key} requires a boolean value (true|false), got "${t}"`}}}function xe(e,t,r){return e.key==="context_default_depth"&&(r=r.toLowerCase()),e.non_empty===!0&&r.length===0?{ok:!1,error:{message:`Config set ${e.key} requires a non-empty value`}}:e.choices&&!e.choices.includes(r)?{ok:!1,error:{message:`Config set ${e.key} must be one of ${e.choices.join("|")}, got "${t}"`}}:{ok:!0,parsed:{descriptor:e,value:r}}}function ke(e,t){let r=[e.min===void 0?"":`minimum ${e.min}`,e.max===void 0?"":`maximum ${e.max}`].filter(Boolean).join(", ");return{message:`Config set ${e.key} requires non-empty decimal integer digits${r?` (${r})`:""}, got "${t}"`}}function et(e,t,r){if(e.decimal_only&&!/^\d+$/u.test(r))return{ok:!1,error:ke(e,t)};if(r.length===0)return{ok:!1,error:{message:`Config set ${e.key} requires a non-empty value`}};let n=Number(r);return Number.isFinite(n)?{ok:!0,value:n}:{ok:!1,error:e.decimal_only?ke(e,t):{message:`Config set ${e.key} requires a finite number, got "${t}"`}}}function tt(e,t,r){return!Number.isInteger(r)||r<0?{ok:!1,error:{message:`Config set ${e.key} requires a non-negative integer, got "${t}"`}}:e.min!==void 0&&r<e.min?{ok:!1,error:{message:`Config set ${e.key} requires an integer >= ${e.min}, got "${t}" (the runtime silently ignores 0 here and falls back to the default)`}}:e.max!==void 0&&r>e.max?{ok:!1,error:{message:`Config set ${e.key} requires an integer <= ${e.max}, got "${t}"`}}:{ok:!0,parsed:{descriptor:e,value:r}}}function rt(e,t,r){return r<0||r>1?{ok:!1,error:{message:`Config set ${e.key} requires a number in [0, 1], got "${t}"`}}:{ok:!0,parsed:{descriptor:e,value:r}}}function nt(e,t,r){return e.min!==void 0&&r<e.min?{ok:!1,error:{message:`Config set ${e.key} requires a number >= ${e.min}, got "${t}"`}}:{ok:!0,parsed:{descriptor:e,value:r}}}function j(e,t){if(typeof t!="string")return{ok:!1,error:{message:`Config set ${e.key} requires a string value`}};let r=t.trim();if(e.kind==="boolean")return Ze(e,t);if(e.kind==="string")return xe(e,t,r);let n=et(e,t,r);return n.ok?e.kind==="integer"?tt(e,t,n.value):e.kind==="ratio"?rt(e,t,n.value):nt(e,t,n.value):{ok:!1,error:n.error}}function D(e,t){let r=t.path.split("."),n=e;for(let i of r){if(typeof n!="object"||n===null)return null;let a=Object.getOwnPropertyDescriptor(n,i);if(!a||!Object.hasOwn(a,"value"))return null;n=a.value}return typeof n=="string"||typeof n=="number"||typeof n=="boolean"?n:null}function we(e,t,r){let n=t.path.split(".");if(n.some(s=>s.length===0||["__proto__","constructor","prototype"].includes(s)))throw new Error("Unsafe settings path");let i=e;for(let s=0;s<n.length-1;s+=1){let d=n[s],_=Object.getOwnPropertyDescriptor(i,d)?.value;if(typeof _!="object"||_===null||Array.isArray(_)){let u={};Object.defineProperty(i,d,{value:u,writable:!0,enumerable:!0,configurable:!0}),i=u}else i=_}let a=n[n.length-1];return Object.getOwnPropertyDescriptor(i,a)?.value===r?!1:(Object.defineProperty(i,a,{value:r,writable:!0,enumerable:!0,configurable:!0}),!0)}var be=["project","global"],h={definition_of_done:["definition-of-done","definition_of_done","workflow.definition_of_done"],item_format:["item-format","item_format"],history_missing_stream_policy:["history-missing-stream-policy","history_missing_stream_policy","history.missing_stream"],sprint_release_format_policy:["sprint-release-format-policy","sprint_release_format_policy","validation.sprint_release_format"],parent_reference_policy:["parent-reference-policy","parent_reference_policy","validation.parent_reference"],metadata_validation_profile:["metadata-validation-profile","metadata_validation_profile","validation.metadata_profile"],metadata_required_fields:["metadata-required-fields","metadata_required_fields","validation.metadata_required_fields"],lifecycle_stale_blocker_reason_patterns:["lifecycle-stale-blocker-reason-patterns","lifecycle_stale_blocker_reason_patterns","validation.lifecycle_stale_blocker_reason_patterns"],lifecycle_closure_like_blocked_reason_patterns:["lifecycle-closure-like-blocked-reason-patterns","lifecycle_closure_like_blocked_reason_patterns","validation.lifecycle_closure_like_blocked_reason_patterns"],lifecycle_closure_like_resolution_patterns:["lifecycle-closure-like-resolution-patterns","lifecycle_closure_like_resolution_patterns","validation.lifecycle_closure_like_resolution_patterns"],lifecycle_closure_like_actual_result_patterns:["lifecycle-closure-like-actual-result-patterns","lifecycle_closure_like_actual_result_patterns","validation.lifecycle_closure_like_actual_result_patterns"],governance_preset:["governance-preset","governance_preset","governance.preset"],governance_ownership_enforcement:["governance-ownership-enforcement","governance_ownership_enforcement","governance.ownership_enforcement"],governance_create_mode_default:["governance-create-mode-default","governance_create_mode_default","governance.create_mode_default"],governance_close_validation_default:["governance-close-validation-default","governance_close_validation_default","governance.close_validation_default"],governance_require_close_reason:["governance-require-close-reason","governance_require_close_reason","governance.require_close_reason"],governance_create_default_type:["governance-create-default-type","governance_create_default_type","governance.create_default_type"],governance_workflow_enforcement:["governance-workflow-enforcement","governance_workflow_enforcement","governance.workflow_enforcement"],governance_start_blocker_enforcement:["governance-start-blocker-enforcement","governance_start_blocker_enforcement","governance.start_blocker_enforcement"],governance_parent_reference_policy:["governance-parent-reference-policy","governance_parent_reference_policy","governance.parent_reference"],governance_metadata_validation_profile:["governance-metadata-validation-profile","governance_metadata_validation_profile","governance.metadata_profile"],governance_force_required_for_stale_lock:["governance-force-required-for-stale-lock","governance_force_required_for_stale_lock","governance.force_required_for_stale_lock"],test_result_tracking:["test-result-tracking","test_result_tracking","testing.record_results_to_items"],untrusted_linked_test_execution:["untrusted-linked-test-execution","untrusted_linked_test_execution","testing.allow_untrusted_linked_tests"],telemetry_tracking:["telemetry-tracking","telemetry_tracking","telemetry.enabled"],agent_identity_vocabulary:["agent-identity-vocabulary","agent_identity_vocabulary","agent_identity.identity_vocabulary"],context:["context"]},Ce=Object.fromEntries(Object.keys(h).flatMap(e=>h[e].map(t=>[t,e]))),at={definition_of_done:"Definition of Done criteria list.",item_format:"Default item file format.",history_missing_stream_policy:"Missing history stream handling policy.",sprint_release_format_policy:"Sprint/release format validation policy.",parent_reference_policy:"Parent reference validation policy.",metadata_validation_profile:"Validate metadata profile policy (core|strict|custom).",metadata_required_fields:"Validate custom metadata required-fields list.",lifecycle_stale_blocker_reason_patterns:"Validate lifecycle stale-blocker reason substring patterns (criteria list).",lifecycle_closure_like_blocked_reason_patterns:"Validate lifecycle closure-like blocked_reason substring patterns (criteria list).",lifecycle_closure_like_resolution_patterns:"Validate lifecycle closure-like resolution substring patterns (criteria list).",lifecycle_closure_like_actual_result_patterns:"Validate lifecycle closure-like actual_result substring patterns (criteria list).",governance_preset:"Governance preset policy (minimal|default|strict|custom).",governance_ownership_enforcement:"Governance ownership enforcement policy (none|warn|strict).",governance_create_mode_default:"Governance default create mode (progressive|strict).",governance_close_validation_default:"Governance default close validation mode (off|warn|strict).",governance_require_close_reason:"Governance close-reason requirement policy (enabled|disabled).",governance_create_default_type:"Governance default item type for `pm create` when --type is omitted.",governance_workflow_enforcement:"Governance per-type transition enforcement mode (off|warn|strict).",governance_start_blocker_enforcement:"Governance admission for starting an item whose declared blocker is still open (off|warn|strict; strict by default).",governance_parent_reference_policy:"Governance parent reference policy (warn|strict_error).",governance_metadata_validation_profile:"Governance metadata validation profile (core|strict|custom).",governance_force_required_for_stale_lock:"Governance stale-lock force policy (enabled|disabled).",test_result_tracking:"Item-level linked test result persistence policy.",untrusted_linked_test_execution:"Permit an explicit per-run override for commands not trusted by this clone.",telemetry_tracking:"Telemetry usage reporting policy.",agent_identity_vocabulary:"Versioned exact legacy-author interpretation vocabulary (summary only).",context:"Context command settings (depth, section toggles, limits)."},it=["lifecycle_stale_blocker_reason_patterns","lifecycle_closure_like_blocked_reason_patterns","lifecycle_closure_like_resolution_patterns","lifecycle_closure_like_actual_result_patterns"],ot=new Set(["metadata_required_fields",...it]),st=new Set(["test_result_tracking","untrusted_linked_test_execution","telemetry_tracking"]),ct=new Set(["governance_require_close_reason","governance_force_required_for_stale_lock"]),lt=new Set(["governance_ownership_enforcement","governance_create_mode_default","governance_close_validation_default"]),_t=new Set(["governance_parent_reference_policy","governance_metadata_validation_profile","governance_workflow_enforcement","governance_start_blocker_enforcement"]),dt=new Set(["governance_preset","governance_create_default_type"]),Pe=e=>ot.has(e),ut=e=>lt.has(e),ft=e=>_t.has(e),mt=e=>dt.has(e);function z(e){return e==="definition_of_done"||Pe(e)}function qe(e){if(be.includes(e))return e;throw new l(`Invalid config scope "${e}". Allowed: ${be.join(", ")}`,c.USAGE)}function Ge(e){if(e==="get"||e==="set"||e==="list"||e==="export")return e;throw oe({command_path:"config",token:e.trim()||"<empty>",allowed:["export","get","list","set"],token_kind:"action"})}function Re(e,t="global",r){let n=Object.hasOwn(Ce,e)?Ce[e]:void 0;if(n)return n;let i=[...Object.values(h),...E.map(u=>[u.key.replaceAll("_","-"),u.path])],a=e.toLowerCase().replaceAll(/[_.]/gu,"-"),o=i.map(u=>({key:u[0],distance:Math.min(...u.map(g=>ie(a,g.replaceAll(/[_.]/gu,"-"),3)??1/0))})).filter(({distance:u})=>Number.isFinite(u)).sort((u,g)=>u.distance-g.distance||u.key.localeCompare(g.key)).slice(0,3).map(({key:u})=>u),s=r?ae(r):[],d=C([...s,"config",t,"list","--json"]),_=o.length>0?` Did you mean ${o.map(u=>u==="telemetry-tracking"&&t==="project"?`${u} (global only)`:u).join(", ")}?`:"";throw new l(`Invalid config key "${e}".${_} Inspect keys and aliases with ${d}.`,c.USAGE,{code:"config_key_unknown",changed:!1,required:`Use a key or settings path from ${d}.`,examples:[d],recovery:{allowed_values:[...new Set([...ee(t).flatMap(u=>h[u]),...E.flatMap(u=>[u.key,u.key.replaceAll("_","-"),u.path])])],candidate_commands:o.map(u=>C([...s,"config",u==="telemetry-tracking"?"global":t,"get",u,"--json"])),next_best_command:d}})}function Oe(e,t){let r=[...new Set((e??[]).map(n=>n.trim()).filter(n=>n.length>0))].sort((n,i)=>n.localeCompare(i));if(t){if(r.length>0)throw new l("Config set definition-of-done cannot combine --clear-criteria with --criterion values",c.USAGE);return[]}if(r.length===0)throw new l("Config set definition-of-done requires at least one non-empty --criterion value (or --clear-criteria to clear)",c.USAGE);return r}function $e(e){let t=e?.trim().toLowerCase();if(t==="toon")return"toon";throw t==="json_markdown"?new l("Config set item-format no longer accepts json_markdown. Markdown item files are legacy read/migration input only.",c.USAGE):new l("Config set item-format requires --format toon",c.USAGE)}function K(e){let t=e?.trim().toLowerCase().replaceAll("-","_");if(t==="auto_create"||t==="strict_error")return t;throw new l("Config set history-missing-stream-policy requires --policy with one of: auto_create, strict_error",c.USAGE)}function Ie(e){return H(e,"test-result-tracking")}function H(e,t){let r=e?.trim().toLowerCase().replaceAll("-","_");if(r==="enabled"||r==="disabled")return r;throw new l(`Config set ${t} requires --policy with one of: enabled, disabled`,c.USAGE)}function Y(e){let t=e?.trim().toLowerCase().replaceAll("-","_");if(t==="enabled"||t==="disabled")return t;throw new l("Config set telemetry-tracking requires --policy with one of: enabled, disabled",c.USAGE)}function q(e){let t=e?.trim().toLowerCase().replaceAll("-","_");if(t==="core"||t==="strict"||t==="custom")return t;throw new l("Config set metadata-validation-profile requires --policy with one of: core, strict, custom",c.USAGE)}function W(e){let t=e?.trim().toLowerCase().replaceAll("-","_");if(t==="minimal"||t==="default"||t==="strict"||t==="custom")return t;throw new l("Config set governance-preset requires --policy with one of: minimal, default, strict, custom",c.USAGE)}function B(e){let t=e?.trim().toLowerCase().replaceAll("-","_");if(t==="none"||t==="warn"||t==="strict")return t;throw new l("Config set governance-ownership-enforcement requires --policy with one of: none, warn, strict",c.USAGE)}function X(e){let t=e?.trim().toLowerCase().replaceAll("-","_");if(t==="progressive"||t==="strict")return t;throw new l("Config set governance-create-mode-default requires --policy with one of: progressive, strict",c.USAGE)}function Q(e){let t=e?.trim().toLowerCase().replaceAll("-","_");if(t==="off"||t==="warn"||t==="strict")return t;if(t==="none"||t==="disabled")return"off";throw new l("Config set governance-close-validation-default requires --policy with one of: off, warn, strict",c.USAGE)}function P(e,t="governance-workflow-enforcement"){let r=typeof e=="string"?e.trim().toLowerCase().replaceAll("-","_"):void 0;if(r==="off"||r==="warn"||r==="strict")return r;if(r==="none"||r==="disabled")return"off";throw new l(`Config set ${t} requires one of: off, warn, strict`,c.USAGE)}function J(e){let t=e?.trim().toLowerCase().replaceAll("-","_");if(t==="enabled"||t==="disabled")return t;throw new l("Config set governance-force-required-for-stale-lock requires --policy with one of: enabled, disabled",c.USAGE)}function Z(e){let t=e?.trim().toLowerCase().replaceAll("-","_");if(t==="enabled"||t==="disabled")return t;throw new l("Config set governance-require-close-reason requires --policy with one of: enabled, disabled",c.USAGE)}var gt={test_result_tracking:"test-result-tracking",untrusted_linked_test_execution:"untrusted-linked-test-execution"},pt={governance_workflow_enforcement:"governance-workflow-enforcement",governance_start_blocker_enforcement:"governance-start-blocker-enforcement"};function M(e,t){let r=gt[e];if(r)return H(t,r);let n=pt[e];if(n)return P(t,n);switch(e){case"history_missing_stream_policy":return K(t);case"sprint_release_format_policy":return N(t);case"parent_reference_policy":case"governance_parent_reference_policy":return S(t);case"metadata_validation_profile":case"governance_metadata_validation_profile":return q(t);case"governance_preset":return W(t);case"governance_ownership_enforcement":return B(t);case"governance_create_mode_default":return X(t);case"governance_close_validation_default":return Q(t);case"governance_require_close_reason":return Z(t);case"governance_force_required_for_stale_lock":return J(t);case"telemetry_tracking":return Y(t);default:return t.trim().toLowerCase().replaceAll("-","_")}}var Ee={author:"author",acceptance_criteria:"acceptance_criteria","acceptance-criteria":"acceptance_criteria",estimated_minutes:"estimated_minutes","estimated-minutes":"estimated_minutes",estimate:"estimated_minutes",close_reason:"close_reason","close-reason":"close_reason",reviewer:"reviewer",risk:"risk",confidence:"confidence",sprint:"sprint",release:"release"},yt=["author","acceptance_criteria","estimated_minutes","close_reason","reviewer","risk","confidence","sprint","release"];function Te(e,t){let r=[...new Set((e??[]).map(a=>a.trim()).filter(a=>a.length>0))];if(t){if(r.length>0)throw new l("Config set metadata-required-fields cannot combine --clear-criteria with --criterion values",c.USAGE);return[]}if(r.length===0)throw new l("Config set metadata-required-fields requires at least one --criterion value (or --clear-criteria to clear)",c.USAGE);let n=r.map(a=>a.toLowerCase().replaceAll("-","_")),i=n.filter(a=>Ee[a]===void 0);if(i.length>0)throw new l(`Config set metadata-required-fields received unsupported values: ${i.join(", ")}. Supported values: ${yt.join(", ")}`,c.USAGE);return[...new Set(n.map(a=>Ee[a]))].sort((a,o)=>a.localeCompare(o))}function ht(e,t,r){let n=[...new Set((t??[]).map(i=>i.trim().toLowerCase()).filter(i=>i.length>0))].sort((i,a)=>i.localeCompare(a));if(r){if(n.length>0)throw new l(`Config set ${h[e][0]} cannot combine --clear-criteria with --criterion values`,c.USAGE);return[]}if(n.length===0)throw new l(`Config set ${h[e][0]} requires at least one --criterion value (or --clear-criteria to clear)`,c.USAGE);return n}function Ne(e){return[...new Set(e)].sort((t,r)=>t.localeCompare(r))}function vt(e,t,r,n){if(e==="list"||e==="export"){if(typeof t=="string"&&t.trim().length>0)throw new l(`Config action "${e}" does not accept <key>`,c.USAGE);return}if(typeof t!="string"||t.trim().length===0)throw new l(`Config action "${e}" requires <key>`,c.USAGE);return Re(t,r,n)}function Ue(e){if(!e)throw new l("Config action requires <key>",c.USAGE)}var kt={definition_of_done:e=>[...e.workflow.definition_of_done],item_format:e=>e.item_format,history_missing_stream_policy:e=>e.history.missing_stream,sprint_release_format_policy:e=>e.validation.sprint_release_format,parent_reference_policy:e=>e.validation.parent_reference,metadata_validation_profile:e=>e.validation.metadata_profile,metadata_required_fields:e=>[...e.validation.metadata_required_fields],lifecycle_stale_blocker_reason_patterns:e=>[...e.validation.lifecycle_stale_blocker_reason_patterns],lifecycle_closure_like_blocked_reason_patterns:e=>[...e.validation.lifecycle_closure_like_blocked_reason_patterns],lifecycle_closure_like_resolution_patterns:e=>[...e.validation.lifecycle_closure_like_resolution_patterns],lifecycle_closure_like_actual_result_patterns:e=>[...e.validation.lifecycle_closure_like_actual_result_patterns],governance_preset:e=>e.governance.preset,governance_ownership_enforcement:e=>e.governance.ownership_enforcement,governance_create_mode_default:e=>e.governance.create_mode_default,governance_close_validation_default:e=>e.governance.close_validation_default,governance_require_close_reason:e=>e.governance.require_close_reason?"enabled":"disabled",governance_create_default_type:e=>e.governance.create_default_type??"",governance_workflow_enforcement:e=>e.governance.workflow_enforcement??"off",governance_start_blocker_enforcement:e=>e.governance.start_blocker_enforcement??"strict",governance_parent_reference_policy:e=>e.governance.parent_reference,governance_metadata_validation_profile:e=>e.governance.metadata_profile,governance_force_required_for_stale_lock:e=>e.governance.force_required_for_stale_lock?"enabled":"disabled",test_result_tracking:e=>e.testing.record_results_to_items?"enabled":"disabled",untrusted_linked_test_execution:e=>e.testing.allow_untrusted_linked_tests?"enabled":"disabled",telemetry_tracking:e=>e.telemetry.enabled?"enabled":"disabled",agent_identity_vocabulary:e=>U(e.agent_identity?.identity_vocabulary),context:e=>({default_depth:e.context.default_depth,activity_limit:e.context.activity_limit,stale_threshold_days:e.context.stale_threshold_days,next_ranking_policy:e.context.next_ranking_policy,sections:{...e.context.sections}})};function x(e,t){return kt[t](e)}function p(e,t){return t.length===0?e:{...e,warnings:t}}async function wt(e,t){let r=process.cwd(),n=e==="project"?A(r,t.path):re(r),i=ne(n);return e==="project"&&await me(n),{pmRoot:n,settingsPath:i}}function bt(e){if(e===void 0)return;let t=e.trim().toLowerCase();if(t==="true"||t==="enabled"||t==="on"||t==="1")return!0;if(t==="false"||t==="disabled"||t==="off"||t==="0")return!1;throw new l(`Context section toggle must be true|false|enabled|disabled, got "${e}"`,c.USAGE)}function Ae(e,t){let r=L(t==="--activity-limit"?"context_activity_limit":"context_stale_threshold_days"),n=j(r,e);if(n.ok)return n.parsed.value;throw new l(`Context ${t}: ${n.error.message}`,c.USAGE)}async function Ct(e,t,r,n,i){let a=!1,o=e.context,s=[];if(t.defaultDepth!==void 0){let _=t.defaultDepth.trim().toLowerCase();if(!b.includes(_))throw new l(`Context --default-depth must be one of ${b.join("|")}`,c.USAGE);s.push("context.default_depth"),o.default_depth!==_&&(o.default_depth=_,a=!0)}if(t.activityLimit!==void 0){let _=Ae(t.activityLimit,"--activity-limit");s.push("context.activity_limit"),o.activity_limit!==_&&(o.activity_limit=_,a=!0)}if(t.staleThresholdDays!==void 0){let _=Ae(t.staleThresholdDays,"--stale-threshold-days");s.push("context.stale_threshold_days"),o.stale_threshold_days!==_&&(o.stale_threshold_days=_,a=!0)}let d=[["hierarchy",t.sectionHierarchy],["activity",t.sectionActivity],["progress",t.sectionProgress],["blockers",t.sectionBlockers],["files",t.sectionFiles],["workload",t.sectionWorkload],["staleness",t.sectionStaleness],["tests",t.sectionTests]];for(let[_,u]of d){let g=bt(u);if(g!==void 0){let y=_;s.push(`context.sections.${_}`),o.sections[y]!==g&&(o.sections[y]=g,a=!0)}}return(a||v(e))&&(await k(r.pmRoot,e,"config:set:context",{assignedPaths:s}),a=!0),p({scope:n,key:"context",context_settings:{default_depth:o.default_depth,activity_limit:o.activity_limit,stale_threshold_days:o.stale_threshold_days,next_ranking_policy:o.next_ranking_policy,sections:{...o.sections}},settings_path:r.settingsPath,changed:a},i)}function Et(e,t,r){if(r.value!==void 0&&r.value!==t)throw new l(`Config set ${e} received both positional value "${t}" and --value "${r.value}". Pass only one.`,c.USAGE);return{...r,value:t}}function Le(e,t,r,n,i,a){if(i===void 0)return a;if(e!=="set")throw new l(`Config action "${e}" does not accept a positional value. Only "set" takes <value>.`,c.USAGE);if(typeof t!="string"||t.trim().length===0)throw new l('Config action "set" requires <key> before a positional <value>.',c.USAGE);if(n)return Et(t,i,a);Ue(r);let o=_e(r,i);if(!o.routable)throw new l(o.reason,c.USAGE);if(o.flag==="criterion"){if(a.criterion!==void 0&&a.criterion.length>0)throw new l(`Config set ${t} received both positional value "${i}" and --criterion. Pass criteria via --criterion only when supplying more than one value.`,c.USAGE);return{...a,criterion:o.values}}if(o.flag==="format")return{...a,format:o.value};if(a.policy!==void 0&&M(r,a.policy)!==M(r,o.value))throw new l(`Config set ${t} received both positional value "${i}" and --policy "${a.policy}". Pass only one.`,c.USAGE);return{...a,policy:o.value}}function je(e,t){let r=`pm config global ${e} telemetry-tracking${t}`;throw new l(`Config ${e} telemetry-tracking applies to this CLI install, not one project. Run: ${r}`,c.USAGE,{code:"invalid_argument_value",reason:"telemetry_consent_is_global",field:"scope",changed:!1,required:`Run: ${r}`,examples:[r]})}function ee(e){return Object.keys(h).filter(t=>e==="global"||t!=="telemetry_tracking")}function At(e){let t=ee(e.scope).map(n=>({key:n,aliases:h[n],value_kind:n==="context"||n==="agent_identity_vocabulary"?"object":z(n)?"string_array":"enum",set_flags:n==="context"?["--default-depth","--activity-limit","--stale-threshold-days","--section-<name>"]:n==="agent_identity_vocabulary"?["--policy","--value","--criterion"]:z(n)?["--criterion","--clear-criteria"]:n==="item_format"?["--format"]:["--policy"],summary:at[n],value:x(e.settings,n)})),r=E.map(n=>({key:n.key,canonical_key:n.key.replaceAll("_","-"),path:n.path,kind:n.kind,value:D(e.settings,n),summary:n.summary,...n.choices?{choices:[...n.choices]}:{},...n.min===void 0?{}:{min:n.min},...n.max===void 0?{}:{max:n.max}}));return p({scope:e.scope,keys:t,nested_settings:r,count:t.length,settings_path:e.target.settingsPath,changed:!1},e.warnings)}function St(e){let t=Object.fromEntries(ee(e.scope).map(r=>[r,x(e.settings,r)]));return p({scope:e.scope,values:t,settings_path:e.target.settingsPath,changed:!1},e.warnings)}function Pt(e,t){let r=x(e.settings,t),n={scope:e.scope,key:t,settings_path:e.target.settingsPath,changed:!1};return t==="item_format"?p({...n,format:e.settings.item_format,has_explicit_item_format:e.metadata.has_explicit_item_format},e.warnings):t==="context"?p({...n,context_settings:r},e.warnings):t==="agent_identity_vocabulary"?p({...n,identity_vocabulary:r},e.warnings):Array.isArray(r)?p({...n,criteria:r},e.warnings):p({...n,policy:r},e.warnings)}async function qt(e,t,r,n){if(t==="get"){let s=D(e.settings,r);return p({scope:e.scope,key:r.key,nested_setting:{key:r.key,path:r.path,kind:r.kind,value:s},settings_path:e.target.settingsPath,changed:!1},e.warnings)}let i=n.value;if(typeof i!="string")throw new l(`Config set ${r.key} requires a value. Pass it positionally (\`pm config ${e.scope} set ${r.key} <value>\`) or via --value.`,c.USAGE);let a=j(r,i);if(!a.ok)throw new l(a.error.message,c.USAGE);let o=we(e.settings,r,a.parsed.value)||v(e.settings);return o&&await k(e.target.pmRoot,e.settings,`config:set:${r.path}`,{assignedPaths:[r.path]}),p({scope:e.scope,key:r.key,nested_setting:{key:r.key,path:r.path,kind:r.kind,value:a.parsed.value},settings_path:e.target.settingsPath,changed:o},e.warnings)}async function f(e,t,r,n=[]){(t||v(e.settings))&&(await k(e.target.pmRoot,e.settings,r,{assignedPaths:n}),v(e.settings)&&(e.fallbackRepairWritten=!0))}function F(e,t,r){return e!==r||t!==r}function m(e,t,r,n){return p({scope:e.scope,key:t,policy:r,settings_path:e.target.settingsPath,changed:n},e.warnings)}function V(e,t,r,n){return p({scope:e.scope,key:t,criteria:r,settings_path:e.target.settingsPath,changed:n},e.warnings)}async function Se(e,t,r){let n=I(t,T()),i=await ge(e,r,"config:set:item_format:migrate",n.type_to_folder,t.schema);return{target_format:i.target_format,scanned:i.scanned,migrated:i.migrated,removed:i.removed,warnings:i.warnings}}async function Gt(e,t){let r=$e(t.format),n=e.settings.item_format!==r||!e.metadata.has_explicit_item_format,i;if(n){e.settings.item_format=r;let a={assignedPaths:["item_format"]};v(e.settings)?(await k(e.target.pmRoot,e.settings,"config:set:item_format",a),e.fallbackRepairWritten=!0,i=await Se(e.target.pmRoot,await fe(e.target.pmRoot),r)):(i=await Se(e.target.pmRoot,e.settings,r),await k(e.target.pmRoot,e.settings,"config:set:item_format",a))}return p({scope:e.scope,key:"item_format",format:e.settings.item_format,has_explicit_item_format:!0,migration:i,settings_path:e.target.settingsPath,changed:n},e.warnings)}async function Rt(e,t,r){if(t==="history_missing_stream_policy"){let a=K(r.policy),o=e.settings.history.missing_stream!==a;return e.settings.history.missing_stream=a,await f(e,o,"config:set:history_missing_stream_policy",["history.missing_stream"]),m(e,t,e.settings.history.missing_stream,o)}if(t==="sprint_release_format_policy"){let a=N(r.policy),o=e.settings.validation.sprint_release_format!==a;return e.settings.validation.sprint_release_format=a,await f(e,o,"config:set:sprint_release_format_policy",["validation.sprint_release_format"]),m(e,t,e.settings.validation.sprint_release_format,o)}if(t==="parent_reference_policy"){let a=S(r.policy),o=e.settings.validation.parent_reference!==a||e.settings.governance.preset!=="custom"||e.settings.governance.parent_reference!==a;return e.settings.validation.parent_reference=a,e.settings.governance.preset="custom",e.settings.governance.parent_reference=a,await f(e,o,"config:set:parent_reference_policy",["validation.parent_reference","governance.preset","governance.parent_reference"]),m(e,t,e.settings.validation.parent_reference,o)}let n=q(r.policy),i=e.settings.validation.metadata_profile!==n||e.settings.governance.preset!=="custom"||e.settings.governance.metadata_profile!==n;return e.settings.validation.metadata_profile=n,e.settings.governance.preset="custom",e.settings.governance.metadata_profile=n,await f(e,i,"config:set:metadata_validation_profile",["validation.metadata_profile","governance.preset","governance.metadata_profile"]),m(e,t,e.settings.validation.metadata_profile,i)}async function Ot(e,t,r){if(t==="metadata_required_fields"){let s=Te(r.criterion,r.clearCriteria),d=s.length!==e.settings.validation.metadata_required_fields.length||s.some((_,u)=>_!==e.settings.validation.metadata_required_fields[u]);return e.settings.validation.metadata_required_fields=s,await f(e,d,"config:set:metadata_required_fields",["validation.metadata_required_fields"]),V(e,t,[...e.settings.validation.metadata_required_fields],d)}let i={lifecycle_stale_blocker_reason_patterns:e.settings.validation.lifecycle_stale_blocker_reason_patterns,lifecycle_closure_like_blocked_reason_patterns:e.settings.validation.lifecycle_closure_like_blocked_reason_patterns,lifecycle_closure_like_resolution_patterns:e.settings.validation.lifecycle_closure_like_resolution_patterns,lifecycle_closure_like_actual_result_patterns:e.settings.validation.lifecycle_closure_like_actual_result_patterns}[t],a=ht(t,r.criterion,r.clearCriteria),o=a.length!==i.length||a.some((s,d)=>s!==i[d]);return i.splice(0,i.length,...a),await f(e,o,`config:set:${t}`,[`validation.${t}`]),V(e,t,[...i],o)}async function $t(e,t,r){if(t==="governance_preset"){let d=W(r.policy),_=e.settings.governance.preset!==d;return e.settings.governance.preset=d,await f(e,_,"config:set:governance_preset",["governance.preset"]),m(e,t,e.settings.governance.preset,_)}let n=typeof r.policy=="string",i=n?r.policy.trim():"";if(n&&i.length===0){let d=e.settings.governance.create_default_type!==void 0;return delete e.settings.governance.create_default_type,await f(e,d,"config:set:governance_create_default_type",["governance.create_default_type"]),m(e,t,e.settings.governance.create_default_type??"",d)}if(i.length===0)throw new l('Config set governance-create-default-type requires an item type value (or an empty value "" to clear it)',c.USAGE);let a=I(e.settings,T()),o=te(i,a);if(!o)throw new l(de(i,a.types,se(e.target.pmRoot,e.settings.schema)),c.USAGE);let s=e.settings.governance.create_default_type!==o;return e.settings.governance.create_default_type=o,await f(e,s,"config:set:governance_create_default_type",["governance.create_default_type"]),m(e,t,e.settings.governance.create_default_type,s)}async function It(e,t,r){if(t==="governance_ownership_enforcement"){let a=B(r.policy),o=e.settings.governance.preset!=="custom"||e.settings.governance.ownership_enforcement!==a;return e.settings.governance.preset="custom",e.settings.governance.ownership_enforcement=a,await f(e,o,"config:set:governance_ownership_enforcement",["governance.preset","governance.ownership_enforcement"]),m(e,t,e.settings.governance.ownership_enforcement,o)}if(t==="governance_create_mode_default"){let a=X(r.policy),o=e.settings.governance.preset!=="custom"||e.settings.governance.create_mode_default!==a;return e.settings.governance.preset="custom",e.settings.governance.create_mode_default=a,await f(e,o,"config:set:governance_create_mode_default",["governance.preset","governance.create_mode_default"]),m(e,t,e.settings.governance.create_mode_default,o)}let n=Q(r.policy),i=e.settings.governance.preset!=="custom"||e.settings.governance.close_validation_default!==n;return e.settings.governance.preset="custom",e.settings.governance.close_validation_default=n,await f(e,i,"config:set:governance_close_validation_default",["governance.preset","governance.close_validation_default"]),m(e,t,e.settings.governance.close_validation_default,i)}async function Tt(e,t,r){if(t==="governance_parent_reference_policy"){let a=S(r.policy),o=e.settings.governance.preset!=="custom"||F(e.settings.governance.parent_reference,e.settings.validation.parent_reference,a);return e.settings.governance.preset="custom",e.settings.governance.parent_reference=a,e.settings.validation.parent_reference=a,await f(e,o,"config:set:governance_parent_reference_policy",["governance.preset","governance.parent_reference","validation.parent_reference"]),m(e,t,e.settings.governance.parent_reference,o)}if(t==="governance_metadata_validation_profile"){let a=q(r.policy),o=e.settings.governance.preset!=="custom"||F(e.settings.governance.metadata_profile,e.settings.validation.metadata_profile,a);return e.settings.governance.preset="custom",e.settings.governance.metadata_profile=a,e.settings.validation.metadata_profile=a,await f(e,o,"config:set:governance_metadata_validation_profile",["governance.preset","governance.metadata_profile","validation.metadata_profile"]),m(e,t,e.settings.governance.metadata_profile,o)}if(t==="governance_start_blocker_enforcement"){let a=P(r.policy,"governance-start-blocker-enforcement"),o=(e.settings.governance.start_blocker_enforcement??"strict")!==a;return e.settings.governance.start_blocker_enforcement=a,await f(e,o,"config:set:governance_start_blocker_enforcement",["governance.start_blocker_enforcement"]),m(e,t,a,o)}let n=P(r.policy),i=(e.settings.governance.workflow_enforcement??"off")!==n;return e.settings.governance.workflow_enforcement=n,await f(e,i,"config:set:governance_workflow_enforcement",["governance.workflow_enforcement"]),m(e,t,e.settings.governance.workflow_enforcement,i)}async function Nt(e,t,r){if(t==="governance_require_close_reason"){let s=Z(r.policy)==="enabled",d=e.settings.governance.require_close_reason!==s;return e.settings.governance.require_close_reason=s,await f(e,d,"config:set:governance_require_close_reason",["governance.require_close_reason"]),m(e,t,e.settings.governance.require_close_reason?"enabled":"disabled",d)}let i=J(r.policy)==="enabled",a=e.settings.governance.preset!=="custom"||e.settings.governance.force_required_for_stale_lock!==i;return e.settings.governance.preset="custom",e.settings.governance.force_required_for_stale_lock=i,await f(e,a,"config:set:governance_force_required_for_stale_lock",["governance.preset","governance.force_required_for_stale_lock"]),m(e,t,e.settings.governance.force_required_for_stale_lock?"enabled":"disabled",a)}async function Ut(e,t,r){if(t==="test_result_tracking"){let s=Ie(r.policy)==="enabled",d=e.settings.testing.record_results_to_items!==s;return e.settings.testing.record_results_to_items=s,await f(e,d,"config:set:test_result_tracking",["testing.record_results_to_items"]),m(e,t,e.settings.testing.record_results_to_items?"enabled":"disabled",d)}if(t==="untrusted_linked_test_execution"){let s=H(r.policy,"untrusted-linked-test-execution")==="enabled",d=e.settings.testing.allow_untrusted_linked_tests!==s;return e.settings.testing.allow_untrusted_linked_tests=s,await f(e,d,"config:set:untrusted_linked_test_execution",["testing.allow_untrusted_linked_tests"]),m(e,t,e.settings.testing.allow_untrusted_linked_tests?"enabled":"disabled",d)}let n=Y(r.policy);e.scope==="project"&&je("set",` --policy ${n}`);let i=n==="enabled",a=e.settings.telemetry.enabled!==i||!e.settings.telemetry.first_run_prompt_completed;return e.settings.telemetry.enabled=i,e.settings.telemetry.first_run_prompt_completed=!0,await f(e,a,"config:set:telemetry_tracking",["telemetry.enabled","telemetry.first_run_prompt_completed"]),m(e,t,e.settings.telemetry.enabled?"enabled":"disabled",a)}async function Lt(e,t,r){let n=Oe(r.criterion,r.clearCriteria),i=n.length!==e.settings.workflow.definition_of_done.length||n.some((a,o)=>a!==e.settings.workflow.definition_of_done[o]);return e.settings.workflow.definition_of_done=n,await f(e,i,"config:set:definition_of_done",["workflow.definition_of_done"]),V(e,t,[...e.settings.workflow.definition_of_done],i)}function jt(e){let t=e?.trim().toLowerCase().replaceAll("_","-"),r=t?.startsWith("preview-")===!0,n=r?t.slice(8):t;if(n==="add"||n==="remove"||n==="clear")return{operation:n,dryRun:r};throw new l("Config set agent-identity-vocabulary requires --policy add|remove|clear|preview-add|preview-remove|preview-clear",c.USAGE)}function Dt(e,t){if(e==="add"){let r=t?.lastIndexOf("=")??-1;if(r<=0||r===t.length-1)throw new l('Config set agent-identity-vocabulary --policy add requires --value "<legacy-author>=<canonical-harness>"',c.USAGE);return{legacy_author:t.slice(0,r),canonical_harness:t.slice(r+1)}}if(e==="remove"){if(t===void 0)throw new l("Config set agent-identity-vocabulary --policy remove requires --value <legacy-author>",c.USAGE);return{legacy_author:t}}if(t!==void 0)throw new l("Config set agent-identity-vocabulary --policy clear does not accept --value",c.USAGE);return{}}async function zt(e,t){let{operation:r,dryRun:n}=jt(t.policy),i=Dt(r,t.value),a;try{a=ve(e.settings.agent_identity?.identity_vocabulary,{operation:r,...i,observed_authors:t.criterion})}catch(o){throw new l(o.message,c.USAGE)}return a.preview.changed&&!n&&(e.settings.agent_identity={...e.settings.agent_identity,identity_vocabulary:a.vocabulary},await f(e,!0,`config:set:agent_identity.identity_vocabulary:${r}:v${a.preview.version_after}`,["agent_identity"])),p({scope:e.scope,key:"agent_identity_vocabulary",identity_vocabulary:U(n?e.settings.agent_identity?.identity_vocabulary:a.vocabulary),vocabulary_mutation:a.preview,settings_path:e.target.settingsPath,changed:a.preview.changed&&!n},e.warnings)}async function Mt(e,t,r){let n=await Ft(e,t,r);return e.fallbackRepairWritten===!0?{...n,changed:!0}:n}async function Ft(e,t,r){if(r.clearCriteria===!0&&!z(t))throw new l("--clear-criteria is only supported with config set criteria-list keys",c.USAGE);return t==="item_format"?Gt(e,r):t==="context"?Ct(e.settings,r,e.target,e.scope,e.warnings):t==="agent_identity_vocabulary"?zt(e,r):t==="definition_of_done"?Lt(e,t,r):Pe(t)?Ot(e,t,r):st.has(t)?Ut(e,t,r):ct.has(t)?Nt(e,t,r):ut(t)?It(e,t,r):ft(t)?Tt(e,t,r):mt(t)?$t(e,t,r):Rt(e,t,r)}async function Pr(e,t,r,n,i,a){let o=qe(e),s=Ge(t),d=s==="get"||s==="set"?L(r):void 0,_=d?void 0:vt(s,r,o,i),u=Le(s,r,_,d,a,n),g=await wt(o,i),{settings:y,metadata:Ve,warnings:Ke}=await ue(g.pmRoot),w={scope:o,target:g,settings:y,metadata:Ve,warnings:Ne(Ke)};return d?qt(w,s,d,u):s==="list"?At(w):s==="export"?St(w):(Ue(_),s==="get"&&_==="telemetry_tracking"&&o==="project"&&je("get",""),s==="get"?Pt(w,_):Mt(w,_,u))}var qr={hasGovernanceValidationMirrorChange:F,applyPositionalValue:Le,normalizeAction:Ge,normalizeCriteria:Oe,normalizeGovernanceCloseValidationDefault:Q,normalizeGovernanceCreateModeDefault:X,normalizeGovernanceForceRequiredForStaleLockPolicy:J,normalizeGovernanceOwnershipEnforcement:B,normalizeGovernancePreset:W,normalizeGovernanceRequireCloseReasonPolicy:Z,normalizeGovernanceWorkflowEnforcement:P,normalizeHistoryMissingStreamPolicy:K,normalizeItemFormat:$e,normalizeKey:Re,normalizeMetadataRequiredFields:Te,normalizePolicyForConflict:M,normalizeScope:qe,normalizeTelemetryTrackingPolicy:Y,normalizeTestResultTrackingPolicy:Ie,normalizeValidateMetadataProfile:q,normalizeWarnings:Ne};import{execFile as Vt}from"node:child_process";import Kt from"node:path";import{promisify as Ht}from"node:util";var Yt=Ht(Vt),ze="@unbrained/pm-cli",Wt="latest",Bt={global:["--global"],project:[]};function De(e){let t=e.project===!0||e.local===!0||e.scope==="project",r=e.global===!0||e.scope==="global";if(t&&r)throw new l('Options "--project/--local" and "--global" are mutually exclusive.',c.USAGE);return r?"global":"project"}function R(e){return e.trim().toLowerCase()}function Me(e,t){let r=R(t);return[e.name,e.directory,e.source.input,e.source.location,e.source.package,e.source.repository,e.source.owner&&e.source.repo?`${e.source.owner}/${e.source.repo}`:void 0].some(i=>typeof i=="string"&&R(i)===r)}function Xt(e,t){let r=A(process.cwd(),t.path),n=le(r,process.cwd());return{selected_root:e==="global"?n.global:n.project}}async function Qt(e,t,r){try{let n=await Yt(e,t,{cwd:r?.cwd,encoding:"utf8"});return{stdout:n.stdout,stderr:n.stderr}}catch(n){let i=typeof n=="object"&&n!==null&&"stderr"in n?String(n.stderr??""):"",a=i.trim().length>0?i.trim():n instanceof Error?n.message:String(n);throw new l(`Command failed: ${e} ${t.join(" ")}
|
|
2
|
+
${a}`,c.GENERIC_FAILURE)}}function O(e){return typeof e.tag=="string"&&e.tag.trim().length>0?e.tag.trim():Wt}function G(e){return typeof e.packageName=="string"&&e.packageName.trim().length>0?e.packageName.trim():ze}async function Jt(e,t){let r=e.commandRunner??Qt,n=G(e),i=O(e),a=`${n}@${i}`,o=["npm","install","-g",a];e.repair===!0&&o.push("--force");let s=ce(import.meta.url,["../../.."]),d={requested:!0,status:"planned",package:n,target:a,command:o,before_version:s,...n===ze?{migration_guidance:["Calendar scheduling commands are package-owned. If calendar is absent, run pm package install calendar --project; use pm calendar meet, pm calendar event, or pm calendar remind."]}:{},repair:e.repair===!0};if(t)return d;try{await r(o[0],o.slice(1));let _=await r("pm",["--version"]);return{...d,status:"updated",after_version:_.stdout.trim()||void 0}}catch(_){return{...d,status:"failed",error:_ instanceof Error?_.message:String(_)}}}function Zt(e){return Kt.isAbsolute(e)||e.startsWith(".")||e.startsWith("..")||e.startsWith("file:")}function xt(e,t){if(e.kind==="npm"){let r=e.input.startsWith("npm:")?e.input.slice(4).trim():e.input.trim();return!Zt(r)&&e.package&&e.package.trim().length>0?`npm:${e.package.trim()}@${t}`:e.input.startsWith("npm:")?e.input:`npm:${e.input}`}return e.input}async function er(e,t){let r=xt(e,t);return e.kind!=="local"||await $(r)?r:await $(e.location)?e.location:r}function tr(e,t,r,n){let i=["pm","package","install",t,r==="global"?"--global":"--project"];return e.kind==="github"&&n&&n.trim().length>0&&i.push("--ref",n.trim()),i}async function Fe(e,t){let r=Xt(e,t);return(await pe(r.selected_root)).state.entries.filter(i=>i.scope===e)}async function rr(e,t,r){let n=await Fe(e,t);return n.find(i=>Me(i,r.name))??n.find(i=>R(i.directory)===R(r.directory))}async function nr(e,t,r,n,i){let a=O(t),o=await er(e.source,a),s=tr(e.source,o,n,e.source.ref),d={name:e.name,directory:e.directory,scope:n,source:e.source,status:"planned",command:s,previous_version:e.manifest_version};if(i)return d;try{await ye(o,{install:!0,project:n==="project",global:n==="global",ref:e.source.kind==="github"?e.source.ref:void 0},r);let _=await rr(n,r,e);return{...d,status:"updated",installed_version:_?.manifest_version}}catch(_){return{...d,status:"failed",error:_ instanceof Error?_.message:String(_)}}}function ar(e,t,r,n){let i=[r?e.status:void 0,...t.map(a=>a.status)].filter(a=>typeof a=="string");return{requested_cli:r,requested_packages:n,planned:i.filter(a=>a==="planned").length,updated:i.filter(a=>a==="updated").length,skipped:i.filter(a=>a==="skipped").length,failed:i.filter(a=>a==="failed").length}}async function Ur(e,t,r){let n=typeof e=="string"&&e.trim().length>0?e.trim():void 0;if(t.cliOnly===!0&&t.packagesOnly===!0){let y=["package","upgrade",...n?[n]:[],"--packages-only","--dry-run",...Bt[De(t)]];throw new l('Options "--cli-only" and "--packages-only" are mutually exclusive.',c.USAGE,{code:"package_upgrade_modes_mutually_exclusive",recovery:{suggested_retry:C(y),suggested_retry_args:y}})}let i=De(t),a=t.dryRun===!0;if(t.cliOnly===!0&&n)throw new l('A package target cannot be used with "--cli-only".',c.USAGE);let o=!(t.packagesOnly===!0||n),s=t.cliOnly!==!0,d=o?await Jt(t,a):{requested:!1,status:"skipped",package:G(t),target:`${G(t)}@${O(t)}`,command:["npm","install","-g",`${G(t)}@${O(t)}`],repair:t.repair===!0,reason:"not_requested"},_=s?await Fe(i,r):[];if(n&&(_=_.filter(y=>Me(y,n)),_.length===0))throw new l(`Managed package "${n}" was not found in ${i} scope.`,c.NOT_FOUND);let u=[];for(let y of _)u.push(await nr(y,t,r,i,a));let g=ar(d,u,o,s);return{ok:g.failed===0,action:"upgrade",dry_run:a,scope:i,target:n,cli:d,packages:u,summary:g}}export{L as a,j as b,D as c,we as d,U as e,ve as f,Pr as g,qr as h,Ur as i};
|
|
3
|
+
//# sourceMappingURL=chunk-5WZZ5XEN.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{constants as f}from"node:fs";import{lstat as c,open as u}from"node:fs/promises";var O=16*1024*1024,E={lstat:c,open:u};function p(n){return n.O_NOFOLLOW??0}async function R(n,o,l=E){let i=await l.lstat(n);if(i.isSymbolicLink()||!i.isFile()||i.size>o)return null;let s=await l.open(n,f.O_RDONLY|p(f));try{let e=await s.stat();if(!e.isFile()||e.size>o)return null;let a=Buffer.alloc(e.size),t=0;for(;t<a.length;){let{bytesRead:r}=await s.read(a,t,a.length-t,t);if(r===0)break;t+=r}return(await s.stat()).size===e.size&&t===e.size?a.toString("utf8",0,t):null}finally{await s.close()}}export{O as a,R as b};
|
|
2
|
+
//# sourceMappingURL=chunk-6H36ZHMI.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as ye}from"./chunk-NQ54T7T2.js";import{Dd as I,Ed as w,Nc as ge,oc as Ie,pc as xe,qb as k,rb as b,xb as _e}from"./chunk-TZY5MVJF.js";import{v as he}from"./chunk-2UQU7HRR.js";import{$c as v,Bh as ie,Dc as ne,Ea as j,Ih as B,Jh as re,Ka as X,Kh as N,Lh as se,Ma as J,Mh as ce,O as V,Ph as ae,Qh as de,Rh as le,Sa as Q,Sh as ue,Th as fe,Uh as me,Vh as T,X as Y,Ya as Z,_c as y,di as h,ge as oe,mb as ee,nb as te,pj as pe}from"./chunk-NGJ5ERBF.js";import{A as m,C as u,z as W}from"./chunk-YYT3MIRF.js";import{readdir as Ke}from"node:fs/promises";import H from"node:path";function O(e,o){return(o===void 0?void 0:J(e,o))?.execution_role??j[e.trim().toLowerCase()]??"agent"}var L="blocked_by",we="blocks",De=Object.freeze([L,we]),A="no-active-blocker";function d(e){return e.trim().toLowerCase()}function E(e,o){return o?`external:${e}`:`local:${d(e)}`}function _(e){let o=new Map,t=typeof e.blocked_by=="string"?e.blocked_by.trim():"";if(t.length>0&&d(t)!==A){let n=I(t);o.set(E(t,n),n?t:d(t))}for(let n of e.dependencies??[]){let i=typeof n.id=="string"?n.id.trim():"";if(h(n.kind)===L&&i.length>0&&d(i)!==A){let r=I(i)||w(n.source_kind);o.set(E(i,r),r?i:d(i))}}return[...o.values()].sort((n,i)=>n.localeCompare(i))}function C(e){let o=new Map;for(let t of e){let n=d(t.id);n.length!==0&&o.set(n,new Set(_(t)))}for(let t of e){let n=d(t.id);if(n.length!==0)for(let i of t.dependencies??[]){let r=h(i.kind)===we&&typeof i.id=="string"?d(i.id):"";if(r.length===0||r===A)continue;let s=o.get(r)??new Set;s.add(n),o.set(r,s)}}return new Map([...o].map(([t,n])=>[t,[...n].sort((i,r)=>i.localeCompare(r))]))}function ve(e,o){let t=d(e.id);return t.length>0?C(o).get(t)??_(e):_(e)}function D(e,o,t,n){let i=e,r=typeof i.id=="string"?n?.get(d(i.id))??ve(i,[...o.values()]):_(e),s=new Set((e.dependencies??[]).filter(c=>h(c.kind)===L&&w(c.source_kind)&&typeof c.id=="string"&&c.id.trim().length>0).map(c=>E(c.id.trim(),!0)));return r.map(c=>{if(I(c)||s.has(E(c,!0)))return{id:c,title:null,status:null,resolved:!1,external:!0,...typeof e.updated_at=="string"?{blocked_since:e.updated_at}:{},resolver:null};let a=o.get(d(c));return a?{id:c,title:a.title,status:a.status,resolved:v(a.status,t)}:{id:c,title:null,status:null,resolved:!1}})}function M(e,o,t){return D(e,o,t)}function Me(e,o){let t=new Map(e.map(s=>[d(s.id),s])),n=C(e),i=new Set([...ke(o),...o.blocked_statuses]),r=new Set;for(let s of e){let c=y(s.status,o);if(!i.has(c))continue;(o.blocked_statuses.has(c)||D(s,t,o,n).some(l=>!l.resolved))&&r.add(d(s.id))}return r}function He(e,o,t={},n){let i=[...e.ready,...e.decisions,...e.gates];t.includeContainers===!0&&i.push(...e.containers.filter(s=>s.open_blockers.length===0&&!o.blocked_statuses.has(y(s.item.status,o))));let r={ready:[],decisions:[],gates:[]};for(let s of i){let c=O(s.item.type,n);c==="human"&&t.includeDecisions!==!0?r.decisions.push(s):c==="gate"&&t.includeGates!==!0?r.gates.push(s):r.ready.push(s)}return r}function ke(e){return e.active_statuses.size>0?e.active_statuses:new Set([e.open_status])}function Pe(e,o,t){let n=[d(e)],i=new Set;for(;n.length>0;){let r=n.pop();if(!i.has(r)){i.add(r);for(let s of o.get(r)??[]){if(!v(s.status,t))return!0;n.push(d(s.id))}}}return!1}function $e(e){let o=new Map,t=new Map,n=new Map,i=C(e);for(let r of e){o.set(d(r.id),r);let s=typeof r.parent=="string"?r.parent.trim():"";if(s.length>0){let c=d(s),a=t.get(c)??[];a.push(r),t.set(c,a)}for(let c of i.get(d(r.id))){let a=d(c),l=n.get(a)??[];l.push(r.id),n.set(a,l)}}return{itemsById:o,childrenByParent:t,blockedByReverse:n,blockerIdsByItem:i}}function Fe(e,o,t,n){let{itemsById:i,childrenByParent:r,blockedByReverse:s,blockerIdsByItem:c}=$e(o),a=new Set([...ke(t),...t.blocked_statuses]),l=new Set(o.filter(f=>!v(f.status,t)).map(f=>d(f.id))),F=[],K=[],S=[],U=[],G=[],q=0;for(let f of e){if(!a.has(y(f.status,t)))continue;q+=1;let z=D(f,i,t,c).filter(p=>!p.resolved),Ae=(s.get(d(f.id))??[]).filter(p=>l.has(d(p))).sort((p,Le)=>p.localeCompare(Le)),g={item:f,open_blockers:z,unblocks:Ae};if(Pe(f.id,r,t)){S.push(g);continue}let Oe=t.blocked_statuses.has(y(f.status,t));if(z.length===0&&!Oe){let p=O(f.type,n);p==="human"?U.push(g):p==="gate"?G.push(g):F.push(g)}else K.push(g)}return{ready:F,blocked:K,containers:S,decisions:U,gates:G,active_count:q,container_count:S.length}}function Ue(e,o){let t=new Map;for(let n of e){let i=n.external?n.id:o.get(n.id.toLowerCase())?.id??n.id;t.set(n.external?`external:${i}`:`local:${i.toLowerCase()}`,{...n,id:i})}return[...t.values()]}async function P(e,o){let t=H.basename(e),i=(await Ke(H.dirname(e)).catch(r=>{throw Ie("Cannot verify the blocker's physical file identity",{exitCode:m.GENERIC_FAILURE,context:{code:"blocker_identity_read_failed",required:"Restore access to the blocker item directory, then retry the item read."},cause:r})})).filter(r=>r.toLowerCase()===t.toLowerCase()).sort((r,s)=>+(s===t)-+(r===t)||r.localeCompare(s)).map(r=>H.parse(r).name)[0];if(i===void 0)throw new u(`Blocker canonical file disappeared during identity verification: ${o}`,m.CONFLICT,{code:"item_identity_conflict",required:"Restore the canonical blocker file and validate storage integrity before retrying the item read."});return i}async function pt(e){let o=_(e.metadata);if(o.length===0)return[];let t=new Map([e.metadata.blocked_by,...(e.metadata.dependencies??[]).filter(i=>h(i.kind)==="blocked_by").map(i=>i.id)].filter(i=>typeof i=="string").map(i=>[i.trim().toLowerCase(),i.trim()])),n=new Map;for(let i of o){if(I(i)||!/^(?!\.{1,2}$)[^/\\:\0]+$/u.test(i)||e.metadata.dependencies?.some(c=>c.id.trim()===i&&h(c.kind)==="blocked_by"&&w(c.source_kind)))continue;let r=await k(e.pmRoot,t.get(i),e.settings.id_prefix,e.settings.item_format,e.typeToFolder);if(r===null)continue;let s=await b(r,{schema:e.settings.schema});if(r.id=await P(r.itemPath,r.id),s.document.metadata.id!==r.id)throw new u(`Blocker identity differs from its canonical file: ${r.id}`,m.CONFLICT,{code:"item_identity_conflict",required:"Restore the canonical blocker identity and validate storage integrity before retrying the item read."});n.set(i.toLowerCase(),s.document.metadata)}return Ue(M({blocked_by:e.metadata.blocked_by,dependencies:e.metadata.dependencies,updated_at:e.metadata.updated_at},n,ne(e.settings.schema)),n)}var Ee="item_revision_conflict",Ge=10,Ce=/^[0-9a-f]{64}$/u;function x(e,o){return new u(`Invalid expected revision ${JSON.stringify(e)}: ${o}.`,m.USAGE,{code:"expect_hash_invalid",value:e,required:"Pass the 64-character item_hash from pm get <id> --json, optionally as <id>=<item_hash>.",examples:["--expect-hash <item_hash>","--expect-hash pm-a1b2=<item_hash>"]})}function Re(e){let o=typeof e=="string"?e.trim().toLowerCase():"";if(!Ce.test(o))throw x(String(e),"the revision is not a 64-character hexadecimal item_hash");return o}function qe(e){return(e===void 0?[]:typeof e=="string"?[e]:e).flatMap(t=>{if(typeof t!="string")throw x(String(t),"expected a string");let n=t.split(",").map(r=>r.trim()).filter(r=>r.length>0);if(n.length===0)throw x(t,"the value is empty");let i=r=>te(t)===t?r:ee;return n.map(r=>{let s=r.lastIndexOf("="),c=s===-1?void 0:r.slice(0,s).trim();if(c!==void 0&&c.length===0)throw x(i(r),"the item id before = is empty");let a=s===-1?r:r.slice(s+1);if(!Ce.test(a.trim().toLowerCase()))throw x(i(a),"the revision is not a 64-character hexadecimal item_hash");let l=Re(a);return c===void 0?{itemHash:l}:{id:c,itemHash:l}})})}async function Se(e,o){let t=await he(e),n=X(t,pe()).type_to_folder,i=await k(e,o,t.id_prefix,t.item_format,n);if(i){let{document:r}=await b(i,{schema:t.schema});if(r.metadata.id!==await P(i.itemPath,i.id))throw new u(`Item file ${i.id} embeds the id ${r.metadata.id}; no revision can be bound to an item whose identity is in conflict.`,m.CONFLICT,{code:"item_identity_conflict",item_id:i.id,required:`Repair ${i.id}'s identity first (pm validate reports it; pm restore ${i.id} <version> recovers a recorded state), then read its item_hash again.`});return{id:r.metadata.id,document:r}}try{return{id:(await ye(e,o,t,n)).id,document:W}}catch{throw await _e(e,o,t.id_prefix,n)}}function $(e){return Q(e.cwd??process.cwd(),e.pmRoot)}async function Ot(e,o={}){let t=await Se($(o),e);return{id:t.id,item_hash:ie(t.document)}}async function Be(e,o,t){let n=[];for(let i of o){let r=i.id??t;if(r===void 0||r.trim().length===0)throw new u("A bare expected revision needs an item to bind to.",m.USAGE,{code:"expect_hash_target_required",required:"This command has no single item argument; name each target as --expect-hash <id>=<item_hash>.",examples:["--expect-hash pm-a1b2=<item_hash>"]});n.push({id:(await Se(e,r)).id,itemHash:i.itemHash})}return n}function ze(e){return[...new Set(e.patch.map(o=>{let t=o.path.split("/");return String(t[1]==="metadata"?t[2]:t[1])}))].sort()}async function We(e,o,t){let n;try{n=await oe(Z(e,o),o)}catch{return}let i=-1;for(let c=n.length-1;c>=0;c-=1){let a=n[c];if(a.after_hash===t){i=c+1;break}if(a.before_hash===t){i=c;break}}if(i===-1)return{expected_revision_recorded:!1,changes_since:[],changes_since_omitted:0};let r=n.slice(i),s=r.slice(-Ge);return{expected_revision_recorded:!0,changes_since:s.map(c=>({ts:c.ts,op:c.op,author:c.author,fields:ze(c)})),changes_since_omitted:r.length-s.length}}async function Lt(e,o){if(!R(e))return{};let t=await Ne(e,o);return{error_code:Ee,expected_revision:String(t.context.expected_revision),current_revision:String(t.context.current_revision),details:t.context.details}}function R(e){return xe(e)&&e.context.code===Ee}function Dt(e){let o=e.find(t=>R(t));if(o!==void 0)throw o}function Mt(){return new u("--expect-hash cannot guard an invocation an extension override rewrote: which item it writes is not provable.",m.USAGE,{code:"expect_hash_invocation_rewritten",required:"Run the command without the rewriting extension (--no-extensions), or drop --expect-hash.",why:"An extension parser or preflight override changed this invocation's tracker or arguments, and final dispatch, the extension SDK client and the guard do not share one rewritten view."})}function Ve(e,o){if(o===void 0||!R(e)||typeof e.context.item_id!="string"||fe(e))return e;let t=e.context.reason===de;if(!t&&e.context.reason!==ae)return e;let n=me(T(e,new u(e.message,e.exitCode,{...e.context,...le(e.context.item_id,t,o)})));return n.stack=e.stack,n}async function Ne(e,o,t){if(!ue(e,o))return e;let n=Ve(e,t);if(!R(n)||n.context.details!==void 0)return n;let i=n.context.item_id,r=n.context.expected_revision;if(typeof i!="string"||typeof r!="string")return n;let s;try{s=await We(o,i,r)}catch{return n}if(s===void 0)return n;let c={expected_revision_recorded:s.expected_revision_recorded,changes_since:s.changes_since.map(l=>({ts:l.ts,op:l.op,author:l.author,fields:[...l.fields]})),changes_since_omitted:s.changes_since_omitted},a=T(n,new u(n.message,n.exitCode,{...n.context,details:c}));return a.stack=n.stack,a}async function Te(e,o,t){try{return{result:await re(e,o),...se(e)}}catch(n){throw e.pmRoot===void 0?n:await Ne(n,e.pmRoot,t)}}function Ye(e){return e.cwd===void 0&&e.pmRoot===void 0?void 0:{scopeArgs:["--pm-path",$(e)]}}async function Ht(e,o,t={}){return Te(await je(e,t),o,Ye(t))}async function je(e,o={}){let t=$(o),n=e.map(({id:r,itemHash:s})=>({id:r,itemHash:Re(s)})),i=B();return N(i,t,await Be(t,n)),i}function Pt(e){let o=ce(e);return o===void 0||o.length>0}function Xe(e){return`expect_hash_unchecked:${e}:no_locked_write_reached_this_item`}var be=new Set(V);function Je(e,o={}){let t=e.trim().replace(/\s+/gu,"-"),n=be.has(t)?t:e;if(be.has(n)&&(!ge(n)||n==="deps")&&!Y.has(n))throw Qe(n);if((n==="test"||n==="test-all")&&o.background===!0)throw new u(`--expect-hash cannot guard ${n} --background: the worker runs in another process.`,m.USAGE,{code:"expect_hash_background_unsupported",required:`Run ${n} in the foreground to guard its result recording, or drop --expect-hash for a background run.`})}function Qe(e){return new u(`--expect-hash guards item writes, and ${e} is not a mutation.`,m.USAGE,{code:"expect_hash_requires_mutation",required:"Use --expect-hash (MCP/SDK expectHash) only on a command or action that writes items."})}function Ze(e,o){if(o.length===0||typeof e!="object"||e===null||Array.isArray(e))return e;let t=e,n=Array.isArray(t.warnings)?t.warnings:[];return{...t,warnings:[...n,...o.map(Xe)]}}async function $t(e){let o=e.expectHash;if(o!==void 0&&typeof o!="string"&&!(Array.isArray(o)&&o.every(r=>typeof r=="string")))throw x(JSON.stringify(o)??String(o),"expected a string or an array of strings");let t=qe(o);if(t.length===0)return e.run();Je(e.action,{background:e.background===!0||e.options?.background===!0});let n=B();N(n,e.pmRoot,await Be(e.pmRoot,t,e.defaultId));let i=await Te(n,e.run,e.invocation);return Ze(i.result,i.unchecked)}export{O as a,De as b,_ as c,C as d,ve as e,M as f,Me as g,He as h,Fe as i,pt as j,Ee as k,Ge as l,Re as m,qe as n,Ot as o,Be as p,We as q,Lt as r,R as s,Dt as t,Mt as u,Ve as v,Ne as w,Te as x,Ht as y,je as z,Pt as A,Xe as B,Je as C,Qe as D,$t as E};
|
|
2
|
+
//# sourceMappingURL=chunk-6MYJLOSG.js.map
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{execFile as d}from"node:child_process";import p from"node:path";import{promisify as g}from"node:util";import{setTimeout as _}from"node:timers/promises";var s=g(d);async function c(e,r){let t=performance.now()+5e3,o=25;for(;;)try{await s("git",["config",...r],{cwd:e,env:{...l(),LC_ALL:"C"},timeout:1e4});return}catch(n){let i=t-performance.now();if(typeof n!="object"||n===null||!("stderr"in n)||typeof n.stderr!="string"||!/could not lock config file [^\r\n]+: File exists/u.test(n.stderr)||i<=0)throw n;await _(Math.min(o,i)),o=Math.min(o*2,200)}}function I(e,r=process.platform){let t=e.endsWith(`
|
|
2
|
+
`)?e.slice(0,-1):e;return r==="win32"&&t.endsWith("\r")?t.slice(0,-1):t}function l(){let e={...process.env};for(let r of["GIT_DIR","GIT_WORK_TREE","GIT_COMMON_DIR","GIT_INDEX_FILE","GIT_OBJECT_DIRECTORY","GIT_ALTERNATE_OBJECT_DIRECTORIES","GIT_NAMESPACE","GIT_CEILING_DIRECTORIES","GIT_DISCOVERY_ACROSS_FILESYSTEM"])delete e[r];return e}async function f(e,r){try{return(await s("git",["config","--local",...r==="core.bare"||r==="extensions.worktreeConfig"?["--type=bool"]:[],"--get",r],{cwd:e,env:l(),timeout:1e4})).stdout.trim()}catch(t){if(typeof t=="object"&&t!==null&&"code"in t&&t.code===1)return;throw t}}async function y(e){if(await f(e,"extensions.worktreeConfig")==="true")return"--worktree";let r=async i=>I((await s("git",["rev-parse","--path-format=absolute",i],{cwd:e,env:l(),timeout:1e4})).stdout),t=await r("--git-dir"),o=await r("--git-common-dir");if(t===o)return"--local";let n=p.join(o,"config.worktree");for(let i of["core.bare","core.worktree"]){let a=await f(e,i);a===void 0||i==="core.bare"&&a!=="true"||(await c(e,["--file",n,i,a]),await c(e,["--local","--unset-all",i]))}for(let i of["pm-item-toon","pm-item-markdown","pm-history","pm-relationship","pm-json"])for(let a of["name","driver"]){let m=`merge.${i}.${a}`,u=await f(e,m);u!==void 0&&await c(e,["--file",n,m,u])}return await c(e,["--local","extensions.worktreeConfig","true"]),"--worktree"}export{c as a,I as b,l as c,y as d};
|
|
3
|
+
//# sourceMappingURL=chunk-AA52P34H.js.map
|