@unbrained/pm-cli 2026.8.7 → 2026.8.8
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 +35 -0
- package/dist/cli/main.js +4 -3
- package/dist/cli/register-annotations.d.ts +11 -0
- package/dist/cli/register-annotations.js +195 -0
- package/dist/cli/register-history-author.js +7 -30
- package/dist/cli/register-mutation.js +25 -206
- package/dist/cli/runtime-compatibility-boundary.d.ts +17 -0
- package/dist/cli/runtime-compatibility-boundary.js +43 -0
- package/dist/cli-bundle/bundle-manifest.json +155 -691
- package/dist/cli-bundle/chunks/chunk-2ZMXX3Q6.js +2068 -0
- package/dist/cli-bundle/chunks/chunk-ALDHXLPS.js +3 -0
- package/dist/cli-bundle/chunks/chunk-CBLA33YK.js +8 -0
- package/dist/cli-bundle/chunks/chunk-GKA54IJM.js +5 -0
- package/dist/cli-bundle/chunks/chunk-KRY7SRUO.js +2 -0
- package/dist/cli-bundle/chunks/chunk-MNJ4NNSY.js +26 -0
- package/dist/cli-bundle/chunks/chunk-NUXRRNAB.js +77 -0
- package/dist/cli-bundle/chunks/chunk-OJPCFDDY.js +13 -0
- package/dist/cli-bundle/chunks/chunk-PFSD3DAN.js +194 -0
- package/dist/cli-bundle/chunks/chunk-QWRRFYK3.js +2 -0
- package/dist/cli-bundle/chunks/chunk-SQ7QZFQ6.js +2 -0
- package/dist/cli-bundle/chunks/{register-list-query-FJZCJ67O.js → register-list-query-WFZAMJHZ.js} +8 -8
- package/dist/cli-bundle/chunks/register-mutation-SOKKOTHQ.js +20 -0
- package/dist/cli-bundle/chunks/register-operations-5XQETS6E.js +2 -0
- package/dist/cli-bundle/chunks/register-setup-2HL5ZHMK.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-54EU2UVO.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-VZFU2R4M.js → chunk-5FLBTZJQ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-5GJ57YKN.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-HNL6IFGS.js → chunk-ANTMGYLI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-CMDS3KYT.js +14 -0
- package/dist/cli-bundle/focused-chunks/{chunk-NBJKQP4S.js → chunk-DMKOMTTY.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-CIXVQPB7.js → chunk-F5B3HBEZ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-R2LEMEV5.js → chunk-FI6DWU2M.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-3K4XV2BF.js → chunk-FNOKJG6N.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-RW5IYD4J.js → chunk-FPDYXZBK.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-QHRTT7WT.js → chunk-GWI6YIKJ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-MHMTKV5V.js → chunk-HCUC62AB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-MOTJFQ3F.js → chunk-HGNKPSCB.js} +12 -12
- package/dist/cli-bundle/focused-chunks/{chunk-4VJQTS3P.js → chunk-IAS7PMLG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-TIKDBG4D.js → chunk-PL2EYDJK.js} +27 -27
- package/dist/cli-bundle/focused-chunks/chunk-SM2PJGP3.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-RPNYG5MO.js → chunk-TCSAPH33.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-U646T7Z6.js +18 -0
- package/dist/cli-bundle/focused-chunks/chunk-YKPE4PPY.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-YZEZAPJK.js → chunk-YSAHYUXX.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-73JUDYXT.js → chunk-ZOLDTUU7.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 +38 -38
- 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 +2 -1
- package/dist/cli.js +14 -4
- package/dist/core/output/output.js +9 -2
- package/dist/core/sentry/helpers.d.ts +10 -0
- package/dist/core/sentry/helpers.js +59 -4
- package/dist/core/shared/constants.d.ts +2 -0
- package/dist/core/shared/constants.js +4 -2
- package/dist/sdk/annotations.d.ts +40 -0
- package/dist/sdk/annotations.js +61 -9
- package/dist/sdk/author-attribution.d.ts +12 -0
- package/dist/sdk/author-attribution.js +73 -11
- package/dist/sdk/cli-contracts/command-exit-contracts.d.ts +118 -0
- package/dist/sdk/cli-contracts/command-exit-contracts.js +152 -0
- package/dist/sdk/cli-contracts/completeness.js +5 -3
- package/dist/sdk/cli-contracts/flag-contracts.js +5 -2
- package/dist/sdk/cli-contracts/runtime-contracts.d.ts +11 -0
- package/dist/sdk/cli-contracts/runtime-contracts.js +29 -2
- package/dist/sdk/cli-contracts/tool-parameter-tables.js +15 -2
- package/dist/sdk/cli-contracts/tool-schema.d.ts +1 -1
- package/dist/sdk/cli-contracts/tool-schema.js +6 -3
- package/dist/sdk/comments.d.ts +7 -0
- package/dist/sdk/comments.js +2 -2
- package/dist/sdk/completion.js +9 -5
- package/dist/sdk/contracts.d.ts +1 -0
- package/dist/sdk/contracts.js +3 -2
- package/dist/sdk/environment/host-environment-errors.d.ts +27 -0
- package/dist/sdk/environment/host-environment-errors.js +124 -0
- package/dist/sdk/environment/project-runtime-compatibility.d.ts +65 -0
- package/dist/sdk/environment/project-runtime-compatibility.js +385 -0
- package/dist/sdk/environment/source-context.d.ts +23 -0
- package/dist/sdk/environment/source-context.js +29 -0
- package/dist/sdk/error-code-catalog.d.ts +6 -0
- package/dist/sdk/error-code-catalog.js +62 -8
- package/dist/sdk/generated-error-code-catalog.js +629 -3
- package/dist/sdk/governance/health.d.ts +11 -3
- package/dist/sdk/governance/health.js +5 -5
- package/dist/sdk/index.d.ts +7 -3
- package/dist/sdk/index.js +9 -5
- package/dist/sdk/learnings.d.ts +15 -0
- package/dist/sdk/learnings.js +2 -2
- package/dist/sdk/lifecycle/close-many.d.ts +6 -1
- package/dist/sdk/lifecycle/close-many.js +43 -5
- package/dist/sdk/lifecycle/update-many.d.ts +2 -1
- package/dist/sdk/lifecycle/update-many.js +29 -5
- package/dist/sdk/merge/index.d.ts +1 -1
- package/dist/sdk/merge/index.js +3 -3
- package/dist/sdk/merge/install.d.ts +21 -0
- package/dist/sdk/merge/install.js +50 -20
- package/dist/sdk/notes.d.ts +7 -0
- package/dist/sdk/notes.js +2 -2
- package/dist/sdk/read-output-contracts.js +83 -4
- package/dist/sdk/runtime.d.ts +1 -1
- package/dist/sdk/runtime.js +9 -25
- package/dist/sdk/test/execution.js +4 -2
- package/dist/sdk/test/parsers.js +5 -2
- package/dist/sdk/workspace-snapshot.d.ts +9 -0
- package/dist/sdk/workspace-snapshot.js +48 -16
- package/docs/AGENT_RUNTIME_PRIMITIVES.md +11 -4
- package/docs/README.md +1 -0
- package/docs/RELEASING.md +27 -2
- package/docs/SCRIPTING.md +27 -1
- package/docs/SDK_CONTEXT_INTEGRITY.md +66 -0
- package/docs/SDK_RUNTIME_BOUNDARIES.md +58 -0
- package/docs/SELF_DESCRIBING_CONTEXT_CONTRACTS.md +13 -0
- package/docs/TESTING.md +17 -0
- package/marketplace.json +2 -2
- package/package.json +5 -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 +529 -34
- package/dist/cli-bundle/chunks/append-7BXBFDGD.js +0 -2
- package/dist/cli-bundle/chunks/chunk-2AXF3VSK.js +0 -2
- package/dist/cli-bundle/chunks/chunk-2XS43CCV.js +0 -2
- package/dist/cli-bundle/chunks/chunk-3A6KWB72.js +0 -8
- package/dist/cli-bundle/chunks/chunk-3ISTDB42.js +0 -8
- package/dist/cli-bundle/chunks/chunk-4MTI7XOV.js +0 -5
- package/dist/cli-bundle/chunks/chunk-6BX5UDCN.js +0 -3
- package/dist/cli-bundle/chunks/chunk-6QPO7KLR.js +0 -2
- package/dist/cli-bundle/chunks/chunk-7MXHZHSQ.js +0 -5
- package/dist/cli-bundle/chunks/chunk-7ZPMJW4U.js +0 -2
- package/dist/cli-bundle/chunks/chunk-A6KGKEWT.js +0 -2
- package/dist/cli-bundle/chunks/chunk-AGYNSNCI.js +0 -2
- package/dist/cli-bundle/chunks/chunk-B4H7FEFH.js +0 -5
- package/dist/cli-bundle/chunks/chunk-B4KLBBMN.js +0 -2
- package/dist/cli-bundle/chunks/chunk-BXCSXK4J.js +0 -2
- package/dist/cli-bundle/chunks/chunk-CALJHNBL.js +0 -23
- package/dist/cli-bundle/chunks/chunk-CFIGP5LY.js +0 -2
- package/dist/cli-bundle/chunks/chunk-CHOQ2VAW.js +0 -2
- package/dist/cli-bundle/chunks/chunk-CS6MRHG7.js +0 -2
- package/dist/cli-bundle/chunks/chunk-CUGNQQKH.js +0 -2
- package/dist/cli-bundle/chunks/chunk-D4FPS43D.js +0 -164
- package/dist/cli-bundle/chunks/chunk-E2ZSLTOP.js +0 -2
- package/dist/cli-bundle/chunks/chunk-FB7G2HY2.js +0 -2
- package/dist/cli-bundle/chunks/chunk-H5Y5YE6A.js +0 -2
- package/dist/cli-bundle/chunks/chunk-H5Y6UV6E.js +0 -2
- package/dist/cli-bundle/chunks/chunk-H7KGWPDF.js +0 -2
- package/dist/cli-bundle/chunks/chunk-HFSD77TQ.js +0 -2
- package/dist/cli-bundle/chunks/chunk-HX2GTA6L.js +0 -2
- package/dist/cli-bundle/chunks/chunk-J2IEKAVR.js +0 -2
- package/dist/cli-bundle/chunks/chunk-JC6FKIFM.js +0 -2
- package/dist/cli-bundle/chunks/chunk-K44PYFXH.js +0 -2
- package/dist/cli-bundle/chunks/chunk-K4KGEEBT.js +0 -2
- package/dist/cli-bundle/chunks/chunk-KFLK5TRH.js +0 -21
- package/dist/cli-bundle/chunks/chunk-KL6IEBV2.js +0 -2
- package/dist/cli-bundle/chunks/chunk-KWQZDZSS.js +0 -2
- package/dist/cli-bundle/chunks/chunk-KZ4X3DGU.js +0 -3
- package/dist/cli-bundle/chunks/chunk-LD77HJMQ.js +0 -13
- package/dist/cli-bundle/chunks/chunk-LEPJJ6QC.js +0 -2
- package/dist/cli-bundle/chunks/chunk-ME2JJ4LA.js +0 -3
- package/dist/cli-bundle/chunks/chunk-NE5VRDAI.js +0 -2
- package/dist/cli-bundle/chunks/chunk-NFLJ3FHD.js +0 -2
- package/dist/cli-bundle/chunks/chunk-NG6OXIBR.js +0 -19
- package/dist/cli-bundle/chunks/chunk-NYIGHWQY.js +0 -8
- package/dist/cli-bundle/chunks/chunk-NZ75GNSA.js +0 -2
- package/dist/cli-bundle/chunks/chunk-PCJWJNC2.js +0 -2
- package/dist/cli-bundle/chunks/chunk-PD3225AM.js +0 -2
- package/dist/cli-bundle/chunks/chunk-PDEGKG7P.js +0 -2
- package/dist/cli-bundle/chunks/chunk-PIE5HBNA.js +0 -2
- package/dist/cli-bundle/chunks/chunk-PW2H7YJR.js +0 -56
- package/dist/cli-bundle/chunks/chunk-RSIC5OPE.js +0 -2
- package/dist/cli-bundle/chunks/chunk-TPKN3S7S.js +0 -2
- package/dist/cli-bundle/chunks/chunk-TPXAXTCO.js +0 -2
- package/dist/cli-bundle/chunks/chunk-UFWUJO4V.js +0 -2
- package/dist/cli-bundle/chunks/chunk-UQLZQVFW.js +0 -55
- package/dist/cli-bundle/chunks/chunk-VT3Z5G7D.js +0 -2
- package/dist/cli-bundle/chunks/chunk-WOD3WWUN.js +0 -2
- package/dist/cli-bundle/chunks/chunk-WSJEIGJF.js +0 -3
- package/dist/cli-bundle/chunks/chunk-WYNUU7ZW.js +0 -2008
- package/dist/cli-bundle/chunks/chunk-YGPNCCXZ.js +0 -2
- package/dist/cli-bundle/chunks/close-CMY3BAUG.js +0 -2
- package/dist/cli-bundle/chunks/close-many-SA4XZCTK.js +0 -2
- package/dist/cli-bundle/chunks/comments-EZ556ZD3.js +0 -2
- package/dist/cli-bundle/chunks/copy-ZSGPA52X.js +0 -2
- package/dist/cli-bundle/chunks/create-I5DVV4YG.js +0 -2
- package/dist/cli-bundle/chunks/delete-RL3JACSW.js +0 -2
- package/dist/cli-bundle/chunks/deps-S7UBCECS.js +0 -2
- package/dist/cli-bundle/chunks/docs-ZZNVBBYO.js +0 -2
- package/dist/cli-bundle/chunks/files-27C337VT.js +0 -2
- package/dist/cli-bundle/chunks/focus-5Z2SG7LU.js +0 -2
- package/dist/cli-bundle/chunks/history-compact-HJQK67CZ.js +0 -2
- package/dist/cli-bundle/chunks/history-redact-PWC6PDWA.js +0 -2
- package/dist/cli-bundle/chunks/history-repair-N3CY4WBF.js +0 -2
- package/dist/cli-bundle/chunks/learnings-4FH23XDT.js +0 -2
- package/dist/cli-bundle/chunks/profile-5Y5XXH5N.js +0 -2
- package/dist/cli-bundle/chunks/register-mutation-YGYPW3BL.js +0 -20
- package/dist/cli-bundle/chunks/register-operations-WMDSUMQF.js +0 -2
- package/dist/cli-bundle/chunks/register-setup-DL7FFABC.js +0 -2
- package/dist/cli-bundle/chunks/restore-6KYBV5BY.js +0 -2
- package/dist/cli-bundle/chunks/schema-EQGKBYXJ.js +0 -2
- package/dist/cli-bundle/chunks/update-QVTYOD6I.js +0 -2
- package/dist/cli-bundle/chunks/update-many-DJSBU525.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-2ECLECMK.js +0 -12
- package/dist/cli-bundle/focused-chunks/chunk-4EX25PXM.js +0 -8
- package/dist/cli-bundle/focused-chunks/chunk-DLTS3IHM.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-DQ6FKGL3.js +0 -14
- package/dist/cli-bundle/focused-chunks/chunk-JLG2C4EQ.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-ZJIMJHDB.js +0 -2
package/dist/sdk/completion.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Implements the pm completion command surface and its agent-facing runtime behavior.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="6c9648d7-ab14-5e0d-8793-86ae13643fa6")}catch(e){}}();
|
|
8
8
|
import { EXIT_CODE, PmCliError } from "./runtime-primitives.js";
|
|
9
9
|
import { listPmCommandsForTier } from "./agent-capability-contracts.js";
|
|
10
10
|
import { SCAFFOLD_CAPABILITIES } from "./extension/scaffold.js";
|
|
@@ -599,13 +599,13 @@ export function generateBashScript(itemTypes = [], tags = [], eagerTagExpansion
|
|
|
599
599
|
` COMPREPLY=(${compgen(`${LIFECYCLE_ACTIONS} ${PACKAGE_LIFECYCLE_FLAGS}`)})`,
|
|
600
600
|
" ;;",
|
|
601
601
|
" comments)",
|
|
602
|
-
` COMPREPLY=(${compgen("--add --body --stdin --file --edit --delete --limit --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`,
|
|
602
|
+
` COMPREPLY=(${compgen("--add --body --stdin --file --edit --delete --limit --full-history --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`,
|
|
603
603
|
" ;;",
|
|
604
604
|
" notes)",
|
|
605
|
-
` COMPREPLY=(${compgen("--add --add-json --stdin --file --edit --delete --limit --since --event-type --include-meta --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`,
|
|
605
|
+
` COMPREPLY=(${compgen("--add --add-json --stdin --file --edit --delete --limit --since --event-type --include-meta --full-history --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`,
|
|
606
606
|
" ;;",
|
|
607
607
|
" learnings)",
|
|
608
|
-
` COMPREPLY=(${compgen("--add --stdin --file --edit --delete --limit --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`,
|
|
608
|
+
` COMPREPLY=(${compgen("--add --stdin --file --edit --delete --limit --full-history --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`,
|
|
609
609
|
" ;;",
|
|
610
610
|
" files)",
|
|
611
611
|
` COMPREPLY=(${compgen("discover lookup --add --add-glob --remove --migrate --list --apply --note --append-stable --validate-paths --scope --limit --offset --no-truncate --strict-read --author --message --force --json --quiet --no-changed-fields --pm-path --path --no-extensions --no-pager --profile --help")})`,
|
|
@@ -1354,6 +1354,7 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
|
|
|
1354
1354
|
'--edit[Replace the comment at 1-based index (text from positional/--add/--stdin/--file)]:index' \\
|
|
1355
1355
|
'--delete[Delete the comment at 1-based index]:index' \\
|
|
1356
1356
|
'--limit[Return only latest n entries]:number' \\
|
|
1357
|
+
'--full-history[Return complete post-mutation history]' \\
|
|
1357
1358
|
'--author[Entry author (falls back to PM_AUTHOR/settings)]:author' \\
|
|
1358
1359
|
'--message[History message]:message' \\
|
|
1359
1360
|
'--force[Force override]' \\
|
|
@@ -1372,6 +1373,7 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
|
|
|
1372
1373
|
'--since[Return structured events at or after an ISO timestamp]:timestamp' \\
|
|
1373
1374
|
'--event-type[Return structured events with this top-level type]:event_type' \\
|
|
1374
1375
|
'--include-meta[Include result counts and truncation metadata]' \\
|
|
1376
|
+
'--full-history[Return complete post-mutation history]' \\
|
|
1375
1377
|
'--author[Entry author (falls back to PM_AUTHOR/settings)]:author' \\
|
|
1376
1378
|
'--message[History message]:message' \\
|
|
1377
1379
|
'--force[Force override]' \\
|
|
@@ -1386,6 +1388,7 @@ ${zshSearchRuntimeFieldFlags} '--json[Output JSON]' \\
|
|
|
1386
1388
|
'--edit[Replace the entry at a 1-based index]:index' \\
|
|
1387
1389
|
'--delete[Delete the entry at a 1-based index]:index' \\
|
|
1388
1390
|
'--limit[Return only latest n entries]:number' \\
|
|
1391
|
+
'--full-history[Return complete post-mutation history]' \\
|
|
1389
1392
|
'--author[Entry author (falls back to PM_AUTHOR/settings)]:author' \\
|
|
1390
1393
|
'--message[History message]:message' \\
|
|
1391
1394
|
'--force[Force override]' \\
|
|
@@ -2415,6 +2418,7 @@ complete -c pm -n '__fish_seen_subcommand_from notes' -l file -d 'Read entry tex
|
|
|
2415
2418
|
complete -c pm -n '__fish_seen_subcommand_from notes' -l edit -d 'Replace the entry at a 1-based index' -r
|
|
2416
2419
|
complete -c pm -n '__fish_seen_subcommand_from notes' -l delete -d 'Delete the entry at a 1-based index' -r
|
|
2417
2420
|
complete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l limit -d 'Return only latest n entries' -r
|
|
2421
|
+
complete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l full-history -d 'Return complete post-mutation history'
|
|
2418
2422
|
complete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l author -d 'Entry author' -r
|
|
2419
2423
|
complete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l message -d 'History message' -r
|
|
2420
2424
|
complete -c pm -n '__fish_seen_subcommand_from comments notes learnings' -l force -d 'Force override'
|
|
@@ -2743,4 +2747,4 @@ export function runCompletion(shell, itemTypes = [], tags = [], eagerTagExpansio
|
|
|
2743
2747
|
};
|
|
2744
2748
|
}
|
|
2745
2749
|
//# sourceMappingURL=completion.js.map
|
|
2746
|
-
//# debugId=
|
|
2750
|
+
//# debugId=6c9648d7-ab14-5e0d-8793-86ae13643fa6
|
package/dist/sdk/contracts.d.ts
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Exposes command and action contract data without loading SDK runtime code.
|
|
5
5
|
*/
|
|
6
6
|
export * from "./cli-contracts.js";
|
|
7
|
+
export * from "./cli-contracts/command-exit-contracts.js";
|
|
7
8
|
export * from "./context-intent-contracts.js";
|
|
8
9
|
export * from "./error-code-catalog.js";
|
|
9
10
|
export * from "./generated-error-code-catalog.js";
|
package/dist/sdk/contracts.js
CHANGED
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* Exposes command and action contract data without loading SDK runtime code.
|
|
5
5
|
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="65e53d90-6fff-59df-bdfc-0d2387b5a28d")}catch(e){}}();
|
|
8
8
|
export * from "./cli-contracts.js";
|
|
9
|
+
export * from "./cli-contracts/command-exit-contracts.js";
|
|
9
10
|
export * from "./context-intent-contracts.js";
|
|
10
11
|
export * from "./error-code-catalog.js";
|
|
11
12
|
export * from "./generated-error-code-catalog.js";
|
|
@@ -14,4 +15,4 @@ export * from "./output-token-accounting.js";
|
|
|
14
15
|
export * from "./output-contracts.js";
|
|
15
16
|
export * from "./read-output-contracts.js";
|
|
16
17
|
//# sourceMappingURL=contracts.js.map
|
|
17
|
-
//# debugId=
|
|
18
|
+
//# debugId=65e53d90-6fff-59df-bdfc-0d2387b5a28d
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { PmCliError } from "../../core/shared/errors.js";
|
|
2
|
+
/** Optional stable codes used by an existing SDK surface for each fault class. */
|
|
3
|
+
export interface HostEnvironmentFaultCodeOverrides {
|
|
4
|
+
/** Code used for quota and storage exhaustion. */
|
|
5
|
+
capacity?: string;
|
|
6
|
+
/** Code used for access policy and read-only filesystems. */
|
|
7
|
+
permission?: string;
|
|
8
|
+
/** Code used for file-descriptor and memory exhaustion. */
|
|
9
|
+
resource?: string;
|
|
10
|
+
}
|
|
11
|
+
/** Context and compatibility controls for a host-environment boundary. */
|
|
12
|
+
export interface HostEnvironmentBoundaryOptions {
|
|
13
|
+
/** Existing surface-specific codes that must remain compatible. */
|
|
14
|
+
codes?: HostEnvironmentFaultCodeOverrides;
|
|
15
|
+
/** Human explanation of why the operation needs host resources. */
|
|
16
|
+
why?: string;
|
|
17
|
+
/** Additional ordered recovery guidance. */
|
|
18
|
+
nextSteps?: readonly string[];
|
|
19
|
+
/** Copyable retry command when one is safe. */
|
|
20
|
+
suggestedRetry?: string;
|
|
21
|
+
}
|
|
22
|
+
/** Return a declared host errno only when it represents recoverable environment state. */
|
|
23
|
+
export declare function classifyHostEnvironmentFault(error: unknown): string | null;
|
|
24
|
+
/** Translate one known host fault into a stable path-redacted SDK refusal. */
|
|
25
|
+
export declare function translateHostEnvironmentFault(error: unknown, operation: string, options?: HostEnvironmentBoundaryOptions): PmCliError | null;
|
|
26
|
+
/** Run one SDK filesystem stage and translate only declared host faults. */
|
|
27
|
+
export declare function withHostEnvironmentBoundary<T>(operation: string, run: () => Promise<T>, options?: HostEnvironmentBoundaryOptions): Promise<T>;
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module sdk/host-environment-errors
|
|
3
|
+
*
|
|
4
|
+
* Classifies host filesystem/resource failures at SDK boundaries without
|
|
5
|
+
* leaking local paths or swallowing genuine implementation defects.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="41fec0f3-5cc8-5007-a896-f8d8b83ae4f5")}catch(e){}}();
|
|
9
|
+
import { EXIT_CODE } from "../../core/shared/constants.js";
|
|
10
|
+
import { PmCliError } from "../../core/shared/errors.js";
|
|
11
|
+
const HOST_ENVIRONMENT_FAULTS = new Map([
|
|
12
|
+
[
|
|
13
|
+
"EACCES",
|
|
14
|
+
{
|
|
15
|
+
summary: "was denied filesystem permission",
|
|
16
|
+
recovery: "Grant the required filesystem access, then retry.",
|
|
17
|
+
category: "permission",
|
|
18
|
+
},
|
|
19
|
+
],
|
|
20
|
+
[
|
|
21
|
+
"EDQUOT",
|
|
22
|
+
{
|
|
23
|
+
summary: "exceeded the filesystem quota",
|
|
24
|
+
recovery: "Raise or reclaim the filesystem quota, then retry.",
|
|
25
|
+
category: "capacity",
|
|
26
|
+
},
|
|
27
|
+
],
|
|
28
|
+
[
|
|
29
|
+
"EMFILE",
|
|
30
|
+
{
|
|
31
|
+
summary: "exhausted the process file-descriptor limit",
|
|
32
|
+
recovery: "Close unused file handles or raise the process limit, then retry.",
|
|
33
|
+
category: "resource",
|
|
34
|
+
},
|
|
35
|
+
],
|
|
36
|
+
[
|
|
37
|
+
"ENFILE",
|
|
38
|
+
{
|
|
39
|
+
summary: "exhausted the host file-descriptor limit",
|
|
40
|
+
recovery: "Free host file descriptors or raise the host limit, then retry.",
|
|
41
|
+
category: "resource",
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
[
|
|
45
|
+
"ENOMEM",
|
|
46
|
+
{
|
|
47
|
+
summary: "ran out of available memory",
|
|
48
|
+
recovery: "Free memory or reduce concurrent work, then retry.",
|
|
49
|
+
category: "resource",
|
|
50
|
+
},
|
|
51
|
+
],
|
|
52
|
+
[
|
|
53
|
+
"ENOSPC",
|
|
54
|
+
{
|
|
55
|
+
summary: "ran out of storage space",
|
|
56
|
+
recovery: "Free storage on the filesystem holding the project, then retry.",
|
|
57
|
+
category: "capacity",
|
|
58
|
+
},
|
|
59
|
+
],
|
|
60
|
+
[
|
|
61
|
+
"EPERM",
|
|
62
|
+
{
|
|
63
|
+
summary: "was denied by the host permission policy",
|
|
64
|
+
recovery: "Grant the required filesystem permission, then retry.",
|
|
65
|
+
category: "permission",
|
|
66
|
+
},
|
|
67
|
+
],
|
|
68
|
+
[
|
|
69
|
+
"EROFS",
|
|
70
|
+
{
|
|
71
|
+
summary: "targeted a read-only filesystem",
|
|
72
|
+
recovery: "Use a writable project filesystem or remount it read-write, then retry.",
|
|
73
|
+
category: "permission",
|
|
74
|
+
},
|
|
75
|
+
],
|
|
76
|
+
]);
|
|
77
|
+
const OPERATION_PATTERN = /^[a-z][a-z0-9_]{0,63}$/u;
|
|
78
|
+
const HOST_ENVIRONMENT_FAULT_CODES = {
|
|
79
|
+
capacity: { code: "host_environment_capacity_fault" },
|
|
80
|
+
permission: { code: "host_environment_permission_fault" },
|
|
81
|
+
resource: { code: "host_environment_resource_fault" },
|
|
82
|
+
};
|
|
83
|
+
/** Return a declared host errno only when it represents recoverable environment state. */
|
|
84
|
+
export function classifyHostEnvironmentFault(error) {
|
|
85
|
+
if (typeof error !== "object" || error === null || !("code" in error))
|
|
86
|
+
return null;
|
|
87
|
+
const code = error.code;
|
|
88
|
+
return typeof code === "string" && HOST_ENVIRONMENT_FAULTS.has(code)
|
|
89
|
+
? code
|
|
90
|
+
: null;
|
|
91
|
+
}
|
|
92
|
+
/** Translate one known host fault into a stable path-redacted SDK refusal. */
|
|
93
|
+
export function translateHostEnvironmentFault(error, operation, options = {}) {
|
|
94
|
+
const errno = classifyHostEnvironmentFault(error);
|
|
95
|
+
if (errno === null)
|
|
96
|
+
return null;
|
|
97
|
+
if (!OPERATION_PATTERN.test(operation)) {
|
|
98
|
+
throw new PmCliError("Host environment operation labels must be bounded identifiers.", EXIT_CODE.USAGE, { code: "host_environment_operation_invalid", field: "operation" });
|
|
99
|
+
}
|
|
100
|
+
const fault = HOST_ENVIRONMENT_FAULTS.get(errno);
|
|
101
|
+
return new PmCliError(`Host filesystem operation ${operation} ${fault.summary}.`, EXIT_CODE.GENERIC_FAILURE, {
|
|
102
|
+
code: options.codes?.[fault.category] ??
|
|
103
|
+
HOST_ENVIRONMENT_FAULT_CODES[fault.category].code,
|
|
104
|
+
reason: errno,
|
|
105
|
+
required: fault.recovery,
|
|
106
|
+
why: options.why ??
|
|
107
|
+
"The operating system refused a required project filesystem operation.",
|
|
108
|
+
nextSteps: [fault.recovery, ...(options.nextSteps ?? [])],
|
|
109
|
+
...(options.suggestedRetry
|
|
110
|
+
? { recovery: { suggested_retry: options.suggestedRetry } }
|
|
111
|
+
: {}),
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
/** Run one SDK filesystem stage and translate only declared host faults. */
|
|
115
|
+
export async function withHostEnvironmentBoundary(operation, run, options = {}) {
|
|
116
|
+
try {
|
|
117
|
+
return await run();
|
|
118
|
+
}
|
|
119
|
+
catch (error) {
|
|
120
|
+
throw translateHostEnvironmentFault(error, operation, options) ?? error;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=host-environment-errors.js.map
|
|
124
|
+
//# debugId=41fec0f3-5cc8-5007-a896-f8d8b83ae4f5
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { PmCliError } from "../../core/shared/errors.js";
|
|
2
|
+
export { PmCliError };
|
|
3
|
+
/** One discovered project pin that can prove the active executable is stale. */
|
|
4
|
+
export interface ProjectRuntimeVersionPin {
|
|
5
|
+
/** Exact or minimum date-version extracted from the project declaration. */
|
|
6
|
+
version: string;
|
|
7
|
+
/** Redaction-safe origin of the pin. */
|
|
8
|
+
source: "package.json" | "installed-package" | "package-lock.json" | "pnpm-lock.yaml" | "yarn.lock";
|
|
9
|
+
}
|
|
10
|
+
/** Structured result returned by the read-only compatibility probe. */
|
|
11
|
+
export interface ProjectRuntimeCompatibilityResult {
|
|
12
|
+
/** Whether the invocation can write with the active runtime. */
|
|
13
|
+
compatible: boolean;
|
|
14
|
+
/** Active executable package version. */
|
|
15
|
+
executing_version: string;
|
|
16
|
+
/** Highest project pin discovered without exposing local paths. */
|
|
17
|
+
project_version?: string;
|
|
18
|
+
/** Origin of the highest project pin. */
|
|
19
|
+
source?: ProjectRuntimeVersionPin["source"];
|
|
20
|
+
/** Canonical command selected from the invocation. */
|
|
21
|
+
command?: string;
|
|
22
|
+
/** Whether the selected invocation can mutate project state. */
|
|
23
|
+
mutating: boolean;
|
|
24
|
+
/** Whether the active executable is older than the strongest project pin. */
|
|
25
|
+
stale?: boolean;
|
|
26
|
+
/** Non-blocking diagnostic attached to stale read-only invocations. */
|
|
27
|
+
warning?: ProjectRuntimeCompatibilityWarning;
|
|
28
|
+
/** Whether the explicit one-invocation recovery override was accepted. */
|
|
29
|
+
override_applied: boolean;
|
|
30
|
+
}
|
|
31
|
+
/** Structured, package-manager-neutral warning returned for a stale read. */
|
|
32
|
+
export interface ProjectRuntimeCompatibilityWarning {
|
|
33
|
+
/** Stable warning code for filtering and automation. */
|
|
34
|
+
code: "project_runtime_stale_read";
|
|
35
|
+
/** Active executable package version. */
|
|
36
|
+
executing_version: string;
|
|
37
|
+
/** Strongest newer project version pin. */
|
|
38
|
+
project_version: string;
|
|
39
|
+
/** Redaction-safe origin of the project pin. */
|
|
40
|
+
source: ProjectRuntimeVersionPin["source"];
|
|
41
|
+
/** Concise explanation of the mismatch. */
|
|
42
|
+
message: string;
|
|
43
|
+
/** Package-manager-neutral recovery actions. */
|
|
44
|
+
next_steps: string[];
|
|
45
|
+
}
|
|
46
|
+
/** Compare pm date versions without accepting arbitrary semver-like prose. */
|
|
47
|
+
export declare function comparePmDateVersions(left: string, right: string): number | null;
|
|
48
|
+
/** Discover declared, installed, and lock-resolved versions without network I/O. */
|
|
49
|
+
export declare function discoverProjectRuntimeVersionPins(projectRoot: string): ProjectRuntimeVersionPin[];
|
|
50
|
+
/** Classify mutation-capable invocations while preserving explicit read modes. */
|
|
51
|
+
export declare function isProjectMutatingInvocation(argv: readonly string[]): boolean;
|
|
52
|
+
/** Inspect whether one invocation is compatible with the project's newest pin. */
|
|
53
|
+
export declare function inspectProjectRuntimeCompatibility(options: {
|
|
54
|
+
executingVersion: string;
|
|
55
|
+
projectRoot: string;
|
|
56
|
+
argv: readonly string[];
|
|
57
|
+
allowStale?: boolean;
|
|
58
|
+
}): ProjectRuntimeCompatibilityResult;
|
|
59
|
+
/** Refuse stale mutations with a stable SDK error and package-neutral recovery. */
|
|
60
|
+
export declare function assertProjectRuntimeCompatibility(options: {
|
|
61
|
+
executingVersion: string;
|
|
62
|
+
projectRoot: string;
|
|
63
|
+
argv: readonly string[];
|
|
64
|
+
allowStale?: boolean;
|
|
65
|
+
}): ProjectRuntimeCompatibilityResult;
|