@unbrained/pm-cli 2026.8.9 → 2026.8.10

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.
Files changed (172) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/CHANGELOG.md +40 -0
  3. package/dist/cli/commander-usage.js +17 -12
  4. package/dist/cli/help-json-payload.js +51 -16
  5. package/dist/cli/main.js +7 -6
  6. package/dist/cli-bundle/bundle-manifest.json +165 -165
  7. package/dist/cli-bundle/chunks/chunk-2QYH4QMI.js +30 -0
  8. package/dist/cli-bundle/chunks/{chunk-YC3UF2IO.js → chunk-EBO7OUUE.js} +57 -57
  9. package/dist/cli-bundle/chunks/{chunk-GMX5YOI3.js → chunk-ETML5C6H.js} +48 -48
  10. package/dist/cli-bundle/chunks/chunk-JUDU4RO4.js +194 -0
  11. package/dist/cli-bundle/chunks/{chunk-PYO5GZU6.js → chunk-JZSNADRR.js} +5 -5
  12. package/dist/cli-bundle/chunks/{chunk-EF43KODO.js → chunk-MENWVGJW.js} +2 -2
  13. package/dist/cli-bundle/chunks/{chunk-5JO6R4BS.js → chunk-S4EITGLA.js} +2 -2
  14. package/dist/cli-bundle/chunks/{chunk-2DTCZXSD.js → chunk-TIGKWVLA.js} +9 -9
  15. package/dist/cli-bundle/chunks/{chunk-RJC7TPF4.js → chunk-TRWXF476.js} +2 -2
  16. package/dist/cli-bundle/chunks/chunk-TSLDTJLQ.js +2 -0
  17. package/dist/cli-bundle/chunks/{register-list-query-BUE7PTCU.js → register-list-query-OJ6ZXKV4.js} +2 -2
  18. package/dist/cli-bundle/chunks/{register-mutation-FC3XLVIK.js → register-mutation-DKI7QC7O.js} +2 -2
  19. package/dist/cli-bundle/chunks/register-operations-P5OGMT6I.js +2 -0
  20. package/dist/cli-bundle/chunks/{register-setup-UQDTNTLJ.js → register-setup-S3KT2LTH.js} +2 -2
  21. package/dist/cli-bundle/focused-chunks/{chunk-6DO4YQWZ.js → chunk-2COZ67XT.js} +2 -2
  22. package/dist/cli-bundle/focused-chunks/chunk-2EXI2DKR.js +4 -0
  23. package/dist/cli-bundle/focused-chunks/{chunk-KNEHLPBF.js → chunk-34SX654S.js} +2 -2
  24. package/dist/cli-bundle/focused-chunks/chunk-36FTZ2NT.js +2 -0
  25. package/dist/cli-bundle/focused-chunks/chunk-3CQECMKR.js +16 -0
  26. package/dist/cli-bundle/focused-chunks/chunk-75774JWP.js +6 -0
  27. package/dist/cli-bundle/focused-chunks/{chunk-MRWVJ3ZG.js → chunk-7UN6BHHO.js} +2 -2
  28. package/dist/cli-bundle/focused-chunks/{chunk-VRXJSGIT.js → chunk-CHIBMEZR.js} +2 -2
  29. package/dist/cli-bundle/focused-chunks/chunk-DZGAHZZV.js +3 -0
  30. package/dist/cli-bundle/focused-chunks/chunk-FF4MNAYB.js +153 -0
  31. package/dist/cli-bundle/focused-chunks/{chunk-ZG54B4XG.js → chunk-GHTN2ILR.js} +2 -2
  32. package/dist/cli-bundle/focused-chunks/chunk-I4YM2I7S.js +2 -0
  33. package/dist/cli-bundle/focused-chunks/chunk-IMDTEN7K.js +2 -0
  34. package/dist/cli-bundle/focused-chunks/chunk-IW43E4XL.js +2 -0
  35. package/dist/cli-bundle/focused-chunks/{chunk-3WVHTUAW.js → chunk-JMVA4HKR.js} +2 -2
  36. package/dist/cli-bundle/focused-chunks/{chunk-C3GCHDSQ.js → chunk-KR5RVXLQ.js} +31 -31
  37. package/dist/cli-bundle/focused-chunks/chunk-KSNJG4KI.js +16 -0
  38. package/dist/cli-bundle/focused-chunks/{chunk-73FIJONU.js → chunk-M6RPIXKC.js} +2 -2
  39. package/dist/cli-bundle/focused-chunks/chunk-MXYSIQ56.js +18 -0
  40. package/dist/cli-bundle/focused-chunks/chunk-RIIN5V4N.js +2 -0
  41. package/dist/cli-bundle/focused-chunks/{chunk-U46GQJNY.js → chunk-RKWSCYYN.js} +2 -2
  42. package/dist/cli-bundle/main.js +13 -13
  43. package/dist/cli-bundle/sdk-authoring.js +1 -1
  44. package/dist/cli-bundle/sdk-contracts.js +1 -1
  45. package/dist/cli-bundle/sdk-core.js +38 -38
  46. package/dist/cli-bundle/sdk-governance.js +1 -1
  47. package/dist/cli-bundle/sdk-graph.js +1 -1
  48. package/dist/cli-bundle/sdk-merge.js +1 -1
  49. package/dist/cli-bundle/sdk-query.js +1 -1
  50. package/dist/cli-bundle/sdk-runtime.js +1 -1
  51. package/dist/cli-bundle/sdk-testing.js +1 -1
  52. package/dist/cli-bundle/sdk.js +2 -2
  53. package/dist/core/diagnostics/remediation.js +9 -9
  54. package/dist/core/fs/fs-utils.d.ts +10 -0
  55. package/dist/core/fs/fs-utils.js +16 -4
  56. package/dist/core/item/item-format.js +3 -32
  57. package/dist/core/schema/fields-file.d.ts +1 -2
  58. package/dist/core/schema/fields-file.js +4 -11
  59. package/dist/core/schema/runtime-schema.js +3 -10
  60. package/dist/core/schema/status-defs-file.d.ts +1 -2
  61. package/dist/core/schema/status-defs-file.js +4 -32
  62. package/dist/core/schema/status-token.d.ts +2 -0
  63. package/dist/core/schema/status-token.js +32 -0
  64. package/dist/core/schema/type-workflows.d.ts +1 -2
  65. package/dist/core/schema/type-workflows.js +4 -11
  66. package/dist/core/shared/author.d.ts +1 -1
  67. package/dist/core/shared/author.js +21 -8
  68. package/dist/core/shared/errors.d.ts +4 -0
  69. package/dist/core/shared/errors.js +2 -2
  70. package/dist/core/shared/text-normalization.d.ts +1 -1
  71. package/dist/core/shared/text-normalization.js +2 -2
  72. package/dist/sdk/agent/command-recovery.d.ts +4 -0
  73. package/dist/sdk/agent/command-recovery.js +52 -0
  74. package/dist/sdk/agent/command-suggestions.d.ts +4 -0
  75. package/dist/sdk/agent/command-suggestions.js +67 -0
  76. package/dist/sdk/agent/create-option-policy.d.ts +12 -0
  77. package/dist/sdk/agent/create-option-policy.js +32 -0
  78. package/dist/sdk/agent/item-addressing.d.ts +19 -0
  79. package/dist/sdk/agent/item-addressing.js +208 -0
  80. package/dist/sdk/cli-bootstrap.d.ts +1 -1
  81. package/dist/sdk/cli-bootstrap.js +20 -5
  82. package/dist/sdk/cli-contracts/commander-mutation-options.js +16 -4
  83. package/dist/sdk/cli-contracts/flag-contracts.js +62 -21
  84. package/dist/sdk/cli-contracts/registration-helpers.js +10 -2
  85. package/dist/sdk/cli-contracts/runtime-contracts.js +5 -3
  86. package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +6 -0
  87. package/dist/sdk/cli-contracts/tool-option-contracts.js +4 -2
  88. package/dist/sdk/cli-contracts/tool-parameter-tables.js +19 -4
  89. package/dist/sdk/cli-contracts/tool-schema.js +17 -4
  90. package/dist/sdk/context-intent-runtime.js +8 -5
  91. package/dist/sdk/context-signal-store.d.ts +34 -0
  92. package/dist/sdk/context-signal-store.js +24 -2
  93. package/dist/sdk/dependency-flag-validation.d.ts +15 -1
  94. package/dist/sdk/dependency-flag-validation.js +54 -2
  95. package/dist/sdk/generated-error-code-catalog.js +74 -2
  96. package/dist/sdk/governance/health.js +14 -7
  97. package/dist/sdk/governance/provenance-health.d.ts +13 -0
  98. package/dist/sdk/governance/provenance-health.js +63 -17
  99. package/dist/sdk/governance/validate-item-reader.d.ts +13 -0
  100. package/dist/sdk/governance/validate-item-reader.js +18 -0
  101. package/dist/sdk/governance/validate.d.ts +2 -2
  102. package/dist/sdk/governance/validate.js +15 -6
  103. package/dist/sdk/index.d.ts +4 -0
  104. package/dist/sdk/index.js +6 -2
  105. package/dist/sdk/lifecycle/close.js +17 -14
  106. package/dist/sdk/lifecycle/create.d.ts +2 -0
  107. package/dist/sdk/lifecycle/create.js +62 -9
  108. package/dist/sdk/lifecycle/update-many.js +39 -27
  109. package/dist/sdk/lifecycle/update.d.ts +6 -1
  110. package/dist/sdk/lifecycle/update.js +47 -10
  111. package/dist/sdk/merge/index.d.ts +1 -1
  112. package/dist/sdk/merge/index.js +3 -3
  113. package/dist/sdk/merge/install.d.ts +4 -0
  114. package/dist/sdk/merge/install.js +28 -16
  115. package/dist/sdk/merge/receipts.d.ts +3 -0
  116. package/dist/sdk/merge/receipts.js +81 -17
  117. package/dist/sdk/output-projection.js +24 -4
  118. package/dist/sdk/query/context.d.ts +2 -0
  119. package/dist/sdk/query/context.js +7 -4
  120. package/dist/sdk/query/light-metadata.d.ts +3 -0
  121. package/dist/sdk/query/light-metadata.js +19 -0
  122. package/dist/sdk/runtime.d.ts +4 -1
  123. package/dist/sdk/runtime.js +8 -3
  124. package/dist/sdk/schema-migration.js +7 -9
  125. package/dist/sdk/similarity-scoring.d.ts +1 -2
  126. package/dist/sdk/similarity-scoring.js +4 -16
  127. package/dist/sdk/workspace-snapshot.d.ts +4 -0
  128. package/dist/sdk/workspace-snapshot.js +24 -11
  129. package/docs/AGENT_GUIDE.md +3 -1
  130. package/docs/COMMANDS.md +8 -5
  131. package/docs/MERGE_SAFETY.md +7 -5
  132. package/docs/README.md +2 -5
  133. package/docs/READ_OUTPUT_CONTRACTS.md +2 -2
  134. package/docs/SDK.md +33 -8
  135. package/docs/SDK_AGENT_SESSION_CONTEXT.md +3 -2
  136. package/docs/SDK_CONTEXT.md +97 -0
  137. package/docs/SDK_CONTEXT_INTEGRITY.md +18 -3
  138. package/docs/agent-task-token-baseline.json +2 -2
  139. package/marketplace.json +2 -2
  140. package/package.json +5 -4
  141. package/packages/pm-beads/package.json +1 -1
  142. package/packages/pm-calendar/package.json +1 -1
  143. package/packages/pm-command-kit/package.json +1 -1
  144. package/packages/pm-digital-twin/package.json +1 -1
  145. package/packages/pm-governance-audit/package.json +1 -1
  146. package/packages/pm-guide-shell/package.json +1 -1
  147. package/packages/pm-kanban/package.json +1 -1
  148. package/packages/pm-lifecycle-hooks/package.json +1 -1
  149. package/packages/pm-linked-test-adapters/package.json +1 -1
  150. package/packages/pm-search-advanced/package.json +1 -1
  151. package/packages/pm-templates/package.json +1 -1
  152. package/packages/pm-todos/package.json +1 -1
  153. package/packages/pm-vcs/package.json +1 -1
  154. package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
  155. package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
  156. package/sdk/public-surface.json +194 -26
  157. package/dist/cli-bundle/chunks/chunk-5KN4DZYV.js +0 -194
  158. package/dist/cli-bundle/chunks/chunk-HUV2Z7IS.js +0 -28
  159. package/dist/cli-bundle/chunks/chunk-MHBVCUF2.js +0 -2
  160. package/dist/cli-bundle/chunks/register-operations-YH2WAOXU.js +0 -2
  161. package/dist/cli-bundle/focused-chunks/chunk-2VVP5RAA.js +0 -153
  162. package/dist/cli-bundle/focused-chunks/chunk-3GSFUDAI.js +0 -2
  163. package/dist/cli-bundle/focused-chunks/chunk-4H6MVCK3.js +0 -16
  164. package/dist/cli-bundle/focused-chunks/chunk-54TZJ4BM.js +0 -2
  165. package/dist/cli-bundle/focused-chunks/chunk-5NK5TJ5D.js +0 -2
  166. package/dist/cli-bundle/focused-chunks/chunk-JGRSQZJT.js +0 -18
  167. package/dist/cli-bundle/focused-chunks/chunk-NL57J7BZ.js +0 -4
  168. package/dist/cli-bundle/focused-chunks/chunk-P6BBIQRG.js +0 -6
  169. package/dist/cli-bundle/focused-chunks/chunk-PZAGVQNN.js +0 -3
  170. package/dist/cli-bundle/focused-chunks/chunk-QDAO3XEK.js +0 -14
  171. package/dist/cli-bundle/focused-chunks/chunk-T4IGQCSY.js +0 -2
  172. package/dist/cli-bundle/focused-chunks/chunk-XC2ZW3CJ.js +0 -2
