@yaks/harness 0.0.0-stage → 0.2.36
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/FRONTEND.md +170 -0
- package/LICENSE +202 -0
- package/MCPAuthPanel.js +166 -0
- package/MCPAuthPanel.js.map +1 -0
- package/MCPAuthPanel.ts +184 -0
- package/ModelPanel.js +124 -0
- package/ModelPanel.js.map +1 -0
- package/ModelPanel.ts +143 -0
- package/PersonaPanel.js +106 -0
- package/PersonaPanel.js.map +1 -0
- package/PersonaPanel.ts +110 -0
- package/README.md +1570 -2
- package/RuntimePanel.js +180 -0
- package/RuntimePanel.js.map +1 -0
- package/RuntimePanel.ts +205 -0
- package/STREAMING.md +101 -0
- package/WINDOWS.md +78 -0
- package/WORKER.md +221 -0
- package/_dist/agent.d.ts +197 -0
- package/_dist/agent.d.ts.map +1 -0
- package/_dist/cli.d.ts +10 -0
- package/_dist/cli.d.ts.map +1 -0
- package/_dist/conversations.d.ts +45 -0
- package/_dist/conversations.d.ts.map +1 -0
- package/_dist/default.d.ts +32 -0
- package/_dist/default.d.ts.map +1 -0
- package/_dist/detail.d.ts +16 -0
- package/_dist/detail.d.ts.map +1 -0
- package/_dist/diagnostics.d.ts +5 -0
- package/_dist/diagnostics.d.ts.map +1 -0
- package/_dist/effects.d.ts +35 -0
- package/_dist/effects.d.ts.map +1 -0
- package/_dist/http.d.ts +12 -0
- package/_dist/http.d.ts.map +1 -0
- package/_dist/isolated.d.ts +6 -0
- package/_dist/isolated.d.ts.map +1 -0
- package/_dist/local.d.ts +74 -0
- package/_dist/local.d.ts.map +1 -0
- package/_dist/machine.d.ts +3 -0
- package/_dist/machine.d.ts.map +1 -0
- package/_dist/mcp_auth.d.ts +8 -0
- package/_dist/mcp_auth.d.ts.map +1 -0
- package/_dist/mod.d.ts +43 -0
- package/_dist/mod.d.ts.map +1 -0
- package/_dist/model_selection.d.ts +8 -0
- package/_dist/model_selection.d.ts.map +1 -0
- package/_dist/routes.d.ts +11 -0
- package/_dist/routes.d.ts.map +1 -0
- package/_dist/runs.d.ts +7 -0
- package/_dist/runs.d.ts.map +1 -0
- package/_dist/runtime.d.ts +2 -0
- package/_dist/runtime.d.ts.map +1 -0
- package/_dist/session_machines.d.ts +18 -0
- package/_dist/session_machines.d.ts.map +1 -0
- package/_dist/skills.d.ts +11 -0
- package/_dist/skills.d.ts.map +1 -0
- package/_dist/store.d.ts +38 -0
- package/_dist/store.d.ts.map +1 -0
- package/_dist/tools.d.ts +28 -0
- package/_dist/tools.d.ts.map +1 -0
- package/_dist/view.d.ts +5 -0
- package/_dist/view.d.ts.map +1 -0
- package/_dist/vocab.d.ts +7 -0
- package/_dist/vocab.d.ts.map +1 -0
- package/_dist/worn.d.ts +52 -0
- package/_dist/worn.d.ts.map +1 -0
- package/agent.js +773 -0
- package/agent.js.map +1 -0
- package/agent.ts +959 -0
- package/app.js +811 -0
- package/app.js.map +1 -0
- package/app.ts +868 -0
- package/artifact_tools.js +186 -0
- package/artifact_tools.js.map +1 -0
- package/artifact_tools.ts +190 -0
- package/backend_worker.ts +286 -0
- package/cli.js +43 -0
- package/cli.js.map +1 -0
- package/cli.ts +48 -0
- package/conversations.js +526 -0
- package/conversations.js.map +1 -0
- package/conversations.ts +576 -0
- package/conversations_testing.ts +162 -0
- package/default.js +162 -0
- package/default.js.map +1 -0
- package/default.ts +168 -0
- package/deferred_model.ts +1 -0
- package/deno.json +1 -0
- package/detail.js +50 -0
- package/detail.js.map +1 -0
- package/detail.ts +75 -0
- package/diagnostics.js +132 -0
- package/diagnostics.js.map +1 -0
- package/diagnostics.ts +150 -0
- package/draft_vault.js +149 -0
- package/draft_vault.js.map +1 -0
- package/draft_vault.ts +176 -0
- package/effects.js +233 -0
- package/effects.js.map +1 -0
- package/effects.ts +250 -0
- package/frontend/vocab.json +376 -0
- package/frontend.js +511 -0
- package/frontend.js.map +1 -0
- package/frontend.ts +389 -0
- package/http.js +107 -0
- package/http.js.map +1 -0
- package/http.ts +105 -0
- package/input_text.js +91 -0
- package/input_text.js.map +1 -0
- package/input_text.ts +99 -0
- package/instructions.js +111 -0
- package/instructions.js.map +1 -0
- package/instructions.ts +145 -0
- package/isolated.js +512 -0
- package/isolated.js.map +1 -0
- package/isolated.ts +502 -0
- package/keyboard.js +544 -0
- package/keyboard.js.map +1 -0
- package/keyboard.ts +403 -0
- package/legacy_instructions.js +3 -0
- package/legacy_instructions.js.map +1 -0
- package/legacy_instructions.ts +13 -0
- package/local.js +181 -0
- package/local.js.map +1 -0
- package/local.ts +282 -0
- package/machine.js +3 -0
- package/machine.js.map +1 -0
- package/machine.ts +8 -0
- package/mcp.js +123 -0
- package/mcp.js.map +1 -0
- package/mcp.ts +141 -0
- package/mcp_auth.js +63 -0
- package/mcp_auth.js.map +1 -0
- package/mcp_auth.ts +91 -0
- package/mcp_authorize.js +17 -0
- package/mcp_authorize.js.map +1 -0
- package/mcp_authorize.ts +18 -0
- package/mcp_registry.js +178 -0
- package/mcp_registry.js.map +1 -0
- package/mcp_registry.ts +193 -0
- package/mod.js +43 -0
- package/mod.js.map +1 -0
- package/mod.ts +45 -0
- package/model_selection.js +72 -0
- package/model_selection.js.map +1 -0
- package/model_selection.ts +86 -0
- package/numbers.js +6 -0
- package/numbers.js.map +1 -0
- package/numbers.ts +8 -0
- package/package.json +106 -4
- package/panels.js +119 -0
- package/panels.js.map +1 -0
- package/panels.ts +259 -0
- package/patch.js +329 -0
- package/patch.js.map +1 -0
- package/patch.ts +325 -0
- package/perf.ts +65 -0
- package/providers.js +36 -0
- package/providers.js.map +1 -0
- package/providers.ts +53 -0
- package/remote.js +441 -0
- package/remote.js.map +1 -0
- package/remote.ts +446 -0
- package/results.js +49 -0
- package/results.js.map +1 -0
- package/results.ts +39 -0
- package/routes.js +64 -0
- package/routes.js.map +1 -0
- package/routes.ts +87 -0
- package/runs.js +478 -0
- package/runs.js.map +1 -0
- package/runs.ts +479 -0
- package/runtime/vocab.json +36 -0
- package/runtime.js +105 -0
- package/runtime.js.map +1 -0
- package/runtime.ts +112 -0
- package/session_machines.js +203 -0
- package/session_machines.js.map +1 -0
- package/session_machines.ts +216 -0
- package/sheet.js +55 -0
- package/sheet.js.map +1 -0
- package/sheet.ts +31 -0
- package/shutdown.js +7 -0
- package/shutdown.js.map +1 -0
- package/shutdown.ts +7 -0
- package/skills.js +116 -0
- package/skills.js.map +1 -0
- package/skills.ts +114 -0
- package/startup_bench.ts +140 -0
- package/status.js +82 -0
- package/status.js.map +1 -0
- package/status.ts +97 -0
- package/steps.baseline.json +28 -0
- package/steps_bench.ts +155 -0
- package/store.js +31 -0
- package/store.js.map +1 -0
- package/store.ts +82 -0
- package/streaming.js +3 -0
- package/streaming.js.map +1 -0
- package/streaming.ts +8 -0
- package/streaming_bench.ts +76 -0
- package/switch_bench.ts +97 -0
- package/testing.ts +177 -0
- package/tools.js +287 -0
- package/tools.js.map +1 -0
- package/tools.ts +313 -0
- package/transcript.js +149 -0
- package/transcript.js.map +1 -0
- package/transcript.ts +187 -0
- package/tree.js +97 -0
- package/tree.js.map +1 -0
- package/tree.ts +114 -0
- package/unfinished.js +186 -0
- package/unfinished.js.map +1 -0
- package/unfinished.ts +198 -0
- package/view.js +92 -0
- package/view.js.map +1 -0
- package/view.ts +102 -0
- package/vocab.js +23 -0
- package/vocab.js.map +1 -0
- package/vocab.json +494 -0
- package/vocab.ts +22 -0
- package/window_bench.ts +114 -0
- package/worker_bench.ts +72 -0
- package/workspace.js +21 -0
- package/workspace.js.map +1 -0
- package/workspace.ts +17 -0
- package/worn.js +194 -0
- package/worn.js.map +1 -0
- package/worn.ts +246 -0
package/vocab.json
ADDED
|
@@ -0,0 +1,494 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$id": "urn:uuid:2630b038-0912-4339-93e3-6e25d3b9a38c",
|
|
3
|
+
"$vocabulary": {
|
|
4
|
+
"https://yak.sh/vocab/core": true
|
|
5
|
+
},
|
|
6
|
+
"title": "harness",
|
|
7
|
+
"$defs": {
|
|
8
|
+
"home": {
|
|
9
|
+
"$id": "urn:uuid:09ec100f-bd68-4f8b-9aeb-f5937cb0273d",
|
|
10
|
+
"component": true,
|
|
11
|
+
"journal": false,
|
|
12
|
+
"type": "object",
|
|
13
|
+
"description": "a session's default file-and-command target, not its permissions or the location of the agent; no home means no implicit local filesystem",
|
|
14
|
+
"properties": {
|
|
15
|
+
"cwd": {
|
|
16
|
+
"$id": "urn:uuid:d4e7be00-95fd-4543-86b7-309cf2646baa",
|
|
17
|
+
"type": "string",
|
|
18
|
+
"description": "an optional absolute command directory interpreted in the workspace filesystem; absent means workspace.root"
|
|
19
|
+
},
|
|
20
|
+
"workspace": {
|
|
21
|
+
"$id": "urn:uuid:be36ec11-1f0e-41ac-970b-2ac17cb63a15",
|
|
22
|
+
"type": "string",
|
|
23
|
+
"ref": "workspace",
|
|
24
|
+
"death": "keep",
|
|
25
|
+
"description": "the default workspace for subsequent calls; changing it leaves files and processes untouched"
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
"isolated_sandbox": {
|
|
30
|
+
"$id": "urn:uuid:aced83e7-e552-4d99-98d1-e80277759207",
|
|
31
|
+
"component": true,
|
|
32
|
+
"type": "object",
|
|
33
|
+
"description": "the replacement reserved for an isolated run whose provider released its previous sandbox",
|
|
34
|
+
"properties": {
|
|
35
|
+
"replacement": {
|
|
36
|
+
"$id": "urn:uuid:db016818-1503-472d-a997-6fe15a8066da",
|
|
37
|
+
"type": "string",
|
|
38
|
+
"description": "the provider sandbox id to request after release"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"sandbox_patch": {
|
|
43
|
+
"$id": "urn:uuid:afc7cb9d-6b00-4608-969a-092c6ba43425",
|
|
44
|
+
"component": true,
|
|
45
|
+
"journal": false,
|
|
46
|
+
"type": "object",
|
|
47
|
+
"description": "the latest unsubmitted changes saved outside an isolated session's sandbox",
|
|
48
|
+
"properties": {
|
|
49
|
+
"workspace": {
|
|
50
|
+
"$id": "urn:uuid:872964ed-98ef-4a40-ace8-a357cbf77d09",
|
|
51
|
+
"type": "string",
|
|
52
|
+
"stamped": true,
|
|
53
|
+
"description": "the provider workspace id the diff was captured in"
|
|
54
|
+
},
|
|
55
|
+
"diff": {
|
|
56
|
+
"$id": "urn:uuid:fe65bb54-4423-42b8-96aa-5fbc47143659",
|
|
57
|
+
"type": "string",
|
|
58
|
+
"stamped": true,
|
|
59
|
+
"description": "the binary-capable Git diff against the sandbox's starting commit"
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"session_list": {
|
|
64
|
+
"tool": true,
|
|
65
|
+
"description": "List agent work sessions, newest first: each row carries its session (with its status), created, spawned, doc and exit, without its command line or context sizes (graph_show a session, or put * in query, for every component). With no arguments, answers the 20 newest live sessions (no session.ended mark). A last row reports sessions waiting for machine room and how to read the next page when more match. Pass query for other sessions (.session for every status), limit for a longer page.",
|
|
66
|
+
"noun": "session",
|
|
67
|
+
"verb": "list",
|
|
68
|
+
"input": {
|
|
69
|
+
"query": {
|
|
70
|
+
"type": "string",
|
|
71
|
+
"description": "Query narrowed by .session. Without one, selects sessions with no session.ended mark."
|
|
72
|
+
},
|
|
73
|
+
"limit": {
|
|
74
|
+
"type": "number",
|
|
75
|
+
"description": "Maximum results (default 20).",
|
|
76
|
+
"short": "n"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
"readOnly": true,
|
|
80
|
+
"positional": [
|
|
81
|
+
"query"
|
|
82
|
+
],
|
|
83
|
+
"title": "List sessions"
|
|
84
|
+
},
|
|
85
|
+
"session_new": {
|
|
86
|
+
"tool": true,
|
|
87
|
+
"noun": "session",
|
|
88
|
+
"verb": "new",
|
|
89
|
+
"applied": true,
|
|
90
|
+
"title": "Start a session here",
|
|
91
|
+
"description": "Start a native session. Set wait:false to return immediately; the runner works independently.",
|
|
92
|
+
"input": {
|
|
93
|
+
"wait": {
|
|
94
|
+
"type": "boolean",
|
|
95
|
+
"description": "wait for the reply (default true)"
|
|
96
|
+
},
|
|
97
|
+
"prompt": {
|
|
98
|
+
"type": "string",
|
|
99
|
+
"description": "what to do"
|
|
100
|
+
},
|
|
101
|
+
"tui": {
|
|
102
|
+
"type": "boolean",
|
|
103
|
+
"description": "open an empty session in the terminal"
|
|
104
|
+
},
|
|
105
|
+
"effort": {
|
|
106
|
+
"type": "string",
|
|
107
|
+
"description": "how hard to think"
|
|
108
|
+
},
|
|
109
|
+
"model": {
|
|
110
|
+
"type": "string",
|
|
111
|
+
"description": "the model to ask, by name (otherwise the default: the using{provider, model} on the @yaks/harness package's row)"
|
|
112
|
+
},
|
|
113
|
+
"provider": {
|
|
114
|
+
"type": "string",
|
|
115
|
+
"description": "the provider that serves it, by name, one the config names (otherwise the default's)"
|
|
116
|
+
},
|
|
117
|
+
"persona": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"ref": "persona",
|
|
120
|
+
"description": "the persona to carry, by id or name (default: the oracle where a topic is given, else the checkout's persona)"
|
|
121
|
+
},
|
|
122
|
+
"topic": {
|
|
123
|
+
"type": "string",
|
|
124
|
+
"ref": "topic",
|
|
125
|
+
"description": "the topic to open it on, by id: the topic tree compiled from it (topic_read) follows the persona's text"
|
|
126
|
+
},
|
|
127
|
+
"cwd": {
|
|
128
|
+
"type": "string",
|
|
129
|
+
"description": "Command directory in the selected workspace filesystem."
|
|
130
|
+
},
|
|
131
|
+
"workspace": {
|
|
132
|
+
"type": "string",
|
|
133
|
+
"ref": "workspace",
|
|
134
|
+
"description": "Explicit default workspace."
|
|
135
|
+
},
|
|
136
|
+
"work": {
|
|
137
|
+
"type": "string",
|
|
138
|
+
"ref": "entity",
|
|
139
|
+
"description": "the graph task or project whose common persona to admit, independent of the machine checkout"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"positional": [
|
|
143
|
+
"prompt"
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
"session_send": {
|
|
147
|
+
"tool": true,
|
|
148
|
+
"noun": "session",
|
|
149
|
+
"verb": "send",
|
|
150
|
+
"applied": true,
|
|
151
|
+
"title": "Say more to a session here",
|
|
152
|
+
"description": "Send a session more input; words about the task it holds are kept on that task as a comment, so its next run reads every ask. A session running outside the graph (a spawned agent, a Claude Code session) hears it at its next tool call, and the call returns at once with the knock that carries it; one whose run has ended runs again, and the call returns the session once that run has started; for any other, waits for the reply unless wait:false.",
|
|
153
|
+
"input": {
|
|
154
|
+
"wait": {
|
|
155
|
+
"type": "boolean",
|
|
156
|
+
"description": "wait for the reply (default true)"
|
|
157
|
+
},
|
|
158
|
+
"session": {
|
|
159
|
+
"type": "string",
|
|
160
|
+
"ref": "session",
|
|
161
|
+
"description": "the session; pass its id or registered name"
|
|
162
|
+
},
|
|
163
|
+
"text": {
|
|
164
|
+
"type": "string",
|
|
165
|
+
"description": "what to say"
|
|
166
|
+
},
|
|
167
|
+
"task": {
|
|
168
|
+
"type": "string",
|
|
169
|
+
"ref": "task",
|
|
170
|
+
"description": "the task the words are about, kept on it as a comment (otherwise the one task the session holds)"
|
|
171
|
+
},
|
|
172
|
+
"model": {
|
|
173
|
+
"type": "string",
|
|
174
|
+
"description": "the model to ask, by name (otherwise the default: the using{provider, model} on the @yaks/harness package's row)"
|
|
175
|
+
},
|
|
176
|
+
"provider": {
|
|
177
|
+
"type": "string",
|
|
178
|
+
"description": "the provider that serves it, by name, one the config names (otherwise the default's)"
|
|
179
|
+
}
|
|
180
|
+
},
|
|
181
|
+
"required": [
|
|
182
|
+
"session",
|
|
183
|
+
"text"
|
|
184
|
+
],
|
|
185
|
+
"positional": [
|
|
186
|
+
"session",
|
|
187
|
+
"text"
|
|
188
|
+
]
|
|
189
|
+
},
|
|
190
|
+
"model_list": {
|
|
191
|
+
"tool": true,
|
|
192
|
+
"surfaces": [
|
|
193
|
+
"cli"
|
|
194
|
+
],
|
|
195
|
+
"noun": "model",
|
|
196
|
+
"verb": "list",
|
|
197
|
+
"title": "List the models this machine can reach",
|
|
198
|
+
"description": "List the models a provider this config names offers, signed in as the harness signs in to it, and give each listed model's row the context window the catalog says where the row has none. The credential itself is never shown.",
|
|
199
|
+
"input": {
|
|
200
|
+
"provider": {
|
|
201
|
+
"type": "string",
|
|
202
|
+
"description": "The provider whose models to list, by name (default: the default model's provider)"
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
},
|
|
206
|
+
"model_pin": {
|
|
207
|
+
"tool": true,
|
|
208
|
+
"noun": "model",
|
|
209
|
+
"verb": "pin",
|
|
210
|
+
"title": "Pin the default model, or clear the pin",
|
|
211
|
+
"description": "Pin what a native session asks when nothing names a model to one of the models the default routes, whatever the plans' usage reads, or clear the pin so routing by usage resumes. Everything that asks the default moves with it, heal's fixers among them; a session that names its model, and one already started, keep theirs. With neither a model nor clear, say what the default is now and which models it routes.",
|
|
212
|
+
"input": {
|
|
213
|
+
"model": {
|
|
214
|
+
"type": "string",
|
|
215
|
+
"description": "The routed model to pin, by name (gpt-6-astra, claude-opus-5-5)"
|
|
216
|
+
},
|
|
217
|
+
"clear": {
|
|
218
|
+
"type": "boolean",
|
|
219
|
+
"description": "Clear the pin: the default is routed by the plans' usage again"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"positional": [
|
|
223
|
+
"model"
|
|
224
|
+
]
|
|
225
|
+
},
|
|
226
|
+
"conversation_projects": {
|
|
227
|
+
"tool": true,
|
|
228
|
+
"surfaces": [
|
|
229
|
+
"mcp"
|
|
230
|
+
],
|
|
231
|
+
"description": "Identify the trusted human caller and list active projects.",
|
|
232
|
+
"applied": true,
|
|
233
|
+
"readOnly": true,
|
|
234
|
+
"input": {},
|
|
235
|
+
"required": []
|
|
236
|
+
},
|
|
237
|
+
"conversation_start": {
|
|
238
|
+
"tool": true,
|
|
239
|
+
"surfaces": [
|
|
240
|
+
"mcp"
|
|
241
|
+
],
|
|
242
|
+
"description": "Start a native project conversation without waiting for a reply: with the files sent with its first words and the model chosen to answer them, if any.",
|
|
243
|
+
"applied": true,
|
|
244
|
+
"input": {
|
|
245
|
+
"project": {
|
|
246
|
+
"type": "string",
|
|
247
|
+
"ref": "project",
|
|
248
|
+
"description": "The active project to talk with."
|
|
249
|
+
},
|
|
250
|
+
"prompt": {
|
|
251
|
+
"type": "string",
|
|
252
|
+
"minLength": 1
|
|
253
|
+
},
|
|
254
|
+
"request": {
|
|
255
|
+
"type": "string",
|
|
256
|
+
"minLength": 1,
|
|
257
|
+
"description": "Your own id for these words. Sending them again under it does nothing, so a retry never says them twice."
|
|
258
|
+
},
|
|
259
|
+
"provider": {
|
|
260
|
+
"type": "string",
|
|
261
|
+
"ref": "provider",
|
|
262
|
+
"description": "The provider whose model answers these words. Omit for the conversation's own."
|
|
263
|
+
},
|
|
264
|
+
"model": {
|
|
265
|
+
"type": "string",
|
|
266
|
+
"ref": "model",
|
|
267
|
+
"description": "The model that answers these words, and the conversation's words after them. Omit to keep the conversation's own."
|
|
268
|
+
},
|
|
269
|
+
"effort": {
|
|
270
|
+
"type": "string",
|
|
271
|
+
"enum": [
|
|
272
|
+
"low",
|
|
273
|
+
"medium",
|
|
274
|
+
"high",
|
|
275
|
+
"xhigh",
|
|
276
|
+
"max"
|
|
277
|
+
],
|
|
278
|
+
"description": "How much that model reasons before it answers. Omit for its default."
|
|
279
|
+
},
|
|
280
|
+
"attachments": {
|
|
281
|
+
"type": "array",
|
|
282
|
+
"items": {
|
|
283
|
+
"type": "string"
|
|
284
|
+
},
|
|
285
|
+
"description": "Files sent with these words, by the addresses their artifacts are kept by (attachment.artifact)."
|
|
286
|
+
}
|
|
287
|
+
},
|
|
288
|
+
"required": [
|
|
289
|
+
"project",
|
|
290
|
+
"prompt"
|
|
291
|
+
]
|
|
292
|
+
},
|
|
293
|
+
"conversation_send": {
|
|
294
|
+
"tool": true,
|
|
295
|
+
"surfaces": [
|
|
296
|
+
"mcp"
|
|
297
|
+
],
|
|
298
|
+
"description": "Send exact human words to an owned project conversation without waiting: with the files sent with them and the model chosen to answer them, if any.",
|
|
299
|
+
"applied": true,
|
|
300
|
+
"input": {
|
|
301
|
+
"project": {
|
|
302
|
+
"type": "string",
|
|
303
|
+
"ref": "project",
|
|
304
|
+
"description": "The active project to talk with."
|
|
305
|
+
},
|
|
306
|
+
"session": {
|
|
307
|
+
"type": "string",
|
|
308
|
+
"ref": "session"
|
|
309
|
+
},
|
|
310
|
+
"text": {
|
|
311
|
+
"type": "string",
|
|
312
|
+
"minLength": 1
|
|
313
|
+
},
|
|
314
|
+
"request": {
|
|
315
|
+
"type": "string",
|
|
316
|
+
"minLength": 1,
|
|
317
|
+
"description": "Your own id for these words. Sending them again under it does nothing, so a retry never says them twice."
|
|
318
|
+
},
|
|
319
|
+
"provider": {
|
|
320
|
+
"type": "string",
|
|
321
|
+
"ref": "provider",
|
|
322
|
+
"description": "The provider whose model answers these words. Omit for the conversation's own."
|
|
323
|
+
},
|
|
324
|
+
"model": {
|
|
325
|
+
"type": "string",
|
|
326
|
+
"ref": "model",
|
|
327
|
+
"description": "The model that answers these words, and the conversation's words after them. Omit to keep the conversation's own."
|
|
328
|
+
},
|
|
329
|
+
"effort": {
|
|
330
|
+
"type": "string",
|
|
331
|
+
"enum": [
|
|
332
|
+
"low",
|
|
333
|
+
"medium",
|
|
334
|
+
"high",
|
|
335
|
+
"xhigh",
|
|
336
|
+
"max"
|
|
337
|
+
],
|
|
338
|
+
"description": "How much that model reasons before it answers. Omit for its default."
|
|
339
|
+
},
|
|
340
|
+
"attachments": {
|
|
341
|
+
"type": "array",
|
|
342
|
+
"items": {
|
|
343
|
+
"type": "string"
|
|
344
|
+
},
|
|
345
|
+
"description": "Files sent with these words, by the addresses their artifacts are kept by (attachment.artifact)."
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
"required": [
|
|
349
|
+
"project",
|
|
350
|
+
"session",
|
|
351
|
+
"text"
|
|
352
|
+
]
|
|
353
|
+
},
|
|
354
|
+
"conversation_read": {
|
|
355
|
+
"tool": true,
|
|
356
|
+
"surfaces": [
|
|
357
|
+
"mcp"
|
|
358
|
+
],
|
|
359
|
+
"description": "Read a conversation: a bounded page of the messages said in it, including progressive assistant replies, or with lines every line, tool calls and results included. A task reads whole, with its comments and conversations. Poll again to receive revisions to the same message id.",
|
|
360
|
+
"applied": true,
|
|
361
|
+
"readOnly": true,
|
|
362
|
+
"input": {
|
|
363
|
+
"project": {
|
|
364
|
+
"type": "string",
|
|
365
|
+
"ref": "project",
|
|
366
|
+
"description": "The active project to talk with."
|
|
367
|
+
},
|
|
368
|
+
"session": {
|
|
369
|
+
"type": "string",
|
|
370
|
+
"ref": "entity",
|
|
371
|
+
"description": "The conversation, a helper or fork working under it, a task, or any line of one."
|
|
372
|
+
},
|
|
373
|
+
"limit": {
|
|
374
|
+
"type": "integer",
|
|
375
|
+
"minimum": 1,
|
|
376
|
+
"maximum": 256
|
|
377
|
+
},
|
|
378
|
+
"before": {
|
|
379
|
+
"type": "integer",
|
|
380
|
+
"minimum": 1,
|
|
381
|
+
"description": "Read older entries strictly before this entry sequence. Omit to poll the current tail."
|
|
382
|
+
},
|
|
383
|
+
"lines": {
|
|
384
|
+
"type": "boolean",
|
|
385
|
+
"description": "Answer every line, tool calls and results included, rather than only the messages."
|
|
386
|
+
},
|
|
387
|
+
"context": {
|
|
388
|
+
"type": "boolean",
|
|
389
|
+
"description": "With lines, include the model instruction snapshots beside them (omitted by default)."
|
|
390
|
+
},
|
|
391
|
+
"beforeLine": {
|
|
392
|
+
"type": "string",
|
|
393
|
+
"description": "With lines, a line as an answer's earlier.before names it, to read the lines before it."
|
|
394
|
+
}
|
|
395
|
+
},
|
|
396
|
+
"required": [
|
|
397
|
+
"project",
|
|
398
|
+
"session"
|
|
399
|
+
]
|
|
400
|
+
},
|
|
401
|
+
"conversation_recent": {
|
|
402
|
+
"tool": true,
|
|
403
|
+
"surfaces": [
|
|
404
|
+
"mcp"
|
|
405
|
+
],
|
|
406
|
+
"description": "List this caller’s recent project conversations.",
|
|
407
|
+
"applied": true,
|
|
408
|
+
"readOnly": true,
|
|
409
|
+
"input": {
|
|
410
|
+
"project": {
|
|
411
|
+
"type": "string",
|
|
412
|
+
"ref": "project",
|
|
413
|
+
"description": "The active project to talk with."
|
|
414
|
+
},
|
|
415
|
+
"limit": {
|
|
416
|
+
"type": "integer",
|
|
417
|
+
"minimum": 1,
|
|
418
|
+
"maximum": 256
|
|
419
|
+
}
|
|
420
|
+
},
|
|
421
|
+
"required": [
|
|
422
|
+
"project"
|
|
423
|
+
]
|
|
424
|
+
},
|
|
425
|
+
"conversation_inbox": {
|
|
426
|
+
"tool": true,
|
|
427
|
+
"surfaces": [
|
|
428
|
+
"mcp"
|
|
429
|
+
],
|
|
430
|
+
"description": "Read the trusted human caller’s inbox, using shared inbox policy.",
|
|
431
|
+
"applied": true,
|
|
432
|
+
"readOnly": true,
|
|
433
|
+
"input": {
|
|
434
|
+
"limit": {
|
|
435
|
+
"type": "integer",
|
|
436
|
+
"minimum": 1,
|
|
437
|
+
"maximum": 256
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
"required": []
|
|
441
|
+
},
|
|
442
|
+
"session_home": {
|
|
443
|
+
"tool": true,
|
|
444
|
+
"destructive": false,
|
|
445
|
+
"idempotent": true,
|
|
446
|
+
"description": "Change a session default workspace without moving files, commands or permissions. Omitting cwd clears the previous directory.",
|
|
447
|
+
"noun": "session",
|
|
448
|
+
"verb": "home",
|
|
449
|
+
"applied": true,
|
|
450
|
+
"input": {
|
|
451
|
+
"session": {
|
|
452
|
+
"type": "string",
|
|
453
|
+
"ref": "session",
|
|
454
|
+
"optional": false
|
|
455
|
+
},
|
|
456
|
+
"workspace": {
|
|
457
|
+
"type": "string",
|
|
458
|
+
"ref": "workspace",
|
|
459
|
+
"optional": false
|
|
460
|
+
},
|
|
461
|
+
"cwd": {
|
|
462
|
+
"type": "string",
|
|
463
|
+
"description": "Absolute command directory in the workspace filesystem.",
|
|
464
|
+
"optional": true
|
|
465
|
+
}
|
|
466
|
+
},
|
|
467
|
+
"required": [
|
|
468
|
+
"session",
|
|
469
|
+
"workspace"
|
|
470
|
+
],
|
|
471
|
+
"positional": [
|
|
472
|
+
"session",
|
|
473
|
+
"workspace"
|
|
474
|
+
]
|
|
475
|
+
},
|
|
476
|
+
"lands": {
|
|
477
|
+
"$id": "urn:uuid:2dc24291-1bfc-40ca-933e-8861a7c1cf2d",
|
|
478
|
+
"component": true,
|
|
479
|
+
"journal": false,
|
|
480
|
+
"type": "object",
|
|
481
|
+
"description": "on a session the host started to land a patch that a session outside words started handed it (@yaks/harness/isolated `submit_patch`); it holds the box's tools",
|
|
482
|
+
"properties": {
|
|
483
|
+
"from": {
|
|
484
|
+
"$id": "urn:uuid:0d12582e-39d3-4ffb-8420-532c8d3fb567",
|
|
485
|
+
"type": "string",
|
|
486
|
+
"ref": "entity",
|
|
487
|
+
"death": "keep",
|
|
488
|
+
"stamped": true,
|
|
489
|
+
"description": "the session that handed the patch"
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
}
|
package/vocab.ts
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// The harness's words, exported as `@yaks/harness/vocab`: `docs` is what a host
|
|
2
|
+
// composing the harness as one plugin among others (@yaks/cli `compose`) takes
|
|
3
|
+
// from it — the harness's own components and tools, and nothing another
|
|
4
|
+
// package says. Which other packages a harness graph is made of is the `yak`
|
|
5
|
+
// config's to say, never a list here.
|
|
6
|
+
|
|
7
|
+
import { pick, type VocabDoc } from '@yaks/vocab/runtime'
|
|
8
|
+
import doc from './vocab.json' with { type: 'json' }
|
|
9
|
+
import manifest from './package.json' with { type: 'json' }
|
|
10
|
+
|
|
11
|
+
export let homeDoc: VocabDoc = pick(doc, ['home'], 'session home')
|
|
12
|
+
export let harnessDoc: VocabDoc = pick(
|
|
13
|
+
doc,
|
|
14
|
+
Object.keys(doc.$defs).filter((name) => name != 'home'),
|
|
15
|
+
)
|
|
16
|
+
|
|
17
|
+
/** What this package is: its manifest's description, the one place it is
|
|
18
|
+
* written, which a host stamps on each document here. */
|
|
19
|
+
export let description: string = manifest.description
|
|
20
|
+
|
|
21
|
+
/** The harness's own words: the `home` a session works from, and its tools. */
|
|
22
|
+
export let docs: VocabDoc[] = [harnessDoc, homeDoc]
|
package/window_bench.ts
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/** Isolated transcript transfer comparison. Run with `deno run -A`.
|
|
2
|
+
* Arguments: entries (default 10000), body characters (default 1000), runs (1).
|
|
3
|
+
* Never opens the configured/live harness database.
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import * as fs from 'jsr:@yaks/file@0.2.36/io'
|
|
7
|
+
import { remote } from './remote.ts'
|
|
8
|
+
import type { Bundle } from 'jsr:@yaks/graph@0.2.36'
|
|
9
|
+
import { at, harness } from './testing.ts'
|
|
10
|
+
import { type Sample, type Samples, stopwatch } from 'jsr:@yaks/benchmark@0.2.36'
|
|
11
|
+
import { standaloneMain } from '../../bench/standalone-main.ts'
|
|
12
|
+
import { fixture } from '../../bench/fixture.ts'
|
|
13
|
+
|
|
14
|
+
export let corpus = (count: number, length: number): Bundle[] => [
|
|
15
|
+
{ entity: { eid: 'session' }, session: { id: 'benchmark' } },
|
|
16
|
+
...Array.from({ length: count }, (_, i) => ({
|
|
17
|
+
entity: { eid: 'e' + i },
|
|
18
|
+
entry: { session: 'session', seq: i + 1 },
|
|
19
|
+
output: {},
|
|
20
|
+
content: { body: String(i) + 'x'.repeat(length) },
|
|
21
|
+
})),
|
|
22
|
+
]
|
|
23
|
+
|
|
24
|
+
let seeded = fixture(async (path: string, count: number, length: number) => {
|
|
25
|
+
let seed = await harness(path)
|
|
26
|
+
try {
|
|
27
|
+
// The measurement reads stored transcript state, not its setup transactions.
|
|
28
|
+
await seed.g.apply(corpus(count, length))
|
|
29
|
+
} finally {
|
|
30
|
+
await seed.close()
|
|
31
|
+
}
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
export async function measure(
|
|
35
|
+
args: string[] = [],
|
|
36
|
+
): Promise<Record<string, Samples>> {
|
|
37
|
+
let samples: Record<string, Samples> = {}
|
|
38
|
+
const count = Number(args[0] ?? 10000)
|
|
39
|
+
const length = Number(args[1] ?? 1000)
|
|
40
|
+
const runs = Number(args[2] ?? 1)
|
|
41
|
+
if (![count, length, runs].every((v) => Number.isSafeInteger(v) && v > 0)) {
|
|
42
|
+
throw new Error('positive integer arguments required')
|
|
43
|
+
}
|
|
44
|
+
const directory = await fs.makeTempDir({ prefix: 'harness-window-bench-' })
|
|
45
|
+
const db = directory + '/bench.sqlite'
|
|
46
|
+
let phases: (ReturnType<ReturnType<typeof stopwatch>> & {
|
|
47
|
+
phase: string
|
|
48
|
+
run?: number
|
|
49
|
+
mode?: string
|
|
50
|
+
})[] = []
|
|
51
|
+
let preparing = stopwatch()
|
|
52
|
+
await seeded(db, count, length)
|
|
53
|
+
phases.push({ phase: 'fixture', ...preparing() })
|
|
54
|
+
try {
|
|
55
|
+
for (let run = 0; run < runs; run++) {
|
|
56
|
+
for (let mode of ['full', 'window']) {
|
|
57
|
+
let opening = stopwatch()
|
|
58
|
+
let r = await remote({ config: at(db), cwd: directory, fake: true })
|
|
59
|
+
phases.push({ phase: 'open', run, mode, ...opening() })
|
|
60
|
+
try {
|
|
61
|
+
let maxStall = 0, previous = performance.now()
|
|
62
|
+
let timer = setInterval(() => {
|
|
63
|
+
let now = performance.now()
|
|
64
|
+
maxStall = Math.max(maxStall, now - previous - 2)
|
|
65
|
+
previous = now
|
|
66
|
+
}, 2)
|
|
67
|
+
let took = stopwatch()
|
|
68
|
+
let rows = mode == 'full'
|
|
69
|
+
? await r.agent.transcript('session')
|
|
70
|
+
: (await r.agent.transcriptWindow!('session')).entries
|
|
71
|
+
let elapsed = took()
|
|
72
|
+
phases.push({ phase: 'first', run, mode, ...elapsed })
|
|
73
|
+
await new Promise((resolve) => setTimeout(resolve, 3))
|
|
74
|
+
clearInterval(timer)
|
|
75
|
+
let chars = JSON.stringify(rows).length
|
|
76
|
+
took = stopwatch()
|
|
77
|
+
if (mode == 'full') await r.agent.transcript('session')
|
|
78
|
+
else await r.agent.transcriptWindow!('session')
|
|
79
|
+
let warm = took()
|
|
80
|
+
phases.push({ phase: 'warm', run, mode, ...warm })
|
|
81
|
+
for (
|
|
82
|
+
let [phase, sample] of Object.entries({
|
|
83
|
+
first: elapsed,
|
|
84
|
+
warm,
|
|
85
|
+
})
|
|
86
|
+
) {
|
|
87
|
+
let collected = (samples[mode + '/' + phase] ??= []) as Sample[]
|
|
88
|
+
collected.push({
|
|
89
|
+
...sample,
|
|
90
|
+
details: { timerDelay: maxStall },
|
|
91
|
+
source: 'transfer',
|
|
92
|
+
counts: {
|
|
93
|
+
entries: count,
|
|
94
|
+
bodyCharacters: length,
|
|
95
|
+
delivered: rows.length,
|
|
96
|
+
serializedCharacters: chars,
|
|
97
|
+
},
|
|
98
|
+
})
|
|
99
|
+
}
|
|
100
|
+
} finally {
|
|
101
|
+
let closing = stopwatch()
|
|
102
|
+
await r.close()
|
|
103
|
+
phases.push({ phase: 'close', run, mode, ...closing() })
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
} finally {
|
|
108
|
+
await fs.remove(directory, { recursive: true })
|
|
109
|
+
console.error('harness-window phases:', JSON.stringify(phases))
|
|
110
|
+
}
|
|
111
|
+
return samples
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
if (import.meta.main) await standaloneMain('harness-window')
|