@unbrained/pm-cli 2026.8.5 → 2026.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +2 -2
- package/CHANGELOG.md +14 -0
- package/dist/cli/main.js +12 -37
- package/dist/cli/register-setup.d.ts +1 -1
- package/dist/cli/register-setup.js +46 -20
- package/dist/cli-bundle/bundle-manifest.json +391 -391
- package/dist/cli-bundle/chunks/append-XAJ5Z4XS.js +2 -0
- package/dist/cli-bundle/chunks/{chunk-2WFXWAYX.js → chunk-343QETLI.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-RKAVWO3O.js → chunk-3KFVGGRE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-VCKLFEUN.js → chunk-3ZJRFYY2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UZBWIUYD.js → chunk-4AVFKHHC.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BPELKUQD.js → chunk-4OVGQW22.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-54FNT7U2.js → chunk-5PBP2ZP3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-NY4T3JWN.js → chunk-5ZKQPA44.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4YUBDMQM.js → chunk-A3XQ7VPU.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OPVH7SKD.js → chunk-AJE3AHPD.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-V3774P7D.js → chunk-AOBDLU4T.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-VN5VITU3.js → chunk-AYRUGRNS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HWRRMBJO.js → chunk-BP6EMEDP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-ZYHOB3SN.js → chunk-C3YABSJK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-43HQQI6S.js → chunk-CA3BURYF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-E2RKBKWB.js → chunk-D7I3TUGV.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-4VN6GS4U.js → chunk-DQGJ2RWT.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YSO3YFZ4.js → chunk-DWOAOZHZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-Q35VBGOQ.js → chunk-E7BFPLUZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LKDGK44W.js → chunk-F4NREH3G.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OMXVBQ2N.js → chunk-FDBRXV25.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-3FTILRJ2.js → chunk-GU3TSEHD.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-HS7OVAUN.js +164 -0
- package/dist/cli-bundle/chunks/{chunk-OTHLDSFP.js → chunk-JFZIS6JF.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7A5OT5J2.js → chunk-JQ4NZ5EB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-BXQLRKWF.js → chunk-L6LGKJX3.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CSI3WS5I.js → chunk-M357ZCOR.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-5ZBOIPGP.js → chunk-M4VEE3FK.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-7C4PTJG6.js → chunk-MCS73BKB.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-A62CYISG.js → chunk-MDTH7SAE.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-HNFD72UK.js → chunk-OXY3SJ3N.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-L3AZOELJ.js → chunk-PECV7L5T.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-DXDREUXT.js → chunk-Q3VOP62W.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UP7DTVMD.js → chunk-QJ7C3JIW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-42E7YPLG.js → chunk-R6LSRGPS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-MHK6LIWE.js → chunk-R6RKEYYW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UN66FZRO.js → chunk-RAFUN7IX.js} +3 -3
- package/dist/cli-bundle/chunks/chunk-RUAU5OSH.js +2 -0
- package/dist/cli-bundle/chunks/chunk-SD3YXU2U.js +56 -0
- package/dist/cli-bundle/chunks/{chunk-SSF4PIUR.js → chunk-SV3YQ4RY.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-V3EUXXOF.js → chunk-SVV3DQES.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-45G53IU4.js → chunk-SXECIECW.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-T45OHXDW.js +8 -0
- package/dist/cli-bundle/chunks/{chunk-PMXJEU3F.js → chunk-TPKDJ5WL.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-M72BKL5Q.js → chunk-UVVXHGYS.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-WRL4KNDL.js → chunk-V663653R.js} +19 -19
- package/dist/cli-bundle/chunks/{chunk-R546TPDE.js → chunk-WSI5KZQJ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-6MSQJOTG.js → chunk-XPOQQJTX.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-XCEZYMNI.js → chunk-YCCDXBNU.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LN2WFEU4.js → chunk-ZFBWCKYF.js} +2 -2
- package/dist/cli-bundle/chunks/close-DI66JMSB.js +2 -0
- package/dist/cli-bundle/chunks/close-many-VFKT6U3O.js +2 -0
- package/dist/cli-bundle/chunks/comments-E73HIEZJ.js +2 -0
- package/dist/cli-bundle/chunks/copy-WBYVLCPC.js +2 -0
- package/dist/cli-bundle/chunks/{create-XLKTXTUF.js → create-TG67IVFI.js} +2 -2
- package/dist/cli-bundle/chunks/delete-6XKUVVQN.js +2 -0
- package/dist/cli-bundle/chunks/{deps-ITTY3GIC.js → deps-AJUGP2OH.js} +2 -2
- package/dist/cli-bundle/chunks/{docs-W4OSRTYR.js → docs-QOCLDRKJ.js} +2 -2
- package/dist/cli-bundle/chunks/{files-EOK4AZI4.js → files-3ST5TY64.js} +2 -2
- package/dist/cli-bundle/chunks/focus-R2AWS63Y.js +2 -0
- package/dist/cli-bundle/chunks/{history-compact-7UGTMLL3.js → history-compact-7BJFML4S.js} +2 -2
- package/dist/cli-bundle/chunks/{history-redact-4DZRMD6Z.js → history-redact-WJN3HYXR.js} +2 -2
- package/dist/cli-bundle/chunks/{history-repair-UPOSZW5R.js → history-repair-XDNZUB7F.js} +2 -2
- package/dist/cli-bundle/chunks/{learnings-GMRNCBS3.js → learnings-SZMUPVNA.js} +2 -2
- package/dist/cli-bundle/chunks/{profile-2MUUMHRE.js → profile-KL53JIAC.js} +2 -2
- package/dist/cli-bundle/chunks/{register-list-query-LR3SQ5ZF.js → register-list-query-QH7ONPKU.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-SUOHFVWM.js → register-mutation-OCRQNZK4.js} +3 -3
- package/dist/cli-bundle/chunks/{register-operations-ARRRKOVN.js → register-operations-HIBJXRGB.js} +2 -2
- package/dist/cli-bundle/chunks/register-setup-QWBQ6HBS.js +2 -0
- package/dist/cli-bundle/chunks/restore-FXA5QPM7.js +2 -0
- package/dist/cli-bundle/chunks/{schema-FJ4EA3XF.js → schema-QJ27OTRV.js} +2 -2
- package/dist/cli-bundle/chunks/update-7GBO4SXG.js +2 -0
- package/dist/cli-bundle/chunks/update-many-VF6ZKQUO.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-B7LJWAZE.js → chunk-27DK4A5O.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-SV3O7TSH.js → chunk-4JC3AOGS.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-G6ETT4QK.js → chunk-6KDHXURF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-PG2RIZBX.js → chunk-74CWP3A4.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-Y4LDYLLT.js → chunk-7AZDTGPA.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-7YTZ7A4E.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-A7BJ5SS6.js → chunk-CL3NB7VW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-EAXXF2HW.js +4 -0
- package/dist/cli-bundle/focused-chunks/{chunk-UIL2M2NA.js → chunk-EYO4F74Z.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-7J5TUBUJ.js → chunk-GEYU23YS.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-WEM2E2PE.js → chunk-GIERI4YU.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-WVIVUWVL.js → chunk-GSW2Y7VZ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-VLYOEYML.js → chunk-LKQXXO62.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-MJ7HWSFK.js → chunk-MBBMTDD3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-PIMMYG7Q.js → chunk-ME4XVOBJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-IPWSFADF.js → chunk-N7QN3NE6.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-W7BJEWHX.js → chunk-QL5H3AQH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-TQMFQYXR.js +29 -0
- package/dist/cli-bundle/focused-chunks/{chunk-RUR5I3TK.js → chunk-XNVXIQ4B.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-FGKY4MBE.js → chunk-YHDCGUIW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-QVHKCI4T.js → chunk-YLPZHWX7.js} +2 -2
- package/dist/cli-bundle/main.js +13 -13
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +25 -25
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +1 -1
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +1 -1
- package/dist/core/extensions/activation-summary.d.ts +4 -0
- package/dist/core/extensions/activation-summary.js +5 -2
- package/dist/core/extensions/contribution-inventory.d.ts +1 -0
- package/dist/core/extensions/contribution-inventory.js +35 -2
- package/dist/core/extensions/extension-hook-runtime.js +5 -3
- package/dist/core/extensions/extension-types.d.ts +18 -1
- package/dist/core/extensions/extension-types.js +2 -2
- package/dist/core/extensions/loader.js +5 -13
- package/dist/core/extensions/preflight-ownership.d.ts +5 -0
- package/dist/core/extensions/preflight-ownership.js +42 -0
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +8 -2
- package/dist/sdk/cli-contracts/runtime-contracts.js +4 -3
- package/dist/sdk/cli-contracts.d.ts +1 -1
- package/dist/sdk/cli-contracts.js +3 -3
- package/dist/sdk/compose.d.ts +2 -2
- package/dist/sdk/compose.js +7 -2
- package/dist/sdk/define.d.ts +3 -1
- package/dist/sdk/define.js +3 -8
- package/dist/sdk/extension/install-sources.d.ts +43 -5
- package/dist/sdk/extension/install-sources.js +36 -2
- package/dist/sdk/extension/migrations.d.ts +114 -0
- package/dist/sdk/extension/migrations.js +175 -0
- package/dist/sdk/extension/scaffold.js +14 -9
- package/dist/sdk/extension/source-resolution.d.ts +50 -0
- package/dist/sdk/extension/source-resolution.js +66 -0
- package/dist/sdk/extension.d.ts +5 -1
- package/dist/sdk/extension.js +24 -26
- package/dist/sdk/governance/health.js +11 -2
- package/dist/sdk/index.d.ts +6 -2
- package/dist/sdk/index.js +8 -4
- package/dist/sdk/package-migrations.d.ts +10 -0
- package/dist/sdk/package-migrations.js +21 -0
- package/dist/sdk/runtime.d.ts +2 -0
- package/dist/sdk/runtime.js +6 -2
- package/docs/COMMANDS.md +9 -0
- package/docs/EXTENSIONS.md +2 -2
- package/docs/EXTENSION_LIFECYCLE.md +46 -0
- package/docs/README.md +1 -0
- package/docs/RELEASING.md +33 -20
- package/docs/SDK.md +31 -3
- package/marketplace.json +2 -2
- package/package.json +3 -3
- 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 +218 -20
- package/dist/cli-bundle/chunks/append-VXXGOXSG.js +0 -2
- package/dist/cli-bundle/chunks/chunk-EGJ4JTUG.js +0 -55
- package/dist/cli-bundle/chunks/chunk-FPBQHMFT.js +0 -8
- package/dist/cli-bundle/chunks/chunk-GE4KCSZP.js +0 -164
- package/dist/cli-bundle/chunks/chunk-YEWNL576.js +0 -2
- package/dist/cli-bundle/chunks/close-VZ3OQPN5.js +0 -2
- package/dist/cli-bundle/chunks/close-many-SB4TI27P.js +0 -2
- package/dist/cli-bundle/chunks/comments-BIF3Q4KY.js +0 -2
- package/dist/cli-bundle/chunks/copy-6AI5Z57X.js +0 -2
- package/dist/cli-bundle/chunks/delete-ZY2VHQTP.js +0 -2
- package/dist/cli-bundle/chunks/focus-DLBNWL7L.js +0 -2
- package/dist/cli-bundle/chunks/register-setup-O6AYP6NP.js +0 -2
- package/dist/cli-bundle/chunks/restore-ZVCVHTB5.js +0 -2
- package/dist/cli-bundle/chunks/update-YHV52CSS.js +0 -2
- package/dist/cli-bundle/chunks/update-many-M6YHVNXM.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-BIMTMOS7.js +0 -4
- package/dist/cli-bundle/focused-chunks/chunk-GJ2TG2CW.js +0 -28
- package/dist/cli-bundle/focused-chunks/chunk-N5XU5UVK.js +0 -2
package/dist/sdk/extension.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements the pm extension 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]="f4f1a871-b632-5263-aec0-cb00bcdbe1b3")}catch(e){}}();
|
|
8
8
|
import fs from "node:fs/promises";
|
|
9
9
|
import os from "node:os";
|
|
10
10
|
import path from "node:path";
|
|
@@ -30,7 +30,7 @@ import { ensureTypeFolderScaffold } from "./schema.js";
|
|
|
30
30
|
import { normalizeStringList, normalizeExtensionNameForMatch, normalizeManagedDirectoryName, parseExtensionManifest, validateExtensionDirectory, } from "./extension/shared.js";
|
|
31
31
|
import { sortManagedEntries, managedExtensionSourcesEquivalent, readManagedExtensionState, writeManagedExtensionState, upsertManagedEntry, persistManagedContributionInventory, resolveManagedExtensionStatePath, } from "./extension/managed-state.js";
|
|
32
32
|
import { parseExtensionInstallSource, resolveInstallSource, areDirectoriesEquivalent, } from "./extension/install-sources.js";
|
|
33
|
-
import { resolveBundledExtensionAliasSource,
|
|
33
|
+
import { resolveBundledExtensionAliasSource, isBundledPackageInstallAllTarget, listBundledPackageAliases, resolveBundledAliasManifestName, buildBundledPackageCatalog, } from "./extension/bundled-catalog.js";
|
|
34
34
|
import { scaffoldExtensionProject } from "./extension/scaffold.js";
|
|
35
35
|
import { buildExtensionDescribeResult } from "./extension/describe.js";
|
|
36
36
|
import { applyDoctorRuntimeActivationState, classifyDoctorLoadFailureWarnings, classifyDoctorActivationFailureWarnings, classifyUnusedCapabilityWarnings, buildExtensionTriageSummary, parseDoctorDetailMode, collectUnknownCapabilityGuidance, buildCapabilityContractMetadata, buildDoctorConsistencySummary, summarizeExtensionFailures, } from "./extension/doctor.js";
|
|
@@ -40,6 +40,8 @@ import { summarizeRuntimeCommandPathsForExtension } from "./extension/runtime-su
|
|
|
40
40
|
import { collectGlobalOutputOverrideDoctorWarnings } from "./extension/output-ownership.js";
|
|
41
41
|
import { collectMcpCustomFieldCollisionDoctorWarnings } from "./extension/custom-field-collisions.js";
|
|
42
42
|
import { checkGithubUpdate } from "./extension/update-check.js";
|
|
43
|
+
import { runExtensionMigrateAction } from "./extension/migrations.js";
|
|
44
|
+
import { resolveExtensionInstallSourceIdentity, } from "./extension/source-resolution.js";
|
|
43
45
|
import { captureExtensionInstallSnapshot, readOptionalMetadataFile, restoreExtensionInstallSnapshot, } from "./extension/install-snapshot.js";
|
|
44
46
|
// Re-export the public surface that lives in sibling modules but was previously
|
|
45
47
|
// exported from this file (used by sdk barrels, upgrade.ts, and tests).
|
|
@@ -61,6 +63,7 @@ const LIFECYCLE_ACTION_TARGETS = [
|
|
|
61
63
|
["adopt-all", "adopt-all", "--adopt-all"],
|
|
62
64
|
["activate", "activate", "--activate"],
|
|
63
65
|
["deactivate", "deactivate", "--deactivate"],
|
|
66
|
+
["migrate", "migrate", "--migrate"],
|
|
64
67
|
];
|
|
65
68
|
const LIFECYCLE_ACTION_FLAG_HINT = LIFECYCLE_ACTION_TARGETS.map(([, , flag]) => flag)
|
|
66
69
|
.filter((flag, index, flags) => flags.indexOf(flag) === index)
|
|
@@ -78,6 +81,7 @@ const LIFECYCLE_ACTION_FLAGS = {
|
|
|
78
81
|
"adopt-all": "--adopt-all",
|
|
79
82
|
activate: "--activate",
|
|
80
83
|
deactivate: "--deactivate",
|
|
84
|
+
migrate: "--migrate",
|
|
81
85
|
init: "--init",
|
|
82
86
|
};
|
|
83
87
|
const NATIVE_OUTPUT_MARKER = "__pm_native_output";
|
|
@@ -353,6 +357,7 @@ const EXTENSION_ACTION_FLAG_SELECTORS = [
|
|
|
353
357
|
["adoptAll", "adopt-all"],
|
|
354
358
|
["activate", "activate"],
|
|
355
359
|
["deactivate", "deactivate"],
|
|
360
|
+
["migrate", "migrate"],
|
|
356
361
|
];
|
|
357
362
|
/** Positional lifecycle shorthand mapped to the canonical extension action. */
|
|
358
363
|
const IMPLICIT_EXTENSION_ACTIONS = {
|
|
@@ -363,6 +368,7 @@ const IMPLICIT_EXTENSION_ACTIONS = {
|
|
|
363
368
|
scaffold: "init",
|
|
364
369
|
explore: "explore",
|
|
365
370
|
manage: "manage",
|
|
371
|
+
migrate: "migrate",
|
|
366
372
|
list: "explore",
|
|
367
373
|
"": "explore",
|
|
368
374
|
};
|
|
@@ -889,6 +895,11 @@ const assertExtensionActionOptionScope = (action, options) => {
|
|
|
889
895
|
allowed: action === "init",
|
|
890
896
|
message: "--declarative is only valid with --init/--scaffold.",
|
|
891
897
|
},
|
|
898
|
+
{
|
|
899
|
+
triggered: options.dryRun === true,
|
|
900
|
+
allowed: action === "migrate",
|
|
901
|
+
message: "--dry-run is only valid with --migrate.",
|
|
902
|
+
},
|
|
892
903
|
];
|
|
893
904
|
const invalidGuard = guards.find((guard) => guard.triggered && !guard.allowed);
|
|
894
905
|
if (invalidGuard) {
|
|
@@ -1302,6 +1313,7 @@ const performExtensionInstallUnderLock = async (ctx, input) => {
|
|
|
1302
1313
|
directory: destinationDirectoryName,
|
|
1303
1314
|
},
|
|
1304
1315
|
source: persisted.sourceRecord,
|
|
1316
|
+
source_resolution: input.sourceResolution,
|
|
1305
1317
|
destination_path: persisted.destinationDirectory,
|
|
1306
1318
|
overwritten: [
|
|
1307
1319
|
persisted.destinationExists,
|
|
@@ -1357,6 +1369,7 @@ const runBundledExtensionInstallAll = async (ctx) => {
|
|
|
1357
1369
|
ok: entry.result.ok,
|
|
1358
1370
|
extension: details.extension,
|
|
1359
1371
|
source: details.source,
|
|
1372
|
+
source_resolution: details.source_resolution,
|
|
1360
1373
|
destination_path: details.destination_path,
|
|
1361
1374
|
activated: details.activated,
|
|
1362
1375
|
settings_changed: details.settings_changed,
|
|
@@ -1371,32 +1384,14 @@ const runBundledExtensionInstallAll = async (ctx) => {
|
|
|
1371
1384
|
}),
|
|
1372
1385
|
}, installedAll);
|
|
1373
1386
|
};
|
|
1374
|
-
/** Resolve bundled-alias provenance before installing one extension source. */
|
|
1375
|
-
const resolveSingleExtensionInstallSource = async (explicitSourceInput, githubOption, ref) => {
|
|
1376
|
-
/* c8 ignore start -- github/local alias-source split is exercised in install-action integration tests */
|
|
1377
|
-
const bundledAliasSource = typeof githubOption === "string"
|
|
1378
|
-
? null
|
|
1379
|
-
: await resolveBundledExtensionAliasSource(explicitSourceInput);
|
|
1380
|
-
/* c8 ignore stop */
|
|
1381
|
-
const bundledAliasName = bundledAliasSource === null
|
|
1382
|
-
? null
|
|
1383
|
-
: explicitSourceInput.trim().toLowerCase();
|
|
1384
|
-
const bundledPackageName = bundledAliasName === null
|
|
1385
|
-
? null
|
|
1386
|
-
: await resolveBundledPackageNpmName(bundledAliasName);
|
|
1387
|
-
const sourceInput = bundledAliasSource ?? explicitSourceInput;
|
|
1388
|
-
/* c8 ignore start -- install-source branch combinations are covered in install-sources focused tests */
|
|
1389
|
-
const installSource = parseExtensionInstallSource(sourceInput, {
|
|
1390
|
-
forceGithub: typeof githubOption === "string",
|
|
1391
|
-
ref,
|
|
1392
|
-
});
|
|
1393
|
-
/* c8 ignore stop */
|
|
1394
|
-
return { bundledAliasName, bundledPackageName, installSource };
|
|
1395
|
-
};
|
|
1396
1387
|
/** Install one resolved source and clean transient source material afterward. */
|
|
1397
1388
|
const runSingleExtensionInstall = async (ctx, explicitSourceInput, githubOption) => {
|
|
1398
1389
|
const { resolvedRoots } = ctx;
|
|
1399
|
-
const { bundledAliasName, bundledPackageName, installSource } = await
|
|
1390
|
+
const { bundledAliasName, bundledPackageName, installSource, sourceResolution, } = await resolveExtensionInstallSourceIdentity(explicitSourceInput, githubOption, ctx.options.ref);
|
|
1391
|
+
if (sourceResolution.ambiguous) {
|
|
1392
|
+
const npmCandidate = sourceResolution.candidates.find((candidate) => candidate.kind === "npm");
|
|
1393
|
+
ctx.warnings.push(`extension_install_source_ambiguous:${explicitSourceInput}:builtin:${bundledAliasName}:npm:${npmCandidate.package}`);
|
|
1394
|
+
}
|
|
1400
1395
|
const resolvedSource = await resolveInstallSource(installSource);
|
|
1401
1396
|
try {
|
|
1402
1397
|
const validated = await validateExtensionDirectory(resolvedSource.directory, {
|
|
@@ -1410,6 +1405,7 @@ const runSingleExtensionInstall = async (ctx, explicitSourceInput, githubOption)
|
|
|
1410
1405
|
destinationDirectoryName,
|
|
1411
1406
|
bundledAliasName,
|
|
1412
1407
|
bundledPackageName,
|
|
1408
|
+
sourceResolution,
|
|
1413
1409
|
installSource,
|
|
1414
1410
|
resolvedSource,
|
|
1415
1411
|
}));
|
|
@@ -2147,6 +2143,7 @@ const EXTENSION_ACTION_HANDLERS = {
|
|
|
2147
2143
|
"adopt-all": runExtensionAdoptAllAction,
|
|
2148
2144
|
activate: runExtensionActivateDeactivateAction,
|
|
2149
2145
|
deactivate: runExtensionActivateDeactivateAction,
|
|
2146
|
+
migrate: runExtensionMigrateAction,
|
|
2150
2147
|
};
|
|
2151
2148
|
/** Identify lifecycle actions that mutate shared settings or managed-extension state. */
|
|
2152
2149
|
const requiresExtensionStateLock = (ctx) => [
|
|
@@ -2156,6 +2153,7 @@ const requiresExtensionStateLock = (ctx) => [
|
|
|
2156
2153
|
ctx.action === "adopt-all",
|
|
2157
2154
|
ctx.action === "activate",
|
|
2158
2155
|
ctx.action === "deactivate",
|
|
2156
|
+
ctx.action === "migrate",
|
|
2159
2157
|
[ctx.action === "doctor", ctx.options.fixManagedState === true].every(Boolean),
|
|
2160
2158
|
].some(Boolean);
|
|
2161
2159
|
/** Dispatch one normalized lifecycle action through the complete handler table. */
|
|
@@ -2194,4 +2192,4 @@ export const _testOnly = {
|
|
|
2194
2192
|
withExtensionInstallLock,
|
|
2195
2193
|
};
|
|
2196
2194
|
//# sourceMappingURL=extension.js.map
|
|
2197
|
-
//# debugId=
|
|
2195
|
+
//# debugId=f4f1a871-b632-5263-aec0-cb00bcdbe1b3
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements the pm health 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]="34fc99f6-45e5-53f2-96eb-767d50ed449c")}catch(e){}}();
|
|
8
8
|
import fs from "node:fs/promises";
|
|
9
9
|
import path from "node:path";
|
|
10
10
|
import { resolveItemTypeRegistry } from "../../core/item/type-registry.js";
|
|
@@ -35,6 +35,7 @@ import { readSettingsWithMetadata } from "../../core/store/settings.js";
|
|
|
35
35
|
import { buildRemediationMap } from "../../core/diagnostics/remediation.js";
|
|
36
36
|
import { scanHistoryAuthorAttribution, } from "../author-attribution.js";
|
|
37
37
|
import { readManagedExtensionState } from "../extension.js";
|
|
38
|
+
import { applyStoredExtensionMigrationState } from "../extension/migrations.js";
|
|
38
39
|
import { buildCapabilityContractMetadata, buildRegistrationCollisionRemediation, collectUnknownCapabilityGuidance, } from "../extension/doctor.js";
|
|
39
40
|
import { scanStaleInProgressItems, } from "./stale-work.js";
|
|
40
41
|
import { scanTrackedRuntimeCache } from "./tracked-runtime-cache.js";
|
|
@@ -605,6 +606,7 @@ async function buildExtensionCheck(pmRoot, settings, noExtensionsFlag) {
|
|
|
605
606
|
readManagedExtensionState(loadResult.roots.project),
|
|
606
607
|
readManagedExtensionState(loadResult.roots.global),
|
|
607
608
|
]);
|
|
609
|
+
await applyStoredExtensionMigrationState(pmRoot, activationResult.registrations.migrations);
|
|
608
610
|
const migrationStatus = summarizeMigrationStatuses(activationResult.registrations.migrations);
|
|
609
611
|
const activationDetails = {
|
|
610
612
|
failed: activationResult.failed,
|
|
@@ -695,6 +697,13 @@ async function buildExtensionCheck(pmRoot, settings, noExtensionsFlag) {
|
|
|
695
697
|
warnings: extensionWarnings,
|
|
696
698
|
activation: activationDetails,
|
|
697
699
|
triage: extensionTriage,
|
|
700
|
+
...(migrationStatus.summary.pending_count > 0
|
|
701
|
+
? {
|
|
702
|
+
remediation_map: {
|
|
703
|
+
extension_migration_pending: "pm extension migrate --project",
|
|
704
|
+
},
|
|
705
|
+
}
|
|
706
|
+
: {}),
|
|
698
707
|
capability_contract: capabilityContract,
|
|
699
708
|
capability_guidance: capabilityGuidance,
|
|
700
709
|
},
|
|
@@ -1955,4 +1964,4 @@ export const _testOnlyHealthCommand = {
|
|
|
1955
1964
|
warningCode,
|
|
1956
1965
|
};
|
|
1957
1966
|
//# sourceMappingURL=health.js.map
|
|
1958
|
-
//# debugId=
|
|
1967
|
+
//# debugId=34fc99f6-45e5-53f2-96eb-767d50ed449c
|
package/dist/sdk/index.d.ts
CHANGED
|
@@ -20,7 +20,10 @@ export { quoteCommandArg, quoteWindowsCommandArg, renderPmCommand, } from "./com
|
|
|
20
20
|
export { runGc, type GcCheckpointsSummary, type GcLocksSummary, } from "./governance/gc.js";
|
|
21
21
|
export { _testOnlyHealthCommand, runHealth, type HealthCheck, } from "./governance/health.js";
|
|
22
22
|
export { _testOnlyValidateCommand, projectValidateCounts, runValidate, type ValidateCheck, type ValidateCountsFixesSummary, type ValidateCountsResult, type ValidateFixesSummary, type ValidateMutationServices, } from "./governance/validate.js";
|
|
23
|
-
export { runExtension } from "./extension.js";
|
|
23
|
+
export { runExtension, type ExtensionCommandAction, } from "./extension.js";
|
|
24
|
+
export { resolveExtensionInstallSourceIdentity, type ExtensionInstallSourceCandidate, type ExtensionInstallSourceResolution, type ExtensionInstallSourceSelection, type ResolvedExtensionInstallSource, } from "./extension/source-resolution.js";
|
|
25
|
+
export { applyStoredExtensionMigrationState, readExtensionMigrationState, resolveExtensionMigrationStatePath, runExtensionMigrateAction, runExtensionMigrations, type ExtensionMigrationActionContext, type ExtensionMigrationOutcomeStatus, type ExtensionMigrationReceipt, type ExtensionMigrationRunResult, type ExtensionMigrationState, type ExtensionMigrationStateEntry, type RunExtensionMigrationsOptions, } from "./extension/migrations.js";
|
|
26
|
+
export { findInstalledNpmPackageCandidate, type GithubInstallSource, type InstalledNpmPackageCandidate, type InstallSource, type LocalInstallSource, type NpmInstallSource, type ResolvedInstallSource, } from "./extension/install-sources.js";
|
|
24
27
|
export { buildExtensionDescribeResult, renderExtensionDescribeMarkdown, type ExtensionCommandClaimant, type ExtensionCommandOwnership, type ExtensionDescribeActivationStatus, type ExtensionDescribeResult, type ExtensionSurfaceDescription, } from "./extension/describe.js";
|
|
25
28
|
export { runEvent, runMeet, runRemind, type MeetingEventShortcutOptions, type ReminderShortcutOptions, type SchedulingShortcutCommonOptions, } from "./scheduling-shortcuts.js";
|
|
26
29
|
export { createExtensionCommandSdk } from "./extension-command-context.js";
|
|
@@ -45,7 +48,7 @@ export { RESERVED_ITEM_FIELD_NAMES } from "../core/extensions/item-fields.js";
|
|
|
45
48
|
export type { LocatedItem } from "../core/store/item-store.js";
|
|
46
49
|
export { PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS, PM_PACKAGE_RESOURCE_KINDS, collectPackageExtensionDirectories, readPmPackageManifest, type PmPackageCatalogLinkMap, type PmPackageCatalogMediaMap, type PmPackageCatalogMetadata, type PmPackageManifest, type PmPackageResourceKind, type PmPackageResourceMap, } from "../core/packages/manifest.js";
|
|
47
50
|
export type { CommanderOptionAliasContract, CommanderOptionRegistrationContract, } from "./cli-contracts.js";
|
|
48
|
-
export { ACTIVITY_FLAG_CONTRACTS, ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, CLOSE_ACTION_OPTION_KEYS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, CREATE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, EVAL_FLAG_CONTRACTS, EVENT_FLAG_CONTRACTS, EVENTS_FLAG_CONTRACTS, EXTENSION_ACTIVATE_FLAG_CONTRACTS, EXTENSION_ADOPT_ALL_FLAG_CONTRACTS, EXTENSION_ADOPT_FLAG_CONTRACTS, EXTENSION_CATALOG_FLAG_CONTRACTS, EXTENSION_DEACTIVATE_FLAG_CONTRACTS, EXTENSION_DESCRIBE_FLAG_CONTRACTS, EXTENSION_DOCTOR_FLAG_CONTRACTS, EXTENSION_EXPLORE_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, EXTENSION_INIT_FLAG_CONTRACTS, EXTENSION_INSTALL_FLAG_CONTRACTS, EXTENSION_MANAGE_FLAG_CONTRACTS, EXTENSION_RELOAD_FLAG_CONTRACTS, EXTENSION_SCOPE_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, ITEM_MUTATE_FLAG_CONTRACTS, ITEM_COMPLETE_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, MEET_FLAG_CONTRACTS, MERGE_FLAG_CONTRACTS, NEXT_COMMANDER_STRING_OPTION_CONTRACTS, NEXT_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, PLAN_CREATE_METADATA_PARAMETER_KEYS, PLAN_FLAG_CONTRACTS, PM_COMMAND_OUTPUT_BUDGET_CONTRACTS, PM_CLI_ONLY_TOOL_ACTION_WAIVERS, PM_CORE_COMMAND_NAMES, PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS, 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_PROVIDER_TOOL_PARAMETERS_SCHEMA, PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION, PM_TOOL_ACTIONS, analyzePmToolActionParity, PM_TOOL_ACTION_PARAMETER_CONTRACTS, PM_TOOL_PARAMETERS_SCHEMA, PM_TOOL_PARAMETERS_SCHEMA_MAJOR, PM_TOOL_PARAMETERS_SCHEMA_VERSION, PM_OUTPUT_BUDGET_CLASSES, PM_OUTPUT_DEGRADATION_STEPS, PROFILE_FLAG_CONTRACTS, REINDEX_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, REMIND_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, SEARCH_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, SUBCOMMAND_GLOBAL_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, TOOL_ACTIVITY_OPTION_CONTRACTS, TOOL_AGGREGATE_OPTION_CONTRACTS, TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE, TOOL_CALENDAR_OPTION_CONTRACTS, TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CONTEXT_OPTION_CONTRACTS, TOOL_CREATE_OPTION_CONTRACTS, TOOL_CREATE_OPTION_CONTRACT_SOURCE, TOOL_DEPS_OPTION_CONTRACTS, TOOL_GRAPH_OPTION_CONTRACTS, TOOL_LIST_FILTER_OPTION_CONTRACTS, TOOL_SEARCH_FILTER_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE, TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACT_SOURCE, UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, WORKSPACE_FLAG_CONTRACTS, buildPmActionToolInputSchema, PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES, compactFlagAliasContracts, createPmCommandOutputBudget, definePmCommandOutputBudget, estimatePmOutputTokens, inferPmOutputBudgetClass, analyzeSdkCliParameterCompleteness, isPmExtensionCapabilityContract, isPmExtensionPolicyModeContract, isPmExtensionPolicySurfaceContract, isPmExtensionServiceNameContract, isPmToolAction, hasSubcommandFlagContractsForCommand, readFirstStringFromCommanderOptions, readFirstValueFromCommanderOptions, readStringArrayFromCommanderOptions, resolveSubcommandFlagContractsForCommand, resolvePmCommandOutputBudget, resolvePmToolCustomFieldCollision, toCompletionFlagString, withFlagAliasMetadata, } from "./cli-contracts.js";
|
|
51
|
+
export { ACTIVITY_FLAG_CONTRACTS, ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, CLOSE_ACTION_OPTION_KEYS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, CREATE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, EVAL_FLAG_CONTRACTS, EVENT_FLAG_CONTRACTS, EVENTS_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_SCOPE_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, ITEM_MUTATE_FLAG_CONTRACTS, ITEM_COMPLETE_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, MEET_FLAG_CONTRACTS, MERGE_FLAG_CONTRACTS, NEXT_COMMANDER_STRING_OPTION_CONTRACTS, NEXT_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, PLAN_CREATE_METADATA_PARAMETER_KEYS, PLAN_FLAG_CONTRACTS, PM_COMMAND_OUTPUT_BUDGET_CONTRACTS, PM_CLI_ONLY_TOOL_ACTION_WAIVERS, PM_CORE_COMMAND_NAMES, PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS, 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_PROVIDER_TOOL_PARAMETERS_SCHEMA, PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION, PM_TOOL_ACTIONS, analyzePmToolActionParity, PM_TOOL_ACTION_PARAMETER_CONTRACTS, PM_TOOL_PARAMETERS_SCHEMA, PM_TOOL_PARAMETERS_SCHEMA_MAJOR, PM_TOOL_PARAMETERS_SCHEMA_VERSION, PM_OUTPUT_BUDGET_CLASSES, PM_OUTPUT_DEGRADATION_STEPS, PROFILE_FLAG_CONTRACTS, REINDEX_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, REMIND_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, SEARCH_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, SUBCOMMAND_GLOBAL_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, TOOL_ACTIVITY_OPTION_CONTRACTS, TOOL_AGGREGATE_OPTION_CONTRACTS, TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE, TOOL_CALENDAR_OPTION_CONTRACTS, TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CONTEXT_OPTION_CONTRACTS, TOOL_CREATE_OPTION_CONTRACTS, TOOL_CREATE_OPTION_CONTRACT_SOURCE, TOOL_DEPS_OPTION_CONTRACTS, TOOL_GRAPH_OPTION_CONTRACTS, TOOL_LIST_FILTER_OPTION_CONTRACTS, TOOL_SEARCH_FILTER_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE, TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACT_SOURCE, UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, WORKSPACE_FLAG_CONTRACTS, buildPmActionToolInputSchema, PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES, compactFlagAliasContracts, createPmCommandOutputBudget, definePmCommandOutputBudget, estimatePmOutputTokens, inferPmOutputBudgetClass, analyzeSdkCliParameterCompleteness, isPmExtensionCapabilityContract, isPmExtensionPolicyModeContract, isPmExtensionPolicySurfaceContract, isPmExtensionServiceNameContract, isPmToolAction, hasSubcommandFlagContractsForCommand, readFirstStringFromCommanderOptions, readFirstValueFromCommanderOptions, readStringArrayFromCommanderOptions, resolveSubcommandFlagContractsForCommand, resolvePmCommandOutputBudget, resolvePmToolCustomFieldCollision, toCompletionFlagString, withFlagAliasMetadata, } from "./cli-contracts.js";
|
|
49
52
|
export type { CliFlagContract, OptionsFromContracts, PmActionSchemaContract, PmActionToolInputSchemaOptions, PmToolCustomFieldCollision, PmBulkMutationControlOptions, PmBulkMutationFilterOptions, PmCloseActionOptions, PmCloseManyActionOptions, PmCreateActionOptions, PmMutationAttributionOptions, PmOptionScalar, PmCommandOutputBudgetContract, PmOutputBudgetClass, PmOutputDegradationStep, PmUpdateActionOptions, PmUpdateManyActionOptions, PmExtensionCapabilityContract, PmExtensionPolicyModeContract, PmExtensionPolicySurfaceContract, PmExtensionSandboxProfileContract, PmExtensionServiceNameContract, PmExtensionTrustModeContract, PmToolAction, SdkCliActionParameterCoverage, SdkCliCompletenessContractSource, SdkCliParameterCoverageEntry, SdkCliParameterDisposition, ToolOptionFlagContract, } from "./cli-contracts.js";
|
|
50
53
|
export * from "./compose.js";
|
|
51
54
|
export * from "./compile-cache.js";
|
|
@@ -119,6 +122,7 @@ export { runUpgrade } from "./governance/upgrade.js";
|
|
|
119
122
|
export { PLAN_SHOW_DEPTH_VALUES, PLAN_SUBCOMMANDS, PLAN_TEMPLATE_NAMES, } from "./lifecycle/plan.js";
|
|
120
123
|
export * from "./define.js";
|
|
121
124
|
export { BASELINE_ITEM_FORMAT_VERSION, BUILTIN_ITEM_TYPE_VALUES, CONFIDENCE_TEXT_VALUES, CURRENT_ITEM_FORMAT_VERSION, DEPENDENCY_KIND_VALUES, EXIT_CODE, ISSUE_SEVERITY_VALUES, ITEM_TYPE_VALUES, PM_CLI_EXPECTED_ERROR_NAME, PmCliError, PmClient, RISK_VALUES, STATUS_VALUES, acquireLock, appendHistoryEntry, canonicalDocument, classifyItemFormatVersion, clearWorkspaceContractsCache, commitImportedItem, createHistoryEntry, createPmCliExpectedError, effectiveItemFormatVersion, emptyImportedDocument, ensureTrackerInitialized, generateItemId, getActiveExtensionRegistrations, getContracts, getHistoryPath, getItemPath, getSettingsPath, getWorkspaceContracts, isPmCliExpectedError, isTimestampLiteral, listAllItemMetadata, loadCreateTemplateOptions, locateItem, normalizeItemMetadata, normalizeItemFormatVersion, normalizeItemId, normalizeRawItemId, normalizeStatusInput, nowIso, parseTags, pathExists, readBooleanOption, readCsvListOption, readFileIfExists, readLocatedItem, readRequiredString, readSettings, readStringOption, removeFileIfExists, renderCalendarMarkdown, renderCalendarToon, renderGuideMarkdown, resolveCalendarOutputFormat, resolveGuideOutputFormat, resolveItemTypeRegistry, resolveImplicitPmRoot, resolvePmRoot, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, runAction, runActiveOnReadHooks, runActiveOnWriteHooks, runCalendar, runCompletion, runGuide, runList, runReindex, runSearch, runTemplatesList, runTemplatesSave, runTemplatesShow, runTestRunsList, runTestRunsLogs, runTestRunsResume, runTestRunsStatus, runTestRunsStop, scanItemFormatVersions, selectImportAuthor, serializeItemDocument, splitFrontMatter, toEstimatedMinutesValue, toImportBoolean, toImportConfidence, toImportInteger, toImportLinkedDocs, toImportLinkedFiles, toImportLinkedTests, toImportLogEntries, toImportNormalizedEnum, toImportNumberMap, toImportPriority, toImportStatus, toImportStringList, toImportStringMap, toImportTags, toNonEmptyImportString, writeFileAtomic, aggregate, append, claim, claimNext, close, closeTask, comments, config, context, copy, create, deleteItem, deps, docs, duplicates, extension, extensionActivate, extensionDeactivate, extensionList, files, filesDiscover, filesLookup, focus, gc, get, graph, health, historyCompact, historyCompactBulk, historyRedact, historyRepair, historyRepairAll, init, learnings, list, next, notes, packageActivate, packageCatalog, packageDeactivate, packageDescribe, packageDoctor, packageInstall, packageLifecycle, packageList, packageManage, packageReload, packageUninstall, pauseTask, profile, profileApply, profileLint, profileList, profileShow, release, restore, schema, schemaAddField, schemaAddStatus, schemaAddType, schemaApplyPreset, schemaInferTypes, schemaList, schemaListFields, schemaRemapStatus, schemaRemoveField, schemaRemoveStatus, schemaRemoveType, schemaShow, schemaShowField, schemaShowStatus, schemaRenameField, schemaRenameType, search, startTask, stats, update, upgrade, validate, type AggregateOptions, type AggregateResult, type AggregateRow, type AppendCommandOptions, type AppendResult, type BlockerEntry, type CalendarOptions, type CalendarResult, type ClaimResult, type CloseResult, type CloseTaskResult, type CommitImportedItemParams, type CommitImportedItemResult, type CommentsCommandOptions, type CommentsResult, type ConfigCommandOptions, type ConfigResult, type CompletionResult, type CompletionShell, type ContractsCommandOptions, type ContractsResult, type ContextFocusItem, type ContextOptions, type ContextOutputFormat, type ContextResult, type CopyResult, type CreatePmCliExpectedErrorOptions, type CreateResult, type CreateTemplateOptions, type Dependency, type DeleteResult, type DepsCommandOptions, type DepsResult, type DocsCommandOptions, type DocsResult, type ExtensionCommandOptions, type ExtensionCommandResult, type FilesCommandOptions, type FilesDiscoverOptions, type FilesDiscoverResult, type FilesLookupOptions, type FilesLookupResult, type FilesResult, type FocusResult, type GcCommandOptions, type GcResult, type GetContractsOptions, type GetOptions, type GetResult, type GuideDepth, type GuideOptions, type GuideOutputFormat, type GuideResult, type HealthResult, type ImportLinkedScope, type InitCommandOptions, type InitResult, type ItemFormatVersionScanEntry, type ItemFormatVersionScanResult, type ItemFormatVersionStatus, type LearningsCommandOptions, type LearningsResult, type LinkedDoc, type LinkedFile, type LinkedTest, type ListedItem, type ListCompactResult, type ListFullResult, type ListOptions, type ListProjectedItem, type ListProjectedItemCore, type ListResult, type ListResultItem, type ListSortField, type ListSortOrder, type ListTreeItem, type ListTreeMetadata, type ListVerboseResult, type LogNote, type NextActionableItem, type NextBlockerRef, type NextOptions, type NextOutputFormat, type NextRecommendation, type NextResult, type NotesCommandOptions, type NotesResult, type PackageCommandOptions, type PackageCommandResult, type PauseTaskResult, type PmActionInput, type PmActionName, type PmActionOptions, type PmClientCloseActionOptions, type PmClientFullMutationOptions, type PmClientMutationOptions, type PmClientOptions, type PmClientRunArgs, type PmCliExpectedError, type ProfileApplyCommandOptions, type ProfileApplyResult, type ProfileLintResult, type ProfileListResult, type ProfileResult, type ProfileShowResult, type ProfileSubcommand, type ReindexOptions, type ReindexResult, type ReleaseResult, type RestoreResult, type RunHealthOptions, type SchemaAddFieldCommandOptions, type SchemaAddFieldResult, type SchemaAddStatusCommandOptions, type SchemaAddStatusResult, type SchemaAddTypeCommandOptions, type SchemaAddTypeInferCommandOptions, type SchemaAddTypeInferResult, type SchemaAddTypeResult, type SchemaApplyPresetCommandOptions, type SchemaApplyPresetResult, type SchemaInspectResult, type SchemaListFieldsResult, type SchemaListResult, type SchemaRemoveFieldCommandOptions, type SchemaRemoveFieldResult, type SchemaRemoveStatusCommandOptions, type SchemaRemoveStatusResult, type SchemaRemoveTypeCommandOptions, type SchemaRemoveTypeResult, type SchemaShowFieldResult, type SchemaShowResult, type SchemaShowStatusResult, type SchemaResult, type RunSchemaEvolutionMigrationOptions, type SchemaEvolutionMigrationRequest, type SchemaEvolutionMigrationResult, type SchemaSubcommand, type SearchCompactResult, type SearchHit, type SearchHitHighlight, type SearchMatchMode, type SearchOptions, type ClaimNextOptions, type SearchResult, type SearchResultItem, type SearchVerboseResult, type StartTaskResult, type StatsCommandOptions, type StatsResult, type TemplatesListResult, type TemplatesSaveResult, type TemplatesShowResult, type TestRunsListCommandOptions, type TestRunsLogsCommandOptions, type TestRunsResumeCommandOptions, type TestRunsStopCommandOptions, type ToImportLinkedArtifactsOptions, type ToImportLinkedTestsOptions, type ToImportLogEntriesOptions, type UpdateResult, type UpgradeCommandOptions, type UpgradeResult, type ValidateCommandOptions, type ValidateResult, type WorkspaceContracts, type WorkspaceContractsOptions, type WorkspaceExtensionCommandContract, type WorkspaceFieldContract, } from "./runtime.js";
|
|
125
|
+
export { extensionMigrate, packageMigrate } from "./package-migrations.js";
|
|
122
126
|
export { CONTEXT_OUTPUT_VALUES, NEXT_OUTPUT_VALUES, PM_GITIGNORE_END, PM_GITIGNORE_START, analyzeSdkActionCoverage, ensurePmGitignore, getPmGitignoreBlock, closeItem, runAggregate, runClose, runCopy, runContext, runDelete, runFocus, runGet, runNext, runRestore, runUpdate, type CloseCommandOptions, type CopyOptions, type DeleteCommandOptions, type EnsurePmGitignoreResult, type HierarchyChild, type HierarchyNode, type HotFile, type FocusOptions, type ImportPriorityValue, type ProgressEntry, type RecentContextItem, type RestoreCommandOptions, type SdkActionCoverageRow, type StaleEntry, type TestHealthSummary, type UpdateCommandOptions, type WorkloadEntry, } from "./runtime.js";
|
|
123
127
|
export { runStats } from "./stats.js";
|
|
124
128
|
export { DEFAULT_EVAL_QUERIES_RELATIVE_PATH, EVAL_QUERY_SET_CONTRACT, EVAL_QUERY_SET_EXAMPLE, EVAL_QUERY_SET_SCHEMA_ID, parseEvalQuerySet, runEval, type EvalOptions, type EvalQueryReport, type EvalResult, } from "./eval.js";
|
package/dist/sdk/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Defines public SDK APIs and package-author helpers for Index.
|
|
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]="4e336574-f00e-5296-a55f-7f27a264188c")}catch(e){}}();
|
|
8
8
|
export { PM_COMMAND_VISIBILITY_CONTRACTS, PM_MCP_PROMPT_CONTRACTS, PM_MCP_RESOURCE_CONTRACTS, PM_MCP_TOOL_COMMAND_CONTRACTS, listPmCommandsForTier, listPmMcpToolsForProfile, renderPmCommandVisibilityMarkdown, resolvePmCommandVisibilityTier, } from "./agent-capability-contracts.js";
|
|
9
9
|
export * from "./agent-session-context.js";
|
|
10
10
|
export { isErrnoError, limitAnnotationEntries, parseAnnotationTextInput, readAnnotationEntries, resolveAnnotationInput, resolveAnnotationIndex, runAnnotationCommand, wrapOwnershipConflict, } from "./annotations.js";
|
|
@@ -21,7 +21,10 @@ export { quoteCommandArg, quoteWindowsCommandArg, renderPmCommand, } from "./com
|
|
|
21
21
|
export { runGc, } from "./governance/gc.js";
|
|
22
22
|
export { _testOnlyHealthCommand, runHealth, } from "./governance/health.js";
|
|
23
23
|
export { _testOnlyValidateCommand, projectValidateCounts, runValidate, } from "./governance/validate.js";
|
|
24
|
-
export { runExtension } from "./extension.js";
|
|
24
|
+
export { runExtension, } from "./extension.js";
|
|
25
|
+
export { resolveExtensionInstallSourceIdentity, } from "./extension/source-resolution.js";
|
|
26
|
+
export { applyStoredExtensionMigrationState, readExtensionMigrationState, resolveExtensionMigrationStatePath, runExtensionMigrateAction, runExtensionMigrations, } from "./extension/migrations.js";
|
|
27
|
+
export { findInstalledNpmPackageCandidate, } from "./extension/install-sources.js";
|
|
25
28
|
export { buildExtensionDescribeResult, renderExtensionDescribeMarkdown, } from "./extension/describe.js";
|
|
26
29
|
export { runEvent, runMeet, runRemind, } from "./scheduling-shortcuts.js";
|
|
27
30
|
export { createExtensionCommandSdk } from "./extension-command-context.js";
|
|
@@ -44,7 +47,7 @@ export { PROFILE_SUBCOMMANDS, formatProfileApplyHuman, formatProfileLintHuman, f
|
|
|
44
47
|
export * from "./extension-contracts.js";
|
|
45
48
|
export { RESERVED_ITEM_FIELD_NAMES } from "../core/extensions/item-fields.js";
|
|
46
49
|
export { PM_PACKAGE_CONVENTIONAL_RESOURCE_ROOTS, PM_PACKAGE_RESOURCE_KINDS, collectPackageExtensionDirectories, readPmPackageManifest, } from "../core/packages/manifest.js";
|
|
47
|
-
export { ACTIVITY_FLAG_CONTRACTS, ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, CLOSE_ACTION_OPTION_KEYS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, CREATE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, EVAL_FLAG_CONTRACTS, EVENT_FLAG_CONTRACTS, EVENTS_FLAG_CONTRACTS, EXTENSION_ACTIVATE_FLAG_CONTRACTS, EXTENSION_ADOPT_ALL_FLAG_CONTRACTS, EXTENSION_ADOPT_FLAG_CONTRACTS, EXTENSION_CATALOG_FLAG_CONTRACTS, EXTENSION_DEACTIVATE_FLAG_CONTRACTS, EXTENSION_DESCRIBE_FLAG_CONTRACTS, EXTENSION_DOCTOR_FLAG_CONTRACTS, EXTENSION_EXPLORE_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, EXTENSION_INIT_FLAG_CONTRACTS, EXTENSION_INSTALL_FLAG_CONTRACTS, EXTENSION_MANAGE_FLAG_CONTRACTS, EXTENSION_RELOAD_FLAG_CONTRACTS, EXTENSION_SCOPE_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, ITEM_MUTATE_FLAG_CONTRACTS, ITEM_COMPLETE_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, MEET_FLAG_CONTRACTS, MERGE_FLAG_CONTRACTS, NEXT_COMMANDER_STRING_OPTION_CONTRACTS, NEXT_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, PLAN_CREATE_METADATA_PARAMETER_KEYS, PLAN_FLAG_CONTRACTS, PM_COMMAND_OUTPUT_BUDGET_CONTRACTS, PM_CLI_ONLY_TOOL_ACTION_WAIVERS, PM_CORE_COMMAND_NAMES, PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS, 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_PROVIDER_TOOL_PARAMETERS_SCHEMA, PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION, PM_TOOL_ACTIONS, analyzePmToolActionParity, PM_TOOL_ACTION_PARAMETER_CONTRACTS, PM_TOOL_PARAMETERS_SCHEMA, PM_TOOL_PARAMETERS_SCHEMA_MAJOR, PM_TOOL_PARAMETERS_SCHEMA_VERSION, PM_OUTPUT_BUDGET_CLASSES, PM_OUTPUT_DEGRADATION_STEPS, PROFILE_FLAG_CONTRACTS, REINDEX_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, REMIND_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, SEARCH_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, SUBCOMMAND_GLOBAL_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, TOOL_ACTIVITY_OPTION_CONTRACTS, TOOL_AGGREGATE_OPTION_CONTRACTS, TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE, TOOL_CALENDAR_OPTION_CONTRACTS, TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CONTEXT_OPTION_CONTRACTS, TOOL_CREATE_OPTION_CONTRACTS, TOOL_CREATE_OPTION_CONTRACT_SOURCE, TOOL_DEPS_OPTION_CONTRACTS, TOOL_GRAPH_OPTION_CONTRACTS, TOOL_LIST_FILTER_OPTION_CONTRACTS, TOOL_SEARCH_FILTER_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE, TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACT_SOURCE, UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, WORKSPACE_FLAG_CONTRACTS, buildPmActionToolInputSchema, PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES, compactFlagAliasContracts, createPmCommandOutputBudget, definePmCommandOutputBudget, estimatePmOutputTokens, inferPmOutputBudgetClass, analyzeSdkCliParameterCompleteness, isPmExtensionCapabilityContract, isPmExtensionPolicyModeContract, isPmExtensionPolicySurfaceContract, isPmExtensionServiceNameContract, isPmToolAction, hasSubcommandFlagContractsForCommand, readFirstStringFromCommanderOptions, readFirstValueFromCommanderOptions, readStringArrayFromCommanderOptions, resolveSubcommandFlagContractsForCommand, resolvePmCommandOutputBudget, resolvePmToolCustomFieldCollision, toCompletionFlagString, withFlagAliasMetadata, } from "./cli-contracts.js";
|
|
50
|
+
export { ACTIVITY_FLAG_CONTRACTS, ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, CLOSE_ACTION_OPTION_KEYS, CLOSE_FLAG_CONTRACTS, CLOSE_MANY_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, COPY_FLAG_CONTRACTS, CREATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, CREATE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, EVAL_FLAG_CONTRACTS, EVENT_FLAG_CONTRACTS, EVENTS_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_SCOPE_FLAG_CONTRACTS, EXTENSION_UNINSTALL_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, FOCUS_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, GET_FLAG_CONTRACTS, GRAPH_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, HISTORY_COMPACT_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, HISTORY_REDACT_FLAG_CONTRACTS, HISTORY_REPAIR_FLAG_CONTRACTS, HISTORY_AUTHOR_ACKNOWLEDGE_FLAG_CONTRACTS, INIT_FLAG_CONTRACTS, INSTALL_FLAG_CONTRACTS, ITEM_MUTATE_FLAG_CONTRACTS, ITEM_COMPLETE_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, MEET_FLAG_CONTRACTS, MERGE_FLAG_CONTRACTS, NEXT_COMMANDER_STRING_OPTION_CONTRACTS, NEXT_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, PACKAGE_FLAG_CONTRACTS, PACKAGE_INIT_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, PLAN_CREATE_METADATA_PARAMETER_KEYS, PLAN_FLAG_CONTRACTS, PM_COMMAND_OUTPUT_BUDGET_CONTRACTS, PM_CLI_ONLY_TOOL_ACTION_WAIVERS, PM_CORE_COMMAND_NAMES, PM_EXTENSION_PACKAGE_ACTION_SUBCOMMANDS, 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_PROVIDER_TOOL_PARAMETERS_SCHEMA, PM_PROVIDER_TOOL_PARAMETERS_SCHEMA_VERSION, PM_TOOL_ACTIONS, analyzePmToolActionParity, PM_TOOL_ACTION_PARAMETER_CONTRACTS, PM_TOOL_PARAMETERS_SCHEMA, PM_TOOL_PARAMETERS_SCHEMA_MAJOR, PM_TOOL_PARAMETERS_SCHEMA_VERSION, PM_OUTPUT_BUDGET_CLASSES, PM_OUTPUT_DEGRADATION_STEPS, PROFILE_FLAG_CONTRACTS, REINDEX_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, REMIND_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, SCHEMA_FLAG_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, SEARCH_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, STATS_FLAG_CONTRACTS, DUPLICATES_FLAG_CONTRACTS, SUBCOMMAND_GLOBAL_FLAG_CONTRACTS, TELEMETRY_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, TOOL_ACTIVITY_OPTION_CONTRACTS, TOOL_AGGREGATE_OPTION_CONTRACTS, TOOL_BULK_MUTATION_FILTER_OPTION_CONTRACT_SOURCE, TOOL_CALENDAR_OPTION_CONTRACTS, TOOL_CLOSE_MANY_FILTER_OPTION_CONTRACTS, TOOL_CONTEXT_OPTION_CONTRACTS, TOOL_CREATE_OPTION_CONTRACTS, TOOL_CREATE_OPTION_CONTRACT_SOURCE, TOOL_DEPS_OPTION_CONTRACTS, TOOL_GRAPH_OPTION_CONTRACTS, TOOL_LIST_FILTER_OPTION_CONTRACTS, TOOL_SEARCH_FILTER_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACTS, TOOL_SHARED_CREATE_UPDATE_OPTION_CONTRACT_SOURCE, TOOL_UPDATE_MANY_FILTER_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACTS, TOOL_UPDATE_OPTION_CONTRACT_SOURCE, UPDATE_COMMANDER_OPTION_REGISTRATION_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, WORKSPACE_FLAG_CONTRACTS, buildPmActionToolInputSchema, PM_TOOL_RESERVED_CUSTOM_FIELD_PROPERTIES, compactFlagAliasContracts, createPmCommandOutputBudget, definePmCommandOutputBudget, estimatePmOutputTokens, inferPmOutputBudgetClass, analyzeSdkCliParameterCompleteness, isPmExtensionCapabilityContract, isPmExtensionPolicyModeContract, isPmExtensionPolicySurfaceContract, isPmExtensionServiceNameContract, isPmToolAction, hasSubcommandFlagContractsForCommand, readFirstStringFromCommanderOptions, readFirstValueFromCommanderOptions, readStringArrayFromCommanderOptions, resolveSubcommandFlagContractsForCommand, resolvePmCommandOutputBudget, resolvePmToolCustomFieldCollision, toCompletionFlagString, withFlagAliasMetadata, } from "./cli-contracts.js";
|
|
48
51
|
export * from "./compose.js";
|
|
49
52
|
export * from "./compile-cache.js";
|
|
50
53
|
export * from "./context-relevance.js";
|
|
@@ -111,6 +114,7 @@ export { runUpgrade } from "./governance/upgrade.js";
|
|
|
111
114
|
export { PLAN_SHOW_DEPTH_VALUES, PLAN_SUBCOMMANDS, PLAN_TEMPLATE_NAMES, } from "./lifecycle/plan.js";
|
|
112
115
|
export * from "./define.js";
|
|
113
116
|
export { BASELINE_ITEM_FORMAT_VERSION, BUILTIN_ITEM_TYPE_VALUES, CONFIDENCE_TEXT_VALUES, CURRENT_ITEM_FORMAT_VERSION, DEPENDENCY_KIND_VALUES, EXIT_CODE, ISSUE_SEVERITY_VALUES, ITEM_TYPE_VALUES, PM_CLI_EXPECTED_ERROR_NAME, PmCliError, PmClient, RISK_VALUES, STATUS_VALUES, acquireLock, appendHistoryEntry, canonicalDocument, classifyItemFormatVersion, clearWorkspaceContractsCache, commitImportedItem, createHistoryEntry, createPmCliExpectedError, effectiveItemFormatVersion, emptyImportedDocument, ensureTrackerInitialized, generateItemId, getActiveExtensionRegistrations, getContracts, getHistoryPath, getItemPath, getSettingsPath, getWorkspaceContracts, isPmCliExpectedError, isTimestampLiteral, listAllItemMetadata, loadCreateTemplateOptions, locateItem, normalizeItemMetadata, normalizeItemFormatVersion, normalizeItemId, normalizeRawItemId, normalizeStatusInput, nowIso, parseTags, pathExists, readBooleanOption, readCsvListOption, readFileIfExists, readLocatedItem, readRequiredString, readSettings, readStringOption, removeFileIfExists, renderCalendarMarkdown, renderCalendarToon, renderGuideMarkdown, resolveCalendarOutputFormat, resolveGuideOutputFormat, resolveItemTypeRegistry, resolveImplicitPmRoot, resolvePmRoot, resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, runAction, runActiveOnReadHooks, runActiveOnWriteHooks, runCalendar, runCompletion, runGuide, runList, runReindex, runSearch, runTemplatesList, runTemplatesSave, runTemplatesShow, runTestRunsList, runTestRunsLogs, runTestRunsResume, runTestRunsStatus, runTestRunsStop, scanItemFormatVersions, selectImportAuthor, serializeItemDocument, splitFrontMatter, toEstimatedMinutesValue, toImportBoolean, toImportConfidence, toImportInteger, toImportLinkedDocs, toImportLinkedFiles, toImportLinkedTests, toImportLogEntries, toImportNormalizedEnum, toImportNumberMap, toImportPriority, toImportStatus, toImportStringList, toImportStringMap, toImportTags, toNonEmptyImportString, writeFileAtomic, aggregate, append, claim, claimNext, close, closeTask, comments, config, context, copy, create, deleteItem, deps, docs, duplicates, extension, extensionActivate, extensionDeactivate, extensionList, files, filesDiscover, filesLookup, focus, gc, get, graph, health, historyCompact, historyCompactBulk, historyRedact, historyRepair, historyRepairAll, init, learnings, list, next, notes, packageActivate, packageCatalog, packageDeactivate, packageDescribe, packageDoctor, packageInstall, packageLifecycle, packageList, packageManage, packageReload, packageUninstall, pauseTask, profile, profileApply, profileLint, profileList, profileShow, release, restore, schema, schemaAddField, schemaAddStatus, schemaAddType, schemaApplyPreset, schemaInferTypes, schemaList, schemaListFields, schemaRemapStatus, schemaRemoveField, schemaRemoveStatus, schemaRemoveType, schemaShow, schemaShowField, schemaShowStatus, schemaRenameField, schemaRenameType, search, startTask, stats, update, upgrade, validate, } from "./runtime.js";
|
|
117
|
+
export { extensionMigrate, packageMigrate } from "./package-migrations.js";
|
|
114
118
|
export { CONTEXT_OUTPUT_VALUES, NEXT_OUTPUT_VALUES, PM_GITIGNORE_END, PM_GITIGNORE_START, analyzeSdkActionCoverage, ensurePmGitignore, getPmGitignoreBlock, closeItem, runAggregate, runClose, runCopy, runContext, runDelete, runFocus, runGet, runNext, runRestore, runUpdate, } from "./runtime.js";
|
|
115
119
|
export { runStats } from "./stats.js";
|
|
116
120
|
export { DEFAULT_EVAL_QUERIES_RELATIVE_PATH, EVAL_QUERY_SET_CONTRACT, EVAL_QUERY_SET_EXAMPLE, EVAL_QUERY_SET_SCHEMA_ID, parseEvalQuerySet, runEval, } from "./eval.js";
|
|
@@ -129,4 +133,4 @@ export * from "./governance.js";
|
|
|
129
133
|
export * from "./query.js";
|
|
130
134
|
export * from "./testing.js";
|
|
131
135
|
//# sourceMappingURL=index.js.map
|
|
132
|
-
//# debugId=
|
|
136
|
+
//# debugId=4e336574-f00e-5296-a55f-7f27a264188c
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module sdk/package-migrations
|
|
3
|
+
*
|
|
4
|
+
* Provides one-shot SDK helpers for extension and package migration lifecycle.
|
|
5
|
+
*/
|
|
6
|
+
import { type ExtensionCommandOptions, type ExtensionCommandResult, type PackageCommandOptions, type PackageCommandResult, type PmClientOptions } from "./runtime.js";
|
|
7
|
+
/** Plan or apply active extension migrations without constructing a reusable client. */
|
|
8
|
+
export declare function extensionMigrate(options?: ExtensionCommandOptions, clientOptions?: PmClientOptions): Promise<ExtensionCommandResult>;
|
|
9
|
+
/** Plan or apply active package migrations without constructing a reusable client. */
|
|
10
|
+
export declare function packageMigrate(options?: PackageCommandOptions, clientOptions?: PmClientOptions): Promise<PackageCommandResult>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module sdk/package-migrations
|
|
3
|
+
*
|
|
4
|
+
* Provides one-shot SDK helpers for extension and package migration lifecycle.
|
|
5
|
+
*/
|
|
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]="5bbfab95-010d-5507-ab01-f8f43943d295")}catch(e){}}();
|
|
8
|
+
import { PmClient, } from "./runtime.js";
|
|
9
|
+
/** Plan or apply active extension migrations without constructing a reusable client. */
|
|
10
|
+
export function extensionMigrate(options = {}, clientOptions = {}) {
|
|
11
|
+
return new PmClient(clientOptions).extension(undefined, {
|
|
12
|
+
...options,
|
|
13
|
+
migrate: true,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
/** Plan or apply active package migrations without constructing a reusable client. */
|
|
17
|
+
export function packageMigrate(options = {}, clientOptions = {}) {
|
|
18
|
+
return new PmClient(clientOptions).packageMigrate(options);
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=package-migrations.js.map
|
|
21
|
+
//# debugId=5bbfab95-010d-5507-ab01-f8f43943d295
|
package/dist/sdk/runtime.d.ts
CHANGED
|
@@ -336,6 +336,8 @@ export declare class PmClient {
|
|
|
336
336
|
packageActivate(target: string, options?: PackageCommandOptions): Promise<PackageCommandResult>;
|
|
337
337
|
/** Disable an installed package using the same action as `pm package deactivate`. */
|
|
338
338
|
packageDeactivate(target: string, options?: PackageCommandOptions): Promise<PackageCommandResult>;
|
|
339
|
+
/** Plan or apply active package migrations with durable workspace receipts. */
|
|
340
|
+
packageMigrate(options?: PackageCommandOptions): Promise<PackageCommandResult>;
|
|
339
341
|
/** Upgrade the pm CLI and/or managed packages through the public SDK dispatcher. */
|
|
340
342
|
upgrade(target?: string, options?: UpgradeCommandOptions): Promise<UpgradeResult>;
|
|
341
343
|
}
|
package/dist/sdk/runtime.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Defines public SDK APIs and package-author helpers for Runtime.
|
|
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]="57628397-0652-5a7b-8521-2f0fb2abb787")}catch(e){}}();
|
|
8
8
|
export { PM_GITIGNORE_END, PM_GITIGNORE_START, ensurePmGitignore, getPmGitignoreBlock, } from "./workspace.js";
|
|
9
9
|
export { SEARCH_EXTENSION_FLAG_DEFINITIONS } from "./extension-contracts.js";
|
|
10
10
|
import { AsyncLocalStorage } from "node:async_hooks";
|
|
@@ -669,6 +669,10 @@ export class PmClient {
|
|
|
669
669
|
packageDeactivate(target, options = {}) {
|
|
670
670
|
return this.runTyped("package-deactivate", { target, options });
|
|
671
671
|
}
|
|
672
|
+
/** Plan or apply active package migrations with durable workspace receipts. */
|
|
673
|
+
packageMigrate(options = {}) {
|
|
674
|
+
return this.package(undefined, { ...options, migrate: true });
|
|
675
|
+
}
|
|
672
676
|
/** Upgrade the pm CLI and/or managed packages through the public SDK dispatcher. */
|
|
673
677
|
upgrade(target, options = {}) {
|
|
674
678
|
return this.runTyped("upgrade", {
|
|
@@ -1958,4 +1962,4 @@ async function loadWorkspaceExtensionRegistrations(pmRoot, settings, cwd) {
|
|
|
1958
1962
|
}
|
|
1959
1963
|
}
|
|
1960
1964
|
//# sourceMappingURL=runtime.js.map
|
|
1961
|
-
//# debugId=
|
|
1965
|
+
//# debugId=57628397-0652-5a7b-8521-2f0fb2abb787
|
package/docs/COMMANDS.md
CHANGED
|
@@ -82,6 +82,8 @@ pm install npm:@scope/pm-package --project
|
|
|
82
82
|
pm package describe --project # by-name surface map of every loaded package
|
|
83
83
|
pm package describe my-package --markdown --output docs/my-package-reference.md
|
|
84
84
|
pm package doctor --project --detail summary
|
|
85
|
+
pm package migrate --project --dry-run --json
|
|
86
|
+
pm package migrate --project --json
|
|
85
87
|
pm upgrade --dry-run
|
|
86
88
|
pm upgrade --packages-only
|
|
87
89
|
pm upgrade --cli-only --repair
|
|
@@ -89,6 +91,13 @@ pm upgrade --cli-only --repair
|
|
|
89
91
|
|
|
90
92
|
`pm install` and `pm package` are the preferred package-first workflow. `pm package` and `pm extension` bare invocations default to `--explore` so agents can list installed packages without remembering an action flag. `pm install '*'`, shell-expanded `pm install *`, and `pm install all` install bundled first-party packages. `pm extension` remains as a compatibility command for direct extension lifecycle operations.
|
|
91
93
|
Install output includes a light `verification` summary with target tracker root, activation state, registered commands/actions/item types, and an `ok|degraded` health verdict. Runtime activation failure sets the command result and process exit status to failure; inspect `activation_diagnostics` and `command_discovery.next_steps` for the exact recovery path.
|
|
94
|
+
Bare install names use bundled aliases before installed npm packages. Every
|
|
95
|
+
install result reports `source_resolution`; when both candidates exist it marks
|
|
96
|
+
the choice ambiguous and provides explicit bare and `npm:` retry commands.
|
|
97
|
+
`package migrate` plans or applies active migration registrations and writes
|
|
98
|
+
durable workspace-history receipts; a successful migration is skipped on later
|
|
99
|
+
processes, while a failed migration remains retryable. `extension migrate` is
|
|
100
|
+
the compatibility spelling.
|
|
92
101
|
When package-owned commands are unavailable, usage guidance includes an install-ready retry (for example `pm install calendar`, `pm install search-advanced`, `pm install governance-audit`, or `pm install guide-shell`).
|
|
93
102
|
|
|
94
103
|
## Triage
|
package/docs/EXTENSIONS.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Packages and Extensions
|
|
2
2
|
|
|
3
|
-
Extension flags declared with `list: true` accumulate repeated long/short alias occurrences and comma-separated values into one array. Dynamic commands preserve flag-like variadic content after `--`, and package handlers can use the public `suppressHostOutput()` protocol when they already emitted streaming, binary, or pre-rendered output. Declarative blueprints are also checked for reserved item-field collisions during SDK lint/preflight and harness activation, so a package cannot pass author-time validation and then fail only when users create or update items. Local archive installation, command ownership, and MCP custom-field diagnostics are tracked by [pm-lw6acw](../.agents/pm/issues/pm-lw6acw.toon), [pm-6z0wzf](../.agents/pm/issues/pm-6z0wzf.toon), and [pm-yfdav2](../.agents/pm/issues/pm-yfdav2.toon). Transactional mutation guards, host-bound command test SDKs, and installed custom-type lifecycle parity are tracked by [pm-hx23u5](../.agents/pm/issues/pm-hx23u5.toon), [pm-wx2lr5](../.agents/pm/issues/pm-wx2lr5.toon), and [pm-scga6k](../.agents/pm/issues/pm-scga6k.toon).
|
|
3
|
+
Extension flags declared with `list: true` accumulate repeated long/short alias occurrences and comma-separated values into one array. Dynamic commands preserve flag-like variadic content after `--`, and package handlers can use the public `suppressHostOutput()` protocol when they already emitted streaming, binary, or pre-rendered output. Declarative blueprints are also checked for reserved item-field collisions during SDK lint/preflight and harness activation, so a package cannot pass author-time validation and then fail only when users create or update items. Local archive installation, command ownership, and MCP custom-field diagnostics are tracked by [pm-lw6acw](../.agents/pm/issues/pm-lw6acw.toon), [pm-6z0wzf](../.agents/pm/issues/pm-6z0wzf.toon), and [pm-yfdav2](../.agents/pm/issues/pm-yfdav2.toon). Transactional mutation guards, host-bound command test SDKs, and installed custom-type lifecycle parity are tracked by [pm-hx23u5](../.agents/pm/issues/pm-hx23u5.toon), [pm-wx2lr5](../.agents/pm/issues/pm-wx2lr5.toon), and [pm-scga6k](../.agents/pm/issues/pm-scga6k.toon). Durable migration application, explicit source resolution, and composable preflight ownership are covered in [Extension Lifecycle Contracts](EXTENSION_LIFECYCLE.md).
|
|
4
4
|
|
|
5
5
|
Packages add optional `pm` workflows without changing the core CLI. A package can ship one or more runtime extensions plus metadata such as docs and examples. Prefer the package-first commands in new docs and automation:
|
|
6
6
|
|
|
@@ -38,7 +38,7 @@ pm install calendar --project
|
|
|
38
38
|
pm install search-advanced --project
|
|
39
39
|
pm install kanban --project
|
|
40
40
|
```
|
|
41
|
-
`pm install '*'`, `pm install all`, and shell-expanded `pm install *` are normalized to the same bundled install-all request. First-party package aliases come from each package manifest, with a fallback derived from the `packages/pm-*` directory name.
|
|
41
|
+
`pm install '*'`, `pm install all`, and shell-expanded `pm install *` are normalized to the same bundled install-all request. First-party package aliases come from each package manifest, with a fallback derived from the `packages/pm-*` directory name. A bare bundled alias that also names an installed npm package reports both explicit choices in `source_resolution`; see [Extension Lifecycle Contracts](EXTENSION_LIFECYCLE.md).
|
|
42
42
|
|
|
43
43
|
External registry packages are installed by exact package name. If `npm:<name>` returns a registry 404, JSON error output includes `fallback_candidates` and `next_best_command`; unpublished first-party packages fall back to `pm install --project github.com/unbraind/<name>`. Install results include package-owned `command_paths`, `action_paths`, `contributions`, `command_discovery`, and a light `verification` block covering the target tracker, activation status, registered commands/actions/item types, and health verdict. Agents should consume those fields instead of guessing from the package name or immediately spending another invocation on doctor. A successful activation persists the versioned contribution inventory in `.managed-extensions.json`; subsequent discovery can enumerate command handlers, hooks, parser/renderer targets, schema names, and the other registered surfaces without importing the package module. A failed runtime activation returns `ok: false`, `activated: false`, a non-zero CLI exit, and actionable diagnostics; missing SDK resolution adds an explicit dependency recovery step. Local installs are containment-safe when the extension destination is nested inside the source checkout: pm stages the package outside the source and prunes the destination, `.agents`, `node_modules`, and install-backup directories before copying, so reinstalling cannot recursively copy tracker history, host dependencies, or prior backups.
|
|
44
44
|
Local `.tgz` and `.tar.gz` npm archives are inspected and extracted in an isolated temporary directory without invoking a shell. Archives must contain one `package/package.json` root, regular files/directories only, and bounded entry and expanded-byte totals. Absolute paths, traversal, alternate roots, links, device entries, oversized entries, and decompression-ratio abuse fail before installation. The managed source remains the original archive path, so reload and upgrade provenance do not point at a temporary extraction directory.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Extension Lifecycle Contracts
|
|
2
|
+
|
|
3
|
+
Tracked by [pm-ig5cfe](../.agents/pm/issues/pm-ig5cfe.toon),
|
|
4
|
+
[pm-495lkc](../.agents/pm/issues/pm-495lkc.toon), and
|
|
5
|
+
[pm-miy5k6](../.agents/pm/issues/pm-miy5k6.toon).
|
|
6
|
+
|
|
7
|
+
## Explicit Install-Source Identity
|
|
8
|
+
|
|
9
|
+
A bare target may name both a bundled alias and an already-installed npm
|
|
10
|
+
package. pm preserves the bundled-first compatibility rule but never hides the
|
|
11
|
+
choice. Install results include `source_resolution` with the selected source,
|
|
12
|
+
an `ambiguous` indicator, every matching candidate, and an explicit command for
|
|
13
|
+
each. Use `pm install npm:<package>` to force npm identity or the reported bare
|
|
14
|
+
alias command to force the bundled package. Install-all results carry the same
|
|
15
|
+
receipt on every package row.
|
|
16
|
+
|
|
17
|
+
## Durable Extension Migrations
|
|
18
|
+
|
|
19
|
+
Active packages register schema migrations through `api.registerMigration`.
|
|
20
|
+
Runtime preflight applies runnable migrations, and operators can plan or apply
|
|
21
|
+
the same registrations explicitly:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
pm package migrate --project --dry-run --json
|
|
25
|
+
pm package migrate --project --json
|
|
26
|
+
pm health --check-only --json
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
`pm extension migrate` is the compatibility spelling. The SDK exposes
|
|
30
|
+
`runExtensionMigrations`, `PmClient.packageMigrate`, and the one-shot
|
|
31
|
+
`packageMigrate`/`extensionMigrate` helpers. Dry-run never invokes package code
|
|
32
|
+
or writes state. Apply records deterministic per-migration receipts in
|
|
33
|
+
`.agents/pm/extension-migrations.json` through workspace history. Successful
|
|
34
|
+
migrations become idempotent `skipped` rows in later processes. Failures retain
|
|
35
|
+
their error for health diagnostics and are retried on the next apply. Project
|
|
36
|
+
scope includes active project and global packages because both affect that
|
|
37
|
+
workspace; `--global` restricts execution to global registrations.
|
|
38
|
+
|
|
39
|
+
## Scoped Preflight Ownership
|
|
40
|
+
|
|
41
|
+
`definePreflightOverride` and `api.registerPreflight` accept
|
|
42
|
+
`{ commands, run }`. Command paths are normalized, disjoint registrations
|
|
43
|
+
compose without warnings, and runtime invokes only the matching owner. Empty or
|
|
44
|
+
omitted command ownership retains the legacy global behavior and collides with
|
|
45
|
+
every other override. Activation summaries and persisted contribution
|
|
46
|
+
inventories expose `preflight_ownership` for static doctor and tooling output.
|
package/docs/README.md
CHANGED
|
@@ -59,6 +59,7 @@ pm guide release --json
|
|
|
59
59
|
- [Portable Corpus Shapes](CORPUS_SHAPES.md) - versioned SDK populations for realistic benchmarks, evaluations, and package tests.
|
|
60
60
|
- [Agent UX Contracts](AGENT_UX_CONTRACTS.md) - ordering-cycle advisories, graph count units, collision safety, compact context, ownership wording, and recovery behavior.
|
|
61
61
|
- [Packages and Extensions](EXTENSIONS.md) - package install workflows, runtime extension lifecycle, and API reference.
|
|
62
|
+
- [Extension Lifecycle Contracts](EXTENSION_LIFECYCLE.md) - source identity, durable migrations, and scoped preflight ownership.
|
|
62
63
|
- [Extension Author Contracts](EXTENSION_AUTHOR_CONTRACTS.md) - the stability guarantees and contract surface package authors build against.
|
|
63
64
|
- [SDK](SDK.md) - public import surfaces and typed authoring examples.
|
|
64
65
|
- [Multi-Branch Merge Safety](MERGE_SAFETY.md) - semantic tracker merge drivers, post-merge integrity gates, delete/modify policy, and recovery-receipt retention.
|
package/docs/RELEASING.md
CHANGED
|
@@ -20,7 +20,8 @@ Tracked documentation work: [pm-u9d0](../.agents/pm/epics/pm-u9d0.toon),
|
|
|
20
20
|
[pm-4s24d2](../.agents/pm/issues/pm-4s24d2.toon),
|
|
21
21
|
[pm-39cqqx](../.agents/pm/tasks/pm-39cqqx.toon), stable peer compatibility
|
|
22
22
|
[pm-csuce0](../.agents/pm/issues/pm-csuce0.toon), and artifact budgets
|
|
23
|
-
[pm-998juj](../.agents/pm/tasks/pm-998juj.toon)
|
|
23
|
+
[pm-998juj](../.agents/pm/tasks/pm-998juj.toon), plus exact-tag recovery
|
|
24
|
+
[pm-lwnifd](../.agents/pm/issues/pm-lwnifd.toon).
|
|
24
25
|
|
|
25
26
|
## Version Policy
|
|
26
27
|
|
|
@@ -232,11 +233,14 @@ git push origin v<version>
|
|
|
232
233
|
`.github/workflows/release.yml` runs on `v*.*.*` tags and handles:
|
|
233
234
|
|
|
234
235
|
- full-history checkout
|
|
235
|
-
- manual `workflow_dispatch` by tag for recovery
|
|
236
|
+
- manual `workflow_dispatch` by tag for recovery. An authenticated exact-version probe keeps already-published access recovery on the reviewed dispatch-time `main` source; when the immutable tag exists but npm publication never completed, recovery checks out that exact tagged source and retains the original version guard
|
|
236
237
|
- pnpm install with frozen lockfile
|
|
237
238
|
- version policy and tag guard
|
|
238
239
|
- secret scan
|
|
239
|
-
- build, typecheck, test, and coverage
|
|
240
|
+
- build, clone-local merge-driver installation, typecheck, test, and coverage
|
|
241
|
+
- generated changelog verification and `pm-changelog` installation before the
|
|
242
|
+
tracker-bearing static gate, so a clean checkout does not misclassify the
|
|
243
|
+
managed extension's linked files as missing
|
|
240
244
|
- static quality gate (shared complexity, duplication, dead/orphan module, file/folder hygiene, source/exported docstring coverage profile)
|
|
241
245
|
- temporary-project compatibility gate against latest published tracker data
|
|
242
246
|
- reliability threshold gate (Sentry severity threshold, bounded to a recent-activity window via `--sentry-window-days` (default `14`, `0` = unbounded) so a stale benign unresolved issue cannot block every scheduled release; `--telemetry-mode` gate policy: `off` | `best-effort` | `required`). Scheduled `auto-release.yml` failures open/update an `Auto Release blocked` GitHub issue so blocked daily releases are never silently skipped.
|
|
@@ -248,7 +252,10 @@ git push origin v<version>
|
|
|
248
252
|
- `npm publish --access public --provenance --tag latest`, skipped on retry
|
|
249
253
|
only when the exact version is anonymously visible from a fresh npm cache.
|
|
250
254
|
If the package is public but the target version is absent, the workflow
|
|
251
|
-
publishes immediately without attempting a package-access mutation.
|
|
255
|
+
publishes immediately without attempting a package-access mutation. A
|
|
256
|
+
dispatch may do so only when its source-selection preflight pinned the
|
|
257
|
+
checkout to the requested immutable tag; reviewed-main recovery continues
|
|
258
|
+
to refuse publication of a missing target. Only
|
|
252
259
|
when neither the target nor package metadata is anonymously visible does the
|
|
253
260
|
same-tag recovery path attempt to restore public package access, because a
|
|
254
261
|
hidden version can also return 404 to authenticated metadata reads. After a
|
|
@@ -272,7 +279,7 @@ git push origin v<version>
|
|
|
272
279
|
`scripts/release/verify-installed-agent-session.mjs`. Separate npm and Bun
|
|
273
280
|
install roots must contain the resolved executable, then each drives the
|
|
274
281
|
cold-start `init -> context -> create -> claim -> annotate -> files -> close
|
|
275
|
-
|
|
282
|
+
-> validate -> get -> context` loop. The structured report identifies the
|
|
276
283
|
failing step and records per-step output ceilings and estimated token cost.
|
|
277
284
|
- GitHub Release creation
|
|
278
285
|
- GitHub Release metadata verification through the same local verification script
|
|
@@ -312,25 +319,31 @@ Use the npm registry package for maintainer global updates. Do not use `npm inst
|
|
|
312
319
|
ordinal recovery version. Rerun `.github/workflows/release.yml` with
|
|
313
320
|
`workflow_dispatch` and `tag=v<version>` (or close the current bot-created
|
|
314
321
|
blocker once to trigger the guarded exact-run recovery). The workflow skips
|
|
315
|
-
duplicate npm publication for an anonymously visible version
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
immutable
|
|
322
|
+
duplicate npm publication for an anonymously visible version. Before
|
|
323
|
+
installing or running gates, dispatch performs an authenticated exact-version
|
|
324
|
+
probe. An
|
|
325
|
+
existing version keeps the reviewed dispatch-time `main` source and cannot
|
|
326
|
+
be republished. A definitive missing-version response pins the checkout to
|
|
327
|
+
the existing immutable tag, reapplies the version guard, installs the managed
|
|
328
|
+
changelog extension before tracker measurement, and permits first publication
|
|
329
|
+
only from that exact tagged source. Other registry failures stop before
|
|
330
|
+
source selection or publication.
|
|
321
331
|
- If an immutable published package contains a defect that cannot be repaired
|
|
322
332
|
by rerunning the same tag workflow, document the incident and ship the code
|
|
323
333
|
fix in the next UTC day's release.
|
|
324
|
-
- A manual exact-tag `workflow_dispatch` recovery
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
334
|
+
- A manual exact-tag `workflow_dispatch` recovery uses isolated anonymous
|
|
335
|
+
registry probes before any account-level access mutation. A visible package
|
|
336
|
+
with a missing target version proceeds directly to exact-tag publication, so
|
|
337
|
+
a publish-capable automation token is not required to change package access.
|
|
338
|
+
Access recovery is reserved for the ambiguous case where neither the package
|
|
339
|
+
nor target version is anonymously visible. An already-visible immutable
|
|
340
|
+
version is still verified and never republished. Recovery starts from the
|
|
328
341
|
dispatch-time commit SHA and fails unless the dispatch ref is the repository
|
|
329
|
-
default branch (`main`)
|
|
330
|
-
version
|
|
331
|
-
the
|
|
332
|
-
|
|
333
|
-
|
|
342
|
+
default branch (`main`). It remains on that reviewed source when the exact
|
|
343
|
+
npm version exists. When the version is definitively absent, it switches to
|
|
344
|
+
the resolved commit behind `RELEASE_TAG`, requires `package.json` to match the
|
|
345
|
+
tag, installs the clone-local merge driver and managed changelog extension,
|
|
346
|
+
and may publish that exact source after every gate passes.
|
|
334
347
|
- Record failure evidence and remediation in the release `pm` item.
|
|
335
348
|
|
|
336
349
|
### Silent skip debugging
|