@@ -4,9 +4,11 @@
4
4
  * Resolves configurable schema, fields, statuses, and workflows for Fields File.
5
5
  */
6
6
 
7
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="79b35844-ab8e-5b6f-9975-4dd85b210bcb")}catch(e){}}();
7
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="575b0c3a-9ce1-504f-a24e-d8854e898f17")}catch(e){}}();
8
8
  import { RUNTIME_FIELD_COMMAND_VALUES, RUNTIME_FIELD_TYPE_VALUES, } from "../../types/index.js";
9
9
  import { ITEM_METADATA_KEY_ORDER } from "../shared/constants.js";
10
+ import { normalizeStatusToken as normalizeFieldKey } from "./status-token.js";
11
+ export { normalizeStatusToken as normalizeFieldKey } from "./status-token.js";
10
12
  /**
11
13
  * Pure logic for the `pm schema add-field` / `pm schema remove-field` commands
12
14
  * and the `list-fields` / `show-field` inspectors. The CLI command file
@@ -52,15 +54,6 @@ export const BUILTIN_FIELD_KEYS = new Set([
52
54
  ]);
53
55
  /** The default commands a field is wired onto when `--commands` is omitted, matching the runtime default in runtime-schema.ts (normalizeRuntimeFieldDefinition). */
54
56
  const DEFAULT_FIELD_COMMANDS = ["create", "update"];
