@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
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{b as W,c as j}from"./chunk-JMQJBZQ5.js";import{jb as V}from"./chunk-XCJSHNXK.js";import{H as F,I as $,O as q,Y as G}from"./chunk-SRDQSA6M.js";import{s as U}from"./chunk-MKM5NKD7.js";import{$e as f,Bb as R,Da as I,Hf as D,Nc as E,Oc as b,Ve as S,af as A,bf as _,cf as T,df as N,gf as O,hf as H,if as k,jf as L,kf as M,lf as P,mf as l,qe as C,ra as w,sb as y,xa as x}from"./chunk-OSLQD5VH.js";import{A as c,y as v,z as h}from"./chunk-3IRCYJI5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="222cbba7-e2df-5afb-8d75-14f9f99b3bd2")}catch{}})();var B="item_revision_conflict",ee=10,J=/^[0-9a-f]{64}$/u;function m(e,t){return new c(`Invalid expected revision ${JSON.stringify(e)}: ${t}.`,h.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 K(e){let t=typeof e=="string"?e.trim().toLowerCase():"";if(!J.test(t))throw m(String(e),"the revision is not a 64-character hexadecimal item_hash");return t}function te(e){return(e===void 0?[]:typeof e=="string"?[e]:e).flatMap(t=>{if(typeof t!="string")throw m(String(t),"expected a string");let i=t.split(",").map(o=>o.trim()).filter(o=>o.length>0);if(i.length===0)throw m(t,"the value is empty");let n=o=>b(t)===t?o:E;return i.map(o=>{let r=o.lastIndexOf("="),a=r===-1?void 0:o.slice(0,r).trim();if(a!==void 0&&a.length===0)throw m(n(o),"the item id before = is empty");let s=r===-1?o:o.slice(r+1);if(!J.test(s.trim().toLowerCase()))throw m(n(s),"the revision is not a 64-character hexadecimal item_hash");let d=K(s);return a===void 0?{itemHash:d}:{id:a,itemHash:d}})})}async function X(e,t){let i=await U(e),n=w(i,D()).type_to_folder,o=await F(e,t,i.id_prefix,i.item_format,n);if(o){let{document:r}=await $(o,{schema:i.schema});if(r.metadata.id!==await j(o.itemPath,o.id))throw new c(`Item file ${o.id} embeds the id ${r.metadata.id}; no revision can be bound to an item whose identity is in conflict.`,h.CONFLICT,{code:"item_identity_conflict",item_id:o.id,required:`Repair ${o.id}'s identity first (pm validate reports it; pm restore ${o.id} <version> recovers a recorded state), then read its item_hash again.`});return{id:r.metadata.id,document:r}}try{return{id:(await W(e,t,i,n)).id,document:v}}catch{throw await q(e,t,i.id_prefix,n)}}function g(e){return x(e.cwd??process.cwd(),e.pmRoot)}async function Ae(e,t={}){let i=await X(g(t),e);return{id:i.id,item_hash:S(i.document)}}async function Y(e,t,i){let n=[];for(let o of t){let r=o.id??i;if(r===void 0||r.trim().length===0)throw new c("A bare expected revision needs an item to bind to.",h.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 X(e,r)).id,itemHash:o.itemHash})}return n}function ie(e){return[...new Set(e.patch.map(t=>{let i=t.path.split("/");return String(i[1]==="metadata"?i[2]:i[1])}))].sort()}async function ne(e,t,i){let n;try{n=await C(I(e,t),t)}catch{return}let o=-1;for(let s=n.length-1;s>=0;s-=1){let d=n[s];if(d.after_hash===i){o=s+1;break}if(d.before_hash===i){o=s;break}}if(o===-1)return{expected_revision_recorded:!1,changes_since:[],changes_since_omitted:0};let r=n.slice(o),a=r.slice(-ee);return{expected_revision_recorded:!0,changes_since:a.map(s=>({ts:s.ts,op:s.op,author:s.author,fields:ie(s)})),changes_since_omitted:r.length-a.length}}async function Te(e,t){if(!u(e))return{};let i=await Q(e,t);return{error_code:B,expected_revision:String(i.context.expected_revision),current_revision:String(i.context.current_revision),details:i.context.details}}function u(e){return G(e)&&e.context.code===B}function Ne(e){let t=e.find(i=>u(i));if(t!==void 0)throw t}function Oe(){return new c("--expect-hash cannot guard an invocation an extension override rewrote: which item it writes is not provable.",h.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 oe(e,t){if(t===void 0||!u(e)||typeof e.context.item_id!="string"||M(e))return e;let i=e.context.reason===H;if(!i&&e.context.reason!==O)return e;let n=P(l(e,new c(e.message,e.exitCode,{...e.context,...k(e.context.item_id,i,t)})));return n.stack=e.stack,n}async function Q(e,t,i){if(!L(e,t))return e;let n=oe(e,i);if(!u(n)||n.context.details!==void 0)return n;let o=n.context.item_id,r=n.context.expected_revision;if(typeof o!="string"||typeof r!="string")return n;let a;try{a=await ne(t,o,r)}catch{return n}if(a===void 0)return n;let s={expected_revision_recorded:a.expected_revision_recorded,changes_since:a.changes_since.map(p=>({ts:p.ts,op:p.op,author:p.author,fields:[...p.fields]})),changes_since_omitted:a.changes_since_omitted},d=l(n,new c(n.message,n.exitCode,{...n.context,details:s}));return d.stack=n.stack,d}async function Z(e,t,i){try{return{result:await A(e,t),...T(e)}}catch(n){throw e.pmRoot===void 0?n:await Q(n,e.pmRoot,i)}}function re(e){return e.cwd===void 0&&e.pmRoot===void 0?void 0:{scopeArgs:["--pm-path",g(e)]}}async function He(e,t,i={}){return Z(await se(e,i),t,re(i))}async function se(e,t={}){let i=g(t),n=e.map(({id:r,itemHash:a})=>({id:r,itemHash:K(a)})),o=f();return _(o,i,await Y(i,n)),o}function ke(e){let t=N(e);return t===void 0||t.length>0}function ae(e){return`expect_hash_unchecked:${e}:no_locked_write_reached_this_item`}var z=new Set(y);function ce(e,t={}){let i=e.trim().replace(/\s+/gu,"-"),n=z.has(i)?i:e;if(z.has(n)&&(!V(n)||n==="deps")&&!R.has(n))throw de(n);if((n==="test"||n==="test-all")&&t.background===!0)throw new c(`--expect-hash cannot guard ${n} --background: the worker runs in another process.`,h.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 de(e){return new c(`--expect-hash guards item writes, and ${e} is not a mutation.`,h.USAGE,{code:"expect_hash_requires_mutation",required:"Use --expect-hash (MCP/SDK expectHash) only on a command or action that writes items."})}function he(e,t){if(t.length===0||typeof e!="object"||e===null||Array.isArray(e))return e;let i=e,n=Array.isArray(i.warnings)?i.warnings:[];return{...i,warnings:[...n,...t.map(ae)]}}async function Le(e){let t=e.expectHash;if(t!==void 0&&typeof t!="string"&&!(Array.isArray(t)&&t.every(r=>typeof r=="string")))throw m(JSON.stringify(t)??String(t),"expected a string or an array of strings");let i=te(t);if(i.length===0)return e.run();ce(e.action,{background:e.background===!0||e.options?.background===!0});let n=f();_(n,e.pmRoot,await Y(e.pmRoot,i,e.defaultId));let o=await Z(n,e.run,e.invocation);return he(o.result,o.unchecked)}export{B as a,ee as b,K as c,te as d,Ae as e,Y as f,ne as g,Te as h,u as i,Ne as j,Oe as k,oe as l,Q as m,Z as n,He as o,se as p,ke as q,ae as r,ce as s,de as t,Le as u};
|
|
2
|
-
//# sourceMappingURL=chunk-LNHUE4VV.js.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import{Aa as M,Ae as dt,Ce as K,Ec as ye,F as Xe,Ga as R,Ha as C,Ja as f,Lf as _t,Mc as ot,Md as B,Pf as ut,Ye as ge,Ze as we,ec as U,ed as it,gc as $,gd as at,hc as H,j as He,k as Be,ka as tt,kc as nt,l as Ge,m as Ke,ne as st,qe as G,s as Je,te as ct,we as lt,x as Ye,ya as rt}from"./chunk-OSLQD5VH.js";import{A as b,C as Ze,D as X,F as q,G as et,H as pe,I as he,u as Qe,x as _,y as W,z as k}from"./chunk-3IRCYJI5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="78651211-fe4b-564e-a872-23bf25265243")}catch{}})();var A={ok:!1,path:[]};function be(e,t){return{ok:!1,path:[e,...t.path]}}var c=e=>typeof e=="string"?{ok:!0,value:e}:A,m=e=>typeof e=="boolean"?{ok:!0,value:e}:A;function g(e={}){return t=>typeof t!="number"||!Number.isFinite(t)||e.int&&(!Number.isInteger(t)||!Number.isSafeInteger(t))||e.positive&&t<=0||typeof e.min=="number"&&t<e.min||typeof e.max=="number"&&t>e.max?A:{ok:!0,value:t}}function h(...e){return t=>typeof t=="string"&&e.includes(t)?{ok:!0,value:t}:A}function l(e,t){return r=>{if(!Array.isArray(r)||t!==void 0&&r.length>t)return A;let n=[];for(let[i,s]of r.entries()){let a=e(s);if(!a.ok)return be(String(i),a);n.push(a.value)}return{ok:!0,value:n}}}function ve(e,t){return r=>typeof r=="string"&&r.length>0&&r.length<=e&&r===r.trim()&&(t===void 0||t.test(r))?{ok:!0,value:r}:A}function o(e){return t=>t===void 0?{ok:!0,value:void 0}:e(t)}function Q(e){return t=>{if(typeof t!="object"||t===null||Array.isArray(t))return A;let r={};for(let[n,i]of Object.entries(t)){let s=e(i);if(!s.ok)return be(n,s);r[n]=s.value}return{ok:!0,value:r}}}function u(e){return t=>{if(typeof t!="object"||t===null||Array.isArray(t))return A;let r=t,n={};for(let[i,s]of Object.entries(e)){let a=s(r[i]);if(!a.ok)return be(i,a);a.value!==void 0&&(n[i]=a.value)}return{ok:!0,value:n}}}var ar=u({key:c,values:l(c),required:o(m),aliases:o(l(c)),description:o(c)}),sr=u({command:h("create","update"),option:c,required:o(m),visible:o(m),enabled:o(m)}),cr=u({name:c,description:o(c),default_status:o(c),execution_role:o(h("agent","human","gate")),folder:o(c),aliases:o(l(c)),required_create_fields:o(l(c)),required_create_repeatables:o(l(c)),options:o(l(ar)),command_option_policies:o(l(sr))}),lr=u({id:c,aliases:o(l(c)),roles:o(l(h(...He))),description:o(c),order:o(g())}),dr=u({key:c,metadata_key:o(c),front_matter_key:o(c),cli_flag:o(c),cli_aliases:o(l(c)),description:o(c),type:o(h(...Be)),commands:o(l(h(...Ge))),repeatable:o(m),required:o(m),required_on_create:o(m),required_types:o(l(c)),allow_unset:o(m)}),_r=e=>{if(!Array.isArray(e)||e.length!==2)return A;let[t,r]=e;return typeof t!="string"||typeof r!="string"?A:{ok:!0,value:[t,r]}},ur=u({type:c,allowed_transitions:l(_r)}),fr=o(u({version:o(g({int:!0})),files:o(u({types:o(c),statuses:o(c),fields:o(c),workflows:o(c)})),statuses:o(l(lr)),fields:o(l(dr)),workflow:o(u({draft_status:o(c),open_status:o(c),in_progress_status:o(c),blocked_status:o(c),close_status:o(c),canceled_status:o(c)})),type_workflows:o(l(ur)),unknown_field_policy:o(h(...Ke))})),mr=o(u({preset:o(h(...Je)),ownership_enforcement:o(h("none","warn","strict")),create_mode_default:o(h("progressive","strict")),close_validation_default:o(h("off","warn","strict")),require_close_reason:o(m),parent_reference:o(h("warn","strict_error")),metadata_profile:o(h("core","strict","custom")),force_required_for_stale_lock:o(m),create_default_type:o(c),workflow_enforcement:o(h("off","warn","strict")),start_blocker_enforcement:o(h("off","warn","strict")),duplicate_detection_mode:o(h("off","advisory","strict")),duplicate_detection_threshold:o(g({min:0,max:1})),duplicate_detection_limit:o(g({int:!0,min:0,max:20}))})),pr=u({name:c,disabled:o(m),require_trusted:o(m),require_provenance:o(m),sandbox_profile:o(h("none","restricted","strict")),allowed_capabilities:o(l(c)),blocked_capabilities:o(l(c)),allowed_surfaces:o(l(c)),blocked_surfaces:o(l(c)),allowed_commands:o(l(c)),blocked_commands:o(l(c)),allowed_actions:o(l(c)),blocked_actions:o(l(c)),allowed_services:o(l(c)),blocked_services:o(l(c))}),ke=h("block","warn"),hr=e=>typeof e=="string"?ke(e):u({global:o(ke),project:o(ke)})(e),yr=o(u({mode:o(h("off","warn","enforce")),trust_mode:o(h("off","warn","enforce")),pm_max_version_exceeded_mode:o(hr),require_provenance:o(m),trusted_extensions:o(l(c)),default_sandbox_profile:o(h("none","restricted","strict")),allowed_extensions:o(l(c)),blocked_extensions:o(l(c)),allowed_capabilities:o(l(c)),blocked_capabilities:o(l(c)),allowed_surfaces:o(l(c)),blocked_surfaces:o(l(c)),allowed_commands:o(l(c)),blocked_commands:o(l(c)),allowed_actions:o(l(c)),blocked_actions:o(l(c)),allowed_services:o(l(c)),blocked_services:o(l(c)),extension_overrides:o(l(pr))})),D=ve(128),gr=u({harness:ve(128,/^[a-z0-9]+(?:-[a-z0-9]+)*$/u),environment_keys:o(l(D,64)),model_environment_keys:o(l(D,64)),session_environment_keys:o(l(D,64)),provenance_environment_keys:o(Q(l(D,64))),provenance_resolvers:o(Q(h("ai_agent_version","claude_session_file"))),provenance_unavailable_dimensions:o(l(D,64)),argv_markers:o(l(D,64)),client_names:o(l(D,64))}),ft={version:g({int:!0}),id_prefix:c,ids:o(u({token_length:o(g({int:!0,min:4,max:12}))})),author_default:c,agent_identity:o(u({probes_enabled:o(m),identity_vocabulary:o(u({version:g({int:!0,positive:!0}),aliases:Q(ve(128,/^[a-z0-9]+(?:-[a-z0-9]+)*$/u))})),harness_signals:l(gr)})),mutation_guard:o(u({require_attributed_author:o(m),secret_guard:o(h("off","advise","block")),stale_in_progress_hours:o(g({int:!0,positive:!0}))})),item_format:o(h("toon","json_markdown")),locks:u({ttl_seconds:g({int:!0}),wait_ms:o(g({int:!0,min:0}))}),checkpoints:o(u({retention_days:o(g({int:!0,positive:!0}))})),output:u({default_format:h("toon","json")}),ux:o(u({deprecation_hints:o(m)})),history:o(u({missing_stream:h("auto_create","strict_error"),compact_policy:o(u({enabled:o(m),max_entries:o(g({int:!0,positive:!0})),trigger:o(h("health_warn","auto"))}))})),validation:o(u({sprint_release_format:h("warn","strict_error"),parent_reference:o(h("warn","strict_error")),metadata_profile:o(h("core","strict","custom")),metadata_required_fields:o(l(c)),lifecycle_stale_blocker_reason_patterns:o(l(c)),lifecycle_closure_like_blocked_reason_patterns:o(l(c)),lifecycle_closure_like_resolution_patterns:o(l(c)),lifecycle_closure_like_actual_result_patterns:o(l(c)),estimate_defaults_by_type:o(Q(g({int:!0,positive:!0})))})),governance:mr,workflow:o(u({definition_of_done:l(c)})),testing:o(u({record_results_to_items:m,allow_untrusted_linked_tests:o(m)})),telemetry:o(u({enabled:m,first_run_prompt_completed:o(m),capture_level:o(h("minimal","redacted","max")),endpoint:o(c),installation_id:o(c),retention_days:o(g({int:!0,positive:!0}))})),agent_guidance:o(u({prompt_completed:o(m),declined:o(m),declined_at:o(c),template_version:o(g({int:!0,positive:!0})),last_checked_files:o(l(c))})),item_types:o(u({definitions:l(cr)})),schema:fr,context:o(u({default_depth:o(h(...Xe)),activity_limit:o(g({int:!0,positive:!0})),stale_threshold_days:o(g({int:!0,positive:!0})),next_ranking_policy:o(h("priority_floor","weighted")),sections:o(u({hierarchy:o(m),activity:o(m),progress:o(m),recently_created:o(m),unparented:o(m),blockers:o(m),files:o(m),workload:o(m),staleness:o(m),tests:o(m)}))})),extensions:u({enabled:l(c),disabled:l(c),policy:yr}),search:u({score_threshold:g(),hybrid_semantic_weight:o(g()),max_results:g({int:!0}),embedding_model:c,embedding_corpus_max_characters:o(g()),embedding_batch_size:g({int:!0}),embedding_timeout_ms:o(g({int:!0})),scanner_max_batch_retries:g({int:!0}),provider:o(c),default_mode:o(h("auto","keyword","semantic","hybrid")),corpus_fields:o(l(c)),mutation_refresh_policy:o(h("cache_only","semantic_configured","semantic_auto")),query_expansion:o(u({enabled:o(m),provider:o(c)})),rerank:o(u({enabled:o(m),model:o(c),top_k:o(g({int:!0,positive:!0}))})),bm25:o(u({k1:o(g()),b:o(g())}))}),providers:u({openai:u({base_url:c,api_key:c,model:c}),ollama:u({base_url:c,model:c})}),vector_store:u({adapter:o(c),collection_name:o(c),qdrant:u({url:c,api_key:c}),lancedb:u({path:c})})},wr=u(ft),mt=Object.freeze(Object.keys(ft));function Z(e){let t=wr(e);return t.ok?{success:!0,data:t.value}:{success:!1,path:t.path.join(".")}}import{AsyncLocalStorage as Or}from"node:async_hooks";import{lstat as Cr,realpath as At}from"node:fs/promises";import It from"node:path";import kr from"node:fs/promises";import z from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="af606b47-d071-5724-b1e7-de4e1e5d7385")}catch{}})();var F="_workspace";function ee(e){return z.join(e,"history",`${F}.jsonl`)}function br(e,t){return{metadata:{id:F,title:"Workspace state",description:"Audited singleton workspace document state.",type:"Chore",status:"open",priority:2,tags:["workspace-history"],created_at:t,updated_at:t,documents:e},body:""}}function te(e,t=e.length){let r=ct();for(let n of e.slice(0,t))r=dt(r,n.patch).document;return lt(r)}function Se(e){return"documents"in e.metadata&&typeof e.metadata.documents=="object"&&e.metadata.documents!==null&&!Array.isArray(e.metadata.documents)?e.metadata.documents:{}}function re(e){throw new b(`Workspace history verification failed: ${e.join(", ")}`,k.CONFLICT,{code:"workspace_history_chain_invalid",reason:"workspace_history_chain_verification_failed",verification_errors:[...e],required:"Repair the _workspace history chain before reading, reconciling, restoring, or appending audited singleton state.",why:"Continuing against an unverifiable append-only stream could hide or compound workspace state corruption.",examples:["pm history _workspace --verify --json","pm validate --check-history-drift --fix-hints --json"],nextSteps:["Inspect the exact verification_errors and preserve the corrupt stream as evidence.","Use the history-drift remediation returned by validate before retrying the refused operation."],recovery:{recovery_mode:"compact",next_best_command:"pm history _workspace --verify --json"}})}function pt(e,t){let r=z.resolve(t),n=z.relative(e,r).replaceAll("\\","/");if(n.length===0||n===".."||n.startsWith("../")||z.isAbsolute(n))throw new TypeError("Workspace history document path must stay inside the tracker root");return{documentPath:n,absolutePath:r}}async function Wn(e){let t=await G(ee(e),F),r=K(t);r.ok||re(r.errors);let n=Se(t.length===0?W:te(t)),i=[],s=[],a=[],d=[];for(let y of Object.keys(n).sort()){let p;try{let v=pt(e,z.resolve(e,y));if(p=await q(v.absolutePath),p===null){a.push(y);continue}let S=JSON.parse(p);(R(S)===R(n[y])?i:s).push(y)}catch{d.push(y)}}return{ok:s.length===0&&a.length===0&&d.length===0,document_count:Object.keys(n).length,matching_documents:i,mismatched_documents:s,missing_documents:a,unreadable_documents:d}}async function ht(e){let t=ee(e.pmRoot),r=await G(t,F),n=K(r);n.ok||re(n.errors);let i=e.idempotencyKey===void 0?void 0:r.find(S=>S.op===`${e.op}:${e.idempotencyKey}`);if(i)return{entry:i,historyPath:t};let s=ye(),a=r.length===0?W:te(r),d=Se(a),y=d[e.documentPath];if(y!==void 0&&R(y)!==R(e.before))throw new b(`Workspace history state for "${e.documentPath}" changed outside the audited mutation path.`,k.CONFLICT,{code:"workspace_history_state_conflict",reason:"out_of_band_workspace_state",required:"Reconcile the singleton document with its matching _workspace history state before retrying the mutation.",why:"Accepting the write would make the append-only audit stream describe a state that was not actually observed.",examples:["pm history _workspace --verify","pm validate --check-history-drift --fix-hints"],nextSteps:["Review the version-control change that altered the singleton and preserve the intended document plus its matching workspace history.","Rerun the original mutation only after the on-disk singleton agrees with the latest audited workspace state."],recovery:{recovery_mode:"compact",next_best_command:"pm history _workspace --verify"}});let p=br({...d,[e.documentPath]:e.after},r.length===0?s:a.metadata.created_at),v=ge({nowIso:s,author:e.author,op:e.idempotencyKey===void 0?e.op:`${e.op}:${e.idempotencyKey}`,before:a,after:p,message:e.message});return await we(t,v),{entry:v,historyPath:t}}async function Un(e){let t=await B(e.pmRoot,"workspace-history",e.lockTtlSeconds,e.author,!1,!1,e.lockWaitMs);try{return await ht(e)}finally{await t()}}async function $n(e){let t=await B(e.pmRoot,"workspace-history",e.lockTtlSeconds,e.author,!1,!1,e.lockWaitMs);try{let r=ee(e.pmRoot),n=await G(r,F),i=K(n);i.ok||re(i.errors);let s=n.length===0?W:te(n),a=ge({nowIso:ye(),author:e.author,op:e.op,before:s,after:s,message:e.message,context:e.context});return await we(r,a),{entry:a,historyPath:r}}finally{await t()}}async function yt(e,t){if(t===e.raw)return!1;let r=t===null?null:JSON.parse(t),n=JSON.parse(e.raw);await he(e.filePath,e.raw);try{(t!==null||e.recordCreation!==!1)&&await ht({pmRoot:e.pmRoot,documentPath:z.relative(e.pmRoot,e.filePath).replaceAll("\\","/"),before:r,after:n,op:e.op,idempotencyKey:e.idempotencyKey,author:e.author,lockTtlSeconds:e.lockTtlSeconds,lockWaitMs:e.lockWaitMs,message:e.message})}catch(i){throw t===null?await kr.rm(e.filePath,{force:!0}):await he(e.filePath,t),i}return!0}async function gt(e){let{documentPath:t}=pt(e.pmRoot,e.filePath),r=await B(e.pmRoot,"workspace-history",e.lockTtlSeconds,e.author,!1,!1,e.lockWaitMs);try{let n=await q(e.filePath);if(e.dryRun===!0||e.idempotencyKey!==void 0){let s=await G(ee(e.pmRoot),F),a=K(s);a.ok||re(a.errors);let d=Se(s.length===0?W:te(s))[t];if(d!==void 0&&R(d)!==R(n===null?null:JSON.parse(n)))throw new b(`Workspace history state for "${t}" changed outside the audited mutation path.`,k.CONFLICT,{code:"workspace_history_state_conflict"});if(e.idempotencyKey!==void 0&&s.some(y=>y.op===`${e.op}:${e.idempotencyKey}`))return{changed:!1,result:void 0,replayed:!0}}let i=await e.mutate(n);return JSON.parse(i.raw),e.dryRun===!0?{changed:n!==i.raw,result:i.result}:{changed:await yt({...e,raw:i.raw},n),result:i.result}}finally{await r()}}async function Hn(e){let t=await B(e.pmRoot,"workspace-history",e.lockTtlSeconds,e.author,!1,!1,e.lockWaitMs);try{return await yt(e,await q(e.filePath))}finally{await t()}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="a0ca9902-540c-50fe-a4e2-9c234c4a01f3")}catch{}})();function ne(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function xe(e,t,r,n=[]){if(C(e,t)&&(n.length>0||ne(r)))return r;if(C(e,r)||C(t,r))return t;if((e===void 0||ne(e))&&ne(t)&&ne(r)){let i=e??{},s=new Set([...Object.keys(i),...Object.keys(t),...Object.keys(r)]);return Object.fromEntries([...s].flatMap(a=>{let d=xe(Object.hasOwn(i,a)?i[a]:void 0,Object.hasOwn(t,a)?t[a]:void 0,Object.hasOwn(r,a)?r[a]:void 0,[...n,a]);return d===void 0?[]:[[a,d]]}))}throw new b(`Settings changed concurrently at ${n.join(".")||"<root>"}; read the latest settings and reapply the intended change.`,k.CONFLICT,{reason:"stale_settings_snapshot",required:"Read a fresh settings snapshot and reapply the intended change.",why:"Another writer changed the same setting after this snapshot was read.",examples:["pm config project export --json"],nextSteps:["Read the current settings, then retry the original config operation."]})}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="de43e8e6-d7ef-53cc-94b0-ccdf1c4f94a3")}catch{}})();var vr={Epic:2880,Feature:480,Story:480,Milestone:2880,Task:120,Issue:60,Bug:60,Chore:30,Decision:15,Plan:120},wt=120;function Ee(e){return typeof e=="number"&&Number.isFinite(e)&&e>0}function bt(e){let t=new Map;for(let[r,n]of Object.entries(e))t.set(r.toLowerCase(),n);return t}var Sr=bt(vr),kt=new WeakMap;function xr(e){let t=kt.get(e);if(t)return t;let r=bt(e);return kt.set(e,r),r}function Xn(e,t){let r=(e??"").trim().toLowerCase();if(r.length===0)return wt;if(t){let i=xr(t).get(r);if(Ee(i))return Math.floor(i)}let n=Sr.get(r);return Ee(n)?Math.floor(n):wt}function Te(e){let t={};if(e===null||typeof e!="object"||Array.isArray(e))return t;for(let[r,n]of Object.entries(e)){let i=r.trim();i.length===0||!Ee(n)||(t[i]=Math.floor(n))}return t}import{stat as Er}from"node:fs/promises";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="78c79deb-5cf0-54fe-b98c-a0d5b3671ab2")}catch{}})();var oe=new Map;function vt(e){return[...new Set(e.map(t=>t.trim()).filter(t=>t.length>0))].sort((t,r)=>t.localeCompare(r))}async function Tr(e){try{let t=await Er(e);return{path:e,mtime_ms:t.mtimeMs,size:t.size}}catch{return{path:e,mtime_ms:null,size:null}}}async function P(e){let t=vt(e),r=await Promise.all(t.map(n=>Tr(n)));return r.sort((n,i)=>n.path.localeCompare(i.path)),r}function J(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r+=1){let n=e[r],i=t[r];if(n.path!==i.path||n.mtime_ms!==i.mtime_ms||n.size!==i.size)return!1}return!0}function St(e){return oe.get(e)}function ie(e,t){let r=vt(t.tracked_paths),n=[...t.signatures].map(i=>({path:i.path,mtime_ms:i.mtime_ms,size:i.size})).sort((i,s)=>i.path.localeCompare(s.path));oe.set(e,{tracked_paths:r,signatures:n,value:t.value})}function L(e){if(e){oe.delete(e);return}oe.clear()}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="6e01cb2d-2ff0-54f2-abdb-2d16f36487c1")}catch{}})();var Ie=new Or;async function ko(e,t,r=()=>!0){let n=new Set([It.resolve(e)]);try{n.add(await At(e))}catch{}return Ie.run([...Ie.getStore()??[],[n,r]],t)}function Ar(e){let t=It.resolve(e);return Ie.getStore()?.some(([r,n])=>r.has(t)&&n())??!1}var Ir="settings:write",Pt=Symbol("pm.settings.persist_source"),jt=Symbol("pm.settings.fallback_origin"),Nt=Symbol("pm.settings.fallback_baseline"),Pr=128,jr=new Set(["off","advisory","strict"]);function xt(e){return structuredClone(Qe[e])}function Nr(e){return e==="minimal"||e==="default"||e==="strict"||e==="custom"?e:_.governance.preset}var Rr=new Set(Ye);function Rt(e){return Rr.has(e)}function Et(e,t){let r=typeof t.create_default_type=="string"?t.create_default_type.trim():void 0;return r&&r.length>0&&(e.create_default_type=r),(t.workflow_enforcement==="off"||t.workflow_enforcement==="warn"||t.workflow_enforcement==="strict")&&(e.workflow_enforcement=t.workflow_enforcement),Rt(t.start_blocker_enforcement)&&(e.start_blocker_enforcement=t.start_blocker_enforcement),t.require_close_reason===!1&&(e.require_close_reason=!1),e.duplicate_detection_mode=t.duplicate_detection_mode,e.duplicate_detection_threshold=t.duplicate_detection_threshold,e.duplicate_detection_limit=t.duplicate_detection_limit,e}function Dr(e){return e.preset==="custom"?Et({preset:"custom",ownership_enforcement:e.ownership_enforcement,create_mode_default:e.create_mode_default,close_validation_default:e.close_validation_default,parent_reference:e.parent_reference,metadata_profile:e.metadata_profile,force_required_for_stale_lock:e.force_required_for_stale_lock},e):Et({preset:e.preset},e)}function Lr(e){let t=typeof e.create_default_type=="string"?e.create_default_type.trim():void 0,r={};t&&t.length>0&&(r.create_default_type=t),(e.workflow_enforcement==="off"||e.workflow_enforcement==="warn"||e.workflow_enforcement==="strict")&&(r.workflow_enforcement=e.workflow_enforcement),Rt(e.start_blocker_enforcement)&&(r.start_blocker_enforcement=e.start_blocker_enforcement),typeof e.require_close_reason=="boolean"&&(r.require_close_reason=e.require_close_reason),jr.has(String(e.duplicate_detection_mode))&&(r.duplicate_detection_mode=e.duplicate_detection_mode);let n=e.duplicate_detection_threshold;[typeof n=="number",Number.isFinite(n),Number(n)>=0,Number(n)<=1].every(Boolean)&&(r.duplicate_detection_threshold=n);let i=e.duplicate_detection_limit;return[typeof i=="number",Number.isSafeInteger(i),Number(i)>=0,Number(i)<=20].every(Boolean)&&(r.duplicate_detection_limit=i),r}function Dt(e){let t=e.governance??{},r=Nr(t.preset),n=Lr(t);if(r==="custom"){let a=xt("default"),d=n.require_close_reason??a.require_close_reason;return{preset:r,ownership_enforcement:t.ownership_enforcement??a.ownership_enforcement,create_mode_default:t.create_mode_default??a.create_mode_default,close_validation_default:t.close_validation_default??a.close_validation_default,parent_reference:t.parent_reference??a.parent_reference,metadata_profile:t.metadata_profile??a.metadata_profile,force_required_for_stale_lock:t.force_required_for_stale_lock??a.force_required_for_stale_lock,...n,require_close_reason:d,duplicate_detection_mode:n.duplicate_detection_mode??a.duplicate_detection_mode,duplicate_detection_threshold:n.duplicate_detection_threshold??a.duplicate_detection_threshold,duplicate_detection_limit:n.duplicate_detection_limit??a.duplicate_detection_limit}}let i=xt(r),s=n.require_close_reason??i.require_close_reason;return{preset:r,...i,...n,require_close_reason:s}}function Ne(){return structuredClone(_)}function Lt(e){return e==="cache_only"||e==="semantic_configured"||e==="semantic_auto"?e:_.search.mutation_refresh_policy}function qt(e){return e==="auto"||e==="keyword"||e==="semantic"||e==="hybrid"?e:"auto"}function Mt(e){return typeof e=="boolean"?e:_.search.query_expansion.enabled}function zt(e){return typeof e!="string"?_.search.query_expansion.provider:e.trim()}function Ft(e){return typeof e=="boolean"?e:_.search.rerank.enabled}function Vt(e){return typeof e!="string"?_.search.rerank.model:e.trim()}function Wt(e){return typeof e=="number"&&Number.isFinite(e)&&Number.isInteger(e)&&e>0?e:_.search.rerank.top_k}function Ut(e){if(typeof e!="string")return _.vector_store.collection_name;let t=e.trim().replaceAll(/[^a-zA-Z0-9_-]/g,"_").slice(0,Pr);return t.length>0?t:_.vector_store.collection_name}function Oe(e){return{present:Array.isArray(e),values:Array.isArray(e)?structuredClone(e):[]}}function $t(e,t){let r=e.schema,n=Oe(r?.statuses),i=Oe(r?.fields),s=Oe(r?.type_workflows);return{persisted_settings:structuredClone(e),source_settings:structuredClone(e),has_source_item_type_definitions:Array.isArray(e.item_types?.definitions),source_item_type_definitions:V(e.item_types?.definitions),has_source_schema_statuses:n.present,source_schema_statuses:n.values,has_source_schema_fields:i.present,source_schema_fields:i.values,has_source_schema_type_workflows:s.present,source_schema_type_workflows:s.values,runtime_item_type_definitions:V(t.item_types?.definitions),runtime_schema_statuses:structuredClone(t.schema.statuses),runtime_schema_fields:structuredClone(t.schema.fields),runtime_schema_type_workflows:structuredClone(t.schema.type_workflows??[])}}function Re(e,t){Object.defineProperty(e,Pt,{value:t,writable:!0,configurable:!0,enumerable:!1})}function Ht(e){let t=e[Pt];if(!(!t||typeof t!="object"))return t}function ae(e){let t=structuredClone(e.settings),r=Ht(e.settings);r&&Re(t,r);let n=De(e.settings);return n!==void 0&&Bt(t,n),{settings:t,metadata:{has_explicit_item_format:e.metadata.has_explicit_item_format},warnings:[...e.warnings]}}function qr(e,t,r){let n=$(t);return[r,H(e,n.files.types,U.types),H(e,n.files.statuses,U.statuses),H(e,n.files.fields,U.fields),H(e,n.files.workflows,U.workflows)]}async function Mr(e,t,r){let n=await P(t);ie(e,{tracked_paths:t,signatures:n,value:ae(r)})}async function zr(e,t,r){try{await Mr(e,t,r)}catch{L(e)}}function Tt(e,t){return e.find(r=>r.path===t)}function Fr(e,t,r){for(let n of r){let i=Tt(e,n),s=Tt(t,n);if(!i||!s||!J([i],[s]))return!1}return!0}async function Ce(e,t,r,n,i){try{let s=await P(t);if(!Fr(n,s,i)){L(e);return}ie(e,{tracked_paths:t,signatures:s,value:ae(r)})}catch{L(e)}}function Vr(e,t){let r=$(e.schema),n=V(e.item_types?.definitions);if(!t)return{item_type_definitions:n,schema_statuses:r.statuses,schema_fields:r.fields,schema_type_workflows:r.type_workflows};let i=r.type_workflows??[],s=C(n,t.runtime_item_type_definitions),a=C(r.statuses,t.runtime_schema_statuses),d=C(r.fields,t.runtime_schema_fields),y=C(i,t.runtime_schema_type_workflows);return{item_type_definitions:s?t.has_source_item_type_definitions?V(t.source_item_type_definitions):[]:n,schema_statuses:a?t.has_source_schema_statuses?structuredClone(t.source_schema_statuses):[]:r.statuses,schema_fields:d?t.has_source_schema_fields?structuredClone(t.source_schema_fields):[]:r.fields,schema_type_workflows:y?t.has_source_schema_type_workflows?structuredClone(t.source_schema_type_workflows):void 0:r.type_workflows}}function Bt(e,t){Object.defineProperty(e,jt,{value:t,writable:!0,configurable:!0,enumerable:!1})}function bo(e){return De(e)!==void 0}function De(e){let t=e[jt];return typeof t=="string"?t:void 0}function Wr(e){return e[Nt]}function Ur(e,t){Object.defineProperty(e,Nt,{value:t,writable:!0,configurable:!0,enumerable:!1})}function I(e){let t=Ne();return e!==void 0&&Bt(t,e),{settings:t,metadata:{has_explicit_item_format:!1},warnings:e?[e]:[]}}function Gt(e){if(typeof e!="object"||e===null||Array.isArray(e))return!1;let t=e.item_format;return t==="toon"||t==="json_markdown"}function Pe(e){return[...new Set((e??[]).map(t=>t.trim()).filter(t=>t.length>0))].sort((t,r)=>t.localeCompare(r))}function Kt(e){let t=_.agent_guidance,r=e?.template_version;return{prompt_completed:e?.prompt_completed===!0,declined:e?.declined===!0,declined_at:typeof e?.declined_at=="string"?e.declined_at:t.declined_at,template_version:typeof r=="number"&&Number.isInteger(r)&&r>0?r:t.template_version,last_checked_files:Pe(e?.last_checked_files??t.last_checked_files)}}function O(e){return[...new Set((e??[]).map(t=>t.trim().toLowerCase()).filter(t=>t.length>0))].sort((t,r)=>t.localeCompare(r))}function $r(e){return e==="off"||e==="warn"||e==="enforce"?e:_.extensions.policy.mode}function Hr(e){return e==="off"||e==="warn"||e==="enforce"?e:_.extensions.policy.trust_mode}function Jt(e){return e==="none"||e==="restricted"||e==="strict"?e:_.extensions.policy.default_sandbox_profile}function Br(e){let t=e.name.trim().toLowerCase();if(t.length===0)return null;let r={name:t};e.disabled===!0&&(r.disabled=!0),e.require_trusted===!0&&(r.require_trusted=!0),e.require_provenance===!0&&(r.require_provenance=!0),e.sandbox_profile!==void 0&&(r.sandbox_profile=Jt(e.sandbox_profile));let n=O(e.allowed_capabilities),i=O(e.blocked_capabilities),s=O(e.allowed_surfaces),a=O(e.blocked_surfaces),d=O(e.allowed_commands),y=O(e.blocked_commands),p=O(e.allowed_actions),v=O(e.blocked_actions),S=O(e.allowed_services),T=O(e.blocked_services);return n.length>0&&(r.allowed_capabilities=n),i.length>0&&(r.blocked_capabilities=i),s.length>0&&(r.allowed_surfaces=s),a.length>0&&(r.blocked_surfaces=a),d.length>0&&(r.allowed_commands=d),y.length>0&&(r.blocked_commands=y),p.length>0&&(r.allowed_actions=p),v.length>0&&(r.blocked_actions=v),S.length>0&&(r.allowed_services=S),T.length>0&&(r.blocked_services=T),r}function Gr(e){let t=new Map;for(let r of e??[]){let n=Br(r);n&&t.set(n.name,n)}return[...t.values()].sort((r,n)=>r.name.localeCompare(n.name))}function Ae(e){return e==="block"||e==="warn"?e:void 0}function Kr(e){if(typeof e=="string")return Ae(e);if(typeof e=="object"&&e!==null&&!Array.isArray(e)){let t=Ae(e.global),r=Ae(e.project);return t===void 0&&r===void 0?void 0:{...t!==void 0?{global:t}:{},...r!==void 0?{project:r}:{}}}}function x(e,t){return O(e?.[t]??_.extensions.policy[t])}function Yt(e){let t=Kr(e?.pm_max_version_exceeded_mode);return{mode:$r(e?.mode),trust_mode:Hr(e?.trust_mode),...t!==void 0?{pm_max_version_exceeded_mode:t}:{},require_provenance:e?.require_provenance===!0,trusted_extensions:x(e,"trusted_extensions"),default_sandbox_profile:Jt(e?.default_sandbox_profile),allowed_extensions:x(e,"allowed_extensions"),blocked_extensions:x(e,"blocked_extensions"),allowed_capabilities:x(e,"allowed_capabilities"),blocked_capabilities:x(e,"blocked_capabilities"),allowed_surfaces:x(e,"allowed_surfaces"),blocked_surfaces:x(e,"blocked_surfaces"),allowed_commands:x(e,"allowed_commands"),blocked_commands:x(e,"blocked_commands"),allowed_actions:x(e,"allowed_actions"),blocked_actions:x(e,"blocked_actions"),allowed_services:x(e,"allowed_services"),blocked_services:x(e,"blocked_services"),extension_overrides:Gr(e?.extension_overrides??_.extensions.policy.extension_overrides)}}function Xt(e){return[...new Set((e??[]).map(t=>t.trim().toLowerCase().replaceAll("-","_")))].filter(t=>t.length>0).sort((t,r)=>t.localeCompare(r)).filter(t=>["author","acceptance_criteria","estimated_minutes","close_reason","reviewer","risk","confidence","sprint","release"].includes(t))}function j(e){return[...new Set((e??[]).map(t=>t.trim().toLowerCase()).filter(t=>t.length>0))].sort((t,r)=>t.localeCompare(r))}function w(e,t){return e===void 0?t:e}function E(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?e:{}}function je(e){return Array.isArray(e)?e:[]}function Jr(e,t,r){return{...t.validation,...e.validation,parent_reference:r.parent_reference,metadata_profile:r.metadata_profile,metadata_required_fields:Xt(e.validation?.metadata_required_fields),lifecycle_stale_blocker_reason_patterns:j(e.validation?.lifecycle_stale_blocker_reason_patterns??t.validation.lifecycle_stale_blocker_reason_patterns),lifecycle_closure_like_blocked_reason_patterns:j(e.validation?.lifecycle_closure_like_blocked_reason_patterns??t.validation.lifecycle_closure_like_blocked_reason_patterns),lifecycle_closure_like_resolution_patterns:j(e.validation?.lifecycle_closure_like_resolution_patterns??t.validation.lifecycle_closure_like_resolution_patterns),lifecycle_closure_like_actual_result_patterns:j(e.validation?.lifecycle_closure_like_actual_result_patterns??t.validation.lifecycle_closure_like_actual_result_patterns),estimate_defaults_by_type:Te(e.validation?.estimate_defaults_by_type)}}function Yr(e,t){return{enabled:e.telemetry?.enabled??t.telemetry.enabled,first_run_prompt_completed:e.telemetry?.first_run_prompt_completed??t.telemetry.first_run_prompt_completed,capture_level:e.telemetry?.capture_level??t.telemetry.capture_level,endpoint:e.telemetry?.endpoint??t.telemetry.endpoint,installation_id:e.telemetry?.installation_id??t.telemetry.installation_id,retention_days:e.telemetry?.retention_days??t.telemetry.retention_days}}function Xr(e,t){return{...t.search,...e.search,default_mode:qt(e.search?.default_mode),mutation_refresh_policy:Lt(e.search?.mutation_refresh_policy),query_expansion:{...t.search.query_expansion,...e.search?.query_expansion,enabled:Mt(e.search?.query_expansion?.enabled),provider:zt(e.search?.query_expansion?.provider)},rerank:{...t.search.rerank,...e.search?.rerank,enabled:Ft(e.search?.rerank?.enabled),model:Vt(e.search?.rerank?.model),top_k:Wt(e.search?.rerank?.top_k)}}}function Qr(e,t){return{adapter:e.vector_store.adapter??t.vector_store.adapter,collection_name:Ut(e.vector_store.collection_name),qdrant:{...t.vector_store.qdrant,...e.vector_store.qdrant},lancedb:{...t.vector_store.lancedb,...e.vector_store.lancedb}}}function Zr(e,t){return e.item_format==="json_markdown"?"toon":e.item_format??t.item_format}function en(e,t){return{default_depth:e.context?.default_depth??t.context.default_depth,activity_limit:e.context?.activity_limit??t.context.activity_limit,stale_threshold_days:e.context?.stale_threshold_days??t.context.stale_threshold_days,next_ranking_policy:e.context?.next_ranking_policy??t.context.next_ranking_policy,sections:{...t.context.sections,...e.context?.sections}}}function tn(e,t){return{openai:{...t.providers.openai,...e.providers.openai},ollama:{...t.providers.ollama,...e.providers.ollama}}}function V(e){let t=(e??[]).map(n=>tt(n)).filter(n=>n!==null),r=new Map;for(let n of t)r.set(n.name.toLowerCase(),n);return[...r.values()].sort((n,i)=>n.name.localeCompare(i.name))}function se(e){let t=Ne(),r=Dt({governance:e.governance??{preset:"default"}});return{...t,...e,item_format:Zr(e,t),locks:{...t.locks,...e.locks},ids:{...t.ids,...e.ids},agent_identity:structuredClone(e.agent_identity??t.agent_identity),mutation_guard:{...t.mutation_guard,...e.mutation_guard},checkpoints:{...t.checkpoints,...e.checkpoints},output:{...t.output,...e.output},ux:{...t.ux,...e.ux},history:{...t.history,...e.history,compact_policy:{...t.history.compact_policy,...e.history?.compact_policy}},validation:Jr(e,t,r),governance:r,workflow:{definition_of_done:[...e.workflow?.definition_of_done??t.workflow.definition_of_done]},testing:{record_results_to_items:e.testing?.record_results_to_items??t.testing.record_results_to_items,allow_untrusted_linked_tests:e.testing?.allow_untrusted_linked_tests??t.testing.allow_untrusted_linked_tests},telemetry:Yr(e,t),agent_guidance:Kt(e.agent_guidance??t.agent_guidance),item_types:{definitions:V(e.item_types?.definitions)},schema:$(e.schema??t.schema),context:en(e,t),extensions:{enabled:[...e.extensions.enabled],disabled:[...e.extensions.disabled],policy:Yt(e.extensions.policy??t.extensions.policy)},search:Xr(e,t),providers:tn(e,t),vector_store:Qr(e,t)}}function rn(e){e.agent_identity=f(e.agent_identity,["probes_enabled","identity_vocabulary","harness_signals"]);let t=e.agent_identity;Object.hasOwn(t,"identity_vocabulary")&&(t.identity_vocabulary=f(E(t.identity_vocabulary),["version","aliases"])),e.agent_identity.harness_signals=je(e.agent_identity.harness_signals).map(r=>f(E(r),["harness","environment_keys","model_environment_keys","session_environment_keys","provenance_environment_keys","provenance_resolvers","provenance_unavailable_dimensions","argv_markers","client_names"])),e.locks=f(e.locks,["ttl_seconds","wait_ms"]),e.ids=f(e.ids,["token_length"]),e.mutation_guard=f(e.mutation_guard,["require_attributed_author","secret_guard","stale_in_progress_hours"]),e.checkpoints=f(e.checkpoints,["retention_days"]),e.output=f(e.output,["default_format"]),e.ux=f(e.ux,["deprecation_hints"]),e.history=f(e.history,["missing_stream","compact_policy"]),e.validation=f(e.validation,["sprint_release_format","parent_reference","metadata_profile","metadata_required_fields","lifecycle_stale_blocker_reason_patterns","lifecycle_closure_like_blocked_reason_patterns","lifecycle_closure_like_resolution_patterns","lifecycle_closure_like_actual_result_patterns","estimate_defaults_by_type"]),e.governance=f(e.governance,["preset","ownership_enforcement","create_mode_default","close_validation_default","require_close_reason","parent_reference","metadata_profile","force_required_for_stale_lock","create_default_type","workflow_enforcement","duplicate_detection_mode","duplicate_detection_threshold","duplicate_detection_limit"]),e.workflow=f(e.workflow,["definition_of_done"]),e.testing=f(e.testing,["record_results_to_items","allow_untrusted_linked_tests"]),e.telemetry=f(e.telemetry,["enabled","first_run_prompt_completed","capture_level","endpoint","installation_id","retention_days"]),e.agent_guidance=f(e.agent_guidance,["prompt_completed","declined","declined_at","template_version","last_checked_files"]),e.item_types=f(e.item_types,["definitions"]),e.schema=f(e.schema,["version","files","statuses","fields","workflow","type_workflows","unknown_field_policy"]),e.schema.files=f(E(e.schema.files),["types","statuses","fields","workflows"]),e.schema.workflow=f(E(e.schema.workflow),["draft_status","open_status","in_progress_status","blocked_status","close_status","canceled_status"]),e.context=f(e.context,["default_depth","activity_limit","stale_threshold_days","next_ranking_policy","sections"]),e.context.sections=f(E(e.context.sections),["hierarchy","activity","progress","blockers","files","workload","staleness","tests"]),e.extensions=f(e.extensions,["enabled","disabled","policy"]),e.extensions.policy=f(E(e.extensions.policy),["mode","trust_mode","pm_max_version_exceeded_mode","require_provenance","trusted_extensions","default_sandbox_profile","allowed_extensions","blocked_extensions","allowed_capabilities","blocked_capabilities","allowed_surfaces","blocked_surfaces","allowed_commands","blocked_commands","allowed_actions","blocked_actions","allowed_services","blocked_services","extension_overrides"]),e.extensions.policy.extension_overrides=je(e.extensions.policy.extension_overrides).map(r=>f(E(r),["name","disabled","require_trusted","require_provenance","sandbox_profile","allowed_capabilities","blocked_capabilities","allowed_surfaces","blocked_surfaces","allowed_commands","blocked_commands","allowed_actions","blocked_actions","allowed_services","blocked_services"])),e.search=f(e.search,["score_threshold","hybrid_semantic_weight","max_results","embedding_model","embedding_corpus_max_characters","embedding_batch_size","embedding_timeout_ms","scanner_max_batch_retries","provider","default_mode","mutation_refresh_policy","query_expansion","rerank"]),e.search.query_expansion=f(E(e.search.query_expansion),["enabled","provider"]),e.search.rerank=f(E(e.search.rerank),["enabled","model","top_k"]),e.providers=f(e.providers,["openai","ollama"]),e.providers.openai=f(E(e.providers.openai),["base_url","api_key","model"]),e.providers.ollama=f(E(e.providers.ollama),["base_url","model"]),e.vector_store=f(e.vector_store,["adapter","collection_name","qdrant","lancedb"]),e.vector_store.qdrant=f(E(e.vector_store.qdrant),["url","api_key"]),e.vector_store.lancedb=f(E(e.vector_store.lancedb),["path"])}function nn(e){return{...e,locks:w(e.locks,_.locks),ids:w(e.ids,_.ids),agent_identity:w(e.agent_identity,_.agent_identity),mutation_guard:w(e.mutation_guard,_.mutation_guard),checkpoints:w(e.checkpoints,_.checkpoints),output:w(e.output,_.output),ux:w(e.ux,_.ux),history:w(e.history,_.history),validation:w(e.validation,_.validation),workflow:w(e.workflow,_.workflow),testing:w(e.testing,_.testing),telemetry:w(e.telemetry,_.telemetry),agent_guidance:w(e.agent_guidance,_.agent_guidance),item_types:w(e.item_types,_.item_types),schema:w(e.schema,_.schema),context:w(e.context,_.context),extensions:w(e.extensions,_.extensions),search:w(e.search,_.search),providers:w(e.providers,_.providers),vector_store:w(e.vector_store,_.vector_store)}}function on(e,t){return{...e.validation,parent_reference:t.parent_reference,metadata_profile:t.metadata_profile,metadata_required_fields:Xt(e.validation?.metadata_required_fields),lifecycle_stale_blocker_reason_patterns:j(e.validation?.lifecycle_stale_blocker_reason_patterns??_.validation.lifecycle_stale_blocker_reason_patterns),lifecycle_closure_like_blocked_reason_patterns:j(e.validation?.lifecycle_closure_like_blocked_reason_patterns??_.validation.lifecycle_closure_like_blocked_reason_patterns),lifecycle_closure_like_resolution_patterns:j(e.validation?.lifecycle_closure_like_resolution_patterns??_.validation.lifecycle_closure_like_resolution_patterns),lifecycle_closure_like_actual_result_patterns:j(e.validation?.lifecycle_closure_like_actual_result_patterns??_.validation.lifecycle_closure_like_actual_result_patterns),estimate_defaults_by_type:Te(e.validation?.estimate_defaults_by_type)}}function an(e){return{..._.search,...e.search,default_mode:qt(e.search?.default_mode),mutation_refresh_policy:Lt(e.search?.mutation_refresh_policy),query_expansion:{..._.search.query_expansion,...e.search?.query_expansion,enabled:Mt(e.search?.query_expansion?.enabled),provider:zt(e.search?.query_expansion?.provider)},rerank:{..._.search.rerank,...e.search?.rerank,enabled:Ft(e.search?.rerank?.enabled),model:Vt(e.search?.rerank?.model),top_k:Wt(e.search?.rerank?.top_k)}}}function sn(e){return{default_depth:e.context?.default_depth??_.context.default_depth,activity_limit:e.context?.activity_limit??_.context.activity_limit,stale_threshold_days:e.context?.stale_threshold_days??_.context.stale_threshold_days,next_ranking_policy:e.context?.next_ranking_policy??_.context.next_ranking_policy,sections:{..._.context.sections,...e.context?.sections}}}function cn(e){return{...e.vector_store,adapter:e.vector_store?.adapter??_.vector_store.adapter,collection_name:Ut(e.vector_store?.collection_name),qdrant:{...e.vector_store?.qdrant},lancedb:{...e.vector_store?.lancedb}}}function ln(e,t,r,n){return{...e,item_format:"toon",validation:on(e,t),governance:t,agent_guidance:Kt(e.agent_guidance),item_types:{definitions:n.item_type_definitions},schema:{...r,statuses:n.schema_statuses,fields:n.schema_fields,type_workflows:n.schema_type_workflows},search:an(e),context:sn(e),extensions:{enabled:Pe(e.extensions?.enabled),disabled:Pe(e.extensions?.disabled),policy:Yt(e.extensions?.policy)},vector_store:cn(e)}}function Qt(e,t){for(let r of Object.keys(t)){let n=Reflect.get(t,r),i=e[r];typeof n=="object"&&n!==null&&!Array.isArray(n)&&typeof i=="object"&&i!==null&&!Array.isArray(i)?Qt(i,n):e[r]=structuredClone(n)}}function Le(e,t,r){let n=new Set([...Object.keys(t),...Object.keys(r)]);for(let i of n){let s=t[i],a=r[i];if(!C(s,a)){if(a===void 0){delete e[i];continue}if(typeof s=="object"&&s!==null&&!Array.isArray(s)&&typeof a=="object"&&a!==null&&!Array.isArray(a)){let d=e[i],y=typeof d=="object"&&d!==null&&!Array.isArray(d)?d:{};Le(y,s,a),Object.keys(y).length>0?e[i]=y:delete e[i];continue}e[i]=structuredClone(a)}}}var ce=["version","id_prefix","ids","author_default","agent_identity","mutation_guard","item_format","locks","checkpoints","output","ux","history","validation","governance","workflow","testing","telemetry","agent_guidance","item_types","schema","context","extensions","search","providers","vector_store"];function Ot(e,t){let r=nn(e),n=Dt(r),i=$(r.schema),s=Vr(r,t),a=ln(r,n,i,s),d=f({...a,governance:Dr(n)},ce);return rn(d),d}function Zt(e,t={}){let r=t.source===void 0?t.persist_source:$t(t.source.validated,se(t.source.validated)),n=Ot(e,r);if(r){let i=se(r.source_settings);i.item_types={definitions:structuredClone(r.runtime_item_type_definitions)},i.schema={...i.schema,statuses:structuredClone(r.runtime_schema_statuses),fields:structuredClone(r.runtime_schema_fields),type_workflows:structuredClone(r.runtime_schema_type_workflows)};let s=Ot(i,r);t.source!==void 0&&Qt(s,t.source.validated);let a=structuredClone(t.source===void 0?r.source_settings:t.source.raw);return Le(a,s,n),`${JSON.stringify(f(a,ce),null,2)}
|
|
2
|
-
`}return`${JSON.stringify(n,null,2)}
|
|
3
|
-
`}async function dn(e){let t;try{t=await At(e)}catch(d){if(X(d))return I();throw d}let r=M(t),n;try{n=await Cr(r)}catch(d){if(X(d))return I();throw d}if(!n.isFile())throw pe("settings.json");let i;try{i=await et(r,pe("settings.json"))}catch(d){if(X(d))return I();throw d}let s;try{s=JSON.parse(i)}catch{return I("settings_read_invalid_json")}let a=Z(s);return a.success?{settings:se(a.data),metadata:{has_explicit_item_format:Gt(s)},warnings:a.data.item_format==="json_markdown"?["settings_item_format_legacy_json_markdown_coerced_to_toon"]:[]}:I("settings_read_invalid_schema")}async function er(e){if(Ar(e))return dn(e);let t=M(e),r=[t];await ut({path:t,scope:"project"});let n=St(e);if(n){let p=await P(n.tracked_paths);if(J(p,n.signatures))return ae(n.value)}let i=await P([t]),s;try{s=await q(t)}catch{return I("settings_read_fs_error")}if(s===null){let p=I();return await Ce(e,[t],p,i,[t]),p}let a=await P([t]);if(!J(i,a))return L(e),er(e);let d;try{d=JSON.parse(s)}catch{let p=I("settings_read_invalid_json");return await Ce(e,[t],p,a,[t]),p}let y=Z(d);if(!y.success){let p=I("settings_read_invalid_schema");return await Ce(e,[t],p,a,[t]),p}try{let p=se(y.data),v=qr(e,p.schema,t);r=v;let S=await P(v),T=await nt(e,p.schema),Ue=await P(v),me={...p,item_types:{definitions:V([...p.item_types.definitions,...je(T.type_definitions_from_file)])},schema:T.schema};Re(me,$t(y.data,me));let $e={settings:me,metadata:{has_explicit_item_format:Gt(d)},warnings:[...y.data.item_format==="json_markdown"?["settings_item_format_legacy_json_markdown_coerced_to_toon"]:[],...T.warnings]};return J(S,Ue)?ie(e,{tracked_paths:v,signatures:Ue,value:ae($e)}):L(e),$e}catch{let p=I("settings_read_merge_failed");return await zr(e,r,p),p}}function _n(e,t=[],r=null){let n=qe(r)??{},i=t.filter(a=>!Object.hasOwn(n,a));if(i.length===0)return e;let s=JSON.parse(e);for(let a of i)Reflect.deleteProperty(s,a);return`${JSON.stringify(s,null,2)}
|
|
4
|
-
`}var un=/^[A-Za-z0-9_-]+$/u,fn=new Set(["__proto__","constructor","prototype"]);function qe(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)?e:void 0}function mn(e){for(let t of e)if(t.split(".").find(r=>!un.test(r)||fn.has(r))!==void 0)throw new b(`Settings write assignedPaths entry "${t}" is not a dotted settings path.`,k.USAGE,{code:"settings_write_assigned_path_invalid",reason:"assigned_path_segment_invalid",field:t,why:"Assigned paths name settings keys; an empty, reserved or non-identifier segment cannot address one safely.",nextSteps:["Pass dotted settings keys such as context.next_ranking_policy in assignedPaths."]})}function tr(e,t){return qe(Object.hasOwn(e,t)?e[t]:void 0)}function Ct(e,t){let r=e;for(let n of t)if(r=tr(r,n),r===void 0)return;return r}function pn(e,t){let r=e;for(let n of t){let i=tr(r,n);i===void 0&&(i={},r[n]=i),r=i}return r}function hn(e,t,r){for(let n of r){let i=n.split("."),s=i.pop(),a=Ct(t,i);if(a===void 0)continue;if(Object.hasOwn(a,s)){pn(e,i)[s]=structuredClone(a[s]);continue}if(!mt.includes(i[0]??s))continue;let d=Ct(e,i);d!==void 0&&delete d[s]}}function yn(e,t,r,n,i){let s=i??JSON.parse(Zt(Ne())),a=structuredClone(qe(e)??{});Le(a,s,t),hn(a,t,n);let d=Z(a);if(!d.success){let y=d.path;throw new b(`Existing settings.json fails validation at ${y}; the settings write was refused and nothing was changed.`,k.USAGE,{code:"settings_write_invalid_existing_schema",reason:"existing_settings_schema_invalid",field:y,original_code:r,why:"The stored settings could not be read, so writing would either keep an invalid document or replace intended project configuration with defaults.",nextSteps:[`Fix or remove ${y} in settings.json, then retry the original command.`,"A configurable setting can also be repaired explicitly, even to its default value, with pm config <scope> set <dotted.key> <value>.","Run pm health to confirm the settings warning has cleared."]})}return`${JSON.stringify(f(a,ce),null,2)}
|
|
5
|
-
`}function gn(e){try{return JSON.parse(e)}catch{throw new b("Existing settings.json is malformed; the settings write was refused.",k.USAGE,{code:"settings_write_invalid_existing_json",reason:"existing_settings_json_malformed",why:"Writing defaults over malformed settings could destroy intended project configuration.",nextSteps:["Repair the syntax in .agents/pm/settings.json, then retry the original command.","Run pm health to confirm the settings warning has cleared."]})}}async function vo(e){return(await er(e)).settings}async function So(e,t,r=Ir,n={}){let i=n.assignedPaths??[];mn(i);let s=M(e),a=Ht(t),d=a?void 0:De(t),y=Zt(t,{persist_source:a}),p=JSON.parse(y),v=!1;try{if(await gt({pmRoot:e,filePath:s,mutate:S=>{let T=S===null?null:gn(S);return S!==null&&n.skipIfStored?.(T)===!0?(v=!0,{raw:S,result:void 0}):d!==void 0&&S!==null?{raw:yn(T,p,d,i,Wr(t)),result:void 0}:{raw:a?`${JSON.stringify(f(xe(a.persisted_settings,p,T),ce),null,2)}
|
|
6
|
-
`:_n(y,n.omitSections,T),result:void 0}},op:r,author:st(void 0,t.author_default),lockTtlSeconds:t.locks.ttl_seconds,lockWaitMs:t.locks.wait_ms,recordCreation:!1}),v)return;a?Re(t,{...a,persisted_settings:structuredClone(p)}):d!==void 0&&Ur(t,structuredClone(p)),await _t({path:s,scope:"project",op:r})}finally{L(e)}}import rr from"node:fs";import Y from"node:path";import{createRequire as wn}from"node:module";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="27729f1f-7de5-5907-943e-88b4b6093842")}catch{}})();var nr="@unbrained/pm-cli";var ze=/\b(\d{4})\.(\d{1,2})\.(\d{1,2})(?:-(\d+))?\b/u,Fe="2026.8.31";function le(e){let t=e.match(ze);return t?[Number(t[1]),Number(t[2]),Number(t[3]),Number(t[4]??0)]:null}function _e(e,t){let r=le(e),n=le(t);if(!r||!n)return null;for(let i=0;i<r.length;i+=1){let s=r[i]-n[i];if(s!==0)return Math.sign(s)}return 0}function Me(e){return _e(e,Fe)!==-1?3:2}function de(e){try{let t=JSON.parse(rr.readFileSync(e,"utf8"));return typeof t=="object"&&t!==null&&!Array.isArray(t)?t:null}catch{return null}}function kn(e){let t=[...e.matchAll(/(<=|<)\s*v?(\d{4}\.\d{1,2}\.\d{1,2}(?:-\d+)?)/gu)].map(n=>({inclusive:n[1]==="<=",version:n[2]})),r=e.match(/\b\d{4}\.\d{1,2}\.\d{1,2}(?:-\d+)?\s+-\s+v?(\d{4}\.\d{1,2}\.\d{1,2}(?:-\d+)?)/u);return r?[...t,{inclusive:!0,version:r[1]}]:t}function bn(e){let t=e.split("||").map(r=>kn(r));return{bounded:t.some(r=>r.length>0),compatible:t.some(r=>r.every(n=>{let i=_e(Fe,n.version);return i!==null&&(n.inclusive?i!==1:i===-1)}))}}function or(e){return["dependencies","devDependencies","optionalDependencies","peerDependencies"].flatMap(t=>{let r=e[t];if(typeof r!="object"||r===null)return[];let n=r[nr];return typeof n=="string"?[n.trim()]:[]})}function vn(e){return or(e).flatMap(t=>{let r=/^[<!]/u.test(t)?void 0:t.match(ze)?.[0];if(!r)return[];let n=/^(?:=|v)?\d{4}\.\d{1,2}\.\d{1,2}(?:-\d+)?$/u.test(t),i=bn(t);return[{version:r,constraint:n?"exact":i.bounded?"range":"minimum",...n?{}:{declaration:t},history_epoch_compatible:n?_e(r,Fe)!==-1:i.compatible}]})}function Sn(e){let t=de(Y.join(e,"package-lock.json"))?.packages;if(typeof t!="object"||t===null)return;let r=t["node_modules/@unbrained/pm-cli"];if(typeof r!="object"||r===null)return;let n=r.version;return typeof n=="string"?n:void 0}function xn(e,t){try{let r=rr.readFileSync(Y.join(e,t),"utf8").split(/\r?\n/u),n=r.findIndex(a=>a.includes(nr));if(n<0)return;let i=r[n].match(/^\s*/u)[0].length,s=[r[n]];for(let a=n+1;a<r.length;a+=1){let d=r[a],y=d.trim(),p=d.match(/^\s*/u)[0].length;if(y.length>0&&p<=i)break;s.push(d)}return s.join(`
|
|
7
|
-
`).match(/^\s*version(?::\s*|\s+)["']?(\d{4}\.\d{1,2}\.\d{1,2}(?:-\d+)?)/mu)?.[1]??s[0].match(ze)?.[0]}catch{return}}function En(e){let t=[],r=de(Y.join(e,"package.json"));r&&t.push(...vn(r).map(s=>({...s,source:"package.json"})));let n=de(Y.join(e,"node_modules","@unbrained","pm-cli","package.json"))?.version;typeof n=="string"&&le(n)&&t.push({version:n,source:"installed-package",constraint:"exact",history_epoch_compatible:Me(n)===3});let i=Sn(e);i&&le(i)&&t.push({version:i,source:"package-lock.json",constraint:"exact",history_epoch_compatible:Me(i)===3});for(let s of["pnpm-lock.yaml","yarn.lock"]){let a=xn(e,s);a&&t.push({version:a,source:s,constraint:"exact",history_epoch_compatible:Me(a)===3})}return t}function Tn(e,t){if(t<=1)return;let{minVersion:r,lt:n}=wn(import.meta.url)("semver"),i=or(de(Y.join(e,"package.json"))??{}).find(a=>{try{let d=r(a);return d!==null&&n(d,"2026.10.10")}catch{return!1}}),s=i===void 0?En(e).find(a=>_e(a.version,"2026.10.10")===-1):{version:i,source:"package.json"};if(s)throw new b(`The project selects pm ${s.version}, which cannot safely refuse item format ${t}.`,k.CONFLICT,{code:"project_runtime_item_format_incompatible",reason:s.source,required:"Upgrade project pins, installed SDKs, CI hosts and Git merge drivers before writing guarded item formats.",nextSteps:["Use a pm runtime supporting the required item format throughout the project; preserve original item and history bytes, and never re-anchor history to satisfy an older host."]})}function jo(e,t){let r=at(e);r<=it||(Tn(rt(t),r),e.pm_format_version=r)}import We from"node:fs/promises";import ue from"node:path";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="658ab1c3-da92-5af6-a170-85ed7befaad6")}catch{}})();function N(e,t){return typeof e=="object"&&e!==null&&"code"in e&&e.code===t}function ir(e){let t=["--pm-path",e,"init","--defaults","--agent-guidance","skip"];return{suggested_retry:ot(t),suggested_retry_args:t}}function fe(e){return new b(`Tracker root is not a directory at ${e}.`,k.USAGE,{code:"tracker_root_not_directory",reason:"not_a_directory",resolved_path:e,nextSteps:["Pass a tracker directory, usually <workspace>/.agents/pm, rather than a file path."]})}function Ve(e){return new b(`Tracker root is not readable at ${e}.`,k.GENERIC_FAILURE,{code:"tracker_root_unreadable",reason:"unreadable",resolved_path:e,nextSteps:["Grant read and directory-search permission to the tracker root, then retry."]})}async function On(e){let t=ue.resolve(e),r=ue.parse(t).root,n=ue.dirname(t);for(;n!==r;){let i;try{i=await We.stat(n)}catch(s){if(N(s,"ENOTDIR"))throw fe(e);if(!N(s,"ENOENT"))throw s;n=ue.dirname(n);continue}if(!i.isDirectory())throw fe(e);return}}async function Cn(e){let t;try{t=await We.stat(e)}catch(r){throw N(r,"ENOENT")?(await On(e),new b(`Tracker is not initialized at ${e}. Tracker root does not exist. Run pm init first.`,k.NOT_FOUND,{code:"tracker_root_missing",reason:"missing",resolved_path:e,nextSteps:["Confirm the tracker root path or initialize it with the emitted retry."],recovery:ir(e)})):N(r,"ENOTDIR")?fe(e):N(r,"EACCES")||N(r,"EPERM")?Ve(e):r}if(!t.isDirectory())throw fe(e);if(process.platform!=="win32"&&((t.mode&292)===0||(t.mode&73)===0))throw Ve(e);try{await(await We.opendir(e)).close()}catch(r){throw N(r,"EACCES")||N(r,"EPERM")?Ve(e):r}}async function Vo(e){if(await Cn(e),!await Ze(M(e)))throw new b(`Tracker is not initialized at ${e}. Run pm init first.`,k.NOT_FOUND,{code:"tracker_not_initialized",reason:"settings_missing",resolved_path:e,nextSteps:["Initialize the selected tracker root with the emitted retry."],recovery:ir(e)})}export{F as a,ee as b,Wn as c,Un as d,$n as e,gt as f,Hn as g,mt as h,Z as i,Xn as j,L as k,ko as l,Ar as m,Dt as n,bo as o,se as p,Zt as q,er as r,vo as s,So as t,En as u,Tn as v,jo as w,Cn as x,Vo as y};
|
|
8
|
-
//# sourceMappingURL=chunk-MKM5NKD7.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ca as l}from"./chunk-URJ2E6AS.js";import{mb as r}from"./chunk-HGFNL5XI.js";import{Dg as S,Eg as N,Gg as E,sb as n}from"./chunk-OSLQD5VH.js";(function(){try{var T=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new T.Error().stack;e&&(T._sentryDebugIds=T._sentryDebugIds||{},T._sentryDebugIds[e]="c162c9b5-2566-5a1b-ae26-dafa8b206b27")}catch{}})();var u=new Set(["--author","--expect-hash","--follow","--help","--lean","--token-accounting","--output-include","--output-limit","--output-budget","--output-format","--output-session","--output-cursor","--output-row-contract","--no-changed-fields","--no-extensions","--no-pager","--pm-path","--profile","--quiet","--interval-ms"]),p=new Set([...S,...N]),I=new Set(["--brief","--format","--full","--full-changed-fields","--id-only","--no-truncate","--stream"]),d=new Set(["--body-file","--file","--stdin-json"]),m=new Set(["--global","--local","--project"]),P=new Set(["--activity-limit","--default-depth","--section-activity","--section-blockers","--section-files","--section-hierarchy","--section-progress","--section-staleness","--section-tests","--section-workload","--stale-threshold-days"]),f=new Set(["action","fullChangedFields","idOnly","path","pmExecutable","timeoutMs"]),M=new Set(["configAction","id","name","query","reason","subcommand","target","text"]),G={assurance:{id:"<id>",kind:"<kind>",preset:"[kind]|[id]",subcommand:"<action>"},event:{title:"<title>"},files:{lookupPath:"lookup <path...>"},meet:{title:"<title>"},"item-reopen":{id:"<id>",reason:"<reason>"},merge:{subcommand:"<subcommand>"},remind:{title:"<title>"},workspace:{name:"<name>",subcommand:"snapshot",snapshotAction:"<snapshot-action>",target:"<target>"}},F={append:{"--text":"body"},assurance:{"--tree":"treeId","--owner":"owner","--apply":"apply","--enforcement":"enforcement"},init:{"--id-prefix":"idPrefix","--no-merge-fence":"mergeFence","--workspace":"workspace"},create:{"--no-inherit-focus":"inheritFocus","--ac":"acceptanceCriteria","--estimated-minutes":"estimate","--file":"linkedFile","--test":"linkedTest","--expected":"expectedResult","--actual":"actualResult"},plan:{"--no-inherit-focus":"inheritFocus"},update:{"--ac":"acceptanceCriteria","--estimated-minutes":"estimate","--file":"linkedFile","--test":"linkedTest","--expected":"expectedResult","--actual":"actualResult"},"update-many":{"--ac":"acceptanceCriteria","--estimated-minutes":"estimate","--file":"linkedFile","--test":"linkedTest","--expected":"expectedResult","--actual":"actualResult"},files:{"--note":"addNote","--note-conflict":"noteConflict","--full-history":"full"},docs:{"--note":"addNote","--note-conflict":"noteConflict","--full-history":"full"},test:{"--full-history":"full"},comments:{"--full-history":"full"},notes:{"--file":"text","--full-history":"full"},learnings:{"--file":"text","--full-history":"full"},gc:{"--scope":"gcScope"},contracts:{"--action":"contractAction"},schema:{"--no-allow-unset":"allowUnset","--type":"fieldTypeScope"},"history-author-acknowledge":{"--event":"historyEvent","--all-actionable":"allActionable"},"extension-init":{"--capability":"capability"},"package-init":{"--capability":"capability"},"extension-install":{"--gh":"github"},"package-install":{"--gh":"github"},"extension-adopt":{"--gh":"github"},"package-adopt":{"--gh":"github"},extension:{"--gh":"github","--scaffold":"init"},package:{"--gh":"github","--scaffold":"init"},install:{"--gh":"github"}},D={"--pm-path":"path"},c={stats:{"--analytics":["measurements","metric","measurementLimit","observe","improvementDirection","measurementSource","measurementItem","measurementRevision","author","message","provenanceCoverage","fleetAttribution","since","eventLimit","minimumSample"]}};function h(T){return T.startsWith("extension-")?`extension ${T.slice(10)}`:T.startsWith("package-")?`package ${T.slice(8)}`:T.startsWith("item-")?`item ${T.slice(5)}`:T}function R(T,e){let t=F[T]?.[e]??D[e];return t!==void 0?t:e.replace(/^--/,"").replaceAll("_","-").replace(/-([a-z])/g,(i,_)=>_.toUpperCase())}function g(T){let e=new Set;return T.filter(({flag:t})=>!t.startsWith("--")||e.has(t)?!1:(e.add(t),!0))}function y(T,e){return e.find(({aliases:t})=>t?.includes(T))?.flag}function b(T,e,t,i){let _=c[T]?.[e.flag];if(_!==void 0&&_.every(A=>i.has(A)))return{surface:"cli",input:e.flag,counterpart:_[0],disposition:"shared",reason:"The validated CLI JSON object fans out across strict SDK parameters."};let O=R(T,e.flag);if(i.has(O))return{surface:"cli",input:e.flag,counterpart:O,disposition:"shared",reason:"The CLI flag maps directly to a strict SDK action parameter."};let C=y(e.flag,t);if(C!==void 0){let A=R(T,C);if(i.has(A))return{surface:"cli",input:e.flag,counterpart:A,disposition:"compatibility_alias",reason:`Compatibility spelling for ${C}.`}}return u.has(e.flag)?{surface:"cli",input:e.flag,disposition:"cli_transport",reason:"CLI process transport is supplied by the in-process SDK host."}:I.has(e.flag)?{surface:"cli",input:e.flag,disposition:"cli_presentation",reason:"CLI rendering or mutation projection does not alter the SDK result envelope."}:d.has(e.flag)?{surface:"cli",input:e.flag,disposition:"cli_adapter",reason:"Local file or stdin adaptation is a CLI boundary concern."}:P.has(e.flag)?{surface:"cli",input:e.flag,counterpart:"key",disposition:"compatibility_alias",reason:"CLI config shorthand normalizes to the SDK configAction/key/value contract."}:m.has(e.flag)?{surface:"cli",input:e.flag,counterpart:"scope",disposition:"cli_scope_selector",reason:"Mutually exclusive CLI scope switches normalize to the SDK scope parameter."}:{surface:"cli",input:e.flag,counterpart:O,disposition:"unclassified",reason:"The CLI flag has no strict SDK parameter or approved boundary classification."}}function U(T,e,t){let i=Object.entries(c[T]??{}).find(([C,A])=>A.includes(e)&&t.some(({input:a,disposition:s})=>a===C&&s==="shared"));if(i!==void 0)return{surface:"sdk",input:e,counterpart:i[0],disposition:"shared",reason:"The strict SDK parameter is reachable through the validated CLI JSON object."};let _=t.find(({counterpart:C,disposition:A})=>C===e&&(A==="shared"||A==="compatibility_alias"||A==="cli_scope_selector"));if(_!==void 0)return{surface:"sdk",input:e,counterpart:_.input,disposition:"shared",reason:"The strict SDK parameter is reachable from the CLI contract."};let O=G[T]?.[e];return O!==void 0?{surface:"sdk",input:e,counterpart:O,disposition:"shared",reason:"The strict SDK parameter maps to a canonical CLI positional argument."}:f.has(e)?{surface:"sdk",input:e,disposition:"sdk_transport",reason:"The SDK host supplies in-process transport and workspace selection."}:M.has(e)?{surface:"sdk",input:e,disposition:"cli_positional",reason:"The CLI accepts this SDK parameter as a positional command argument."}:{surface:"sdk",input:e,disposition:"sdk_native",reason:"The typed SDK exposes this structured input without a canonical CLI long flag."}}function v(T={}){let e=T.actions??n,t=T.resolveFlags??r,i=T.resolveParameters??l;return e.map(_=>{let O=h(_),C=g(t(O)).filter(({flag:o})=>E(_)!==void 0||!p.has(o)),A=new Set(i(_)??[]),a=C.map(o=>b(_,o,C,A)),s=[...A].sort((o,L)=>o.localeCompare(L)).map(o=>U(_,o,a));return{action:_,command:O,cli:a,sdk:s,unclassified:[...a,...s].filter(({disposition:o})=>o==="unclassified")}})}(function(){try{var T=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new T.Error().stack;e&&(T._sentryDebugIds=T._sentryDebugIds||{},T._sentryDebugIds[e]="62489699-d1d6-505e-8a23-53922081c6e7")}catch{}})();export{v as a};
|
|
2
|
-
//# sourceMappingURL=chunk-NP72ZDXE.js.map
|