@parallel-cli/parallel 0.3.3 → 0.4.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 +156 -82
- package/dist/agents/agent.js +24 -2
- package/dist/agents/tools.js +4 -2
- package/dist/commands.js +179 -135
- package/dist/config.js +79 -0
- package/dist/controller.js +58 -5
- package/dist/i18n.js +304 -40
- package/dist/index.js +4 -2
- package/dist/pricing.js +27 -0
- package/dist/server.js +2 -1
- package/dist/ui/AgentPanel.js +85 -16
- package/dist/ui/App.js +285 -86
- package/dist/ui/AttachApp.js +46 -21
- package/dist/ui/CommandInput.js +56 -15
- package/dist/ui/SettingsPanel.js +170 -55
- package/dist/ui/Timeline.js +60 -0
- package/dist/ui/Wizard.js +13 -6
- package/dist/ui/events.js +229 -0
- package/dist/ui/theme.js +5 -4
- package/dist/ui/tokens.js +77 -0
- package/dist/ui/views.js +9 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,28 +1,42 @@
|
|
|
1
1
|
# Parallel
|
|
2
2
|
|
|
3
|
-
Real-time multi-agent coding
|
|
3
|
+
Real-time multi-agent coding from one terminal control room.
|
|
4
4
|
|
|
5
|
-
Parallel lets you run several AI coding agents on the same repository at the same time. Each agent
|
|
5
|
+
Parallel lets you run several AI coding agents on the same repository at the same time. Each agent has its own task, mode, terminal, live activity timeline, and shared view of the session. The hub keeps you in control: what is running, what needs input, what changed, what it cost, and where to steer next.
|
|
6
6
|
|
|
7
|
-
>
|
|
7
|
+
> One hub. Many agents. Shared context. No silent overwrites.
|
|
8
8
|
|
|
9
9
|
[](https://www.npmjs.com/package/@parallel-cli/parallel)
|
|
10
10
|

|
|
11
11
|

|
|
12
12
|

|
|
13
13
|
|
|
14
|
+
## What Parallel Is
|
|
15
|
+
|
|
16
|
+
Parallel is built for active coding sessions where one agent is not enough:
|
|
17
|
+
|
|
18
|
+
- ask one agent to audit while another implements
|
|
19
|
+
- run a plan-first agent before allowing edits
|
|
20
|
+
- keep a test-focused agent watching regressions
|
|
21
|
+
- steer any agent live without stopping the others
|
|
22
|
+
- open a dedicated terminal for deep scrollback on one agent
|
|
23
|
+
|
|
24
|
+
The philosophy is simple: agents can move in parallel, but the human keeps the control room.
|
|
25
|
+
|
|
14
26
|
## Features
|
|
15
27
|
|
|
16
|
-
-
|
|
28
|
+
- Launch agents in three explicit modes: `/ask`, `/task`, and `/plan`.
|
|
29
|
+
- Type plain text to launch a task agent immediately.
|
|
30
|
+
- Run multiple agents at once on the same repository.
|
|
17
31
|
- Open a dedicated terminal per agent with native scrollback and live steering.
|
|
18
|
-
-
|
|
19
|
-
-
|
|
20
|
-
-
|
|
32
|
+
- See structured activity timelines instead of raw tool spam.
|
|
33
|
+
- Share live context between agents: status, notes, claims, file activity, and diffs.
|
|
34
|
+
- Avoid silent overwrites with adaptive merge-on-write for file edits.
|
|
21
35
|
- Pause, resume, stop, focus, restore, and steer agents while they are running.
|
|
22
|
-
- Review live diffs, notes, costs,
|
|
23
|
-
- Use any OpenAI-compatible provider
|
|
36
|
+
- Review live diffs, notes, costs, sessions, skills, and specialists from built-in views.
|
|
37
|
+
- Use any OpenAI-compatible provider — 18 pre-configured cloud providers (DeepSeek, xAI/Grok, Perplexity, Cohere, DeepInfra, Fireworks, Cerebras, Novita, Hyperbolic, SambaNova, and more), plus Ollama for local models, and any custom OpenAI-compatible endpoint.
|
|
38
|
+
- Choose shell approval behavior: `ask`, `auto-safe`, or `yolo`.
|
|
24
39
|
- Track token usage and estimated cost per agent and per session.
|
|
25
|
-
- Keep project and global skills/specialists as local markdown files.
|
|
26
40
|
|
|
27
41
|
## Install
|
|
28
42
|
|
|
@@ -52,13 +66,7 @@ prl
|
|
|
52
66
|
|
|
53
67
|
## Quick Start
|
|
54
68
|
|
|
55
|
-
On first launch, Parallel opens a setup wizard for
|
|
56
|
-
|
|
57
|
-
1. Language
|
|
58
|
-
2. Working folder
|
|
59
|
-
3. New or restored session
|
|
60
|
-
4. Provider
|
|
61
|
-
5. Model
|
|
69
|
+
On first launch, Parallel opens a setup wizard for language, folder, session, provider, and model.
|
|
62
70
|
|
|
63
71
|
After setup, type a task and press Enter:
|
|
64
72
|
|
|
@@ -66,13 +74,21 @@ After setup, type a task and press Enter:
|
|
|
66
74
|
> refactor the API client and update the tests
|
|
67
75
|
```
|
|
68
76
|
|
|
69
|
-
|
|
77
|
+
Plain text launches a `/task` agent. Start another agent at any time, even while the first one is still working:
|
|
70
78
|
|
|
71
79
|
```text
|
|
72
|
-
> add coverage for
|
|
80
|
+
> add regression coverage for auth middleware
|
|
73
81
|
```
|
|
74
82
|
|
|
75
|
-
|
|
83
|
+
Use explicit modes when intent matters:
|
|
84
|
+
|
|
85
|
+
```text
|
|
86
|
+
/ask reviewer should we split the CLI parser?
|
|
87
|
+
/plan migration propose the safest rollout for the config change
|
|
88
|
+
/task builder implement the approved plan
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Send a live instruction to one agent:
|
|
76
92
|
|
|
77
93
|
```text
|
|
78
94
|
@a1 also handle empty response bodies
|
|
@@ -84,38 +100,100 @@ Broadcast to every agent:
|
|
|
84
100
|
@all stop changing public interfaces until the test agent finishes
|
|
85
101
|
```
|
|
86
102
|
|
|
87
|
-
##
|
|
103
|
+
## Agent Modes
|
|
104
|
+
|
|
105
|
+
| Mode | Use it for | Behavior |
|
|
106
|
+
| --- | --- | --- |
|
|
107
|
+
| `/ask` | Questions, reviews, audits, tradeoffs | Answers and advises without editing files. |
|
|
108
|
+
| `/task` | Implementation work | Executes, edits, validates, and summarizes. |
|
|
109
|
+
| `/plan` | Risky or unclear work | Inspects first, asks for approval, then edits only after approval. |
|
|
110
|
+
|
|
111
|
+
Aliases:
|
|
112
|
+
|
|
113
|
+
- `/a` -> `/ask`
|
|
114
|
+
- `/t` -> `/task`
|
|
115
|
+
- `/p` -> `/plan`
|
|
116
|
+
|
|
117
|
+
Plain text is equivalent to `/task`.
|
|
118
|
+
|
|
119
|
+
## Control Room
|
|
120
|
+
|
|
121
|
+
The main TUI is the Parallel hub. It is designed to answer four questions quickly:
|
|
88
122
|
|
|
89
|
-
|
|
123
|
+
- What needs my input?
|
|
124
|
+
- Which agents are working?
|
|
125
|
+
- What did each agent just do?
|
|
126
|
+
- What model, folder, shell mode, and cost am I currently running?
|
|
127
|
+
|
|
128
|
+
Useful hub commands:
|
|
129
|
+
|
|
130
|
+
```text
|
|
131
|
+
/agents agent overview
|
|
132
|
+
/focus a1 inspect and steer one agent
|
|
133
|
+
/raw toggle raw detail in focus view
|
|
134
|
+
/board shared blackboard, claims, file activity
|
|
135
|
+
/diff live diff history
|
|
136
|
+
/cost token and cost breakdown
|
|
137
|
+
/sessions saved sessions
|
|
138
|
+
/settings global settings
|
|
139
|
+
/settings-session session-only settings
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Best terminal size is around `120x34`. Parallel still adapts to smaller terminals, but the hub is most readable with enough width for model, folder, status, and agent summaries.
|
|
143
|
+
|
|
144
|
+
## Dedicated Agent Terminals
|
|
145
|
+
|
|
146
|
+
Each agent can have its own terminal connected to the same session:
|
|
90
147
|
|
|
91
148
|
```bash
|
|
92
|
-
parallel
|
|
93
149
|
parallel attach a1 --root .
|
|
94
150
|
```
|
|
95
151
|
|
|
96
152
|
Attached terminals show:
|
|
97
153
|
|
|
98
|
-
- the agent
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
154
|
+
- the selected agent's live timeline
|
|
155
|
+
- native terminal scrollback
|
|
156
|
+
- model, elapsed time, steps, tokens, context percentage, and cost
|
|
157
|
+
- other agents' current state
|
|
102
158
|
- approval and question prompts for that agent
|
|
159
|
+
- an input that steers that agent directly
|
|
103
160
|
|
|
104
161
|
From an attached terminal:
|
|
105
162
|
|
|
106
163
|
```text
|
|
107
|
-
|
|
164
|
+
plain text sends a message to this agent
|
|
165
|
+
/task write parser regression tests
|
|
166
|
+
/ask is this result safe to merge?
|
|
167
|
+
/plan prepare a migration plan
|
|
168
|
+
/raw
|
|
169
|
+
/quit
|
|
108
170
|
```
|
|
109
171
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
Toggle automatic agent terminals in the hub:
|
|
172
|
+
Toggle automatic agent terminals from the hub:
|
|
113
173
|
|
|
114
174
|
```text
|
|
115
175
|
/attach on
|
|
116
176
|
/attach off
|
|
117
177
|
```
|
|
118
178
|
|
|
179
|
+
## Shell Approvals
|
|
180
|
+
|
|
181
|
+
Parallel separates agent modes from shell approval behavior.
|
|
182
|
+
|
|
183
|
+
```text
|
|
184
|
+
/approvals ask
|
|
185
|
+
/approvals auto-safe
|
|
186
|
+
/approvals yolo
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
| Mode | Behavior |
|
|
190
|
+
| --- | --- |
|
|
191
|
+
| `ask` | Ask before shell commands unless explicitly allowed. |
|
|
192
|
+
| `auto-safe` | Auto-approve safe inspection/build/test commands; ask for risky commands. |
|
|
193
|
+
| `yolo` | Auto-approve every shell command. Intended for trusted/headless usage only. |
|
|
194
|
+
|
|
195
|
+
`auto` is accepted as a compatibility spelling for `auto-safe`.
|
|
196
|
+
|
|
119
197
|
## Headless Mode
|
|
120
198
|
|
|
121
199
|
For CI and scripts, run without the TUI:
|
|
@@ -128,7 +206,7 @@ Headless mode:
|
|
|
128
206
|
|
|
129
207
|
- runs one agent per task
|
|
130
208
|
- uses the current folder as the project root
|
|
131
|
-
-
|
|
209
|
+
- uses `yolo` shell approvals
|
|
132
210
|
- auto-answers agent questions with the recommended option
|
|
133
211
|
- saves the session
|
|
134
212
|
- exits non-zero if any agent does not finish successfully
|
|
@@ -139,9 +217,10 @@ Headless mode:
|
|
|
139
217
|
|
|
140
218
|
| Command | Description |
|
|
141
219
|
| --- | --- |
|
|
142
|
-
| `/
|
|
143
|
-
| `/
|
|
144
|
-
| `/
|
|
220
|
+
| `/ask [Name:] <question> [--model=m]` | Launch an ask-only agent. |
|
|
221
|
+
| `/task [Name:] <task> [--model=m] [#skill]` | Launch a task agent. Plain text does the same. |
|
|
222
|
+
| `/plan [Name:] <task> [--model=m]` | Launch a plan-first agent. |
|
|
223
|
+
| `/issue <n>` | Spawn a task from a GitHub issue using the `gh` CLI. |
|
|
145
224
|
| `/specialist <name> <task>` | Spawn with a specialist persona. |
|
|
146
225
|
| `/specialist new <name> [global]` | Create a specialist template. |
|
|
147
226
|
| `/skill new <name> [global]` | Create a skill template. |
|
|
@@ -168,41 +247,43 @@ Headless mode:
|
|
|
168
247
|
| `/commit [agent\|all] [message]` | Commit files touched by an agent or by all agents. |
|
|
169
248
|
| `/autocommit <on\|off>` | Commit each agent's changes automatically when it finishes. |
|
|
170
249
|
|
|
171
|
-
### Views
|
|
250
|
+
### Views And Sessions
|
|
172
251
|
|
|
173
252
|
| Command | Description |
|
|
174
253
|
| --- | --- |
|
|
175
|
-
| `/agents` | Agent
|
|
254
|
+
| `/agents` | Agent overview. |
|
|
176
255
|
| `/board` | Shared blackboard, file activity, claims, and notes. |
|
|
177
256
|
| `/notes` | Full notes history. |
|
|
178
257
|
| `/diff` | Live diff history. |
|
|
179
258
|
| `/cost` | Token and cost breakdown. |
|
|
180
259
|
| `/skills` | Available skills. |
|
|
181
260
|
| `/specialists` | Available specialists. |
|
|
182
|
-
| `/help` | Full command reference. |
|
|
183
|
-
|
|
184
|
-
### Sessions And Settings
|
|
185
|
-
|
|
186
|
-
| Command | Description |
|
|
187
|
-
| --- | --- |
|
|
188
261
|
| `/save [name]` | Save the current session. |
|
|
189
262
|
| `/sessions` | List saved sessions. |
|
|
190
263
|
| `/session <n\|latest>` | Restore a saved session. |
|
|
191
264
|
| `/restore <agent>` | Relaunch a restored agent with its conversation history. |
|
|
265
|
+
|
|
266
|
+
### Settings
|
|
267
|
+
|
|
268
|
+
| Command | Description |
|
|
269
|
+
| --- | --- |
|
|
192
270
|
| `/model [[provider:]model]` | Show or switch the session model. |
|
|
193
271
|
| `/key <api-key>` | Store the API key for the active provider. |
|
|
194
|
-
| `/approvals <ask\|auto>` |
|
|
272
|
+
| `/approvals <ask\|auto-safe\|yolo>` | Set shell approvals for this session. |
|
|
195
273
|
| `/sound <on\|off>` | Toggle terminal bell notifications. |
|
|
196
274
|
| `/settings` | Edit global language, providers, keys, defaults, and approvals. |
|
|
197
275
|
| `/settings-session` | Edit session-only model, approvals, and sound. |
|
|
198
276
|
| `/doctor` | Check provider, key, and model configuration. |
|
|
277
|
+
| `/help` | Full command reference. |
|
|
199
278
|
| `/quit` | Save the session and exit. |
|
|
200
279
|
|
|
201
280
|
When there is exactly one agent, commands such as `/undo`, `/focus`, `/pause`, `/resume`, `/stop`, and `/commit` can omit the agent name.
|
|
202
281
|
|
|
203
282
|
## Providers
|
|
204
283
|
|
|
205
|
-
Parallel
|
|
284
|
+
Parallel ships with **18 pre-configured cloud providers** with verified endpoints and curated model lists, plus **Ollama** for local models with automatic model detection. All providers use OpenAI-compatible chat completions with tool calling. You can also add any custom OpenAI-compatible endpoint.
|
|
285
|
+
|
|
286
|
+
The built-in DeepSeek preset works out of the box once an API key is configured. Additional providers like xAI/Grok, Perplexity, Cohere, DeepInfra, Fireworks, Cerebras, Novita, Hyperbolic, and SambaNova are available for selection during setup or from the Providers settings submenu.
|
|
206
287
|
|
|
207
288
|
Environment variables:
|
|
208
289
|
|
|
@@ -214,14 +295,6 @@ Environment variables:
|
|
|
214
295
|
| `PARALLEL_MODEL` | Override the session model. |
|
|
215
296
|
| `PARALLEL_NO_ALT_SCREEN=1` | Disable the alternate terminal screen. |
|
|
216
297
|
|
|
217
|
-
Local providers are supported if they expose an OpenAI-compatible endpoint, for example:
|
|
218
|
-
|
|
219
|
-
- Ollama
|
|
220
|
-
- vLLM
|
|
221
|
-
- LM Studio
|
|
222
|
-
- llama.cpp server
|
|
223
|
-
- OpenRouter or other compatible gateways
|
|
224
|
-
|
|
225
298
|
Configuration is stored in `~/.parallel/config.json`. Project state, sessions, skills, specialists, and memory are stored under `.parallel/` in the selected project.
|
|
226
299
|
|
|
227
300
|
## Skills And Specialists
|
|
@@ -259,42 +332,38 @@ When an agent writes a file:
|
|
|
259
332
|
|
|
260
333
|
This keeps agents moving without allowing silent overwrites.
|
|
261
334
|
|
|
262
|
-
##
|
|
335
|
+
## Codebase Map
|
|
263
336
|
|
|
264
|
-
|
|
337
|
+
The runtime is intentionally small:
|
|
265
338
|
|
|
266
|
-
-
|
|
267
|
-
-
|
|
268
|
-
-
|
|
269
|
-
-
|
|
339
|
+
- `src/index.tsx`: CLI entrypoint, TUI launch, attach mode, and headless mode.
|
|
340
|
+
- `src/controller.ts`: session state, agents, approvals, questions, terminals, commits, and restores.
|
|
341
|
+
- `src/coordination/blackboard.ts`: shared live state for agents, logs, notes, file activity, claims, and diffs.
|
|
342
|
+
- `src/agents/agent.ts`: agent loop, mode instructions, live context injection, and completion.
|
|
343
|
+
- `src/agents/tools.ts`: file, shell, note, skill, memory, and question tools.
|
|
344
|
+
- `src/server.ts`: Unix socket bridge for dedicated agent terminals.
|
|
345
|
+
- `src/ui/`: Ink components for the hub, timelines, settings, prompts, and attach UI.
|
|
346
|
+
- `src/commands.ts`: hub command registry, hidden compatibility commands, aliases, and dispatch.
|
|
347
|
+
- `src/config.ts` and `src/i18n.ts`: provider/session config and translations.
|
|
270
348
|
|
|
271
|
-
|
|
349
|
+
## Changelog
|
|
272
350
|
|
|
273
|
-
|
|
274
|
-
- `read_file`
|
|
275
|
-
- `write_file`
|
|
276
|
-
- `edit_file`
|
|
277
|
-
- `search`
|
|
278
|
-
- `run_command`
|
|
279
|
-
- `post_note`
|
|
280
|
-
- `update_status`
|
|
281
|
-
- `ask_user`
|
|
282
|
-
- `load_skill`
|
|
283
|
-
- `claim_files`
|
|
284
|
-
- `wait_for_agent`
|
|
285
|
-
- `remember`
|
|
286
|
-
- `task_complete`
|
|
351
|
+
### 0.4.1
|
|
287
352
|
|
|
288
|
-
|
|
353
|
+
- **18 pre-configured cloud providers** with verified endpoints and curated model lists (up from 8). Added: xAI/Grok, Perplexity, Cohere, DeepInfra, Fireworks, Cerebras, Novita, Hyperbolic, SambaNova.
|
|
354
|
+
- **Ollama (local models)** as a first-class preset with automatic connectivity check and model detection.
|
|
355
|
+
- **Wizard redesign** — provider selection now grouped by category (Configured, Cloud, Local, Custom) instead of a flat list.
|
|
356
|
+
- **Settings reorganization** — all provider actions (keys, models, pricing, add/remove) consolidated under a "Providers" submenu; settings root reduced from 13 to 8 items.
|
|
357
|
+
- **Provider removal** — can now remove configured providers from settings.
|
|
358
|
+
- Custom provider option always available for any OpenAI-compatible endpoint.
|
|
289
359
|
|
|
290
|
-
|
|
291
|
-
npm install -g @parallel-cli/parallel
|
|
292
|
-
```
|
|
293
|
-
|
|
294
|
-
Published package:
|
|
360
|
+
### 0.4.0
|
|
295
361
|
|
|
296
|
-
-
|
|
297
|
-
-
|
|
362
|
+
- **Removed `/spawn`** — use `/task` instead. The alias was redundant and its removal simplified the command registry.
|
|
363
|
+
- **System messages color-coded by severity** — green for success, yellow for warnings, red for errors, gray for informational. Applied across all ~40 system messages in every command.
|
|
364
|
+
- **UI fully internationalized** — all wizard screens, menus, and prompts now available in English, French, Spanish, and Chinese (zh).
|
|
365
|
+
- **AgentHub header indicators** — the hub header now shows the active mode, model, and context usage at a glance.
|
|
366
|
+
- **Fixed `/pause` double-call** — rapid consecutive `/pause` invocations no longer trigger the action twice.
|
|
298
367
|
|
|
299
368
|
## Development
|
|
300
369
|
|
|
@@ -311,6 +380,11 @@ npm link
|
|
|
311
380
|
parallel --help
|
|
312
381
|
```
|
|
313
382
|
|
|
383
|
+
Published package:
|
|
384
|
+
|
|
385
|
+
- npm: https://www.npmjs.com/package/@parallel-cli/parallel
|
|
386
|
+
- GitHub: https://github.com/Nil06/parallel-cli
|
|
387
|
+
|
|
314
388
|
## License
|
|
315
389
|
|
|
316
390
|
MIT
|
package/dist/agents/agent.js
CHANGED
|
@@ -6,7 +6,7 @@ import { skillsCatalog } from '../skills.js';
|
|
|
6
6
|
import { getLang, LANG_NAME_EN } from '../i18n.js';
|
|
7
7
|
// Agent-facing prompts stay in English (canonical for models). Only notes
|
|
8
8
|
// addressed to the user follow the configured UI language.
|
|
9
|
-
const SYSTEM_PROMPT = (name, task, userLang, skillsList, specialist, projectMemory) => `You are agent "${name}", an autonomous software engineer inside PARALLEL, an environment where SEVERAL agents work at the same time on the SAME project, each on its own task given by the user.
|
|
9
|
+
const SYSTEM_PROMPT = (name, task, mode, userLang, skillsList, specialist, projectMemory) => `You are agent "${name}", an autonomous software engineer inside PARALLEL, an environment where SEVERAL agents work at the same time on the SAME project, each on its own task given by the user.
|
|
10
10
|
${specialist
|
|
11
11
|
? `
|
|
12
12
|
YOUR ROLE — you are the "${specialist.name}" specialist:
|
|
@@ -14,6 +14,27 @@ ${specialist.role}
|
|
|
14
14
|
`
|
|
15
15
|
: ''}
|
|
16
16
|
YOUR TASK: ${task}
|
|
17
|
+
|
|
18
|
+
AGENT MODE: ${mode}
|
|
19
|
+
${mode === 'ask'
|
|
20
|
+
? `ASK MODE:
|
|
21
|
+
- You are advisory only. Do not modify files.
|
|
22
|
+
- You may inspect with list_files/read_file/search and safe read-only commands when useful.
|
|
23
|
+
- Do not run mutating commands, write files, edit files, claim files, or commit.
|
|
24
|
+
- Finish with task_complete using this user-facing structure in ${userLang}: "Réponse courte", "Recommandation", "Pourquoi", "Prochaines étapes".`
|
|
25
|
+
: mode === 'plan'
|
|
26
|
+
? `PLAN MODE:
|
|
27
|
+
- Explore first with read-only tools.
|
|
28
|
+
- Before modifying any file or running mutating commands, call ask_user with a concrete implementation plan.
|
|
29
|
+
- The plan must include steps, files you expect to touch, risks, and validation.
|
|
30
|
+
- Use options ["Approve", "Revise"], recommended "Approve".
|
|
31
|
+
- Start editing only after explicit "Approve".
|
|
32
|
+
- Finish with task_complete using this user-facing structure in ${userLang}: "Plan appliqué", "Ce que j’ai modifié", "Validation", "Risques restants".`
|
|
33
|
+
: `TASK MODE:
|
|
34
|
+
- Execute the user's objective end-to-end.
|
|
35
|
+
- Explore, edit, validate, and summarize.
|
|
36
|
+
- Ask the user only when blocked or when a risky product decision cannot be inferred.
|
|
37
|
+
- Finish with task_complete using this user-facing structure in ${userLang}: "Ce que j’ai fait", "Ce que j’ai vérifié", "Résultat", "Détails techniques".`}
|
|
17
38
|
${skillsList
|
|
18
39
|
? `
|
|
19
40
|
SKILLS — instructions written by the user, loadable on demand (load_skill):
|
|
@@ -83,6 +104,7 @@ export class Agent {
|
|
|
83
104
|
alias: opts.alias,
|
|
84
105
|
color: opts.color,
|
|
85
106
|
task: opts.task,
|
|
107
|
+
mode: opts.mode,
|
|
86
108
|
model: opts.model,
|
|
87
109
|
state: 'idle',
|
|
88
110
|
currentAction: '',
|
|
@@ -225,7 +247,7 @@ export class Agent {
|
|
|
225
247
|
else {
|
|
226
248
|
this.record({
|
|
227
249
|
role: 'system',
|
|
228
|
-
content: SYSTEM_PROMPT(this.name, this.opts.task, LANG_NAME_EN[getLang()], skillsCatalog(this.opts.skills), this.opts.specialist, this.opts.projectMemory),
|
|
250
|
+
content: SYSTEM_PROMPT(this.name, this.opts.task, this.opts.mode, LANG_NAME_EN[getLang()], skillsCatalog(this.opts.skills), this.opts.specialist, this.opts.projectMemory),
|
|
229
251
|
});
|
|
230
252
|
// Pasted images (multimodal models): attached to the very first user turn.
|
|
231
253
|
if (this.opts.images && this.opts.images.length > 0) {
|
package/dist/agents/tools.js
CHANGED
|
@@ -209,7 +209,7 @@ export const TOOL_DEFINITIONS = [
|
|
|
209
209
|
type: 'function',
|
|
210
210
|
function: {
|
|
211
211
|
name: 'task_complete',
|
|
212
|
-
description: 'Call when your task is finished and verified.
|
|
212
|
+
description: 'Call when your task is finished and verified. The summary is user-facing: write it for humans, explain the logic of your conclusion, include technical details only after the outcome is clear, and follow the section structure requested by your current agent mode.',
|
|
213
213
|
parameters: {
|
|
214
214
|
type: 'object',
|
|
215
215
|
properties: {
|
|
@@ -563,7 +563,9 @@ export class ToolExecutor {
|
|
|
563
563
|
out += `\n(exit code: ${err.code ?? 1})`;
|
|
564
564
|
if (out.length > MAX_OUTPUT)
|
|
565
565
|
out = out.slice(0, MAX_OUTPUT) + '\n... (output truncated)';
|
|
566
|
-
|
|
566
|
+
const result = out || '(no output, success)';
|
|
567
|
+
this.board.log(this.agentId, 'tool_result', result);
|
|
568
|
+
resolve(result);
|
|
567
569
|
});
|
|
568
570
|
});
|
|
569
571
|
}
|