55
- /** Normalizes a field key using the same rule as runtime-schema.ts: lowercase and collapse any run of whitespace/hyphens into a single underscore. */
56
- export function normalizeFieldKey(value) {
57
- return typeof value === "string"
58
- ? value
59
- .trim()
60
- .toLowerCase()
61
- .replaceAll(/[\s-]+/g, "_")
62
- : "";
63
- }
64
57
  /** Normalizes a CLI flag token: strip a leading `--`, lowercase, and collapse whitespace/underscore runs to a single hyphen (matches normalizeCliToken in runtime-schema.ts). */
65
58
  function normalizeCliToken(value) {
66
59
  if (typeof value !== "string") {
@@ -293,4 +286,4 @@ function applyBooleanFlag(definition, key, value) {
293
286
  }
294
287
  }
295
288
  //# sourceMappingURL=fields-file.js.map
296
- //# debugId=79b35844-ab8e-5b6f-9975-4dd85b210bcb
289
+ //# debugId=575b0c3a-9ce1-504f-a24e-d8854e898f17
@@ -4,11 +4,12 @@
4
4
  * Resolves configurable schema, fields, statuses, and workflows for Runtime Schema.
5
5
  */
6
6
 
7
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="febba42b-dfd0-549a-a6d9-c30edb321d9d")}catch(e){}}();
7
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a9ff482a-f9f9-5e35-88d0-240db815ec08")}catch(e){}}();
8
8
  import path from "node:path";
9
9
  import { pathExists, readFileIfExists, writeFileAtomic, } from "../fs/fs-utils.js";
10
10
  import { DEFAULT_STATUS_DEFINITIONS, DEFAULT_WORKFLOW_DEFINITION, } from "../shared/constants.js";
