@unbrained/pm-cli 2026.8.4 → 2026.8.6
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 +53 -13
- package/dist/cli/error-guidance.js +4 -4
- package/dist/cli/main.js +12 -37
- package/dist/cli/register-setup.d.ts +1 -1
- package/dist/cli/register-setup.js +46 -20
- package/dist/cli/register-structured-mutation.d.ts +2 -0
- package/dist/cli/register-structured-mutation.js +124 -12
- package/dist/cli-bundle/bundle-manifest.json +397 -397
- package/dist/cli-bundle/chunks/append-XAJ5Z4XS.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-QVO3VTA4.js → chunk-343QETLI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q5F6OI7C.js → chunk-3KFVGGRE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6S7I3UKV.js → chunk-3ZJRFYY2.js} +19 -19
- package/dist/cli-bundle/chunks/{chunk-NFF3JAQR.js → chunk-4AVFKHHC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5H47J5FG.js → chunk-4OVGQW22.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-D2MBVMVE.js → chunk-5PBP2ZP3.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-5ZKQPA44.js +2 -0
- package/dist/cli-bundle/chunks/chunk-A3XQ7VPU.js +2 -0
- package/dist/cli-bundle/chunks/chunk-AJE3AHPD.js +8 -0
- package/dist/cli-bundle/chunks/{chunk-2POYGY53.js → chunk-AOBDLU4T.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PYYPQLHC.js → chunk-AYRUGRNS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-QMWUL66F.js → chunk-BP6EMEDP.js} +5 -5
- package/dist/cli-bundle/chunks/{chunk-UVZREFZU.js → chunk-C3YABSJK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RB65T4RX.js → chunk-CA3BURYF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-KIKLF2W4.js → chunk-D7I3TUGV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PQXEB7W4.js → chunk-DQGJ2RWT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OB7TRZ2G.js → chunk-DWOAOZHZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-SVDH5CHC.js → chunk-E7BFPLUZ.js} +4 -4
- package/dist/cli-bundle/chunks/{chunk-CGY5I2GO.js → chunk-F4NREH3G.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DCJ6CM6F.js → chunk-FDBRXV25.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NM5G7RLU.js → chunk-GU3TSEHD.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-HS7OVAUN.js +164 -0
- package/dist/cli-bundle/chunks/{chunk-CU5ENFNP.js → chunk-JFZIS6JF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-GOICHIX4.js → chunk-JQ4NZ5EB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HE3DZFN4.js → chunk-L6LGKJX3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BLINBTMX.js → chunk-M357ZCOR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NRDKVOUE.js → chunk-M4VEE3FK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HTYC76A4.js → chunk-MCS73BKB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BKMZTZYL.js → chunk-MDTH7SAE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-H6FITE7D.js → chunk-NE5VRDAI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NPUJ7OLK.js → chunk-OXY3SJ3N.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-PECV7L5T.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-KH4GVBMC.js → chunk-Q3VOP62W.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-FQ4EFFDU.js → chunk-QJ7C3JIW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-VH2EAGUG.js → chunk-R6LSRGPS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HQ2WU7OY.js → chunk-R6RKEYYW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-PA5XRN2A.js → chunk-RAFUN7IX.js} +4 -4
- package/dist/cli-bundle/chunks/chunk-RUAU5OSH.js +2 -0
- package/dist/cli-bundle/chunks/chunk-SD3YXU2U.js +56 -0
- package/dist/cli-bundle/chunks/{chunk-JMKVCQSE.js → chunk-SV3YQ4RY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-B5ZLCD5Z.js → chunk-SVV3DQES.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-J4EPW4GT.js → chunk-SXECIECW.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-T45OHXDW.js +8 -0
- package/dist/cli-bundle/chunks/{chunk-NH35JNK5.js → chunk-TPKDJ5WL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZSH4GNBH.js → chunk-UVVXHGYS.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-V663653R.js +20 -0
- package/dist/cli-bundle/chunks/{chunk-5PZGZMPG.js → chunk-WSI5KZQJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3XZYTRPC.js → chunk-XPOQQJTX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UJHUR3LZ.js → chunk-YCCDXBNU.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-ZFBWCKYF.js +2 -0
- package/dist/cli-bundle/chunks/close-DI66JMSB.js +2 -0
- package/dist/cli-bundle/chunks/close-many-VFKT6U3O.js +2 -0
- package/dist/cli-bundle/chunks/comments-E73HIEZJ.js +2 -0
- package/dist/cli-bundle/chunks/copy-WBYVLCPC.js +2 -0
- package/dist/cli-bundle/chunks/{create-RLLCBCXM.js → create-TG67IVFI.js} +2 -2
- package/dist/cli-bundle/chunks/delete-6XKUVVQN.js +2 -0
- package/dist/cli-bundle/chunks/{deps-J4ONTF4X.js → deps-AJUGP2OH.js} +2 -2
- package/dist/cli-bundle/chunks/{docs-YL2DJ4WD.js → docs-QOCLDRKJ.js} +2 -2
- package/dist/cli-bundle/chunks/{files-NGNAIYKK.js → files-3ST5TY64.js} +2 -2
- package/dist/cli-bundle/chunks/focus-R2AWS63Y.js +2 -0
- package/dist/cli-bundle/chunks/{history-compact-HW62K5XP.js → history-compact-7BJFML4S.js} +2 -2
- package/dist/cli-bundle/chunks/{history-redact-HVBKUJOW.js → history-redact-WJN3HYXR.js} +2 -2
- package/dist/cli-bundle/chunks/{history-repair-OPNBH5JJ.js → history-repair-XDNZUB7F.js} +2 -2
- package/dist/cli-bundle/chunks/{learnings-F36PZXT6.js → learnings-SZMUPVNA.js} +2 -2
- package/dist/cli-bundle/chunks/{profile-N3XMWBM7.js → profile-KL53JIAC.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-BKGHBI7Y.js → register-list-query-QH7ONPKU.js} +2 -2
- package/dist/cli-bundle/chunks/register-mutation-OCRQNZK4.js +20 -0
- package/dist/cli-bundle/chunks/register-operations-HIBJXRGB.js +2 -0
- package/dist/cli-bundle/chunks/register-setup-QWBQ6HBS.js +2 -0
- package/dist/cli-bundle/chunks/restore-FXA5QPM7.js +2 -0
- package/dist/cli-bundle/chunks/{schema-4PJQMGUY.js → schema-QJ27OTRV.js} +2 -2
- package/dist/cli-bundle/chunks/update-7GBO4SXG.js +2 -0
- package/dist/cli-bundle/chunks/update-many-VF6ZKQUO.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-27DK4A5O.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-4JC3AOGS.js +8 -0
- package/dist/cli-bundle/focused-chunks/chunk-6KDHXURF.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-74CWP3A4.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-7AZDTGPA.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-7YTZ7A4E.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ONIX2KKW.js → chunk-CL3NB7VW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-EAXXF2HW.js +4 -0
- package/dist/cli-bundle/focused-chunks/{chunk-L6A4NVQC.js → chunk-EYO4F74Z.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-GEYU23YS.js +153 -0
- package/dist/cli-bundle/focused-chunks/{chunk-DQ4PLKEE.js → chunk-GIERI4YU.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-GSW2Y7VZ.js +5 -0
- package/dist/cli-bundle/focused-chunks/{chunk-WVGJAD7L.js → chunk-LKQXXO62.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-UFCPSWIL.js → chunk-MBBMTDD3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-OYTK4VNH.js → chunk-ME4XVOBJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-RO5BQFG3.js → chunk-N7QN3NE6.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-QL5H3AQH.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-TQMFQYXR.js +29 -0
- package/dist/cli-bundle/focused-chunks/{chunk-SQXVGHMH.js → chunk-XNVXIQ4B.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-BOGRY7M6.js → chunk-YHDCGUIW.js} +10 -10
- package/dist/cli-bundle/focused-chunks/{chunk-K37BB4JL.js → chunk-YLPZHWX7.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 +1 -1
- package/dist/cli-bundle/sdk-core.js +28 -28
- 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 +1 -1
- 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 +1 -1
- package/dist/core/extensions/activation-summary.d.ts +4 -0
- package/dist/core/extensions/activation-summary.js +5 -2
- package/dist/core/extensions/contribution-inventory.d.ts +1 -0
- package/dist/core/extensions/contribution-inventory.js +35 -2
- package/dist/core/extensions/extension-hook-runtime.js +5 -3
- package/dist/core/extensions/extension-types.d.ts +18 -1
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/loader.js +8 -13
- package/dist/core/extensions/preflight-ownership.d.ts +5 -0
- package/dist/core/extensions/preflight-ownership.js +42 -0
- package/dist/core/item/item-format.js +14 -20
- package/dist/core/shared/constants.js +3 -2
- package/dist/core/store/item-store.js +2 -2
- package/dist/core/store/settings.js +2 -2
- package/dist/mcp/server.js +12 -6
- package/dist/mcp/tool-definitions.js +14 -7
- package/dist/sdk/cli-contracts/agent-output-contracts.d.ts +18 -18
- package/dist/sdk/cli-contracts/agent-output-contracts.js +51 -23
- package/dist/sdk/cli-contracts/commander-mutation-options.js +26 -2
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +4 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +34 -2
- package/dist/sdk/cli-contracts/registration-helpers.js +4 -2
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +10 -2
- package/dist/sdk/cli-contracts/runtime-contracts.js +21 -5
- package/dist/sdk/cli-contracts/tool-schema.js +4 -2
- package/dist/sdk/cli-contracts.d.ts +2 -2
- package/dist/sdk/cli-contracts.js +4 -4
- package/dist/sdk/cli-program.js +3 -3
- package/dist/sdk/compose.d.ts +2 -2
- package/dist/sdk/compose.js +7 -2
- package/dist/sdk/contracts.d.ts +1 -0
- package/dist/sdk/contracts.js +3 -2
- package/dist/sdk/define.d.ts +3 -1
- package/dist/sdk/define.js +3 -8
- package/dist/sdk/dependency-provenance.d.ts +2 -0
- package/dist/sdk/dependency-provenance.js +7 -3
- package/dist/sdk/error-code-catalog.d.ts +23 -0
- package/dist/sdk/error-code-catalog.js +25 -5
- package/dist/sdk/extension/install-sources.d.ts +43 -5
- package/dist/sdk/extension/install-sources.js +36 -2
- package/dist/sdk/extension/migrations.d.ts +114 -0
- package/dist/sdk/extension/migrations.js +175 -0
- package/dist/sdk/extension/scaffold.js +14 -9
- package/dist/sdk/extension/source-resolution.d.ts +50 -0
- package/dist/sdk/extension/source-resolution.js +66 -0
- package/dist/sdk/extension.d.ts +5 -1
- package/dist/sdk/extension.js +24 -26
- package/dist/sdk/generated-error-code-catalog.js +499 -3
- package/dist/sdk/governance/health.js +11 -2
- package/dist/sdk/graph/governance.js +3 -3
- package/dist/sdk/graph/remediation.js +3 -3
- package/dist/sdk/graph/run.js +4 -8
- package/dist/sdk/index.d.ts +7 -2
- package/dist/sdk/index.js +9 -4
- package/dist/sdk/item-transaction.d.ts +51 -6
- package/dist/sdk/item-transaction.js +132 -22
- package/dist/sdk/lifecycle/create.d.ts +4 -0
- package/dist/sdk/lifecycle/create.js +26 -10
- package/dist/sdk/lifecycle-policy.d.ts +9 -0
- package/dist/sdk/lifecycle-policy.js +22 -9
- package/dist/sdk/merge/driver.js +6 -3
- package/dist/sdk/output-contracts.d.ts +67 -0
- package/dist/sdk/output-contracts.js +173 -0
- package/dist/sdk/package-import-adapters.js +2 -2
- package/dist/sdk/package-migrations.d.ts +10 -0
- package/dist/sdk/package-migrations.js +21 -0
- package/dist/sdk/runtime.d.ts +2 -0
- package/dist/sdk/runtime.js +6 -2
- package/dist/sdk/structured-mutations.d.ts +23 -0
- package/dist/sdk/structured-mutations.js +219 -10
- package/dist/sdk/workspace-snapshot.js +58 -12
- package/dist/sdk/workspace.js +30 -4
- package/docs/COMMANDS.md +49 -10
- package/docs/EXTENSIONS.md +3 -3
- package/docs/EXTENSION_LIFECYCLE.md +46 -0
- package/docs/MERGE_SAFETY.md +2 -0
- package/docs/PR_REVIEW_LOOP.md +10 -4
- package/docs/README.md +23 -22
- package/docs/RELEASING.md +36 -23
- package/docs/SCRIPTING.md +32 -9
- package/docs/SDK.md +122 -14
- package/docs/SELF_DESCRIBING_CONTEXT_CONTRACTS.md +13 -0
- package/docs/TESTING.md +25 -0
- package/docs/examples/sdk-contract-consumer/README.md +11 -1
- package/docs/examples/sdk-contract-consumer/package.json +2 -1
- package/docs/examples/sdk-contract-consumer/parse-receipt.mjs +22 -0
- package/marketplace.json +2 -2
- package/package.json +5 -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-codex/.codex-plugin/plugin.json +1 -1
- package/sdk/public-surface.json +508 -32
- package/dist/cli-bundle/chunks/append-DHBRLHHS.js +0 -2
- package/dist/cli-bundle/chunks/chunk-2INN52SU.js +0 -8
- package/dist/cli-bundle/chunks/chunk-377OOXUF.js +0 -55
- package/dist/cli-bundle/chunks/chunk-6RSK4IFN.js +0 -20
- package/dist/cli-bundle/chunks/chunk-ASJJKA57.js +0 -2
- package/dist/cli-bundle/chunks/chunk-IYAVULRN.js +0 -2
- package/dist/cli-bundle/chunks/chunk-JDPKBV5P.js +0 -2
- package/dist/cli-bundle/chunks/chunk-RRQBHQOV.js +0 -2
- package/dist/cli-bundle/chunks/chunk-SULWTPQO.js +0 -8
- package/dist/cli-bundle/chunks/chunk-V5K52PYW.js +0 -164
- package/dist/cli-bundle/chunks/chunk-XBLOD5TZ.js +0 -2
- package/dist/cli-bundle/chunks/close-VLHNN6YB.js +0 -2
- package/dist/cli-bundle/chunks/close-many-LSJNZKU6.js +0 -2
- package/dist/cli-bundle/chunks/comments-AAIA6A6X.js +0 -2
- package/dist/cli-bundle/chunks/copy-Z7YMLEHN.js +0 -2
- package/dist/cli-bundle/chunks/delete-KNOHHQJM.js +0 -2
- package/dist/cli-bundle/chunks/focus-LFRCGALV.js +0 -2
- package/dist/cli-bundle/chunks/register-mutation-GU3DCECN.js +0 -20
- package/dist/cli-bundle/chunks/register-operations-PTWH727R.js +0 -2
- package/dist/cli-bundle/chunks/register-setup-KWV6UD77.js +0 -2
- package/dist/cli-bundle/chunks/restore-4HZSLILR.js +0 -2
- package/dist/cli-bundle/chunks/update-E6LPS5IV.js +0 -2
- package/dist/cli-bundle/chunks/update-many-OSIC6KRO.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2VIIXOAD.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-5MTKO7TV.js +0 -153
- package/dist/cli-bundle/focused-chunks/chunk-6GIZK7VQ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-AOP2WIZZ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-C2QSL62X.js +0 -28
- package/dist/cli-bundle/focused-chunks/chunk-CL75YW32.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-E7OFMWGT.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-I5F5UK3Q.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-QM2BIVK7.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-T5TSY36R.js +0 -5
- package/dist/cli-bundle/focused-chunks/chunk-VT6BF2IX.js +0 -2
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* output policy without coupling package authors to pm's renderer.
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
9
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="23b3a820-f205-506b-9507-dbd60087f62e")}catch(e){}}();
|
|
10
10
|
import { PM_CORE_COMMAND_NAMES } from "./enum-contracts.js";
|
|
11
11
|
/** Stable degradation stages applied when an output exceeds its token budget. */
|
|
12
12
|
export const PM_OUTPUT_DEGRADATION_STEPS = [
|
|
@@ -82,6 +82,39 @@ const DEFAULT_MAX_ESTIMATED_TOKENS = {
|
|
|
82
82
|
discovery: 3_000,
|
|
83
83
|
governance: 6_000,
|
|
84
84
|
};
|
|
85
|
+
const JSON_BUDGET_NUMERATOR = 3;
|
|
86
|
+
const JSON_BUDGET_DENOMINATOR = 2;
|
|
87
|
+
/** Infer the conservative workload class for a core or package command. */
|
|
88
|
+
export function inferPmOutputBudgetClass(command) {
|
|
89
|
+
const [rootCommand = ""] = command.trim().split(/\s+/u);
|
|
90
|
+
return MUTATION_COMMANDS.has(rootCommand)
|
|
91
|
+
? "mutation"
|
|
92
|
+
: DISCOVERY_COMMANDS.has(rootCommand)
|
|
93
|
+
? "discovery"
|
|
94
|
+
: GOVERNANCE_COMMANDS.has(rootCommand)
|
|
95
|
+
? "governance"
|
|
96
|
+
: "read";
|
|
97
|
+
}
|
|
98
|
+
/** Build the generated default budget for a core or package command. */
|
|
99
|
+
export function createPmCommandOutputBudget(command, budgetClass = inferPmOutputBudgetClass(command)) {
|
|
100
|
+
const normalizedCommand = command.trim().replace(/\s+/gu, " ");
|
|
101
|
+
if (normalizedCommand.length === 0) {
|
|
102
|
+
throw new TypeError("command must be a non-empty command path");
|
|
103
|
+
}
|
|
104
|
+
const toonBudget = DEFAULT_MAX_ESTIMATED_TOKENS[budgetClass];
|
|
105
|
+
return definePmCommandOutputBudget({
|
|
106
|
+
command: normalizedCommand,
|
|
107
|
+
budget_class: budgetClass,
|
|
108
|
+
default_max_estimated_tokens: toonBudget,
|
|
109
|
+
default_max_estimated_tokens_by_format: {
|
|
110
|
+
toon: toonBudget,
|
|
111
|
+
json: Math.ceil((toonBudget * JSON_BUDGET_NUMERATOR) / JSON_BUDGET_DENOMINATOR),
|
|
112
|
+
},
|
|
113
|
+
degradation_ladder: PM_OUTPUT_DEGRADATION_STEPS,
|
|
114
|
+
allows_unbounded_opt_out: true,
|
|
115
|
+
token_estimate: "ceil(utf8_bytes / 4)",
|
|
116
|
+
});
|
|
117
|
+
}
|
|
85
118
|
/**
|
|
86
119
|
* Declares one budget contract while preserving literal command metadata for
|
|
87
120
|
* package-authored registries and test fixtures. Rejects ceilings that cannot
|
|
@@ -92,35 +125,30 @@ export function definePmCommandOutputBudget(contract) {
|
|
|
92
125
|
contract.default_max_estimated_tokens <= 0) {
|
|
93
126
|
throw new RangeError("default_max_estimated_tokens must be a positive safe integer");
|
|
94
127
|
}
|
|
128
|
+
for (const [format, ceiling] of Object.entries(contract.default_max_estimated_tokens_by_format)) {
|
|
129
|
+
if (!Number.isSafeInteger(ceiling) || ceiling <= 0) {
|
|
130
|
+
throw new RangeError(`default_max_estimated_tokens_by_format.${format} must be a positive safe integer`);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
95
133
|
return contract;
|
|
96
134
|
}
|
|
97
135
|
/** Public default budget contract for every built-in pm command. */
|
|
98
|
-
export const PM_COMMAND_OUTPUT_BUDGET_CONTRACTS = PM_CORE_COMMAND_NAMES.map((command) =>
|
|
99
|
-
const budgetClass = MUTATION_COMMANDS.has(command)
|
|
100
|
-
? "mutation"
|
|
101
|
-
: DISCOVERY_COMMANDS.has(command)
|
|
102
|
-
? "discovery"
|
|
103
|
-
: GOVERNANCE_COMMANDS.has(command)
|
|
104
|
-
? "governance"
|
|
105
|
-
: "read";
|
|
106
|
-
return definePmCommandOutputBudget({
|
|
107
|
-
command,
|
|
108
|
-
budget_class: budgetClass,
|
|
109
|
-
default_max_estimated_tokens: DEFAULT_MAX_ESTIMATED_TOKENS[budgetClass],
|
|
110
|
-
degradation_ladder: PM_OUTPUT_DEGRADATION_STEPS,
|
|
111
|
-
allows_unbounded_opt_out: true,
|
|
112
|
-
token_estimate: "ceil(utf8_bytes / 4)",
|
|
113
|
-
});
|
|
114
|
-
});
|
|
136
|
+
export const PM_COMMAND_OUTPUT_BUDGET_CONTRACTS = PM_CORE_COMMAND_NAMES.map((command) => createPmCommandOutputBudget(command));
|
|
115
137
|
const OUTPUT_BUDGET_BY_COMMAND = new Map(PM_COMMAND_OUTPUT_BUDGET_CONTRACTS.map((contract) => [contract.command, contract]));
|
|
116
|
-
/**
|
|
117
|
-
export function resolvePmCommandOutputBudget(command) {
|
|
118
|
-
const
|
|
119
|
-
|
|
138
|
+
/** Implement built-in lookup with an opt-in generated package fallback. */
|
|
139
|
+
export function resolvePmCommandOutputBudget(command, options = {}) {
|
|
140
|
+
const normalizedCommand = command.trim().replace(/\s+/gu, " ");
|
|
141
|
+
const [rootCommand] = normalizedCommand.split(" ");
|
|
142
|
+
const declared = OUTPUT_BUDGET_BY_COMMAND.get(rootCommand);
|
|
143
|
+
if (declared)
|
|
144
|
+
return { ...declared, command: normalizedCommand };
|
|
145
|
+
return options.generateFallback
|
|
146
|
+
? createPmCommandOutputBudget(normalizedCommand)
|
|
147
|
+
: null;
|
|
120
148
|
}
|
|
121
149
|
/** Estimate conservative token usage from UTF-8 output bytes. */
|
|
122
150
|
export function estimatePmOutputTokens(utf8Bytes) {
|
|
123
151
|
return Math.ceil(Math.max(0, utf8Bytes) / 4);
|
|
124
152
|
}
|
|
125
153
|
//# sourceMappingURL=agent-output-contracts.js.map
|
|
126
|
-
//# debugId=
|
|
154
|
+
//# debugId=23b3a820-f205-506b-9507-dbd60087f62e
|
|
@@ -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]="b0f52c3d-091d-51db-a4c1-bb177414dd7f")}catch(e){}}();
|
|
4
4
|
export const CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS = [
|
|
5
5
|
{
|
|
6
6
|
target: "title",
|
|
@@ -62,6 +62,30 @@ export const CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS = [
|
|
|
62
62
|
option: "--status, -s <value>",
|
|
63
63
|
description: "Item status",
|
|
64
64
|
},
|
|
65
|
+
{
|
|
66
|
+
target: "closeReason",
|
|
67
|
+
keys: ["closeReason", "close_reason"],
|
|
68
|
+
option: "--close-reason <value>",
|
|
69
|
+
description: "Close reason when creating directly in a terminal status",
|
|
70
|
+
aliasOptions: [
|
|
71
|
+
{
|
|
72
|
+
option: "--close_reason <value>",
|
|
73
|
+
description: "Alias for --close-reason",
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
target: "completedAt",
|
|
79
|
+
keys: ["completedAt", "completed_at"],
|
|
80
|
+
option: "--completed-at <value>",
|
|
81
|
+
description: "Actual completion time for a terminal imported item",
|
|
82
|
+
aliasOptions: [
|
|
83
|
+
{
|
|
84
|
+
option: "--completed_at <value>",
|
|
85
|
+
description: "Alias for --completed-at",
|
|
86
|
+
},
|
|
87
|
+
],
|
|
88
|
+
},
|
|
65
89
|
{
|
|
66
90
|
target: "priority",
|
|
67
91
|
keys: ["priority"],
|
|
@@ -1019,4 +1043,4 @@ export const UPDATE_COMMANDER_STRING_OPTION_CONTRACTS = UPDATE_COMMANDER_OPTION_
|
|
|
1019
1043
|
/** Public contract for update commander repeatable option contracts, shared by SDK and presentation-layer consumers. */
|
|
1020
1044
|
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 }));
|
|
1021
1045
|
//# sourceMappingURL=commander-mutation-options.js.map
|
|
1022
|
-
//# debugId=
|
|
1046
|
+
//# debugId=b0f52c3d-091d-51db-a4c1-bb177414dd7f
|
|
@@ -106,6 +106,8 @@ export declare const EXTENSION_ADOPT_ALL_FLAG_CONTRACTS: CliFlagContract[];
|
|
|
106
106
|
export declare const EXTENSION_ACTIVATE_FLAG_CONTRACTS: CliFlagContract[];
|
|
107
107
|
/** Public contract for extension deactivate flag contracts, shared by SDK and presentation-layer consumers. */
|
|
108
108
|
export declare const EXTENSION_DEACTIVATE_FLAG_CONTRACTS: CliFlagContract[];
|
|
109
|
+
/** Public contract for extension migration flag contracts. */
|
|
110
|
+
export declare const EXTENSION_MIGRATE_FLAG_CONTRACTS: CliFlagContract[];
|
|
109
111
|
/** Public contract for extension manage flag contracts, shared by SDK and presentation-layer consumers. */
|
|
110
112
|
export declare const EXTENSION_MANAGE_FLAG_CONTRACTS: CliFlagContract[];
|
|
111
113
|
/** Public contract for extension reload flag contracts, shared by SDK and presentation-layer consumers. */
|
|
@@ -170,6 +172,8 @@ export declare const VALIDATE_FLAG_CONTRACTS: CliFlagContract[];
|
|
|
170
172
|
export declare const CREATE_FLAG_CONTRACTS: CliFlagContract[];
|
|
171
173
|
/** Atomic item-batch flags shared by contracts, help, and completions. */
|
|
172
174
|
export declare const ITEM_MUTATE_FLAG_CONTRACTS: CliFlagContract[];
|
|
175
|
+
/** Atomic item-completion flags shared by contracts, help, and completions. */
|
|
176
|
+
export declare const ITEM_COMPLETE_FLAG_CONTRACTS: CliFlagContract[];
|
|
173
177
|
/** Public contract for copy flag contracts, shared by SDK and presentation-layer consumers. */
|
|
174
178
|
export declare const COPY_FLAG_CONTRACTS: CliFlagContract[];
|
|
175
179
|
/** Public contract for focus flag contracts, shared by SDK and presentation-layer consumers. */
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* flag surface stays single-sourced across the CLI, SDK, and MCP boundaries.
|
|
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]="01e8d488-ce63-54cc-848e-e7842a9d873d")}catch(e){}}();
|
|
11
11
|
import { normalizeUniqueStringList } from "./string-lists.js";
|
|
12
12
|
import { RESERVED_EXTENSION_HOST_FLAGS } from "../../core/extensions/reserved-host-flags.js";
|
|
13
13
|
function normalizeFlagAliasKey(flag) {
|
|
@@ -623,6 +623,11 @@ export const EXTENSION_ADOPT_ALL_FLAG_CONTRACTS = EXTENSION_SCOPE_FLAG_CONTRACTS
|
|
|
623
623
|
export const EXTENSION_ACTIVATE_FLAG_CONTRACTS = EXTENSION_SCOPE_FLAG_CONTRACTS;
|
|
624
624
|
/** Public contract for extension deactivate flag contracts, shared by SDK and presentation-layer consumers. */
|
|
625
625
|
export const EXTENSION_DEACTIVATE_FLAG_CONTRACTS = EXTENSION_SCOPE_FLAG_CONTRACTS;
|
|
626
|
+
/** Public contract for extension migration flag contracts. */
|
|
627
|
+
export const EXTENSION_MIGRATE_FLAG_CONTRACTS = [
|
|
628
|
+
...EXTENSION_SCOPE_FLAG_CONTRACTS,
|
|
629
|
+
{ flag: "--dry-run" },
|
|
630
|
+
];
|
|
626
631
|
/** Public contract for extension manage flag contracts, shared by SDK and presentation-layer consumers. */
|
|
627
632
|
export const EXTENSION_MANAGE_FLAG_CONTRACTS = [
|
|
628
633
|
...EXTENSION_SCOPE_FLAG_CONTRACTS,
|
|
@@ -1032,6 +1037,10 @@ export const CREATE_FLAG_CONTRACTS = [
|
|
|
1032
1037
|
{ flag: "--schedule-preset" },
|
|
1033
1038
|
{ flag: "--schedule_preset" },
|
|
1034
1039
|
{ short: "-s", flag: "--status" },
|
|
1040
|
+
{ flag: "--close-reason" },
|
|
1041
|
+
{ flag: "--close_reason" },
|
|
1042
|
+
{ flag: "--completed-at" },
|
|
1043
|
+
{ flag: "--completed_at" },
|
|
1035
1044
|
{ short: "-p", flag: "--priority" },
|
|
1036
1045
|
{ flag: "--tags", aliases: ["--tag"], list: true },
|
|
1037
1046
|
// NOT list:true — these use Commander's repeatable collector. Marking them
|
|
@@ -1097,6 +1106,27 @@ export const ITEM_MUTATE_FLAG_CONTRACTS = [
|
|
|
1097
1106
|
{ flag: "--lock-wait-ms", value_name: "n" },
|
|
1098
1107
|
{ flag: "--author", value_name: "value" },
|
|
1099
1108
|
];
|
|
1109
|
+
/** Atomic item-completion flags shared by contracts, help, and completions. */
|
|
1110
|
+
export const ITEM_COMPLETE_FLAG_CONTRACTS = [
|
|
1111
|
+
{ flag: "--transaction-id", value_name: "value", required: true },
|
|
1112
|
+
{ flag: "--reason", value_name: "value" },
|
|
1113
|
+
{ flag: "--file", value_name: "value", repeatable: true },
|
|
1114
|
+
{ flag: "--doc", value_name: "value", repeatable: true },
|
|
1115
|
+
{ flag: "--test", value_name: "value", repeatable: true },
|
|
1116
|
+
{ flag: "--comment", value_name: "value", repeatable: true },
|
|
1117
|
+
{ flag: "--note", value_name: "value", repeatable: true },
|
|
1118
|
+
{ flag: "--learning", value_name: "value", repeatable: true },
|
|
1119
|
+
{ flag: "--resolution", value_name: "value" },
|
|
1120
|
+
{ flag: "--expected-result", value_name: "value" },
|
|
1121
|
+
{ flag: "--actual-result", value_name: "value" },
|
|
1122
|
+
{ flag: "--completed-at", value_name: "value" },
|
|
1123
|
+
{ flag: "--validate-close", value_name: "mode" },
|
|
1124
|
+
{ flag: "--lock-ttl-seconds", value_name: "n" },
|
|
1125
|
+
{ flag: "--lock-wait-ms", value_name: "n" },
|
|
1126
|
+
{ flag: "--dry-run" },
|
|
1127
|
+
{ flag: "--force" },
|
|
1128
|
+
{ flag: "--author", value_name: "value" },
|
|
1129
|
+
];
|
|
1100
1130
|
/** Public contract for copy flag contracts, shared by SDK and presentation-layer consumers. */
|
|
1101
1131
|
export const COPY_FLAG_CONTRACTS = [
|
|
1102
1132
|
{ flag: "--title" },
|
|
@@ -1573,6 +1603,7 @@ const SUBCOMMAND_FLAG_CONTRACTS_BY_COMMAND = new Map([
|
|
|
1573
1603
|
["upgrade", UPGRADE_FLAG_CONTRACTS],
|
|
1574
1604
|
["create", CREATE_FLAG_CONTRACTS],
|
|
1575
1605
|
["item mutate", ITEM_MUTATE_FLAG_CONTRACTS],
|
|
1606
|
+
["item complete", ITEM_COMPLETE_FLAG_CONTRACTS],
|
|
1576
1607
|
["copy", COPY_FLAG_CONTRACTS],
|
|
1577
1608
|
["focus", FOCUS_FLAG_CONTRACTS],
|
|
1578
1609
|
["aggregate", AGGREGATE_FLAG_CONTRACTS],
|
|
@@ -1651,6 +1682,7 @@ const EXTENSION_LIFECYCLE_FLAG_CONTRACTS_BY_SUBCOMMAND = new Map([
|
|
|
1651
1682
|
["adopt-all", EXTENSION_ADOPT_ALL_FLAG_CONTRACTS],
|
|
1652
1683
|
["activate", EXTENSION_ACTIVATE_FLAG_CONTRACTS],
|
|
1653
1684
|
["deactivate", EXTENSION_DEACTIVATE_FLAG_CONTRACTS],
|
|
1685
|
+
["migrate", EXTENSION_MIGRATE_FLAG_CONTRACTS],
|
|
1654
1686
|
]);
|
|
1655
1687
|
function normalizeCommandNameForContracts(commandName) {
|
|
1656
1688
|
if (typeof commandName !== "string") {
|
|
@@ -1719,4 +1751,4 @@ export function toCompletionFlagString(flagContracts, includeGlobal = true) {
|
|
|
1719
1751
|
return normalizeUniqueStringList(all).join(" ");
|
|
1720
1752
|
}
|
|
1721
1753
|
//# sourceMappingURL=flag-contracts.js.map
|
|
1722
|
-
//# debugId=
|
|
1754
|
+
//# debugId=01e8d488-ce63-54cc-848e-e7842a9d873d
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Provides CLI runtime support for Registration Helpers.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e520de00-0810-5356-9290-324cf1d3c133")}catch(e){}}();
|
|
8
8
|
import { Option } from "commander";
|
|
9
9
|
import { pathExists, refreshSearchArtifactsForMutation, shouldRunSearchRefreshInForeground, EXIT_CODE, PmCliError, printError, printResult, writeStdout, getSettingsPath, resolvePmRoot, readSettings, runActiveServiceOverride, setActiveCommandResult, } from "../runtime-primitives.js";
|
|
10
10
|
import { ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, NEXT_COMMANDER_STRING_OPTION_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, readFirstValueFromCommanderOptions, readFirstStringFromCommanderOptions, readStringArrayFromCommanderOptions, } from "../cli-contracts.js";
|
|
@@ -293,6 +293,8 @@ export function normalizeCreateOptions(commandOptions, options = {}) {
|
|
|
293
293
|
createMode: readCreateString("createMode"),
|
|
294
294
|
schedulePreset: readCreateString("schedulePreset"),
|
|
295
295
|
status: readCreateString("status"),
|
|
296
|
+
closeReason: readCreateString("closeReason"),
|
|
297
|
+
completedAt: readCreateString("completedAt"),
|
|
296
298
|
priority: readCreateString("priority"),
|
|
297
299
|
tags: readCreateString("tags"),
|
|
298
300
|
addTags: readCreateList("addTags"),
|
|
@@ -967,4 +969,4 @@ export const _testOnly = {
|
|
|
967
969
|
collectMutationItemIds,
|
|
968
970
|
};
|
|
969
971
|
//# sourceMappingURL=registration-helpers.js.map
|
|
970
|
-
//# debugId=
|
|
972
|
+
//# debugId=e520de00-0810-5356-9290-324cf1d3c133
|
|
@@ -5,13 +5,14 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { type GlobalOptions, type ExtensionRegistrationRegistry, type RegisteredExtensionCommandDefinition, type RegisteredExtensionFlagDefinitions, type RuntimeFieldRegistry, readSettings } from "../runtime-primitives.js";
|
|
7
7
|
import { type McpToolContract } from "../../mcp/tool-definitions.js";
|
|
8
|
-
import { PM_TOOL_ACTIONS, type CliFlagContract, type CommanderOptionAliasContract } from "../cli-contracts.js";
|
|
8
|
+
import { PM_TOOL_ACTIONS, type CliFlagContract, type CommanderOptionAliasContract, type PmCommandOutputBudgetContract } from "../cli-contracts.js";
|
|
9
9
|
import { type ListCommandName, type ListProjectionMode } from "../query/list.js";
|
|
10
10
|
import { type PmContextIntentContract } from "../context-intent-contracts.js";
|
|
11
11
|
import { type PmReadOutputSurfaceContract } from "../read-output-contracts.js";
|
|
12
12
|
import { type CliFlagInvocationContract } from "../flag-invocation-contracts.js";
|
|
13
13
|
import { type PmCommandVisibilityTier } from "../agent-capability-contracts.js";
|
|
14
14
|
import type { PmErrorCodeContract } from "../error-code-catalog.js";
|
|
15
|
+
import { type PmCommandOutputEnvelopeContract } from "../output-contracts.js";
|
|
15
16
|
/** Documents the contracts command options payload exchanged by command, SDK, and package integrations. */
|
|
16
17
|
export interface ContractsCommandOptions {
|
|
17
18
|
/** Value that configures or reports action for this contract. */
|
|
@@ -146,6 +147,11 @@ export interface ContractsResult {
|
|
|
146
147
|
read_output_dimensions?: readonly PmReadOutputSurfaceContract[];
|
|
147
148
|
/** Exhaustive stable and provisional machine-readable failure vocabulary. */
|
|
148
149
|
error_codes?: readonly PmErrorCodeContract[];
|
|
150
|
+
/** Format-aware budgets and envelope families for every active command. */
|
|
151
|
+
command_output_contracts?: Array<{
|
|
152
|
+
budget: PmCommandOutputBudgetContract;
|
|
153
|
+
envelope: PmCommandOutputEnvelopeContract;
|
|
154
|
+
}>;
|
|
149
155
|
}
|
|
150
156
|
type PmToolAction = (typeof PM_TOOL_ACTIONS)[number];
|
|
151
157
|
/** Documents the contracts action availability payload exchanged by command, SDK, and package integrations. */
|
|
@@ -209,7 +215,7 @@ interface CommandSummarySurface {
|
|
|
209
215
|
aliases?: string[];
|
|
210
216
|
intent: string;
|
|
211
217
|
flags?: string[];
|
|
212
|
-
default_max_estimated_tokens: number
|
|
218
|
+
default_max_estimated_tokens: number;
|
|
213
219
|
}
|
|
214
220
|
declare function packageOwnedActionForCommand(command: string): string;
|
|
215
221
|
declare function resolveActionCommandPath(action: PmToolAction): string | null;
|
|
@@ -253,6 +259,7 @@ declare function buildRuntimeFieldFlagContracts(fieldRegistry: RuntimeFieldRegis
|
|
|
253
259
|
declare function attachCreateRequiredOptionContracts(schema: Record<string, unknown>, metadata: Record<string, unknown>): Record<string, unknown>;
|
|
254
260
|
declare function readContractsSettings(pmRoot: string, readSettingsFn?: typeof readSettings): Promise<Awaited<ReturnType<typeof readSettings>>>;
|
|
255
261
|
declare function buildCommandSummarySurface(commands: readonly string[]): CommandSummarySurface[];
|
|
262
|
+
declare function buildCommandOutputContracts(commands: readonly string[]): NonNullable<ContractsResult["command_output_contracts"]>;
|
|
256
263
|
/** Implements run contracts for the public runtime surface of this module. */
|
|
257
264
|
export declare function runContracts(options: ContractsCommandOptions, global: GlobalOptions): Promise<ContractsResult>;
|
|
258
265
|
/** Public contract for test only contracts command, shared by SDK and presentation-layer consumers. */
|
|
@@ -261,6 +268,7 @@ export declare const _testOnlyContractsCommand: {
|
|
|
261
268
|
attachCreateRequiredOptionContracts: typeof attachCreateRequiredOptionContracts;
|
|
262
269
|
buildExtensionActionSchemaBranch: typeof buildExtensionActionSchemaBranch;
|
|
263
270
|
buildCommandSummarySurface: typeof buildCommandSummarySurface;
|
|
271
|
+
buildCommandOutputContracts: typeof buildCommandOutputContracts;
|
|
264
272
|
buildRuntimeFieldFlagContracts: typeof buildRuntimeFieldFlagContracts;
|
|
265
273
|
collectActionContractDescriptors: typeof collectActionContractDescriptors;
|
|
266
274
|
collectExtensionCommandContracts: typeof collectExtensionCommandContracts;
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
* Implements the pm contracts command surface and its agent-facing runtime behavior.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="e6dd81d6-95d6-51e6-a0c9-ba7bb5372457")}catch(e){}}();
|
|
8
8
|
import { EXIT_CODE, SETTINGS_DEFAULTS, PmCliError, activateExtensions, getActiveExtensionRegistrations, loadExtensions, pathExists, commandOptionFlagLabel, resolveCommandOptionPolicyState, resolveItemTypeRegistry, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, getSettingsPath, resolvePmRoot, readSettings, } from "../runtime-primitives.js";
|
|
9
9
|
import { buildMcpToolContracts, } from "../../mcp/tool-definitions.js";
|
|
10
|
-
import { ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_FLAG_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, CREATE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, EXTENSION_ACTIVATE_FLAG_CONTRACTS, EXTENSION_ADOPT_ALL_FLAG_CONTRACTS, EXTENSION_ADOPT_FLAG_CONTRACTS, EXTENSION_CATALOG_FLAG_CONTRACTS, EXTENSION_DEACTIVATE_FLAG_CONTRACTS, EXTENSION_DESCRIBE_FLAG_CONTRACTS, EXTENSION_DOCTOR_FLAG_CONTRACTS, EXTENSION_EXPLORE_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, EXTENSION_INIT_FLAG_CONTRACTS, EXTENSION_INSTALL_FLAG_CONTRACTS, EXTENSION_MANAGE_FLAG_CONTRACTS, EXTENSION_RELOAD_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, ITEM_MUTATE_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, MERGE_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, PM_EXTENSION_CAPABILITY_CONTRACTS, PM_EXTENSION_POLICY_MODE_CONTRACTS, PM_EXTENSION_POLICY_SURFACE_CONTRACTS, PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS, PM_EXTENSION_SERVICE_NAME_CONTRACTS, PM_EXTENSION_TRUST_MODE_CONTRACTS, PM_OUTPUT_DEGRADATION_STEPS, PLAN_FLAG_CONTRACTS, PM_CORE_COMMAND_NAMES, PM_TOOL_ACTIONS, PM_TOOL_PARAMETERS_SCHEMA, REINDEX_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, PROFILE_FLAG_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, EVAL_FLAG_CONTRACTS, WORKSPACE_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, compactFlagAliasContracts, resolvePmCommandOutputBudget, } from "../cli-contracts.js";
|
|
10
|
+
import { ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_FLAG_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, CREATE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, EXTENSION_ACTIVATE_FLAG_CONTRACTS, EXTENSION_ADOPT_ALL_FLAG_CONTRACTS, EXTENSION_ADOPT_FLAG_CONTRACTS, EXTENSION_CATALOG_FLAG_CONTRACTS, EXTENSION_DEACTIVATE_FLAG_CONTRACTS, EXTENSION_DESCRIBE_FLAG_CONTRACTS, EXTENSION_DOCTOR_FLAG_CONTRACTS, EXTENSION_EXPLORE_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, EXTENSION_INIT_FLAG_CONTRACTS, EXTENSION_INSTALL_FLAG_CONTRACTS, EXTENSION_MANAGE_FLAG_CONTRACTS, EXTENSION_MIGRATE_FLAG_CONTRACTS, EXTENSION_RELOAD_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, ITEM_COMPLETE_FLAG_CONTRACTS, ITEM_MUTATE_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, MERGE_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, PM_EXTENSION_CAPABILITY_CONTRACTS, PM_EXTENSION_POLICY_MODE_CONTRACTS, PM_EXTENSION_POLICY_SURFACE_CONTRACTS, PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS, PM_EXTENSION_SERVICE_NAME_CONTRACTS, PM_EXTENSION_TRUST_MODE_CONTRACTS, PM_OUTPUT_DEGRADATION_STEPS, PLAN_FLAG_CONTRACTS, PM_CORE_COMMAND_NAMES, PM_TOOL_ACTIONS, PM_TOOL_PARAMETERS_SCHEMA, REINDEX_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, PROFILE_FLAG_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, EVAL_FLAG_CONTRACTS, WORKSPACE_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, compactFlagAliasContracts, resolvePmCommandOutputBudget, } from "../cli-contracts.js";
|
|
11
11
|
import { GOVERNANCE_CLOSE_VALIDATION_DEFAULT_VALUES, GOVERNANCE_CREATE_MODE_DEFAULT_VALUES, GOVERNANCE_OWNERSHIP_ENFORCEMENT_VALUES, GOVERNANCE_WORKFLOW_ENFORCEMENT_VALUES, } from "../../types.js";
|
|
12
12
|
import { BRIEF_LIST_FIELDS, DEFAULT_COMPACT_LIST_FIELDS, LIST_COMMAND_DEFAULT_PROJECTIONS, } from "../query/list.js";
|
|
13
13
|
import { getActiveContextIntentContracts, } from "../context-intent-contracts.js";
|
|
@@ -15,6 +15,7 @@ import { PM_READ_OUTPUT_SURFACE_CONTRACTS, } from "../read-output-contracts.js";
|
|
|
15
15
|
import { enrichCliFlagInvocationContracts, } from "../flag-invocation-contracts.js";
|
|
16
16
|
import { resolvePmCommandVisibilityTier, } from "../agent-capability-contracts.js";
|
|
17
17
|
import { PM_ERROR_CODE_CATALOG } from "../generated-error-code-catalog.js";
|
|
18
|
+
import { resolvePmCommandOutputEnvelope, } from "../output-contracts.js";
|
|
18
19
|
const AGENT_BOOTSTRAP_FLAGS = new Map([
|
|
19
20
|
[
|
|
20
21
|
"claim",
|
|
@@ -285,6 +286,7 @@ const EXTENSION_LIFECYCLE_FLAG_CONTRACTS = [
|
|
|
285
286
|
["adopt-all", EXTENSION_ADOPT_ALL_FLAG_CONTRACTS],
|
|
286
287
|
["activate", EXTENSION_ACTIVATE_FLAG_CONTRACTS],
|
|
287
288
|
["deactivate", EXTENSION_DEACTIVATE_FLAG_CONTRACTS],
|
|
289
|
+
["migrate", EXTENSION_MIGRATE_FLAG_CONTRACTS],
|
|
288
290
|
];
|
|
289
291
|
const PACKAGE_LIFECYCLE_FLAG_CONTRACTS = EXTENSION_LIFECYCLE_FLAG_CONTRACTS.map(([subcommand, flags]) => subcommand === "init"
|
|
290
292
|
? [subcommand, PACKAGE_INIT_FLAG_CONTRACTS]
|
|
@@ -303,6 +305,7 @@ const CORE_COMMAND_FLAG_CONTRACT_ENTRIES = [
|
|
|
303
305
|
["install", INSTALL_FLAG_CONTRACTS],
|
|
304
306
|
["create", CREATE_FLAG_CONTRACTS],
|
|
305
307
|
["item mutate", ITEM_MUTATE_FLAG_CONTRACTS],
|
|
308
|
+
["item complete", ITEM_COMPLETE_FLAG_CONTRACTS],
|
|
306
309
|
["update", UPDATE_FLAG_CONTRACTS],
|
|
307
310
|
["update-many", UPDATE_MANY_FLAG_CONTRACTS],
|
|
308
311
|
["upgrade", UPGRADE_FLAG_CONTRACTS],
|
|
@@ -1591,7 +1594,9 @@ function buildCommandSummarySurface(commands) {
|
|
|
1591
1594
|
.filter((command) => command.length > 0)
|
|
1592
1595
|
.sort((left, right) => left.localeCompare(right));
|
|
1593
1596
|
return rootCommands.map((command) => {
|
|
1594
|
-
const budget = resolvePmCommandOutputBudget(command
|
|
1597
|
+
const budget = resolvePmCommandOutputBudget(command, {
|
|
1598
|
+
generateFallback: true,
|
|
1599
|
+
});
|
|
1595
1600
|
const availableFlags = new Set(resolveCoreCommandFlags(command).map((contract) => contract.flag));
|
|
1596
1601
|
const flags = (AGENT_BOOTSTRAP_FLAGS.get(command) ?? AGENT_BOUNDED_FLAG_PRIORITY).filter((flag) => availableFlags.has(flag));
|
|
1597
1602
|
const aliases = [...rootsByCanonical.get(command)]
|
|
@@ -1602,10 +1607,18 @@ function buildCommandSummarySurface(commands) {
|
|
|
1602
1607
|
...(aliases.length > 0 ? { aliases } : {}),
|
|
1603
1608
|
intent: summarizeCommandIntent(command),
|
|
1604
1609
|
...(flags.length > 0 ? { flags } : {}),
|
|
1605
|
-
default_max_estimated_tokens: budget
|
|
1610
|
+
default_max_estimated_tokens: budget.default_max_estimated_tokens,
|
|
1606
1611
|
};
|
|
1607
1612
|
});
|
|
1608
1613
|
}
|
|
1614
|
+
function buildCommandOutputContracts(commands) {
|
|
1615
|
+
return commands.map((command) => ({
|
|
1616
|
+
budget: resolvePmCommandOutputBudget(command, {
|
|
1617
|
+
generateFallback: true,
|
|
1618
|
+
}),
|
|
1619
|
+
envelope: resolvePmCommandOutputEnvelope(command),
|
|
1620
|
+
}));
|
|
1621
|
+
}
|
|
1609
1622
|
function resolveExtensionCommandContracts(selection, runtime, outputCommands) {
|
|
1610
1623
|
if (selection.selectedCommand) {
|
|
1611
1624
|
return runtime.extensionContracts.filter((entry) => splitCommandPathAliases(entry.command).includes(selection.selectedCommand));
|
|
@@ -1770,6 +1783,8 @@ export async function runContracts(options, global) {
|
|
|
1770
1783
|
result.context_intents = getActiveContextIntentContracts();
|
|
1771
1784
|
result.read_output_dimensions = PM_READ_OUTPUT_SURFACE_CONTRACTS;
|
|
1772
1785
|
result.error_codes = PM_ERROR_CODE_CATALOG;
|
|
1786
|
+
result.command_output_contracts =
|
|
1787
|
+
buildCommandOutputContracts(outputCommands);
|
|
1773
1788
|
}
|
|
1774
1789
|
return result;
|
|
1775
1790
|
}
|
|
@@ -1779,6 +1794,7 @@ export const _testOnlyContractsCommand = {
|
|
|
1779
1794
|
attachCreateRequiredOptionContracts,
|
|
1780
1795
|
buildExtensionActionSchemaBranch,
|
|
1781
1796
|
buildCommandSummarySurface,
|
|
1797
|
+
buildCommandOutputContracts,
|
|
1782
1798
|
buildRuntimeFieldFlagContracts,
|
|
1783
1799
|
collectActionContractDescriptors,
|
|
1784
1800
|
collectExtensionCommandContracts,
|
|
@@ -1805,4 +1821,4 @@ export const _testOnlyContractsCommand = {
|
|
|
1805
1821
|
toRuntimeShortFlagToken,
|
|
1806
1822
|
};
|
|
1807
1823
|
//# sourceMappingURL=runtime-contracts.js.map
|
|
1808
|
-
//# debugId=
|
|
1824
|
+
//# debugId=e6dd81d6-95d6-51e6-a0c9-ba7bb5372457
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* consumers from a single source of truth.
|
|
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]="b26c9bc3-e1bf-5174-a0af-296c947678da")}catch(e){}}();
|
|
11
11
|
import { normalizeUniqueStringList } from "./string-lists.js";
|
|
12
12
|
import { PM_TOOL_ACTIONS } from "./enum-contracts.js";
|
|
13
13
|
import { TOOL_CREATE_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CONTEXT_OPTION_CONTRACTS, TOOL_ACTIVITY_OPTION_CONTRACTS, TOOL_LIST_FILTER_OPTION_CONTRACTS, TOOL_AGGREGATE_OPTION_CONTRACTS, TOOL_SEARCH_FILTER_OPTION_CONTRACTS, TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS, } from "./tool-option-contracts.js";
|
|
@@ -160,6 +160,8 @@ const CREATE_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
|
|
|
160
160
|
...TOOL_CREATE_OPTION_CONTRACTS.map((entry) => entry.param),
|
|
161
161
|
...TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS.map((entry) => entry.param),
|
|
162
162
|
"assignee",
|
|
163
|
+
"closeReason",
|
|
164
|
+
"completedAt",
|
|
163
165
|
]);
|
|
164
166
|
const UPDATE_CONTRACT_PARAMETER_KEYS = toSchemaKeyList([
|
|
165
167
|
...TOOL_UPDATE_OPTION_CONTRACTS.map((entry) => entry.param),
|
|
@@ -1491,4 +1493,4 @@ export const _testOnlyCliContracts = {
|
|
|
1491
1493
|
withFlagAliasMetadata,
|
|
1492
1494
|
};
|
|
1493
1495
|
//# sourceMappingURL=tool-schema.js.map
|
|
1494
|
-
//# debugId=
|
|
1496
|
+
//# debugId=b26c9bc3-e1bf-5174-a0af-296c947678da
|
|
@@ -19,9 +19,9 @@ export type { PmExtensionCapabilityContract, PmExtensionServiceNameContract, PmE
|
|
|
19
19
|
export { TOOL_LIST_FILTER_OPTION_CONTRACTS, TOOL_AGGREGATE_OPTION_CONTRACTS, TOOL_SEARCH_FILTER_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS, TOOL_CREATE_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CALENDAR_OPTION_CONTRACTS, TOOL_ACTIVITY_OPTION_CONTRACTS, TOOL_CONTEXT_OPTION_CONTRACTS, TOOL_DEPS_OPTION_CONTRACTS, TOOL_GRAPH_OPTION_CONTRACTS, TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE, TOOL_CREATE_OPTION_CONTRACT_SOURCE, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE, TOOL_UPDATE_OPTION_CONTRACT_SOURCE, } from "./cli-contracts/tool-option-contracts.js";
|
|
20
20
|
export type { OptionsFromContracts, PmBulkMutationControlOptions, PmBulkMutationFilterOptions, PmCloseActionOptions, PmCloseManyActionOptions, PmCreateActionOptions, PmMutationAttributionOptions, PmOptionScalar, PmUpdateActionOptions, PmUpdateManyActionOptions, } from "./cli-contracts/typed-action-inputs.js";
|
|
21
21
|
export type { CliFlagContract, ToolOptionFlagContract, } from "./cli-contracts/flag-contracts.js";
|
|
22
|
-
export { withFlagAliasMetadata, compactFlagAliasContracts, SUBCOMMAND_GLOBAL_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, MERGE_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, PROFILE_FLAG_CONTRACTS, PLAN_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, EXTENSION_SCOPE_FLAG_CONTRACTS, EXTENSION_INIT_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, EXTENSION_INSTALL_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, EXTENSION_EXPLORE_FLAG_CONTRACTS, EXTENSION_DESCRIBE_FLAG_CONTRACTS, EXTENSION_ADOPT_ALL_FLAG_CONTRACTS, EXTENSION_ACTIVATE_FLAG_CONTRACTS, EXTENSION_DEACTIVATE_FLAG_CONTRACTS, EXTENSION_MANAGE_FLAG_CONTRACTS, EXTENSION_RELOAD_FLAG_CONTRACTS, EXTENSION_DOCTOR_FLAG_CONTRACTS, EXTENSION_CATALOG_FLAG_CONTRACTS, EXTENSION_ADOPT_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, REINDEX_FLAG_CONTRACTS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, MEET_FLAG_CONTRACTS, EVENT_FLAG_CONTRACTS, EVENTS_FLAG_CONTRACTS, REMIND_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, CREATE_FLAG_CONTRACTS, ITEM_MUTATE_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, CALENDAR_FLAG_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, CONTEXT_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, EVAL_FLAG_CONTRACTS, WORKSPACE_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, hasSubcommandFlagContractsForCommand, resolveSubcommandFlagContractsForCommand, toCompletionFlagString, } from "./cli-contracts/flag-contracts.js";
|
|
22
|
+
export { withFlagAliasMetadata, compactFlagAliasContracts, SUBCOMMAND_GLOBAL_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, MERGE_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, PROFILE_FLAG_CONTRACTS, PLAN_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, EXTENSION_SCOPE_FLAG_CONTRACTS, EXTENSION_INIT_FLAG_CONTRACTS, EXTENSION_MIGRATE_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, EXTENSION_INSTALL_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, EXTENSION_EXPLORE_FLAG_CONTRACTS, EXTENSION_DESCRIBE_FLAG_CONTRACTS, EXTENSION_ADOPT_ALL_FLAG_CONTRACTS, EXTENSION_ACTIVATE_FLAG_CONTRACTS, EXTENSION_DEACTIVATE_FLAG_CONTRACTS, EXTENSION_MANAGE_FLAG_CONTRACTS, EXTENSION_RELOAD_FLAG_CONTRACTS, EXTENSION_DOCTOR_FLAG_CONTRACTS, EXTENSION_CATALOG_FLAG_CONTRACTS, EXTENSION_ADOPT_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, REINDEX_FLAG_CONTRACTS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, MEET_FLAG_CONTRACTS, EVENT_FLAG_CONTRACTS, EVENTS_FLAG_CONTRACTS, REMIND_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, CREATE_FLAG_CONTRACTS, ITEM_COMPLETE_FLAG_CONTRACTS, ITEM_MUTATE_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, CALENDAR_FLAG_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, CONTEXT_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, EVAL_FLAG_CONTRACTS, WORKSPACE_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, hasSubcommandFlagContractsForCommand, resolveSubcommandFlagContractsForCommand, toCompletionFlagString, } from "./cli-contracts/flag-contracts.js";
|
|
23
23
|
export type { PmActionSchemaContract } from "./cli-contracts/tool-schema.js";
|
|
24
24
|
export { buildPmActionToolInputSchema, PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES, resolvePmToolCustomFieldCollision, CLOSE_ACTION_OPTION_KEYS, PLAN_CREATE_METADATA_PARAMETER_KEYS, PM_TOOL_ACTION_PARAMETER_CONTRACTS, PM_TOOL_PARAMETERS_SCHEMA_VERSION, PM_TOOL_PARAMETERS_SCHEMA_MAJOR, PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION, PM_TOOL_PARAMETERS_SCHEMA, PM_PROVIDER_TOOL_PARAMETERS_SCHEMA, _testOnlyCliContracts, } from "./cli-contracts/tool-schema.js";
|
|
25
25
|
export type { PmActionToolInputSchemaOptions, PmToolCustomFieldCollision, } from "./cli-contracts/tool-schema.js";
|
|
26
26
|
export { analyzeSdkCliParameterCompleteness, type SdkCliActionParameterCoverage, type SdkCliCompletenessContractSource, type SdkCliParameterCoverageEntry, type SdkCliParameterDisposition, } from "./cli-contracts/completeness.js";
|
|
27
|
-
export { PM_COMMAND_OUTPUT_BUDGET_CONTRACTS, PM_OUTPUT_BUDGET_CLASSES, PM_OUTPUT_DEGRADATION_STEPS, definePmCommandOutputBudget, estimatePmOutputTokens, resolvePmCommandOutputBudget, type PmCommandOutputBudgetContract, type PmOutputBudgetClass, type PmOutputDegradationStep, } from "./cli-contracts/agent-output-contracts.js";
|
|
27
|
+
export { PM_COMMAND_OUTPUT_BUDGET_CONTRACTS, PM_OUTPUT_BUDGET_CLASSES, PM_OUTPUT_DEGRADATION_STEPS, createPmCommandOutputBudget, definePmCommandOutputBudget, estimatePmOutputTokens, inferPmOutputBudgetClass, resolvePmCommandOutputBudget, type PmCommandOutputBudgetContract, type PmOutputBudgetClass, type PmOutputDegradationStep, } from "./cli-contracts/agent-output-contracts.js";
|
|
@@ -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]="8071fd9d-649a-5fce-b342-84b11066d559")}catch(e){}}();
|
|
3
3
|
export { EXECUTABLE_COMMAND_ALIASES } from "./cli-contracts/command-aliases.js";
|
|
4
4
|
export { ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, NEXT_COMMANDER_STRING_OPTION_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, readFirstValueFromCommanderOptions, readFirstStringFromCommanderOptions, readStringArrayFromCommanderOptions, } from "./cli-contracts/commander-types.js";
|
|
5
5
|
export { CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, } from "./cli-contracts/commander-mutation-options.js";
|
|
@@ -9,9 +9,9 @@ export { CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, CREATE_COMMANDER_REPEAT
|
|
|
9
9
|
// keep importing everything from "./cli-contracts.js" unchanged.
|
|
10
10
|
export { PM_EXTENSION_CAPABILITY_CONTRACTS, PM_EXTENSION_SERVICE_NAME_CONTRACTS, PM_EXTENSION_POLICY_MODE_CONTRACTS, PM_EXTENSION_TRUST_MODE_CONTRACTS, PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS, PM_EXTENSION_POLICY_SURFACE_CONTRACTS, PM_CORE_COMMAND_NAMES, PM_CLI_ONLY_TOOL_ACTION_WAIVERS, PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS, PM_TOOL_ACTIONS, analyzePmToolActionParity, isPmToolAction, isPmExtensionCapabilityContract, isPmExtensionServiceNameContract, isPmExtensionPolicyModeContract, isPmExtensionPolicySurfaceContract, } from "./cli-contracts/enum-contracts.js";
|
|
11
11
|
export { TOOL_LIST_FILTER_OPTION_CONTRACTS, TOOL_AGGREGATE_OPTION_CONTRACTS, TOOL_SEARCH_FILTER_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS, TOOL_CREATE_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CALENDAR_OPTION_CONTRACTS, TOOL_ACTIVITY_OPTION_CONTRACTS, TOOL_CONTEXT_OPTION_CONTRACTS, TOOL_DEPS_OPTION_CONTRACTS, TOOL_GRAPH_OPTION_CONTRACTS, TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE, TOOL_CREATE_OPTION_CONTRACT_SOURCE, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE, TOOL_UPDATE_OPTION_CONTRACT_SOURCE, } from "./cli-contracts/tool-option-contracts.js";
|
|
12
|
-
export { withFlagAliasMetadata, compactFlagAliasContracts, SUBCOMMAND_GLOBAL_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, MERGE_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, PROFILE_FLAG_CONTRACTS, PLAN_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, EXTENSION_SCOPE_FLAG_CONTRACTS, EXTENSION_INIT_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, EXTENSION_INSTALL_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, EXTENSION_EXPLORE_FLAG_CONTRACTS, EXTENSION_DESCRIBE_FLAG_CONTRACTS, EXTENSION_ADOPT_ALL_FLAG_CONTRACTS, EXTENSION_ACTIVATE_FLAG_CONTRACTS, EXTENSION_DEACTIVATE_FLAG_CONTRACTS, EXTENSION_MANAGE_FLAG_CONTRACTS, EXTENSION_RELOAD_FLAG_CONTRACTS, EXTENSION_DOCTOR_FLAG_CONTRACTS, EXTENSION_CATALOG_FLAG_CONTRACTS, EXTENSION_ADOPT_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, REINDEX_FLAG_CONTRACTS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, MEET_FLAG_CONTRACTS, EVENT_FLAG_CONTRACTS, EVENTS_FLAG_CONTRACTS, REMIND_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, CREATE_FLAG_CONTRACTS, ITEM_MUTATE_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, CALENDAR_FLAG_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, CONTEXT_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, EVAL_FLAG_CONTRACTS, WORKSPACE_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, hasSubcommandFlagContractsForCommand, resolveSubcommandFlagContractsForCommand, toCompletionFlagString, } from "./cli-contracts/flag-contracts.js";
|
|
12
|
+
export { withFlagAliasMetadata, compactFlagAliasContracts, SUBCOMMAND_GLOBAL_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, MERGE_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, PROFILE_FLAG_CONTRACTS, PLAN_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, EXTENSION_SCOPE_FLAG_CONTRACTS, EXTENSION_INIT_FLAG_CONTRACTS, EXTENSION_MIGRATE_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, EXTENSION_INSTALL_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, EXTENSION_EXPLORE_FLAG_CONTRACTS, EXTENSION_DESCRIBE_FLAG_CONTRACTS, EXTENSION_ADOPT_ALL_FLAG_CONTRACTS, EXTENSION_ACTIVATE_FLAG_CONTRACTS, EXTENSION_DEACTIVATE_FLAG_CONTRACTS, EXTENSION_MANAGE_FLAG_CONTRACTS, EXTENSION_RELOAD_FLAG_CONTRACTS, EXTENSION_DOCTOR_FLAG_CONTRACTS, EXTENSION_CATALOG_FLAG_CONTRACTS, EXTENSION_ADOPT_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, REINDEX_FLAG_CONTRACTS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, MEET_FLAG_CONTRACTS, EVENT_FLAG_CONTRACTS, EVENTS_FLAG_CONTRACTS, REMIND_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, CREATE_FLAG_CONTRACTS, ITEM_COMPLETE_FLAG_CONTRACTS, ITEM_MUTATE_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, CALENDAR_FLAG_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, CONTEXT_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, EVAL_FLAG_CONTRACTS, WORKSPACE_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, hasSubcommandFlagContractsForCommand, resolveSubcommandFlagContractsForCommand, toCompletionFlagString, } from "./cli-contracts/flag-contracts.js";
|
|
13
13
|
export { buildPmActionToolInputSchema, PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES, resolvePmToolCustomFieldCollision, CLOSE_ACTION_OPTION_KEYS, PLAN_CREATE_METADATA_PARAMETER_KEYS, PM_TOOL_ACTION_PARAMETER_CONTRACTS, PM_TOOL_PARAMETERS_SCHEMA_VERSION, PM_TOOL_PARAMETERS_SCHEMA_MAJOR, PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION, PM_TOOL_PARAMETERS_SCHEMA, PM_PROVIDER_TOOL_PARAMETERS_SCHEMA, _testOnlyCliContracts, } from "./cli-contracts/tool-schema.js";
|
|
14
14
|
export { analyzeSdkCliParameterCompleteness, } from "./cli-contracts/completeness.js";
|
|
15
|
-
export { PM_COMMAND_OUTPUT_BUDGET_CONTRACTS, PM_OUTPUT_BUDGET_CLASSES, PM_OUTPUT_DEGRADATION_STEPS, definePmCommandOutputBudget, estimatePmOutputTokens, resolvePmCommandOutputBudget, } from "./cli-contracts/agent-output-contracts.js";
|
|
15
|
+
export { PM_COMMAND_OUTPUT_BUDGET_CONTRACTS, PM_OUTPUT_BUDGET_CLASSES, PM_OUTPUT_DEGRADATION_STEPS, createPmCommandOutputBudget, definePmCommandOutputBudget, estimatePmOutputTokens, inferPmOutputBudgetClass, resolvePmCommandOutputBudget, } from "./cli-contracts/agent-output-contracts.js";
|
|
16
16
|
//# sourceMappingURL=cli-contracts.js.map
|
|
17
|
-
//# debugId=
|
|
17
|
+
//# debugId=8071fd9d-649a-5fce-b342-84b11066d559
|
package/dist/sdk/cli-program.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Builds the reusable Commander root that embeds pm's universal global contracts.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="26c939a0-e02d-5998-95e3-a4c26c3b47bd")}catch(e){}}();
|
|
8
8
|
import { Command } from "commander";
|
|
9
9
|
import { writeStdout } from "../core/output/output.js";
|
|
10
10
|
/** Create a fresh pm root program suitable for one-shot CLI or embedded hosts. */
|
|
@@ -22,7 +22,7 @@ export function createPmCliProgram(version) {
|
|
|
22
22
|
},
|
|
23
23
|
writeErr: () => { },
|
|
24
24
|
})
|
|
25
|
-
.option("--json", "Output JSON instead of TOON")
|
|
25
|
+
.option("--json", "Output JSON instead of TOON; mutations emit a flat receipt with top-level id/status/changed_field_count while reads use documented entity or collection envelopes")
|
|
26
26
|
.option("--lean", "Omit null and empty containers from JSON output")
|
|
27
27
|
.option("--token-accounting", "Attach a bounded per-section token-cost receipt to command output")
|
|
28
28
|
.option("--output-include <fields>", "Retain comma-separated fields or sections in read output")
|
|
@@ -43,4 +43,4 @@ export function createPmCliProgram(version) {
|
|
|
43
43
|
.exitOverride();
|
|
44
44
|
}
|
|
45
45
|
//# sourceMappingURL=cli-program.js.map
|
|
46
|
-
//# debugId=
|
|
46
|
+
//# debugId=26c939a0-e02d-5998-95e3-a4c26c3b47bd
|
package/dist/sdk/compose.d.ts
CHANGED
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
* declarative (`composeExtension`) authoring styles live together. Both are
|
|
26
26
|
* re-exported from the SDK barrel, so the public API is unchanged.
|
|
27
27
|
*/
|
|
28
|
-
import type { AfterCommandHook, BeforeCommandHook, BeforeMutationHook, CommandDefinition, CommandOverride, ExtensionApi, ExtensionCapability, ExtensionManifest, ExtensionServiceName, Exporter, FlagDefinition, ImportExportRegistrationOptions, Importer, OnIndexHook, OnReadHook, OnWriteHook, OutputRendererFormat, ParserOverride, PreflightOverride, RendererOverride, ScopedRendererOverrideDefinition, SchemaFieldDefinition, SchemaItemTypeDefinition, SchemaMigrationDefinition, SearchProviderDefinition, ServiceOverride, VectorStoreAdapterDefinition } from "../core/extensions/loader.js";
|
|
28
|
+
import type { AfterCommandHook, BeforeCommandHook, BeforeMutationHook, CommandDefinition, CommandOverride, ExtensionApi, ExtensionCapability, ExtensionManifest, ExtensionServiceName, Exporter, FlagDefinition, ImportExportRegistrationOptions, Importer, OnIndexHook, OnReadHook, OnWriteHook, OutputRendererFormat, ParserOverride, PreflightOverride, ScopedPreflightOverrideDefinition, RendererOverride, ScopedRendererOverrideDefinition, SchemaFieldDefinition, SchemaItemTypeDefinition, SchemaMigrationDefinition, SearchProviderDefinition, ServiceOverride, VectorStoreAdapterDefinition } from "../core/extensions/loader.js";
|
|
29
29
|
import type { ExtensionActivationSummary } from "../core/extensions/activation-summary.js";
|
|
30
30
|
import type { ProjectProfileRegistrationInput } from "../core/profile/profile-presets.js";
|
|
31
31
|
import type { PmMaxVersionExceededMode } from "../core/extensions/extension-types.js";
|
|
@@ -137,7 +137,7 @@ export interface ExtensionBlueprint {
|
|
|
137
137
|
/** Service overrides keyed by service name, registered via `api.registerService(service, override)`. */
|
|
138
138
|
services?: Partial<Record<ExtensionServiceName, ServiceOverride>>;
|
|
139
139
|
/** Preflight overrides registered via `api.registerPreflight(override)`. */
|
|
140
|
-
preflights?: PreflightOverride
|
|
140
|
+
preflights?: Array<PreflightOverride | ScopedPreflightOverrideDefinition>;
|
|
141
141
|
/** Custom item types registered in a single `api.registerItemTypes(types)` call. */
|
|
142
142
|
itemTypes?: SchemaItemTypeDefinition[];
|
|
143
143
|
/** Custom item-metadata fields registered in a single `api.registerItemFields(fields)` call. */
|
package/dist/sdk/compose.js
CHANGED
|
@@ -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]="142a413a-35a6-5861-9063-0c196a176eaa")}catch(e){}}();
|
|
3
3
|
import { normalizeKnownExtensionCapability, resolveLegacyExtensionCapabilityAlias, } from "../core/extensions/extension-capability-aliases.js";
|
|
4
4
|
import { normalizeCommandName } from "../core/extensions/extension-runtime-helpers.js";
|
|
5
5
|
import { RESERVED_ITEM_FIELD_NAMES } from "../core/extensions/item-fields.js";
|
|
@@ -531,6 +531,11 @@ function collectBlueprintSurfaceSummary(blueprint, importers, exporters) {
|
|
|
531
531
|
renderer_overrides: sortUnique(Object.keys(blueprint.renderers ?? {}).map((format) => String(format).trim().toLowerCase())),
|
|
532
532
|
...collectBlueprintRendererOwnership(blueprint.renderers),
|
|
533
533
|
preflight_overrides: (blueprint.preflights ?? []).length,
|
|
534
|
+
preflight_ownership: (blueprint.preflights ?? []).map((preflight) => ({
|
|
535
|
+
commands: [
|
|
536
|
+
...(preflight.commands ?? []),
|
|
537
|
+
],
|
|
538
|
+
})),
|
|
534
539
|
};
|
|
535
540
|
}
|
|
536
541
|
/**
|
|
@@ -1052,4 +1057,4 @@ export function preflightExtension(blueprint, options = {}) {
|
|
|
1052
1057
|
};
|
|
1053
1058
|
}
|
|
1054
1059
|
//# sourceMappingURL=compose.js.map
|
|
1055
|
-
//# debugId=
|
|
1060
|
+
//# debugId=142a413a-35a6-5861-9063-0c196a176eaa
|
package/dist/sdk/contracts.d.ts
CHANGED
|
@@ -9,4 +9,5 @@ export * from "./error-code-catalog.js";
|
|
|
9
9
|
export * from "./generated-error-code-catalog.js";
|
|
10
10
|
export * from "./flag-invocation-contracts.js";
|
|
11
11
|
export * from "./output-token-accounting.js";
|
|
12
|
+
export * from "./output-contracts.js";
|
|
12
13
|
export * from "./read-output-contracts.js";
|
package/dist/sdk/contracts.js
CHANGED
|
@@ -4,13 +4,14 @@
|
|
|
4
4
|
* Exposes command and action contract data without loading SDK runtime code.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="2962656f-386f-59a0-8dc1-411ae382dddb")}catch(e){}}();
|
|
8
8
|
export * from "./cli-contracts.js";
|
|
9
9
|
export * from "./context-intent-contracts.js";
|
|
10
10
|
export * from "./error-code-catalog.js";
|
|
11
11
|
export * from "./generated-error-code-catalog.js";
|
|
12
12
|
export * from "./flag-invocation-contracts.js";
|
|
13
13
|
export * from "./output-token-accounting.js";
|
|
14
|
+
export * from "./output-contracts.js";
|
|
14
15
|
export * from "./read-output-contracts.js";
|
|
15
16
|
//# sourceMappingURL=contracts.js.map
|
|
16
|
-
//# debugId=
|
|
17
|
+
//# debugId=2962656f-386f-59a0-8dc1-411ae382dddb
|