@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
|
@@ -1,8 +1,9 @@
|
|
|
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]="feb682f9-344c-569e-bbab-861fe20f08f1")}catch(e){}}();
|
|
3
3
|
import fs from "node:fs/promises";
|
|
4
4
|
import path from "node:path";
|
|
5
|
-
import { EXIT_CODE, PmCliError, } from "../sdk/runtime-primitives.js";
|
|
5
|
+
import { EXIT_CODE, PmCliError, readSettings, resolvePmRoot, } from "../sdk/runtime-primitives.js";
|
|
6
|
+
import { renderPmCommandAliasMigrationHint, resolvePmCommandAlias, } from "../sdk/cli-contracts.js";
|
|
6
7
|
import { collect, getGlobalOptions, printError, printResult, writeStdout, } from "./registration-helpers.js";
|
|
7
8
|
import { runExtension, } from "./commands/extension.js";
|
|
8
9
|
import { SCAFFOLD_CAPABILITIES } from "./commands/extension/scaffold.js";
|
|
@@ -10,6 +11,20 @@ import { renderExtensionDescribeMarkdown, } from "./commands/extension/describe.
|
|
|
10
11
|
import { runConfig } from "./commands/config.js";
|
|
11
12
|
import { runInit, summarizeInitResult } from "./commands/init.js";
|
|
12
13
|
import { runUpgrade } from "./commands/upgrade.js";
|
|
14
|
+
const LIFECYCLE_DEPRECATION_ALIASES = {
|
|
15
|
+
extension: "extension",
|
|
16
|
+
package: undefined,
|
|
17
|
+
};
|
|
18
|
+
async function emitDeprecatedAliasHint(alias, command) {
|
|
19
|
+
if (!alias)
|
|
20
|
+
return;
|
|
21
|
+
const aliasContract = resolvePmCommandAlias(alias);
|
|
22
|
+
const globalOptions = getGlobalOptions(command);
|
|
23
|
+
const deprecationHints = await readSettings(resolvePmRoot(process.cwd(), globalOptions.path)).then((settings) => settings.ux.deprecation_hints);
|
|
24
|
+
if (deprecationHints) {
|
|
25
|
+
printError(renderPmCommandAliasMigrationHint(aliasContract));
|
|
26
|
+
}
|
|
27
|
+
}
|
|
13
28
|
const EXTENSION_ACTION_OPTION_KEYS = {
|
|
14
29
|
init: "init",
|
|
15
30
|
install: "install",
|
|
@@ -181,7 +196,9 @@ function applyExtensionDoctorStrictExit(result, normalizedOptions) {
|
|
|
181
196
|
async function executeExtensionCommand(target, options, command, forcedAction, vocabulary = "extension") {
|
|
182
197
|
const globalOptions = getGlobalOptions(command);
|
|
183
198
|
const startedAt = Date.now();
|
|
184
|
-
const
|
|
199
|
+
const effectiveVocabulary = vocabulary === "extension" ? "package" : vocabulary;
|
|
200
|
+
await emitDeprecatedAliasHint(LIFECYCLE_DEPRECATION_ALIASES[vocabulary], command);
|
|
201
|
+
const normalizedOptions = normalizeExtensionOptions(options, forcedAction, effectiveVocabulary);
|
|
185
202
|
const outputOption = typeof normalizedOptions.output === "string"
|
|
186
203
|
? normalizedOptions.output
|
|
187
204
|
: undefined;
|
|
@@ -191,7 +208,7 @@ async function executeExtensionCommand(target, options, command, forcedAction, v
|
|
|
191
208
|
if (normalizedOptions.markdown === true) {
|
|
192
209
|
await emitExtensionMarkdownResult({
|
|
193
210
|
result,
|
|
194
|
-
vocabulary,
|
|
211
|
+
vocabulary: effectiveVocabulary,
|
|
195
212
|
outputPath,
|
|
196
213
|
globalOptions,
|
|
197
214
|
});
|
|
@@ -225,36 +242,13 @@ function serializeExtensionInstallError(error) {
|
|
|
225
242
|
exit_code: EXIT_CODE.GENERIC_FAILURE,
|
|
226
243
|
};
|
|
227
244
|
}
|
|
228
|
-
async function
|
|
229
|
-
const normalizedTargets = await normalizeInstallTargets(targets);
|
|
230
|
-
if (normalizedTargets === undefined || normalizedTargets.length <= 1) {
|
|
231
|
-
await executeExtensionCommand(normalizedTargets?.[0], options, command, "install", vocabulary);
|
|
232
|
-
return;
|
|
233
|
-
}
|
|
234
|
-
const globalOptions = getGlobalOptions(command);
|
|
235
|
-
const startedAt = Date.now();
|
|
236
|
-
const normalizedOptions = normalizeExtensionOptions(options, "install", vocabulary);
|
|
237
|
-
validateExtensionMarkdownOptions(normalizedOptions, globalOptions, undefined);
|
|
238
|
-
const hasForcedGithubSource = [
|
|
239
|
-
normalizedOptions.gh,
|
|
240
|
-
normalizedOptions.github,
|
|
241
|
-
].some((value) => typeof value === "string" && value.trim().length > 0);
|
|
242
|
-
if (hasForcedGithubSource) {
|
|
243
|
-
throw new PmCliError("Multiple install targets cannot be combined with --gh/--github. Install one GitHub source per command, or pass multiple explicit local, bundled, or npm: targets.", EXIT_CODE.USAGE, {
|
|
244
|
-
code: "multi_target_github_install_ambiguous",
|
|
245
|
-
required: "Use exactly one positional target with --gh/--github, or omit --gh/--github when installing multiple targets.",
|
|
246
|
-
examples: [
|
|
247
|
-
"pm install --gh owner/repo",
|
|
248
|
-
"pm install npm:pm-guide-shell pm-todos",
|
|
249
|
-
],
|
|
250
|
-
});
|
|
251
|
-
}
|
|
245
|
+
async function runMultiTargetExtensionInstalls(targets, options, globalOptions) {
|
|
252
246
|
const rows = [];
|
|
253
247
|
const warnings = [];
|
|
254
248
|
let failureExitCode = EXIT_CODE.GENERIC_FAILURE;
|
|
255
|
-
for (const target of
|
|
249
|
+
for (const target of targets) {
|
|
256
250
|
try {
|
|
257
|
-
const result = await runExtension(target,
|
|
251
|
+
const result = await runExtension(target, options, globalOptions);
|
|
258
252
|
const details = extractExtensionInstallDetails(result);
|
|
259
253
|
const targetWarnings = Array.isArray(result.warnings)
|
|
260
254
|
? result.warnings
|
|
@@ -302,6 +296,35 @@ async function executeExtensionInstallCommand(targets, options, command, vocabul
|
|
|
302
296
|
});
|
|
303
297
|
}
|
|
304
298
|
}
|
|
299
|
+
return { rows, warnings, failureExitCode };
|
|
300
|
+
}
|
|
301
|
+
async function executeExtensionInstallCommand(targets, options, command, vocabulary) {
|
|
302
|
+
const effectiveVocabulary = vocabulary === "extension" ? "package" : vocabulary;
|
|
303
|
+
await emitDeprecatedAliasHint(LIFECYCLE_DEPRECATION_ALIASES[vocabulary], command);
|
|
304
|
+
const normalizedTargets = await normalizeInstallTargets(targets);
|
|
305
|
+
if (normalizedTargets === undefined || normalizedTargets.length <= 1) {
|
|
306
|
+
await executeExtensionCommand(normalizedTargets?.[0], options, command, "install", effectiveVocabulary);
|
|
307
|
+
return;
|
|
308
|
+
}
|
|
309
|
+
const globalOptions = getGlobalOptions(command);
|
|
310
|
+
const startedAt = Date.now();
|
|
311
|
+
const normalizedOptions = normalizeExtensionOptions(options, "install", effectiveVocabulary);
|
|
312
|
+
validateExtensionMarkdownOptions(normalizedOptions, globalOptions, undefined);
|
|
313
|
+
const hasForcedGithubSource = [
|
|
314
|
+
normalizedOptions.gh,
|
|
315
|
+
normalizedOptions.github,
|
|
316
|
+
].some((value) => typeof value === "string" && value.trim().length > 0);
|
|
317
|
+
if (hasForcedGithubSource) {
|
|
318
|
+
throw new PmCliError("Multiple install targets cannot be combined with --gh/--github. Install one GitHub source per command, or pass multiple explicit local, bundled, or npm: targets.", EXIT_CODE.USAGE, {
|
|
319
|
+
code: "multi_target_github_install_ambiguous",
|
|
320
|
+
required: "Use exactly one positional target with --gh/--github, or omit --gh/--github when installing multiple targets.",
|
|
321
|
+
examples: [
|
|
322
|
+
"pm install --gh owner/repo",
|
|
323
|
+
"pm install npm:pm-guide-shell pm-todos",
|
|
324
|
+
],
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
const { rows, warnings, failureExitCode } = await runMultiTargetExtensionInstalls(normalizedTargets, normalizedOptions, globalOptions);
|
|
305
328
|
const failedCount = rows.filter((row) => row.ok !== true).length;
|
|
306
329
|
const result = {
|
|
307
330
|
ok: failedCount === 0,
|
|
@@ -337,17 +360,41 @@ function addLifecycleScopeOptions(command, vocabulary) {
|
|
|
337
360
|
? addPackageScopeOptions(command)
|
|
338
361
|
: addExtensionScopeOptions(command);
|
|
339
362
|
}
|
|
363
|
+
function addUpgradeOptions(command) {
|
|
364
|
+
return command
|
|
365
|
+
.option("--dry-run", "Plan CLI/package upgrades without running npm or reinstalling packages")
|
|
366
|
+
.option("--cli-only", "Upgrade only the pm CLI/SDK npm package")
|
|
367
|
+
.option("--packages-only", "Upgrade only managed pm packages")
|
|
368
|
+
.option("--repair", "Force npm global reinstall when upgrading the pm CLI/SDK")
|
|
369
|
+
.option("--tag <value>", "npm dist-tag/version for CLI and registry package upgrades")
|
|
370
|
+
.option("--package-name <value>", "Override the CLI package name for self-upgrade testing");
|
|
371
|
+
}
|
|
372
|
+
async function executeUpgradeCommand(target, command, legacyAlias) {
|
|
373
|
+
const globalOptions = getGlobalOptions(command);
|
|
374
|
+
const startedAt = Date.now();
|
|
375
|
+
if (legacyAlias) {
|
|
376
|
+
await emitDeprecatedAliasHint("upgrade", command);
|
|
377
|
+
}
|
|
378
|
+
const result = await runUpgrade(target, command.opts(), globalOptions);
|
|
379
|
+
printResult(result, globalOptions);
|
|
380
|
+
if (!result.ok) {
|
|
381
|
+
process.exitCode = EXIT_CODE.GENERIC_FAILURE;
|
|
382
|
+
}
|
|
383
|
+
if (globalOptions.profile) {
|
|
384
|
+
printError(`profile:command=package-upgrade took_ms=${Date.now() - startedAt}`);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
340
387
|
function registerLifecycleCommand(program, vocabulary) {
|
|
341
388
|
const noun = vocabulary === "package" ? "package" : "extension";
|
|
342
389
|
const plural = vocabulary === "package" ? "packages" : "extensions";
|
|
343
390
|
const commandName = vocabulary;
|
|
344
391
|
const lifecycleCommand = program
|
|
345
|
-
.command(commandName)
|
|
346
|
-
.argument("[target]", `${noun[0].toUpperCase()}${noun.slice(1)} source
|
|
392
|
+
.command(commandName, { hidden: vocabulary === "extension" })
|
|
393
|
+
.argument("[target]", `${noun[0].toUpperCase()}${noun.slice(1)} source, name, or scaffold path`)
|
|
347
394
|
.option("--init", `Generate a starter ${noun} scaffold at target path`)
|
|
348
395
|
.option("--scaffold", "Alias for --init")
|
|
349
|
-
.option("--capability <kind>",
|
|
350
|
-
.option("--install", `Install ${noun}
|
|
396
|
+
.option("--capability <kind>", "Starter capability for --init (default: commands)", collect)
|
|
397
|
+
.option("--install", `Install a ${noun} source`)
|
|
351
398
|
.option("--uninstall", `Uninstall an installed ${noun}`)
|
|
352
399
|
.option("--explore", `List discovered ${plural} in selected scope`)
|
|
353
400
|
.option("--list", "Alias for --explore")
|
|
@@ -378,8 +425,8 @@ function registerLifecycleCommand(program, vocabulary) {
|
|
|
378
425
|
.option("--strict-exit", "Return non-zero exit when doctor warnings are present (ok=false)")
|
|
379
426
|
.option("--fail-on-warn", "Alias for --strict-exit (doctor)")
|
|
380
427
|
.description(vocabulary === "package"
|
|
381
|
-
? "Manage package lifecycle
|
|
382
|
-
: "Manage extension lifecycle
|
|
428
|
+
? "Manage package lifecycle in project or global scope."
|
|
429
|
+
: "Manage extension lifecycle in project or global scope.")
|
|
383
430
|
.action(async (target, _options, command) => {
|
|
384
431
|
await executeExtensionCommand(target, command.optsWithGlobals(), command, undefined, vocabulary);
|
|
385
432
|
});
|
|
@@ -499,6 +546,14 @@ function registerLifecycleCommand(program, vocabulary) {
|
|
|
499
546
|
.description(`Deactivate a ${noun} in selected scope settings.`), vocabulary).action(async (target, _options, command) => {
|
|
500
547
|
await executeExtensionCommand(target, command.optsWithGlobals(), command, "deactivate", vocabulary);
|
|
501
548
|
});
|
|
549
|
+
if (vocabulary === "package") {
|
|
550
|
+
addUpgradeOptions(addPackageScopeOptions(lifecycleCommand
|
|
551
|
+
.command("upgrade")
|
|
552
|
+
.argument("[target]", "Optional managed package name/source to upgrade; omit to upgrade pm CLI and all managed packages")
|
|
553
|
+
.description("Upgrade the pm CLI/SDK and refresh managed installable pm packages."))).action(async (target, _options, command) => {
|
|
554
|
+
await executeUpgradeCommand(target, command, false);
|
|
555
|
+
});
|
|
556
|
+
}
|
|
502
557
|
}
|
|
503
558
|
async function runInitCommandAction(prefix, options, command) {
|
|
504
559
|
const globalOptions = getGlobalOptions(command);
|
|
@@ -642,35 +697,21 @@ export function registerSetupCommands(program) {
|
|
|
642
697
|
registerLifecycleCommand(program, "extension");
|
|
643
698
|
registerLifecycleCommand(program, "package");
|
|
644
699
|
addPackageScopeOptions(program
|
|
645
|
-
.command("install")
|
|
700
|
+
.command("install", { hidden: true })
|
|
646
701
|
.argument("[targets...]", "Package source (local path, bundled alias, npm: source, wildcard, or GitHub source)")
|
|
647
702
|
.option("--gh <github-source>", "Install from GitHub shorthand source (owner/repo[/path])")
|
|
648
703
|
.option("--github <github-source>", "Alias for --gh")
|
|
649
704
|
.option("--ref <ref>", "Git ref/branch/tag for GitHub install sources")
|
|
650
705
|
.description("Install a pm package into the project package scope by default.")).action(async (targets, _options, command) => {
|
|
706
|
+
await emitDeprecatedAliasHint("install", command);
|
|
651
707
|
await executeExtensionInstallCommand(targets, command.optsWithGlobals(), command, "package");
|
|
652
708
|
});
|
|
653
|
-
addPackageScopeOptions(program
|
|
654
|
-
.command("upgrade")
|
|
709
|
+
addUpgradeOptions(addPackageScopeOptions(program
|
|
710
|
+
.command("upgrade", { hidden: true })
|
|
655
711
|
.argument("[target]", "Optional managed package name/source to upgrade; omit to upgrade pm CLI and all managed packages")
|
|
656
|
-
.
|
|
657
|
-
|
|
658
|
-
.option("--packages-only", "Upgrade only managed pm packages")
|
|
659
|
-
.option("--repair", "Force npm global reinstall when upgrading the pm CLI/SDK")
|
|
660
|
-
.option("--tag <value>", "npm dist-tag/version for CLI and registry package upgrades")
|
|
661
|
-
.option("--package-name <value>", "Override the CLI package name for self-upgrade testing")
|
|
662
|
-
.description("Upgrade the pm CLI/SDK and refresh managed installable pm packages.")).action(async (target, _options, command) => {
|
|
663
|
-
const globalOptions = getGlobalOptions(command);
|
|
664
|
-
const startedAt = Date.now();
|
|
665
|
-
const result = await runUpgrade(target, command.opts(), globalOptions);
|
|
666
|
-
printResult(result, globalOptions);
|
|
667
|
-
if (!result.ok) {
|
|
668
|
-
process.exitCode = EXIT_CODE.GENERIC_FAILURE;
|
|
669
|
-
}
|
|
670
|
-
if (globalOptions.profile) {
|
|
671
|
-
printError(`profile:command=upgrade took_ms=${Date.now() - startedAt}`);
|
|
672
|
-
}
|
|
712
|
+
.description("Upgrade the pm CLI/SDK and refresh managed installable pm packages."))).action(async (target, _options, command) => {
|
|
713
|
+
await executeUpgradeCommand(target, command, true);
|
|
673
714
|
});
|
|
674
715
|
}
|
|
675
716
|
//# sourceMappingURL=register-setup.js.map
|
|
676
|
-
//# debugId=
|
|
717
|
+
//# debugId=feb682f9-344c-569e-bbab-861fe20f08f1
|