11
11
  import { RUNTIME_FIELD_COMMAND_VALUES, RUNTIME_FIELD_TYPE_VALUES, RUNTIME_STATUS_ROLE_VALUES, RUNTIME_UNKNOWN_FIELD_POLICY_VALUES, STATUS_VALUES, } from "../../types/index.js";
12
+ import { normalizeStatusToken } from "./status-token.js";
12
13
  /** Fallback runtime schema file paths used when callers do not provide an override. */
13
14
  export const DEFAULT_RUNTIME_SCHEMA_FILE_PATHS = Object.freeze({
14
15
  types: "schema/types.json",
@@ -39,14 +40,6 @@ function normalizeStringList(values) {
39
40
  .filter((value) => value.length > 0)),
40
41
  ].sort((left, right) => left.localeCompare(right));
41
42
  }
42
- function normalizeStatusToken(value) {
43
- return typeof value === "string"
44
- ? value
45
- .trim()
46
- .toLowerCase()
47
- .replaceAll(/[\s-]+/g, "_")
48
- : "";
49
- }
50
43
  function normalizeStatusId(value) {
51
44
  if (typeof value !== "string" || value.length === 0) {
52
45
  return undefined;
@@ -698,4 +691,4 @@ export function statusIsTerminal(status, registry) {
698
691
  return registry.terminal_statuses.has(normalized);
699
692
  }
700
693
  //# sourceMappingURL=runtime-schema.js.map
701
- //# debugId=febba42b-dfd0-549a-a6d9-c30edb321d9d
694
+ //# debugId=a9ff482a-f9f9-5e35-88d0-240db815ec08
@@ -1,4 +1,5 @@
1
1
  import type { RuntimeStatusDefinition, RuntimeStatusRole } from "../../types/index.js";
2
+ export { normalizeStatusToken } from "./status-token.js";
2
3
  export type { RuntimeStatusDefinition, RuntimeStatusRole, } from "../../types/index.js";
3
4
  /** The 5 lifecycle status ids that ship as built-in defaults and may never be removed (their normalized ids match DEFAULT_RUNTIME_STATUS_DEFINITIONS: open/in_progress/blocked/closed/canceled). `draft` is also a default but the acceptance criteria enumerate the 5 terminal/active ids explicitly, so the guard derives the full set from the canonical defaults to stay in sync. */
4
5
  export declare const BUILTIN_STATUS_IDS: ReadonlySet<string>;
@@ -51,8 +52,6 @@ export interface RemoveStatusDefResult {
51
52
  /** The removed definition, when one matched the requested id. */
52
53
  definition?: RuntimeStatusDefinition;
53
54
  }
54
- /** Normalizes a status token using the same rules as runtime-schema.ts: lowercase and collapse any run of whitespace/hyphens into a single underscore. */
55
- export declare function normalizeStatusToken(value: unknown): string;
56
55
  /**
57
56
  * Validates and normalizes raw add-status CLI input. Throws a plain Error with a
58
57
  * stable message when the id is missing/empty or a role is not one of
@@ -4,10 +4,11 @@
4
4
  * Resolves configurable schema, fields, statuses, and workflows for Status Defs File.
5
5
  */
6
6
 
7
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="f81297bd-06ac-5aa4-9e1b-802fb50c9cd0")}catch(e){}}();
7
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3eac0218-43c9-5bd2-8eaf-589d02d2c8ad")}catch(e){}}();
8
8
  import { RUNTIME_STATUS_ROLE_VALUES } from "../../types/index.js";
9
9
  import { DEFAULT_RUNTIME_STATUS_DEFINITIONS } from "./runtime-schema.js";
10
- import { evictOldestMemoEntries } from "../shared/memo.js";
10
+ import { normalizeStatusToken } from "./status-token.js";
11
+ export { normalizeStatusToken } from "./status-token.js";
11
12
  /**
12
13
  * Pure logic for the `pm schema add-status` / `pm schema remove-status`
13
14
  * commands. The CLI command file (schema.ts) owns IO/governance; everything
@@ -20,37 +21,8 @@ import { evictOldestMemoEntries } from "../shared/memo.js";
20
21
  * into the persisted file.
21
22
  */
22
23
  const RUNTIME_STATUS_ROLE_SET = new Set(RUNTIME_STATUS_ROLE_VALUES);
23
- /**
24
- * Memo for {@link normalizeStatusToken}. Status ranking inside sort comparators
25
- * normalizes the same handful of status strings O(n log n) times per corpus scan, and
26
- * the trim/lowercase/regex pipeline shows up in list/next/context profiles. The cap
27
- * bounds memory in long-lived hosts against unbounded arbitrary inputs; half-eviction keeps the
28
- * newest-inserted half when the cap is hit. Declared before
29
- * BUILTIN_STATUS_IDS, whose module-level initializer already normalizes tokens.
30
- */
31
- const STATUS_TOKEN_MEMO_MAX_ENTRIES = 2_000;
32
- const statusTokenMemo = new Map();
33
24
  /** The 5 lifecycle status ids that ship as built-in defaults and may never be removed (their normalized ids match DEFAULT_RUNTIME_STATUS_DEFINITIONS: open/in_progress/blocked/closed/canceled). `draft` is also a default but the acceptance criteria enumerate the 5 terminal/active ids explicitly, so the guard derives the full set from the canonical defaults to stay in sync. */
34
25
  export const BUILTIN_STATUS_IDS = new Set(DEFAULT_RUNTIME_STATUS_DEFINITIONS.map((definition) => normalizeStatusToken(definition.id)).filter((id) => id.length > 0));
