You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 8f56156
Browse filesBrowse the repository at this point in the historyBrowse files
Catalog speaks the authoring vocabulary; grep pipe gains context flags
Root-cause fixes for the deep-eval lane's waste findings, not fallback
patches. The agent called `blocks get loop` because add_block accepts
type "loop" — the catalog omitting containers meant one surface taught
a vocabulary the other 404'd on. Loop and Parallel now have catalog
descriptors (list + get) whose option lists import the authoring
constants (VALID_LOOP_TYPES/VALID_PARALLEL_TYPES exported from the
editing operations), so the surfaces cannot drift; outputs document
the container reference semantics. Live-verified via the CLI.
The grep pipe gains -A/-B/-C context flags (window union, hit-based
-c counting) — "grep" implies them, and their absence cost real calls.
Claude-Session: https://claude.ai/code/session_01CgaxNAaeD3taGdghbXn17w
* Loop and Parallel are containers, not registry blocks — yet the authoring
7
+
* surface accepts them as `type: "loop"` / `type: "parallel"` in add_block
8
+
* operations, and the canvas presents them alongside blocks. A catalog that
9
+
* omits them teaches one vocabulary and 404s on the other; these descriptors
10
+
* make the catalog speak the authoring surface's language. Their option lists
11
+
* import the authoring constants directly, so the surfaces cannot drift.
12
+
*/
13
+
14
+
constloopSummary: CatalogBlockSummary={
15
+
id: 'loop',
16
+
name: 'Loop',
17
+
description:
18
+
'Container that runs its child blocks repeatedly: a fixed count (for), once per item of a collection (forEach), or while a condition holds (while/doWhile).',
19
+
category: 'blocks',
20
+
source: 'builtin',
21
+
triggerAllowed: false,
22
+
triggerCapable: false,
23
+
preview: false,
24
+
tags: [],
25
+
triggerIds: [],
26
+
toolIds: [],
27
+
operationIds: [],
28
+
}
29
+
30
+
constparallelSummary: CatalogBlockSummary={
31
+
id: 'parallel',
32
+
name: 'Parallel',
33
+
description:
34
+
'Container that runs its child blocks in concurrent branches: a fixed count, or one branch per item of a collection.',
35
+
category: 'blocks',
36
+
source: 'builtin',
37
+
triggerAllowed: false,
38
+
triggerCapable: false,
39
+
preview: false,
40
+
tags: [],
41
+
triggerIds: [],
42
+
toolIds: [],
43
+
operationIds: [],
44
+
}
45
+
46
+
constCONTAINER_USAGE=
47
+
'Containers are authored through workflows operations apply (add_block with this type, children via nestedNodes or parentId), not placed like tool blocks. Wire the body through the container handles (loop-start-source / loop-end-source, parallel-start-source / parallel-end-source); an unwired body never runs.'
48
+
49
+
constloopDetail: CatalogBlockDetail={
50
+
...loopSummary,
51
+
bestPractices: CONTAINER_USAGE,
52
+
inputSchema: [
53
+
{
54
+
id: 'loopType',
55
+
type: 'dropdown',
56
+
title: 'Loop type',
57
+
required: true,
58
+
options: VALID_LOOP_TYPES.map((id)=>({ id })),
59
+
description: 'How iteration is driven. Defaults to "for".',
60
+
},
61
+
{
62
+
id: 'iterations',
63
+
type: 'short-input',
64
+
title: 'Iterations',
65
+
condition: {field: 'loopType',value: 'for'},
66
+
description: 'Number of iterations for a for loop.',
67
+
},
68
+
{
69
+
id: 'collection',
70
+
type: 'long-input',
71
+
title: 'Collection',
72
+
condition: {field: 'loopType',value: 'forEach'},
73
+
description: 'Array (or reference resolving to one) iterated by a forEach loop.',
0 commit comments