openfox 2.0.145 → 2.0.147
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/CHANGELOG.md +22 -0
- package/dist/CHANGELOG.md +22 -0
- package/dist/{auto-continue-ZAHNBHPA.js → auto-continue-FGQ63HHR.js} +9 -9
- package/dist/{chat-handler-5XMO5XBU.js → chat-handler-VCED3JYF.js} +12 -12
- package/dist/{chunk-OVAHNEFG.js → chunk-2PGRX4RH.js} +5 -4
- package/dist/{chunk-LG3LQLTZ.js → chunk-2V6QL6IW.js} +290 -120
- package/dist/{chunk-2DVAF6HY.js → chunk-5JGRKNMS.js} +3 -3
- package/dist/chunk-65KDNVRA.js +7 -0
- package/dist/{chunk-2BARKBWV.js → chunk-ABXERHIY.js} +8 -8
- package/dist/{chunk-QKPTMHA2.js → chunk-AJMBQMJH.js} +23 -19
- package/dist/{chunk-E4F32L4Q.js → chunk-CPRBMVI7.js} +43 -1
- package/dist/{chunk-STVJA7IX.js → chunk-CVQYCAMY.js} +3 -3
- package/dist/{chunk-HNJ32GRI.js → chunk-ESHP42KO.js} +5 -5
- package/dist/{chunk-FLTNKZNQ.js → chunk-KJEOKIH2.js} +4 -4
- package/dist/chunk-NHHC3AVI.js +231 -0
- package/dist/{chunk-YRSZJ7IZ.js → chunk-NZBO3A3W.js} +2 -2
- package/dist/{chunk-3IVJ65IG.js → chunk-ORIPUMOQ.js} +5 -5
- package/dist/{chunk-VFHGN3IS.js → chunk-P7KUU5VB.js} +2 -2
- package/dist/{chunk-PW5L4WBG.js → chunk-Q6MBLKL4.js} +1 -1
- package/dist/{chunk-6FKSGQYO.js → chunk-QHFJRUJV.js} +3 -3
- package/dist/{chunk-X2BJFVER.js → chunk-UOBJP4GN.js} +21 -15
- package/dist/{chunk-DBTDMK23.js → chunk-YQJ6HEFS.js} +63 -56
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{compactor-53WDNC2S.js → compactor-YY7PO2XE.js} +5 -5
- package/dist/{describe-image-IGLGVEOJ.js → describe-image-Z5WS6YU3.js} +8 -8
- package/dist/{dynamic-context-7AJC6AII.js → dynamic-context-YLRA34WJ.js} +5 -5
- package/dist/{events-ODZ4SSBW.js → events-FTS5W6FX.js} +6 -4
- package/dist/{export-import-AH5HBHO6.js → export-import-R4E5BUQS.js} +5 -5
- package/dist/{folding-V2R2MZ6Y.js → folding-VWRMYZ5T.js} +4 -2
- package/dist/{launch-2QA2EHCT.js → launch-QP2BI3PB.js} +13 -13
- package/dist/{orchestrator-L5VINV36.js → orchestrator-7T62RLDL.js} +11 -11
- package/dist/package.json +1 -1
- package/dist/{path-security-3YFS3GJQ.js → path-security-25P6TQ4R.js} +7 -7
- package/dist/{processor-UQ5ITWL6.js → processor-LDLRELLS.js} +11 -11
- package/dist/{protocol-Ch2s26bR.d.ts → protocol--oV4P3L_.d.ts} +2 -1
- package/dist/{protocol-MRMOB3P4.js → protocol-M4DFHA32.js} +3 -3
- package/dist/provider/index.d.ts +4 -4
- package/dist/{serve-CIBBSOLM.js → serve-A4AJAH2N.js} +18 -18
- package/dist/server/index.d.ts +3 -3
- package/dist/server/index.js +17 -17
- package/dist/{server-YW3DO4K5.js → server-A3EGJ6MD.js} +16 -16
- package/dist/session-stats-Y7WRB5MP.js +23 -0
- package/dist/shared/index.d.ts +25 -9
- package/dist/shared/index.js +7 -3
- package/dist/skill-defaults/workflows/SKILL.md +149 -16
- package/dist/stats-2QMXP6G4.js +12 -0
- package/dist/{store-AOZ46PBS.js → store-OWOLXB74.js} +3 -3
- package/dist/{tools-RG4HDV75.js → tools-MRC27SZG.js} +9 -9
- package/dist/{types-BajWwfkt.d.ts → types-NEE5osQN.d.ts} +48 -1
- package/dist/{types-BiHNYUUI.d.ts → types-usLcJB6N.d.ts} +1 -1
- package/dist/{update-5ENWM2XR.js → update-MLDVVG3D.js} +2 -2
- package/dist/web/assets/{index-DL26wmhi.js → index-CkVmYTBd.js} +85 -85
- package/dist/web/index.html +1 -1
- package/dist/web/sw.js +1 -1
- package/package.json +1 -1
- package/dist/chunk-7OHXF5GW.js +0 -132
- package/dist/chunk-QV4BKKIO.js +0 -7
package/dist/shared/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export { A as Attachment,
|
|
3
|
-
export { A as AgentEvent, a as AskAnswerPayload, b as AskUserEvent, B as BackgroundProcess, c as BackgroundProcessExitedPayload, d as BackgroundProcessOutputPayload, e as BackgroundProcessRemovedPayload, f as BackgroundProcessStartedPayload, g as BackgroundProcessStatus, C as ChatAskUserPayload, h as ChatDeltaPayload, i as ChatDonePayload, j as ChatErrorPayload, k as ChatFormatRetryPayload, l as ChatLLMRetryFailedPayload, m as ChatLLMRetryNowPayload, n as ChatLLMRetryPayload, o as ChatMessagePayload, p as ChatMessageUpdatedPayload, q as ChatPathConfirmationPayload, r as ChatProgressPayload, s as ChatRetryPayload, t as ChatStatsPayload, u as ChatThinkingPayload, v as ChatTodoPayload, w as ChatToolCallPayload, x as ChatToolOutputPayload, y as ChatToolPreparingPayload, z as ChatToolResultPayload, D as ChatVisionFallbackPayload, E as ChoiceOption, F as ClientMessage, G as ClientMessageType, H as ContextCompactionEvent, I as ContextPreviewPayload, J as ContextStatePayload, K as CriteriaUpdatedPayload, L as DevServerOutputPayload, M as DevServerStatePayload, N as DiffLine, O as ErrorPayload, P as GitDiffFile, Q as GitStatusPayload, R as LogLine, S as LspDiagnosticsPayload, T as MetadataUpdatedPayload, U as ModeChangedPayload, V as PathConfirmPayload, W as PathConfirmationReason, X as PendingPathConfirmationPayload, Y as PendingQuestionPayload, Z as PhaseChangedPayload, _ as ProjectDeletedPayload, $ as ProjectListPayload, a0 as ProjectStatePayload, a1 as ProviderChangedPayload, a2 as QueueAddedEvent, a3 as QueueCancelledEvent, a4 as QueueDrainedEvent, a5 as QueueEvent, a6 as QueueEventType, a7 as QueueStatePayload, a8 as QueuedMessage, a9 as ServerMessage, aa as ServerMessageType, ab as SessionCreatedPayload, ac as SessionListPayload, ad as SessionLoadPayload, ae as SessionNameGeneratedPayload, af as SessionPausePayload, ag as SessionRunningPayload, ah as SessionStatePayload, ai as TaskCompletedPayload, aj as TasksUpdatePayload, ak as WorkflowWaitingPayload, al as createClientMessage, am as createServerMessage, an as isClientMessage, ao as isServerMessage } from '../protocol
|
|
1
|
+
import { q as StatsSource, r as SessionStats, l as SessionStatsSummary, d as MessageStats } from '../types-NEE5osQN.js';
|
|
2
|
+
export { A as Attachment, s as CallStatsDataPoint, t as Config, C as ContextState, u as ContextWindow, f as Criterion, v as CriterionAttempt, w as CriterionStatus, x as CriterionValidation, y as DangerLevel, D as Diagnostic, E as EditContextEdit, z as EditContextLine, B as EditContextRegion, F as ElementData, G as ExecutionState, H as FileReadEntry, I as InjectedFile, L as LLMCallStats, J as LlmBackend, c as Message, K as MessageRole, N as MessageSegment, g as MetadataEntry, M as ModelConfig, O as ModelSessionStats, Q as ModelStatsSummary, j as PauseState, R as PreparingToolCall, P as Project, m as ProjectTask, o as ProjectTaskCounts, n as ProjectTaskSettings, U as Provider, V as ProviderBackend, X as RecentUserPrompt, k as Session, Y as SessionMetadata, S as SessionMode, h as SessionPhase, i as SessionSummary, Z as StatsDataPoint, _ as StatsIdentity, $ as TaskActor, a0 as TaskAuditEntry, p as TaskGateConfig, a1 as TaskGateValue, a2 as TaskRunState, a3 as TaskSchedule, a4 as TaskStatus, e as Todo, T as ToolCall, a as ToolMode, a5 as ToolName, b as ToolResult, a6 as UserStepChoice, a7 as ValidationResult, W as WorkflowExecution, a8 as WorkflowExecutionStatus, a9 as WorkflowLaunchScope, aa as WorkflowParameter, ab as WorkflowScope } from '../types-NEE5osQN.js';
|
|
3
|
+
export { A as AgentEvent, a as AskAnswerPayload, b as AskUserEvent, B as BackgroundProcess, c as BackgroundProcessExitedPayload, d as BackgroundProcessOutputPayload, e as BackgroundProcessRemovedPayload, f as BackgroundProcessStartedPayload, g as BackgroundProcessStatus, C as ChatAskUserPayload, h as ChatDeltaPayload, i as ChatDonePayload, j as ChatErrorPayload, k as ChatFormatRetryPayload, l as ChatLLMRetryFailedPayload, m as ChatLLMRetryNowPayload, n as ChatLLMRetryPayload, o as ChatMessagePayload, p as ChatMessageUpdatedPayload, q as ChatPathConfirmationPayload, r as ChatProgressPayload, s as ChatRetryPayload, t as ChatStatsPayload, u as ChatThinkingPayload, v as ChatTodoPayload, w as ChatToolCallPayload, x as ChatToolOutputPayload, y as ChatToolPreparingPayload, z as ChatToolResultPayload, D as ChatVisionFallbackPayload, E as ChoiceOption, F as ClientMessage, G as ClientMessageType, H as ContextCompactionEvent, I as ContextPreviewPayload, J as ContextStatePayload, K as CriteriaUpdatedPayload, L as DevServerOutputPayload, M as DevServerStatePayload, N as DiffLine, O as ErrorPayload, P as GitDiffFile, Q as GitStatusPayload, R as LogLine, S as LspDiagnosticsPayload, T as MetadataUpdatedPayload, U as ModeChangedPayload, V as PathConfirmPayload, W as PathConfirmationReason, X as PendingPathConfirmationPayload, Y as PendingQuestionPayload, Z as PhaseChangedPayload, _ as ProjectDeletedPayload, $ as ProjectListPayload, a0 as ProjectStatePayload, a1 as ProviderChangedPayload, a2 as QueueAddedEvent, a3 as QueueCancelledEvent, a4 as QueueDrainedEvent, a5 as QueueEvent, a6 as QueueEventType, a7 as QueueStatePayload, a8 as QueuedMessage, a9 as ServerMessage, aa as ServerMessageType, ab as SessionCreatedPayload, ac as SessionListPayload, ad as SessionLoadPayload, ae as SessionNameGeneratedPayload, af as SessionPausePayload, ag as SessionRunningPayload, ah as SessionStatePayload, ai as TaskCompletedPayload, aj as TasksUpdatePayload, ak as WorkflowWaitingPayload, al as createClientMessage, am as createServerMessage, an as isClientMessage, ao as isServerMessage } from '../protocol--oV4P3L_.js';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Session stats computation - aggregates response-level MessageStats from
|
|
@@ -8,15 +8,31 @@ export { A as AgentEvent, a as AskAnswerPayload, b as AskUserEvent, B as Backgro
|
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
* Compute aggregated session stats
|
|
11
|
+
* Compute the full aggregated session stats (headline + per-response and
|
|
12
|
+
* per-call progression data) from an array of messages.
|
|
12
13
|
*
|
|
13
14
|
* Returns null if no messages have stats.
|
|
15
|
+
*/
|
|
16
|
+
declare function computeSessionStats(messages: StatsSource[]): SessionStats | null;
|
|
17
|
+
/**
|
|
18
|
+
* Compute the lean session stats summary (headline aggregates only) from an
|
|
19
|
+
* array of messages. Exact across every context window when fed the full
|
|
20
|
+
* history, yet small enough to ship on every session load.
|
|
21
|
+
*
|
|
22
|
+
* Returns null if no messages have stats.
|
|
23
|
+
*/
|
|
24
|
+
declare function computeSessionStatsSummary(messages: StatsSource[]): SessionStatsSummary | null;
|
|
25
|
+
/**
|
|
26
|
+
* Merge the in-flight turn's cumulative stats into a server-computed summary
|
|
27
|
+
* so the UI grows live and lands on the final numbers when the turn ends (the
|
|
28
|
+
* live channel is cleared in the same frame the finished response lands in the
|
|
29
|
+
* next summary). `base` may be null when no response has completed yet — the
|
|
30
|
+
* summary is then built from the live response alone.
|
|
14
31
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* else the full prompt) so cached prefill work is not counted as processed.
|
|
32
|
+
* Note: wire times are rounded to 0.1s (roundTo1), so the merged live view can
|
|
33
|
+
* differ from the post-turn server summary by up to ~0.1s per time field.
|
|
18
34
|
*/
|
|
19
|
-
declare function
|
|
35
|
+
declare function mergeLiveStats(base: SessionStatsSummary | null, live: MessageStats): SessionStatsSummary;
|
|
20
36
|
|
|
21
37
|
declare const locales: readonly ["en", "fr"];
|
|
22
38
|
type Locale = (typeof locales)[number];
|
|
@@ -45,4 +61,4 @@ declare function interpolate(msg: string, vars: Record<string, string | number>)
|
|
|
45
61
|
*/
|
|
46
62
|
declare function t(tx: Translation, vars?: Record<string, string | number>): string;
|
|
47
63
|
|
|
48
|
-
export { type Locale,
|
|
64
|
+
export { type Locale, MessageStats, type PluralForm, SessionStats, SessionStatsSummary, StatsSource, type Translation, computeSessionStats, computeSessionStatsSummary, getLocale, interpolate, locales, mergeLiveStats, pluralForms, setLocale, t };
|
package/dist/shared/index.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
|
-
computeSessionStats
|
|
3
|
-
|
|
2
|
+
computeSessionStats,
|
|
3
|
+
computeSessionStatsSummary,
|
|
4
|
+
mergeLiveStats
|
|
5
|
+
} from "../chunk-NHHC3AVI.js";
|
|
4
6
|
import {
|
|
5
7
|
createClientMessage,
|
|
6
8
|
createServerMessage,
|
|
7
9
|
isClientMessage,
|
|
8
10
|
isServerMessage
|
|
9
|
-
} from "../chunk-
|
|
11
|
+
} from "../chunk-Q6MBLKL4.js";
|
|
10
12
|
import {
|
|
11
13
|
getLocale,
|
|
12
14
|
interpolate,
|
|
@@ -18,6 +20,7 @@ import {
|
|
|
18
20
|
import "../chunk-YLJ4XMA6.js";
|
|
19
21
|
export {
|
|
20
22
|
computeSessionStats,
|
|
23
|
+
computeSessionStatsSummary,
|
|
21
24
|
createClientMessage,
|
|
22
25
|
createServerMessage,
|
|
23
26
|
getLocale,
|
|
@@ -25,6 +28,7 @@ export {
|
|
|
25
28
|
isClientMessage,
|
|
26
29
|
isServerMessage,
|
|
27
30
|
locales,
|
|
31
|
+
mergeLiveStats,
|
|
28
32
|
pluralForms,
|
|
29
33
|
setLocale,
|
|
30
34
|
t
|
|
@@ -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
|
|
290
|
-
|
|
|
291
|
-
| `{{workdir}}`
|
|
292
|
-
| `{{reason}}`
|
|
293
|
-
| `{{criteriaCount}}`
|
|
294
|
-
| `{{pendingCount}}`
|
|
295
|
-
| `{{criteriaList}}`
|
|
296
|
-
| `{{modifiedFiles}}`
|
|
297
|
-
| `{{stepOutput.content}}`
|
|
298
|
-
| `{{stepOutput.result}}`
|
|
299
|
-
| `{{stepOutput.stdout}}`
|
|
300
|
-
| `{{stepOutput.stderr}}`
|
|
301
|
-
| `{{stepOutput.exitCode}}`
|
|
302
|
-
| `{{stepOutput.stepDoneCalled}}`
|
|
303
|
-
| `{{
|
|
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). |
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import {
|
|
2
|
+
computeSessionStats,
|
|
3
|
+
computeSessionStatsSummary,
|
|
4
|
+
mergeLiveStats
|
|
5
|
+
} from "./chunk-NHHC3AVI.js";
|
|
6
|
+
import "./chunk-YLJ4XMA6.js";
|
|
7
|
+
export {
|
|
8
|
+
computeSessionStats,
|
|
9
|
+
computeSessionStatsSummary,
|
|
10
|
+
mergeLiveStats
|
|
11
|
+
};
|
|
12
|
+
//# sourceMappingURL=stats-2QMXP6G4.js.map
|
|
@@ -3,8 +3,8 @@ import {
|
|
|
3
3
|
getEventStore,
|
|
4
4
|
getStaleRunningSessionIds,
|
|
5
5
|
initEventStore
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-NZBO3A3W.js";
|
|
7
|
+
import "./chunk-CPRBMVI7.js";
|
|
8
8
|
import "./chunk-YEW4YEJU.js";
|
|
9
9
|
import "./chunk-OSXPQSLW.js";
|
|
10
10
|
import "./chunk-LCLH6ZUL.js";
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
getStaleRunningSessionIds,
|
|
21
21
|
initEventStore
|
|
22
22
|
};
|
|
23
|
-
//# sourceMappingURL=store-
|
|
23
|
+
//# sourceMappingURL=store-OWOLXB74.js.map
|
|
@@ -10,14 +10,14 @@ import {
|
|
|
10
10
|
setTasksService,
|
|
11
11
|
stepDoneTool,
|
|
12
12
|
validateToolAction
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-AJMBQMJH.js";
|
|
14
14
|
import "./chunk-OAN4BXEW.js";
|
|
15
15
|
import "./chunk-DJH6LMBT.js";
|
|
16
16
|
import "./chunk-PHR64A6U.js";
|
|
17
17
|
import "./chunk-J7GAZGZT.js";
|
|
18
18
|
import "./chunk-2DBWCXAQ.js";
|
|
19
19
|
import "./chunk-UO4X2ENE.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-KJEOKIH2.js";
|
|
21
21
|
import "./chunk-X7ZAP6YW.js";
|
|
22
22
|
import {
|
|
23
23
|
PathAccessDeniedError,
|
|
@@ -26,16 +26,16 @@ import {
|
|
|
26
26
|
getConfirmationSessionId,
|
|
27
27
|
providePathConfirmation,
|
|
28
28
|
requestPathAccess
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-CVQYCAMY.js";
|
|
30
30
|
import "./chunk-FAN4P45J.js";
|
|
31
31
|
import "./chunk-ZONLEX2F.js";
|
|
32
32
|
import "./chunk-VGE6UYND.js";
|
|
33
33
|
import "./chunk-ODETQHMI.js";
|
|
34
34
|
import "./chunk-I72ACQ6R.js";
|
|
35
35
|
import "./chunk-VIJVLLPT.js";
|
|
36
|
-
import "./chunk-
|
|
37
|
-
import "./chunk-
|
|
38
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-5JGRKNMS.js";
|
|
37
|
+
import "./chunk-NZBO3A3W.js";
|
|
38
|
+
import "./chunk-CPRBMVI7.js";
|
|
39
39
|
import "./chunk-CCIG3YLG.js";
|
|
40
40
|
import "./chunk-YEW4YEJU.js";
|
|
41
41
|
import "./chunk-OSXPQSLW.js";
|
|
@@ -45,7 +45,7 @@ import {
|
|
|
45
45
|
getPendingQuestionsForSession,
|
|
46
46
|
provideAnswer
|
|
47
47
|
} from "./chunk-V5AC2TV7.js";
|
|
48
|
-
import "./chunk-
|
|
48
|
+
import "./chunk-2PGRX4RH.js";
|
|
49
49
|
import "./chunk-LCLH6ZUL.js";
|
|
50
50
|
import "./chunk-YEFZ5HBD.js";
|
|
51
51
|
import "./chunk-AWBV2VXO.js";
|
|
@@ -64,7 +64,7 @@ import "./chunk-X6SWZEK7.js";
|
|
|
64
64
|
import "./chunk-WOVWVB5J.js";
|
|
65
65
|
import "./chunk-VKMPR25F.js";
|
|
66
66
|
import "./chunk-K44MW7JJ.js";
|
|
67
|
-
import "./chunk-
|
|
67
|
+
import "./chunk-Q6MBLKL4.js";
|
|
68
68
|
import "./chunk-24YKXKCG.js";
|
|
69
69
|
import "./chunk-73BO5OT3.js";
|
|
70
70
|
import "./chunk-CQGTEGKL.js";
|
|
@@ -92,4 +92,4 @@ export {
|
|
|
92
92
|
stepDoneTool,
|
|
93
93
|
validateToolAction
|
|
94
94
|
};
|
|
95
|
-
//# sourceMappingURL=tools-
|
|
95
|
+
//# sourceMappingURL=tools-MRC27SZG.js.map
|
|
@@ -266,6 +266,53 @@ interface ModelSessionStats extends StatsIdentity {
|
|
|
266
266
|
dataPoints: StatsDataPoint[];
|
|
267
267
|
callDataPoints: CallStatsDataPoint[];
|
|
268
268
|
}
|
|
269
|
+
/**
|
|
270
|
+
* Minimal per-response stats input for aggregation. `Message` is assignable
|
|
271
|
+
* to it — only id, timestamp and stats are read.
|
|
272
|
+
*/
|
|
273
|
+
interface StatsSource {
|
|
274
|
+
id: string;
|
|
275
|
+
timestamp: string;
|
|
276
|
+
stats?: MessageStats | null;
|
|
277
|
+
}
|
|
278
|
+
/**
|
|
279
|
+
* Lean server-computed session stats: the headline aggregates only, no
|
|
280
|
+
* discrete per-response/per-call progression arrays. Shipped on every
|
|
281
|
+
* session load and state update (a few hundred bytes) regardless of how many
|
|
282
|
+
* responses the session has. The trailing accumulators are internal — they
|
|
283
|
+
* keep the live-turn merge exact and are never displayed.
|
|
284
|
+
*/
|
|
285
|
+
interface SessionStatsSummary {
|
|
286
|
+
totalTime: number;
|
|
287
|
+
aiTime: number;
|
|
288
|
+
toolTime: number;
|
|
289
|
+
prefillTokens: number;
|
|
290
|
+
generationTokens: number;
|
|
291
|
+
avgPrefillSpeed: number;
|
|
292
|
+
avgGenerationSpeed: number;
|
|
293
|
+
responseCount: number;
|
|
294
|
+
llmCallCount: number;
|
|
295
|
+
modelGroups: ModelStatsSummary[];
|
|
296
|
+
totalPrefillSource: number;
|
|
297
|
+
totalPrefillTime: number;
|
|
298
|
+
totalGenTime: number;
|
|
299
|
+
}
|
|
300
|
+
interface ModelStatsSummary extends StatsIdentity {
|
|
301
|
+
key: string;
|
|
302
|
+
label: string;
|
|
303
|
+
totalTime: number;
|
|
304
|
+
aiTime: number;
|
|
305
|
+
toolTime: number;
|
|
306
|
+
prefillTokens: number;
|
|
307
|
+
generationTokens: number;
|
|
308
|
+
avgPrefillSpeed: number;
|
|
309
|
+
avgGenerationSpeed: number;
|
|
310
|
+
responseCount: number;
|
|
311
|
+
llmCallCount: number;
|
|
312
|
+
totalPrefillSource: number;
|
|
313
|
+
totalPrefillTime: number;
|
|
314
|
+
totalGenTime: number;
|
|
315
|
+
}
|
|
269
316
|
interface InjectedFile {
|
|
270
317
|
path: string;
|
|
271
318
|
content: string;
|
|
@@ -745,4 +792,4 @@ interface ElementData {
|
|
|
745
792
|
attributes: Record<string, string>;
|
|
746
793
|
}
|
|
747
794
|
|
|
748
|
-
export type {
|
|
795
|
+
export type { TaskActor as $, Attachment as A, EditContextRegion as B, ContextState as C, Diagnostic as D, EditContextEdit as E, ElementData as F, ExecutionState as G, FileReadEntry as H, InjectedFile as I, LlmBackend as J, MessageRole as K, LLMCallStats as L, ModelConfig as M, MessageSegment as N, ModelSessionStats as O, Project as P, ModelStatsSummary as Q, PreparingToolCall as R, SessionMode as S, ToolCall as T, Provider as U, ProviderBackend as V, WorkflowExecution as W, RecentUserPrompt as X, SessionMetadata as Y, StatsDataPoint as Z, StatsIdentity as _, ToolMode as a, TaskAuditEntry as a0, TaskGateValue as a1, TaskRunState as a2, TaskSchedule as a3, TaskStatus as a4, ToolName as a5, UserStepChoice as a6, ValidationResult as a7, WorkflowExecutionStatus as a8, WorkflowLaunchScope as a9, WorkflowParameter as aa, WorkflowScope as ab, ToolResult as b, Message as c, MessageStats as d, Todo as e, Criterion as f, MetadataEntry as g, SessionPhase as h, SessionSummary as i, PauseState as j, Session as k, SessionStatsSummary as l, ProjectTask as m, ProjectTaskSettings as n, ProjectTaskCounts as o, TaskGateConfig as p, StatsSource as q, SessionStats as r, CallStatsDataPoint as s, Config as t, ContextWindow as u, CriterionAttempt as v, CriterionStatus as w, CriterionValidation as x, DangerLevel as y, EditContextLine as z };
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./chunk-2OMGR7LN.js";
|
|
4
4
|
import {
|
|
5
5
|
VERSION
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-65KDNVRA.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-
|
|
76
|
+
//# sourceMappingURL=update-MLDVVG3D.js.map
|