@qwen-code/qwen-harness 0.1.2 → 0.1.4
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 +26 -15
- package/dist/entrypoint.js +343 -332
- package/dist/entrypoint.js.map +4 -4
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Pi Training Harness
|
|
2
2
|
|
|
3
|
-
This repository provides
|
|
3
|
+
This repository provides Pi-based focused harness profiles without replacing Pi's runtime. See [Profiles](#profiles) for the complete list.
|
|
4
4
|
|
|
5
5
|
The custom profiles share Pi's model runtime, TUI, headless modes, compaction, resume, and native JSONL sessions. Their system prompts and tool contracts remain isolated from the `pi` harness.
|
|
6
6
|
|
|
@@ -17,7 +17,7 @@ For repository development, install dependencies with `npm install --ignore-scri
|
|
|
17
17
|
|
|
18
18
|
## Development
|
|
19
19
|
|
|
20
|
-
Use one development command for every harness. Omitting `--harness` runs
|
|
20
|
+
Use one development command for every harness. Omitting `--harness` runs the `pi` profile:
|
|
21
21
|
|
|
22
22
|
```bash
|
|
23
23
|
npm run dev
|
|
@@ -37,16 +37,19 @@ To use the same command from a checkout, run `npm run build && npm link` once. R
|
|
|
37
37
|
`npm run build` after source changes; `qwen-harness` will continue to point at this checkout.
|
|
38
38
|
|
|
39
39
|
The compiled entrypoint calls Pi's public `main()` function. The `pi` harness adds no
|
|
40
|
-
system prompt or
|
|
40
|
+
system prompt or new tool names; it keeps Pi's four built-in tools and applies the bounded
|
|
41
|
+
`bash` capability. `pi-ptc` preserves Pi's normal prompt
|
|
41
42
|
but activates the packaged programmatic-tool-calling capability: the model sees only
|
|
42
43
|
`run_code`, while Pi's four default tools are callable from its JavaScript runtime.
|
|
43
|
-
`self-compact` preserves Pi's normal prompt and built-in
|
|
44
|
-
|
|
44
|
+
`self-compact` preserves Pi's normal prompt and built-in tool names while adding context
|
|
45
|
+
compaction and applying the same bounded `bash` capability; external extension and
|
|
46
|
+
skill discovery are disabled for these harnesses.
|
|
45
47
|
The Arena profiles load only their explicit tool extensions. Long Horizon
|
|
46
48
|
loads only its declared `pi-subagents` dependency by its resolved package path and restricts
|
|
47
49
|
the Supervisor to its three orchestration tools. Extension discovery, built-in tools, and
|
|
48
50
|
unrelated resource catalogs remain disabled by each profile's own contract.
|
|
49
|
-
The tool-comparison profiles keep Pi's
|
|
51
|
+
The tool-comparison profiles keep Pi's built-in implementations except for the bounded
|
|
52
|
+
`bash` capability, apply an explicit
|
|
50
53
|
model-visible tool allowlist, and load only the selected custom editor when one is required.
|
|
51
54
|
|
|
52
55
|
## Pi settings
|
|
@@ -148,6 +151,13 @@ DashScope, and Pexels HTTP requests use `retry.provider.maxRetries` and
|
|
|
148
151
|
policy. The `harnesses` namespace contains only capability-specific settings that Pi
|
|
149
152
|
does not own.
|
|
150
153
|
|
|
154
|
+
The optional `bash` capability wraps Pi's built-in `bash` definition and
|
|
155
|
+
changes only its omitted timeout to 120 seconds; explicit timeouts are preserved. Profiles
|
|
156
|
+
must compose the capability to install it. Every profile that already exposed `bash` now
|
|
157
|
+
uses it: `pi`, `self-compact`, Agent Arena, Code Arena Full Stack, and all four tool-
|
|
158
|
+
comparison profiles. `pi-ptc` reuses the same `bash` definition for its nested tool.
|
|
159
|
+
Profiles that did not expose `bash` do not gain it.
|
|
160
|
+
|
|
151
161
|
Tool service and model configuration does not read the legacy `ARENA_*`, `CODE_HARNESS_*`, `DASHSCOPE_*`, `ROUTIFY_*`, or `PEXELS_*` variables. Subprocess tools still inherit the normal process environment so builds and user programs can access their own environment variables; the runtime also injects workspace-path variables for command compatibility.
|
|
152
162
|
|
|
153
163
|
The settings file can contain plaintext service credentials. Restrict it to the current user:
|
|
@@ -167,18 +177,18 @@ chmod 600 ~/.pi/agent/settings.json
|
|
|
167
177
|
|
|
168
178
|
| Profile | Distinct behavior |
|
|
169
179
|
| --- | --- |
|
|
170
|
-
| `pi` |
|
|
171
|
-
| `pi-ptc` |
|
|
172
|
-
| `self-compact` | Isolated
|
|
180
|
+
| `pi` | Pi's default prompt and tool names, with the bounded `bash` capability |
|
|
181
|
+
| `pi-ptc` | Pi's default prompt with only `run_code` model-visible; JavaScript can call nested `read`, `bash`, `edit`, and `write` |
|
|
182
|
+
| `self-compact` | Isolated Pi plus the bounded `bash`, SelfCompact-style context status, rubric, and the `compact_context` tool |
|
|
173
183
|
| `agent-arena` | General workspace agent tools, multimodal file reading, search, image and speech generation, and interactive `ask_user` |
|
|
174
184
|
| `code-arena-html` | Single-file HTML tools with a smaller edit/search/media tool set |
|
|
175
185
|
| `code-arena-react` | React/Vite file tools, package installation, build validation, research, media search, and image generation |
|
|
176
186
|
| `code-arena-full-stack` | Next.js/PostgreSQL tools, bash, managed build/start validation, research, media search, and image generation |
|
|
177
187
|
| `long-horizon-mea` | A supervisor session coordinating fresh Manager, Executor, and Auditor child Pi sessions through `pi-subagents` |
|
|
178
|
-
| `bash-only` |
|
|
188
|
+
| `bash-only` | Pi's default prompt and runtime with only the bounded `bash` active |
|
|
179
189
|
| `bash-apply-patch` | `bash` plus the Codex-style `apply_patch` capability |
|
|
180
190
|
| `bash-str-replace-editor` | `bash` plus the DSH-style `str_replace_editor` capability |
|
|
181
|
-
| `bash-file-search` |
|
|
191
|
+
| `bash-file-search` | Pi's built-in `read`, `edit`, `write`, and `grep`, the bounded `bash`, plus `glob` backed by Pi's native file finder |
|
|
182
192
|
|
|
183
193
|
### Tool-interface comparison
|
|
184
194
|
|
|
@@ -270,9 +280,10 @@ long-horizon.manager → long-horizon.executor → long-horizon.auditor
|
|
|
270
280
|
```
|
|
271
281
|
|
|
272
282
|
Each role starts with fresh context. Manager has no workspace tools. Executor receives
|
|
273
|
-
Pi's
|
|
274
|
-
receives the
|
|
275
|
-
|
|
283
|
+
Pi's built-in `read`, `edit`, `write`, `grep`, `find`, and `ls` plus the bounded `bash`;
|
|
284
|
+
Auditor receives the built-in read-only tools plus the same `bash`. Their packaged child
|
|
285
|
+
runtime applies the shared capability; no role-specific child
|
|
286
|
+
tool extension is loaded. The parent repeats the cycle until an Auditor independently reports
|
|
276
287
|
complete, clean, contract-aligned evidence.
|
|
277
288
|
|
|
278
289
|
Role definitions ship under `.pi/agents/long-horizon/`. At startup, the capability resolves
|
|
@@ -305,7 +316,7 @@ src/
|
|
|
305
316
|
settings.ts composes tool-owned settings
|
|
306
317
|
ask-user/ Pi tool adapter for the question workflow
|
|
307
318
|
context-management/ model-visible context management tools
|
|
308
|
-
execution/ tools and their local settings parser
|
|
319
|
+
execution/ tools, the bash capability, and their local settings parser
|
|
309
320
|
filesystem/ model-visible workspace file tools
|
|
310
321
|
media/ media tools and their local settings parser
|
|
311
322
|
programmatic-tool-calling/ run_code adapter and isolated JavaScript child runtime
|