@unbrained/pm-cli 2026.8.18 → 2026.8.19
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 +2 -2
- package/CHANGELOG.md +16 -2
- package/dist/cli/error-guidance.js +3 -2
- package/dist/cli/help-content.js +32 -13
- package/dist/cli/help-json-payload.d.ts +15 -0
- package/dist/cli/help-json-payload.js +101 -23
- package/dist/cli/main.js +6 -2
- package/dist/cli/register-list-query.js +8 -5
- package/dist/cli/register-mutation.js +8 -8
- package/dist/cli/register-operations.js +6 -6
- package/dist/cli-bundle/bundle-manifest.json +139 -139
- package/dist/cli-bundle/chunks/chunk-4NRRH7AM.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-UYCLQVL2.js → chunk-4THEB6PD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BSK2IN3C.js → chunk-BHYMXLAE.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-GWMXAQOD.js +197 -0
- package/dist/cli-bundle/chunks/chunk-HVFQTLYM.js +35 -0
- package/dist/cli-bundle/chunks/chunk-OI4XI562.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-YRGOLZA7.js → chunk-OIOKV6NO.js} +3 -3
- package/dist/cli-bundle/chunks/{chunk-5UZZAJKR.js → chunk-QXSH7BLM.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RZQTVMRQ.js → chunk-TOXJM4WA.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GNFAFIJI.js → chunk-YBMRWW4E.js} +44 -44
- package/dist/cli-bundle/chunks/{register-list-query-I23LALEE.js → register-list-query-Y56KINDU.js} +11 -11
- package/dist/cli-bundle/chunks/register-mutation-AUWVCW4M.js +20 -0
- package/dist/cli-bundle/chunks/register-operations-PZQPHXW5.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-PPPEF3SN.js → register-setup-I4LUHGVW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-5AF3ZBNB.js → chunk-34QBIYZI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-V5XTGLK7.js → chunk-BJRYFVSH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-DKPLYW3L.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ODOVCP45.js → chunk-EF6ZS5GH.js} +44 -44
- package/dist/cli-bundle/focused-chunks/{chunk-EX6MKP2X.js → chunk-ESISGDAY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-EUEGXZ2A.js → chunk-EXBCLIBU.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-UI6AJ5TD.js → chunk-JDOMQ7VQ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-L623ZPNK.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-MCZXYZAF.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-ODHQEECS.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-3TKWMNKF.js → chunk-PRHY2IMX.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-RZU5U6Q7.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-M62NO7EI.js → chunk-US7VEYZG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-TN4AE665.js → chunk-VXDSU5MC.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-YBMGXBFV.js +16 -0
- package/dist/cli-bundle/focused-chunks/chunk-YLVBJ6GF.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-K43KKAFS.js → chunk-ZBIQQYMI.js} +2 -2
- package/dist/cli-bundle/main.js +13 -13
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +2 -1
- package/dist/cli-bundle/sdk-core.js +31 -31
- 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 +32 -32
- 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 +5 -4
- package/dist/core/shared/errors.d.ts +2 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/sdk/agent/refusal-closure.d.ts +41 -0
- package/dist/sdk/agent/refusal-closure.js +92 -0
- package/dist/sdk/agent/refusal-reachability.d.ts +1 -1
- package/dist/sdk/agent-capability-contracts.d.ts +13 -0
- package/dist/sdk/agent-capability-contracts.js +104 -7
- package/dist/sdk/cli-contracts/command-aliases.js +18 -2
- package/dist/sdk/cli-contracts/commander-mutation-options.js +30 -6
- package/dist/sdk/cli-contracts/commander-types.js +5 -4
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +5 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +75 -8
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.d.ts +55 -0
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +240 -0
- package/dist/sdk/cli-contracts/grammar-contracts.d.ts +81 -0
- package/dist/sdk/cli-contracts/grammar-contracts.js +615 -2
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +15 -4
- package/dist/sdk/cli-contracts/runtime-contracts.js +42 -12
- package/dist/sdk/cli-contracts/tool-option-contracts.d.ts +28 -1
- package/dist/sdk/cli-contracts/tool-option-contracts.js +38 -3
- package/dist/sdk/cli-contracts.d.ts +3 -2
- package/dist/sdk/cli-contracts.js +5 -4
- package/dist/sdk/context-intent-contracts.d.ts +2 -2
- package/dist/sdk/context-intent-contracts.js +22 -7
- package/dist/sdk/contracts.d.ts +2 -0
- package/dist/sdk/contracts.js +4 -2
- package/dist/sdk/flag-invocation-contracts.d.ts +37 -0
- package/dist/sdk/flag-invocation-contracts.js +218 -9
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +134 -2
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +154 -22
- package/dist/sdk/index.d.ts +7 -5
- package/dist/sdk/index.js +7 -5
- package/dist/sdk/output-projection.d.ts +2 -0
- package/dist/sdk/output-projection.js +11 -5
- package/dist/sdk/query/get.js +25 -6
- package/dist/sdk/query/list.js +16 -2
- package/dist/sdk/query/search-contracts.d.ts +1 -1
- package/dist/sdk/query/search-contracts.js +23 -9
- package/dist/sdk/query/search.js +3 -3
- package/dist/sdk/read-output/continuation.d.ts +1 -1
- package/dist/sdk/read-output/continuation.js +7 -24
- package/dist/sdk/read-output-contracts.js +55 -6
- package/dist/sdk/read-output-rows.d.ts +4 -0
- package/dist/sdk/read-output-rows.js +47 -18
- package/dist/sdk/runtime.js +9 -5
- package/dist/sdk/workspace-snapshot.d.ts +2 -0
- package/dist/sdk/workspace-snapshot.js +10 -2
- package/docs/COMMANDS.md +16 -4
- package/docs/OUTPUT_PROJECTION_CONTRACTS.md +11 -2
- package/docs/READ_OUTPUT_CONTRACTS.md +10 -6
- package/docs/SDK.md +6 -0
- package/docs/TESTING.md +14 -1
- package/docs/generated/AGENT_COMMAND_SURFACE.md +78 -78
- package/docs/generated/FLAG_LEXICON_BUDGETS.md +76 -0
- package/marketplace.json +2 -2
- package/package.json +5 -3
- 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-codex/.codex-plugin/plugin.json +1 -1
- package/scripts/generate-agent-capability-surfaces.mjs +20 -14
- package/sdk/public-surface.json +576 -12
- package/dist/cli-bundle/chunks/chunk-ALDJGKAK.js +0 -2
- package/dist/cli-bundle/chunks/chunk-DY4DMUMC.js +0 -197
- package/dist/cli-bundle/chunks/chunk-L5Q2CLPE.js +0 -35
- package/dist/cli-bundle/chunks/chunk-PVRUN5ZS.js +0 -5
- package/dist/cli-bundle/chunks/register-mutation-6YGU3GPH.js +0 -20
- package/dist/cli-bundle/chunks/register-operations-4HTFC6J7.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2PN4TJXH.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-C5IW2NDA.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-RNDNMARJ.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-TVV2DONO.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-WGHQVU6P.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-XYNBXTDQ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-Z56ECT7I.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
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]="
|
|
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]="0f857893-8441-54ad-af99-abaae9af864d")}catch(e){}}();
|
|
3
3
|
const FLAG_DESCRIPTIONS = Object.freeze({
|
|
4
4
|
"--body": "Set the item body.",
|
|
5
5
|
"--body-file": "Read the item body from a file.",
|
|
@@ -38,23 +38,156 @@ const BOOLEAN_FLAG_PREFIXES = [
|
|
|
38
38
|
"--check-",
|
|
39
39
|
"--dry-run",
|
|
40
40
|
"--explain",
|
|
41
|
-
"--
|
|
41
|
+
"--fail-",
|
|
42
|
+
"--fix-",
|
|
42
43
|
"--full",
|
|
43
44
|
"--has-",
|
|
44
45
|
"--include-",
|
|
45
46
|
"--json",
|
|
46
47
|
"--no-",
|
|
47
|
-
"--
|
|
48
|
+
"--prune-",
|
|
48
49
|
"--quiet",
|
|
50
|
+
"--refresh-",
|
|
49
51
|
"--require-",
|
|
50
52
|
"--runtime-only",
|
|
51
53
|
"--schema-only",
|
|
54
|
+
"--skip-",
|
|
52
55
|
"--stream",
|
|
53
56
|
"--strict-",
|
|
54
57
|
"--summary",
|
|
55
58
|
"--today",
|
|
56
59
|
"--verbose",
|
|
57
60
|
];
|
|
61
|
+
const BOOLEAN_FLAG_NAMES = new Set([
|
|
62
|
+
"--activate",
|
|
63
|
+
"--active-only",
|
|
64
|
+
"--adopt",
|
|
65
|
+
"--adopt-all",
|
|
66
|
+
"--all",
|
|
67
|
+
"--all-actionable",
|
|
68
|
+
"--all-affected-ids",
|
|
69
|
+
"--all-day",
|
|
70
|
+
"--all-streams",
|
|
71
|
+
"--append-stable",
|
|
72
|
+
"--auto-fix",
|
|
73
|
+
"--auto-pm-context",
|
|
74
|
+
"--availability-only",
|
|
75
|
+
"--background",
|
|
76
|
+
"--brief",
|
|
77
|
+
"--by-assignee",
|
|
78
|
+
"--by-priority",
|
|
79
|
+
"--by-tag",
|
|
80
|
+
"--catalog",
|
|
81
|
+
"--claim",
|
|
82
|
+
"--clear",
|
|
83
|
+
"--clear-comments",
|
|
84
|
+
"--clear-criteria",
|
|
85
|
+
"--clear-deps",
|
|
86
|
+
"--clear-docs",
|
|
87
|
+
"--clear-events",
|
|
88
|
+
"--clear-files",
|
|
89
|
+
"--clear-learnings",
|
|
90
|
+
"--clear-notes",
|
|
91
|
+
"--clear-reminders",
|
|
92
|
+
"--clear-tests",
|
|
93
|
+
"--clear-type-options",
|
|
94
|
+
"--cli-only",
|
|
95
|
+
"--closed",
|
|
96
|
+
"--compact",
|
|
97
|
+
"--completion",
|
|
98
|
+
"--count",
|
|
99
|
+
"--counts",
|
|
100
|
+
"--deactivate",
|
|
101
|
+
"--declarative",
|
|
102
|
+
"--defaults",
|
|
103
|
+
"--describe",
|
|
104
|
+
"--diff",
|
|
105
|
+
"--doctor",
|
|
106
|
+
"--empty-body",
|
|
107
|
+
"--explore",
|
|
108
|
+
"--field-utilization",
|
|
109
|
+
"--filter-empty-body",
|
|
110
|
+
"--flags-only",
|
|
111
|
+
"--follow",
|
|
112
|
+
"--force",
|
|
113
|
+
"--global",
|
|
114
|
+
"--highlight",
|
|
115
|
+
"--hybrid",
|
|
116
|
+
"--id-only",
|
|
117
|
+
"--if-available",
|
|
118
|
+
"--ignore-global",
|
|
119
|
+
"--include_unparented",
|
|
120
|
+
"--infer",
|
|
121
|
+
"--init",
|
|
122
|
+
"--install",
|
|
123
|
+
"--isolated",
|
|
124
|
+
"--lean",
|
|
125
|
+
"--list",
|
|
126
|
+
"--local",
|
|
127
|
+
"--manage",
|
|
128
|
+
"--markdown",
|
|
129
|
+
"--metadata-coverage",
|
|
130
|
+
"--next",
|
|
131
|
+
"--normalize-provenance",
|
|
132
|
+
"--only",
|
|
133
|
+
"--only-last",
|
|
134
|
+
"--output-row-contract",
|
|
135
|
+
"--override-linked-pm-context",
|
|
136
|
+
"--packages-only",
|
|
137
|
+
"--past",
|
|
138
|
+
"--phrase-exact",
|
|
139
|
+
"--profile",
|
|
140
|
+
"--progress",
|
|
141
|
+
"--project",
|
|
142
|
+
"--promote-to-item-dep",
|
|
143
|
+
"--provenance",
|
|
144
|
+
"--provenance-summary",
|
|
145
|
+
"--raw",
|
|
146
|
+
"--ready-only",
|
|
147
|
+
"--ready_only",
|
|
148
|
+
"--rebuild",
|
|
149
|
+
"--recent",
|
|
150
|
+
"--reload",
|
|
151
|
+
"--repair",
|
|
152
|
+
"--replace-deps",
|
|
153
|
+
"--replace-docs",
|
|
154
|
+
"--replace-files",
|
|
155
|
+
"--replace-tests",
|
|
156
|
+
"--required",
|
|
157
|
+
"--required-on-create",
|
|
158
|
+
"--run",
|
|
159
|
+
"--runtime-probe",
|
|
160
|
+
"--save-baseline",
|
|
161
|
+
"--scaffold",
|
|
162
|
+
"--semantic",
|
|
163
|
+
"--shared-host-safe",
|
|
164
|
+
"--storage",
|
|
165
|
+
"--title-exact",
|
|
166
|
+
"--token-accounting",
|
|
167
|
+
"--trace",
|
|
168
|
+
"--tree",
|
|
169
|
+
"--unbounded",
|
|
170
|
+
"--uninstall",
|
|
171
|
+
"--validate-paths",
|
|
172
|
+
"--verify",
|
|
173
|
+
"--watch",
|
|
174
|
+
"--with-packages",
|
|
175
|
+
]);
|
|
176
|
+
const VALUE_FLAG_NAMES = new Set(["--only-index"]);
|
|
177
|
+
const VALUE_COMMAND_FLAGS = new Set([
|
|
178
|
+
"activity:--stream",
|
|
179
|
+
"eval:--fail-under",
|
|
180
|
+
"validate:--fix-scope",
|
|
181
|
+
]);
|
|
182
|
+
const OPTIONAL_VALUE_COMMAND_FLAGS = new Set([
|
|
183
|
+
"activity:--stream",
|
|
184
|
+
"close:--validate-close",
|
|
185
|
+
"close-many:--validate-close",
|
|
186
|
+
"comments:--author",
|
|
187
|
+
"learnings:--author",
|
|
188
|
+
"notes:--author",
|
|
189
|
+
]);
|
|
190
|
+
const OPTIONAL_VALUE_FLAGS = new Set(["--regression"]);
|
|
58
191
|
function resolveFlagInputSources(command, flag) {
|
|
59
192
|
if (flag === "--stdin" || flag === "--stdin-json")
|
|
60
193
|
return ["stdin"];
|
|
@@ -65,8 +198,9 @@ function resolveFlagInputSources(command, flag) {
|
|
|
65
198
|
}
|
|
66
199
|
return ["argv"];
|
|
67
200
|
}
|
|
68
|
-
function flagTakesValue(contract) {
|
|
69
|
-
const explicitlyValued = contract.
|
|
201
|
+
function flagTakesValue(command, contract) {
|
|
202
|
+
const explicitlyValued = VALUE_COMMAND_FLAGS.has(`${command}:${contract.flag}`) ||
|
|
203
|
+
contract.value_name !== undefined ||
|
|
70
204
|
contract.value_type === "string" ||
|
|
71
205
|
contract.value_type === "number" ||
|
|
72
206
|
contract.list === true ||
|
|
@@ -74,12 +208,18 @@ function flagTakesValue(contract) {
|
|
|
74
208
|
const inferredBoolean = contract.value_type === "boolean" ||
|
|
75
209
|
contract.flag === "--stdin" ||
|
|
76
210
|
contract.flag === "--stdin-json" ||
|
|
211
|
+
(contract.flag.startsWith("--filter-") &&
|
|
212
|
+
(contract.flag.endsWith("-missing") ||
|
|
213
|
+
contract.flag.startsWith("--filter-has-") ||
|
|
214
|
+
contract.flag.startsWith("--filter-no-"))) ||
|
|
77
215
|
BOOLEAN_FLAG_PREFIXES.some((prefix) => contract.flag.startsWith(prefix));
|
|
78
|
-
return explicitlyValued ||
|
|
216
|
+
return (explicitlyValued ||
|
|
217
|
+
VALUE_FLAG_NAMES.has(contract.flag) ||
|
|
218
|
+
(!BOOLEAN_FLAG_NAMES.has(contract.flag) && !inferredBoolean));
|
|
79
219
|
}
|
|
80
220
|
/** Enrich one vocabulary row with deterministic invocation and input-channel metadata. */
|
|
81
221
|
export function enrichCliFlagInvocationContract(command, contract) {
|
|
82
|
-
const takesValue = flagTakesValue(contract);
|
|
222
|
+
const takesValue = flagTakesValue(command, contract);
|
|
83
223
|
const inputSources = resolveFlagInputSources(command, contract.flag);
|
|
84
224
|
const description = contract.description ??
|
|
85
225
|
FLAG_DESCRIPTIONS[contract.flag] ??
|
|
@@ -88,7 +228,9 @@ export function enrichCliFlagInvocationContract(command, contract) {
|
|
|
88
228
|
...contract,
|
|
89
229
|
description,
|
|
90
230
|
takes_value: takesValue,
|
|
91
|
-
value_required: takesValue
|
|
231
|
+
value_required: takesValue &&
|
|
232
|
+
!OPTIONAL_VALUE_FLAGS.has(contract.flag) &&
|
|
233
|
+
!OPTIONAL_VALUE_COMMAND_FLAGS.has(`${command}:${contract.flag}`),
|
|
92
234
|
...(takesValue ? { value_name: contract.value_name ?? "value" } : {}),
|
|
93
235
|
value_type: takesValue ? (contract.value_type ?? "string") : "boolean",
|
|
94
236
|
required: contract.required === true,
|
|
@@ -105,5 +247,72 @@ export function enrichCliFlagInvocationContract(command, contract) {
|
|
|
105
247
|
export function enrichCliFlagInvocationContracts(command, contracts) {
|
|
106
248
|
return contracts.map((contract) => enrichCliFlagInvocationContract(command, contract));
|
|
107
249
|
}
|
|
250
|
+
/** Compare generated invocation rows with independently observed executable arity. */
|
|
251
|
+
export function verifyCliFlagInvocationParity(command, declarations, observations) {
|
|
252
|
+
const normalizedCommand = command.trim().toLowerCase();
|
|
253
|
+
const findings = [];
|
|
254
|
+
const observedByFlag = new Map();
|
|
255
|
+
let matchingObservationCount = 0;
|
|
256
|
+
for (const observation of observations) {
|
|
257
|
+
if (observation.command.trim().toLowerCase() !== normalizedCommand)
|
|
258
|
+
continue;
|
|
259
|
+
matchingObservationCount += 1;
|
|
260
|
+
if (observedByFlag.has(observation.flag)) {
|
|
261
|
+
findings.push({
|
|
262
|
+
code: "duplicate_observation",
|
|
263
|
+
command: normalizedCommand,
|
|
264
|
+
flag: observation.flag,
|
|
265
|
+
detail: `${normalizedCommand} ${observation.flag} was observed more than once.`,
|
|
266
|
+
});
|
|
267
|
+
continue;
|
|
268
|
+
}
|
|
269
|
+
observedByFlag.set(observation.flag, observation);
|
|
270
|
+
}
|
|
271
|
+
const declaredFlags = new Set(declarations.map(({ flag }) => flag));
|
|
272
|
+
for (const declaration of declarations) {
|
|
273
|
+
const observation = observedByFlag.get(declaration.flag);
|
|
274
|
+
if (!observation) {
|
|
275
|
+
findings.push({
|
|
276
|
+
code: "missing_observation",
|
|
277
|
+
command: normalizedCommand,
|
|
278
|
+
flag: declaration.flag,
|
|
279
|
+
detail: `${normalizedCommand} ${declaration.flag} has no executable option observation.`,
|
|
280
|
+
});
|
|
281
|
+
continue;
|
|
282
|
+
}
|
|
283
|
+
for (const [field, code] of [
|
|
284
|
+
["takes_value", "takes_value_mismatch"],
|
|
285
|
+
["value_required", "value_required_mismatch"],
|
|
286
|
+
["repeatable", "repeatable_mismatch"],
|
|
287
|
+
]) {
|
|
288
|
+
if (declaration[field] === observation[field])
|
|
289
|
+
continue;
|
|
290
|
+
findings.push({
|
|
291
|
+
code,
|
|
292
|
+
command: normalizedCommand,
|
|
293
|
+
flag: declaration.flag,
|
|
294
|
+
detail: `${normalizedCommand} ${declaration.flag} declares ${field}=${String(declaration[field])} but the executable option reports ${String(observation[field])}.`,
|
|
295
|
+
});
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
for (const observation of observedByFlag.values()) {
|
|
299
|
+
if (declaredFlags.has(observation.flag))
|
|
300
|
+
continue;
|
|
301
|
+
findings.push({
|
|
302
|
+
code: "undeclared_observation",
|
|
303
|
+
command: normalizedCommand,
|
|
304
|
+
flag: observation.flag,
|
|
305
|
+
detail: `${normalizedCommand} ${observation.flag} is executable but absent from invocation contracts.`,
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
findings.sort((left, right) => left.flag.localeCompare(right.flag) ||
|
|
309
|
+
left.code.localeCompare(right.code));
|
|
310
|
+
return {
|
|
311
|
+
ok: findings.length === 0,
|
|
312
|
+
declared_count: declarations.length,
|
|
313
|
+
observed_count: matchingObservationCount,
|
|
314
|
+
findings,
|
|
315
|
+
};
|
|
316
|
+
}
|
|
108
317
|
//# sourceMappingURL=flag-invocation-contracts.js.map
|
|
109
|
-
//# debugId=
|
|
318
|
+
//# debugId=0f857893-8441-54ad-af99-abaae9af864d
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Generated partition 1 of the exhaustive error-code catalog. */
|
|
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]="
|
|
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]="ed64096a-fd80-52e9-926e-fb2d4d2030e7")}catch(e){}}();
|
|
4
4
|
export const PM_ERROR_CODE_CATALOG_PART_1 = [
|
|
5
5
|
{
|
|
6
6
|
code: "acceptance_criteria_mutation_conflict",
|
|
@@ -38,6 +38,30 @@ export const PM_ERROR_CODE_CATALOG_PART_1 = [
|
|
|
38
38
|
canonical_code: "acceptance_criteria_semicolon_forbidden",
|
|
39
39
|
aliases: [],
|
|
40
40
|
},
|
|
41
|
+
{
|
|
42
|
+
code: "accepted_rejected_value",
|
|
43
|
+
meaning: "Accepted rejected value condition.",
|
|
44
|
+
stability: "provisional",
|
|
45
|
+
exit_code: 1,
|
|
46
|
+
class: "generic_failure",
|
|
47
|
+
recovery: "Inspect the structured error guidance and retry the suggested command.",
|
|
48
|
+
sources: ["sdk/agent/refusal-closure.ts"],
|
|
49
|
+
emitting_commands: ["*"],
|
|
50
|
+
canonical_code: "accepted_rejected_value",
|
|
51
|
+
aliases: [],
|
|
52
|
+
},
|
|
53
|
+
{
|
|
54
|
+
code: "alias_collision",
|
|
55
|
+
meaning: "Alias collision condition.",
|
|
56
|
+
stability: "provisional",
|
|
57
|
+
exit_code: 1,
|
|
58
|
+
class: "generic_failure",
|
|
59
|
+
recovery: "Inspect the structured error guidance and retry the suggested command.",
|
|
60
|
+
sources: ["sdk/cli-contracts/flag-lexicon-contracts.ts"],
|
|
61
|
+
emitting_commands: ["*"],
|
|
62
|
+
canonical_code: "alias_collision",
|
|
63
|
+
aliases: [],
|
|
64
|
+
},
|
|
41
65
|
{
|
|
42
66
|
code: "alias_target_missing",
|
|
43
67
|
meaning: "Alias target missing condition.",
|
|
@@ -182,6 +206,18 @@ export const PM_ERROR_CODE_CATALOG_PART_1 = [
|
|
|
182
206
|
canonical_code: "body_file_unreadable",
|
|
183
207
|
aliases: [],
|
|
184
208
|
},
|
|
209
|
+
{
|
|
210
|
+
code: "budget_exceeded",
|
|
211
|
+
meaning: "Budget exceeded condition.",
|
|
212
|
+
stability: "provisional",
|
|
213
|
+
exit_code: 1,
|
|
214
|
+
class: "generic_failure",
|
|
215
|
+
recovery: "Inspect the structured error guidance and retry the suggested command.",
|
|
216
|
+
sources: ["sdk/cli-contracts/flag-lexicon-contracts.ts"],
|
|
217
|
+
emitting_commands: ["*"],
|
|
218
|
+
canonical_code: "budget_exceeded",
|
|
219
|
+
aliases: [],
|
|
220
|
+
},
|
|
185
221
|
{
|
|
186
222
|
code: "bundle_integrity_torn_install",
|
|
187
223
|
meaning: "Bundle integrity torn install condition.",
|
|
@@ -482,6 +518,18 @@ export const PM_ERROR_CODE_CATALOG_PART_1 = [
|
|
|
482
518
|
canonical_code: "dependency_temporal_order_invalid",
|
|
483
519
|
aliases: [],
|
|
484
520
|
},
|
|
521
|
+
{
|
|
522
|
+
code: "duplicate_canonical_flag",
|
|
523
|
+
meaning: "Duplicate canonical flag condition.",
|
|
524
|
+
stability: "provisional",
|
|
525
|
+
exit_code: 1,
|
|
526
|
+
class: "generic_failure",
|
|
527
|
+
recovery: "Inspect the structured error guidance and retry the suggested command.",
|
|
528
|
+
sources: ["sdk/cli-contracts/flag-lexicon-contracts.ts"],
|
|
529
|
+
emitting_commands: ["*"],
|
|
530
|
+
canonical_code: "duplicate_canonical_flag",
|
|
531
|
+
aliases: [],
|
|
532
|
+
},
|
|
485
533
|
{
|
|
486
534
|
code: "duplicate_command",
|
|
487
535
|
meaning: "Duplicate command condition.",
|
|
@@ -518,6 +566,30 @@ export const PM_ERROR_CODE_CATALOG_PART_1 = [
|
|
|
518
566
|
canonical_code: "duplicate_edge",
|
|
519
567
|
aliases: [],
|
|
520
568
|
},
|
|
569
|
+
{
|
|
570
|
+
code: "duplicate_observation",
|
|
571
|
+
meaning: "Duplicate observation condition.",
|
|
572
|
+
stability: "provisional",
|
|
573
|
+
exit_code: 1,
|
|
574
|
+
class: "generic_failure",
|
|
575
|
+
recovery: "Inspect the structured error guidance and retry the suggested command.",
|
|
576
|
+
sources: ["sdk/flag-invocation-contracts.ts"],
|
|
577
|
+
emitting_commands: ["*"],
|
|
578
|
+
canonical_code: "duplicate_observation",
|
|
579
|
+
aliases: [],
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
code: "duplicate_probe",
|
|
583
|
+
meaning: "Duplicate probe condition.",
|
|
584
|
+
stability: "provisional",
|
|
585
|
+
exit_code: 1,
|
|
586
|
+
class: "generic_failure",
|
|
587
|
+
recovery: "Inspect the structured error guidance and retry the suggested command.",
|
|
588
|
+
sources: ["sdk/agent/refusal-closure.ts"],
|
|
589
|
+
emitting_commands: ["*"],
|
|
590
|
+
canonical_code: "duplicate_probe",
|
|
591
|
+
aliases: [],
|
|
592
|
+
},
|
|
521
593
|
{
|
|
522
594
|
code: "duplicate_sweep_cost_limit",
|
|
523
595
|
meaning: "Duplicate sweep cost limit condition.",
|
|
@@ -578,6 +650,18 @@ export const PM_ERROR_CODE_CATALOG_PART_1 = [
|
|
|
578
650
|
canonical_code: "duplicate_target_self",
|
|
579
651
|
aliases: [],
|
|
580
652
|
},
|
|
653
|
+
{
|
|
654
|
+
code: "empty_corpus",
|
|
655
|
+
meaning: "Empty corpus condition.",
|
|
656
|
+
stability: "provisional",
|
|
657
|
+
exit_code: 1,
|
|
658
|
+
class: "generic_failure",
|
|
659
|
+
recovery: "Inspect the structured error guidance and retry the suggested command.",
|
|
660
|
+
sources: ["sdk/agent/refusal-closure.ts"],
|
|
661
|
+
emitting_commands: ["*"],
|
|
662
|
+
canonical_code: "empty_corpus",
|
|
663
|
+
aliases: [],
|
|
664
|
+
},
|
|
581
665
|
{
|
|
582
666
|
code: "empty_surface",
|
|
583
667
|
meaning: "Empty surface condition.",
|
|
@@ -1094,6 +1178,18 @@ export const PM_ERROR_CODE_CATALOG_PART_1 = [
|
|
|
1094
1178
|
canonical_code: "improvement_observation_conflict",
|
|
1095
1179
|
aliases: [],
|
|
1096
1180
|
},
|
|
1181
|
+
{
|
|
1182
|
+
code: "inconsistent_concept_kind",
|
|
1183
|
+
meaning: "Inconsistent concept kind condition.",
|
|
1184
|
+
stability: "provisional",
|
|
1185
|
+
exit_code: 1,
|
|
1186
|
+
class: "generic_failure",
|
|
1187
|
+
recovery: "Inspect the structured error guidance and retry the suggested command.",
|
|
1188
|
+
sources: ["sdk/cli-contracts/flag-lexicon-contracts.ts"],
|
|
1189
|
+
emitting_commands: ["*"],
|
|
1190
|
+
canonical_code: "inconsistent_concept_kind",
|
|
1191
|
+
aliases: [],
|
|
1192
|
+
},
|
|
1097
1193
|
{
|
|
1098
1194
|
code: "init_existing_settings_requires_force",
|
|
1099
1195
|
meaning: "Init existing settings requires force condition.",
|
|
@@ -1704,6 +1800,42 @@ export const PM_ERROR_CODE_CATALOG_PART_1 = [
|
|
|
1704
1800
|
canonical_code: "merge_decisions_unreviewed",
|
|
1705
1801
|
aliases: [],
|
|
1706
1802
|
},
|
|
1803
|
+
{
|
|
1804
|
+
code: "merge_git_config_unwritable",
|
|
1805
|
+
meaning: "Merge git config unwritable condition.",
|
|
1806
|
+
stability: "stable",
|
|
1807
|
+
exit_code: 5,
|
|
1808
|
+
class: "dependency_failed",
|
|
1809
|
+
recovery: "Inspect the structured error guidance and retry the suggested command.",
|
|
1810
|
+
sources: ["sdk/merge/install.ts"],
|
|
1811
|
+
emitting_commands: ["*"],
|
|
1812
|
+
canonical_code: "merge_git_config_unwritable",
|
|
1813
|
+
aliases: [],
|
|
1814
|
+
},
|
|
1815
|
+
{
|
|
1816
|
+
code: "merge_reconcile_discards_require_acceptance",
|
|
1817
|
+
meaning: "Merge reconcile discards require acceptance condition.",
|
|
1818
|
+
stability: "provisional",
|
|
1819
|
+
exit_code: 4,
|
|
1820
|
+
class: "conflict",
|
|
1821
|
+
recovery: "Inspect the structured error guidance and retry the suggested command.",
|
|
1822
|
+
sources: ["sdk/merge/reconcile.ts"],
|
|
1823
|
+
emitting_commands: ["*"],
|
|
1824
|
+
canonical_code: "merge_reconcile_discards_require_acceptance",
|
|
1825
|
+
aliases: [],
|
|
1826
|
+
},
|
|
1827
|
+
{
|
|
1828
|
+
code: "merge_root_not_found",
|
|
1829
|
+
meaning: "Merge root not found condition.",
|
|
1830
|
+
stability: "stable",
|
|
1831
|
+
exit_code: 3,
|
|
1832
|
+
class: "not_found",
|
|
1833
|
+
recovery: "Inspect the structured error guidance and retry the suggested command.",
|
|
1834
|
+
sources: ["sdk/merge/install.ts"],
|
|
1835
|
+
emitting_commands: ["*"],
|
|
1836
|
+
canonical_code: "merge_root_not_found",
|
|
1837
|
+
aliases: [],
|
|
1838
|
+
},
|
|
1707
1839
|
];
|
|
1708
1840
|
//# sourceMappingURL=generated-error-code-catalog-part-1.js.map
|
|
1709
|
-
//# debugId=
|
|
1841
|
+
//# debugId=ed64096a-fd80-52e9-926e-fb2d4d2030e7
|