35
- /** Normalizes a status token using the same rules as runtime-schema.ts: lowercase and collapse any run of whitespace/hyphens into a single underscore. */
36
- export function normalizeStatusToken(value) {
37
- if (typeof value !== "string") {
38
- return "";
39
- }
40
- const memoized = statusTokenMemo.get(value);
41
- if (memoized !== undefined) {
42
- return memoized;
43
- }
44
- const normalized = value
45
- .trim()
46
- .toLowerCase()
47
- .replaceAll(/[\s-]+/g, "_");
48
- if (statusTokenMemo.size >= STATUS_TOKEN_MEMO_MAX_ENTRIES) {
49
- evictOldestMemoEntries(statusTokenMemo);
50
- }
51
- statusTokenMemo.set(value, normalized);
52
- return normalized;
53
- }
54
26
  function dedupeTokens(values) {
55
27
  const seen = new Set();
56
28
  for (const value of values) {
@@ -250,4 +222,4 @@ export function assertStatusTokensAvailable(input, resolvedAliasToId) {
250
222
  }
251
223
  }
252
224
  //# sourceMappingURL=status-defs-file.js.map
253
- //# debugId=f81297bd-06ac-5aa4-9e1b-802fb50c9cd0
225
+ //# debugId=3eac0218-43c9-5bd2-8eaf-589d02d2c8ad
@@ -0,0 +1,2 @@
1
+ /** Lowercase a status token and collapse whitespace or hyphen runs to one underscore. */
2
+ export declare function normalizeStatusToken(value: unknown): string;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @module core/schema/status-token
3
+ *
4
+ * Owns the canonical bounded status-token normalization primitive used by
5
+ * schema files, runtime registries, workflows, and package-facing SDK helpers.
6
+ */
7
+
8
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d6056922-237d-525a-b354-687493a4e123")}catch(e){}}();
9
+ import { evictOldestMemoEntries } from "../shared/memo.js";
10
+ const STATUS_TOKEN_MEMO_MAX_ENTRIES = 2_000;
11
+ const statusTokenMemo = new Map();
12
+ /** Lowercase a status token and collapse whitespace or hyphen runs to one underscore. */
13
+ export function normalizeStatusToken(value) {
14
+ if (typeof value !== "string") {
15
+ return "";
16
+ }
17
+ const memoized = statusTokenMemo.get(value);
18
+ if (memoized !== undefined) {
19
+ return memoized;
20
+ }
21
+ const normalized = value
22
+ .trim()
23
+ .toLowerCase()
24
+ .replaceAll(/[\s-]+/g, "_");
25
+ if (statusTokenMemo.size >= STATUS_TOKEN_MEMO_MAX_ENTRIES) {
26
+ evictOldestMemoEntries(statusTokenMemo);
27
+ }
28
+ statusTokenMemo.set(value, normalized);
29
+ return normalized;
30
+ }
31
+ //# sourceMappingURL=status-token.js.map
32
+ //# debugId=d6056922-237d-525a-b354-687493a4e123
@@ -4,6 +4,7 @@
4
4
  * Resolves configurable schema, fields, statuses, and workflows for Type Workflows.
5
5
  */
6
6
  import type { RuntimeSchemaSettings } from "../../types/index.js";
7
+ export { normalizeStatusToken } from "./status-token.js";
7
8
  /**
8
9
  * Per-type allowed-transition support (governance.workflow_enforcement).
9
10
  *
@@ -51,8 +52,6 @@ export interface EvaluateTransitionResult {
51
52
  /** Allowed [from, to] pairs for the matched type (normalized ids). Empty when the type is unrestricted. */
52
53
  allowedTransitions: [string, string][];
53
54
  }
54
- /** Normalize a status token the same way runtime-schema statuses are normalized. */
55
- export declare function normalizeStatusToken(value: unknown): string;
56
55
  /**
57
56
  * Normalize the raw type_workflows from a runtime schema into a deduped,
58
57
  * lower-cased-type list with normalized status tokens.
@@ -1,14 +1,7 @@
1
- /** Normalize a status token the same way runtime-schema statuses are normalized. */
2
1
 
3
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8370105a-2103-5425-8dd8-b621107f3bd8")}catch(e){}}();
4
- export function normalizeStatusToken(value) {
5
- return typeof value === "string"
6
- ? value
7
- .trim()
8
- .toLowerCase()
9
- .replaceAll(/[\s-]+/g, "_")
10
- : "";
11
- }
2
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c4e316a0-823d-5722-9e15-6d741ae44f1b")}catch(e){}}();
3
+ import { normalizeStatusToken } from "./status-token.js";
4
+ export { normalizeStatusToken } from "./status-token.js";
12
5
  function normalizeTypeName(value) {
13
6
  return typeof value === "string" ? value.trim().toLowerCase() : "";
14
7
  }
@@ -109,4 +102,4 @@ export function describeAllowedTransitions(allowedTransitions) {
109
102
  .join(", ");
110
103
  }
111
104
  //# sourceMappingURL=type-workflows.js.map
112
- //# debugId=8370105a-2103-5425-8dd8-b621107f3bd8
105
+ //# debugId=c4e316a0-823d-5722-9e15-6d741ae44f1b
@@ -24,7 +24,7 @@ export type AgentProvenanceAbsenceReason = "harness_unavailable" | "resolver_fai
24
24
  /** Machine-readable resolution outcome for one provenance dimension. */
