@unbrained/pm-cli 2026.8.25 → 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 +58 -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 +156 -156
- 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-QLUORNIB.js → chunk-CVBBGWW5.js} +62 -44
- package/dist/cli-bundle/chunks/chunk-MFNTKMTI.js +13 -0
- package/dist/cli-bundle/chunks/chunk-OS27HHBN.js +35 -0
- package/dist/cli-bundle/chunks/chunk-QTO7USTH.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-5I5RWIJC.js → chunk-R4ETAOJC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OWHNAR2B.js → chunk-SH6P7FXI.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-SHMDY36D.js +8 -0
- package/dist/cli-bundle/chunks/{chunk-244MI4GS.js → chunk-SKXLJIEK.js} +60 -60
- package/dist/cli-bundle/chunks/chunk-TNX6HC54.js +3 -0
- package/dist/cli-bundle/chunks/{register-list-query-XVN2ZLI7.js → register-list-query-EUWM6VII.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-QCKAEGIJ.js → register-mutation-FD4HSAVU.js} +4 -4
- package/dist/cli-bundle/chunks/{register-operations-SDEAXE7E.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-IBZZZGK3.js → chunk-2AGZ5BRT.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-4BR5UU52.js +50 -0
- package/dist/cli-bundle/focused-chunks/{chunk-OHIHZ7HS.js → chunk-6GCRSLPG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-OVJL6NZE.js → chunk-AD6ULRAF.js} +4 -4
- 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-N7W67YIG.js → chunk-FC2AXLB5.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-H5JZEIQV.js → chunk-HC7ODMH3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-NOOZGIXP.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-RAFKLNZX.js → chunk-MXTYGECH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-2UIWOP3O.js → chunk-SUBSWYW3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-VXWATRFL.js → chunk-XDPYBQCF.js} +9 -9
- package/dist/cli-bundle/focused-chunks/{chunk-XUQPEKRN.js → chunk-Y3JJXRVK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-GQR3WH3F.js → chunk-Y5A7SJJ7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-YHWHX6YY.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ONYQCALA.js → chunk-YVVZ3LQ6.js} +6 -6
- 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 -6
- package/dist/core/extensions/manifest-schema.d.ts +20 -0
- package/dist/core/extensions/manifest-schema.js +28 -10
- 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/http-server.d.ts +60 -0
- package/dist/mcp/http-server.js +451 -0
- package/dist/mcp/legacy-adapter.d.ts +50 -0
- package/dist/mcp/legacy-adapter.js +64 -0
- package/dist/mcp/server.d.ts +42 -9
- package/dist/mcp/server.js +572 -59
- 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/refusal-closure-census.d.ts +6 -2
- package/dist/sdk/agent/refusal-closure-census.js +16 -8
- 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/compose.d.ts +4 -1
- package/dist/sdk/compose.js +23 -36
- package/dist/sdk/extension/author-manifest.d.ts +22 -0
- package/dist/sdk/extension/author-manifest.js +93 -0
- package/dist/sdk/extension.js +6 -3
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +20 -5
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +18 -3
- package/dist/sdk/governance/health.js +7 -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 +10 -2
- package/dist/sdk/index.js +11 -3
- package/dist/sdk/mcp/apps.d.ts +70 -0
- package/dist/sdk/mcp/apps.js +154 -0
- package/dist/sdk/mcp/authorization.d.ts +134 -0
- package/dist/sdk/mcp/authorization.js +405 -0
- package/dist/sdk/mcp/interactions.d.ts +118 -0
- package/dist/sdk/mcp/interactions.js +337 -0
- package/dist/sdk/mcp/protocol.d.ts +142 -0
- package/dist/sdk/mcp/protocol.js +174 -0
- package/dist/sdk/mcp/skills.d.ts +127 -0
- package/dist/sdk/mcp/skills.js +390 -0
- package/dist/sdk/mcp/subscriptions.d.ts +65 -0
- package/dist/sdk/mcp/subscriptions.js +212 -0
- package/dist/sdk/mcp/tasks.d.ts +107 -0
- package/dist/sdk/mcp/tasks.js +431 -0
- package/dist/sdk/mcp/transport.d.ts +30 -0
- package/dist/sdk/mcp/transport.js +261 -0
- package/dist/sdk/merge/receipts.d.ts +16 -0
- package/dist/sdk/merge/receipts.js +9 -8
- 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 +2 -2
- package/dist/sdk/runtime-primitives.js +4 -4
- package/dist/sdk/test/execution.d.ts +6 -0
- package/dist/sdk/test/execution.js +32 -3
- package/docs/AGENT_PROVENANCE_ADR.md +6 -4
- package/docs/AGENT_RUNTIME_PRIMITIVES.md +6 -5
- package/docs/CLAUDE_CODE_PLUGIN.md +12 -5
- package/docs/CLI_GRAMMAR.md +7 -1
- package/docs/COMMANDS.md +2 -2
- package/docs/DIAGNOSTIC_OUTPUT_CONTRACTS.md +8 -0
- package/docs/EXTENSIONS.md +36 -36
- package/docs/MCP_2026_07_28.md +160 -0
- package/docs/MCP_2026_07_28_CONFORMANCE.md +30 -0
- package/docs/MCP_REMOTE_TRANSPORT_SECURITY.md +180 -0
- package/docs/MCP_SKILLS_AND_APPS.md +107 -0
- package/docs/QUICKSTART.md +15 -15
- package/docs/README.md +5 -0
- package/docs/RELEASING.md +12 -3
- package/docs/SDK.md +22 -1
- package/docs/SDK_AGENT_SESSION_CONTEXT.md +18 -13
- package/docs/SDK_CONTEXT_INTEGRITY.md +6 -0
- package/docs/SDK_EVIDENCE_TRACEABILITY.md +9 -1
- package/docs/SDK_MCP_INTERACTIONS.md +227 -0
- package/docs/TESTING.md +4 -0
- package/docs/generated/AGENT_CAPABILITY_ROUTING.md +1 -1
- package/docs/generated/REFUSAL_CLOSURE_CENSUS.md +13 -11
- package/marketplace.json +2 -2
- package/package.json +15 -11
- 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/scripts/finalize-build.mjs +1 -0
- package/sdk/public-surface.json +902 -54
- package/dist/cli-bundle/chunks/chunk-2F3LUFMW.js +0 -8
- package/dist/cli-bundle/chunks/chunk-65MHLHAA.js +0 -2
- package/dist/cli-bundle/chunks/chunk-6C7GIMIL.js +0 -13
- package/dist/cli-bundle/chunks/chunk-QKGMHGEI.js +0 -202
- package/dist/cli-bundle/chunks/chunk-T2ENPRXF.js +0 -3
- package/dist/cli-bundle/chunks/chunk-TPQIBSL2.js +0 -3
- package/dist/cli-bundle/chunks/chunk-YQMYF3YD.js +0 -35
- package/dist/cli-bundle/chunks/register-setup-LXVBRCJ3.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-42S3GGZ7.js +0 -50
- package/dist/cli-bundle/focused-chunks/chunk-7I23XGWO.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-LMKG3DFE.js +0 -5
|
@@ -14,6 +14,8 @@ export interface ToolDefinition {
|
|
|
14
14
|
description: string;
|
|
15
15
|
/** Value that configures or reports input schema for this contract. */
|
|
16
16
|
inputSchema: Record<string, unknown>;
|
|
17
|
+
/** Optional negotiated extension metadata projected during tools/list. */
|
|
18
|
+
_meta?: Record<string, unknown>;
|
|
17
19
|
}
|
|
18
20
|
/** MCP transport parameters layered over every canonical action schema. */
|
|
19
21
|
export declare const TOOL_SCHEMA_BASE: {
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Defines the Tool Definitions module for pm CLI source.
|
|
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]="b69edba8-884f-521c-9bc3-451c7df755a9")}catch(e){}}();
|
|
8
8
|
import { GRAPH_SUBCOMMAND_VALUES, PM_DISCOVERABLE_TOOL_ACTIONS, } from "../sdk/cli-contracts/enum-contracts.js";
|
|
9
9
|
import { buildPmActionToolInputSchema } from "../sdk/cli-contracts/tool-schema.js";
|
|
10
10
|
import { RUNTIME_STATUS_ROLE_VALUES } from "../types.js";
|
|
@@ -748,4 +748,4 @@ export function buildMcpToolContracts() {
|
|
|
748
748
|
}).sort((left, right) => left.name.localeCompare(right.name));
|
|
749
749
|
}
|
|
750
750
|
//# sourceMappingURL=tool-definitions.js.map
|
|
751
|
-
//# debugId=
|
|
751
|
+
//# debugId=b69edba8-884f-521c-9bc3-451c7df755a9
|
|
@@ -15,7 +15,7 @@ export interface PmClosedDomainContract {
|
|
|
15
15
|
/** Exact argv expected in the refusal's executable recovery. */
|
|
16
16
|
suggested_retry_args: readonly string[];
|
|
17
17
|
/** Stable machine-readable error code that owns the refusal. */
|
|
18
|
-
error_code: "projection_options_mutually_exclusive" | "unknown_context_intent" | "unknown_field_projection";
|
|
18
|
+
error_code: "package_upgrade_modes_mutually_exclusive" | "projection_options_mutually_exclusive" | "unknown_context_intent" | "unknown_field_projection";
|
|
19
19
|
/** Whether a complete accepted-value domain is required in the refusal. */
|
|
20
20
|
allowed_values_required?: boolean;
|
|
21
21
|
}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* without changing the stable core corpus.
|
|
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]="95833d58-d6b9-5ab4-b447-5ce003643fd5")}catch(e){}}();
|
|
10
10
|
import { PM_CONTEXT_INTENT_CONTRACTS } from "../context-intent-contracts.js";
|
|
11
11
|
import { LIST_COMMAND_DEFAULT_PROJECTIONS, listGetProjectionFields, listListProjectionFields, listSearchProjectionFields, } from "../query/projection-contracts.js";
|
|
12
12
|
const REJECTED_INTENT = "not-a-declared-intent";
|
|
@@ -107,6 +107,28 @@ export function listCoreClosedDomainContracts() {
|
|
|
107
107
|
error_code: "projection_options_mutually_exclusive",
|
|
108
108
|
allowed_values_required: false,
|
|
109
109
|
},
|
|
110
|
+
{
|
|
111
|
+
probe_id: "package-upgrade-mutually-exclusive-modes",
|
|
112
|
+
command: "package upgrade",
|
|
113
|
+
flag: "--cli-only/--packages-only",
|
|
114
|
+
rejected_value: "--cli-only+--packages-only",
|
|
115
|
+
refusal_args: [
|
|
116
|
+
"package",
|
|
117
|
+
"upgrade",
|
|
118
|
+
"--cli-only",
|
|
119
|
+
"--packages-only",
|
|
120
|
+
"--dry-run",
|
|
121
|
+
],
|
|
122
|
+
allowed_values: [],
|
|
123
|
+
suggested_retry_args: [
|
|
124
|
+
"package",
|
|
125
|
+
"upgrade",
|
|
126
|
+
"--packages-only",
|
|
127
|
+
"--dry-run",
|
|
128
|
+
],
|
|
129
|
+
error_code: "package_upgrade_modes_mutually_exclusive",
|
|
130
|
+
allowed_values_required: false,
|
|
131
|
+
},
|
|
110
132
|
{
|
|
111
133
|
probe_id: "search-invalid-field",
|
|
112
134
|
command: "search",
|
|
@@ -137,4 +159,4 @@ export function renderPmClosedDomainHelp(command, flag) {
|
|
|
137
159
|
return `Allowed core values: ${canonicalValues.join("|")}.${runtimeSuffix}`;
|
|
138
160
|
}
|
|
139
161
|
//# sourceMappingURL=closed-domain-contracts.js.map
|
|
140
|
-
//# debugId=
|
|
162
|
+
//# debugId=95833d58-d6b9-5ab4-b447-5ce003643fd5
|
|
@@ -44,10 +44,14 @@ export interface PmRefusalClosureCensusReport {
|
|
|
44
44
|
/** Exactly one row for every catalog code. */
|
|
45
45
|
rows: PmRefusalClosureCensusRow[];
|
|
46
46
|
}
|
|
47
|
-
/**
|
|
47
|
+
/** @deprecated Historical v1 floor retained for SDK compatibility. */
|
|
48
48
|
export declare const PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE = 16;
|
|
49
|
-
/**
|
|
49
|
+
/** @deprecated Historical v1 identities retained for SDK compatibility. */
|
|
50
50
|
export declare const PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE: readonly ["bulk_ids_input_empty", "bulk_ids_input_missing_path", "bulk_ids_input_unreadable", "invalid_argument_value", "missing_lifecycle_target", "missing_required_argument", "projection_options_mutually_exclusive", "tracker_not_initialized", "tracker_root_missing", "tracker_root_not_directory", "tracker_root_unreadable", "unknown_context_intent", "unknown_field_projection", "unknown_option", "unknown_subcommand"];
|
|
51
|
+
/** Reviewed v2 floor of 18 catalog rows across 17 canonical groups. */
|
|
52
|
+
export declare const PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE_V2 = 18;
|
|
53
|
+
/** V2 canonical identities that must retain executable evidence. */
|
|
54
|
+
export declare const PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE_V2: readonly string[];
|
|
51
55
|
/** Ratchet receipt that prevents catalog growth from erasing proven closure. */
|
|
52
56
|
export declare function verifyPmRefusalClosureRatchet(report: PmRefusalClosureCensusReport, baseline?: number): {
|
|
53
57
|
ok: boolean;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/** @deprecated Historical v1 floor retained for SDK compatibility. */
|
|
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]="a1efaf49-c6ca-53dd-8fad-eb2540c20cc8")}catch(e){}}();
|
|
4
4
|
export const PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE = 16;
|
|
5
|
-
/**
|
|
5
|
+
/** @deprecated Historical v1 identities retained for SDK compatibility. */
|
|
6
6
|
export const PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE = Object.freeze([
|
|
7
7
|
"bulk_ids_input_empty",
|
|
8
8
|
"bulk_ids_input_missing_path",
|
|
@@ -20,8 +20,16 @@ export const PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE = Object.free
|
|
|
20
20
|
"unknown_option",
|
|
21
21
|
"unknown_subcommand",
|
|
22
22
|
]);
|
|
23
|
+
/** Reviewed v2 floor of 18 catalog rows across 17 canonical groups. */
|
|
24
|
+
export const PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE_V2 = 18;
|
|
25
|
+
/** V2 canonical identities that must retain executable evidence. */
|
|
26
|
+
export const PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE_V2 = Object.freeze([
|
|
27
|
+
...PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE,
|
|
28
|
+
"manifest_unknown_key",
|
|
29
|
+
"no_version_bounds_declared",
|
|
30
|
+
].sort((left, right) => left.localeCompare(right)));
|
|
23
31
|
/** Ratchet receipt that prevents catalog growth from erasing proven closure. */
|
|
24
|
-
export function verifyPmRefusalClosureRatchet(report, baseline =
|
|
32
|
+
export function verifyPmRefusalClosureRatchet(report, baseline = PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE_V2) {
|
|
25
33
|
return {
|
|
26
34
|
ok: report.executable_error_code_count >= baseline,
|
|
27
35
|
baseline,
|
|
@@ -29,7 +37,7 @@ export function verifyPmRefusalClosureRatchet(report, baseline = PM_REFUSAL_CLOS
|
|
|
29
37
|
};
|
|
30
38
|
}
|
|
31
39
|
/** Ratchet canonical compatibility-group identities independently from counts. */
|
|
32
|
-
export function verifyPmRefusalClosureIdentityRatchet(report, requiredCanonicalCodes =
|
|
40
|
+
export function verifyPmRefusalClosureIdentityRatchet(report, requiredCanonicalCodes = PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE_V2) {
|
|
33
41
|
const executableCanonicalCodes = new Set(report.rows
|
|
34
42
|
.filter(({ disposition }) => disposition === "executable")
|
|
35
43
|
.map(({ canonical_code: canonicalCode }) => canonicalCode));
|
|
@@ -127,8 +135,8 @@ export function renderPmRefusalClosureCensusMarkdown(report) {
|
|
|
127
135
|
"",
|
|
128
136
|
`- Catalog error codes: ${report.catalog_error_code_count}`,
|
|
129
137
|
`- Executable error codes: ${report.executable_error_code_count}`,
|
|
130
|
-
`- Executable-code ratchet floor: ${
|
|
131
|
-
`- Required executable canonical codes: ${
|
|
138
|
+
`- Executable-code ratchet floor: ${PM_REFUSAL_CLOSURE_EXECUTABLE_CODE_BASELINE_V2}`,
|
|
139
|
+
`- Required executable canonical codes: ${PM_REFUSAL_CLOSURE_EXECUTABLE_CANONICAL_CODE_BASELINE_V2.map((code) => `\`${code}\``).join(", ")}`,
|
|
132
140
|
`- Uncovered error codes: ${report.uncovered_error_code_count}`,
|
|
133
141
|
`- Coverage fraction: ${report.coverage_fraction.toFixed(6)}`,
|
|
134
142
|
`- Closed-domain probes: ${report.closed_domain_probe_count}`,
|
|
@@ -141,4 +149,4 @@ export function renderPmRefusalClosureCensusMarkdown(report) {
|
|
|
141
149
|
].join("\n");
|
|
142
150
|
}
|
|
143
151
|
//# sourceMappingURL=refusal-closure-census.js.map
|
|
144
|
-
//# debugId=
|
|
152
|
+
//# debugId=a1efaf49-c6ca-53dd-8fad-eb2540c20cc8
|
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* surfaces from one public SDK contract.
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
8
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="d8f3f734-9adf-56f3-a5ba-c8b6407c4a89")}catch(e){}}();
|
|
9
9
|
import { PM_CORE_COMMAND_NAMES } from "./cli-contracts/enum-contracts.js";
|
|
10
10
|
const CORE_COMMANDS = new Set([
|
|
11
11
|
"claim",
|
|
@@ -244,6 +244,8 @@ const CAPABILITY_FAMILY_ORDER = [
|
|
|
244
244
|
];
|
|
245
245
|
const CAPABILITY_ROUTING_EXCLUDED_ALIASES = new Set([
|
|
246
246
|
"ctx",
|
|
247
|
+
"extension",
|
|
248
|
+
"install",
|
|
247
249
|
"item-reopen",
|
|
248
250
|
"list-all",
|
|
249
251
|
"list-blocked",
|
|
@@ -252,6 +254,8 @@ const CAPABILITY_ROUTING_EXCLUDED_ALIASES = new Set([
|
|
|
252
254
|
"list-draft",
|
|
253
255
|
"list-in-progress",
|
|
254
256
|
"list-open",
|
|
257
|
+
"packages",
|
|
258
|
+
"upgrade",
|
|
255
259
|
]);
|
|
256
260
|
/** Group the command registry for progressive-disclosure routing surfaces. */
|
|
257
261
|
export function listPmCommandCapabilityGroups(contracts = PM_COMMAND_CAPABILITY_CONTRACTS) {
|
|
@@ -420,4 +424,4 @@ export function renderPmCapabilityRoutingMarkdown(contracts = PM_COMMAND_CAPABIL
|
|
|
420
424
|
].join("\n");
|
|
421
425
|
}
|
|
422
426
|
//# sourceMappingURL=agent-capability-contracts.js.map
|
|
423
|
-
//# debugId=
|
|
427
|
+
//# debugId=d8f3f734-9adf-56f3-a5ba-c8b6407c4a89
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Provides public bootstrap argument normalization for embedded CLI hosts.
|
|
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]="90f1f3ba-b3a9-5730-9cf7-8947e782a027")}catch(e){}}();
|
|
8
8
|
import { EXECUTABLE_COMMAND_ALIASES, PM_COMMAND_ALIAS_CONTRACTS, renderPmCommandAliasMigrationHint, resolvePmCommandAlias, resolveSubcommandFlagContractsForCommand, } from "./cli-contracts.js";
|
|
9
9
|
export { EXECUTABLE_COMMAND_ALIASES, PM_COMMAND_ALIAS_CONTRACTS, renderPmCommandAliasMigrationHint, resolvePmCommandAlias, };
|
|
10
10
|
import { levenshteinDistanceWithinLimit } from "../core/shared/levenshtein.js";
|
|
@@ -50,6 +50,7 @@ const BOOTSTRAP_BOOLEAN_FLAGS = new Set([
|
|
|
50
50
|
"--lean",
|
|
51
51
|
"--token-accounting",
|
|
52
52
|
"--output-row-contract",
|
|
53
|
+
"--all",
|
|
53
54
|
]);
|
|
54
55
|
/** Consume one bootstrap-global token and update the accumulated parse state. */
|
|
55
56
|
function consumeBootstrapGlobalToken(argv, index, state) {
|
|
@@ -895,4 +896,4 @@ export const _testOnly = {
|
|
|
895
896
|
resolveCanonicalFlag,
|
|
896
897
|
};
|
|
897
898
|
//# sourceMappingURL=cli-bootstrap.js.map
|
|
898
|
-
//# debugId=
|
|
899
|
+
//# debugId=90f1f3ba-b3a9-5730-9cf7-8947e782a027
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* are intentionally absent from default help and completion discovery.
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
13
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3c9694bd-3635-5298-abeb-6899c94317ab")}catch(e){}}();
|
|
14
14
|
export const PM_COMMAND_ALIAS_CONTRACTS = [
|
|
15
15
|
...[
|
|
16
16
|
["fetch", "get"],
|
|
@@ -70,6 +70,19 @@ export const PM_COMMAND_ALIAS_CONTRACTS = [
|
|
|
70
70
|
registration: "commander",
|
|
71
71
|
owner: "pm-pfqi",
|
|
72
72
|
})),
|
|
73
|
+
...[
|
|
74
|
+
["extension", "package"],
|
|
75
|
+
["install", "package install"],
|
|
76
|
+
["upgrade", "package upgrade"],
|
|
77
|
+
].map(([alias, canonical]) => ({
|
|
78
|
+
alias,
|
|
79
|
+
canonical,
|
|
80
|
+
canonical_argv: canonical.split(" "),
|
|
81
|
+
lifecycle: "deprecated",
|
|
82
|
+
hidden: true,
|
|
83
|
+
registration: "commander",
|
|
84
|
+
owner: "pm-tnud",
|
|
85
|
+
})),
|
|
73
86
|
];
|
|
74
87
|
/** High-frequency executable aliases whose targets accept identical arguments. */
|
|
75
88
|
export const EXECUTABLE_COMMAND_ALIASES = Object.fromEntries(PM_COMMAND_ALIAS_CONTRACTS.filter((contract) => contract.registration === "bootstrap").map((contract) => [contract.alias, contract.canonical]));
|
|
@@ -83,4 +96,4 @@ export function renderPmCommandAliasMigrationHint(contract) {
|
|
|
83
96
|
return `Deprecated command \`${contract.alias}\`; use \`pm ${contract.canonical_argv.join(" ")}\`.`;
|
|
84
97
|
}
|
|
85
98
|
//# sourceMappingURL=command-aliases.js.map
|
|
86
|
-
//# debugId=
|
|
99
|
+
//# debugId=3c9694bd-3635-5298-abeb-6899c94317ab
|
|
@@ -34,6 +34,8 @@ export declare const MERGE_SUBCOMMAND_VALUES: readonly ["install", "reconcile",
|
|
|
34
34
|
export type MergeSubcommand = (typeof MERGE_SUBCOMMAND_VALUES)[number];
|
|
35
35
|
/** Nested lifecycle verbs flattened by SDK and MCP package actions. */
|
|
36
36
|
export declare const PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS: readonly ["init", "install", "uninstall", "explore", "manage", "describe", "reload", "doctor", "catalog", "adopt", "adopt-all", "activate", "deactivate"];
|
|
37
|
+
/** Package-only lifecycle verbs flattened by SDK and MCP package actions. */
|
|
38
|
+
export declare const PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS: readonly ["upgrade"];
|
|
37
39
|
/** Noun-first item lifecycle verbs flattened for SDK and MCP dispatch. */
|
|
38
40
|
export declare const PM_ITEM_ACTION_SUBCOMMANDS: readonly ["reopen"];
|
|
39
41
|
/** CLI-only presentation commands intentionally omitted from programmatic actions. */
|
|
@@ -44,9 +46,10 @@ export declare const PM_CLI_ONLY_TOOL_ACTION_WAIVERS: {
|
|
|
44
46
|
type PmCoreCommandName = (typeof PM_CORE_COMMAND_NAMES)[number];
|
|
45
47
|
type PmCliOnlyToolAction = keyof typeof PM_CLI_ONLY_TOOL_ACTION_WAIVERS;
|
|
46
48
|
type PmExtensionPackageAction = `${"extension" | "package"}-${(typeof PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS)[number]}`;
|
|
49
|
+
type PmPackageOnlyAction = `package-${(typeof PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS)[number]}`;
|
|
47
50
|
type PmItemAction = `item-${(typeof PM_ITEM_ACTION_SUBCOMMANDS)[number]}`;
|
|
48
51
|
/** Restricts pm tool action values accepted by command, SDK, and storage contracts. */
|
|
49
|
-
export type PmToolAction = Exclude<PmCoreCommandName, PmCliOnlyToolAction | "item"> | PmExtensionPackageAction | PmItemAction;
|
|
52
|
+
export type PmToolAction = Exclude<PmCoreCommandName, PmCliOnlyToolAction | "item"> | PmExtensionPackageAction | PmPackageOnlyAction | PmItemAction;
|
|
50
53
|
/**
|
|
51
54
|
* Public pm tool actions derived from the CLI vocabulary. Nested extension and
|
|
52
55
|
* package verbs are flattened for transports that expose one action string.
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Defines SDK command-contract metadata for Enum 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]="6315a62f-6f55-5200-a5ea-ec892ff39f58")}catch(e){}}();
|
|
8
8
|
import { KNOWN_EXTENSION_CAPABILITIES, KNOWN_EXTENSION_POLICY_MODES, KNOWN_EXTENSION_POLICY_SURFACES, KNOWN_EXTENSION_SANDBOX_PROFILES, KNOWN_EXTENSION_SERVICE_NAMES, KNOWN_EXTENSION_TRUST_MODES, } from "../../core/extensions/extension-types.js";
|
|
9
9
|
import { PM_COMMAND_ALIAS_CONTRACTS } from "./command-aliases.js";
|
|
10
10
|
/** Public contract for pm extension capability contracts, shared by SDK and presentation-layer consumers. */
|
|
@@ -147,6 +147,8 @@ export const PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS = [
|
|
|
147
147
|
"activate",
|
|
148
148
|
"deactivate",
|
|
149
149
|
];
|
|
150
|
+
/** Package-only lifecycle verbs flattened by SDK and MCP package actions. */
|
|
151
|
+
export const PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS = ["upgrade"];
|
|
150
152
|
/** Noun-first item lifecycle verbs flattened for SDK and MCP dispatch. */
|
|
151
153
|
export const PM_ITEM_ACTION_SUBCOMMANDS = ["reopen"];
|
|
152
154
|
/** CLI-only presentation commands intentionally omitted from programmatic actions. */
|
|
@@ -164,6 +166,9 @@ export const PM_TOOL_ACTIONS = Object.freeze(PM_CORE_COMMAND_NAMES.flatMap((comm
|
|
|
164
166
|
if (command === "extension" || command === "package") {
|
|
165
167
|
return [
|
|
166
168
|
...PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS.map((subcommand) => `${command}-${subcommand}`),
|
|
169
|
+
...(command === "package"
|
|
170
|
+
? PM_PACKAGE_ONLY_ACTION_SUBCOMMANDS.map((subcommand) => `package-${subcommand}`)
|
|
171
|
+
: []),
|
|
167
172
|
command,
|
|
168
173
|
];
|
|
169
174
|
}
|
|
@@ -215,4 +220,4 @@ export function isPmExtensionPolicySurfaceContract(value) {
|
|
|
215
220
|
return PM_EXTENSION_POLICY_SURFACE_CONTRACTS.includes(value);
|
|
216
221
|
}
|
|
217
222
|
//# sourceMappingURL=enum-contracts.js.map
|
|
218
|
-
//# debugId=
|
|
223
|
+
//# debugId=6315a62f-6f55-5200-a5ea-ec892ff39f58
|
|
@@ -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
|