openfox 2.0.146 → 2.0.148

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.
Files changed (32) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/CHANGELOG.md +22 -0
  3. package/dist/{auto-continue-IENGLXVQ.js → auto-continue-NODN37EK.js} +2 -2
  4. package/dist/{chat-handler-RJUJHVOX.js → chat-handler-PETIVNGQ.js} +4 -4
  5. package/dist/{chunk-EZEFBLPY.js → chunk-6UU3W3XO.js} +3 -3
  6. package/dist/{chunk-7IETJ4D4.js → chunk-772W5PF7.js} +37 -29
  7. package/dist/chunk-DKHY5UNR.js +7 -0
  8. package/dist/{chunk-QR6FIHIP.js → chunk-EJKAN7HK.js} +23 -16
  9. package/dist/{chunk-5D4MQG7P.js → chunk-F6QMFCHQ.js} +4 -4
  10. package/dist/{chunk-L43S7FJM.js → chunk-LNJOQAXT.js} +2 -2
  11. package/dist/{chunk-7BIGFGU5.js → chunk-NELDQCPC.js} +285 -115
  12. package/dist/{chunk-OS4P2KQJ.js → chunk-V4BEYGBJ.js} +7 -7
  13. package/dist/cli/dev.js +1 -1
  14. package/dist/cli/index.js +1 -1
  15. package/dist/{dynamic-context-IQUBKUCX.js → dynamic-context-CM3M2EJC.js} +2 -2
  16. package/dist/{export-import-NAQDPRET.js → export-import-UITAIBU5.js} +2 -2
  17. package/dist/{launch-EUU25RFE.js → launch-E6SDDTHE.js} +5 -5
  18. package/dist/{orchestrator-PPAIE2UH.js → orchestrator-MVQIPITF.js} +4 -4
  19. package/dist/package.json +1 -1
  20. package/dist/{processor-7XMJPNCD.js → processor-UTBTJVV5.js} +3 -3
  21. package/dist/{serve-3GNQNYG6.js → serve-XGIHFEC6.js} +8 -8
  22. package/dist/server/index.d.ts +3 -0
  23. package/dist/server/index.js +7 -7
  24. package/dist/{server-C4LB436R.js → server-F66GXJUS.js} +6 -6
  25. package/dist/skill-defaults/workflows/SKILL.md +149 -16
  26. package/dist/{tools-OH3WW6Q4.js → tools-NIOESJYT.js} +2 -2
  27. package/dist/{update-PG63SDV3.js → update-X6BS6MUF.js} +2 -2
  28. package/dist/web/assets/{index-jXXIgPm-.js → index-CkVmYTBd.js} +82 -82
  29. package/dist/web/index.html +1 -1
  30. package/dist/web/sw.js +1 -1
  31. package/package.json +1 -1
  32. package/dist/chunk-EABIZXTG.js +0 -7
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  createServer
3
- } from "./chunk-7IETJ4D4.js";
4
- import "./chunk-OS4P2KQJ.js";
3
+ } from "./chunk-772W5PF7.js";
4
+ import "./chunk-V4BEYGBJ.js";
5
5
  import "./chunk-ORIPUMOQ.js";
6
- import "./chunk-7BIGFGU5.js";
6
+ import "./chunk-NELDQCPC.js";
7
7
  import "./chunk-T3S5MTMD.js";
8
8
  import "./chunk-WLJJRX22.js";
9
9
  import "./chunk-DQTN4B33.js";
10
10
  import "./chunk-IJ53Y77N.js";
11
- import "./chunk-5D4MQG7P.js";
12
- import "./chunk-L43S7FJM.js";
13
- import "./chunk-QR6FIHIP.js";
11
+ import "./chunk-F6QMFCHQ.js";
12
+ import "./chunk-LNJOQAXT.js";
13
+ import "./chunk-EJKAN7HK.js";
14
14
  import "./chunk-OAN4BXEW.js";
15
15
  import "./chunk-DJH6LMBT.js";
16
16
  import "./chunk-PHR64A6U.js";
@@ -47,7 +47,7 @@ import "./chunk-J2GP3J3X.js";
47
47
  import "./chunk-YNMP647F.js";
48
48
  import {
49
49
  VERSION
50
- } from "./chunk-EABIZXTG.js";
50
+ } from "./chunk-DKHY5UNR.js";
51
51
  import "./chunk-JYYBSODN.js";
