@unbrained/pm-cli 2026.5.11 → 2026.5.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +3 -116
- package/CHANGELOG.md +7 -0
- package/PRD.md +11 -11
- package/README.md +11 -1
- package/dist/cli/commands/contracts.js +8 -2
- package/dist/cli/commands/contracts.js.map +1 -1
- package/dist/cli/commands/extension.d.ts +9 -2
- package/dist/cli/commands/extension.js +247 -67
- package/dist/cli/commands/extension.js.map +1 -1
- package/dist/cli/commands/index.d.ts +1 -0
- package/dist/cli/commands/index.js +1 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/test.js +14 -6
- package/dist/cli/commands/test.js.map +1 -1
- package/dist/cli/commands/upgrade.d.ts +63 -0
- package/dist/cli/commands/upgrade.js +260 -0
- package/dist/cli/commands/upgrade.js.map +1 -0
- package/dist/cli/guide-topics.js +18 -16
- package/dist/cli/guide-topics.js.map +1 -1
- package/dist/cli/help-content.js +42 -2
- package/dist/cli/help-content.js.map +1 -1
- package/dist/cli/register-setup.js +168 -90
- package/dist/cli/register-setup.js.map +1 -1
- package/dist/core/packages/manifest.d.ts +13 -0
- package/dist/core/packages/manifest.js +139 -0
- package/dist/core/packages/manifest.js.map +1 -0
- package/dist/mcp/server.js +9 -2
- package/dist/mcp/server.js.map +1 -1
- package/dist/sdk/cli-contracts.d.ts +18 -17
- package/dist/sdk/cli-contracts.js +137 -35
- package/dist/sdk/cli-contracts.js.map +1 -1
- package/dist/sdk/index.d.ts +1 -0
- package/dist/sdk/index.js +1 -0
- package/dist/sdk/index.js.map +1 -1
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/COMMANDS.md +14 -1
- package/docs/EXTENSIONS.md +112 -29
- package/docs/QUICKSTART.md +10 -2
- package/docs/README.md +4 -6
- package/docs/SDK.md +16 -12
- package/package.json +5 -23
- package/packages/pm-beads/README.md +10 -0
- package/{.agents/pm → packages/pm-beads}/extensions/beads/index.js +24 -9
- package/packages/pm-beads/extensions/beads/index.ts +131 -0
- package/packages/pm-beads/package.json +17 -0
- package/packages/pm-todos/README.md +11 -0
- package/{.agents/pm → packages/pm-todos}/extensions/todos/index.js +24 -9
- package/packages/pm-todos/extensions/todos/index.ts +149 -0
- package/{.agents/pm → packages/pm-todos}/extensions/todos/runtime.js +1 -1
- package/{.agents/pm → packages/pm-todos}/extensions/todos/runtime.ts +1 -1
- package/packages/pm-todos/package.json +17 -0
- package/plugins/pm-cli-claude/README.md +1 -2
- package/plugins/pm-cli-claude/hooks/session-start.mjs +4 -55
- package/.agents/pm/extensions/.managed-extensions.json +0 -42
- package/.agents/skills/HARNESS_COMPATIBILITY.md +0 -45
- package/.agents/skills/README.md +0 -21
- package/.agents/skills/pm-developer/SKILL.md +0 -73
- package/.agents/skills/pm-developer/references/COMMAND_PLAYBOOK.md +0 -48
- package/.agents/skills/pm-developer/references/PROMPTS.md +0 -17
- package/.agents/skills/pm-extensions/SKILL.md +0 -57
- package/.agents/skills/pm-extensions/references/LIFECYCLE.md +0 -40
- package/.agents/skills/pm-extensions/references/TROUBLESHOOTING.md +0 -25
- package/.agents/skills/pm-sdk/SKILL.md +0 -50
- package/.agents/skills/pm-sdk/references/INTEGRATION_CHECKLIST.md +0 -31
- package/.agents/skills/pm-sdk/references/PROMPTS.md +0 -13
- package/.agents/skills/pm-user/SKILL.md +0 -59
- package/.agents/skills/pm-user/references/PROMPTS.md +0 -17
- package/.agents/skills/pm-user/references/WORKFLOWS.md +0 -35
- package/.pi/README.md +0 -35
- package/.pi/agents/pm-triage-agent.md +0 -19
- package/.pi/agents/pm-verification-agent.md +0 -21
- package/.pi/chains/pm-native-delivery.chain.md +0 -11
- package/.pi/extensions/pm-cli/index.js +0 -387
- package/.pi/prompts/pm-workflow.md +0 -5
- package/.pi/skills/pm-native/SKILL.md +0 -44
- package/.pi/skills/pm-release/SKILL.md +0 -35
- package/dist/pi/native.d.ts +0 -5
- package/dist/pi/native.js +0 -236
- package/dist/pi/native.js.map +0 -1
- package/docs/PI_PACKAGE.md +0 -141
- /package/{.agents/pm → packages/pm-beads}/extensions/beads/manifest.json +0 -0
- /package/{.agents/pm → packages/pm-beads}/extensions/beads/runtime.js +0 -0
- /package/{.agents/pm → packages/pm-beads}/extensions/beads/runtime.ts +0 -0
- /package/{.agents/pm → packages/pm-todos}/extensions/todos/manifest.json +0 -0
package/AGENTS.md
CHANGED
|
@@ -321,120 +321,7 @@ Recover previous state:
|
|
|
321
321
|
pm restore pm-a1b2 2026-02-17T11:15:03.120Z
|
|
322
322
|
```
|
|
323
323
|
|
|
324
|
-
## 9)
|
|
325
|
-
|
|
326
|
-
The built-in Pi wrapper exposes one tool: `pm`.
|
|
327
|
-
Reference implementation source lives at `.pi/extensions/pm-cli/index.ts` as a Pi agent extension module.
|
|
328
|
-
`pm install` has been removed; install bundled managed runtime extensions via `pm extension --install beads|todos` (or explicit `.agents/pm/extensions/<name>` paths) when needed.
|
|
329
|
-
Load the Pi wrapper in Pi with `pi -e ./.pi/extensions/pm-cli/index.ts` (or copy it into your Pi extensions directory).
|
|
330
|
-
Use `action: "completion"` with `shell: "bash"|"zsh"|"fish"` to forward to `pm completion <shell>`.
|
|
331
|
-
Use `action: "calendar"` for date-centric event views (`view`, `date`, `from`, `to`, `past`, `fullPeriod`, `type`, `tag`, `priority`, `status`, `assignee`, `sprint`, `release`, `limit`, `format`).
|
|
332
|
-
Use `action: "aggregate"` for grouped decomposition checks (`groupBy`, `count`, `includeUnparented`, list-style filters).
|
|
333
|
-
Use `action: "dedupe-audit"` for duplicate corpus checks (`mode`, `threshold`, `limit`, list-style filters).
|
|
334
|
-
Use `action: "normalize"` for lifecycle metadata hygiene scans (`dryRun`) and explicit apply mode (`apply`) with list-style filter targeting.
|
|
335
|
-
Use `action: "validate"` with optional check toggles (`checkMetadata`, `checkResolution`, `checkFiles`, `checkHistoryDrift`) and optional `scanMode` (`default|tracked-all`) for standalone audit workflows.
|
|
336
|
-
Use `action: "extension-doctor"` for consolidated extension diagnostics with optional `scope` and `detail` (`summary|deep`).
|
|
337
|
-
For `list*` wrapper actions, use projection/sort controls (`compact`, `fields`, `sort`, `order`) plus `includeBody` when body projection is needed.
|
|
338
|
-
For `comments-audit`, use governance filters (`parent`, `tag`, `sprint`, `release`, `priority`) in addition to status/type/assignee filters.
|
|
339
|
-
For `health`, use vector refresh controls (`checkOnly`, `noRefresh`, `refreshVectors`) while keeping strict flags available (`strictDirectories`, `strictExit`, `failOnWarn`).
|
|
340
|
-
For `create` and `update`, use camelCase wrapper parameters for the canonical CLI scalar fields such as `parent`, `reviewer`, `risk`, `confidence`, `sprint`, `release`, `blockedBy`, `blockedReason`, `unblockNote`, `definitionOfReady`, `order`, `goal`, `objective`, `value`, `impact`, `outcome`, `whyNow`, `reporter`, `severity`, `environment`, `reproSteps`, `resolution`, `expectedResult`, `actualResult`, `affectedVersion`, `fixedVersion`, `component`, `regression`, and `customerImpact`; use `createMode` (`strict|progressive`) when staged creation is needed, `appendStable` for minimal-diff file-link appends, `allowAuditUpdate` for ownership-safe metadata-only non-owner updates, `allowAuditDepUpdate` for ownership-safe dependency-only non-owner updates, `allowAuditComment` for additive non-owner comment writes, repeatable `reminder` values for persistent reminders (`at=<iso|relative>,text=<text>`), and repeatable `typeOption` values for custom type metadata.
|
|
341
|
-
For `contracts`, use projection controls (`flagsOnly`, `availabilityOnly`) when you need narrow machine-readable payloads; with `command` selected, contract output is command-scoped by default.
|
|
342
|
-
For `completion`, use `eagerTags` only when embedding static tags in generated scripts is required; default generated scripts resolve tags lazily at runtime.
|
|
343
|
-
For `activity`, use `id`, `op`, `author`, `from`, `to`, `limit`, and `stream` (`rows|ndjson|jsonl` or boolean true) for deterministic timeline filtering/export.
|
|
344
|
-
For `test` and `test-all`, prefer explicit runtime parity/strictness parameters when needed: `pmContext` (`schema|tracker|auto`), `checkContext`, `autoPmContext`, `failOnContextMismatch`, `failOnSkipped`, and `requireAssertionsForPm`.
|
|
345
|
-
For `gc`, use `dryRun` and repeatable `gcScope` (`index`, `embeddings`, `runtime`) for no-side-effect previews and targeted cleanup.
|
|
346
|
-
|
|
347
|
-
### Example: list open tasks
|
|
348
|
-
|
|
349
|
-
```json
|
|
350
|
-
{
|
|
351
|
-
"action": "list-open",
|
|
352
|
-
"limit": 10
|
|
353
|
-
}
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
### Example: create item
|
|
357
|
-
|
|
358
|
-
```json
|
|
359
|
-
{
|
|
360
|
-
"action": "create",
|
|
361
|
-
"title": "Implement extension loader",
|
|
362
|
-
"description": "Load global and project extensions with precedence.",
|
|
363
|
-
"type": "Feature",
|
|
364
|
-
"status": "open",
|
|
365
|
-
"priority": 1,
|
|
366
|
-
"tags": "extensions,core",
|
|
367
|
-
"body": "",
|
|
368
|
-
"deadline": "+14d",
|
|
369
|
-
"estimate": 120,
|
|
370
|
-
"acceptanceCriteria": "Loader applies deterministic precedence for core global and project extensions.",
|
|
371
|
-
"author": "maintainer-agent",
|
|
372
|
-
"message": "Create extension loader task",
|
|
373
|
-
"assignee": "maintainer-agent",
|
|
374
|
-
"parent": "pm-epic01",
|
|
375
|
-
"reviewer": "maintainer-reviewer",
|
|
376
|
-
"risk": "medium",
|
|
377
|
-
"confidence": "high",
|
|
378
|
-
"sprint": "maintainer-loop",
|
|
379
|
-
"release": "v0.1",
|
|
380
|
-
"blockedBy": "pm-arch-review",
|
|
381
|
-
"blockedReason": "Awaiting architecture sign-off",
|
|
382
|
-
"unblockNote": "Resume implementation once review notes are resolved",
|
|
383
|
-
"reporter": "maintainer-agent",
|
|
384
|
-
"severity": "medium",
|
|
385
|
-
"environment": "cli",
|
|
386
|
-
"reproSteps": "Create conflicting extension registrations across project/global scopes",
|
|
387
|
-
"resolution": "Apply deterministic precedence in extension loader bootstrap",
|
|
388
|
-
"expectedResult": "Loader applies project-over-global precedence deterministically",
|
|
389
|
-
"actualResult": "Registration order currently varies by load path",
|
|
390
|
-
"affectedVersion": "v0.1",
|
|
391
|
-
"fixedVersion": "v0.2",
|
|
392
|
-
"component": "extension-host",
|
|
393
|
-
"regression": "false",
|
|
394
|
-
"customerImpact": "Unpredictable extension behavior increases operator overhead",
|
|
395
|
-
"definitionOfReady": "Extension loading behavior is clarified in docs.",
|
|
396
|
-
"order": 1,
|
|
397
|
-
"goal": "Release-hardening",
|
|
398
|
-
"objective": "Ship deterministic extension loading",
|
|
399
|
-
"value": "Makes extension behavior predictable for agents and humans",
|
|
400
|
-
"impact": "Reduces configuration and precedence drift",
|
|
401
|
-
"outcome": "Extension loader applies deterministic precedence",
|
|
402
|
-
"whyNow": "Extension loading is foundational for the remaining roadmap",
|
|
403
|
-
"dep": ["id=pm-epic01,kind=parent,author=maintainer-agent,created_at=now"],
|
|
404
|
-
"comment": ["author=maintainer-agent,created_at=now,text=Why this task exists align extension load precedence behavior."],
|
|
405
|
-
"note": ["author=maintainer-agent,created_at=now,text=Initial implementation plan wire loader in runtime bootstrap."],
|
|
406
|
-
"learning": [],
|
|
407
|
-
"linkedFile": ["path=src/core/extensions/loader.ts,scope=project,note=planned implementation file"],
|
|
408
|
-
"linkedTest": ["command=node scripts/run-tests.mjs test,scope=project,timeout_seconds=240,note=sandbox-safe regression"],
|
|
409
|
-
"doc": ["path=docs/ARCHITECTURE.md,scope=project,note=implementation reference"]
|
|
410
|
-
}
|
|
411
|
-
```
|
|
412
|
-
|
|
413
|
-
### Example: append body update
|
|
414
|
-
|
|
415
|
-
```json
|
|
416
|
-
{
|
|
417
|
-
"action": "append",
|
|
418
|
-
"id": "pm-a1b2",
|
|
419
|
-
"body": "Implemented lock TTL and stale lock override."
|
|
420
|
-
}
|
|
421
|
-
```
|
|
422
|
-
|
|
423
|
-
Expected wrapper return shape:
|
|
424
|
-
|
|
425
|
-
```json
|
|
426
|
-
{
|
|
427
|
-
"content": [
|
|
428
|
-
{ "type": "text", "text": "..." }
|
|
429
|
-
],
|
|
430
|
-
"details": {
|
|
431
|
-
"action": "create",
|
|
432
|
-
"item": {}
|
|
433
|
-
}
|
|
434
|
-
}
|
|
435
|
-
```
|
|
436
|
-
|
|
437
|
-
## 10) Multi-Agent Etiquette
|
|
324
|
+
## 9) Multi-Agent Etiquette
|
|
438
325
|
|
|
439
326
|
- Claim before heavy edits.
|
|
440
327
|
- Release when blocked or context-switching.
|
|
@@ -442,7 +329,7 @@ Expected wrapper return shape:
|
|
|
442
329
|
- Avoid silent force-claim unless policy allows and conflict is stale.
|
|
443
330
|
- Keep item descriptions stable; append details in body/notes/comments.
|
|
444
331
|
|
|
445
|
-
##
|
|
332
|
+
## 10) Troubleshooting for Agents
|
|
446
333
|
|
|
447
334
|
Lock conflict:
|
|
448
335
|
|
|
@@ -467,7 +354,7 @@ Extension issues:
|
|
|
467
354
|
- when debugging runtime behavior changes, inspect parser/preflight/service override collisions in health/profile diagnostics (last registration wins)
|
|
468
355
|
- use SDK contracts from `@unbrained/pm-cli/sdk` (not internal `src/core/...` imports) for extension authoring and examples
|
|
469
356
|
|
|
470
|
-
##
|
|
357
|
+
## 11) Dogfood Logging Protocol (Required)
|
|
471
358
|
|
|
472
359
|
From now on in this repository, all implementation work must be tracked through `pm` items and `pm` mutations.
|
|
473
360
|
|
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [2026.5.12] - 2026-05-12
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- Added `pm install '*'` / `pm install all` to install all bundled first-party pm packages, including shell-expanded `pm install *`, and added typechecking for TypeScript-authored package sources.
|
|
14
|
+
- Added `pm upgrade` for package-first maintenance, including dry-run planning, CLI/SDK npm self-upgrade, managed package refresh from recorded sources, SDK/MCP action contracts, and docs/help coverage.
|
|
15
|
+
- Moved the Beads and Todo import/export bridges out of active project extension state so they are sourced from the first-party `packages/pm-beads` and `packages/pm-todos` package roots and installed on demand.
|
|
16
|
+
|
|
10
17
|
## [2026.5.11] - 2026-05-11
|
|
11
18
|
|
|
12
19
|
### Added
|
package/PRD.md
CHANGED
|
@@ -43,9 +43,9 @@ Existing trackers either rely on hosted backends, store state in non-diff-friend
|
|
|
43
43
|
- Provide safe mutation under concurrent access (claim/release + lock + atomic writes).
|
|
44
44
|
- Default stdout to TOON; support `--json` parity for every command.
|
|
45
45
|
- Provide extension architecture for commands, schema, rendering, import/export, search adapters, and hooks.
|
|
46
|
-
- Ship
|
|
47
|
-
- Beads import (`beads
|
|
48
|
-
- todos.ts import/export (`todos
|
|
46
|
+
- Ship first-party installable package sources:
|
|
47
|
+
- Beads import (`packages/pm-beads`, installed via `pm install`)
|
|
48
|
+
- todos.ts import/export (`packages/pm-todos`, installed via `pm install`)
|
|
49
49
|
- Pi agent extension wrapper source module
|
|
50
50
|
- Provide optional semantic search with provider + vector-store adapters.
|
|
51
51
|
|
|
@@ -1327,7 +1327,7 @@ export interface ExtensionApi {
|
|
|
1327
1327
|
- Mandatory migration resolution is deterministic: `status` equal to `"applied"` (case-insensitive) is treated as resolved; any other/missing status is unresolved.
|
|
1328
1328
|
- Force-capable write commands may bypass the guard with explicit `--force`; write commands without `--force` remain blocked until blockers resolve.
|
|
1329
1329
|
|
|
1330
|
-
## 15)
|
|
1330
|
+
## 15) First-Party Installable Packages Required in v1
|
|
1331
1331
|
|
|
1332
1332
|
### A) Beads import
|
|
1333
1333
|
|
|
@@ -1337,8 +1337,8 @@ Command:
|
|
|
1337
1337
|
|
|
1338
1338
|
Current baseline status (release-hardening):
|
|
1339
1339
|
|
|
1340
|
-
- Command is packaged in
|
|
1341
|
-
- Command path is available only after
|
|
1340
|
+
- Command is packaged in the first-party package root (`packages/pm-beads`) using `activate(api)` and `api.registerCommand({ name, run })` for `beads import`.
|
|
1341
|
+
- Command path is available only after package install/activation in selected scope (`pm install packages/pm-beads`, package aliases, or explicit package source install).
|
|
1342
1342
|
|
|
1343
1343
|
Behavior:
|
|
1344
1344
|
|
|
@@ -1359,8 +1359,8 @@ Commands:
|
|
|
1359
1359
|
|
|
1360
1360
|
Current baseline status (release-hardening):
|
|
1361
1361
|
|
|
1362
|
-
- Commands are packaged in
|
|
1363
|
-
- Command paths are available only after
|
|
1362
|
+
- Commands are packaged in the first-party package root (`packages/pm-todos`) using `activate(api)` and `api.registerCommand({ name, run })` for `todos import` and `todos export`.
|
|
1363
|
+
- Command paths are available only after package install/activation in selected scope (`pm install packages/pm-todos`, package aliases, or explicit package source install).
|
|
1364
1364
|
|
|
1365
1365
|
Behavior:
|
|
1366
1366
|
|
|
@@ -1711,10 +1711,10 @@ Definition of Done:
|
|
|
1711
1711
|
Checklist:
|
|
1712
1712
|
|
|
1713
1713
|
- [x] extension manifest loader + sandboxed execution boundary (deterministic manifest discovery, precedence, failure-isolated runtime loading, realpath/symlink-resolved entry containment enforcement, command-handler context snapshot isolation for `args`/`options`/`global`, per-hook context snapshot isolation, and dynamic extension command loose-option parsing hardening (null-prototype option maps + prototype-pollution key rejection) are implemented; broader command sandbox API surface is post-v0.1 roadmap)
|
|
1714
|
-
- [x] hook lifecycle (extension `activate(api)` baseline with deterministic hook registration is implemented; registration now validates hook handlers as functions at activation time, per-hook context snapshot isolation prevents mutation leakage across hook callbacks and caller state, and `beforeCommand`/`afterCommand` command-lifecycle execution plus baseline read/write/index call-site wiring for core item-store reads/writes, create/restore item and history writes, settings read/write operations, history/activity history-directory scans and history-stream reads, health history-directory scans plus history-stream path dispatch, search item/linked reads, reindex flows, stats/health/gc command file-system paths (including `pm gc` onIndex dispatch with mode `gc` and deterministic cache-target totals), lock file read/write/unlink operations, init directory bootstrap ensure-write dispatch, and
|
|
1714
|
+
- [x] hook lifecycle (extension `activate(api)` baseline with deterministic hook registration is implemented; registration now validates hook handlers as functions at activation time, per-hook context snapshot isolation prevents mutation leakage across hook callbacks and caller state, and `beforeCommand`/`afterCommand` command-lifecycle execution plus baseline read/write/index call-site wiring for core item-store reads/writes, create/restore item and history writes, settings read/write operations, history/activity history-directory scans and history-stream reads, health history-directory scans plus history-stream path dispatch, search item/linked reads, reindex flows, stats/health/gc command file-system paths (including `pm gc` onIndex dispatch with mode `gc` and deterministic cache-target totals), lock file read/write/unlink operations, init directory bootstrap ensure-write dispatch, and first-party Beads/Todos package source/item/history file operations are implemented)
|
|
1715
1715
|
- [x] renderer and command extension points (deterministic core-command override + renderer override registration/dispatch is implemented with failure containment, extension command handlers for declared command paths including dynamically surfaced non-core paths are implemented, dynamic command help now surfaces `registerFlags` metadata deterministically, deep snapshot isolation for override/renderer result contexts is implemented, and override/renderer execution now includes cloned command `args`/`options`/`global` snapshots plus `pm_root` metadata for contextual deterministic extension output behavior)
|
|
1716
|
-
- [x]
|
|
1717
|
-
- [x]
|
|
1716
|
+
- [x] first-party Beads import package (`packages/pm-beads`) with install-only command surfacing through `pm install`, Beads JSONL field mapping, deterministic defaults, `op: "import"` history entries, and parity polish implemented)
|
|
1717
|
+
- [x] first-party Todos import/export package (`packages/pm-todos`) with install-only command surfacing through `pm install`, todos markdown round-trip, canonical optional metadata preservation including planning/workflow and issue fields, hierarchical ID preservation, and `med` alias normalization implemented)
|
|
1718
1718
|
- [x] Pi tool wrapper extension source module (Pi agent extension module at `.pi/extensions/pm-cli/index.ts` with full v0.1 action dispatch parity, including `completion` + `shell` mapping, camelCase parameter surface for all canonical scalar metadata, explicit empty-string passthrough, numeric-flag stringification, claim/release parity, packaged CLI fallback, and distribution packaging polish implemented)
|
|
1719
1719
|
|
|
1720
1720
|
Definition of Done:
|
package/README.md
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
| Command families and examples | [Command Reference](docs/COMMANDS.md) |
|
|
17
17
|
| Settings, storage, search, and output | [Configuration](docs/CONFIGURATION.md) |
|
|
18
18
|
| Safe test execution and linked tests | [Testing](docs/TESTING.md) |
|
|
19
|
-
|
|
|
19
|
+
| Package and extension authoring | [Packages and Extensions](docs/EXTENSIONS.md) and [SDK](docs/SDK.md) |
|
|
20
20
|
| Pi native package | [Pi Package](docs/PI_PACKAGE.md) |
|
|
21
21
|
| Codex native integration | [Codex Plugin](docs/CODEX_PLUGIN.md) |
|
|
22
22
|
| Maintainer release process (daily auto-release + local parity) | [Releasing](docs/RELEASING.md) |
|
|
@@ -67,6 +67,16 @@ pi install npm:@unbrained/pm-cli
|
|
|
67
67
|
|
|
68
68
|
This registers a native `pm` tool, custom TUI panels/renderers (`/pm-board`, `/pm-item`, `/pm-history`), Pi skills, prompt templates, and optional pi-subagents setup without requiring Pi to run the `pm` shell command.
|
|
69
69
|
|
|
70
|
+
`pm` packages use the same package-first vocabulary:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
pm install ./my-package
|
|
74
|
+
pm package manage --project
|
|
75
|
+
pm package doctor --detail summary
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The legacy `pm extension ...` command remains available for existing automation.
|
|
79
|
+
|
|
70
80
|
## 60 Second Example
|
|
71
81
|
|
|
72
82
|
```bash
|
|
@@ -6,7 +6,7 @@ import { commandOptionFlagLabel, resolveCommandOptionPolicyState, resolveItemTyp
|
|
|
6
6
|
import { resolveRuntimeFieldRegistry, resolveRuntimeStatusRegistry, } from "../../core/schema/runtime-schema.js";
|
|
7
7
|
import { getSettingsPath, resolvePmRoot } from "../../core/store/paths.js";
|
|
8
8
|
import { readSettings } from "../../core/store/settings.js";
|
|
9
|
-
import { ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, COMMENTS_AUDIT_FLAG_CONTRACTS, CLOSE_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_FLAG_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, CREATE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, DEDUPE_AUDIT_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, NORMALIZE_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, PM_EXTENSION_CAPABILITY_CONTRACTS, PM_EXTENSION_POLICY_MODE_CONTRACTS, PM_EXTENSION_POLICY_SURFACE_CONTRACTS, PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS, PM_EXTENSION_SERVICE_NAME_CONTRACTS, PM_EXTENSION_TRUST_MODE_CONTRACTS, PM_CORE_COMMAND_NAMES, PM_TOOL_ACTIONS, PM_TOOL_PARAMETERS_SCHEMA, REINDEX_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, SEARCH_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, withFlagAliasMetadata, } from "../../sdk/cli-contracts.js";
|
|
9
|
+
import { ACTIVITY_COMMANDER_STRING_OPTION_CONTRACTS, ACTIVITY_FLAG_CONTRACTS, AGGREGATE_FLAG_CONTRACTS, APPEND_FLAG_CONTRACTS, CALENDAR_COMMANDER_STRING_OPTION_CONTRACTS, CALENDAR_FLAG_CONTRACTS, CLAIM_FLAG_CONTRACTS, CLOSE_TASK_FLAG_CONTRACTS, COMMENTS_FLAG_CONTRACTS, COMMENTS_AUDIT_FLAG_CONTRACTS, CLOSE_FLAG_CONTRACTS, COMPLETION_FLAG_CONTRACTS, CONFIG_FLAG_CONTRACTS, CONTRACTS_FLAG_CONTRACTS, CONTEXT_COMMANDER_STRING_OPTION_CONTRACTS, CONTEXT_FLAG_CONTRACTS, CREATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, CREATE_COMMANDER_STRING_OPTION_CONTRACTS, CREATE_FLAG_CONTRACTS, DELETE_FLAG_CONTRACTS, DEPS_FLAG_CONTRACTS, DEDUPE_AUDIT_FLAG_CONTRACTS, DOCS_FLAG_CONTRACTS, EXTENSION_FLAG_CONTRACTS, FILES_FLAG_CONTRACTS, GC_FLAG_CONTRACTS, GUIDE_FLAG_CONTRACTS, GLOBAL_FLAG_CONTRACTS, HEALTH_FLAG_CONTRACTS, HISTORY_FLAG_CONTRACTS, LEARNINGS_FLAG_CONTRACTS, LIST_COMMANDER_STRING_OPTION_CONTRACTS, LIST_FILTER_FLAG_CONTRACTS, NORMALIZE_FLAG_CONTRACTS, NOTES_FLAG_CONTRACTS, PM_EXTENSION_CAPABILITY_CONTRACTS, PM_EXTENSION_POLICY_MODE_CONTRACTS, PM_EXTENSION_POLICY_SURFACE_CONTRACTS, PM_EXTENSION_SANDBOX_PROFILE_CONTRACTS, PM_EXTENSION_SERVICE_NAME_CONTRACTS, PM_EXTENSION_TRUST_MODE_CONTRACTS, PM_CORE_COMMAND_NAMES, PM_TOOL_ACTIONS, PM_TOOL_PARAMETERS_SCHEMA, REINDEX_FLAG_CONTRACTS, RELEASE_FLAG_CONTRACTS, RESTORE_FLAG_CONTRACTS, SEARCH_COMMANDER_STRING_OPTION_CONTRACTS, SEARCH_FLAG_CONTRACTS, START_TASK_FLAG_CONTRACTS, PAUSE_TASK_FLAG_CONTRACTS, TEST_ALL_FLAG_CONTRACTS, TEST_FLAG_CONTRACTS, TEST_RUNS_FLAG_CONTRACTS, UPDATE_COMMANDER_REPEATABLE_OPTION_CONTRACTS, UPDATE_COMMANDER_STRING_OPTION_CONTRACTS, UPDATE_FLAG_CONTRACTS, UPDATE_MANY_FLAG_CONTRACTS, UPGRADE_FLAG_CONTRACTS, VALIDATE_FLAG_CONTRACTS, withFlagAliasMetadata, } from "../../sdk/cli-contracts.js";
|
|
10
10
|
const LIST_COMMAND_NAMES = new Set([
|
|
11
11
|
"list",
|
|
12
12
|
"list-all",
|
|
@@ -33,6 +33,9 @@ function resolveActionCommandPath(action) {
|
|
|
33
33
|
if (action.startsWith("extension-")) {
|
|
34
34
|
return normalizeCommandPath(`extension ${action.slice("extension-".length)}`);
|
|
35
35
|
}
|
|
36
|
+
if (action.startsWith("package-")) {
|
|
37
|
+
return normalizeCommandPath(`package ${action.slice("package-".length)}`);
|
|
38
|
+
}
|
|
36
39
|
if (action.startsWith("test-runs-")) {
|
|
37
40
|
return normalizeCommandPath(`test-runs ${action.slice("test-runs-".length)}`);
|
|
38
41
|
}
|
|
@@ -478,7 +481,7 @@ function resolveCoreCommandFlags(command) {
|
|
|
478
481
|
if (command === "config") {
|
|
479
482
|
return CONFIG_FLAG_CONTRACTS;
|
|
480
483
|
}
|
|
481
|
-
if (command === "extension") {
|
|
484
|
+
if (command === "extension" || command === "package" || command === "packages" || command === "install") {
|
|
482
485
|
return EXTENSION_FLAG_CONTRACTS;
|
|
483
486
|
}
|
|
484
487
|
if (command === "create") {
|
|
@@ -490,6 +493,9 @@ function resolveCoreCommandFlags(command) {
|
|
|
490
493
|
if (command === "update-many") {
|
|
491
494
|
return UPDATE_MANY_FLAG_CONTRACTS;
|
|
492
495
|
}
|
|
496
|
+
if (command === "upgrade") {
|
|
497
|
+
return UPGRADE_FLAG_CONTRACTS;
|
|
498
|
+
}
|
|
493
499
|
if (command === "normalize") {
|
|
494
500
|
return NORMALIZE_FLAG_CONTRACTS;
|
|
495
501
|
}
|