@sublang/slc 0.4.0 → 0.5.0
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.md +99 -130
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +8 -1
- package/dist/app.js.map +1 -1
- package/dist/config-file.d.ts +4 -0
- package/dist/config-file.d.ts.map +1 -1
- package/dist/config-file.js +18 -5
- package/dist/config-file.js.map +1 -1
- package/dist/config.d.ts +6 -4
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +65 -12
- package/dist/config.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/playbook-ports.d.ts.map +1 -1
- package/dist/playbook-ports.js +3 -1
- package/dist/playbook-ports.js.map +1 -1
- package/dist/reviewing-agent.d.ts +18 -0
- package/dist/reviewing-agent.d.ts.map +1 -0
- package/dist/reviewing-agent.js +295 -0
- package/dist/reviewing-agent.js.map +1 -0
- package/dist/slc.config.template.yaml +6 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,17 +19,18 @@ through it. Why compile prose instead of prompting with it:
|
|
|
19
19
|
stop — the control flow becomes an inspectable
|
|
20
20
|
[XState](https://xstate.js.org) machine, not prompt improvisation.
|
|
21
21
|
LLM judgment is confined to the work *inside* each state.
|
|
22
|
-
- **Auditable at every stage.**
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
binding its output to the source spec.
|
|
22
|
+
- **Auditable at every stage.** Every intermediate is a file you can
|
|
23
|
+
read and edit: the normalized text, one testable "shall" item per
|
|
24
|
+
behavior, the state machine itself. The compiler also emits tests
|
|
25
|
+
binding its output back to the spec.
|
|
27
26
|
- **Cheaper and safer by optimization.** Steps that need no judgment are
|
|
28
27
|
rewritten at compile time into plain shell commands — no LLM call, no
|
|
29
|
-
hallucination
|
|
28
|
+
hallucination.
|
|
30
29
|
- **Your agents, per role.** Compilation and execution run through the
|
|
31
30
|
agent CLIs you already use — Claude Code, Codex, Gemini, OpenCode —
|
|
32
|
-
selectable per role
|
|
31
|
+
selectable per role, with an optional
|
|
32
|
+
[second agent reviewing](#reviewed-compilation-two-agents) every
|
|
33
|
+
compile step.
|
|
33
34
|
|
|
34
35
|
The flagship pipeline is `playbook` (the name of both the pipeline and
|
|
35
36
|
the sibling [playbook](https://github.com/sublang-ai/playbook) project
|
|
@@ -41,9 +42,9 @@ a linked module the `playbook` CLI runs.
|
|
|
41
42
|
The [demo](demo/README.md) compiles a one-paragraph description into a
|
|
42
43
|
two-agent code-review loop, then lets it loose on a buggy C file: the
|
|
43
44
|
coder and reviewer commit, review, and debate inside a real Git
|
|
44
|
-
repository until the review comes back clean. Precompiled
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
repository until the review comes back clean. Precompiled artifacts are
|
|
46
|
+
included, so you can watch a run — or read every compile stage —
|
|
47
|
+
without waiting on a compile.
|
|
47
48
|
|
|
48
49
|
## Install
|
|
49
50
|
|
|
@@ -53,60 +54,42 @@ npm install -g @anthropic-ai/claude-agent-sdk @openai/codex-sdk
|
|
|
53
54
|
slc --version
|
|
54
55
|
```
|
|
55
56
|
|
|
56
|
-
The second line supplies the agent SDKs for the default Claude and Codex
|
|
57
|
-
lineup. Playbook 4 installs none itself — which versions work is
|
|
58
|
-
`@sublang/cligent`'s to enforce at load — so name the SDKs your own
|
|
59
|
-
configuration needs. If one is missing, the compile stops before any
|
|
60
|
-
agent call and names the package to install; if one is too old, it
|
|
61
|
-
names the installed and required versions along with the exact version
|
|
62
|
-
to install.
|
|
63
|
-
|
|
64
|
-
Compiled artifacts import the Playbook engine from their own directory;
|
|
65
|
-
when that import does not resolve, `playbook run` (3.1+) links its own
|
|
66
|
-
engine beside the artifact and says so (`--no-provision` opts out).
|
|
67
|
-
Working inside an npm project instead? Install the same set there — the
|
|
68
|
-
compiler, the engine, and the SDKs your lineup uses — and prefix the
|
|
69
|
-
commands with `npx`. A project's own install is always authoritative,
|
|
70
|
-
and a globally installed SDK is invisible to a project's nested
|
|
71
|
-
`@sublang/cligent`, so the SDKs belong in the same tree
|
|
72
|
-
([RELEASE-11](specs/dev/release.md#release-11) has the full rules).
|
|
73
|
-
|
|
74
57
|
Requirements:
|
|
75
58
|
|
|
76
|
-
- A POSIX platform — macOS or Linux; on Windows, use WSL (or Git
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
- Node.js >= 23.6 (compiled phase artifacts are imported as native
|
|
80
|
-
TypeScript at runtime).
|
|
59
|
+
- A POSIX platform — macOS or Linux; on Windows, use WSL (or Git Bash).
|
|
60
|
+
Compiled script steps execute through `sh`.
|
|
61
|
+
- Node.js >= 23.6 (compiled artifacts are imported as native TypeScript).
|
|
81
62
|
- One supported coding-agent CLI, installed and authenticated:
|
|
82
63
|
[Claude Code](https://docs.anthropic.com/en/docs/claude-code/overview),
|
|
83
64
|
[Codex CLI](https://github.com/openai/codex),
|
|
84
65
|
[Gemini CLI](https://github.com/google-gemini/gemini-cli), or
|
|
85
66
|
[OpenCode](https://opencode.ai).
|
|
86
67
|
|
|
68
|
+
The second install line supplies the agent SDKs for the default Claude
|
|
69
|
+
and Codex lineup; name the SDKs your own lineup needs instead. A missing
|
|
70
|
+
or too-old SDK stops the compile before any agent call and names the
|
|
71
|
+
exact package and version to install.
|
|
72
|
+
|
|
73
|
+
Compiled artifacts import the Playbook engine from their own directory;
|
|
74
|
+
when that import does not resolve, `playbook run` (3.1+) links its own
|
|
75
|
+
engine beside the artifact and says so (`--no-provision` opts out).
|
|
76
|
+
Working inside an npm project? Install the same set there and prefix the
|
|
77
|
+
commands with `npx`: a project-local install is authoritative wherever it
|
|
78
|
+
resolves, a project manifest declaring `@sublang/playbook` must install
|
|
79
|
+
it itself, and a global SDK is invisible to a project's nested
|
|
80
|
+
`@sublang/cligent`
|
|
81
|
+
([RELEASE-11](specs/dev/release.md#release-11) has the full rules).
|
|
82
|
+
|
|
87
83
|
## Quick start
|
|
88
84
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
85
|
+
Write a prose workflow as a `.md` or `.txt` file —
|
|
86
|
+
[`demo/workflow.txt`](demo/workflow.txt) is a complete one-paragraph
|
|
87
|
+
example — and compile it from any directory:
|
|
92
88
|
|
|
93
89
|
```bash
|
|
94
90
|
slc playbook my-workflow.md
|
|
95
91
|
```
|
|
96
92
|
|
|
97
|
-
`slc` finds the `playbook` pipeline inside its own `@sublang/playbook`
|
|
98
|
-
dependency, so it compiles in any directory — no clone, no project
|
|
99
|
-
setup. Compilation drives your configured coding agent — the first run
|
|
100
|
-
seeds `~/.config/slc/config.yaml` with `agent: claude-code`; set
|
|
101
|
-
`SLC_AGENT` (or edit that file) to use another agent CLI. Expect it to
|
|
102
|
-
take a while: duration is agent- and workload-dependent, and measured
|
|
103
|
-
compiles of a five-line workflow have run from tens of minutes to more
|
|
104
|
-
than two hours, with the first intermediate typically landing within
|
|
105
|
-
about five minutes. Plain-text input (`.txt`) works too; it is
|
|
106
|
-
normalized first. The pipeline's optimization pass, which rewrites
|
|
107
|
-
judgment-free steps into plain script, runs by default
|
|
108
|
-
(`--no-optimize` skips it).
|
|
109
|
-
|
|
110
93
|
Artifacts land in your working directory: `my-workflow.playbook/` holds
|
|
111
94
|
the intermediates — `my-workflow.gears.md`, the XState machine
|
|
112
95
|
`my-workflow.fsm.ts`, the linked runtime module, and its verification
|
|
@@ -116,105 +99,91 @@ tests — and `my-workflow.ts` is the runnable entry. Run it:
|
|
|
116
99
|
playbook run ./my-workflow.ts "<your task>"
|
|
117
100
|
```
|
|
118
101
|
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
102
|
+
Compilation drives your configured coding agent, so **expect it to take
|
|
103
|
+
a while**: measured compiles of a five-line workflow have run from tens
|
|
104
|
+
of minutes to more than two hours, with the first intermediate typically
|
|
105
|
+
landing within about five minutes. Meanwhile `slc` reports each phase,
|
|
106
|
+
each artifact with its elapsed time, and a heartbeat at least every 30
|
|
107
|
+
seconds on stderr; an agent call that goes silent for `stallTimeout`
|
|
108
|
+
seconds fails that phase instead of hanging. Success prints the artifact
|
|
109
|
+
paths and exits 0; a failure prints diagnostics naming the failing phase
|
|
110
|
+
and exits non-zero.
|
|
111
|
+
|
|
112
|
+
Intermediates are first-class: edit one, re-run a single phase
|
|
113
|
+
(`slc playbook.gears2fsm …`), and it lands in the same place.
|
|
114
|
+
`slc --help` shows all invocation forms and flags, including
|
|
115
|
+
`--no-optimize` to skip the optimization pass.
|
|
122
116
|
|
|
123
117
|
### Incremental recompiles
|
|
124
118
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
-
|
|
142
|
-
`--rebuild` is given.
|
|
143
|
-
|
|
144
|
-
Update is only a hint to the usual executor. The phase definition remains the
|
|
145
|
-
sole authority, needs no update section, and uses the same acceptance rules as
|
|
146
|
-
a fresh compile. A run that only reuses reports `up to date` and records
|
|
147
|
-
nothing new. Before the first executor in an eligible run may write, `slc`
|
|
148
|
-
removes the active marker; only a wholly successful run, including required
|
|
149
|
-
deterministic post-processing, publishes a new marker. Once the marker is
|
|
150
|
-
removed, a failed or interrupted run therefore leaves the next run to compile
|
|
151
|
-
ordinarily. `--rebuild` forces every phase through Ordinary mode and records a
|
|
152
|
-
fresh successful build while retaining older numbered snapshots.
|
|
153
|
-
|
|
154
|
-
History selection and publication do not apply to `-o`, the reserved `slc`
|
|
155
|
-
meta-pipeline, single-phase or standalone-pass runs, or direct-link runs. If one
|
|
156
|
-
of those excluded forms is about to overwrite an artifact named by a usable
|
|
157
|
-
active build, `slc` clears that marker first so it cannot describe the new
|
|
158
|
-
bytes.
|
|
159
|
-
|
|
160
|
-
`.slc/` sits inside the artifact bundle and holds verbatim copies of your
|
|
161
|
-
source and every accepted phase output, so treat it as no less private than
|
|
162
|
-
the source, and add `.slc/` to your `.gitignore` if you commit the bundle.
|
|
163
|
-
Deleting it is always safe — the next run simply compiles ordinarily — and
|
|
164
|
-
old numbered builds under `.slc/builds/` can be pruned at any time. An upgrade
|
|
165
|
-
that changes a recorded definition or input invalidates only the affected
|
|
166
|
-
steps: an eligible compile step can use Update while link steps run ordinarily.
|
|
167
|
-
Pass `--rebuild` after an upgrade when you want every phase to compile from
|
|
168
|
-
scratch instead.
|
|
169
|
-
|
|
170
|
-
While a compile runs, `slc` reports progress on stderr: each phase as it
|
|
171
|
-
starts, each artifact as it lands with the elapsed time, the compiled
|
|
172
|
-
runtime's own state transitions, and a heartbeat so the terminal is
|
|
173
|
-
never silent for more than 30 seconds. An agent call that goes quiet for
|
|
174
|
-
`stallTimeout` seconds (default 600, `0` disables) is aborted and
|
|
175
|
-
reported as a failed phase rather than hanging indefinitely.
|
|
176
|
-
|
|
177
|
-
Success prints the written artifact paths to stdout and exits 0 — or
|
|
178
|
-
just `up to date` when incremental selection recompiled nothing, in which
|
|
179
|
-
case the paths the previous run reported are still current; a failure
|
|
180
|
-
prints diagnostics to stderr — naming the failing phase when one is at
|
|
181
|
-
fault — and exits non-zero.
|
|
119
|
+
A successful full compile is snapshotted under `<artifact-dir>/.slc/`,
|
|
120
|
+
so a re-run only redoes what changed. Per phase, `slc` picks:
|
|
121
|
+
|
|
122
|
+
- **Reuse** — inputs are byte-identical: no agent call, and the artifact
|
|
123
|
+
on disk is left exactly as it is, manual refinements included.
|
|
124
|
+
- **Update** — inputs changed: the phase runs ordinarily and also
|
|
125
|
+
receives its prior input and a diff, as a hint to update the artifact
|
|
126
|
+
rather than rewrite it from scratch.
|
|
127
|
+
- **Ordinary** — no usable record, a changed link phase, or `--rebuild`.
|
|
128
|
+
|
|
129
|
+
A run that reuses everything prints `up to date` instead of paths.
|
|
130
|
+
History is success-only, so an interrupted or failed run simply leaves
|
|
131
|
+
the next one to compile ordinarily. `.slc/` holds verbatim copies of
|
|
132
|
+
your source and outputs — treat it as no less private, gitignore it if
|
|
133
|
+
you commit the bundle, and delete it freely. Excluded invocation forms
|
|
134
|
+
and the full rules are in the
|
|
135
|
+
[incremental spec](specs/user/incremental-compilation.md).
|
|
182
136
|
|
|
183
137
|
## Configuration
|
|
184
138
|
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
and `pipelinePath` to the working directory.
|
|
139
|
+
The first run seeds `~/.config/slc/config.yaml` with
|
|
140
|
+
`agent: claude-code`, so a fresh machine needs no setup. A
|
|
141
|
+
`slc.config.yaml` in the working directory wins over the user config,
|
|
142
|
+
and `SLC_AGENT`, `SLC_MODEL`, and the other `SLC_*` variables override
|
|
143
|
+
either, per key.
|
|
191
144
|
|
|
192
145
|
```yaml
|
|
193
146
|
# slc.config.yaml
|
|
194
147
|
agent: claude-code # claude-code | codex | gemini | opencode
|
|
195
148
|
model: claude-opus-4-8 # optional; omit to use the agent CLI's default
|
|
149
|
+
effort: high # optional adapter-scoped reasoning effort
|
|
150
|
+
reviewerAgent: codex # optional; enables reviewed compilation
|
|
151
|
+
reviewerModel: gpt-5.3-codex # optional reviewer model
|
|
152
|
+
reviewerEffort: xhigh # optional reviewer reasoning effort
|
|
196
153
|
stallTimeout: 600 # seconds of agent silence before a stalled call fails
|
|
197
154
|
pipelinePath: # search roots for <pipeline> references; defaults to the cwd
|
|
198
155
|
- ./pipelines
|
|
199
156
|
```
|
|
200
157
|
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
158
|
+
Discovery order, `--config`, and validation rules live in the
|
|
159
|
+
[CLI spec](specs/user/cli.md); `slc --help` prints the summary.
|
|
160
|
+
|
|
161
|
+
### Reviewed compilation (two agents)
|
|
162
|
+
|
|
163
|
+
Set `reviewerAgent` to compile with two independent agents. Your `agent`
|
|
164
|
+
selection is the Coder that writes each artifact; the Reviewer then
|
|
165
|
+
inspects that work read-only and reports only material correctness or
|
|
166
|
+
spec defects, and the Coder answers every finding with evidence and a
|
|
167
|
+
minimal fix. Up to three review rounds — if the third still reports
|
|
168
|
+
findings, the phase fails closed and names them rather than shipping a
|
|
169
|
+
questionable artifact.
|
|
170
|
+
|
|
171
|
+
It costs at least one extra agent call per transformation that runs.
|
|
172
|
+
Reuse performs no transformation and so makes no calls; Update,
|
|
173
|
+
Ordinary, and `--rebuild` use the loop automatically
|
|
174
|
+
([DR-022](specs/decisions/022-two-agent-reviewed-compilation.md)).
|
|
206
175
|
|
|
207
176
|
## How pipelines work
|
|
208
177
|
|
|
209
178
|
A pipeline is a directory of phase definitions named
|
|
210
179
|
`<source-format>2<target-format>.md`, each declaring its formats in a
|
|
211
|
-
`## Formats` table, plus an optional `link.md`
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
180
|
+
`## Formats` table, plus an optional `link.md` for the terminal link
|
|
181
|
+
phase. `slc` infers phase order by chaining formats — no manifest — and
|
|
182
|
+
refuses incomplete, branching, or cyclic chains. Adding a phase means
|
|
183
|
+
writing a definition, never changing the compiler: `slc` itself performs
|
|
184
|
+
only the generic mechanics of chaining, validation, and artifact
|
|
185
|
+
placement. The bundled `playbook` pipeline chains `text2gears` and
|
|
186
|
+
`gears2fsm`, with `link` emitting the runnable runtime.
|
|
218
187
|
|
|
219
188
|
Every phase runs through a coding agent, one of two ways:
|
|
220
189
|
|
|
@@ -222,9 +191,9 @@ Every phase runs through a coding agent, one of two ways:
|
|
|
222
191
|
performs it. This is how an npm-installed `slc` runs the `playbook`
|
|
223
192
|
pipeline, using the definitions shipped inside `@sublang/playbook`.
|
|
224
193
|
- **Compiled** — the phase's own compiled playbook artifact drives the
|
|
225
|
-
agent through audited state-machine steps. This repository
|
|
226
|
-
|
|
227
|
-
|
|
194
|
+
agent through audited state-machine steps. This repository runs its
|
|
195
|
+
bundled phases this way: `slc` is self-hosting, its phase definitions
|
|
196
|
+
compiled, reviewed, and sha256-pinned under
|
|
228
197
|
[`pipelines/playbook/`](pipelines/playbook), failing closed on drift
|
|
229
198
|
([self-hosting spec](specs/user/self-hosting.md)).
|
|
230
199
|
|
package/dist/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../src/app.ts"],"names":[],"mappings":"AAoBA,OAAO,EACL,+BAA+B,EAC/B,wBAAwB,EAExB,KAAK,cAAc,EACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAGL,KAAK,UAAU,EAChB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAA0B,KAAK,YAAY,EAAE,MAAM,eAAe,CAAC;AAM1E,OAAO,EAAU,KAAK,OAAO,EAAE,MAAM,aAAa,CAAC;AAUnD,wBAAwB;AACxB,eAAO,MAAM,IAAI,QAAQ,CAAC;AAE1B,sCAAsC;AACtC,wBAAgB,OAAO,IAAI,MAAM,CAEhC;AAED,4EAA4E;AAC5E,MAAM,MAAM,WAAW,GAAG,CAAC,EAAE,EAAE;IAC7B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACxC,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,WAAW,CAAC;IACpB,uDAAuD;IACvD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,+EAA+E;IAC/E,QAAQ,CAAC,EAAE,YAAY,CAAC;CACzB,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;AAEjC,0FAA0F;AAC1F,MAAM,WAAW,UAAU;IACzB,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,MAAM,C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_AGENT: nonBlank(env.SLC_AGENT) ?? file.agent,
|
|
101
101
|
SLC_MODEL: nonBlank(env.SLC_MODEL) ?? file.model,
|
|
102
102
|
SLC_EFFORT: nonBlank(env.SLC_EFFORT) ?? file.effort,
|
|
103
|
+
SLC_REVIEWER_AGENT: nonBlank(env.SLC_REVIEWER_AGENT) ?? file.reviewerAgent,
|
|
104
|
+
SLC_REVIEWER_MODEL: nonBlank(env.SLC_REVIEWER_MODEL) ?? file.reviewerModel,
|
|
105
|
+
SLC_REVIEWER_EFFORT: nonBlank(env.SLC_REVIEWER_EFFORT) ?? file.reviewerEffort,
|
|
103
106
|
});
|
|
104
107
|
const pipelinePath = nonBlank(env.SLC_PIPELINE_PATH) ?? file.pipelinePath;
|
|
105
108
|
const stallSeconds = parseStallTimeout(nonBlank(env.SLC_STALL_TIMEOUT)) ??
|
|
@@ -155,11 +158,15 @@ export function usageText() {
|
|
|
155
158
|
' environment variable below:',
|
|
156
159
|
' ./slc.config.yaml',
|
|
157
160
|
' ${XDG_CONFIG_HOME:-~/.config}/slc/config.yaml',
|
|
158
|
-
' Keys: agent, model, effort,
|
|
161
|
+
' Keys: agent, model, effort, reviewerAgent, reviewerModel,',
|
|
162
|
+
' reviewerEffort, pipelinePath, stallTimeout.',
|
|
159
163
|
'',
|
|
160
164
|
' SLC_AGENT agent CLI: claude-code | codex | gemini | opencode',
|
|
161
165
|
' SLC_MODEL optional model for the agent CLI',
|
|
162
166
|
' SLC_EFFORT optional adapter-scoped reasoning effort (e.g. xhigh)',
|
|
167
|
+
' SLC_REVIEWER_AGENT optional independent reviewer; enables reviewed compilation',
|
|
168
|
+
' SLC_REVIEWER_MODEL optional model for the reviewer agent CLI',
|
|
169
|
+
' SLC_REVIEWER_EFFORT optional adapter-scoped reviewer reasoning effort',
|
|
163
170
|
' SLC_PIPELINE_PATH search roots for <pipeline> references (default: cwd)',
|
|
164
171
|
' SLC_STALL_TIMEOUT seconds of agent inactivity before a stalled call',
|
|
165
172
|
' fails the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AACJ,CAAC;AAED,kEAAkE;AAClE,SAAS,OAAO,CAAC,IAAuB,EAAE,GAAG,KAAe;IAC1D,OAAO,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC;AACjD,CAAC"}
|
package/dist/config-file.d.ts
CHANGED
|
@@ -14,6 +14,10 @@ export interface FileConfig {
|
|
|
14
14
|
agent?: string;
|
|
15
15
|
model?: string;
|
|
16
16
|
effort?: string;
|
|
17
|
+
/** Optional independent Reviewer; presence enables reviewed calls (DR-022). */
|
|
18
|
+
reviewerAgent?: string;
|
|
19
|
+
reviewerModel?: string;
|
|
20
|
+
reviewerEffort?: string;
|
|
17
21
|
pipelinePath?: string[];
|
|
18
22
|
/** Agent-stall watchdog window in seconds; `0` disables (DR-019, CLI-34). */
|
|
19
23
|
stallTimeout?: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-file.d.ts","sourceRoot":"","sources":["../src/config-file.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config-file.d.ts","sourceRoot":"","sources":["../src/config-file.ts"],"names":[],"mappings":"AA8BA;;;;;GAKG;AACH,eAAO,MAAM,yBAAyB,QAAmC,CAAC;AAE1E,yEAAyE;AACzE,eAAO,MAAM,WAAW,oBAAoB,CAAC;AAC7C,4DAA4D;AAC5D,eAAO,MAAM,WAAW,QAA6B,CAAC;AAOtD,+EAA+E;AAC/E,MAAM,WAAW,UAAU;IACzB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,+EAA+E;IAC/E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,6EAA6E;IAC7E,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,mFAAmF;AACnF,MAAM,WAAW,qBAAqB;IACpC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8FAA8F;IAC9F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2FAA2F;IAC3F,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8EAA8E;IAC9E,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;IACzC,iGAAiG;IACjG,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACjC;AAED,mEAAmE;AACnE,MAAM,MAAM,mBAAmB,GAC3B,kBAAkB,GAClB,cAAc,GACd,gBAAgB,CAAC;AAErB,0FAA0F;AAC1F,qBAAa,eAAgB,SAAQ,KAAK;IACxC,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAC;gBAEvB,IAAI,EAAE,mBAAmB,EAAE,OAAO,EAAE,MAAM;CAKvD;AAED;;;;;;;;;;;GAWG;AACH,wBAAsB,cAAc,CAClC,OAAO,GAAE,qBAA0B,GAClC,OAAO,CAAC,gBAAgB,CAAC,CAQ3B"}
|
package/dist/config-file.js
CHANGED
|
@@ -4,10 +4,11 @@
|
|
|
4
4
|
* Config-file loader for the `slc` bin (DR-006, CLI-20, CLI-21).
|
|
5
5
|
*
|
|
6
6
|
* Discovers and parses the optional YAML config file that supplies the
|
|
7
|
-
* cligent-invocation defaults —
|
|
8
|
-
* environment then overrides (DR-006). Discovery
|
|
9
|
-
* working directory, then
|
|
10
|
-
* explicit `--config` path
|
|
7
|
+
* cligent-invocation defaults — Coder and optional Reviewer selection plus
|
|
8
|
+
* `pipelinePath` — which the environment then overrides (DR-006). Discovery
|
|
9
|
+
* reads `slc.config.yaml` in the working directory, then
|
|
10
|
+
* `${XDG_CONFIG_HOME:-~/.config}/slc/config.yaml`; an explicit `--config` path
|
|
11
|
+
* disables discovery and is an error when absent, while
|
|
11
12
|
* a discovery miss returns an empty result that falls through to the environment
|
|
12
13
|
* and defaults. The loader validates a flat schema and rejects unknown keys and
|
|
13
14
|
* mistyped values; the supported-agent check stays with `resolveAgentSelection`
|
|
@@ -119,6 +120,9 @@ const ALLOWED_KEYS = new Set([
|
|
|
119
120
|
'agent',
|
|
120
121
|
'model',
|
|
121
122
|
'effort',
|
|
123
|
+
'reviewerAgent',
|
|
124
|
+
'reviewerModel',
|
|
125
|
+
'reviewerEffort',
|
|
122
126
|
'pipelinePath',
|
|
123
127
|
'stallTimeout',
|
|
124
128
|
]);
|
|
@@ -132,7 +136,7 @@ function normalizeFileConfig(value, path) {
|
|
|
132
136
|
const input = value;
|
|
133
137
|
for (const key of Object.keys(input)) {
|
|
134
138
|
if (!ALLOWED_KEYS.has(key)) {
|
|
135
|
-
throw new ConfigFileError('config-invalid', `Unknown config key "${key}" in ${path}; allowed keys: agent, model, effort, pipelinePath, stallTimeout`);
|
|
139
|
+
throw new ConfigFileError('config-invalid', `Unknown config key "${key}" in ${path}; allowed keys: agent, model, effort, reviewerAgent, reviewerModel, reviewerEffort, pipelinePath, stallTimeout`);
|
|
136
140
|
}
|
|
137
141
|
}
|
|
138
142
|
const config = {};
|
|
@@ -145,6 +149,15 @@ function normalizeFileConfig(value, path) {
|
|
|
145
149
|
if (input.effort !== undefined) {
|
|
146
150
|
config.effort = requireString(input.effort, 'effort', path);
|
|
147
151
|
}
|
|
152
|
+
if (input.reviewerAgent !== undefined) {
|
|
153
|
+
config.reviewerAgent = requireString(input.reviewerAgent, 'reviewerAgent', path);
|
|
154
|
+
}
|
|
155
|
+
if (input.reviewerModel !== undefined) {
|
|
156
|
+
config.reviewerModel = requireString(input.reviewerModel, 'reviewerModel', path);
|
|
157
|
+
}
|
|
158
|
+
if (input.reviewerEffort !== undefined) {
|
|
159
|
+
config.reviewerEffort = requireString(input.reviewerEffort, 'reviewerEffort', path);
|
|
160
|
+
}
|
|
148
161
|
if (input.pipelinePath !== undefined) {
|
|
149
162
|
config.pipelinePath = requireStringArray(input.pipelinePath, 'pipelinePath', path);
|
|
150
163
|
}
|
package/dist/config-file.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-file.js","sourceRoot":"","sources":["../src/config-file.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,0EAA0E;AAE1E
|
|
1
|
+
{"version":3,"file":"config-file.js","sourceRoot":"","sources":["../src/config-file.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,0EAA0E;AAE1E;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAEzC,OAAO,EAAE,KAAK,EAAE,MAAM,MAAM,CAAC;AAE7B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,yBAAyB,GAAG,IAAI,CAAC,KAAK,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;AAE1E,yEAAyE;AACzE,MAAM,CAAC,MAAM,WAAW,GAAG,iBAAiB,CAAC;AAC7C,4DAA4D;AAC5D,MAAM,CAAC,MAAM,WAAW,GAAG,IAAI,CAAC,KAAK,EAAE,aAAa,CAAC,CAAC;AAEtD,8FAA8F;AAC9F,MAAM,aAAa,GAAG,aAAa,CACjC,IAAI,GAAG,CAAC,4BAA4B,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eAAe,CACvB,gBAAgB,EAChB,eAAe,GAAG,IAAI,KAAK,SAAS,IAAI,6BAA6B,CACtE,CAAC;QACJ,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/config.d.ts
CHANGED
|
@@ -10,17 +10,19 @@ export type SupportedAgent = (typeof SUPPORTED_AGENTS)[number];
|
|
|
10
10
|
export type AdapterFactory = (agent: SupportedAgent) => AgentAdapter;
|
|
11
11
|
/** Default factory: Cligent's built-in adapters, constructed on demand (CLI-7). */
|
|
12
12
|
export declare const defaultAdapterFactory: AdapterFactory;
|
|
13
|
-
/** A resolved
|
|
13
|
+
/** A resolved Coder and optional Reviewer selection (CLI-7, DR-022). */
|
|
14
14
|
export interface AgentSelection {
|
|
15
15
|
agent: SupportedAgent;
|
|
16
16
|
/** Optional model; omitted so the agent CLI uses its own default. */
|
|
17
17
|
model?: string;
|
|
18
18
|
/** Optional adapter-scoped reasoning effort; omitted for the default. */
|
|
19
19
|
effort?: string;
|
|
20
|
+
/** Optional independent Reviewer selection; presence enables DR-022. */
|
|
21
|
+
reviewer?: Omit<AgentSelection, 'reviewer'>;
|
|
20
22
|
}
|
|
21
23
|
/** Machine-readable reason agent configuration was refused (CLI-12). */
|
|
22
|
-
export type ConfigErrorCode = 'agent-unset' | 'agent-unsupported' | 'effort-unsupported';
|
|
23
|
-
/** Raised when
|
|
24
|
+
export type ConfigErrorCode = 'agent-unset' | 'agent-unsupported' | 'effort-unsupported' | 'reviewer-agent-unset' | 'reviewer-agent-unsupported' | 'reviewer-effort-unsupported';
|
|
25
|
+
/** Raised when a required Coder or Reviewer selection is invalid. */
|
|
24
26
|
export declare class ConfigError extends Error {
|
|
25
27
|
readonly code: ConfigErrorCode;
|
|
26
28
|
constructor(code: ConfigErrorCode, message: string);
|
|
@@ -28,7 +30,7 @@ export declare class ConfigError extends Error {
|
|
|
28
30
|
/** Reports whether `agent` is one of the registered ids (CLI-7). */
|
|
29
31
|
export declare function isSupportedAgent(agent: string): agent is SupportedAgent;
|
|
30
32
|
/**
|
|
31
|
-
* Resolves the
|
|
33
|
+
* Resolves the Coder and optional Reviewer selections from environment configuration
|
|
32
34
|
* (CLI-7, CLI-12): `SLC_AGENT` names a registered agent CLI, `SLC_MODEL`
|
|
33
35
|
* optionally names a model, and `SLC_EFFORT` optionally selects an
|
|
34
36
|
* adapter-scoped reasoning effort validated against Cligent's support
|
package/dist/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAIvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAErD,sDAAsD;AACtD,eAAO,MAAM,gBAAgB,yDAKnB,CAAC;AAEX,mDAAmD;AACnD,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D,uEAAuE;AACvE,MAAM,MAAM,cAAc,GAAG,CAAC,KAAK,EAAE,cAAc,KAAK,YAAY,CAAC;AAErE,mFAAmF;AACnF,eAAO,MAAM,qBAAqB,EAAE,cAWnC,CAAC;AAEF,wEAAwE;AACxE,MAAM,WAAW,cAAc;IAC7B,KAAK,EAAE,cAAc,CAAC;IACtB,qEAAqE;IACrE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,yEAAyE;IACzE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,wEAAwE;IACxE,QAAQ,CAAC,EAAE,IAAI,CAAC,cAAc,EAAE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AC,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,gBAAgB,CAAC;IAC/B,+EAA+E;IAC/E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,qFAAqF;IACrF,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B,GACL,CAAC,MAAM,EAAE,iBAAiB,KAAK,aAAa,CAiB9C"}
|
package/dist/config.js
CHANGED
|
@@ -4,8 +4,9 @@
|
|
|
4
4
|
* Agent/model configuration and executor construction for the `slc` bin (CLI-7,
|
|
5
5
|
* CLI-8, CLI-12, DR-004, DR-005).
|
|
6
6
|
*
|
|
7
|
-
* `resolveAgentSelection` reads
|
|
8
|
-
* refuses
|
|
7
|
+
* `resolveAgentSelection` reads the Coder and optional Reviewer selections from
|
|
8
|
+
* the environment and refuses unset or unsupported required values (CLI-12,
|
|
9
|
+
* DR-022).
|
|
9
10
|
* `createConfiguredExecutor` builds the interpreted executor and
|
|
10
11
|
* `createConfiguredCompiledFactory` the compiled-execution factory pinned phases
|
|
11
12
|
* select, both over Cligent-backed transports for the selected agent, binding
|
|
@@ -23,6 +24,7 @@ import { isEffortSupported, supportedEffortValues } from '@sublang/cligent';
|
|
|
23
24
|
import { createCligentAgent } from './cligent-agent.js';
|
|
24
25
|
import { createCompiledExecutor } from './compiled-executor.js';
|
|
25
26
|
import { createInterpretedExecutor } from './interpreter.js';
|
|
27
|
+
import { createReviewingAgent } from './reviewing-agent.js';
|
|
26
28
|
/** Agent CLI ids the executable registers (CLI-7). */
|
|
27
29
|
export const SUPPORTED_AGENTS = [
|
|
28
30
|
'claude-code',
|
|
@@ -43,7 +45,7 @@ export const defaultAdapterFactory = (agent) => {
|
|
|
43
45
|
return new OpenCodeAdapter();
|
|
44
46
|
}
|
|
45
47
|
};
|
|
46
|
-
/** Raised when
|
|
48
|
+
/** Raised when a required Coder or Reviewer selection is invalid. */
|
|
47
49
|
export class ConfigError extends Error {
|
|
48
50
|
code;
|
|
49
51
|
constructor(code, message) {
|
|
@@ -57,7 +59,7 @@ export function isSupportedAgent(agent) {
|
|
|
57
59
|
return SUPPORTED_AGENTS.includes(agent);
|
|
58
60
|
}
|
|
59
61
|
/**
|
|
60
|
-
* Resolves the
|
|
62
|
+
* Resolves the Coder and optional Reviewer selections from environment configuration
|
|
61
63
|
* (CLI-7, CLI-12): `SLC_AGENT` names a registered agent CLI, `SLC_MODEL`
|
|
62
64
|
* optionally names a model, and `SLC_EFFORT` optionally selects an
|
|
63
65
|
* adapter-scoped reasoning effort validated against Cligent's support
|
|
@@ -69,17 +71,45 @@ export function isSupportedAgent(agent) {
|
|
|
69
71
|
* (`effort-unsupported`); no implicit default agent is applied.
|
|
70
72
|
*/
|
|
71
73
|
export function resolveAgentSelection(env) {
|
|
72
|
-
const
|
|
74
|
+
const selection = resolveOneSelection(env, {
|
|
75
|
+
agent: 'SLC_AGENT',
|
|
76
|
+
model: 'SLC_MODEL',
|
|
77
|
+
effort: 'SLC_EFFORT',
|
|
78
|
+
unsetCode: 'agent-unset',
|
|
79
|
+
unsupportedCode: 'agent-unsupported',
|
|
80
|
+
effortCode: 'effort-unsupported',
|
|
81
|
+
required: true,
|
|
82
|
+
});
|
|
83
|
+
if (selection === undefined) {
|
|
84
|
+
throw new Error('required Coder selection unexpectedly resolved empty');
|
|
85
|
+
}
|
|
86
|
+
const reviewer = resolveOneSelection(env, {
|
|
87
|
+
agent: 'SLC_REVIEWER_AGENT',
|
|
88
|
+
model: 'SLC_REVIEWER_MODEL',
|
|
89
|
+
effort: 'SLC_REVIEWER_EFFORT',
|
|
90
|
+
unsetCode: 'reviewer-agent-unset',
|
|
91
|
+
unsupportedCode: 'reviewer-agent-unsupported',
|
|
92
|
+
effortCode: 'reviewer-effort-unsupported',
|
|
93
|
+
required: false,
|
|
94
|
+
});
|
|
95
|
+
return reviewer === undefined ? selection : { ...selection, reviewer };
|
|
96
|
+
}
|
|
97
|
+
function resolveOneSelection(env, names) {
|
|
98
|
+
const agent = (env[names.agent] ?? '').trim();
|
|
99
|
+
const model = (env[names.model] ?? '').trim();
|
|
100
|
+
const effort = (env[names.effort] ?? '').trim();
|
|
73
101
|
if (agent === '') {
|
|
74
|
-
|
|
102
|
+
if (!names.required && model === '' && effort === '')
|
|
103
|
+
return undefined;
|
|
104
|
+
throw new ConfigError(names.unsetCode, names.required
|
|
105
|
+
? `${names.agent} is not set; set it to one of: ${SUPPORTED_AGENTS.join(', ')}`
|
|
106
|
+
: `${names.agent} is not set; ${names.model} and ${names.effort} require a reviewer agent; set ${names.agent} to one of: ${SUPPORTED_AGENTS.join(', ')}`);
|
|
75
107
|
}
|
|
76
108
|
if (!isSupportedAgent(agent)) {
|
|
77
|
-
throw new ConfigError(
|
|
109
|
+
throw new ConfigError(names.unsupportedCode, `${names.agent} "${agent}" is not a supported agent CLI; choose one of: ${SUPPORTED_AGENTS.join(', ')}`);
|
|
78
110
|
}
|
|
79
|
-
const model = (env.SLC_MODEL ?? '').trim();
|
|
80
|
-
const effort = (env.SLC_EFFORT ?? '').trim();
|
|
81
111
|
if (effort !== '' && !isEffortSupported(agent, effort)) {
|
|
82
|
-
throw new ConfigError(
|
|
112
|
+
throw new ConfigError(names.effortCode, `${names.effort} "${effort}" is not supported by ${agent}; choose one of: ${(supportedEffortValues(agent) ?? []).join(', ')}`);
|
|
83
113
|
}
|
|
84
114
|
return {
|
|
85
115
|
agent,
|
|
@@ -96,7 +126,8 @@ export function resolveAgentSelection(env) {
|
|
|
96
126
|
* sandbox.
|
|
97
127
|
*/
|
|
98
128
|
export function createConfiguredExecutor(selection, opts = {}) {
|
|
99
|
-
const
|
|
129
|
+
const coder = createConfiguredAgentClient(selection, opts);
|
|
130
|
+
const agent = configuredReviewingClient(selection, coder, opts);
|
|
100
131
|
return createInterpretedExecutor({
|
|
101
132
|
agent,
|
|
102
133
|
config: { model: selection.model, cwd: opts.cwd },
|
|
@@ -127,7 +158,10 @@ export function createConfiguredAgentClient(selection, opts = {}) {
|
|
|
127
158
|
* and applying the selected model as the default per-player model (PHEXEC-13).
|
|
128
159
|
*/
|
|
129
160
|
export function createConfiguredCompiledFactory(selection, opts = {}) {
|
|
130
|
-
const client = () =>
|
|
161
|
+
const client = () => {
|
|
162
|
+
const coder = createConfiguredAgentClient(selection, opts);
|
|
163
|
+
return configuredReviewingClient(selection, coder, opts);
|
|
164
|
+
};
|
|
131
165
|
return (choice) => createCompiledExecutor({
|
|
132
166
|
artifactPath: resolve(choice.pipelineDir, choice.record.artifact.path),
|
|
133
167
|
runRoot: opts.cwd ?? process.cwd(),
|
|
@@ -140,6 +174,25 @@ export function createConfiguredCompiledFactory(selection, opts = {}) {
|
|
|
140
174
|
onStatus: opts.onStatus,
|
|
141
175
|
});
|
|
142
176
|
}
|
|
177
|
+
function configuredReviewingClient(selection, coder, opts) {
|
|
178
|
+
const reviewer = selection.reviewer;
|
|
179
|
+
if (reviewer === undefined)
|
|
180
|
+
return coder;
|
|
181
|
+
return createReviewingAgent({
|
|
182
|
+
coder,
|
|
183
|
+
reviewer: () => createConfiguredAgentClient(reviewer, {
|
|
184
|
+
...opts,
|
|
185
|
+
// Reviewer inspection is read-only even though the Coder is allowed to
|
|
186
|
+
// write its declared artifact (DR-022).
|
|
187
|
+
permissions: {
|
|
188
|
+
fileWrite: 'deny',
|
|
189
|
+
shellExecute: 'deny',
|
|
190
|
+
networkAccess: 'deny',
|
|
191
|
+
},
|
|
192
|
+
}),
|
|
193
|
+
reviewerModel: reviewer.model,
|
|
194
|
+
});
|
|
195
|
+
}
|
|
143
196
|
function runtimeContractForPin(choice) {
|
|
144
197
|
const provenance = choice.record.linkTarget.provenance;
|
|
145
198
|
if (provenance === undefined || provenance === '@sublang/playbook@0.9.0') {
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,0EA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AAU,KAAK,yBAAyB,EAAE,CAAC;QACzE,OAAO,QAAQ,CAAC;IAClB,CAAC;IACD,yEAAyE;IACzE,2EAA2E;IAC3E,sEAAsE;IACtE,0EAA0E;IAC1E,yEAAyE;IACzE,oEAAoE;IACpE,0EAA0E;IAC1E,mEAAmE;IACnE,yEAAyE;IACzE,mEAAmE;IACnE,sEAAsE;IACtE,sEAAsE;IACtE,gEAAgE;IAChE,mDAAmD;IACnD,IACE,UAAU,KAAK,0BAA0B;QACzC,UAAU,KAAK,yBAAyB;QACxC,UAAU,KAAK,yBAAyB;QACxC,UAAU,KAAK,yBAAyB;QACxC,UAAU,KAAK,yBAAyB,EACxC,CAAC;QACD,OAAO,aAAa,CAAC;IACvB,CAAC;IACD,MAAM,IAAI,KAAK,CACb,iDAAiD,UAAU,EAAE,CAC9D,CAAC;AACJ,CAAC"}
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAGA;;;;;;GAMG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,0EAA0E;AAE1E;;;;;;GAMG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,0EAA0E;AAE1E;;;;;;GAMG;AAEH,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playbook-ports.d.ts","sourceRoot":"","sources":["../src/playbook-ports.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,kBAAkB,CAAC;AACpE,OAAO,KAAK,EAGV,uBAAuB,EAKxB,MAAM,wBAAwB,CAAC;AAEhC,0EAA0E;AAC1E,MAAM,WAAW,oBAAqB,SAAQ,uBAAuB;IACnE,4EAA4E;IAC5E,gBAAgB,IAAI,MAAM,EAAE,CAAC;CAC9B;AAED;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,KAAK,WAAW,CAAC,CAAC;AAEhF,sFAAsF;AACtF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IACxC,iFAAiF;IACjF,MAAM,EAAE,eAAe,CAAC;IACxB,8DAA8D;IAC9D,KAAK,EAAE,WAAW,CAAC;IACnB,sEAAsE;IACtE,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1C,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kDAAkD;IAClD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,GAAG,oBAAoB,
|
|
1
|
+
{"version":3,"file":"playbook-ports.d.ts","sourceRoot":"","sources":["../src/playbook-ports.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;GAkBG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,kBAAkB,CAAC;AACpE,OAAO,KAAK,EAGV,uBAAuB,EAKxB,MAAM,wBAAwB,CAAC;AAEhC,0EAA0E;AAC1E,MAAM,WAAW,oBAAqB,SAAQ,uBAAuB;IACnE,4EAA4E;IAC5E,gBAAgB,IAAI,MAAM,EAAE,CAAC;CAC9B;AAED;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,CAAC,CAAC,QAAQ,EAAE,MAAM,KAAK,WAAW,CAAC,CAAC;AAEhF,sFAAsF;AACtF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE;IACxC,iFAAiF;IACjF,MAAM,EAAE,eAAe,CAAC;IACxB,8DAA8D;IAC9D,KAAK,EAAE,WAAW,CAAC;IACnB,sEAAsE;IACtE,MAAM,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1C,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kDAAkD;IAClD,GAAG,CAAC,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;;;;;OAOG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;;OAMG;IACH,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC,GAAG,oBAAoB,CAiJvB"}
|
package/dist/playbook-ports.js
CHANGED
|
@@ -45,7 +45,9 @@ export function createPlaybookPorts(opts) {
|
|
|
45
45
|
model: opts.defaultModel,
|
|
46
46
|
cwd: opts.cwd,
|
|
47
47
|
resume: isolation.resume,
|
|
48
|
-
|
|
48
|
+
...(isolation.allowedTools === undefined
|
|
49
|
+
? {}
|
|
50
|
+
: { allowedTools: isolation.allowedTools }),
|
|
49
51
|
signal,
|
|
50
52
|
});
|
|
51
53
|
return toCaptainResult(result, signal);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"playbook-ports.js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AAE;QAC3C,MAAM,OAAO,GAAG,GAAS,EAAE,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC;QACxD,MAAM,CAAC,gBAAgB,CAAC,OAAO,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QAC1D,KAAK,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE;YAClB,MAAM,CAAC,mBAAmB,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;YAC7C,OAAO,EAAE,CAAC;QACZ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,WAAW,CAAC,MAAmB;IACtC,OAAO,MAAM,CAAC,MAAM,IAAI,IAAI,KAAK,CAAC,mBAAmB,CAAC,CAAC;AACzD,CAAC;AAED,SAAS,SAAS,CAAC,KAAc;IAC/B,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;QAC9B,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC;IAChD,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { AgentClient } from './interpreter.js';
|
|
2
|
+
/** Options for {@link createReviewingAgent}. */
|
|
3
|
+
export interface ReviewingAgentOptions {
|
|
4
|
+
/** The transformation-performing client whose result remains authoritative. */
|
|
5
|
+
coder: AgentClient;
|
|
6
|
+
/** Constructs a fresh Reviewer client for each performing call. */
|
|
7
|
+
reviewer: () => AgentClient;
|
|
8
|
+
/** Optional Reviewer model; omitted to use that adapter's default. */
|
|
9
|
+
reviewerModel?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Decorates a Coder client with the DR-022 review/fix/re-review protocol.
|
|
13
|
+
*
|
|
14
|
+
* Reviewer failures and malformed verdicts fail closed with a stable error
|
|
15
|
+
* diagnostic that retains the latest Coder text and resume token.
|
|
16
|
+
*/
|
|
17
|
+
export declare function createReviewingAgent(options: ReviewingAgentOptions): AgentClient;
|
|
18
|
+
//# sourceMappingURL=reviewing-agent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviewing-agent.d.ts","sourceRoot":"","sources":["../src/reviewing-agent.ts"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,WAAW,EAAkB,MAAM,kBAAkB,CAAC;AAIpE,gDAAgD;AAChD,MAAM,WAAW,qBAAqB;IACpC,+EAA+E;IAC/E,KAAK,EAAE,WAAW,CAAC;IACnB,mEAAmE;IACnE,QAAQ,EAAE,MAAM,WAAW,CAAC;IAC5B,sEAAsE;IACtE,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,qBAAqB,GAC7B,WAAW,CAkHb"}
|
|
@@ -0,0 +1,295 @@
|
|
|
1
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
+
// SPDX-FileCopyrightText: 2026 SubLang International <https://sublang.ai>
|
|
3
|
+
/**
|
|
4
|
+
* Optional two-agent review orchestration for transformation calls (DR-022).
|
|
5
|
+
*
|
|
6
|
+
* The decorator leaves the first Coder call byte-for-byte unchanged. Calls
|
|
7
|
+
* carrying an explicit `allowedTools` property are control/routing calls and
|
|
8
|
+
* bypass review. A successful transformation is reviewed in an independent,
|
|
9
|
+
* read-only agent session; material findings return to the Coder for disposition
|
|
10
|
+
* and repair until the Reviewer reports no unsettled findings or the bounded
|
|
11
|
+
* review limit is reached. Only the latest Coder result crosses the decorated
|
|
12
|
+
* transport boundary.
|
|
13
|
+
*/
|
|
14
|
+
import { messageOf } from './errors.js';
|
|
15
|
+
const MAX_REVIEWER_CALLS = 3;
|
|
16
|
+
/**
|
|
17
|
+
* Decorates a Coder client with the DR-022 review/fix/re-review protocol.
|
|
18
|
+
*
|
|
19
|
+
* Reviewer failures and malformed verdicts fail closed with a stable error
|
|
20
|
+
* diagnostic that retains the latest Coder text and resume token.
|
|
21
|
+
*/
|
|
22
|
+
export function createReviewingAgent(options) {
|
|
23
|
+
return {
|
|
24
|
+
async run(request) {
|
|
25
|
+
// Presence, not value, is the source-owned routing/control marker. Do
|
|
26
|
+
// not unwrap inherited properties into a transformation call.
|
|
27
|
+
if ('allowedTools' in request) {
|
|
28
|
+
return options.coder.run(request);
|
|
29
|
+
}
|
|
30
|
+
let coderResult = await options.coder.run(request);
|
|
31
|
+
if (!isReviewable(coderResult))
|
|
32
|
+
return coderResult;
|
|
33
|
+
let reviewer;
|
|
34
|
+
try {
|
|
35
|
+
reviewer = options.reviewer();
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
return failClosed(coderResult, `Reviewer could not start: ${messageOf(error)}`);
|
|
39
|
+
}
|
|
40
|
+
let reviewerResume = false;
|
|
41
|
+
const transcript = [];
|
|
42
|
+
let reviewerCalls = 0;
|
|
43
|
+
for (;;) {
|
|
44
|
+
let review;
|
|
45
|
+
try {
|
|
46
|
+
reviewerCalls++;
|
|
47
|
+
review = await reviewer.run({
|
|
48
|
+
prompt: buildReviewerPrompt({
|
|
49
|
+
originalPrompt: request.prompt,
|
|
50
|
+
coderOutput: coderResult.text,
|
|
51
|
+
transcript,
|
|
52
|
+
}),
|
|
53
|
+
cwd: request.cwd,
|
|
54
|
+
model: options.reviewerModel,
|
|
55
|
+
...(reviewerResume === undefined ? {} : { resume: reviewerResume }),
|
|
56
|
+
signal: request.signal,
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
catch (error) {
|
|
60
|
+
return failClosed(coderResult, `Reviewer call threw: ${messageOf(error)}`);
|
|
61
|
+
}
|
|
62
|
+
if (review.status !== 'success') {
|
|
63
|
+
return failClosed(coderResult, `Reviewer returned ${review.status}${review.text ? `: ${review.text}` : ''}`);
|
|
64
|
+
}
|
|
65
|
+
reviewerResume = review.resumeToken;
|
|
66
|
+
const verdict = parseReviewerVerdict(review.text);
|
|
67
|
+
if (verdict.kind === 'clean')
|
|
68
|
+
return coderResult;
|
|
69
|
+
if (verdict.kind === 'malformed') {
|
|
70
|
+
return failClosed(coderResult, `Reviewer returned a malformed verdict: ${review.text}`);
|
|
71
|
+
}
|
|
72
|
+
const findings = review.text.trim();
|
|
73
|
+
if (reviewerCalls === MAX_REVIEWER_CALLS) {
|
|
74
|
+
return failClosed(coderResult, `Reviewer reached the third and final review call; unresolved Reviewer findings:\n${findings}`);
|
|
75
|
+
}
|
|
76
|
+
const priorTranscript = [...transcript];
|
|
77
|
+
transcript.push(`Reviewer verdict:\n${findings}`);
|
|
78
|
+
const coderResume = coderResult.resumeToken;
|
|
79
|
+
const priorCoderResult = coderResult;
|
|
80
|
+
const correction = await options.coder.run({
|
|
81
|
+
prompt: buildCoderFollowupPrompt({
|
|
82
|
+
originalPrompt: request.prompt,
|
|
83
|
+
previousOutput: coderResult.text,
|
|
84
|
+
findings,
|
|
85
|
+
transcript: priorTranscript,
|
|
86
|
+
}),
|
|
87
|
+
cwd: request.cwd,
|
|
88
|
+
model: request.model,
|
|
89
|
+
...(coderResume !== undefined ? { resume: coderResume } : {}),
|
|
90
|
+
signal: request.signal,
|
|
91
|
+
});
|
|
92
|
+
if (correction.status !== 'success')
|
|
93
|
+
return correction;
|
|
94
|
+
const envelope = parseCorrectionEnvelope(correction.text, verdict.findingCount);
|
|
95
|
+
if (envelope.kind === 'malformed') {
|
|
96
|
+
return failClosed(priorCoderResult, `Coder correction returned a malformed private review envelope: ${envelope.reason}`);
|
|
97
|
+
}
|
|
98
|
+
coderResult = { ...correction, text: envelope.result };
|
|
99
|
+
transcript.push([
|
|
100
|
+
'Coder dispositions:',
|
|
101
|
+
...envelope.dispositions.map((disposition) => `${disposition.finding}. ${disposition.decision.toUpperCase()}: ${disposition.reason}`),
|
|
102
|
+
'Coder replacement result:',
|
|
103
|
+
envelope.result,
|
|
104
|
+
].join('\n'));
|
|
105
|
+
if (!isReviewable(coderResult))
|
|
106
|
+
return coderResult;
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
function isReviewable(result) {
|
|
112
|
+
return result.status === 'success' && !/^\s*BLOCKED\b/im.test(result.text);
|
|
113
|
+
}
|
|
114
|
+
function failClosed(result, reason) {
|
|
115
|
+
return {
|
|
116
|
+
...result,
|
|
117
|
+
status: 'error',
|
|
118
|
+
text: `review failed closed: ${reason}; latest Coder output: ${result.text}`,
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
function parseReviewerVerdict(text) {
|
|
122
|
+
const verdict = text.trim().replaceAll('\r\n', '\n');
|
|
123
|
+
if (verdict === 'NO_FINDINGS')
|
|
124
|
+
return { kind: 'clean' };
|
|
125
|
+
if (!verdict.startsWith('FINDINGS:\n'))
|
|
126
|
+
return { kind: 'malformed' };
|
|
127
|
+
const body = verdict.slice('FINDINGS:\n'.length);
|
|
128
|
+
const lines = body.split(/\r?\n/).filter((line) => line.trim() !== '');
|
|
129
|
+
if (lines.length === 0)
|
|
130
|
+
return { kind: 'malformed' };
|
|
131
|
+
let findingCount = 0;
|
|
132
|
+
for (const line of lines) {
|
|
133
|
+
const finding = line.match(/^(\d+)\.\s+\S.*$/);
|
|
134
|
+
if (finding !== null) {
|
|
135
|
+
findingCount++;
|
|
136
|
+
if (finding[1] !== String(findingCount)) {
|
|
137
|
+
return { kind: 'malformed' };
|
|
138
|
+
}
|
|
139
|
+
continue;
|
|
140
|
+
}
|
|
141
|
+
if (findingCount === 0 || !/^[ \t]+\S.*$/.test(line)) {
|
|
142
|
+
return { kind: 'malformed' };
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
return { kind: 'findings', findingCount };
|
|
146
|
+
}
|
|
147
|
+
function parseCorrectionEnvelope(text, findingCount) {
|
|
148
|
+
const source = unwrapCorrectionJson(text);
|
|
149
|
+
if (source === null) {
|
|
150
|
+
return {
|
|
151
|
+
kind: 'malformed',
|
|
152
|
+
reason: 'response must be bare JSON or one lone json/unlabeled fence',
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
let value;
|
|
156
|
+
try {
|
|
157
|
+
value = JSON.parse(source);
|
|
158
|
+
}
|
|
159
|
+
catch {
|
|
160
|
+
return { kind: 'malformed', reason: 'response is not one JSON object' };
|
|
161
|
+
}
|
|
162
|
+
if (typeof value !== 'object' ||
|
|
163
|
+
value === null ||
|
|
164
|
+
Array.isArray(value) ||
|
|
165
|
+
Object.getPrototypeOf(value) !== Object.prototype) {
|
|
166
|
+
return { kind: 'malformed', reason: 'top level must be one JSON object' };
|
|
167
|
+
}
|
|
168
|
+
const record = value;
|
|
169
|
+
if (Object.keys(record).length !== 2 ||
|
|
170
|
+
!Object.hasOwn(record, 'dispositions') ||
|
|
171
|
+
!Object.hasOwn(record, 'result')) {
|
|
172
|
+
return {
|
|
173
|
+
kind: 'malformed',
|
|
174
|
+
reason: 'object must contain exactly dispositions and result',
|
|
175
|
+
};
|
|
176
|
+
}
|
|
177
|
+
if (!Array.isArray(record.dispositions)) {
|
|
178
|
+
return { kind: 'malformed', reason: 'dispositions must be an array' };
|
|
179
|
+
}
|
|
180
|
+
if (record.dispositions.length !== findingCount) {
|
|
181
|
+
return {
|
|
182
|
+
kind: 'malformed',
|
|
183
|
+
reason: `dispositions must cover exactly ${findingCount} findings`,
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
const dispositions = [];
|
|
187
|
+
for (let index = 0; index < record.dispositions.length; index++) {
|
|
188
|
+
const disposition = record.dispositions[index];
|
|
189
|
+
if (typeof disposition !== 'object' ||
|
|
190
|
+
disposition === null ||
|
|
191
|
+
Array.isArray(disposition) ||
|
|
192
|
+
Object.getPrototypeOf(disposition) !== Object.prototype) {
|
|
193
|
+
return {
|
|
194
|
+
kind: 'malformed',
|
|
195
|
+
reason: `disposition ${index + 1} must be an object`,
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
const item = disposition;
|
|
199
|
+
if (Object.keys(item).length !== 3 ||
|
|
200
|
+
!Object.hasOwn(item, 'finding') ||
|
|
201
|
+
!Object.hasOwn(item, 'decision') ||
|
|
202
|
+
!Object.hasOwn(item, 'reason') ||
|
|
203
|
+
item.finding !== index + 1 ||
|
|
204
|
+
(item.decision !== 'accept' && item.decision !== 'reject') ||
|
|
205
|
+
typeof item.reason !== 'string' ||
|
|
206
|
+
item.reason.trim() === '') {
|
|
207
|
+
return {
|
|
208
|
+
kind: 'malformed',
|
|
209
|
+
reason: `disposition ${index + 1} must exactly cover finding ${index + 1} with a decision and nonblank reason`,
|
|
210
|
+
};
|
|
211
|
+
}
|
|
212
|
+
dispositions.push({
|
|
213
|
+
finding: item.finding,
|
|
214
|
+
decision: item.decision,
|
|
215
|
+
reason: item.reason,
|
|
216
|
+
});
|
|
217
|
+
}
|
|
218
|
+
if (typeof record.result !== 'string') {
|
|
219
|
+
return { kind: 'malformed', reason: 'result must be a string' };
|
|
220
|
+
}
|
|
221
|
+
return { kind: 'valid', dispositions, result: record.result };
|
|
222
|
+
}
|
|
223
|
+
function unwrapCorrectionJson(text) {
|
|
224
|
+
const source = text.trim();
|
|
225
|
+
if (!source.startsWith('```'))
|
|
226
|
+
return source;
|
|
227
|
+
const fenced = source.match(/^```(?:json)?[ \t]*\r?\n([\s\S]*?)\r?\n```$/);
|
|
228
|
+
return fenced?.[1] ?? null;
|
|
229
|
+
}
|
|
230
|
+
function buildReviewerPrompt(input) {
|
|
231
|
+
return [
|
|
232
|
+
'Review the current artifact and workspace state produced by the Coder.',
|
|
233
|
+
'Use the host-exposed read-only file and search capabilities needed to inspect the workspace; shell and network capabilities may be unavailable.',
|
|
234
|
+
'If a read-only shell is available, use it only for non-mutating inspection. Never edit, write, mutate, or commit.',
|
|
235
|
+
'The original request and the Coder output follow.',
|
|
236
|
+
'',
|
|
237
|
+
'--- ORIGINAL REQUEST ---',
|
|
238
|
+
input.originalPrompt,
|
|
239
|
+
'--- END ORIGINAL REQUEST ---',
|
|
240
|
+
'',
|
|
241
|
+
'--- CODER OUTPUT ---',
|
|
242
|
+
input.coderOutput,
|
|
243
|
+
'--- END CODER OUTPUT ---',
|
|
244
|
+
...(input.transcript.length === 0
|
|
245
|
+
? []
|
|
246
|
+
: [
|
|
247
|
+
'',
|
|
248
|
+
'--- COMPLETE PRIOR REVIEW TRANSCRIPT ---',
|
|
249
|
+
...input.transcript,
|
|
250
|
+
'--- END COMPLETE PRIOR REVIEW TRANSCRIPT ---',
|
|
251
|
+
]),
|
|
252
|
+
'',
|
|
253
|
+
'Understand the full picture and reason systematically about the underlying design.',
|
|
254
|
+
'Flag only material correctness, behavior, or specification-quality defects; include stale, missing, over-specified, or under-specified requirements when relevant.',
|
|
255
|
+
'Do not flag style, equally valid alternatives, or theoretical threats. Avoid unnecessary complexity, but flag fundamental flaws whose later repair would cost more.',
|
|
256
|
+
'For each defect class, report every instance worth fixing rather than revealing the class piecemeal. Do not duplicate findings.',
|
|
257
|
+
'Accept or challenge each Coder rebuttal. Treat a finding rejected twice with evidence as settled and do not raise it again.',
|
|
258
|
+
'Reply with exactly NO_FINDINGS when no unsettled material finding remains.',
|
|
259
|
+
'Otherwise reply with FINDINGS: followed by top-level findings numbered consecutively from 1. Optional continuation or evidence lines must be indented. Add no preamble or epilogue.',
|
|
260
|
+
].join('\n');
|
|
261
|
+
}
|
|
262
|
+
function buildCoderFollowupPrompt(input) {
|
|
263
|
+
return [
|
|
264
|
+
'Continue the original transformation in the current workspace.',
|
|
265
|
+
'For every current review finding below, accept or reject it in the private response envelope.',
|
|
266
|
+
'Before deciding, understand the full picture and reason systematically about the underlying design.',
|
|
267
|
+
'Reject anything nonessential or not worth fixing now, giving reasoning and citing workspace evidence or test output.',
|
|
268
|
+
'For each accepted item, fix its root cause minimally, including every worthwhile instance of the same defect class, without changing the original response contract.',
|
|
269
|
+
'Do not commit. Preserve all original write-scope restrictions.',
|
|
270
|
+
'Return exactly one JSON object, either bare or wholly enclosed by one unlabeled or json-labeled Markdown fence; add no preamble, epilogue, other fence label, or second fence.',
|
|
271
|
+
'The object must have exactly two fields: "dispositions" and "result".',
|
|
272
|
+
'"dispositions" must contain one item per current finding in consecutive order, each exactly {"finding": number, "decision": "accept" | "reject", "reason": nonblank string}.',
|
|
273
|
+
'"result" must be the complete replacement text in exactly the response format required by the original request.',
|
|
274
|
+
'The original response contract governs only the decoded "result" and takes precedence over disposition prose; never put review metadata inside "result" unless the original contract independently requires it.',
|
|
275
|
+
'',
|
|
276
|
+
'--- ORIGINAL REQUEST ---',
|
|
277
|
+
input.originalPrompt,
|
|
278
|
+
'--- END ORIGINAL REQUEST ---',
|
|
279
|
+
'',
|
|
280
|
+
'--- PREVIOUS CODER OUTPUT ---',
|
|
281
|
+
input.previousOutput,
|
|
282
|
+
'--- END PREVIOUS CODER OUTPUT ---',
|
|
283
|
+
...(input.transcript.length === 0
|
|
284
|
+
? []
|
|
285
|
+
: [
|
|
286
|
+
'',
|
|
287
|
+
'--- COMPLETE PRIOR REVIEW TRANSCRIPT ---',
|
|
288
|
+
...input.transcript,
|
|
289
|
+
'--- END COMPLETE PRIOR REVIEW TRANSCRIPT ---',
|
|
290
|
+
]),
|
|
291
|
+
'',
|
|
292
|
+
input.findings,
|
|
293
|
+
].join('\n');
|
|
294
|
+
}
|
|
295
|
+
//# sourceMappingURL=reviewing-agent.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reviewing-agent.js","sourceRoot":"","sources":["../src/reviewing-agent.ts"],"names":[],"mappings":"AAAA,sCAAsC;AACtC,0EAA0E;AAE1E;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGxC,MAAM,kBAAkB,GAAG,CAAC,CAAC;AAY7B;;;;;GAKG;AACH,MAAM,UAAU,oBAAoB,CAClC,OAA8B;IAE9B,OAAO;QACL,KAAK,CAA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# SLC_AGENT / SLC_MODEL / SLC_EFFORT and matching SLC_REVIEWER_* variables,
|
|
3
|
+
# plus SLC_STALL_TIMEOUT, override these per key (DR-006, DR-022).
|
|
4
4
|
agent: claude-code
|
|
5
5
|
# model: claude-opus-4-8
|
|
6
6
|
# effort: high
|
|
7
|
+
# Optional independent review/fix loop; disabled until reviewerAgent is set.
|
|
8
|
+
# reviewerAgent: codex
|
|
9
|
+
# reviewerModel: gpt-5.3-codex
|
|
10
|
+
# reviewerEffort: xhigh
|
|
7
11
|
# Seconds of agent inactivity before a stalled call fails the run (DR-019);
|
|
8
12
|
# 0 disables the watchdog.
|
|
9
13
|
# stallTimeout: 600
|