52
52
  import "./chunk-L2RESXUF.js";
53
53
  import "./chunk-TS5WKTFB.js";
@@ -250,4 +250,4 @@ async function runServe(options) {
250
250
  export {
251
251
  runServe
252
252
  };
253
- //# sourceMappingURL=serve-3GNQNYG6.js.map
253
+ //# sourceMappingURL=serve-XGIHFEC6.js.map
@@ -345,6 +345,7 @@ declare class SessionManager {
345
345
  private announcedToolFingerprintStore;
346
346
  private warmedUpSessions;
347
347
  private unknownProviderWarned;
348
+ private subAgentContextSizes;
348
349
  private switchLocks;
349
350
  private workspaceCreationLocks;
350
351
  private pauseStates;
@@ -651,6 +652,8 @@ declare class SessionManager {
651
652
  * the currently selected model's limit).
652
653
  */
653
654
  setCurrentContextSize(sessionId: string, promptTokens: number, completionTokens?: number, subAgentId?: string): void;
655
+ /** Tokens used by a sub-agent's own scoped context (fresh, never-compacted). */
656
+ getSubAgentContextTokens(subAgentId: string): number | undefined;
654
657
  /**
655
658
  * Set criteria. Delegates to EventStore.
656
659
  */
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  createServer,
3
3
  createServerHandle
4
- } from "../chunk-7IETJ4D4.js";
5
- import "../chunk-OS4P2KQJ.js";
4
+ } from "../chunk-772W5PF7.js";
5
+ import "../chunk-V4BEYGBJ.js";
6
6
  import "../chunk-ORIPUMOQ.js";
7
- import "../chunk-7BIGFGU5.js";
7
+ import "../chunk-NELDQCPC.js";
8
8
  import "../chunk-T3S5MTMD.js";
9
9
  import "../chunk-WLJJRX22.js";
10
10
  import "../chunk-DQTN4B33.js";
11
11
  import "../chunk-IJ53Y77N.js";
12
- import "../chunk-5D4MQG7P.js";
13
- import "../chunk-L43S7FJM.js";
14
- import "../chunk-QR6FIHIP.js";
12
+ import "../chunk-F6QMFCHQ.js";
13
+ import "../chunk-LNJOQAXT.js";
14
+ import "../chunk-EJKAN7HK.js";
15
15
  import "../chunk-OAN4BXEW.js";
16
16
  import "../chunk-DJH6LMBT.js";
17
17
  import "../chunk-PHR64A6U.js";
@@ -42,7 +42,7 @@ import "../chunk-AWBV2VXO.js";
42
42
  import "../chunk-OA2FURC3.js";
43
43
  import "../chunk-J2GP3J3X.js";
44
44
  import "../chunk-YNMP647F.js";
45
- import "../chunk-EABIZXTG.js";
45
+ import "../chunk-DKHY5UNR.js";
46
46
  import "../chunk-JYYBSODN.js";
47
47
  import "../chunk-L2RESXUF.js";
48
48
  import "../chunk-TS5WKTFB.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createWebSocketServer,
3
3
  signalMcpReady
4
- } from "./chunk-OS4P2KQJ.js";
4
+ } from "./chunk-V4BEYGBJ.js";
5
5
  import "./chunk-ORIPUMOQ.js";
6
- import "./chunk-7BIGFGU5.js";
7
- import "./chunk-5D4MQG7P.js";
8
- import "./chunk-L43S7FJM.js";
9
- import "./chunk-QR6FIHIP.js";
6
+ import "./chunk-NELDQCPC.js";
7
+ import "./chunk-F6QMFCHQ.js";
8
+ import "./chunk-LNJOQAXT.js";
9
+ import "./chunk-EJKAN7HK.js";
10
10
  import "./chunk-OAN4BXEW.js";
11
11
  import "./chunk-DJH6LMBT.js";
12
12
  import "./chunk-PHR64A6U.js";
@@ -59,4 +59,4 @@ export {
59
59
  createWebSocketServer,
60
60
  signalMcpReady
61
61
  };
62
- //# sourceMappingURL=server-C4LB436R.js.map
62
+ //# sourceMappingURL=server-F66GXJUS.js.map
@@ -212,6 +212,70 @@ Every step shares these base fields:
212
212
  `always` transitions matter for choices; other conditions are ignored when deriving
213
213
  buttons.
214
214
 
