@unbrained/pm-cli 2026.8.26 → 2026.8.27
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/.agents/skills/HARNESS_COMPATIBILITY.md +32 -0
- package/.agents/skills/README.md +47 -0
- package/.agents/skills/pm-developer/SKILL.md +117 -0
- package/.agents/skills/pm-developer/references/COMMAND_PLAYBOOK.md +49 -0
- package/.agents/skills/pm-developer/references/GRAPH_AND_RELATIONSHIPS.md +91 -0
- package/.agents/skills/pm-developer/references/MULTI_AGENT_MERGE.md +72 -0
- package/.agents/skills/pm-developer/references/PROMPTS.md +17 -0
- package/.agents/skills/pm-developer/references/SCRIPTING_COMPOSITION.md +82 -0
- package/.agents/skills/pm-developer/references/TOKEN_BUDGETS.md +85 -0
- package/.agents/skills/pm-extensions/SKILL.md +106 -0
- package/.agents/skills/pm-extensions/references/AUTHORING.md +95 -0
- package/.agents/skills/pm-extensions/references/LIFECYCLE.md +40 -0
- package/.agents/skills/pm-extensions/references/TROUBLESHOOTING.md +25 -0
- package/.agents/skills/pm-sdk/SKILL.md +107 -0
- package/.agents/skills/pm-sdk/references/DOMAIN_MODELING.md +78 -0
- package/.agents/skills/pm-sdk/references/INTEGRATION_CHECKLIST.md +31 -0
- package/.agents/skills/pm-sdk/references/PROMPTS.md +13 -0
- package/.agents/skills/pm-sdk/references/SURFACE_MAP.md +82 -0
- package/.agents/skills/pm-user/SKILL.md +111 -0
- package/.agents/skills/pm-user/references/BACKLOG_SHAPING.md +105 -0
- package/.agents/skills/pm-user/references/PROMPTS.md +17 -0
- package/.agents/skills/pm-user/references/WORKFLOWS.md +35 -0
- package/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +25 -3
- package/README.md +8 -5
- package/dist/cli/commander-usage.js +11 -7
- package/dist/cli/error-guidance.js +3 -3
- package/dist/cli/help-content.d.ts +2 -0
- package/dist/cli/help-content.js +53 -17
- package/dist/cli/help-json-payload.d.ts +8 -2
- package/dist/cli/help-json-payload.js +46 -12
- package/dist/cli/main.js +52 -74
- package/dist/cli/register-annotations.js +27 -21
- package/dist/cli/register-setup.js +98 -57
- package/dist/cli-bundle/bundle-manifest.json +152 -152
- package/dist/cli-bundle/chunks/chunk-3OO3W6FW.js +202 -0
- package/dist/cli-bundle/chunks/chunk-52EKTW6V.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-KBFP3E4E.js → chunk-CVBBGWW5.js} +62 -44
- package/dist/cli-bundle/chunks/chunk-MFNTKMTI.js +13 -0
- package/dist/cli-bundle/chunks/{chunk-E2GCFJSU.js → chunk-OS27HHBN.js} +31 -31
- package/dist/cli-bundle/chunks/chunk-QTO7USTH.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-S4U76VZF.js → chunk-R4ETAOJC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UKBCRPA2.js → chunk-SH6P7FXI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WRHJ3MB6.js → chunk-SHMDY36D.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZNRLJ54C.js → chunk-SKXLJIEK.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-TNX6HC54.js +3 -0
- package/dist/cli-bundle/chunks/{register-list-query-EMCPMICY.js → register-list-query-EUWM6VII.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-OJ67ABCB.js → register-mutation-FD4HSAVU.js} +4 -4
- package/dist/cli-bundle/chunks/{register-operations-H2GLP7LT.js → register-operations-HRMNFEC3.js} +2 -2
- package/dist/cli-bundle/chunks/register-setup-33GNICLX.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-4XNH2HM7.js → chunk-2AGZ5BRT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-72T6JGAE.js → chunk-4BR5UU52.js} +45 -45
- package/dist/cli-bundle/focused-chunks/{chunk-OHIHZ7HS.js → chunk-6GCRSLPG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-UYBA57GY.js → chunk-AD6ULRAF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-7YCDTCBC.js → chunk-AQ5IYEZZ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-YO3ZF3FI.js → chunk-EKX37ZHA.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-LV5N3LK5.js → chunk-FC2AXLB5.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-IBHXMFE7.js → chunk-HC7ODMH3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-4K2II4TV.js → chunk-HVQ22RC4.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-A644DUFQ.js → chunk-MEASX544.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-FXDLT6FL.js → chunk-MXTYGECH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-MMXUPDDJ.js → chunk-SUBSWYW3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-57XY346D.js → chunk-XDPYBQCF.js} +9 -9
- package/dist/cli-bundle/focused-chunks/{chunk-TMJDFHVD.js → chunk-Y3JJXRVK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-66VGB23P.js → chunk-Y5A7SJJ7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-YHWHX6YY.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-P2E6LDAE.js → chunk-YVVZ3LQ6.js} +3 -3
- package/dist/cli-bundle/focused-chunks/chunk-Z2USIBR2.js +5 -0
- package/dist/cli-bundle/main.js +15 -14
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +2 -2
- package/dist/cli-bundle/sdk-core.js +31 -31
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +31 -31
- 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 +32 -7
- package/dist/core/governance/issue-codes.d.ts +11 -2
- package/dist/core/governance/issue-codes.js +29 -10
- package/dist/core/item/item-format.js +3 -3
- package/dist/core/store/item-store.js +12 -5
- package/dist/mcp/server.js +123 -9
- package/dist/mcp/tool-definitions.d.ts +2 -0
- package/dist/mcp/tool-definitions.js +2 -2
- package/dist/sdk/agent/closed-domain-contracts.d.ts +1 -1
- package/dist/sdk/agent/closed-domain-contracts.js +24 -2
- package/dist/sdk/agent-capability-contracts.js +6 -2
- package/dist/sdk/cli-bootstrap.js +3 -2
- package/dist/sdk/cli-contracts/command-aliases.js +15 -2
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +4 -1
- package/dist/sdk/cli-contracts/enum-contracts.js +7 -2
- package/dist/sdk/cli-contracts/flag-contracts.js +9 -5
- package/dist/sdk/cli-contracts/grammar-contracts.d.ts +3 -3
- package/dist/sdk/cli-contracts/grammar-contracts.js +24 -17
- package/dist/sdk/cli-contracts/runtime-contracts.js +13 -11
- package/dist/sdk/cli-contracts/tool-schema.js +18 -15
- package/dist/sdk/cli-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts.js +3 -3
- package/dist/sdk/cli-program.js +3 -2
- package/dist/sdk/completion.js +40 -13
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +14 -2
- package/dist/sdk/governance/upgrade.d.ts +2 -0
- package/dist/sdk/governance/upgrade.js +30 -8
- package/dist/sdk/governance/validate.js +8 -6
- package/dist/sdk/guide-topics.js +6 -6
- package/dist/sdk/index.d.ts +4 -2
- package/dist/sdk/index.js +5 -3
- package/dist/sdk/mcp/apps.d.ts +70 -0
- package/dist/sdk/mcp/apps.js +154 -0
- package/dist/sdk/mcp/skills.d.ts +127 -0
- package/dist/sdk/mcp/skills.js +390 -0
- package/dist/sdk/read-output-contracts.js +16 -3
- package/dist/sdk/runtime-action-aliases.js +7 -3
- package/dist/sdk/runtime-input.js +12 -4
- package/dist/sdk/runtime-primitives.d.ts +1 -1
- package/dist/sdk/runtime-primitives.js +3 -3
- package/docs/CLI_GRAMMAR.md +7 -1
- package/docs/COMMANDS.md +2 -2
- package/docs/EXTENSIONS.md +33 -32
- package/docs/MCP_2026_07_28.md +24 -2
- package/docs/MCP_2026_07_28_CONFORMANCE.md +4 -4
- package/docs/MCP_SKILLS_AND_APPS.md +107 -0
- package/docs/QUICKSTART.md +15 -15
- package/docs/README.md +1 -0
- package/docs/RELEASING.md +11 -3
- package/docs/SDK_CONTEXT_INTEGRITY.md +6 -0
- package/docs/SDK_EVIDENCE_TRACEABILITY.md +9 -1
- package/docs/generated/AGENT_CAPABILITY_ROUTING.md +1 -1
- package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +7 -6
- package/marketplace.json +2 -2
- package/package.json +9 -7
- package/packages/pm-beads/README.md +12 -6
- package/packages/pm-beads/docs/MIGRATION.md +53 -0
- package/packages/pm-beads/extensions/beads/index.ts +8 -0
- package/packages/pm-beads/extensions/beads/runtime.ts +671 -112
- 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 +235 -13
- package/dist/cli-bundle/chunks/chunk-ES25LX3D.js +0 -202
- package/dist/cli-bundle/chunks/chunk-FRDWWB6R.js +0 -3
- package/dist/cli-bundle/chunks/chunk-ICQ3RVIY.js +0 -2
- package/dist/cli-bundle/chunks/chunk-IV64RJVE.js +0 -13
- package/dist/cli-bundle/chunks/chunk-MVYLQ67M.js +0 -3
- package/dist/cli-bundle/chunks/register-setup-GLZAHLVI.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-7I23XGWO.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-LMKG3DFE.js +0 -5
|
@@ -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]="76fe6260-2386-52c5-8f94-aad48dec33f9")}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
|
import { PM_POSITIONAL_ACTION_CONTRACTS, } from "./grammar-contracts.js";
|
|
@@ -219,7 +219,7 @@ export const AGGREGATE_FLAG_CONTRACTS = [
|
|
|
219
219
|
/** Public contract for comments flag contracts, shared by SDK and presentation-layer consumers. */
|
|
220
220
|
export const COMMENTS_FLAG_CONTRACTS = [
|
|
221
221
|
{ flag: "--id", value_name: "item-id" },
|
|
222
|
-
{ flag: "--add", aliases: ["--comment", "--body"] },
|
|
222
|
+
{ flag: "--add", aliases: ["--comment", "--body", "--text"] },
|
|
223
223
|
{ flag: "--stdin" },
|
|
224
224
|
{ flag: "--file" },
|
|
225
225
|
{ flag: "--edit" },
|
|
@@ -238,7 +238,7 @@ function withCursorSemantics(contracts, presentationFlags) {
|
|
|
238
238
|
/** Public contract for notes flag contracts, shared by SDK and presentation-layer consumers. */
|
|
239
239
|
export const NOTES_FLAG_CONTRACTS = [
|
|
240
240
|
{ flag: "--id", value_name: "item-id" },
|
|
241
|
-
{ flag: "--add", aliases: ["--note"] },
|
|
241
|
+
{ flag: "--add", aliases: ["--note", "--text"] },
|
|
242
242
|
{ flag: "--add-json" },
|
|
243
243
|
{ flag: "--stdin" },
|
|
244
244
|
{ flag: "--file" },
|
|
@@ -256,7 +256,7 @@ export const NOTES_FLAG_CONTRACTS = [
|
|
|
256
256
|
/** Public contract for learnings flag contracts, shared by SDK and presentation-layer consumers. */
|
|
257
257
|
export const LEARNINGS_FLAG_CONTRACTS = [
|
|
258
258
|
{ flag: "--id", value_name: "item-id" },
|
|
259
|
-
{ flag: "--add", aliases: ["--learning"] },
|
|
259
|
+
{ flag: "--add", aliases: ["--learning", "--text"] },
|
|
260
260
|
{ flag: "--limit" },
|
|
261
261
|
{ flag: "--full-history" },
|
|
262
262
|
{ flag: "--author" },
|
|
@@ -1884,6 +1884,10 @@ export function resolveSubcommandFlagContractsForCommand(commandName) {
|
|
|
1884
1884
|
rootCommand === "packages") &&
|
|
1885
1885
|
lifecycleSubcommand !== undefined &&
|
|
1886
1886
|
extraParts.length === 0) {
|
|
1887
|
+
if ((rootCommand === "package" || rootCommand === "packages") &&
|
|
1888
|
+
lifecycleSubcommand === "upgrade") {
|
|
1889
|
+
return withSubcommandGlobalFlags(UPGRADE_FLAG_CONTRACTS);
|
|
1890
|
+
}
|
|
1887
1891
|
return withSubcommandGlobalFlags(resolveExtensionLifecycleFlagContracts(rootCommand, lifecycleSubcommand));
|
|
1888
1892
|
}
|
|
1889
1893
|
const contracts = SUBCOMMAND_FLAG_CONTRACTS_BY_COMMAND.get(normalized) ?? [];
|
|
@@ -1908,4 +1912,4 @@ export function toCompletionFlagString(flagContracts, includeGlobal = true) {
|
|
|
1908
1912
|
return normalizeUniqueStringList(all).join(" ");
|
|
1909
1913
|
}
|
|
1910
1914
|
//# sourceMappingURL=flag-contracts.js.map
|
|
1911
|
-
//# debugId=
|
|
1915
|
+
//# debugId=76fe6260-2386-52c5-8f94-aad48dec33f9
|
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
* this checked-in table in both directions so adding or removing a command
|
|
7
7
|
* cannot silently bypass the architecture decision.
|
|
8
8
|
*/
|
|
9
|
-
import type
|
|
9
|
+
import { type PmCommandAliasContract } from "./command-aliases.js";
|
|
10
10
|
/** Canonical top-level domains an agent must retain to route pm operations. */
|
|
11
11
|
export declare const PM_CLI_GRAMMAR_NOUNS: readonly ["item", "list", "context", "search", "graph", "history", "workspace", "package", "ops", "plan", "contracts", "help"];
|
|
12
12
|
/** Shared verbs whose meaning transfers across domain nouns. */
|
|
13
|
-
export declare const PM_CLI_SHARED_VERBS: readonly ["activate", "add", "adopt", "adopt-all", "catalog", "compact", "complete", "create", "deactivate", "delete", "describe", "doctor", "edit", "explore", "import", "init", "inspect", "install", "list", "manage", "migrate", "mutate", "read", "redact", "reload", "remove", "reopen", "repair", "restore", "run", "show", "uninstall", "verify"];
|
|
13
|
+
export declare const PM_CLI_SHARED_VERBS: readonly ["activate", "add", "adopt", "adopt-all", "catalog", "compact", "complete", "create", "deactivate", "delete", "describe", "doctor", "edit", "explore", "import", "init", "inspect", "install", "list", "manage", "migrate", "mutate", "read", "redact", "reload", "remove", "reopen", "repair", "restore", "run", "show", "uninstall", "upgrade", "verify"];
|
|
14
14
|
/** Why a current command is permitted while the grammar migration proceeds. */
|
|
15
15
|
export type PmCommandDestinationDisposition = "target_noun" | "consolidation" | "package_owned" | "keep_as_is";
|
|
16
16
|
/** Exact destination decision for one command emitted by runtime contracts. */
|
|
@@ -78,7 +78,7 @@ export declare const PM_COMMAND_POSITIONAL_CONTRACTS: readonly PmCommandPosition
|
|
|
78
78
|
/** Immutable grammar policy used by contracts and the CI gate. */
|
|
79
79
|
export declare const PM_CLI_GRAMMAR_CONTRACT: {
|
|
80
80
|
readonly nouns: readonly ["item", "list", "context", "search", "graph", "history", "workspace", "package", "ops", "plan", "contracts", "help"];
|
|
81
|
-
readonly shared_verbs: readonly ["activate", "add", "adopt", "adopt-all", "catalog", "compact", "complete", "create", "deactivate", "delete", "describe", "doctor", "edit", "explore", "import", "init", "inspect", "install", "list", "manage", "migrate", "mutate", "read", "redact", "reload", "remove", "reopen", "repair", "restore", "run", "show", "uninstall", "verify"];
|
|
81
|
+
readonly shared_verbs: readonly ["activate", "add", "adopt", "adopt-all", "catalog", "compact", "complete", "create", "deactivate", "delete", "describe", "doctor", "edit", "explore", "import", "init", "inspect", "install", "list", "manage", "migrate", "mutate", "read", "redact", "reload", "remove", "reopen", "repair", "restore", "run", "show", "uninstall", "upgrade", "verify"];
|
|
82
82
|
readonly scope_before_verb: true;
|
|
83
83
|
readonly visible_top_level_ceiling: 69;
|
|
84
84
|
readonly ceiling_raise_requires_pm_item: true;
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* @module sdk/cli-contracts/grammar-contracts
|
|
3
|
+
*
|
|
4
|
+
* Declares and verifies the agent-facing noun–verb grammar. The destination
|
|
5
|
+
* census is intentionally exact: live command contracts are compared with
|
|
6
|
+
* this checked-in table in both directions so adding or removing a command
|
|
7
|
+
* cannot silently bypass the architecture decision.
|
|
8
|
+
*/
|
|
2
9
|
|
|
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]="
|
|
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]="d0f4c030-0028-5acb-a438-210666118074")}catch(e){}}();
|
|
11
|
+
import { resolvePmCommandAlias, } from "./command-aliases.js";
|
|
12
|
+
/** Canonical top-level domains an agent must retain to route pm operations. */
|
|
4
13
|
export const PM_CLI_GRAMMAR_NOUNS = [
|
|
5
14
|
"item",
|
|
6
15
|
"list",
|
|
@@ -49,6 +58,7 @@ export const PM_CLI_SHARED_VERBS = [
|
|
|
49
58
|
"run",
|
|
50
59
|
"show",
|
|
51
60
|
"uninstall",
|
|
61
|
+
"upgrade",
|
|
52
62
|
"verify",
|
|
53
63
|
];
|
|
54
64
|
function positionalSlot(name, valueKind, required, options = {}) {
|
|
@@ -391,12 +401,6 @@ const EXPLICIT_POSITIONAL_SLOTS = new Map([
|
|
|
391
401
|
["deps", [ITEM_ID]],
|
|
392
402
|
["docs", [ITEM_ID]],
|
|
393
403
|
["event", [positionalSlot("title", "string", true)]],
|
|
394
|
-
[
|
|
395
|
-
"extension",
|
|
396
|
-
[positionalSlot("target", "string", false, { polymorphic: true })],
|
|
397
|
-
],
|
|
398
|
-
["extension list", []],
|
|
399
|
-
["extension scaffold", [positionalSlot("target", "string", true)]],
|
|
400
404
|
["files", [ITEM_ID]],
|
|
401
405
|
["files discover", [ITEM_ID]],
|
|
402
406
|
[
|
|
@@ -422,7 +426,6 @@ const EXPLICIT_POSITIONAL_SLOTS = new Map([
|
|
|
422
426
|
"init",
|
|
423
427
|
[positionalSlot("prefix-or-path", "string", false, { polymorphic: true })],
|
|
424
428
|
],
|
|
425
|
-
["install", [positionalSlot("targets", "string", false, { variadic: true })]],
|
|
426
429
|
["item complete", [ITEM_ID, positionalSlot("reason", "string", false)]],
|
|
427
430
|
["item reopen", [ITEM_ID, positionalSlot("reason", "string", true)]],
|
|
428
431
|
["learnings", [ITEM_ID, OPTIONAL_TEXT]],
|
|
@@ -444,12 +447,14 @@ const EXPLICIT_POSITIONAL_SLOTS = new Map([
|
|
|
444
447
|
],
|
|
445
448
|
["package list", []],
|
|
446
449
|
["package scaffold", [positionalSlot("target", "string", true)]],
|
|
450
|
+
["package upgrade", [positionalSlot("target", "string", false)]],
|
|
447
451
|
[
|
|
448
452
|
"packages",
|
|
449
453
|
[positionalSlot("target", "string", false, { polymorphic: true })],
|
|
450
454
|
],
|
|
451
455
|
["packages list", []],
|
|
452
456
|
["packages scaffold", [positionalSlot("target", "string", true)]],
|
|
457
|
+
["packages upgrade", [positionalSlot("target", "string", false)]],
|
|
453
458
|
["pause-task", [ITEM_ID]],
|
|
454
459
|
[
|
|
455
460
|
"plan",
|
|
@@ -494,7 +499,6 @@ const EXPLICIT_POSITIONAL_SLOTS = new Map([
|
|
|
494
499
|
],
|
|
495
500
|
["test", [ITEM_ID]],
|
|
496
501
|
["update", [ITEM_ID]],
|
|
497
|
-
["upgrade", [positionalSlot("target", "string", false)]],
|
|
498
502
|
[
|
|
499
503
|
"workspace snapshot",
|
|
500
504
|
[
|
|
@@ -528,7 +532,13 @@ function normalizePositionalCommandPath(command) {
|
|
|
528
532
|
/** Resolve one declared signature without treating arbitrary object keys as commands. */
|
|
529
533
|
export function resolvePmCommandPositionalContract(command) {
|
|
530
534
|
const normalized = normalizePositionalCommandPath(command);
|
|
531
|
-
|
|
535
|
+
const direct = PM_COMMAND_POSITIONAL_CONTRACTS.find((contract) => contract.command === normalized);
|
|
536
|
+
if (direct)
|
|
537
|
+
return direct;
|
|
538
|
+
const canonical = resolvePmCommandAlias(normalized)?.canonical;
|
|
539
|
+
if (!canonical)
|
|
540
|
+
return undefined;
|
|
541
|
+
return PM_COMMAND_POSITIONAL_CONTRACTS.find((contract) => contract.command === canonical);
|
|
532
542
|
}
|
|
533
543
|
/** Resolve one action-specific help/contract view. */
|
|
534
544
|
export function resolvePmPositionalActionContract(command) {
|
|
@@ -654,9 +664,9 @@ export const PM_COMMAND_DESTINATION_CONTRACTS = [
|
|
|
654
664
|
"package reload",
|
|
655
665
|
"package scaffold",
|
|
656
666
|
"package uninstall",
|
|
667
|
+
"package upgrade",
|
|
657
668
|
]),
|
|
658
669
|
...destinationRows("package", "package", "consolidation", "pm-tnud", [
|
|
659
|
-
"extension",
|
|
660
670
|
"extension activate",
|
|
661
671
|
"extension adopt",
|
|
662
672
|
"extension adopt-all",
|
|
@@ -667,13 +677,10 @@ export const PM_COMMAND_DESTINATION_CONTRACTS = [
|
|
|
667
677
|
"extension explore",
|
|
668
678
|
"extension init",
|
|
669
679
|
"extension install",
|
|
670
|
-
"extension list",
|
|
671
680
|
"extension manage",
|
|
672
681
|
"extension migrate",
|
|
673
682
|
"extension reload",
|
|
674
|
-
"extension scaffold",
|
|
675
683
|
"extension uninstall",
|
|
676
|
-
"install",
|
|
677
684
|
"packages",
|
|
678
685
|
"packages activate",
|
|
679
686
|
"packages adopt",
|
|
@@ -691,7 +698,7 @@ export const PM_COMMAND_DESTINATION_CONTRACTS = [
|
|
|
691
698
|
"packages reload",
|
|
692
699
|
"packages scaffold",
|
|
693
700
|
"packages uninstall",
|
|
694
|
-
"upgrade",
|
|
701
|
+
"packages upgrade",
|
|
695
702
|
]),
|
|
696
703
|
...destinationRows("package", "package", "package_owned", "package:beads", [
|
|
697
704
|
"beads import",
|
|
@@ -958,4 +965,4 @@ export function verifyPmCliGrammar(commands, aliases = [], destinations = PM_COM
|
|
|
958
965
|
};
|
|
959
966
|
}
|
|
960
967
|
//# sourceMappingURL=grammar-contracts.js.map
|
|
961
|
-
//# debugId=
|
|
968
|
+
//# debugId=d0f4c030-0028-5acb-a438-210666118074
|
|
@@ -4,7 +4,7 @@
|
|
|
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]="a4c43fa6-9f2e-515c-ab47-d21ef5d7878e")}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
10
|
import { ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, ASSURANCE_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, COPY_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, FOCUS_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, ITEM_REOPEN_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_DEPRECATED_TOOL_ACTIONS, 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, PM_COMMAND_ALIAS_CONTRACTS, PM_DIAGNOSTIC_OUTPUT_BUDGET_CONTRACTS, resolvePmCommandOutputBudget, } from "../cli-contracts.js";
|
|
@@ -217,7 +217,7 @@ const CANONICAL_COMMAND_ALIASES = [
|
|
|
217
217
|
},
|
|
218
218
|
{
|
|
219
219
|
canonical: "package",
|
|
220
|
-
aliases: ["extension", "packages"
|
|
220
|
+
aliases: ["extension", "packages"],
|
|
221
221
|
},
|
|
222
222
|
];
|
|
223
223
|
const COMMAND_ALIAS_TO_CANONICAL = new Map(CANONICAL_COMMAND_ALIASES.flatMap((entry) => entry.aliases.map((alias) => [alias, entry.canonical])));
|
|
@@ -313,11 +313,9 @@ const COMMAND_INTENTS = new Map([
|
|
|
313
313
|
["history-redact", "Redact sensitive history values."],
|
|
314
314
|
["history-repair", "Repair history integrity."],
|
|
315
315
|
]);
|
|
316
|
-
// Lifecycle subcommand flag contracts for `pm extension`.
|
|
317
|
-
//
|
|
318
|
-
//
|
|
319
|
-
// variant swaps in PACKAGE_INIT_FLAG_CONTRACTS while every other subcommand is
|
|
320
|
-
// shared verbatim.
|
|
316
|
+
// Lifecycle subcommand flag contracts for `pm extension`. Package lifecycle
|
|
317
|
+
// swaps in the declarative init contract and adds the package-only upgrade
|
|
318
|
+
// command; every shared extension/package subcommand remains byte-identical.
|
|
321
319
|
const EXTENSION_LIFECYCLE_FLAG_CONTRACTS = [
|
|
322
320
|
["init", EXTENSION_INIT_FLAG_CONTRACTS],
|
|
323
321
|
["install", EXTENSION_INSTALL_FLAG_CONTRACTS],
|
|
@@ -334,9 +332,12 @@ const EXTENSION_LIFECYCLE_FLAG_CONTRACTS = [
|
|
|
334
332
|
["deactivate", EXTENSION_DEACTIVATE_FLAG_CONTRACTS],
|
|
335
333
|
["migrate", EXTENSION_MIGRATE_FLAG_CONTRACTS],
|
|
336
334
|
];
|
|
337
|
-
const PACKAGE_LIFECYCLE_FLAG_CONTRACTS =
|
|
338
|
-
|
|
339
|
-
|
|
335
|
+
const PACKAGE_LIFECYCLE_FLAG_CONTRACTS = [
|
|
336
|
+
...EXTENSION_LIFECYCLE_FLAG_CONTRACTS.map(([subcommand, flags]) => subcommand === "init"
|
|
337
|
+
? [subcommand, PACKAGE_INIT_FLAG_CONTRACTS]
|
|
338
|
+
: [subcommand, flags]),
|
|
339
|
+
["upgrade", UPGRADE_FLAG_CONTRACTS],
|
|
340
|
+
];
|
|
340
341
|
const CORE_COMMAND_FLAG_CONTRACT_ENTRIES = [
|
|
341
342
|
...EXTENSION_LIFECYCLE_FLAG_CONTRACTS.map(([subcommand, flags]) => [`extension ${subcommand}`, flags]),
|
|
342
343
|
...PACKAGE_LIFECYCLE_FLAG_CONTRACTS.flatMap(([subcommand, flags]) => [
|
|
@@ -1686,6 +1687,7 @@ const COMMAND_OPERATION_INTENTS = new Map([
|
|
|
1686
1687
|
["run", "Run"],
|
|
1687
1688
|
["snapshot", "Manage snapshots for"],
|
|
1688
1689
|
["uninstall", "Uninstall"],
|
|
1690
|
+
["upgrade", "Upgrade"],
|
|
1689
1691
|
]);
|
|
1690
1692
|
const COMMAND_INTENT_SUBJECT_OVERRIDES = new Map([
|
|
1691
1693
|
["extension adopt-all", "extensions"],
|
|
@@ -2082,4 +2084,4 @@ export const _testOnlyContractsCommand = {
|
|
|
2082
2084
|
toRuntimeShortFlagToken,
|
|
2083
2085
|
};
|
|
2084
2086
|
//# sourceMappingURL=runtime-contracts.js.map
|
|
2085
|
-
//# debugId=
|
|
2087
|
+
//# debugId=a4c43fa6-9f2e-515c-ab47-d21ef5d7878e
|
|
@@ -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]="0b302ca6-1333-532f-a55e-e8e984636456")}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";
|
|
@@ -152,7 +152,8 @@ const PM_TOOL_ACTION_NESTED_OPTION_COMPATIBILITY_KEYS = Object.freeze({
|
|
|
152
152
|
"no_checkpoint",
|
|
153
153
|
"filterAssignee_filter",
|
|
154
154
|
],
|
|
155
|
-
...Object.fromEntries(PM_TOOL_ACTIONS.filter((action) => action === "
|
|
155
|
+
...Object.fromEntries(PM_TOOL_ACTIONS.filter((action) => action === "upgrade" ||
|
|
156
|
+
action === "install" ||
|
|
156
157
|
action === "extension" ||
|
|
157
158
|
action === "package" ||
|
|
158
159
|
action.startsWith("extension-") ||
|
|
@@ -412,6 +413,18 @@ const SCHEDULING_ACTION_SCHEMA_CONTRACT = {
|
|
|
412
413
|
"message",
|
|
413
414
|
],
|
|
414
415
|
};
|
|
416
|
+
const UPGRADE_ACTION_SCHEMA_CONTRACT = {
|
|
417
|
+
optional: [
|
|
418
|
+
"target",
|
|
419
|
+
"scope",
|
|
420
|
+
"dryRun",
|
|
421
|
+
"cliOnly",
|
|
422
|
+
"packagesOnly",
|
|
423
|
+
"repair",
|
|
424
|
+
"tag",
|
|
425
|
+
"packageName",
|
|
426
|
+
],
|
|
427
|
+
};
|
|
415
428
|
const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
|
|
416
429
|
init: {
|
|
417
430
|
optional: [
|
|
@@ -442,22 +455,12 @@ const PM_TOOL_ACTION_SCHEMA_CONTRACTS = {
|
|
|
442
455
|
},
|
|
443
456
|
...managedLifecycleSchemaContracts("extension"),
|
|
444
457
|
...managedLifecycleSchemaContracts("package"),
|
|
458
|
+
"package-upgrade": UPGRADE_ACTION_SCHEMA_CONTRACT,
|
|
445
459
|
install: {
|
|
446
460
|
optional: ["target", "github", "scope", "ref"],
|
|
447
461
|
anyOfRequired: [["target"], ["github"]],
|
|
448
462
|
},
|
|
449
|
-
upgrade:
|
|
450
|
-
optional: [
|
|
451
|
-
"target",
|
|
452
|
-
"scope",
|
|
453
|
-
"dryRun",
|
|
454
|
-
"cliOnly",
|
|
455
|
-
"packagesOnly",
|
|
456
|
-
"repair",
|
|
457
|
-
"tag",
|
|
458
|
-
"packageName",
|
|
459
|
-
],
|
|
460
|
-
},
|
|
463
|
+
upgrade: UPGRADE_ACTION_SCHEMA_CONTRACT,
|
|
461
464
|
create: {
|
|
462
465
|
required: [
|
|
463
466
|
"title",
|
|
@@ -1613,4 +1616,4 @@ export const _testOnlyCliContracts = {
|
|
|
1613
1616
|
withFlagAliasMetadata,
|
|
1614
1617
|
};
|
|
1615
1618
|
//# sourceMappingURL=tool-schema.js.map
|
|
1616
|
-
//# debugId=
|
|
1619
|
+
//# debugId=0b302ca6-1333-532f-a55e-e8e984636456
|
|
@@ -14,7 +14,7 @@ export type { CommanderOptionAliasContract, CommanderOptionRegistrationContract,
|
|
|
14
14
|
export { EXECUTABLE_COMMAND_ALIASES, PM_COMMAND_ALIAS_CONTRACTS, renderPmCommandAliasMigrationHint, resolvePmCommandAlias, type PmCommandAliasContract, type PmCommandAliasLifecycle, type PmCommandAliasRegistration, } from "./cli-contracts/command-aliases.js";
|
|
15
15
|
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";
|
|
16
16
|
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";
|
|
17
|
-
export { MERGE_SUBCOMMAND_VALUES, 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_ITEM_ACTION_SUBCOMMANDS, PM_DEPRECATED_TOOL_ACTIONS, PM_DISCOVERABLE_TOOL_ACTIONS, PM_TOOL_ACTIONS, analyzePmToolActionParity, isPmToolAction, isPmExtensionCapabilityContract, isPmExtensionServiceNameContract, isPmExtensionPolicyModeContract, isPmExtensionPolicySurfaceContract, } from "./cli-contracts/enum-contracts.js";
|
|
17
|
+
export { MERGE_SUBCOMMAND_VALUES, 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_PACKAGE_ONLY_ACTION_SUBCOMMANDS, PM_ITEM_ACTION_SUBCOMMANDS, PM_DEPRECATED_TOOL_ACTIONS, PM_DISCOVERABLE_TOOL_ACTIONS, PM_TOOL_ACTIONS, analyzePmToolActionParity, isPmToolAction, isPmExtensionCapabilityContract, isPmExtensionServiceNameContract, isPmExtensionPolicyModeContract, isPmExtensionPolicySurfaceContract, } from "./cli-contracts/enum-contracts.js";
|
|
18
18
|
export type { MergeSubcommand, PmExtensionCapabilityContract, PmExtensionServiceNameContract, PmExtensionPolicyModeContract, PmExtensionTrustModeContract, PmExtensionSandboxProfileContract, PmExtensionPolicySurfaceContract, PmToolAction, } from "./cli-contracts/enum-contracts.js";
|
|
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, verifyToolOptionCliParity, type ToolOptionCliParityFinding, type ToolOptionCliParityReport, } 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";
|
|
@@ -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]="167b98d4-a5b5-581d-ac0a-17e8e3bfc490")}catch(e){}}();
|
|
3
3
|
export { EXECUTABLE_COMMAND_ALIASES, PM_COMMAND_ALIAS_CONTRACTS, renderPmCommandAliasMigrationHint, resolvePmCommandAlias, } 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";
|
|
@@ -7,7 +7,7 @@ export { CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, CREATE_COMMANDER_REPEAT
|
|
|
7
7
|
// tables live in sibling modules and are re-exported here so existing import
|
|
8
8
|
// sites (sdk/index.ts, mcp/server.ts, commands/contracts.ts, completion.ts, …)
|
|
9
9
|
// keep importing everything from "./cli-contracts.js" unchanged.
|
|
10
|
-
export { MERGE_SUBCOMMAND_VALUES, 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_ITEM_ACTION_SUBCOMMANDS, PM_DEPRECATED_TOOL_ACTIONS, PM_DISCOVERABLE_TOOL_ACTIONS, PM_TOOL_ACTIONS, analyzePmToolActionParity, isPmToolAction, isPmExtensionCapabilityContract, isPmExtensionServiceNameContract, isPmExtensionPolicyModeContract, isPmExtensionPolicySurfaceContract, } from "./cli-contracts/enum-contracts.js";
|
|
10
|
+
export { MERGE_SUBCOMMAND_VALUES, 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_PACKAGE_ONLY_ACTION_SUBCOMMANDS, PM_ITEM_ACTION_SUBCOMMANDS, PM_DEPRECATED_TOOL_ACTIONS, PM_DISCOVERABLE_TOOL_ACTIONS, 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, verifyToolOptionCliParity, } from "./cli-contracts/tool-option-contracts.js";
|
|
12
12
|
export { PM_COMMAND_POSITIONAL_CONTRACTS, PM_POSITIONAL_ACTION_CONTRACTS, } from "./cli-contracts/grammar-contracts.js";
|
|
13
13
|
export { withFlagAliasMetadata, compactFlagAliasContracts, resolvePmPositionalActionFlagContracts, 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, ASSURANCE_FLAG_CONTRACTS, CREATE_FLAG_CONTRACTS, ITEM_COMPLETE_FLAG_CONTRACTS, ITEM_REOPEN_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";
|
|
@@ -15,4 +15,4 @@ export { buildPmActionToolInputSchema, PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES,
|
|
|
15
15
|
export { analyzeSdkCliParameterCompleteness, } from "./cli-contracts/completeness.js";
|
|
16
16
|
export { PM_COMMAND_OUTPUT_BUDGET_CONTRACTS, PM_DIAGNOSTIC_DEGRADATION_STEPS, PM_DIAGNOSTIC_OUTPUT_BUDGET_CONTRACTS, PM_DIAGNOSTIC_OUTPUT_CLASSES, PM_OUTPUT_BUDGET_CLASSES, PM_OUTPUT_DEGRADATION_STEPS, createPmCommandOutputBudget, definePmCommandOutputBudget, estimatePmOutputTokens, inferPmOutputBudgetClass, projectPmDiagnosticOutput, projectPmDiagnosticText, resolvePmDiagnosticOutputBudget, resolvePmCommandOutputBudget, } from "./cli-contracts/agent-output-contracts.js";
|
|
17
17
|
//# sourceMappingURL=cli-contracts.js.map
|
|
18
|
-
//# debugId=
|
|
18
|
+
//# debugId=167b98d4-a5b5-581d-ac0a-17e8e3bfc490
|
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]="31e820a7-aa60-5e37-846d-c62b81b47587")}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. */
|
|
@@ -41,9 +41,10 @@ export function createPmCliProgram(version) {
|
|
|
41
41
|
.option("--no-extensions", "Disable extension loading")
|
|
42
42
|
.option("--no-pager", "Disable pager integration for help and long output")
|
|
43
43
|
.option("--explain", "Render extended rationale and examples in help output")
|
|
44
|
+
.option("--all", "Reveal every public command and compatibility alias")
|
|
44
45
|
.option("--profile", "Print deterministic timing diagnostics")
|
|
45
46
|
.option("--author <id>", "Override mutation author for this invocation")
|
|
46
47
|
.exitOverride();
|
|
47
48
|
}
|
|
48
49
|
//# sourceMappingURL=cli-program.js.map
|
|
49
|
-
//# debugId=
|
|
50
|
+
//# debugId=31e820a7-aa60-5e37-846d-c62b81b47587
|
package/dist/sdk/completion.js
CHANGED
|
@@ -4,11 +4,11 @@
|
|
|
4
4
|
* Implements the pm completion 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]="c8446891-4e65-54c3-9826-eb40f4922f3b")}catch(e){}}();
|
|
8
8
|
import { EXIT_CODE, PmCliError } from "./runtime-primitives.js";
|
|
9
9
|
import { listPmCommandsForTier } from "./agent-capability-contracts.js";
|
|
10
10
|
import { SCAFFOLD_CAPABILITIES } from "./extension/scaffold.js";
|
|
11
|
-
import { AGGREGATE_FLAG_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, CONTEXT_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, MEET_FLAG_CONTRACTS, REMIND_FLAG_CONTRACTS, CREATE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, PM_COMMAND_ALIAS_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PLAN_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, EVENTS_FLAG_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, toCompletionFlagString, } from "./cli-contracts.js";
|
|
11
|
+
import { AGGREGATE_FLAG_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, CONTEXT_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, MEET_FLAG_CONTRACTS, REMIND_FLAG_CONTRACTS, CREATE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, NEXT_FLAG_CONTRACTS, PM_COMMAND_ALIAS_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PLAN_FLAG_CONTRACTS, SEARCH_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, EVENTS_FLAG_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, toCompletionFlagString, } from "./cli-contracts.js";
|
|
12
12
|
import { BUILTIN_ITEM_TYPE_VALUES, STATUS_VALUES } from "../types/index.js";
|
|
13
13
|
import { listGuideTopicIds } from "./guide-topics.js";
|
|
14
14
|
const VALID_SHELLS = ["bash", "zsh", "fish"];
|
|
@@ -49,9 +49,11 @@ const PLAN_SUBCOMMANDS_LIST = "create show add-step update-step complete-step bl
|
|
|
49
49
|
const COMPLETION_FLAGS = toCompletionFlagString(COMPLETION_FLAG_CONTRACTS);
|
|
50
50
|
const COMPLETION_SHELL_CHOICES = `${COMPLETION_FLAGS} bash zsh fish`;
|
|
51
51
|
const GUIDE_TOPIC_CHOICES = joinCompletionValues(listGuideTopicIds());
|
|
52
|
-
const
|
|
52
|
+
const EXTENSION_LIFECYCLE_ACTIONS = "init scaffold install uninstall explore manage describe reload doctor catalog adopt adopt-all activate deactivate migrate";
|
|
53
|
+
const PACKAGE_LIFECYCLE_ACTIONS = `${EXTENSION_LIFECYCLE_ACTIONS} upgrade`;
|
|
53
54
|
const EXTENSION_LIFECYCLE_FLAGS = toCompletionFlagString(EXTENSION_FLAG_CONTRACTS);
|
|
54
55
|
const PACKAGE_LIFECYCLE_FLAGS = toCompletionFlagString(PACKAGE_FLAG_CONTRACTS);
|
|
56
|
+
const UPGRADE_FLAGS = toCompletionFlagString(UPGRADE_FLAG_CONTRACTS);
|
|
55
57
|
const MUTATION_FLAGS = "--author --message --force --json --quiet --no-changed-fields --id-only --pm-path --path --no-extensions --no-pager --profile --help";
|
|
56
58
|
const DELETE_MUTATION_FLAGS = "--dry-run --author --message --force --json --quiet --no-changed-fields --id-only --pm-path --path --no-extensions --no-pager --profile --help";
|
|
57
59
|
const CLOSE_MUTATION_FLAGS = "--author --message --validate-close --duplicate-of --force --json --quiet --no-changed-fields --id-only --pm-path --path --no-extensions --no-pager --profile --help";
|
|
@@ -59,7 +61,6 @@ const RELEASE_MUTATION_FLAGS = "--author --message --force --json --quiet --no-c
|
|
|
59
61
|
const COMMAND_COMPLETION_DESCRIPTIONS = [
|
|
60
62
|
["init", "Initialize pm storage for the current workspace"],
|
|
61
63
|
["config", "Read or update pm settings"],
|
|
62
|
-
["extension", "Manage extension lifecycle operations"],
|
|
63
64
|
["package", "Manage package lifecycle operations"],
|
|
64
65
|
["packages", "Alias for package"],
|
|
65
66
|
["create", "Create a new project management item"],
|
|
@@ -515,13 +516,13 @@ export function generateBashScript(itemTypes = [], tags = [], eagerTagExpansion
|
|
|
515
516
|
"",
|
|
516
517
|
...(useEagerTagExpansion
|
|
517
518
|
? [
|
|
518
|
-
' if [[ "$prev" == "--tag" || "$prev" == "--tags" ]]; then',
|
|
519
|
+
' if [[ ( "$prev" == "--tag" || "$prev" == "--tags" ) && ! ( ( "${COMP_WORDS[1]}" == "package" || "${COMP_WORDS[1]}" == "packages" ) && "${COMP_WORDS[2]}" == "upgrade" ) ]]; then',
|
|
519
520
|
` COMPREPLY=(${compgen(tagValues)})`,
|
|
520
521
|
" return 0",
|
|
521
522
|
" fi",
|
|
522
523
|
]
|
|
523
524
|
: [
|
|
524
|
-
' if [[ "$prev" == "--tag" || "$prev" == "--tags" ]]; then',
|
|
525
|
+
' if [[ ( "$prev" == "--tag" || "$prev" == "--tags" ) && ! ( ( "${COMP_WORDS[1]}" == "package" || "${COMP_WORDS[1]}" == "packages" ) && "${COMP_WORDS[2]}" == "upgrade" ) ]]; then',
|
|
525
526
|
" local now ttl cache_ts tag_values",
|
|
526
527
|
' now="$(date +%s 2>/dev/null || echo 0)"',
|
|
527
528
|
' ttl="${PM_COMPLETION_TAG_TTL:-120}"',
|
|
@@ -537,6 +538,11 @@ export function generateBashScript(itemTypes = [], tags = [], eagerTagExpansion
|
|
|
537
538
|
" fi",
|
|
538
539
|
]),
|
|
539
540
|
"",
|
|
541
|
+
' if [[ "$prev" == "--tag" && ( ( "${COMP_WORDS[1]}" == "package" || "${COMP_WORDS[1]}" == "packages" ) && "${COMP_WORDS[2]}" == "upgrade" ) ]]; then',
|
|
542
|
+
" COMPREPLY=()",
|
|
543
|
+
" return 0",
|
|
544
|
+
" fi",
|
|
545
|
+
"",
|
|
540
546
|
' local cmd="${COMP_WORDS[1]}"',
|
|
541
547
|
"",
|
|
542
548
|
' case "$cmd" in',
|
|
@@ -589,10 +595,10 @@ export function generateBashScript(itemTypes = [], tags = [], eagerTagExpansion
|
|
|
589
595
|
` COMPREPLY=(${compgen("--criterion --clear-criteria --format --policy --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`,
|
|
590
596
|
" ;;",
|
|
591
597
|
" extension)",
|
|
592
|
-
` COMPREPLY=(${compgen(`${
|
|
598
|
+
` COMPREPLY=(${compgen(`${EXTENSION_LIFECYCLE_ACTIONS} ${EXTENSION_LIFECYCLE_FLAGS}`)})`,
|
|
593
599
|
" ;;",
|
|
594
600
|
" package|packages)",
|
|
595
|
-
` COMPREPLY=(${compgen(`${
|
|
601
|
+
` COMPREPLY=(${compgen(`${PACKAGE_LIFECYCLE_ACTIONS} ${PACKAGE_LIFECYCLE_FLAGS} ${UPGRADE_FLAGS}`)})`,
|
|
596
602
|
" ;;",
|
|
597
603
|
" comments)",
|
|
598
604
|
` COMPREPLY=(${compgen("--add --body --stdin --file --edit --delete --limit --full-history --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`,
|
|
@@ -706,6 +712,9 @@ export function generateBashScript(itemTypes = [], tags = [], eagerTagExpansion
|
|
|
706
712
|
` COMPREPLY=(${compgen(GLOBAL_FLAGS)})`,
|
|
707
713
|
" ;;",
|
|
708
714
|
" esac",
|
|
715
|
+
' if [[ "$cmd" == "comments" || "$cmd" == "notes" || "$cmd" == "learnings" ]]; then',
|
|
716
|
+
` COMPREPLY+=(${compgen("--text")})`,
|
|
717
|
+
" fi",
|
|
709
718
|
" return 0",
|
|
710
719
|
"}",
|
|
711
720
|
"",
|
|
@@ -778,6 +787,7 @@ _pm() {
|
|
|
778
787
|
local context state line
|
|
779
788
|
_arguments -C \\
|
|
780
789
|
'--json[Output JSON instead of TOON]' \\
|
|
790
|
+
'--all[Reveal every public command and compatibility alias]' \\
|
|
781
791
|
'--quiet[Suppress stdout output]' \\
|
|
782
792
|
'--output-include[Retain comma-separated read fields or sections]:selectors' \\
|
|
783
793
|
'--output-limit[Set the universal read row ceiling]:limit' \\
|
|
@@ -1353,6 +1363,7 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
|
|
|
1353
1363
|
comments)
|
|
1354
1364
|
_arguments \\
|
|
1355
1365
|
'--add[Add one entry (plain text, text=<value>, markdown pairs, or - for stdin)]:text' \\
|
|
1366
|
+
'--text[Alias for --add]:text' \\
|
|
1356
1367
|
'--stdin[Read comment text from stdin (supports multiline markdown)]' \\
|
|
1357
1368
|
'--file[Read comment text from file (supports multiline markdown)]:path' \\
|
|
1358
1369
|
'--edit[Replace the comment at 1-based index (text from positional/--add/--stdin/--file)]:index' \\
|
|
@@ -1368,6 +1379,7 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
|
|
|
1368
1379
|
notes)
|
|
1369
1380
|
_arguments \\
|
|
1370
1381
|
'--add[Add one entry (plain text, text=<value>, markdown pairs, or - for stdin)]:text' \\
|
|
1382
|
+
'--text[Alias for --add]:text' \\
|
|
1371
1383
|
'--add-json[Append one validated JSON context event]:json' \\
|
|
1372
1384
|
'--stdin[Read entry text from stdin]' \\
|
|
1373
1385
|
'--file[Read entry text from file]:path' \\
|
|
@@ -1387,6 +1399,7 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
|
|
|
1387
1399
|
learnings)
|
|
1388
1400
|
_arguments \\
|
|
1389
1401
|
'--add[Add one entry (plain text, text=<value>, markdown pairs, or - for stdin)]:text' \\
|
|
1402
|
+
'--text[Alias for --add]:text' \\
|
|
1390
1403
|
'--stdin[Read entry text from stdin]' \\
|
|
1391
1404
|
'--file[Read entry text from file]:path' \\
|
|
1392
1405
|
'--edit[Replace the entry at a 1-based index]:index' \\
|
|
@@ -1665,7 +1678,7 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
|
|
|
1665
1678
|
;;
|
|
1666
1679
|
extension)
|
|
1667
1680
|
_arguments \\
|
|
1668
|
-
'1:extension_action:(
|
|
1681
|
+
'1:extension_action:(${EXTENSION_LIFECYCLE_ACTIONS})' \\
|
|
1669
1682
|
'--init[Generate a starter extension scaffold at target path]' \\
|
|
1670
1683
|
'--scaffold[Alias for --init]' \\
|
|
1671
1684
|
'--capability[Capability the init scaffold targets]:capability:(${SCAFFOLD_CAPABILITIES.join(" ")})' \\
|
|
@@ -1704,7 +1717,7 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
|
|
|
1704
1717
|
;;
|
|
1705
1718
|
package|packages)
|
|
1706
1719
|
_arguments \\
|
|
1707
|
-
'1:package_action:(
|
|
1720
|
+
'1:package_action:(${PACKAGE_LIFECYCLE_ACTIONS})' \\
|
|
1708
1721
|
'--init[Generate a starter package scaffold at target path]' \\
|
|
1709
1722
|
'--scaffold[Alias for --init]' \\
|
|
1710
1723
|
'--capability[Capability the init scaffold targets]:capability:(${SCAFFOLD_CAPABILITIES.join(" ")})' \\
|
|
@@ -1738,6 +1751,12 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
|
|
|
1738
1751
|
'--ignore-global[Alias for --isolated]' \\
|
|
1739
1752
|
'--strict-exit[Return non-zero exit when doctor warnings are present]' \\
|
|
1740
1753
|
'--fail-on-warn[Alias for --strict-exit (doctor)]' \\
|
|
1754
|
+
'--dry-run[Plan upgrades without mutating]' \\
|
|
1755
|
+
'--cli-only[Upgrade only the pm CLI/SDK npm package]' \\
|
|
1756
|
+
'--packages-only[Upgrade only managed pm packages]' \\
|
|
1757
|
+
'--repair[Force npm global reinstall for the CLI/SDK]' \\
|
|
1758
|
+
'--tag[npm version or dist-tag for upgrades]:tag' \\
|
|
1759
|
+
'--package-name[Override the CLI package name]:package_name' \\
|
|
1741
1760
|
'--json[Output JSON]' \\
|
|
1742
1761
|
'--quiet[Suppress stdout]' \\
|
|
1743
1762
|
'*:target_or_name:_files -/'
|
|
@@ -1818,6 +1837,7 @@ complete -c pm -f
|
|
|
1818
1837
|
|
|
1819
1838
|
# Global flags (available for all subcommands)
|
|
1820
1839
|
complete -c pm -l json -d 'Output JSON instead of TOON'
|
|
1840
|
+
complete -c pm -l all -d 'Reveal every public command and compatibility alias'
|
|
1821
1841
|
complete -c pm -l quiet -d 'Suppress stdout output'
|
|
1822
1842
|
complete -c pm -l output-include -d 'Retain comma-separated read fields or sections' -r
|
|
1823
1843
|
complete -c pm -l output-limit -d 'Set the universal read row ceiling' -r
|
|
@@ -2423,6 +2443,7 @@ complete -c pm -n '__fish_seen_subcommand_from graph' -l summary -d 'Return coun
|
|
|
2423
2443
|
|
|
2424
2444
|
# comments / notes / learnings flags
|
|
2425
2445
|
complete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l add -d 'Add one entry (text=<value> or plain text)' -r
|
|
2446
|
+
complete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l text -d 'Alias for --add' -r
|
|
2426
2447
|
complete -c pm -n '__fish_seen_subcommand_from notes' -l add-json -d 'Append one validated JSON context event' -r
|
|
2427
2448
|
complete -c pm -n '__fish_seen_subcommand_from notes' -l since -d 'Return structured events at or after an ISO timestamp' -r
|
|
2428
2449
|
complete -c pm -n '__fish_seen_subcommand_from notes' -l event-type -d 'Return structured events with this top-level type' -r
|
|
@@ -2666,7 +2687,7 @@ complete -c pm -n '__fish_seen_subcommand_from completion' -a 'bash zsh fish' -d
|
|
|
2666
2687
|
complete -c pm -n '__fish_seen_subcommand_from templates' -a 'save list show' -d 'Templates command'
|
|
2667
2688
|
|
|
2668
2689
|
# extension lifecycle flags
|
|
2669
|
-
complete -c pm -n '__fish_seen_subcommand_from extension' -a '${
|
|
2690
|
+
complete -c pm -n '__fish_seen_subcommand_from extension' -a '${EXTENSION_LIFECYCLE_ACTIONS}' -d 'Extension action subcommand'
|
|
2670
2691
|
complete -c pm -n '__fish_seen_subcommand_from extension' -l init -d 'Generate starter extension scaffold'
|
|
2671
2692
|
complete -c pm -n '__fish_seen_subcommand_from extension' -l scaffold -d 'Alias for --init'
|
|
2672
2693
|
complete -c pm -n '__fish_seen_subcommand_from extension' -l capability -d 'Capability the init scaffold targets' -r -a '${SCAFFOLD_CAPABILITIES.join(" ")}'
|
|
@@ -2702,7 +2723,7 @@ complete -c pm -n '__fish_seen_subcommand_from extension' -l fail-on-warn -d 'Al
|
|
|
2702
2723
|
|
|
2703
2724
|
# package lifecycle flags
|
|
2704
2725
|
for package_cmd in package packages
|
|
2705
|
-
complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -a '${
|
|
2726
|
+
complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -a '${PACKAGE_LIFECYCLE_ACTIONS}' -d 'Package action subcommand'
|
|
2706
2727
|
complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l init -d 'Generate starter package scaffold'
|
|
2707
2728
|
complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l scaffold -d 'Alias for --init'
|
|
2708
2729
|
complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l capability -d 'Capability the init scaffold targets' -r -a '${SCAFFOLD_CAPABILITIES.join(" ")}'
|
|
@@ -2736,6 +2757,12 @@ for package_cmd in package packages
|
|
|
2736
2757
|
complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l ignore-global -d 'Alias for --isolated'
|
|
2737
2758
|
complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l strict-exit -d 'Return non-zero exit when doctor warnings are present'
|
|
2738
2759
|
complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l fail-on-warn -d 'Alias for --strict-exit (doctor)'
|
|
2760
|
+
complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l dry-run -d 'Plan upgrades without mutating'
|
|
2761
|
+
complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l cli-only -d 'Upgrade only the pm CLI/SDK npm package'
|
|
2762
|
+
complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l packages-only -d 'Upgrade only managed pm packages'
|
|
2763
|
+
complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l repair -d 'Force npm global reinstall for the CLI/SDK'
|
|
2764
|
+
complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l tag -d 'npm version or dist-tag for upgrades' -r
|
|
2765
|
+
complete -c pm -n "__fish_seen_subcommand_from $package_cmd" -l package-name -d 'Override the CLI package name' -r
|
|
2739
2766
|
end`;
|
|
2740
2767
|
}
|
|
2741
2768
|
const SETUP_HINTS = {
|
|
@@ -2767,4 +2794,4 @@ export function runCompletion(shell, itemTypes = [], tags = [], eagerTagExpansio
|
|
|
2767
2794
|
};
|
|
2768
2795
|
}
|
|
2769
2796
|
//# sourceMappingURL=completion.js.map
|
|
2770
|
-
//# debugId=
|
|
2797
|
+
//# debugId=c8446891-4e65-54c3-9826-eb40f4922f3b
|