@unbrained/pm-cli 2026.8.16 → 2026.8.17
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 +30 -3
- package/README.md +13 -13
- package/dist/cli/public.d.ts +2 -0
- package/dist/cli/public.js +21 -0
- package/dist/cli/register-mutation.js +4 -4
- package/dist/cli-bundle/bundle-manifest.json +151 -151
- package/dist/cli-bundle/chunks/{chunk-I2LUWWR5.js → chunk-2QLOXC3V.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-URW4QRMI.js → chunk-3UEGXBMR.js} +22 -22
- package/dist/cli-bundle/chunks/chunk-4JPYF536.js +35 -0
- package/dist/cli-bundle/chunks/chunk-6VDLG2FC.js +13 -0
- package/dist/cli-bundle/chunks/chunk-7IBRGCHX.js +2 -0
- package/dist/cli-bundle/chunks/chunk-HBJAS566.js +8 -0
- package/dist/cli-bundle/chunks/chunk-ION3E43Q.js +197 -0
- package/dist/cli-bundle/chunks/{chunk-73UGEBRS.js → chunk-JOKATURE.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-RIS565OA.js → chunk-TPXZIBIV.js} +5 -5
- package/dist/cli-bundle/chunks/chunk-YM2YAMF7.js +2 -0
- package/dist/cli-bundle/chunks/{register-list-query-EYCXHZAG.js → register-list-query-Q7KII4G5.js} +2 -2
- package/dist/cli-bundle/chunks/register-mutation-4WBRPXLV.js +20 -0
- package/dist/cli-bundle/chunks/{register-operations-KGDNRMCL.js → register-operations-SSENDH5B.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-NVXBOD5I.js → register-setup-DOSFBGKE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-TZATVC4G.js → chunk-267MUUS6.js} +11 -11
- package/dist/cli-bundle/focused-chunks/chunk-2NNFLLNG.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-HAACPSUW.js → chunk-2QSAKMIH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-6ROKKT4X.js → chunk-ATEY76SX.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-BUCG4ZI2.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-SSNDYZTM.js → chunk-CYFK5UPB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-EHXIKD6K.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-J4UFYHOD.js → chunk-KGEXTMPG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-KP2VQQVQ.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-MHPIL773.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-POEEAD2V.js +4 -0
- package/dist/cli-bundle/focused-chunks/{chunk-T46KLOIB.js → chunk-SALH6B6K.js} +47 -47
- package/dist/cli-bundle/focused-chunks/{chunk-CODV5LUT.js → chunk-SYZENPIT.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-4JPEBFFC.js → chunk-XKAMP5OU.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-NJ5RLEFD.js → chunk-XPIC53VA.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-C7JUBRFP.js → chunk-ZQPGZZWQ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZT2DJS27.js +155 -0
- package/dist/cli-bundle/main.js +2 -2
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -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 +4 -2
- package/dist/core/extensions/loader.js +10 -6
- package/dist/core/extensions/manifest-schema.d.ts +20 -0
- package/dist/core/extensions/manifest-schema.js +52 -0
- package/dist/core/history/replay.js +32 -14
- package/dist/core/schema/fields-file.d.ts +1 -1
- package/dist/core/schema/fields-file.js +2 -2
- package/dist/core/schema/runtime-field-values.js +115 -9
- package/dist/core/schema/runtime-schema.d.ts +3 -1
- package/dist/core/schema/runtime-schema.js +124 -3
- package/dist/core/shared/errors.d.ts +10 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/time.d.ts +2 -0
- package/dist/core/shared/time.js +27 -2
- package/dist/sdk/agent/refusal-reachability.d.ts +46 -6
- package/dist/sdk/agent/refusal-reachability.js +350 -8
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +5 -4
- package/dist/sdk/compose.d.ts +6 -2
- package/dist/sdk/compose.js +33 -3
- package/dist/sdk/context-intent-contracts.d.ts +8 -4
- package/dist/sdk/context-intent-contracts.js +76 -31
- package/dist/sdk/dependency-flag-validation.d.ts +9 -2
- package/dist/sdk/dependency-flag-validation.js +101 -35
- package/dist/sdk/environment/host-environment-errors.js +25 -7
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +26 -2
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +14 -2
- package/dist/sdk/governance/assurance-action.d.ts +3 -7
- package/dist/sdk/governance/assurance-action.js +97 -2
- package/dist/sdk/governance/boundary-fixtures.d.ts +86 -0
- package/dist/sdk/governance/boundary-fixtures.js +201 -0
- package/dist/sdk/governance/defect-recurrence-signals.d.ts +10 -0
- package/dist/sdk/governance/defect-recurrence-signals.js +25 -0
- package/dist/sdk/governance/defect-recurrence.d.ts +242 -0
- package/dist/sdk/governance/defect-recurrence.js +523 -0
- package/dist/sdk/governance.d.ts +2 -0
- package/dist/sdk/governance.js +4 -2
- package/dist/sdk/graph/governance.js +3 -2
- package/dist/sdk/guide-topics.js +191 -2
- package/dist/sdk/index.d.ts +3 -0
- package/dist/sdk/index.js +4 -2
- package/dist/sdk/lifecycle/create.js +4 -2
- package/dist/sdk/lifecycle/update-many.js +15 -2
- package/dist/sdk/lifecycle/update.js +5 -2
- package/dist/sdk/linked-artifacts.js +63 -14
- package/dist/sdk/query/get.d.ts +2 -0
- package/dist/sdk/query/get.js +32 -7
- package/dist/sdk/relationship-analytics.js +90 -14
- package/dist/sdk/relationship-kinds/contract.d.ts +4 -0
- package/dist/sdk/relationship-kinds/contract.js +3 -2
- package/dist/sdk/relationships.d.ts +1 -1
- package/dist/sdk/relationships.js +11 -2
- package/dist/sdk/schema.d.ts +1 -0
- package/dist/sdk/schema.js +2 -2
- package/dist/sdk/test/execution.d.ts +6 -2
- package/dist/sdk/test/execution.js +39 -13
- package/dist/types.d.ts +29 -2
- package/dist/types.js +4 -2
- package/docs/CONFIGURATION.md +58 -1
- package/docs/CONTEXT_INTEGRITY_CONTRACTS.md +58 -0
- package/docs/DEFECT_RECURRENCE.md +134 -0
- package/docs/DEPENDENCY_KIND_CONTRACT.md +12 -2
- package/docs/README.md +2 -0
- package/docs/RELATIONSHIP_GRAPH.md +16 -2
- package/docs/SDK.md +38 -5
- package/docs/SDK_RUNTIME_BOUNDARIES.md +9 -1
- package/docs/TESTING.md +18 -1
- package/docs/TRUSTWORTHY_CONTEXT_EVIDENCE.md +1 -1
- package/marketplace.json +2 -2
- package/package.json +6 -4
- 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/skills/pm-audit/SKILL.md +26 -0
- package/plugins/pm-claude/skills/pm-developer/SKILL.md +26 -0
- package/plugins/pm-claude/skills/pm-planner/SKILL.md +26 -0
- package/plugins/pm-claude/skills/pm-release/SKILL.md +26 -0
- package/plugins/pm-claude/skills/pm-workflow/SKILL.md +26 -0
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/pm-codex/skills/pm-auditor/SKILL.md +26 -0
- package/plugins/pm-codex/skills/pm-native/SKILL.md +26 -0
- package/plugins/pm-codex/skills/pm-release/SKILL.md +26 -0
- package/sdk/public-surface.json +588 -20
- package/dist/cli-bundle/chunks/chunk-47OQEOQB.js +0 -2
- package/dist/cli-bundle/chunks/chunk-HCIYWD6M.js +0 -35
- package/dist/cli-bundle/chunks/chunk-IC5W2T34.js +0 -2
- package/dist/cli-bundle/chunks/chunk-PANOOBIS.js +0 -13
- package/dist/cli-bundle/chunks/chunk-TK6N7HGM.js +0 -8
- package/dist/cli-bundle/chunks/chunk-TOFG2URD.js +0 -197
- package/dist/cli-bundle/chunks/register-mutation-7YVIG54J.js +0 -20
- package/dist/cli-bundle/focused-chunks/chunk-5NMFSX26.js +0 -155
- package/dist/cli-bundle/focused-chunks/chunk-725JSCMP.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-DQ6SMTBF.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-JX5Z344Q.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-L4RDYBIQ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-QYZERYR5.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-WY3WRPVN.js +0 -2
|
@@ -29,15 +29,19 @@ export interface PmContextIntentReceipt {
|
|
|
29
29
|
included_field_groups: string[];
|
|
30
30
|
/** Effective token ceiling after an explicit caller override is applied. */
|
|
31
31
|
token_budget: number;
|
|
32
|
-
/**
|
|
32
|
+
/** Ceiling declared by the selected intent before caller overrides. */
|
|
33
|
+
declared_token_budget: number;
|
|
34
|
+
/** Signed difference between the effective and declared ceilings. */
|
|
35
|
+
token_budget_override: number;
|
|
36
|
+
/** Deterministic JSON-size estimate for the useful result before any receipt-only omission. */
|
|
33
37
|
estimated_tokens: number;
|
|
34
|
-
/** Whether the measured result fits the
|
|
38
|
+
/** Whether the measured result fits the effective ceiling after caller overrides. */
|
|
35
39
|
within_budget: boolean;
|
|
36
40
|
/** Projection strategy applied before the result was measured. */
|
|
37
41
|
degradation: "bounded_fields_and_rows" | "bounded_ranked_rows" | "bounded_sections" | "budget_row_compaction" | "recursive_budget_compaction" | "budget_receipt_only" | "standard_item" | "none";
|
|
38
|
-
/** Whether the declared ceiling can carry
|
|
42
|
+
/** Whether the declared ceiling can carry the measured useful projection, independent of an override. */
|
|
39
43
|
declaration_feasible: boolean;
|
|
40
|
-
/** True only when no useful result survived the
|
|
44
|
+
/** True only when no useful result survived the effective ceiling. */
|
|
41
45
|
result_omitted: boolean;
|
|
42
46
|
/** Row ceiling calculated from the selected intent's effective token budget. */
|
|
43
47
|
budget_derived_limit?: number;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* workspace configuration, and packages.
|
|
6
6
|
*/
|
|
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]="
|
|
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]="d09393aa-0253-5ad6-a2fe-245f31b9eb87")}catch(e){}}();
|
|
9
9
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
10
10
|
import { attachOutputOmissionReceipt } from "./output-projection.js";
|
|
11
11
|
import { encodeQueryCursor } from "./pagination.js";
|
|
@@ -25,7 +25,7 @@ export const PM_CONTEXT_INTENT_CONTRACTS = Object.freeze([
|
|
|
25
25
|
"blockers",
|
|
26
26
|
"activity",
|
|
27
27
|
],
|
|
28
|
-
token_budget:
|
|
28
|
+
token_budget: 3000,
|
|
29
29
|
source: "core",
|
|
30
30
|
},
|
|
31
31
|
{
|
|
@@ -211,10 +211,14 @@ const CONTEXT_INTENT_DEFAULT_APPLIERS = {
|
|
|
211
211
|
: ["hierarchy", "blockers", "activity"];
|
|
212
212
|
}
|
|
213
213
|
const tokenBudget = resolveIntentTokenBudget(projected.tokenBudget, contract.token_budget);
|
|
214
|
-
const
|
|
215
|
-
const
|
|
216
|
-
|
|
214
|
+
const budgetDerivedLimit = resolveIntentRowBudget("context", contract.intent, tokenBudget, explicitTokenBudget);
|
|
215
|
+
const requestedLimit = parsePositiveIntentTokenBudget(projected.limit);
|
|
216
|
+
const derivedLimit = String(requestedLimit === undefined
|
|
217
|
+
? budgetDerivedLimit
|
|
218
|
+
: Math.min(requestedLimit, budgetDerivedLimit));
|
|
219
|
+
if (projected.limit === undefined || requestedLimit !== undefined) {
|
|
217
220
|
projected.limit = derivedLimit;
|
|
221
|
+
}
|
|
218
222
|
if (projected.activityLimit === undefined) {
|
|
219
223
|
projected.activityLimit = derivedLimit;
|
|
220
224
|
}
|
|
@@ -232,10 +236,13 @@ const CONTEXT_INTENT_DEFAULT_APPLIERS = {
|
|
|
232
236
|
projected.fields =
|
|
233
237
|
"id,title,status,type,priority,parent,assignee,risk,blocked_by";
|
|
234
238
|
}
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
+
const tokenBudget = resolveIntentTokenBudget(projected.tokenBudget, contract.token_budget);
|
|
240
|
+
const budgetDerivedLimit = resolveIntentRowBudget("list", contract.intent, tokenBudget, explicitTokenBudget);
|
|
241
|
+
const requestedLimit = parsePositiveIntentTokenBudget(projected.limit);
|
|
242
|
+
if (projected.limit === undefined || requestedLimit !== undefined) {
|
|
243
|
+
projected.limit = String(requestedLimit === undefined
|
|
244
|
+
? budgetDerivedLimit
|
|
245
|
+
: Math.min(requestedLimit, budgetDerivedLimit));
|
|
239
246
|
}
|
|
240
247
|
},
|
|
241
248
|
next: (projected) => {
|
|
@@ -248,10 +255,13 @@ const CONTEXT_INTENT_DEFAULT_APPLIERS = {
|
|
|
248
255
|
projected.fields === undefined) {
|
|
249
256
|
projected.compact = true;
|
|
250
257
|
}
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
258
|
+
const tokenBudget = resolveIntentTokenBudget(projected.tokenBudget, contract.token_budget);
|
|
259
|
+
const budgetDerivedLimit = resolveIntentRowBudget("search", contract.intent, tokenBudget, explicitTokenBudget);
|
|
260
|
+
const requestedLimit = parsePositiveIntentTokenBudget(projected.limit);
|
|
261
|
+
if (projected.limit === undefined || requestedLimit !== undefined) {
|
|
262
|
+
projected.limit = String(requestedLimit === undefined
|
|
263
|
+
? budgetDerivedLimit
|
|
264
|
+
: Math.min(requestedLimit, budgetDerivedLimit));
|
|
255
265
|
}
|
|
256
266
|
},
|
|
257
267
|
};
|
|
@@ -341,6 +351,23 @@ function resolveIntentTokenBudget(value, declaredBudget) {
|
|
|
341
351
|
}
|
|
342
352
|
return parsed;
|
|
343
353
|
}
|
|
354
|
+
function resolveIntentRowBudget(command, intent, tokenBudget, explicitTokenBudget) {
|
|
355
|
+
if (command === "get" || command === "next")
|
|
356
|
+
return undefined;
|
|
357
|
+
const contextOrient = command === "context" && intent === "orient";
|
|
358
|
+
const overhead = command === "context"
|
|
359
|
+
? contextOrient
|
|
360
|
+
? 1200
|
|
361
|
+
: 800
|
|
362
|
+
: command === "list"
|
|
363
|
+
? 520
|
|
364
|
+
: 480;
|
|
365
|
+
const rowCost = command === "context" ? (contextOrient ? 600 : 500) : 16;
|
|
366
|
+
const calculatedLimit = Math.max(command === "context" ? 1 : 2, Math.floor((tokenBudget - overhead) / rowCost));
|
|
367
|
+
return explicitTokenBudget
|
|
368
|
+
? calculatedLimit
|
|
369
|
+
: Math.min(command === "context" ? 20 : 100, calculatedLimit);
|
|
370
|
+
}
|
|
344
371
|
/** Update a receipt until its estimate matches the serialized projection that contains it. */
|
|
345
372
|
function updateContextIntentEstimate(projected, receipt) {
|
|
346
373
|
let measuredTokens = receipt.estimated_tokens;
|
|
@@ -495,12 +522,15 @@ export function attachContextIntentReceipt(command, options, result) {
|
|
|
495
522
|
return result;
|
|
496
523
|
const builtInCommand = normalizedCommand;
|
|
497
524
|
const contract = resolveContextIntentContract(builtInCommand, options.for);
|
|
525
|
+
const effectiveTokenBudget = resolveIntentTokenBudget(options.tokenBudget ?? options.token_budget, contract.token_budget);
|
|
498
526
|
const receipt = {
|
|
499
527
|
command: builtInCommand,
|
|
500
528
|
intent: contract.intent,
|
|
501
529
|
source: contract.source,
|
|
502
530
|
included_field_groups: [...contract.included_field_groups],
|
|
503
|
-
token_budget:
|
|
531
|
+
token_budget: effectiveTokenBudget,
|
|
532
|
+
declared_token_budget: contract.token_budget,
|
|
533
|
+
token_budget_override: effectiveTokenBudget - contract.token_budget,
|
|
504
534
|
estimated_tokens: 0,
|
|
505
535
|
within_budget: true,
|
|
506
536
|
degradation: CONTEXT_INTENT_DEGRADATIONS[builtInCommand],
|
|
@@ -508,21 +538,17 @@ export function attachContextIntentReceipt(command, options, result) {
|
|
|
508
538
|
result_omitted: false,
|
|
509
539
|
};
|
|
510
540
|
const resultWithDiagnostics = { ...result };
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
const
|
|
514
|
-
const
|
|
515
|
-
const budgetDerivedLimit = explicitTokenBudget
|
|
516
|
-
? calculatedLimit
|
|
517
|
-
: Math.min(100, calculatedLimit);
|
|
518
|
-
const hasExplicitLimit = options.limit !== undefined;
|
|
541
|
+
const budgetDerivedLimit = resolveIntentRowBudget(builtInCommand, contract.intent, receipt.token_budget, parsePositiveIntentTokenBudget(options.tokenBudget ?? options.token_budget) !== undefined);
|
|
542
|
+
if (budgetDerivedLimit !== undefined) {
|
|
543
|
+
const effectiveLimit = parsePositiveIntentTokenBudget(options.limit);
|
|
544
|
+
const explicitLimitBinds = effectiveLimit !== undefined && effectiveLimit < budgetDerivedLimit;
|
|
519
545
|
receipt.budget_derived_limit = budgetDerivedLimit;
|
|
520
|
-
receipt.binding_constraint =
|
|
546
|
+
receipt.binding_constraint = explicitLimitBinds
|
|
521
547
|
? "explicit_limit"
|
|
522
548
|
: "token_budget";
|
|
523
|
-
receipt.limit_reason =
|
|
524
|
-
? "The caller supplied
|
|
525
|
-
: "The selected intent token budget
|
|
549
|
+
receipt.limit_reason = explicitLimitBinds
|
|
550
|
+
? "The caller supplied a smaller row limit than the budget-derived ceiling."
|
|
551
|
+
: "The selected intent token budget constrains the effective row ceiling.";
|
|
526
552
|
resultWithDiagnostics.budget_derived_limit = budgetDerivedLimit;
|
|
527
553
|
}
|
|
528
554
|
let projected = {
|
|
@@ -543,20 +569,22 @@ export function attachContextIntentReceipt(command, options, result) {
|
|
|
543
569
|
receipt.degradation = "budget_row_compaction";
|
|
544
570
|
updateContextIntentEstimate(projected, receipt);
|
|
545
571
|
}
|
|
572
|
+
receipt.declaration_feasible =
|
|
573
|
+
receipt.estimated_tokens <= receipt.declared_token_budget;
|
|
546
574
|
if (receipt.estimated_tokens > receipt.token_budget) {
|
|
547
575
|
receipt.degradation = "budget_receipt_only";
|
|
548
|
-
receipt.declaration_feasible = false;
|
|
549
576
|
receipt.result_omitted = true;
|
|
550
577
|
receipt.within_budget = false;
|
|
551
578
|
projected = {
|
|
552
579
|
budget_exceeded: {
|
|
553
580
|
omitted_result: true,
|
|
554
|
-
reason:
|
|
555
|
-
|
|
581
|
+
reason: receipt.token_budget_override === 0
|
|
582
|
+
? "declared_budget_infeasible"
|
|
583
|
+
: "effective_budget_infeasible",
|
|
584
|
+
restore_with: buildContextIntentRecoveryCommand(command, builtInCommand, contract.intent, receipt, resultWithDiagnostics),
|
|
556
585
|
},
|
|
557
586
|
context_intent: receipt,
|
|
558
587
|
};
|
|
559
|
-
updateContextIntentEstimate(projected, receipt);
|
|
560
588
|
}
|
|
561
589
|
return projected;
|
|
562
590
|
}
|
|
@@ -594,6 +622,23 @@ function collapseContinuationMetadata(options, result) {
|
|
|
594
622
|
function isOutputRecord(value) {
|
|
595
623
|
return value !== null && typeof value === "object" && !Array.isArray(value);
|
|
596
624
|
}
|
|
625
|
+
/** Build a shell-safe bounded retry while retaining required read positionals. */
|
|
626
|
+
function buildContextIntentRecoveryCommand(command, builtInCommand, intent, receipt, result) {
|
|
627
|
+
const recoveryTarget = builtInCommand === "get" &&
|
|
628
|
+
isOutputRecord(result.item) &&
|
|
629
|
+
typeof result.item.id === "string"
|
|
630
|
+
? result.item.id
|
|
631
|
+
: builtInCommand === "search" && typeof result.query === "string"
|
|
632
|
+
? result.query
|
|
633
|
+
: undefined;
|
|
634
|
+
const recoveryPositional = recoveryTarget === undefined
|
|
635
|
+
? ""
|
|
636
|
+
: ` '${recoveryTarget.replaceAll("'", `'"'"'`)}'`;
|
|
637
|
+
const boundedRowLimit = builtInCommand === "get"
|
|
638
|
+
? ""
|
|
639
|
+
: ` --limit ${receipt.budget_derived_limit ?? 1}`;
|
|
640
|
+
return `pm ${command}${recoveryPositional} --for ${intent} --token-budget ${Math.ceil(receipt.estimated_tokens / 100) * 100}${boundedRowLimit}`;
|
|
641
|
+
}
|
|
597
642
|
/** Read one numeric fixed-point estimate from an optional receipt. */
|
|
598
643
|
function receiptEstimate(value, field) {
|
|
599
644
|
if (!isOutputRecord(value))
|
|
@@ -641,4 +686,4 @@ export function attachReadOutputContracts(command, options, result) {
|
|
|
641
686
|
return stabilizeSuppressedRowContractReceipts(Object.fromEntries(Object.entries(projected).filter(([key]) => key !== "row_contract")), options);
|
|
642
687
|
}
|
|
643
688
|
//# sourceMappingURL=context-intent-contracts.js.map
|
|
644
|
-
//# debugId=
|
|
689
|
+
//# debugId=d09393aa-0253-5ad6-a2fe-245f31b9eb87
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Dependency, ItemFormat } from "../types/index.js";
|
|
1
|
+
import type { Dependency, ItemFormat, RuntimeSchemaSettings } from "../types/index.js";
|
|
2
2
|
import { type RelationshipKindRegistry } from "./relationships.js";
|
|
3
3
|
/** Reject malformed shorthand before item-id prefix normalization can create a dangling graph node. */
|
|
4
4
|
export declare function assertValidBareDependencyFlagValue(value: string, structured: boolean): void;
|
|
@@ -8,7 +8,8 @@ export declare function assertValidBareDependencyFlagValue(value: string, struct
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function assertDependencyEdgesAllowed(holderId: string, dependencies: readonly Dependency[] | undefined, registry?: RelationshipKindRegistry): void;
|
|
10
10
|
/**
|
|
11
|
-
* Resolve every newly supplied local dependency
|
|
11
|
+
* Resolve every newly supplied local dependency and enforce declared endpoint
|
|
12
|
+
* chronology before a mutation commits.
|
|
12
13
|
* Explicit external provenance bypasses workspace lookup, while the opt-in
|
|
13
14
|
* unresolved mode returns durable warning tokens instead of pretending that
|
|
14
15
|
* the graph edge resolved successfully.
|
|
@@ -20,4 +21,10 @@ export declare function assertDependencyTargetsResolvable(params: {
|
|
|
20
21
|
itemFormat: ItemFormat;
|
|
21
22
|
typeToFolder: Record<string, string>;
|
|
22
23
|
allowUnresolved?: boolean;
|
|
24
|
+
holders?: readonly {
|
|
25
|
+
id: string;
|
|
26
|
+
createdAt?: string;
|
|
27
|
+
}[];
|
|
28
|
+
schema?: RuntimeSchemaSettings;
|
|
29
|
+
registry?: RelationshipKindRegistry;
|
|
23
30
|
}): Promise<string[]>;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/** @module cli/commands/dependency-flag-validation */
|
|
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]="f9c9b926-c912-548e-a9c7-64c2c69767cd")}catch(e){}}();
|
|
4
4
|
import { EXIT_CODE } from "../core/shared/constants.js";
|
|
5
5
|
import { PmCliError } from "../core/shared/errors.js";
|
|
6
6
|
import { toErrorMessage } from "../core/shared/primitives.js";
|
|
7
|
-
import { locateItem } from "../core/store/item-store.js";
|
|
7
|
+
import { locateItem, readLocatedItem, } from "../core/store/item-store.js";
|
|
8
8
|
import { isExternalDependencySourceKind } from "./dependency-provenance.js";
|
|
9
9
|
import { resolveWorkspaceRelationshipKindRegistry } from "./graph/assembly.js";
|
|
10
10
|
import { assertRelationshipEdgeAllowed, } from "./relationships.js";
|
|
@@ -31,55 +31,121 @@ export function assertDependencyEdgesAllowed(holderId, dependencies, registry =
|
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
|
+
async function readDependencyEndpointCreatedAt(located, schema) {
|
|
35
|
+
return (await readLocatedItem(located, { schema })).document.metadata
|
|
36
|
+
.created_at;
|
|
37
|
+
}
|
|
38
|
+
async function resolveDependencyHolderCreatedAt(holder, context) {
|
|
39
|
+
if (holder.createdAt !== undefined)
|
|
40
|
+
return holder.createdAt;
|
|
41
|
+
const located = await locateItem(context.pmRoot, holder.id, context.idPrefix, context.itemFormat, context.typeToFolder);
|
|
42
|
+
return located === null
|
|
43
|
+
? undefined
|
|
44
|
+
: readDependencyEndpointCreatedAt(located, context.schema);
|
|
45
|
+
}
|
|
46
|
+
function dependencyTemporalOrderError(params) {
|
|
47
|
+
const definition = params.registry.require(params.dependency.kind);
|
|
48
|
+
return new PmCliError(`${definition.kind} requires source ${params.holder.id} to be created after target ${params.dependency.id}`, EXIT_CODE.USAGE, {
|
|
49
|
+
code: "dependency_temporal_order_invalid",
|
|
50
|
+
reason: "source_not_after_target",
|
|
51
|
+
required: `${params.holder.id}.created_at must be later than ${params.dependency.id}.created_at for ${definition.kind}.`,
|
|
52
|
+
why: "Chronological recurrence direction must be validated before the relationship is persisted.",
|
|
53
|
+
source_id: params.holder.id,
|
|
54
|
+
source_created_at: params.sourceCreatedAt,
|
|
55
|
+
target_id: params.dependency.id,
|
|
56
|
+
target_created_at: params.targetCreatedAt,
|
|
57
|
+
temporal_order: definition.temporalOrder,
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
async function assertTemporalDependencyChronology(params) {
|
|
61
|
+
const temporalDependencies = params.dependencies.filter((dependency) => params.registry.resolve(dependency.kind)?.temporalOrder ===
|
|
62
|
+
"source_after_target" &&
|
|
63
|
+
!params.missingTargets.includes(dependency.id));
|
|
64
|
+
if (temporalDependencies.length === 0 || params.holders.length === 0)
|
|
65
|
+
return;
|
|
66
|
+
const locatedTargets = new Map(params.resolutions.flatMap(({ target, located }) => located === null ? [] : [[target, located]]));
|
|
67
|
+
const targetCreatedAt = new Map(await Promise.all([...new Set(temporalDependencies.map(({ id }) => id))].map(async (target) => [
|
|
68
|
+
target,
|
|
69
|
+
await readDependencyEndpointCreatedAt(locatedTargets.get(target), params.context.schema),
|
|
70
|
+
])));
|
|
71
|
+
for (const holder of params.holders) {
|
|
72
|
+
const sourceCreatedAt = await resolveDependencyHolderCreatedAt(holder, params.context);
|
|
73
|
+
if (sourceCreatedAt === undefined)
|
|
74
|
+
continue;
|
|
75
|
+
for (const dependency of temporalDependencies) {
|
|
76
|
+
const targetTimestamp = targetCreatedAt.get(dependency.id);
|
|
77
|
+
const sourceTime = Date.parse(sourceCreatedAt);
|
|
78
|
+
const targetTime = Date.parse(targetTimestamp);
|
|
79
|
+
if (Number.isFinite(sourceTime) &&
|
|
80
|
+
Number.isFinite(targetTime) &&
|
|
81
|
+
sourceTime > targetTime) {
|
|
82
|
+
continue;
|
|
83
|
+
}
|
|
84
|
+
throw dependencyTemporalOrderError({
|
|
85
|
+
holder,
|
|
86
|
+
dependency,
|
|
87
|
+
sourceCreatedAt,
|
|
88
|
+
targetCreatedAt: targetTimestamp,
|
|
89
|
+
registry: params.registry,
|
|
90
|
+
});
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
34
94
|
/**
|
|
35
|
-
* Resolve every newly supplied local dependency
|
|
95
|
+
* Resolve every newly supplied local dependency and enforce declared endpoint
|
|
96
|
+
* chronology before a mutation commits.
|
|
36
97
|
* Explicit external provenance bypasses workspace lookup, while the opt-in
|
|
37
98
|
* unresolved mode returns durable warning tokens instead of pretending that
|
|
38
99
|
* the graph edge resolved successfully.
|
|
39
100
|
*/
|
|
40
101
|
export async function assertDependencyTargetsResolvable(params) {
|
|
102
|
+
const registry = params.registry ?? resolveWorkspaceRelationshipKindRegistry();
|
|
103
|
+
const localDependencies = (params.dependencies ?? []).filter((dependency) => !isExternalDependencySourceKind(dependency.source_kind));
|
|
41
104
|
const localTargets = [
|
|
42
|
-
...new Set((
|
|
43
|
-
.filter((dependency) => !isExternalDependencySourceKind(dependency.source_kind))
|
|
44
|
-
.map((dependency) => dependency.id)),
|
|
105
|
+
...new Set(localDependencies.map((dependency) => dependency.id)),
|
|
45
106
|
];
|
|
46
107
|
const resolutions = await Promise.all(localTargets.map(async (target) => ({
|
|
47
108
|
target,
|
|
48
109
|
located: await locateItem(params.pmRoot, target, params.idPrefix, params.itemFormat, params.typeToFolder),
|
|
49
110
|
})));
|
|
50
|
-
const
|
|
111
|
+
const missingTargets = resolutions
|
|
51
112
|
.filter(({ located }) => located === null)
|
|
52
113
|
.map(({ target }) => target)
|
|
53
114
|
.sort((left, right) => (left < right ? -1 : 1));
|
|
54
|
-
if (
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
115
|
+
if (missingTargets.length > 0 && params.allowUnresolved !== true) {
|
|
116
|
+
throw new PmCliError(`Dependency target${missingTargets.length === 1 ? "" : "s"} not found: ${missingTargets.join(", ")}`, EXIT_CODE.NOT_FOUND, {
|
|
117
|
+
code: "dependency_target_not_found",
|
|
118
|
+
reason: "unresolved_local_dependency",
|
|
119
|
+
required: "Every local dependency target must exist before the edge is committed.",
|
|
120
|
+
why: "Fail-fast target resolution prevents dangling graph nodes and preserves reliable traversal semantics.",
|
|
121
|
+
unresolved_targets: missingTargets,
|
|
122
|
+
examples: [
|
|
123
|
+
"--dep id=<existing-item-id>,kind=related",
|
|
124
|
+
"--dep id=<external-id>,kind=related,source_kind=external",
|
|
125
|
+
"--allow-unresolved-deps --dep id=<future-item-id>,kind=related",
|
|
126
|
+
],
|
|
127
|
+
nextSteps: [
|
|
128
|
+
`Create or correct ${missingTargets.length === 1 ? "the target" : "the targets"}, then retry the mutation.`,
|
|
129
|
+
"Use source_kind=external for a cross-workspace reference.",
|
|
130
|
+
"Use --allow-unresolved-deps only when the dangling local edge is intentional.",
|
|
131
|
+
],
|
|
132
|
+
recovery: {
|
|
133
|
+
recovery_mode: "compact",
|
|
134
|
+
missing: missingTargets,
|
|
135
|
+
suggested_flags: ["--allow-unresolved-deps"],
|
|
136
|
+
suggested_retry: `pm search "${missingTargets[0]}" --limit 10`,
|
|
137
|
+
},
|
|
138
|
+
});
|
|
59
139
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
"--dep id=<existing-item-id>,kind=related",
|
|
68
|
-
"--dep id=<external-id>,kind=related,source_kind=external",
|
|
69
|
-
"--allow-unresolved-deps --dep id=<future-item-id>,kind=related",
|
|
70
|
-
],
|
|
71
|
-
nextSteps: [
|
|
72
|
-
`Create or correct ${targets.length === 1 ? "the target" : "the targets"}, then retry the mutation.`,
|
|
73
|
-
"Use source_kind=external for a cross-workspace reference.",
|
|
74
|
-
"Use --allow-unresolved-deps only when the dangling local edge is intentional.",
|
|
75
|
-
],
|
|
76
|
-
recovery: {
|
|
77
|
-
recovery_mode: "compact",
|
|
78
|
-
missing: targets,
|
|
79
|
-
suggested_flags: ["--allow-unresolved-deps"],
|
|
80
|
-
suggested_retry: `pm search "${targets[0]}" --limit 10`,
|
|
81
|
-
},
|
|
140
|
+
await assertTemporalDependencyChronology({
|
|
141
|
+
dependencies: localDependencies,
|
|
142
|
+
missingTargets,
|
|
143
|
+
resolutions,
|
|
144
|
+
holders: params.holders ?? [],
|
|
145
|
+
registry,
|
|
146
|
+
context: params,
|
|
82
147
|
});
|
|
148
|
+
return missingTargets.map((target) => `dependency_target_unresolved:${target}`);
|
|
83
149
|
}
|
|
84
150
|
//# sourceMappingURL=dependency-flag-validation.js.map
|
|
85
|
-
//# debugId=
|
|
151
|
+
//# debugId=f9c9b926-c912-548e-a9c7-64c2c69767cd
|
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
* leaking local paths or swallowing genuine implementation defects.
|
|
6
6
|
*/
|
|
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]="
|
|
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]="679bb2a0-aada-586e-a831-591266be2ee0")}catch(e){}}();
|
|
9
|
+
import { constants as osConstants } from "node:os";
|
|
9
10
|
import { EXIT_CODE } from "../../core/shared/constants.js";
|
|
10
11
|
import { PmCliError } from "../../core/shared/errors.js";
|
|
11
12
|
const HOST_ENVIRONMENT_FAULTS = new Map([
|
|
@@ -75,6 +76,16 @@ const HOST_ENVIRONMENT_FAULTS = new Map([
|
|
|
75
76
|
],
|
|
76
77
|
]);
|
|
77
78
|
const OPERATION_PATTERN = /^[a-z][a-z0-9_]{0,63}$/u;
|
|
79
|
+
const HOST_ENVIRONMENT_ERRNO_NAMES = new Map([
|
|
80
|
+
[osConstants.errno.EACCES, "EACCES"],
|
|
81
|
+
[osConstants.errno.EDQUOT, "EDQUOT"],
|
|
82
|
+
[osConstants.errno.EMFILE, "EMFILE"],
|
|
83
|
+
[osConstants.errno.ENFILE, "ENFILE"],
|
|
84
|
+
[osConstants.errno.ENOMEM, "ENOMEM"],
|
|
85
|
+
[osConstants.errno.ENOSPC, "ENOSPC"],
|
|
86
|
+
[osConstants.errno.EPERM, "EPERM"],
|
|
87
|
+
[osConstants.errno.EROFS, "EROFS"],
|
|
88
|
+
]);
|
|
78
89
|
const HOST_ENVIRONMENT_FAULT_CODES = {
|
|
79
90
|
capacity: { code: "host_environment_capacity_fault" },
|
|
80
91
|
permission: { code: "host_environment_permission_fault" },
|
|
@@ -82,12 +93,19 @@ const HOST_ENVIRONMENT_FAULT_CODES = {
|
|
|
82
93
|
};
|
|
83
94
|
/** Return a declared host errno only when it represents recoverable environment state. */
|
|
84
95
|
export function classifyHostEnvironmentFault(error) {
|
|
85
|
-
if (typeof error !== "object" || error === null
|
|
96
|
+
if (typeof error !== "object" || error === null) {
|
|
86
97
|
return null;
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
98
|
+
}
|
|
99
|
+
const errorRecord = error;
|
|
100
|
+
if (typeof errorRecord.code === "string" &&
|
|
101
|
+
HOST_ENVIRONMENT_FAULTS.has(errorRecord.code)) {
|
|
102
|
+
return errorRecord.code;
|
|
103
|
+
}
|
|
104
|
+
if (typeof errorRecord.errno !== "number" ||
|
|
105
|
+
!Number.isInteger(errorRecord.errno)) {
|
|
106
|
+
return null;
|
|
107
|
+
}
|
|
108
|
+
return HOST_ENVIRONMENT_ERRNO_NAMES.get(Math.abs(errorRecord.errno)) ?? null;
|
|
91
109
|
}
|
|
92
110
|
/** Translate one known host fault into a stable path-redacted SDK refusal. */
|
|
93
111
|
export function translateHostEnvironmentFault(error, operation, options = {}) {
|
|
@@ -121,4 +139,4 @@ export async function withHostEnvironmentBoundary(operation, run, options = {})
|
|
|
121
139
|
}
|
|
122
140
|
}
|
|
123
141
|
//# sourceMappingURL=host-environment-errors.js.map
|
|
124
|
-
//# debugId=
|
|
142
|
+
//# debugId=679bb2a0-aada-586e-a831-591266be2ee0
|
|
@@ -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]="d188630b-bf34-53f4-a93e-78698013994e")}catch(e){}}();
|
|
4
4
|
export const PM_ERROR_CODE_CATALOG_PART_1 = [
|
|
5
5
|
{
|
|
6
6
|
code: "acceptance_criteria_mutation_conflict",
|
|
@@ -470,6 +470,18 @@ export const PM_ERROR_CODE_CATALOG_PART_1 = [
|
|
|
470
470
|
canonical_code: "dependency_target_not_found",
|
|
471
471
|
aliases: [],
|
|
472
472
|
},
|
|
473
|
+
{
|
|
474
|
+
code: "dependency_temporal_order_invalid",
|
|
475
|
+
meaning: "Dependency temporal order invalid condition.",
|
|
476
|
+
stability: "provisional",
|
|
477
|
+
exit_code: 2,
|
|
478
|
+
class: "usage",
|
|
479
|
+
recovery: "Inspect the structured error guidance and retry the suggested command.",
|
|
480
|
+
sources: ["sdk/dependency-flag-validation.ts"],
|
|
481
|
+
emitting_commands: ["*"],
|
|
482
|
+
canonical_code: "dependency_temporal_order_invalid",
|
|
483
|
+
aliases: [],
|
|
484
|
+
},
|
|
473
485
|
{
|
|
474
486
|
code: "duplicate_command",
|
|
475
487
|
meaning: "Duplicate command condition.",
|
|
@@ -1628,6 +1640,18 @@ export const PM_ERROR_CODE_CATALOG_PART_1 = [
|
|
|
1628
1640
|
canonical_code: "manifest_capabilities_absent",
|
|
1629
1641
|
aliases: [],
|
|
1630
1642
|
},
|
|
1643
|
+
{
|
|
1644
|
+
code: "manifest_unknown_key",
|
|
1645
|
+
meaning: "Manifest unknown key condition.",
|
|
1646
|
+
stability: "provisional",
|
|
1647
|
+
exit_code: 2,
|
|
1648
|
+
class: "usage",
|
|
1649
|
+
recovery: "Inspect the structured error guidance and retry the suggested command.",
|
|
1650
|
+
sources: ["sdk/compose.ts"],
|
|
1651
|
+
emitting_commands: ["*"],
|
|
1652
|
+
canonical_code: "manifest_unknown_key",
|
|
1653
|
+
aliases: [],
|
|
1654
|
+
},
|
|
1631
1655
|
{
|
|
1632
1656
|
code: "merge_conflict_markers_detected",
|
|
1633
1657
|
meaning: "Merge conflict markers detected condition.",
|
|
@@ -1642,4 +1666,4 @@ export const PM_ERROR_CODE_CATALOG_PART_1 = [
|
|
|
1642
1666
|
},
|
|
1643
1667
|
];
|
|
1644
1668
|
//# sourceMappingURL=generated-error-code-catalog-part-1.js.map
|
|
1645
|
-
//# debugId=
|
|
1669
|
+
//# debugId=d188630b-bf34-53f4-a93e-78698013994e
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Generated partition 2 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]="43b9f478-8b90-5644-aa06-b6787514ffa1")}catch(e){}}();
|
|
4
4
|
export const PM_ERROR_CODE_CATALOG_PART_2 = [
|
|
5
5
|
{
|
|
6
6
|
code: "merge_decisions_unreviewed",
|
|
@@ -219,6 +219,18 @@ export const PM_ERROR_CODE_CATALOG_PART_2 = [
|
|
|
219
219
|
canonical_code: "no_update_fields",
|
|
220
220
|
aliases: [],
|
|
221
221
|
},
|
|
222
|
+
{
|
|
223
|
+
code: "no_version_bounds_declared",
|
|
224
|
+
meaning: "No version bounds declared condition.",
|
|
225
|
+
stability: "provisional",
|
|
226
|
+
exit_code: 1,
|
|
227
|
+
class: "generic_failure",
|
|
228
|
+
recovery: "Inspect the structured error guidance and retry the suggested command.",
|
|
229
|
+
sources: ["sdk/compose.ts"],
|
|
230
|
+
emitting_commands: ["*"],
|
|
231
|
+
canonical_code: "no_version_bounds_declared",
|
|
232
|
+
aliases: [],
|
|
233
|
+
},
|
|
222
234
|
{
|
|
223
235
|
code: "npm_package_not_found",
|
|
224
236
|
meaning: "Npm package not found condition.",
|
|
@@ -1665,4 +1677,4 @@ export const PM_ERROR_CODE_CATALOG_PART_2 = [
|
|
|
1665
1677
|
},
|
|
1666
1678
|
];
|
|
1667
1679
|
//# sourceMappingURL=generated-error-code-catalog-part-2.js.map
|
|
1668
|
-
//# debugId=
|
|
1680
|
+
//# debugId=43b9f478-8b90-5644-aa06-b6787514ffa1
|
|
@@ -1,14 +1,10 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @module sdk/assurance-action
|
|
3
|
-
*
|
|
4
|
-
* Normalizes the assurance action vocabulary once for CLI, SDK, and MCP hosts.
|
|
5
|
-
*/
|
|
6
1
|
import type { GlobalOptions } from "../../core/shared/command-types.js";
|
|
7
2
|
import { type AssuranceBundleMutationReceipt, type AssuranceDeclaration, type AssuranceGateVerdict, type AssuranceMutationReceipt } from "./assurance.js";
|
|
8
3
|
import { type AssuranceDerivedProposal, type AssurancePreset, type AssurancePresetId } from "./assurance-presets.js";
|
|
9
4
|
import { type CreateAssuranceWorkspaceContextOptions } from "./assurance-runtime.js";
|
|
5
|
+
import { type DefectChangeRiskReport } from "./defect-recurrence.js";
|
|
10
6
|
/** Assurance registry and evaluation verbs shared by every transport. */
|
|
11
|
-
export declare const ASSURANCE_ACTIONS: readonly ["list", "show", "put", "remove", "run", "verdicts", "presets", "apply", "derive", "promote"];
|
|
7
|
+
export declare const ASSURANCE_ACTIONS: readonly ["list", "show", "put", "remove", "run", "verdicts", "presets", "apply", "derive", "promote", "risk"];
|
|
12
8
|
/** Assurance declaration kinds shared by every transport. */
|
|
13
9
|
export declare const ASSURANCE_DECLARATION_KINDS: readonly ["measurement", "assertion", "gate"];
|
|
14
10
|
/** Assurance action verb. */
|
|
@@ -56,7 +52,7 @@ export interface AssuranceActionRuntimeOptions {
|
|
|
56
52
|
workspace?: Omit<CreateAssuranceWorkspaceContextOptions, "tree_id" | "trigger">;
|
|
57
53
|
}
|
|
58
54
|
/** Result union returned by transport-neutral assurance execution. */
|
|
59
|
-
export type AssuranceActionResult = AssuranceDeclaration | AssuranceMutationReceipt | AssuranceGateVerdict | AssuranceBundleMutationReceipt | AssurancePreset | {
|
|
55
|
+
export type AssuranceActionResult = AssuranceDeclaration | AssuranceMutationReceipt | AssuranceGateVerdict | AssuranceBundleMutationReceipt | AssurancePreset | DefectChangeRiskReport | {
|
|
60
56
|
items: AssuranceDerivedProposal[];
|
|
61
57
|
count: number;
|
|
62
58
|
applied?: AssuranceBundleMutationReceipt;
|