@unbrained/pm-cli 2026.9.17 → 2026.9.18
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 +29 -0
- package/dist/cli/register-operations.js +1 -1
- package/dist/cli-bundle/bundle-manifest.json +147 -147
- package/dist/cli-bundle/chunks/{chunk-Q6KPZGMP.js → chunk-AOD5WE6U.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-YZXB4XGA.js → chunk-CA5DRNGA.js} +29 -29
- package/dist/cli-bundle/chunks/{chunk-UJSB6NO6.js → chunk-CI2JCBN2.js} +75 -75
- package/dist/cli-bundle/chunks/{chunk-5ZY4WE3F.js → chunk-FZZVWWQP.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-LD2FH2YE.js → chunk-GRFRKHFC.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-IPR2ICDO.js +20 -0
- package/dist/cli-bundle/chunks/{chunk-UF75LUAK.js → chunk-T4J2X3RK.js} +63 -63
- package/dist/cli-bundle/chunks/{chunk-T526C5DX.js → chunk-WD7BQXA7.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-CPFBDM53.js → chunk-WUDF7HWM.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-X2EVS624.js +3 -0
- package/dist/cli-bundle/chunks/{chunk-G2IJF244.js → chunk-XFGWFVR3.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-Y2OK7IAD.js +8 -0
- package/dist/cli-bundle/chunks/{register-list-query-ISM35VIX.js → register-list-query-43EQISX7.js} +2 -2
- package/dist/cli-bundle/chunks/{register-mutation-KHMBJJS6.js → register-mutation-TSZNAKEU.js} +2 -2
- package/dist/cli-bundle/chunks/register-operations-KFZIKATY.js +2 -0
- package/dist/cli-bundle/chunks/{register-setup-YAURJMY5.js → register-setup-KTJ4ZE65.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-7ZC4CKOX.js → chunk-246P5AK7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-7D6M45AN.js +30 -0
- package/dist/cli-bundle/focused-chunks/{chunk-BFUXTNZU.js → chunk-7UZHYT5B.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-JZSLDLR4.js → chunk-BVOQRMHF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-LNM3BS45.js → chunk-C6SH62BX.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-267N774W.js → chunk-GEFWBVPQ.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-7S7XWMXC.js → chunk-HRANNGHM.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-GKSAMNBG.js → chunk-LG3SYXBX.js} +16 -16
- package/dist/cli-bundle/focused-chunks/{chunk-OWDDVMAP.js → chunk-LI6IGGB3.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-WUMGGQYN.js → chunk-MMX7BQLH.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-NOK652OP.js → chunk-PNCUNPSA.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-OCTTDZOU.js → chunk-QKG7JD34.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-G4TKJZ4A.js → chunk-QVVOXVYI.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-IVWUQE7T.js → chunk-QYQFBJXD.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-5KYHDFDN.js → chunk-YJYSFWSW.js} +3 -3
- package/dist/cli-bundle/focused-chunks/chunk-ZDX2BCOT.js +12 -0
- package/dist/cli-bundle/main.js +2 -2
- package/dist/cli-bundle/sdk-authoring.js +1 -1
- package/dist/cli-bundle/sdk-contracts.js +1 -1
- package/dist/cli-bundle/sdk-core.js +25 -25
- package/dist/cli-bundle/sdk-governance.js +1 -1
- package/dist/cli-bundle/sdk-graph.js +1 -1
- package/dist/cli-bundle/sdk-merge.js +24 -24
- package/dist/cli-bundle/sdk-query.js +1 -1
- package/dist/cli-bundle/sdk-runtime.js +1 -1
- package/dist/cli-bundle/sdk-testing.js +1 -1
- package/dist/cli-bundle/sdk.js +1 -1
- package/dist/core/config/nested-settings.js +1 -1
- package/dist/core/shared/secret-rules.d.ts +110 -0
- package/dist/core/shared/secret-rules.js +2 -0
- 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/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/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/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/MUTATION_INTEGRITY.md +36 -4
- package/docs/NEXT_SELECTION_BUDGETS.md +93 -0
- package/docs/PACKED_FIRST_RUN.md +8 -4
- package/docs/README.md +2 -0
- package/docs/READ_OUTPUT_CONTRACTS.md +8 -4
- 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 +10 -8
- 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/register-operations-HHDROJD6.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-5FSGN4MP.js +0 -12
- package/dist/cli-bundle/focused-chunks/chunk-Z4PWEIMX.js +0 -30
|
@@ -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.18"
|
|
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.18",
|
|
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.18",
|
|
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.
|
|
224
|
+
"@sentry/cli": "^3.8.0",
|
|
223
225
|
"@types/node": "^26.5.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.18",
|
|
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.",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pm-claude",
|
|
3
3
|
"description": "Native pm CLI integration for Claude Code — 28 MCP tools, 5 workflow skills, 14 slash commands, 4 subagents (coordinator, delivery-chain, triage, verification), hybrid TUI task tracking (pm as persistent store + Claude Code task panel as live view), session context injection, and full git-based project management without leaving Claude Code.",
|
|
4
|
-
"version": "2026.9.
|
|
4
|
+
"version": "2026.9.18",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "unbrained",
|
|
7
7
|
"url": "https://github.com/unbraind/pm-cli"
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { mkdir, readFile, realpath, rm, writeFile } from "node:fs/promises";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import { setTimeout as delay } from "node:timers/promises";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Hold an exclusive checkout lease through a complete producer or consumer.
|
|
8
|
+
* Never steal a lock by age: a slow compiler or test is still its owner.
|
|
9
|
+
* Nested read-only runners may reuse the parent's opaque, live-owner receipt.
|
|
10
|
+
*/
|
|
11
|
+
export async function withBuildLease(root, operation, options = {}) {
|
|
12
|
+
const directory = path.join(await realpath(root), ".cache", "build-lease");
|
|
13
|
+
const ownerFile = path.join(directory, "owner.json");
|
|
14
|
+
if (options.inherited) {
|
|
15
|
+
const owner = JSON.parse(await readFile(ownerFile, "utf8"));
|
|
16
|
+
if (owner.token !== options.inherited || !Number.isSafeInteger(owner.pid) || owner.pid <= 0) {
|
|
17
|
+
throw new Error("Invalid inherited build lease; run validation from an independent shell.");
|
|
18
|
+
}
|
|
19
|
+
process.kill(owner.pid, 0);
|
|
20
|
+
return operation(owner.token);
|
|
21
|
+
}
|
|
22
|
+
await mkdir(path.dirname(directory), { recursive: true });
|
|
23
|
+
const deadline = Date.now() + (options.timeoutMs ?? 1_200_000);
|
|
24
|
+
for (;;) {
|
|
25
|
+
try {
|
|
26
|
+
await mkdir(directory);
|
|
27
|
+
break;
|
|
28
|
+
} catch (error) {
|
|
29
|
+
if (error.code !== "EEXIST") throw error;
|
|
30
|
+
if (Date.now() >= deadline) {
|
|
31
|
+
throw new Error("Timed out waiting for build lease. Check .cache/build-lease/owner.json; remove an abandoned lease only after confirming its producer and consumers have stopped.", { cause: error });
|
|
32
|
+
}
|
|
33
|
+
await delay(Math.min(100, Math.max(1, deadline - Date.now())));
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const token = randomUUID();
|
|
37
|
+
try {
|
|
38
|
+
await writeFile(ownerFile, JSON.stringify({ token, pid: process.pid }), "utf8");
|
|
39
|
+
return await operation(token);
|
|
40
|
+
} finally {
|
|
41
|
+
await rm(directory, { recursive: true, force: true });
|
|
42
|
+
}
|
|
43
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
import { spawn } from "node:child_process";
|
|
4
|
+
import { rm, writeFile } from "node:fs/promises";
|
|
5
|
+
import path from "node:path";
|
|
6
|
+
import { pathToFileURL } from "node:url";
|
|
7
|
+
import { withBuildLease } from "./build-lease.mjs";
|
|
8
|
+
|
|
9
|
+
/** Run each build stage under one lease, retaining a failure marker until a complete rebuild. */
|
|
10
|
+
export async function main(root = process.cwd()) {
|
|
11
|
+
if (process.env.PM_BUILD_CONSUMER_LEASE) {
|
|
12
|
+
throw new Error("Cannot rebuild dist inside a validation consumer lease. Build before starting tests.");
|
|
13
|
+
}
|
|
14
|
+
return withBuildLease(root, async () => {
|
|
15
|
+
const incomplete = path.join(root, ".cache", "build-incomplete");
|
|
16
|
+
await writeFile(incomplete, "Build has not completed. Run pnpm build before consuming dist.\n");
|
|
17
|
+
for (const args of [
|
|
18
|
+
["scripts/prepare-build-cache.mjs"],
|
|
19
|
+
["node_modules/typescript/bin/tsc", "-p", "tsconfig.json"],
|
|
20
|
+
["scripts/bundle-cli.mjs"],
|
|
21
|
+
["scripts/finalize-build.mjs"],
|
|
22
|
+
]) {
|
|
23
|
+
const code = await new Promise((resolve, reject) => {
|
|
24
|
+
const child = spawn(process.execPath, args, { cwd: root, stdio: "inherit" });
|
|
25
|
+
child.once("error", reject);
|
|
26
|
+
child.once("close", (status, signal) => resolve(signal ? 1 : (status ?? 1)));
|
|
27
|
+
});
|
|
28
|
+
if (code !== 0) return code;
|
|
29
|
+
}
|
|
30
|
+
await rm(incomplete);
|
|
31
|
+
return 0;
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
|
|
36
|
+
main().then((code) => { process.exitCode = code; }).catch((error) => {
|
|
37
|
+
console.error(error);
|
|
38
|
+
process.exitCode = 1;
|
|
39
|
+
});
|
|
40
|
+
}
|