@unbrained/pm-cli 2026.8.19 → 2026.8.20
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 +19 -0
- package/dist/cli/register-list-query.js +12 -10
- package/dist/cli/register-structured-mutation.d.ts +2 -0
- package/dist/cli/register-structured-mutation.js +29 -6
- package/dist/cli-bundle/bundle-manifest.json +151 -143
- package/dist/cli-bundle/chunks/{chunk-4THEB6PD.js → chunk-2RDVGYWE.js} +12 -12
- package/dist/cli-bundle/chunks/{chunk-BHYMXLAE.js → chunk-4GB2LTOQ.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-TOXJM4WA.js → chunk-7BRF2BX2.js} +2 -2
- package/dist/cli-bundle/chunks/chunk-BLVQHFSY.js +35 -0
- package/dist/cli-bundle/chunks/chunk-CU25EQVV.js +5 -0
- package/dist/cli-bundle/chunks/{chunk-4NRRH7AM.js → chunk-K3EN3LK2.js} +2 -2
- package/dist/cli-bundle/chunks/{chunk-OIOKV6NO.js → chunk-L4LGPBJU.js} +49 -49
- package/dist/cli-bundle/chunks/chunk-RS3IV2R6.js +197 -0
- package/dist/cli-bundle/chunks/chunk-TSMWLCHS.js +3 -0
- package/dist/cli-bundle/chunks/chunk-US2ZQW2M.js +77 -0
- package/dist/cli-bundle/chunks/{chunk-QXSH7BLM.js → chunk-XYDDWBZN.js} +2 -2
- package/dist/cli-bundle/chunks/register-list-query-JSAQCVOC.js +11 -0
- package/dist/cli-bundle/chunks/{register-mutation-AUWVCW4M.js → register-mutation-XJPAW63D.js} +20 -20
- package/dist/cli-bundle/chunks/{register-operations-PZQPHXW5.js → register-operations-DSOSB2XQ.js} +2 -2
- package/dist/cli-bundle/chunks/{register-setup-I4LUHGVW.js → register-setup-QUR6QL2C.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-DKPLYW3L.js → chunk-325UXIO7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-5L7M4AI7.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-EF6ZS5GH.js → chunk-6AHG2YW7.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-MCZXYZAF.js → chunk-AZBACT5T.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-VXDSU5MC.js → chunk-BLJCGGID.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-FUREQLQN.js +18 -0
- package/dist/cli-bundle/focused-chunks/{chunk-US7VEYZG.js → chunk-G3C5ERXG.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-ZBIQQYMI.js → chunk-GXWQBE3T.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-JDOMQ7VQ.js → chunk-JWKEDZJI.js} +3 -3
- package/dist/cli-bundle/focused-chunks/chunk-KYZ6JGPL.js +155 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ESISGDAY.js → chunk-M32HFIQB.js} +2 -2
- package/dist/cli-bundle/focused-chunks/{chunk-EXBCLIBU.js → chunk-OM65KHGF.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-Q47EX4DI.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-BJRYFVSH.js → chunk-RIHDMCUM.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-T4ZFY7ZJ.js +16 -0
- package/dist/cli-bundle/focused-chunks/chunk-TDR5OGG3.js +2 -0
- package/dist/cli-bundle/focused-chunks/{chunk-ODHQEECS.js → chunk-UGSS4F5X.js} +2 -2
- package/dist/cli-bundle/focused-chunks/chunk-Z3PLWSGM.js +2 -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 +2 -2
- package/dist/cli-bundle/sdk-core.js +41 -41
- 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 +31 -31
- 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 +5 -5
- package/dist/core/output/mutation-projection.js +26 -2
- package/dist/core/shared/constants.d.ts +1 -5
- package/dist/core/shared/constants.js +3 -81
- package/dist/core/shared/item-metadata-contract.d.ts +14 -0
- package/dist/core/shared/item-metadata-contract.js +90 -0
- package/dist/core/store/item-store.d.ts +60 -0
- package/dist/core/store/item-store.js +22 -5
- package/dist/sdk/agent/closed-domain-contracts.d.ts +25 -0
- package/dist/sdk/agent/closed-domain-contracts.js +140 -0
- package/dist/sdk/agent/refusal-closure.d.ts +13 -1
- package/dist/sdk/agent/refusal-closure.js +45 -3
- package/dist/sdk/agent/refusal-reachability.d.ts +26 -0
- package/dist/sdk/agent/refusal-reachability.js +26 -2
- package/dist/sdk/agent-capability-contracts.js +6 -11
- package/dist/sdk/cli-contracts/completeness.js +8 -2
- package/dist/sdk/cli-contracts/enum-contracts.d.ts +4 -2
- package/dist/sdk/cli-contracts/enum-contracts.js +16 -6
- package/dist/sdk/cli-contracts/flag-contracts.d.ts +2 -0
- package/dist/sdk/cli-contracts/flag-contracts.js +11 -2
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.d.ts +19 -2
- package/dist/sdk/cli-contracts/flag-lexicon-contracts.js +105 -5
- package/dist/sdk/cli-contracts/grammar-contracts.d.ts +2 -2
- package/dist/sdk/cli-contracts/grammar-contracts.js +5 -2
- package/dist/sdk/cli-contracts/runtime-contracts.js +7 -3
- package/dist/sdk/cli-contracts/tool-schema.js +7 -2
- package/dist/sdk/cli-contracts.d.ts +2 -2
- package/dist/sdk/cli-contracts.js +4 -4
- package/dist/sdk/contracts.d.ts +1 -0
- package/dist/sdk/contracts.js +3 -2
- package/dist/sdk/core.d.ts +1 -1
- package/dist/sdk/core.js +3 -3
- package/dist/sdk/generated/generated-error-code-catalog-part-1.js +74 -2
- package/dist/sdk/generated/generated-error-code-catalog-part-2.js +112 -40
- package/dist/sdk/index.d.ts +5 -3
- package/dist/sdk/index.js +6 -4
- package/dist/sdk/init-agent-guidance.d.ts +5 -3
- package/dist/sdk/init-agent-guidance.js +69 -9
- package/dist/sdk/lifecycle/mcp-actions.d.ts +18 -0
- package/dist/sdk/lifecycle/mcp-actions.js +52 -0
- package/dist/sdk/lifecycle/reopen.d.ts +44 -0
- package/dist/sdk/lifecycle/reopen.js +69 -0
- package/dist/sdk/lifecycle/update.d.ts +31 -0
- package/dist/sdk/lifecycle/update.js +95 -13
- package/dist/sdk/query/get.d.ts +1 -1
- package/dist/sdk/query/get.js +18 -52
- package/dist/sdk/query/list.d.ts +7 -21
- package/dist/sdk/query/list.js +35 -49
- package/dist/sdk/query/projection-contracts.d.ts +33 -0
- package/dist/sdk/query/projection-contracts.js +185 -0
- package/dist/sdk/query/search-contracts.d.ts +2 -1
- package/dist/sdk/query/search-contracts.js +18 -87
- package/dist/sdk/query/search.d.ts +15 -0
- package/dist/sdk/query/search.js +31 -5
- package/dist/sdk/runtime-primitives.d.ts +1 -1
- package/dist/sdk/runtime-primitives.js +3 -3
- package/dist/sdk/runtime.d.ts +6 -0
- package/dist/sdk/runtime.js +18 -14
- package/dist/sdk/similarity.d.ts +13 -0
- package/dist/sdk/similarity.js +32 -6
- package/docs/COMMANDS.md +13 -1
- package/docs/README.md +1 -0
- package/docs/RECURRENCE_RECOVERY_CONTRACTS.md +114 -0
- package/docs/SDK.md +10 -2
- package/docs/SDK_CONTEXT_INTEGRITY.md +45 -0
- package/docs/generated/AGENT_COMMAND_SURFACE.md +1 -1
- package/docs/performance/sdk-entrypoint-import-costs.md +14 -21
- package/marketplace.json +2 -2
- package/package.json +5 -5
- package/packages/pm-beads/package.json +1 -1
- package/packages/pm-calendar/package.json +1 -1
- package/packages/pm-command-kit/package.json +1 -1
- package/packages/pm-digital-twin/package.json +1 -1
- package/packages/pm-governance-audit/package.json +1 -1
- package/packages/pm-guide-shell/package.json +1 -1
- package/packages/pm-kanban/package.json +1 -1
- package/packages/pm-lifecycle-hooks/package.json +1 -1
- package/packages/pm-linked-test-adapters/package.json +1 -1
- package/packages/pm-search-advanced/package.json +1 -1
- package/packages/pm-templates/package.json +1 -1
- package/packages/pm-todos/package.json +1 -1
- package/packages/pm-vcs/package.json +1 -1
- package/plugins/pm-claude/.claude-plugin/plugin.json +1 -1
- package/plugins/pm-codex/.codex-plugin/plugin.json +1 -1
- package/sdk/public-surface.json +387 -25
- package/dist/cli-bundle/chunks/chunk-GWMXAQOD.js +0 -197
- package/dist/cli-bundle/chunks/chunk-HVFQTLYM.js +0 -35
- package/dist/cli-bundle/chunks/chunk-OI4XI562.js +0 -5
- package/dist/cli-bundle/chunks/chunk-SARFF5H5.js +0 -3
- package/dist/cli-bundle/chunks/chunk-YBMRWW4E.js +0 -77
- package/dist/cli-bundle/chunks/register-list-query-Y56KINDU.js +0 -11
- package/dist/cli-bundle/focused-chunks/chunk-34QBIYZI.js +0 -155
- package/dist/cli-bundle/focused-chunks/chunk-L623ZPNK.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-PRHY2IMX.js +0 -18
- package/dist/cli-bundle/focused-chunks/chunk-RZU5U6Q7.js +0 -2
- package/dist/cli-bundle/focused-chunks/chunk-YBMGXBFV.js +0 -16
- package/dist/cli-bundle/focused-chunks/chunk-YLVBJ6GF.js +0 -2
|
@@ -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.8.
|
|
9
|
+
"version": "2026.8.20"
|
|
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.8.
|
|
16
|
+
"version": "2026.8.20",
|
|
17
17
|
"author": {
|
|
18
18
|
"name": "unbrained",
|
|
19
19
|
"url": "https://github.com/unbraind/pm-cli"
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,24 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026.8.20 - 2026-08-20
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- GH-796: no reopen transition for terminal items, so recurrence is recorded as a duplicate instead of a reopening ([pm-83cz0o](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/features/pm-83cz0o.toon))
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- GH-529: init --agent-guidance emits run-tests.mjs linked-test example that may not exist in the target repo ([pm-surv](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-surv.toon))
|
|
12
|
+
- GH-527: semantic staleness warning recommends 'pm reindex' which is absent from the base install ([pm-qljv](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-qljv.toon))
|
|
13
|
+
- CodSpeed instrument cache can stall simulation setup until the hosted benchmark gate is canceled ([pm-w16muu](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-w16muu.toon))
|
|
14
|
+
- Make context intents and low-token projection fields fully discoverable ([pm-gy885b](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/issues/pm-gy885b.toon))
|
|
15
|
+
|
|
16
|
+
### Other
|
|
17
|
+
|
|
18
|
+
- Refresh compatible Vitest 4.1.11 and jscpd 5.0.16 patches ([pm-n5ysuk](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-n5ysuk.toon))
|
|
19
|
+
- Consistent flag spellings across commands with preserved aliases and enforced budgets ([pm-fs8q9x](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/tasks/pm-fs8q9x.toon))
|
|
20
|
+
- Refresh compatible Greptile 3.4.1 review tooling ([pm-obmgi3](https://github.com/unbraind/pm-cli/blob/main/.agents/pm/chores/pm-obmgi3.toon))
|
|
21
|
+
|
|
3
22
|
## 2026.8.19 - 2026-08-19
|
|
4
23
|
|
|
5
24
|
### Fixed
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="102d4534-fb3a-57a3-91d1-db344492b812")}catch(e){}}();
|
|
3
3
|
import { EXIT_CODE, PmCliError, readSettings, renderRowsAsCsv, renderRowsAsTable, resolvePmRoot, } from "../sdk/runtime-primitives.js";
|
|
4
4
|
import { renderPmCommandAliasMigrationHint, resolvePmCommandAlias, } from "../sdk/cli-contracts.js";
|
|
5
5
|
import { EVAL_QUERY_SET_SCHEMA_ID } from "../sdk/eval.js";
|
|
6
6
|
import { applyContextIntentProjection } from "../sdk/context-intent-contracts.js";
|
|
7
|
+
import { renderPmClosedDomainHelp } from "../sdk/agent/closed-domain-contracts.js";
|
|
7
8
|
import { serializeNdjsonRows, serializeNdjsonStream, } from "../sdk/output.js";
|
|
8
9
|
import { listMutationEvents, subscribeMutationEventBatches, subscribeMutationEvents, } from "../sdk/mutation-events.js";
|
|
9
10
|
import { runActivity } from "./commands/activity.js";
|
|
@@ -191,6 +192,7 @@ async function runRegisteredListCommand(params) {
|
|
|
191
192
|
}
|
|
192
193
|
}
|
|
193
194
|
applyDefaultListProjection(listOptions, effectiveName);
|
|
195
|
+
Object.assign(listOptions, { projectionCommand: effectiveName });
|
|
194
196
|
if (effectiveExcludeTerminal)
|
|
195
197
|
listOptions.excludeTerminal = true;
|
|
196
198
|
listOptions.dependencyBlocked = effectiveDependencyBlocked;
|
|
@@ -213,7 +215,7 @@ function registerListCommand(program, descriptor) {
|
|
|
213
215
|
command.option("--all", "Include every lifecycle status");
|
|
214
216
|
}
|
|
215
217
|
command
|
|
216
|
-
.option("--for <intent>",
|
|
218
|
+
.option("--for <intent>", `Apply a declared context intent projection. ${renderPmClosedDomainHelp("list", "--for")}`)
|
|
217
219
|
.option("--token-budget <n>", "Override the selected intent's maximum estimated output tokens")
|
|
218
220
|
.option("--type <value>", "Filter by item type (repeatable or comma-separated; matches any)", collect)
|
|
219
221
|
.option("--tag <value>", "Filter by tag (repeatable or comma-separated; matches any)", collect)
|
|
@@ -245,7 +247,7 @@ function registerListCommand(program, descriptor) {
|
|
|
245
247
|
.option("--compact", "Render compact list projection fields (mutually exclusive with --brief/--full/--fields)")
|
|
246
248
|
.option("--brief", "Ultra-compact output: id, status, type, title only (agent-optimized, mutually exclusive with --compact/--full/--fields)")
|
|
247
249
|
.option("--full", "Render full list projection fields (mutually exclusive with --compact/--brief/--fields)")
|
|
248
|
-
.option("--fields <value>",
|
|
250
|
+
.option("--fields <value>", `Render custom comma-separated list fields (mutually exclusive with --compact/--brief/--full). ${renderPmClosedDomainHelp(name, "--fields")}`)
|
|
249
251
|
.option("--sort <value>", "Sort field: priority|deadline|updated_at|created_at|title|parent (aliases: updated, created)")
|
|
250
252
|
.option("--order <value>", "Sort order: asc|desc (requires --sort)")
|
|
251
253
|
.option("--tree", "Render rows in parent/child tree order")
|
|
@@ -696,7 +698,7 @@ export function registerListQueryCommands(program, options) {
|
|
|
696
698
|
.command("context")
|
|
697
699
|
.alias("ctx")
|
|
698
700
|
.description("Show a token-efficient project context snapshot for next-work decisions.")
|
|
699
|
-
.option("--for <intent>",
|
|
701
|
+
.option("--for <intent>", `Apply a declared context intent projection. ${renderPmClosedDomainHelp("context", "--for")}`)
|
|
700
702
|
.option("--date <value>", "Anchor date/time for agenda window calculations (ISO/date string or relative)")
|
|
701
703
|
.option("--from <value>", "Agenda lower bound (ISO/date string or relative)")
|
|
702
704
|
.option("--to <value>", "Agenda upper bound (ISO/date string or relative)")
|
|
@@ -732,7 +734,7 @@ export function registerListQueryCommands(program, options) {
|
|
|
732
734
|
const nextCommand = program
|
|
733
735
|
.command("next")
|
|
734
736
|
.description("Recommend the next actionable (unblocked, ready) work item with rationale + blocked companion.")
|
|
735
|
-
.option("--for <intent>",
|
|
737
|
+
.option("--for <intent>", `Apply a declared context intent projection. ${renderPmClosedDomainHelp("next", "--for")}`)
|
|
736
738
|
.option("--type <value>", "Filter candidate items by type")
|
|
737
739
|
.option("--tag <value>", "Filter candidate items by tag")
|
|
738
740
|
.option("--priority <value>", "Filter candidate items by priority")
|
|
@@ -761,7 +763,7 @@ export function registerListQueryCommands(program, options) {
|
|
|
761
763
|
.argument("<keywords...>", "Keyword query tokens")
|
|
762
764
|
.description("Search items with keyword, semantic, or hybrid retrieval. Inline field:value tokens " +
|
|
763
765
|
"(tag:/status:/type:/priority:) in the query are parsed as filters, e.g. 'auth tag:area:search status:open'.")
|
|
764
|
-
.option("--for <intent>",
|
|
766
|
+
.option("--for <intent>", `Apply a declared context intent projection. ${renderPmClosedDomainHelp("search", "--for")}`)
|
|
765
767
|
.option("--token-budget <n>", "Override the selected intent's maximum estimated output tokens")
|
|
766
768
|
.option("--mode <value>", "Search mode: keyword|semantic|hybrid (default: keyword)")
|
|
767
769
|
.option("--semantic", "Shorthand for --mode semantic")
|
|
@@ -790,7 +792,7 @@ export function registerListQueryCommands(program, options) {
|
|
|
790
792
|
.option("--parent <value>", "Filter by parent item ID")
|
|
791
793
|
.option("--compact", "Render compact search hits (default; mutually exclusive with --full/--fields)")
|
|
792
794
|
.option("--full", "Render full search hits with nested item payloads (mutually exclusive with --compact/--fields)")
|
|
793
|
-
.option("--fields <value>",
|
|
795
|
+
.option("--fields <value>", `Render custom comma-separated search hit fields (mutually exclusive with --compact/--full). ${renderPmClosedDomainHelp("search", "--fields")}`)
|
|
794
796
|
.option("--format <value>", "Search output format override: json|ndjson|toon")
|
|
795
797
|
.option("--limit <n>", "Limit returned item count")
|
|
796
798
|
.option("--after <cursor>", "Continue after an opaque next_cursor from a previous search response");
|
|
@@ -815,11 +817,11 @@ export function registerListQueryCommands(program, options) {
|
|
|
815
817
|
const getCommand = program
|
|
816
818
|
.command("get")
|
|
817
819
|
.argument("<id>", "Item id")
|
|
818
|
-
.option("--for <intent>",
|
|
820
|
+
.option("--for <intent>", `Apply a declared context intent projection. ${renderPmClosedDomainHelp("get", "--for")}`)
|
|
819
821
|
.option("--token-budget <n>", "Override the selected intent's maximum estimated output tokens")
|
|
820
822
|
.option("--depth <value>", "Detail depth: brief|standard|deep|full (full aliases deep; default: standard)")
|
|
821
823
|
.option("--full", "Explicit full item read; equivalent to --depth deep (mutually exclusive with --depth/--fields)")
|
|
822
|
-
.option("--fields <value>",
|
|
824
|
+
.option("--fields <value>", `Render custom comma-separated item metadata fields. ${renderPmClosedDomainHelp("get", "--fields")}`)
|
|
823
825
|
.option("--tree", "Include descendants rooted at the requested item")
|
|
824
826
|
.option("--tree-depth <n>", "Maximum subtree depth for --tree descendants")
|
|
825
827
|
.option("--at <version-or-timestamp>", "Reconstruct a verified historical item state without mutating it")
|
|
@@ -922,4 +924,4 @@ export const _testOnlyRegisterListQuery = {
|
|
|
922
924
|
parseListFormat,
|
|
923
925
|
};
|
|
924
926
|
//# sourceMappingURL=register-list-query.js.map
|
|
925
|
-
//# debugId=
|
|
927
|
+
//# debugId=102d4534-fb3a-57a3-91d1-db344492b812
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
* Registers the noun-first CLI adapter for public SDK atomic item mutations.
|
|
5
5
|
*/
|
|
6
6
|
import type { Command } from "commander";
|
|
7
|
+
declare function runItemReopenAction(id: string, reason: string, options: Record<string, unknown>, command: Command): Promise<void>;
|
|
7
8
|
declare function runItemMutateAction(options: Record<string, unknown>, command: Command): Promise<void>;
|
|
8
9
|
declare function runItemCompleteAction(id: string, positionalReason: string | undefined, options: Record<string, unknown>, command: Command): Promise<void>;
|
|
9
10
|
/** Register `pm item mutate`, the stable noun-first atomic batch surface. */
|
|
@@ -12,5 +13,6 @@ export declare function registerStructuredMutationCommands(program: Command): vo
|
|
|
12
13
|
export declare const structuredMutationTestOnly: {
|
|
13
14
|
runItemCompleteAction: typeof runItemCompleteAction;
|
|
14
15
|
runItemMutateAction: typeof runItemMutateAction;
|
|
16
|
+
runItemReopenAction: typeof runItemReopenAction;
|
|
15
17
|
};
|
|
16
18
|
export {};
|
|
@@ -1,9 +1,23 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="3b23ded4-a821-5ff0-8783-927875d0457b")}catch(e){}}();
|
|
3
3
|
import { createStdinTokenResolver, EXIT_CODE, PmCliError, readSettings, resolveAuthor, resolvePmRoot, } from "../sdk/runtime-primitives.js";
|
|
4
4
|
import { buildItemCompletionMutations, commitItemCompletion, commitItemMutations, } from "../sdk/item-transaction.js";
|
|
5
|
+
import { runReopen } from "../sdk/lifecycle/reopen.js";
|
|
5
6
|
import { parseAtomicMutationControls, resolveItemMutationDocument, } from "../sdk/structured-mutations.js";
|
|
6
|
-
import { collect, getGlobalOptions, printResult, } from "./registration-helpers.js";
|
|
7
|
+
import { collect, getGlobalOptions, invalidateSearchCachesForMutation, printResult, } from "./registration-helpers.js";
|
|
8
|
+
async function runItemReopenAction(id, reason, options, command) {
|
|
9
|
+
const globalOptions = getGlobalOptions(command);
|
|
10
|
+
const result = await runReopen(id, reason, {
|
|
11
|
+
status: typeof options.status === "string" ? options.status : undefined,
|
|
12
|
+
author: typeof options.author === "string"
|
|
13
|
+
? options.author
|
|
14
|
+
: globalOptions.author,
|
|
15
|
+
message: typeof options.message === "string" ? options.message : undefined,
|
|
16
|
+
force: options.force === true,
|
|
17
|
+
}, globalOptions);
|
|
18
|
+
await invalidateSearchCachesForMutation(globalOptions, result);
|
|
19
|
+
printResult(result, globalOptions);
|
|
20
|
+
}
|
|
7
21
|
async function runItemMutateAction(options, command) {
|
|
8
22
|
const globalOptions = getGlobalOptions(command);
|
|
9
23
|
const input = await createStdinTokenResolver().resolveValue("-", "--stdin-json");
|
|
@@ -130,7 +144,15 @@ export function registerStructuredMutationCommands(program) {
|
|
|
130
144
|
const itemCommand = program.commands.find((command) => command.name() === "item") ??
|
|
131
145
|
program
|
|
132
146
|
.command("item")
|
|
133
|
-
.description("Run item lifecycle
|
|
147
|
+
.description("Run item lifecycle operations.");
|
|
148
|
+
itemCommand
|
|
149
|
+
.command("reopen <id> <reason>")
|
|
150
|
+
.option("--status <value>", "Active target status: open or in_progress")
|
|
151
|
+
.option("--message <value>", "Human-readable recurrence history message")
|
|
152
|
+
.option("--force", "Override ownership or stale-lock conflicts")
|
|
153
|
+
.option("--author <value>", "Mutation author")
|
|
154
|
+
.description("Reopen terminal work with recurrence evidence.")
|
|
155
|
+
.action(runItemReopenAction);
|
|
134
156
|
itemCommand
|
|
135
157
|
.command("mutate")
|
|
136
158
|
.requiredOption("--transaction-id <value>", "Stable idempotency key used to resume an interrupted batch")
|
|
@@ -140,7 +162,7 @@ export function registerStructuredMutationCommands(program) {
|
|
|
140
162
|
.option("--lock-ttl-seconds <n>", "Workspace transaction lock lifetime in seconds")
|
|
141
163
|
.option("--lock-wait-ms <n>", "Maximum time to wait for the workspace transaction lock")
|
|
142
164
|
.option("--author <value>", "Mutation author")
|
|
143
|
-
.description("Apply
|
|
165
|
+
.description("Apply SDK-backed mutations atomically.")
|
|
144
166
|
.action(runItemMutateAction);
|
|
145
167
|
itemCommand
|
|
146
168
|
.command("complete <id> [reason]")
|
|
@@ -162,13 +184,14 @@ export function registerStructuredMutationCommands(program) {
|
|
|
162
184
|
.option("--dry-run", "Validate and preview completion without writing")
|
|
163
185
|
.option("--force", "Override lifecycle and ownership conflicts")
|
|
164
186
|
.option("--author <value>", "Completion author")
|
|
165
|
-
.description("
|
|
187
|
+
.description("Close with evidence and release the claim.")
|
|
166
188
|
.action(runItemCompleteAction);
|
|
167
189
|
}
|
|
168
190
|
/** Internal action hooks used by exhaustive source-level registration tests. */
|
|
169
191
|
export const structuredMutationTestOnly = {
|
|
170
192
|
runItemCompleteAction,
|
|
171
193
|
runItemMutateAction,
|
|
194
|
+
runItemReopenAction,
|
|
172
195
|
};
|
|
173
196
|
//# sourceMappingURL=register-structured-mutation.js.map
|
|
174
|
-
//# debugId=
|
|
197
|
+
//# debugId=3b23ded4-a821-5ff0-8783-927875d0457b
|