@unbrained/pm-cli 2026.9.17 → 2026.9.19
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 +49 -0
- package/dist/cli/invocation-profile.d.ts +26 -0
- package/dist/cli/invocation-profile.js +3 -0
- package/dist/cli/register-operations.js +1 -1
- package/dist/cli-bundle/bundle-manifest.json +149 -149
- package/dist/cli-bundle/chunks/{chunk-LD2FH2YE.js → chunk-7CN53F4S.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-AACGU5IA.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-Q6KPZGMP.js → chunk-CCLWCESZ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-T526C5DX.js → chunk-J7NP7QLW.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-UF75LUAK.js → chunk-K4VAU4HU.js} +63 -63
- package/dist/cli-bundle/chunks/chunk-KHN4NMKT.js +238 -0
- package/dist/cli-bundle/chunks/{chunk-YZXB4XGA.js → chunk-KYG2QKNY.js} +29 -29
- package/dist/cli-bundle/chunks/{chunk-CPFBDM53.js → chunk-OQS2Y6VN.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-G2IJF244.js → chunk-QA4GUEKJ.js} +20 -20
- package/dist/cli-bundle/chunks/chunk-QTHR3LXF.js +20 -0
- package/dist/cli-bundle/chunks/{chunk-5ZY4WE3F.js → chunk-RVMDPIGD.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-WASMH647.js +8 -0
- package/dist/cli-bundle/chunks/{register-list-query-ISM35VIX.js → register-list-query-RMZNHSII.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-KHMBJJS6.js → register-mutation-HJGSGX3H.js} +2 -2
- package/dist/cli-bundle/chunks/register-operations-LBEMFUMM.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-YAURJMY5.js → register-setup-MU557JAA.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-G4TKJZ4A.js → chunk-5SZ4JSPZ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-NOK652OP.js → chunk-7Y7PAC56.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-5KYHDFDN.js → chunk-ARK4FIO4.js} +3 -3
- package/dist/cli-bundle/focused-chunks/{chunk-LNM3BS45.js → chunk-CJ4QA4RW.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-I32L3FWW.js +12 -0
- package/dist/cli-bundle/focused-chunks/{chunk-267N774W.js → chunk-I4WDON3K.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-7ZC4CKOX.js → chunk-IKPR4VVN.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-J3GN4SQT.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-GKSAMNBG.js → chunk-OOZHQFBF.js} +16 -16
- package/dist/cli-bundle/focused-chunks/{chunk-JZSLDLR4.js → chunk-P4BA7OX7.js} +27 -26
- package/dist/cli-bundle/focused-chunks/chunk-QL4MO5M2.js +30 -0
- package/dist/cli-bundle/focused-chunks/chunk-TDHVROGL.js +3 -0
- package/dist/cli-bundle/focused-chunks/chunk-V3YMNAO7.js +2 -0
- package/dist/cli-bundle/focused-chunks/chunk-YDFEWXXZ.js +59 -0
- package/dist/cli-bundle/focused-chunks/{chunk-WUMGGQYN.js → chunk-ZDBKYZFE.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-BFUXTNZU.js → chunk-ZI2YBJFH.js} +2 -2
- package/dist/cli-bundle/main.js +2 -2
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +2 -2
- package/dist/cli-bundle/sdk-core.js +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 +41 -41
- 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 +8 -8
- package/dist/cli.js +1 -1
- package/dist/core/checkpoint/mutation-checkpoint.d.ts +1 -1
- package/dist/core/checkpoint/mutation-checkpoint.js +2 -2
- package/dist/core/config/nested-settings.js +1 -1
- package/dist/core/fs/atomic-create.d.ts +7 -0
- package/dist/core/fs/atomic-create.js +2 -0
- package/dist/core/history/history.js +1 -1
- package/dist/core/schema/runtime-schema.d.ts +1 -1
- package/dist/core/schema/runtime-schema.js +2 -2
- package/dist/core/session/session-state.js +1 -1
- package/dist/core/shared/secret-rules.d.ts +110 -0
- package/dist/core/shared/secret-rules.js +2 -0
- package/dist/core/store/settings-concurrency.d.ts +7 -0
- package/dist/core/store/settings-concurrency.js +2 -0
- package/dist/core/store/settings.d.ts +8 -1
- package/dist/core/store/settings.js +3 -2
- package/dist/mcp/server.d.ts +4 -0
- package/dist/mcp/server.js +1 -1
- package/dist/sdk/cli-contracts/command-aliases.js +1 -1
- package/dist/sdk/cli-contracts/flag-contracts.js +1 -1
- package/dist/sdk/cli-contracts/runtime-contracts.js +1 -1
- package/dist/sdk/cli-program.js +1 -1
- package/dist/sdk/context-intent-contracts.js +1 -1
- package/dist/sdk/context-relevance.js +1 -1
- package/dist/sdk/contracts.d.ts +1 -0
- package/dist/sdk/contracts.js +1 -1
- package/dist/sdk/extension/install-runtime.d.ts +1 -1
- package/dist/sdk/extension/install-runtime.js +2 -2
- package/dist/sdk/governance/health.js +1 -1
- package/dist/sdk/governance/provenance-health.d.ts +27 -0
- package/dist/sdk/governance/provenance-health.js +1 -1
- package/dist/sdk/graph/index.d.ts +1 -0
- package/dist/sdk/graph/index.js +1 -1
- package/dist/sdk/graph/query-contracts.d.ts +18 -0
- package/dist/sdk/graph/query-contracts.js +2 -0
- package/dist/sdk/graph/run.d.ts +2 -0
- package/dist/sdk/graph/run.js +1 -1
- package/dist/sdk/graph/traversal.js +1 -1
- package/dist/sdk/guide-topics.js +1 -1
- package/dist/sdk/lifecycle/event-validation-messages.d.ts +1 -1
- package/dist/sdk/lifecycle/event-validation-messages.js +1 -1
- package/dist/sdk/lifecycle-policy.js +1 -1
- package/dist/sdk/mutation-guard.d.ts +8 -1
- package/dist/sdk/mutation-guard.js +1 -1
- package/dist/sdk/public-surface.json +1 -1
- package/dist/sdk/query/next-ready-budget.d.ts +20 -0
- package/dist/sdk/query/next-ready-budget.js +2 -0
- package/dist/sdk/query/next.d.ts +7 -2
- package/dist/sdk/query/next.js +1 -1
- package/dist/sdk/read-output-budget.d.ts +3 -1
- package/dist/sdk/read-output-budget.js +1 -1
- package/dist/sdk/read-output-contracts.js +1 -1
- package/dist/sdk/read-output-session.js +1 -1
- package/dist/sdk/test/execution.d.ts +6 -5
- package/dist/sdk/test/execution.js +2 -2
- package/dist/sdk/test/json-path.d.ts +11 -0
- package/dist/sdk/test/json-path.js +2 -0
- package/docs/BUILD_AND_RELEASE_ACCEPTANCE.md +66 -0
- package/docs/MCP_OPTION_CONFORMANCE.md +41 -0
- package/docs/MUTATION_INTEGRITY.md +36 -4
- package/docs/NEXT_SELECTION_BUDGETS.md +93 -0
- package/docs/OUTPUT_PROJECTION_CONTRACTS.md +18 -2
- package/docs/PACKED_FIRST_RUN.md +8 -4
- package/docs/PERFORMANCE.md +37 -0
- package/docs/README.md +2 -0
- package/docs/READ_OUTPUT_CONTRACTS.md +8 -4
- package/docs/SDK_AGENT_SESSION_CONTEXT.md +28 -4
- package/docs/SDK_LIFECYCLE.md +16 -2
- package/docs/WORKSPACE_CONCURRENCY.md +67 -0
- package/docs/agent-task-token-baseline.json +7 -7
- package/docs/generated/AGENT_CAPABILITY_ROUTING.md +1 -1
- package/docs/generated/AGENT_COMMAND_SURFACE.md +3 -0
- package/docs/generated/FLAG_LEXICON_BUDGETS.md +3 -0
- package/marketplace.json +2 -2
- package/package.json +11 -9
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/README.md +43 -2
- package/packages/pm-calendar/extensions/calendar/command-definitions.ts +52 -0
- package/packages/pm-calendar/extensions/calendar/index.ts +2 -0
- package/packages/pm-calendar/extensions/calendar/manifest.json +3 -3
- package/packages/pm-calendar/extensions/calendar/shortcuts.ts +15 -0
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/scripts/build-lease.mjs +43 -0
- package/scripts/build.mjs +40 -0
- package/dist/cli-bundle/chunks/chunk-C3MFMGCR.js +0 -20
- package/dist/cli-bundle/chunks/chunk-DN2RIHRN.js +0 -3
- package/dist/cli-bundle/chunks/chunk-E67MIO3Z.js +0 -8
- package/dist/cli-bundle/chunks/chunk-UJSB6NO6.js +0 -237
- package/dist/cli-bundle/chunks/register-operations-HHDROJD6.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-5FSGN4MP.js +0 -12
- package/dist/cli-bundle/focused-chunks/chunk-7S7XWMXC.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-IVWUQE7T.js +0 -59
- package/dist/cli-bundle/focused-chunks/chunk-OCTTDZOU.js +0 -3
- package/dist/cli-bundle/focused-chunks/chunk-OWDDVMAP.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-Z4PWEIMX.js +0 -30
package/docs/PERFORMANCE.md
CHANGED
|
@@ -135,3 +135,40 @@ Review the report and budget diff together. Before a refresh, compare the delive
|
|
|
135
135
|
## Startup and observability
|
|
136
136
|
|
|
137
137
|
Sentry is loaded only when an error-reporting path actually initializes it. Disabled and normal successful commands do not resolve or compile the `@sentry/node` → OpenTelemetry → Undici graph. The loader uses the package's supported CommonJS export after the opt-out gate, preserving the repo-wide ban on dynamic/inline imports while keeping enabled capture, sanitization, and flush behavior intact.
|
|
138
|
+
|
|
139
|
+
## Invocation timing
|
|
140
|
+
|
|
141
|
+
Tracked by [pm-ag9nka](../.agents/pm/issues/pm-ag9nka.toon).
|
|
142
|
+
|
|
143
|
+
Use `pm --profile list --limit 5` to print diagnostics on stderr while retaining
|
|
144
|
+
normal stdout (including JSON). Every executable invocation with `--profile`
|
|
145
|
+
emits one final receipt on normal process drain, including help, version, and
|
|
146
|
+
handled refusals:
|
|
147
|
+
|
|
148
|
+
```text
|
|
149
|
+
profile:command=list took_ms=20
|
|
150
|
+
profile:invocation total_ms=324.125 scope=process_start_to_output_drain command_took_ms_scope=handler
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
`total_ms` uses monotonic runtime uptime, starting before module initialization
|
|
154
|
+
and ending after pending command output and event-loop work drain. It includes
|
|
155
|
+
bootstrap, settings/schema and extension loading, dispatch, rendering, and
|
|
156
|
+
foreground cleanup. Existing `profile:command` records retain their compatible
|
|
157
|
+
`took_ms` field; `command_took_ms_scope=handler` explicitly labels those narrower
|
|
158
|
+
spans. Extension discovery timing is another component, never an invocation
|
|
159
|
+
total. Components may overlap and must not be added to the total.
|
|
160
|
+
|
|
161
|
+
The total excludes parent-side scheduling/spawn, final OS teardown, and remote
|
|
162
|
+
telemetry delivery after a detached flush. A forcibly terminated process may
|
|
163
|
+
never reach the drain callback. In-process SDK calls do not emit a process-total
|
|
164
|
+
receipt: their host owns the lifetime. `--profile` after the `--` positional
|
|
165
|
+
terminator does not enable the receipt.
|
|
166
|
+
|
|
167
|
+
The real-process regression compares the reported total against external wall
|
|
168
|
+
time across query, mutation, configuration, schema, health, discovery, and
|
|
169
|
+
refusal paths. It permits parent/teardown overhead of the greater of 250 ms or
|
|
170
|
+
25% of external wall time, and no more than 5 ms of clock rounding above it.
|
|
171
|
+
This is an instrument agreement tolerance, not a performance budget. Existing
|
|
172
|
+
transport/scale gates retain external end-to-end process wall time and their
|
|
173
|
+
unchanged stricter regression budgets; never gate invocation latency on handler
|
|
174
|
+
`took_ms`.
|
package/docs/README.md
CHANGED
|
@@ -39,6 +39,7 @@ pm guide release --json
|
|
|
39
39
|
- [CLI Scripting Contract](SCRIPTING.md) - exit codes, flat mutation receipts versus read envelopes, stdout/stderr boundaries, stable JSON fields, uniform OR filters, and shell composition recipes.
|
|
40
40
|
- [Configuration](CONFIGURATION.md) - settings, storage formats, output, search, validation, and environment variables.
|
|
41
41
|
- [Testing](TESTING.md) - sandbox-safe local tests and linked-test orchestration.
|
|
42
|
+
- [Build and Release Acceptance](BUILD_AND_RELEASE_ACCEPTANCE.md) - complete-build leases and cross-platform registry installation controls.
|
|
42
43
|
- [Security Governance](SECURITY_GOVERNANCE.md) - vulnerability reporting, review discipline, property fuzzing, and OpenSSF limitations.
|
|
43
44
|
- [Architecture](ARCHITECTURE.md) - contributor internals: storage, mutation flow, search, extensions, and command contracts.
|
|
44
45
|
- [Noun–Verb CLI Grammar](CLI_GRAMMAR.md) - accepted command architecture, exhaustive destination census, hidden aliases, and the surface-growth gate.
|
|
@@ -53,6 +54,7 @@ pm guide release --json
|
|
|
53
54
|
- [MCP Remote Transport, Authorization, and Migration](MCP_REMOTE_TRANSPORT_SECURITY.md) - Streamable HTTP operation, subscriptions, OAuth and trace boundaries, threat model, and deprecated-feature ratchet.
|
|
54
55
|
- [SDK Artifact Output Contracts](SDK_ARTIFACT_OUTPUT.md) - clean stdout/file exporter channels, bounded receipts, binary-safe delivery, and shared NDJSON terminal framing.
|
|
55
56
|
- [Context Relevance and Packing](CONTEXT_RELEVANCE.md) - shared CLI/SDK signals, derived-store provenance, ranking explanations, and token budgets.
|
|
57
|
+
- [Next-work Selection Budgets](NEXT_SELECTION_BUDGETS.md) - bounded executable recommendations, omission receipts, and graded 10k/100k context verification.
|
|
56
58
|
- [Context Algorithm Portfolio](CONTEXT_ALGORITHM_PORTFOLIO.md) - stable proposal slugs, historical aliases, individual owners, cognitive compositions, and experiment gates.
|
|
57
59
|
- [Output Projection and Omission Contracts](OUTPUT_PROJECTION_CONTRACTS.md) - explicit withheld-field receipts, mode-paired row keys, and completion resolver outcomes.
|
|
58
60
|
- [Output Token Accounting](OUTPUT_TOKEN_ACCOUNTING.md) - opt-in CLI/MCP byte attribution, bounded receipt overhead, and release-level tokens-per-task baselines.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Universal Read Output Contracts
|
|
2
2
|
|
|
3
|
-
Tracker references: [pm-hb7ug8](../.agents/pm/features/pm-hb7ug8.toon), [pm-cxr0jb](../.agents/pm/features/pm-cxr0jb.toon), [pm-hid9g1](../.agents/pm/features/pm-hid9g1.toon), [pm-h8tpeh](../.agents/pm/features/pm-h8tpeh.toon), [pm-5t33or](../.agents/pm/features/pm-5t33or.toon), [pm-wv47pf](../.agents/pm/issues/pm-wv47pf.toon), [pm-srns](../.agents/pm/issues/pm-srns.toon), [pm-sb0tns](../.agents/pm/issues/pm-sb0tns.toon), [pm-gjjurs](../.agents/pm/issues/pm-gjjurs.toon), [pm-eugaqy](../.agents/pm/issues/pm-eugaqy.toon), [pm-jt8aa2](../.agents/pm/issues/pm-jt8aa2.toon), [pm-kyjdne](../.agents/pm/issues/pm-kyjdne.toon), [pm-8nev0o](../.agents/pm/issues/pm-8nev0o.toon), [pm-oahhyc](../.agents/pm/issues/pm-oahhyc.toon), [pm-q4isdq](../.agents/pm/issues/pm-q4isdq.toon), [pm-e5gl05](../.agents/pm/issues/pm-e5gl05.toon), [pm-cha95z](../.agents/pm/tasks/pm-cha95z.toon), [pm-2qvq7a](../.agents/pm/issues/pm-2qvq7a.toon), and [pm-xam9bt](../.agents/pm/issues/pm-xam9bt.toon).
|
|
3
|
+
Tracker references: [pm-15yuly](../.agents/pm/issues/pm-15yuly.toon), [pm-g8oh0f](../.agents/pm/issues/pm-g8oh0f.toon), [pm-hb7ug8](../.agents/pm/features/pm-hb7ug8.toon), [pm-cxr0jb](../.agents/pm/features/pm-cxr0jb.toon), [pm-hid9g1](../.agents/pm/features/pm-hid9g1.toon), [pm-h8tpeh](../.agents/pm/features/pm-h8tpeh.toon), [pm-5t33or](../.agents/pm/features/pm-5t33or.toon), [pm-wv47pf](../.agents/pm/issues/pm-wv47pf.toon), [pm-srns](../.agents/pm/issues/pm-srns.toon), [pm-sb0tns](../.agents/pm/issues/pm-sb0tns.toon), [pm-gjjurs](../.agents/pm/issues/pm-gjjurs.toon), [pm-eugaqy](../.agents/pm/issues/pm-eugaqy.toon), [pm-jt8aa2](../.agents/pm/issues/pm-jt8aa2.toon), [pm-kyjdne](../.agents/pm/issues/pm-kyjdne.toon), [pm-8nev0o](../.agents/pm/issues/pm-8nev0o.toon), [pm-oahhyc](../.agents/pm/issues/pm-oahhyc.toon), [pm-q4isdq](../.agents/pm/issues/pm-q4isdq.toon), [pm-e5gl05](../.agents/pm/issues/pm-e5gl05.toon), [pm-cha95z](../.agents/pm/tasks/pm-cha95z.toon), [pm-2qvq7a](../.agents/pm/issues/pm-2qvq7a.toon), and [pm-xam9bt](../.agents/pm/issues/pm-xam9bt.toon).
|
|
4
4
|
|
|
5
5
|
## Agent Quick Context
|
|
6
6
|
|
|
@@ -165,7 +165,7 @@ pm stats --output-row-contract
|
|
|
165
165
|
pm contracts --full --json
|
|
166
166
|
```
|
|
167
167
|
|
|
168
|
-
Every
|
|
168
|
+
Canonical amount, encoding, and cost controls that leave an already-fitting result unchanged do not add a `read_output` receipt. Explicit include projections, sessions, continuations, and `--output-row-contract` retain the detailed receipt. Every shaped or budget-compacted result carries a `read_output` receipt with the requested dimensions, precedence, observed option provenance, deterministic estimated token count, string/row compaction signals, and budget outcome. When canonical controls are present, `canonical_options_used` records spellings such as `--output-include`; the optional field is omitted when no canonical control was supplied so minimum-budget session receipts remain compact. `legacy_aliases_used` and `migration_hints` record only compatibility flags the caller actually supplied. A command-local flag synthesized internally to execute a canonical projection mode is therefore never misreported as deprecated syntax. When both spellings are supplied, both provenance arrays report that mixed invocation. Budget degradation discovers nested arrays as well as declared result rows, so validation diagnostics and other governance payloads compact their inner findings before the useful result is omitted. `compacted_row_paths` names every reduced collection without redefining those nested arrays as ordinary pagination rows.
|
|
169
169
|
|
|
170
170
|
The estimate is `ceil(utf8_bytes / 4)` for the complete envelope. The CLI uses
|
|
171
171
|
its selected built-in JSON or TOON representation, including indentation and
|
|
@@ -178,7 +178,11 @@ serializing an SDK object for measurement does not implicitly select that policy
|
|
|
178
178
|
Per-call and session receipts include their own cost and continuation disclosure.
|
|
179
179
|
Compaction reserves room for that disclosure before returning a useful page, so
|
|
180
180
|
an envelope cannot claim to fit merely because its rows fit before receipts were
|
|
181
|
-
added.
|
|
181
|
+
added. Each selected collection uses a measured prefix search instead of irreversible
|
|
182
|
+
halving, retaining the largest prefix that fits with the other collections held
|
|
183
|
+
fixed. `applied_limit` and both continuation forms follow the retained item count.
|
|
184
|
+
A complete page and a truncated page have different mandatory metadata costs;
|
|
185
|
+
row counts across that boundary are not an unconditional monotonicity guarantee. An infeasible ceiling returns the explicit omission result.
|
|
182
186
|
|
|
183
187
|
For `context` and `next`, that final projection is also the usage-feedback
|
|
184
188
|
delivery boundary. The SDK carries a JSON-invisible serve receipt through
|
|
@@ -188,7 +192,7 @@ rows; it can never leave the packer's earlier inclusions marked as served.
|
|
|
188
192
|
`PmClient` finalizes the receipt before resolving, while the CLI finalizes it
|
|
189
193
|
from the exact active result passed to telemetry and after-command hooks.
|
|
190
194
|
|
|
191
|
-
When rows are dropped to satisfy a ceiling, the result also carries `output_budget_truncation`, naming the binding budget and its source, any explicitly requested dimension the budget overrode, every compacted collection path, and executable CLI/SDK/MCP recovery options — a default ceiling can override an explicit `--output-limit unbounded`, and that override is reported rather than silent. If a producer supplied an opaque item-page cursor, compaction rebases it to the last row actually returned and reports `continuation_cursor_rebased: true`; following the cursor therefore cannot skip rows removed from the middle of a producer page. If no useful content can fit, `PmReadOutputBudgetExceeded` provides a discriminated omission result, a compact `{ outputBudget: "unbounded" }` recovery object, and `omitted_result_estimated_tokens`, the last useful-result estimate before omission; use `isReadOutputBudgetExceeded` before accessing result-specific fields.
|
|
195
|
+
When rows are dropped to satisfy a ceiling, the result also carries `output_budget_truncation`, naming the binding budget and its source, any explicitly requested dimension the budget overrode, every compacted collection path, and executable CLI/SDK/MCP recovery options — a default ceiling can override an explicit `--output-limit unbounded`, and that override is reported rather than silent. If a producer supplied an opaque item-page cursor, compaction rebases it to the last row actually returned and reports `continuation_cursor_rebased: true`; following the cursor therefore cannot skip rows removed from the middle of a producer page. If no useful content can fit, `PmReadOutputBudgetExceeded` provides a discriminated omission result, a compact `{ outputBudget: "unbounded" }` recovery object, and `omitted_result_estimated_tokens`, the last useful-result estimate before omission; use `isReadOutputBudgetExceeded` before accessing result-specific fields. The encoding control `--output-format <toon|json>` also applies to mutation envelopes, including the mutation modes of `comments`, `notes`, `files`, and `docs`. Other universal read controls remain rejected before mutation execution. `--json` remains supported.
|
|
192
196
|
|
|
193
197
|
Cursor recovery carries the opaque value once in `recovery.cursor` and declares
|
|
194
198
|
the accepting `cli`, `sdk`, and `mcp` binding beside it. This avoids
|
|
@@ -7,7 +7,8 @@ Tracker references: [pm-9wbiye](../.agents/pm/issues/pm-9wbiye.toon),
|
|
|
7
7
|
[pm-eq9dlw](../.agents/pm/issues/pm-eq9dlw.toon), and
|
|
8
8
|
[pm-lu6sca](../.agents/pm/features/pm-lu6sca.toon), plus
|
|
9
9
|
[pm-5q8wa0](../.agents/pm/issues/pm-5q8wa0.toon) and
|
|
10
|
-
[pm-c0lrdm](../.agents/pm/features/pm-c0lrdm.toon)
|
|
10
|
+
[pm-c0lrdm](../.agents/pm/features/pm-c0lrdm.toon) and
|
|
11
|
+
[pm-4f1l7f](../.agents/pm/issues/pm-4f1l7f.toon).
|
|
11
12
|
|
|
12
13
|
Project management is context management. The public SDK therefore carries a
|
|
13
14
|
session's purpose and episode boundary through the same immutable history that
|
|
@@ -129,8 +130,8 @@ public SDK exports for custom hosts.
|
|
|
129
130
|
the bounded built-in resolver. It never contains environment values, session
|
|
130
131
|
paths, prompts, or file contents.
|
|
131
132
|
|
|
132
|
-
New mutation history records failed
|
|
133
|
-
resolver outcomes under `context.agent_provenance_outcomes`; dimensions with
|
|
133
|
+
New mutation history records successful probes, failed probes, and explicitly
|
|
134
|
+
unavailable configured resolver outcomes under `context.agent_provenance_outcomes`; dimensions with
|
|
134
135
|
no configured resolver retain the compact legacy-compatible null projection.
|
|
135
136
|
A resolver is only counted as
|
|
136
137
|
attempted when its required input belongs to the detected harness; a foreign
|
|
@@ -138,7 +139,30 @@ host's shared `AI_AGENT` value is not Codex input. Consequently `pm health` can
|
|
|
138
139
|
`provenance_resolver_zero_success:<harness>:<dimension>:<resolver>:<attempts>`
|
|
139
140
|
without confusing an unavailable harness signal with a failed resolver. The
|
|
140
141
|
warning is advisory and the storage check includes the bounded attempt and
|
|
141
|
-
success counters for diagnosis.
|
|
142
|
+
success counters for diagnosis. Resolved environment, session, client, and
|
|
143
|
+
inferred observations do not count as probe successes merely because that
|
|
144
|
+
harness declares a resolver. Existing immutable records are preserved; a new
|
|
145
|
+
successful probe clears an all-failed advisory when the complete sample includes
|
|
146
|
+
that event.
|
|
147
|
+
|
|
148
|
+
`scanProvenanceResolverHealth()` from `@unbrained/pm-cli/sdk/governance` returns
|
|
149
|
+
`sample`, also exposed as `checks[name=storage].details.provenance_sample` by
|
|
150
|
+
`pm health --full --json`. The receipt declares `scope=history_prefix`, the
|
|
151
|
+
10,000-event and 8 MiB ceilings, events/bytes read, truncation, unreadable sources, malformed rows,
|
|
152
|
+
and the earliest/latest valid event timestamps inspected. Files are traversed
|
|
153
|
+
by sorted name and events by append order: this is a bounded history prefix,
|
|
154
|
+
not a rolling recent window. Timestamp bounds describe observed events only.
|
|
155
|
+
`sample.complete=false` suppresses population-wide zero-success conclusions;
|
|
156
|
+
`truncated` separately identifies byte/event limits. Missing or malformed input
|
|
157
|
+
is diagnosed by the integrity checks. An empty or unavailable-only sample is
|
|
158
|
+
not proof that a resolver works. These measurements describe the sampled
|
|
159
|
+
history, not current probe availability or an unobserved historical success.
|
|
160
|
+
The optional `eventLimit` argument must be a non-negative safe integer;
|
|
161
|
+
invalid bounds throw `RangeError`, and zero requests an empty bounded sample.
|
|
162
|
+
|
|
163
|
+
The `ProvenanceResolverHealthScan` TypeScript result adds a required `sample`
|
|
164
|
+
receipt. Consumers that construct this result themselves must supply the receipt;
|
|
165
|
+
consumers that only read returned scans retain all prior fields unchanged.
|
|
142
166
|
|
|
143
167
|
Older immutable history can also contain roles outside the controlled domain,
|
|
144
168
|
including values recorded from presence-only harness flags before semantic role
|
package/docs/SDK_LIFECYCLE.md
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
# SDK Lifecycle Policy
|
|
2
2
|
|
|
3
3
|
Tracked by [pm-z5pmf8](../.agents/pm/issues/pm-z5pmf8.toon),
|
|
4
|
-
[pm-xm0id4](../.agents/pm/issues/pm-xm0id4.toon),
|
|
5
|
-
[pm-2ew0w3](../.agents/pm/issues/pm-2ew0w3.toon)
|
|
4
|
+
[pm-xm0id4](../.agents/pm/issues/pm-xm0id4.toon),
|
|
5
|
+
[pm-2ew0w3](../.agents/pm/issues/pm-2ew0w3.toon), and
|
|
6
|
+
[pm-scbr0s](../.agents/pm/issues/pm-scbr0s.toon).
|
|
6
7
|
|
|
7
8
|
The public SDK owns lifecycle transactions and policy. CLI and MCP operations
|
|
8
9
|
delegate to SDK modules, so an item does not gain different storage,
|
|
@@ -39,6 +40,10 @@ Package authors can import these operations from `@unbrained/pm-cli/sdk`
|
|
|
39
40
|
without importing CLI modules or spawning the executable. Existing CLI import
|
|
40
41
|
paths remain source-compatible while integrations migrate.
|
|
41
42
|
|
|
43
|
+
See [Concurrent Workspace Mutations](WORKSPACE_CONCURRENCY.md) for settings
|
|
44
|
+
snapshot reconciliation, schema publication, session locks, and checkpoint
|
|
45
|
+
collision semantics shared by these operations.
|
|
46
|
+
|
|
42
47
|
## Relationship Identity
|
|
43
48
|
|
|
44
49
|
Tracked by [pm-olcoon](../.agents/pm/issues/pm-olcoon.toon).
|
|
@@ -94,6 +99,15 @@ An embedded SDK consumer can explicitly choose `orderingEdges: "remove"` for
|
|
|
94
99
|
a domain where predecessor facts are intentionally ephemeral. The CLI and MCP
|
|
95
100
|
do not expose that override and use the durable default.
|
|
96
101
|
|
|
102
|
+
Explicit removal returns `closed_removed_predecessors:<item>:<ids>` for the
|
|
103
|
+
complete removed row set and `closed_removed_predecessors_count:<item>:<n>`
|
|
104
|
+
for its cardinality. The count is the number of dependency rows, including
|
|
105
|
+
distinct provenance rows that reference the same item. Clearing a transient
|
|
106
|
+
`blocked_by` scalar is reported separately as
|
|
107
|
+
`closed_cleared_blocked_by:<item>:<blocker>` and does not inflate that count.
|
|
108
|
+
Both removal and its receipts use the same selected rows; other relationship
|
|
109
|
+
kinds survive unchanged.
|
|
110
|
+
|
|
97
111
|
```ts
|
|
98
112
|
import {
|
|
99
113
|
closeItem,
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Concurrent Workspace Mutations
|
|
2
|
+
|
|
3
|
+
Tracked by [pm-bgcu](../.agents/pm/issues/pm-bgcu.toon). Power-loss durability is
|
|
4
|
+
governed by [pm-o2kc](../.agents/pm/epics/pm-o2kc.toon).
|
|
5
|
+
|
|
6
|
+
The CLI and MCP use the SDK's persistence primitives. Atomic replacement makes
|
|
7
|
+
one file write indivisible, but preserving concurrent edits also requires
|
|
8
|
+
protecting the read and decision that precede that write.
|
|
9
|
+
|
|
10
|
+
## Settings snapshots
|
|
11
|
+
|
|
12
|
+
`readSettings` attaches an internal, non-enumerable persistence snapshot.
|
|
13
|
+
`writeSettings` compares the caller's edited snapshot with the latest document
|
|
14
|
+
while holding the `workspace-history` lock. Changes to different object keys
|
|
15
|
+
are combined, including separate keys in a newly introduced nested object.
|
|
16
|
+
Unchanged keys keep the current persisted values; sparse defaults and
|
|
17
|
+
file-backed schema definitions remain sparse.
|
|
18
|
+
|
|
19
|
+
Concurrent incompatible edits to the same scalar, array, or deleted object
|
|
20
|
+
return a conflict before writing. Read a fresh settings snapshot and reapply
|
|
21
|
+
the intended operation. Equal concurrent changes are idempotent. A successful
|
|
22
|
+
write advances that instance's baseline, so reusing it cannot replay an earlier
|
|
23
|
+
edit over another writer. Conflict messages name keys without exposing values.
|
|
24
|
+
Deleting the settings document also invalidates an unchanged read snapshot;
|
|
25
|
+
its next write returns the same structured conflict.
|
|
26
|
+
|
|
27
|
+
Keep the object returned by `readSettings` when editing settings. Constructing
|
|
28
|
+
a new object, spreading it, or using `structuredClone` drops the internal
|
|
29
|
+
snapshot; `writeSettings` treats such objects as explicit whole-document
|
|
30
|
+
replacements. They are suitable for initialization, not concurrent edits.
|
|
31
|
+
|
|
32
|
+
The same lock protects the persisted document, its workspace history entry,
|
|
33
|
+
and compensation if history append fails. This prevents concurrent writers
|
|
34
|
+
from forking the chain or leaving an accepted write unrecorded. It does not
|
|
35
|
+
claim crash atomicity across separate filesystem writes.
|
|
36
|
+
|
|
37
|
+
## Schema, session, and rollback state
|
|
38
|
+
|
|
39
|
+
Schema mutations hold the existing `schema-types`, `schema-statuses`, or
|
|
40
|
+
`schema-fields` lock while reading and modifying their file. Profile application
|
|
41
|
+
uses the same lock order. Bootstrap stages complete seed bytes and publishes
|
|
42
|
+
them through a non-replacing hard link: a concurrent schema writer or reader
|
|
43
|
+
can never be overwritten by a delayed bootstrap. A filesystem that refuses
|
|
44
|
+
hard links returns an error instead of falling back to an unsafe overwrite.
|
|
45
|
+
|
|
46
|
+
Focus and semantic attribution share the `session-state` lock across the full
|
|
47
|
+
read-modify-write operation. Independent agents retain their attribution while
|
|
48
|
+
focus changes. This state remains local and ephemeral.
|
|
49
|
+
|
|
50
|
+
Rollback checkpoints use the same atomic, non-replacing publication as schema
|
|
51
|
+
seeds. Filesystem identity also protects paths reached through symlink aliases.
|
|
52
|
+
A byte-identical retry succeeds; reusing an ID for different contents fails without
|
|
53
|
+
replacing the original rollback evidence. Different checkpoint paths remain
|
|
54
|
+
independent.
|
|
55
|
+
|
|
56
|
+
Atomic publication guarantees complete visible bytes and prevents replacement.
|
|
57
|
+
It does not flush file data or directory entries to stable storage, so success
|
|
58
|
+
does not guarantee survival of power loss. A stronger durability policy must
|
|
59
|
+
cover all writers, newly created ancestor directories, retry acknowledgements,
|
|
60
|
+
and supported filesystems; syncing only this publication path would not establish
|
|
61
|
+
that workspace-wide guarantee.
|
|
62
|
+
|
|
63
|
+
The mutation locks use the existing bounded contention and stale-owner recovery
|
|
64
|
+
mechanism. Settings use configured lock TTL and wait values. Internal session
|
|
65
|
+
locks use the standard defaults; `PM_LOCK_WAIT_MS` still
|
|
66
|
+
overrides their wait budget. Every acquired lock is released on success and
|
|
67
|
+
failure.
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
{
|
|
78
78
|
"task_id": "orientation-contracts-next",
|
|
79
79
|
"command_count": 2,
|
|
80
|
-
"estimated_tokens":
|
|
80
|
+
"estimated_tokens": 5180,
|
|
81
81
|
"capabilities": [
|
|
82
82
|
"actionable_work",
|
|
83
83
|
"active_ownership",
|
|
@@ -120,16 +120,16 @@
|
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
"id": "orientation-contracts-next",
|
|
123
|
-
"max_estimated_tokens":
|
|
123
|
+
"max_estimated_tokens": 5180,
|
|
124
124
|
"steps": [
|
|
125
125
|
{
|
|
126
126
|
"id": "contracts",
|
|
127
|
-
"max_estimated_tokens":
|
|
127
|
+
"max_estimated_tokens": 4458,
|
|
128
128
|
"accounting_mode": "self_reported"
|
|
129
129
|
},
|
|
130
130
|
{
|
|
131
131
|
"id": "next",
|
|
132
|
-
"max_estimated_tokens":
|
|
132
|
+
"max_estimated_tokens": 722,
|
|
133
133
|
"accounting_mode": "self_reported"
|
|
134
134
|
}
|
|
135
135
|
]
|
|
@@ -199,11 +199,11 @@
|
|
|
199
199
|
},
|
|
200
200
|
{
|
|
201
201
|
"id": "unknown-option-recovery",
|
|
202
|
-
"max_estimated_tokens":
|
|
202
|
+
"max_estimated_tokens": 596,
|
|
203
203
|
"steps": [
|
|
204
204
|
{
|
|
205
205
|
"id": "refuse-option",
|
|
206
|
-
"max_estimated_tokens":
|
|
206
|
+
"max_estimated_tokens": 433,
|
|
207
207
|
"accounting_mode": "self_reported"
|
|
208
208
|
},
|
|
209
209
|
{
|
|
@@ -261,5 +261,5 @@
|
|
|
261
261
|
]
|
|
262
262
|
}
|
|
263
263
|
],
|
|
264
|
-
"composite_max_estimated_tokens":
|
|
264
|
+
"composite_max_estimated_tokens": 13011
|
|
265
265
|
}
|
|
@@ -13,5 +13,5 @@ This file is generated from `PM_COMMAND_CAPABILITY_CONTRACTS`. Do not edit it ma
|
|
|
13
13
|
| evidence | `history`, `history events`, `history redact`, `history repair`, `history compact`, `history attest`, `history acknowledge`, `item append`, `item comments`, `item notes`, `item learnings`, `item files`, `item docs` |
|
|
14
14
|
| graph | `graph`, `item deps`, `plan` |
|
|
15
15
|
| quality | `item test`, `ops test-all`, `ops validate`, `assurance`, `contracts`, `ops` |
|
|
16
|
-
| automation | `meet`, `event`, `remind` |
|
|
16
|
+
| automation | `calendar meet`, `calendar event`, `calendar remind` |
|
|
17
17
|
| extensions | `package` |
|
|
@@ -105,8 +105,11 @@ This file is generated from `PM_COMMAND_CAPABILITY_CONTRACTS`. Do not edit it ma
|
|
|
105
105
|
| `pause-task` | full | lifecycle |
|
|
106
106
|
| `close-task` | full | lifecycle |
|
|
107
107
|
| `meet` | full | automation |
|
|
108
|
+
| `calendar meet` | full | automation |
|
|
108
109
|
| `event` | full | automation |
|
|
110
|
+
| `calendar event` | full | automation |
|
|
109
111
|
| `remind` | full | automation |
|
|
112
|
+
| `calendar remind` | full | automation |
|
|
110
113
|
| `help` | core | context |
|
|
111
114
|
| `ops` | core | quality |
|
|
112
115
|
| `completion-statuses` | internal | internal |
|
|
@@ -108,3 +108,6 @@ This file is generated by `listPmFlagLexicon()`. Compatibility aliases do not co
|
|
|
108
108
|
| `item copy` | intake | 24 | 24 |
|
|
109
109
|
| `workspace merge` | workspace | 27 | 27 |
|
|
110
110
|
| `item duplicates` | context | 25 | 25 |
|
|
111
|
+
| `calendar meet` | automation | 33 | 33 |
|
|
112
|
+
| `calendar event` | automation | 33 | 33 |
|
|
113
|
+
| `calendar remind` | automation | 29 | 29 |
|
package/marketplace.json
CHANGED
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
},
|
|
7
7
|
"metadata": {
|
|
8
8
|
"description": "Official marketplace for pm CLI — native git-based project management for Claude Code and AI coding agents.",
|
|
9
|
-
"version": "2026.9.
|
|
9
|
+
"version": "2026.9.19"
|
|
10
10
|
},
|
|
11
11
|
"plugins": [
|
|
12
12
|
{
|
|
13
13
|
"name": "pm-claude",
|
|
14
14
|
"source": "./plugins/pm-claude",
|
|
15
15
|
"description": "Native pm CLI integration for Claude Code — 28 MCP tools, 5 workflow skills, 14 slash commands, 4 subagents, hybrid TUI task tracking, session context injection, and coordination subagents for git-based project management without leaving Claude Code.",
|
|
16
|
-
"version": "2026.9.
|
|
16
|
+
"version": "2026.9.19",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "unbrained",
|
|
19
19
|
"url": "https://github.com/unbraind/pm-cli"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unbrained/pm-cli",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.19",
|
|
4
4
|
"description": "Git-native project management CLI for humans and agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "pnpm@11.10.0",
|
|
@@ -98,6 +98,8 @@
|
|
|
98
98
|
".claude-plugin/**",
|
|
99
99
|
"plugins/**",
|
|
100
100
|
"packages/pm-*/**",
|
|
101
|
+
"scripts/build.mjs",
|
|
102
|
+
"scripts/build-lease.mjs",
|
|
101
103
|
"scripts/bundle-cli.mjs",
|
|
102
104
|
"scripts/generate-agent-capability-surfaces.mjs",
|
|
103
105
|
"scripts/finalize-build.mjs",
|
|
@@ -108,7 +110,7 @@
|
|
|
108
110
|
"marketplace.json"
|
|
109
111
|
],
|
|
110
112
|
"scripts": {
|
|
111
|
-
"build": "node scripts/
|
|
113
|
+
"build": "node scripts/build.mjs",
|
|
112
114
|
"typecheck": "tsc --noEmit -p tsconfig.json && tsc --noEmit -p tsconfig.typetests.json && tsc -p tsconfig.packages.json && tsc -p tsconfig.examples.json",
|
|
113
115
|
"start": "node dist/cli.js",
|
|
114
116
|
"dev": "tsx src/cli.ts",
|
|
@@ -205,7 +207,7 @@
|
|
|
205
207
|
"node": ">=22.18.0"
|
|
206
208
|
},
|
|
207
209
|
"dependencies": {
|
|
208
|
-
"@sentry/node": "10.
|
|
210
|
+
"@sentry/node": "10.75.0",
|
|
209
211
|
"@toon-format/toon": "^4.1.1",
|
|
210
212
|
"@types/node": ">=22",
|
|
211
213
|
"commander": "^15.0.0",
|
|
@@ -219,18 +221,18 @@
|
|
|
219
221
|
"@codspeed/vitest-plugin": "^5.7.1",
|
|
220
222
|
"@eslint/js": "^10.0.1",
|
|
221
223
|
"@modelcontextprotocol/ext-apps": "2.0.0",
|
|
222
|
-
"@sentry/cli": "^3.
|
|
223
|
-
"@types/node": "^26.
|
|
224
|
+
"@sentry/cli": "^3.8.0",
|
|
225
|
+
"@types/node": "^26.6.1",
|
|
224
226
|
"@types/npm-package-arg": "^6.1.4",
|
|
225
227
|
"@vitest/coverage-v8": "^4.1.11",
|
|
226
228
|
"esbuild": "0.28.2",
|
|
227
229
|
"eslint": "^10.10.0",
|
|
228
|
-
"eslint-plugin-sonarjs": "^4.2.
|
|
229
|
-
"eslint-plugin-unicorn": "
|
|
230
|
-
"fast-check": "^4.10.
|
|
230
|
+
"eslint-plugin-sonarjs": "^4.2.1",
|
|
231
|
+
"eslint-plugin-unicorn": "75.0.0",
|
|
232
|
+
"fast-check": "^4.10.1",
|
|
231
233
|
"github-slugger": "2.0.0",
|
|
232
234
|
"greptile": "^3.5.2",
|
|
233
|
-
"jscpd": "^5.2.
|
|
235
|
+
"jscpd": "^5.2.1",
|
|
234
236
|
"marked": "18.0.13",
|
|
235
237
|
"parse5": "8.0.1",
|
|
236
238
|
"tsx": "^4.23.13",
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
# pm Calendar Package
|
|
2
2
|
|
|
3
|
-
`@unbrained/pm-calendar` provides agenda and calendar views as an installable pm package.
|
|
3
|
+
`@unbrained/pm-calendar` provides scheduling shortcuts, agenda, and calendar views as an installable pm package.
|
|
4
4
|
|
|
5
5
|
```bash
|
|
6
|
-
pm install calendar --project
|
|
6
|
+
pm package install calendar --project
|
|
7
7
|
# Or bootstrap all bundled package commands in a new project:
|
|
8
8
|
pm init --defaults --with-packages
|
|
9
9
|
pm calendar --view week --full-period
|
|
@@ -14,6 +14,47 @@ The package owns presentation commands for deadline, reminder, and scheduled eve
|
|
|
14
14
|
|
|
15
15
|
Runtime sources are authored in TypeScript and use only the public `@unbrained/pm-cli/sdk` surface.
|
|
16
16
|
|
|
17
|
+
## Scheduling commands
|
|
18
|
+
|
|
19
|
+
Tracking: [pm-o3fh](../../.agents/pm/tasks/pm-o3fh.toon),
|
|
20
|
+
[pm-jkjt](../../.agents/pm/issues/pm-jkjt.toon).
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
pm calendar meet "Planning" --start +1d --duration 30min --location "Room A"
|
|
24
|
+
pm calendar event "Release window" --start 2026-10-01T09:00:00Z --duration PT2H
|
|
25
|
+
pm calendar remind "Review release" --at +2d --text "Check acceptance results"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The legacy `pm meet`, `pm event`, and `pm remind` spellings remain aliases.
|
|
29
|
+
Install `calendar` in each project where these commands are needed; without the
|
|
30
|
+
package, the CLI provides an installation hint. Core `create` and `update` retain
|
|
31
|
+
scheduling metadata primitives. SDK integrations can continue calling `runMeet`,
|
|
32
|
+
`runEvent`, and `runRemind` directly without installing presentation commands.
|
|
33
|
+
|
|
34
|
+
Meetings and events default to a start of `now` and a duration of `1h`.
|
|
35
|
+
An explicit `--end` overrides the shortcut's duration. Reminders default to `+1d`
|
|
36
|
+
and use the title as their reminder text. All three commands support parent,
|
|
37
|
+
tags, priority, body, description, history message, and the host's global author
|
|
38
|
+
and output options. Use `pm contracts --command "calendar meet" --flags-only`
|
|
39
|
+
for the active project's exact contract.
|
|
40
|
+
|
|
41
|
+
### Duration decision
|
|
42
|
+
|
|
43
|
+
Accepted [duration ADR](../../.agents/pm/decisions/pm-j1vw3a.toon).
|
|
44
|
+
|
|
45
|
+
Event durations accept integer `min`, `mins`, `minute`, or `minutes`; `h`, `d`,
|
|
46
|
+
`w`, or explicit `mo` for calendar months; and ISO time durations such as `PT30M`
|
|
47
|
+
or `PT1H30M`. Bare `m`, including signed values such as `+5m`, is rejected with
|
|
48
|
+
`min`/`mo` alternatives before mutation. This resolves the ambiguity recorded in
|
|
49
|
+
pm-jkjt and supersedes the duration compatibility decision in
|
|
50
|
+
[pm-zoe4](../../.agents/pm/features/pm-zoe4.toon).
|
|
51
|
+
|
|
52
|
+
This rule applies to shortcut durations and the shared `create`/`update` event
|
|
53
|
+
parser. Other relative date fields retain `m` for calendar months. Zero duration
|
|
54
|
+
creates an instant event; an end before the start is rejected. Calendar month
|
|
55
|
+
arithmetic clamps to the last valid day of the target month; compound offsets
|
|
56
|
+
such as `+1d+2h` are rejected.
|
|
57
|
+
|
|
17
58
|
## Recurrence Notes
|
|
18
59
|
|
|
19
60
|
Recurring event `recur_count` values are counted from the event series `start`, not from the query window. For example, a daily event starting April 1 with `recur_count=3` has its counted occurrences on April 1, 2, and 3; querying April 10 does not restart the count.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module packages/pm-calendar/extensions/calendar/command-definitions
|
|
3
|
+
*
|
|
4
|
+
* Declares pure calendar command metadata shared by runtime and contract gates. The host
|
|
5
|
+
* supplies alias routing, argument validation, mutation receipts, and telemetry.
|
|
6
|
+
*/
|
|
7
|
+
import type { CommandDefinition, FlagDefinition } from "@unbrained/pm-cli/sdk";
|
|
8
|
+
|
|
9
|
+
const commonFlags: FlagDefinition[] = [
|
|
10
|
+
{ long: "--parent", value_name: "id", value_type: "string", description: "Parent item id" },
|
|
11
|
+
{ long: "--allow-missing-parent", value_type: "boolean", description: "Permit a parent id that does not exist yet" },
|
|
12
|
+
{ long: "--tags", value_name: "list", value_type: "string", description: "Comma-separated tags" },
|
|
13
|
+
{ long: "--priority", value_name: "value", value_type: "string", description: "Priority" },
|
|
14
|
+
{ long: "--body", value_name: "text", value_type: "string", description: "Body/markdown content" },
|
|
15
|
+
{ long: "--description", value_name: "text", value_type: "string", description: "Short description" },
|
|
16
|
+
{ long: "--message", value_name: "value", value_type: "string", description: "History message" },
|
|
17
|
+
];
|
|
18
|
+
|
|
19
|
+
const eventFlags: FlagDefinition[] = [
|
|
20
|
+
{ long: "--start", value_name: "when", value_type: "string", description: "Start time (ISO, now, or relative +1h/+2d); defaults to now" },
|
|
21
|
+
{ long: "--duration", value_name: "span", value_type: "string", description: "Duration: min|mins|minute|minutes, h, d, w, mo, or ISO PT time; bare m is ambiguous; defaults to 1h" },
|
|
22
|
+
{ long: "--end", value_name: "when", value_type: "string", description: "End time (ISO or relative); overrides --duration" },
|
|
23
|
+
{ long: "--location", value_name: "value", value_type: "string", description: "Location" },
|
|
24
|
+
{ long: "--timezone", value_name: "value", value_type: "string", description: "IANA timezone (for example America/New_York)" },
|
|
25
|
+
{ long: "--all-day", value_type: "boolean", description: "Mark as an all-day event" },
|
|
26
|
+
];
|
|
27
|
+
|
|
28
|
+
/** Package-owned shortcuts retain the public SDK operation identities and flags. */
|
|
29
|
+
export const schedulingCommandDefinitions: Omit<CommandDefinition, "run">[] = [
|
|
30
|
+
...(["meet", "event"] as const).map((name): Omit<CommandDefinition, "run"> => ({
|
|
31
|
+
name,
|
|
32
|
+
action: name,
|
|
33
|
+
tier: "standard",
|
|
34
|
+
family: "automation",
|
|
35
|
+
description: `Create a ${name === "meet" ? "Meeting" : "Event"} with a start time and duration.`,
|
|
36
|
+
arguments: [{ name: "title", required: true, description: "Item title" }],
|
|
37
|
+
flags: [...eventFlags, ...commonFlags],
|
|
38
|
+
})),
|
|
39
|
+
{
|
|
40
|
+
name: "remind",
|
|
41
|
+
action: "remind",
|
|
42
|
+
tier: "standard",
|
|
43
|
+
family: "automation",
|
|
44
|
+
description: "Create a Reminder from a single point in time.",
|
|
45
|
+
arguments: [{ name: "title", required: true, description: "Item title" }],
|
|
46
|
+
flags: [
|
|
47
|
+
{ long: "--at", value_name: "when", value_type: "string", description: "Reminder time (ISO, now, or relative +2d); defaults to +1d" },
|
|
48
|
+
{ long: "--text", value_name: "value", value_type: "string", description: "Reminder text; defaults to the title" },
|
|
49
|
+
...commonFlags,
|
|
50
|
+
],
|
|
51
|
+
},
|
|
52
|
+
];
|
|
@@ -10,6 +10,7 @@ import type {
|
|
|
10
10
|
} from "@unbrained/pm-cli/sdk";
|
|
11
11
|
import type { CalendarOptions } from "@unbrained/pm-cli/sdk/runtime";
|
|
12
12
|
import { renderCalendarPackageOutput, runCalendarPackage } from "./runtime.ts";
|
|
13
|
+
import { schedulingCommands } from "./shortcuts.ts";
|
|
13
14
|
|
|
14
15
|
const CALENDAR_VIEW_NAMES = ["agenda", "day", "week", "month"] as const;
|
|
15
16
|
|
|
@@ -278,6 +279,7 @@ function calendarCommand(name: "calendar" | "cal"): CommandDefinition {
|
|
|
278
279
|
export function activate(api: ExtensionApi): void {
|
|
279
280
|
api.registerCommand(calendarCommand("calendar"));
|
|
280
281
|
api.registerCommand(calendarCommand("cal"));
|
|
282
|
+
for (const command of schedulingCommands) api.registerCommand(command);
|
|
281
283
|
api.registerService("output_format", (context) => {
|
|
282
284
|
const rendered = renderCalendarPackageOutput(
|
|
283
285
|
context as ServiceOverrideContext,
|
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
"entry": "./index.ts",
|
|
5
5
|
"priority": 0,
|
|
6
6
|
"trusted": true,
|
|
7
|
-
"sandbox_profile": "
|
|
7
|
+
"sandbox_profile": "restricted",
|
|
8
8
|
"permissions": {
|
|
9
9
|
"fs_read": true,
|
|
10
|
-
"fs_write":
|
|
10
|
+
"fs_write": true,
|
|
11
11
|
"network": false,
|
|
12
12
|
"env_read": true,
|
|
13
13
|
"env_write": false,
|
|
@@ -17,6 +17,6 @@
|
|
|
17
17
|
"manifest_version": 1,
|
|
18
18
|
"pm_min_version": "2026.6.24",
|
|
19
19
|
"activation": {
|
|
20
|
-
"commands": ["cal", "calendar"]
|
|
20
|
+
"commands": ["cal", "calendar", "meet", "event", "remind"]
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module packages/pm-calendar/extensions/calendar/shortcuts
|
|
3
|
+
*
|
|
4
|
+
* Binds package-owned scheduling declarations to the public SDK mutation paths.
|
|
5
|
+
*/
|
|
6
|
+
import { runEvent, runMeet, runRemind, type CommandDefinition } from "@unbrained/pm-cli/sdk";
|
|
7
|
+
import { schedulingCommandDefinitions } from "./command-definitions.ts";
|
|
8
|
+
|
|
9
|
+
/** Scheduling handlers preserve native SDK validation, history, and output receipts. */
|
|
10
|
+
export const schedulingCommands: CommandDefinition[] = schedulingCommandDefinitions.map((definition) => ({
|
|
11
|
+
...definition,
|
|
12
|
+
run: (context) => (
|
|
13
|
+
definition.name === "meet" ? runMeet : definition.name === "event" ? runEvent : runRemind
|
|
14
|
+
)(context.args[0], context.options, context.global),
|
|
15
|
+
}));
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unbrained/pm-digital-twin",
|
|
3
|
-
"version": "2026.9.
|
|
3
|
+
"version": "2026.9.19",
|
|
4
4
|
"private": true,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Beyond-PM exemplar: a temporal production-facility digital twin built entirely on public pm SDK and extension primitives.",
|