25
25
  export interface AgentProvenanceOutcome {
26
26
  /** Whether the dimension resolved without retaining private source material. */
27
- status: "resolved" | "unavailable" | "failed";
27
+ status: "resolved" | "unavailable" | "not_configured" | "failed";
28
28
  /** Stable bounded reason for absent or rejected values. */
29
29
  reason?: AgentProvenanceAbsenceReason;
30
30
  /** Resolver name when a bounded local resolver was attempted. */
@@ -4,7 +4,7 @@
4
4
  * Provides shared primitives and utilities for Author.
5
5
  */
6
6
 
7
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a89b5501-1909-5ea8-b34b-8ca9b4bc5dd5")}catch(e){}}();
7
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6c075a14-1a65-59c7-a9c6-af348e30f821")}catch(e){}}();
8
8
  import { AsyncLocalStorage } from "node:async_hooks";
9
9
  import { createHash } from "node:crypto";
10
10
  import fs from "node:fs";
@@ -241,7 +241,10 @@ const AGENT_ROLE_VALUES = new Set([
241
241
  function normalizeProvenanceValue(dimension, value) {
242
242
  if (dimension !== "role" || value === undefined)
243
243
  return value;
244
- const normalized = value.trim().toLowerCase().replaceAll(/[_\s]+/gu, "-");
244
+ const normalized = value
245
+ .trim()
246
+ .toLowerCase()
247
+ .replaceAll(/[_\s]+/gu, "-");
245
248
  return AGENT_ROLE_VALUES.has(normalized) ? normalized : undefined;
246
249
  }
247
250
  function boundedProvenanceValue(provenance, dimension) {
@@ -310,13 +313,23 @@ function resolveProvenanceProbe(dimension, signals, env, descriptor) {
310
313
  }
311
314
  if (resolver === "ai_agent_version") {
312
315
  const value = nonBlank(env.AI_AGENT);
313
- if (!value)
316
+ if (!value ||
317
+ !descriptor ||
318
+ !literalSignalMatches(value, descriptor.harness)) {
314
319
  return undefined;
320
+ }
315
321
  const match = /(?:^|[@/\s])v?(\d+\.\d+(?:\.\d+)?(?:[-+][A-Za-z0-9.-]+)?)$/u.exec(value);
316
322
  return match?.[1]?.slice(0, 256);
317
323
  }
318
324
  return undefined;
319
325
  }
326
+ function provenanceResolverHasInput(resolver, descriptor, env) {
327
+ if (resolver === "ai_agent_version") {
328
+ const value = nonBlank(env.AI_AGENT);
329
+ return (value !== undefined && literalSignalMatches(value, descriptor.harness));
330
+ }
331
+ return nonBlank(env.CLAUDE_CODE_SESSION_ID) !== undefined;
332
+ }
320
333
  function effectiveHarnessDetectionSignals(signals) {
321
334
  if (signals)
322
335
  return signals;
@@ -522,9 +535,7 @@ function resolveProvenanceOutcome(dimension, identity, descriptor, env, probesEn
522
535
  };
523
536
  }
524
537
  if (resolver) {
525
- const resolverHasInput = resolver === "ai_agent_version"
526
- ? nonBlank(env.AI_AGENT) !== undefined
527
- : nonBlank(env.CLAUDE_CODE_SESSION_ID) !== undefined;
538
+ const resolverHasInput = provenanceResolverHasInput(resolver, descriptor, env);
528
539
  const status = resolverHasInput && probesEnabled ? "failed" : "unavailable";
529
540
  const reason = !resolverHasInput
530
541
  ? "harness_unavailable"
@@ -534,7 +545,9 @@ function resolveProvenanceOutcome(dimension, identity, descriptor, env, probesEn
534
545
  return { status, reason, resolver, rule_version: "v1" };
535
546
  }
536
547
  return {
537
- status: "unavailable",
548
+ status: descriptor?.provenance_unavailable_dimensions.includes(dimension)
549
+ ? "unavailable"
550
+ : "not_configured",
538
551
  reason: descriptor?.provenance_unavailable_dimensions.includes(dimension)
539
552
  ? "harness_unavailable"
540
553
  : "resolver_not_configured",
@@ -680,4 +693,4 @@ export function resolveAuthor(candidate, fallback) {
680
693
  return identity.author;
681
694
  }
682
695
  //# sourceMappingURL=author.js.map
683
- //# debugId=a89b5501-1909-5ea8-b34b-8ca9b4bc5dd5
696
+ //# debugId=6c075a14-1a65-59c7-a9c6-af348e30f821
@@ -60,6 +60,10 @@ export interface PmCliErrorContext {
60
60
  examples?: string[];
61
61
  /** Value that configures or reports next steps for this contract. */
62
62
  nextSteps?: string[];
63
+ /** Exact selectors that could not be matched by a lossless removal. */
64
+ unmatched?: string[];
65
+ /** Local dependency targets that could not be resolved before mutation. */
66
+ unresolved_targets?: string[];
63
67
  /** Available history bounds for a failed point-in-time read or restore target. */
64
68
  valid_range?: {
65
69
  /** Earliest available one-based version, or null for an empty stream. */
@@ -1,6 +1,6 @@
1
1
  /** Implements the exported pm cli error runtime abstraction for core/shared/errors.ts. */
2
2
 
3
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="c2c9251e-86bf-5a92-acdb-581e59d269d8")}catch(e){}}();
3
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="31191ce6-fb17-5b76-aa3d-3c3773cd85e0")}catch(e){}}();
4
4
  export class PmCliError extends Error {
5
5
  /** Value that configures or reports exit code for this contract. */
6
6
  exitCode;
@@ -18,4 +18,4 @@ export class PmCliError extends Error {
18
18
  }
19
19
  }
20
20
  //# sourceMappingURL=errors.js.map
21
- //# debugId=c2c9251e-86bf-5a92-acdb-581e59d269d8
21
+ //# debugId=31191ce6-fb17-5b76-aa3d-3c3773cd85e0
@@ -8,4 +8,4 @@ export declare function normalizeLowercaseWhitespace(value: string): string;
8
8
  /** Implements tokenize alpha numeric for the public runtime surface of this module. */
9
9
  export declare function tokenizeAlphaNumeric(value: string): string[];
10
10
  /** Implements jaccard similarity for the public runtime surface of this module. */
11
- export declare function jaccardSimilarity(leftTokens: string[], rightTokens: string[]): number;
11
+ export declare function jaccardSimilarity(leftTokens: readonly string[], rightTokens: readonly string[]): number;
@@ -5,7 +5,7 @@
5
5
  */
6
6
  /** Normalizes text to lowercase whitespace-collapsed form for stable matching and comparison. */
7
7
 
8
- !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="7288620a-5aa7-50f9-a271-45b2722a4887")}catch(e){}}();
8
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3ad30a32-0f83-5473-b0a3-349e271d8378")}catch(e){}}();
9
9
  export function normalizeLowercaseWhitespace(value) {
10
10
  return value.trim().toLowerCase().replace(/\s+/g, " ");
11
11
  }
