@mstar-harness/dsh 3.6.3 → 3.7.1
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/README.i18n.yaml +2 -2
- package/README.md +8 -8
- package/README.zh.md +7 -5
- package/dist/client/panel/PanelView.d.ts +8 -11
- package/dist/client/panel/TabNav.d.ts +2 -2
- package/dist/client/panel/graph/event-log.d.ts +5 -9
- package/dist/client/panel/graph/project-graph.d.ts +53 -72
- package/dist/client/panel/graph/schema.d.ts +31 -37
- package/dist/client/panel/locale.d.ts +19 -19
- package/dist/client/panel/pages/AgentCanvasPage.d.ts +40 -58
- package/dist/client/panel/pages/EventLogPage.d.ts +6 -6
- package/dist/client/panel/pages/IterationInfoSection.d.ts +9 -11
- package/dist/client/panel/pages/IterationTaskPage.d.ts +3 -3
- package/dist/client/panel/plan-sort.d.ts +3 -6
- package/dist/client/panel/state-section.d.ts +1 -1
- package/dist/client/panel/zones/Legend.d.ts +2 -2
- package/dist/client/panel/zones/ProjectRollup.d.ts +1 -2
- package/dist/client/panel/zones/TaskBoard.d.ts +1 -2
- package/dist/gates/_shared.d.ts +24 -16
- package/dist/gates/adapter.d.ts +6 -9
- package/dist/gates/agent-flow.d.ts +49 -59
- package/dist/gates/agent-personas.d.ts +1 -2
- package/dist/gates/catalog.d.ts +2 -5
- package/dist/gates/dispatch.d.ts +9 -11
- package/dist/gates/fallbacks-advisory.d.ts +55 -18
- package/dist/gates/fallbacks-probe.d.ts +2 -2
- package/dist/gates/fallbacks-seeds.d.ts +1 -1
- package/dist/gates/fallbacks-structural.d.ts +1 -1
- package/dist/gates/goal-bridge.d.ts +6 -9
- package/dist/gates/role-persona.d.ts +123 -7
- package/dist/gates/skill-lint.d.ts +19 -2
- package/dist/gates/system-prompt.d.ts +7 -11
- package/dist/gates/tools.d.ts +1 -1
- package/dist/gates/workflow-ledger.d.ts +21 -28
- package/dist/gates/workflow-policy.d.ts +15 -19
- package/dist/gates/workflow-selection.d.ts +3 -3
- package/dist/index.d.ts +1 -1
- package/dist/index.js +472 -183
- package/dist/types.d.ts +4 -7
- package/harness-commands/iteration-drive.md +6 -6
- package/harness-commands/iteration-loop.md +7 -7
- package/harness-commands/iteration-start.md +8 -8
- package/harness-skills/mstar-coding-behavior/SKILL.md +3 -20
- package/harness-skills/mstar-dispatch-gates/SKILL.md +7 -13
- package/harness-skills/mstar-dispatch-gates/references/leaf-executor-checklist.md +1 -1
- package/harness-skills/mstar-harness-core/SKILL.md +16 -53
- package/harness-skills/mstar-host/references/zcode.md +7 -0
- package/harness-skills/mstar-iteration/SKILL.md +32 -318
- package/harness-skills/mstar-iteration/references/command-shared-invariants.md +1 -1
- package/harness-skills/mstar-iteration/references/phase-1-prepare.md +155 -0
- package/harness-skills/mstar-iteration/references/phase-2-worktree-lease.md +113 -3
- package/harness-skills/mstar-iteration/references/phase5-helper-discovery.md +1 -1
- package/harness-skills/mstar-roles/SKILL.md +14 -12
- package/harness-skills/mstar-roles/references/_shared/leaf-executor-core.md +5 -6
- package/harness-skills/mstar-roles/references/architect.md +1 -1
- package/harness-skills/mstar-roles/references/code-reviewer.md +11 -1
- package/harness-skills/mstar-roles/references/frontend-dev.md +1 -1
- package/harness-skills/mstar-roles/references/fullstack-dev-shared.md +1 -1
- package/harness-skills/mstar-roles/references/ops-engineer.md +1 -1
- package/harness-skills/mstar-roles/references/product-manager.md +1 -1
- package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +4 -0
- package/harness-skills/mstar-roles/references/project-manager.md +6 -4
- package/harness-skills/mstar-roles/references/prompt-engineer.md +1 -1
- package/harness-skills/mstar-roles/references/qa-engineer.md +1 -1
- package/harness-skills/mstar-roles/references/qc-specialist-shared.md +1 -1
- package/harness-skills/mstar-roles/references/writing-specialist.md +1 -1
- package/harness-skills/mstar-sdd/references/file-handoffs.md +40 -7
- package/harness-skills/mstar-sdd/references/implementer-continuation-prompt.md +9 -0
- package/harness-skills/mstar-sdd/references/implementer-prompt.md +9 -0
- package/harness-skills/mstar-sdd/references/task-reviewer-prompt.md +7 -0
- package/package.json +1 -1
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Workflow-ledger session-event consumer
|
|
3
|
-
* Task 3 — the W-B2 producer half).
|
|
4
|
-
*
|
|
2
|
+
* Workflow-ledger session-event consumer. *
|
|
5
3
|
* Source of record: the durable `tool-workflow/*` session events appended
|
|
6
4
|
* into the CALLING PARENT session's log (top-level runs only — nested
|
|
7
5
|
* transport calls record nothing upstream; Task 1 seam notes §4). The
|
|
@@ -19,9 +17,8 @@
|
|
|
19
17
|
* forked conversation — `session/created` fires after the seed enters
|
|
20
18
|
* the log, upstream `session/src/index.ts:961-995`) gets its snapshot
|
|
21
19
|
* cold-scanned ONCE on the creation announcement, closing the
|
|
22
|
-
* late-seeded-session gap
|
|
23
|
-
*
|
|
24
|
-
* DEDUPE (qc2 W-1 / qc3 F-301 fix-wave): ONE DURABLE per-session watermark —
|
|
20
|
+
* late-seeded-session gap. *
|
|
21
|
+
* DEDUPE : ONE DURABLE per-session watermark —
|
|
25
22
|
* the next expected envelope `seq` (session-log position) — persisted to
|
|
26
23
|
* `{HARNESS_DIR}/workflows/<id>/workflow-ledger-cursors.json` (a small
|
|
27
24
|
* bounded sidecar next to the workflow-dir `agent-flow.jsonl`, written
|
|
@@ -31,17 +28,16 @@
|
|
|
31
28
|
* created-backfill / live): envelopes with `seq` below it were already
|
|
32
29
|
* recorded — across cold+live overlap AND across plugin re-applies (a
|
|
33
30
|
* re-registration no longer re-records the same live sessions). The
|
|
34
|
-
* watermark advances only AFTER the ledger row appended successfully (
|
|
35
|
-
*
|
|
36
|
-
* re-attempted at the next scan, never permanently lost). The in-memory
|
|
31
|
+
* watermark advances only AFTER the ledger row appended successfully (a failing append leaves the cursor behind, so the
|
|
32
|
+
* row is re-attempted at the next scan, never permanently lost). The in-memory
|
|
37
33
|
* Map is the durable file's mirror (module-level cache keyed by WORKFLOW
|
|
38
34
|
* DIR, bounded by the session cap AND by a workflow-dir count cap — qc3
|
|
39
35
|
* S-4 — so a long-lived process across many workflow ids never grows the
|
|
40
36
|
* cache unbounded); a failed durable write keeps the in-memory mirror
|
|
41
|
-
* advanced (in-process dedupe —
|
|
37
|
+
* advanced (in-process dedupe —) with one warn — a ledger row is
|
|
42
38
|
* never lost and the workflow run is never affected.
|
|
43
39
|
*
|
|
44
|
-
* INTER-PROCESS SERIALIZATION
|
|
40
|
+
* INTER-PROCESS SERIALIZATION : the watermark
|
|
45
41
|
* read-modify-write (load fresh → mutate → whole-map save) runs inside the
|
|
46
42
|
* per-workflow write lock shared with the ledger append
|
|
47
43
|
* (`withWorkflowDirLock` from agent-flow.ts — the same lockdir pattern as
|
|
@@ -52,16 +48,15 @@
|
|
|
52
48
|
* process's just-advanced cursor (the duplicate-row regression mode). The
|
|
53
49
|
* lock is held only around the bounded cursor update, never across scans.
|
|
54
50
|
*
|
|
55
|
-
* Mapping
|
|
51
|
+
* Mapping: `tool-workflow/run-start` → `workflow-run`
|
|
56
52
|
* (`agent` = the carrying parent session id), `tool-workflow/agent-start` →
|
|
57
53
|
* `workflow-agent` (`childId` preserved), `tool-workflow/run-end` →
|
|
58
54
|
* `workflow-run-end`. `tool-workflow/agent-end` is upstream MEMBER
|
|
59
|
-
* bookkeeping with no ledger kind (
|
|
55
|
+
* bookkeeping with no ledger kind (the
|
|
60
56
|
* member `outcome` is intentionally not persisted) and is filtered out.
|
|
61
57
|
* `ts` takes the envelope's `time`.
|
|
62
58
|
*
|
|
63
|
-
* P-c answer observation
|
|
64
|
-
* the Task-2 Important handoff): the workflow GATE cannot observe the ask
|
|
59
|
+
* P-c answer observation : the workflow GATE cannot observe the ask
|
|
65
60
|
* outcome — the tool registry's `serviceAsk` consumes the approval result
|
|
66
61
|
* internally, and the gate invents no answerer. The run-start observation
|
|
67
62
|
* IS the answer seam: when the approval waterfall ALLOWS a workflow call,
|
|
@@ -69,7 +64,7 @@
|
|
|
69
64
|
* (name carried) lands in the parent session log — the consumer maps it to
|
|
70
65
|
* the `workflow-run` row AND records `allow` for the run name into the
|
|
71
66
|
* apply-scoped {@link WorkflowAskCache} (`registerWorkflowLedger`'s third
|
|
72
|
-
* parameter — the host adapter's instance).
|
|
67
|
+
* parameter — the host adapter's instance). the record
|
|
73
68
|
* fires ONLY for names the policy marked asked in this apply
|
|
74
69
|
* (`WorkflowAskCache.markAsked` on every ask verdict; the observation
|
|
75
70
|
* promotes via `wasAsked`) — a run observed without a prior ask (P-b
|
|
@@ -107,8 +102,8 @@ import type { WorkflowAskCache } from './workflow-policy.ts';
|
|
|
107
102
|
/** Logger label for the workflow-ledger consumer (dsh logger naming: `<scope>/<subject>`). */
|
|
108
103
|
export declare const WORKFLOW_LEDGER_LOGGER = "mstar/workflow-ledger";
|
|
109
104
|
/**
|
|
110
|
-
* The durable watermark file name under the WORKFLOW dir (
|
|
111
|
-
* F-301
|
|
105
|
+
* The durable watermark file name under the WORKFLOW dir (/ qc3
|
|
106
|
+
* F-301 : `{ "v": 1, "cursors": { "<sessionId>": <nextSeq> } }` —
|
|
112
107
|
* the next expected envelope seq per session id. Written atomically
|
|
113
108
|
* (temp-file + rename) after every recorded workflow row; read lazily per
|
|
114
109
|
* workflow dir (module-level cache). v3 layout: the sidecar lives in the
|
|
@@ -126,8 +121,7 @@ export declare const WORKFLOW_LEDGER_WATERMARK_FILE = "workflow-ledger-cursors.j
|
|
|
126
121
|
*/
|
|
127
122
|
export declare const WORKFLOW_LEDGER_WATERMARK_MAX_SESSIONS = 256;
|
|
128
123
|
/**
|
|
129
|
-
* Workflow-dir count cap for the module-level watermark cache
|
|
130
|
-
* fix-wave): a long-lived process can touch many workflow ids over its
|
|
124
|
+
* Workflow-dir count cap for the module-level watermark cache: a long-lived process can touch many workflow ids over its
|
|
131
125
|
* lifetime (each iteration lifecycle creates a new workflow dir) — the
|
|
132
126
|
* cache evicts the OLDEST cached dir when it exceeds this cap. The file is
|
|
133
127
|
* the durable store; the cache is only a mirror, so an evicted dir is
|
|
@@ -144,12 +138,11 @@ export type WorkflowLedgerLogSink = (level: WorkflowLedgerLogLevel, message: str
|
|
|
144
138
|
* can restore it (test pattern: agent-flow `setAgentFlowLogger`).
|
|
145
139
|
*/
|
|
146
140
|
export declare function setWorkflowLedgerLogger(sink: WorkflowLedgerLogSink): WorkflowLedgerLogSink;
|
|
147
|
-
/** The number of workflow dirs currently mirrored in the module-level watermark cache
|
|
148
|
-
export declare function workflowLedgerWatermarkCacheSize(): number;
|
|
141
|
+
/** The number of workflow dirs currently mirrored in the module-level watermark cache */ export declare function workflowLedgerWatermarkCacheSize(): number;
|
|
149
142
|
/**
|
|
150
143
|
* Advance one session's watermark entry to `nextSeq` and persist. Runs the
|
|
151
144
|
* whole read-modify-write under the per-workflow inter-process lock
|
|
152
|
-
* (
|
|
145
|
+
* (same lock as the ledger append): the fresh load
|
|
153
146
|
* starts from the latest durable cursors, so two processes sharing one
|
|
154
147
|
* lifecycle never clobber each other's advances; the session entry is
|
|
155
148
|
* monotonic (`Math.max` — a stale concurrent advance never regresses an
|
|
@@ -161,7 +154,7 @@ export declare function workflowLedgerWatermarkCacheSize(): number;
|
|
|
161
154
|
* evicted session re-records) is bounded by the cap and documented in the
|
|
162
155
|
* README.
|
|
163
156
|
*
|
|
164
|
-
* DEGRADED PATH
|
|
157
|
+
* DEGRADED PATH : a lock timeout (another writer stuck
|
|
165
158
|
* for the full timeout — a crashed/stuck peer), a reentrancy error, or a
|
|
166
159
|
* throwing critical section leaves the durable file untouched, but the
|
|
167
160
|
* in-memory mirror is STILL advanced (the same monotonic `Math.max`;
|
|
@@ -189,7 +182,7 @@ export declare function advanceWatermark(workflowDir: string, sid: string, nextS
|
|
|
189
182
|
}): void;
|
|
190
183
|
/**
|
|
191
184
|
* Register the workflow-ledger consumer: (1) a `session/created` backfill
|
|
192
|
-
* listener (registered FIRST —
|
|
185
|
+
* listener (registered FIRST — — so no apply-time window exists
|
|
193
186
|
* between the snapshot and the attach); (2) a bounded cold scan over
|
|
194
187
|
* `ctx.sessions.list()` reading each session's `events` snapshot for
|
|
195
188
|
* `tool-workflow/*` rows (covers pre-restart runs — constructor-seeded
|
|
@@ -199,10 +192,10 @@ export declare function advanceWatermark(workflowDir: string, sid: string, nextS
|
|
|
199
192
|
* persisted to `{HARNESS_DIR}/workflows/<id>/workflow-ledger-cursors.json` —
|
|
200
193
|
* the ACTIVE workflow dir, never the root) — re-applies
|
|
201
194
|
* never duplicate; no other cache. The watermark advances only AFTER a
|
|
202
|
-
* successful ledger append (
|
|
195
|
+
* successful ledger append (a failing append leaves the cursor
|
|
203
196
|
* behind so the row is re-attempted at the next scan, never lost). Every
|
|
204
197
|
* read/append is try/catch-contained — including `sessions.list()` itself
|
|
205
|
-
* (
|
|
198
|
+
* (one warn, the cold scan skipped, the consumer stays live); the
|
|
206
199
|
* `sessions` service absent → one debug log + consumer disabled (composition
|
|
207
200
|
* without dsh-session). All appends go through `recordWorkflowEvent` (itself
|
|
208
201
|
* fully contained — a failing ledger write never crashes or alters a
|
|
@@ -212,7 +205,7 @@ export declare function advanceWatermark(workflowDir: string, sid: string, nextS
|
|
|
212
205
|
* @param resolver - the shared per-workspace `{HARNESS_DIR}` resolver
|
|
213
206
|
* (harnessDir attribution from the carrying session's `header.cwd`).
|
|
214
207
|
* @param workflowAskCache - the apply-scoped P-c ask cache (plan
|
|
215
|
-
*
|
|
208
|
+
* Task 4 fold-in — the host adapter's
|
|
216
209
|
* instance; see the module doc "P-c answer observation"). Absent → the
|
|
217
210
|
* observation hook is disabled (W-B2 tests / compositions without the
|
|
218
211
|
* workflow gate).
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Workflow/ralph gate policy — the P-a name allowlist + P-b lease
|
|
3
|
-
* attribution + P-c first-seen ask
|
|
4
|
-
* Tasks 2–3, W-B3). The policy is the SINGLE
|
|
3
|
+
* attribution + P-c first-seen ask . The policy is the SINGLE
|
|
5
4
|
* decision point for the four-tier `workflowGate` mode semantics
|
|
6
5
|
* (`off | warn | ask | hard`, default `warn`): it turns one composed
|
|
7
|
-
* {@link WorkflowGateInput}
|
|
6
|
+
* {@link WorkflowGateInput} into `allow | warn | ask | deny` + a
|
|
8
7
|
* reason. The dispatch-gate listener maps the verdict to the
|
|
9
8
|
* `tools/pre-execute` refusal vocabulary (`PreToolDecision`) — this module
|
|
10
9
|
* NEVER throws and NEVER builds an approval path: an `ask` verdict flows
|
|
@@ -21,7 +20,7 @@
|
|
|
21
20
|
* | ralph (no `meta.name`), covered/read-only | any | allow — P-a/P-c NEVER apply to ralph (no allowlist identity); P-b applies |
|
|
22
21
|
* | workflow, name ∈ `workflowNames` (non-empty list), covered | any | allow — the allowlist passes under every mode |
|
|
23
22
|
* | workflow, unknown (empty/absent list ⇒ EVERY name unknown), covered | `off` | allow — the gate short-circuits `off` before the policy; kept here for a total policy |
|
|
24
|
-
* | workflow, unknown, covered | `warn` | warn — advisory + one warn (
|
|
23
|
+
* | workflow, unknown, covered | `warn` | warn — advisory + one warn (centralized) |
|
|
25
24
|
* | workflow, unknown, covered | `hard` | deny — reason names the workflow name, veto before any child starts |
|
|
26
25
|
* | workflow, unknown, covered, first-seen (no cached decision) | `ask` | ask — `{kind:'ask'}` through the approval waterfall + the name is marked asked (W-1 — the run-start observation promotes only asked names to allow) |
|
|
27
26
|
* | workflow, unknown, covered, cached allow | `ask` | allow — cached decision, NO re-ask |
|
|
@@ -34,8 +33,7 @@
|
|
|
34
33
|
* and a fresh apply starts with an empty cache. The cache records only
|
|
35
34
|
* RESOLVED decisions (`allow` | `deny`) keyed by workflow name.
|
|
36
35
|
*
|
|
37
|
-
* Cache-key normalization (
|
|
38
|
-
* fix): every key — the gate's `metaName` (composed through
|
|
36
|
+
* Cache-key normalization (the congruence fix): every key — the gate's `metaName` (composed through
|
|
39
37
|
* {@link normalizeWorkflowName} in dispatch.ts `workflowGateInputOf`), the
|
|
40
38
|
* run-start observation's `runName` (workflow-ledger.ts), and the explicit
|
|
41
39
|
* `record()` / `markAsked()` APIs (which normalize internally, F-302) — is
|
|
@@ -50,15 +48,14 @@
|
|
|
50
48
|
* `serviceAsk` consumes the approval result internally (`deepseek-harness
|
|
51
49
|
* packages/core/tools/src/index.ts`, `prepareExecution`/`serviceAsk`) — so
|
|
52
50
|
* the ANSWER reaches the cache through the workflow-ledger consumer's
|
|
53
|
-
* run-start observation
|
|
54
|
-
* the Task-2 Important handoff): an ALLOWED ask executes the call, the
|
|
51
|
+
* run-start observation : an ALLOWED ask executes the call, the
|
|
55
52
|
* durable `tool-workflow/run-start` session event carries the run name, and
|
|
56
53
|
* the consumer records `allow` for it (`workflow-ledger.ts`). The policy
|
|
57
54
|
* marks every name that received an `ask` verdict in this apply
|
|
58
55
|
* (`markAsked`, at the single ask point), and the observation promotes ONLY
|
|
59
56
|
* marked names to `allow` — a run observed WITHOUT a prior ask (a P-b
|
|
60
57
|
* advisory under `ask` mode, a `warn`/`off`-mode run) is NOT an approval
|
|
61
|
-
* resolution and never pre-authorizes the name
|
|
58
|
+
* resolution and never pre-authorizes the name . A DENIED answer
|
|
62
59
|
* produces no run → no observation → the next same-name call re-asks
|
|
63
60
|
* (fail-closed — no grant evidence, never an invented allow). The explicit
|
|
64
61
|
* `record()` API stays the general seam — an answerer integration or the
|
|
@@ -69,7 +66,7 @@
|
|
|
69
66
|
* (`WorkflowGateInput` — erased at runtime, no cycle); dispatch.ts imports
|
|
70
67
|
* the policy/cache values from here. The P-a vocabulary
|
|
71
68
|
* (`workflowNameUnknown`, `WORKFLOW_NAME_UNKNOWN_CODE`) centralized HERE from
|
|
72
|
-
*
|
|
69
|
+
* 's dispatch.ts.
|
|
73
70
|
*/
|
|
74
71
|
import type { Config } from './_shared.ts';
|
|
75
72
|
import type { WorkflowGateInput } from './dispatch.ts';
|
|
@@ -81,16 +78,15 @@ import type { WorkflowGateInput } from './dispatch.ts';
|
|
|
81
78
|
export declare const WORKFLOW_NAME_UNKNOWN_CODE = "workflow.name.unknown";
|
|
82
79
|
/**
|
|
83
80
|
* The workflow-gate advisory/deny violation code for P-b lease attribution
|
|
84
|
-
*
|
|
81
|
+
* : the calling workspace has an `InProgress` plan without
|
|
85
82
|
* `execution_lease` coverage (warn-mode advisory / hard-mode veto reason —
|
|
86
83
|
* the reason cites the uncovered plan id).
|
|
87
84
|
*/
|
|
88
85
|
export declare const WORKFLOW_LEASE_UNCOVERED_CODE = "workflow.lease.uncovered";
|
|
89
86
|
/**
|
|
90
87
|
* Strip ASCII control characters (newlines / tabs / CR — the log-forging
|
|
91
|
-
* surface
|
|
92
|
-
* normalization
|
|
93
|
-
* Task-4 Important congruence fix): the gate's `metaName` (composed in
|
|
88
|
+
* surface( from one workflow name. THE shared P-c cache-key
|
|
89
|
+
* normalization : the gate's `metaName` (composed in
|
|
94
90
|
* dispatch.ts `workflowGateInputOf`) and the run-start observation's
|
|
95
91
|
* `runName` (workflow-ledger.ts) MUST key the ask cache through the SAME
|
|
96
92
|
* function — a raw-vs-stripped mismatch (e.g. `au\u0000dit` gating under
|
|
@@ -108,7 +104,7 @@ export declare function normalizeWorkflowName(value: string): string;
|
|
|
108
104
|
* `meta.name` — P-a never applies to them (callers guard on
|
|
109
105
|
* `input.metaName !== undefined` first).
|
|
110
106
|
*
|
|
111
|
-
* Comparison boundary
|
|
107
|
+
* Comparison boundary: entries are normalized through
|
|
112
108
|
* {@link normalizeWorkflowName} BEFORE the comparison — the gate's
|
|
113
109
|
* `metaName` is already stripped, so an operator-pasted control-char
|
|
114
110
|
* variant (trailing newline, copied config value) matches the same
|
|
@@ -124,7 +120,7 @@ export type WorkflowAskCacheDecision = 'allow' | 'deny';
|
|
|
124
120
|
* see the module doc for the lifecycle). Records ONLY resolved decisions; a
|
|
125
121
|
* miss means first-seen (or an unanswered ask) → the policy asks again.
|
|
126
122
|
*
|
|
127
|
-
*
|
|
123
|
+
* The cache ALSO tracks which names received an `ask`
|
|
128
124
|
* verdict in this apply ({@link markAsked} — the gate marks EVERY ask
|
|
129
125
|
* decision at the policy's single ask point). The run-start observation
|
|
130
126
|
* (workflow-ledger.ts) records `allow` ONLY for names marked-asked — a run
|
|
@@ -132,7 +128,7 @@ export type WorkflowAskCacheDecision = 'allow' | 'deny';
|
|
|
132
128
|
* `warn`/`off`-mode run) is NOT an approval resolution and must not
|
|
133
129
|
* pre-authorize the name.
|
|
134
130
|
*
|
|
135
|
-
*
|
|
131
|
+
* The WRITE seams ({@link record} / {@link markAsked})
|
|
136
132
|
* normalize their keys internally — the "ONE shared normalization" contract
|
|
137
133
|
* holds even for a caller that passes a raw spelling (today's production
|
|
138
134
|
* callers already normalize before calling; this is defense-in-depth for the
|
|
@@ -163,7 +159,7 @@ export declare class WorkflowAskCache {
|
|
|
163
159
|
/** Whether `name` received an `ask` verdict in this apply (the observation's promote gate). Normalizes internally. */
|
|
164
160
|
wasAsked(name: string): boolean;
|
|
165
161
|
}
|
|
166
|
-
/** The four-tier policy decision vocabulary (plan W-B3
|
|
162
|
+
/** The four-tier policy decision vocabulary (plan W-B3). */
|
|
167
163
|
export type WorkflowPolicyDecision = 'allow' | 'warn' | 'ask' | 'deny';
|
|
168
164
|
/**
|
|
169
165
|
* One policy verdict: the decision + a human-readable reason + the violation
|
|
@@ -181,7 +177,7 @@ export type WorkflowPolicyVerdict = {
|
|
|
181
177
|
};
|
|
182
178
|
/**
|
|
183
179
|
* The workflow/ralph gate policy — P-a name allowlist + P-c first-seen ask
|
|
184
|
-
*
|
|
180
|
+
* . `config` + cache + composed
|
|
185
181
|
* input → verdict; the caller (dispatch gate) maps the verdict to the
|
|
186
182
|
* `PreToolDecision` refusal vocabulary and owns the advisory emit/log
|
|
187
183
|
* infrastructure. The ONE cache write is contained: an `ask` verdict marks
|
|
@@ -2,7 +2,7 @@ import type { WorkflowSelectionView } from '../types.ts';
|
|
|
2
2
|
/** The active-set resolver result: the first active lifecycle or a clear error. */
|
|
3
3
|
export type ActiveWorkflowSelection = WorkflowSelectionView;
|
|
4
4
|
/**
|
|
5
|
-
* Test-only observability hook
|
|
5
|
+
* Test-only observability hook :
|
|
6
6
|
* whether a snapshot path is still cached. Production code never calls
|
|
7
7
|
* this — the eviction contract (delete → key gone) is asserted by the
|
|
8
8
|
* workflow-selection spec.
|
|
@@ -15,8 +15,8 @@ export declare function _terminalStatusCacheHas(snapshotPath: string): boolean;
|
|
|
15
15
|
* entry → a clear error, never a terminal snapshot and never the root v1
|
|
16
16
|
* file.
|
|
17
17
|
*
|
|
18
|
-
* Active-set definition (explicit decision,
|
|
19
|
-
*
|
|
18
|
+
* Active-set definition (explicit decision,
|
|
19
|
+
* membership in `workflows[]` — the engine lifecycle enum's
|
|
20
20
|
* non-terminal states are `running` AND `paused` (terminal lifecycles are
|
|
21
21
|
* removed from the list at terminal). A PAUSED lifecycle therefore stays in
|
|
22
22
|
* the active set and the agent-flow writer / ledger append to its workflow
|
package/dist/index.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export type { DispatchGateAdvisory } from './gates/dispatch.ts';
|
|
|
29
29
|
export { ROLE_PERSONA_LOGGER, registerRolePersonaChannel, setRolePersonaAgentsDir, setRolePersonaLogger, } from './gates/role-persona.ts';
|
|
30
30
|
export type { RolePersonaLogLevel, RolePersonaLogSink, SubagentStartRequestView, SubagentsServiceView } from './gates/role-persona.ts';
|
|
31
31
|
export { ADVISORY_LOGGER, runFallbacksAdvisory, setAdvisoryLogger } from './gates/fallbacks-advisory.ts';
|
|
32
|
-
export type { AdvisoryLogLevel, AdvisoryLogSink } from './gates/fallbacks-advisory.ts';
|
|
32
|
+
export type { AdvisoryLogLevel, AdvisoryLogSink, AdvisoryPassReport } from './gates/fallbacks-advisory.ts';
|
|
33
33
|
export { DshHostAdapter } from './gates/adapter.ts';
|
|
34
34
|
export type { DshHostAdapterOptions } from './gates/adapter.ts';
|
|
35
35
|
/** Cordis function-plugin name registered by the Loader. */
|