@interf/compiler 0.3.0 → 0.3.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.md +77 -71
- package/dist/bin.js +3 -3
- package/dist/bin.js.map +1 -1
- package/dist/commands/compile.d.ts +1 -0
- package/dist/commands/compile.d.ts.map +1 -1
- package/dist/commands/compile.js +42 -68
- package/dist/commands/compile.js.map +1 -1
- package/dist/commands/create-workflow-wizard.d.ts.map +1 -1
- package/dist/commands/create-workflow-wizard.js +17 -8
- package/dist/commands/create-workflow-wizard.js.map +1 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +35 -45
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/default.d.ts.map +1 -1
- package/dist/commands/default.js +27 -31
- package/dist/commands/default.js.map +1 -1
- package/dist/commands/doctor.js +2 -2
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/executor-flow.d.ts +9 -0
- package/dist/commands/executor-flow.d.ts.map +1 -0
- package/dist/commands/executor-flow.js +55 -0
- package/dist/commands/executor-flow.js.map +1 -0
- package/dist/commands/init.d.ts +1 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +332 -64
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/list.js +1 -1
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/source-config-wizard.d.ts +5 -6
- package/dist/commands/source-config-wizard.d.ts.map +1 -1
- package/dist/commands/source-config-wizard.js +86 -82
- package/dist/commands/source-config-wizard.js.map +1 -1
- package/dist/commands/test-flow.d.ts +21 -0
- package/dist/commands/test-flow.d.ts.map +1 -0
- package/dist/commands/test-flow.js +106 -0
- package/dist/commands/test-flow.js.map +1 -0
- package/dist/commands/test.d.ts +4 -0
- package/dist/commands/test.d.ts.map +1 -0
- package/dist/commands/test.js +131 -0
- package/dist/commands/test.js.map +1 -0
- package/dist/commands/verify.d.ts.map +1 -1
- package/dist/commands/verify.js +7 -3
- package/dist/commands/verify.js.map +1 -1
- package/dist/commands/workspace-flow.d.ts +21 -0
- package/dist/commands/workspace-flow.d.ts.map +1 -0
- package/dist/commands/workspace-flow.js +90 -0
- package/dist/commands/workspace-flow.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-detection.js +4 -4
- package/dist/lib/agent-detection.js.map +1 -1
- package/dist/lib/agent-skills.js +6 -6
- package/dist/lib/agent-skills.js.map +1 -1
- package/dist/lib/benchmark-execution.d.ts.map +1 -1
- package/dist/lib/benchmark-execution.js +39 -17
- package/dist/lib/benchmark-execution.js.map +1 -1
- package/dist/lib/benchmark-sandbox.d.ts +10 -0
- package/dist/lib/benchmark-sandbox.d.ts.map +1 -0
- package/dist/lib/benchmark-sandbox.js +75 -0
- package/dist/lib/benchmark-sandbox.js.map +1 -0
- package/dist/lib/benchmark-targets.d.ts +1 -0
- package/dist/lib/benchmark-targets.d.ts.map +1 -1
- package/dist/lib/benchmark-targets.js +12 -0
- package/dist/lib/benchmark-targets.js.map +1 -1
- package/dist/lib/benchmark-types.d.ts +1 -1
- package/dist/lib/benchmark-types.d.ts.map +1 -1
- package/dist/lib/benchmark.d.ts +1 -1
- package/dist/lib/benchmark.d.ts.map +1 -1
- package/dist/lib/benchmark.js +1 -1
- package/dist/lib/benchmark.js.map +1 -1
- package/dist/lib/interf-scaffold.d.ts.map +1 -1
- package/dist/lib/interf-scaffold.js +2 -1
- package/dist/lib/interf-scaffold.js.map +1 -1
- package/dist/lib/interf-workflow-package.d.ts.map +1 -1
- package/dist/lib/interf-workflow-package.js +7 -2
- package/dist/lib/interf-workflow-package.js.map +1 -1
- package/dist/lib/local-workflows.d.ts.map +1 -1
- package/dist/lib/local-workflows.js +24 -8
- package/dist/lib/local-workflows.js.map +1 -1
- package/dist/lib/runtime-contracts.d.ts +3 -1
- package/dist/lib/runtime-contracts.d.ts.map +1 -1
- package/dist/lib/runtime-contracts.js +115 -0
- package/dist/lib/runtime-contracts.js.map +1 -1
- package/dist/lib/runtime-reconcile.d.ts +2 -1
- package/dist/lib/runtime-reconcile.d.ts.map +1 -1
- package/dist/lib/runtime-reconcile.js +71 -15
- package/dist/lib/runtime-reconcile.js.map +1 -1
- package/dist/lib/runtime-runs.js +12 -3
- package/dist/lib/runtime-runs.js.map +1 -1
- package/dist/lib/runtime-types.d.ts +11 -0
- package/dist/lib/runtime-types.d.ts.map +1 -1
- package/dist/lib/runtime.d.ts +1 -1
- package/dist/lib/runtime.d.ts.map +1 -1
- package/dist/lib/runtime.js +1 -1
- package/dist/lib/runtime.js.map +1 -1
- package/dist/lib/schema.d.ts +26 -9
- package/dist/lib/schema.d.ts.map +1 -1
- package/dist/lib/schema.js +13 -7
- package/dist/lib/schema.js.map +1 -1
- package/dist/lib/source-config.d.ts +2 -1
- package/dist/lib/source-config.d.ts.map +1 -1
- package/dist/lib/source-config.js +7 -4
- package/dist/lib/source-config.js.map +1 -1
- package/dist/lib/state-health.d.ts +2 -2
- package/dist/lib/state-health.d.ts.map +1 -1
- package/dist/lib/state-health.js +34 -19
- package/dist/lib/state-health.js.map +1 -1
- package/dist/lib/state-io.d.ts.map +1 -1
- package/dist/lib/state-io.js +6 -0
- package/dist/lib/state-io.js.map +1 -1
- package/dist/lib/validate-workspace.d.ts +41 -0
- package/dist/lib/validate-workspace.d.ts.map +1 -1
- package/dist/lib/validate-workspace.js +152 -4
- package/dist/lib/validate-workspace.js.map +1 -1
- package/dist/lib/validate.d.ts +2 -2
- package/dist/lib/validate.d.ts.map +1 -1
- package/dist/lib/validate.js +17 -2
- package/dist/lib/validate.js.map +1 -1
- package/dist/lib/workflow-definitions.d.ts.map +1 -1
- package/dist/lib/workflow-definitions.js +42 -20
- package/dist/lib/workflow-definitions.js.map +1 -1
- package/dist/lib/workflow-helpers.d.ts.map +1 -1
- package/dist/lib/workflow-helpers.js +4 -2
- package/dist/lib/workflow-helpers.js.map +1 -1
- package/dist/lib/workflows.d.ts +2 -2
- package/dist/lib/workflows.d.ts.map +1 -1
- package/dist/lib/workflows.js +3 -1
- package/dist/lib/workflows.js.map +1 -1
- package/dist/lib/workspace-compile.d.ts +4 -3
- package/dist/lib/workspace-compile.d.ts.map +1 -1
- package/dist/lib/workspace-compile.js +199 -100
- package/dist/lib/workspace-compile.js.map +1 -1
- package/package.json +1 -1
- package/skills/benchmark/SKILL.md +4 -3
- package/skills/workflow/create/SKILL.md +4 -1
- package/skills/workspace/shape/SKILL.md +15 -0
- package/skills/workspace/structure/SKILL.md +15 -0
- package/skills/workspace/summarize/SKILL.md +15 -0
- package/dist/commands/benchmark.d.ts +0 -3
- package/dist/commands/benchmark.d.ts.map +0 -1
- package/dist/commands/benchmark.js +0 -83
- package/dist/commands/benchmark.js.map +0 -1
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ Interf measures and improves how accurately local agents answer questions from y
|
|
|
6
6
|
|
|
7
7
|
If you use Claude Code, Codex, OpenClaw, Hermes, or your own local agent setup on folders full of PDFs, docs, spreadsheets, and notes, the failure often shows up late: missed evidence, shallow analysis, bad comparisons, or answers that sound confident but are wrong.
|
|
8
8
|
|
|
9
|
-
Interf lets you write a few questions and expected answers about your files, build a compiled workspace on top of those files, and see whether the result actually passes.
|
|
9
|
+
Interf lets you write a few questions and expected answers about your files, test the raw files first if you want a baseline, build a compiled workspace on top of those files, and see whether the result actually passes.
|
|
10
10
|
|
|
11
11
|
- your files stay on your machine
|
|
12
12
|
- you choose the local agent
|
|
@@ -28,7 +28,14 @@ Install:
|
|
|
28
28
|
npm install -g @interf/compiler
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
|
|
31
|
+
The quickest start is the wizard:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
cd ~/my-folder
|
|
35
|
+
interf
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
If you want to see the config shape first, this is what Interf writes:
|
|
32
39
|
|
|
33
40
|
```json
|
|
34
41
|
{
|
|
@@ -51,23 +58,28 @@ Start by writing a few questions and expected answers in `interf.config.json`:
|
|
|
51
58
|
}
|
|
52
59
|
```
|
|
53
60
|
|
|
54
|
-
|
|
61
|
+
The root-level flow is:
|
|
55
62
|
|
|
56
63
|
```bash
|
|
57
|
-
|
|
58
|
-
interf init
|
|
59
|
-
interf create workspace
|
|
64
|
+
interf
|
|
60
65
|
interf compile
|
|
61
|
-
interf
|
|
66
|
+
interf test
|
|
62
67
|
```
|
|
63
68
|
|
|
64
|
-
|
|
69
|
+
The first guided run can:
|
|
70
|
+
|
|
71
|
+
- save a few questions and expected answers for this folder
|
|
72
|
+
- run a baseline test on the raw files
|
|
73
|
+
- compile the workspace
|
|
74
|
+
- run the same test against the compiled workspace
|
|
75
|
+
|
|
76
|
+
That gives you three concrete things:
|
|
65
77
|
|
|
66
78
|
- `interf/workspaces/default/` with the compiled workspace for your files
|
|
67
|
-
- `interf/benchmarks/runs/...` with the saved
|
|
79
|
+
- `interf/benchmarks/runs/...` with the saved test result
|
|
68
80
|
- a pass/fail score on the same questions and expected answers you wrote
|
|
69
81
|
|
|
70
|
-
If `interf.config.json` is missing, `interf init` can draft it with you before the first compile. If Interf cannot find your local agent or compile setup, run:
|
|
82
|
+
If `interf.config.json` is missing, `interf` or `interf init` can draft it with you before the first compile. If Interf cannot find your local agent or compile setup, run:
|
|
71
83
|
|
|
72
84
|
```bash
|
|
73
85
|
interf doctor
|
|
@@ -76,10 +88,11 @@ interf doctor
|
|
|
76
88
|
The first flow is:
|
|
77
89
|
|
|
78
90
|
- write down a few questions your agent should be able to answer from your files
|
|
79
|
-
- let `interf init` save those checks in `interf.config.json`
|
|
80
|
-
- run
|
|
81
|
-
- run `interf
|
|
82
|
-
-
|
|
91
|
+
- let `interf` or `interf init` save those checks in `interf.config.json`
|
|
92
|
+
- optionally run a baseline test on the raw files
|
|
93
|
+
- run `interf compile` to build the compiled workspace
|
|
94
|
+
- run `interf test` to test the raw files, the compiled workspace, or both
|
|
95
|
+
- only create another workspace if you want a separate compiled setup with its own checks
|
|
83
96
|
- if needed, rerun compile or use the advanced retry path until it is good enough
|
|
84
97
|
|
|
85
98
|
## Why This Approach
|
|
@@ -98,10 +111,9 @@ Sample flow:
|
|
|
98
111
|
```bash
|
|
99
112
|
cp -r examples/benchmark-demo /tmp/interf-demo
|
|
100
113
|
cd /tmp/interf-demo
|
|
101
|
-
interf
|
|
102
|
-
interf create workspace
|
|
114
|
+
interf
|
|
103
115
|
interf compile
|
|
104
|
-
interf
|
|
116
|
+
interf test
|
|
105
117
|
```
|
|
106
118
|
|
|
107
119
|
## Start With A Few Questions
|
|
@@ -110,8 +122,8 @@ interf benchmark
|
|
|
110
122
|
|
|
111
123
|
That file uses one `workspaces` array:
|
|
112
124
|
|
|
113
|
-
-
|
|
114
|
-
-
|
|
125
|
+
- most folders only need one workspace
|
|
126
|
+
- add another workspace only if you want a separate compiled setup with different checks
|
|
115
127
|
- each workspace carries its own `checks`
|
|
116
128
|
|
|
117
129
|
If the file is missing, `interf init` can draft it with you before the first compile. You can edit it any time.
|
|
@@ -128,26 +140,28 @@ Good first checks are small and practical:
|
|
|
128
140
|
Then run:
|
|
129
141
|
|
|
130
142
|
```bash
|
|
131
|
-
interf create workspace
|
|
132
143
|
interf compile
|
|
133
|
-
interf
|
|
144
|
+
interf test
|
|
134
145
|
```
|
|
135
146
|
|
|
136
|
-
## What `interf
|
|
147
|
+
## What `interf test` Compares
|
|
137
148
|
|
|
138
|
-
`interf
|
|
149
|
+
`interf test` scores either the raw files, a compiled workspace, or both on the same saved questions and expected answers.
|
|
139
150
|
|
|
140
151
|
It lets you answer a simple question:
|
|
141
152
|
|
|
142
|
-
-
|
|
153
|
+
- what is the current baseline on the raw files?
|
|
154
|
+
- does this compiled workspace improve on that baseline?
|
|
143
155
|
- which compiled workspace or workflow performs better on the same folder?
|
|
144
|
-
- does
|
|
156
|
+
- does a separate workspace with different checks work better for that job?
|
|
157
|
+
|
|
158
|
+
By default it loads checks from `interf.config.json`, can run a raw baseline in an isolated raw-files sandbox, can test eligible compiled workspaces under `interf/workspaces/`, and saves the run under `interf/benchmarks/runs/`.
|
|
145
159
|
|
|
146
|
-
|
|
160
|
+
If you run `interf test` from inside a workspace, it uses that workspace's checks and tests that workspace. If you run it from the source folder, it lets you choose a saved workspace and then choose raw files, the compiled workspace, or both.
|
|
147
161
|
|
|
148
|
-
|
|
162
|
+
Live test runs use an isolated sandbox. For raw baselines, Interf gives the agent sanitized raw files only. For compiled-workspace tests, it gives the agent a copied workspace plus sanitized raw files. The source-folder control plane, `interf.config.json`, and saved test runs are not part of those sandboxes.
|
|
149
163
|
|
|
150
|
-
If you need
|
|
164
|
+
If you need repeated isolated experiments across workflows or models, use the advanced eval-pack runner in [docs/eval-loop.md](./docs/eval-loop.md).
|
|
151
165
|
|
|
152
166
|
## What `interf compile` Does
|
|
153
167
|
|
|
@@ -155,11 +169,15 @@ If you need raw-file probes too, use the advanced eval-pack runner in [docs/eval
|
|
|
155
169
|
|
|
156
170
|
By default, that means:
|
|
157
171
|
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
-
|
|
161
|
-
|
|
162
|
-
|
|
172
|
+
- summarize the source files into per-file evidence notes
|
|
173
|
+
- structure the cross-file knowledge layer into entities, claims, and indexes
|
|
174
|
+
- shape the final workspace around its saved focus and questions
|
|
175
|
+
|
|
176
|
+
In other words, the built-in workflow is:
|
|
177
|
+
|
|
178
|
+
1. `summarize`
|
|
179
|
+
2. `structure`
|
|
180
|
+
3. `shape`
|
|
163
181
|
|
|
164
182
|
In public docs, `pipeline` is the thing Interf runs. `workflow` is the saved method that defines or customizes that pipeline.
|
|
165
183
|
|
|
@@ -170,15 +188,14 @@ The default workflow is built in. If you want a different method, you can define
|
|
|
170
188
|
After compile, Interf writes into `./interf/` beside your source files.
|
|
171
189
|
|
|
172
190
|
- `interf/workspaces/<name>/` is a compiled workspace over the folder
|
|
173
|
-
- `interf/benchmarks/runs/...` stores saved
|
|
191
|
+
- `interf/benchmarks/runs/...` stores saved test runs
|
|
174
192
|
|
|
175
193
|
Inside those workspaces you will see things like:
|
|
176
194
|
|
|
177
195
|
- summaries of source files
|
|
178
196
|
- navigation notes and entrypoints for agents
|
|
179
197
|
- cross-file knowledge notes
|
|
180
|
-
- workspace-specific outputs
|
|
181
|
-
- benchmark artifacts you can inspect later
|
|
198
|
+
- workspace-specific outputs when you define a separate job-focused workspace
|
|
182
199
|
|
|
183
200
|
The compiled workspace is just a normal folder. Open it in your editor, in your agent, or in Obsidian if you want the graph view.
|
|
184
201
|
|
|
@@ -191,52 +208,39 @@ Public terms:
|
|
|
191
208
|
- `your files` = the source folder Interf reads from
|
|
192
209
|
- `questions and expected answers` = the checks you want your agent to pass
|
|
193
210
|
- `checks` = the pass/fail questions each workspace should satisfy
|
|
194
|
-
- `
|
|
211
|
+
- `test` = run the saved questions and get a score
|
|
195
212
|
- `compiled workspace` = the output Interf produces on top of a folder
|
|
196
|
-
- `workspace` =
|
|
213
|
+
- `workspace` = one compiled setup with its own checks
|
|
197
214
|
|
|
198
215
|
Technical terms:
|
|
199
216
|
|
|
200
217
|
- `source folder` = the raw files Interf reads from
|
|
218
|
+
- `benchmark` = the technical alias and saved-run layer behind `interf test`
|
|
201
219
|
- `workflow` = the saved method that defines or customizes the pipeline
|
|
202
220
|
- `.interf/` = runtime state, proofs, and health artifacts
|
|
203
221
|
|
|
204
|
-
## Advanced:
|
|
205
|
-
|
|
206
|
-
Start with the default compiled workspace first.
|
|
207
|
-
|
|
208
|
-
Most folders only need one compiled workspace.
|
|
209
|
-
|
|
210
|
-
Create another workspace only when one recurring context needs a narrower setup.
|
|
222
|
+
## Advanced: Separate Workspaces
|
|
211
223
|
|
|
212
|
-
|
|
224
|
+
Most folders only need one workspace.
|
|
213
225
|
|
|
214
|
-
|
|
215
|
-
- what changed?
|
|
216
|
-
- where is the source evidence?
|
|
226
|
+
Create another only when you want a different compiled setup with different checks, for example:
|
|
217
227
|
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
- operator briefings
|
|
221
|
-
- board prep
|
|
228
|
+
- general folder understanding
|
|
222
229
|
- finance reporting
|
|
230
|
+
- board prep
|
|
223
231
|
- diligence review
|
|
224
|
-
- chart extraction for a report set
|
|
225
|
-
- one recurring research set
|
|
226
|
-
|
|
227
|
-
Why create one:
|
|
228
232
|
|
|
229
|
-
|
|
230
|
-
- it prepares guidance and structure on top of the raw folder for that recurring context
|
|
231
|
-
- it lets you benchmark that context separately
|
|
233
|
+
Why create another one:
|
|
232
234
|
|
|
233
|
-
|
|
235
|
+
- it keeps a separate set of questions and expected answers
|
|
236
|
+
- it gives that job its own compiled output under `interf/workspaces/<name>/`
|
|
237
|
+
- it lets you test that job separately
|
|
234
238
|
|
|
235
239
|
## Advanced: Keep Improving Until It Passes
|
|
236
240
|
|
|
237
|
-
Interf also supports an advanced experiment path above the normal build +
|
|
241
|
+
Interf also supports an advanced experiment path above the normal build + test flow.
|
|
238
242
|
|
|
239
|
-
Give it the same folder and the same checks. Interf can keep rerunning compile +
|
|
243
|
+
Give it the same folder and the same checks. Interf can keep rerunning compile + test attempts until the test passes or the attempt budget runs out.
|
|
240
244
|
|
|
241
245
|
In practice:
|
|
242
246
|
|
|
@@ -269,7 +273,7 @@ Example eval-pack shape:
|
|
|
269
273
|
|
|
270
274
|
Today this lives in the advanced eval-pack runner, not in `interf.config.json` and not in a top-level `interf compile --max-retries` flag.
|
|
271
275
|
|
|
272
|
-
Use the normal
|
|
276
|
+
Use the normal test flow first. Use this advanced path when you want Interf to keep improving the local preparation workflow until the workspace is good enough for your task or the attempt budget runs out. It spends more tokens, so use it when that extra spend is worth the accuracy target.
|
|
273
277
|
|
|
274
278
|
## Use It With Your Agent
|
|
275
279
|
|
|
@@ -278,11 +282,11 @@ If you already work through Claude Code, Codex, OpenClaw, or Hermes, the agent c
|
|
|
278
282
|
Paste something like this into your agent:
|
|
279
283
|
|
|
280
284
|
```text
|
|
281
|
-
Install @interf/compiler, run `interf
|
|
285
|
+
Install @interf/compiler, run `interf` in this folder, and use the local agent executor.
|
|
282
286
|
|
|
283
|
-
If `interf.config.json` is missing, draft
|
|
287
|
+
If `interf.config.json` is missing, draft one workspace with a few checks this agent should be able to answer from these files and add the expected answers for me to confirm.
|
|
284
288
|
|
|
285
|
-
Then run
|
|
289
|
+
Then run a raw baseline if helpful, compile the workspace, and run `interf test`.
|
|
286
290
|
|
|
287
291
|
Tell me whether the compiled workspace passes the checks, and only recommend it if it does.
|
|
288
292
|
```
|
|
@@ -304,11 +308,13 @@ Workflow package docs live in [docs/workflow-spec.md](./docs/workflow-spec.md).
|
|
|
304
308
|
|
|
305
309
|
## Core Commands
|
|
306
310
|
|
|
307
|
-
- `interf
|
|
308
|
-
- `interf
|
|
311
|
+
- `interf` = open the root-folder wizard
|
|
312
|
+
- `interf init` = alias for the root-folder wizard
|
|
313
|
+
- `interf create workspace` = create another compiled workspace when you need one
|
|
309
314
|
- `interf create workflow` = create a reusable local workflow package
|
|
310
|
-
- `interf compile` = build the current
|
|
311
|
-
- `interf
|
|
315
|
+
- `interf compile` = build a selected workspace for the current folder
|
|
316
|
+
- `interf test` = test the raw files, a compiled workspace, or both on saved checks
|
|
317
|
+
- `interf benchmark` = alias for `interf test`
|
|
312
318
|
- `interf doctor` = check local executor setup
|
|
313
319
|
- `interf verify <check>` = run deterministic checks on major workflow steps
|
|
314
320
|
- `interf reset <scope>` = remove generated state while keeping source files
|
package/dist/bin.js
CHANGED
|
@@ -4,7 +4,7 @@ import { hideBin } from "yargs/helpers";
|
|
|
4
4
|
import { initCommand } from "./commands/init.js";
|
|
5
5
|
import { createCommand } from "./commands/create.js";
|
|
6
6
|
import { compileCommand } from "./commands/compile.js";
|
|
7
|
-
import {
|
|
7
|
+
import { testCommand } from "./commands/test.js";
|
|
8
8
|
import { doctorCommand } from "./commands/doctor.js";
|
|
9
9
|
import { listCommand } from "./commands/list.js";
|
|
10
10
|
import { statusCommand } from "./commands/status.js";
|
|
@@ -15,9 +15,9 @@ yargs(hideBin(process.argv))
|
|
|
15
15
|
.scriptName("interf")
|
|
16
16
|
.command(defaultCommand)
|
|
17
17
|
.command(initCommand)
|
|
18
|
-
.command(createCommand)
|
|
19
18
|
.command(compileCommand)
|
|
20
|
-
.command(
|
|
19
|
+
.command(testCommand)
|
|
20
|
+
.command(createCommand)
|
|
21
21
|
.command(doctorCommand)
|
|
22
22
|
.command(listCommand)
|
|
23
23
|
.command(statusCommand)
|
package/dist/bin.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"bin.js","sourceRoot":"","sources":["../src/bin.ts"],"names":[],"mappings":";AACA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErD,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;KACzB,UAAU,CAAC,QAAQ,CAAC;KACpB,OAAO,CAAC,cAAc,CAAC;KACvB,OAAO,CAAC,WAAW,CAAC;KACpB,OAAO,CAAC,cAAc,CAAC;KACvB,OAAO,CAAC,WAAW,CAAC;KACpB,OAAO,CAAC,aAAa,CAAC;KACtB,OAAO,CAAC,aAAa,CAAC;KACtB,OAAO,CAAC,WAAW,CAAC;KACpB,OAAO,CAAC,aAAa,CAAC;KACtB,OAAO,CAAC,aAAa,CAAC;KACtB,OAAO,CAAC,YAAY,CAAC;KACrB,MAAM,EAAE;KACR,IAAI,EAAE;KACN,OAAO,EAAE;KACT,KAAK,EAAE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/commands/compile.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"compile.d.ts","sourceRoot":"","sources":["../../src/commands/compile.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAY3C,eAAO,MAAM,cAAc,EAAE,aAO5B,CAAC;AAEF,wBAAsB,iBAAiB,CAAC,IAAI,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAwBzF"}
|
package/dist/commands/compile.js
CHANGED
|
@@ -1,88 +1,62 @@
|
|
|
1
1
|
import chalk from "chalk";
|
|
2
|
-
import
|
|
3
|
-
import { detectInterf, listWorkspacesForSourceFolder, readInterfConfig, resolveSourceFolderPath, } from "../lib/interf.js";
|
|
4
|
-
import { resolveLocalExecutor } from "../lib/executors.js";
|
|
5
|
-
import { listWorkspaceEntries, loadRegistry, } from "../lib/registry.js";
|
|
2
|
+
import { detectInterf, readInterfConfig, resolveSourceFolderPath, } from "../lib/interf.js";
|
|
6
3
|
import { formatWorkspaceWorkflowStageStep, resolveWorkspaceWorkflowFromConfig, } from "../lib/workflow-definitions.js";
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
|
|
10
|
-
const local = listWorkspacesForSourceFolder(cwd).map(({ path, config }) => ({
|
|
11
|
-
path,
|
|
12
|
-
name: config.name,
|
|
13
|
-
}));
|
|
14
|
-
if (local.length > 0)
|
|
15
|
-
return local;
|
|
16
|
-
return listWorkspaceEntries(loadRegistry()).map((entry) => ({
|
|
17
|
-
path: entry.path,
|
|
18
|
-
name: entry.name,
|
|
19
|
-
}));
|
|
20
|
-
}
|
|
4
|
+
import { addExecutionProfileOptions, executionProfileFromArgv, } from "../lib/execution-profile.js";
|
|
5
|
+
import { chooseWorkspaceConfigToBuild, compileWorkspaceWithReporter, ensureWorkspaceFromConfig, } from "./workspace-flow.js";
|
|
6
|
+
import { resolveOrConfigureLocalExecutor } from "./executor-flow.js";
|
|
21
7
|
export const compileCommand = {
|
|
22
8
|
command: "compile",
|
|
23
|
-
describe: "Build
|
|
9
|
+
describe: "Build a workspace for this folder",
|
|
24
10
|
builder: (yargs) => addExecutionProfileOptions(yargs),
|
|
25
11
|
handler: async (argv) => {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const selected = await p.select({
|
|
45
|
-
message: "Which workspace?",
|
|
46
|
-
options: choices.map((entry) => ({ value: entry.path, label: entry.name })),
|
|
47
|
-
});
|
|
48
|
-
if (p.isCancel(selected))
|
|
49
|
-
return;
|
|
50
|
-
workspacePath = selected;
|
|
51
|
-
}
|
|
52
|
-
}
|
|
12
|
+
await runCompileCommand(argv);
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
export async function runCompileCommand(argv = {}) {
|
|
16
|
+
const executionProfile = executionProfileFromArgv(argv);
|
|
17
|
+
const { executor, error } = await resolveOrConfigureLocalExecutor({ executionProfile });
|
|
18
|
+
if (!executor) {
|
|
19
|
+
process.exitCode = 1;
|
|
20
|
+
console.log(chalk.red(error ?? "No coding agent detected."));
|
|
21
|
+
return;
|
|
22
|
+
}
|
|
23
|
+
let workspacePath = null;
|
|
24
|
+
const detected = detectInterf(process.cwd());
|
|
25
|
+
if (detected) {
|
|
26
|
+
workspacePath = detected.path;
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
workspacePath = await maybeCreateWorkspaceFromSavedSetup(process.cwd());
|
|
53
30
|
if (!workspacePath) {
|
|
54
31
|
process.exitCode = 1;
|
|
55
|
-
console.log(chalk.red("
|
|
32
|
+
console.log(chalk.red(" No workspaces are set up for this folder yet."));
|
|
33
|
+
console.log(chalk.dim(" Start with `interf` or `interf init` to set up this folder."));
|
|
56
34
|
return;
|
|
57
35
|
}
|
|
58
|
-
await compileWorkspaceCommand(executor, workspacePath);
|
|
59
|
-
},
|
|
60
|
-
};
|
|
61
|
-
async function compileWorkspaceCommand(executor, workspacePath) {
|
|
62
|
-
console.log();
|
|
63
|
-
console.log(chalk.bold(" Building compiled workspace..."));
|
|
64
|
-
const profileLabel = formatWorkflowExecutionProfile(executor.executionProfile);
|
|
65
|
-
if (profileLabel) {
|
|
66
|
-
console.log(chalk.dim(` Execution profile: ${profileLabel}`));
|
|
67
36
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
executor,
|
|
75
|
-
workspacePath,
|
|
76
|
-
reporter,
|
|
37
|
+
await compileWorkspaceCommand(executor, workspacePath);
|
|
38
|
+
}
|
|
39
|
+
async function maybeCreateWorkspaceFromSavedSetup(sourcePath) {
|
|
40
|
+
const selected = await chooseWorkspaceConfigToBuild({
|
|
41
|
+
sourcePath,
|
|
42
|
+
selectMessage: "Which workspace do you want to build?",
|
|
77
43
|
});
|
|
44
|
+
if (!selected)
|
|
45
|
+
return null;
|
|
46
|
+
const workspacePath = ensureWorkspaceFromConfig(sourcePath, selected);
|
|
47
|
+
console.log(chalk.dim(` Workspace: ${selected.name}`));
|
|
48
|
+
return workspacePath;
|
|
49
|
+
}
|
|
50
|
+
async function compileWorkspaceCommand(executor, workspacePath) {
|
|
51
|
+
const result = await compileWorkspaceWithReporter(executor, workspacePath);
|
|
78
52
|
if (!result.ok) {
|
|
79
53
|
process.exitCode = 1;
|
|
80
54
|
const workflowId = resolveWorkspaceWorkflowFromConfig(readInterfConfig(workspacePath));
|
|
81
|
-
const failedStage = formatWorkspaceWorkflowStageStep(workflowId, result.failedStage ?? "compile", {
|
|
55
|
+
const failedStage = formatWorkspaceWorkflowStageStep(workflowId, result.failedStage ?? "compile", {
|
|
56
|
+
sourcePath: resolveSourceFolderPath(workspacePath),
|
|
57
|
+
});
|
|
82
58
|
console.log(chalk.red(` ${failedStage} failed.`));
|
|
83
59
|
return;
|
|
84
60
|
}
|
|
85
|
-
console.log();
|
|
86
|
-
console.log(chalk.green(" ✓ Compiled workspace ready."));
|
|
87
61
|
}
|
|
88
62
|
//# sourceMappingURL=compile.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"compile.js","sourceRoot":"","sources":["../../src/commands/compile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,
|
|
1
|
+
{"version":3,"file":"compile.js","sourceRoot":"","sources":["../../src/commands/compile.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,gCAAgC,EAChC,kCAAkC,GACnC,MAAM,gCAAgC,CAAC;AAExC,OAAO,E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,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC;IAC1C,GAAG,EAAE;QACH,IAAI,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;KAC7B,CAAC;CACH;AAED,eAAO,MAAM,oBAAoB,EAAE,qBAQlC,CAAC;AAEF,wBAAgB,mBAAmB,CACjC,QAAQ,EAAE;IACR,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;CAC7B,GACA;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAMhD;AAED,wBAAgB,6BAA6B,CAAC,UAAU,EAAE,MAAM;WARpD,MAAM;WAAS,MAAM;UAAQ,MAAM;IAU9C;AAED,wBAAsB,uBAAuB,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAK1F;AAED,wBAAsB,oBAAoB,CACxC,OAAO,GAAE;IACP,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CAChB,EACN,OAAO,GAAE,qBAA4C,GACpD,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAO1B;AAED,wBAAsB,6BAA6B,CACjD,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,qBAA4C,GACpD,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC,CAwF1B"}
|
|
@@ -76,13 +76,20 @@ export async function createWorkspaceWorkflowWizard(sourcePath, prompts = clackW
|
|
|
76
76
|
});
|
|
77
77
|
if (prompts.isCancel(summarizeBias))
|
|
78
78
|
return summarizeBias;
|
|
79
|
-
const
|
|
80
|
-
message: "What should
|
|
81
|
-
placeholder: "Build retrieval-ready
|
|
82
|
-
validate: (value) => (value.trim().length === 0 ? "
|
|
79
|
+
const structureBias = await prompts.text({
|
|
80
|
+
message: "What should structure emphasize?",
|
|
81
|
+
placeholder: "Build retrieval-ready entities, claims, timelines, and indexes",
|
|
82
|
+
validate: (value) => (value.trim().length === 0 ? "Structure guidance is required" : undefined),
|
|
83
83
|
});
|
|
84
|
-
if (prompts.isCancel(
|
|
85
|
-
return
|
|
84
|
+
if (prompts.isCancel(structureBias))
|
|
85
|
+
return structureBias;
|
|
86
|
+
const shapeBias = await prompts.text({
|
|
87
|
+
message: "What should shape emphasize?",
|
|
88
|
+
placeholder: "Bias home.md and navigation toward the questions this workspace should answer best",
|
|
89
|
+
validate: (value) => (value.trim().length === 0 ? "Shape guidance is required" : undefined),
|
|
90
|
+
});
|
|
91
|
+
if (prompts.isCancel(shapeBias))
|
|
92
|
+
return shapeBias;
|
|
86
93
|
const workflowPath = writeLocalWorkflowDefinition(sourcePath, workflowId, {
|
|
87
94
|
id: workflowId,
|
|
88
95
|
type: "workspace",
|
|
@@ -91,7 +98,8 @@ export async function createWorkspaceWorkflowWizard(sourcePath, prompts = clackW
|
|
|
91
98
|
extends: baseWorkflow,
|
|
92
99
|
stage_policy_notes: {
|
|
93
100
|
summarize: [summarizeBias.trim()],
|
|
94
|
-
|
|
101
|
+
structure: [structureBias.trim()],
|
|
102
|
+
shape: [shapeBias.trim()],
|
|
95
103
|
},
|
|
96
104
|
}, [
|
|
97
105
|
{
|
|
@@ -103,7 +111,8 @@ export async function createWorkspaceWorkflowWizard(sourcePath, prompts = clackW
|
|
|
103
111
|
`This local workspace workflow extends \`${baseWorkflow}\`.`,
|
|
104
112
|
"",
|
|
105
113
|
`- summarize bias: ${summarizeBias.trim()}`,
|
|
106
|
-
`-
|
|
114
|
+
`- structure bias: ${structureBias.trim()}`,
|
|
115
|
+
`- shape bias: ${shapeBias.trim()}`,
|
|
107
116
|
"",
|
|
108
117
|
].join("\n"),
|
|
109
118
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-workflow-wizard.js","sourceRoot":"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C,yBAAyB,YAAY,EAAE,CAAC,CAAC;IAC1D,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create.d.ts","sourceRoot":"","sources":["../../src/commands/create.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAM3C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,qBAAqB,CAAC;AAgDpE,eAAO,MAAM,aAAa,EAAE,aAmC3B,CAAC;AAEF,wBAAsB,qBAAqB,CACzC,OAAO,GAAE;IACP,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,gBAAgB,CAAC,EAAE,wBAAwB,CAAC;CACxC,iBAsFP;AAcD,OAAO,EACL,KAAK,qBAAqB,EAC1B,mBAAmB,EACnB,uBAAuB,EACvB,oBAAoB,EACpB,6BAA6B,GAC9B,MAAM,6BAA6B,CAAC"}
|