@@ -36,4 +36,4 @@ export function jaccardSimilarity(leftTokens, rightTokens) {
36
36
  return intersection / union;
37
37
  }
38
38
  //# sourceMappingURL=text-normalization.js.map
39
- //# debugId=7288620a-5aa7-50f9-a271-45b2722a4887
39
+ //# debugId=3ad30a32-0f83-5473-b0a3-349e271d8378
@@ -0,0 +1,4 @@
1
+ /** Resolve the truthful placeholder for a missing flag from its contract. */
2
+ export declare function resolveMissingOptionPlaceholder(commandName: string, missingLabel: string): string | null | undefined;
3
+ /** Preserve an attempted argv vector and insert each missing option before `--`. */
4
+ export declare function renderMissingOptionRetry(invocationArgv: string[], commandName: string, missingLabels: string[]): string | undefined;
@@ -0,0 +1,52 @@
1
+ /**
2
+ * @module sdk/command-recovery
3
+ *
4
+ * Builds executable recovery commands from tokenized argv and declared CLI
5
+ * flag domains. Display labels are normalized back to real flag tokens and
6
+ * supplied arguments are preserved byte-for-token.
7
+ */
8
+
9
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ab87f46c-c9b4-51d1-a712-fbce7c79fca9")}catch(e){}}();
10
+ import { renderPmCommand } from "../command-line.js";
11
+ import { resolveSubcommandFlagContractsForCommand } from "../cli-contracts.js";
12
+ function normalizeMissingFlag(label) {
13
+ const match = label.trim().match(/--[a-z0-9][a-z0-9_-]*/i);
14
+ return match?.[0]?.replaceAll("_", "-").toLowerCase();
15
+ }
16
+ /** Resolve the truthful placeholder for a missing flag from its contract. */
17
+ export function resolveMissingOptionPlaceholder(commandName, missingLabel) {
18
+ const flag = normalizeMissingFlag(missingLabel);
19
+ if (!flag)
20
+ return undefined;
21
+ const contract = resolveSubcommandFlagContractsForCommand(commandName).find((entry) => entry.flag === flag || entry.aliases?.includes(flag));
22
+ if (!contract)
23
+ return "<value>";
24
+ if (contract.value_type === "boolean") {
25
+ return null;
26
+ }
27
+ return `<${contract.value_name ?? "value"}>`;
28
+ }
29
+ /** Preserve an attempted argv vector and insert each missing option before `--`. */
30
+ export function renderMissingOptionRetry(invocationArgv, commandName, missingLabels) {
31
+ const retry = [...invocationArgv];
32
+ const terminatorIndex = retry.indexOf("--");
33
+ let insertionIndex = terminatorIndex < 0 ? retry.length : terminatorIndex;
34
+ for (const label of missingLabels) {
35
+ const flag = normalizeMissingFlag(label);
36
+ if (!flag ||
37
+ retry
38
+ .slice(0, insertionIndex)
39
+ .some((token) => token === flag || token.startsWith(`${flag}=`))) {
40
+ continue;
41
+ }
42
+ const placeholder = resolveMissingOptionPlaceholder(commandName, flag);
43
+ const recoveredOption = placeholder ? [flag, placeholder] : [flag];
44
+ retry.splice(insertionIndex, 0, ...recoveredOption);
45
+ insertionIndex += recoveredOption.length;
46
+ }
47
+ return retry.length === invocationArgv.length
48
+ ? undefined
49
+ : renderPmCommand(retry);
50
+ }
51
+ //# sourceMappingURL=command-recovery.js.map
52
+ //# debugId=ab87f46c-c9b4-51d1-a712-fbce7c79fca9
@@ -0,0 +1,4 @@
1
+ /** Score one command path for a guessed command token; lower is better. */
2
+ export declare function scoreCommandPathMatch(commandPath: string, queryToken: string): number;
3
+ /** Rank available command paths for one guessed token. */
4
+ export declare function rankCommandPaths(commandPaths: string[], queryToken: string): string[];
@@ -0,0 +1,67 @@
1
+ /**
2
+ * @module sdk/command-suggestions
3
+ *
4
+ * Provides deterministic, agent-oriented command suggestion ranking. Semantic
5
+ * verb aliases rank first, bounded edit distance second, and substring matches
6
+ * last so `log` never prefers `catalog` over item history commands.
7
+ */
8
+
9
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="71e5a870-f62f-5252-b4e9-e1a42e36009f")}catch(e){}}();
10
+ import { levenshteinDistanceWithinLimit } from "../../core/shared/levenshtein.js";
11
+ const COMMAND_SYNONYMS = {
12
+ add: ["create", "append"],
13
+ fetch: ["get"],
14
+ inspect: ["get", "health"],
15
+ log: ["history", "comments", "notes"],
16
+ ls: ["list"],
17
+ pause: ["release"],
18
+ read: ["get"],
19
+ remove: ["delete"],
20
+ rm: ["delete"],
21
+ show: ["get"],
22
+ };
23
+ /** Score one command path for a guessed command token; lower is better. */
24
+ export function scoreCommandPathMatch(commandPath, queryToken) {
25
+ const normalizedPath = commandPath.trim().toLowerCase();
26
+ const normalizedToken = queryToken.trim().toLowerCase();
27
+ if (normalizedToken.length === 0)
28
+ return Number.POSITIVE_INFINITY;
29
+ const segments = normalizedPath.split(" ");
30
+ const semanticIndex = COMMAND_SYNONYMS[normalizedToken]?.indexOf(normalizedPath);
31
+ if (semanticIndex !== undefined && semanticIndex >= 0)
32
+ return semanticIndex;
33
+ if (normalizedPath === normalizedToken)
34
+ return 10;
35
+ if (segments.includes(normalizedToken))
36
+ return 11;
37
+ if (segments.some((segment) => segment.startsWith(normalizedToken)))
38
+ return 12;
39
+ const maxDistance = normalizedToken.length >= 5 ? 2 : 1;
40
+ let bestDistance = Number.POSITIVE_INFINITY;
41
+ for (const segment of segments) {
42
+ const distance = levenshteinDistanceWithinLimit(segment, normalizedToken, maxDistance);
43
+ if (distance !== null)
44
+ bestDistance = Math.min(bestDistance, distance);
45
+ }
46
+ if (Number.isFinite(bestDistance))
47
+ return 20 + bestDistance;
48
+ if (normalizedPath.includes(normalizedToken))
49
+ return 30;
50
+ return Number.POSITIVE_INFINITY;
51
+ }
52
+ /** Rank available command paths for one guessed token. */
53
+ export function rankCommandPaths(commandPaths, queryToken) {
54
+ return commandPaths
55
+ .map((path) => ({ path, score: scoreCommandPathMatch(path, queryToken) }))
56
+ .filter((entry) => Number.isFinite(entry.score))
57
+ .sort((left, right) => {
58
+ if (left.score !== right.score)
59
+ return left.score - right.score;
60
+ if (left.path === right.path)
61
+ return 0;
62
+ return left.path < right.path ? -1 : 1;
63
+ })
64
+ .map((entry) => entry.path);
65
+ }
66
+ //# sourceMappingURL=command-suggestions.js.map
67
+ //# debugId=71e5a870-f62f-5252-b4e9-e1a42e36009f
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @module sdk/create-option-policy
3
+ *
4
+ * Defines explicit-empty assertions for repeatable create options. A strict
5
+ * schema can require that an agent considers a collection without forcing it
6
+ * to invent an entry: the corresponding `--clear-*` flag is an auditable,
7
+ * truthful answer that the collection is intentionally empty.
8
+ */
9
+ /** Return the explicit-empty flag for a repeatable create option. */
10
+ export declare function resolveCreateExplicitEmptyFlag(optionKey: string): string | undefined;
11
+ /** Return whether a create option can be satisfied by an explicit empty set. */
12
+ export declare function supportsCreateExplicitEmpty(optionKey: string): boolean;
@@ -0,0 +1,32 @@
1
+ /**
2
+ * @module sdk/create-option-policy
3
+ *
4
+ * Defines explicit-empty assertions for repeatable create options. A strict
5
+ * schema can require that an agent considers a collection without forcing it
6
+ * to invent an entry: the corresponding `--clear-*` flag is an auditable,
7
+ * truthful answer that the collection is intentionally empty.
8
+ */
9
+
10
+ !function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="002f45a2-edc3-5aa0-9af8-d9b1dfecc097")}catch(e){}}();
11
+ const CREATE_REPEATABLE_CLEAR_FLAGS = {
12
+ comment: "--clear-comments",
13
+ dep: "--clear-deps",
14
+ doc: "--clear-docs",
15
+ event: "--clear-events",
16
+ file: "--clear-files",
17
+ learning: "--clear-learnings",
18
+ note: "--clear-notes",
19
+ reminder: "--clear-reminders",
20
+ test: "--clear-tests",
21
+ typeOption: "--clear-type-options",
22
+ };
23
+ /** Return the explicit-empty flag for a repeatable create option. */
24
+ export function resolveCreateExplicitEmptyFlag(optionKey) {
25
+ return CREATE_REPEATABLE_CLEAR_FLAGS[optionKey];
26
+ }
27
+ /** Return whether a create option can be satisfied by an explicit empty set. */
28
+ export function supportsCreateExplicitEmpty(optionKey) {
29
+ return resolveCreateExplicitEmptyFlag(optionKey) !== undefined;
30
+ }
31
+ //# sourceMappingURL=create-option-policy.js.map
32
+ //# debugId=002f45a2-edc3-5aa0-9af8-d9b1dfecc097
@@ -0,0 +1,19 @@
1
+ /** Result of normalizing one item-addressed invocation. */
2
+ export interface ItemAddressInvocationResult {
3
+ /** Canonical argv with an `--id` value moved into positional-id location. */
4
+ argv: string[];
5
+ /** Whether argv changed. */
6
+ changed: boolean;
7
+ /** Whether both positional and named item ids were supplied. */
8
+ conflict: boolean;
9
+ /** Resolved named item id when one was present. */
10
+ itemId?: string;
11
+ }
12
+ /** Return whether a command participates in the shared item-id alias contract. */
13
+ export declare function supportsItemIdAlias(commandName: string | undefined): boolean;
14
+ /**
15
+ * Normalize `pm <command> --id <value>` to the command's positional id form.
16
+ * The transformation is lossless for every other argument and reports a
17
+ * conflict instead of guessing when both forms are present.
18
+ */
19
+ export declare function normalizeItemAddressInvocation(argv: string[]): ItemAddressInvocationResult;