215
+ ### 3.5 `parallel` — run children concurrently, then aggregate
216
+
217
+ ```jsonc
218
+ {
219
+ "id": "reviews",
220
+ "name": "Parallel Reviews",
221
+ "type": "parallel",
222
+ "phase": "verification",
223
+ "maxConcurrency": 2, // optional — default: all children at once
224
+ "children": [
225
+ { "id": "lint", "type": "shell", "command": "npm run lint", "timeout": 90000 },
226
+ { "id": "review", "type": "sub_agent", "subAgentType": "code_reviewer", "prompt": "Review {{workdir}}" },
227
+ ],
228
+ "transitions": [
229
+ { "when": { "type": "step_result", "result": "success" }, "goto": "finalize" },
230
+ { "when": { "type": "always" }, "goto": "rework" },
231
+ ],
232
+ }
233
+ ```
234
+
235
+ - Runs `children` **concurrently** (bounded by `maxConcurrency`), then
236
+ **aggregates** all results before the step advances. All-complete-then-aggregate:
237
+ a failing child never cancels its siblings.
238
+ - **Allowed children:** `sub_agent` and `shell` only.
239
+ - No `agent` children — an agent step drives the full tool loop on the shared
240
+ session history; concurrent agent loops would corrupt the context.
241
+ - No `user` children — a human pause would need per-child resume state.
242
+ - No nested `parallel`.
243
+ - **Child fields:** `id` (required, a slug `[a-z0-9-]` — the editor slugifies as you type; doubles as the
244
+ `stepOutput` key prefix and the UI label) plus the same fields as the
245
+ top-level type (`subAgentType`/`prompt` for `sub_agent`,
246
+ `command`/`timeout`/`successExitCodes` for `shell`). Children carry no
247
+ `phase`, `transitions`, or `subGroup` — the parent owns those.
248
+ - A shell child with no `command` resolves to result `"error"`
249
+ (`{{stepOutput.<childId>.error}}` = "Missing command") instead of running.
250
+ - Duplicate child ids trigger a warning log and their per-child output keys
251
+ collide (last child wins) — keep ids unique.
252
+ - **Template variables:** child prompts/commands resolve against the context
253
+ **before** the parallel step runs (the previous step's `stepOutput`, built-ins,
254
+ `params`). Children cannot reference each other's output.
255
+ - **Aggregate result** (what the parent's `step_result` transitions see):
256
+ - all children `success` → `"success"`
257
+ - no child `success` → `"failure"`
258
+ - mixed → `"partial"`
259
+ - empty `children` → `"failure"` (the executor logs a warning)
260
+ - Only the literal `"success"` result counts as a pass — a child that returns a
261
+ custom result (e.g. a verifier returning `"passed"`) is **not** a success;
262
+ have children return `"success"`/`"failure"` when the parent branches on them.
263
+ - **`stepOutput` merge** — flat, dotted keys (no nested map):
264
+ - `{{stepOutput.result}}` — the aggregate result
265
+ - `{{stepOutput.summary}}` — one line per child (`- <id>: <result>`)
266
+ - `{{stepOutput.<childId>.result}}` plus the child's own keys:
267
+ sub_agent → `{{stepOutput.<childId>.content}}`;
268
+ shell → `{{stepOutput.<childId>.stdout}}`, `{{stepOutput.<childId>.stderr}}`,
269
+ `{{stepOutput.<childId>.exitCode}}`;
270
+ a failed/unknown child also exposes `{{stepOutput.<childId>.error}}`.
271
+ - **Cost:** the step consumes **one** `maxIterations` iteration regardless of
272
+ how many children run.
273
+ - **Abort/resume:** aborting mid-parallel cancels the running children and
274
+ preserves the execution; resuming **re-runs every child**, so keep child
275
+ commands and reviews idempotent.
276
+ - **Metadata:** children may use `session_metadata`, but don't have two
277
+ children write the same key — concurrent writers race and last write wins.
278
+
215
279
  ---
216
280
 
217
281
  ## 4. Transitions & Conditions
@@ -269,7 +333,11 @@ fix ──(always)────────────────────
269
333
  to `success`; agent steps default to `completed`.
270
334
  - **`maxIterations` caps the whole workflow**, not individual steps. Tight loops +
271
335
  `always` self-transitions can burn it fast. Escape loops with `step_result` /
272
- `metadata_*` conditions.
336
+ `metadata_*` conditions. A `parallel` step counts as **one** iteration no matter
337
+ how many children it runs.
338
+ - **`parallel` steps** run all children to completion, then aggregate
339
+ (`success` / `partial` / `failure`) — a failing child never cancels its siblings.
340
+ See §3.5.
273
341
  - **Blocking:** no matching transition ⇒ `$blocked`. `startCondition` unmet ⇒ blocked
274
342
  before the first step. Hitting `maxIterations` ⇒ blocked.
275
343
  - **Abort/resume:** aborting mid-workflow keeps the execution record alive; sending a new
@@ -286,21 +354,23 @@ The named variables below are the canonical list (the API exposes them via
286
354
  `GET /api/workflows/template-variables`); `{{stepOutput.<key>}}` resolves generically
287
355
  against the previous step's output map:
288
356
 
289
- | Variable | Meaning |
290
- | ------------------------------- | -------------------------------------------------------------------------------------------------------------- |
291
- | `{{workdir}}` | Session working directory |
292
- | `{{reason}}` | Human-readable reason (e.g. "N criteria remaining") |
293
- | `{{criteriaCount}}` | Total number of criteria |
294
- | `{{pendingCount}}` | Number of pending/failed criteria |
295
- | `{{criteriaList}}` | Formatted list of all criteria with status (`[PASSED]`, `[NEEDS VERIFICATION]`, `[FAILED]`, `[NOT COMPLETED]`) |
296
- | `{{modifiedFiles}}` | Git-diff list of files modified this session |
297
- | `{{stepOutput.content}}` | Text output of the previous step (agent/sub-agent `return_value` content) |
298
- | `{{stepOutput.result}}` | Result string of the previous step |
299
- | `{{stepOutput.stdout}}` | Previous **shell** step stdout |
300
- | `{{stepOutput.stderr}}` | Previous **shell** step stderr |
301
- | `{{stepOutput.exitCode}}` | Previous **shell** step exit code |
302
- | `{{stepOutput.stepDoneCalled}}` | Whether the previous agent step called `step_done()` |
303
- | `{{params}}` / `{{someParam}}` | User-supplied launch parameters (see below) |
357
+ | Variable | Meaning |
358
+ | -------------------------------- | -------------------------------------------------------------------------------------------------------------- |
359
+ | `{{workdir}}` | Session working directory |
360
+ | `{{reason}}` | Human-readable reason (e.g. "N criteria remaining") |
361
+ | `{{criteriaCount}}` | Total number of criteria |
362
+ | `{{pendingCount}}` | Number of pending/failed criteria |
363
+ | `{{criteriaList}}` | Formatted list of all criteria with status (`[PASSED]`, `[NEEDS VERIFICATION]`, `[FAILED]`, `[NOT COMPLETED]`) |
364
+ | `{{modifiedFiles}}` | Git-diff list of files modified this session |
365
+ | `{{stepOutput.content}}` | Text output of the previous step (agent/sub-agent `return_value` content) |
366
+ | `{{stepOutput.result}}` | Result string of the previous step |
367
+ | `{{stepOutput.stdout}}` | Previous **shell** step stdout |
368
+ | `{{stepOutput.stderr}}` | Previous **shell** step stderr |
369
+ | `{{stepOutput.exitCode}}` | Previous **shell** step exit code |
370
+ | `{{stepOutput.stepDoneCalled}}` | Whether the previous agent step called `step_done()` |
371
+ | `{{stepOutput.summary}}` | Previous **parallel** step: one line per child (`- <childId>: <result>`) |
372
+ | `{{stepOutput.<childId>.<key>}}` | Previous **parallel** step, per child: `.result`, `.content`, `.stdout`, `.stderr`, `.exitCode`, `.error` |
373
+ | `{{params}}` / `{{someParam}}` | User-supplied launch parameters (see below) |
304
374
 
305
375
  - `{{stepOutput.<anything>}}` is resolved generically from the previous step's output map;
306
376
  unknown keys render empty.
@@ -502,6 +572,66 @@ fallback that loops back to the builder.
502
572
  }
