pm-brief 2026.10.26 → 2026.10.28
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/CHANGELOG.md +39 -34
- package/README.md +86 -1
- package/dist/action.d.ts +105 -0
- package/dist/action.d.ts.map +1 -0
- package/dist/action.js +308 -0
- package/dist/action.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/docs/examples/action.md +65 -0
- package/manifest.json +1 -1
- package/package.json +8 -6
package/CHANGELOG.md
CHANGED
|
@@ -27,14 +27,14 @@
|
|
|
27
27
|
- Record acknowledged handoff contracts against item revisions ([pm-brief-cjxn](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/features/pm-brief-cjxn.toon))
|
|
28
28
|
- Compare recorded decision alternatives with cited evidence ([pm-brief-ktjl](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/features/pm-brief-ktjl.toon))
|
|
29
29
|
|
|
30
|
-
### Fixed
|
|
31
|
-
|
|
32
|
-
- Daily Release workflow is failing ([pm-brief-github-7e06b2eb1b44-170](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-github-7e06b2eb1b44-170.toon))
|
|
33
|
-
|
|
34
30
|
### Other
|
|
35
31
|
|
|
36
32
|
- Verify evidence for tracker reconciliation review ([pm-brief-review165](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/chores/pm-brief-review165.toon))
|
|
37
33
|
|
|
34
|
+
### Closed
|
|
35
|
+
|
|
36
|
+
- Closed: Daily Release workflow is failing ([pm-brief-github-7e06b2eb1b44-170](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-github-7e06b2eb1b44-170.toon))
|
|
37
|
+
|
|
38
38
|
## 2026.10.23 - 2026-10-23
|
|
39
39
|
|
|
40
40
|
### Changed
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
|
|
71
71
|
- Enforce the chosen rendered brief token ceiling ([pm-brief-k8no](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/features/pm-brief-k8no.toon))
|
|
72
72
|
|
|
73
|
-
###
|
|
73
|
+
### Closed
|
|
74
74
|
|
|
75
|
-
- Enforce the requested brief budget after the final compaction step ([pm-brief-github-7e06b2eb1b44-135](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-github-7e06b2eb1b44-135.toon))
|
|
75
|
+
- Closed: Enforce the requested brief budget after the final compaction step ([pm-brief-github-7e06b2eb1b44-135](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-github-7e06b2eb1b44-135.toon))
|
|
76
76
|
|
|
77
77
|
## 2026.10.5 - 2026-10-05
|
|
78
78
|
|
|
@@ -122,22 +122,25 @@
|
|
|
122
122
|
|
|
123
123
|
## 2026.9.1 - 2026-09-01
|
|
124
124
|
|
|
125
|
-
### Fixed
|
|
126
|
-
|
|
127
|
-
- Daily Release workflow is failing ([pm-brief-github-7e06b2eb1b44-84](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-github-7e06b2eb1b44-84.toon))
|
|
128
|
-
- Adopt pm CLI 2026.8.30 and stop pinning which way the SDK handles an incomplete merge receipt ([pm-brief-00tc](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-00tc.toon))
|
|
129
|
-
|
|
130
125
|
### Other
|
|
131
126
|
|
|
132
127
|
- Reconcile the corrupt-receipt fixture comment with what the pinned SDK now does ([pm-brief-vc49](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/chores/pm-brief-vc49.toon))
|
|
133
128
|
|
|
129
|
+
### Closed
|
|
130
|
+
|
|
131
|
+
- Closed: Daily Release workflow is failing ([pm-brief-github-7e06b2eb1b44-84](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-github-7e06b2eb1b44-84.toon))
|
|
132
|
+
- Closed: Adopt pm CLI 2026.8.30 and stop pinning which way the SDK handles an incomplete merge receipt ([pm-brief-00tc](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-00tc.toon))
|
|
133
|
+
|
|
134
134
|
## 2026.8.31 - 2026-08-31
|
|
135
135
|
|
|
136
136
|
### Fixed
|
|
137
137
|
|
|
138
|
-
- Pin pm-changelog 2026.8.30 before the next release ([pm-brief-m4pi](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-m4pi.toon))
|
|
139
138
|
- CodeQL action updates split into mutually blocking pull requests ([pm-brief-eba7](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-eba7.toon))
|
|
140
139
|
|
|
140
|
+
### Closed
|
|
141
|
+
|
|
142
|
+
- Closed: Pin pm-changelog 2026.8.30 before the next release ([pm-brief-m4pi](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-m4pi.toon))
|
|
143
|
+
|
|
141
144
|
## 2026.8.29 - 2026-08-29
|
|
142
145
|
|
|
143
146
|
### Fixed
|
|
@@ -152,15 +155,15 @@
|
|
|
152
155
|
- Checkout release alert script from the default branch ([pm-brief-l5lh](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-l5lh.toon))
|
|
153
156
|
- Canonicalize the complete-corpus reader and adopt the current pm host contract ([pm-brief-v2ts](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-v2ts.toon))
|
|
154
157
|
|
|
155
|
-
### Security
|
|
156
|
-
|
|
157
|
-
- The identity gate deadlocks the one remediation its own failure message prescribes ([pm-brief-4yx9](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-4yx9.toon))
|
|
158
|
-
|
|
159
158
|
### Other
|
|
160
159
|
|
|
161
160
|
- Resolve PR \#79 review threads: hermetic release-alert evidence and audit timestamp correction ([pm-brief-zrpv](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/tasks/pm-brief-zrpv.toon))
|
|
162
161
|
- Alert on daily release failure and require merge drivers in CI ([pm-brief-javk](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/chores/pm-brief-javk.toon))
|
|
163
162
|
|
|
163
|
+
### Closed
|
|
164
|
+
|
|
165
|
+
- Closed: The identity gate deadlocks the one remediation its own failure message prescribes ([pm-brief-4yx9](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-4yx9.toon))
|
|
166
|
+
|
|
164
167
|
## 2026.8.17 - 2026-08-17
|
|
165
168
|
|
|
166
169
|
### Fixed
|
|
@@ -169,9 +172,9 @@
|
|
|
169
172
|
|
|
170
173
|
## 2026.8.16 - 2026-08-16
|
|
171
174
|
|
|
172
|
-
###
|
|
175
|
+
### Closed
|
|
173
176
|
|
|
174
|
-
- pm-brief consumes a truncated `pm list-all` answer as if it were complete ([pm-brief-g6ko](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-g6ko.toon))
|
|
177
|
+
- Closed: pm-brief consumes a truncated `pm list-all` answer as if it were complete ([pm-brief-g6ko](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-g6ko.toon))
|
|
175
178
|
|
|
176
179
|
## 2026.8.14 - 2026-08-14
|
|
177
180
|
|
|
@@ -233,13 +236,16 @@
|
|
|
233
236
|
|
|
234
237
|
### Fixed
|
|
235
238
|
|
|
236
|
-
- Merge-receipt display cap silently drops item warning markers past the tenth receipt ([pm-brief-8up0](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-8up0.toon))
|
|
237
239
|
- Merge-receipt read failures hard-fail every brief command ([pm-brief-a007](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-a007.toon))
|
|
238
240
|
|
|
239
241
|
### Other
|
|
240
242
|
|
|
241
243
|
- Adopt pm-cli 2026.7.28 ([pm-brief-owcy](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/chores/pm-brief-owcy.toon))
|
|
242
244
|
|
|
245
|
+
### Closed
|
|
246
|
+
|
|
247
|
+
- Closed: Merge-receipt display cap silently drops item warning markers past the tenth receipt ([pm-brief-8up0](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-8up0.toon))
|
|
248
|
+
|
|
243
249
|
## 2026.7.27 - 2026-07-27
|
|
244
250
|
|
|
245
251
|
### Added
|
|
@@ -260,42 +266,42 @@
|
|
|
260
266
|
|
|
261
267
|
- Add pm brief duplicates post-merge near-duplicate sweep ([pm-brief-58en](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/features/pm-brief-58en.toon))
|
|
262
268
|
|
|
263
|
-
### Fixed
|
|
264
|
-
|
|
265
|
-
- Documented install command fails: pm install github.com/unbraind/pm-brief cannot resolve an entry file ([pm-brief-xd8z](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-xd8z.toon))
|
|
266
|
-
|
|
267
269
|
### Other
|
|
268
270
|
|
|
269
271
|
- Enable governance duplicate-detection advisory mode and restore parent_reference=warn ([pm-brief-k39x](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/chores/pm-brief-k39x.toon))
|
|
270
272
|
|
|
273
|
+
### Closed
|
|
274
|
+
|
|
275
|
+
- Closed: Documented install command fails: pm install github.com/unbraind/pm-brief cannot resolve an entry file ([pm-brief-xd8z](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-xd8z.toon))
|
|
276
|
+
|
|
271
277
|
## 2026.7.25 - 2026-07-25
|
|
272
278
|
|
|
273
279
|
### Added
|
|
274
280
|
|
|
275
281
|
- pm brief diverge: pre-merge multi-agent item collision preview ([pm-brief-vj2y](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/features/pm-brief-vj2y.toon))
|
|
276
282
|
|
|
277
|
-
### Fixed
|
|
278
|
-
|
|
279
|
-
- CHANGELOG mislabels shipped 2026.7.23 work as Unreleased, leaving changelog:check red ([pm-brief-edam](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-edam.toon))
|
|
280
|
-
|
|
281
283
|
### Other
|
|
282
284
|
|
|
283
285
|
- Adopt --respect-item-release so release attribution matches the rest of the fleet ([pm-brief-ce55](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/chores/pm-brief-ce55.toon))
|
|
284
286
|
|
|
287
|
+
### Closed
|
|
288
|
+
|
|
289
|
+
- Closed: CHANGELOG mislabels shipped 2026.7.23 work as Unreleased, leaving changelog:check red ([pm-brief-edam](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-edam.toon))
|
|
290
|
+
|
|
285
291
|
## 2026.7.23 - 2026-07-23
|
|
286
292
|
|
|
287
293
|
### Added
|
|
288
294
|
|
|
289
295
|
- Add pm brief since delta command for agent re-orientation after parallel/merge work ([pm-brief-da2c](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/features/pm-brief-da2c.toon))
|
|
290
296
|
|
|
291
|
-
### Fixed
|
|
292
|
-
|
|
293
|
-
- Recommend pm merge reconcile (2026.7.22) over raw history-repair in Multi-agent merge safety docs ([pm-brief-lizi](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-lizi.toon))
|
|
294
|
-
|
|
295
297
|
### Other
|
|
296
298
|
|
|
297
299
|
- Adopt pm field-aware merge driver for multi-agent branch-merge safety ([pm-brief-m2gp](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/chores/pm-brief-m2gp.toon))
|
|
298
300
|
|
|
301
|
+
### Closed
|
|
302
|
+
|
|
303
|
+
- Closed: Recommend pm merge reconcile (2026.7.22) over raw history-repair in Multi-agent merge safety docs ([pm-brief-lizi](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-lizi.toon))
|
|
304
|
+
|
|
299
305
|
## 2026.7.14-1 - 2026-07-14
|
|
300
306
|
|
|
301
307
|
### Other
|
|
@@ -304,9 +310,9 @@
|
|
|
304
310
|
|
|
305
311
|
## 2026.7.14 - 2026-07-14
|
|
306
312
|
|
|
307
|
-
###
|
|
313
|
+
### Closed
|
|
308
314
|
|
|
309
|
-
- brief: blocked_by edges doubled in blockers/risks (dependencies + blocked_by both parsed) ([pm-brief-o4s9](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-o4s9.toon))
|
|
315
|
+
- Closed: brief: blocked_by edges doubled in blockers/risks (dependencies + blocked_by both parsed) ([pm-brief-o4s9](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/issues/pm-brief-o4s9.toon))
|
|
310
316
|
|
|
311
317
|
## 2026.7.11-2 - 2026-07-11
|
|
312
318
|
|
|
@@ -331,7 +337,6 @@
|
|
|
331
337
|
|
|
332
338
|
- Adversarial review pass 2026-07-10 ([pm-brief-kk7m](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/chores/pm-brief-kk7m.toon))
|
|
333
339
|
- Full-cycle hardening wave: pm-brief ([pm-brief-0dru](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/tasks/pm-brief-0dru.toon))
|
|
334
|
-
- Align pm-brief with pm CLI 2026.6.12 release readiness ([pm-brief-352i](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/tasks/pm-brief-352i.toon))
|
|
335
340
|
- Harden release bun-verify so registry-mirror lag cannot block the GitHub release ([pm-brief-93z7](https://github.com/unbraind/pm-brief/blob/main/.agents/pm/chores/pm-brief-93z7.toon))
|
|
336
341
|
|
|
337
342
|
## 2026.7.6 - 2026-07-06
|
package/README.md
CHANGED
|
@@ -726,10 +726,95 @@ source), or `budget` (increase the ceiling or supply a smaller brief). CLI
|
|
|
726
726
|
refusals exit 2 with `disclosure_<code>` and a remedy, without source text or
|
|
727
727
|
nested error details. See the [worked example and public-tracker replay](docs/examples/disclosure.md).
|
|
728
728
|
|
|
729
|
+
## Action prerequisite briefs
|
|
730
|
+
|
|
731
|
+
Ask for one intended native action and one exact item before attempting it:
|
|
732
|
+
|
|
733
|
+
```sh
|
|
734
|
+
pm brief action close project-123
|
|
735
|
+
pm --json brief action close project-123 --request '{"input":{"reason":"Verified delivery"},"requiredEvidence":[{"kind":"docs","ref":"docs/results.md"}]}'
|
|
736
|
+
pm brief action start-task project-123 --request '{"actor":"delivery-agent"}'
|
|
737
|
+
```
|
|
738
|
+
|
|
739
|
+
One call combines native command availability, SDK readiness and blocker
|
|
740
|
+
resolution, close evidence fields (`resolution`, `expected_result`,
|
|
741
|
+
`actual_result`), reason governance, workflow rules and explicitly declared
|
|
742
|
+
native evidence links. Satisfied fields are JSON Pointer references; their
|
|
743
|
+
bodies are never repeated. Link presence records linkage, not successful tests
|
|
744
|
+
or artifact verification. This composes core admission facts; pm-lint remains
|
|
745
|
+
the item quality diagnostic, and this command never chooses work.
|
|
746
|
+
|
|
747
|
+
Readiness is scoped to the action: explicit starting composes native claim and
|
|
748
|
+
update admission, including SDK-resolved type `command_option_policies`.
|
|
749
|
+
Dispatch roles, unfinished children and nonterminal status classifications do
|
|
750
|
+
not veto an explicit start. Closing uses native terminal-state and direct-child
|
|
751
|
+
facts. A decision, outcome gate, draft or blocked status alone does not prevent
|
|
752
|
+
an evidenced close. A claim principal without an assignee is historical metadata,
|
|
753
|
+
not live ownership; both actions check current assignee state.
|
|
754
|
+
|
|
755
|
+
Policy entries expose the SDK's effective `effect`. Advisory and warning findings
|
|
756
|
+
have `blocking: false`: their `missing`/`unresolved` states stay visible while
|
|
757
|
+
`ready` remains true if all mandatory prerequisites are satisfied. An omitted
|
|
758
|
+
`blocking` means the entry is mandatory. Workspace refusal requires both a
|
|
759
|
+
refusing rule and workspace enforcement; warning-only type transitions never
|
|
760
|
+
become required inputs. Type workflows govern the native start update, not a
|
|
761
|
+
direct close. Close evidence fields and unfinished children follow the native
|
|
762
|
+
`close_validation_default`: strict gates them, while warn/off retain non-blocking
|
|
763
|
+
diagnostics. Explicitly requested evidence and mandatory close reasons still gate.
|
|
764
|
+
|
|
765
|
+
Required update options are invocation inputs, even when the corresponding item
|
|
766
|
+
field already has a value. Start supplies its native status automatically;
|
|
767
|
+
`actor` supplies the author option. Other required start flags appear as missing
|
|
768
|
+
`option:<key>` entries with typed `unsupported` refusals and native remedies,
|
|
769
|
+
because this request does not accept arbitrary mutation options. Disabled
|
|
770
|
+
generated options and inconsistent policies also prevent readiness. Satisfied
|
|
771
|
+
generated status references use `native:start-task#/update/status`.
|
|
772
|
+
|
|
773
|
+
The typed SDK entry point is `buildActionPrerequisiteBrief(request, { pmRoot,
|
|
774
|
+
client })`. Pass the host's injected client when embedding. A standalone caller
|
|
775
|
+
can omit it to construct a tracker-bound public SDK client lazily after request
|
|
776
|
+
validation. No executable-path or symlink discovery is involved.
|
|
777
|
+
|
|
778
|
+
`parseActionPrerequisiteRequest` applies `ACTION_PREREQUISITE_SCHEMA` to both
|
|
779
|
+
SDK and CLI requests. Unknown keys, sparse arrays, nonfinite/fractional budgets,
|
|
780
|
+
duplicate evidence declarations and oversized input refuse before tracker IO.
|
|
781
|
+
Records must be plain JSON data: proxies, accessors and inherited/sparse array
|
|
782
|
+
entries are rejected without executing caller-provided callbacks.
|
|
783
|
+
`requiredEvidence` accepts at most 64 exact `{kind, ref}` pairs for `docs`,
|
|
784
|
+
`files` and `tests`; strings are bounded (reference 1024, input field 16000,
|
|
785
|
+
actor 128 characters). The complete TOON/JSON estimate defaults to 4000 tokens
|
|
786
|
+
and accepts integer ceilings 1..64000. Requirements are never silently truncated.
|
|
787
|
+
|
|
788
|
+
The result has `preview: true`, `ready`, `checklist` and typed `refusals`.
|
|
789
|
+
Close and start-task previews are supported. Other commands, approval-history
|
|
790
|
+
certification, matching workspace field/writer policies and composed claim-stage
|
|
791
|
+
policies return `unsupported` when their effective response can refuse the action,
|
|
792
|
+
with a remedy alongside known facts. Advisory certification gaps remain
|
|
793
|
+
non-blocking checklist entries. Policy
|
|
794
|
+
field references describe current/proposed input availability; native actions
|
|
795
|
+
can generate or clear other metadata, so those references never certify the
|
|
796
|
+
complete post-action record. Use native semantic validation for those policies.
|
|
797
|
+
Operational failures throw `ActionPrerequisiteError` with `code` and `remedy`:
|
|
798
|
+
`invalid`, `missing`, `tracker`, `changed` or `budget`. CLI usage failures exit 2
|
|
799
|
+
with `action_<code>` (missing positionals use the native argument refusal); a successfully produced preview exits 0 even when its
|
|
800
|
+
checklist is incomplete. Inspect `ready` and `refusals` before continuing.
|
|
801
|
+
|
|
802
|
+
No native mutation is invoked: items, histories, claims, policies and session
|
|
803
|
+
focus are preserved. Native reads can initialize rebuildable runtime metadata
|
|
804
|
+
caches on a writable cold tracker. On a physically read-only tracker, the same
|
|
805
|
+
preview works without changing any bytes. Two certified SDK reads reject
|
|
806
|
+
observed concurrent changes; this is an observation, never a lease or a plan
|
|
807
|
+
to replay. Native actions must revalidate current state, actor permissions and
|
|
808
|
+
execution-time hooks themselves. There is no new import, export, sync, journal,
|
|
809
|
+
checkpoint, idempotency-key or shared writer path.
|
|
810
|
+
|
|
811
|
+
See the [worked example](docs/examples/action.md) and
|
|
812
|
+
[validation evidence](docs/action-validation.md).
|
|
813
|
+
|
|
729
814
|
## Without git
|
|
730
815
|
|
|
731
816
|
Briefs, prompts, ranking, history deltas, governance, duplicate checks and all
|
|
732
|
-
handoff, decision alternatives
|
|
817
|
+
handoff, decision alternatives, stakeholder disclosure and action prerequisite commands work in plain initialized trackers without a git executable.
|
|
733
818
|
Handoff storage uses the native SDK dispatcher and can reuse a host client.
|
|
734
819
|
`brief diverge` needs a git repository and git refs. Handoff receipts have no
|
|
735
820
|
branch, commit or repository dependency.
|
package/dist/action.d.ts
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { PmClient } from "@unbrained/pm-cli/sdk";
|
|
2
|
+
import type { WorkflowPolicyEffect } from "@unbrained/pm-cli/sdk";
|
|
3
|
+
import type { ExtensionApi } from "@unbrained/pm-cli/sdk/authoring";
|
|
4
|
+
/** Exact native linkage requirement; presence never claims the artifact passed validation. */
|
|
5
|
+
export interface ActionEvidence {
|
|
6
|
+
kind: "docs" | "files" | "tests";
|
|
7
|
+
ref: string;
|
|
8
|
+
}
|
|
9
|
+
/** One explicit action, with prospective close inputs and optional declared evidence. */
|
|
10
|
+
export interface ActionPrerequisiteRequest {
|
|
11
|
+
command: string;
|
|
12
|
+
item: string;
|
|
13
|
+
actor?: string;
|
|
14
|
+
input?: {
|
|
15
|
+
reason?: string;
|
|
16
|
+
resolution?: string;
|
|
17
|
+
expectedResult?: string;
|
|
18
|
+
actualResult?: string;
|
|
19
|
+
};
|
|
20
|
+
requiredEvidence?: ActionEvidence[];
|
|
21
|
+
tokenBudget?: number;
|
|
22
|
+
}
|
|
23
|
+
/** Tracker-bound SDK context, acquired only when a valid request needs data. */
|
|
24
|
+
export interface ActionPrerequisiteOptions {
|
|
25
|
+
pmRoot: string;
|
|
26
|
+
client?: PmClient;
|
|
27
|
+
}
|
|
28
|
+
/** Stable machine refusal vocabulary with actionable recovery. */
|
|
29
|
+
export type ActionRefusalCode = "invalid" | "missing" | "tracker" | "unsupported" | "budget" | "changed";
|
|
30
|
+
/** Expected failures retain recovery without echoing untrusted inputs or item bodies. */
|
|
31
|
+
export declare class ActionPrerequisiteError extends Error {
|
|
32
|
+
/** Category independent of human wording. */
|
|
33
|
+
readonly code: ActionRefusalCode;
|
|
34
|
+
/** Concrete next action for the caller. */
|
|
35
|
+
readonly remedy: string;
|
|
36
|
+
/** Preserve a safe diagnostic and a separate machine-readable remedy. */
|
|
37
|
+
constructor(code: ActionRefusalCode, message: string, remedy: string);
|
|
38
|
+
}
|
|
39
|
+
/** A content-free checklist entry; satisfied values are recoverable references. */
|
|
40
|
+
export interface ActionPrerequisiteEntry {
|
|
41
|
+
kind: "input" | "prerequisite" | "readiness" | "evidence" | "policy";
|
|
42
|
+
key: string;
|
|
43
|
+
state: "missing" | "satisfied" | "unresolved";
|
|
44
|
+
ref?: string;
|
|
45
|
+
remedy?: string;
|
|
46
|
+
/** Advisory findings remain visible and never become mandatory input gates. */
|
|
47
|
+
blocking?: false;
|
|
48
|
+
/** Effective native response after workspace enforcement has been applied. */
|
|
49
|
+
effect?: WorkflowPolicyEffect;
|
|
50
|
+
}
|
|
51
|
+
/** Bounded read-only result; ready describes mandatory inputs, never authorizes a future mutation. */
|
|
52
|
+
export interface ActionPrerequisiteBrief {
|
|
53
|
+
protocol: "pm-brief.action/v1";
|
|
54
|
+
preview: true;
|
|
55
|
+
command: string;
|
|
56
|
+
item: {
|
|
57
|
+
id: string;
|
|
58
|
+
revision: string;
|
|
59
|
+
status: string;
|
|
60
|
+
roles: string[];
|
|
61
|
+
};
|
|
62
|
+
ready: boolean;
|
|
63
|
+
checklist: ActionPrerequisiteEntry[];
|
|
64
|
+
refusals: {
|
|
65
|
+
code: "unsupported";
|
|
66
|
+
capability: string;
|
|
67
|
+
remedy: string;
|
|
68
|
+
}[];
|
|
69
|
+
estimatedTokenCeiling: number;
|
|
70
|
+
}
|
|
71
|
+
/** The single strict boundary schema used by SDK and CLI, including dense bounded arrays. */
|
|
72
|
+
export declare const ACTION_PREREQUISITE_SCHEMA: {
|
|
73
|
+
readonly command: {
|
|
74
|
+
readonly max: 80;
|
|
75
|
+
readonly pattern: RegExp;
|
|
76
|
+
};
|
|
77
|
+
readonly item: {
|
|
78
|
+
readonly max: 200;
|
|
79
|
+
readonly pattern: RegExp;
|
|
80
|
+
};
|
|
81
|
+
readonly actor: {
|
|
82
|
+
readonly max: 128;
|
|
83
|
+
};
|
|
84
|
+
readonly input: {
|
|
85
|
+
readonly keys: readonly ["reason", "resolution", "expectedResult", "actualResult"];
|
|
86
|
+
readonly max: 16000;
|
|
87
|
+
};
|
|
88
|
+
readonly requiredEvidence: {
|
|
89
|
+
readonly max: 64;
|
|
90
|
+
readonly kinds: readonly ["docs", "files", "tests"];
|
|
91
|
+
readonly refMax: 1024;
|
|
92
|
+
};
|
|
93
|
+
readonly tokenBudget: {
|
|
94
|
+
readonly min: 1;
|
|
95
|
+
readonly max: 64000;
|
|
96
|
+
readonly default: 4000;
|
|
97
|
+
};
|
|
98
|
+
};
|
|
99
|
+
/** Parse, detach and normalize defaults once using the same boundary for every producer. */
|
|
100
|
+
export declare function parseActionPrerequisiteRequest(value: unknown): ActionPrerequisiteRequest;
|
|
101
|
+
/** Compose native facts for one intended close or start action, without calling any writer. */
|
|
102
|
+
export declare function buildActionPrerequisiteBrief(value: ActionPrerequisiteRequest, options: ActionPrerequisiteOptions): Promise<ActionPrerequisiteBrief>;
|
|
103
|
+
/** Register the read-only native TOON/JSON command using the same SDK request parser. */
|
|
104
|
+
export declare function registerActionPrerequisiteCommand(api: ExtensionApi): void;
|
|
105
|
+
//# sourceMappingURL=action.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"action.d.ts","sourceRoot":"","sources":["../action.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,QAAQ,EAOT,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAmD,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACnH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,8FAA8F;AAC9F,MAAM,WAAW,cAAc;IAAG,IAAI,EAAE,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE;AACjF,yFAAyF;AACzF,MAAM,WAAW,yBAAyB;IACxC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE;QAAE,MAAM,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,MAAM,CAAC;QAAC,cAAc,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IACjG,gBAAgB,CAAC,EAAE,cAAc,EAAE,CAAC;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AACD,gFAAgF;AAChF,MAAM,WAAW,yBAAyB;IAAG,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,QAAQ,CAAA;CAAE;AAChF,kEAAkE;AAClE,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,SAAS,GAAG,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