@unbrained/pm-cli 2026.11.23 → 2026.11.25
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/error-guidance.js +5 -5
- package/dist/cli/main.js +5 -5
- package/dist/cli/register-annotations.js +1 -1
- package/dist/cli/runtime/invocation-options.js +1 -1
- package/dist/cli-bundle/bundle-manifest.json +1 -1
- package/dist/cli-bundle/chunks/chunk-4FZH5BTV.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-YYT3MIRF.js → chunk-6OIHST4I.js} +1 -1
- package/dist/cli-bundle/chunks/chunk-7EPYCU7U.js +9 -0
- package/dist/cli-bundle/chunks/{chunk-AEOHUSUI.js → chunk-BVJMVU4Z.js} +68 -68
- package/dist/cli-bundle/chunks/{chunk-2UQU7HRR.js → chunk-C4KIZQHW.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-CNUFU454.js +113 -0
- package/dist/cli-bundle/chunks/chunk-CONBVY2O.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-BSRIVYTM.js → chunk-CZEMEPPQ.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-DF6A7C32.js +2 -0
- package/dist/cli-bundle/chunks/chunk-FHLOGAGA.js +8 -0
- package/dist/cli-bundle/chunks/chunk-FVY7U3SU.js +125 -0
- package/dist/cli-bundle/chunks/{chunk-F2Z6XLZB.js → chunk-GBVF2ZB3.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-GZI7ZAB7.js +2 -0
- package/dist/cli-bundle/chunks/chunk-HZZLSBIJ.js +2 -0
- package/dist/cli-bundle/chunks/chunk-K34FR5CO.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-D6PDUKUG.js → chunk-KHFUHGL3.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-L6VS7F3R.js +2 -0
- package/dist/cli-bundle/chunks/chunk-LOX3VY4T.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-H7JEXRIN.js → chunk-LPW7S5KA.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5DUP4AZA.js → chunk-MGJMQSN4.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-OS5W4ZG2.js +31 -0
- package/dist/cli-bundle/chunks/{chunk-O7JHS64G.js → chunk-OWK2JL4I.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-SCIPT7WF.js +2 -0
- package/dist/cli-bundle/chunks/chunk-SX76UGEY.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-CFWLQFJM.js → chunk-VA4T37Q4.js} +50 -51
- package/dist/cli-bundle/chunks/chunk-WQOEVGLQ.js +2 -0
- package/dist/cli-bundle/chunks/chunk-XHCIOLJP.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-J2PDAVBC.js → chunk-XKWJONAO.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-YIGBEY7K.js +2 -0
- package/dist/cli-bundle/chunks/chunk-ZBOQEZ2H.js +33 -0
- package/dist/cli-bundle/chunks/chunk-ZLICQPRG.js +3 -0
- package/dist/cli-bundle/chunks/field-option-collisions-QE65APSD.js +2 -0
- package/dist/cli-bundle/chunks/{indexed-receipt-blobs-BPYKN5Q7.js → indexed-receipt-blobs-H3MMNXXG.js} +2 -2
- package/dist/cli-bundle/{focused-chunks/item-revision-YDACCDVY.js → chunks/item-revision-INDHJV6X.js} +2 -2
- package/dist/cli-bundle/chunks/item-transaction-LCKK4XXB.js +2 -0
- package/dist/cli-bundle/chunks/mutation-actor-KU7BMLUN.js +2 -0
- package/dist/cli-bundle/chunks/mutation-admission-3OMCTQD4.js +2 -0
- package/dist/cli-bundle/chunks/{register-list-query-L4IBU64P.js → register-list-query-3GV3LBOT.js} +2 -2
- package/dist/cli-bundle/chunks/register-mutation-GZLF47SX.js +21 -0
- package/dist/cli-bundle/chunks/register-operations-PBJZGCAL.js +2 -0
- package/dist/cli-bundle/chunks/register-setup-ZLJEF6NZ.js +2 -0
- package/dist/cli-bundle/chunks/runtime-schema-Y4SHTEXL.js +2 -0
- package/dist/cli-bundle/chunks/{settlement-hook-6MR32OOC.js → settlement-hook-ESAAEBRM.js} +2 -2
- package/dist/cli-bundle/chunks/stage-3WIZBD4N.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-3Y5PTQ2F.js +27 -0
- package/dist/cli-bundle/focused-chunks/{chunk-Y2ESLKCF.js → chunk-4LQL4EO6.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-RIE3SJSE.js → chunk-4SX2BN4V.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ZHWPCVQL.js → chunk-5RBC4WSE.js} +39 -39
- package/dist/cli-bundle/focused-chunks/chunk-7SSGTGZO.js +91 -0
- package/dist/cli-bundle/focused-chunks/chunk-A4R57E4K.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-BOIMP2AR.js +5 -0
- package/dist/cli-bundle/focused-chunks/chunk-BYQK5DGH.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-C3FEDTSD.js +44 -0
- package/dist/cli-bundle/focused-chunks/chunk-IAOKVKWW.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-JOKRDFMQ.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-MB56Y4M6.js +8 -0
- package/dist/cli-bundle/focused-chunks/{chunk-A6VEMCRR.js → chunk-NGFDPEP7.js} +1 -1
- package/dist/cli-bundle/focused-chunks/chunk-OCKKIECS.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-PKX2EHE3.js +26 -0
- package/dist/cli-bundle/focused-chunks/chunk-SXC2EO3E.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-TQIKDFOD.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-TRL4JDWX.js +8 -0
- package/dist/cli-bundle/focused-chunks/{chunk-IROZDIDX.js → chunk-UWWAVXG4.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-VMYVN36N.js +13 -0
- package/dist/cli-bundle/focused-chunks/chunk-VU2PH4PF.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-WL2R7T5G.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-WVA5KOXF.js +3 -0
- package/dist/cli-bundle/focused-chunks/{chunk-QQIIMMFU.js → chunk-X4EWD6TL.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-XKLBTDJ7.js +100 -0
- package/dist/cli-bundle/focused-chunks/chunk-YYEWIKNI.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-ZLRRII55.js +2 -0
- package/dist/cli-bundle/focused-chunks/field-option-collisions-5ROXGUME.js +2 -0
- package/dist/cli-bundle/focused-chunks/{indexed-receipt-blobs-EGEJMG3G.js → indexed-receipt-blobs-PG2VJ3MB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/item-revision-KYMSQVZE.js +2 -0
- package/dist/cli-bundle/focused-chunks/item-transaction-I4HLVHEJ.js +2 -0
- package/dist/cli-bundle/focused-chunks/mutation-actor-GGOQKAE6.js +2 -0
- package/dist/cli-bundle/focused-chunks/mutation-admission-OS36ZCMH.js +2 -0
- package/dist/cli-bundle/focused-chunks/runtime-schema-YXPYDD2C.js +2 -0
- package/dist/cli-bundle/focused-chunks/{settlement-hook-FMLGKG7J.js → settlement-hook-4MGRERCT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/stage-4ZFWJUKO.js +2 -0
- package/dist/cli-bundle/main.js +26 -26
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +4 -4
- 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 +63 -63
- 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 +12 -12
- package/dist/core/profile/profile-lint.d.ts +1 -1
- package/dist/core/profile/profile-lint.js +1 -1
- package/dist/core/schema/fields-file.js +2 -2
- 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 +1 -1
- package/dist/core/shared/command-line.d.ts +54 -4
- package/dist/core/shared/command-line.js +1 -1
- package/dist/core/shared/errors.d.ts +9 -0
- package/dist/core/shared/secret-rules.js +5 -5
- package/dist/core/shared/url-credentials.d.ts +16 -3
- package/dist/core/shared/url-credentials.js +1 -1
- package/dist/core/store/item-store.d.ts +26 -4
- package/dist/core/store/item-store.js +1 -1
- package/dist/sdk/command-line.d.ts +1 -1
- package/dist/sdk/command-line.js +1 -1
- package/dist/sdk/context-intent-contracts.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-command-context.js +2 -2
- 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/governance/tracked-runtime-cache.js +1 -1
- package/dist/sdk/index.d.ts +1 -1
- package/dist/sdk/lifecycle/claim.d.ts +21 -1
- package/dist/sdk/lifecycle/claim.js +1 -1
- package/dist/sdk/lifecycle/task-composition.js +1 -1
- package/dist/sdk/ownership-source.d.ts +15 -1
- package/dist/sdk/ownership-source.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/read-output-contracts.d.ts +11 -0
- package/dist/sdk/read-output-contracts.js +1 -1
- package/dist/sdk/runtime-primitives.d.ts +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 +1 -1
- package/docs/AGENT_GUIDE.md +2 -2
- package/docs/COMMANDS.md +1 -1
- package/docs/CONFIGURATION.md +1 -0
- package/docs/EXTENSIONS.md +1 -1
- package/docs/MUTATION_INTEGRITY.md +97 -8
- package/docs/READ_OUTPUT_CONTRACTS.md +2 -0
- package/docs/SDK.md +60 -4
- package/docs/SDK_AUDITED_MUTATIONS.md +11 -0
- package/docs/WORKSPACE_POSITION_AND_LIFECYCLE.md +17 -4
- package/marketplace.json +1 -1
- package/package.json +1 -1
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-claude/package.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/package.json +1 -1
- package/plugins/pm-codex/plugin.json +1 -1
- package/runtime-dependencies.json +1 -1
- package/dist/cli-bundle/chunks/chunk-5WZZ5XEN.js +0 -3
- package/dist/cli-bundle/chunks/chunk-6MYJLOSG.js +0 -2
- package/dist/cli-bundle/chunks/chunk-ENKXRSFZ.js +0 -31
- package/dist/cli-bundle/chunks/chunk-FJOEL75F.js +0 -2
- package/dist/cli-bundle/chunks/chunk-GDXCAC52.js +0 -2
- package/dist/cli-bundle/chunks/chunk-KE7HMBEW.js +0 -2
- package/dist/cli-bundle/chunks/chunk-KZHIBEJL.js +0 -33
- package/dist/cli-bundle/chunks/chunk-NGJ5ERBF.js +0 -115
- package/dist/cli-bundle/chunks/chunk-NQ54T7T2.js +0 -2
- package/dist/cli-bundle/chunks/chunk-OKEZF7HU.js +0 -2
- package/dist/cli-bundle/chunks/chunk-OKIKF4FD.js +0 -2
- package/dist/cli-bundle/chunks/chunk-OPJF254V.js +0 -9
- package/dist/cli-bundle/chunks/chunk-RWA5YZ5X.js +0 -2
- package/dist/cli-bundle/chunks/chunk-S32NGRQM.js +0 -2
- package/dist/cli-bundle/chunks/chunk-TZY5MVJF.js +0 -125
- package/dist/cli-bundle/chunks/chunk-ZPS4B6SI.js +0 -8
- package/dist/cli-bundle/chunks/item-revision-FMD4KWBB.js +0 -2
- package/dist/cli-bundle/chunks/item-transaction-SEHTH7N2.js +0 -2
- package/dist/cli-bundle/chunks/mutation-actor-SFGYIRPW.js +0 -2
- package/dist/cli-bundle/chunks/mutation-admission-57LBSKQI.js +0 -2
- package/dist/cli-bundle/chunks/register-mutation-6NUOPHZ3.js +0 -21
- package/dist/cli-bundle/chunks/register-operations-JGYVORNN.js +0 -2
- package/dist/cli-bundle/chunks/register-setup-C44SIXEH.js +0 -2
- package/dist/cli-bundle/chunks/stage-PQ7AB63N.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-6LKTEKHS.js +0 -6
- package/dist/cli-bundle/focused-chunks/chunk-6LPXMFLM.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-HMDQDRV2.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-I66IKYKP.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-IR2J3NOT.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-ITKDHSBR.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-LQYYPXUK.js +0 -26
- package/dist/cli-bundle/focused-chunks/chunk-NQTEE66P.js +0 -13
- package/dist/cli-bundle/focused-chunks/chunk-O7Z73ALG.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-OTMMOKPM.js +0 -91
- package/dist/cli-bundle/focused-chunks/chunk-OXOCZJC6.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-QLAHEDT6.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-TD544C74.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-UFTUNBMY.js +0 -27
- package/dist/cli-bundle/focused-chunks/chunk-XRS3VNC6.js +0 -44
- package/dist/cli-bundle/focused-chunks/chunk-XYPEZGTR.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-YSJKQLFR.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-Z2X7HH3C.js +0 -102
- package/dist/cli-bundle/focused-chunks/item-transaction-UKEQCTKB.js +0 -2
- package/dist/cli-bundle/focused-chunks/mutation-actor-AS465LRX.js +0 -2
- package/dist/cli-bundle/focused-chunks/mutation-admission-E5UHJZFE.js +0 -2
- package/dist/cli-bundle/focused-chunks/stage-36J7YLGI.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=[{code:"merge_driver_configuration_missing",exit_code:1,sources:["core/diagnostics/remediation.ts"]},{code:"merge_fence_drift",exit_code:1,sources:["core/diagnostics/remediation.ts"]},{code:"merge_fence_missing",exit_code:1,sources:["core/diagnostics/remediation.ts"]},{code:"merge_git_config_unwritable",exit_code:5,stable:!0,sources:["sdk/merge/install.ts"]},{code:"merge_receipt_evidence_invalid",exit_code:4,sources:["core/diagnostics/remediation.ts","sdk/merge/reconcile.ts"]},{code:"merge_receipt_history_reference_missing",exit_code:1,sources:["core/diagnostics/remediation.ts"]},{code:"merge_receipt_not_portable",exit_code:4,sources:["sdk/merge/receipts.ts"]},{code:"merge_receipts_pending",exit_code:1,sources:["core/diagnostics/remediation.ts"]},{code:"merge_reconcile_receipt_evidence_untrusted",exit_code:4,sources:["sdk/history-repair.ts"]},{code:"merge_root_not_found",exit_code:3,stable:!0,sources:["sdk/merge/install.ts"]},{code:"merge_settlement_hook_conflict",exit_code:4,sources:["sdk/merge/settlement-hook.ts"]},{code:"merge_settlement_review_required",exit_code:4,sources:["sdk/merge/ignored-artifacts.ts","sdk/merge/reconcile.ts","sdk/merge/stage.ts"]},{code:"missing_allowed_values",exit_code:1,sources:["sdk/agent/refusal-closure.ts"]},{code:"missing_budget",exit_code:1,sources:["sdk/cli-contracts/flag-lexicon-contracts.ts"]},{code:"missing_cli_flag",exit_code:1,sources:["sdk/cli-contracts/tool-option-contracts.ts"]},{code:"missing_destination",exit_code:1,sources:["sdk/cli-contracts/grammar-contracts.ts"]},{code:"missing_directory",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"missing_init_recovery",exit_code:1,sources:["sdk/agent/tracker-preflight-contracts.ts"]},{code:"missing_lifecycle_target",exit_code:2,stable:!0,sources:["sdk/extension.ts"]},{code:"missing_observation",exit_code:1,sources:["sdk/flag-invocation-contracts.ts"]},{code:"missing_observed_signature",exit_code:1,sources:["sdk/cli-contracts/grammar-contracts.ts"]},{code:"missing_parameter_alias",exit_code:1,sources:["sdk/cli-contracts/tool-option-contracts.ts"]},{code:"missing_positive_execution_receipt",exit_code:1,sources:["sdk/test/execution.ts"]},{code:"missing_probe",exit_code:1,sources:["sdk/agent/tracker-preflight-contracts.ts"]},{code:"missing_required_argument",exit_code:2,stable:!0,sources:["cli/error-guidance.ts","cli/main.ts","cli/register-mutation.ts","cli/schema/registration.ts","core/telemetry/observability.ts","sdk/governance/assurance-action.ts","sdk/history-redact.ts","sdk/invocation-author.ts","sdk/lifecycle/claim.ts","sdk/linked-artifacts.ts"],emitting_commands:["*","claim"]},{code:"missing_required_option",exit_code:2,stable:!0,sources:["cli/error-guidance.ts","core/telemetry/observability.ts","sdk/context-intent-contracts.ts","sdk/extension/command-options.ts","sdk/lifecycle/create.ts","sdk/lifecycle/plan.ts"],emitting_commands:["*","create","plan"]},{code:"missing_suggested_retry",exit_code:1,sources:["sdk/agent/refusal-closure.ts"]},{code:"missing_suggested_retry_args",exit_code:1,sources:["sdk/agent/refusal-closure.ts"]},{code:"module_import_failed",exit_code:1,stable:!0,sources:["cli/error-guidance.ts"]},{code:"multi_target_github_install_ambiguous",exit_code:2,stable:!0,sources:["cli/register-setup.ts"]},{code:"mutation_author_required",exit_code:2,stable:!0,sources:["sdk/mutation-guard.ts"]},{code:"mutation_document_unreadable",exit_code:2,sources:["cli/register-structured-mutation.ts"]},{code:"mutation_option_value_invalid",exit_code:2,sources:["sdk/lifecycle/mutation-option-validation.ts"],emitting_commands:["item mutate"]},{code:"mutation_secret_guard_blocked",exit_code:4,stable:!0,sources:["sdk/mutation-guard.ts"]},{code:"no_matching_tests",exit_code:1,stable:!0,sources:["sdk/test/execution-receipts.ts"]},{code:"no_projects_matched_filters",exit_code:1,stable:!0,sources:["sdk/test/execution-receipts.ts"]},{code:"no_test_files_found",exit_code:1,stable:!0,sources:["sdk/test/execution-receipts.ts"]},{code:"no_tests_found",exit_code:1,stable:!0,sources:["sdk/test/execution-receipts.ts"]},{code:"no_update_fields",exit_code:1,stable:!0,sources:["cli/error-guidance.ts","core/telemetry/observability.ts"]},{code:"no_version_bounds_declared",exit_code:1,sources:["core/extensions/manifest-schema.ts"],owned_states:[{state:"author_workspace_manifest_omits_canonical_pm_version_bounds",probe_id:"author-manifest-version-bounds-missing",entrypoints:["health"],expected_exit_class:"generic_failure"}]},{code:"non_refusal_exit",exit_code:1,sources:["sdk/agent/refusal-closure.ts"]},{code:"npm_pack_json_shape_unsupported",exit_code:1,sources:["sdk/extension/install-sources.ts"]},{code:"npm_package_archive_missing",exit_code:1,sources:["sdk/extension/install-sources.ts"]},{code:"npm_package_archive_unsafe",exit_code:1,sources:["sdk/extension/install-sources.ts"]},{code:"npm_package_not_found",exit_code:3,stable:!0,sources:["sdk/extension/install-sources.ts"]},{code:"output_budget_exceeded",exit_code:2,sources:["sdk/testing.ts"]},{code:"ownership_conflict",exit_code:4,stable:!0,sources:["cli/error-guidance.ts","core/telemetry/observability.ts","sdk/annotations.ts"]},{code:"ownership_dependency_bypass_restricted_options",exit_code:1,stable:!0,sources:["sdk/lifecycle/update.ts"],emitting_commands:["update"]},{code:"ownership_metadata_bypass_restricted_options",exit_code:1,stable:!0,sources:["sdk/lifecycle/update.ts"],emitting_commands:["update"]},{code:"package_spec_empty",exit_code:1,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"package_upgrade_modes_mutually_exclusive",exit_code:2,sources:["sdk/governance/upgrade.ts"]},{code:"positional_shape_budget_exceeded",exit_code:1,sources:["sdk/cli-contracts/grammar-contracts.ts"]},{code:"positional_signature_mismatch",exit_code:1,sources:["sdk/cli-contracts/grammar-contracts.ts"]},{code:"profile_name_empty",exit_code:1,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"profile_name_not_normalized",exit_code:1,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"profile_summary_empty",exit_code:1,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"profile_title_empty",exit_code:1,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"project_runtime_history_epoch_incompatible",exit_code:4,sources:["sdk/environment/project-runtime-compatibility.ts"]},{code:"project_runtime_item_format_incompatible",exit_code:4,sources:["sdk/environment/project-runtime-compatibility.ts"]},{code:"project_runtime_stale_mutation",exit_code:4,sources:["sdk/environment/project-runtime-compatibility.ts"]},{code:"project_runtime_stale_read",exit_code:1,sources:["sdk/environment/project-runtime-compatibility.ts"]},{code:"project_schema_field_requires_declared_flag",exit_code:2,sources:["core/extensions/item-fields.ts"]},{code:"projection_options_mutually_exclusive",exit_code:2,sources:["sdk/query/get.ts","sdk/query/list.ts","sdk/query/search-contracts.ts"],emitting_commands:["get","list","search"]},{code:"provenance_value_domain_invalid",exit_code:2,sources:["core/diagnostics/remediation.ts"]},{code:"read_output_cursor_command_mismatch",exit_code:2,sources:["sdk/read-output/continuation.ts"]},{code:"read_output_cursor_invalid",exit_code:2,sources:["sdk/read-output/continuation.ts"]},{code:"read_output_cursor_stale",exit_code:2,sources:["sdk/read-output/continuation.ts"]},{code:"read_output_mutation_conflict",exit_code:2,sources:["sdk/read-output-contracts.ts"]},{code:"recovery_kind_mismatch",exit_code:1,sources:["sdk/agent/tracker-preflight-contracts.ts"]},{code:"redundant_edge",exit_code:1,stable:!0,sources:["sdk/graph/remediation.ts"]},{code:"refusal_allowed_values_mismatch",exit_code:1,sources:["sdk/agent/refusal-corpus-contracts.ts"]},{code:"refusal_error_code_mismatch",exit_code:1,sources:["sdk/agent/refusal-corpus-contracts.ts"]},{code:"refusal_exit_code_mismatch",exit_code:1,sources:["sdk/agent/refusal-corpus-contracts.ts"]},{code:"refusal_mutated_state",exit_code:1,sources:["sdk/agent/refusal-corpus-contracts.ts"]},{code:"refusal_probe_missing",exit_code:1,sources:["sdk/agent/refusal-corpus-contracts.ts"]},{code:"refusal_recovery_failed",exit_code:1,sources:["sdk/agent/refusal-corpus-contracts.ts"]},{code:"reindex_already_running",exit_code:4,stable:!0,sources:["sdk/governance/reindex.ts"]},{code:"removed_canonical_spelling",exit_code:1,sources:["sdk/cli-contracts/flag-lexicon-contracts.ts"]},{code:"removed_compatibility_spelling",exit_code:1,sources:["sdk/cli-contracts/flag-lexicon-contracts.ts"]},{code:"reopen_reason_required",exit_code:2,sources:["sdk/lifecycle/reopen.ts"],emitting_commands:["item reopen"]},{code:"reopen_receipt_missing",exit_code:1,sources:["sdk/lifecycle/update.ts"],emitting_commands:["update"]},{code:"reopen_target_status_invalid",exit_code:2,sources:["sdk/lifecycle/reopen.ts"],emitting_commands:["item reopen"]},{code:"reported_zero_passes",exit_code:1,sources:["sdk/test/execution-receipts.ts"]},{code:"reported_zero_tests",exit_code:1,sources:["sdk/test/execution-receipts.ts"]},{code:"reserved_item_field",exit_code:1,stable:!0,sources:["sdk/compose.ts"]},{code:"retry_failed",exit_code:1,sources:["sdk/agent/refusal-closure.ts","sdk/agent/tracker-preflight-contracts.ts"]},{code:"schema_field_option_collision",exit_code:2,sources:["sdk/schema/field-option-collisions.ts"]},{code:"schema_migration_input_required",exit_code:2,stable:!0,sources:["cli/migration-gates.ts"]},{code:"semantic_spelling_collision",exit_code:1,sources:["sdk/cli-contracts/flag-lexicon-contracts.ts"]},{code:"settings_invalid",exit_code:2,sources:["sdk/extension/static-inventory.ts"]},{code:"settings_read_fs_error",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"settings_read_invalid_json",exit_code:2,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"settings_read_invalid_schema",exit_code:2,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"settings_read_merge_failed",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"settings_section_document_malformed",exit_code:2,sources:["core/store/settings-sections.ts"]},{code:"settings_section_document_missing",exit_code:3,sources:["core/store/settings-sections.ts"]},{code:"settings_section_invalid",exit_code:2,sources:["core/store/settings-sections.ts"]},{code:"settings_section_name_invalid",exit_code:2,sources:["core/store/settings-sections.ts"]},{code:"settings_section_reserved",exit_code:2,sources:["core/store/settings-sections.ts"]},{code:"settings_section_revision_conflict",exit_code:4,sources:["core/store/settings-sections.ts"]},{code:"settings_unreadable",exit_code:1,sources:["sdk/extension/static-inventory.ts"]},{code:"settings_write_assigned_path_invalid",exit_code:2,sources:["core/store/settings.ts"]},{code:"settings_write_invalid_existing_json",exit_code:2,sources:["core/store/settings.ts"]},{code:"settings_write_invalid_existing_schema",exit_code:2,sources:["core/store/settings.ts"]},{code:"stale_budget",exit_code:1,sources:["sdk/cli-contracts/flag-lexicon-contracts.ts"]},{code:"stale_claim_takeover_refused",exit_code:4,sources:["sdk/lifecycle/claim.ts"],emitting_commands:["claim"]},{code:"stale_destination",exit_code:1,sources:["sdk/cli-contracts/grammar-contracts.ts"]},{code:"stale_in_progress_items",exit_code:1,sources:["core/diagnostics/remediation.ts"]},{code:"stale_lock_requires_override",exit_code:4,sources:["core/lock/lock.ts"]},{code:"stale_observed_signature",exit_code:1,sources:["sdk/cli-contracts/grammar-contracts.ts"]},{code:"stale_revision",exit_code:4,sources:["core/store/item-store.ts"]},{code:"start_blocked_by_open_dependency",exit_code:4,sources:["sdk/lifecycle/start-blockers.ts"],emitting_commands:["claim","start-task","update"]},{code:"status_duplicate",exit_code:1,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"status_invalid",exit_code:2,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"status_lifecycle_role_required",exit_code:2,sources:["sdk/schema.ts"]},{code:"stdin_json_invalid",exit_code:2,stable:!0,sources:["sdk/structured-mutations.ts"]},{code:"stdin_json_persisted_annotation_changed",exit_code:2,sources:["sdk/lifecycle/update.ts"],emitting_commands:["update"]},{code:"stdin_json_unknown_key",exit_code:2,stable:!0,sources:["sdk/structured-mutations.ts"]},{code:"structured_entry_key_repeated",exit_code:2,sources:["core/item/parse.ts"]},{code:"structured_event_immutable",exit_code:2,stable:!0,sources:["sdk/annotations.ts"]},{code:"structured_event_input_conflict",exit_code:2,stable:!0,sources:["sdk/notes.ts"]},{code:"structured_event_json_empty",exit_code:2,stable:!0,sources:["sdk/notes.ts"]},{code:"structured_event_json_invalid",exit_code:2,stable:!0,sources:["sdk/notes.ts"]},{code:"structured_event_since_invalid",exit_code:2,stable:!0,sources:["sdk/notes.ts"]},{code:"suggested_retry_args_mismatch",exit_code:1,sources:["sdk/agent/refusal-closure.ts"]},{code:"telemetry_endpoint_probe_failed",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"telemetry_endpoint_probe_http_status",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"telemetry_otel_export_failing",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"telemetry_queue_high_retries",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"telemetry_queue_invalid_rows",exit_code:2,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"telemetry_queue_pending",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"telemetry_schema_version_behind",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"telemetry_state_invalid_json",exit_code:2,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"template_type_unknown",exit_code:2,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"terminal_plan_mutation",exit_code:4,stable:!0,sources:["sdk/lifecycle/plan.ts"],emitting_commands:["plan"]},{code:"terminal_state_conflict",exit_code:4,stable:!0,sources:["core/telemetry/observability.ts","sdk/lifecycle/claim.ts"],emitting_commands:["*","claim"]},{code:"test_measure_requires_execution",exit_code:2,sources:["sdk/test/prerequisites.ts"]},{code:"test_measure_requires_run",exit_code:2,sources:["sdk/test/prerequisites.ts"]},{code:"text_unpaired_surrogate",exit_code:2,sources:["core/item/item-format.ts","core/shared/output-unicode.ts"]},{code:"tracked_runtime_cache_files",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"],aliases:["validate_storage_tracked_runtime_cache_files"]},{code:"tracker_not_initialized",exit_code:3,stable:!0,sources:["cli/error-guidance.ts","core/store/tracker-preflight.ts","core/telemetry/observability.ts"],owned_states:[{state:"selected_tracker_root_exists_without_settings",probe_id:"tracker-root-settings-missing",entrypoints:["list"],expected_exit_class:"not_found"}]},{code:"tracker_root_missing",exit_code:3,stable:!0,sources:["core/store/tracker-preflight.ts"],owned_states:[{state:"selected_tracker_root_does_not_exist",probe_id:"tracker-root-missing",entrypoints:["list"],expected_exit_class:"not_found"}]},{code:"tracker_root_not_directory",exit_code:2,stable:!0,sources:["core/store/tracker-preflight.ts"],owned_states:[{state:"selected_tracker_root_is_a_regular_file",probe_id:"tracker-root-not-directory",entrypoints:["list"],expected_exit_class:"usage"}]},{code:"tracker_root_unreadable",exit_code:1,sources:["core/store/tracker-preflight.ts"],owned_states:[{state:"selected_tracker_root_is_not_readable",probe_id:"tracker-root-unreadable",entrypoints:["list"],expected_exit_class:"generic_failure"}]},{code:"transaction_abandoned",exit_code:4,sources:["sdk/workspace-transaction.ts"]},{code:"transaction_committed",exit_code:4,sources:["sdk/workspace-transaction.ts"]},{code:"transaction_create_compensated",exit_code:4,sources:["sdk/item-transaction.ts"]},{code:"transaction_journal_invalid",exit_code:4,sources:["sdk/workspace-transaction.ts"]},{code:"transaction_partial_mutation",exit_code:4,sources:["sdk/item-transaction.ts"]},{code:"transaction_plan_mismatch",exit_code:4,sources:["sdk/workspace-transaction.ts"]},{code:"transaction_preview_external_schema",exit_code:2,sources:["sdk/item-transaction.ts"]},{code:"transaction_preview_non_regular_file",exit_code:2,sources:["core/fs/fs-utils.ts"]},{code:"transaction_preview_snapshot_changed",exit_code:4,sources:["sdk/item-transaction.ts"]},{code:"transaction_recovery_plan_missing",exit_code:4,sources:["sdk/item-transaction.ts"]},{code:"type_duplicate",exit_code:1,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"type_invalid",exit_code:2,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"undeclared_observation",exit_code:1,sources:["sdk/flag-invocation-contracts.ts"]},{code:"unexpected_refusal_probe",exit_code:1,sources:["sdk/agent/refusal-corpus-contracts.ts"]},{code:"unknown_command",exit_code:2,stable:!0,sources:["cli/error-guidance.ts","core/telemetry/observability.ts","sdk/cli-contracts/runtime-contracts.ts"]},{code:"unknown_context_intent",exit_code:2,stable:!0,sources:["sdk/context-intent-contracts.ts"]},{code:"unknown_error",exit_code:1,stable:!0,sources:["cli/error-guidance.ts"]},{code:"unknown_field",exit_code:3,stable:!0,sources:["sdk/schema.ts"]},{code:"unknown_field_projection",exit_code:2,stable:!0,sources:["sdk/query/get.ts","sdk/query/list.ts","sdk/query/search-contracts.ts"],emitting_commands:["get","list","search"]},{code:"unknown_item_type",exit_code:3,stable:!0,sources:["sdk/schema.ts"]},{code:"unknown_lifecycle_action",exit_code:2,stable:!0,sources:["sdk/agent/subcommand-recovery.ts"],canonical_code:"unknown_subcommand"},{code:"unknown_noun",exit_code:2,sources:["sdk/cli-contracts/grammar-contracts.ts"]},{code:"unknown_option",exit_code:2,stable:!0,sources:["cli/error-guidance.ts","cli/runtime/invocation-options.ts","core/telemetry/observability.ts","sdk/extension/command-options.ts"],owned_states:[{state:"declared_option_is_rejected_on_the_selected_command_path",probe_id:"cross-command-unknown-option",entrypoints:["deps"],expected_exit_class:"usage"}]},{code:"unknown_plan_template",exit_code:2,stable:!0,sources:["sdk/lifecycle/plan.ts"],emitting_commands:["plan"]},{code:"unknown_provenance_dimension",exit_code:2,stable:!0,sources:["sdk/history-provenance.ts"]},{code:"unknown_status",exit_code:3,stable:!0,sources:["sdk/schema.ts"]},{code:"unknown_subcommand",exit_code:2,stable:!0,sources:["cli/error-guidance.ts","sdk/agent/subcommand-recovery.ts"],aliases:["unknown_lifecycle_action"],owned_states:[{state:"config_action_token_is_not_declared",probe_id:"config-unknown-action",entrypoints:["config"],expected_exit_class:"usage"},{state:"graph_command_token_is_not_declared",probe_id:"graph-unknown-subcommand",entrypoints:["graph"],expected_exit_class:"usage"},{state:"nested_command_token_is_not_declared_by_its_family",probe_id:"schema-unknown-subcommand",entrypoints:["schema"],expected_exit_class:"usage"},{state:"package_lifecycle_token_is_not_declared",probe_id:"package-unknown-action",entrypoints:["package"],expected_exit_class:"usage"}]},{code:"unsafe_init_recovery",exit_code:1,sources:["sdk/agent/tracker-preflight-contracts.ts"]},{code:"unsupported_update_option",exit_code:1,stable:!0,sources:["cli/error-guidance.ts"]},{code:"upsert_key_ambiguous",exit_code:4,sources:["sdk/structured-mutations.ts"]},{code:"upsert_key_conflict",exit_code:4,sources:["sdk/item-transaction.ts"]},{code:"upsert_key_duplicate",exit_code:2,sources:["sdk/item-transaction.ts","sdk/structured-mutations.ts"]},{code:"upsert_key_missing",exit_code:2,sources:["sdk/structured-mutations.ts"]},{code:"upsert_match_changed",exit_code:4,sources:["sdk/item-transaction.ts"]},{code:"validate_command_references_stale_pm_ids",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_files_missing_linked_paths",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_files_orphaned_paths",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_files_tracked_all_strict_forces_pm_internals",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_format_version_ahead_items",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"],canonical_code:"integrity_item_ahead_format_version"},{code:"validate_format_version_outdated_items",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"],canonical_code:"integrity_item_outdated_format_version"},{code:"validate_hierarchy_parent_cycle",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_hierarchy_parent_cycle_error",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_history_drift_chain_mismatches",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"],canonical_code:"history_drift_chain_mismatch"},{code:"validate_history_drift_hash_mismatches",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"],canonical_code:"history_drift_hash_mismatch"},{code:"validate_history_drift_missing_streams",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"],canonical_code:"history_drift_missing_stream"},{code:"validate_history_drift_unreadable_streams",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"],canonical_code:"history_drift_unreadable_stream"},{code:"validate_history_drift_version_skews",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"],canonical_code:"history_drift_version_skew"},{code:"validate_history_unknown_author_events",exit_code:2,stable:!0,sources:["core/diagnostics/remediation.ts"],canonical_code:"history_unknown_author_events"},{code:"validate_lifecycle_active_closure_like_metadata",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_lifecycle_active_terminal_parent",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_lifecycle_dependency_cycles",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_lifecycle_dependency_cycles_error",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_lifecycle_stale_blockers",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_merge_decisions_unreviewed",exit_code:1,sources:["core/diagnostics/remediation.ts"]},{code:"validate_merge_driver_configuration",exit_code:1,sources:["core/diagnostics/remediation.ts"]},{code:"validate_merge_fence_drift",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_custom_profile_missing_required_fields",exit_code:2,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_duplicate_issue_codes",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_missing_acceptance_criteria",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_missing_close_reason",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_missing_closed_at",exit_code:1,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_missing_confidence",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_missing_estimate",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_missing_release",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_missing_reviewer",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_missing_risk",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_missing_sprint",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_resolution_missing_fields",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_schema_field_option_collision",exit_code:1,sources:["core/diagnostics/remediation.ts"]},{code:"validate_storage_duplicate_item_ids",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_storage_history_conflict_markers",exit_code:4,stable:!0,sources:["core/diagnostics/remediation.ts"],canonical_code:"integrity_history_conflict_marker"},{code:"validate_storage_resurrected_items",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_storage_tracked_runtime_cache_files",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"],canonical_code:"tracked_runtime_cache_files"},{code:"validate_storage_unparseable_config",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_storage_unparseable_history",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_storage_unreadable_items",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"vectorization_embedding_identity_changed",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"vectorization_stale_items_remaining",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"visible_surface_ceiling_exceeded",exit_code:1,sources:["sdk/cli-contracts/grammar-contracts.ts"]},{code:"workflow_duplicate_type",exit_code:1,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"workflow_policy_approval_history_invalid",exit_code:4,sources:["core/policy/workflow-policy-store.ts"]},{code:"workflow_policy_audit_failed",exit_code:4,sources:["core/policy/workflow-policy-store.ts"]},{code:"workflow_policy_input_unreadable",exit_code:4,sources:["core/policy/workflow-policy-store.ts"]},{code:"workflow_policy_invalid",exit_code:2,sources:["core/policy/workflow-policy.ts"]},{code:"workflow_policy_refused",exit_code:4,sources:["core/policy/workflow-policy-store.ts"]},{code:"workflow_policy_registry_invalid",exit_code:4,sources:["core/policy/workflow-policy-store.ts"]},{code:"workflow_status_unknown",exit_code:2,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"workflow_transition_malformed",exit_code:1,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"workflow_type_empty",exit_code:1,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"workflow_type_unknown",exit_code:2,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"workspace_history_chain_invalid",exit_code:4,sources:["core/history/workspace-history.ts"]},{code:"workspace_history_state_conflict",exit_code:4,stable:!0,sources:["core/history/workspace-history.ts"]},{code:"workspace_root_pm_path",exit_code:2,stable:!0,sources:["sdk/init.ts"]},{code:"workspace_snapshot_force_required",exit_code:2,sources:["sdk/workspace-snapshot.ts"]},{code:"workspace_snapshot_manifest_mismatch",exit_code:4,sources:["sdk/workspace-snapshot.ts"]},{code:"workspace_snapshot_name_reserved_fingerprint",exit_code:2,sources:["sdk/workspace-snapshot.ts"]},{code:"workspace_snapshot_not_found",exit_code:3,sources:["sdk/workspace-snapshot.ts"]},{code:"workspace_snapshot_permission_denied",exit_code:1,sources:["sdk/workspace-snapshot.ts"]},{code:"workspace_snapshot_resource_exhausted",exit_code:1,sources:["sdk/workspace-snapshot.ts"]},{code:"workspace_snapshot_storage_exhausted",exit_code:1,sources:["sdk/workspace-snapshot.ts"]},{code:"wrong_item_type",exit_code:2,stable:!0,sources:["sdk/lifecycle/plan.ts"],emitting_commands:["plan"]}];export{e as PM_ERROR_CODE_CATALOG_PART_2};
|
|
1
|
+
const e=[{code:"merge_fence_drift",exit_code:1,sources:["core/diagnostics/remediation.ts"]},{code:"merge_fence_missing",exit_code:1,sources:["core/diagnostics/remediation.ts"]},{code:"merge_git_config_unwritable",exit_code:5,stable:!0,sources:["sdk/merge/install.ts"]},{code:"merge_receipt_evidence_invalid",exit_code:4,sources:["core/diagnostics/remediation.ts","sdk/merge/reconcile.ts"]},{code:"merge_receipt_history_reference_missing",exit_code:1,sources:["core/diagnostics/remediation.ts"]},{code:"merge_receipt_not_portable",exit_code:4,sources:["sdk/merge/receipts.ts"]},{code:"merge_receipts_pending",exit_code:1,sources:["core/diagnostics/remediation.ts"]},{code:"merge_reconcile_receipt_evidence_untrusted",exit_code:4,sources:["sdk/history-repair.ts"]},{code:"merge_root_not_found",exit_code:3,stable:!0,sources:["sdk/merge/install.ts"]},{code:"merge_settlement_hook_conflict",exit_code:4,sources:["sdk/merge/settlement-hook.ts"]},{code:"merge_settlement_review_required",exit_code:4,sources:["sdk/merge/ignored-artifacts.ts","sdk/merge/reconcile.ts","sdk/merge/stage.ts"]},{code:"missing_allowed_values",exit_code:1,sources:["sdk/agent/refusal-closure.ts"]},{code:"missing_budget",exit_code:1,sources:["sdk/cli-contracts/flag-lexicon-contracts.ts"]},{code:"missing_cli_flag",exit_code:1,sources:["sdk/cli-contracts/tool-option-contracts.ts"]},{code:"missing_destination",exit_code:1,sources:["sdk/cli-contracts/grammar-contracts.ts"]},{code:"missing_directory",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"missing_init_recovery",exit_code:1,sources:["sdk/agent/tracker-preflight-contracts.ts"]},{code:"missing_lifecycle_target",exit_code:2,stable:!0,sources:["sdk/extension.ts"]},{code:"missing_observation",exit_code:1,sources:["sdk/flag-invocation-contracts.ts"]},{code:"missing_observed_signature",exit_code:1,sources:["sdk/cli-contracts/grammar-contracts.ts"]},{code:"missing_parameter_alias",exit_code:1,sources:["sdk/cli-contracts/tool-option-contracts.ts"]},{code:"missing_positive_execution_receipt",exit_code:1,sources:["sdk/test/execution.ts"]},{code:"missing_probe",exit_code:1,sources:["sdk/agent/tracker-preflight-contracts.ts"]},{code:"missing_required_argument",exit_code:2,stable:!0,sources:["cli/error-guidance.ts","cli/main.ts","cli/register-mutation.ts","cli/schema/registration.ts","core/telemetry/observability.ts","sdk/governance/assurance-action.ts","sdk/history-redact.ts","sdk/invocation-author.ts","sdk/lifecycle/claim.ts","sdk/linked-artifacts.ts"],emitting_commands:["*","claim"]},{code:"missing_required_option",exit_code:2,stable:!0,sources:["cli/error-guidance.ts","core/telemetry/observability.ts","sdk/context-intent-contracts.ts","sdk/extension/command-options.ts","sdk/lifecycle/create.ts","sdk/lifecycle/plan.ts"],emitting_commands:["*","create","plan"]},{code:"missing_suggested_retry",exit_code:1,sources:["sdk/agent/refusal-closure.ts"]},{code:"missing_suggested_retry_args",exit_code:1,sources:["sdk/agent/refusal-closure.ts"]},{code:"module_import_failed",exit_code:1,stable:!0,sources:["cli/error-guidance.ts"]},{code:"multi_target_github_install_ambiguous",exit_code:2,stable:!0,sources:["cli/register-setup.ts"]},{code:"mutation_author_required",exit_code:2,stable:!0,sources:["sdk/mutation-guard.ts"]},{code:"mutation_document_unreadable",exit_code:2,sources:["cli/register-structured-mutation.ts"]},{code:"mutation_option_value_invalid",exit_code:2,sources:["sdk/lifecycle/mutation-option-validation.ts"],emitting_commands:["item mutate"]},{code:"mutation_secret_guard_blocked",exit_code:4,stable:!0,sources:["sdk/mutation-guard.ts"]},{code:"no_matching_tests",exit_code:1,stable:!0,sources:["sdk/test/execution-receipts.ts"]},{code:"no_projects_matched_filters",exit_code:1,stable:!0,sources:["sdk/test/execution-receipts.ts"]},{code:"no_test_files_found",exit_code:1,stable:!0,sources:["sdk/test/execution-receipts.ts"]},{code:"no_tests_found",exit_code:1,stable:!0,sources:["sdk/test/execution-receipts.ts"]},{code:"no_update_fields",exit_code:1,stable:!0,sources:["cli/error-guidance.ts","core/telemetry/observability.ts"]},{code:"no_version_bounds_declared",exit_code:1,sources:["core/extensions/manifest-schema.ts"],owned_states:[{state:"author_workspace_manifest_omits_canonical_pm_version_bounds",probe_id:"author-manifest-version-bounds-missing",entrypoints:["health"],expected_exit_class:"generic_failure"}]},{code:"non_refusal_exit",exit_code:1,sources:["sdk/agent/refusal-closure.ts"]},{code:"npm_pack_json_shape_unsupported",exit_code:1,sources:["sdk/extension/install-sources.ts"]},{code:"npm_package_archive_missing",exit_code:1,sources:["sdk/extension/install-sources.ts"]},{code:"npm_package_archive_unsafe",exit_code:1,sources:["sdk/extension/install-sources.ts"]},{code:"npm_package_not_found",exit_code:3,stable:!0,sources:["sdk/extension/install-sources.ts"]},{code:"output_budget_exceeded",exit_code:2,sources:["sdk/testing.ts"]},{code:"ownership_conflict",exit_code:4,stable:!0,sources:["cli/error-guidance.ts","core/telemetry/observability.ts","sdk/annotations.ts"]},{code:"ownership_dependency_bypass_restricted_options",exit_code:1,stable:!0,sources:["sdk/lifecycle/update.ts"],emitting_commands:["update"]},{code:"ownership_metadata_bypass_restricted_options",exit_code:1,stable:!0,sources:["sdk/lifecycle/update.ts"],emitting_commands:["update"]},{code:"package_spec_empty",exit_code:1,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"package_upgrade_modes_mutually_exclusive",exit_code:2,sources:["sdk/governance/upgrade.ts"]},{code:"positional_shape_budget_exceeded",exit_code:1,sources:["sdk/cli-contracts/grammar-contracts.ts"]},{code:"positional_signature_mismatch",exit_code:1,sources:["sdk/cli-contracts/grammar-contracts.ts"]},{code:"profile_name_empty",exit_code:1,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"profile_name_not_normalized",exit_code:1,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"profile_summary_empty",exit_code:1,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"profile_title_empty",exit_code:1,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"project_runtime_history_epoch_incompatible",exit_code:4,sources:["sdk/environment/project-runtime-compatibility.ts"]},{code:"project_runtime_item_format_incompatible",exit_code:4,sources:["sdk/environment/project-runtime-compatibility.ts"]},{code:"project_runtime_stale_mutation",exit_code:4,sources:["sdk/environment/project-runtime-compatibility.ts"]},{code:"project_runtime_stale_read",exit_code:1,sources:["sdk/environment/project-runtime-compatibility.ts"]},{code:"project_schema_field_requires_declared_flag",exit_code:2,sources:["core/extensions/item-fields.ts"]},{code:"projection_options_mutually_exclusive",exit_code:2,sources:["sdk/query/get.ts","sdk/query/list.ts","sdk/query/search-contracts.ts"],emitting_commands:["get","list","search"]},{code:"provenance_value_domain_invalid",exit_code:2,sources:["core/diagnostics/remediation.ts"]},{code:"read_output_cursor_command_mismatch",exit_code:2,sources:["sdk/read-output/continuation.ts"]},{code:"read_output_cursor_invalid",exit_code:2,sources:["sdk/read-output/continuation.ts"]},{code:"read_output_cursor_stale",exit_code:2,sources:["sdk/read-output/continuation.ts"]},{code:"read_output_mutation_conflict",exit_code:2,sources:["sdk/read-output-contracts.ts"]},{code:"read_output_surface_unsupported",exit_code:2,sources:["sdk/read-output-contracts.ts"]},{code:"recovery_kind_mismatch",exit_code:1,sources:["sdk/agent/tracker-preflight-contracts.ts"]},{code:"redundant_edge",exit_code:1,stable:!0,sources:["sdk/graph/remediation.ts"]},{code:"refusal_allowed_values_mismatch",exit_code:1,sources:["sdk/agent/refusal-corpus-contracts.ts"]},{code:"refusal_error_code_mismatch",exit_code:1,sources:["sdk/agent/refusal-corpus-contracts.ts"]},{code:"refusal_exit_code_mismatch",exit_code:1,sources:["sdk/agent/refusal-corpus-contracts.ts"]},{code:"refusal_mutated_state",exit_code:1,sources:["sdk/agent/refusal-corpus-contracts.ts"]},{code:"refusal_probe_missing",exit_code:1,sources:["sdk/agent/refusal-corpus-contracts.ts"]},{code:"refusal_recovery_failed",exit_code:1,sources:["sdk/agent/refusal-corpus-contracts.ts"]},{code:"reindex_already_running",exit_code:4,stable:!0,sources:["sdk/governance/reindex.ts"]},{code:"removed_canonical_spelling",exit_code:1,sources:["sdk/cli-contracts/flag-lexicon-contracts.ts"]},{code:"removed_compatibility_spelling",exit_code:1,sources:["sdk/cli-contracts/flag-lexicon-contracts.ts"]},{code:"reopen_reason_required",exit_code:2,sources:["sdk/lifecycle/reopen.ts"],emitting_commands:["item reopen"]},{code:"reopen_receipt_missing",exit_code:1,sources:["sdk/lifecycle/update.ts"],emitting_commands:["update"]},{code:"reopen_target_status_invalid",exit_code:2,sources:["sdk/lifecycle/reopen.ts"],emitting_commands:["item reopen"]},{code:"reported_zero_passes",exit_code:1,sources:["sdk/test/execution-receipts.ts"]},{code:"reported_zero_tests",exit_code:1,sources:["sdk/test/execution-receipts.ts"]},{code:"reserved_item_field",exit_code:1,stable:!0,sources:["sdk/compose.ts"]},{code:"retry_failed",exit_code:1,sources:["sdk/agent/refusal-closure.ts","sdk/agent/tracker-preflight-contracts.ts"]},{code:"schema_field_flag_invalid",exit_code:2,sources:["sdk/schema/field-option-collisions.ts"]},{code:"schema_field_option_collision",exit_code:2,sources:["sdk/schema/field-option-collisions.ts"]},{code:"schema_migration_input_required",exit_code:2,stable:!0,sources:["cli/migration-gates.ts"]},{code:"semantic_spelling_collision",exit_code:1,sources:["sdk/cli-contracts/flag-lexicon-contracts.ts"]},{code:"settings_invalid",exit_code:2,sources:["sdk/extension/static-inventory.ts"]},{code:"settings_read_fs_error",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"settings_read_invalid_json",exit_code:2,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"settings_read_invalid_schema",exit_code:2,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"settings_read_merge_failed",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"settings_section_document_malformed",exit_code:2,sources:["core/store/settings-sections.ts"]},{code:"settings_section_document_missing",exit_code:3,sources:["core/store/settings-sections.ts"]},{code:"settings_section_invalid",exit_code:2,sources:["core/store/settings-sections.ts"]},{code:"settings_section_name_invalid",exit_code:2,sources:["core/store/settings-sections.ts"]},{code:"settings_section_reserved",exit_code:2,sources:["core/store/settings-sections.ts"]},{code:"settings_section_revision_conflict",exit_code:4,sources:["core/store/settings-sections.ts"]},{code:"settings_unreadable",exit_code:1,sources:["sdk/extension/static-inventory.ts"]},{code:"settings_write_assigned_path_invalid",exit_code:2,sources:["core/store/settings.ts"]},{code:"settings_write_invalid_existing_json",exit_code:2,sources:["core/store/settings.ts"]},{code:"settings_write_invalid_existing_schema",exit_code:2,sources:["core/store/settings.ts"]},{code:"stale_budget",exit_code:1,sources:["sdk/cli-contracts/flag-lexicon-contracts.ts"]},{code:"stale_claim_takeover_refused",exit_code:4,sources:["sdk/lifecycle/claim.ts"],emitting_commands:["claim"]},{code:"stale_destination",exit_code:1,sources:["sdk/cli-contracts/grammar-contracts.ts"]},{code:"stale_in_progress_items",exit_code:1,sources:["core/diagnostics/remediation.ts"]},{code:"stale_lock_requires_override",exit_code:4,sources:["core/lock/lock.ts"]},{code:"stale_observed_signature",exit_code:1,sources:["sdk/cli-contracts/grammar-contracts.ts"]},{code:"stale_revision",exit_code:4,sources:["core/store/item-store.ts"]},{code:"start_blocked_by_open_dependency",exit_code:4,sources:["sdk/lifecycle/start-blockers.ts"],emitting_commands:["claim","start-task","update"]},{code:"status_duplicate",exit_code:1,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"status_invalid",exit_code:2,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"status_lifecycle_role_required",exit_code:2,sources:["sdk/schema.ts"]},{code:"stdin_json_invalid",exit_code:2,stable:!0,sources:["sdk/structured-mutations.ts"]},{code:"stdin_json_persisted_annotation_changed",exit_code:2,sources:["sdk/lifecycle/update.ts"],emitting_commands:["update"]},{code:"stdin_json_unknown_key",exit_code:2,stable:!0,sources:["sdk/structured-mutations.ts"]},{code:"structured_entry_key_repeated",exit_code:2,sources:["core/item/parse.ts"]},{code:"structured_event_immutable",exit_code:2,stable:!0,sources:["sdk/annotations.ts"]},{code:"structured_event_input_conflict",exit_code:2,stable:!0,sources:["sdk/notes.ts"]},{code:"structured_event_json_empty",exit_code:2,stable:!0,sources:["sdk/notes.ts"]},{code:"structured_event_json_invalid",exit_code:2,stable:!0,sources:["sdk/notes.ts"]},{code:"structured_event_since_invalid",exit_code:2,stable:!0,sources:["sdk/notes.ts"]},{code:"suggested_retry_args_mismatch",exit_code:1,sources:["sdk/agent/refusal-closure.ts"]},{code:"telemetry_endpoint_probe_failed",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"telemetry_endpoint_probe_http_status",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"telemetry_otel_export_failing",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"telemetry_queue_high_retries",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"telemetry_queue_invalid_rows",exit_code:2,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"telemetry_queue_pending",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"telemetry_schema_version_behind",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"telemetry_state_invalid_json",exit_code:2,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"template_type_unknown",exit_code:2,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"terminal_plan_mutation",exit_code:4,stable:!0,sources:["sdk/lifecycle/plan.ts"],emitting_commands:["plan"]},{code:"terminal_state_conflict",exit_code:4,stable:!0,sources:["core/telemetry/observability.ts","sdk/lifecycle/claim.ts"],emitting_commands:["*","claim"]},{code:"test_measure_requires_execution",exit_code:2,sources:["sdk/test/prerequisites.ts"]},{code:"test_measure_requires_run",exit_code:2,sources:["sdk/test/prerequisites.ts"]},{code:"text_unpaired_surrogate",exit_code:2,sources:["core/item/item-format.ts","core/shared/output-unicode.ts"]},{code:"tracked_runtime_cache_files",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"],aliases:["validate_storage_tracked_runtime_cache_files"]},{code:"tracker_not_initialized",exit_code:3,stable:!0,sources:["cli/error-guidance.ts","core/store/tracker-preflight.ts","core/telemetry/observability.ts"],owned_states:[{state:"selected_tracker_root_exists_without_settings",probe_id:"tracker-root-settings-missing",entrypoints:["list"],expected_exit_class:"not_found"}]},{code:"tracker_root_missing",exit_code:3,stable:!0,sources:["core/store/tracker-preflight.ts"],owned_states:[{state:"selected_tracker_root_does_not_exist",probe_id:"tracker-root-missing",entrypoints:["list"],expected_exit_class:"not_found"}]},{code:"tracker_root_not_directory",exit_code:2,stable:!0,sources:["core/store/tracker-preflight.ts"],owned_states:[{state:"selected_tracker_root_is_a_regular_file",probe_id:"tracker-root-not-directory",entrypoints:["list"],expected_exit_class:"usage"}]},{code:"tracker_root_unreadable",exit_code:1,sources:["core/store/tracker-preflight.ts"],owned_states:[{state:"selected_tracker_root_is_not_readable",probe_id:"tracker-root-unreadable",entrypoints:["list"],expected_exit_class:"generic_failure"}]},{code:"transaction_abandoned",exit_code:4,sources:["sdk/workspace-transaction.ts"]},{code:"transaction_committed",exit_code:4,sources:["sdk/workspace-transaction.ts"]},{code:"transaction_create_compensated",exit_code:4,sources:["sdk/item-transaction.ts"]},{code:"transaction_journal_invalid",exit_code:4,sources:["sdk/workspace-transaction.ts"]},{code:"transaction_partial_mutation",exit_code:4,sources:["sdk/item-transaction.ts"]},{code:"transaction_plan_mismatch",exit_code:4,sources:["sdk/workspace-transaction.ts"]},{code:"transaction_preview_external_schema",exit_code:2,sources:["sdk/item-transaction.ts"]},{code:"transaction_preview_non_regular_file",exit_code:2,sources:["core/fs/fs-utils.ts"]},{code:"transaction_preview_snapshot_changed",exit_code:4,sources:["sdk/item-transaction.ts"]},{code:"transaction_recovery_plan_missing",exit_code:4,sources:["sdk/item-transaction.ts"]},{code:"type_duplicate",exit_code:1,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"type_invalid",exit_code:2,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"undeclared_observation",exit_code:1,sources:["sdk/flag-invocation-contracts.ts"]},{code:"unexpected_refusal_probe",exit_code:1,sources:["sdk/agent/refusal-corpus-contracts.ts"]},{code:"unknown_command",exit_code:2,stable:!0,sources:["cli/error-guidance.ts","core/telemetry/observability.ts","sdk/cli-contracts/runtime-contracts.ts"]},{code:"unknown_context_intent",exit_code:2,stable:!0,sources:["sdk/context-intent-contracts.ts"]},{code:"unknown_error",exit_code:1,stable:!0,sources:["cli/error-guidance.ts"]},{code:"unknown_field",exit_code:3,stable:!0,sources:["sdk/schema.ts"]},{code:"unknown_field_projection",exit_code:2,stable:!0,sources:["sdk/query/get.ts","sdk/query/list.ts","sdk/query/search-contracts.ts"],emitting_commands:["get","list","search"]},{code:"unknown_item_type",exit_code:3,stable:!0,sources:["sdk/schema.ts"]},{code:"unknown_lifecycle_action",exit_code:2,stable:!0,sources:["sdk/agent/subcommand-recovery.ts"],canonical_code:"unknown_subcommand"},{code:"unknown_noun",exit_code:2,sources:["sdk/cli-contracts/grammar-contracts.ts"]},{code:"unknown_option",exit_code:2,stable:!0,sources:["cli/error-guidance.ts","cli/runtime/invocation-options.ts","core/telemetry/observability.ts","sdk/extension/command-options.ts"],owned_states:[{state:"declared_option_is_rejected_on_the_selected_command_path",probe_id:"cross-command-unknown-option",entrypoints:["deps"],expected_exit_class:"usage"}]},{code:"unknown_plan_template",exit_code:2,stable:!0,sources:["sdk/lifecycle/plan.ts"],emitting_commands:["plan"]},{code:"unknown_provenance_dimension",exit_code:2,stable:!0,sources:["sdk/history-provenance.ts"]},{code:"unknown_status",exit_code:3,stable:!0,sources:["sdk/schema.ts"]},{code:"unknown_subcommand",exit_code:2,stable:!0,sources:["cli/error-guidance.ts","sdk/agent/subcommand-recovery.ts"],aliases:["unknown_lifecycle_action"],owned_states:[{state:"config_action_token_is_not_declared",probe_id:"config-unknown-action",entrypoints:["config"],expected_exit_class:"usage"},{state:"graph_command_token_is_not_declared",probe_id:"graph-unknown-subcommand",entrypoints:["graph"],expected_exit_class:"usage"},{state:"nested_command_token_is_not_declared_by_its_family",probe_id:"schema-unknown-subcommand",entrypoints:["schema"],expected_exit_class:"usage"},{state:"package_lifecycle_token_is_not_declared",probe_id:"package-unknown-action",entrypoints:["package"],expected_exit_class:"usage"}]},{code:"unsafe_init_recovery",exit_code:1,sources:["sdk/agent/tracker-preflight-contracts.ts"]},{code:"unsupported_update_option",exit_code:1,stable:!0,sources:["cli/error-guidance.ts"]},{code:"upsert_key_ambiguous",exit_code:4,sources:["sdk/structured-mutations.ts"]},{code:"upsert_key_conflict",exit_code:4,sources:["sdk/item-transaction.ts"]},{code:"upsert_key_duplicate",exit_code:2,sources:["sdk/item-transaction.ts","sdk/structured-mutations.ts"]},{code:"upsert_key_missing",exit_code:2,sources:["sdk/structured-mutations.ts"]},{code:"upsert_match_changed",exit_code:4,sources:["sdk/item-transaction.ts"]},{code:"validate_command_references_stale_pm_ids",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_files_missing_linked_paths",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_files_orphaned_paths",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_files_tracked_all_strict_forces_pm_internals",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_format_version_ahead_items",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"],canonical_code:"integrity_item_ahead_format_version"},{code:"validate_format_version_outdated_items",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"],canonical_code:"integrity_item_outdated_format_version"},{code:"validate_hierarchy_parent_cycle",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_hierarchy_parent_cycle_error",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_history_drift_chain_mismatches",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"],canonical_code:"history_drift_chain_mismatch"},{code:"validate_history_drift_hash_mismatches",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"],canonical_code:"history_drift_hash_mismatch"},{code:"validate_history_drift_missing_streams",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"],canonical_code:"history_drift_missing_stream"},{code:"validate_history_drift_unreadable_streams",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"],canonical_code:"history_drift_unreadable_stream"},{code:"validate_history_drift_version_skews",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"],canonical_code:"history_drift_version_skew"},{code:"validate_history_unknown_author_events",exit_code:2,stable:!0,sources:["core/diagnostics/remediation.ts"],canonical_code:"history_unknown_author_events"},{code:"validate_lifecycle_active_closure_like_metadata",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_lifecycle_active_terminal_parent",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_lifecycle_dependency_cycles",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_lifecycle_dependency_cycles_error",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_lifecycle_stale_blockers",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_merge_decisions_unreviewed",exit_code:1,sources:["core/diagnostics/remediation.ts"]},{code:"validate_merge_driver_configuration",exit_code:1,sources:["core/diagnostics/remediation.ts"]},{code:"validate_merge_fence_drift",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_custom_profile_missing_required_fields",exit_code:2,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_duplicate_issue_codes",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_missing_acceptance_criteria",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_missing_close_reason",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_missing_closed_at",exit_code:1,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_missing_confidence",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_missing_estimate",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_missing_release",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_missing_reviewer",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_missing_risk",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_metadata_missing_sprint",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_resolution_missing_fields",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_schema_field_option_collision",exit_code:1,sources:["core/diagnostics/remediation.ts"]},{code:"validate_storage_duplicate_item_ids",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_storage_history_conflict_markers",exit_code:4,stable:!0,sources:["core/diagnostics/remediation.ts"],canonical_code:"integrity_history_conflict_marker"},{code:"validate_storage_resurrected_items",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_storage_tracked_runtime_cache_files",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"],canonical_code:"tracked_runtime_cache_files"},{code:"validate_storage_unparseable_config",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_storage_unparseable_history",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"validate_storage_unreadable_items",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"vectorization_embedding_identity_changed",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"vectorization_stale_items_remaining",exit_code:1,stable:!0,sources:["core/diagnostics/remediation.ts"]},{code:"visible_surface_ceiling_exceeded",exit_code:1,sources:["sdk/cli-contracts/grammar-contracts.ts"]},{code:"workflow_duplicate_type",exit_code:1,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"workflow_policy_approval_history_invalid",exit_code:4,sources:["core/policy/workflow-policy-store.ts"]},{code:"workflow_policy_audit_failed",exit_code:4,sources:["core/policy/workflow-policy-store.ts"]},{code:"workflow_policy_input_unreadable",exit_code:4,sources:["core/policy/workflow-policy-store.ts"]},{code:"workflow_policy_invalid",exit_code:2,sources:["core/policy/workflow-policy.ts"]},{code:"workflow_policy_refused",exit_code:4,sources:["core/policy/workflow-policy-store.ts"]},{code:"workflow_policy_registry_invalid",exit_code:4,sources:["core/policy/workflow-policy-store.ts"]},{code:"workflow_status_unknown",exit_code:2,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"workflow_transition_malformed",exit_code:1,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"workflow_type_empty",exit_code:1,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"workflow_type_unknown",exit_code:2,stable:!0,sources:["core/profile/profile-lint.ts"]},{code:"workspace_history_chain_invalid",exit_code:4,sources:["core/history/workspace-history.ts"]},{code:"workspace_history_state_conflict",exit_code:4,stable:!0,sources:["core/history/workspace-history.ts"]},{code:"workspace_root_pm_path",exit_code:2,stable:!0,sources:["sdk/init.ts"]},{code:"workspace_snapshot_force_required",exit_code:2,sources:["sdk/workspace-snapshot.ts"]},{code:"workspace_snapshot_manifest_mismatch",exit_code:4,sources:["sdk/workspace-snapshot.ts"]},{code:"workspace_snapshot_name_reserved_fingerprint",exit_code:2,sources:["sdk/workspace-snapshot.ts"]},{code:"workspace_snapshot_not_found",exit_code:3,sources:["sdk/workspace-snapshot.ts"]},{code:"workspace_snapshot_permission_denied",exit_code:1,sources:["sdk/workspace-snapshot.ts"]},{code:"workspace_snapshot_resource_exhausted",exit_code:1,sources:["sdk/workspace-snapshot.ts"]},{code:"workspace_snapshot_storage_exhausted",exit_code:1,sources:["sdk/workspace-snapshot.ts"]},{code:"wrong_item_type",exit_code:2,stable:!0,sources:["sdk/lifecycle/plan.ts"],emitting_commands:["plan"]}];export{e as PM_ERROR_CODE_CATALOG_PART_2};
|
|
2
2
|
//# sourceMappingURL=generated-error-code-catalog-part-2.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{execFile as
|
|
1
|
+
import{execFile as u}from"node:child_process";import{realpath as d}from"node:fs/promises";import s from"node:path";import{promisify as h}from"node:util";import{PM_GITIGNORE_RUNTIME_DIRECTORIES as k}from"../workspace.js";import{findGitWorkspaceRoot as f}from"../merge/install.js";import{quoteCommandArg as T}from"../../core/shared/command-line.js";const R=h(u),g=32*1024*1024,I=1e4,w=["search/eval-queries.json"];function i(r){return r.replaceAll("\\","/").replace(/\/+$/,"")}async function E(r,e=d){return e(r).catch(()=>s.resolve(r))}async function M(r){const e=await f(r);if(e===null)return{git_workspace_root:null,tracker_relative_root:null,tracked_paths:[],tracked_path_count:0,remediation_command:null};const _=await E(r),o=i(s.relative(e,_));if(o.length===0)return{git_workspace_root:e,tracker_relative_root:null,tracked_paths:[],tracked_path_count:0,remediation_command:null};const l=k.map(n=>`${o}/${i(n)}`);try{const{stdout:n}=await R("git",["ls-files","-z","--",...l.map(t=>`:(literal)${t}`)],{cwd:e,encoding:"utf8",maxBuffer:g,windowsHide:!0,timeout:I}),m=new Set(w.map(t=>`${o}/${t}`)),a=[...new Set(n.split("\0").filter(t=>t.length>0&&!m.has(i(t))))].sort((t,c)=>t.localeCompare(c)),p=l.filter(t=>a.some(c=>c===t||c.startsWith(`${t}/`)));return{git_workspace_root:e,tracker_relative_root:o,tracked_paths:a,tracked_path_count:a.length,remediation_command:a.length===0?null:`git rm --cached -r -- ${p.map(t=>T(`:(literal)${t}`)).join(" ")}`}}catch{return{git_workspace_root:e,tracker_relative_root:o,tracked_paths:[],tracked_path_count:0,remediation_command:null}}}export{E as resolveCanonicalTrackerRoot,M as scanTrackedRuntimeCache};
|
|
2
2
|
//# sourceMappingURL=tracked-runtime-cache.js.map
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Defines public SDK APIs and package-author helpers for Index.
|
|
5
5
|
*/
|
|
6
|
-
export type{CompletionRuntimeConfig}from "./completion.js";export{isItemAlreadyExistsError,type PmItemAlreadyExistsError,isPmTokenBudgetRecovery,type PmTokenBudgetRecovery,PM_CLI_ERROR_DETAILS_LIMITS,isPmCliErrorDetails,projectPmCliErrorDetails,projectPmCliErrorContextDetails,snapshotPmCliErrorContext,type PmCliErrorDetails,type PmCliErrorDetailValue,type PmCliErrorDetailsOmission,type PmCliErrorDetailsRejection}from "./errors.js";export{PM_COMMAND_CAPABILITY_CONTRACTS,PM_COMMAND_VISIBILITY_CONTRACTS,PM_MCP_PROMPT_CONTRACTS,PM_MCP_RESOURCE_CONTRACTS,PM_MCP_TOOL_COMMAND_CONTRACTS,listPmCommandsForFamily,listPmCommandsForTier,listPmMcpToolsForProfile,renderPmCommandVisibilityMarkdown,resolvePmCommandCapabilityFamily,resolvePmCommandVisibilityTier,}from "./agent-capability-contracts.js";export * from "./mcp/protocol.js";export * from "./mcp/executable.js";export * from "./mcp/interactions.js";export * from "./mcp/tasks.js";export * from "./mcp/subscriptions.js";export * from "./mcp/transport.js";export * from "./mcp/authorization.js";export * from "./mcp/apps.js";export * from "./mcp/skills.js";export * from "./cli-contracts/grammar-contracts.js";export * from "./agent-session-context.js";export * from "./environment/agent-environment.js";export type{PmCommandCapabilityContract,PmCommandCapabilityFamily,PmCommandVisibilityContract,PmCommandVisibilityTier,PmMcpPromptArgumentContract,PmMcpPromptContract,PmMcpResourceContract,PmMcpToolProfile,}from "./agent-capability-contracts.js";export{isErrnoError,limitAnnotationEntries,parseAnnotationTextInput,readAnnotationEntries,normalizeAnnotationTransportOptions,resolveAnnotationInput,resolveAnnotationIndex,runAnnotationCommand,wrapOwnershipConflict,type AnnotationCommandConfig,type AnnotationCommandOptions,type AnnotationCommandResult,type AnnotationEntry,type AnnotationInput,type AnnotationHistoryRestoration,type AnnotationMutationReceipt,type AnnotationOmissionReceipt,type AnnotationSourceOptions,type IndexedAnnotationEntry,type OwnershipConflictGuidance,}from "./annotations.js";export{acknowledgeUnknownAuthorHistoryEvents,acknowledgeUnknownAuthorHistoryEventsFromTransport,inspectHistoryAuthorStream,parseUnknownAuthorHistoryEventCoordinates,planUnknownAuthorHistoryAcknowledgment,resolveUnknownAuthorAcknowledgmentSelector,scanHistoryAuthorAttribution,type AcknowledgeUnknownAuthorEventsOptions,type HistoryAuthorAttributionScan,type UnknownAuthorAcknowledgmentPlan,type UnknownAuthorAcknowledgmentPlanCoordinate,type UnknownAuthorAcknowledgmentResult,type UnknownAuthorHistoryEvent,}from "./author-attribution.js";export{BUILTIN_CORPUS_SHAPES,PM_CORPUS_SHAPE_SCHEMA,buildCorpusShapeItemPlan,createCorpusShapeMeasurement,defineCorpusShape,listBuiltinCorpusShapes,measureCorpusShapePlan,resolveBuiltinCorpusShape,type BuiltinCorpusShapeName,type CorpusShape,type CorpusShapeEdgeWeight,type CorpusShapeItemPlan,type CorpusShapeMeasurement,type CorpusShapeProfile,}from "./corpus-shape.js";export * from "./core-governance.js";export{createPmCliProgram}from "./cli-program.js";export{runSearchRefreshWorkerEntrypoint}from "./search-refresh-worker.js";export{PM_REPRODUCIBLE_PROCESS_ENV,createReproducibleProcessRunner,resolveReproducibleProcessEnvironment,runWithReproducibleProcessEnvironment,type ReproducibleExecutionSettings,type ReproducibleProcessEnvironment,type ReproducibleProcessRunner,}from "./reproducibility/process.js";export{PM_WORKSPACE_RECIPE_SCHEMA,defineWorkspaceRecipe,executeWorkspaceRecipe,runWithWorkspaceRecipe,type WorkspaceRecipe,type WorkspaceRecipeJsonValue,type WorkspaceRecipeOperation,}from "./workspace-recipe.js";export{SNAPSHOT_SCHEMA,WORKSPACE_SNAPSHOT_ACTIONS,createWorkspaceSnapshot,deleteWorkspaceSnapshot,inspectWorkspaceSnapshot,listWorkspaceSnapshots,planWorkspaceSnapshotRestore,restoreWorkspaceSnapshot,restoreWorkspaceSnapshotWithRecovery,type CreateWorkspaceSnapshotResult,type RestoreWorkspaceSnapshotOptions,type RestoreWorkspaceSnapshotResult,type WorkspaceSnapshotHistoryImpact,type WorkspaceSnapshotManifest,type WorkspaceSnapshotReference,type WorkspaceSnapshotRestorePlan,}from "./workspace-snapshot.js";export{flushTelemetryQueue}from "./telemetry-flush.js";export{PM_HISTORY_COMMAND_ALIASES,PM_CONTEXT_OPS_COMMAND_ALIASES,PM_BULK_LIFECYCLE_COMMAND_ALIASES,PM_RELOCATED_COMMAND_ALIASES,PM_NAMESPACED_COMMAND_ALIASES,findPmNamespacedCommand,resolvePmCommandOperation,resolvePmHistoryOperation}from "./cli-contracts.js";export{EXECUTABLE_COMMAND_ALIASES,PM_COMMAND_ALIAS_CONTRACTS,renderPmCommandAliasMigrationHint,resolvePmCommandAlias,type PmCommandAliasContract,type PmCommandAliasLifecycle,type PmCommandAliasRegistration,applyBootstrapPagerPolicy,coalesceRepeatedListFlags,listAliasPluralKeys,mergeLinkedTestTwoTokenEntries,normalizeBootstrapInvocation,normalizeLegacyExtensionActionSyntax,parseBootstrapCommandName,parseBootstrapGlobalOptions,parseBootstrapHelpRequest,parseBootstrapTypeValue,stripGlobalBootstrapTokens,type BootstrapGlobalOptions,type BootstrapHelpRequest,type BootstrapInvocationNormalizationResult,type BootstrapNormalizationEvent,}from "./cli-bootstrap.js";export{quoteCommandArg,quoteWindowsCommandArg,redactUrlCredentialsInText,redactUrlCredentialsInToken,renderPmCommand,resolvePmCommandScopeArgs,URL_CREDENTIAL_PLACEHOLDER,}from "./command-line.js";export * from "./agent/command-recovery.js";export * from "./agent/linked-resource-recovery.js";export * from "./agent/command-suggestions.js";export * from "./agent/item-addressing.js";export * from "./agent/create-option-policy.js";export{runGc,type GcCheckpointsSummary,type GcLocksSummary,}from "./governance/gc.js";export{PM_EXACT_COVERAGE_METRICS,findCoverageDeficits,type PmCoverageDeficit,type PmExactCoverageMetric,}from "./governance/coverage-assurance.js";export{_testOnlyHealthCommand,runHealth,type HealthCheck,}from "./governance/health.js";export{_testOnlyValidateCommand,projectValidateCounts,runValidate,type ValidateCheck,type ValidateCountsFixesSummary,type ValidateCountsResult,type ValidateFixesSummary,type ValidateMutationServices,}from "./governance/validate.js";export{runExtension,type ExtensionCommandAction}from "./extension.js";export{inspectStaticExtensionInventory,type StaticExtensionInventoryEntry,type StaticExtensionInventoryError,type StaticExtensionInventoryResult}from "./extension/static-inventory.js";export{buildExtensionInstallPlan,planExtensionDirectoryCopy,type ExtensionCopyPlan,type ExtensionCopyPlanOptions,type ExtensionInstallPlan,}from "./extension/install-plan.js";export{resolveExtensionInstallSourceIdentity,type ExtensionInstallSourceCandidate,type ExtensionInstallSourceResolution,type ExtensionInstallSourceSelection,type ResolvedExtensionInstallSource,}from "./extension/source-resolution.js";export{applyStoredExtensionMigrationState,readExtensionMigrationState,resolveExtensionMigrationStatePath,runExtensionMigrateAction,runExtensionMigrations,type ExtensionMigrationActionContext,type ExtensionMigrationOutcomeStatus,type ExtensionMigrationReceipt,type ExtensionMigrationRunResult,type ExtensionMigrationState,type ExtensionMigrationStateEntry,type RunExtensionMigrationsOptions,}from "./extension/migrations.js";export{findInstalledNpmPackageCandidate,type GithubInstallSource,type InstalledNpmPackageCandidate,type InstallSource,type LocalInstallSource,type NpmInstallSource,type ResolvedInstallSource,}from "./extension/install-sources.js";export{buildExtensionDescribeResult,renderExtensionDescribeMarkdown,type ExtensionCommandClaimant,type ExtensionCommandOwnership,type ExtensionDescribeActivationStatus,type ExtensionDescribeResult,type ExtensionSurfaceDescription,}from "./extension/describe.js";export{runEvent,runMeet,runRemind,type MeetingEventShortcutOptions,type ReminderShortcutOptions,type SchedulingShortcutCommonOptions,}from "./scheduling-shortcuts.js";export{createExtensionCommandSdk}from "./extension-command-context.js";export{isRuntimeRecord}from "./runtime-input.js";export{resolveStartTaskInProgressStatus}from "./start-task-status.js";export{auditMergeAttributeFence,buildMergeAttributePatterns,findGitWorkspaceRoot,installMergeFence,refreshMergeAttributeFenceIfInstalled,resolveMergeInstallContext,resolveProjectMergeTypeFolders,runMergeInstall,type MergeFenceAuditOptions,type MergeFenceAuditResult,type MergeFenceRefreshOutcome,type MergeInstallOptions,type MergeInstallContextResolution,type MergeInstallResult,}from "./merge/install.js";export{deriveSchemaEvolutionMigrationId,formatSchemaEvolutionMigrationHuman,planSchemaEvolutionMigration,runSchemaEvolutionMigration,type PlanSchemaEvolutionMigrationOptions,type SchemaEvolutionFieldChange,type SchemaEvolutionItemPlan,type SchemaEvolutionMigrationPlan,}from "./schema-migration.js";export type{RuntimeFieldDefinition,RuntimeFieldValueSchema,}from "./schema.js";export{runInActiveExtensionScope,runWithActiveExtensions,type ActiveExtensionScopeOptions,}from "./runtime.js";export{applyInvocationAuthorOverride}from "./invocation-author.js";export{describeItemRevisionChanges,isItemRevisionConflict,ITEM_REVISION_CONFLICT_CHANGE_LIMIT,ITEM_REVISION_CONFLICT_CODE,normalizeExpectedItemHash,parseExpectHashSpecs,readItemRevision,withExpectedItemRevisions,type ExpectedItemRevision,type ExpectedItemRevisionsOutcome,type ExpectHashSpec,type ItemRevision,type ItemRevisionChange,type ItemRevisionConflictRowFields,type ItemRevisionContext,}from "./lifecycle/item-revision.js";export type{CreateNullClearableOptionKey,NullClearableOptionKey,UpdateNullClearableOptionKey,WithNullClears,}from "./lifecycle/shared-unset-fields.js";export type{MutationInputAudience}from "../core/item/literal-mutation-input.js";export{admitStartWithOpenBlockers,isStartTransition,START_BLOCKED_REFUSAL_CODE,START_BLOCKER_ENFORCEMENT_DEFAULT,}from "./lifecycle/start-blockers.js";export{resolveDeclaredBlockers}from "./query/declared-blockers.js";export{evaluateMutationGuard,getMutationActionContract,isMutationAction,listMutationActions,PM_MUTATION_ACTION_CONTRACTS,scanMutationSecrets,decideSecretGuardFinding,SECRET_GUARD_RULE_CATEGORIES,secretGuardRuleCategory,type EvaluateMutationGuardOptions,type MutationActionContract,type MutationGuardResult,type MutationGuardSettings,type MutationHistoryScope,type SecretGuardFinding,type SecretGuardMode,type SecretGuardPolicy,type SecretGuardPolicyDecision,type SecretGuardRule,type SecretGuardRuleCategory,type SecretNormalizationKind,}from "./mutation-guard.js";export{findSimilarItems,findDuplicateClusters,evaluateSimilarityGovernance,similarityAdvisoryWarnings,jaccardSimilarity,normalizeSimilarityText,prepareSimilarityText,scoreItemSimilarity,scorePreparedItemSimilarity,tokenizeSimilarityText,type FindSimilarItemsOptions,type FindDuplicateClustersOptions,type DuplicateCluster,type DuplicateClusterMatch,type DuplicateClustersResult,type SimilarItemCandidate,type SimilarItemMatch,type SimilarItemsResult,type SimilarityAdvisory,type SimilarityRecovery,type PreparedSimilarityText,}from "./similarity.js";export{STALE_WORK_THRESHOLD_SETTING,inspectInProgressWork,inspectStaleInProgressItems,resolveLastActivityAt,scanInProgressWork,scanStaleInProgressItems,type InProgressWorkGroup,type InProgressWorkItem,type InProgressWorkScan,type InspectStaleInProgressOptions,type StaleInProgressItem,type StaleInProgressScan,}from "./governance/stale-work.js";export{buildInProgressSweepCommands,type InProgressSweepCommands,}from "./governance/in-progress-work-health.js";export{describeItemOwnershipConflict,evaluateClaimActivity,resolveItemOwnershipActivity,resolveItemOwnershipConflict,type ClaimActivityEvidence,type ClaimActivityOptions,type ItemOwnershipActivity,type ItemOwnershipConflict,}from "./ownership-source.js";export{discoverNearbyPmRoot}from "./tracker-root-discovery.js";export{assertInitializedTracker,assertReadableTrackerRoot,buildTrackerInitializationRecovery,}from "./environment/tracker-preflight.js";export{_testOnly as _testOnlyTemplates,type TemplateSource,}from "./templates.js";export{runConfig,_testOnlyConfigCommand,type NestedSettingResultValue,}from "./config.js";export * from "./agent/identity-config.js";export{INIT_AGENT_GUIDANCE_MODE_VALUES,runInitAgentGuidance,_testOnly as _testOnlyInitAgentGuidance,type InitAgentGuidanceMode,type InitAgentGuidanceSummary,type RunInitAgentGuidanceOptions,type RunInitAgentGuidanceResult,}from "./init-agent-guidance.js";export{runInit,summarizeInitResult,_testOnly as _testOnlyInit,type InitAgentGuidanceResult,type InitConciseResult,type InitDisplayResult,type InitInstalledPackagesSummary,type InitRegisteredTypePresetSummary,type InitTargetResolution,type InitTypePresetName,}from "./init.js";export{PROFILE_SUBCOMMANDS,formatProfileApplyHuman,formatProfileLintHuman,formatProfileListHuman,formatProfileShowHuman,runProfileApply,runProfileLint,runProfileList,runProfileShow,type ProfileApplyDimension,type ProfileComposition,type ProfileListEntry,}from "./profile.js";export * from "./extension-contracts.js";export{RESERVED_ITEM_FIELD_NAMES}from "../core/extensions/item-fields.js";export type{LocatedItem}from "../core/store/item-store.js";export{PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,PM_PACKAGE_RESOURCE_KINDS,collectPackageExtensionDirectories,readPmPackageManifest,type PmPackageCatalogLinkMap,type PmPackageCatalogMediaMap,type PmPackageCatalogMetadata,type PmPackageManifest,type PmPackageResourceKind,type PmPackageResourceMap,}from "../core/packages/manifest.js";export type{CommanderOptionAliasContract,CommanderOptionRegistrationContract,}from "./cli-contracts.js";export{ACTIVITY_FLAG_CONTRACTS,ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,AGGREGATE_FLAG_CONTRACTS,ASSURANCE_FLAG_CONTRACTS,APPEND_FLAG_CONTRACTS,CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,CALENDAR_FLAG_CONTRACTS,CLAIM_FLAG_CONTRACTS,CLOSE_ACTION_OPTION_KEYS,CLOSE_FLAG_CONTRACTS,CLOSE_MANY_FLAG_CONTRACTS,CLOSE_TASK_FLAG_CONTRACTS,COMMENTS_FLAG_CONTRACTS,COMPLETION_FLAG_CONTRACTS,CONFIG_FLAG_CONTRACTS,CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,CONTEXT_FLAG_CONTRACTS,CONTRACTS_FLAG_CONTRACTS,COPY_FLAG_CONTRACTS,CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,CREATE_COMMANDER_STRING_OPTION_CONTRACTS,CREATE_FLAG_CONTRACTS,DELETE_FLAG_CONTRACTS,DEPS_FLAG_CONTRACTS,DOCS_FLAG_CONTRACTS,EVAL_FLAG_CONTRACTS,EVENT_FLAG_CONTRACTS,EVENTS_FLAG_CONTRACTS,EXTENSION_ACTIVATE_FLAG_CONTRACTS,EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,EXTENSION_ADOPT_FLAG_CONTRACTS,EXTENSION_CATALOG_FLAG_CONTRACTS,EXTENSION_DEACTIVATE_FLAG_CONTRACTS,EXTENSION_DESCRIBE_FLAG_CONTRACTS,EXTENSION_DOCTOR_FLAG_CONTRACTS,EXTENSION_EXPLORE_FLAG_CONTRACTS,EXTENSION_FLAG_CONTRACTS,EXTENSION_INIT_FLAG_CONTRACTS,EXTENSION_INSTALL_FLAG_CONTRACTS,EXTENSION_MANAGE_FLAG_CONTRACTS,EXTENSION_MIGRATE_FLAG_CONTRACTS,EXTENSION_RELOAD_FLAG_CONTRACTS,EXTENSION_SCOPE_FLAG_CONTRACTS,EXTENSION_UNINSTALL_FLAG_CONTRACTS,FILES_FLAG_CONTRACTS,FOCUS_FLAG_CONTRACTS,GC_FLAG_CONTRACTS,GET_FLAG_CONTRACTS,GRAPH_FLAG_CONTRACTS,GLOBAL_FLAG_CONTRACTS,GUIDE_FLAG_CONTRACTS,HEALTH_FLAG_CONTRACTS,HISTORY_COMPACT_FLAG_CONTRACTS,HISTORY_FLAG_CONTRACTS,HISTORY_REDACT_FLAG_CONTRACTS,HISTORY_REPAIR_FLAG_CONTRACTS,HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS,INIT_FLAG_CONTRACTS,INSTALL_FLAG_CONTRACTS,ITEM_MUTATE_FLAG_CONTRACTS,ITEM_COMPLETE_FLAG_CONTRACTS,ITEM_REOPEN_FLAG_CONTRACTS,LEARNINGS_FLAG_CONTRACTS,LIST_COMMANDER_STRING_OPTION_CONTRACTS,LIST_FILTER_FLAG_CONTRACTS,MEET_FLAG_CONTRACTS,MERGE_FLAG_CONTRACTS,NEXT_COMMANDER_STRING_OPTION_CONTRACTS,NEXT_FLAG_CONTRACTS,NOTES_FLAG_CONTRACTS,PACKAGE_FLAG_CONTRACTS,PACKAGE_INIT_FLAG_CONTRACTS,PAUSE_TASK_FLAG_CONTRACTS,PLAN_CREATE_METADATA_PARAMETER_KEYS,PLAN_FLAG_CONTRACTS,PM_COMMAND_OUTPUT_BUDGET_CONTRACTS,PM_DIAGNOSTIC_DEGRADATION_STEPS,PM_DIAGNOSTIC_OUTPUT_BUDGET_CONTRACTS,PM_DIAGNOSTIC_OUTPUT_CLASSES,PM_CLI_ONLY_TOOL_ACTION_WAIVERS,PM_CORE_COMMAND_NAMES,PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS,PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS,PM_ITEM_ACTION_SUBCOMMANDS,PM_DEPRECATED_TOOL_ACTIONS,PM_DISCOVERABLE_TOOL_ACTIONS,PM_EXTENSION_CAPABILITY_CONTRACTS,PM_EXTENSION_POLICY_MODE_CONTRACTS,PM_EXTENSION_POLICY_SURFACE_CONTRACTS,PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,PM_EXTENSION_SERVICE_NAME_CONTRACTS,PM_EXTENSION_TRUST_MODE_CONTRACTS,PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,PM_TOOL_ACTIONS,analyzePmToolActionParity,PM_TOOL_ACTION_PARAMETER_CONTRACTS,PM_TOOL_PARAMETERS_SCHEMA,PM_TOOL_PARAMETERS_SCHEMA_MAJOR,PM_TOOL_PARAMETERS_SCHEMA_VERSION,PM_OUTPUT_BUDGET_CLASSES,PM_OUTPUT_DEGRADATION_STEPS,PROFILE_FLAG_CONTRACTS,REINDEX_FLAG_CONTRACTS,RELEASE_FLAG_CONTRACTS,REMIND_FLAG_CONTRACTS,RESTORE_FLAG_CONTRACTS,SCHEMA_FLAG_CONTRACTS,SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,SEARCH_FLAG_CONTRACTS,START_TASK_FLAG_CONTRACTS,STATS_FLAG_CONTRACTS,DUPLICATES_FLAG_CONTRACTS,SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,TELEMETRY_FLAG_CONTRACTS,TEST_ALL_FLAG_CONTRACTS,TEST_FLAG_CONTRACTS,TEST_RUNS_FLAG_CONTRACTS,TOOL_ACTIVITY_OPTION_CONTRACTS,TOOL_AGGREGATE_OPTION_CONTRACTS,TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE,TOOL_CALENDAR_OPTION_CONTRACTS,TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,TOOL_CONTEXT_OPTION_CONTRACTS,TOOL_CREATE_OPTION_CONTRACTS,TOOL_CREATE_OPTION_CONTRACT_SOURCE,TOOL_DEPS_OPTION_CONTRACTS,TOOL_GRAPH_OPTION_CONTRACTS,TOOL_LIST_FILTER_OPTION_CONTRACTS,TOOL_SEARCH_FILTER_OPTION_CONTRACTS,TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE,TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,TOOL_UPDATE_OPTION_CONTRACTS,TOOL_UPDATE_OPTION_CONTRACT_SOURCE,verifyToolOptionCliParity,UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,UPDATE_FLAG_CONTRACTS,UPDATE_MANY_FLAG_CONTRACTS,UPGRADE_FLAG_CONTRACTS,VALIDATE_FLAG_CONTRACTS,WORKSPACE_FLAG_CONTRACTS,buildPmActionToolInputSchema,PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES,compactFlagAliasContracts,createPmCommandOutputBudget,definePmCommandOutputBudget,estimatePmOutputTokens,inferPmOutputBudgetClass,projectPmDiagnosticOutput,projectPmDiagnosticText,PM_GENERIC_REFUSAL_GUIDANCE,PM_RECOVERY_ECHO_FIELDS,isGenericRefusalRequired,isGenericRefusalWhy,projectLeanRecoveryPayload,withoutGenericRefusalExamples,analyzeSdkCliParameterCompleteness,isPmExtensionCapabilityContract,isPmExtensionPolicyModeContract,isPmExtensionPolicySurfaceContract,isPmExtensionServiceNameContract,isPmToolAction,hasSubcommandFlagContractsForCommand,readFirstStringFromCommanderOptions,readFirstValueFromCommanderOptions,readStringArrayFromCommanderOptions,resolvePmPositionalActionFlagContracts,resolveSubcommandFlagContractsForCommand,resolvePmCommandOutputBudget,resolvePmDiagnosticOutputBudget,resolvePmToolCustomFieldCollision,toCompletionFlagString,withFlagAliasMetadata,}from "./cli-contracts.js";export type{CliFlagContract,OptionsFromContracts,PmActionSchemaContract,PmActionToolInputSchemaOptions,PmToolCustomFieldCollision,PmBulkMutationControlOptions,PmBulkMutationFilterOptions,PmCloseActionOptions,PmCloseManyActionOptions,PmCreateActionOptions,PmMutationAttributionOptions,PmOptionScalar,PmCommandOutputBudgetContract,PmDiagnosticDegradationStep,PmDiagnosticOutputBudgetContract,PmDiagnosticOutputClass,PmDiagnosticOutputReceipt,PmOutputBudgetClass,PmOutputDegradationStep,PmProjectedDiagnostic,PmProjectedTextDiagnostic,PmUpdateActionFields,PmUpdateActionOptions,PmUpdateManyActionOptions,PmExtensionCapabilityContract,PmExtensionPolicyModeContract,PmExtensionPolicySurfaceContract,PmExtensionSandboxProfileContract,PmExtensionServiceNameContract,PmExtensionTrustModeContract,MergeSubcommand,PmToolAction,SdkCliActionParameterCoverage,SdkCliCompletenessContractSource,SdkCliParameterCoverageEntry,SdkCliParameterDisposition,ToolOptionFlagContract,ToolOptionCliParityFinding,ToolOptionCliParityReport,}from "./cli-contracts.js";export * from "./compose.js";export * from "./governance/assurance.js";export * from "./governance/assurance-action.js";export * from "./governance/assurance-runtime.js";export * from "./governance/assurance-presets.js";export * from "./governance/boundary-fixtures.js";export * from "./governance/defect-recurrence.js";export * from "./governance/merge-receipt-history.js";export * from "./compile-cache.js";export * from "./environment/project-runtime-compatibility.js";export * from "./environment/source-context.js";export * from "./environment/host-environment-errors.js";export * from "./cli-contracts/command-exit-contracts.js";export * from "./context-relevance.js";export * from "./context/recency.js";export * from "./context-intent-contracts.js";export * from "./context-intent-runtime.js";export * from "./context-signal-store.js";export * from "./workspace-memory.js";export * from "./lifecycle-completion.js";export * from "./lifecycle-policy.js";export * from "./output-projection.js";export * from "./read-output-contracts.js";export * from "./read-output-rows.js";export * from "./read-output-session.js";export * from "./output-token-accounting.js";export * from "./output/fit-envelope.js";export * from "./context-packing.js";export * from "./context-usage.js";export{classifyHistoryEvent,HISTORY_EVENT_CLASSIFICATION_VERSION,MAINTENANCE_HISTORY_OPERATIONS,SUBSTANTIVE_HISTORY_OPERATIONS,type HistoryEventClass,}from "../core/history/event-classification.js";export * from "./dependency-provenance.js";export * from "./duplicates.js";export * from "./lifecycle/reopen.js";export * from "./history-compact.js";export * from "./history-read.js";export * from "../core/history/operation-contract.js";export * from "./history/maintenance.js";export{readHistorySnapshot,type HistoryStreamSnapshot}from "../core/history/read.js";export * from "./history-provenance.js";export * from "./mutation-events.js";export * from "./history-redact.js";export{_testOnly}from "./history-redact.js";export * from "./history-repair.js";export * from "./item-children.js";export * from "./item-schedule.js";export * from "./merge/index.js";export{runDeps,type DepsCollapseMode,type DepsFormat,type DepsGraphEdge,type DepsGraphNode,type DepsGraphResult,type DepsTreeNode,}from "./dependencies.js";export * from "./graph/index.js";export{runDocs}from "./docs.js";export{runFiles,runFilesDiscover,runFilesLookup,type FilesDiscoveryCandidate,type FilesLookupItem,type FilesLookupMatch,}from "./files.js";export{applyPathMigrations,applyStandaloneNote,artifactKey,assertLinkedArtifactMutationIsUnambiguous,dedupeLinkedArtifacts,ensureScope,expandAddGlobEntries,normalizeLinkedPath,parseAddEntries,parseAddGlobEntries,parseMigrateEntries,parseRemoveEntries,renameArtifactsResultKey,runLinkedArtifacts,sortLinkedArtifacts,validateLinkedPaths,type AddGlobEntry,type LinkedArtifact,type LinkedArtifactCommandOptions,type LinkedArtifactKindConfig,type LinkedArtifactResult,type LinkedCollectionMutationProjection,type LinkedCollectionMutationReceipt,type LinkedPathValidation,type PathMigration,projectLinkedCollectionMutation,writtenLinkedEntries,}from "./linked-artifacts.js";export{LINKED_ARTIFACT_NOTE_CONFLICT_MODES,reviseLinkedNote,type LinkedArtifactLinkOutcome,type LinkedArtifactLinkOutcomeEntry,type LinkedArtifactNoteConflict,type LinkedArtifactNoteConflictMode,}from "./linked-artifacts.js";export * from "./pagination.js";export * from "./query/item-filter-options.js";export * from "./query/parsers.js";export * from "./output.js";export * from "./output-contracts.js";export * from "./agent/task-transcript-contracts.js";export * from "./relationship-analytics.js";export * from "./relationship-context.js";export * from "./relationship-history.js";export * from "./relationship-migration.js";export * from "./workspace-transaction.js";export * from "./workspace-transaction-gc.js";export * from "./item-transaction.js";export * from "./item-metadata-index.js";export * from "./structured-mutations.js";export * from "./lifecycle/structured-mutation-plan.js";export * from "./runtime-primitives.js";export * from "./error-runtime.js";export * from "./error-code-catalog.js";export * from "./generated-error-code-catalog.js";export * from "./agent/refusal-reachability.js";export * from "./agent/refusal-closure-census.js";export * from "./agent/refusal-closure.js";export * from "./agent/closed-domain-contracts.js";export * from "./agent/refusal-corpus-contracts.js";export{MERGE_SUBCOMMAND_VALUES}from "./cli-contracts.js";export * from "./agent/tracker-preflight-contracts.js";export * from "./agent/subcommand-recovery.js";export * from "./flag-invocation-contracts.js";export * from "./cli-contracts/flag-lexicon-contracts.js";export * from "./relationships.js";export * from "./actionability.js";export type{PlanCommandOptions,PlanOperationOptions,PlanCommandResult,PlanDispatchInput,PlanResultPlan,PlanShowDepth,PlanStepSummary,PlanSubcommand,PlanTemplateName,}from "./lifecycle/plan.js";export type{CreateOperationOptions}from "./lifecycle/create.js";export type{PlanMutationReceipt}from "./lifecycle/plan-mutation-receipt.js";export type{UpdateOperationOptions}from "./lifecycle/update.js";export type{AppendOperationOptions}from "./lifecycle/append.js";export type{CloseManyOperationOptions}from "./lifecycle/close-many.js";export type{UpdateManyOperationOptions}from "./lifecycle/update-many.js";export{runCreate}from "./lifecycle/create.js";export{runPlan}from "./lifecycle/plan.js";export{runAppend}from "./lifecycle/append.js";export{STALE_CLAIM_TAKEOVER_REFUSED_CODE,isAlreadyClaimedError,runClaim,runClaimNext,runRelease,type StaleClaimTakeoverReceipt,}from "./lifecycle/claim.js";export{runStartTask,runPauseTask,runCloseTask,type TaskCompositionOptions}from "./lifecycle/task-composition.js";export{runCloseMany}from "./lifecycle/close-many.js";export{runUpdateMany}from "./lifecycle/update-many.js";export{runComments}from "./comments.js";export{runNotes}from "./notes.js";export{runLearnings}from "./learnings.js";export{runUpgrade}from "./governance/upgrade.js";export{PLAN_SHOW_DEPTH_VALUES,PLAN_SUBCOMMANDS,PLAN_TEMPLATE_NAMES,}from "./lifecycle/plan.js";export * from "./define.js";export{BASELINE_ITEM_FORMAT_VERSION,BUILTIN_ITEM_TYPE_VALUES,CONFIDENCE_TEXT_VALUES,CURRENT_ITEM_FORMAT_VERSION,DEPENDENCY_KIND_VALUES,EXIT_CODE,ISSUE_SEVERITY_VALUES,ITEM_TYPE_VALUES,PM_CLI_EXPECTED_ERROR_NAME,PmCliError,PmClient,RISK_VALUES,STATUS_VALUES,acquireLock,acquireLockLease,appendHistoryEntry,canonicalDocument,classifyItemFormatVersion,clearWorkspaceContractsCache,commitImportedItem,createHistoryEntry,createPmCliExpectedError,effectiveItemFormatVersion,emptyImportedDocument,ensureTrackerInitialized,generateItemId,getActiveExtensionRegistrations,getContracts,getHistoryPath,getItemPath,getSettingsPath,getWorkspaceContracts,isPmCliExpectedError,isTimestampLiteral,listAllItemMetadata,loadCreateTemplateOptions,locateItem,normalizeItemMetadata,normalizeItemFormatVersion,normalizeItemId,normalizeRawItemId,normalizeStatusInput,nowIso,parseTags,pathExists,readBooleanOption,readCsvListOption,readFileIfExists,readLocatedItem,readRequiredString,readSettings,readStringOption,removeFileIfExists,renderCalendarMarkdown,renderCalendarToon,renderGuideMarkdown,resolveCalendarOutputFormat,resolveGuideOutputFormat,resolveItemTypeRegistry,resolveImplicitPmRoot,resolvePmRoot,resolveRuntimeFieldRegistry,resolveRuntimeStatusRegistry,runAction,runActiveOnReadHooks,runActiveOnWriteHooks,runCalendar,runCompletion,runGuide,runList,runReindex,runSearch,runTemplatesList,runTemplatesSave,runTemplatesShow,runTestRunsList,runTestRunsLogs,runTestRunsResume,runTestRunsStatus,runTestRunsStop,scanItemFormatVersions,selectImportAuthor,serializeItemDocument,splitFrontMatter,toEstimatedMinutesValue,toImportBoolean,toImportConfidence,toImportDeferredFields,toImportInteger,toImportLinkedDocs,toImportLinkedFiles,toImportLinkedTests,toImportLogEntries,toImportNormalizedEnum,toImportNumberMap,toImportPriority,toImportStatus,toImportStringList,toImportStringMap,toImportTags,toNonEmptyImportString,writeFileAtomic,aggregate,append,claim,claimNext,close,reopen,closeTask,comments,config,context,copy,create,deleteItem,deps,docs,duplicates,extension,extensionActivate,extensionDeactivate,extensionList,files,filesDiscover,filesLookup,focus,gc,get,graph,health,historyCompact,historyCompactBulk,historyRedact,historyRepair,historyRepairAll,init,learnings,list,listAllComplete,next,notes,packageActivate,packageCatalog,packageDeactivate,packageDescribe,packageDoctor,packageInstall,packageLifecycle,packageList,packageManage,packageReload,packageUninstall,pauseTask,profile,profileApply,profileLint,profileList,profileShow,release,restore,schema,schemaAddField,schemaAddStatus,schemaAddType,schemaApplyPreset,schemaInferTypes,schemaList,schemaListFields,schemaRemapStatus,schemaRemoveField,schemaRemoveStatus,schemaRemoveType,schemaShow,schemaShowField,schemaShowStatus,schemaRenameField,schemaRenameType,search,startTask,stats,update,upgrade,validate,type AggregateOptions,type AggregateResult,type AggregateRow,type AppendCommandOptions,type AppendResult,type BlockerEntry,type CalendarOptions,type CalendarResult,type ClaimResult,type ClaimStartReceipt,type CloseResult,type CloseTaskResult,type CommitImportedItemParams,type CommitImportedItemResult,type CommentsCommandOptions,type CommentsResult,type ConfigCommandOptions,type ConfigResult,type CompletionResult,type CompletionShell,type ContractsCommandOptions,type ContractsResult,type ContextFocusItem,type ContextOptions,type ContextOutputFormat,type ContextResult,type CopyResult,type CreatePmCliExpectedErrorOptions,type CreateResult,type CreateTemplateOptions,type Dependency,type DeleteResult,type DepsCommandOptions,type DepsResult,type DocsCommandOptions,type DocsResult,type ExtensionCommandOptions,type ExtensionCommandResult,type FilesCommandOptions,type FilesDiscoverOptions,type FilesDiscoverResult,type FilesLookupOptions,type FilesLookupResult,type FilesResult,type FocusResult,type GcCommandOptions,type GcResult,type GetContractsOptions,type GetOptions,type GetResult,type GuideDepth,type GuideOptions,type GuideOutputFormat,type GuideResult,type HealthResult,type ImportLinkedScope,type InitCommandOptions,type InitResult,type ItemFormatVersionScanEntry,type ItemFormatVersionScanResult,type ItemFormatVersionStatus,type LearningsCommandOptions,type LearningsResult,type LinkedDoc,type LinkedFile,type LinkedTest,type ListedItem,type ListCompactResult,type ListFullResult,type ListOptions,type ListProjectedItem,type ListProjectedItemCore,type ListResult,type ListResultItem,type ListSortField,type ListSortOrder,type ListTreeItem,type ListTreeMetadata,type ListVerboseResult,type PmCompleteListCertificate,type PmCompleteListFailureReceipt,type PmCompleteListFinding,type PmCompleteListFindingCode,type PmCompleteListInspection,type PmCompleteListOptions,type PmCompleteListResult,type LogNote,type NextActionableItem,type NextBlockerRef,type NextOptions,type NextOutputFormat,type NextRecommendation,type NextResult,type NotesCommandOptions,type NotesResult,type PackageCommandOptions,type PackageCommandResult,type PauseTaskResult,type PmActionInput,type PmActionName,type PmActionOptions,type PmClientCloseActionOptions,type PmClientFullMutationOptions,type PmClientMutationOptions,type PmClientOptions,type PmClientRunArgs,type PmCliExpectedError,type ProfileApplyCommandOptions,type ProfileApplyResult,type ProfileLintResult,type ProfileListResult,type ProfileResult,type ProfileShowResult,type ProfileSubcommand,type ReindexOptions,type ReindexResult,type ReleaseResult,type ReleaseMutationOptions,type ReopenCommandOptions,type ReopenResult,type RestoreResult,type RunHealthOptions,type SchemaAddFieldCommandOptions,type SchemaAddFieldResult,type SchemaAddStatusCommandOptions,type SchemaAddStatusResult,type SchemaAddTypeCommandOptions,type SchemaAddTypeInferCommandOptions,type SchemaAddTypeInferResult,type SchemaAddTypeResult,type SchemaApplyPresetCommandOptions,type SchemaApplyPresetResult,type SchemaInspectResult,type SchemaListFieldsResult,type SchemaListResult,type SchemaRemoveFieldCommandOptions,type SchemaRemoveFieldResult,type SchemaRemoveStatusCommandOptions,type SchemaRemoveStatusResult,type SchemaRemoveTypeCommandOptions,type SchemaRemoveTypeResult,type SchemaShowFieldResult,type SchemaShowResult,type SchemaShowStatusResult,type SchemaResult,type RunSchemaEvolutionMigrationOptions,type SchemaEvolutionMigrationRequest,type SchemaEvolutionMigrationResult,type SchemaSubcommand,type SearchCompactResult,type SearchHit,type SearchHitHighlight,type SearchMatchMode,type SearchOptions,type ClaimNextOptions,type SearchResult,type SearchResultItem,type SearchVerboseResult,type StartTaskResult,type StatsCommandOptions,type StatsResult,type TemplatesListResult,type TemplatesSaveResult,type TemplatesSaveOptions,type TemplatesShowResult,type TestRunsListCommandOptions,type TestRunsLogsCommandOptions,type TestRunsResumeCommandOptions,type TestRunsStopCommandOptions,type ToImportLinkedArtifactsOptions,type ToImportLinkedTestsOptions,type ToImportLogEntriesOptions,type UpdateResult,type UpgradeCommandOptions,type UpgradeResult,type ValidateCommandOptions,type ValidateResult,type WorkspaceContracts,type WorkspaceContractsOptions,type WorkspaceExtensionCommandContract,type WorkspaceFieldContract,}from "./runtime.js";export{extensionMigrate,packageMigrate}from "./package-migrations.js";export{CONTEXT_OUTPUT_VALUES,NEXT_OUTPUT_VALUES,PM_GITIGNORE_END,PM_GITIGNORE_START,analyzeSdkActionCoverage,ensurePmGitignore,getPmGitignoreBlock,closeItem,runAggregate,runClose,runCopy,runContext,runDelete,runFocus,runGet,runNext,runRestore,runUpdate,type CloseCommandOptions,type CopyOptions,type DeleteCommandOptions,type EnsurePmGitignoreResult,type HierarchyChild,type HierarchyNode,type HotFile,type LockLease,type FocusOptions,type ImportPriorityValue,type ProgressEntry,type RecentContextItem,type RestoreCommandOptions,type SdkActionCoverageRow,type StaleEntry,type TestHealthSummary,type UpdateCommandOptions,type WorkloadEntry,}from "./runtime.js";export{runStats}from "./stats.js";export{readImprovementLedger,recordImprovementObservation,type ImprovementDirection,type ImprovementLedgerDocument,type ImprovementLedgerResult,type ImprovementObservation,type ImprovementTrend,type ReadImprovementLedgerOptions,type RecordImprovementObservationOptions,type RecordImprovementObservationResult,}from "./improvement-ledger.js";export{evaluateProvenanceCoverage,projectFleetAttributionAnalytics,projectProvenanceCoverageAnalytics,readHistoryAnalyticsWindow,runFleetAttributionAnalytics,runProvenanceCoverageAnalytics,type FleetAttributionAnalytics,type FleetAttributionDimension,type FleetAttributionRow,type HistoryAnalyticsWindowOptions,type HistoryAnalyticsWindowReceipt,type HistoryAnalyticsEvent,type HistoryAnalyticsWindow,type ProvenanceCoverageAnalytics,}from "./history-analytics.js";export{DEFAULT_EVAL_QUERIES_RELATIVE_PATH,EVAL_QUERY_SET_CONTRACT,EVAL_QUERY_SET_EXAMPLE,EVAL_QUERY_SET_SCHEMA_ID,parseEvalQuerySet,runEval,type EvalOptions,type EvalQueryReport,type EvalResult,}from "./eval.js";export{runTelemetry,TELEMETRY_SUBCOMMANDS,type TelemetryCommandOptions,type TelemetryFlushResult,type TelemetryStatusSummary,type TelemetrySubcommand,}from "./telemetry.js";export{classifyLinkedTestCommandSafety,classifyLinkedTestFailure,countFailureCategories,extractReferencedPmItemIdsFromCommand,resolveLinkedTestFailureExitCode,runLinkedTests,runTest,summarizeContextPreflight,type LinkedTestFailureCategory,type LinkedTestCommandSafetyClassification,type TestCommandOptions,type TestResult,type TestRunResult,}from "./test/execution.js";export{assertTestMeasurementRun}from "./test/prerequisites.js";export{TEST_RUN_MEASUREMENT_LIMIT,diffTestRunMeasurements,parseTestRunMeasurements,queryTestRunMeasurementsBelow,type TestRunMeasurementDiff,}from "./test/measurements.js";export{runTestAll,type TestAllCommandOptions,type TestAllItemResult,type TestAllResult,}from "./test/batch.js";export{LINKED_TEST_ENV_NAME_PATTERN,LINKED_TEST_PM_CONTEXT_MODE_VALUES,LINKED_TEST_WORKSPACE_CONTEXT_MODE_VALUES,LINKED_TEST_PROTECTED_ENV_KEYS,parseLinkedTestAssertionEqualsMap,parseLinkedTestAssertionGteMap,parseLinkedTestBoolean,parseLinkedTestContextMode,parseLinkedTestEnvClear,parseLinkedTestEnvSet,parseLinkedTestJsonEntries,parseLinkedTestMinLines,parseLinkedTestRegexList,parseLinkedTestStringList,parseLinkedTestWorkspaceContextMode,type LinkedTestPmContextMode,type LinkedTestWorkspaceContextMode,}from "./test/parsers.js";export{acknowledgeLinkedTests,attachLinkedTestMutationProvenance,attachLinkedTestProvenance,linkedTestTrustFingerprint,resolveLinkedTestSourceRef,resolveLinkedTestSourceWorkspaceRoot,resolveLinkedTestTrust,resolveLinkedTestTrustBatch,type LinkedTestTrustDecision,}from "./test/trust.js";export{updateLinkedTest,type LinkedTestUpdateSelector,type LinkedTestMetadataPatch,type UpdateLinkedTestOptions,type UpdateLinkedTestResult,}from "./test/update.js";export{runStartBackgroundRun,runTestRunsWorker,type StartBackgroundRunCommandOptions,type StartBackgroundRunResult,}from "./test/runs.js";export{BUILTIN_PROFILES,listProfiles,normalizeProfileName,PROFILE_NAMES,resolveProfile,type ProfileConfigEntry,type ProfileName,type ProfilePackageRecommendation,type ProfileTemplateEntry,type ProfileTemplateOptions,type ProjectProfileDefinition,type ProjectProfileRegistrationInput,}from "../core/profile/profile-presets.js";export{planProfileApplication,type ProfileApplicationPlan,type ProfileChangeStatus,type ProfileComponentChange,type ProfileConfigChange,type ProfileConfigPlan,type ProfileCurrentState,type ProfilePackagePlan,type ProfileSchemaPlan,type ProfileTemplateChange,type ProfileTemplatePlan,type ProfileWorkflowChange,type ProfileWorkflowPlan,}from "../core/profile/profile-plan.js";export{describeProfileComposition,describeProjectProfile,type ProjectProfileComposition,type ProjectProfileDescription,type ProjectProfilePackageSummary,}from "../core/profile/profile-describe.js";export{lintProjectProfile,PROFILE_LINT_CODES,PROFILE_LINT_DIMENSIONS,type ProfileLintCode,type ProfileLintDimension,type ProfileLintSeverity,type ProjectProfileLintFinding,type ProjectProfileLintReport,}from "../core/profile/profile-lint.js";export * from "./authoring.js";export * from "./governance.js";export * from "./mcp/discovery.js";export * from "./query.js";export * from "./testing.js";export type{GlobalOptions}from "../core/shared/command-types.js";export type{ItemDocument,ItemDeferredField,ItemMetadata,ItemStatus,ItemType,PmSettings,StructuredJsonValue,}from "../types/index.js";export{normalizeDirectExtensionCommandOptions,resolveExtensionFlagOptionKey,type DirectExtensionOptionPolicy,type LooseCommandFlagDefinition,}from "./extension/command-options.js";export type{CheckpointRestoreFn,CheckpointRollbackResult,LoadedMutationCheckpoint}from "../core/checkpoint/mutation-checkpoint.js";export type{CommandOverrideResult,DiscoverExtensionsOptions,ExtensionLayer,LoadedExtension,ParserOverrideResult,PreflightOverrideResult,RegisteredExtensionCommandOverride,RegisteredExtensionParserOverride,RegisteredExtensionPreflightOverride,RegisteredExtensionRendererOverride,RendererOverrideResult,ScopedPreflightOverrideDefinition,ScopedRendererOverrideDefinition,ServiceOverrideResult}from "../core/extensions/extension-types.js";export type{FlagValueKind}from "../core/extensions/flag-value-types.js";export type{HistoryCompactScope}from "../core/history/history-compact-bulk.js";export type{HistoryStreamPolicyManyParams,HistoryStreamPolicyParams,HistoryStreamPolicyResult}from "../core/history/history-stream-policy.js";export type{PatchFailureContext,ResolveHistoryTargetOptions,ResolvedHistoryTarget}from "../core/history/projection.js";export type{ReanchorHistoryOptions,ReanchorResult,ReplayDocument}from "../core/history/replay.js";export type{BodyFileReader}from "../core/io/body-file.js";export type{ItemDocumentFormatOptions}from "../core/item/item-format.js";export type{StdinTokenResolver}from "../core/item/parse.js";export type{Priority}from "../core/item/priority.js";export type{ParseStatusFilterOptions}from "../core/item/status-filter.js";export type{CommandOptionPolicyCommand,CommandOptionPolicyState}from "../core/item/type-registry.js";export type{AcquireLockOptions}from "../core/lock/lock.js";export type{OutputOptions}from "../core/output/output.js";export type{TabularRow}from "../core/output/tabular.js";export type{LoadedRuntimeSchemaSections,RuntimeFieldDefinitionResolved}from "../core/schema/runtime-schema.js";export type{EvaluateTransitionInput,EvaluateTransitionResult}from "../core/schema/type-workflows.js";export type{RefreshSearchArtifactsForMutationOptions,SearchMutationArtifactRefreshResult,VectorizationStatusLedgerReadResult}from "../core/search/cache.js";export type{SearchCorpusOptions,SemanticCorpusCharacterLimitResolution,SemanticCorpusInputOptions}from "../core/search/corpus.js";export type{EvalQuerySet}from "../core/search/eval.js";export type{EmbeddingProviderResolution,ProviderSettingsInput}from "../core/search/providers.js";export type{SemanticRuntimeDefaultsResolution}from "../core/search/semantic-defaults.js";export type{ExecuteVectorRequestOptions,VectorRecord,VectorSettingsInput,VectorStoreConfig,VectorStoreResolution,VectorUpsertResult}from "../core/search/vector-stores.js";export type{SentryLike}from "../core/sentry/instrument.js";export type{AgentSemanticAttribution}from "../core/session/session-state.js";export type{SerialQueue}from "../core/shared/serial-queue.js";export type{SplitCommaListOptions}from "../core/shared/split-comma-list.js";export type{ItemFormatMigrationResult}from "../core/store/item-format-migration.js";export type{ListCacheOptions}from "../core/store/item-metadata-cache.js";export type{SettingsReadResult}from "../core/store/settings.js";export type{TelemetryCommandContext,TelemetryErrorEventContext}from "../core/telemetry/runtime.js";export type{BackgroundLogStream,BackgroundTestRunStatus}from "../core/test/background-runs.js";export type{ValidateFixRecord}from "../core/validate/fix-planning.js";export type{OwnerItemMetadata,StaleLinkOwnerInput}from "../core/validate/missing-link-owners.js";export type{ClassifiedStaleLinkedPath}from "../core/validate/stale-file-classification.js";export type{BuiltinItemType,ConfidenceTextLevel,ContextDepth,ContextSectionName,ContextSettings,GovernanceStartBlockerEnforcement,HistoryEntry,HistoryPatchOp,ItemFormat,ItemTestRunSummary,LinkScope,ParentReferencePolicy,PlanMode,RuntimeSchemaSettings,SprintReleaseFormatPolicy,TestRunMeasurement}from "../types.js";export type{ContentFieldFilters}from "../core/governance/content-fields.js";export type{MissingMetadataFilters}from "../core/governance/metadata-coverage.js";export type{UpdateManyCommandOptions,UpdateManyResult}from "./lifecycle/update-many.js";export type{CommandScope}from "./command-line.js";export type{ContextIntentCursorEnvelope}from "./context-intent-contracts.js";export type{ExactCorpusShape}from "./corpus-shape.js";export type{ExactDefinition,FlagAuthoringDefinition,ItemFieldAuthoringDefinition,ItemTypeAuthoringDefinition,MigrationAuthoringDefinition,SearchProviderAuthoringDefinition,VectorStoreAdapterAuthoringDefinition}from "./define.js";export type{ManagedExtensionRecord}from "./extension/managed-state.js";export type{ValidateItem}from "./governance/validate-item-reader.js";export type{ProjectedGraphResult}from "./graph/run.js";export type{ClaimMutationOptions,ClaimNextResult}from "./lifecycle/claim.js";export type{CloseManyCommandOptions,CloseManyResult}from "./lifecycle/close-many.js";export type{RenamedLinkedArtifactResult}from "./linked-artifacts.js";export type{FilterValueEchoEntry}from "./query/list.js";export type{SearchRenderingQueryExpansion,SearchRenderingRerank}from "./query/search-rendering.js";export type{ImplicitSemanticFallbackReason,VectorIndexRecovery,VectorIndexRecoveryRegistrations}from "./query/search/semantic.js";export type{ReadOutputResultForSession}from "./read-output-contracts.js";export type{InitialReadOptions,ReadOptions,ReadPromise}from "./runtime.js";export type{LinkedTestExecutionResult,RunLinkedTestsOptions}from "./test/execution.js";export type{RegisteredHookEntry}from "./testing.js";export type{TraceabilityCandidate}from "./traceability/source-traceability.js";export type{ExactWorkspaceRecipe}from "./workspace-recipe.js";
|
|
6
|
+
export type{CompletionRuntimeConfig}from "./completion.js";export{isItemAlreadyExistsError,type PmItemAlreadyExistsError,isPmTokenBudgetRecovery,type PmTokenBudgetRecovery,PM_CLI_ERROR_DETAILS_LIMITS,isPmCliErrorDetails,projectPmCliErrorDetails,projectPmCliErrorContextDetails,snapshotPmCliErrorContext,type PmCliErrorDetails,type PmCliErrorDetailValue,type PmCliErrorDetailsOmission,type PmCliErrorDetailsRejection}from "./errors.js";export{PM_COMMAND_CAPABILITY_CONTRACTS,PM_COMMAND_VISIBILITY_CONTRACTS,PM_MCP_PROMPT_CONTRACTS,PM_MCP_RESOURCE_CONTRACTS,PM_MCP_TOOL_COMMAND_CONTRACTS,listPmCommandsForFamily,listPmCommandsForTier,listPmMcpToolsForProfile,renderPmCommandVisibilityMarkdown,resolvePmCommandCapabilityFamily,resolvePmCommandVisibilityTier,}from "./agent-capability-contracts.js";export * from "./mcp/protocol.js";export * from "./mcp/executable.js";export * from "./mcp/interactions.js";export * from "./mcp/tasks.js";export * from "./mcp/subscriptions.js";export * from "./mcp/transport.js";export * from "./mcp/authorization.js";export * from "./mcp/apps.js";export * from "./mcp/skills.js";export * from "./cli-contracts/grammar-contracts.js";export * from "./agent-session-context.js";export * from "./environment/agent-environment.js";export type{PmCommandCapabilityContract,PmCommandCapabilityFamily,PmCommandVisibilityContract,PmCommandVisibilityTier,PmMcpPromptArgumentContract,PmMcpPromptContract,PmMcpResourceContract,PmMcpToolProfile,}from "./agent-capability-contracts.js";export{isErrnoError,limitAnnotationEntries,parseAnnotationTextInput,readAnnotationEntries,normalizeAnnotationTransportOptions,resolveAnnotationInput,resolveAnnotationIndex,runAnnotationCommand,wrapOwnershipConflict,type AnnotationCommandConfig,type AnnotationCommandOptions,type AnnotationCommandResult,type AnnotationEntry,type AnnotationInput,type AnnotationHistoryRestoration,type AnnotationMutationReceipt,type AnnotationOmissionReceipt,type AnnotationSourceOptions,type IndexedAnnotationEntry,type OwnershipConflictGuidance,}from "./annotations.js";export{acknowledgeUnknownAuthorHistoryEvents,acknowledgeUnknownAuthorHistoryEventsFromTransport,inspectHistoryAuthorStream,parseUnknownAuthorHistoryEventCoordinates,planUnknownAuthorHistoryAcknowledgment,resolveUnknownAuthorAcknowledgmentSelector,scanHistoryAuthorAttribution,type AcknowledgeUnknownAuthorEventsOptions,type HistoryAuthorAttributionScan,type UnknownAuthorAcknowledgmentPlan,type UnknownAuthorAcknowledgmentPlanCoordinate,type UnknownAuthorAcknowledgmentResult,type UnknownAuthorHistoryEvent,}from "./author-attribution.js";export{BUILTIN_CORPUS_SHAPES,PM_CORPUS_SHAPE_SCHEMA,buildCorpusShapeItemPlan,createCorpusShapeMeasurement,defineCorpusShape,listBuiltinCorpusShapes,measureCorpusShapePlan,resolveBuiltinCorpusShape,type BuiltinCorpusShapeName,type CorpusShape,type CorpusShapeEdgeWeight,type CorpusShapeItemPlan,type CorpusShapeMeasurement,type CorpusShapeProfile,}from "./corpus-shape.js";export * from "./core-governance.js";export{createPmCliProgram}from "./cli-program.js";export{runSearchRefreshWorkerEntrypoint}from "./search-refresh-worker.js";export{PM_REPRODUCIBLE_PROCESS_ENV,createReproducibleProcessRunner,resolveReproducibleProcessEnvironment,runWithReproducibleProcessEnvironment,type ReproducibleExecutionSettings,type ReproducibleProcessEnvironment,type ReproducibleProcessRunner,}from "./reproducibility/process.js";export{PM_WORKSPACE_RECIPE_SCHEMA,defineWorkspaceRecipe,executeWorkspaceRecipe,runWithWorkspaceRecipe,type WorkspaceRecipe,type WorkspaceRecipeJsonValue,type WorkspaceRecipeOperation,}from "./workspace-recipe.js";export{SNAPSHOT_SCHEMA,WORKSPACE_SNAPSHOT_ACTIONS,createWorkspaceSnapshot,deleteWorkspaceSnapshot,inspectWorkspaceSnapshot,listWorkspaceSnapshots,planWorkspaceSnapshotRestore,restoreWorkspaceSnapshot,restoreWorkspaceSnapshotWithRecovery,type CreateWorkspaceSnapshotResult,type RestoreWorkspaceSnapshotOptions,type RestoreWorkspaceSnapshotResult,type WorkspaceSnapshotHistoryImpact,type WorkspaceSnapshotManifest,type WorkspaceSnapshotReference,type WorkspaceSnapshotRestorePlan,}from "./workspace-snapshot.js";export{flushTelemetryQueue}from "./telemetry-flush.js";export{PM_HISTORY_COMMAND_ALIASES,PM_CONTEXT_OPS_COMMAND_ALIASES,PM_BULK_LIFECYCLE_COMMAND_ALIASES,PM_RELOCATED_COMMAND_ALIASES,PM_NAMESPACED_COMMAND_ALIASES,findPmNamespacedCommand,resolvePmCommandOperation,resolvePmHistoryOperation}from "./cli-contracts.js";export{EXECUTABLE_COMMAND_ALIASES,PM_COMMAND_ALIAS_CONTRACTS,renderPmCommandAliasMigrationHint,resolvePmCommandAlias,type PmCommandAliasContract,type PmCommandAliasLifecycle,type PmCommandAliasRegistration,applyBootstrapPagerPolicy,coalesceRepeatedListFlags,listAliasPluralKeys,mergeLinkedTestTwoTokenEntries,normalizeBootstrapInvocation,normalizeLegacyExtensionActionSyntax,parseBootstrapCommandName,parseBootstrapGlobalOptions,parseBootstrapHelpRequest,parseBootstrapTypeValue,stripGlobalBootstrapTokens,type BootstrapGlobalOptions,type BootstrapHelpRequest,type BootstrapInvocationNormalizationResult,type BootstrapNormalizationEvent,}from "./cli-bootstrap.js";export{COMMAND_SHELL_ENV,quoteCmdCommandArg,quoteCommandArg,quotePosixCommandArg,quotePowerShellCommandArg,quoteWindowsCommandArg,redactUrlCredentialsInText,redactUrlCredentialsInToken,renderPmCommand,resolveCommandShellDialect,resolvePmCommandScopeArgs,URL_CREDENTIAL_PLACEHOLDER,type CommandShellDialect,}from "./command-line.js";export * from "./agent/command-recovery.js";export * from "./agent/linked-resource-recovery.js";export * from "./agent/command-suggestions.js";export * from "./agent/item-addressing.js";export * from "./agent/create-option-policy.js";export{runGc,type GcCheckpointsSummary,type GcLocksSummary,}from "./governance/gc.js";export{PM_EXACT_COVERAGE_METRICS,findCoverageDeficits,type PmCoverageDeficit,type PmExactCoverageMetric,}from "./governance/coverage-assurance.js";export{_testOnlyHealthCommand,runHealth,type HealthCheck,}from "./governance/health.js";export{_testOnlyValidateCommand,projectValidateCounts,runValidate,type ValidateCheck,type ValidateCountsFixesSummary,type ValidateCountsResult,type ValidateFixesSummary,type ValidateMutationServices,}from "./governance/validate.js";export{runExtension,type ExtensionCommandAction}from "./extension.js";export{inspectStaticExtensionInventory,type StaticExtensionInventoryEntry,type StaticExtensionInventoryError,type StaticExtensionInventoryResult}from "./extension/static-inventory.js";export{buildExtensionInstallPlan,planExtensionDirectoryCopy,type ExtensionCopyPlan,type ExtensionCopyPlanOptions,type ExtensionInstallPlan,}from "./extension/install-plan.js";export{resolveExtensionInstallSourceIdentity,type ExtensionInstallSourceCandidate,type ExtensionInstallSourceResolution,type ExtensionInstallSourceSelection,type ResolvedExtensionInstallSource,}from "./extension/source-resolution.js";export{applyStoredExtensionMigrationState,readExtensionMigrationState,resolveExtensionMigrationStatePath,runExtensionMigrateAction,runExtensionMigrations,type ExtensionMigrationActionContext,type ExtensionMigrationOutcomeStatus,type ExtensionMigrationReceipt,type ExtensionMigrationRunResult,type ExtensionMigrationState,type ExtensionMigrationStateEntry,type RunExtensionMigrationsOptions,}from "./extension/migrations.js";export{findInstalledNpmPackageCandidate,type GithubInstallSource,type InstalledNpmPackageCandidate,type InstallSource,type LocalInstallSource,type NpmInstallSource,type ResolvedInstallSource,}from "./extension/install-sources.js";export{buildExtensionDescribeResult,renderExtensionDescribeMarkdown,type ExtensionCommandClaimant,type ExtensionCommandOwnership,type ExtensionDescribeActivationStatus,type ExtensionDescribeResult,type ExtensionSurfaceDescription,}from "./extension/describe.js";export{runEvent,runMeet,runRemind,type MeetingEventShortcutOptions,type ReminderShortcutOptions,type SchedulingShortcutCommonOptions,}from "./scheduling-shortcuts.js";export{createExtensionCommandSdk}from "./extension-command-context.js";export{isRuntimeRecord}from "./runtime-input.js";export{resolveStartTaskInProgressStatus}from "./start-task-status.js";export{auditMergeAttributeFence,buildMergeAttributePatterns,findGitWorkspaceRoot,installMergeFence,refreshMergeAttributeFenceIfInstalled,resolveMergeInstallContext,resolveProjectMergeTypeFolders,runMergeInstall,type MergeFenceAuditOptions,type MergeFenceAuditResult,type MergeFenceRefreshOutcome,type MergeInstallOptions,type MergeInstallContextResolution,type MergeInstallResult,}from "./merge/install.js";export{deriveSchemaEvolutionMigrationId,formatSchemaEvolutionMigrationHuman,planSchemaEvolutionMigration,runSchemaEvolutionMigration,type PlanSchemaEvolutionMigrationOptions,type SchemaEvolutionFieldChange,type SchemaEvolutionItemPlan,type SchemaEvolutionMigrationPlan,}from "./schema-migration.js";export type{RuntimeFieldDefinition,RuntimeFieldValueSchema,}from "./schema.js";export{describeFieldFlagSpellingDefect}from "./schema/field-flag-spelling.js";export{runInActiveExtensionScope,runWithActiveExtensions,type ActiveExtensionScopeOptions,}from "./runtime.js";export{applyInvocationAuthorOverride}from "./invocation-author.js";export{describeItemRevisionChanges,isItemRevisionConflict,ITEM_REVISION_CONFLICT_CHANGE_LIMIT,ITEM_REVISION_CONFLICT_CODE,normalizeExpectedItemHash,parseExpectHashSpecs,readItemRevision,withExpectedItemRevisions,type ExpectedItemRevision,type ExpectedItemRevisionsOutcome,type ExpectHashSpec,type ItemRevision,type ItemRevisionChange,type ItemRevisionConflictRowFields,type ItemRevisionContext,}from "./lifecycle/item-revision.js";export type{CreateNullClearableOptionKey,NullClearableOptionKey,UpdateNullClearableOptionKey,WithNullClears,}from "./lifecycle/shared-unset-fields.js";export type{MutationInputAudience}from "../core/item/literal-mutation-input.js";export{admitStartWithOpenBlockers,isStartTransition,START_BLOCKED_REFUSAL_CODE,START_BLOCKER_ENFORCEMENT_DEFAULT,}from "./lifecycle/start-blockers.js";export{resolveDeclaredBlockers}from "./query/declared-blockers.js";export{evaluateMutationGuard,getMutationActionContract,isMutationAction,listMutationActions,PM_MUTATION_ACTION_CONTRACTS,scanMutationSecrets,decideSecretGuardFinding,SECRET_GUARD_RULE_CATEGORIES,secretGuardRuleCategory,type EvaluateMutationGuardOptions,type MutationActionContract,type MutationGuardResult,type MutationGuardSettings,type MutationHistoryScope,type SecretGuardFinding,type SecretGuardMode,type SecretGuardPolicy,type SecretGuardPolicyDecision,type SecretGuardRule,type SecretGuardRuleCategory,type SecretNormalizationKind,}from "./mutation-guard.js";export{findSimilarItems,findDuplicateClusters,evaluateSimilarityGovernance,similarityAdvisoryWarnings,jaccardSimilarity,normalizeSimilarityText,prepareSimilarityText,scoreItemSimilarity,scorePreparedItemSimilarity,tokenizeSimilarityText,type FindSimilarItemsOptions,type FindDuplicateClustersOptions,type DuplicateCluster,type DuplicateClusterMatch,type DuplicateClustersResult,type SimilarItemCandidate,type SimilarItemMatch,type SimilarItemsResult,type SimilarityAdvisory,type SimilarityRecovery,type PreparedSimilarityText,}from "./similarity.js";export{STALE_WORK_THRESHOLD_SETTING,inspectInProgressWork,inspectStaleInProgressItems,resolveLastActivityAt,scanInProgressWork,scanStaleInProgressItems,type InProgressWorkGroup,type InProgressWorkItem,type InProgressWorkScan,type InspectStaleInProgressOptions,type StaleInProgressItem,type StaleInProgressScan,}from "./governance/stale-work.js";export{buildInProgressSweepCommands,type InProgressSweepCommands,}from "./governance/in-progress-work-health.js";export{callerClaimEndedByClose,describeItemOwnershipConflict,evaluateClaimActivity,resolveItemOwnershipActivity,resolveItemOwnershipConflict,type ClaimActivityEvidence,type ClaimActivityOptions,type ItemOwnershipActivity,type ItemOwnershipConflict,}from "./ownership-source.js";export{discoverNearbyPmRoot}from "./tracker-root-discovery.js";export{assertInitializedTracker,assertReadableTrackerRoot,buildTrackerInitializationRecovery,}from "./environment/tracker-preflight.js";export{_testOnly as _testOnlyTemplates,type TemplateSource,}from "./templates.js";export{runConfig,_testOnlyConfigCommand,type NestedSettingResultValue,}from "./config.js";export * from "./agent/identity-config.js";export{INIT_AGENT_GUIDANCE_MODE_VALUES,runInitAgentGuidance,_testOnly as _testOnlyInitAgentGuidance,type InitAgentGuidanceMode,type InitAgentGuidanceSummary,type RunInitAgentGuidanceOptions,type RunInitAgentGuidanceResult,}from "./init-agent-guidance.js";export{runInit,summarizeInitResult,_testOnly as _testOnlyInit,type InitAgentGuidanceResult,type InitConciseResult,type InitDisplayResult,type InitInstalledPackagesSummary,type InitRegisteredTypePresetSummary,type InitTargetResolution,type InitTypePresetName,}from "./init.js";export{PROFILE_SUBCOMMANDS,formatProfileApplyHuman,formatProfileLintHuman,formatProfileListHuman,formatProfileShowHuman,runProfileApply,runProfileLint,runProfileList,runProfileShow,type ProfileApplyDimension,type ProfileComposition,type ProfileListEntry,}from "./profile.js";export * from "./extension-contracts.js";export{RESERVED_ITEM_FIELD_NAMES}from "../core/extensions/item-fields.js";export type{LocatedItem}from "../core/store/item-store.js";export{PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS,PM_PACKAGE_RESOURCE_KINDS,collectPackageExtensionDirectories,readPmPackageManifest,type PmPackageCatalogLinkMap,type PmPackageCatalogMediaMap,type PmPackageCatalogMetadata,type PmPackageManifest,type PmPackageResourceKind,type PmPackageResourceMap,}from "../core/packages/manifest.js";export type{CommanderOptionAliasContract,CommanderOptionRegistrationContract,}from "./cli-contracts.js";export{ACTIVITY_FLAG_CONTRACTS,ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS,AGGREGATE_FLAG_CONTRACTS,ASSURANCE_FLAG_CONTRACTS,APPEND_FLAG_CONTRACTS,CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS,CALENDAR_FLAG_CONTRACTS,CLAIM_FLAG_CONTRACTS,CLOSE_ACTION_OPTION_KEYS,CLOSE_FLAG_CONTRACTS,CLOSE_MANY_FLAG_CONTRACTS,CLOSE_TASK_FLAG_CONTRACTS,COMMENTS_FLAG_CONTRACTS,COMPLETION_FLAG_CONTRACTS,CONFIG_FLAG_CONTRACTS,CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS,CONTEXT_FLAG_CONTRACTS,CONTRACTS_FLAG_CONTRACTS,COPY_FLAG_CONTRACTS,CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,CREATE_COMMANDER_STRING_OPTION_CONTRACTS,CREATE_FLAG_CONTRACTS,DELETE_FLAG_CONTRACTS,DEPS_FLAG_CONTRACTS,DOCS_FLAG_CONTRACTS,EVAL_FLAG_CONTRACTS,EVENT_FLAG_CONTRACTS,EVENTS_FLAG_CONTRACTS,EXTENSION_ACTIVATE_FLAG_CONTRACTS,EXTENSION_ADOPT_ALL_FLAG_CONTRACTS,EXTENSION_ADOPT_FLAG_CONTRACTS,EXTENSION_CATALOG_FLAG_CONTRACTS,EXTENSION_DEACTIVATE_FLAG_CONTRACTS,EXTENSION_DESCRIBE_FLAG_CONTRACTS,EXTENSION_DOCTOR_FLAG_CONTRACTS,EXTENSION_EXPLORE_FLAG_CONTRACTS,EXTENSION_FLAG_CONTRACTS,EXTENSION_INIT_FLAG_CONTRACTS,EXTENSION_INSTALL_FLAG_CONTRACTS,EXTENSION_MANAGE_FLAG_CONTRACTS,EXTENSION_MIGRATE_FLAG_CONTRACTS,EXTENSION_RELOAD_FLAG_CONTRACTS,EXTENSION_SCOPE_FLAG_CONTRACTS,EXTENSION_UNINSTALL_FLAG_CONTRACTS,FILES_FLAG_CONTRACTS,FOCUS_FLAG_CONTRACTS,GC_FLAG_CONTRACTS,GET_FLAG_CONTRACTS,GRAPH_FLAG_CONTRACTS,GLOBAL_FLAG_CONTRACTS,GUIDE_FLAG_CONTRACTS,HEALTH_FLAG_CONTRACTS,HISTORY_COMPACT_FLAG_CONTRACTS,HISTORY_FLAG_CONTRACTS,HISTORY_REDACT_FLAG_CONTRACTS,HISTORY_REPAIR_FLAG_CONTRACTS,HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS,INIT_FLAG_CONTRACTS,INSTALL_FLAG_CONTRACTS,ITEM_MUTATE_FLAG_CONTRACTS,ITEM_COMPLETE_FLAG_CONTRACTS,ITEM_REOPEN_FLAG_CONTRACTS,LEARNINGS_FLAG_CONTRACTS,LIST_COMMANDER_STRING_OPTION_CONTRACTS,LIST_FILTER_FLAG_CONTRACTS,MEET_FLAG_CONTRACTS,MERGE_FLAG_CONTRACTS,NEXT_COMMANDER_STRING_OPTION_CONTRACTS,NEXT_FLAG_CONTRACTS,NOTES_FLAG_CONTRACTS,PACKAGE_FLAG_CONTRACTS,PACKAGE_INIT_FLAG_CONTRACTS,PAUSE_TASK_FLAG_CONTRACTS,PLAN_CREATE_METADATA_PARAMETER_KEYS,PLAN_FLAG_CONTRACTS,PM_COMMAND_OUTPUT_BUDGET_CONTRACTS,PM_DIAGNOSTIC_DEGRADATION_STEPS,PM_DIAGNOSTIC_OUTPUT_BUDGET_CONTRACTS,PM_DIAGNOSTIC_OUTPUT_CLASSES,PM_CLI_ONLY_TOOL_ACTION_WAIVERS,PM_CORE_COMMAND_NAMES,PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS,PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS,PM_ITEM_ACTION_SUBCOMMANDS,PM_DEPRECATED_TOOL_ACTIONS,PM_DISCOVERABLE_TOOL_ACTIONS,PM_EXTENSION_CAPABILITY_CONTRACTS,PM_EXTENSION_POLICY_MODE_CONTRACTS,PM_EXTENSION_POLICY_SURFACE_CONTRACTS,PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS,PM_EXTENSION_SERVICE_NAME_CONTRACTS,PM_EXTENSION_TRUST_MODE_CONTRACTS,PM_PROVIDER_TOOL_PARAMETERS_SCHEMA,PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION,PM_TOOL_ACTIONS,analyzePmToolActionParity,PM_TOOL_ACTION_PARAMETER_CONTRACTS,PM_TOOL_PARAMETERS_SCHEMA,PM_TOOL_PARAMETERS_SCHEMA_MAJOR,PM_TOOL_PARAMETERS_SCHEMA_VERSION,PM_OUTPUT_BUDGET_CLASSES,PM_OUTPUT_DEGRADATION_STEPS,PROFILE_FLAG_CONTRACTS,REINDEX_FLAG_CONTRACTS,RELEASE_FLAG_CONTRACTS,REMIND_FLAG_CONTRACTS,RESTORE_FLAG_CONTRACTS,SCHEMA_FLAG_CONTRACTS,SEARCH_COMMANDER_STRING_OPTION_CONTRACTS,SEARCH_FLAG_CONTRACTS,START_TASK_FLAG_CONTRACTS,STATS_FLAG_CONTRACTS,DUPLICATES_FLAG_CONTRACTS,SUBCOMMAND_GLOBAL_FLAG_CONTRACTS,TELEMETRY_FLAG_CONTRACTS,TEST_ALL_FLAG_CONTRACTS,TEST_FLAG_CONTRACTS,TEST_RUNS_FLAG_CONTRACTS,TOOL_ACTIVITY_OPTION_CONTRACTS,TOOL_AGGREGATE_OPTION_CONTRACTS,TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE,TOOL_CALENDAR_OPTION_CONTRACTS,TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS,TOOL_CONTEXT_OPTION_CONTRACTS,TOOL_CREATE_OPTION_CONTRACTS,TOOL_CREATE_OPTION_CONTRACT_SOURCE,TOOL_DEPS_OPTION_CONTRACTS,TOOL_GRAPH_OPTION_CONTRACTS,TOOL_LIST_FILTER_OPTION_CONTRACTS,TOOL_SEARCH_FILTER_OPTION_CONTRACTS,TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS,TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE,TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS,TOOL_UPDATE_OPTION_CONTRACTS,TOOL_UPDATE_OPTION_CONTRACT_SOURCE,verifyToolOptionCliParity,UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS,UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS,UPDATE_COMMANDER_STRING_OPTION_CONTRACTS,UPDATE_FLAG_CONTRACTS,UPDATE_MANY_FLAG_CONTRACTS,UPGRADE_FLAG_CONTRACTS,VALIDATE_FLAG_CONTRACTS,WORKSPACE_FLAG_CONTRACTS,buildPmActionToolInputSchema,PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES,compactFlagAliasContracts,createPmCommandOutputBudget,definePmCommandOutputBudget,estimatePmOutputTokens,inferPmOutputBudgetClass,projectPmDiagnosticOutput,projectPmDiagnosticText,PM_GENERIC_REFUSAL_GUIDANCE,PM_RECOVERY_ECHO_FIELDS,isGenericRefusalRequired,isGenericRefusalWhy,projectLeanRecoveryPayload,withoutGenericRefusalExamples,analyzeSdkCliParameterCompleteness,isPmExtensionCapabilityContract,isPmExtensionPolicyModeContract,isPmExtensionPolicySurfaceContract,isPmExtensionServiceNameContract,isPmToolAction,hasSubcommandFlagContractsForCommand,readFirstStringFromCommanderOptions,readFirstValueFromCommanderOptions,readStringArrayFromCommanderOptions,resolvePmPositionalActionFlagContracts,resolveSubcommandFlagContractsForCommand,resolvePmCommandOutputBudget,resolvePmDiagnosticOutputBudget,resolvePmToolCustomFieldCollision,toCompletionFlagString,withFlagAliasMetadata,}from "./cli-contracts.js";export type{CliFlagContract,OptionsFromContracts,PmActionSchemaContract,PmActionToolInputSchemaOptions,PmToolCustomFieldCollision,PmBulkMutationControlOptions,PmBulkMutationFilterOptions,PmCloseActionOptions,PmCloseManyActionOptions,PmCreateActionOptions,PmMutationAttributionOptions,PmOptionScalar,PmCommandOutputBudgetContract,PmDiagnosticDegradationStep,PmDiagnosticOutputBudgetContract,PmDiagnosticOutputClass,PmDiagnosticOutputReceipt,PmOutputBudgetClass,PmOutputDegradationStep,PmProjectedDiagnostic,PmProjectedTextDiagnostic,PmUpdateActionFields,PmUpdateActionOptions,PmUpdateManyActionOptions,PmExtensionCapabilityContract,PmExtensionPolicyModeContract,PmExtensionPolicySurfaceContract,PmExtensionSandboxProfileContract,PmExtensionServiceNameContract,PmExtensionTrustModeContract,MergeSubcommand,PmToolAction,SdkCliActionParameterCoverage,SdkCliCompletenessContractSource,SdkCliParameterCoverageEntry,SdkCliParameterDisposition,ToolOptionFlagContract,ToolOptionCliParityFinding,ToolOptionCliParityReport,}from "./cli-contracts.js";export * from "./compose.js";export * from "./governance/assurance.js";export * from "./governance/assurance-action.js";export * from "./governance/assurance-runtime.js";export * from "./governance/assurance-presets.js";export * from "./governance/boundary-fixtures.js";export * from "./governance/defect-recurrence.js";export * from "./governance/merge-receipt-history.js";export * from "./compile-cache.js";export * from "./environment/project-runtime-compatibility.js";export * from "./environment/source-context.js";export * from "./environment/host-environment-errors.js";export * from "./cli-contracts/command-exit-contracts.js";export * from "./context-relevance.js";export * from "./context/recency.js";export * from "./context-intent-contracts.js";export * from "./context-intent-runtime.js";export * from "./context-signal-store.js";export * from "./workspace-memory.js";export * from "./lifecycle-completion.js";export * from "./lifecycle-policy.js";export * from "./output-projection.js";export * from "./read-output-contracts.js";export * from "./read-output-rows.js";export * from "./read-output-session.js";export * from "./output-token-accounting.js";export * from "./output/fit-envelope.js";export * from "./context-packing.js";export * from "./context-usage.js";export{classifyHistoryEvent,HISTORY_EVENT_CLASSIFICATION_VERSION,MAINTENANCE_HISTORY_OPERATIONS,SUBSTANTIVE_HISTORY_OPERATIONS,type HistoryEventClass,}from "../core/history/event-classification.js";export * from "./dependency-provenance.js";export * from "./duplicates.js";export * from "./lifecycle/reopen.js";export * from "./history-compact.js";export * from "./history-read.js";export * from "../core/history/operation-contract.js";export * from "./history/maintenance.js";export{readHistorySnapshot,type HistoryStreamSnapshot}from "../core/history/read.js";export * from "./history-provenance.js";export * from "./mutation-events.js";export * from "./history-redact.js";export{_testOnly}from "./history-redact.js";export * from "./history-repair.js";export * from "./item-children.js";export * from "./item-schedule.js";export * from "./merge/index.js";export{runDeps,type DepsCollapseMode,type DepsFormat,type DepsGraphEdge,type DepsGraphNode,type DepsGraphResult,type DepsTreeNode,}from "./dependencies.js";export * from "./graph/index.js";export{runDocs}from "./docs.js";export{runFiles,runFilesDiscover,runFilesLookup,type FilesDiscoveryCandidate,type FilesLookupItem,type FilesLookupMatch,}from "./files.js";export{applyPathMigrations,applyStandaloneNote,artifactKey,assertLinkedArtifactMutationIsUnambiguous,dedupeLinkedArtifacts,ensureScope,expandAddGlobEntries,normalizeLinkedPath,parseAddEntries,parseAddGlobEntries,parseMigrateEntries,parseRemoveEntries,renameArtifactsResultKey,runLinkedArtifacts,sortLinkedArtifacts,validateLinkedPaths,type AddGlobEntry,type LinkedArtifact,type LinkedArtifactCommandOptions,type LinkedArtifactKindConfig,type LinkedArtifactResult,type LinkedCollectionMutationProjection,type LinkedCollectionMutationReceipt,type LinkedPathValidation,type PathMigration,projectLinkedCollectionMutation,writtenLinkedEntries,}from "./linked-artifacts.js";export{LINKED_ARTIFACT_NOTE_CONFLICT_MODES,reviseLinkedNote,type LinkedArtifactLinkOutcome,type LinkedArtifactLinkOutcomeEntry,type LinkedArtifactNoteConflict,type LinkedArtifactNoteConflictMode,}from "./linked-artifacts.js";export * from "./pagination.js";export * from "./query/item-filter-options.js";export * from "./query/parsers.js";export * from "./output.js";export * from "./output-contracts.js";export * from "./agent/task-transcript-contracts.js";export * from "./relationship-analytics.js";export * from "./relationship-context.js";export * from "./relationship-history.js";export * from "./relationship-migration.js";export * from "./workspace-transaction.js";export * from "./workspace-transaction-gc.js";export * from "./item-transaction.js";export * from "./item-metadata-index.js";export * from "./structured-mutations.js";export * from "./lifecycle/structured-mutation-plan.js";export * from "./runtime-primitives.js";export * from "./error-runtime.js";export * from "./error-code-catalog.js";export * from "./generated-error-code-catalog.js";export * from "./agent/refusal-reachability.js";export * from "./agent/refusal-closure-census.js";export * from "./agent/refusal-closure.js";export * from "./agent/closed-domain-contracts.js";export * from "./agent/refusal-corpus-contracts.js";export{MERGE_SUBCOMMAND_VALUES}from "./cli-contracts.js";export * from "./agent/tracker-preflight-contracts.js";export * from "./agent/subcommand-recovery.js";export * from "./flag-invocation-contracts.js";export * from "./cli-contracts/flag-lexicon-contracts.js";export * from "./relationships.js";export * from "./actionability.js";export type{PlanCommandOptions,PlanOperationOptions,PlanCommandResult,PlanDispatchInput,PlanResultPlan,PlanShowDepth,PlanStepSummary,PlanSubcommand,PlanTemplateName,}from "./lifecycle/plan.js";export type{CreateOperationOptions}from "./lifecycle/create.js";export type{PlanMutationReceipt}from "./lifecycle/plan-mutation-receipt.js";export type{UpdateOperationOptions}from "./lifecycle/update.js";export type{AppendOperationOptions}from "./lifecycle/append.js";export type{CloseManyOperationOptions}from "./lifecycle/close-many.js";export type{UpdateManyOperationOptions}from "./lifecycle/update-many.js";export{runCreate}from "./lifecycle/create.js";export{runPlan}from "./lifecycle/plan.js";export{runAppend}from "./lifecycle/append.js";export{STALE_CLAIM_TAKEOVER_REFUSED_CODE,isAlreadyClaimedError,runClaim,runClaimNext,runRelease,type StaleClaimTakeoverReceipt,}from "./lifecycle/claim.js";export{runStartTask,runPauseTask,runCloseTask,type TaskCompositionOptions}from "./lifecycle/task-composition.js";export{runCloseMany}from "./lifecycle/close-many.js";export{runUpdateMany}from "./lifecycle/update-many.js";export{runComments}from "./comments.js";export{runNotes}from "./notes.js";export{runLearnings}from "./learnings.js";export{runUpgrade}from "./governance/upgrade.js";export{PLAN_SHOW_DEPTH_VALUES,PLAN_SUBCOMMANDS,PLAN_TEMPLATE_NAMES,}from "./lifecycle/plan.js";export * from "./define.js";export{BASELINE_ITEM_FORMAT_VERSION,BUILTIN_ITEM_TYPE_VALUES,CONFIDENCE_TEXT_VALUES,CURRENT_ITEM_FORMAT_VERSION,DEPENDENCY_KIND_VALUES,EXIT_CODE,ISSUE_SEVERITY_VALUES,ITEM_TYPE_VALUES,PM_CLI_EXPECTED_ERROR_NAME,PmCliError,PmClient,RISK_VALUES,STATUS_VALUES,acquireLock,acquireLockLease,appendHistoryEntry,canonicalDocument,classifyItemFormatVersion,clearWorkspaceContractsCache,commitImportedItem,createHistoryEntry,createPmCliExpectedError,effectiveItemFormatVersion,emptyImportedDocument,ensureTrackerInitialized,generateItemId,getActiveExtensionRegistrations,getContracts,getHistoryPath,getItemPath,getSettingsPath,getWorkspaceContracts,isPmCliExpectedError,isTimestampLiteral,listAllItemMetadata,loadCreateTemplateOptions,locateItem,normalizeItemMetadata,normalizeItemFormatVersion,normalizeItemId,normalizeRawItemId,normalizeStatusInput,nowIso,parseTags,pathExists,readBooleanOption,readCsvListOption,readFileIfExists,readLocatedItem,readRequiredString,readSettings,readStringOption,removeFileIfExists,renderCalendarMarkdown,renderCalendarToon,renderGuideMarkdown,resolveCalendarOutputFormat,resolveGuideOutputFormat,resolveItemTypeRegistry,resolveImplicitPmRoot,resolvePmRoot,resolveRuntimeFieldRegistry,resolveRuntimeStatusRegistry,runAction,runActiveOnReadHooks,runActiveOnWriteHooks,runCalendar,runCompletion,runGuide,runList,runReindex,runSearch,runTemplatesList,runTemplatesSave,runTemplatesShow,runTestRunsList,runTestRunsLogs,runTestRunsResume,runTestRunsStatus,runTestRunsStop,scanItemFormatVersions,selectImportAuthor,serializeItemDocument,splitFrontMatter,toEstimatedMinutesValue,toImportBoolean,toImportConfidence,toImportDeferredFields,toImportInteger,toImportLinkedDocs,toImportLinkedFiles,toImportLinkedTests,toImportLogEntries,toImportNormalizedEnum,toImportNumberMap,toImportPriority,toImportStatus,toImportStringList,toImportStringMap,toImportTags,toNonEmptyImportString,writeFileAtomic,aggregate,append,claim,claimNext,close,reopen,closeTask,comments,config,context,copy,create,deleteItem,deps,docs,duplicates,extension,extensionActivate,extensionDeactivate,extensionList,files,filesDiscover,filesLookup,focus,gc,get,graph,health,historyCompact,historyCompactBulk,historyRedact,historyRepair,historyRepairAll,init,learnings,list,listAllComplete,next,notes,packageActivate,packageCatalog,packageDeactivate,packageDescribe,packageDoctor,packageInstall,packageLifecycle,packageList,packageManage,packageReload,packageUninstall,pauseTask,profile,profileApply,profileLint,profileList,profileShow,release,restore,schema,schemaAddField,schemaAddStatus,schemaAddType,schemaApplyPreset,schemaInferTypes,schemaList,schemaListFields,schemaRemapStatus,schemaRemoveField,schemaRemoveStatus,schemaRemoveType,schemaShow,schemaShowField,schemaShowStatus,schemaRenameField,schemaRenameType,search,startTask,stats,update,upgrade,validate,type AggregateOptions,type AggregateResult,type AggregateRow,type AppendCommandOptions,type AppendResult,type BlockerEntry,type CalendarOptions,type CalendarResult,type ClaimResult,type ClaimStartReceipt,type CloseResult,type CloseTaskResult,type CommitImportedItemParams,type CommitImportedItemResult,type CommentsCommandOptions,type CommentsResult,type ConfigCommandOptions,type ConfigResult,type CompletionResult,type CompletionShell,type ContractsCommandOptions,type ContractsResult,type ContextFocusItem,type ContextOptions,type ContextOutputFormat,type ContextResult,type CopyResult,type CreatePmCliExpectedErrorOptions,type CreateResult,type CreateTemplateOptions,type Dependency,type DeleteResult,type DepsCommandOptions,type DepsResult,type DocsCommandOptions,type DocsResult,type ExtensionCommandOptions,type ExtensionCommandResult,type FilesCommandOptions,type FilesDiscoverOptions,type FilesDiscoverResult,type FilesLookupOptions,type FilesLookupResult,type FilesResult,type FocusResult,type GcCommandOptions,type GcResult,type GetContractsOptions,type GetOptions,type GetResult,type GuideDepth,type GuideOptions,type GuideOutputFormat,type GuideResult,type HealthResult,type ImportLinkedScope,type InitCommandOptions,type InitResult,type ItemFormatVersionScanEntry,type ItemFormatVersionScanResult,type ItemFormatVersionStatus,type LearningsCommandOptions,type LearningsResult,type LinkedDoc,type LinkedFile,type LinkedTest,type ListedItem,type ListCompactResult,type ListFullResult,type ListOptions,type ListProjectedItem,type ListProjectedItemCore,type ListResult,type ListResultItem,type ListSortField,type ListSortOrder,type ListTreeItem,type ListTreeMetadata,type ListVerboseResult,type PmCompleteListCertificate,type PmCompleteListFailureReceipt,type PmCompleteListFinding,type PmCompleteListFindingCode,type PmCompleteListInspection,type PmCompleteListOptions,type PmCompleteListResult,type LogNote,type NextActionableItem,type NextBlockerRef,type NextOptions,type NextOutputFormat,type NextRecommendation,type NextResult,type NotesCommandOptions,type NotesResult,type PackageCommandOptions,type PackageCommandResult,type PauseTaskResult,type PmActionInput,type PmActionName,type PmActionOptions,type PmClientCloseActionOptions,type PmClientFullMutationOptions,type PmClientMutationOptions,type PmClientOptions,type PmClientRunArgs,type PmCliExpectedError,type ProfileApplyCommandOptions,type ProfileApplyResult,type ProfileLintResult,type ProfileListResult,type ProfileResult,type ProfileShowResult,type ProfileSubcommand,type ReindexOptions,type ReindexResult,type ReleaseResult,type ReleaseMutationOptions,type ReopenCommandOptions,type ReopenResult,type RestoreResult,type RunHealthOptions,type SchemaAddFieldCommandOptions,type SchemaAddFieldResult,type SchemaAddStatusCommandOptions,type SchemaAddStatusResult,type SchemaAddTypeCommandOptions,type SchemaAddTypeInferCommandOptions,type SchemaAddTypeInferResult,type SchemaAddTypeResult,type SchemaApplyPresetCommandOptions,type SchemaApplyPresetResult,type SchemaInspectResult,type SchemaListFieldsResult,type SchemaListResult,type SchemaRemoveFieldCommandOptions,type SchemaRemoveFieldResult,type SchemaRemoveStatusCommandOptions,type SchemaRemoveStatusResult,type SchemaRemoveTypeCommandOptions,type SchemaRemoveTypeResult,type SchemaShowFieldResult,type SchemaShowResult,type SchemaShowStatusResult,type SchemaResult,type RunSchemaEvolutionMigrationOptions,type SchemaEvolutionMigrationRequest,type SchemaEvolutionMigrationResult,type SchemaSubcommand,type SearchCompactResult,type SearchHit,type SearchHitHighlight,type SearchMatchMode,type SearchOptions,type ClaimNextOptions,type SearchResult,type SearchResultItem,type SearchVerboseResult,type StartTaskResult,type StatsCommandOptions,type StatsResult,type TemplatesListResult,type TemplatesSaveResult,type TemplatesSaveOptions,type TemplatesShowResult,type TestRunsListCommandOptions,type TestRunsLogsCommandOptions,type TestRunsResumeCommandOptions,type TestRunsStopCommandOptions,type ToImportLinkedArtifactsOptions,type ToImportLinkedTestsOptions,type ToImportLogEntriesOptions,type UpdateResult,type UpgradeCommandOptions,type UpgradeResult,type ValidateCommandOptions,type ValidateResult,type WorkspaceContracts,type WorkspaceContractsOptions,type WorkspaceExtensionCommandContract,type WorkspaceFieldContract,}from "./runtime.js";export{extensionMigrate,packageMigrate}from "./package-migrations.js";export{CONTEXT_OUTPUT_VALUES,NEXT_OUTPUT_VALUES,PM_GITIGNORE_END,PM_GITIGNORE_START,analyzeSdkActionCoverage,ensurePmGitignore,getPmGitignoreBlock,closeItem,runAggregate,runClose,runCopy,runContext,runDelete,runFocus,runGet,runNext,runRestore,runUpdate,type CloseCommandOptions,type CopyOptions,type DeleteCommandOptions,type EnsurePmGitignoreResult,type HierarchyChild,type HierarchyNode,type HotFile,type LockLease,type FocusOptions,type ImportPriorityValue,type ProgressEntry,type RecentContextItem,type RestoreCommandOptions,type SdkActionCoverageRow,type StaleEntry,type TestHealthSummary,type UpdateCommandOptions,type WorkloadEntry,}from "./runtime.js";export{runStats}from "./stats.js";export{readImprovementLedger,recordImprovementObservation,type ImprovementDirection,type ImprovementLedgerDocument,type ImprovementLedgerResult,type ImprovementObservation,type ImprovementTrend,type ReadImprovementLedgerOptions,type RecordImprovementObservationOptions,type RecordImprovementObservationResult,}from "./improvement-ledger.js";export{evaluateProvenanceCoverage,projectFleetAttributionAnalytics,projectProvenanceCoverageAnalytics,readHistoryAnalyticsWindow,runFleetAttributionAnalytics,runProvenanceCoverageAnalytics,type FleetAttributionAnalytics,type FleetAttributionDimension,type FleetAttributionRow,type HistoryAnalyticsWindowOptions,type HistoryAnalyticsWindowReceipt,type HistoryAnalyticsEvent,type HistoryAnalyticsWindow,type ProvenanceCoverageAnalytics,}from "./history-analytics.js";export{DEFAULT_EVAL_QUERIES_RELATIVE_PATH,EVAL_QUERY_SET_CONTRACT,EVAL_QUERY_SET_EXAMPLE,EVAL_QUERY_SET_SCHEMA_ID,parseEvalQuerySet,runEval,type EvalOptions,type EvalQueryReport,type EvalResult,}from "./eval.js";export{runTelemetry,TELEMETRY_SUBCOMMANDS,type TelemetryCommandOptions,type TelemetryFlushResult,type TelemetryStatusSummary,type TelemetrySubcommand,}from "./telemetry.js";export{classifyLinkedTestCommandSafety,classifyLinkedTestFailure,countFailureCategories,extractReferencedPmItemIdsFromCommand,resolveLinkedTestFailureExitCode,runLinkedTests,runTest,summarizeContextPreflight,type LinkedTestFailureCategory,type LinkedTestCommandSafetyClassification,type TestCommandOptions,type TestResult,type TestRunResult,}from "./test/execution.js";export{assertTestMeasurementRun}from "./test/prerequisites.js";export{TEST_RUN_MEASUREMENT_LIMIT,diffTestRunMeasurements,parseTestRunMeasurements,queryTestRunMeasurementsBelow,type TestRunMeasurementDiff,}from "./test/measurements.js";export{runTestAll,type TestAllCommandOptions,type TestAllItemResult,type TestAllResult,}from "./test/batch.js";export{LINKED_TEST_ENV_NAME_PATTERN,LINKED_TEST_PM_CONTEXT_MODE_VALUES,LINKED_TEST_WORKSPACE_CONTEXT_MODE_VALUES,LINKED_TEST_PROTECTED_ENV_KEYS,parseLinkedTestAssertionEqualsMap,parseLinkedTestAssertionGteMap,parseLinkedTestBoolean,parseLinkedTestContextMode,parseLinkedTestEnvClear,parseLinkedTestEnvSet,parseLinkedTestJsonEntries,parseLinkedTestMinLines,parseLinkedTestRegexList,parseLinkedTestStringList,parseLinkedTestWorkspaceContextMode,type LinkedTestPmContextMode,type LinkedTestWorkspaceContextMode,}from "./test/parsers.js";export{acknowledgeLinkedTests,attachLinkedTestMutationProvenance,attachLinkedTestProvenance,linkedTestTrustFingerprint,resolveLinkedTestSourceRef,resolveLinkedTestSourceWorkspaceRoot,resolveLinkedTestTrust,resolveLinkedTestTrustBatch,type LinkedTestTrustDecision,}from "./test/trust.js";export{updateLinkedTest,type LinkedTestUpdateSelector,type LinkedTestMetadataPatch,type UpdateLinkedTestOptions,type UpdateLinkedTestResult,}from "./test/update.js";export{runStartBackgroundRun,runTestRunsWorker,type StartBackgroundRunCommandOptions,type StartBackgroundRunResult,}from "./test/runs.js";export{BUILTIN_PROFILES,listProfiles,normalizeProfileName,PROFILE_NAMES,resolveProfile,type ProfileConfigEntry,type ProfileName,type ProfilePackageRecommendation,type ProfileTemplateEntry,type ProfileTemplateOptions,type ProjectProfileDefinition,type ProjectProfileRegistrationInput,}from "../core/profile/profile-presets.js";export{planProfileApplication,type ProfileApplicationPlan,type ProfileChangeStatus,type ProfileComponentChange,type ProfileConfigChange,type ProfileConfigPlan,type ProfileCurrentState,type ProfilePackagePlan,type ProfileSchemaPlan,type ProfileTemplateChange,type ProfileTemplatePlan,type ProfileWorkflowChange,type ProfileWorkflowPlan,}from "../core/profile/profile-plan.js";export{describeProfileComposition,describeProjectProfile,type ProjectProfileComposition,type ProjectProfileDescription,type ProjectProfilePackageSummary,}from "../core/profile/profile-describe.js";export{lintProjectProfile,PROFILE_LINT_CODES,PROFILE_LINT_DIMENSIONS,type ProfileLintCode,type ProfileLintDimension,type ProfileLintSeverity,type ProjectProfileLintFinding,type ProjectProfileLintReport,}from "../core/profile/profile-lint.js";export * from "./authoring.js";export * from "./governance.js";export * from "./mcp/discovery.js";export * from "./query.js";export * from "./testing.js";export type{GlobalOptions}from "../core/shared/command-types.js";export type{ItemDocument,ItemDeferredField,ItemMetadata,ItemStatus,ItemType,PmSettings,StructuredJsonValue,}from "../types/index.js";export{normalizeDirectExtensionCommandOptions,resolveExtensionFlagOptionKey,type DirectExtensionOptionPolicy,type LooseCommandFlagDefinition,}from "./extension/command-options.js";export type{CheckpointRestoreFn,CheckpointRollbackResult,LoadedMutationCheckpoint}from "../core/checkpoint/mutation-checkpoint.js";export type{CommandOverrideResult,DiscoverExtensionsOptions,ExtensionLayer,LoadedExtension,ParserOverrideResult,PreflightOverrideResult,RegisteredExtensionCommandOverride,RegisteredExtensionParserOverride,RegisteredExtensionPreflightOverride,RegisteredExtensionRendererOverride,RendererOverrideResult,ScopedPreflightOverrideDefinition,ScopedRendererOverrideDefinition,ServiceOverrideResult}from "../core/extensions/extension-types.js";export type{FlagValueKind}from "../core/extensions/flag-value-types.js";export type{HistoryCompactScope}from "../core/history/history-compact-bulk.js";export type{HistoryStreamPolicyManyParams,HistoryStreamPolicyParams,HistoryStreamPolicyResult}from "../core/history/history-stream-policy.js";export type{PatchFailureContext,ResolveHistoryTargetOptions,ResolvedHistoryTarget}from "../core/history/projection.js";export type{ReanchorHistoryOptions,ReanchorResult,ReplayDocument}from "../core/history/replay.js";export type{BodyFileReader}from "../core/io/body-file.js";export type{ItemDocumentFormatOptions}from "../core/item/item-format.js";export type{StdinTokenResolver}from "../core/item/parse.js";export type{Priority}from "../core/item/priority.js";export type{ParseStatusFilterOptions}from "../core/item/status-filter.js";export type{CommandOptionPolicyCommand,CommandOptionPolicyState}from "../core/item/type-registry.js";export type{AcquireLockOptions}from "../core/lock/lock.js";export type{OutputOptions}from "../core/output/output.js";export type{TabularRow}from "../core/output/tabular.js";export type{LoadedRuntimeSchemaSections,RuntimeFieldDefinitionResolved}from "../core/schema/runtime-schema.js";export type{EvaluateTransitionInput,EvaluateTransitionResult}from "../core/schema/type-workflows.js";export type{RefreshSearchArtifactsForMutationOptions,SearchMutationArtifactRefreshResult,VectorizationStatusLedgerReadResult}from "../core/search/cache.js";export type{SearchCorpusOptions,SemanticCorpusCharacterLimitResolution,SemanticCorpusInputOptions}from "../core/search/corpus.js";export type{EvalQuerySet}from "../core/search/eval.js";export type{EmbeddingProviderResolution,ProviderSettingsInput}from "../core/search/providers.js";export type{SemanticRuntimeDefaultsResolution}from "../core/search/semantic-defaults.js";export type{ExecuteVectorRequestOptions,VectorRecord,VectorSettingsInput,VectorStoreConfig,VectorStoreResolution,VectorUpsertResult}from "../core/search/vector-stores.js";export type{SentryLike}from "../core/sentry/instrument.js";export type{AgentSemanticAttribution}from "../core/session/session-state.js";export type{SerialQueue}from "../core/shared/serial-queue.js";export type{SplitCommaListOptions}from "../core/shared/split-comma-list.js";export type{ItemFormatMigrationResult}from "../core/store/item-format-migration.js";export type{ListCacheOptions}from "../core/store/item-metadata-cache.js";export type{SettingsReadResult}from "../core/store/settings.js";export type{TelemetryCommandContext,TelemetryErrorEventContext}from "../core/telemetry/runtime.js";export type{BackgroundLogStream,BackgroundTestRunStatus}from "../core/test/background-runs.js";export type{ValidateFixRecord}from "../core/validate/fix-planning.js";export type{OwnerItemMetadata,StaleLinkOwnerInput}from "../core/validate/missing-link-owners.js";export type{ClassifiedStaleLinkedPath}from "../core/validate/stale-file-classification.js";export type{BuiltinItemType,ConfidenceTextLevel,ContextDepth,ContextSectionName,ContextSettings,GovernanceStartBlockerEnforcement,HistoryEntry,HistoryPatchOp,ItemFormat,ItemTestRunSummary,LinkScope,ParentReferencePolicy,PlanMode,RuntimeSchemaSettings,SprintReleaseFormatPolicy,TestRunMeasurement}from "../types.js";export type{ContentFieldFilters}from "../core/governance/content-fields.js";export type{MissingMetadataFilters}from "../core/governance/metadata-coverage.js";export type{UpdateManyCommandOptions,UpdateManyResult}from "./lifecycle/update-many.js";export type{CommandScope}from "./command-line.js";export type{ContextIntentCursorEnvelope}from "./context-intent-contracts.js";export type{ExactCorpusShape}from "./corpus-shape.js";export type{ExactDefinition,FlagAuthoringDefinition,ItemFieldAuthoringDefinition,ItemTypeAuthoringDefinition,MigrationAuthoringDefinition,SearchProviderAuthoringDefinition,VectorStoreAdapterAuthoringDefinition}from "./define.js";export type{ManagedExtensionRecord}from "./extension/managed-state.js";export type{ValidateItem}from "./governance/validate-item-reader.js";export type{ProjectedGraphResult}from "./graph/run.js";export type{ClaimMutationOptions,ClaimNextResult}from "./lifecycle/claim.js";export type{CloseManyCommandOptions,CloseManyResult}from "./lifecycle/close-many.js";export type{RenamedLinkedArtifactResult}from "./linked-artifacts.js";export type{FilterValueEchoEntry}from "./query/list.js";export type{SearchRenderingQueryExpansion,SearchRenderingRerank}from "./query/search-rendering.js";export type{ImplicitSemanticFallbackReason,VectorIndexRecovery,VectorIndexRecoveryRegistrations}from "./query/search/semantic.js";export type{ReadOutputResultForSession}from "./read-output-contracts.js";export type{InitialReadOptions,ReadOptions,ReadPromise}from "./runtime.js";export type{LinkedTestExecutionResult,RunLinkedTestsOptions}from "./test/execution.js";export type{RegisteredHookEntry}from "./testing.js";export type{TraceabilityCandidate}from "./traceability/source-traceability.js";export type{ExactWorkspaceRecipe}from "./workspace-recipe.js";
|
|
@@ -167,7 +167,27 @@ export declare function runClaimNext(force:boolean,global:GlobalOptions,options?
|
|
|
167
167
|
export declare function parseClaimNextAttempts(raw:string|number|undefined):number;
|
|
168
168
|
/** Claims the first still-available row from a pre-ranked recommendation set. */
|
|
169
169
|
export declare function claimNextFromRecommendations(recommendations:NextRecommendation[],force:boolean,global:GlobalOptions,options?:ClaimMutationOptions,claimRunner?:ClaimRunner):Promise<ClaimNextResult>;
|
|
170
|
+
/** Stable warning when a release by the holder a close ended leaves a later holder's claim in place (GH-1774). */
|
|
171
|
+
export declare const RELEASE_CLAIM_ENDED_BY_CLOSE_WARNING="release_claim_ended_by_close";
|
|
172
|
+
/**
|
|
173
|
+
* The refusal for a status-changing release (`--handoff`, `--pause`) by the
|
|
174
|
+
* holder a close ended: the item now belongs to a later holder, so the caller
|
|
175
|
+
* can neither move it nor clear that claim (GH-1774).
|
|
176
|
+
*/
|
|
177
|
+
declare function releaseClaimEndedRefusal(itemId:string,holder:string,action:"--handoff"|"--pause",global:GlobalOptions,explicitAuthor:string|undefined):PmCliError;
|
|
178
|
+
/**
|
|
179
|
+
* Judge a `--pause` before its status write (GH-1774) and return the fence
|
|
180
|
+
* that write must run under. The pause is two writes (status, then release),
|
|
181
|
+
* so a caller whose claim a close ended is refused before the first one when
|
|
182
|
+
* another principal holds the item. The judgement reads history outside the
|
|
183
|
+
* item lock, so the returned fence re-reads the item under the status
|
|
184
|
+
* write's lock and refuses when its holder, status or last write changed
|
|
185
|
+
* since: work claimed or closed in between can never be moved by this pause.
|
|
186
|
+
*/
|
|
187
|
+
export declare function assertPauseKeepsLaterHolder(id:string,global:GlobalOptions,author:string|undefined):Promise<(<T>(write:()=> Promise<T>)=> Promise<T>)>;
|
|
188
|
+
/** Stable refusal code when the item changes between a pause's judgement and its status write (GH-1774). */
|
|
189
|
+
export declare const PAUSE_ITEM_CHANGED_CODE="pause_item_changed";
|
|
170
190
|
/** Implements run release for the public runtime surface of this module. */
|
|
171
191
|
export declare function runRelease(id:string,force:boolean,global:GlobalOptions,options?:ReleaseMutationOptions):Promise<ReleaseResult>;
|
|
172
192
|
/** Test-only access to the stale-takeover decision helpers. */
|
|
173
|
-
export declare const _testOnlyClaimCommand:{claimConflictRefusal:typeof claimConflictRefusal;decideHeldClaim:typeof decideHeldClaim;staleTakeoverReceipt:typeof staleTakeoverReceipt;};export{};
|
|
193
|
+
export declare const _testOnlyClaimCommand:{claimConflictRefusal:typeof claimConflictRefusal;decideHeldClaim:typeof decideHeldClaim;releaseClaimEndedRefusal:typeof releaseClaimEndedRefusal;staleTakeoverReceipt:typeof staleTakeoverReceipt;};export{};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{assertInitializedTracker as E}from"../environment/tracker-preflight.js";import{resolveRuntimeStatusRegistry as T,statusIsTerminal as N,EXIT_CODE as h,PmCliError as f,toItemRecord as I,mutateItem as Q,resolvePmRoot as x,readSettings as S,resolveAuthor as b,resolveClaimPrincipal as O,normalizeStatusForRegistry as F}from"../runtime-primitives.js";import{wrapOwnershipConflict as Z}from"../annotations.js";import{renderPmCommand as U,resolvePmCommandScopeArgs as ee}from"../command-line.js";import{resolveItemOwnershipActivity as te}from"../ownership-source.js";import{mutateItemWithHistoryContextResolver as re}from"../../core/store/item-store.js";import{applyReleaseHandoff as ae,resolveReleaseHandoff as ie}from"./release-handoff.js";import{enforceTypeWorkflowTransition as ne}from"./workflow-transition.js";import{admitExplicitStartClaim as se,admitStartTransition as oe,START_BLOCKED_REFUSAL_CODE as le}from"./start-blockers.js";import{resolveTypeWorkflows as ce}from"../../core/schema/type-workflows.js";import{resolveStartTaskInProgressStatus as de}from"../start-task-status.js";import{runNext as ue}from"../query/next.js";import{recordClaimSemanticAttribution as me,recordReleaseSemanticAttribution as he}from"../context/semantic-session-attribution.js";import{redactIdentityCredentials as C,redactIdentityFields as P,redactOptionalIdentityCredentials as L}from"../../core/shared/url-credentials.js";const D="no_available_next_item",He="stale_claim_takeover_refused";function W(e){if(!(e instanceof Error)||e.name!=="PmCliError")return;const t=e.context;if(typeof t!="object"||t===null)return;const r=t.code;return typeof r=="string"?r:void 0}function q(e,t){return W(e)===t}function fe(e){return q(e,"already_claimed_by")}async function pe(e,t,r,a={}){const i=x(process.cwd(),r.path);await E(i);const n=await S(i),s=T(n.schema),o=b(a.author,n.author_default),c=O(o),l=a.takeoverStale===!0;ge(l,t);let m=null,_=!1,v={},u;const p=[],w=await re({pmRoot:i,settings:n,id:e,op:"claim",author:o,message:a.message,force:t,skipNoop:!0,resolveHistoryContext:()=>u===void 0?void 0:{stale_claim_takeover:u},async mutate(d,j){const k=d.metadata.assignee??"",z=d.metadata.claim_principal?.trim()||k;if(m=k.trim().length>0?k:null,N(d.metadata.status,s)&&!t)throw new f(`Cannot claim terminal item ${d.metadata.id} without --force`,h.CONFLICT);if(m!==null&&z!==c){const y=await B({pmRoot:i,storageId:j.storageId,metadata:d.metadata,holder:k,author:o,thresholdHours:n.mutation_guard.stale_in_progress_hours,force:t,ifAvailable:a.ifAvailable===!0,takeoverStale:l});if(y.kind==="skip")return _=!0,p.push(`claim_skipped_held_by:${L(k)}`),{changedFields:[]};u=y.takeover,p.push(y.warning)}const A={assignee:o,claim_principal:c},K=["assignee","claim_principal"].filter(y=>d.metadata[y]!==A[y]);Object.assign(d.metadata,A);const X=d.metadata.status,{changedFields:Y,warnings:R,...J}=be(d.metadata,a.start===!0,n,s);return R.push(...await ke({pmRoot:i,settings:n,metadata:d.metadata,fromStatus:X,registry:s,force:t,start:a.start===!0})),v=J,p.push(...R),{changedFields:[...K,...Y],warnings:p}}}),g=V(await M("claim",w.item.id,r,_,()=>me({pmRoot:i,settings:n,principal:c,itemId:w.item.id})));return p.push(...g.warnings),{item:P(I(w.item)),changed_fields:w.changedFields,claimed_by:_&&m!==null?C(m):o,previous_assignee:m===null?null:C(m),forced:t,..._?{skipped:!0}:{},...p.length>0?{warnings:p}:{},...$("suggestions",g.suggestions),...v,...u===void 0?{}:{takeover:u}}}async function B(e){if(e.ifAvailable&&!e.takeoverStale)return{kind:"skip"};if(e.force)return{kind:"take",warning:`claim_takeover:${L(e.holder)}->${e.author}`};const t=await te(e.pmRoot,e.storageId,e.holder,{updated_at:e.metadata.updated_at,threshold_hours:e.thresholdHours}),r=e.takeoverStale?G(t,e.author):void 0;if(r!==void 0)return{kind:"take",warning:`claim_stale_takeover:${r.previous_holder}->${e.author}:idle_hours=${r.idle_hours}`,takeover:r};if(e.takeoverStale&&e.ifAvailable)return{kind:"skip"};throw H(e.metadata.id,t,e.takeoverStale)}function ge(e,t){if(!(!e||!t))throw new f("--takeover-stale cannot be combined with --force",h.USAGE,{code:"ambiguous_option_combination",required:"Pass --takeover-stale to take over only an idle claim, or --force for a coordinated unconditional takeover.",nextSteps:["Drop --force to let the stale-work policy decide, or drop --takeover-stale for a coordinated override."]})}function G(e,t){const r=e.activity;if(r.stale_policy.stale)return{previous_holder:e.holder,new_holder:t,claimed_at:e.since,last_activity_at:r.last_activity_at,idle_hours:r.idle_hours,threshold_hours:r.stale_policy.threshold_hours,policy:r.stale_policy.setting}}const _e={claim_record_unavailable:"no original history record shows when the holder took it",discarded_history_tail:"a history salvage after the claim discarded a record whose time is unknown",rewritten_history:"a history repair, redaction or merge reconcile after the claim rewrote its records",workspace_restored:"a workspace snapshot restore at or after the claim may have replaced the holder's work"};function we(e,t){return t.history_unreadable===!0?{reason:"its history stream could not be read, so idleness cannot be established",nextStep:`Repair the history stream of ${e} (pm history ${e} --verify), then retry --takeover-stale.`}:t.unproven_activity!==void 0?{reason:`${_e[t.unproven_activity]}, so idleness cannot be proven`,nextStep:`Ask the holder to release ${e} (pm release ${e}); a new claim starts a provable record.`}:t.stale_policy.eligible_at===null?{reason:t.idle_hours===null?"no valid activity time is recorded":`idle ${t.idle_hours}h of ${t.stale_policy.threshold_hours}h`,nextStep:`No eligibility time can be computed for ${e}; inspect pm history ${e}.`}:{reason:`idle ${t.idle_hours}h of ${t.stale_policy.threshold_hours}h`,nextStep:`Retry with --takeover-stale after ${t.stale_policy.eligible_at} if nothing else is recorded on ${e}.`}}function H(e,t,r){const a=t.activity,i=a.stale_policy,n={item_id:e,claimed_by:t.holder,claimed_at:t.since,claim_source:t.source,claim_activity:a},s="Claim is an atomic test-and-set so parallel agents never proceed believing they own the same item.",o="Re-run with --force only when taking over the item is coordinated.";if(r){const c=we(e,a);return new f(`Item ${e} is ${t.phrase}, and its claim is not stale under ${i.setting} (${c.reason}).`,h.CONFLICT,{code:"stale_claim_takeover_refused",...n,required:`The claim must be idle for at least ${i.threshold_hours}h (${i.setting}) before --takeover-stale may take it.`,why:`${s} A stale takeover needs recorded evidence that the claim has been idle for the configured threshold, so an active claim is never taken over.`,nextSteps:[c.nextStep,"Run pm next to pick a different unclaimed item.",o]})}return new f(`Item ${e} is already ${t.phrase}. Use --force to take over, or --if-available to skip without failing.`,h.CONFLICT,{code:"already_claimed_by",...n,why:s,nextSteps:["Run pm next to pick a different unclaimed item.","Re-run with --if-available to treat a held item as a no-op skip.",...i.stale?[`Re-run with --takeover-stale: the claim has been idle ${a.idle_hours}h, past ${i.setting}=${i.threshold_hours}.`]:[],o]})}const ve="claim_semantic_attribution_unrecorded";function V(e){return e?{warnings:[e.warning],suggestions:[e.suggestion]}:{warnings:[],suggestions:[]}}function $(e,t){return t.length>0?{[e]:t}:{}}const ye="release_semantic_attribution_unrecorded";async function M(e,t,r,a,i){if(!a)try{await i();return}catch(n){const s=W(n)??"unexpected_error",o=ee(r);return{warning:e==="claim"?ve:ye,suggestion:`The ${e} of ${t} is saved, but the session attribution that names this agent's active work was not updated (${s}); nothing needs a retry. If ${U([...o,"health"])} reports a stale lock, remove it with ${U([...o,"gc","--scope","locks"])}.`}}}function Ve(e,t,r=!1){const a=r?" --start":"";if(!t&&!e)throw new f(r?"pm claim --start needs an item id, or --next to start the next available item":"Specify an item id or pass --next",h.USAGE,{code:"missing_required_argument",field:"id",required:"Pass an item id, or --next to select the next available item.",nextSteps:[`Retry as pm claim <id>${a}, or pm claim --next${a}.`]});if(t&&e)throw new f("Specify either an item id or --next, not both",h.USAGE,{code:"ambiguous_option_combination",required:"Pass either an item id or --next.",nextSteps:[`Retry as pm claim ${e}${a} to claim that item, or drop the id to select with --next.`]})}async function ke(e){return e.start?oe(e):se(e)}function be(e,t,r,a){if(!t)return{changedFields:[],warnings:[]};if(N(e.status,a))throw new f(`Cannot start terminal item ${e.id}; reopen it with pm item reopen before starting it`,h.CONFLICT,{code:"terminal_state_conflict",item_id:e.id,why:"Starting work moves an active item into progress; a terminal item must be reopened so its recurrence evidence is recorded.",nextSteps:[`Run pm item reopen ${e.id} "<reason>", then pm claim ${e.id} --start.`]});const i=de(a),n=r.governance.workflow_enforcement??"off",s=ne({enforcement:n,typeWorkflows:n==="off"?[]:ce(r.schema),statusRegistry:a,typeName:e.type,fromStatus:e.status,toStatus:i}),o={from_status:e.status,to_status:i},c=e.status===i?[]:["status"];return e.status=i,{start:o,changedFields:c,warnings:s?[s]:[]}}async function Me(e,t,r={},a={}){if(r.takeoverStale===!0)throw new f("--takeover-stale cannot be combined with --next",h.USAGE,{code:"ambiguous_option_combination",required:"Pass an explicit item id with --takeover-stale; --next only selects work no other author holds.",nextSteps:["Retry as pm claim <id> --takeover-stale for the held item, or drop --takeover-stale to select with --next."]});const i=xe(r.maxAttempts),n=await S(x(process.cwd(),t.path)),s={...r,author:b(r.author,n.author_default)},o=await ue({...a,callerAuthor:s.author,limit:String(i)},t),c=[o.recommended,...o.ready].filter(l=>l!==null).map(l=>({...l,reasons:"reasons"in l?l.reasons:["ranked ready candidate"]}));return Se(c.slice(0,i),e,t,s)}function xe(e){if(e===void 0)return 10;const t=Number(e);if(!Number.isSafeInteger(t)||t<1||t>100)throw new f("--max-attempts must be an integer from 1 to 100",h.USAGE);return t}async function Se(e,t,r,a={},i=pe){let n=0;const s=[],o=()=>s.length>0?{start_refused:[...s]}:{};for(const c of e){n+=1;try{const l=await i(c.id,t,r,a),m={...l,recommendation:c,attempts:n,available:!0,...o()};if(!l.skipped)return m}catch(l){if(q(l,le)){s.push(c.id);continue}if(!fe(l))throw l}}if(a.ifAvailable===!0)return{available:!1,item:null,claimed_by:b(a.author,""),previous_assignee:null,forced:t,skipped:!0,recommendation:null,attempts:n,...o(),warnings:[D]};throw Ce(n,s,a.start===!0)}function Ce(e,t,r){const a=e===0;let i="Every ranked candidate was claimed by another agent before this atomic selection completed.";return a?i="No ready items matched the specified filters or selection criteria.":t.length>0&&(i=`${t.length} of ${e} attempted candidates refused their start because a declared blocker is open (${t.join(", ")}), and nothing was written to them; ${t.length===e?"no other candidate was attempted":"every other attempted candidate was claimed by another agent"}.`),new f(a?"No actionable items matched the selection filters":"No actionable item remained available to claim",a?h.NOT_FOUND:h.CONFLICT,{code:D,why:i,nextSteps:[a?"Verify the filters or run pm next to inspect all ready work.":`Run pm claim --next${r?" --start":""} again, with the same filters, to refresh the ranked candidate set.`],...t.length>0?{details:{start_refused:[...t]}}:{}})}async function je(e,t,r,a={}){const i=x(process.cwd(),r.path);await E(i);const n=await S(i),s=b(a.author,n.author_default),o=O(s),c=a.ownershipReleaseBypass===!0;let l=null;const m=T(n.schema),_=ie(a,m);if(_!==void 0&&c)throw new f("Ownership-release bypass only clears ownership; it cannot change a handoff status.",h.USAGE);let v,u;try{u=await Q({pmRoot:i,settings:n,id:e,op:"release",author:s,message:a.message,force:t,bypassAssigneeConflict:c,mutate(g){l=g.metadata.assignee??null;const d=_===void 0?void 0:ae(g.metadata,_,n,m,a.message);return v=d?.receipt,!l&&!g.metadata.claim_principal?{changedFields:[]}:(delete g.metadata.assignee,delete g.metadata.claim_principal,{changedFields:["assignee","claim_principal",...d?.changedFields??[]],warnings:d?.warnings})}})}catch(g){Z(g,{required:"For approved non-owner handoffs, prefer the ownership-release bypass before considering --force.",examples:['pm release pm-a1b2 --author "reviewer" --force'],nextSteps:["Use the package-provided ownership-release bypass for handoffs that only clear assignee metadata.","Use --force only when an explicit override is approved for broader ownership conflicts."]})}const p=V(await M("release",u.item.id,r,!1,()=>he({pmRoot:i,principal:o,itemId:u.item.id}))),w=$e(u.item,m);return{item:P(I(u.item)),released_by:s,changed_fields:u.changedFields,previous_assignee:l===null?null:C(l),forced:t,...v===void 0?{}:{handoff:v},...$("warnings",[...u.warnings,...w.warnings,...p.warnings]),...$("suggestions",[...w.suggestions,...p.suggestions])}}function $e(e,t){return F(e.status,t)===F(t.in_progress_status,t)?{warnings:["released_unclaimed_in_progress"],suggestions:[`${e.id} remains ${e.status} and unclaimed. If work is paused, run pm release ${e.id} --pause to move it to ${t.open_status}.`]}:{warnings:[],suggestions:[]}}const ze={claimConflictRefusal:H,decideHeldClaim:B,staleTakeoverReceipt:G};export{ve as CLAIM_ATTRIBUTION_UNRECORDED_WARNING,D as NO_AVAILABLE_NEXT_ITEM_CODE,ye as RELEASE_ATTRIBUTION_UNRECORDED_WARNING,He as STALE_CLAIM_TAKEOVER_REFUSED_CODE,ze as _testOnlyClaimCommand,be as applyClaimStart,Se as claimNextFromRecommendations,fe as isAlreadyClaimedError,xe as parseClaimNextAttempts,Ve as requireClaimTarget,pe as runClaim,Me as runClaimNext,je as runRelease};
|
|
1
|
+
import{createHash as se}from"node:crypto";import{readFileSync as oe}from"node:fs";import{assertInitializedTracker as P}from"../environment/tracker-preflight.js";import{resolveRuntimeStatusRegistry as L,statusIsTerminal as U,EXIT_CODE as h,PmCliError as p,toItemRecord as D,mutateItem as le,locateItem as de,readLocatedItem as ce,resolveItemTypeRegistry as ue,getActiveExtensionRegistrations as me,resolvePmRoot as C,readSettings as A,resolveAuthor as S,resolveClaimPrincipal as R,normalizeStatusForRegistry as H}from"../runtime-primitives.js";import{wrapOwnershipConflict as he}from"../annotations.js";import{renderPmCommand as E,resolvePmCommandScopeArgs as T}from"../command-line.js";import{callerClaimEndedByClose as W,resolveItemOwnershipActivity as fe}from"../ownership-source.js";import{mutateItemWithHistoryContextResolver as pe}from"../../core/store/item-store.js";import{runWithItemMutationPrecondition as ge}from"../../core/store/item-mutation-precondition.js";import{getHistoryPath as _e}from"../../core/store/paths.js";import{applyReleaseHandoff as we,resolveReleaseHandoff as ye}from"./release-handoff.js";import{enforceTypeWorkflowTransition as ve}from"./workflow-transition.js";import{admitExplicitStartClaim as ke,admitStartTransition as be,START_BLOCKED_REFUSAL_CODE as xe}from"./start-blockers.js";import{resolveTypeWorkflows as Se}from"../../core/schema/type-workflows.js";import{resolveStartTaskInProgressStatus as $e}from"../start-task-status.js";import{runNext as Ce}from"../query/next.js";import{recordClaimSemanticAttribution as Ae,recordReleaseSemanticAttribution as Ee}from"../context/semantic-session-attribution.js";import{redactIdentityCredentials as k,redactIdentityFields as B,redactOptionalIdentityCredentials as G,redactUrlCredentialsInText as Re}from"../../core/shared/url-credentials.js";const q="no_available_next_item",ct="stale_claim_takeover_refused";function j(e){if(!(e instanceof Error)||e.name!=="PmCliError")return;const t=e.context;if(typeof t!="object"||t===null)return;const r=t.code;return typeof r=="string"?r:void 0}function M(e,t){return j(e)===t}function Te(e){return M(e,"already_claimed_by")}async function Ne(e,t,r,a={}){const i=C(process.cwd(),r.path);await P(i);const n=await A(i),o=L(n.schema),s=S(a.author,n.author_default),c=R(s),d=a.takeoverStale===!0;Ie(d,t);let m=null,g=!1,w={},f;const u=[],y=await pe({pmRoot:i,settings:n,id:e,op:"claim",author:s,message:a.message,force:t,skipNoop:!0,resolveHistoryContext:()=>f===void 0?void 0:{stale_claim_takeover:f},async mutate(l,x){const _=l.metadata.assignee??"",te=l.metadata.claim_principal?.trim()||_;if(m=_.trim().length>0?_:null,U(l.metadata.status,o)&&!t)throw new p(`Cannot claim terminal item ${l.metadata.id} without --force`,h.CONFLICT);if(m!==null&&te!==c){const v=await V({pmRoot:i,storageId:x.storageId,metadata:l.metadata,holder:_,author:s,thresholdHours:n.mutation_guard.stale_in_progress_hours,force:t,ifAvailable:a.ifAvailable===!0,takeoverStale:d});if(v.kind==="skip")return g=!0,u.push(`claim_skipped_held_by:${G(_)}`),{changedFields:[]};f=v.takeover,u.push(v.warning)}const O={assignee:s,claim_principal:c},ae=["assignee","claim_principal"].filter(v=>l.metadata[v]!==O[v]);Object.assign(l.metadata,O);const re=l.metadata.status,{changedFields:ie,warnings:F,...ne}=De(l.metadata,a.start===!0,n,o);return F.push(...await Ue({pmRoot:i,settings:n,metadata:l.metadata,fromStatus:re,registry:o,force:t,start:a.start===!0})),w=ne,u.push(...F),{changedFields:[...ae,...ie],warnings:u}}}),b=J(await X("claim",y.item.id,r,g,()=>Ae({pmRoot:i,settings:n,principal:c,itemId:y.item.id})));return u.push(...b.warnings),{item:B(D(y.item)),changed_fields:y.changedFields,claimed_by:g&&m!==null?k(m):s,previous_assignee:m===null?null:k(m),forced:t,...g?{skipped:!0}:{},...u.length>0?{warnings:u}:{},...N("suggestions",b.suggestions),...w,...f===void 0?{}:{takeover:f}}}async function V(e){if(e.ifAvailable&&!e.takeoverStale)return{kind:"skip"};if(e.force)return{kind:"take",warning:`claim_takeover:${G(e.holder)}->${e.author}`};const t=await fe(e.pmRoot,e.storageId,e.holder,{updated_at:e.metadata.updated_at,threshold_hours:e.thresholdHours}),r=e.takeoverStale?K(t,e.author):void 0;if(r!==void 0)return{kind:"take",warning:`claim_stale_takeover:${r.previous_holder}->${e.author}:idle_hours=${r.idle_hours}`,takeover:r};if(e.takeoverStale&&e.ifAvailable)return{kind:"skip"};throw z(e.metadata.id,t,e.takeoverStale)}function Ie(e,t){if(!(!e||!t))throw new p("--takeover-stale cannot be combined with --force",h.USAGE,{code:"ambiguous_option_combination",required:"Pass --takeover-stale to take over only an idle claim, or --force for a coordinated unconditional takeover.",nextSteps:["Drop --force to let the stale-work policy decide, or drop --takeover-stale for a coordinated override."]})}function K(e,t){const r=e.activity;if(r.stale_policy.stale)return{previous_holder:e.holder,new_holder:t,claimed_at:e.since,last_activity_at:r.last_activity_at,idle_hours:r.idle_hours,threshold_hours:r.stale_policy.threshold_hours,policy:r.stale_policy.setting}}const Oe={claim_record_unavailable:"no original history record shows when the holder took it",discarded_history_tail:"a history salvage after the claim discarded a record whose time is unknown",rewritten_history:"a history repair, redaction or merge reconcile after the claim rewrote its records",workspace_restored:"a workspace snapshot restore at or after the claim may have replaced the holder's work"};function Fe(e,t){return t.history_unreadable===!0?{reason:"its history stream could not be read, so idleness cannot be established",nextStep:`Repair the history stream of ${e} (pm history ${e} --verify), then retry --takeover-stale.`}:t.unproven_activity!==void 0?{reason:`${Oe[t.unproven_activity]}, so idleness cannot be proven`,nextStep:`Ask the holder to release ${e} (pm release ${e}); a new claim starts a provable record.`}:t.stale_policy.eligible_at===null?{reason:t.idle_hours===null?"no valid activity time is recorded":`idle ${t.idle_hours}h of ${t.stale_policy.threshold_hours}h`,nextStep:`No eligibility time can be computed for ${e}; inspect pm history ${e}.`}:{reason:`idle ${t.idle_hours}h of ${t.stale_policy.threshold_hours}h`,nextStep:`Retry with --takeover-stale after ${t.stale_policy.eligible_at} if nothing else is recorded on ${e}.`}}function z(e,t,r){const a=t.activity,i=a.stale_policy,n={item_id:e,claimed_by:t.holder,claimed_at:t.since,claim_source:t.source,claim_activity:a},o="Claim is an atomic test-and-set so parallel agents never proceed believing they own the same item.",s="Re-run with --force only when taking over the item is coordinated.";if(r){const c=Fe(e,a);return new p(`Item ${e} is ${t.phrase}, and its claim is not stale under ${i.setting} (${c.reason}).`,h.CONFLICT,{code:"stale_claim_takeover_refused",...n,required:`The claim must be idle for at least ${i.threshold_hours}h (${i.setting}) before --takeover-stale may take it.`,why:`${o} A stale takeover needs recorded evidence that the claim has been idle for the configured threshold, so an active claim is never taken over.`,nextSteps:[c.nextStep,"Run pm next to pick a different unclaimed item.",s]})}return new p(`Item ${e} is already ${t.phrase}. Use --force to take over, or --if-available to skip without failing.`,h.CONFLICT,{code:"already_claimed_by",...n,why:o,nextSteps:["Run pm next to pick a different unclaimed item.","Re-run with --if-available to treat a held item as a no-op skip.",...i.stale?[`Re-run with --takeover-stale: the claim has been idle ${a.idle_hours}h, past ${i.setting}=${i.threshold_hours}.`]:[],s]})}const Pe="claim_semantic_attribution_unrecorded";function J(e){return e?{warnings:[e.warning],suggestions:[e.suggestion]}:{warnings:[],suggestions:[]}}function N(e,t){return t.length>0?{[e]:t}:{}}const Le="release_semantic_attribution_unrecorded";async function X(e,t,r,a,i){if(!a)try{await i();return}catch(n){const o=j(n)??"unexpected_error",s=T(r);return{warning:e==="claim"?Pe:Le,suggestion:`The ${e} of ${t} is saved, but the session attribution that names this agent's active work was not updated (${o}); nothing needs a retry. If ${E([...s,"health"])} reports a stale lock, remove it with ${E([...s,"gc","--scope","locks"])}.`}}}function ut(e,t,r=!1){const a=r?" --start":"";if(!t&&!e)throw new p(r?"pm claim --start needs an item id, or --next to start the next available item":"Specify an item id or pass --next",h.USAGE,{code:"missing_required_argument",field:"id",required:"Pass an item id, or --next to select the next available item.",nextSteps:[`Retry as pm claim <id>${a}, or pm claim --next${a}.`]});if(t&&e)throw new p("Specify either an item id or --next, not both",h.USAGE,{code:"ambiguous_option_combination",required:"Pass either an item id or --next.",nextSteps:[`Retry as pm claim ${e}${a} to claim that item, or drop the id to select with --next.`]})}async function Ue(e){return e.start?be(e):ke(e)}function De(e,t,r,a){if(!t)return{changedFields:[],warnings:[]};if(U(e.status,a))throw new p(`Cannot start terminal item ${e.id}; reopen it with pm item reopen before starting it`,h.CONFLICT,{code:"terminal_state_conflict",item_id:e.id,why:"Starting work moves an active item into progress; a terminal item must be reopened so its recurrence evidence is recorded.",nextSteps:[`Run pm item reopen ${e.id} "<reason>", then pm claim ${e.id} --start.`]});const i=$e(a),n=r.governance.workflow_enforcement??"off",o=ve({enforcement:n,typeWorkflows:n==="off"?[]:Se(r.schema),statusRegistry:a,typeName:e.type,fromStatus:e.status,toStatus:i}),s={from_status:e.status,to_status:i},c=e.status===i?[]:["status"];return e.status=i,{start:s,changedFields:c,warnings:o?[o]:[]}}async function mt(e,t,r={},a={}){if(r.takeoverStale===!0)throw new p("--takeover-stale cannot be combined with --next",h.USAGE,{code:"ambiguous_option_combination",required:"Pass an explicit item id with --takeover-stale; --next only selects work no other author holds.",nextSteps:["Retry as pm claim <id> --takeover-stale for the held item, or drop --takeover-stale to select with --next."]});const i=He(r.maxAttempts),n=await A(C(process.cwd(),t.path)),o={...r,author:S(r.author,n.author_default)},s=await Ce({...a,callerAuthor:o.author,limit:String(i)},t),c=[s.recommended,...s.ready].filter(d=>d!==null).map(d=>({...d,reasons:"reasons"in d?d.reasons:["ranked ready candidate"]}));return We(c.slice(0,i),e,t,o)}function He(e){if(e===void 0)return 10;const t=Number(e);if(!Number.isSafeInteger(t)||t<1||t>100)throw new p("--max-attempts must be an integer from 1 to 100",h.USAGE);return t}async function We(e,t,r,a={},i=Ne){let n=0;const o=[],s=()=>o.length>0?{start_refused:[...o]}:{};for(const c of e){n+=1;try{const d=await i(c.id,t,r,a),m={...d,recommendation:c,attempts:n,available:!0,...s()};if(!d.skipped)return m}catch(d){if(M(d,xe)){o.push(c.id);continue}if(!Te(d))throw d}}if(a.ifAvailable===!0)return{available:!1,item:null,claimed_by:S(a.author,""),previous_assignee:null,forced:t,skipped:!0,recommendation:null,attempts:n,...s(),warnings:[q]};throw Be(n,o,a.start===!0)}function Be(e,t,r){const a=e===0;let i="Every ranked candidate was claimed by another agent before this atomic selection completed.";return a?i="No ready items matched the specified filters or selection criteria.":t.length>0&&(i=`${t.length} of ${e} attempted candidates refused their start because a declared blocker is open (${t.join(", ")}), and nothing was written to them; ${t.length===e?"no other candidate was attempted":"every other attempted candidate was claimed by another agent"}.`),new p(a?"No actionable items matched the selection filters":"No actionable item remained available to claim",a?h.NOT_FOUND:h.CONFLICT,{code:q,why:i,nextSteps:[a?"Verify the filters or run pm next to inspect all ready work.":`Run pm claim --next${r?" --start":""} again, with the same filters, to refresh the ranked candidate set.`],...t.length>0?{details:{start_refused:[...t]}}:{}})}function Ge(e){if(e===void 0)return[];const t=e.trim();if(k(t)===t)return t.startsWith("-")?[`--author=${t}`]:["--author",t]}const Y="release_claim_ended_by_close";function I(e,t,r,a,i){const n=Ge(i),o=n===void 0?void 0:E([...T(a),"claim",e,"--force",...n]),s=o===void 0||Re(o)!==o?"Take the item first with a coordinated pm claim --force as the same author only when that takeover is approved.":`Take the item first with a coordinated ${o} only when that takeover is approved.`;return new p(`A close of ${e} already ended your claim, and ${t} has claimed it since; ${r} cannot move or release another holder's claim.`,h.CONFLICT,{code:Y,item_id:e,claimed_by:t,required:`Only the current holder (${t}) can release or hand off ${e}.`,why:"A close ends its holder's claim, so that holder's later release must not change work another principal claimed after it.",nextSteps:[`Ask ${t} to release or hand off ${e}.`,s]})}function Q(e){const t=e.assignee?.trim();return t?e.claim_principal?.trim()||t:void 0}async function ht(e,t,r){const a=C(process.cwd(),t.path),i=await A(a),n=R(S(r,i.author_default)),o=ue(i,me()).type_to_folder,s=await de(a,e,i.id_prefix,i.item_format,o);if(!s)return f=>f();const c=_e(a,s.id),d=ee(c),{document:m}=await ce(s,{schema:i.schema}),g=Q(m.metadata);if(g!==void 0&&g!==n&&await W(a,s.id,n))throw I(s.id,k(m.metadata.assignee.trim()),"--pause",t,r);const w=Z(m.metadata,d);return f=>ge({pmRoot:a,id:s.id,validate:u=>{if(Z(u.metadata,ee(c))!==w)throw new p(`${s.id} changed while the pause was judged, so nothing was written.`,h.CONFLICT,{code:qe,item_id:s.id,nextSteps:[`Check the current holder with ${E([...T(t),"get",s.id])}, reconfirm any override, then re-run the original pause command unchanged.`]})}},f)}const qe="pause_item_changed";function Z(e,t){return JSON.stringify([Q(e)??null,e.status,e.updated_at,t])}function ee(e){try{return se("sha256").update(oe(e)).digest("hex")}catch{return"absent"}}async function ft(e,t,r,a={}){const i=C(process.cwd(),r.path);await P(i);const n=await A(i),o=S(a.author,n.author_default),s=R(o),c=a.ownershipReleaseBypass===!0;let d=null;const m=L(n.schema),g=ye(a,m);if(g!==void 0&&c)throw new p("Ownership-release bypass only clears ownership; it cannot change a handoff status.",h.USAGE);let w,f,u;try{u=await le({pmRoot:i,settings:n,id:e,op:"release",author:o,message:a.message,force:t,bypassAssigneeConflict:c,...c?{}:{callerClaimScope:({storageId:l,callerPrincipal:x})=>W(i,l,x)},mutate(l,x){if(x.callerClaimScoped===!0){const _=k(l.metadata.assignee.trim());if(g!==void 0)throw I(l.metadata.id,_,"--handoff",r,a.author);return f=_,{changedFields:[],warnings:[`${Y}:${l.metadata.id}:${_}`]}}d=l.metadata.assignee??null;const $=g===void 0?void 0:we(l.metadata,g,n,m,a.message);return w=$?.receipt,!d&&!l.metadata.claim_principal?{changedFields:[]}:(delete l.metadata.assignee,delete l.metadata.claim_principal,{changedFields:["assignee","claim_principal",...$?.changedFields??[]],warnings:$?.warnings})}})}catch(l){he(l,{required:"For approved non-owner handoffs, prefer the ownership-release bypass before considering --force.",examples:['pm release pm-a1b2 --author "reviewer" --force'],nextSteps:["Use the package-provided ownership-release bypass for handoffs that only clear assignee metadata.","Use --force only when an explicit override is approved for broader ownership conflicts."]})}const y=J(await X("release",u.item.id,r,!1,()=>Ee({pmRoot:i,principal:s,itemId:u.item.id}))),b=f===void 0?je(u.item,m):{warnings:[],suggestions:[`A close of ${u.item.id} already ended your claim; ${f} claimed it afterwards and keeps it. The item was not changed.`]};return{item:B(D(u.item)),released_by:o,changed_fields:u.changedFields,previous_assignee:d===null?null:k(d),forced:t,...w===void 0?{}:{handoff:w},...N("warnings",[...u.warnings,...b.warnings,...y.warnings]),...N("suggestions",[...b.suggestions,...y.suggestions])}}function je(e,t){return H(e.status,t)===H(t.in_progress_status,t)?{warnings:["released_unclaimed_in_progress"],suggestions:[`${e.id} remains ${e.status} and unclaimed. If work is paused, run pm release ${e.id} --pause to move it to ${t.open_status}.`]}:{warnings:[],suggestions:[]}}const pt={claimConflictRefusal:z,decideHeldClaim:V,releaseClaimEndedRefusal:I,staleTakeoverReceipt:K};export{Pe as CLAIM_ATTRIBUTION_UNRECORDED_WARNING,q as NO_AVAILABLE_NEXT_ITEM_CODE,qe as PAUSE_ITEM_CHANGED_CODE,Le as RELEASE_ATTRIBUTION_UNRECORDED_WARNING,Y as RELEASE_CLAIM_ENDED_BY_CLOSE_WARNING,ct as STALE_CLAIM_TAKEOVER_REFUSED_CODE,pt as _testOnlyClaimCommand,De as applyClaimStart,ht as assertPauseKeepsLaterHolder,We as claimNextFromRecommendations,Te as isAlreadyClaimedError,He as parseClaimNextAttempts,ut as requireClaimTarget,Ne as runClaim,mt as runClaimNext,ft as runRelease};
|
|
2
2
|
//# sourceMappingURL=claim.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{PmCliError as o}from"../../core/shared/errors.js";import{EXIT_CODE as u}from"../../core/shared/constants.js";import{resolveRuntimeStatusRegistry as h}from"../../core/schema/runtime-schema.js";import{resolvePmRoot as
|
|
1
|
+
import{PmCliError as o}from"../../core/shared/errors.js";import{EXIT_CODE as u}from"../../core/shared/constants.js";import{resolveRuntimeStatusRegistry as h}from"../../core/schema/runtime-schema.js";import{resolvePmRoot as f}from"../../core/store/paths.js";import{readSettings as w}from"../../core/store/settings.js";import{assertPauseKeepsLaterHolder as v,runClaim as S,runRelease as p}from"./claim.js";import{resolveReleaseHandoff as _}from"./release-handoff.js";import{runClose as g}from"./close.js";import{runUpdate as x}from"./update.js";import{resolveStartTaskInProgressStatus as C}from"../start-task-status.js";import{runAsExplicitStart as R,START_BLOCKED_REFUSAL_CODE as k}from"./start-blockers.js";import{runWithItemMutationPrecondition as E}from"../../core/store/item-mutation-precondition.js";import{mutationOptionsWithOverrides as l}from"../runtime-input.js";async function d(e,t,a){try{return await a()}catch(r){const i=r instanceof o?r.context:{},s=new o(r instanceof Error?r.message:String(r),r instanceof o?r.exitCode:u.GENERIC_FAILURE,{...i,item_id:e,why:`${t} completed for ${e} before the following step failed. No rollback was performed.${i.why?` ${i.why}`:""}`,nextSteps:[`Inspect the persisted state with pm get ${e} and pm history ${e} before retrying the failed step.`,...i.nextSteps??[]]});throw s.cause=r,s}}async function H(e,t,a){if(t.next===!0||t.ifAvailable===!0)throw new o("--start cannot be combined with --next or --if-available for an explicit item",u.USAGE,{code:"invalid_argument_value",required:"Remove --next and --if-available when starting an explicit item.",nextSteps:["Remove --next and --if-available, keep the explicit item ID and other supplied arguments, then retry."]});const r=await w(f(process.cwd(),a.path)),i=C(h(r.schema));return R(async()=>{const s=await S(e,t.force===!0,a,l(t,{},["start"])),n=s.item.id,m=await d(n,"claim",()=>x(n,l(t,{status:i},["assignee","start","next","ifAvailable","maxAttempts","takeoverStale"]),a)).catch(async c=>{throw await I(c,s,a,t.author)});return{id:n,action:"start_task",claim:s,update:m}})}async function I(e,t,a,r){if(!(e instanceof o)||e.code!==k||t.previous_assignee!==null)return e;const i=String(t.item.id);try{await E({pmRoot:f(process.cwd(),a.path),id:i,validate:n=>{if(n.metadata.assignee!==t.claimed_by||n.metadata.claim_principal!==t.item.claim_principal)throw new o("The claim this start took is no longer its own.",u.CONFLICT)}},()=>p(i,!1,a,{author:r,message:"Release the claim: a blocker opened before its start could be recorded"}))}catch{return e}const s=e.cause instanceof o?e.cause:e;return new o(s.message,s.exitCode,{...s.context,why:`${s.context.why??""} A blocker opened after this start's claim, so the claim was released and no ownership remains.`.trim()})}async function K(e,t,a){const r=await w(f(process.cwd(),a.path)),i=h(r.schema);_({...t,pause:!0},i);const s=await v(e,a,t.author),n=i.open_status,m=await s(()=>x(e,l(t,{status:n},["assignee","pause"]),a)),c=m.item.id,y=await d(c,"update",()=>p(c,t.force===!0,a,t));return{id:c,action:"pause_task",update:m,release:y}}async function q(e,t,a,r){const i=await g(e,t,a,r),s=i.item.id,n=await d(s,"close",()=>p(s,a.force===!0,r,a));return{id:s,action:"close_task",close:i,release:n}}export{d as finishComposition,I as releaseRefusedStartClaim,q as runCloseTask,K as runPauseTask,H as runStartTask};
|
|
2
2
|
//# sourceMappingURL=task-composition.js.map
|
|
@@ -48,4 +48,18 @@ export declare function resolveItemOwnershipConflict(pmRoot:string,itemId:string
|
|
|
48
48
|
/** Resolve the holder evidence and judge the holder's activity under the stale-work policy, from one stream read. */
|
|
49
49
|
export declare function resolveItemOwnershipActivity(pmRoot:string,itemId:string,assignee:string,options:ClaimActivityOptions):Promise<ItemOwnershipActivity>;
|
|
50
50
|
/** Describe the current ownership source for an atomic claim conflict. */
|
|
51
|
-
export declare function describeItemOwnershipConflict(pmRoot:string,itemId:string,assignee:string):Promise<string>;
|
|
51
|
+
export declare function describeItemOwnershipConflict(pmRoot:string,itemId:string,assignee:string):Promise<string>;
|
|
52
|
+
/**
|
|
53
|
+
* Whether `callerPrincipal`'s most recent claim on the item was ended by a
|
|
54
|
+
* close (GH-1774). The readable history is replayed record by record with the
|
|
55
|
+
* shared strict replay (`tryApplyReplayPatch`), so legacy paths, whole-document
|
|
56
|
+
* writes and every patch operation mean exactly what they mean to `pm history`.
|
|
57
|
+
* A record that moves the holder away from the caller ends the caller's
|
|
58
|
+
* claim, and one that makes the caller the holder again starts a new one; the
|
|
59
|
+
* claim counts as ended by a close only when the record that last ended it is
|
|
60
|
+
* a close. A release by that caller then acts only on its own ended claim, so
|
|
61
|
+
* a holder who claimed the item after the close keeps it. A stream that cannot
|
|
62
|
+
* be read or replayed proves nothing and returns false, leaving the ownership
|
|
63
|
+
* policy in force. The replay runs only for a release by a non-holder.
|
|
64
|
+
*/
|
|
65
|
+
export declare function callerClaimEndedByClose(pmRoot:string,storageId:string,callerPrincipal:string):Promise<boolean>;
|