@unbrained/pm-cli 2026.8.18 → 2026.8.20
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 +35 -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 +18 -13
- package/dist/cli/register-mutation.js +8 -8
- package/dist/cli/register-operations.js +6 -6
- package/dist/cli/register-structured-mutation.d.ts +2 -0
- package/dist/cli/register-structured-mutation.js +29 -6
- package/dist/cli-bundle/bundle-manifest.json +151 -143
- package/dist/cli-bundle/chunks/{chunk-UYCLQVL2.js → chunk-2RDVGYWE.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-BSK2IN3C.js → chunk-4GB2LTOQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RZQTVMRQ.js → chunk-7BRF2BX2.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-BLVQHFSY.js +35 -0
- package/dist/cli-bundle/chunks/chunk-CU25EQVV.js +5 -0
- package/dist/cli-bundle/chunks/chunk-K3EN3LK2.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-YRGOLZA7.js → chunk-L4LGPBJU.js} +49 -49
- package/dist/cli-bundle/chunks/chunk-RS3IV2R6.js +197 -0
- package/dist/cli-bundle/chunks/chunk-TSMWLCHS.js +3 -0
- package/dist/cli-bundle/chunks/chunk-US2ZQW2M.js +77 -0
- package/dist/cli-bundle/chunks/{chunk-5UZZAJKR.js → chunk-XYDDWBZN.js} +2 -2
- package/dist/cli-bundle/chunks/register-list-query-JSAQCVOC.js +11 -0
- package/dist/cli-bundle/chunks/register-mutation-XJPAW63D.js +20 -0
- package/dist/cli-bundle/chunks/register-operations-DSOSB2XQ.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-PPPEF3SN.js → register-setup-QUR6QL2C.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-325UXIO7.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-5L7M4AI7.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ODOVCP45.js → chunk-6AHG2YW7.js} +44 -44
- package/dist/cli-bundle/focused-chunks/chunk-AZBACT5T.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-TN4AE665.js → chunk-BLJCGGID.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-FUREQLQN.js +18 -0
- package/dist/cli-bundle/focused-chunks/{chunk-M62NO7EI.js → chunk-G3C5ERXG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-K43KKAFS.js → chunk-GXWQBE3T.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-UI6AJ5TD.js → chunk-JWKEDZJI.js} +3 -3
- package/dist/cli-bundle/focused-chunks/chunk-KYZ6JGPL.js +155 -0
- package/dist/cli-bundle/focused-chunks/{chunk-EX6MKP2X.js → chunk-M32HFIQB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-EUEGXZ2A.js → chunk-OM65KHGF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-Q47EX4DI.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-V5XTGLK7.js → chunk-RIHDMCUM.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-T4ZFY7ZJ.js +16 -0
- package/dist/cli-bundle/focused-chunks/chunk-TDR5OGG3.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-UGSS4F5X.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-Z3PLWSGM.js +2 -0
- 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 +41 -41
- 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/output/mutation-projection.js +26 -2
- package/dist/core/shared/constants.d.ts +1 -5
- package/dist/core/shared/constants.js +3 -81
- package/dist/core/shared/errors.d.ts +2 -0
- package/dist/core/shared/errors.js +2 -2
- package/dist/core/shared/item-metadata-contract.d.ts +14 -0
- package/dist/core/shared/item-metadata-contract.js +90 -0
- package/dist/core/store/item-store.d.ts +60 -0
- package/dist/core/store/item-store.js +22 -5
- package/dist/sdk/agent/closed-domain-contracts.d.ts +25 -0
- package/dist/sdk/agent/closed-domain-contracts.js +140 -0
- package/dist/sdk/agent/refusal-closure.d.ts +53 -0
- package/dist/sdk/agent/refusal-closure.js +134 -0
- package/dist/sdk/agent/refusal-reachability.d.ts +27 -1
- package/dist/sdk/agent/refusal-reachability.js +26 -2
- package/dist/sdk/agent-capability-contracts.d.ts +13 -0
- package/dist/sdk/agent-capability-contracts.js +101 -9
- 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/completeness.js +8 -2
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +4 -2
- package/dist/sdk/cli-contracts/enum-contracts.js +16 -6
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +7 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +84 -8
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.d.ts +72 -0
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +340 -0
- package/dist/sdk/cli-contracts/grammar-contracts.d.ts +83 -2
- package/dist/sdk/cli-contracts/grammar-contracts.js +618 -2
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +15 -4
- package/dist/sdk/cli-contracts/runtime-contracts.js +47 -13
- 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/tool-schema.js +7 -2
- package/dist/sdk/cli-contracts.d.ts +4 -3
- package/dist/sdk/cli-contracts.js +6 -5
- 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 +3 -0
- package/dist/sdk/contracts.js +5 -2
- package/dist/sdk/core.d.ts +1 -1
- package/dist/sdk/core.js +3 -3
- 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 +206 -2
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +244 -40
- package/dist/sdk/index.d.ts +11 -7
- package/dist/sdk/index.js +10 -6
- package/dist/sdk/init-agent-guidance.d.ts +5 -3
- package/dist/sdk/init-agent-guidance.js +69 -9
- package/dist/sdk/lifecycle/mcp-actions.d.ts +18 -0
- package/dist/sdk/lifecycle/mcp-actions.js +52 -0
- package/dist/sdk/lifecycle/reopen.d.ts +44 -0
- package/dist/sdk/lifecycle/reopen.js +69 -0
- package/dist/sdk/lifecycle/update.d.ts +31 -0
- package/dist/sdk/lifecycle/update.js +95 -13
- package/dist/sdk/output-projection.d.ts +2 -0
- package/dist/sdk/output-projection.js +11 -5
- package/dist/sdk/query/get.d.ts +1 -1
- package/dist/sdk/query/get.js +34 -49
- package/dist/sdk/query/list.d.ts +7 -21
- package/dist/sdk/query/list.js +44 -44
- package/dist/sdk/query/projection-contracts.d.ts +33 -0
- package/dist/sdk/query/projection-contracts.js +185 -0
- package/dist/sdk/query/search-contracts.d.ts +3 -2
- package/dist/sdk/query/search-contracts.js +30 -85
- package/dist/sdk/query/search.d.ts +15 -0
- package/dist/sdk/query/search.js +32 -6
- 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-primitives.d.ts +1 -1
- package/dist/sdk/runtime-primitives.js +3 -3
- package/dist/sdk/runtime.d.ts +6 -0
- package/dist/sdk/runtime.js +25 -17
- package/dist/sdk/similarity.d.ts +13 -0
- package/dist/sdk/similarity.js +32 -6
- package/dist/sdk/workspace-snapshot.d.ts +2 -0
- package/dist/sdk/workspace-snapshot.js +10 -2
- package/docs/COMMANDS.md +29 -5
- package/docs/OUTPUT_PROJECTION_CONTRACTS.md +11 -2
- package/docs/README.md +1 -0
- package/docs/READ_OUTPUT_CONTRACTS.md +10 -6
- package/docs/RECURRENCE_RECOVERY_CONTRACTS.md +114 -0
- package/docs/SDK.md +16 -2
- package/docs/SDK_CONTEXT_INTEGRITY.md +45 -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/docs/performance/sdk-entrypoint-import-costs.md +14 -21
- package/marketplace.json +2 -2
- package/package.json +9 -7
- 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 +950 -24
- 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-GNFAFIJI.js +0 -77
- 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/chunk-SARFF5H5.js +0 -3
- package/dist/cli-bundle/chunks/register-list-query-I23LALEE.js +0 -11
- 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-3TKWMNKF.js +0 -18
- package/dist/cli-bundle/focused-chunks/chunk-5AF3ZBNB.js +0 -155
- 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
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module sdk/agent/refusal-closure
|
|
3
|
+
*
|
|
4
|
+
* Scores whether a structured refusal contains enough executable context for
|
|
5
|
+
* an agent to recover without another discovery round trip.
|
|
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]="0ec8c375-e58e-5ce4-b0aa-8a8a4dfa0778")}catch(e){}}();
|
|
9
|
+
import { EXIT_CODE } from "../../core/shared/constants.js";
|
|
10
|
+
/** Compare a refusal with its optional SDK-owned exact contract. */
|
|
11
|
+
function listContractObservationFindings(observation) {
|
|
12
|
+
return [
|
|
13
|
+
observation.expected_error_code !== undefined &&
|
|
14
|
+
observation.error_code !== observation.expected_error_code
|
|
15
|
+
? {
|
|
16
|
+
code: "error_code_mismatch",
|
|
17
|
+
probe_id: observation.probe_id,
|
|
18
|
+
detail: `Expected error code ${observation.expected_error_code}, received ${observation.error_code ?? "<missing>"}.`,
|
|
19
|
+
}
|
|
20
|
+
: undefined,
|
|
21
|
+
observation.expected_allowed_values !== undefined &&
|
|
22
|
+
JSON.stringify([...observation.allowed_values].sort()) !==
|
|
23
|
+
JSON.stringify([...observation.expected_allowed_values].sort())
|
|
24
|
+
? {
|
|
25
|
+
code: "incomplete_allowed_values",
|
|
26
|
+
probe_id: observation.probe_id,
|
|
27
|
+
detail: "The refusal's accepted domain differs from the SDK-owned domain contract.",
|
|
28
|
+
}
|
|
29
|
+
: undefined,
|
|
30
|
+
observation.expected_suggested_retry_args !== undefined &&
|
|
31
|
+
(observation.suggested_retry_args?.length ?? 0) === 0
|
|
32
|
+
? {
|
|
33
|
+
code: "missing_suggested_retry_args",
|
|
34
|
+
probe_id: observation.probe_id,
|
|
35
|
+
detail: "The refusal omitted shell-free suggested retry arguments.",
|
|
36
|
+
}
|
|
37
|
+
: undefined,
|
|
38
|
+
observation.expected_suggested_retry_args !== undefined &&
|
|
39
|
+
(observation.suggested_retry_args?.length ?? 0) > 0 &&
|
|
40
|
+
JSON.stringify(observation.suggested_retry_args) !==
|
|
41
|
+
JSON.stringify(observation.expected_suggested_retry_args)
|
|
42
|
+
? {
|
|
43
|
+
code: "suggested_retry_args_mismatch",
|
|
44
|
+
probe_id: observation.probe_id,
|
|
45
|
+
detail: "The refusal's suggested retry arguments differ from the SDK-owned contract.",
|
|
46
|
+
}
|
|
47
|
+
: undefined,
|
|
48
|
+
];
|
|
49
|
+
}
|
|
50
|
+
/** Return every closure defect contributed by one unique observation. */
|
|
51
|
+
function listObservationFindings(observation) {
|
|
52
|
+
return [
|
|
53
|
+
observation.exit_code !== EXIT_CODE.USAGE
|
|
54
|
+
? {
|
|
55
|
+
code: "non_refusal_exit",
|
|
56
|
+
probe_id: observation.probe_id,
|
|
57
|
+
detail: `${observation.entrypoint} returned exit code ${observation.exit_code}; a structured usage refusal must return ${EXIT_CODE.USAGE}.`,
|
|
58
|
+
}
|
|
59
|
+
: undefined,
|
|
60
|
+
observation.allowed_values_required !== false &&
|
|
61
|
+
observation.allowed_values.length === 0
|
|
62
|
+
? {
|
|
63
|
+
code: "missing_allowed_values",
|
|
64
|
+
probe_id: observation.probe_id,
|
|
65
|
+
detail: "The refusal omitted its complete accepted value domain.",
|
|
66
|
+
}
|
|
67
|
+
: undefined,
|
|
68
|
+
observation.allowed_values.includes(observation.rejected_value)
|
|
69
|
+
? {
|
|
70
|
+
code: "accepted_rejected_value",
|
|
71
|
+
probe_id: observation.probe_id,
|
|
72
|
+
detail: `${observation.rejected_value} is both rejected and advertised as allowed.`,
|
|
73
|
+
}
|
|
74
|
+
: undefined,
|
|
75
|
+
observation.suggested_retry.trim().length === 0
|
|
76
|
+
? {
|
|
77
|
+
code: "missing_suggested_retry",
|
|
78
|
+
probe_id: observation.probe_id,
|
|
79
|
+
detail: "The refusal omitted an executable suggested retry.",
|
|
80
|
+
}
|
|
81
|
+
: undefined,
|
|
82
|
+
!observation.retry_succeeded
|
|
83
|
+
? {
|
|
84
|
+
code: "retry_failed",
|
|
85
|
+
probe_id: observation.probe_id,
|
|
86
|
+
detail: "The advertised suggested retry did not succeed.",
|
|
87
|
+
}
|
|
88
|
+
: undefined,
|
|
89
|
+
...listContractObservationFindings(observation),
|
|
90
|
+
];
|
|
91
|
+
}
|
|
92
|
+
/** Score structured closed-domain refusals and executable retries. */
|
|
93
|
+
export function scorePmRefusalClosure(observations) {
|
|
94
|
+
const findings = [];
|
|
95
|
+
const seen = new Set();
|
|
96
|
+
let closedProbeCount = 0;
|
|
97
|
+
if (observations.length === 0) {
|
|
98
|
+
findings.push({
|
|
99
|
+
code: "empty_corpus",
|
|
100
|
+
probe_id: "corpus",
|
|
101
|
+
detail: "At least one real refusal observation is required.",
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
for (const observation of observations) {
|
|
105
|
+
if (seen.has(observation.probe_id)) {
|
|
106
|
+
findings.push({
|
|
107
|
+
code: "duplicate_probe",
|
|
108
|
+
probe_id: observation.probe_id,
|
|
109
|
+
detail: `${observation.probe_id} was supplied more than once.`,
|
|
110
|
+
});
|
|
111
|
+
continue;
|
|
112
|
+
}
|
|
113
|
+
seen.add(observation.probe_id);
|
|
114
|
+
const findingCount = findings.length;
|
|
115
|
+
for (const finding of listObservationFindings(observation)) {
|
|
116
|
+
if (finding !== undefined)
|
|
117
|
+
findings.push(finding);
|
|
118
|
+
}
|
|
119
|
+
if (findings.length === findingCount)
|
|
120
|
+
closedProbeCount += 1;
|
|
121
|
+
}
|
|
122
|
+
findings.sort((left, right) => left.probe_id !== right.probe_id
|
|
123
|
+
? left.probe_id.localeCompare(right.probe_id)
|
|
124
|
+
: left.code.localeCompare(right.code));
|
|
125
|
+
return {
|
|
126
|
+
ok: findings.length === 0,
|
|
127
|
+
probe_count: seen.size,
|
|
128
|
+
closed_probe_count: closedProbeCount,
|
|
129
|
+
closure_fraction: seen.size === 0 ? 0 : closedProbeCount / seen.size,
|
|
130
|
+
findings,
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
//# sourceMappingURL=refusal-closure.js.map
|
|
134
|
+
//# debugId=0ec8c375-e58e-5ce4-b0aa-8a8a4dfa0778
|
|
@@ -37,7 +37,7 @@ export type PmRecoveryReferenceKind = (typeof PM_RECOVERY_REFERENCE_KINDS)[numbe
|
|
|
37
37
|
/** Behavioral promise attached to a recovery reference. */
|
|
38
38
|
export type PmRecoveryReferenceSemantics = "recovery" | "replacement" | "behavior_preserving";
|
|
39
39
|
/** Literal envelope fields recognized as recovery-reference producers. */
|
|
40
|
-
export declare const PM_RECOVERY_REFERENCE_FIELDS: readonly ("restore_with" | "migration_hint" | "migration_hints" | "suggested_retry" | "next_best_command" | "fallback_candidates" | "examples" | "next_steps" | "suggested_next_steps" | "candidate_commands" | "
|
|
40
|
+
export declare const PM_RECOVERY_REFERENCE_FIELDS: readonly ("restore_with" | "migration_hint" | "migration_hints" | "suggested_retry" | "next_best_command" | "fallback_candidates" | "examples" | "next_steps" | "suggested_next_steps" | "candidate_commands" | "example" | "candidate_command" | "next_step" | "retry_command")[];
|
|
41
41
|
/** One source file supplied to the producer-census analyzer. */
|
|
42
42
|
export interface PmRecoveryProducerSource {
|
|
43
43
|
/** Repository-relative source path. */
|
|
@@ -139,6 +139,28 @@ export interface PmRecoveryReferenceReport {
|
|
|
139
139
|
/** Stable, sorted conformance findings. */
|
|
140
140
|
findings: PmRecoveryReferenceFinding[];
|
|
141
141
|
}
|
|
142
|
+
/** Per-kind runtime evidence; counts do not claim one observation per source location. */
|
|
143
|
+
export interface PmRecoveryProducerRuntimeCoverage {
|
|
144
|
+
/** Typed recovery-reference kind. */
|
|
145
|
+
kind: PmRecoveryReferenceKind;
|
|
146
|
+
/** Literal source producers discovered for the kind. */
|
|
147
|
+
source_producers: number;
|
|
148
|
+
/** Distinct runtime values observed for the kind. */
|
|
149
|
+
runtime_values: number;
|
|
150
|
+
}
|
|
151
|
+
/** Unified per-kind source-census and runtime-value coverage receipt. */
|
|
152
|
+
export interface PmRecoveryProducerRuntimeReport {
|
|
153
|
+
/** Whether every source-declared kind emitted at least one runtime value. */
|
|
154
|
+
ok: boolean;
|
|
155
|
+
/** Source producer denominator. */
|
|
156
|
+
source_producer_count: number;
|
|
157
|
+
/** Distinct runtime-value denominator. */
|
|
158
|
+
runtime_value_count: number;
|
|
159
|
+
/** Stable per-kind source and runtime coverage. */
|
|
160
|
+
coverage_by_kind: PmRecoveryProducerRuntimeCoverage[];
|
|
161
|
+
/** Kinds with source producers but no runtime evidence. */
|
|
162
|
+
missing_runtime_kinds: PmRecoveryReferenceKind[];
|
|
163
|
+
}
|
|
142
164
|
/** Census syntax-parsed structured-envelope producers without executing source code. */
|
|
143
165
|
export declare function censusPmRecoveryReferenceProducers(sources: readonly PmRecoveryProducerSource[]): PmRecoveryProducerCensusReport;
|
|
144
166
|
/** Derive typed obligations from every recognized recovery field in an emitted envelope. */
|
|
@@ -147,3 +169,7 @@ export declare function derivePmRecoveryReferenceObligations(probeId: string, en
|
|
|
147
169
|
export declare function verifyPmRefusalReachability(catalog: readonly PmErrorCodeContract[], observations: readonly PmRefusalProbeObservation[]): PmRefusalReachabilityReport;
|
|
148
170
|
/** Verify executable and declared-path proof for emitted recovery references. */
|
|
149
171
|
export declare function verifyPmRecoveryReferences(obligations: readonly PmRecoveryReferenceObligation[], observations: readonly PmRecoveryReferenceObservation[]): PmRecoveryReferenceReport;
|
|
172
|
+
/** Join source-census counts to distinct emitted runtime values by typed kind. */
|
|
173
|
+
export declare function verifyPmRecoveryProducerRuntimeCoverage(census: PmRecoveryProducerCensusReport, obligations: readonly PmRecoveryReferenceObligation[]): PmRecoveryProducerRuntimeReport;
|
|
174
|
+
/** Honest kind-level name for the compatibility implementation above. */
|
|
175
|
+
export declare const verifyPmRecoveryKindRuntimeCoverage: typeof verifyPmRecoveryProducerRuntimeCoverage;
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* generated public error-code catalog.
|
|
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]="4f4e7daa-14aa-5dad-8a30-79a4d76159d4")}catch(e){}}();
|
|
9
9
|
import * as nodeModule from "node:module";
|
|
10
10
|
/** Recovery-reference kinds emitted by structured refusal envelopes. */
|
|
11
11
|
export const PM_RECOVERY_REFERENCE_KINDS = [
|
|
@@ -566,5 +566,29 @@ export function verifyPmRecoveryReferences(obligations, observations) {
|
|
|
566
566
|
findings,
|
|
567
567
|
};
|
|
568
568
|
}
|
|
569
|
+
/** Join source-census counts to distinct emitted runtime values by typed kind. */
|
|
570
|
+
export function verifyPmRecoveryProducerRuntimeCoverage(census, obligations) {
|
|
571
|
+
const runtimeValuesByKind = new Map(PM_RECOVERY_REFERENCE_KINDS.map((kind) => [kind, new Set()]));
|
|
572
|
+
for (const obligation of obligations) {
|
|
573
|
+
runtimeValuesByKind.get(obligation.kind).add(obligation.value);
|
|
574
|
+
}
|
|
575
|
+
const coverageByKind = PM_RECOVERY_REFERENCE_KINDS.map((kind) => ({
|
|
576
|
+
kind,
|
|
577
|
+
source_producers: census.producer_count_by_kind[kind],
|
|
578
|
+
runtime_values: runtimeValuesByKind.get(kind).size,
|
|
579
|
+
}));
|
|
580
|
+
const missingRuntimeKinds = coverageByKind
|
|
581
|
+
.filter(({ source_producers: sourceProducers, runtime_values: runtimeValues }) => sourceProducers > 0 && runtimeValues === 0)
|
|
582
|
+
.map(({ kind }) => kind);
|
|
583
|
+
return {
|
|
584
|
+
ok: census.ok && missingRuntimeKinds.length === 0,
|
|
585
|
+
source_producer_count: census.producer_count,
|
|
586
|
+
runtime_value_count: coverageByKind.reduce((total, { runtime_values: runtimeValues }) => total + runtimeValues, 0),
|
|
587
|
+
coverage_by_kind: coverageByKind,
|
|
588
|
+
missing_runtime_kinds: missingRuntimeKinds,
|
|
589
|
+
};
|
|
590
|
+
}
|
|
591
|
+
/** Honest kind-level name for the compatibility implementation above. */
|
|
592
|
+
export const verifyPmRecoveryKindRuntimeCoverage = verifyPmRecoveryProducerRuntimeCoverage;
|
|
569
593
|
//# sourceMappingURL=refusal-reachability.js.map
|
|
570
|
-
//# debugId=
|
|
594
|
+
//# debugId=4f4e7daa-14aa-5dad-8a30-79a4d76159d4
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
/** Visibility tiers shared by CLI help, completions, docs, extensions, and MCP. */
|
|
2
2
|
export type PmCommandVisibilityTier = "core" | "standard" | "full" | "internal";
|
|
3
|
+
/** Stable capability families shared by every agent-facing command surface. */
|
|
4
|
+
export type PmCommandCapabilityFamily = "workspace" | "intake" | "context" | "lifecycle" | "evidence" | "graph" | "quality" | "automation" | "extensions" | "internal";
|
|
3
5
|
/** One command's canonical agent-surface visibility declaration. */
|
|
4
6
|
export interface PmCommandVisibilityContract {
|
|
5
7
|
/** Canonical command path. */
|
|
@@ -7,6 +9,13 @@ export interface PmCommandVisibilityContract {
|
|
|
7
9
|
/** Minimum surface tier that advertises the command. */
|
|
8
10
|
tier: PmCommandVisibilityTier;
|
|
9
11
|
}
|
|
12
|
+
/** Complete command capability contract with visibility and family ownership. */
|
|
13
|
+
export interface PmCommandCapabilityContract extends PmCommandVisibilityContract {
|
|
14
|
+
/** Exactly one stable capability family used to group the command. */
|
|
15
|
+
family: PmCommandCapabilityFamily;
|
|
16
|
+
}
|
|
17
|
+
/** Resolve one command's stable capability family. */
|
|
18
|
+
export declare function resolvePmCommandCapabilityFamily(command: string): PmCommandCapabilityFamily;
|
|
10
19
|
/**
|
|
11
20
|
* Canonical visibility contract for every built-in command.
|
|
12
21
|
*
|
|
@@ -14,11 +23,15 @@ export interface PmCommandVisibilityContract {
|
|
|
14
23
|
* surface. Internal worker/helper paths are appended below and never advertised
|
|
15
24
|
* by normal help or completion projections.
|
|
16
25
|
*/
|
|
26
|
+
export declare const PM_COMMAND_CAPABILITY_CONTRACTS: readonly PmCommandCapabilityContract[];
|
|
27
|
+
/** Backward-compatible tier-only projection of the capability contract. */
|
|
17
28
|
export declare const PM_COMMAND_VISIBILITY_CONTRACTS: readonly PmCommandVisibilityContract[];
|
|
18
29
|
/** Resolve one command's declared tier; extension commands default to standard. */
|
|
19
30
|
export declare function resolvePmCommandVisibilityTier(command: string, extensionTier?: PmCommandVisibilityTier): PmCommandVisibilityTier;
|
|
20
31
|
/** Return commands visible at a requested tier, preserving contract order. */
|
|
21
32
|
export declare function listPmCommandsForTier(tier: Exclude<PmCommandVisibilityTier, "internal">): string[];
|
|
33
|
+
/** Return commands in one capability family, preserving contract order. */
|
|
34
|
+
export declare function listPmCommandsForFamily(family: PmCommandCapabilityFamily): string[];
|
|
22
35
|
/** MCP profile names accepted by the server and embedding hosts. */
|
|
23
36
|
export type PmMcpToolProfile = "core" | "standard" | "full" | "custom";
|
|
24
37
|
/** Mapping from one narrow MCP tool to the command contract that tiers it. */
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* surfaces from one public SDK contract.
|
|
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]="5e77c121-35a2-57d1-9a3e-f33447535c03")}catch(e){}}();
|
|
9
9
|
import { PM_CORE_COMMAND_NAMES } from "./cli-contracts/enum-contracts.js";
|
|
10
10
|
const CORE_COMMANDS = new Set([
|
|
11
11
|
"claim",
|
|
@@ -46,6 +46,87 @@ const STANDARD_COMMANDS = new Set([
|
|
|
46
46
|
"schema",
|
|
47
47
|
"test",
|
|
48
48
|
]);
|
|
49
|
+
const COMMANDS_BY_FAMILY = Object.freeze({
|
|
50
|
+
workspace: new Set([
|
|
51
|
+
"config",
|
|
52
|
+
"gc",
|
|
53
|
+
"health",
|
|
54
|
+
"init",
|
|
55
|
+
"merge",
|
|
56
|
+
"profile",
|
|
57
|
+
"schema",
|
|
58
|
+
"telemetry",
|
|
59
|
+
"workspace",
|
|
60
|
+
]),
|
|
61
|
+
intake: new Set(["copy", "create", "focus", "item", "restore"]),
|
|
62
|
+
context: new Set([
|
|
63
|
+
"activity",
|
|
64
|
+
"aggregate",
|
|
65
|
+
"context",
|
|
66
|
+
"ctx",
|
|
67
|
+
"duplicates",
|
|
68
|
+
"eval",
|
|
69
|
+
"get",
|
|
70
|
+
"help",
|
|
71
|
+
"list",
|
|
72
|
+
"list-all",
|
|
73
|
+
"list-blocked",
|
|
74
|
+
"list-canceled",
|
|
75
|
+
"list-closed",
|
|
76
|
+
"list-draft",
|
|
77
|
+
"list-in-progress",
|
|
78
|
+
"list-open",
|
|
79
|
+
"next",
|
|
80
|
+
"search",
|
|
81
|
+
"stats",
|
|
82
|
+
]),
|
|
83
|
+
lifecycle: new Set([
|
|
84
|
+
"claim",
|
|
85
|
+
"close",
|
|
86
|
+
"close-many",
|
|
87
|
+
"close-task",
|
|
88
|
+
"delete",
|
|
89
|
+
"pause-task",
|
|
90
|
+
"item-reopen",
|
|
91
|
+
"release",
|
|
92
|
+
"start-task",
|
|
93
|
+
"update",
|
|
94
|
+
"update-many",
|
|
95
|
+
]),
|
|
96
|
+
evidence: new Set([
|
|
97
|
+
"append",
|
|
98
|
+
"comments",
|
|
99
|
+
"docs",
|
|
100
|
+
"events",
|
|
101
|
+
"files",
|
|
102
|
+
"history",
|
|
103
|
+
"history-author-acknowledge",
|
|
104
|
+
"history-compact",
|
|
105
|
+
"history-redact",
|
|
106
|
+
"history-repair",
|
|
107
|
+
"learnings",
|
|
108
|
+
"notes",
|
|
109
|
+
]),
|
|
110
|
+
graph: new Set(["deps", "graph", "plan"]),
|
|
111
|
+
quality: new Set(["assurance", "contracts", "test", "test-all", "validate"]),
|
|
112
|
+
automation: new Set(["event", "meet", "remind"]),
|
|
113
|
+
});
|
|
114
|
+
const EXTENSION_COMMANDS = new Set([
|
|
115
|
+
"extension",
|
|
116
|
+
"install",
|
|
117
|
+
"package",
|
|
118
|
+
"packages",
|
|
119
|
+
"upgrade",
|
|
120
|
+
]);
|
|
121
|
+
/** Resolve one command's stable capability family. */
|
|
122
|
+
export function resolvePmCommandCapabilityFamily(command) {
|
|
123
|
+
const normalized = command.trim().toLowerCase();
|
|
124
|
+
for (const [family, commands] of Object.entries(COMMANDS_BY_FAMILY)) {
|
|
125
|
+
if (commands.has(normalized))
|
|
126
|
+
return family;
|
|
127
|
+
}
|
|
128
|
+
return EXTENSION_COMMANDS.has(normalized) ? "extensions" : "internal";
|
|
129
|
+
}
|
|
49
130
|
/**
|
|
50
131
|
* Canonical visibility contract for every built-in command.
|
|
51
132
|
*
|
|
@@ -53,32 +134,39 @@ const STANDARD_COMMANDS = new Set([
|
|
|
53
134
|
* surface. Internal worker/helper paths are appended below and never advertised
|
|
54
135
|
* by normal help or completion projections.
|
|
55
136
|
*/
|
|
56
|
-
export const
|
|
57
|
-
...PM_CORE_COMMAND_NAMES.map((command) => ({
|
|
137
|
+
export const PM_COMMAND_CAPABILITY_CONTRACTS = Object.freeze([
|
|
138
|
+
...PM_CORE_COMMAND_NAMES.flatMap((command) => command === "item" ? ["item-reopen"] : [command]).map((command) => ({
|
|
58
139
|
command,
|
|
59
140
|
tier: CORE_COMMANDS.has(command)
|
|
60
141
|
? "core"
|
|
61
142
|
: STANDARD_COMMANDS.has(command)
|
|
62
143
|
? "standard"
|
|
63
144
|
: "full",
|
|
145
|
+
family: resolvePmCommandCapabilityFamily(command),
|
|
64
146
|
})),
|
|
65
147
|
{
|
|
66
148
|
command: "completion-statuses",
|
|
67
149
|
tier: "internal",
|
|
150
|
+
family: "internal",
|
|
68
151
|
},
|
|
69
152
|
{
|
|
70
153
|
command: "completion-tags",
|
|
71
154
|
tier: "internal",
|
|
155
|
+
family: "internal",
|
|
72
156
|
},
|
|
73
157
|
{
|
|
74
158
|
command: "completion-types",
|
|
75
159
|
tier: "internal",
|
|
160
|
+
family: "internal",
|
|
76
161
|
},
|
|
77
162
|
{
|
|
78
163
|
command: "test-runs-worker",
|
|
79
164
|
tier: "internal",
|
|
165
|
+
family: "internal",
|
|
80
166
|
},
|
|
81
167
|
]);
|
|
168
|
+
/** Backward-compatible tier-only projection of the capability contract. */
|
|
169
|
+
export const PM_COMMAND_VISIBILITY_CONTRACTS = PM_COMMAND_CAPABILITY_CONTRACTS;
|
|
82
170
|
const TIER_ORDER = {
|
|
83
171
|
core: 0,
|
|
84
172
|
standard: 1,
|
|
@@ -88,13 +176,17 @@ const TIER_ORDER = {
|
|
|
88
176
|
const COMMAND_TIER_BY_NAME = new Map(PM_COMMAND_VISIBILITY_CONTRACTS.map(({ command, tier }) => [command, tier]));
|
|
89
177
|
/** Resolve one command's declared tier; extension commands default to standard. */
|
|
90
178
|
export function resolvePmCommandVisibilityTier(command, extensionTier = "standard") {
|
|
91
|
-
return COMMAND_TIER_BY_NAME.get(command.trim().toLowerCase()) ?? extensionTier;
|
|
179
|
+
return (COMMAND_TIER_BY_NAME.get(command.trim().toLowerCase()) ?? extensionTier);
|
|
92
180
|
}
|
|
93
181
|
/** Return commands visible at a requested tier, preserving contract order. */
|
|
94
182
|
export function listPmCommandsForTier(tier) {
|
|
95
183
|
const maximum = TIER_ORDER[tier];
|
|
96
184
|
return PM_COMMAND_VISIBILITY_CONTRACTS.filter((entry) => entry.tier !== "internal" && TIER_ORDER[entry.tier] <= maximum).map((entry) => entry.command);
|
|
97
185
|
}
|
|
186
|
+
/** Return commands in one capability family, preserving contract order. */
|
|
187
|
+
export function listPmCommandsForFamily(family) {
|
|
188
|
+
return PM_COMMAND_CAPABILITY_CONTRACTS.filter((entry) => entry.family === family).map((entry) => entry.command);
|
|
189
|
+
}
|
|
98
190
|
/** Mapping from one narrow MCP tool to the command contract that tiers it. */
|
|
99
191
|
export const PM_MCP_TOOL_COMMAND_CONTRACTS = Object.freeze({
|
|
100
192
|
pm_append: "append",
|
|
@@ -217,17 +309,17 @@ export const PM_MCP_PROMPT_CONTRACTS = Object.freeze([
|
|
|
217
309
|
]);
|
|
218
310
|
/** Render the generated command visibility reference used by docs drift gates. */
|
|
219
311
|
export function renderPmCommandVisibilityMarkdown() {
|
|
220
|
-
const rows =
|
|
312
|
+
const rows = PM_COMMAND_CAPABILITY_CONTRACTS.map(({ command, tier, family }) => `| \`${command}\` | ${tier} | ${family} |`);
|
|
221
313
|
return [
|
|
222
314
|
"# Generated agent command surface",
|
|
223
315
|
"",
|
|
224
|
-
"This file is generated from `
|
|
316
|
+
"This file is generated from `PM_COMMAND_CAPABILITY_CONTRACTS`. Do not edit it manually.",
|
|
225
317
|
"",
|
|
226
|
-
"| Command | Minimum visibility tier |",
|
|
227
|
-
"| --- | --- |",
|
|
318
|
+
"| Command | Minimum visibility tier | Capability family |",
|
|
319
|
+
"| --- | --- | --- |",
|
|
228
320
|
...rows,
|
|
229
321
|
"",
|
|
230
322
|
].join("\n");
|
|
231
323
|
}
|
|
232
324
|
//# sourceMappingURL=agent-capability-contracts.js.map
|
|
233
|
-
//# debugId=
|
|
325
|
+
//# debugId=5e77c121-35a2-57d1-9a3e-f33447535c03
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* are intentionally absent from default help and completion discovery.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
!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]="
|
|
13
|
+
!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]="9afc5057-afcd-5d6c-a4c1-c2883640fc50")}catch(e){}}();
|
|
14
14
|
export const PM_COMMAND_ALIAS_CONTRACTS = [
|
|
15
15
|
...[
|
|
16
16
|
["fetch", "get"],
|
|
@@ -29,6 +29,22 @@ export const PM_COMMAND_ALIAS_CONTRACTS = [
|
|
|
29
29
|
registration: "bootstrap",
|
|
30
30
|
owner: "pm-pbyu",
|
|
31
31
|
})),
|
|
32
|
+
...[
|
|
33
|
+
["extension list", "extension catalog"],
|
|
34
|
+
["extension scaffold", "extension init"],
|
|
35
|
+
["package list", "package catalog"],
|
|
36
|
+
["package scaffold", "package init"],
|
|
37
|
+
["packages list", "packages catalog"],
|
|
38
|
+
["packages scaffold", "packages init"],
|
|
39
|
+
].map(([alias, canonical]) => ({
|
|
40
|
+
alias,
|
|
41
|
+
canonical,
|
|
42
|
+
canonical_argv: canonical.split(" "),
|
|
43
|
+
lifecycle: "permanent",
|
|
44
|
+
hidden: false,
|
|
45
|
+
registration: "commander",
|
|
46
|
+
owner: "pm-ya7x55",
|
|
47
|
+
})),
|
|
32
48
|
{
|
|
33
49
|
alias: "list-all",
|
|
34
50
|
canonical: "list",
|
|
@@ -67,4 +83,4 @@ export function renderPmCommandAliasMigrationHint(contract) {
|
|
|
67
83
|
return `Deprecated command \`${contract.alias}\`; use \`pm ${contract.canonical_argv.join(" ")}\`.`;
|
|
68
84
|
}
|
|
69
85
|
//# sourceMappingURL=command-aliases.js.map
|
|
70
|
-
//# debugId=
|
|
86
|
+
//# debugId=9afc5057-afcd-5d6c-a4c1-c2883640fc50
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Creates commander option registration contracts using the validated operation inputs. */
|
|
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]="93ce68bd-3140-5361-a6d0-bc60c7304a29")}catch(e){}}();
|
|
4
4
|
export const CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS = [
|
|
5
5
|
{
|
|
6
6
|
target: "title",
|
|
@@ -501,17 +501,29 @@ export const CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS = [
|
|
|
501
501
|
},
|
|
502
502
|
{
|
|
503
503
|
target: "file",
|
|
504
|
-
keys: ["file"],
|
|
504
|
+
keys: ["file", "linkedFile"],
|
|
505
505
|
option: "--file <value>",
|
|
506
506
|
description: "Seed linked file entry (CSV/markdown pairs or - for stdin; repeatable)",
|
|
507
507
|
repeatable: true,
|
|
508
|
+
aliasOptions: [
|
|
509
|
+
{
|
|
510
|
+
option: "--linked-file <value>",
|
|
511
|
+
description: "Alias for --file (cross-surface name)",
|
|
512
|
+
},
|
|
513
|
+
],
|
|
508
514
|
},
|
|
509
515
|
{
|
|
510
516
|
target: "test",
|
|
511
|
-
keys: ["test"],
|
|
517
|
+
keys: ["test", "linkedTest"],
|
|
512
518
|
option: "--test <value>",
|
|
513
519
|
description: "Seed linked test entry (CSV/markdown pairs or - for stdin; repeatable)",
|
|
514
520
|
repeatable: true,
|
|
521
|
+
aliasOptions: [
|
|
522
|
+
{
|
|
523
|
+
option: "--linked-test <value>",
|
|
524
|
+
description: "Alias for --test (cross-surface name)",
|
|
525
|
+
},
|
|
526
|
+
],
|
|
515
527
|
},
|
|
516
528
|
{
|
|
517
529
|
target: "doc",
|
|
@@ -989,17 +1001,29 @@ export const UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS = [
|
|
|
989
1001
|
},
|
|
990
1002
|
{
|
|
991
1003
|
target: "file",
|
|
992
|
-
keys: ["file"],
|
|
1004
|
+
keys: ["file", "linkedFile"],
|
|
993
1005
|
option: "--file <value>",
|
|
994
1006
|
description: "Append linked file path=<value>,scope=<project|global>,note=<text> (also accepts markdown pairs and - for stdin; repeatable)",
|
|
995
1007
|
repeatable: true,
|
|
1008
|
+
aliasOptions: [
|
|
1009
|
+
{
|
|
1010
|
+
option: "--linked-file <value>",
|
|
1011
|
+
description: "Alias for --file (cross-surface name)",
|
|
1012
|
+
},
|
|
1013
|
+
],
|
|
996
1014
|
},
|
|
997
1015
|
{
|
|
998
1016
|
target: "test",
|
|
999
|
-
keys: ["test"],
|
|
1017
|
+
keys: ["test", "linkedTest"],
|
|
1000
1018
|
option: "--test <value>",
|
|
1001
1019
|
description: "Append linked test command=<value>,path=<value>,scope=<project|global>,timeout_seconds=<n>,pm_context_mode=<schema|tracker|auto> (also accepts markdown pairs and - for stdin; repeatable)",
|
|
1002
1020
|
repeatable: true,
|
|
1021
|
+
aliasOptions: [
|
|
1022
|
+
{
|
|
1023
|
+
option: "--linked-test <value>",
|
|
1024
|
+
description: "Alias for --test (cross-surface name)",
|
|
1025
|
+
},
|
|
1026
|
+
],
|
|
1003
1027
|
},
|
|
1004
1028
|
{
|
|
1005
1029
|
target: "doc",
|
|
@@ -1055,4 +1079,4 @@ export const UPDATE_COMMANDER_STRING_OPTION_CONTRACTS = UPDATE_COMMANDER_OPTION_
|
|
|
1055
1079
|
/** Public contract for update commander repeatable option contracts, shared by SDK and presentation-layer consumers. */
|
|
1056
1080
|
export const UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS = UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS.filter((entry) => entry.repeatable === true).map((entry) => ({ target: entry.target, keys: entry.keys }));
|
|
1057
1081
|
//# sourceMappingURL=commander-mutation-options.js.map
|
|
1058
|
-
//# debugId=
|
|
1082
|
+
//# debugId=93ce68bd-3140-5361-a6d0-bc60c7304a29
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** Public contract for list commander string option contracts, shared by SDK and presentation-layer consumers. */
|
|
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]="5f56c4ef-58e1-5cf6-a10e-dfa29b9ad3e8")}catch(e){}}();
|
|
4
4
|
export const LIST_COMMANDER_STRING_OPTION_CONTRACTS = [
|
|
5
5
|
{ target: "status", keys: ["status"] },
|
|
6
6
|
{ target: "type", keys: ["type"] },
|
|
@@ -147,13 +147,14 @@ export function readFirstValueFromCommanderOptions(options, contract) {
|
|
|
147
147
|
}
|
|
148
148
|
/** Implements read string array from commander options for the public runtime surface of this module. */
|
|
149
149
|
export function readStringArrayFromCommanderOptions(options, contract) {
|
|
150
|
+
const values = [];
|
|
150
151
|
for (const key of contract.keys) {
|
|
151
152
|
const candidate = options[key];
|
|
152
153
|
if (Array.isArray(candidate)) {
|
|
153
|
-
|
|
154
|
+
values.push(...candidate.filter((value) => typeof value === "string"));
|
|
154
155
|
}
|
|
155
156
|
}
|
|
156
|
-
return undefined;
|
|
157
|
+
return values.length > 0 ? values : undefined;
|
|
157
158
|
}
|
|
158
159
|
//# sourceMappingURL=commander-types.js.map
|
|
159
|
-
//# debugId=
|
|
160
|
+
//# debugId=5f56c4ef-58e1-5cf6-a10e-dfa29b9ad3e8
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* a hand-picked test list.
|
|
8
8
|
*/
|
|
9
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]="
|
|
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]="f4e5eed5-94c2-536a-8685-e20b735de480")}catch(e){}}();
|
|
11
11
|
import { PM_TOOL_ACTIONS } from "./enum-contracts.js";
|
|
12
12
|
import { resolveSubcommandFlagContractsForCommand, } from "./flag-contracts.js";
|
|
13
13
|
import { pmToolActionParameterKeys } from "./tool-schema.js";
|
|
@@ -63,6 +63,8 @@ const CLI_CONFIG_SHORTHAND_FLAGS = new Set([
|
|
|
63
63
|
]);
|
|
64
64
|
const SDK_TRANSPORT_PARAMETERS = new Set([
|
|
65
65
|
"action",
|
|
66
|
+
"fullChangedFields",
|
|
67
|
+
"idOnly",
|
|
66
68
|
"path",
|
|
67
69
|
"pmExecutable",
|
|
68
70
|
"timeoutMs",
|
|
@@ -87,6 +89,7 @@ const ACTION_POSITIONAL_PARAMETERS = {
|
|
|
87
89
|
event: { title: "<title>" },
|
|
88
90
|
files: { lookupPath: "lookup <path...>" },
|
|
89
91
|
meet: { title: "<title>" },
|
|
92
|
+
"item-reopen": { id: "<id>", reason: "<reason>" },
|
|
90
93
|
merge: { subcommand: "<subcommand>" },
|
|
91
94
|
remind: { title: "<title>" },
|
|
92
95
|
workspace: {
|
|
@@ -188,6 +191,9 @@ function actionCommand(action) {
|
|
|
188
191
|
if (action.startsWith("package-")) {
|
|
189
192
|
return `package ${action.slice("package-".length)}`;
|
|
190
193
|
}
|
|
194
|
+
if (action.startsWith("item-")) {
|
|
195
|
+
return `item ${action.slice("item-".length)}`;
|
|
196
|
+
}
|
|
191
197
|
return action;
|
|
192
198
|
}
|
|
193
199
|
function parameterForFlag(action, flag) {
|
|
@@ -384,4 +390,4 @@ export function analyzeSdkCliParameterCompleteness(source = {}) {
|
|
|
384
390
|
});
|
|
385
391
|
}
|
|
386
392
|
//# sourceMappingURL=completeness.js.map
|
|
387
|
-
//# debugId=
|
|
393
|
+
//# debugId=f4e5eed5-94c2-536a-8685-e20b735de480
|
|
@@ -30,17 +30,19 @@ export declare const GRAPH_SUBCOMMAND_VALUES: readonly ["ancestors", "descendant
|
|
|
30
30
|
export type GraphSubcommand = (typeof GRAPH_SUBCOMMAND_VALUES)[number];
|
|
31
31
|
/** Nested lifecycle verbs flattened by SDK and MCP package actions. */
|
|
32
32
|
export declare const PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS: readonly ["init", "install", "uninstall", "explore", "manage", "describe", "reload", "doctor", "catalog", "adopt", "adopt-all", "activate", "deactivate"];
|
|
33
|
+
/** Noun-first item lifecycle verbs flattened for SDK and MCP dispatch. */
|
|
34
|
+
export declare const PM_ITEM_ACTION_SUBCOMMANDS: readonly ["reopen"];
|
|
33
35
|
/** CLI-only presentation commands intentionally omitted from programmatic actions. */
|
|
34
36
|
export declare const PM_CLI_ONLY_TOOL_ACTION_WAIVERS: {
|
|
35
37
|
readonly help: "Commander help rendering has no SDK operation result.";
|
|
36
|
-
readonly item: "The item namespace only groups lifecycle subcommands already exposed as actions.";
|
|
37
38
|
readonly packages: "The plural package alias only renders package-oriented help.";
|
|
38
39
|
};
|
|
39
40
|
type PmCoreCommandName = (typeof PM_CORE_COMMAND_NAMES)[number];
|
|
40
41
|
type PmCliOnlyToolAction = keyof typeof PM_CLI_ONLY_TOOL_ACTION_WAIVERS;
|
|
41
42
|
type PmExtensionPackageAction = `${"extension" | "package"}-${(typeof PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS)[number]}`;
|
|
43
|
+
type PmItemAction = `item-${(typeof PM_ITEM_ACTION_SUBCOMMANDS)[number]}`;
|
|
42
44
|
/** Restricts pm tool action values accepted by command, SDK, and storage contracts. */
|
|
43
|
-
export type PmToolAction = Exclude<PmCoreCommandName, PmCliOnlyToolAction> | PmExtensionPackageAction;
|
|
45
|
+
export type PmToolAction = Exclude<PmCoreCommandName, PmCliOnlyToolAction | "item"> | PmExtensionPackageAction | PmItemAction;
|
|
44
46
|
/**
|
|
45
47
|
* Public pm tool actions derived from the CLI vocabulary. Nested extension and
|
|
46
48
|
* package verbs are flattened for transports that expose one action string.
|