@unbrained/pm-cli 2026.11.22 → 2026.11.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +1 -1
- package/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-23K6DQQY.js +9 -0
- package/dist/cli-bundle/chunks/chunk-37UDIJ2K.js +3 -0
- package/dist/cli-bundle/chunks/chunk-5DUP4AZA.js +2 -0
- package/dist/cli-bundle/chunks/chunk-6H36ZHMI.js +2 -0
- package/dist/cli-bundle/chunks/chunk-7IROAPWI.js +3 -0
- package/dist/cli-bundle/chunks/chunk-7VRFEURZ.js +33 -0
- package/dist/cli-bundle/chunks/chunk-7X253M6Z.js +3 -0
- package/dist/cli-bundle/chunks/chunk-AA52P34H.js +3 -0
- package/dist/cli-bundle/chunks/chunk-AWB5KBJS.js +2 -0
- package/dist/cli-bundle/chunks/chunk-D6PDUKUG.js +9 -0
- package/dist/cli-bundle/chunks/chunk-DQDRA3SW.js +2 -0
- package/dist/cli-bundle/chunks/chunk-FXJYZBWV.js +113 -0
- package/dist/cli-bundle/chunks/chunk-HNKK2UG6.js +8 -0
- package/dist/cli-bundle/chunks/chunk-HZZLSBIJ.js +2 -0
- package/dist/cli-bundle/chunks/chunk-I2OJ5B4A.js +2 -0
- package/dist/cli-bundle/chunks/chunk-I3BFCKZR.js +2 -0
- package/dist/cli-bundle/chunks/chunk-MXUSC5RS.js +31 -0
- package/dist/cli-bundle/chunks/chunk-PLIUU37C.js +3 -0
- package/dist/cli-bundle/chunks/chunk-PQUBVRV5.js +2 -0
- package/dist/cli-bundle/chunks/chunk-PW7U7WCE.js +3 -0
- package/dist/cli-bundle/chunks/chunk-PZA7QECY.js +1 -0
- package/dist/cli-bundle/chunks/chunk-SLFRSZK6.js +1 -0
- package/dist/cli-bundle/chunks/chunk-SSALO4DB.js +2 -0
- package/dist/cli-bundle/chunks/chunk-STOOTHZZ.js +2 -0
- package/dist/cli-bundle/chunks/chunk-TKRY22SO.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-B76TFRO2.js → chunk-TVIJ2VCU.js} +93 -93
- package/dist/cli-bundle/chunks/chunk-VJSGUXGU.js +3 -0
- package/dist/cli-bundle/chunks/chunk-WWTPNIC2.js +6 -0
- package/dist/cli-bundle/chunks/chunk-XFADNMGD.js +2 -0
- package/dist/cli-bundle/chunks/chunk-YOPTAIBD.js +125 -0
- package/dist/cli-bundle/chunks/chunk-YW2HBHRO.js +70 -0
- package/dist/cli-bundle/chunks/chunk-YYT3MIRF.js +3 -0
- package/dist/cli-bundle/chunks/chunk-Z7MFVRDV.js +2 -0
- package/dist/cli-bundle/chunks/chunk-ZOX4SWRL.js +8 -0
- package/dist/cli-bundle/chunks/chunk-ZYCOM4MS.js +9 -0
- package/dist/cli-bundle/chunks/context-budget-recovery-M5RFUEFG.js +2 -0
- package/dist/cli-bundle/chunks/field-option-collisions-W66HSWMK.js +2 -0
- package/dist/cli-bundle/chunks/indexed-receipt-blobs-BPYKN5Q7.js +4 -0
- package/dist/cli-bundle/{focused-chunks/item-revision-2O6MLPEX.js → chunks/item-revision-D3LSBNIR.js} +2 -2
- package/dist/cli-bundle/chunks/item-transaction-M6NTBYH3.js +2 -0
- package/dist/cli-bundle/chunks/mutation-actor-OKL3CQVX.js +2 -0
- package/dist/cli-bundle/chunks/mutation-admission-EKPEOZMF.js +2 -0
- package/dist/cli-bundle/chunks/{register-list-query-RR5KACJ3.js → register-list-query-3LBV6CS2.js} +11 -11
- package/dist/cli-bundle/chunks/register-mutation-72AGTMNE.js +21 -0
- package/dist/cli-bundle/chunks/register-operations-XERFG2SH.js +2 -0
- package/dist/cli-bundle/chunks/register-setup-W22L34Z4.js +2 -0
- package/dist/cli-bundle/chunks/runtime-schema-JP2KBHBY.js +2 -0
- package/dist/cli-bundle/chunks/settlement-hook-6MR32OOC.js +7 -0
- package/dist/cli-bundle/chunks/stage-T2LKWN7C.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-24VRBNKE.js +26 -0
- package/dist/cli-bundle/focused-chunks/chunk-3ELVASVA.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-3GT4A3ZN.js +44 -0
- package/dist/cli-bundle/focused-chunks/chunk-3OCDKITJ.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-3Z7MCUJM.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-46MP7IZN.js +5 -0
- package/dist/cli-bundle/focused-chunks/chunk-5LDBS6MS.js +91 -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-B6BNHKUW.js +78 -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-C7WHWI7K.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-EUQGZPGO.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-FDZPRJXJ.js +27 -0
- package/dist/cli-bundle/focused-chunks/chunk-GXP7Q4XM.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-HL47UQZJ.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-IIP6LZ5E.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-K53OIT5J.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-LMFIAQ2V.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-LMU7DDOA.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-OZOCEB2Q.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-Q2HY44LV.js +13 -0
- package/dist/cli-bundle/focused-chunks/chunk-REFMQY47.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-RIE3SJSE.js +9 -0
- package/dist/cli-bundle/focused-chunks/chunk-RIQUIHYU.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-RLO2HCZT.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-SMMOZ3H3.js +100 -0
- package/dist/cli-bundle/focused-chunks/chunk-UVTUX54T.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-X6CXWWNB.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-XDBHD4CY.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-YD66IRSL.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-Z7W2RQIB.js +2 -0
- package/dist/cli-bundle/focused-chunks/context-budget-recovery-CSJV3TY3.js +2 -0
- package/dist/cli-bundle/focused-chunks/field-option-collisions-UODPSV6W.js +2 -0
- package/dist/cli-bundle/focused-chunks/indexed-receipt-blobs-EGEJMG3G.js +4 -0
- package/dist/cli-bundle/focused-chunks/item-revision-QH7RNBX4.js +2 -0
- package/dist/cli-bundle/focused-chunks/item-transaction-ZO72OINF.js +2 -0
- package/dist/cli-bundle/focused-chunks/mutation-actor-PHVLKG4I.js +2 -0
- package/dist/cli-bundle/focused-chunks/mutation-admission-ZSG5OECH.js +2 -0
- package/dist/cli-bundle/focused-chunks/runtime-schema-6RQMIDTN.js +2 -0
- package/dist/cli-bundle/focused-chunks/settlement-hook-FMLGKG7J.js +7 -0
- package/dist/cli-bundle/focused-chunks/stage-AQMKRVX4.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 +66 -66
- 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 +1 -1
- package/dist/core/history/digest.js +1 -1
- package/dist/core/history/drift-cache.js +3 -3
- package/dist/core/history/drift-scan.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.js +2 -2
- package/dist/core/history/identity.js +1 -1
- package/dist/core/history/index.js +1 -1
- package/dist/core/history/operation-contract.js +1 -1
- package/dist/core/history/projection.js +1 -1
- package/dist/core/history/read.js +1 -1
- package/dist/core/history/replay.js +2 -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.d.ts +2 -0
- 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.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 +72 -72
- package/dist/sdk/completion/shared.js +1 -1
- package/dist/sdk/completion/zsh.js +75 -75
- 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.d.ts +26 -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 +1 -1
- 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.js +4 -4
- 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.js +1 -1
- package/dist/sdk/history/reanchor-refusal.js +1 -1
- package/dist/sdk/history/reseed.js +1 -1
- package/dist/sdk/history/salvage.js +5 -5
- package/dist/sdk/history/subject.js +1 -1
- package/dist/sdk/history-analytics.js +1 -1
- package/dist/sdk/history-compact.js +1 -1
- package/dist/sdk/history-mcp.js +1 -1
- package/dist/sdk/history-provenance.js +1 -1
- package/dist/sdk/history-read.js +1 -1
- package/dist/sdk/history-redact.js +1 -1
- package/dist/sdk/history-repair.js +1 -1
- package/dist/sdk/improvement-ledger-validation.js +1 -1
- package/dist/sdk/improvement-ledger.js +2 -2
- package/dist/sdk/index.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.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.js +9 -9
- 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.d.ts +11 -0
- 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 +2 -0
- package/dist/sdk/runtime-input.js +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 +5 -3
- package/dist/sdk/runtime.js +1 -1
- package/dist/sdk/scheduling-shortcuts.js +1 -1
- package/dist/sdk/schema/field-flag-spelling.d.ts +22 -0
- package/dist/sdk/schema/field-flag-spelling.js +2 -0
- 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.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 +1 -1
- package/dist/sdk/workspace-contracts-cache.js +1 -1
- package/dist/sdk/workspace-contracts.js +1 -1
- package/dist/sdk/workspace-memory.js +2 -2
- package/dist/sdk/workspace-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.js +1 -1
- package/docs/COMMANDS.md +1 -1
- package/docs/EXTENSIONS.md +2 -2
- package/docs/READ_OUTPUT_CONTRACTS.md +2 -0
- package/docs/SDK.md +94 -5
- package/docs/SDK_AUDITED_MUTATIONS.md +11 -0
- package/marketplace.json +1 -1
- package/package.json +2 -1
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/package.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/package.json +1 -1
- package/plugins/pm-codex/plugin.json +1 -1
- package/runtime-dependencies.json +1 -1
- package/scripts/finalize-build.mjs +63 -24
- package/scripts/prepare-build-cache.mjs +28 -1
- package/dist/cli-bundle/chunks/chunk-3W47ZZ5T.js +0 -9
- package/dist/cli-bundle/chunks/chunk-4TB5D6HL.js +0 -125
- package/dist/cli-bundle/chunks/chunk-5ZMVLWE3.js +0 -2
- package/dist/cli-bundle/chunks/chunk-6BBDEIKC.js +0 -33
- package/dist/cli-bundle/chunks/chunk-AR4NP5HI.js +0 -3
- package/dist/cli-bundle/chunks/chunk-B4PPFOPY.js +0 -3
- package/dist/cli-bundle/chunks/chunk-CAR2L5NW.js +0 -8
- package/dist/cli-bundle/chunks/chunk-DEZPZOQ7.js +0 -2
- package/dist/cli-bundle/chunks/chunk-EIGUKEV6.js +0 -2
- package/dist/cli-bundle/chunks/chunk-GTPCAJMZ.js +0 -8
- package/dist/cli-bundle/chunks/chunk-GYP24M7W.js +0 -2
- package/dist/cli-bundle/chunks/chunk-HC2OPETM.js +0 -2
- package/dist/cli-bundle/chunks/chunk-HKUV74K3.js +0 -2
- package/dist/cli-bundle/chunks/chunk-HXHYDO2R.js +0 -115
- package/dist/cli-bundle/chunks/chunk-IB7UB5TE.js +0 -2
- package/dist/cli-bundle/chunks/chunk-J2LABXBL.js +0 -2
- package/dist/cli-bundle/chunks/chunk-J52BEBSS.js +0 -2
- package/dist/cli-bundle/chunks/chunk-KQIZ34SF.js +0 -3
- package/dist/cli-bundle/chunks/chunk-LQBWLNZJ.js +0 -3
- package/dist/cli-bundle/chunks/chunk-OJTMGDON.js +0 -31
- package/dist/cli-bundle/chunks/chunk-SPPHDVZE.js +0 -2
- package/dist/cli-bundle/chunks/chunk-TC6XLIYO.js +0 -2
- package/dist/cli-bundle/chunks/chunk-U7EL3AYA.js +0 -3
- package/dist/cli-bundle/chunks/chunk-VQFWW4EF.js +0 -6
- package/dist/cli-bundle/chunks/chunk-X6MIWTTT.js +0 -2
- package/dist/cli-bundle/chunks/chunk-XC5Q2ZV7.js +0 -2
- package/dist/cli-bundle/chunks/chunk-XFHPKXAE.js +0 -71
- package/dist/cli-bundle/chunks/chunk-YHVLVSEZ.js +0 -9
- 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-revision-4QBMZXKX.js +0 -2
- package/dist/cli-bundle/chunks/item-transaction-QY3PUHEI.js +0 -2
- package/dist/cli-bundle/chunks/mutation-actor-FWLYWJ37.js +0 -2
- package/dist/cli-bundle/chunks/mutation-admission-7ZDCK3G2.js +0 -2
- package/dist/cli-bundle/chunks/register-mutation-57AJQWFV.js +0 -21
- package/dist/cli-bundle/chunks/register-operations-RKWST7CU.js +0 -2
- package/dist/cli-bundle/chunks/register-setup-CMI23PC5.js +0 -2
- package/dist/cli-bundle/chunks/settlement-hook-BXN5LEQD.js +0 -7
- package/dist/cli-bundle/chunks/stage-4KDVXC5Z.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2ZD7275J.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-324AHXJO.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-3XSWH6QC.js +0 -91
- package/dist/cli-bundle/focused-chunks/chunk-4JZITIJB.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-4KTFKSS3.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-5C5TK3ET.js +0 -78
- package/dist/cli-bundle/focused-chunks/chunk-AKJYOZZP.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-BRZV7BFV.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-EGN2HFRU.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-GHQVM6K6.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-HDEKFSOK.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-I5LGPUWH.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-IWOXAUDU.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-ML3JHCC6.js +0 -6
- package/dist/cli-bundle/focused-chunks/chunk-OPGOOP25.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-RE7ZWT7D.js +0 -27
- package/dist/cli-bundle/focused-chunks/chunk-RKQNVYGF.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-RQ252B6V.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-SVOOGGAK.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-URGHTTT3.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-USPYKWQG.js +0 -13
- package/dist/cli-bundle/focused-chunks/chunk-UWS3FC4D.js +0 -102
- package/dist/cli-bundle/focused-chunks/chunk-UXQGFGAT.js +0 -44
- package/dist/cli-bundle/focused-chunks/chunk-WZWXGDYY.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-YKSLZPLT.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZWJTY4ID.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-GLACUTPL.js +0 -2
- package/dist/cli-bundle/focused-chunks/mutation-actor-TCYDPUGG.js +0 -2
- package/dist/cli-bundle/focused-chunks/mutation-admission-LY73EJWM.js +0 -2
- package/dist/cli-bundle/focused-chunks/settlement-hook-ARYCZQY4.js +0 -7
- package/dist/cli-bundle/focused-chunks/stage-DQ7RQQ52.js +0 -2
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import{f as $,i as h,j as le,k as ce,l as de,o as g,p as pe,q as me,r as fe}from"./chunk-ML3JHCC6.js";import{_ as ye,a as ee,b as te}from"./chunk-RKQNVYGF.js";import{c as y,f as se,g as ie,i as ae}from"./chunk-RE7ZWT7D.js";import{B as ne,F as oe,fb as re}from"./chunk-ZWJTY4ID.js";import{$a as C,F as J,J as Q,K as E,Ob as Z,Pb as L,Qb as D,Rb as x,cc as k,fa as I,g as H,gc as ue}from"./chunk-UWS3FC4D.js";import{A as m,a as U,e as V,f as X,g as G,i as Y,z as p}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]="d449d43b-5192-58dc-bdc0-0ec5e8922353")}catch{}})();var Pt=U,qt=V,jt=Y,zt=X,Kt=G;function he(e,t,n,r){let o=e.flag.slice(2).replace(/[-_]([a-z])/gu,(i,a)=>a.toUpperCase()),s=n.has(o);return{long:t,...r?{short:r}:{},description:e.description??`Standard pm ${e.flag} option.`,...e.required===!0?{required:!0}:{},...e.list===!0?{list:!0}:{},...e.repeatable===!0?{repeatable:!0}:{},value_type:s?"string":"boolean",...s?{value_name:e.value_name??"value"}:{}}}function ge(e,t=[]){let n=new Set(t.flatMap(o=>o.keys)),r=[];for(let o of ne(e.map(s=>({...s})))){r.push(he(o,o.flag,n,o.short));for(let s of o.aliases??[])r.push(he(o,s,n))}return r}var Wt=ge(oe,ee),Bt=ge(re,te);(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]="59d16a38-d6df-5695-96e3-28b6e384f76b")}catch{}})();var b=["agile","ops","research"],R={agile:{name:"agile",title:"Agile delivery",summary:"Story/Spike delivery with a review stage, story points, and acceptance ownership.",types:$.agile,statuses:[{id:"review",roles:["active"],aliases:["in-review"],description:"Work is implementation-complete and awaiting peer review."}],fields:[{key:"story_points",type:"number",commands:["create","update","list"],description:"Relative estimation size for a story or spike.",aliases:["points"]},{key:"acceptance_owner",type:"string",commands:["create","update","list"],description:"Stakeholder accountable for accepting the delivered story.",aliases:["acceptor"]}],workflows:[{type:"Story",allowed_transitions:[["open","in_progress"],["in_progress","review"],["review","in_progress"],["review","closed"],["in_progress","blocked"],["blocked","in_progress"]]}],config:[{key:"search_provider",value:"bm25",summary:"Offline BM25 lexical search works without an embedding service."},{key:"search_max_results",value:"20",summary:"Sprint-sized result cap for quick triage."}],templates:[{name:"story",options:{type:"Story",priority:"2",tags:"story",acceptanceCriteria:"Story delivers the stated user outcome with tests and docs updated.",body:`## As a
|
|
2
|
-
|
|
3
|
-
## I want
|
|
4
|
-
|
|
5
|
-
## So that
|
|
6
|
-
|
|
7
|
-
## Acceptance
|
|
8
|
-
- [ ]
|
|
9
|
-
`}}],packages:[{spec:"templates",reason:"Reusable create templates for recurring story shapes."},{spec:"calendar",reason:"Sprint and iteration scheduling views."},{spec:"search-advanced",reason:"Richer retrieval as the backlog grows."}]},ops:{name:"ops",title:"Operations",summary:"Incident/Runbook response with mitigation and monitoring stages, severity, and service fields.",types:$.ops,statuses:[{id:"mitigating",roles:["active"],aliases:["mitigation"],description:"Active mitigation is underway to restore service."},{id:"monitoring",roles:["active"],aliases:["observing"],description:"Mitigation applied; monitoring for recurrence before closure."}],fields:[{key:"severity",type:"string",commands:["create","update","list"],description:"Incident severity classification (e.g. sev1, sev2, sev3).",aliases:["sev"]},{key:"service",type:"string",commands:["create","update","list"],description:"Primary affected service or component."}],workflows:[{type:"Incident",allowed_transitions:[["open","mitigating"],["mitigating","monitoring"],["monitoring","mitigating"],["monitoring","closed"],["mitigating","blocked"],["blocked","mitigating"]]}],config:[{key:"search_provider",value:"bm25",summary:"Offline BM25 lexical search for fast incident lookup."},{key:"search_max_results",value:"25",summary:"Wider result cap to surface related incidents and runbooks."}],templates:[{name:"incident",options:{type:"Incident",priority:"1",tags:"incident",acceptanceCriteria:"Service restored, root cause documented, and follow-ups filed.",body:`## Impact
|
|
10
|
-
|
|
11
|
-
## Timeline
|
|
12
|
-
|
|
13
|
-
## Root cause
|
|
14
|
-
|
|
15
|
-
## Mitigation
|
|
16
|
-
|
|
17
|
-
## Follow-ups
|
|
18
|
-
`}}],packages:[{spec:"lifecycle-hooks",reason:"Automate transitions and notifications on incident state changes."},{spec:"governance-audit",reason:"Audit incident metadata completeness and closure quality."},{spec:"calendar",reason:"On-call and follow-up scheduling."}]},research:{name:"research",title:"Research",summary:"Experiment/Hypothesis investigation with an analysis stage, hypothesis, and method fields.",types:$.research,statuses:[{id:"analyzing",roles:["active"],aliases:["analysis"],description:"Data collected; analysis and synthesis in progress."}],fields:[{key:"hypothesis",type:"string",commands:["create","update"],description:"The testable claim the experiment evaluates."},{key:"method",type:"string",commands:["create","update","list"],description:"Experimental method or protocol used to evaluate the hypothesis.",aliases:["protocol"]}],workflows:[{type:"Experiment",allowed_transitions:[["open","in_progress"],["in_progress","analyzing"],["analyzing","in_progress"],["analyzing","closed"],["in_progress","blocked"],["blocked","in_progress"]]}],config:[{key:"search_provider",value:"bm25",summary:"Offline BM25 lexical search across the research corpus."},{key:"search_max_results",value:"50",summary:"Broader recall cap for literature and prior-experiment discovery."}],templates:[{name:"experiment",options:{type:"Experiment",priority:"2",tags:"experiment",acceptanceCriteria:"Hypothesis is supported, rejected, or refined with recorded evidence.",body:`## Hypothesis
|
|
19
|
-
|
|
20
|
-
## Method
|
|
21
|
-
|
|
22
|
-
## Results
|
|
23
|
-
|
|
24
|
-
## Conclusion
|
|
25
|
-
`}}],packages:[{spec:"search-advanced",reason:"Semantic retrieval over experiments and findings."},{spec:"templates",reason:"Consistent experiment and hypothesis scaffolds."},{spec:"beads",reason:"Import structured prior work into the tracker."}]}};function Me(e){if(e===void 0)return;let t=f(e);if(t.length===0)throw new Error("Profile name must not be empty.");if(b.includes(t))return t;throw new Error(`Invalid profile "${e}". Allowed: ${b.join(", ")}.`)}function Xt(e){let t=Me(e);if(t===void 0)throw new Error(`Profile name is required. Allowed: ${b.join(", ")}.`);return R[t]}function Gt(){return b.map(e=>R[e])}function f(e){return e.trim().toLowerCase().replaceAll("-","_")}function _e(e){return e.map(t=>t.definition.name).join(", ")}function Pe(e=[]){let t=b.map(s=>({definition:R[s],source:"builtin"})),n=new Set(b.map(s=>f(s))),r=new Set(n),o=[];for(let s of e){let i=f(s.profile.name);if(n.has(i)){o.push(`Extension "${s.name}" profile "${s.profile.name}" uses a name reserved by a built-in archetype and was ignored.`);continue}if(r.has(i)){o.push(`Profile "${s.profile.name}" from extension "${s.name}" duplicates an already-registered profile and was ignored.`);continue}r.add(i),t.push({definition:s.profile,source:"extension",package:s.name})}return{profiles:t,warnings:o}}function Yt(e,t=[]){let{profiles:n,warnings:r}=Pe(t);if(typeof e!="string"||e.trim().length===0)throw new Error(`Profile name is required. Allowed: ${_e(n)}.`);let o=f(e),s=n.find(i=>f(i.definition.name)===o);if(s===void 0)throw new Error(`Invalid profile "${e}". Allowed: ${_e(n)}.`);return{resolved:s,warnings:r}}(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]="ab26bcb3-fb2a-5f2f-96e7-7965787b924e")}catch{}})();function qe(e){return{types:e.types.length,statuses:e.statuses.length,fields:e.fields.length,workflows:e.workflows.length,config:e.config.length,templates:e.templates.length,packages:e.packages.length}}function en(e){return{name:e.name,title:e.title,summary:e.summary,composition:qe(e),types:e.types.map(t=>F(()=>y(t).name,()=>String(t.name??""))),statuses:e.statuses.map(t=>F(()=>g(t).id,()=>String(t.id??""))),fields:e.fields.map(t=>F(()=>h(t).key,()=>String(t.key??""))),workflows:e.workflows.map(t=>t.type),config:e.config.map(t=>`${t.key}=${t.value}`),templates:e.templates.map(t=>t.name),packages:e.packages.map(t=>({spec:t.spec,reason:t.reason}))}}function F(e,t){try{return e()}catch{return 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]="42c9df66-4303-5d06-b931-0a276894e5e5")}catch{}})();var je=[{key:"context_default_depth",path:"context.default_depth",kind:"string",choices:J,summary:"Default context depth."},{key:"context_activity_limit",path:"context.activity_limit",kind:"integer",min:1,max:Number.MAX_SAFE_INTEGER,decimal_only:!0,summary:"Default context activity row limit; positive decimal integer."},{key:"context_stale_threshold_days",path:"context.stale_threshold_days",kind:"integer",min:1,max:Number.MAX_SAFE_INTEGER,decimal_only:!0,summary:"Days before context marks an item stale; positive decimal integer."},...["hierarchy","activity","progress","recently_created","unparented","blockers","files","workload","staleness","tests"].map(e=>({key:`context_sections_${e}`,path:`context.sections.${e}`,kind:"boolean",summary:`Include ${e} in default context output.`})),{key:"context_next_ranking_policy",path:"context.next_ranking_policy",kind:"string",choices:["priority_floor","weighted"],summary:"Ready-queue order for pm next with the built-in scorer: priority_floor (resume in-progress work, then priority tiers, relevance within a tier) or weighted (blended relevance order). An extension context_relevance scorer keeps its own order."},{key:"search_provider",path:"search.provider",kind:"string",summary:"Search embedding provider name (e.g. openai, ollama, or an extension provider)."},{key:"search_default_mode",path:"search.default_mode",kind:"string",choices:["auto","keyword","semantic","hybrid"],summary:"Mode a bare pm search runs in: auto (hybrid when semantic search is explicitly configured and runnable, else keyword), or a pinned keyword, semantic, or hybrid."},{key:"search_mutation_refresh_policy",path:"search.mutation_refresh_policy",kind:"string",choices:["cache_only","semantic_configured","semantic_auto"],summary:"Mutation-time search refresh policy: cache_only, semantic_configured, or semantic_auto."},{key:"search_query_expansion_enabled",path:"search.query_expansion.enabled",kind:"boolean",summary:"Enable or disable query expansion for semantic/hybrid search."},{key:"search_query_expansion_provider",path:"search.query_expansion.provider",kind:"string",summary:"Query expansion provider name (built-in openai/ollama or extension provider)."},{key:"search_rerank_enabled",path:"search.rerank.enabled",kind:"boolean",summary:"Enable or disable post-retrieval reranking for hybrid search."},{key:"search_rerank_model",path:"search.rerank.model",kind:"string",summary:"Rerank model name override used by built-in providers."},{key:"search_rerank_top_k",path:"search.rerank.top_k",kind:"integer",min:1,summary:"Number of top hybrid candidates to rerank when rerank is enabled."},{key:"search_embedding_model",path:"search.embedding_model",kind:"string",summary:"Default embedding model name (overrides provider-specific model when set)."},{key:"search_embedding_corpus_max_characters",path:"search.embedding_corpus_max_characters",kind:"integer",min:1,summary:"Maximum semantic corpus characters per item before truncation."},{key:"search_embedding_batch_size",path:"search.embedding_batch_size",kind:"integer",min:1,summary:"Number of items embedded per request batch."},{key:"search_embedding_timeout_ms",path:"search.embedding_timeout_ms",kind:"integer",min:1,summary:"Per-request embedding timeout in milliseconds."},{key:"search_score_threshold",path:"search.score_threshold",kind:"number",summary:"Minimum score for a hit to be returned (0 keeps all matches)."},{key:"search_hybrid_semantic_weight",path:"search.hybrid_semantic_weight",kind:"ratio",summary:"Hybrid mode semantic weight in [0, 1] (1-weight goes to keyword)."},{key:"search_max_results",path:"search.max_results",kind:"integer",min:1,summary:"Default upper bound on search hits when --limit is not supplied."},{key:"search_bm25_k1",path:"search.bm25.k1",kind:"number",min:0,summary:"Offline BM25 term-frequency saturation (k1); higher saturates repeated terms slower (default 1.2)."},{key:"search_bm25_b",path:"search.bm25.b",kind:"ratio",summary:"Offline BM25 document-length normalization (b) in [0, 1]; 0 disables, 1 fully normalizes (default 0.75)."},{key:"openai_base_url",path:"providers.openai.base_url",kind:"string",summary:"OpenAI-compatible API base URL (LM Studio/vLLM also use this)."},{key:"openai_api_key",path:"providers.openai.api_key",kind:"string",summary:"OpenAI-compatible API key."},{key:"openai_model",path:"providers.openai.model",kind:"string",summary:"OpenAI-compatible embedding model name."},{key:"ollama_base_url",path:"providers.ollama.base_url",kind:"string",summary:"Ollama API base URL (typically http://localhost:11434)."},{key:"ollama_model",path:"providers.ollama.model",kind:"string",summary:"Ollama embedding model name (e.g. nomic-embed-text)."},{key:"vector_store_adapter",path:"vector_store.adapter",kind:"string",summary:"Vector store adapter name (lancedb, qdrant, or an extension adapter)."},{key:"vector_store_collection_name",path:"vector_store.collection_name",kind:"string",non_empty:!0,summary:"Vector collection/table name shared by Qdrant and LanceDB adapters."},{key:"qdrant_url",path:"vector_store.qdrant.url",kind:"string",summary:"Qdrant HTTP API URL."},{key:"qdrant_api_key",path:"vector_store.qdrant.api_key",kind:"string",summary:"Qdrant API key (empty if running unauthenticated)."},{key:"lancedb_path",path:"vector_store.lancedb.path",kind:"string",summary:"LanceDB storage path (relative to pm root or absolute)."},{key:"id_prefix",path:"id_prefix",kind:"string",non_empty:!0,summary:'Prefix for generated item IDs (e.g. "pm" produces pm-xxxx).'},{key:"author_default",path:"author_default",kind:"string",non_empty:!0,summary:"Default author recorded on mutations when --author is not supplied."},{key:"agent_identity_probes_enabled",path:"agent_identity.probes_enabled",kind:"boolean",summary:"Allow privacy-bounded local harness provenance probes; no network or subprocess access is permitted."},{key:"mutation_guard_require_attributed_author",path:"mutation_guard.require_attributed_author",kind:"boolean",summary:"Reject mutations whose effective author resolves to unknown."},{key:"mutation_guard_secret_guard",path:"mutation_guard.secret_guard",kind:"string",choices:["off","advise","block"],summary:"Detect credential-shaped mutation content: off, advise, or block."},{key:"mutation_guard_stale_in_progress_hours",path:"mutation_guard.stale_in_progress_hours",kind:"integer",min:1,summary:"Age threshold for unclaimed in-progress work surfaced by health."},{key:"governance_duplicate_detection_mode",path:"governance.duplicate_detection_mode",kind:"string",choices:["off","advisory","strict"],summary:"Create/copy duplicate governance: off, advisory, or strict explicit-bypass enforcement."},{key:"governance_duplicate_detection_threshold",path:"governance.duplicate_detection_threshold",kind:"ratio",summary:"Minimum shared similarity score in [0, 1] for create/copy duplicate governance."},{key:"governance_duplicate_detection_limit",path:"governance.duplicate_detection_limit",kind:"integer",min:0,max:20,summary:"Maximum likely duplicates returned by create/copy governance (0-20)."},{key:"output_default_format",path:"output.default_format",kind:"string",choices:["toon","json"],summary:"Default output format for commands that support it: toon or json."},{key:"ux_deprecation_hints",path:"ux.deprecation_hints",kind:"boolean",summary:"Emit one stderr migration hint for deprecated command aliases."},{key:"locks_ttl_seconds",path:"locks.ttl_seconds",kind:"integer",min:1,summary:"Claim/lock time-to-live in seconds before a stale lock can be reclaimed."},{key:"locks_wait_ms",path:"locks.wait_ms",kind:"integer",min:0,summary:"Wait budget in milliseconds before a contended lock fails with lock_conflict; item-store mutations, restore and the hierarchy lock treat it as a no-progress window that each observed owner handoff restarts (120 s total cap), other locks as a fixed total; 0 fails fast. PM_LOCK_WAIT_MS overrides per invocation."},{key:"ids_token_length",path:"ids.token_length",kind:"integer",min:4,max:12,summary:"Random base36 token length for newly minted item ids (4-12, default 4). Raise it to shrink cross-branch id collision odds in concurrent multi-agent workflows (pm-pibw)."},{key:"checkpoints_retention_days",path:"checkpoints.retention_days",kind:"integer",min:1,summary:"Age in days above which pm gc --scope checkpoints prunes bulk-mutation rollback checkpoints."},{key:"schema_unknown_field_policy",path:"schema.unknown_field_policy",kind:"string",choices:["allow","warn","reject"],summary:"How item I/O handles metadata keys not in the field registry: allow, warn, or reject."},{key:"history_compact_policy_enabled",path:"history.compact_policy.enabled",kind:"boolean",summary:"Enable the history-compaction advisory: pm health warns on over-threshold streams."},{key:"history_compact_policy_max_entries",path:"history.compact_policy.max_entries",kind:"integer",min:1,summary:"Entry count above which a history stream is flagged (and the default pm history-compact --all-over threshold)."},{key:"history_compact_policy_trigger",path:"history.compact_policy.trigger",kind:"string",choices:["health_warn","auto"],summary:"History-compaction policy intent: health_warn (advisory only) or auto (scheduled sweeps expected)."}],ze=new Map(je.flatMap(e=>[[e.key,e],[e.path.toLowerCase().replaceAll("-","_"),e]]));function A(e){if(typeof e!="string")return;let t=e.trim().toLowerCase().replaceAll("-","_");if(t.length!==0)return ze.get(t)}function Ke(e,t){let n=t.trim().toLowerCase();return n==="true"||n==="1"||n==="yes"||n==="on"?{ok:!0,parsed:{descriptor:e,value:!0}}:n==="false"||n==="0"||n==="no"||n==="off"?{ok:!0,parsed:{descriptor:e,value:!1}}:{ok:!1,error:{message:`Config set ${e.key} requires a boolean value (true|false), got "${t}"`}}}function We(e,t,n){return e.key==="context_default_depth"&&(n=n.toLowerCase()),e.non_empty===!0&&n.length===0?{ok:!1,error:{message:`Config set ${e.key} requires a non-empty value`}}:e.choices&&!e.choices.includes(n)?{ok:!1,error:{message:`Config set ${e.key} must be one of ${e.choices.join("|")}, got "${t}"`}}:{ok:!0,parsed:{descriptor:e,value:n}}}function ke(e,t){let n=[e.min===void 0?"":`minimum ${e.min}`,e.max===void 0?"":`maximum ${e.max}`].filter(Boolean).join(", ");return{message:`Config set ${e.key} requires non-empty decimal integer digits${n?` (${n})`:""}, got "${t}"`}}function Be(e,t,n){if(e.decimal_only&&!/^\d+$/u.test(n))return{ok:!1,error:ke(e,t)};if(n.length===0)return{ok:!1,error:{message:`Config set ${e.key} requires a non-empty value`}};let r=Number(n);return Number.isFinite(r)?{ok:!0,value:r}:{ok:!1,error:e.decimal_only?ke(e,t):{message:`Config set ${e.key} requires a finite number, got "${t}"`}}}function Ue(e,t,n){return!Number.isInteger(n)||n<0?{ok:!1,error:{message:`Config set ${e.key} requires a non-negative integer, got "${t}"`}}:e.min!==void 0&&n<e.min?{ok:!1,error:{message:`Config set ${e.key} requires an integer >= ${e.min}, got "${t}" (the runtime silently ignores 0 here and falls back to the default)`}}:e.max!==void 0&&n>e.max?{ok:!1,error:{message:`Config set ${e.key} requires an integer <= ${e.max}, got "${t}"`}}:{ok:!0,parsed:{descriptor:e,value:n}}}function Ve(e,t,n){return n<0||n>1?{ok:!1,error:{message:`Config set ${e.key} requires a number in [0, 1], got "${t}"`}}:{ok:!0,parsed:{descriptor:e,value:n}}}function Xe(e,t,n){return e.min!==void 0&&n<e.min?{ok:!1,error:{message:`Config set ${e.key} requires a number >= ${e.min}, got "${t}"`}}:{ok:!0,parsed:{descriptor:e,value:n}}}function T(e,t){if(typeof t!="string")return{ok:!1,error:{message:`Config set ${e.key} requires a string value`}};let n=t.trim();if(e.kind==="boolean")return Ke(e,t);if(e.kind==="string")return We(e,t,n);let r=Be(e,t,n);return r.ok?e.kind==="integer"?Ue(e,t,r.value):e.kind==="ratio"?Ve(e,t,r.value):Xe(e,t,r.value):{ok:!1,error:r.error}}function be(e,t){let n=t.path.split("."),r=e;for(let o of n){if(typeof r!="object"||r===null)return null;let s=Object.getOwnPropertyDescriptor(r,o);if(!s||!Object.hasOwn(s,"value"))return null;r=s.value}return typeof r=="string"||typeof r=="number"||typeof r=="boolean"?r:null}function on(e,t,n){let r=t.path.split(".");if(r.some(i=>i.length===0||["__proto__","constructor","prototype"].includes(i)))throw new Error("Unsafe settings path");let o=e;for(let i=0;i<r.length-1;i+=1){let a=r[i],c=Object.getOwnPropertyDescriptor(o,a)?.value;if(typeof c!="object"||c===null||Array.isArray(c)){let d={};Object.defineProperty(o,a,{value:d,writable:!0,enumerable:!0,configurable:!0}),o=d}else o=c}let s=r[r.length-1];return Object.getOwnPropertyDescriptor(o,s)?.value===n?!1:(Object.defineProperty(o,s,{value:n,writable:!0,enumerable:!0,configurable:!0}),!0)}(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]="0b04624c-2096-55dc-9dde-b8c76ead72d6")}catch{}})();var hn=["profile","types","statuses","fields","workflows","config","templates","packages"],gn=["profile_name_empty","profile_name_not_normalized","profile_title_empty","profile_summary_empty","type_invalid","type_duplicate","status_invalid","status_duplicate","field_invalid","field_duplicate","field_mcp_input_collision","workflow_type_empty","workflow_type_unknown","workflow_duplicate_type","workflow_transition_malformed","workflow_status_unknown","config_key_unknown","config_value_invalid","config_duplicate","template_type_unknown","package_spec_empty"],Ge=new Set(ue.flatMap(e=>[k(e.id),...(e.aliases??[]).map(t=>k(t))]).filter(e=>e.length>0)),we=new Set(H.map(e=>e.toLowerCase()));function Ye(e,t){e.name.trim().length===0?t.push({severity:"error",code:"profile_name_empty",dimension:"profile",message:"Profile name must not be empty; profile resolution requires a non-blank name."}):e.name!==f(e.name)&&t.push({severity:"warning",code:"profile_name_not_normalized",dimension:"profile",target:e.name,message:`Profile name "${e.name}" is not in canonical form; resolution folds it to "${f(e.name)}" (lowercase, hyphens as underscores).`}),e.title.trim().length===0&&t.push({severity:"warning",code:"profile_title_empty",dimension:"profile",message:"Profile title is empty; list and show surfaces will render a blank title."}),e.summary.trim().length===0&&t.push({severity:"warning",code:"profile_summary_empty",dimension:"profile",message:"Profile summary is empty; list and show surfaces will render a blank archetype description."})}function He(e,t){let n=new Set,r=new Set;for(let[o,s]of e.types.entries()){let i;try{i=y(s).name}catch(c){t.push({severity:"error",code:"type_invalid",dimension:"types",target:typeof s.name=="string"?s.name:`#${o}`,message:I(c)});continue}let a=i.toLowerCase();if(r.has(a)){t.push({severity:"error",code:"type_duplicate",dimension:"types",target:i,message:`Item type "${i}" is declared more than once; the later definition silently overwrites the earlier upsert.`});continue}r.add(a),n.add(a)}return n}function Je(e,t){let n=new Set,r=new Set;for(let[o,s]of e.statuses.entries()){let i;try{i=g(s)}catch(a){t.push({severity:"error",code:"status_invalid",dimension:"statuses",target:typeof s.id=="string"?s.id:`#${o}`,message:I(a)});continue}if(r.has(i.id)){t.push({severity:"error",code:"status_duplicate",dimension:"statuses",target:i.id,message:`Status "${i.id}" is declared more than once; the later definition silently overwrites the earlier upsert.`});continue}r.add(i.id),n.add(i.id);for(let a of i.aliases??[])n.add(k(a))}return n}function Qe(e,t){let n=new Set;for(let[r,o]of e.fields.entries()){let s;try{s=h(o).key}catch(a){t.push({severity:"error",code:"field_invalid",dimension:"fields",target:typeof o.key=="string"?o.key:`#${r}`,message:I(a)});continue}if(n.has(s)){t.push({severity:"error",code:"field_duplicate",dimension:"fields",target:s,message:`Field "${s}" is declared more than once; the later definition silently overwrites the earlier upsert.`});continue}n.add(s);let i=ye(s);i&&t.push({severity:"warning",code:"field_mcp_input_collision",dimension:"fields",target:s,message:`Field "${s}" collides with canonical MCP property "${i.property}" owned by ${i.owner}; callers must pass the custom value through ${i.nested_path}.`})}}function Ze(e,t,n,r){let o=new Set;for(let[s,i]of e.workflows.entries()){let a=i.type.trim().toLowerCase();if(a.length===0){r.push({severity:"error",code:"workflow_type_empty",dimension:"workflows",target:`#${s}`,message:"Workflow has an empty type; the workflow resolver drops entries without a type."});continue}let c=o.has(a);o.add(a),c?r.push({severity:"warning",code:"workflow_duplicate_type",dimension:"workflows",target:i.type,message:`Workflow type "${i.type}" is declared more than once; the later transition set wins.`}):!we.has(a)&&!t.has(a)&&r.push({severity:"warning",code:"workflow_type_unknown",dimension:"workflows",target:i.type,message:`Workflow governs type "${i.type}" which is neither a built-in type nor declared by this profile; it has no effect unless that type already exists.`});let d=new Set;for(let l of i.allowed_transitions){let u=k(l[0]),B=k(l[1]);if(u.length===0||B.length===0){r.push({severity:"error",code:"workflow_transition_malformed",dimension:"workflows",target:i.type,message:`Workflow "${i.type}" has a transition with an empty status; the workflow resolver silently drops it.`});continue}for(let _ of[u,B])Ge.has(_)||n.has(_)||d.has(_)||(d.add(_),r.push({severity:"warning",code:"workflow_status_unknown",dimension:"workflows",target:_,message:`Workflow "${i.type}" references status "${_}" which is neither a built-in status nor declared by this profile; transitions to or from it are unreachable.`}))}}}function et(e,t){let n=new Set;for(let r of e.config){let o=A(r.key);if(o===void 0){t.push({severity:"error",code:"config_key_unknown",dimension:"config",target:r.key,message:`Config knob "${r.key}" is not a recognized setting; apply rejects it with a usage error.`});continue}n.has(o.key)?t.push({severity:"error",code:"config_duplicate",dimension:"config",target:o.key,message:`Config knob "${o.key}" is set more than once; the later value silently overwrites the earlier one.`}):n.add(o.key);let s=T(o,r.value);s.ok||t.push({severity:"error",code:"config_value_invalid",dimension:"config",target:r.key,message:s.error.message})}}function tt(e,t,n){for(let r of e.templates){let o=r.options.type;if(typeof o!="string"||o.trim().length===0)continue;let s=o.trim().toLowerCase();!we.has(s)&&!t.has(s)&&n.push({severity:"warning",code:"template_type_unknown",dimension:"templates",target:r.name,message:`Template "${r.name}" creates type "${o}" which is neither a built-in type nor declared by this profile.`})}}function nt(e,t){for(let[n,r]of e.packages.entries())r.spec.trim().length===0&&t.push({severity:"warning",code:"package_spec_empty",dimension:"packages",target:`#${n}`,message:"Package recommendation has an empty spec; it cannot be surfaced as an install hint."})}function _n(e){let t=[];Ye(e,t);let n=He(e,t),r=Je(e,t);Qe(e,t),Ze(e,n,r,t),et(e,t),tt(e,n,t),nt(e,t);let o=t.filter(i=>i.severity==="error").length,s=t.length-o;return{profile:e.name,ok:o===0,findings:t,errorCount:o,warningCount:s}}(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]="be2b507d-2797-570c-b211-46d950edcbde")}catch{}})();function M(e,t,n,r,o){let s=e,i=[];for(let a of t){let c=r(s),d=o(s,a),l=r(d.file);s=d.file;let u=c===l?"unchanged":d.replaced?"update":"add";i.push({key:n(a),status:u})}return{file:s,changes:i,changed:i.some(a=>a.status!=="unchanged")}}function ve(e){return JSON.stringify(e.map(t=>t.join("\0")).sort())}function ot(e,t){let n=e.map(o=>({...o})),r=[];for(let o of t){let s=n.findIndex(a=>a.type===o.type),i={type:o.type,allowed_transitions:o.allowed_transitions};s<0?(n.push(i),r.push({type:o.type,status:"add"})):ve(n[s].allowed_transitions)===ve(o.allowed_transitions)?r.push({type:o.type,status:"unchanged"}):(n[s]=i,r.push({type:o.type,status:"update"}))}return{changes:r,result:n,changed:r.some(o=>o.status!=="unchanged")}}function rt(e,t){let n=[];for(let r of e.config){let o=A(r.key);if(o===void 0)throw new Error(`Profile "${e.name}" references unknown config key "${r.key}".`);let s=T(o,r.value);if(!s.ok)throw new Error(`Profile "${e.name}" config ${r.key}: ${s.error.message}`);let i=be(t,o),a=i===null?"add":i===s.parsed.value?"unchanged":"update";n.push({key:o.key,path:o.path,value:s.parsed.value,status:a})}return{changes:n,changed:n.some(r=>r.status!=="unchanged")}}function Se(e){let t=Object.entries(e).sort(([n],[r])=>n.localeCompare(r));return JSON.stringify(t)}function st(e,t){let n=[];for(let r of e.templates){let o=t.get(r.name),s;o===void 0?s="add":Se(o)===Se(r.options)?s="unchanged":s="update",n.push({name:r.name,options:r.options,status:s})}return{changes:n,changed:n.some(r=>r.status!=="unchanged")}}function On(e,t){let n=M(se(t.typesRaw),e.types,l=>y(l).name,ae,(l,u)=>ie(l,y(u))),r=M(pe(t.statusesRaw),e.statuses,l=>g(l).id,me,(l,u)=>fe(l,g(u))),o=M(le(t.fieldsRaw),e.fields,l=>h(l).key,ce,(l,u)=>de(l,h(u))),s=ot(t.workflows,e.workflows),i=rt(e,t.settings),a=st(e,t.templates),c=e.packages.map(l=>({spec:l.spec,reason:l.reason,status:t.installedPackages.has(l.spec)?"installed":"recommended"})),d=n.changed||r.changed||o.changed||s.changed||i.changed||a.changed;return{profile:{name:e.name,title:e.title,summary:e.summary},types:n,statuses:r,fields:o,workflows:s,config:i,templates:a,packages:c,changed:d}}import{isDeepStrictEqual as it}from"node:util";(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]="ab4e2ed3-e7e8-5a7a-a13e-7b8dce750dc4")}catch{}})();var at=new Set(["__proto__","prototype","constructor"]),$e=Symbol("looseOptionOccurrences");function w(e){return e.trim().toLowerCase().replaceAll(/-([a-z0-9])/g,(t,n)=>n.toUpperCase())}function P(e){return at.has(e)}function Ae(e){let t=(typeof e.value_type=="string"?e.value_type:void 0)??(typeof e.type=="string"?e.type:void 0);return Z(t)}function Te(e){let t=[],n=E(e.long)??"",r=typeof e.short=="string"?e.short.trim():"";if(n.startsWith("--")){let o=w(n.slice(2));o.length>0&&!P(o)&&t.push(o)}if(r.startsWith("-")&&!r.startsWith("--")){let o=w(r.slice(1));o.length>0&&!P(o)&&t.push(o)}return[...new Set(t)]}function S(e){let t=E(e.long)??"";if(t.startsWith("--")){let n=w(t.slice(2));if(n.length>0&&!P(n))return n}return Te(e)[0]??null}function O(e){let t=E(e.long)??"";if(t.startsWith("--")&&t.length>2)return t;let n=typeof e.short=="string"?e.short.trim():"";return n.startsWith("-")&&!n.startsWith("--")&&n.length>1?n:null}function lt(e,t){return[...(t.definitions??e).map(n=>O(n)).filter(n=>n!==null),...t.inheritedFlags??[]]}function ct(e,t,n,r){let o=r.length>0?` Expected one of: ${[...new Set(r)].join(", ")}.`:"";throw new m(`Unknown option '${e}' for extension command '${n}'.${o}`,p.USAGE,{code:"unknown_option",flag:t,required:`Use a flag the command accepts; run pm contracts --command ${n} --flags-only --json to list them.`})}function dt(e,t){throw new m(`Option '${e}' is disabled for extension command '${t}'.`,p.USAGE,{code:"extension_option_disabled",flag:e,required:`Remove ${e}; the command declares it with enabled: false.`,why:"A disabled declaration keeps the flag in the contract while refusing every value for it.",examples:[`pm ${t} --help`],nextSteps:[`Run pm contracts --command ${t} --flags-only --json to list the flags this command accepts.`]})}function ut(e,t,n,r){let o=L(e),s=o.value_arity==="none"?n:o.value_arity==="optional"?`${n} [${o.value_name}]`:`${n} <${o.value_name}>`;throw new m(`Missing required option '${n}' for extension command '${r}'.`,p.USAGE,{code:"missing_required_option",flag:n,field:t,required:`Pass ${s}.`,why:"The command declares this flag as required, so pm refuses the invocation before the extension handler runs.",examples:[`pm ${r} ${s}`],nextSteps:[`Run pm contracts --command ${r} --flags-only --json to read each flag's sdk_option key.`],recovery:{missing:[n]}})}function pt(e){return typeof e=="string"||e==null?e:String(e)}function mt(e){if(typeof e=="number")return e;if(typeof e=="string"&&e.trim().length>0){let t=Number(e);return Number.isFinite(t)?t:e}return e}function Ne(e){if(typeof e=="boolean")return e;if(typeof e=="string"){let t=e.trim().toLowerCase();if(t==="true"||t==="1")return!0;if(t==="false"||t==="0")return!1}return e}var ft={string:pt,number:mt,boolean:Ne};function v(e,t){return Array.isArray(e)?e.map(n=>v(n,t)):ft[t](e)}function j(e,t,n){let r=n?(Array.isArray(e)?e.flat(1/0):[e]).filter(o=>o!=null&&o!==""):D(e);return t?r.map(o=>v(o,t)):r}function yt(e,t){return j(t,null,e.repeatable===!0).length>0}function ht(e,t,n,r){return n?j(e,t,r):t?v(e,t):e}function gt(e,t,n){let r=Le(e,t);return r.length===0?n:r.map(o=>o.value)}function Ce(e){return L(e).value_arity==="none"}function z(e,t,n,r,o){let s=O(e),i=o?` for extension command '${o}'`:"",a=n===!0?"no value":JSON.stringify(n);throw new m(`Option '${s}'${i} expects ${r}; received ${a}.`,p.USAGE,{code:"extension_flag_value_invalid",flag:s,required:`Pass ${s} ${t==="number"?"<number>":"<true|false|1|0>"}.`,why:`The flag declares value_type ${t} with value_validation strict, so a malformed token is refused before the extension handler runs.`,nextSteps:[`Re-run with a valid ${t} value for ${s}.`,`Run pm ${o??"<command>"} --help to review the declared flag contract.`]})}function K(e,t){return e.value_validation==="strict"&&t!=="string"}function Le(e,t){let n=e[$e];if(!n)return[];let r=new Set(t);return n.filter(o=>r.has(o.key))}function _t(e,t,n,r){if(Ce(e))for(let o of Le(n,t)){if(o.attached!==!0)continue;let s=e.list===!0&&e.repeatable!==!0?D(o.value):[o.value];for(let i of s){let a=x(v(i,"boolean"),"boolean");a!==null&&z(e,"boolean",i,a.expected,r)}}}function kt(e,t,n,r,o){let s=Array.isArray(n)?n.flat(1/0):[n],i=r?s:s.flatMap(a=>typeof a=="string"?a.split(","):[a]);for(let a of i)if(typeof a=="string"&&a.trim().length===0){let c=x(a,t);z(e,t,a,c.expected,o)}}function W(e,t,n,r){if(!K(e,n))return t;let o=n==="boolean"&&Ce(e),s=i=>{let a=x(i,n);return a===null?i:o&&typeof i=="string"?!0:z(e,n,i,a.expected,r)};return Array.isArray(t)?t.map(s):s(t)}function bt(e,t,n,r){for(let o of n)if(!(o===t||!Object.hasOwn(e,o))){if(Object.hasOwn(e,t)){if(r){let s=e[t],i=e[o];e[t]=[...Array.isArray(s)?s:[s],...Array.isArray(i)?i:[i]].filter(a=>a!=null)}delete e[o];continue}e[t]=e[o],delete e[o]}}function De(e,t,n=e,r){if(t.length===0)return e;let o=Object.create(null);for(let[i,a]of Object.entries(e))o[i]=a;let s=new Set(t.map(i=>S(i)).filter(i=>i!==null));for(let i of t){let a=S(i);if(a){let c=Te(i).filter(d=>d===a||!s.has(d));wt(o,i,a,c,n,r)}}return o}function wt(e,t,n,r,o,s){let i=t.list===!0,a=Ae(t);a&&!i&&vt(e,t,n,r,a,s),bt(e,n,r,i);let c=t.repeatable===!0;if(!Object.hasOwn(e,n)){t.default!==void 0&&(e[n]=ht(t.default,a,i,c));return}if(a==="boolean"&&K(t,a)&&_t(t,r,o,s),i){e[n]=St(t,r,o,e[n],a,c,s);return}a&&(e[n]=W(t,v(e[n],a),a,s))}function vt(e,t,n,r,o,s){for(let i of r)i!==n&&Object.hasOwn(e,i)&&W(t,v(e[i],o),o,s)}function St(e,t,n,r,o,s,i){let a=gt(n,t,r);o&&K(e,o)&&kt(e,o,a,s,i);let c=j(a,o,s);return o?W(e,c,o,i):c}function Tn(e){return S(e)}function Oe(e){return e.trim().toLowerCase().split(/\s+/u).filter(t=>t.length>0).join(" ")}function Nn(e,t){let n=Oe(t);if(n.length===0)return[];let r=C(n);return e.flags.filter(o=>C(Oe(o.target_command))===r).flatMap(o=>[...o.flags])}function Ot(e,t,n,r){let o=O(e),[s,i]=n;throw new m(`Options '${s}' and '${i}' both set ${o} for extension command '${r}' with different values.`,p.USAGE,{code:"extension_option_spelling_conflict",required:`Pass ${o} once, under the handler key '${t}'.`,why:`'${s}' and '${i}' are spellings of the same declared flag, and pm refuses to choose between two different values.`,nextSteps:[`Remove '${s}' or '${i}' and pass one value as '${t}'.`,`Run pm contracts --command ${r} --flags-only --json to read each flag's sdk_option key.`]})}function Cn(e,t,n,r={}){if(t.length===0)return e;let o=t.map(l=>l.repeatable===!0&&l.list!==!0?{...l,list:!0}:l),s=$t(o),i=Nt(e,s,n),a=new Set([...s.long.values()].map(({handlerKey:l})=>l)),c=Object.create(null),d=Object.create(null);for(let[l,u]of Object.entries(i))a.has(l)?c[l]=u:u===void 0||r.undeclaredKeys==="pass"||It(l)?d[l]=u:ct(l,xt(l),n,lt(o,{}));return Fe(c,o,n),Object.assign(d,De(c,o,Re(c,s),n))}function Re(e,t){let n=new Set([...t.long.values()].map(({handlerKey:s})=>s)),r=Object.entries(e).filter(([s])=>n.has(s)).flatMap(([s,i])=>(Array.isArray(i)?i.flat(1/0):[i]).map(a=>({consumed:1,key:s,value:a,attached:!0}))),o=Object.create(null);return Object.defineProperty(o,$e,{value:r}),o}function Fe(e,t,n){for(let r of t){let o=S(r);if(o===null)continue;let s=O(r),i=e[o],a=Object.hasOwn(e,o);r.enabled===!1&&a&&dt(s,n);let c=a&&(r.list!==!0||yt(r,i));r.required===!0&&r.enabled!==!1&&!c&&ut(r,o,s,n),r.list!==!0&&Array.isArray(i)&&Et(s,n)}}function Et(e,t){throw new m(`Option '${e}' for extension command '${t}' takes one value; received an array.`,p.USAGE,{code:"extension_flag_value_invalid",flag:e,required:`Pass one value for ${e}, or ask the package to declare it with list: true or repeatable: true.`,why:"The flag is not declared list or repeatable, so pm refuses an array before the extension handler runs instead of handing it a value of the wrong shape.",nextSteps:[`Run pm contracts --command ${t} --flags-only --json to read each flag's value contract.`]})}var Ee=new Set([...[...Q].flatMap(e=>{let t=e.replace(/^--/u,"");return[t,...t.startsWith("no-")?[t.slice(3)]:[]].flatMap(n=>[w(n),n.replaceAll("-","_")])}),"force","subcommand","inputResponses","requestState"]);function It(e){return Ee.has(e)||Ee.has(w(e.replace(/^-{1,2}/u,"")))}function xt(e){return`--${e.replace(/^-+/u,"").replace(/([a-z0-9])([A-Z])/gu,"$1-$2").replaceAll("_","-").toLowerCase()}`}function $t(e){let t={long:new Map,short:new Map},n=(r,o,s)=>{o.length>0&&!r.has(o)&&r.set(o,s)};for(let r of e){let o=S(r);if(o===null)continue;let s={handlerKey:o,definition:r};n(t.long,o,s);let i=typeof r.short=="string"?r.short.trim():"";i.startsWith("-")&&!i.startsWith("--")&&n(t.short,i.slice(1),s)}return t}function q(e,t){return e.long.get(t)??e.short.get(t.replace(/^-(?!-)/u,""))??e.long.get(w(t.replace(/^-{1,2}/u,"")))}function At(e,t,n,r){let o=/^(?:--)?no-(.+)$/u.exec(t)?.[1];if(o===void 0||q(e,t)!==void 0)return{spelling:t,value:n};let s=q(e,o);return s===void 0||Ae(s.definition)!=="boolean"?{spelling:t,value:n}:(s.definition.list===!0||s.definition.repeatable===!0)&&Array.isArray(n)?{spelling:o,value:n.flat(1/0).map(i=>Ie(t,s.definition,i,r))}:s.definition.list===!0&&n!==void 0?{spelling:o,value:Ie(t,s.definition,n,r)}:{spelling:o,value:n===void 0?n:N(t,s.definition,n,r)}}function Ie(e,t,n,r){let o=s=>s.trim().length===0?s:String(N(e,t,s.trim(),r));return n==null?n:typeof n!="string"?N(e,t,n,r):n.trim().length===0?n:t.repeatable===!0||!n.includes(",")?N(e,t,n,r):n.split(",").map(o).join(",")}function N(e,t,n,r){let o=Ne(n);return typeof o=="boolean"?!o:Tt(e,t,n,r)}function Tt(e,t,n,r){let o=O(t);throw new m(`Option '${e}' for extension command '${r}' negates ${o} and expects true, false, 1, or 0; received ${JSON.stringify(n)}.`,p.USAGE,{code:"extension_flag_value_invalid",flag:o,required:`Pass ${o} as true or false, or '${e}' as true.`,why:`'${e}' is the negated spelling of the boolean ${o}, so only a boolean value can be inverted before the extension handler runs.`,nextSteps:[`Run pm contracts --command ${r} --flags-only --json to read each flag's value contract.`]})}function Nt(e,t,n){let r=Object.create(null),o=new Map;for(let[s,i]of Object.entries(e)){let{spelling:a,value:c}=At(t,s,i,n),d=q(t,a);if(d===void 0)r[a]=c;else if(c!==void 0){let l=o.get(d.handlerKey);l===void 0?(o.set(d.handlerKey,a),r[d.handlerKey]=c):it(xe(d.definition,d.handlerKey,r[d.handlerKey],t,n),xe(d.definition,d.handlerKey,c,t,n))||Ot(d.definition,d.handlerKey,[l,a],n)}}return r}function xe(e,t,n,r,o){let s={[t]:n};return Fe(s,[e],o),De(s,[e],Re(s,r),o)[t]}export{Pt as a,qt as b,jt as c,zt as d,Kt as e,ge as f,Wt as g,Bt as h,b as i,R as j,Me as k,Xt as l,Gt as m,Pe as n,Yt as o,qe as p,en as q,je as r,A as s,T as t,be as u,on as v,hn as w,gn as x,_n as y,On as z,Tn as A,Nn as B,Cn as C};
|
|
26
|
-
//# sourceMappingURL=chunk-WZWXGDYY.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{ca as l}from"./chunk-RKQNVYGF.js";import{mb as r}from"./chunk-ZWJTY4ID.js";import{Pg as S,Qg as N,Sg as E,sb as n}from"./chunk-UWS3FC4D.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-YKSLZPLT.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a as T}from"./chunk-I5LGPUWH.js";import{F as U,I as R,Va as j,Ya as H,ab as C,db as z}from"./chunk-UWS3FC4D.js";import{m as L}from"./chunk-3IRCYJI5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="a1119a65-4ee5-5362-8fa9-4324c5864990")}catch{}})();var ol=["id","title","status","type","priority","parent","updated_at"],rl=["id","status","type","title"],gl={list:"brief","list-all":"full","list-draft":"full","list-open":"brief","list-in-progress":"brief","list-blocked":"brief","list-closed":"brief","list-canceled":"full"},ye=["tree_depth","tree_parent","tree_children","tree_title"];function Ae(e=[]){return[...new Set([...L,"body",...ye,...e])].flatMap(a=>[a,`item.${a}`]).sort()}function fl(e=[]){return Ae(e).filter(a=>!a.startsWith("item."))}var ke=["brief","standard","deep"],q=[...ke,"full"],Y=["brief","standard","deep"],be=["body","item_hash","linked","claim_state","children","schedule","blockers"],Ce=["linked.files","linked.tests","linked.docs"],Se=["claim_state.claimed","claim_state.assignee","claim_state.last_claim","claim_state.last_release"],Ne=["schedule.deadline","schedule.start_at","schedule.end_at","schedule.location","schedule.reminders","schedule.events"];function cl(e=[]){return[...[...new Set([...L,...e,"notes_count","tests_count","collection_counts"])].flatMap(a=>[a,`item.${a}`]),...be,...Ce,...Se,...Ne].sort()}var pl=["id","title","status","type","priority","updated_at","score","matched_fields"],we=["score","matched_fields","highlights"],X=["id","title","description","type","status","priority","tags","created_at","updated_at","deadline","assignee","author","estimated_minutes","acceptance_criteria","dependencies","comments","notes","learnings","reminders","events","files","tests","docs","close_reason","parent","reviewer","risk","confidence","sprint","release","blocked_by","blocked_reason","reporter","severity","environment","repro_steps","resolution","expected_result","actual_result","affected_version","fixed_version","component","regression","customer_impact","definition_of_ready","order","rank","goal","objective","value","impact","outcome","why_now","plan"];function dl(e=[]){let a=[...new Set(e)];return[...we,...X,...X.map(l=>`item.${l}`),...a,...a.map(l=>`item.${l}`)].sort()}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="85a28710-c767-584c-b3e3-373261f4b5f2")}catch{}})();var G=["item","list","context","search","graph","history","workspace","package","ops","plan","contracts","help"],Oe=["acknowledge","activate","add","adopt","adopt-all","catalog","compact","complete","create","deactivate","delete","describe","doctor","edit","explore","import","init","inspect","install","list","manage","migrate","mutate","read","redact","reload","remove","reopen","repair","restore","run","show","uninstall","upgrade","verify"];function s(e,a,l,t={}){return{name:e,required:l,variadic:t.variadic===!0,value_kind:a,polymorphic:t.polymorphic===!0}}function B(e){let a=e.replaceAll("-"," ");return`${a.charAt(0).toUpperCase()}${a.slice(1)}`}var g=s("id","item_id",!0),y=s("id","item_id",!1),A=s("text","string",!1),k=s("plan-id","item_id",!0),V=s("step","string",!0),Ee=["--acceptance-criteria","--actual-result","--affected-version","--assignee","--blocked-by","--blocked-reason","--blocks","--body","--claim","--comment","--component","--confidence","--create-mode","--customer-impact","--deadline","--definition-of-ready","--description","--doc","--environment","--estimate","--event","--expected-result","--fixed-version","--file","--from-search","--goal","--harness","--impact","--learning","--message","--mode","--note","--objective","--order","--outcome","--parent","--priority","--rank","--related","--release","--reminder","--reporter","--repro-steps","--resolution","--resume-context","--reviewer","--risk","--scope","--severity","--sprint","--status","--step","--step-blocked-reason","--step-body","--step-evidence","--step-owner","--step-replacement","--step-status","--step-title","--tags","--template","--test","--title","--type-option","--unblock-note","--value","--why-now"],I=["--allow-multiple-active","--depends-on","--file","--force","--message","--step-blocked-reason","--step-body","--step-evidence","--step-owner","--step-status","--step-title","--test"],xe={"update-step":"Update one declared Plan step.","complete-step":"Complete one declared Plan step.","block-step":"Block one declared Plan step.","remove-step":"Remove one declared Plan step.",link:"Link one dependency to a declared Plan step.",unlink:"Unlink one dependency from a declared Plan step."},h=[{command:"plan create",parent:"plan",action:"create",slots:[s("title","string",!1,{polymorphic:!0})],accepted_flags:Ee,description:"Create a Plan item and optionally seed its ordered steps.",example:'pm plan create --title "Refactor lock retry"'},{command:"plan show",parent:"plan",action:"show",slots:[k],accepted_flags:["--depth","--fields"],description:"Read one Plan item with a bounded plan projection.",example:"pm plan show pm-a1b2 --depth standard"},{command:"plan add-step",parent:"plan",action:"add-step",slots:[k],accepted_flags:I,description:"Append one ordered step to a Plan item.",example:'pm plan add-step pm-a1b2 --step-title "Run tests"'},...Object.entries(xe).map(([e,a])=>({command:`plan ${e}`,parent:"plan",action:e,slots:[k,V],accepted_flags:I,description:a,example:`pm plan ${e} pm-a1b2 plan-step-001`})),{command:"plan reorder-step",parent:"plan",action:"reorder-step",slots:[k,V,s("new-order","integer",!0)],accepted_flags:["--force","--message"],description:"Move one Plan step to a declared integer order.",example:"pm plan reorder-step pm-a1b2 plan-step-001 2"},...["decision","discovery","validation","resume","approve","materialize"].map(e=>({command:`plan ${e}`,parent:"plan",action:e,slots:[k],accepted_flags:I,description:`${B(e)} for one Plan item.`,example:`pm plan ${e} pm-a1b2`})),...["list","show","put","remove"].map(e=>({command:`assurance ${e}`,parent:"assurance",action:e,slots:[s("kind","string",!0),...e==="list"?[]:[s("id","string",!0)]],accepted_flags:e==="put"?["--author","--definition","--message"]:e==="remove"?["--author","--message"]:[],description:`${B(e)} assurance declarations by kind.`,example:e==="list"?"pm assurance list measurement":`pm assurance ${e} measurement example-id`})),{command:"assurance run",parent:"assurance",action:"run",slots:[s("gate-id","string",!0)],accepted_flags:["--dry-run","--trigger","--tree"],description:"Evaluate one assurance gate for a lifecycle trigger.",example:"pm assurance run tracker-context-quality --trigger ci --dry-run"},{command:"assurance verdicts",parent:"assurance",action:"verdicts",slots:[s("gate-id","string",!1)],accepted_flags:["--gate","--limit"],description:"List bounded assurance verdict history.",example:"pm assurance verdicts --limit 20"},...["presets","apply"].map(e=>({command:`assurance ${e}`,parent:"assurance",action:e,slots:[s("preset","string",e==="apply")],accepted_flags:["--author","--message","--owner"],description:e==="apply"?"Apply one assurance adoption preset.":"List available assurance adoption presets.",example:e==="apply"?"pm assurance apply software-delivery --owner <pm-item-id>":"pm assurance presets"})),{command:"assurance derive",parent:"assurance",action:"derive",slots:[],accepted_flags:["--apply","--author","--message","--owner"],description:"Derive assurance proposals from current project context.",example:"pm assurance derive --owner pm-a1b2"},{command:"assurance promote",parent:"assurance",action:"promote",slots:[s("assertion-id","string",!0)],accepted_flags:["--author","--enforcement","--message"],description:"Promote one assertion into a warning or blocking gate.",example:"pm assurance promote assertion-id --enforcement warn"},{command:"assurance risk",parent:"assurance",action:"risk",slots:[],accepted_flags:["--definition"],description:"Analyze bounded defect-recurrence risk for a proposed change.",example:`pm assurance risk --definition '{"policy":{"version":1,"evidence_epoch":"2026-01-01T00:00:00.000Z","families":[]},"change":{"files":[]}}'`},{command:"assurance lineages",parent:"assurance",action:"lineages",slots:[],accepted_flags:["--definition"],description:"Measure all recorded recurrence lineages with bounded evidence rows.",example:`pm assurance lineages --definition '{"policy":{"version":1,"evidence_epoch":"2026-01-01T00:00:00.000Z","families":[]}}'`},{command:"workspace position",parent:"workspace",action:"position",slots:[],accepted_flags:[],description:"Read bounded merge-fence, receipt, history-drift, and next-action readiness.",example:"pm workspace position"},{command:"workspace snapshot create",parent:"workspace snapshot",action:"create",slots:[s("name","string",!1)],accepted_flags:[],description:"Capture authoritative tracker state as an immutable snapshot.",example:"pm workspace snapshot create before-migration"},{command:"workspace snapshot list",parent:"workspace snapshot",action:"list",slots:[],accepted_flags:[],description:"List immutable workspace snapshots and named references.",example:"pm workspace snapshot list"},{command:"workspace snapshot inspect",parent:"workspace snapshot",action:"inspect",slots:[s("target","string",!0)],accepted_flags:[],description:"Inspect one workspace snapshot target.",example:"pm workspace snapshot inspect before-migration"},{command:"workspace snapshot restore",parent:"workspace snapshot",action:"restore",slots:[s("target","string",!0)],accepted_flags:["--author","--dry-run","--force","--message"],description:"Restore an immutable workspace snapshot with explicit recovery controls.",example:"pm workspace snapshot restore before-migration --dry-run"},{command:"workspace snapshot delete",parent:"workspace snapshot",action:"delete",slots:[s("target","string",!0)],accepted_flags:[],description:"Delete one workspace snapshot target.",example:"pm workspace snapshot delete before-migration"}],Le=[...h].sort((e,a)=>a.command.length-e.command.length),J=new Map([["append",[g,A]],["assurance",[s("action","action",!0),s("kind","string",!1),s("id","string",!1)]],["beads import",[s("file","string",!1)]],["cal",[s("view","string",!1,{polymorphic:!0})]],["calendar",[s("view","string",!1,{polymorphic:!0})]],["changelog corrections",[s("action","string",!0)]],["changelog export",[s("file","string",!1)]],["changelog milestone create",[s("name","string",!0)]],["claim",[y]],["close",[g,A]],["close-task",[g,s("reason","string",!1)]],["comments",[g,A]],["completion",[s("shell","string",!1)]],["config",[s("scope","string",!1,{polymorphic:!0}),s("action","action",!1),s("key","string",!1),s("value","string",!1,{polymorphic:!0})]],["copy",[g]],["create",[s("type-or-title","string",!1,{polymorphic:!0}),s("title","string",!1)]],["delete",[g]],["deps",[g]],["docs",[g]],["event",[s("title","string",!0)]],["files",[g]],["files discover",[g]],["files lookup",[s("paths","string",!0,{variadic:!0})]],["focus",[y]],["get",[g]],["graph",[s("subcommand","action",!0),y,s("target","item_id",!1)]],["guide",[s("topic","string",!1)]],["history",[g]],["history-compact",[y]],["history-redact",[g]],["history-repair",[y]],["init",[s("prefix-or-path","string",!1,{polymorphic:!0})]],["item complete",[g,s("reason","string",!1)]],["item reopen",[g,s("reason","string",!0)]],["learnings",[g,A]],["meet",[s("title","string",!0)]],["merge",[s("subcommand","action",!0),s("artifact","string",!1),s("base","string",!1),s("ours","string",!1),s("theirs","string",!1)]],["notes",[g,A]],["package",[s("target","string",!1,{polymorphic:!0})]],["package list",[]],["package inventory",[s("name","string",!1)]],["package scaffold",[s("target","string",!0)]],["package upgrade",[s("target","string",!1)]],["packages",[s("target","string",!1,{polymorphic:!0})]],["packages list",[]],["packages inventory",[s("name","string",!1)]],["packages scaffold",[s("target","string",!0)]],["packages upgrade",[s("target","string",!1)]],["pause-task",[g]],["plan",[s("subcommand","action",!0),s("id","item_id",!1,{polymorphic:!0}),s("step","string",!1),s("new-order","integer",!1)]],["profile",[s("subcommand","action",!0),s("name","string",!1)]],["release",[g]],["remind",[s("title","string",!0)]],["restore",[g,s("target","string",!0)]],["schema",[s("subcommand","action",!0),s("name","string",!1)]],["search-advanced",[s("keywords","string",!0,{variadic:!0})]],["search",[s("keywords","string",!0,{variadic:!0})]],["start-task",[g]],["templates save",[s("name","string",!0)]],["templates show",[s("name","string",!0)]],["telemetry",[s("namespace-or-subcommand","action",!1,{polymorphic:!0}),s("subcommand","action",!1)]],["test",[g]],["test-runs-worker",[s("runId","string",!0)]],["update",[g]],["workspace snapshot",[s("action","action",!0),s("target","string",!1)]],...["activate","adopt","deactivate","init","uninstall"].flatMap(e=>["extension","package","packages"].map(a=>[`${a} ${e}`,[s("target","string",!0)]])),...["describe"].flatMap(e=>["extension","package","packages"].map(a=>[`${a} ${e}`,[s("target","string",!1)]])),...["install"].flatMap(e=>["extension","package","packages"].map(a=>[`${a} ${e}`,[s("targets","string",!1,{variadic:!0})]])),["vcs abandon",[g]],["vcs create",[s("title","string",!0)]],["vcs merge",[g]],["vcs propose",[g]],["vcs ref-create",[s("name","string",!0)]],["vcs show",[g]]]);function v(e){return e.trim().toLowerCase().replace(/\s+/gu," ")}function _l(e){let a=v(e),l=F.find(i=>i.command===a);if(l)return l;let t=z(a)?.canonical;if(t)return F.find(i=>i.command===t)}function Re(e){let a=v(e);return Le.find(l=>l.command===a||a.startsWith(`${l.command} `))}function vl(e){return`Applicable flags: ${e.length>0?e.join(", "):"none"}.`}function n(e,a,l,t,i){return i.map(f=>({command:f,noun:e,target:a,disposition:l,owner:t}))}var w=[...n("item","item","target_noun","pm-pbyu",["item","item complete","item mutate","item reopen"]),...n("item","item","consolidation","pm-yql1",["append","close-many","close-task","comments","copy","delete","deps","docs","files","learnings","notes","pause-task","start-task","test","update-many"]),...["claim","close","create","get","release","update"].map(e=>({command:e,noun:"item",target:e,disposition:"keep_as_is",owner:"pm-pbyu",reason:"Permanent high-frequency item operations retain concise root spellings under the accepted hot-path grammar policy."})),...n("item","item files","target_noun","pm-yql1",["files discover","files lookup","item files discover","item files lookup"]),...n("item","item test worker","consolidation","pm-lp4j",["test-runs-worker"]),...n("list","list","target_noun","pm-pfqi",["list"]),...n("list","list --group-by","consolidation","pm-xkgq",["aggregate"]),...n("context","context","target_noun","pm-pbyu",["context"]),...n("context","context","consolidation","pm-kcs4",["ctx","focus","next"]),...n("context","context next","consolidation","pm-kcs4",["ctx next"]),...n("context","context focus","consolidation","pm-kcs4",["ctx focus"]),...n("search","search","target_noun","pm-pbyu",["search"]),...n("search","search","package_owned","package:search-advanced",["reindex","search-advanced"]),...n("item","item duplicates","consolidation","pm-fmy9ih",["duplicates"]),...n("item","item duplicates","package_owned","pm-fmy9ih",["dedupe-audit","dedupe-merge","comments-audit"]),...n("graph","graph","target_noun","pm-pbyu",["graph"]),...n("history","history","target_noun","pm-pbyu",["history"]),...n("history","history attest","target_noun","pm-3z0k",["history attest"]),...n("history","history attest","consolidation","pm-3z0k",["history-attest"]),...j.flatMap(({alias:e,canonical:a})=>[...n("history",a,"target_noun","pm-tqel",[a]),...n("history",a,"consolidation","pm-tqel",[e])]),...n("history","history","consolidation","pm-tqel",["events","merge"]),...n("history","history acknowledge","consolidation","pm-djyvbk",["history-author-acknowledge"]),...n("history","history","package_owned","package:builtin-vcs-exemplar",["vcs abandon","vcs create","vcs log","vcs merge","vcs propose","vcs ref-create","vcs show"]),...n("workspace","workspace","target_noun","pm-pbyu",["workspace","workspace position","workspace snapshot","workspace snapshot create","workspace snapshot delete","workspace snapshot inspect","workspace snapshot list","workspace snapshot restore"]),...n("workspace","workspace init","consolidation","pm-npr3",["init"]),...n("package","package","target_noun","pm-pbyu",["package","package activate","package adopt","package adopt-all","package catalog","package deactivate","package describe","package doctor","package explore","package init","package install","package inventory","package list","package manage","package migrate","package reload","package scaffold","package uninstall","package upgrade"]),...n("package","package","consolidation","pm-tnud",["extension activate","extension adopt","extension adopt-all","extension catalog","extension deactivate","extension describe","extension doctor","extension explore","extension init","extension install","extension manage","extension migrate","extension reload","extension uninstall","packages","packages activate","packages adopt","packages adopt-all","packages catalog","packages deactivate","packages describe","packages doctor","packages explore","packages init","packages install","packages inventory","packages list","packages manage","packages migrate","packages reload","packages scaffold","packages uninstall","packages upgrade"]),...n("package","package","package_owned","package:beads",["beads import"]),...n("package","package","package_owned","package:pm-changelog",["changelog audit","changelog contracts","changelog corrections","changelog drift","changelog export","changelog generate","changelog milestone create","changelog upgrades"]),...n("package","package calendar","package_owned","pm-o3fh",["cal","calendar","event","meet","remind"]),...n("ops","ops","target_noun","pm-6apl",["ops"]),...n("ops","ops normalize","package_owned","package:pm-governance-audit",["normalize"]),...n("ops","ops","consolidation","pm-6apl",["eval","gc","health","stats","telemetry","test-all","validate"]),...n("workspace","workspace","consolidation","pm-npr3",["config","profile","schema"]),...["assurance",...h.filter(({parent:e})=>e==="assurance").map(({command:e})=>e)].map(e=>({command:e,noun:"ops",target:e,disposition:"keep_as_is",owner:"pm-djyvbk",reason:"Assurance manages durable measurement, assertion, gate, and verdict data; retain its established domain surface independently of operational diagnostics."})),...n("plan","plan","target_noun","pm-pbyu",["plan"]),...n("plan","plan","target_noun","pm-2tan",h.filter(({parent:e})=>e==="plan").map(({command:e})=>e)),...n("contracts","contracts","target_noun","pm-pbyu",["contracts"]),...n("help","help","target_noun","pm-pbyu",["help"]),...n("workspace","templates","package_owned","package:builtin-templates",["templates","templates list","templates save","templates show"]),...n("help","help","package_owned","package:builtin-guide-shell",["completion","completion-statuses","completion-tags","completion-types","guide"])].flatMap(e=>{let a=H.find(t=>t.alias===e.command);if(!a)return[e];let l=G.find(t=>t===a.canonical_argv[0])??e.noun;return[{...e,noun:l,target:a.canonical,owner:a.owner},{...e,command:a.canonical,noun:l,target:a.canonical,owner:a.owner,disposition:e.disposition==="package_owned"?"package_owned":"target_noun"}]}),F=[...new Set(w.map(({command:e})=>e))].map(e=>({command:e,slots:Re(e)?.slots??J.get(C(e))??[]})),N={nouns:G,shared_verbs:Oe,scope_before_verb:!0,visible_top_level_ceiling:69,ceiling_raise_requires_pm_item:!0,positional_shape_budget:21};function K(e,a){let l=new Set(a);return[...new Set(e)].filter(t=>!l.has(t)).map(t=>({code:"positional_signature_mismatch",command:t,detail:`Positional signature ${t} has no destination declaration.`}))}function Ie(e){return e.map(({required:a,variadic:l,value_kind:t,polymorphic:i})=>`${a?"r":"o"}:${l?"v":"s"}:${t}:${i?"p":"m"}`).join("|")}function S(e){return e.map(({name:a,required:l,variadic:t,value_kind:i,polymorphic:f})=>`${a}:${l?"r":"o"}:${t?"v":"s"}:${i}:${f?"p":"m"}`).join("|")}function W(e,a){let l=new Map;for(let{command:t}of e){let i=v(t);l.set(i,(l.get(i)??0)+1)}return[...l.entries()].filter(([,t])=>t>1).map(([t,i])=>({code:"positional_signature_mismatch",command:t,detail:`${i} ${a} positional signatures exist for ${t}; exactly one is required.`}))}function hl(e,a={}){let l=a.declared??F,t=a.positionalShapeBudget??N.positional_shape_budget,i=new Map(l.map(o=>[v(o.command),o])),f=new Map(e.map(o=>[v(o.command),o])),c=[...W(l,"declared"),...W(e,"observed"),...a.declared===void 0?[...K(J.keys(),w.map(({command:o})=>o)),...K(h.map(({command:o})=>o),w.map(({command:o})=>o))]:[]];for(let o of i.values()){let d=v(o.command),r=f.get(d);r?S(r.slots)!==S(o.slots)&&c.push({code:"positional_signature_mismatch",command:o.command,detail:`Observed positional signature for ${o.command} differs from its declared SDK contract: observed=${S(r.slots)||"<none>"}; declared=${S(o.slots)||"<none>"}.`}):c.push({code:"missing_observed_signature",command:o.command,detail:`No observed positional signature exists for ${o.command}.`})}for(let o of f.values())i.has(v(o.command))||c.push({code:"stale_observed_signature",command:o.command,detail:`Observed positional signature ${o.command} has no declaration.`});let p=new Set(l.map(({slots:o})=>Ie(o))).size;return p>t&&c.push({code:"positional_shape_budget_exceeded",command:"*",detail:`Distinct positional shape count ${p} exceeds budget ${t}.`}),c.sort((o,d)=>o.command!==d.command?o.command.localeCompare(d.command):o.code.localeCompare(d.code)),{ok:c.length===0,declared_command_count:l.length,observed_command_count:e.length,positional_shape_count:p,positional_shape_budget:t,findings:c}}function Fe(e,a,l){return e.flatMap(t=>{let i=a.get(t)??[];if(i.length===0){let c=t.indexOf(" "),p=c===-1?t:t.slice(0,c);return[{code:"missing_destination",spelling:t,message:`Command \`${t}\` has no destination census row.`,nearest_target:l.has(p)?p:`ops ${t}`}]}let f=i.length>1?[{code:"duplicate_destination",spelling:t,message:`Command \`${t}\` has ${i.length} destination rows.`,nearest_target:i[0].target}]:[];return i.reduce((c,p)=>(p.disposition==="keep_as_is"&&(p.reason?.trim().length??0)===0&&c.push({code:"missing_destination",spelling:t,message:`Command \`${t}\` is kept as-is without a documented reason.`,nearest_target:p.target}),l.has(p.noun)||c.push({code:"unknown_noun",spelling:t,message:`Command \`${t}\` names undeclared noun \`${p.noun}\`.`,nearest_target:p.target}),c),f)})}function Ge(e,a){return a.filter(l=>l.disposition!=="package_owned"&&!e.has(l.command)).map(l=>({code:"stale_destination",spelling:l.command,message:`Destination row \`${l.command}\` is absent from live contracts.`,nearest_target:l.target}))}function Pe(e,a){return e.filter(l=>!a.has(l.canonical)).map(l=>({code:"alias_target_missing",spelling:l.alias,message:`Alias \`${l.alias}\` targets missing canonical command \`${l.canonical}\`.`,nearest_target:l.canonical_argv.join(" ")}))}function Tl(e,a=[],l=w){let t=[...new Set(e.map(r=>r.trim()))].filter(r=>r.length>0).sort((r,u)=>r.localeCompare(u)),i=new Set(t),f=new Set(G),c=new Map;for(let r of l){let u=c.get(r.command)??[];u.push(r),c.set(r.command,u)}let p=[...Fe(t,c,f),...Ge(i,l),...Pe(a.filter(r=>i.has(r.alias)||!(c.get(r.canonical)??[]).some(u=>u.disposition==="package_owned")),i)],o=new Set(a.filter(r=>r.hidden).map(r=>r.alias)),d=new Set(t.filter(r=>!r.includes(" ")&&!o.has(r)&&!(c.get(r)??[]).some(u=>u.disposition==="package_owned"))).size;return d>N.visible_top_level_ceiling&&p.push({code:"visible_surface_ceiling_exceeded",spelling:String(d),message:`Visible non-package top-level command count ${d} exceeds ceiling ${N.visible_top_level_ceiling}.`,nearest_target:"Declare the noun placement and tracked waiver before raising the ceiling."}),{ok:p.length===0,command_count:t.length,destination_count:l.length,hidden_alias_count:a.filter(r=>r.hidden).length,visible_top_level_count:d,visible_top_level_ceiling:N.visible_top_level_ceiling,findings:p}}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="4e1e3ef4-cdf3-5d4c-88fe-d23f6fc171d1")}catch{}})();function b(e){return[...new Set(Array.from(e,a=>a.trim()).filter(a=>a.length>0))]}(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="a19fd3af-1f51-5516-ae66-29326cce5277")}catch{}})();function E(e){return e.startsWith("--")?`--${e.slice(2).replaceAll("_","-")}`:e}function M(e){let a=new Map;for(let l of e){let t=E(l.flag),i=a.get(t)??new Set;l.flag!==t&&i.add(l.flag);for(let f of l.aliases??[])f!==t&&i.add(f);a.set(t,i)}return e.map(l=>{let t=E(l.flag);if(l.flag!==t)return l;let i=b([...l.aliases??[],...a.get(t)]).filter(f=>f!==t);return i.length===0?l:{...l,aliases:i}})}function El(e){let a=M(e),l=new Set(a.map(t=>t.flag));return a.filter(t=>{let i=E(t.flag);return t.flag===i||!l.has(i)})}var D=R.map(e=>({flag:e.flag,reservation_scope:"inherited",...e.aliases?{aliases:[...e.aliases]}:{},...e.value_name?{value_name:e.value_name}:{}}));function xl(e={}){return R.filter(a=>a.extension_command_availability===void 0||a.extension_command_availability==="read_output"&&e.readOutput===!0).map(a=>{let l=a.value_name??a.discovery_value_name;return{flag:a.flag,reservation_scope:"inherited",owner:"host",...a.aliases?{aliases:[...a.aliases]}:{},value_arity:l===void 0?"none":"required",...l===void 0?{}:{value_name:l}}})}var Ll=[...D,{flag:"--version",value_type:"boolean",reservation_scope:"root_only"},{flag:"--all",value_type:"boolean",reservation_scope:"root_only",description:"Expand root help to every command."},{flag:"--explain",value_type:"boolean",reservation_scope:"root_only",description:"Expand root help with command guidance."}],se=[{flag:"--filter-reviewer-missing"},{flag:"--filter-risk-missing"},{flag:"--filter-confidence-missing"},{flag:"--filter-sprint-missing"},{flag:"--filter-release-missing"},{flag:"--has-notes"},{flag:"--no-notes"},{flag:"--has-learnings"},{flag:"--no-learnings"},{flag:"--has-files"},{flag:"--no-files"},{flag:"--filter-files-missing"},{flag:"--has-docs"},{flag:"--no-docs"},{flag:"--filter-docs-missing"},{flag:"--has-tests"},{flag:"--no-tests"},{flag:"--has-comments"},{flag:"--no-comments"},{flag:"--has-deps"},{flag:"--no-deps"},{flag:"--has-body"},{flag:"--empty-body"},{flag:"--has-linked-command"},{flag:"--no-linked-command"}],ie=[{flag:"--filter-reviewer-missing"},{flag:"--filter-risk-missing"},{flag:"--filter-confidence-missing"},{flag:"--filter-sprint-missing"},{flag:"--filter-release-missing"},{flag:"--filter-has-notes"},{flag:"--filter-no-notes"},{flag:"--filter-has-learnings"},{flag:"--filter-no-learnings"},{flag:"--filter-has-files"},{flag:"--filter-no-files"},{flag:"--filter-has-docs"},{flag:"--filter-no-docs"},{flag:"--filter-has-tests"},{flag:"--filter-no-tests"},{flag:"--filter-has-comments"},{flag:"--filter-no-comments"},{flag:"--filter-has-deps"},{flag:"--filter-no-deps"},{flag:"--filter-has-body"},{flag:"--filter-empty-body"},{flag:"--filter-has-linked-command"},{flag:"--filter-no-linked-command"},{flag:"--ids",list:!0},{flag:"--limit"},{flag:"--offset"}],P=$([{flag:"--for",value_name:"intent"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--status",list:!0},{flag:"--all",value_type:"boolean"},{flag:"--type",list:!0},{flag:"--tag",aliases:["--tags"],list:!0},{flag:"--priority",list:!0},{flag:"--deadline-before"},{flag:"--deadline-after"},{flag:"--today"},{flag:"--recent"},{flag:"--updated-after"},{flag:"--updated-before"},{flag:"--created-after"},{flag:"--created-before"},{flag:"--ids",list:!0},{flag:"--assignee",list:!0},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--parent"},{flag:"--sprint",list:!0},{flag:"--release",list:!0},{flag:"--filter-ac-missing"},{flag:"--filter-estimates-missing",aliases:["--filter-estimate-missing"]},{flag:"--filter-resolution-missing"},{flag:"--filter-metadata-missing"},...se,{flag:"--limit"},{flag:"--offset"},{flag:"--after"},{flag:"--no-truncate"},{flag:"--compact"},{flag:"--brief"},{flag:"--full"},{flag:"--fields",list:!0},{flag:"--sort"},{flag:"--order"},{flag:"--tree"},{flag:"--tree-depth"},{flag:"--tree_depth"},{flag:"--include-body"},{flag:"--strict-read"},{flag:"--format"},{flag:"--stream"}],new Set(["--limit","--token-budget","--offset","--after","--no-truncate","--compact","--brief","--full","--fields","--include-body","--strict-read"])),Me=[{flag:"--group-by",list:!0},{flag:"--set-mode"},{flag:"--limit"},{flag:"--after"},{flag:"--count"},{flag:"--completion"},{flag:"--sum"},{flag:"--avg"},{flag:"--include-unparented"},{flag:"--include_unparented"},{flag:"--status",list:!0},{flag:"--type",list:!0},{flag:"--tag",list:!0},{flag:"--priority",list:!0},{flag:"--deadline-before"},{flag:"--deadline-after"},{flag:"--assignee",list:!0},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--parent"},{flag:"--sprint",list:!0},{flag:"--release",list:!0}],De=[{flag:"--id",value_name:"item-id"},{flag:"--add",aliases:["--comment","--body","--text"]},{flag:"--stdin"},{flag:"--file"},{flag:"--edit"},{flag:"--delete"},{flag:"--expect-at"},{flag:"--limit"},{flag:"--full-history"},{flag:"--if-absent",value_type:"boolean"},{flag:"--author"},{flag:"--message"},{flag:"--force"}];function $(e,a){return e.map(l=>a.has(l.flag)?{...l,cursor_semantics:"presentation"}:l)}var $e=[{flag:"--id",value_name:"item-id"},{flag:"--add",aliases:["--note","--text"]},{flag:"--add-json"},{flag:"--stdin"},{flag:"--file"},{flag:"--edit"},{flag:"--delete"},{flag:"--expect-at"},{flag:"--limit"},{flag:"--since"},{flag:"--event-type"},{flag:"--include-meta"},{flag:"--full-history"},{flag:"--if-absent",value_type:"boolean"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],Ue=[{flag:"--id",value_name:"item-id"},{flag:"--add",aliases:["--learning","--text"]},{flag:"--stdin"},{flag:"--file"},{flag:"--edit"},{flag:"--delete"},{flag:"--expect-at"},{flag:"--limit"},{flag:"--full-history"},{flag:"--if-absent",value_type:"boolean"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],je=[{flag:"--id",value_name:"item-id"},{flag:"--add"},{flag:"--add-glob"},{flag:"--remove"},{flag:"--migrate"},{flag:"--note"},{flag:"--note-conflict",value_name:"mode",values:["refuse","replace","append"],default:"refuse"},{flag:"--list"},{flag:"--append-stable"},{flag:"--validate-paths"},{flag:"--full-history"},{flag:"--scope"},{flag:"--limit"},{flag:"--offset"},{flag:"--no-truncate"},{flag:"--strict-read"},{flag:"--explain"},{flag:"--lines",value_name:"start:end"},{flag:"--decision-depth",value_name:"n",value_type:"number"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],He=[{flag:"--id",value_name:"item-id"},{flag:"--add"},{flag:"--add-glob"},{flag:"--remove"},{flag:"--migrate"},{flag:"--note"},{flag:"--note-conflict",value_name:"mode",values:["refuse","replace","append"],default:"refuse"},{flag:"--list"},{flag:"--validate-paths"},{flag:"--full-history"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],ze=[{flag:"--id",value_name:"item-id"},{flag:"--limit"},{flag:"--order",value_name:"value",value_type:"string"},{flag:"--compact"},{flag:"--full"},{flag:"--provenance"},{flag:"--provenance-summary"},{flag:"--harness",repeatable:!0},{flag:"--agent-instance",repeatable:!0},{flag:"--provenance-filter",repeatable:!0},{flag:"--diff"},{flag:"--field"},{flag:"--verify"},{flag:"--strict-exit"},{flag:"--fail-on-warn"},{flag:"--format"}],Xe=[{flag:"--dry-run"},{flag:"--pre-commit-hook",value_type:"boolean"},{flag:"--stage",value_type:"boolean"},{flag:"--message"},{flag:"--force"},{flag:"--include-reconciled"},{flag:"--output"},{flag:"--item-path"},{flag:"--prefer"}],qe=[{flag:"--id",value_name:"item-id"},{flag:"--literal"},{flag:"--regex"},{flag:"--replacement"},{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],Ye=[{flag:"--id",value_name:"item-id"},{flag:"--all"},{flag:"--dry-run"},{flag:"--normalize-provenance"},{flag:"--salvage-tail",value_type:"boolean"},{flag:"--append-only",value_type:"boolean"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],Be=[{flag:"--event",repeatable:!0},{flag:"--all-actionable"},{flag:"--dry-run"},{flag:"--plan-fingerprint"},{flag:"--limit",value_type:"number"},{flag:"--attributed-author",aliases:["--attributed_author"]},{flag:"--reviewer"},{flag:"--reason"}],Ve=[{flag:"--id",value_name:"item-id"},{flag:"--before"},{flag:"--ids",list:!0},{flag:"--all-over",value_type:"number"},{flag:"--closed"},{flag:"--all-streams"},{flag:"--min-entries",value_type:"number"},{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],Ke=[{flag:"--verify",value_name:"file",value_type:"string"},{flag:"--output",value_name:"file",value_type:"string"},{flag:"--hash-algorithm",value_name:"name",value_type:"string"}],We=[{flag:"--definition",value_name:"json"},{flag:"--policy",value_name:"id"},{flag:"--message",value_name:"value"},{flag:"--description"},{flag:"--default-status",aliases:["--default_status"]},{flag:"--folder"},{flag:"--alias"},{flag:"--role"},{flag:"--order"},{flag:"--type"},{flag:"--commands"},{flag:"--cli-flag"},{flag:"--required"},{flag:"--required-on-create"},{flag:"--no-allow-unset"},{flag:"--required-types"},{flag:"--infer"},{flag:"--min-count"},{flag:"--apply",value_type:"boolean"},{flag:"--to"},{flag:"--migration-id",aliases:["--migration_id"]},{flag:"--dry-run"},{flag:"--author"},{flag:"--force"}],Je=[{flag:"--dry-run"},{flag:"--author"},{flag:"--force"}],ne=[{flag:"--title"},{flag:"--description"},{flag:"--scope"},{flag:"--parent"},{flag:"--inherit-focus",value_type:"boolean",default:!0},{flag:"--no-inherit-focus",value_type:"boolean"},{flag:"--related"},{flag:"--blocks"},{flag:"--blocked-by",aliases:["--blocked_by"]},{flag:"--harness"},{flag:"--mode"},{flag:"--resume-context",aliases:["--resume_context"]},{flag:"--tags",aliases:["--tag"],list:!0},{flag:"--priority"},{flag:"--status",short:"-s"},{flag:"--create-mode",aliases:["--create_mode"]},{flag:"--deadline"},{flag:"--estimate",aliases:["--estimated-minutes","--estimated_minutes"]},{flag:"--acceptance-criteria",aliases:["--acceptance_criteria","--ac"],repeatable:!0},{flag:"--definition-of-ready",aliases:["--definition_of_ready"]},{flag:"--order"},{flag:"--rank"},{flag:"--goal"},{flag:"--objective"},{flag:"--value"},{flag:"--impact"},{flag:"--outcome"},{flag:"--why-now",aliases:["--why_now"]},{flag:"--assignee"},{flag:"--reviewer"},{flag:"--risk"},{flag:"--confidence"},{flag:"--sprint"},{flag:"--release"},{flag:"--blocked-reason",aliases:["--blocked_reason"]},{flag:"--unblock-note",aliases:["--unblock_note"]},{flag:"--reporter"},{flag:"--severity"},{flag:"--environment"},{flag:"--repro-steps",aliases:["--repro_steps"]},{flag:"--resolution"},{flag:"--expected-result",aliases:["--expected_result","--expected"]},{flag:"--actual-result",aliases:["--actual_result","--actual"]},{flag:"--affected-version",aliases:["--affected_version"]},{flag:"--fixed-version",aliases:["--fixed_version"]},{flag:"--component"},{flag:"--regression"},{flag:"--customer-impact",aliases:["--customer_impact"]},{flag:"--comment",repeatable:!0},{flag:"--note",repeatable:!0},{flag:"--learning",repeatable:!0},{flag:"--reminder",repeatable:!0},{flag:"--event",repeatable:!0},{flag:"--type-option",aliases:["--type_option"],repeatable:!0},{flag:"--body"},{flag:"--claim"},{flag:"--from-search",aliases:["--from_search"]},{flag:"--template"},{flag:"--step-title",aliases:["--step_title"]},{flag:"--step"},{flag:"--step-body",aliases:["--step_body"]},{flag:"--step-owner",aliases:["--step_owner"]},{flag:"--step-status",aliases:["--step_status"]},{flag:"--step-evidence",aliases:["--step_evidence"]},{flag:"--step-blocked-reason",aliases:["--step_blocked_reason"]},{flag:"--step-replacement",aliases:["--step_replacement"]},{flag:"--depends-on",aliases:["--depends_on"]},{flag:"--link"},{flag:"--link-kind",aliases:["--link_kind"]},{flag:"--link-note",aliases:["--link_note"]},{flag:"--promote-to-item-dep",aliases:["--promote_to_item_dep"]},{flag:"--allow-multiple-active",aliases:["--allow_multiple_active"]},{flag:"--file"},{flag:"--test"},{flag:"--doc"},{flag:"--decision-text",aliases:["--decision_text","--decision"]},{flag:"--decision-rationale",aliases:["--decision_rationale"]},{flag:"--decision-evidence",aliases:["--decision_evidence"]},{flag:"--discovery-text",aliases:["--discovery_text","--discovery"]},{flag:"--validation-text",aliases:["--validation_text","--validation"]},{flag:"--validation-command",aliases:["--validation_command"]},{flag:"--validation-expected",aliases:["--validation_expected"]},{flag:"--depth",values:Y},{flag:"--field"},{flag:"--fields",list:!0},{flag:"--steps"},{flag:"--materialize-type",aliases:["--materialize_type"]},{flag:"--materialize-parent",aliases:["--materialize_parent"]},{flag:"--materialize-tags",aliases:["--materialize_tags"]},{flag:"--author"},{flag:"--message"},{flag:"--force"}],Ze=[{flag:"--id-prefix",aliases:["--prefix"]},{flag:"--preset"},{flag:"--type-preset"},{flag:"--defaults",short:"-y",aliases:["--yes"]},{flag:"--author"},{flag:"--agent-guidance"},{flag:"--with-packages"},{flag:"--no-merge-fence"},{flag:"--workspace"},{flag:"--force"},{flag:"--verbose"}],Qe=[{flag:"--value",value_name:"value"},{flag:"--criterion"},{flag:"--clear-criteria"},{flag:"--format"},{flag:"--policy"},{flag:"--default-depth"},{flag:"--activity-limit"},{flag:"--stale-threshold-days"},{flag:"--section-hierarchy"},{flag:"--section-activity"},{flag:"--section-progress"},{flag:"--section-blockers"},{flag:"--section-files"},{flag:"--section-workload"},{flag:"--section-staleness"},{flag:"--section-tests"}],oe=[{flag:"--dry-run"},{flag:"--init"},{flag:"--scaffold"},{flag:"--capability"},{flag:"--install"},{flag:"--uninstall"},{flag:"--explore"},{flag:"--list"},{flag:"--manage"},{flag:"--offline",value_type:"boolean"},{flag:"--describe"},{flag:"--markdown"},{flag:"--output"},{flag:"--reload"},{flag:"--watch"},{flag:"--doctor"},{flag:"--catalog"},{flag:"--adopt"},{flag:"--adopt-all"},{flag:"--activate"},{flag:"--deactivate"},{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--gh"},{flag:"--github"},{flag:"--ref"},{flag:"--detail"},{flag:"--trace"},{flag:"--runtime-probe"},{flag:"--fix-managed-state"},{flag:"--isolated"},{flag:"--ignore-global"},{flag:"--strict-exit"},{flag:"--fail-on-warn"}],m=[{flag:"--project"},{flag:"--local"},{flag:"--global"}],re=[...m,{flag:"--capability"}],Z=[...oe,{flag:"--declarative"}],ea=[...re,{flag:"--declarative"}],aa=[{flag:"--dry-run"},{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--gh"},{flag:"--github"},{flag:"--ref"}],la=m,ta=m,sa=[...m,{flag:"--markdown"},{flag:"--output"}],ia=m,na=m,oa=m,ra=[...m,{flag:"--dry-run"}],ga=[...m,{flag:"--offline",value_type:"boolean"},{flag:"--runtime-probe"},{flag:"--fix-managed-state"}],fa=[...m,{flag:"--watch"}],ca=[...m,{flag:"--detail"},{flag:"--trace"},{flag:"--fix-managed-state"},{flag:"--isolated"},{flag:"--ignore-global"},{flag:"--strict-exit"},{flag:"--fail-on-warn"}],Q=[...m,{flag:"--fields",list:!0}],pa=[...m,{flag:"--gh"},{flag:"--github"},{flag:"--ref"}],da=[{flag:"--dry-run"},{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--gh"},{flag:"--github"},{flag:"--ref"}],ge=[{flag:"--dry-run"},{flag:"--cli-only"},{flag:"--packages-only"},{flag:"--project"},{flag:"--local"},{flag:"--global"},{flag:"--repair"},{flag:"--tag"},{flag:"--package-name"}],Rl=[{flag:"--mode"},{flag:"--progress"}],ma=[{flag:"--release-assignment",value_type:"boolean"},{flag:"--id",value_name:"item-id"},{flag:"--reason",value_name:"value"},{flag:"--close-reason",value_name:"value"},{flag:"--completed-at",value_name:"value"},{flag:"--duplicate-of",value_name:"value"},{flag:"--author",value_name:"value"},{flag:"--message",value_name:"value"},{flag:"--validate-close",value_name:"off|warn|strict"},{flag:"--resolution",value_name:"value"},{flag:"--expected-result",aliases:["--expected_result","--expected"],value_name:"value"},{flag:"--actual-result",aliases:["--actual_result","--actual"],value_name:"value"},{flag:"--force",value_type:"boolean"}],ua=[{flag:"--filter-status",list:!0},{flag:"--filter-type"},{flag:"--filter-tag"},{flag:"--filter-priority"},{flag:"--filter-deadline-before"},{flag:"--filter-deadline-after"},{flag:"--filter-updated-after"},{flag:"--filter-updated-before"},{flag:"--filter-created-after"},{flag:"--filter-created-before"},{flag:"--filter-assignee"},{flag:"--filter-assignee-filter"},{flag:"--filter-assignee_filter"},{flag:"--filter-parent"},{flag:"--filter-sprint"},{flag:"--filter-release"},...ie,{flag:"--reason"},{flag:"--completed-at"},{flag:"--resolution"},{flag:"--expected-result",aliases:["--expected_result","--expected"]},{flag:"--actual-result",aliases:["--actual_result","--actual"]},{flag:"--validate-close"},{flag:"--author"},{flag:"--message"},{flag:"--force"},{flag:"--dry-run"},{flag:"--rollback"},{flag:"--no-checkpoint"}],_a=[{flag:"--id",value_name:"item-id"},{flag:"--body",short:"-b"},{flag:"--text"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],va=[{flag:"--start",value_type:"boolean"},{flag:"--id",value_name:"item-id"},{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"},{flag:"--if-available"},{flag:"--takeover-stale"},{flag:"--next"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--assignee-filter"},{flag:"--parent"},{flag:"--sprint"},{flag:"--release"},{flag:"--max-attempts"},{flag:"--include-decisions"},{flag:"--include-gates"},{flag:"--include-containers"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--explain-ranking",aliases:["--explain_ranking"]}],ha=[{flag:"--id",value_name:"item-id"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],Ta=[{flag:"--id",value_name:"item-id"},{flag:"--dry-run"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],ya=[{flag:"--pause",value_type:"boolean"},{flag:"--handoff",value_name:"status"},{flag:"--id",value_name:"item-id"},{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"}],Aa=[{flag:"--id",value_name:"item-id"},{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"},{flag:"--takeover-stale"}],ka=[{flag:"--id",value_name:"item-id"},{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--force"}],ba=[{flag:"--id",value_name:"item-id"},{flag:"--author",aliases:["--assignee"]},{flag:"--message"},{flag:"--validate-close",value_name:"off|warn|strict"},{flag:"--force"}],fe=[{flag:"--parent"},{flag:"--allow-missing-parent"},{flag:"--tags"},{flag:"--priority"},{flag:"--body"},{flag:"--description"},{flag:"--author"},{flag:"--message"}],ce=[{flag:"--start"},{flag:"--duration"},{flag:"--end"},{flag:"--location"},{flag:"--timezone"},{flag:"--all-day"},...fe],Ca=ce,Sa=[{flag:"--at"},{flag:"--text"},...fe],Na=[{flag:"--list"},{flag:"--id",value_name:"item-id"},{flag:"--add"},{flag:"--add-json"},{flag:"--remove"},{flag:"--remove-index",repeatable:!0},{flag:"--update"},{flag:"--update-index"},{flag:"--set-json"},{flag:"--run"},{flag:"--match"},{flag:"--only-index"},{flag:"--only-last"},{flag:"--full-history"},{flag:"--background"},{flag:"--timeout"},{flag:"--progress"},{flag:"--env-set"},{flag:"--env-clear"},{flag:"--shared-host-safe"},{flag:"--pm-context"},{flag:"--override-linked-pm-context"},{flag:"--workspace-context"},{flag:"--override-linked-workspace-context"},{flag:"--allow-untrusted-linked-tests"},{flag:"--acknowledge-linked-tests"},{flag:"--fail-on-context-mismatch"},{flag:"--fail-on-skipped"},{flag:"--fail-on-empty-test-run"},{flag:"--require-assertions-for-pm"},{flag:"--check-context"},{flag:"--full-output"},{flag:"--auto-pm-context"},{flag:"--measure",list:!0,description:"Record numeric measurement evidence; requires --run and an executed linked command."},{flag:"--metric-below"},{flag:"--metric-diff"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],wa=[{flag:"--status"},{flag:"--limit"},{flag:"--offset"},{flag:"--background"},{flag:"--timeout"},{flag:"--progress"},{flag:"--env-set"},{flag:"--env-clear"},{flag:"--shared-host-safe"},{flag:"--pm-context"},{flag:"--override-linked-pm-context"},{flag:"--workspace-context"},{flag:"--override-linked-workspace-context"},{flag:"--allow-untrusted-linked-tests"},{flag:"--fail-on-context-mismatch"},{flag:"--fail-on-skipped"},{flag:"--fail-on-empty-test-run"},{flag:"--require-assertions-for-pm"},{flag:"--check-context"},{flag:"--full-output"},{flag:"--auto-pm-context"}],Oa=[{flag:"--limit"}],Il=[{flag:"--status"},{flag:"--limit"},{flag:"--stream"},{flag:"--tail"},{flag:"--force"},{flag:"--author"}],Ea=[{flag:"--dry-run"},{flag:"--scope"}],xa=[{flag:"--include-empty"},{flag:"--storage"},{flag:"--metadata-coverage"},{flag:"--field-utilization"},{flag:"--by-assignee"},{flag:"--by-tag"},{flag:"--by-priority"},{flag:"--tag-prefix"},{flag:"--analytics"}],La=[{flag:"--exhaustive",value_type:"boolean"},{flag:"--status",repeatable:!0,list:!0},{flag:"--since"},{flag:"--threshold"},{flag:"--limit"}],Ra=[{flag:"--strict-directories"},{flag:"--require-merge-drivers"},{flag:"--strict-exit"},{flag:"--fail-on-warn"},{flag:"--check-only"},{flag:"--check-telemetry"},{flag:"--no-refresh"},{flag:"--refresh-vectors"},{flag:"--verbose-stale-items"},{flag:"--verbose-author-events"},{flag:"--brief"},{flag:"--summary"},{flag:"--skip-vectors"},{flag:"--skip-integrity"},{flag:"--skip-drift"},{flag:"--full"}],Ia=[{flag:"--check-completeness",value_type:"boolean"},{flag:"--check-metadata"},{flag:"--metadata-profile"},{flag:"--check-resolution"},{flag:"--check-lifecycle"},{flag:"--check-stale-blockers"},{flag:"--dependency-cycle-severity"},{flag:"--parent-cycle-severity"},{flag:"--check-files"},{flag:"--scan-mode"},{flag:"--include-pm-internals"},{flag:"--verbose-file-lists"},{flag:"--verbose-diagnostics"},{flag:"--all-affected-ids"},{flag:"--strict-exit"},{flag:"--fail-on-warn"},{flag:"--fix-hints"},{flag:"--auto-fix"},{flag:"--dry-run"},{flag:"--fix-scope"},{flag:"--prune-missing"},{flag:"--check-history-drift"},{flag:"--check-command-references"},{flag:"--check-storage-integrity"},{flag:"--counts"},{flag:"--full"}],pe=[{flag:"--definition",value_name:"json"},{flag:"--trigger",value_name:"value"},{flag:"--tree",value_name:"value"},{flag:"--gate",value_name:"id"},{flag:"--limit",value_name:"number"},{flag:"--dry-run"},{flag:"--author",value_name:"value"},{flag:"--message",value_name:"value"},{flag:"--owner",value_name:"item-id"},{flag:"--apply",value_type:"boolean"},{flag:"--enforcement",value_name:"level"}],de=[{flag:"--assignee"},{flag:"--parent"},{flag:"--allow-missing-parent"},{flag:"--allow-unresolved-deps"},{flag:"--reviewer"},{flag:"--risk"},{flag:"--confidence"},{flag:"--sprint"},{flag:"--release"},{flag:"--blocked-by"},{flag:"--blocked-reason"},{flag:"--unblock-note"},{flag:"--reporter"},{flag:"--severity"},{flag:"--environment"},{flag:"--repro-steps"},{flag:"--resolution"},{flag:"--expected-result"},{flag:"--actual-result"},{flag:"--affected-version"},{flag:"--fixed-version"}],me=[{flag:"--component"},{flag:"--regression"},{flag:"--customer-impact"},{flag:"--customer_impact"},{flag:"--definition-of-ready"},{flag:"--definition_of_ready"},{flag:"--order"},{flag:"--rank"},{flag:"--goal"},{flag:"--objective"},{flag:"--value"},{flag:"--impact"},{flag:"--outcome"},{flag:"--why-now"},{flag:"--why_now"}],ue=[{short:"-p",flag:"--priority"},{flag:"--type"},{flag:"--tags",aliases:["--tag"],list:!0},{flag:"--add-tags",aliases:["--add_tags"]},{flag:"--remove-tags",aliases:["--remove_tags"]},{flag:"--deadline"},{flag:"--estimate"},{flag:"--estimated-minutes"},{flag:"--estimated_minutes"},{flag:"--acceptance-criteria"},{flag:"--acceptance_criteria"},{flag:"--ac"},{flag:"--add-ac",aliases:["--add_ac"]},{flag:"--remove-ac",aliases:["--remove_ac"]}],ee=[{flag:"--inherit-focus",value_type:"boolean",default:!0},{flag:"--no-inherit-focus",value_type:"boolean"},{flag:"--stdin-json"},{short:"-t",flag:"--title"},{flag:"--id"},{short:"-d",flag:"--description"},{flag:"--type"},{flag:"--template"},{flag:"--create-mode"},{flag:"--create_mode"},{flag:"--defer",repeatable:!0},{flag:"--defer-reason",aliases:["--defer_reason"]},{flag:"--schedule-preset"},{flag:"--schedule_preset"},{short:"-s",flag:"--status"},{flag:"--close-reason"},{flag:"--close_reason"},{flag:"--completed-at"},{flag:"--completed_at"},{short:"-p",flag:"--priority"},{flag:"--tags",aliases:["--tag"],list:!0},{flag:"--add-tags",aliases:["--add_tags"]},{short:"-b",flag:"--body",value_name:"value"},{flag:"--body-file"},{flag:"--deadline"},{flag:"--estimate"},{flag:"--estimated-minutes"},{flag:"--estimated_minutes"},{flag:"--acceptance-criteria"},{flag:"--acceptance_criteria"},{flag:"--ac"},{flag:"--author"},{flag:"--message"},...de,...me,{flag:"--blocked_by"},{flag:"--blocked_reason"},{flag:"--unblock_note"},{flag:"--repro_steps"},{flag:"--expected_result"},{flag:"--actual_result"},{flag:"--expected"},{flag:"--actual"},{flag:"--affected_version"},{flag:"--fixed_version"},{flag:"--dep"},{flag:"--type-option"},{flag:"--type_option"},{flag:"--field"},{flag:"--reminder"},{flag:"--event"},{flag:"--comment"},{flag:"--note"},{flag:"--learning"},{flag:"--file",aliases:["--linked-file"]},{flag:"--test",aliases:["--linked-test"]},{flag:"--doc"},{flag:"--unset",repeatable:!0},{flag:"--clear-deps"},{flag:"--clear-comments"},{flag:"--clear-notes"},{flag:"--clear-learnings"},{flag:"--clear-files"},{flag:"--clear-tests"},{flag:"--clear-docs"},{flag:"--clear-reminders"},{flag:"--clear-events"},{flag:"--clear-type-options"},{flag:"--allow-duplicate",value_type:"boolean"}],Fa=[{flag:"--transaction-id",value_name:"value"},{flag:"--stdin-json"},{flag:"--from",value_name:"path"},{flag:"--upsert-key",value_name:"field"},{flag:"--dry-run"},{flag:"--create-compensation",value_name:"mode"},{flag:"--lock-ttl-seconds",value_name:"n"},{flag:"--lock-wait-ms",value_name:"n"},{flag:"--author",value_name:"value"}],Ga=[{flag:"--id",value_name:"item-id"},{flag:"--transaction-id",value_name:"value",required:!0},{flag:"--reason",value_name:"value"},{flag:"--file",value_name:"value",repeatable:!0},{flag:"--doc",value_name:"value",repeatable:!0},{flag:"--test",value_name:"value",repeatable:!0},{flag:"--comment",value_name:"value",repeatable:!0},{flag:"--note",value_name:"value",repeatable:!0},{flag:"--learning",value_name:"value",repeatable:!0},{flag:"--resolution",value_name:"value"},{flag:"--expected-result",value_name:"value"},{flag:"--actual-result",value_name:"value"},{flag:"--completed-at",value_name:"value"},{flag:"--validate-close",value_name:"off|warn|strict"},{flag:"--lock-ttl-seconds",value_name:"n"},{flag:"--lock-wait-ms",value_name:"n"},{flag:"--dry-run"},{flag:"--force"},{flag:"--author",value_name:"value"}],Pa=[{flag:"--id",value_name:"item-id"},{flag:"--status",value_name:"open|in_progress"},{flag:"--expected-result",value_name:"value",aliases:["--expected"]},{flag:"--message",value_name:"value"},{flag:"--force"},{flag:"--author",value_name:"value"}],Ma=[{flag:"--id",value_name:"item-id"},{flag:"--title",value_name:"value"},{flag:"--author",value_name:"value"},{flag:"--message",value_name:"value"},{flag:"--allow-duplicate",value_type:"boolean"}],Da=[{flag:"--id",value_name:"item-id"},{flag:"--clear"}],$a=[{flag:"--id",value_name:"item-id"},{flag:"--stdin-json"},{short:"-t",flag:"--title"},{short:"-d",flag:"--description"},{short:"-b",flag:"--body"},{flag:"--body-file"},{short:"-s",flag:"--status"},{flag:"--close-reason"},{flag:"--close_reason"},{flag:"--completed-at"},...ue,...de,{flag:"--fixed_version"},...me,{flag:"--author"},{flag:"--message"},{flag:"--blocked_by"},{flag:"--blocked_reason"},{flag:"--unblock_note"},{flag:"--repro_steps"},{flag:"--expected_result"},{flag:"--actual_result"},{flag:"--expected"},{flag:"--actual"},{flag:"--affected_version"},{flag:"--dep"},{flag:"--dep-remove"},{flag:"--dep_remove"},{flag:"--replace-deps"},{flag:"--replace-tests"},{flag:"--replace-files"},{flag:"--replace-docs"},{flag:"--comment"},{flag:"--note"},{flag:"--learning"},{flag:"--file",aliases:["--linked-file"]},{flag:"--test",aliases:["--linked-test"]},{flag:"--doc"},{flag:"--reminder"},{flag:"--event"},{flag:"--type-option"},{flag:"--type_option"},{flag:"--field"},{flag:"--unset",repeatable:!0},{flag:"--clear-deps"},{flag:"--clear-comments"},{flag:"--clear-notes"},{flag:"--clear-learnings"},{flag:"--clear-files"},{flag:"--clear-tests"},{flag:"--clear-docs"},{flag:"--clear-reminders"},{flag:"--clear-events"},{flag:"--clear-type-options"},{flag:"--force"}],Ua=[{flag:"--status",short:"-s"},{flag:"--assignee"},{flag:"--parent"},{flag:"--blocked-by",aliases:["--blocked_by"]},{flag:"--blocked-reason",aliases:["--blocked_reason"]},{flag:"--unblock-note",aliases:["--unblock_note"]},{flag:"--filter-status",list:!0},{flag:"--filter-type",list:!0},{flag:"--filter-tag",list:!0},{flag:"--filter-priority",list:!0},{flag:"--filter-deadline-before"},{flag:"--filter-deadline-after"},{flag:"--filter-updated-after"},{flag:"--filter-updated-before"},{flag:"--filter-created-after"},{flag:"--filter-created-before"},{flag:"--filter-assignee",list:!0},{flag:"--filter-assignee-filter"},{flag:"--filter-assignee_filter"},{flag:"--filter-parent"},{flag:"--filter-sprint",list:!0},{flag:"--filter-release",list:!0},{flag:"--filter-ac-missing"},{flag:"--filter-estimates-missing",aliases:["--filter-estimate-missing"]},{flag:"--filter-resolution-missing"},{flag:"--filter-metadata-missing"},...ie,{flag:"--dry-run"},{flag:"--rollback"},{flag:"--no-checkpoint"},{short:"-t",flag:"--title"},{short:"-d",flag:"--description"},{short:"-b",flag:"--body"},...ue,{flag:"--definition-of-ready"},{flag:"--definition_of_ready"},{flag:"--order"},{flag:"--rank"},{flag:"--goal"},{flag:"--objective"},{flag:"--value"},{flag:"--impact"},{flag:"--outcome"},{flag:"--why-now"},{flag:"--why_now"},{flag:"--reviewer"},{flag:"--risk"},{flag:"--confidence"},{flag:"--sprint"},{flag:"--release"},{flag:"--reporter"},{flag:"--severity"},{flag:"--environment"},{flag:"--repro-steps"},{flag:"--repro_steps"},{flag:"--resolution"},{flag:"--expected-result"},{flag:"--expected_result"},{flag:"--expected"},{flag:"--actual-result"},{flag:"--actual_result"},{flag:"--actual"},{flag:"--affected-version"},{flag:"--affected_version"},{flag:"--fixed-version"},{flag:"--fixed_version"},{flag:"--component"},{flag:"--regression"},{flag:"--customer-impact"},{flag:"--customer_impact"},{flag:"--allow-unresolved-deps"},{flag:"--dep"},{flag:"--dep-remove"},{flag:"--dep_remove"},{flag:"--replace-deps"},{flag:"--replace-tests"},{flag:"--replace-files"},{flag:"--replace-docs"},{flag:"--comment"},{flag:"--note"},{flag:"--learning"},{flag:"--file"},{flag:"--test"},{flag:"--doc"},{flag:"--reminder"},{flag:"--event"},{flag:"--type-option"},{flag:"--type_option"},{flag:"--unset",repeatable:!0},{flag:"--clear-deps"},{flag:"--clear-comments"},{flag:"--clear-notes"},{flag:"--clear-learnings"},{flag:"--clear-files"},{flag:"--clear-tests"},{flag:"--clear-docs"},{flag:"--clear-reminders"},{flag:"--clear-events"},{flag:"--clear-type-options"},{flag:"--author"},{flag:"--message"},{flag:"--force"}],ae=[{flag:"--view"},{flag:"--date"},{flag:"--from"},{flag:"--to"},{flag:"--past"},{flag:"--full-period"},{flag:"--full_period"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--status"},{flag:"--assignee"},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--sprint"},{flag:"--release"},{flag:"--include"},{flag:"--recurrence-lookahead-days"},{flag:"--recurrence-lookback-days"},{flag:"--occurrence-limit"},{flag:"--limit"},{flag:"--after",cursor_semantics:"presentation"},{flag:"--format"}],ja=[{flag:"--id"},{flag:"--op"},{flag:"--author"},{flag:"--from"},{flag:"--to"},{flag:"--limit"},{flag:"--after",cursor_semantics:"presentation"},{flag:"--unbounded"},{flag:"--compact"},{flag:"--raw"},{flag:"--full"},{flag:"--provenance"},{flag:"--provenance-summary"},{flag:"--harness",repeatable:!0},{flag:"--agent-instance",repeatable:!0},{flag:"--provenance-filter",repeatable:!0},{flag:"--stream"}],Ha=[{flag:"--verify"},{flag:"--since"},{flag:"--type",repeatable:!0},{flag:"--author",repeatable:!0},{flag:"--item",repeatable:!0},{flag:"--limit",value_type:"number"},{flag:"--cursor-mode",value_name:"batch|row"},{flag:"--full"},{flag:"--provenance"},{flag:"--provenance-summary"},{flag:"--harness",repeatable:!0},{flag:"--agent-instance",repeatable:!0},{flag:"--provenance-filter",repeatable:!0},{flag:"--follow"},{flag:"--interval-ms",value_type:"number"}],le=$([{flag:"--for",value_name:"intent"},{flag:"--date"},{flag:"--from"},{flag:"--to"},{flag:"--past"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--assignee"},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--sprint"},{flag:"--release"},{flag:"--parent"},{flag:"--limit",aliases:["--max-items"]},{flag:"--after"},{flag:"--format"},{flag:"--depth",values:U},{flag:"--fields",list:!0},{flag:"--section"},{flag:"--activity-limit"},{flag:"--stale-threshold"},{flag:"--explain-ranking"},{flag:"--explain_ranking"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--no-extension-health"},{flag:"--no-tags"}],new Set(["--limit","--after","--format","--fields","--section","--activity-limit","--stale-threshold","--explain-ranking","--explain_ranking","--no-extension-health","--no-tags"])),za=[{flag:"--id",value_name:"item-id"},{flag:"--for",value_name:"intent"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--depth",values:q},{flag:"--full",value_type:"boolean"},{flag:"--fields",list:!0},{flag:"--at"},{flag:"--tree"},{flag:"--tree-depth"},{flag:"--tree_depth"},{flag:"--format"}],Xa=[{flag:"--list"},{flag:"--format"},{flag:"--depth"}],qa=[{flag:"--id",value_name:"item-id"},{flag:"--format"},{flag:"--max-depth"},{flag:"--collapse"},{flag:"--summary"},{flag:"--full"},{flag:"--node-limit"},{flag:"--edge-limit"},{flag:"--token-budget"},{flag:"--cursor"},{flag:"--direction"},{flag:"--kind",list:!0}],Ya=[{flag:"--kind",list:!0},{flag:"--max-depth",description:`Maximum traversal depth; paths default to ${T.path_depth}.`},{flag:"--limit",description:`Maximum rows per collection; default ${T.rows}. Use --full to remove the row cap.`},{flag:"--after"},{flag:"--direction"},{flag:"--max-paths",description:`Maximum enumerated paths; default ${T.paths}.`},{flag:"--sample",description:`Maximum evidence examples per audit finding; default ${T.samples}.`},{flag:"--exempt-isolate",list:!0},{flag:"--exempt-isolate-type",list:!0},{flag:"--save-baseline"},{flag:"--rebuild"},{flag:"--clear"},{flag:"--summary"},{flag:"--full"}],Ba=[{flag:"--mode"},{flag:"--k"},{flag:"--fail-under"},{flag:"--queries"},{flag:"--format"}],_=[{flag:"--dry-run"},{flag:"--force"},{flag:"--author"},{flag:"--message"}],_e=[],Va=[{flag:"--include-decisions"},{flag:"--include-gates"},{flag:"--include-containers"},{flag:"--for",value_name:"intent"},{flag:"--type"},{flag:"--tag"},{flag:"--priority"},{flag:"--assignee"},{flag:"--assignee-filter"},{flag:"--assignee_filter"},{flag:"--sprint"},{flag:"--release"},{flag:"--parent"},{flag:"--limit"},{flag:"--blocked-limit"},{flag:"--blocked_limit"},{flag:"--ready-only"},{flag:"--ready_only"},{flag:"--format"},{flag:"--explain-ranking"},{flag:"--explain_ranking"},{flag:"--token-budget",aliases:["--token_budget"]}],Ka=$([{flag:"--for",value_name:"intent"},{flag:"--token-budget",aliases:["--token_budget"]},{flag:"--mode"},{flag:"--semantic"},{flag:"--hybrid"},{flag:"--match-mode"},{flag:"--min-score"},{flag:"--count"},{flag:"--semantic-weight"},{flag:"--include-linked"},{flag:"--title-exact"},{flag:"--phrase-exact"},{flag:"--highlight"},{flag:"--compact"},{flag:"--full"},{flag:"--fields",list:!0},{flag:"--format"},{flag:"--limit"},{flag:"--after"},{flag:"--status",list:!0},{flag:"--type",list:!0},{flag:"--tag",aliases:["--tags"],list:!0},{flag:"--priority",list:!0},{flag:"--deadline-before"},{flag:"--deadline-after"},{flag:"--updated-after"},{flag:"--updated-before"},{flag:"--created-after"},{flag:"--created-before"},{flag:"--assignee",list:!0},{flag:"--sprint",list:!0},{flag:"--release",list:!0},{flag:"--parent"},...se],new Set(["--highlight","--compact","--full","--fields","--format","--limit","--token-budget","--after"])),Wa=[{flag:"--action"},{flag:"--command"},{flag:"--summary"},{flag:"--schema-only"},{flag:"--flags-only"},{flag:"--availability-only"},{flag:"--runtime-only"},{flag:"--active-only"},{flag:"--full"}],Ja=[{flag:"--eager-tags"}];function Fl(e){let a=new Set,l=[];for(let t of e){let i=(t.aliases??[]).join(","),f=`${t.flag}|${t.short??""}|${i}`;a.has(f)||(a.add(f),l.push(t))}return l}function O(e,a=!1){let l=new Map;for(let t of[...D,...e]){let i=E(t.flag),f=l.get(i),{aliases:c,...p}=t,o=b([...c??[],...t.flag===i?[]:[t.flag]]).filter(u=>u!==i),d={...p,flag:i,...o.length>0?{aliases:o}:{}},r=b([...f?.aliases??[],...d.aliases??[]]);l.set(i,f===void 0?d:{...f,...d,...r.length>0?{aliases:r}:{}})}if(a&&e.length>0&&!l.has("--format")){let t=l.get("--output-format");l.set("--output-format",{...t,aliases:[...t.aliases??[],"--format"]})}return M([...l.values()])}var Za=["list-draft","list-open","list-in-progress","list-blocked","list-closed","list-canceled"],Qa=P.filter(e=>e.flag!=="--status"&&e.flag!=="--all");function x(e){let a=new Map;for(let l of e)for(let t of[l.flag,...l.aliases??[]]){let i=a.get(t)??[];i.push(l),a.set(t,i)}return a}var el=x(ne),al=x(pe),ll=new Map([["assurance",al],["plan",el],["workspace",x(_e)],["workspace snapshot",x(_)]]);function tl(e=h){return e.map(({command:a,parent:l,accepted_flags:t})=>{let i=ll.get(l);if(!i)throw new Error(`Positional action ${a} has no flag-contract index for ${l}.`);let f=t.map(c=>{let p=i.get(c)??[];if(p.length!==1)throw new Error(`Positional action ${a} accepted flag ${c} does not resolve to exactly one ${l} flag contract.`);return p[0]});return[a,f]})}var sl=tl(),ve=new Map([["list",P],["list-all",P],...Za.map(e=>[e,Qa]),["templates",ee],["cal",ae],["ctx",le],["test-runs-worker",[]],["init",Ze],["config",Qe],["extension",oe],["package",Z],["packages",Z],["install",da],["upgrade",ge],["create",ee],["item",[]],["item mutate",Fa],["item complete",Ga],["item reopen",Pa],["copy",Ma],["focus",Da],["aggregate",Me],["calendar",ae],["context",le],["get",za],["guide",Xa],["search",Ka],["next",Va],["eval",Ba],["workspace",_],["workspace position",_e],["workspace snapshot",_],["workspace snapshot create",_],["workspace snapshot list",_],["workspace snapshot inspect",_],["workspace snapshot restore",_],["workspace snapshot delete",_],["history",ze],["history-redact",qe],["history-repair",Ye],["history-author-acknowledge",Be],["history-compact",Ve],["history-attest",Ke],["merge",Xe],["schema",We],["profile",Je],["plan",ne],["activity",ja],["events",Ha],["restore",ha],["update",$a],["update-many",Ua],["close",ma],["close-many",ua],["delete",Ta],["append",_a],["comments",De],["notes",$e],["learnings",Ue],["files",je],["docs",He],["deps",qa],["graph",Ya],["test",Na],["test-all",wa],["telemetry",Oa],["health",Ra],["assurance",pe],...sl,["validate",Ia],["gc",Ea],["stats",xa],["duplicates",La],["contracts",Wa],["completion",Ja],["claim",va],["release",ya],["start-task",Aa],["pause-task",ka],["close-task",ba],["meet",ce],["event",Ca],["remind",Sa]]),he=new Map([["install",aa],["uninstall",la],["explore",ta],["manage",ga],["describe",sa],["reload",fa],["doctor",ca],["catalog",Q],["list",Q],["adopt",pa],["adopt-all",ia],["activate",na],["deactivate",oa],["migrate",ra]]);function Te(e){return typeof e!="string"?"":C(e.trim().toLowerCase())}function te(e){let a=Te(e);if(ve.has(a))return!0;let[l,t,...i]=a.split(/\s+/);return(l==="extension"||l==="package"||l==="packages")&&t!==void 0&&i.length===0&&(t==="init"||t==="scaffold"||he.has(t))}function il(e,a){return a==="init"||a==="scaffold"?e==="extension"?re:ea:he.get(a)??[]}function Gl(e){let a=Te(e);if(a.length===0)return O([]);let[l,t,...i]=a.split(/\s+/);if((l==="extension"||l==="package"||l==="packages")&&t!==void 0&&i.length===0)return(l==="package"||l==="packages")&&t==="upgrade"?O(ge,!0):O(il(l,t),te(a));let f=ve.get(a)??[];return O(f,te(a))}function Pl(e,a=!0){let l=M(e).flatMap(i=>[i.short,i.flag,...i.aliases??[]]).filter(i=>!!i),t=a?[...l,...D.flatMap(i=>[i.short,i.flag,...i.aliases??[]]).filter(i=>!!i)]:l;return b(t).join(" ")}export{b as a,ol as b,rl as c,gl as d,Ae as e,fl as f,ke as g,q as h,Y as i,cl as j,pl as k,dl as l,G as m,Oe as n,h as o,_l as p,Re as q,vl as r,w as s,F as t,N as u,K as v,Ie as w,S as x,hl as y,Tl as z,M as A,El as B,D as C,xl as D,Ll as E,P as F,Me as G,De as H,$e as I,Ue as J,je as K,He as L,ze as M,Xe as N,qe as O,Ye as P,Be as Q,Ve as R,Ke as S,We as T,Je as U,ne as V,Ze as W,Qe as X,oe as Y,m as Z,re as _,Z as $,ea as aa,aa as ba,la as ca,ta as da,sa as ea,ia as fa,na as ga,oa as ha,ra as ia,ga as ja,fa as ka,ca as la,Q as ma,pa as na,da as oa,ge as pa,Rl as qa,ma as ra,ua as sa,_a as ta,va as ua,ha as va,Ta as wa,ya as xa,Aa as ya,ka as za,ba as Aa,ce as Ba,Ca,Sa as Da,Na as Ea,wa as Fa,Oa as Ga,Il as Ha,Ea as Ia,xa as Ja,La as Ka,Ra as La,Ia as Ma,pe as Na,ee as Oa,Fa as Pa,Ga as Qa,Pa as Ra,Ma as Sa,Da as Ta,$a as Ua,Ua as Va,ae as Wa,ja as Xa,Ha as Ya,le as Za,za as _a,Xa as $a,qa as ab,Ya as bb,Ba as cb,_ as db,Va as eb,Ka as fb,Wa as gb,Ja as hb,Fl as ib,tl as jb,sl as kb,te as lb,Gl as mb,Pl as nb};
|
|
2
|
-
//# sourceMappingURL=chunk-ZWJTY4ID.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8a0c0e0d-7d3b-55c6-984b-b6570362cf78")}catch{}})();function u(e,n){return{requested_tokens:e,feasible_tokens:null,minimum_feasible_tokens:null,minimum_status:"unavailable",basis:"canonical_retry",reason:n}}function _(e,n){let i=Math.min(Number.MAX_SAFE_INTEGER,Math.max(e.initialBudget,e.requested+1));for(let s=0;s<16;s+=1){if(n(i)!=="native_floor")return i;if(i===Number.MAX_SAFE_INTEGER)return;i=Math.min(Number.MAX_SAFE_INTEGER,i*2)}}function d(e){if(e.workUnits>1e6)return u(e.requested,"query_cost_limit");let n=new Map,i,s=t=>{let r=n.get(t);return r===void 0&&(r=e.probe(t),n.set(t,r)),r==="fits"&&(i=Math.min(i??t,t)),r},a=_(e,s);if(a===void 0)return u(e.requested,"search_limit");let o=0,l=a;for(let t=0;t<24&&l-o>1;t+=1){let r=o+Math.floor((l-o)/2);s(r)==="native_floor"?o=r:l=r}let f=Math.min(i??a,4096,Math.floor(1e5/Math.max(1,e.workUnits)));for(let t=1;t<=f;t+=1)if(s(t)==="fits")return{requested_tokens:e.requested,feasible_tokens:t,minimum_feasible_tokens:t,minimum_status:"exact",basis:"canonical_retry"};return i===void 0?u(e.requested,"output_constraints"):{requested_tokens:e.requested,feasible_tokens:i,minimum_feasible_tokens:null,minimum_status:"feasible_only",basis:"canonical_retry"}}export{d as findContextBudgetRecovery};
|
|
2
|
-
//# sourceMappingURL=context-budget-recovery-5MKOCGY5.js.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{b as E}from"./chunk-3V53UBHN.js";import{c as I}from"./chunk-CR7CGEB2.js";import"./chunk-3IRCYJI5.js";import{execFile as O}from"node:child_process";import{realpath as v}from"node:fs/promises";import b from"node:path";import{promisify as M}from"node:util";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new n.Error().stack;o&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[o]="5d2c2c37-5ff2-5dab-84f1-55a7fa8d5a27")}catch{}})();var w=M(O),x="[a-f0-9]{40}(?:[a-f0-9]{24})?",N=new RegExp(`^100(?:644|755) (${x}) 0$`,"u"),R=new RegExp(`^(${x}) blob (\\d+)$`,"u");async function _(n,o,a){let t=w("git",n,{...a,encoding:"buffer"}),e=t.child.stdin;return e!==null&&(e.on("error",()=>{t.child.kill()}),e.end(`${o.join(`
|
|
2
|
-
`)}
|
|
3
|
-
`)),(await t).stdout}function B(n,o){let a=new Map;for(let t of n.split("\0")){let e=t.indexOf(" "),i=t.slice(e+1),r=N.exec(t.slice(0,e));r!==null&&o.has(i)&&a.set(i,r[1])}return a}function D(n,o,a){let t=[],e=[],i=0;for(let r of n.trimEnd().split(/\r?\n/u)){let s=R.exec(r);if(s===null||!o.has(s[1]))continue;let c=Number(s[2]);!Number.isSafeInteger(c)||c>a||(e.length>0&&i+c+128>a&&(t.push(e),e=[],i=0),e.push({id:s[1],size:c}),i+=c+128)}return e.length>0&&t.push(e),t}function S(n,o,a){let t=0;for(let{id:e,size:i}of o){let r=n.indexOf(10,t)+1;if(r===0||n.subarray(t,r-1).toString("ascii")!==`${e} blob ${i}`||n[r+i]!==10)throw new Error("Invalid indexed receipt batch framing");a.set(e,n.subarray(r,r+i).toString("utf8")),t=r+i+1}if(t!==n.length)throw new Error("Unexpected indexed receipt batch data")}async function k(n,o,a,t,e,i={}){let r=I();r.GIT_NO_REPLACE_OBJECTS="1",e===void 0&&process.env.GIT_INDEX_FILE!==void 0&&(r.GIT_INDEX_FILE=b.resolve(process.env.GIT_INDEX_FILE));let s={cwd:n,env:r,windowsHide:!0,timeout:1e4,maxBuffer:t+256};try{let c=(await w("git",["rev-parse","--show-toplevel"],{...s,encoding:"utf8"})).stdout.trim(),[g,y]=await Promise.all([v(c),v(e??o)]),d=b.relative(g,e===void 0?y:b.resolve(e)).replaceAll("\\","/");if(E(d))return new Map;s.cwd=g;let m=new Map(a.map(f=>[`${d}/${f}`,f])),T=(await w("git",["ls-files","--stage","-z","--",`:(literal)${d}/`],{...s,encoding:"utf8"})).stdout,p=B(T,new Set(m.keys()));if(p.size===0)return new Map;let u=new Set(p.values()),$=(await _(["cat-file","--batch-check"],[...u],s)).toString("utf8"),l=new Map;for(let f of D($,u,t))S(await _(["cat-file","--batch"],f.map(h=>h.id),s),f,l);if(i.failOnReadError&&l.size!==u.size)throw new Error("Unable to read every indexed receipt blob");return new Map([...p].filter(([,f])=>l.has(f)).map(([f,h])=>[m.get(f),l.get(h)]))}catch(c){if(i.failOnReadError)throw c;return new Map}}export{k as readIndexedReceiptBlobs};
|
|
4
|
-
//# sourceMappingURL=indexed-receipt-blobs-AF4U3F3D.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{B as Ke,C as Je,E as Z,H as We,J as Be,K as Ve,M as Ye,N as He,a as xe,p as H}from"./chunk-UXQGFGAT.js";import"./chunk-WZWXGDYY.js";import"./chunk-AKJYOZZP.js";import{A as V,B as Ge,C as Y,D as qe,y as ze,z as j}from"./chunk-5C5TK3ET.js";import"./chunk-IWOXAUDU.js";import"./chunk-RQ252B6V.js";import"./chunk-3V53UBHN.js";import"./chunk-324AHXJO.js";import"./chunk-ML3JHCC6.js";import"./chunk-SVOOGGAK.js";import"./chunk-YKSLZPLT.js";import{T as Ne,W as je}from"./chunk-RKQNVYGF.js";import"./chunk-URGHTTT3.js";import"./chunk-2ZD7275J.js";import{Ga as Le}from"./chunk-USPYKWQG.js";import"./chunk-4KTFKSS3.js";import"./chunk-OPGOOP25.js";import{H as W}from"./chunk-RE7ZWT7D.js";import{ra as ve,xa as _e}from"./chunk-ZWJTY4ID.js";import"./chunk-HDEKFSOK.js";import"./chunk-4JZITIJB.js";import"./chunk-GHQVM6K6.js";import{L as Fe,R as Pe,b as ye,l as B}from"./chunk-3XSWH6QC.js";import{i as Ue,m as De,s as N}from"./chunk-BRZV7BFV.js";import"./chunk-I5LGPUWH.js";import"./chunk-C3O6JJPO.js";import{Bd as Ae,Cd as $e,Dd as J,Ga as b,Pd as Te,Sf as Ie,Tf as k,Yf as Me,Zf as Ce,af as C,fc as be,ff as Re,hc as K,ic as Se,kf as T,lc as Ee,pe as ke,ra as L,te as M,ud as Oe,ya as ge}from"./chunk-UWS3FC4D.js";import"./chunk-EGN2HFRU.js";import"./chunk-CR7CGEB2.js";import{A as l,E as q,G as we,H as $,l as me,q as A,s as fe,x as he,z as m}from"./chunk-3IRCYJI5.js";import oe from"node:crypto";import{constants as te,readFileSync as It}from"node:fs";import{cp as Mt,lstat as it,mkdir as Ct,mkdtemp as ot,open as Nt,readdir as jt,realpath as at,rm as st,stat as ae,writeFile as ct}from"node:fs/promises";import{tmpdir as dt}from"node:os";import u 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]="01728cbc-2037-50d2-8318-5f106714b8da")}catch{}})();var bt=new Set(["id","title","description","type","status","priority","tags","body","deadline","estimated_minutes","acceptance_criteria","definition_of_ready","order","rank","assignee",...me,"affected_version","fixed_version","component","regression","customer_impact","close_reason","completed_at","dependencies","comments","notes","learnings","files","tests","docs","reminders","events","type_options"]);(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]="6456f85b-e076-5048-9c21-03d477267259")}catch{}})();function X(e,t,n){let r=e?.estimatedMinutes;if(!(r===void 0||typeof r=="string"))throw new l(`Mutation ${n+1} ${t} option "estimatedMinutes" must be a string.`,m.USAGE,{code:"mutation_option_value_invalid",required:'Pass estimatedMinutes as a string, for example "45", in raw mutation options.',why:"Raw options use the create/update command option types; item documents accept numeric estimated_minutes instead.",nextSteps:["Quote the estimatedMinutes value or use an item document with numeric estimated_minutes, then retry the transaction."]})}(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]="54fb9d4c-c1aa-53dc-bcbe-4b0e3ebf87ba")}catch{}})();var St=["op","id","reason","options","unique","match"],Et=[...St,"ref"],Fn=[...Et,"item"];var Xe="[a-z][a-z0-9._-]{0,63}",Pn=new RegExp(`^${Xe}$`,"u"),xn=new RegExp(`(^|,)id=@(${Xe})(?=,|$)`,"gu"),Ze=e=>e.slice(2).replaceAll(/-([a-z])/gu,(t,n)=>n.toUpperCase());var Ot=new Set(["created_at","updated_at","closed_at","version","format_version","path","author","collection_counts","notes_count","tests_count","pm_format_version","claim_principal","test_runs","deferred_fields"]),zn=new Set([...Ot,"completed_at","id"]),Gn={create:Ne.map(e=>e.target),update:je.map(e=>e.target),close:ve.map(e=>Ze(e.flag)).filter(e=>e!=="reason"),release:_e.map(e=>Ze(e.flag))};function At(e){if(typeof e!="object"||e===null||Array.isArray(e))return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function $t(e,t){return e<t?-1:+(e!==t)}function Q(e){return Array.isArray(e)?e.map(Q):At(e)?Object.fromEntries(Object.entries(e).sort(([t],[n])=>$t(t,n)).map(([t,n])=>[t,Q(n)])):e}function S(e){return typeof e=="string"?e.trim():JSON.stringify(Q(e))}(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]="a52f23ab-bd2e-56a6-98f8-6b013aeb4f35")}catch{}})();var Tt=["id","updated_at","pm_format_version","type"],kt="import";function Qe(e,t){if(typeof e!="string"||!/^[A-Za-z][A-Za-z0-9_]*$/u.test(e)||e in Object.prototype)throw new TypeError(`${t} names an invalid field ${JSON.stringify(e)}; use a front-matter field name of letters, digits and underscores`);if(Tt.includes(e))throw new TypeError(`${t} cannot change "${e}"; the item writer derives it, or an update row owns it`)}function U(e){return Array.isArray(e)?`array of ${e.length}`:typeof e}var Rt=["__proto__","constructor","prototype"];function et(e){return e!==null&&typeof e=="object"&&Object.getPrototypeOf(e)===Object.prototype}function R(e){return e===null||typeof e=="string"||typeof e=="boolean"?!0:typeof e=="number"?Number.isFinite(e):Array.isArray(e)?Array.from(e).every(R):et(e)?Object.entries(e).every(([t,n])=>!Rt.includes(t)&&R(n)):!1}function ee(e,t){let{set:n,unset:r}=e;if(n!==void 0&&!et(n))throw new TypeError(`${t} set must be a plain object of front-matter fields`);if(r!==void 0&&!Array.isArray(r))throw new TypeError(`${t} unset must be an array of front-matter field names`);let i=Object.keys(n??{}),a=r??[];if(i.length+a.length===0)throw new TypeError(`${t} requires at least one field in set or unset`);for(let o of i)if(Qe(o,t),n[o]===null||!R(n[o]))throw new TypeError(`${t} set "${o}" must be a non-null JSON value (no undefined, non-finite number, sparse array, class instance, or __proto__/constructor/prototype key); remove a field with unset`);for(let o of a){if(Qe(o,t),o==="body"||o==="front_matter")throw new TypeError(`${t} cannot unset "${o}"; the item format reserves that name`);if(i.includes(o))throw new TypeError(`${t} both sets and unsets "${o}"`)}if(new Set(a).size!==a.length)throw new TypeError(`${t} unset repeats a field`)}async function tt(e){ee(e,`Finalization of ${e.id}`);let t=await N(e.pmRoot),n={schema:t.schema,extensionFieldNames:ye(k())},r=await Pe({pmRoot:e.pmRoot,settings:t,id:e.id,op:kt,author:e.author,message:e.message,force:e.force===!0,extensionFieldNames:n.extensionFieldNames,mutate:i=>{let a=structuredClone(i.metadata),o=i.metadata;for(let[c,d]of Object.entries(e.set??{}))o[c]=structuredClone(d);for(let c of e.unset??[])delete o[c];let s;try{Oe(i.metadata);let c=J(i,n),d=J(Ae($e(c,n),n),n);if(b(d)!==b(c))throw new TypeError("the stored item reads back as a different document; a set field collides with a name the item format reserves");s=c.metadata;let p=Object.entries(e.set??{}).find(([g,f])=>U(s[g])!==U(f));if(p!==void 0)throw new TypeError(`set "${p[0]}" is not stored as declared (${U(p[1])} normalizes to ${s[p[0]]===void 0?"an absent field":U(s[p[0]])})`)}catch(c){throw new l(`Finalization of ${e.id} would not store a readable item with the declared fields: ${c.message}`,m.USAGE,{code:"finalization_invalid_document",item_id:e.id,required:"Declare set and unset fields that leave a valid item under the workspace schema, with each set value in the shape its field stores.",why:"A finalization writes front-matter fields exactly, so the patched document is read back through the item reader, and each declared value is checked against what would be stored, before anything is written.",nextSteps:[`Run pm get ${e.id} --json to compare the current fields with the finalization, then correct the patch and retry the transaction.`]})}return{changedFields:[...new Set([...Object.keys(a),...Object.keys(s)])].filter(c=>Object.hasOwn(a,c)!==Object.hasOwn(s,c)||b(a[c])!==b(s[c])).sort((c,d)=>c.localeCompare(d))}}});return{item:r.item,changedFields:r.changedFields}}(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]="737c7105-2837-5a61-bb89-263c84ef1259")}catch{}})();async function Ut(e,t){if(!De(e))return{schema:K(t.schema),typeDefinitionsFromFile:[]};let n=await Ht(e,t.schema);return{schema:n.schema,typeDefinitionsFromFile:n.type_definitions_from_file??[]}}async function Dt(e,t,n,r){let i=L({...t,item_types:{...t.item_types,definitions:[...t.item_types?.definitions??[],...n.typeDefinitionsFromFile]}},k());return(await Fe(e,t.item_format,i.type_to_folder,void 0,n.schema)).flatMap(a=>{let o=a[r];return o==null?[]:[{id:a.id,value:o}]})}function se(e){let t=new Map,n=async r=>{let i=await N(e),a=await Ut(e,i),o=new Map;for(let s of await Dt(e,i,a,r)){let c=S(s.value);o.set(c,[...o.get(c)??[],s.id])}return o};return{lookup(r){let i=t.get(r)??n(r);return t.set(r,i),i},async recordCreate(r){for(let[i,a]of t){let o=r[i];if(o==null)continue;let s=await a,c=S(o);s.set(c,[...s.get(c)??[],String(r.id)])}},invalidate(){t.clear()}}}async function Ft(e,t){let n=S(t.value),r=(await e.lookup(t.key)).get(n)??[];if(r.length!==0)throw new l(`Upsert key "${t.key}" value ${JSON.stringify(n)} now matches existing item ${r.join(", ")}; the plan was resolved before it existed.`,m.CONFLICT,{code:"upsert_key_conflict",required:"Re-plan the document so the row updates the existing item instead of creating a duplicate.",why:"Keyed upsert is resolved before the writer lock, so every remaining create is re-checked under the lock; concurrent imports therefore cannot create two items for one key value.",nextSteps:["Re-run pm item mutate with the same document and --upsert-key; the re-plan turns the row into an update of the existing item.","Inspect the existing item first when its content should win over the document row."]})}function ut(e,t,n){let r=e.metadata[n.key],i=S(n.value);if(S(r)!==i)throw new l(`Item ${t} no longer carries upsert key "${n.key}" value ${JSON.stringify(i)}; the plan selected it before the key changed.`,m.CONFLICT,{code:"upsert_match_changed",required:"Re-plan the document so the row is resolved against the current key values.",why:"Keyed upsert selects its target before the writer lock, so the update re-reads the key under the lock instead of updating a mismatched item blindly.",nextSteps:["Re-run pm item mutate with the same document and --upsert-key; the re-plan creates or re-targets the row from the current key values."]})}function nt(e){if(e===null||typeof e!="object"||Array.isArray(e))return!1;let t=e;return typeof t.key=="string"&&t.key.trim().length>0&&t.value!==void 0&&t.value!==null}function x(e,t){let n={...e,...t};return e===void 0?n:W(e,n)}async function v(e,t){try{let n=(await H(t,{},{pmRoot:e})).item;return{id:n.id,closedAt:n.closed_at,updatedAt:n.updated_at,assignee:n.assignee,claimPrincipal:n.claim_principal}}catch(n){if(n instanceof l&&n.exitCode===m.NOT_FOUND)return;throw n}}function ce(e,t){let n=e.id.replaceAll(/[^a-zA-Z0-9._-]/gu,"_"),r=oe.createHash("sha256").update(b(e)).digest("hex").slice(0,12);return`${t+1}-${e.op}-${n}-${r}`}function Pt(e,t){let n=e.id.replaceAll(/[^a-zA-Z0-9._-]/gu,"_");return`${t+1}-${e.op}-${n}`}function h(e,t,n){return`bulk-item-transaction ${e} ${t} ${n}`}function de(e,t){return e===t||(e?.startsWith(`${t} | `)??!1)}async function O(e,t,n,r){let i=await M(u.join(e,"history",`${t}.jsonl`),t),a=h(n,r,"apply"),o=h(n,r,"compensate");for(let s=i.length-1;s>=0;s-=1){let c=i[s].message;if(de(c,a))return!0;if(c===o)return!1}return!1}async function z(e,t){let n=await v(e,t.id);if(n?.updatedAt===void 0)throw new l(`Bulk ${t.op} target ${t.id} does not exist or has no restorable version`,m.NOT_FOUND);let r=await M(u.join(e,"history",`${n.id}.jsonl`),n.id);if(r.length===0)throw new l(`Bulk ${t.op} target ${t.id} has no restorable history`,m.NOT_FOUND);return{target_updated_at:n.updatedAt,target_version:String(B(r)+r.length),target_history_hash:C(r),target_history_length:r.length}}function E(e,t,n){return new l(`Transaction ${e.transactionId} cannot safely compensate incomplete step ${n}; review item ${t} history before recovery.`,m.CONFLICT,{code:"transaction_partial_mutation",item_id:t,required:"Reconcile the item's partial or intervening changes before resuming this transaction.",why:"The retained history does not prove exclusive ownership of the changes to undo. The journal remains compensating instead of claiming a rollback or overwriting another writer.",nextSteps:[`Run pm history ${t} and inspect this transaction's retained compensation data before explicitly restoring or reconciling the item.`]})}function pt(e,t){let n=`bulk-item-transaction ${t} `;return[e.message,e.context?.item_transaction_step].some(r=>typeof r=="string"&&r.startsWith(n))}function xt(e,t,n){let{expectedHistory:r,length:i,version:a}=t;if(C(e)===r)return!1;if(typeof i!="number"||!Number.isSafeInteger(i)||i<1||C(e.slice(0,i))!==r||a!==String(B(e)+i))throw E(n,n.itemId,n.stepId);let o=h(n.transactionId,n.stepId,"apply"),s=e.slice(i),c=f=>de(f.message,o)||f.context?.item_transaction_step===o,d=h(n.transactionId,n.stepId,"compensate");if(s.filter(f=>c(f)||f.message===d).at(-1)?.message===d)return!1;let p=s.filter(c);if(p.length===0)return!1;let g=e.at(-1).after_hash===p.at(-1).after_hash&&s.every(f=>pt(f,n.transactionId));if(p.length!==s.length&&!g)throw E(n,n.itemId,n.stepId);return!0}async function lt(e,t){let n=u.join(e,"history",`${t}.jsonl`),r=await ke(n,t);return{history:r.entries,assertOwnedUnderLock:(i,a)=>{let o;try{o=It(n).equals(r.raw_bytes)&&Re(i)===r.entries.at(-1).after_hash}catch(s){throw Object.assign(a(),{cause:s})}if(!o)throw a()}}}async function I(e,t,n,r){let i=r!==null&&typeof r=="object"&&!Array.isArray(r)?r:void 0;if(i===void 0||typeof i.target_updated_at!="string")return;let a=i.target_updated_at,o=await v(e.pmRoot,t);if(o===void 0)return;let{history:s,assertOwnedUnderLock:c}=await lt(e.pmRoot,o.id),d=i.target_history_hash,p=typeof d=="string";if(typeof d=="string"){if(!xt(s,{expectedHistory:d,length:i.target_history_length,version:i.target_version},{...e,itemId:o.id,stepId:n}))return}else{if(o.updatedAt===a)return;if(!await O(e.pmRoot,o.id,e.transactionId,n))throw E(e,o.id,n)}let g=()=>Ve(t,typeof i.target_version=="string"?i.target_version:a,{force:!0,author:e.author,message:h(e.transactionId,n,"compensate")},{pmRoot:e.pmRoot});await T({pmRoot:e.pmRoot,id:o.id,validate:f=>{c(f,()=>E(e,o.id,n))},compensation:ft(e,t,n,"restore",p)},g)}var mt=new WeakMap;function ft(e,t,n,r,i){let a=i?ze(e.pmRoot,e.transactionId):void 0,o=a===void 0?void 0:mt.get(a);if(!(o?.stepId!==n||o.itemId!==t||o.operation!==r))return{transaction_id:e.transactionId,step_id:n,operations:[r],overrides:[]}}function ht(e,t,n){return{id:n,async inspect(){let r=await v(e.pmRoot,t.id);if(r===void 0)return{state:"pending"};if(r.closedAt!==void 0){let i=await M(u.join(e.pmRoot,"history",`${r.id}.jsonl`),r.id),a=`Compensated: interrupted bulk transaction ${e.transactionId}`;if(i.filter(o=>o.op==="close").at(-1)?.patch.some(o=>o.op==="add"||o.op==="replace"?o.path==="/metadata/close_reason"&&o.value===a:!1)??!1)throw new l(`Created item ${r.id} remains closed by transaction compensation; explicitly reopen or reconcile it before retrying.`,m.CONFLICT,{code:"transaction_create_compensated",item_id:r.id,required:"Review the compensated item and explicitly reopen it before retrying the same document.",why:"This item's latest closure belongs to transaction compensation. Automatically reopening it could overwrite later lifecycle decisions.",nextSteps:[`Run pm item reopen ${r.id} "Retry compensated creation" after reviewing its history, then retry the transaction.`]})}return{state:"applied",result:{id:r.id,op:"create"}}},async apply(){t.unique!==void 0&&await Ft(e.uniqueIndex,t.unique);let r=await Ke(x(t.options,{author:e.author,id:t.id,message:h(e.transactionId,n,"apply")}),{pmRoot:e.pmRoot}),i=r.item;return e.onCreateWarnings?.(String(i.id),r.warnings),await e.uniqueIndex.recordCreate(i),{id:String(i.id),op:"create"}},async compensate(){await zt(e,t.id,n)}}}async function zt(e,t,n){let r=await v(e.pmRoot,t);if(r===void 0||e.createCompensation==="close"&&r.closedAt!==void 0)return;let{history:i,assertOwnedUnderLock:a}=await lt(e.pmRoot,r.id),o=h(e.transactionId,n,"apply"),s=h(e.transactionId,n,"compensate"),c=i.filter(d=>de(d.message,o)||d.message===s).at(-1);if(c?.message!==s){if(c===void 0||!i.every(d=>pt(d,e.transactionId)))throw E(e,r.id,n);await T({pmRoot:e.pmRoot,id:r.id,validate:d=>{a(d,()=>E(e,r.id,n))},compensation:ft(e,t,n,e.createCompensation==="delete"?"delete":"close",!0)},async()=>{let d={force:!0,author:e.author,message:s};e.createCompensation==="delete"?await Be(t,d,{pmRoot:e.pmRoot}):await Z(t,`Compensated: interrupted bulk transaction ${e.transactionId}`,{...d,validateClose:"off"},{pmRoot:e.pmRoot})})}}function Gt(e,t,n){return{id:n,compensatePending:!0,async inspect(){let r=await v(e.pmRoot,t.id);return r===void 0?{state:"pending"}:await O(e.pmRoot,r.id,e.transactionId,n)?{state:"applied",result:{id:r.id,op:"update"}}:{state:"pending"}},async prepareCompensation(){return z(e.pmRoot,t)},async apply(){let r=()=>Je(t.id,x(t.options,{author:e.author,message:h(e.transactionId,n,"apply")}),{pmRoot:e.pmRoot}),i=t.match,a=i,o=(await T({pmRoot:e.pmRoot,id:await yt(e.pmRoot,t.id),validate:s=>{a!==void 0&&ut(s,t.id,a)},committed:s=>{i!==void 0&&(a={key:i.key,value:structuredClone(s.metadata[i.key])})},historyContext:{item_transaction_step:h(e.transactionId,n,"apply")}},r)).item;return e.uniqueIndex.invalidate(),{id:String(o.id),op:"update"}},async compensate(r){await I(e,t.id,n,r)}}}async function yt(e,t){return String((await H(t,{},{pmRoot:e})).item.id)}function qt(e,t,n){let r=h(e.transactionId,n,"apply");return{id:n,compensatePending:!0,async inspect(){let i=await v(e.pmRoot,t.id);return i===void 0||!await O(e.pmRoot,i.id,e.transactionId,n)?{state:"pending"}:{state:"applied",result:{id:i.id,op:t.op}}},async prepareCompensation(){return z(e.pmRoot,t)},async apply(){let i=await yt(e.pmRoot,t.id),{match:a}=t;return await He(e.pmRoot,()=>T({pmRoot:e.pmRoot,id:i,validate:o=>{a!==void 0&&ut(o,t.id,a)},historyContext:{item_transaction_step:r}},()=>tt({pmRoot:e.pmRoot,id:i,author:e.author,message:r,force:t.force,...t.set===void 0?{}:{set:t.set},...t.unset===void 0?{}:{unset:t.unset}}))),e.uniqueIndex.invalidate(),{id:i,op:t.op}},async compensate(i){await I(e,t.id,n,i)}}}function Lt(e,t,n){return{id:n,async inspect(){let r=await v(e.pmRoot,t.id);return r===void 0?{state:"pending"}:await O(e.pmRoot,r.id,e.transactionId,n)?{state:"applied",result:{id:r.id,op:"close"}}:r.closedAt===void 0?{state:"pending"}:{state:"applied",result:{id:r.id,op:"close"}}},async prepareCompensation(){return z(e.pmRoot,t)},async apply(){let r=(await Z(t.id,t.reason,x(t.options,{author:e.author,message:h(e.transactionId,n,"apply")}),{pmRoot:e.pmRoot})).item;return e.uniqueIndex.invalidate(),{id:String(r.id),op:"close"}},async compensate(r){await I(e,t.id,n,r)}}}function Kt(e,t,n){return{id:n,async inspect(){let r=await v(e.pmRoot,t.id);return r===void 0?{state:"pending"}:await O(e.pmRoot,r.id,e.transactionId,n)?{state:"applied",result:{id:r.id,op:"release"}}:r.assignee!==void 0||r.claimPrincipal!==void 0?{state:"pending"}:{state:"applied",result:{id:r.id,op:"release"}}},async prepareCompensation(){return z(e.pmRoot,t)},async apply(){let r=(await We(t.id,x(t.options,{author:e.author,message:h(e.transactionId,n,"apply")}),{pmRoot:e.pmRoot})).item;return e.uniqueIndex.invalidate(),{id:String(r.id),op:"release"}},async compensate(r){await I(e,t.id,n,r)}}}function ue(e,t,n){let r=ce(t,n),i=Jt(e,t,r);return mt.set(i,{transactionId:e.transactionId,stepId:r,itemId:t.id,operation:t.op!=="create"?"restore":e.createCompensation==="delete"?"delete":"close"}),i}function Jt(e,t,n){switch(t.op){case"create":return ht(e,t,n);case"update":return Gt(e,t,n);case"close":return Lt(e,t,n);case"release":return Kt(e,t,n);case"finalize":return qt(e,t,n)}}function Wt(e,t){if(e===null||typeof e!="object"||Array.isArray(e))throw new TypeError(`Bulk mutation ${t+1} must be an object`);if(!["create","update","close","release","finalize"].includes(e.op))throw new TypeError(`Bulk mutation ${t+1} op must be create, update, close, release, or finalize`);if(typeof e.id!="string"||e.id.trim().length===0)throw new TypeError(`Bulk mutation ${t+1} requires a non-empty id`);if(e.op==="close"&&(typeof e.reason!="string"||e.reason.trim().length===0))throw new TypeError(`Bulk close mutation ${t+1} requires a non-empty reason`);if(Bt(e,t),e.op==="finalize"){Vt(e,t);return}X(e.options,e.op,t)}function Bt(e,t){if(e.op==="create"&&e.unique!==void 0&&!nt(e.unique))throw new TypeError(`Bulk create mutation ${t+1} unique must be an object with a non-empty key and a value`);if((e.op==="update"||e.op==="finalize")&&e.match!==void 0&&!nt(e.match))throw new TypeError(`Bulk ${e.op} mutation ${t+1} match must be an object with a non-empty key and a value`)}var rt=["op","id","set","unset","match","force"];function Vt(e,t){let n=`Bulk finalize mutation ${t+1}`,r=Object.keys(e).filter(i=>!rt.includes(i));if(r.length>0)throw new TypeError(`${n} has unsupported keys: ${r.join(", ")}; a finalization carries only ${rt.join(", ")}`);if(e.force!==void 0&&typeof e.force!="boolean")throw new TypeError(`${n} force must be a boolean`);if(e.match!==void 0&&!R(e.match))throw new TypeError(`${n} match must be a plain object with a JSON value`);ee(e,n)}function ie(e){if(e.length===0)throw new TypeError("Bulk item transaction requires at least one mutation");let t=new Map;for(let[n,r]of e.entries()){if(Wt(r,n),r.op!=="create"||r.unique===void 0)continue;let{key:i,value:a}=r.unique,o=t.get(i)??new Map,s=S(a),c=o.get(s);if(c!==void 0)throw new l(`Bulk create mutations ${c+1} and ${n+1} share the upsert key value ${JSON.stringify(s)} for "${i}".`,m.USAGE,{code:"upsert_key_duplicate",required:"Each create must carry a distinct unique key value within one batch.",why:"Direct SDK batches must preserve the same uniqueness invariant as planned document rows."});o.set(s,n),t.set(i,o)}}function wt(e){let t=[...e];ie(t);let n=t.map(r=>{let i=structuredClone(r);return r.op!=="finalize"&&i.op!=="finalize"&&r.options!==void 0&&i.options!==void 0&&W(r.options,i.options),i});return ie(n),n}function gt(e,t=""){return e===null||typeof e!="object"?[]:Object.entries(e).flatMap(([n,r])=>{let i=`${t}/${n.replaceAll("~","~0").replaceAll("/","~1")}`;return/^(created_at|updated_at|closed_at|completed_at|timestamp)$/u.test(n)?[i]:gt(r,i)})}async function ne(e,t,n){try{return await n()}catch(r){throw r instanceof l?new l(r.message,r.exitCode,{...r.context,transaction_operation:{index:t,op:e.op,id:e.id}}):r}}function vt(e,t,n,r){let i=u.relative(e,t),a=i.split(u.sep);return a[0]==="extensions"&&a[2]==="node_modules"&&!r.some(o=>i===o||i.startsWith(`${o}${u.sep}`)||o.startsWith(`${i}${u.sep}`))?!1:["locks","runtime","search"].includes(i.split(u.sep)[0])?r.some(o=>i===o||i.startsWith(`${o}${u.sep}`)||o.startsWith(`${i}${u.sep}`)):i===""||n===void 0||n.some(o=>i===o||i.startsWith(`${o}${u.sep}`)||o.startsWith(`${i}${u.sep}`))}async function F(e,t){let n=await it(t);if(n.isSymbolicLink())await ae(t);else if(n.isDirectory()||n.isFile())return n;throw $(u.relative(e,t))}async function Yt(e,t){let n=await Nt(t,te.O_RDONLY|te.O_NOFOLLOW|te.O_NONBLOCK);try{let r=await n.stat();if(!r.isFile())throw $(u.relative(e,t));let i=oe.createHash("sha256");if(r.size>0)for await(let a of n.createReadStream({highWaterMark:64*1024,end:r.size-1,autoClose:!1}))i.update(a);return i.digest()}finally{await n.close()}}async function re(e,t,n){let r=oe.createHash("sha256");async function i(a){for(let o of(await jt(a)).sort()){let s=u.join(a,o);vt(e,s,t,n)&&((await F(e,s)).isDirectory()?await i(s):(r.update(JSON.stringify(u.relative(e,s))),r.update(await Yt(e,s))))}}return await i(e),r.digest("hex")}function D(){return new l("Tracker changed while preparing the transaction preview; retry against stable state.",m.CONFLICT,{code:"transaction_preview_snapshot_changed"})}async function pe(e){if(!q(e))return!1;let t=e.path;if(typeof t!="string")return!1;let n=u.resolve(t),r=n;for(;;)try{let i=await it(r);return r!==n&&i.isDirectory()}catch(i){if(!q(i))return!1;let a=u.dirname(r);if(a===r)return!1;r=a}}async function P(e,t){let n=u.join(e,t);try{let r=e;for(let i of t.split(u.sep).slice(0,-1))r=u.join(r,i),await F(e,r);if(!(await F(e,n)).isFile())throw $(t);return await we(n,$(t))}catch(r){if(await pe(r))return;throw r}}async function _t(e,t,n,r){let i=K(n);for(let[a,o]of Object.entries(i.files)){let s=u.relative(e,Se(e,o,be[a]));if(s===""||!u.resolve(e,s).startsWith(u.join(e,u.sep)))throw new l("Transaction preview requires schema files inside the selected tracker root; relocate the configured schema file before retrying.",m.USAGE,{code:"transaction_preview_external_schema",field:`schema.files.${a}`});i.files[a]=s;let c=await P(e,s);if(r?.set(s,c),c!==void 0){let d=u.join(t,s);await Ct(u.dirname(d),{recursive:!0}),await ct(d,c)}}return Ee(t,i)}async function Ht(e,t){await ae(e);let n=await ot(u.join(dt(),"pm-schema-plan-"));try{let r=await at(e);return await _t(r,u.join(n,"configuration"),t)}catch(r){throw await pe(r)?D():r}finally{await st(n,{recursive:!0,force:!0})}}async function Zt(e,t,n){let r=new Map,i=await P(e,A);r.set(A,i);let a;try{a=JSON.parse(i??"null")}catch{a=null}let o=Ue(a),s=o.success?o.data:void 0,c=await _t(e,t,s?.schema,r),d=c.schema,p=u.relative(e,Te(e));r.set(p,await P(e,p));let g=L({...he,item_types:{definitions:[...s?.item_types?.definitions??[],...c.type_definitions_from_file??[]]}},n),f=ge(e)===e?[...fe.filter(Boolean),A,xe,"transactions",...g.folders,...r.keys()].map(w=>u.normalize(w)):void 0,y=s===void 0?void 0:JSON.stringify({...a,schema:{...s.schema,files:d.files}});return{configuration:r,ownedPaths:f,stagedSettings:y,registryFolders:g.folders}}async function Xt(e,t,n){await ae(e);try{let r=await at(e),i=await Zt(r,u.join(u.dirname(t),"configuration"),n),a=[...i.configuration.keys(),...i.registryFolders].map(d=>u.normalize(d)),o=await re(r,i.ownedPaths,a);await Mt(r,t,{recursive:!0,dereference:!1,filter:async d=>vt(r,d,i.ownedPaths,a)?(await F(r,d),!0):!1});let[s,c]=await Promise.all([re(r,i.ownedPaths,a),re(t,i.ownedPaths,a)]);if(o!==s||o!==c)throw D();for(let[d,p]of i.configuration)if(await P(t,d)!==p)throw D();i.stagedSettings!==void 0&&await ct(u.join(t,A),i.stagedSettings)}catch(r){throw await pe(r)?D():r}}async function Ir(e){let t=j(e),n=wt(e.mutations),r=k(),i=Ce(),a=await ot(u.join(dt(),"pm-transaction-preview-")),o=u.join(a,"tracker");try{await Xt(t.pmRoot,o,r);let s=!1,c=[],d=[],p=new Set;return await Me(i,()=>Ye({path:o,noExtensions:!0},async()=>{Ie(r);let g={...t,pmRoot:o,createCompensation:"close",uniqueIndex:se(o)},f=n.map((y,w)=>{let _=ue({...g,onCreateWarnings:(G,le)=>{le.length>0&&c.push({index:w,id:G,op:"create",warnings:le})}},y,w);return{..._,inspect:()=>ne(y,w,()=>_.inspect()),prepareCompensation:()=>ne(y,w,async()=>_.prepareCompensation?.()),apply:()=>ne(y,w,async()=>{let G=await _.apply();return p.add(w),G})}});if(await V({...t,pmRoot:o,steps:f,onTransition:({transition:y})=>{y==="committed"&&(s=!0)}}),s)for(let[y,w]of n.entries()){let _=(await Le(w.id,{path:o},{full:!0})).item;d.push({index:y,id:String(_.id),op:w.op,execution:p.has(y)?"applied":"adopted",item:_,commit_time_fields:gt(_)})}})),{records:d,validated:s,state:s?"staged_snapshot":"replayed_committed_plan",warnings:c,unresolved_commit_constraints:["concurrent_tracker_changes","extension_write_hooks","derived_extension_dependencies_excluded","generated_timestamps_and_provenance"]}}finally{await st(a,{recursive:!0,force:!0})}}async function Qt(e){let t=j(e),n=wt(e.mutations),r=e.createCompensation??"close";if(!["close","delete"].includes(r))throw new TypeError("Bulk item transaction createCompensation must be close or delete");let i={...t,createCompensation:r,uniqueIndex:se(t.pmRoot)},a=await V({...t,steps:n.map((s,c)=>ue(i,s,c)),recoveryData:JSON.parse(JSON.stringify({kind:"item-mutations-v1",mutations:n,createCompensation:r})),...e.lockTtlSeconds===void 0?{}:{lockTtlSeconds:e.lockTtlSeconds},...e.lockWaitMs===void 0?{}:{lockWaitMs:e.lockWaitMs},...e.onTransition===void 0?{}:{onTransition:e.onTransition}}),o={};for(let[s,c]of n.entries()){let d=ce(c,s),p=a.results[d];o[Pt(c,s)]=p}return{transactionId:a.transactionId,status:"committed",recovered:a.recovered,results:o}}function en(e){let t=[];return e.evidence!==void 0&&Object.keys(e.evidence).length>0&&t.push({op:"update",id:e.id,options:e.evidence}),t.push({op:"close",id:e.id,reason:e.reason,...e.closeOptions===void 0?{}:{options:e.closeOptions}},{op:"release",id:e.id,...e.releaseOptions===void 0?{}:{options:e.releaseOptions}}),t}function Mr(e){return Qt({pmRoot:e.pmRoot,transactionId:e.transactionId,author:e.author,mutations:en(e),...e.lockTtlSeconds===void 0?{}:{lockTtlSeconds:e.lockTtlSeconds},...e.lockWaitMs===void 0?{}:{lockWaitMs:e.lockWaitMs},...e.onTransition===void 0?{}:{onTransition:e.onTransition}})}var Cr={buildCreateStep:ht,bulkHistoryMarker:h,compensateByRestore:I,deriveStepId:ce,isUpdateMarkerApplied:O,readItemSnapshot:v};async function Nr(e,t){let n=await Ge(e,t);return n===void 0?void 0:{journal:n,planDigest:Y(n)}}function tn(e,t){let n=t.recoveryData;if(n===null||typeof n!="object"||Array.isArray(n)||n.kind!=="item-mutations-v1"||!Array.isArray(n.mutations)||!["close","delete"].includes(String(n.createCompensation)))throw new l("Transaction has no supported item recovery plan",m.CONFLICT,{code:"transaction_recovery_plan_missing",required:"Resume with the original plan and its original adapter.",why:"Legacy or foreign journals cannot safely reconstruct item compensation."});let r=n.mutations;ie(r);let i={...e,createCompensation:n.createCompensation,uniqueIndex:se(e.pmRoot)};return r.map((a,o)=>ue(i,a,o))}async function jr(e){let t=j(e),n=await qe({...e,...t,resolveSteps:r=>tn({...e,...t},r)});return{journal:n,planDigest:Y(n)}}export{Cr as _testOnlyItemTransaction,jr as abandonItemTransaction,en as buildItemCompletionMutations,Mr as commitItemCompletion,Qt as commitItemMutations,Dt as listUpsertKeyCandidates,Ht as loadGuardedRuntimeSchema,Ir as previewItemMutations,Nr as readItemTransaction,Ut as resolveTransactionSchema};
|
|
2
|
-
//# sourceMappingURL=item-transaction-GLACUTPL.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{le as t,me as s,ne as r}from"./chunk-UWS3FC4D.js";import"./chunk-3IRCYJI5.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new o.Error().stack;e&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[e]="44d57a71-ac49-5db8-b461-ce985801bb3c")}catch{}})();function d(o){let e=s(o),n={...e.harness===void 0?{}:{harness:e.harness},...e.model===void 0?{}:{model:e.model},...e.model_source===void 0?{}:{model_source:e.model_source},...e.instance===void 0?{}:{instance:e.instance}};return Object.freeze({author:o,author_source:t(o),principal:r(o),...Object.keys(n).length===0?{}:{agent:Object.freeze(n)}})}export{d as resolveMutationActor};
|
|
2
|
-
//# sourceMappingURL=mutation-actor-TCYDPUGG.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{t as E,y as N}from"./chunk-324AHXJO.js";import"./chunk-YKSLZPLT.js";import{T as C,W as R}from"./chunk-RKQNVYGF.js";import"./chunk-RE7ZWT7D.js";import{Oa as h,Ua as w}from"./chunk-ZWJTY4ID.js";import"./chunk-3XSWH6QC.js";import{s as A}from"./chunk-BRZV7BFV.js";import"./chunk-I5LGPUWH.js";import"./chunk-C3O6JJPO.js";import{a as g,ad as y,oc as T,pc as O,xa as _}from"./chunk-UWS3FC4D.js";import{A as f}from"./chunk-3IRCYJI5.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="d19ff816-7570-5e8a-a4de-ad2ca48f0df0")}catch{}})();function b(t,o,r,a=!1){let d=[...r].map(n=>({candidate:n,distance:g(o,n,3)})).filter(n=>n.distance!==null).sort((n,i)=>n.distance-i.distance||n.candidate.localeCompare(i.candidate))[0]?.candidate,s=a?`Put mutation fields under options (options.${o}).`:d?`Did you mean "${d}"?`:"Use the declared command options or the field option for registered item fields.";throw new f(`Unknown ${t} ${a?"argument":"option"} "${o}". ${s} No changes were made.`,2,{code:"invalid_argument_value",reason:"unknown_mutation_option",changed:!1,field:o,required:s,nextSteps:[s]})}async function j(t,o,r,a,d){if(E(o))return;let s=t==="create"?C:R,n=(t==="create"?h:w).map(({flag:e})=>e.slice(2).replace(/-([a-z])/gu,(m,v)=>v.toUpperCase())),i=new Set([...s.flatMap(e=>[e.target,...e.keys]),...n]),l=["outputInclude","outputLimit","outputBudget","outputFormat","outputSession","outputCursor"];for(let e of["author","message","force","fullChangedFields","idOnly",...l])i.add(e);let S=new Set(["action","options","path","cwd","author","force","noExtensions","no_extensions","fullChangedFields","idOnly",...l,...d,...t==="update"?["id"]:[]]);for(let e of Object.keys(o))S.has(e)||b(t,e,i,i.has(e));let u=o.options;if(u!==void 0&&!N(u))throw new f("Mutation options must be an object. No changes were made.",2,{code:"invalid_argument_value",changed:!1});let c=[...new Set([...Object.keys(u??{}),...Object.keys(r)])].filter(e=>!i.has(e));if(c.length===0)return;let p=T((await A(_(process.cwd(),a))).schema).command_to_fields.get(t)??[];for(let e of p)i.add(O(e));for(let e of c)p.some(m=>y({[e]:!0},m)===!0)||b(t,e,i)}export{j as assertNativeMutationOptions};
|
|
2
|
-
//# sourceMappingURL=mutation-admission-LY73EJWM.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import{b as d}from"./chunk-EGN2HFRU.js";import{c as l}from"./chunk-CR7CGEB2.js";import{A as m,E as c,I as p,z as s}from"./chunk-3IRCYJI5.js";import{execFile as f}from"node:child_process";import{chmod as h,lstat as u}from"node:fs/promises";import{promisify as w}from"node:util";(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]="5b6eab08-f707-586f-bb05-484bd9160551")}catch{}})();var y=w(f),g=`#!/bin/sh
|
|
2
|
-
# pm-cli:lossless-merge-settlement:v1
|
|
3
|
-
`;async function I(e,t){let r=(await y("git",["rev-parse","--path-format=absolute","--git-path","hooks/pre-commit"],{cwd:e,env:l(),timeout:1e4})).stdout.trim(),o,i=!1;try{o=await d(r,65536)??"",i=process.platform==="win32"||((await u(r)).mode&73)!==0}catch(a){if(!c(a))throw a}if(o!==void 0&&!o.startsWith(g))throw new m("The pre-commit hook already exists and is not owned by pm; it was preserved.",s.CONFLICT,{code:"merge_settlement_hook_conflict",recovery:{suggested_retry:"pm merge install --dry-run"},nextSteps:["Integrate pm merge reconcile --stage into your existing hook after reviewing its policy, or keep manual settlement. pm never replaces an existing unowned hook."]});let n=`${g}merge_head=$(git rev-parse --git-path MERGE_HEAD) || exit 1
|
|
4
|
-
[ -f "$merge_head" ] || exit 0
|
|
5
|
-
exec ${t} merge reconcile --stage
|
|
6
|
-
`;return{path:r,changed:o!==n||!i,content:n}}async function H(e){e.changed&&(await p(e.path,e.content),await h(e.path,493))}export{I as prepareMergeSettlementHook,H as writeMergeSettlementHook};
|
|
7
|
-
//# sourceMappingURL=settlement-hook-ARYCZQY4.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{c as w,j as y}from"./chunk-RQ252B6V.js";import{b as g}from"./chunk-3V53UBHN.js";import"./chunk-GHQVM6K6.js";import"./chunk-BRZV7BFV.js";import{xa as h}from"./chunk-UWS3FC4D.js";import{c as u}from"./chunk-CR7CGEB2.js";import{A as f,z as d}from"./chunk-3IRCYJI5.js";import{execFile as _}from"node:child_process";import{realpath as b}from"node:fs/promises";import l from"node:path";import{promisify as x}from"node:util";(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]="7f4b2fc8-c9c6-51ff-a345-b76b8abdacf4")}catch{}})();var R=x(_);function c(e){return new f(`Automatic merge settlement refused: ${e}`,d.CONFLICT,{code:"merge_settlement_review_required",recovery:{suggested_retry:"pm merge reconcile --dry-run"},nextSteps:["Inspect receipts, repair streams and Git changes. Resolve competing values or unrelated drift explicitly, then run pm merge reconcile and stage the reviewed artifacts manually."]})}async function $(e){let t=process.env.GIT_INDEX_FILE;if(t===void 0)return;let a=(await e(["rev-parse","--path-format=absolute","--git-path","index"])).stdout.trim();if(l.resolve(t)!==l.resolve(a))throw c("an alternate Git index requires explicit manual settlement")}async function I(e,t){if(t.length===0)return[];let a=t.map(s=>`:(literal)${s}`),o=new Set((await e(["ls-files","--cached","-z","--",...a])).stdout.split("\0")),i=t.filter(s=>!o.has(s)).map(s=>`:(literal)${s}`);if(i.length>0&&(await e(["diff","--cached","--name-only","--diff-filter=D","-z","--",...i])).stdout.length>0)throw c("a receipt has a staged deletion that requires explicit review");return i}async function G(e){let{git:t,preview:a,paths:o,newReceiptPathspecs:i}=e,s=!1;try{i.length>0&&(s=!0,await t(["add","--",...i]));let n=await e.apply();if(!n.ok||JSON.stringify(n.receipts.summaries)!==JSON.stringify(a.receipts.summaries)||n.repair.streams.some(p=>!a.repair.streams.some(m=>m.id===p.id)))throw c("reconciliation changed or did not finish; inspect the audit artifacts before staging");return o.length>0&&await t(["add","--",...o.map(p=>`:(literal)${p}`)]),{...n,staged_paths:o,guidance:["Lossless reconciliation artifacts are staged for the merge commit. Review git diff --cached before committing."]}}catch(n){throw s&&await t(["reset","--quiet","--",...i]),n}}function k(e){if(e.repair.totals.failed>0||e.receipts.missing_history_references_after>0||e.receipts.summaries.some(t=>t.conflict_fields.length>0)||e.repair.streams.some(t=>t.merge_receipt_proof?.trusted!==!0)||e.validation.checks.some(t=>t.name!=="history_drift"&&t.status!=="ok"))throw c("only fully authenticated receipt-backed repairs without discarded values can be staged")}async function S(e){try{return{...e,path:await b(h(process.cwd(),e.path))}}catch{throw c("the tracker root cannot be resolved")}}async function F(e){let{preview:t}=e;k(t);let{path:a}=await S(e.global),o=await w(a);if(o===null)throw c("a Git workspace is required");let i=r=>R("git",r,{cwd:o,env:u(),timeout:1e4});if(await $(i),(await i(["ls-files","--unmerged","-z"])).stdout.length>0)throw c("Git still has unresolved paths");let s=[...new Set([...[...new Set([...t.repair.streams.map(r=>r.id),...t.receipts.summaries.map(r=>r.item_id)])].map(r=>l.join(a,"history",`${r}.jsonl`)),...t.receipts.summaries.map(r=>l.join(a,"merge-receipts",`${r.receipt_id}.json`))])].map(r=>l.relative(o,r).replaceAll("\\","/"));if(s.some(g))throw c("reconciliation artifacts must belong to this Git workspace");let n=await y(o,s);if(n.length>0)throw new f(`Automatic merge settlement refused: required artifacts are ignored by Git: ${n.map(r=>`${r.path} (${r.source}:${r.line}: ${r.pattern})`).join(", ")}. Remove or narrow the owning ignore rules because merge receipts must travel with the commit.`,d.CONFLICT,{code:"merge_settlement_review_required",reason:"ignored_merge_artifacts",paths:n.map(r=>r.path),nextSteps:["Remove or narrow the named ignore rules, preserve receipt and history files, then retry pm merge reconcile --stage --dry-run before applying pm merge reconcile --stage. Do not force-add ignored proof as a substitute for fixing the shared policy."]});let p=s.map(r=>`:(literal)${r}`),m=t.receipts.summaries.map(r=>l.relative(o,l.join(a,"merge-receipts",`${r.receipt_id}.json`)).replaceAll("\\","/"));if(p.length>0)try{await i(["diff","--quiet","--",...p])}catch{throw c("reconciliation paths have unstaged edits or Git cannot verify their index state")}let v=await I(i,m);return e.dryRun?{...t,staged_paths:[]}:G({...e,git:i,paths:s,newReceiptPathspecs:v})}export{S as resolveMergeSettlementGlobal,F as stageLosslessMergeReconciliation};
|
|
2
|
-
//# sourceMappingURL=stage-DQ7RQQ52.js.map
|