503
573
  ```
504
574
 
575
+ ### 9.3 Parallel — concurrent reviews with a rework loop
576
+
577
+ Two children (a lint shell step + a code-review sub-agent) run at once; the
578
+ aggregate drives the branch. `partial`/`failure` loop back to a fix step that
579
+ sees the per-child summary, then re-run the reviews.
580
+
581
+ ```json
582
+ {
583
+ "metadata": {
584
+ "id": "parallel-reviews",
585
+ "name": "Parallel Reviews",
586
+ "description": "Lint and review in parallel; fix anything that fails.",
587
+ "version": "1.0.0",
588
+ "color": "#06b6d4"
589
+ },
590
+ "entryStep": "reviews",
591
+ "settings": { "maxIterations": 20 },
592
+ "steps": [
593
+ {
594
+ "id": "reviews",
595
+ "name": "Reviews",
596
+ "type": "parallel",
597
+ "phase": "verification",
598
+ "children": [
599
+ { "id": "lint", "type": "shell", "command": "npm run lint" },
600
+ {
601
+ "id": "review",
602
+ "type": "sub_agent",
603
+ "subAgentType": "code_reviewer",
604
+ "prompt": "Review the modified files ({{modifiedFiles}}) and report issues."
605
+ }
606
+ ],
607
+ "transitions": [
608
+ { "when": { "type": "step_result", "result": "success" }, "goto": "report" },
609
+ { "when": { "type": "always" }, "goto": "fix" }
610
+ ]
611
+ },
612
+ {
613
+ "id": "fix",
614
+ "name": "Fix Issues",
615
+ "type": "agent",
616
+ "phase": "build",
617
+ "agentId": "builder",
618
+ "prompt": "Address these findings, then call step_done():\n{{stepOutput.summary}}",
619
+ "transitions": [{ "when": { "type": "always" }, "goto": "reviews" }]
620
+ },
621
+ {
622
+ "id": "report",
623
+ "name": "Report",
624
+ "type": "agent",
625
+ "phase": "verification",
626
+ "agentId": "builder",
627
+ "prompt": "All checks passed. Summarize the review in two lines, then call step_done().",
628
+ "transitions": [{ "when": { "type": "always" }, "goto": "$done" }]
629
+ }
630
+ ],
631
+ "startCondition": { "type": "always" }
632
+ }
633
+ ```
634
+
505
635
  ---
506
636
 
507
637
  ## 10. Troubleshooting (authoring mistakes)
@@ -515,3 +645,6 @@ fallback that loops back to the builder.
515
645
  | Blocked immediately at start | `startCondition` (non-`always`) evaluated false against current session metadata. |
516
646
  | "Max iterations (N) reached" | Loop lacks a terminating condition. Widen the escape conditions, not just `maxIterations`. |
517
647
  | User step shows unexpected/missing buttons | Choices are derived only from `step_result` and `always` transitions of that step. |
648
+ | Parallel step always returns `partial` | Inspect `{{stepOutput.<childId>.result}}` per child and fix the failing child (`success` needs **all** children green). |
649
+ | Missing child output in a later step | `{{stepOutput.<childId>.<key>}}` — check the child `id` and key name; unknown keys render empty. Keys are flat (no nested map). |
650
+ | Parallel children run one at a time | `maxConcurrency` is set to 1 — raise it or remove it (default runs all children at once). |
@@ -10,7 +10,7 @@ import {
10
10
  setTasksService,
11
11
  stepDoneTool,
12
12
  validateToolAction
13
- } from "./chunk-QR6FIHIP.js";
13
+ } from "./chunk-EJKAN7HK.js";
14
14
  import "./chunk-OAN4BXEW.js";
15
15
  import "./chunk-DJH6LMBT.js";
16
16
  import "./chunk-PHR64A6U.js";
@@ -92,4 +92,4 @@ export {
92
92
  stepDoneTool,
93
93
  validateToolAction
94
94
  };
95
- //# sourceMappingURL=tools-OH3WW6Q4.js.map
95
+ //# sourceMappingURL=tools-NIOESJYT.js.map
@@ -3,7 +3,7 @@ import {
3
3
  } from "./chunk-2OMGR7LN.js";
4
4
  import {
5
5
  VERSION
6
- } from "./chunk-EABIZXTG.js";
6
+ } from "./chunk-DKHY5UNR.js";
7
7
  import "./chunk-24YKXKCG.js";
8
8
  import "./chunk-CQGTEGKL.js";
9
9
  import "./chunk-YLJ4XMA6.js";
@@ -73,4 +73,4 @@ async function runUpdate(options = {}) {
73
73
  export {
74
74
  runUpdate
75
75
  };
76
- //# sourceMappingURL=update-PG63SDV3.js.map
76
+ //# sourceMappingURL=update-X6BS6MUF.js.map