@0perator/operator 0.1.338 → 0.1.340
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/dist/autonomy/agent-cli.js +1 -1
- package/dist/autonomy/delegate.js +2 -1
- package/dist/autonomy/headless.js +1 -0
- package/dist/autonomy/session-factory.js +13 -2
- package/dist/background/index.js +8 -6
- package/dist/cli.js +60 -26
- package/dist/config/features.js +7 -0
- package/dist/config/persona.js +134 -231
- package/dist/engine/agent.js +17 -2
- package/dist/engine/aurora.js +3 -0
- package/dist/engine/compaction.js +74 -14
- package/dist/engine/decision-points.js +2 -0
- package/dist/engine/grandmaster.js +102 -3
- package/dist/session.js +121 -93
- package/dist/tools/deferred.js +137 -0
- package/dist/tools/registry.js +223 -242
- package/package.json +1 -1
package/dist/tools/registry.js
CHANGED
|
@@ -2234,24 +2234,12 @@ async function voiceTranscribe(args) {
|
|
|
2234
2234
|
const TOOLS = [
|
|
2235
2235
|
{
|
|
2236
2236
|
name: "bash", safe: false,
|
|
2237
|
-
description: "Run a
|
|
2238
|
-
"calls. State PERSISTS: a `cd`, an exported variable, an activated venv, or a defined function " +
|
|
2239
|
-
"in one call is still in effect on the next. So set things up ONCE and reuse them — do NOT " +
|
|
2240
|
-
"re-run `source .../activate && ...` or re-`cd` on every call; activate/enter once, then just " +
|
|
2241
|
-
"run the command. stdout and stderr come back merged (like a terminal) with the exit code. " +
|
|
2242
|
-
"Optional `cwd` runs that one command in a subshell without moving the session. For anything " +
|
|
2243
|
-
"that can run more than ~2 minutes -- a server/build/watcher, but ALSO a full test suite or any " +
|
|
2244
|
-
"other verification run -- use shell_background instead of guessing a bigger timeout_ms; a timeout " +
|
|
2245
|
-
"here kills the command (and resets this shell's cwd/env only if bash itself wedges). Known-long commands (installs, builds, test suites, downloads) are auto-started as background jobs. " +
|
|
2246
|
-
"If the user presses ctrl+b while this runs, it moves to the background (shN) and you are told when it finishes; do not poll. " +
|
|
2247
|
-
"Pipelines run with `set -o pipefail`: if ANY stage fails the pipeline fails and you see [exit N] — a check hidden behind `| tail` can never fake success. " +
|
|
2248
|
-
"Prefer SINGLE quotes for patterns and paths (grep -l '^x', not grep -l \"^x\"): a raw double-quote " +
|
|
2249
|
-
"inside the command can break tool-call serialization on the local model and make the call fail.",
|
|
2237
|
+
description: "Run a command in a PERSISTENT bash session: `cd`, exported variables, an activated venv and functions carry over — set up once, don't re-`cd` or re-activate every call. stdout+stderr merged, with the exit code; pipelines run with `set -o pipefail`. Anything that may run over ~2 minutes (server, build, watcher, full test suite) goes to shell_background, not a bigger timeout_ms; ctrl+b moves a running command to the background and you are told when it ends — don't poll. Prefer SINGLE quotes for patterns and paths: a raw double-quote can break tool-call serialization.",
|
|
2250
2238
|
parameters: { type: "object", properties: {
|
|
2251
|
-
command: { type: "string", description: "the
|
|
2252
|
-
description: { type: "string", description: "
|
|
2253
|
-
cwd: { type: "string", description: "
|
|
2254
|
-
timeout_ms: { type: "number", description: "
|
|
2239
|
+
command: { type: "string", description: "the command to run" },
|
|
2240
|
+
description: { type: "string", description: "short label for the UI" },
|
|
2241
|
+
cwd: { type: "string", description: "run this one command here (the session's cwd is unchanged)" },
|
|
2242
|
+
timeout_ms: { type: "number", description: "default 120000; on timeout the command is killed — long runs belong in shell_background" },
|
|
2255
2243
|
}, required: ["command"] },
|
|
2256
2244
|
run: shellExec,
|
|
2257
2245
|
},
|
|
@@ -2266,92 +2254,87 @@ const TOOLS = [
|
|
|
2266
2254
|
},
|
|
2267
2255
|
{
|
|
2268
2256
|
name: "shell_background", safe: false,
|
|
2269
|
-
description: "Start a long-running
|
|
2257
|
+
description: "Start a long-running command DETACHED and get a job id at once. Use it from the start for servers, builds, watchers and full test suites — anything over ~2 minutes, which bash's timeout would kill. You are notified when it ends (don't poll); bash_output reads its output, bash_kill stops it.",
|
|
2270
2258
|
parameters: { type: "object", properties: { command: { type: "string" }, description: { type: "string" }, cwd: { type: "string" } }, required: ["command"] },
|
|
2271
2259
|
run: shellBackground,
|
|
2272
2260
|
},
|
|
2273
2261
|
{
|
|
2274
2262
|
name: "download_file", safe: false,
|
|
2275
|
-
description: "Download a URL to disk
|
|
2263
|
+
description: "Download a URL to disk — use this instead of curl/wget in bash. Fails loudly on HTTP errors, resumes, retries, refuses an HTML page standing in for the file, and verifies size and (with sha256) the hash before renaming onto dest. Runs in the BACKGROUND by default; the completion notice gives the final size + sha256 or the exact error — start downloads one at a time and never report one as done until that notice arrives. background:false waits (small files only).",
|
|
2276
2264
|
parameters: { type: "object", properties: {
|
|
2277
2265
|
url: { type: "string", description: "http(s) URL" },
|
|
2278
|
-
dest: { type: "string", description: "file path, or a directory ending in /" },
|
|
2279
|
-
sha256: { type: "string", description: "expected SHA-256
|
|
2266
|
+
dest: { type: "string", description: "file path, or a directory ending in / (name from the URL)" },
|
|
2267
|
+
sha256: { type: "string", description: "expected SHA-256 hex; a mismatch deletes the file" },
|
|
2280
2268
|
expected_bytes: { type: "number" },
|
|
2281
2269
|
overwrite: { type: "boolean", description: "replace an existing dest (default false: refuse)" },
|
|
2282
2270
|
background: { type: "boolean", description: "default true; false waits for the result" },
|
|
2283
2271
|
timeout_ms: { type: "number", description: "only with background:false" },
|
|
2284
|
-
headers: { type: "object", description: "extra request headers
|
|
2272
|
+
headers: { type: "object", description: "extra request headers" },
|
|
2285
2273
|
}, required: ["url", "dest"] },
|
|
2286
2274
|
run: downloadFileTool,
|
|
2287
2275
|
},
|
|
2288
2276
|
{
|
|
2289
2277
|
name: "bash_output", safe: true,
|
|
2290
|
-
description: "Read new
|
|
2291
|
-
parameters: { type: "object", properties: { id: { type: "string", description: "the job id
|
|
2278
|
+
description: "Read new output from a background shell job (shell_background or ctrl+b) and whether it is still running. Finished jobs are announced — don't poll. Not for spawn_agent ids: use agent_status.",
|
|
2279
|
+
parameters: { type: "object", properties: { id: { type: "string", description: "the job id" } }, required: ["id"] },
|
|
2292
2280
|
run: bashOutput,
|
|
2293
2281
|
},
|
|
2294
2282
|
{
|
|
2295
2283
|
name: "bash_kill", safe: false,
|
|
2296
|
-
description: "Stop a
|
|
2284
|
+
description: "Stop a background shell job (from shell_background or ctrl+b) with SIGTERM.",
|
|
2297
2285
|
parameters: { type: "object", properties: { id: { type: "string" } }, required: ["id"] },
|
|
2298
2286
|
run: bashKill,
|
|
2299
2287
|
},
|
|
2300
2288
|
{
|
|
2301
2289
|
name: "verify_pipeline", safe: false,
|
|
2302
|
-
description: "Run
|
|
2303
|
-
"Each stage runs its command sequentially; if a stage fails the pipeline aborts with the failure. " +
|
|
2304
|
-
"Output is formatted with === STAGE === markers for readability. Use this for end-to-end verification " +
|
|
2305
|
-
"chains where you need structured pass/fail per step.",
|
|
2290
|
+
description: "Run labeled verification stages in order (e.g. build → serve → test → screenshot); aborts at the first failing stage and reports pass/fail per stage.",
|
|
2306
2291
|
parameters: { type: "object", properties: {
|
|
2307
2292
|
stages: {
|
|
2308
2293
|
type: "array",
|
|
2309
2294
|
items: { type: "object", properties: {
|
|
2310
|
-
label: { type: "string", description: "
|
|
2311
|
-
command: { type: "string", description: "bash command
|
|
2312
|
-
timeout_ms: { type: "number", description: "
|
|
2313
|
-
expect: { type: "string", enum: ["zero", "output"], description: "zero = exit 0 required (default); output = any output
|
|
2295
|
+
label: { type: "string", description: "stage name" },
|
|
2296
|
+
command: { type: "string", description: "bash command" },
|
|
2297
|
+
timeout_ms: { type: "number", description: "default 120000" },
|
|
2298
|
+
expect: { type: "string", enum: ["zero", "output"], description: "zero = exit 0 required (default); output = any output passes" },
|
|
2314
2299
|
}, required: ["label", "command"] },
|
|
2315
|
-
description: "ordered
|
|
2300
|
+
description: "ordered stages",
|
|
2316
2301
|
},
|
|
2317
2302
|
}, required: ["stages"] },
|
|
2318
2303
|
run: verifyPipeline,
|
|
2319
2304
|
},
|
|
2320
2305
|
{
|
|
2321
2306
|
name: "brief_update", safe: false,
|
|
2322
|
-
description: "
|
|
2323
|
-
"Creates the file with a standard header if absent. Use this to maintain a living verification " +
|
|
2324
|
-
"document as stages complete.",
|
|
2307
|
+
description: "Write or append a named section of an _ai-docs brief (created with a standard header if absent) — a living verification doc.",
|
|
2325
2308
|
parameters: { type: "object", properties: {
|
|
2326
|
-
path: { type: "string", description: "
|
|
2327
|
-
section: { type: "string", description: "section heading
|
|
2328
|
-
content: { type: "string", description: "markdown
|
|
2329
|
-
mode: { type: "string", enum: ["replace", "append"], description: "replace
|
|
2309
|
+
path: { type: "string", description: "the brief, e.g. _ai-docs/briefs/x.md" },
|
|
2310
|
+
section: { type: "string", description: "section heading" },
|
|
2311
|
+
content: { type: "string", description: "markdown" },
|
|
2312
|
+
mode: { type: "string", enum: ["replace", "append"], description: "replace (default) | append" },
|
|
2330
2313
|
}, required: ["path", "section", "content"] },
|
|
2331
2314
|
run: briefUpdate,
|
|
2332
2315
|
},
|
|
2333
2316
|
{
|
|
2334
2317
|
name: "task_add", safe: false,
|
|
2335
|
-
description: "
|
|
2318
|
+
description: "Write the plan FIRST for multi-step work (3+ steps) or several user tasks: every step its own item, every \"all N\" instance enumerated so none is dropped. Order is priority. The owner sees the list live, so it replaces restating the plan in prose. `text` for one task, `tasks` for several; returns each id.",
|
|
2336
2319
|
parameters: { type: "object", properties: { text: { type: "string" }, tasks: { type: "array", items: { type: "string" } } } },
|
|
2337
2320
|
run: taskAdd,
|
|
2338
2321
|
},
|
|
2339
2322
|
{
|
|
2340
2323
|
name: "task_list", safe: true,
|
|
2341
|
-
description: "Show the
|
|
2324
|
+
description: "Show the task list with statuses ([ ] pending, [>] in progress, [x] done, [~] cancelled); read it before resuming after a compaction.",
|
|
2342
2325
|
parameters: { type: "object", properties: {} },
|
|
2343
2326
|
run: taskList,
|
|
2344
2327
|
},
|
|
2345
2328
|
{
|
|
2346
2329
|
name: "task_update", safe: false,
|
|
2347
|
-
description: "Set a task's status
|
|
2330
|
+
description: "Set a task's status. Exactly ONE task in_progress at a time (marking another returns the previous to pending). in_progress when you start a step, done only once the work is VERIFIED — never on intent; a failed step → cancelled and task_add a revised one. Update as each step lands.",
|
|
2348
2331
|
parameters: { type: "object", properties: { id: { type: "number" }, status: { type: "string", enum: ["pending", "in_progress", "done", "cancelled"] } }, required: ["id", "status"] },
|
|
2349
2332
|
run: taskUpdate,
|
|
2350
2333
|
},
|
|
2351
2334
|
{
|
|
2352
2335
|
name: "task_clear", safe: false,
|
|
2353
|
-
description: "Clear the
|
|
2354
|
-
parameters: { type: "object", properties: { completed_only: { type: "boolean", description: "true = remove only done tasks
|
|
2336
|
+
description: "Clear the task list — ALL tasks by default. Use it when the user says clear the list, reset, start fresh or move on (instead of marking everything done); completed_only:true drops only done tasks.",
|
|
2337
|
+
parameters: { type: "object", properties: { completed_only: { type: "boolean", description: "true = remove only done tasks" } } },
|
|
2355
2338
|
run: taskClear,
|
|
2356
2339
|
},
|
|
2357
2340
|
{
|
|
@@ -2364,7 +2347,7 @@ const TOOLS = [
|
|
|
2364
2347
|
},
|
|
2365
2348
|
{
|
|
2366
2349
|
name: "read_files", safe: true,
|
|
2367
|
-
description: "Read
|
|
2350
|
+
description: "Read several files in ONE call (parallel I/O) — far faster than serial file_read calls. Entries may carry offset/limit; results come back under per-file headers.",
|
|
2368
2351
|
parameters: { type: "object", properties: {
|
|
2369
2352
|
paths: {
|
|
2370
2353
|
type: "array",
|
|
@@ -2376,7 +2359,7 @@ const TOOLS = [
|
|
|
2376
2359
|
}, required: ["path"] },
|
|
2377
2360
|
],
|
|
2378
2361
|
},
|
|
2379
|
-
description: "
|
|
2362
|
+
description: "paths, or {path, offset, limit} objects",
|
|
2380
2363
|
},
|
|
2381
2364
|
}, required: ["paths"] },
|
|
2382
2365
|
run: readFiles,
|
|
@@ -2399,24 +2382,24 @@ const TOOLS = [
|
|
|
2399
2382
|
},
|
|
2400
2383
|
{
|
|
2401
2384
|
name: "scratchpad", safe: true,
|
|
2402
|
-
description: "Your PRIVATE scratchpad for
|
|
2385
|
+
description: "Your PRIVATE session scratchpad for notes, plans and intermediate results that must not go in the workspace or your reply. No args = read; `content` appends (mode \"overwrite\" replaces).",
|
|
2403
2386
|
parameters: { type: "object", properties: {
|
|
2404
|
-
content: { type: "string", description: "text to add; omit to
|
|
2387
|
+
content: { type: "string", description: "text to add; omit to read" },
|
|
2405
2388
|
mode: { type: "string", enum: ["append", "overwrite"], description: "default append" },
|
|
2406
2389
|
} },
|
|
2407
2390
|
run: scratchpad,
|
|
2408
2391
|
},
|
|
2409
2392
|
{
|
|
2410
2393
|
name: "session_handoff", safe: true,
|
|
2411
|
-
description: "
|
|
2394
|
+
description: "Your handoff to your next session in THIS directory — what you did, state, decisions, next steps; it is auto-loaded there. No args = read; `content` saves (overwrites). Update it before you finish or when context runs low.",
|
|
2412
2395
|
parameters: { type: "object", properties: {
|
|
2413
|
-
content: { type: "string", description: "the handoff (markdown); omit to
|
|
2396
|
+
content: { type: "string", description: "the handoff (markdown); omit to read" },
|
|
2414
2397
|
} },
|
|
2415
2398
|
run: sessionHandoff,
|
|
2416
2399
|
},
|
|
2417
2400
|
{
|
|
2418
2401
|
name: "grep_search", safe: true,
|
|
2419
|
-
description: "
|
|
2402
|
+
description: "Plain recursive grep for a regex under a path. Prefer `search` (ripgrep: faster, .gitignore-aware) unless you need grep semantics.",
|
|
2420
2403
|
parameters: { type: "object", properties: {
|
|
2421
2404
|
pattern: { type: "string" }, path: { type: "string" }, glob: { type: "string" },
|
|
2422
2405
|
}, required: ["pattern"] },
|
|
@@ -2424,33 +2407,33 @@ const TOOLS = [
|
|
|
2424
2407
|
},
|
|
2425
2408
|
{
|
|
2426
2409
|
name: "search", safe: true,
|
|
2427
|
-
description: "Fast
|
|
2410
|
+
description: "Fast content search (ripgrep: parallel, .gitignore-aware, skips binaries) — prefer it over `find … | grep`. Scope with `path` (default: current dir). HARD REFUSAL: path may not be $HOME, /, /Users or another machine-wide root (they hang for minutes) — use find_files for names, a narrow subtree for content. `glob` filters filenames; files_with_matches returns just the paths (locate before you read).",
|
|
2428
2411
|
parameters: { type: "object", properties: {
|
|
2429
|
-
pattern: { type: "string", description: "regex
|
|
2430
|
-
path: { type: "string", description: "directory
|
|
2431
|
-
glob: { type: "string", description: "filename glob
|
|
2432
|
-
files_with_matches: { type: "boolean", description: "return only
|
|
2412
|
+
pattern: { type: "string", description: "regex" },
|
|
2413
|
+
path: { type: "string", description: "directory scope (default current dir; not $HOME or /)" },
|
|
2414
|
+
glob: { type: "string", description: "filename glob, e.g. \"*.ts\"" },
|
|
2415
|
+
files_with_matches: { type: "boolean", description: "return only matching paths" },
|
|
2433
2416
|
}, required: ["pattern"] },
|
|
2434
2417
|
run: ripgrepSearch,
|
|
2435
2418
|
},
|
|
2436
2419
|
{
|
|
2437
2420
|
name: "find_files", safe: true,
|
|
2438
|
-
description: "Find files anywhere
|
|
2421
|
+
description: "Find files anywhere by NAME or METADATA (kind, date, size, extension, author, tags) through the OS search index (Spotlight / Windows Search / locate) — instant, the whole home directory by default. For \"where is the file\"; use `search` for exact content/regex within a scoped directory. Absolute paths, newest first. If the index is unavailable it scans ONE directory (`path`, else the current dir) and says so on its first line.",
|
|
2439
2422
|
parameters: { type: "object", properties: {
|
|
2440
|
-
query: { type: "string", description: "words or a filename fragment
|
|
2441
|
-
name: { type: "string", description: "
|
|
2442
|
-
path: { type: "string", description: "scope directory
|
|
2443
|
-
kind: { type: "string", enum: [...KINDS], description: "
|
|
2444
|
-
modified_within: { type: "string", description: "
|
|
2423
|
+
query: { type: "string", description: "words or a filename fragment" },
|
|
2424
|
+
name: { type: "string", description: "fragment matched on file names only" },
|
|
2425
|
+
path: { type: "string", description: "scope directory (default: home, or cwd in the fallback)" },
|
|
2426
|
+
kind: { type: "string", enum: [...KINDS], description: "kind filter" },
|
|
2427
|
+
modified_within: { type: "string", description: "e.g. 30m, 24h, 7d" },
|
|
2445
2428
|
limit: { type: "number", description: `max results (default ${FIND_FILES_DEFAULT_LIMIT}, max ${FIND_FILES_MAX_LIMIT})` },
|
|
2446
|
-
content: { type: "boolean", description: "match
|
|
2447
|
-
min_size: { type: "string", description: "
|
|
2448
|
-
max_size: { type: "string", description: "
|
|
2449
|
-
author: { type: "string", description: "document author (index
|
|
2450
|
-
tags: { type: "array", items: { type: "string" }, description: "Finder tags / keywords (index
|
|
2451
|
-
extension: { type: "string", description: "
|
|
2452
|
-
where: { type: "string", description: "raw backend predicate
|
|
2453
|
-
details: { type: "boolean", description: "
|
|
2429
|
+
content: { type: "boolean", description: "also match indexed full text" },
|
|
2430
|
+
min_size: { type: "string", description: "e.g. 500KB, 10MB" },
|
|
2431
|
+
max_size: { type: "string", description: "e.g. 1.5GB" },
|
|
2432
|
+
author: { type: "string", description: "document author (index only)" },
|
|
2433
|
+
tags: { type: "array", items: { type: "string" }, description: "Finder tags / keywords (index only)" },
|
|
2434
|
+
extension: { type: "string", description: "e.g. pdf" },
|
|
2435
|
+
where: { type: "string", description: "raw backend predicate (Spotlight `kMDItemPixelHeight > 2000` / Windows Search SQL); refused by the fallback" },
|
|
2436
|
+
details: { type: "boolean", description: "per hit: path, size, modified, kind" },
|
|
2454
2437
|
}, required: ["query"] },
|
|
2455
2438
|
run: findFiles,
|
|
2456
2439
|
},
|
|
@@ -2462,7 +2445,7 @@ const TOOLS = [
|
|
|
2462
2445
|
},
|
|
2463
2446
|
{
|
|
2464
2447
|
name: "git_status", safe: true,
|
|
2465
|
-
description: "Structured git state in one read: branch, ahead/behind
|
|
2448
|
+
description: "Structured git state in one read: branch, ahead/behind, staged/unstaged/untracked ('nothing to commit' when clean). Use it instead of parsing `git status` in a loop.",
|
|
2466
2449
|
parameters: { type: "object", properties: { cwd: { type: "string" } } },
|
|
2467
2450
|
run: gitStatus,
|
|
2468
2451
|
},
|
|
@@ -2476,7 +2459,7 @@ const TOOLS = [
|
|
|
2476
2459
|
},
|
|
2477
2460
|
{
|
|
2478
2461
|
name: "checkpoint", safe: false,
|
|
2479
|
-
description: "Git add+commit a workspace and leave a memory note
|
|
2462
|
+
description: "Git add+commit a workspace and leave a memory note in one call. Stages only the workspace's own subtree; `paths` stages just those.",
|
|
2480
2463
|
parameters: { type: "object", properties: {
|
|
2481
2464
|
summary: { type: "string" }, workspace: { type: "string" }, push: { type: "boolean" },
|
|
2482
2465
|
paths: { type: "array", items: { type: "string" } },
|
|
@@ -2485,7 +2468,7 @@ const TOOLS = [
|
|
|
2485
2468
|
},
|
|
2486
2469
|
{
|
|
2487
2470
|
name: "memory_search", safe: true,
|
|
2488
|
-
description: "Search stored memory notes by substring/tag
|
|
2471
|
+
description: "Search stored memory notes by substring/tag, newest first. A result's [id] is what memory_store's `supersedes` takes.",
|
|
2489
2472
|
parameters: { type: "object", properties: {
|
|
2490
2473
|
query: { type: "string" }, limit: { type: "number" },
|
|
2491
2474
|
} },
|
|
@@ -2493,46 +2476,46 @@ const TOOLS = [
|
|
|
2493
2476
|
},
|
|
2494
2477
|
{
|
|
2495
2478
|
name: "memory_store", safe: false,
|
|
2496
|
-
description: "Store a durable memory note with optional tags.
|
|
2479
|
+
description: "Store a durable memory note with optional tags. To correct a wrong or outdated note pass `supersedes` (its [id] from memory_search) instead of adding a second note beside it — the old one stops surfacing (it stays on disk).",
|
|
2497
2480
|
parameters: { type: "object", properties: {
|
|
2498
2481
|
text: { type: "string" }, tags: { type: "array", items: { type: "string" } },
|
|
2499
|
-
supersedes: { type: "string", description: "id
|
|
2482
|
+
supersedes: { type: "string", description: "id of the earlier note this corrects or retracts" },
|
|
2500
2483
|
}, required: ["text"] },
|
|
2501
2484
|
run: memoryStore,
|
|
2502
2485
|
},
|
|
2503
2486
|
{
|
|
2504
2487
|
name: "web_fetch", safe: true,
|
|
2505
|
-
description: "Fetch an http(s) URL
|
|
2488
|
+
description: "Fetch an http(s) URL as plain text (HTML stripped, capped at max_chars). Read-only.",
|
|
2506
2489
|
parameters: { type: "object", properties: {
|
|
2507
|
-
url: { type: "string", description: "
|
|
2508
|
-
max_chars: { type: "number", description: "
|
|
2490
|
+
url: { type: "string", description: "http(s) URL" },
|
|
2491
|
+
max_chars: { type: "number", description: "default 20000" },
|
|
2509
2492
|
timeout_ms: { type: "number" },
|
|
2510
2493
|
}, required: ["url"] },
|
|
2511
2494
|
run: webFetch,
|
|
2512
2495
|
},
|
|
2513
2496
|
{
|
|
2514
2497
|
name: "http_request", safe: false,
|
|
2515
|
-
description: "
|
|
2498
|
+
description: "HTTP request to any API: any method, headers, a JSON body (`json`) or raw `body`, bearer/basic auth. Returns status + headers + the capped body verbatim. For REST/GraphQL calls, webhooks and integrations; web_fetch is the plain read.",
|
|
2516
2499
|
parameters: { type: "object", properties: {
|
|
2517
|
-
url: { type: "string", description: "
|
|
2518
|
-
method: { type: "string", description: "
|
|
2519
|
-
headers: { type: "object", description: "
|
|
2520
|
-
json: { description: "
|
|
2521
|
-
body: { type: "string", description: "raw
|
|
2522
|
-
bearer: { type: "string", description: "
|
|
2523
|
-
basic: { type: "object", description: "
|
|
2500
|
+
url: { type: "string", description: "http(s) URL" },
|
|
2501
|
+
method: { type: "string", description: "default GET" },
|
|
2502
|
+
headers: { type: "object", description: "flat object" },
|
|
2503
|
+
json: { description: "JSON body (sets Content-Type: application/json)" },
|
|
2504
|
+
body: { type: "string", description: "raw body (ignored if `json` is set)" },
|
|
2505
|
+
bearer: { type: "string", description: "sets Authorization: Bearer <token>" },
|
|
2506
|
+
basic: { type: "object", description: "{user, pass} → Authorization: Basic" },
|
|
2524
2507
|
timeout_ms: { type: "number", description: "default 30000" },
|
|
2525
2508
|
}, required: ["url"] },
|
|
2526
2509
|
run: httpRequest,
|
|
2527
2510
|
},
|
|
2528
2511
|
{
|
|
2529
2512
|
name: "file_upload", safe: false,
|
|
2530
|
-
description: "Upload a local file
|
|
2513
|
+
description: "Upload a local file: POST multipart/form-data (default; `field` names the form field) or PUT raw bytes (presigned-PUT style), with the same auth/headers as http_request. It sends the file to an external service — confirm the destination.",
|
|
2531
2514
|
parameters: { type: "object", properties: {
|
|
2532
|
-
path: { type: "string", description: "local file
|
|
2533
|
-
url: { type: "string", description: "destination
|
|
2534
|
-
method: { type: "string", enum: ["POST", "PUT"], description: "POST=multipart (default), PUT=raw bytes" },
|
|
2535
|
-
field: { type: "string", description: "
|
|
2515
|
+
path: { type: "string", description: "local file" },
|
|
2516
|
+
url: { type: "string", description: "destination URL" },
|
|
2517
|
+
method: { type: "string", enum: ["POST", "PUT"], description: "POST = multipart (default), PUT = raw bytes" },
|
|
2518
|
+
field: { type: "string", description: "form field name (default \"file\")" },
|
|
2536
2519
|
headers: { type: "object" }, bearer: { type: "string" }, basic: { type: "object" },
|
|
2537
2520
|
timeout_ms: { type: "number", description: "default 120000" },
|
|
2538
2521
|
}, required: ["path", "url"] },
|
|
@@ -2540,199 +2523,199 @@ const TOOLS = [
|
|
|
2540
2523
|
},
|
|
2541
2524
|
{
|
|
2542
2525
|
name: "web_search", safe: true,
|
|
2543
|
-
description: "Search the web (
|
|
2526
|
+
description: "Search the web (a local SearXNG, falling back to the AXE autopilot SERP) → ranked title/url/snippet results. Read-only; follow up with web_fetch.",
|
|
2544
2527
|
parameters: { type: "object", properties: {
|
|
2545
2528
|
query: { type: "string", description: "the search query" },
|
|
2546
|
-
count: { type: "number", description: "
|
|
2547
|
-
engine: { type: "string", enum: ["google", "bing", "ddg"], description: "
|
|
2529
|
+
count: { type: "number", description: "1-20 (default 8)" },
|
|
2530
|
+
engine: { type: "string", enum: ["google", "bing", "ddg"], description: "autopilot fallback engine (default bing; google returns nothing there)" },
|
|
2548
2531
|
timeout_ms: { type: "number" },
|
|
2549
2532
|
}, required: ["query"] },
|
|
2550
2533
|
run: webSearch,
|
|
2551
2534
|
},
|
|
2552
2535
|
{
|
|
2553
2536
|
name: "knowledge_search", safe: true,
|
|
2554
|
-
description: "
|
|
2537
|
+
description: "Semantic search of the local Skylark knowledge base → hits with source, distance and snippet: past work, project context, stored facts.",
|
|
2555
2538
|
parameters: { type: "object", properties: {
|
|
2556
2539
|
query: { type: "string", description: "the search query" },
|
|
2557
|
-
n: { type: "number", description: "
|
|
2558
|
-
timeout_ms: { type: "number", description: "
|
|
2540
|
+
n: { type: "number", description: "1-20 (default 5)" },
|
|
2541
|
+
timeout_ms: { type: "number", description: "default 15000" },
|
|
2559
2542
|
}, required: ["query"] },
|
|
2560
2543
|
run: knowledgeSearch,
|
|
2561
2544
|
},
|
|
2562
2545
|
{
|
|
2563
2546
|
name: "deep_research", safe: true,
|
|
2564
|
-
description: "
|
|
2547
|
+
description: "Multi-source web research → a cited brief: plans several search angles, fans out web_search + web_fetch, and synthesizes an answer with inline citations. Read-only. For comparisons, surveys, sourced background — one lookup is faster with web_search. Requires a research API key.",
|
|
2565
2548
|
parameters: { type: "object", properties: {
|
|
2566
2549
|
question: { type: "string", description: "the research question" },
|
|
2567
|
-
angles: { type: "number", description: "
|
|
2568
|
-
max_sources: { type: "number", description: "
|
|
2569
|
-
timeout_ms: { type: "number", description: "
|
|
2550
|
+
angles: { type: "number", description: "search angles (1-6, default 4)" },
|
|
2551
|
+
max_sources: { type: "number", description: "sources to read (1-12, default 6)" },
|
|
2552
|
+
timeout_ms: { type: "number", description: "default 240000" },
|
|
2570
2553
|
}, required: ["question"] },
|
|
2571
2554
|
run: deepResearch,
|
|
2572
2555
|
},
|
|
2573
2556
|
{
|
|
2574
2557
|
name: "email_send", safe: false,
|
|
2575
|
-
description: "Send an email
|
|
2558
|
+
description: "Send an email (AXE Quill SMTP). `to` defaults to the signed-in owner, so \"email me …\" just works; plain text, `html` optional. It really sends, so the permission policy gates it. Errors clearly when no Quill key is configured.",
|
|
2576
2559
|
parameters: { type: "object", properties: {
|
|
2577
|
-
to: { type: "string", description: "recipient
|
|
2578
|
-
subject: { type: "string", description: "
|
|
2579
|
-
body: { type: "string", description: "
|
|
2580
|
-
html: { type: "string", description: "optional HTML body
|
|
2560
|
+
to: { type: "string", description: "recipient; omit for the owner" },
|
|
2561
|
+
subject: { type: "string", description: "subject line" },
|
|
2562
|
+
body: { type: "string", description: "plain-text body" },
|
|
2563
|
+
html: { type: "string", description: "optional HTML body" },
|
|
2581
2564
|
}, required: ["subject", "body"] },
|
|
2582
2565
|
run: emailSend,
|
|
2583
2566
|
},
|
|
2584
2567
|
{
|
|
2585
2568
|
name: "image_generate",
|
|
2586
|
-
description: "Generate an image
|
|
2569
|
+
description: "Generate an image (AXE image worker, FLUX.1-schnell, scale-to-zero) → PNG path. The ONLY way to make images: never load diffusion weights inline (e.g. ml.load) — that pins GBs on the serving box and crawls your decode.",
|
|
2587
2570
|
parameters: { type: "object", properties: {
|
|
2588
2571
|
prompt: { type: "string", description: "what to generate" },
|
|
2589
|
-
size: { type: "string", description:
|
|
2590
|
-
n: { type: "number", description: "
|
|
2591
|
-
reference: { type: "string", description: "
|
|
2592
|
-
strength: { type: "number", description: "img2img
|
|
2593
|
-
ip_adapter_scale: { type: "number", description: "
|
|
2594
|
-
expand: { type: "boolean", description: "
|
|
2595
|
-
steps: { type: "number", description: "
|
|
2596
|
-
out: { type: "string", description: "
|
|
2597
|
-
timeout_ms: { type: "number", description: "default 180000
|
|
2572
|
+
size: { type: "string", description: "WxH (default \"512x512\")" },
|
|
2573
|
+
n: { type: "number", description: "1-4 (default 1)" },
|
|
2574
|
+
reference: { type: "string", description: "reference image path/url: a FACE photo keeps THAT person (identity broker); otherwise img2img restyle" },
|
|
2575
|
+
strength: { type: "number", description: "img2img 0-1 (default 0.65; lower = closer)" },
|
|
2576
|
+
ip_adapter_scale: { type: "number", description: "face likeness 0-1 (default 0.8)" },
|
|
2577
|
+
expand: { type: "boolean", description: "rewrite the prompt richer first (the quality lever)" },
|
|
2578
|
+
steps: { type: "number", description: "default 4; ~8 for finer img2img" },
|
|
2579
|
+
out: { type: "string", description: ".png path (default temp)" },
|
|
2580
|
+
timeout_ms: { type: "number", description: "default 180000" },
|
|
2598
2581
|
}, required: ["prompt"] },
|
|
2599
2582
|
run: imageGenerate,
|
|
2600
2583
|
},
|
|
2601
2584
|
{
|
|
2602
2585
|
name: "video_generate",
|
|
2603
|
-
description: "Generate a short video
|
|
2586
|
+
description: "Generate a short video (AXE video worker, LTX-Video, scale-to-zero) → a renderable URL or .mp4 path. Never load a video model inline — that pins GBs on the serving box and crawls your decode.",
|
|
2604
2587
|
parameters: { type: "object", properties: {
|
|
2605
2588
|
prompt: { type: "string", description: "what to generate" },
|
|
2606
|
-
size: { type: "string", description:
|
|
2607
|
-
num_frames: { type: "number", description: "
|
|
2608
|
-
fps: { type: "number", description: "
|
|
2609
|
-
seed: { type: "number", description: "
|
|
2610
|
-
reference_image: { type: "string", description: "
|
|
2611
|
-
expand: { type: "boolean", description: "
|
|
2612
|
-
out: { type: "string", description: "
|
|
2613
|
-
timeout_ms: { type: "number", description: "default 600000
|
|
2589
|
+
size: { type: "string", description: "WxH (default \"704x480\")" },
|
|
2590
|
+
num_frames: { type: "number", description: "default 97 ≈ 4s" },
|
|
2591
|
+
fps: { type: "number", description: "default 24" },
|
|
2592
|
+
seed: { type: "number", description: "for a reproducible render" },
|
|
2593
|
+
reference_image: { type: "string", description: "first-frame image path/url (image-to-video)" },
|
|
2594
|
+
expand: { type: "boolean", description: "rewrite the prompt richer first" },
|
|
2595
|
+
out: { type: "string", description: ".mp4 path (default temp)" },
|
|
2596
|
+
timeout_ms: { type: "number", description: "default 600000" },
|
|
2614
2597
|
}, required: ["prompt"] },
|
|
2615
2598
|
run: videoGenerate,
|
|
2616
2599
|
},
|
|
2617
2600
|
{
|
|
2618
2601
|
name: "image_analyze", safe: true,
|
|
2619
|
-
description: "
|
|
2602
|
+
description: "SEE an image with real vision (the gateway's `vision` route): a local path or http(s) url + an optional question → the model's answer. Use it on a reference, screenshot or generated image before acting — never guess content from file size or pixel stats. A DOCUMENT (PDF, DOCX, XLSX, PPTX, RTF, HTML) returns its extracted TEXT, every page; only an image-only document is rendered (first page). as_image: true looks at a document's first page as a picture.",
|
|
2620
2603
|
parameters: { type: "object", properties: {
|
|
2621
|
-
image: { type: "string", description: "
|
|
2622
|
-
question: { type: "string", description:
|
|
2623
|
-
max_tokens: { type: "number", description: "optional
|
|
2604
|
+
image: { type: "string", description: "local path or http(s) url — an image, or a document (returned as text)" },
|
|
2605
|
+
question: { type: "string", description: "default \"Describe this image in detail.\"" },
|
|
2606
|
+
max_tokens: { type: "number", description: "optional answer cap (default uncapped)" },
|
|
2624
2607
|
timeout_ms: { type: "number", description: "default 120000" },
|
|
2625
|
-
as_image: { type: "boolean", description: "
|
|
2608
|
+
as_image: { type: "boolean", description: "document: look at its first page as an image (layout, charts)" },
|
|
2626
2609
|
}, required: ["image"] },
|
|
2627
2610
|
run: imageAnalyze,
|
|
2628
2611
|
},
|
|
2629
2612
|
{
|
|
2630
2613
|
name: "image_inspect", safe: true,
|
|
2631
|
-
description: "
|
|
2614
|
+
description: "Image FACTS without a model — dimensions, format, megapixels, aspect, file size, dominant colors, frames, EXIF — instant, on the CPU. For measurements/metadata; image_analyze is for meaning.",
|
|
2632
2615
|
parameters: { type: "object", properties: {
|
|
2633
|
-
image: { type: "string", description: "
|
|
2616
|
+
image: { type: "string", description: "local path or http(s) url" },
|
|
2634
2617
|
}, required: ["image"] },
|
|
2635
2618
|
run: imageInspect,
|
|
2636
2619
|
},
|
|
2637
2620
|
{
|
|
2638
2621
|
name: "video_analyze", safe: true,
|
|
2639
|
-
description: "
|
|
2622
|
+
description: "SEE a video: frames sampled evenly across it are described by the VL model (the gateway's `vision` route). A local path or http(s) url + an optional question. Never guess a video's content from the file.",
|
|
2640
2623
|
parameters: { type: "object", properties: {
|
|
2641
|
-
video: { type: "string", description: "
|
|
2642
|
-
question: { type: "string", description: "
|
|
2643
|
-
frames: { type: "number", description: "
|
|
2644
|
-
max_tokens: { type: "number", description: "optional
|
|
2624
|
+
video: { type: "string", description: "local path or http(s) url" },
|
|
2625
|
+
question: { type: "string", description: "default: describe what happens" },
|
|
2626
|
+
frames: { type: "number", description: "2-16 (default 8)" },
|
|
2627
|
+
max_tokens: { type: "number", description: "optional answer cap (default uncapped)" },
|
|
2645
2628
|
timeout_ms: { type: "number", description: "default 180000" },
|
|
2646
2629
|
}, required: ["video"] },
|
|
2647
2630
|
run: videoAnalyze,
|
|
2648
2631
|
},
|
|
2649
2632
|
{
|
|
2650
2633
|
name: "voice_speak", safe: false,
|
|
2651
|
-
description: "
|
|
2634
|
+
description: "Say text ALOUD in Operator's own voice (Kokoro TTS) on the owner's machine — a spoken status or answer, not just printed text. Saves the WAV and returns its path; a headless box saves without playing.",
|
|
2652
2635
|
parameters: { type: "object", properties: {
|
|
2653
2636
|
text: { type: "string", description: "what to say" },
|
|
2654
|
-
voice: { type: "string", description:
|
|
2655
|
-
play: { type: "boolean", description: "
|
|
2656
|
-
out: { type: "string", description: "
|
|
2637
|
+
voice: { type: "string", description: "Kokoro voice id (default \"bf_emma\", the Operator voice)" },
|
|
2638
|
+
play: { type: "boolean", description: "default true; false = synthesize + save only" },
|
|
2639
|
+
out: { type: "string", description: ".wav path (default a temp file)" },
|
|
2657
2640
|
timeout_ms: { type: "number", description: "default 60000" },
|
|
2658
2641
|
}, required: ["text"] },
|
|
2659
2642
|
run: voiceSpeak,
|
|
2660
2643
|
},
|
|
2661
2644
|
{
|
|
2662
2645
|
name: "voice_transcribe", safe: true,
|
|
2663
|
-
description: "Transcribe an audio file
|
|
2646
|
+
description: "Transcribe an audio file (wav/mp3/m4a/ogg — any ffmpeg format) to text with whisper.cpp — HEAR a voice note instead of guessing.",
|
|
2664
2647
|
parameters: { type: "object", properties: {
|
|
2665
|
-
file: { type: "string", description: "local
|
|
2648
|
+
file: { type: "string", description: "local audio file" },
|
|
2666
2649
|
timeout_ms: { type: "number", description: "default 120000" },
|
|
2667
2650
|
}, required: ["file"] },
|
|
2668
2651
|
run: voiceTranscribe,
|
|
2669
2652
|
},
|
|
2670
2653
|
{
|
|
2671
2654
|
name: "image_recreate",
|
|
2672
|
-
description: "Recreate a
|
|
2655
|
+
description: "Recreate a REFERENCE image in one call: vision extracts a faithful prompt, then a matching image is generated (subject, style, composition, lighting — not pixel-exact). Returns the image + what it understood.",
|
|
2673
2656
|
parameters: { type: "object", properties: {
|
|
2674
|
-
reference: { type: "string", description: "
|
|
2675
|
-
instructions: { type: "string", description: "optional
|
|
2676
|
-
size: { type: "string", description:
|
|
2677
|
-
out: { type: "string", description: "
|
|
2657
|
+
reference: { type: "string", description: "image path or http(s) url" },
|
|
2658
|
+
instructions: { type: "string", description: "optional tweaks, e.g. 'but in daylight'" },
|
|
2659
|
+
size: { type: "string", description: "default \"1024x1024\"" },
|
|
2660
|
+
out: { type: "string", description: ".png path (default a temp file)" },
|
|
2678
2661
|
}, required: ["reference"] },
|
|
2679
2662
|
run: imageRecreate,
|
|
2680
2663
|
},
|
|
2681
2664
|
{
|
|
2682
2665
|
name: "artifact_create",
|
|
2683
|
-
description: "Make a shareable ARTIFACT —
|
|
2666
|
+
description: "Make a shareable hosted ARTIFACT on compose.casa — HTML page / dashboard, SVG, markdown doc, deck, or interactive canvas — and get a public URL. While compose.casa IS REACHABLE this is THE way to make an artifact / page / deck: never write a local file or hunt for a 'compose' folder. If this call errors (compose.casa down), write a plain local file with file_create instead (.md for text) — not a PDF unless one was asked for.",
|
|
2684
2667
|
parameters: { type: "object", properties: {
|
|
2685
|
-
content: { type: "string", description: "the full
|
|
2686
|
-
title: { type: "string", description: "
|
|
2687
|
-
content_type: { type: "string", description: "html (default) | svg | markdown | canvas (interactive HTML/JS
|
|
2668
|
+
content: { type: "string", description: "the full HTML document, SVG, or markdown" },
|
|
2669
|
+
title: { type: "string", description: "short title" },
|
|
2670
|
+
content_type: { type: "string", description: "html (default) | svg | markdown | canvas (interactive HTML/JS)" },
|
|
2688
2671
|
}, required: ["content"] },
|
|
2689
2672
|
run: artifactCreate,
|
|
2690
2673
|
},
|
|
2691
2674
|
{
|
|
2692
2675
|
name: "document_generate",
|
|
2693
|
-
description: "
|
|
2676
|
+
description: "Render markdown (or plain text) to a real PDF — report, brief, deliverable, deck handout — with NO external renderer (works on every box; never pandoc/Chrome). Headings, emphasis, lists, tables, code, quotes, links and local images render with page numbers; `title`/`subtitle` add a cover header. Returns the PDF path. For a hosted page URL use artifact_create.",
|
|
2694
2677
|
parameters: { type: "object", properties: {
|
|
2695
|
-
content: { type: "string", description: "the
|
|
2696
|
-
title: { type: "string", description: "optional
|
|
2697
|
-
subtitle: { type: "string", description: "optional subtitle
|
|
2698
|
-
out: { type: "string", description: "
|
|
2678
|
+
content: { type: "string", description: "the body as markdown" },
|
|
2679
|
+
title: { type: "string", description: "optional cover title" },
|
|
2680
|
+
subtitle: { type: "string", description: "optional subtitle" },
|
|
2681
|
+
out: { type: "string", description: ".pdf path (default attachments/<slug>-<ts>.pdf)" },
|
|
2699
2682
|
}, required: ["content"] },
|
|
2700
2683
|
run: documentGenerate,
|
|
2701
2684
|
},
|
|
2702
2685
|
{
|
|
2703
2686
|
name: "skill_list", safe: true,
|
|
2704
|
-
description: "List
|
|
2687
|
+
description: "List the curated AXE skills (reusable playbooks), or search the full catalogue including community skills with `query`. Read-only.",
|
|
2705
2688
|
parameters: { type: "object", properties: {
|
|
2706
|
-
query: { type: "string", description: "
|
|
2689
|
+
query: { type: "string", description: "search term; omit for the curated list" },
|
|
2707
2690
|
} },
|
|
2708
2691
|
run: (a) => skillList(str(a.query)),
|
|
2709
2692
|
},
|
|
2710
2693
|
{
|
|
2711
2694
|
name: "skill_fetch", safe: true,
|
|
2712
|
-
description: "
|
|
2695
|
+
description: "Load one skill's full instructions by name (your saved profile skills first, then the hub). For a directory skill, file_path loads a linked file (references/, templates/, scripts/). Read-only.",
|
|
2713
2696
|
parameters: { type: "object", properties: {
|
|
2714
|
-
slug: { type: "string", description: "the skill name
|
|
2715
|
-
file_path: { type: "string", description: "
|
|
2697
|
+
slug: { type: "string", description: "the skill name" },
|
|
2698
|
+
file_path: { type: "string", description: "path inside a directory skill; may not escape it" },
|
|
2716
2699
|
}, required: ["slug"] },
|
|
2717
2700
|
run: (a) => skillFetch(str(a.slug), str(a.file_path).trim() || undefined),
|
|
2718
2701
|
},
|
|
2719
2702
|
{
|
|
2720
2703
|
name: "skill_save",
|
|
2721
|
-
description: "Save a
|
|
2704
|
+
description: "Save a repeatable playbook as a skill in your profile — listed by skill_list and loaded by skill_fetch from the next session (profile skills win over the hub).",
|
|
2722
2705
|
parameters: { type: "object", properties: {
|
|
2723
|
-
name: { type: "string", description: "short
|
|
2724
|
-
content: { type: "string", description: "the
|
|
2706
|
+
name: { type: "string", description: "short name (kebab-cased)" },
|
|
2707
|
+
content: { type: "string", description: "the instructions (markdown)" },
|
|
2725
2708
|
}, required: ["name", "content"] },
|
|
2726
2709
|
run: (a) => skillSave(str(a.name), str(a.content)),
|
|
2727
2710
|
},
|
|
2728
2711
|
{
|
|
2729
2712
|
name: "memory", safe: false,
|
|
2730
|
-
description: "Batch-edit
|
|
2713
|
+
description: "Batch-edit memories/MEMORY.md or memories/USER.md: each operation adds, replaces or removes text; budget-checked, one atomic write.",
|
|
2731
2714
|
parameters: { type: "object", properties: {
|
|
2732
|
-
target: { type: "string", enum: ["memory", "user"], description: "
|
|
2715
|
+
target: { type: "string", enum: ["memory", "user"], description: "default memory" },
|
|
2733
2716
|
operations: { type: "array", items: { type: "object", properties: {
|
|
2734
2717
|
action: { type: "string", enum: ["add", "replace", "remove"] },
|
|
2735
|
-
content: { type: "string", description: "text to add or the replacement
|
|
2718
|
+
content: { type: "string", description: "text to add, or the replacement" },
|
|
2736
2719
|
old_text: { type: "string", description: "text to find (replace/remove)" },
|
|
2737
2720
|
}, required: ["action"] } },
|
|
2738
2721
|
}, required: ["operations"] },
|
|
@@ -2740,12 +2723,12 @@ const TOOLS = [
|
|
|
2740
2723
|
},
|
|
2741
2724
|
{
|
|
2742
2725
|
name: "session_search", safe: true,
|
|
2743
|
-
description: "Search past
|
|
2726
|
+
description: "Search past sessions on this machine — Operator's and other agents' (agents.md providers) — every term in one message, newest first. A hit gives title · agent · messages · age · model · folder, the matching line, and an id for session_read. An empty query lists the newest.",
|
|
2744
2727
|
parameters: { type: "object", properties: {
|
|
2745
|
-
query: { type: "string", description: "
|
|
2746
|
-
scope: { type: "string", enum: SESSION_SCOPES, description: "workspace · project · all (default
|
|
2747
|
-
source: { type: "string", description: "
|
|
2748
|
-
limit: { type: "number", description: "
|
|
2728
|
+
query: { type: "string", description: "terms (all must appear); empty = newest" },
|
|
2729
|
+
scope: { type: "string", enum: SESSION_SCOPES, description: "workspace (this folder) · project (this repo) · all (default)" },
|
|
2730
|
+
source: { type: "string", description: "\"operator\" or a provider slug from agents.md" },
|
|
2731
|
+
limit: { type: "number", description: "default 8" },
|
|
2749
2732
|
}, required: ["query"] },
|
|
2750
2733
|
run: async (a) => {
|
|
2751
2734
|
await indexSessions();
|
|
@@ -2763,7 +2746,7 @@ const TOOLS = [
|
|
|
2763
2746
|
},
|
|
2764
2747
|
{
|
|
2765
2748
|
name: "session_read", safe: true,
|
|
2766
|
-
description: "Read one past session by id (
|
|
2749
|
+
description: "Read one past session by id (from session_search), capped at 24k chars.",
|
|
2767
2750
|
parameters: { type: "object", properties: {
|
|
2768
2751
|
id: { type: "string", description: "the session id" },
|
|
2769
2752
|
}, required: ["id"] },
|
|
@@ -2771,31 +2754,31 @@ const TOOLS = [
|
|
|
2771
2754
|
},
|
|
2772
2755
|
{
|
|
2773
2756
|
name: "session_rewind", safe: false,
|
|
2774
|
-
description: "Truncate a saved session transcript
|
|
2757
|
+
description: "Truncate a saved session transcript before its last N user turns (owner undo). Never empties a transcript and writes a full copy first. Working-tree files are NOT touched — revert those with git.",
|
|
2775
2758
|
parameters: { type: "object", properties: {
|
|
2776
|
-
id: { type: "string", description: "session id
|
|
2777
|
-
turns: { type: "number", description: "
|
|
2759
|
+
id: { type: "string", description: "session id" },
|
|
2760
|
+
turns: { type: "number", description: "default 1, max 50" },
|
|
2778
2761
|
}, required: ["id"] },
|
|
2779
2762
|
run: runSessionRewind,
|
|
2780
2763
|
},
|
|
2781
2764
|
{
|
|
2782
2765
|
name: "cronjob", safe: false,
|
|
2783
|
-
description: "Manage scheduled headless agent runs
|
|
2766
|
+
description: "Manage scheduled headless agent runs: create, list (next/last run), remove by id, run one now. Runs are logged under cron/ in the operator home.",
|
|
2784
2767
|
parameters: { type: "object", properties: {
|
|
2785
2768
|
action: { type: "string", enum: ["create", "list", "remove", "run"], description: "what to do" },
|
|
2786
|
-
name: { type: "string", description: "create: optional
|
|
2787
|
-
schedule: { description: "create: 5-field cron string (\"30 2 * * *\"), interval minutes (30), or {kind:'interval',everyMinutes} / {kind:'cron',expr}" },
|
|
2788
|
-
task: { type: "string", description: "create: the prompt run
|
|
2789
|
-
id: { type: "string", description: "remove/run: the job id
|
|
2769
|
+
name: { type: "string", description: "create: optional name" },
|
|
2770
|
+
schedule: { description: "create: a 5-field cron string (\"30 2 * * *\"), interval minutes (30), or {kind:'interval',everyMinutes} / {kind:'cron',expr}" },
|
|
2771
|
+
task: { type: "string", description: "create: the prompt run on each fire" },
|
|
2772
|
+
id: { type: "string", description: "remove/run: the job id" },
|
|
2790
2773
|
}, required: ["action"] },
|
|
2791
2774
|
run: runCronTool,
|
|
2792
2775
|
},
|
|
2793
2776
|
{
|
|
2794
2777
|
name: "delegate_task", safe: false,
|
|
2795
|
-
description: `
|
|
2778
|
+
description: `Run ONE self-contained subtask on a sub-agent (a headless Operator session with its own tools) and get its final answer; blocks. It has NO memory of this conversation and cannot ask — \`task\` must carry every path, constraint and the exact output wanted. \`model\`: any /model id; OMIT IT to use the owner's configured default sub-agent (almost always right). Never name a model you have not seen answer in this fleet (an unloaded one fails); tool-heavy work (repo review, exploration, web research, debugging) needs a strong tool-driver such as "cortana". Connected cloud providers work too ("claude-sonnet", BYO: ${BYO_DELEGATE_PROVIDERS}); one without a stored key is refused with the command to store it. Don't delegate a single tool call; sub-agents cannot delegate further and can mutate the workspace.`,
|
|
2796
2779
|
parameters: { type: "object", properties: {
|
|
2797
2780
|
task: { type: "string", description: "the complete, self-contained subtask — the sub-agent sees only this" },
|
|
2798
|
-
model: { type: "string", description: "registry model id
|
|
2781
|
+
model: { type: "string", description: "registry model id; omit for the owner's configured default sub-agent" },
|
|
2799
2782
|
}, required: ["task"] },
|
|
2800
2783
|
run: (a) => runDelegateTask(a),
|
|
2801
2784
|
},
|
|
@@ -2803,22 +2786,22 @@ const TOOLS = [
|
|
|
2803
2786
|
name: "delegate_to_agent", safe: false,
|
|
2804
2787
|
description: agentCliToolDescription(),
|
|
2805
2788
|
parameters: { type: "object", properties: {
|
|
2806
|
-
task: { type: "string", description: "the complete, self-contained task — the
|
|
2807
|
-
agent: { type: "string", description: "
|
|
2789
|
+
task: { type: "string", description: "the complete, self-contained task — the CLI sees only this" },
|
|
2790
|
+
agent: { type: "string", description: "an INSTALLED agent CLI id from the list above" },
|
|
2808
2791
|
model: { type: "string", description: "optional underlying model id for that CLI" },
|
|
2809
2792
|
}, required: ["task", "agent"] },
|
|
2810
2793
|
run: (a) => runDelegateToAgent(a),
|
|
2811
2794
|
},
|
|
2812
2795
|
{
|
|
2813
2796
|
name: "browser", safe: false,
|
|
2814
|
-
description: "Drive a REAL headless browser (Chrome over CDP)
|
|
2797
|
+
description: "Drive a REAL headless browser (Chrome over CDP); state persists across calls — JS pages, logins, forms, clicks. Prefer browser_read for content. Actions: open/navigate(url) reload back forward click(selector) fill(selector, text) submit(selector) eval(js, awaits promises) screenshot → png path, tab_select/tab_close(index) close. http/https/about/data URLs only. Login wall: NEVER guess credentials — ask the owner.",
|
|
2815
2798
|
parameters: { type: "object", properties: {
|
|
2816
2799
|
action: { type: "string", enum: ["open", "navigate", "reload", "back", "forward", "click", "fill", "submit", "eval", "screenshot", "tab_select", "tab_close", "close"], description: "the browser action" },
|
|
2817
|
-
url: { type: "string", description: "
|
|
2800
|
+
url: { type: "string", description: "for open|navigate" },
|
|
2818
2801
|
selector: { type: "string", description: "CSS selector for click|fill|submit" },
|
|
2819
2802
|
text: { type: "string", description: "value for fill" },
|
|
2820
|
-
js: { type: "string", description: "JS expression for eval
|
|
2821
|
-
index: { type: "number", description: "tab index
|
|
2803
|
+
js: { type: "string", description: "JS expression for eval" },
|
|
2804
|
+
index: { type: "number", description: "tab index" },
|
|
2822
2805
|
settle_ms: { type: "number", description: "post-click settle (default 250)" },
|
|
2823
2806
|
cache_bust: { type: "boolean", description: "reload: ignore cache" },
|
|
2824
2807
|
}, required: ["action"] },
|
|
@@ -2826,21 +2809,21 @@ const TOOLS = [
|
|
|
2826
2809
|
},
|
|
2827
2810
|
{
|
|
2828
2811
|
name: "browser_read", safe: true,
|
|
2829
|
-
description: "Read the active browser
|
|
2812
|
+
description: "Read the active page of the `browser` session without changing it: info (title/url/readyState), text (innerText), tab_list. Open a page with browser first.",
|
|
2830
2813
|
parameters: { type: "object", properties: {
|
|
2831
2814
|
action: { type: "string", enum: ["info", "text", "tab_list"], description: "what to read" },
|
|
2832
|
-
max_chars: { type: "number", description: "text
|
|
2815
|
+
max_chars: { type: "number", description: "text cap (default 20000, max 100000)" },
|
|
2833
2816
|
}, required: ["action"] },
|
|
2834
2817
|
run: runBrowserRead,
|
|
2835
2818
|
},
|
|
2836
2819
|
{
|
|
2837
2820
|
name: "browser_vault", safe: false,
|
|
2838
|
-
description: "Origin-bound website credentials from the owner's vault
|
|
2821
|
+
description: "Origin-bound website credentials from the owner's vault. THE RULE: never type a password yourself, never ask for one in chat, never repeat one — results withhold values. list: handles, users, bound origins (no secrets). fill(handle, user_selector, password_selector): fills the ACTIVE browser page after an exact origin match (open the login page with browser first). No item for an origin → tell the owner to add one in their terminal; never guess.",
|
|
2839
2822
|
parameters: { type: "object", properties: {
|
|
2840
2823
|
action: { type: "string", enum: ["list", "fill"], description: "what to do" },
|
|
2841
|
-
handle: { type: "string", description: "fill:
|
|
2842
|
-
user_selector: { type: "string", description: "fill:
|
|
2843
|
-
password_selector: { type: "string", description: "fill:
|
|
2824
|
+
handle: { type: "string", description: "fill: vault handle from list" },
|
|
2825
|
+
user_selector: { type: "string", description: "fill: username field selector" },
|
|
2826
|
+
password_selector: { type: "string", description: "fill: password field selector" },
|
|
2844
2827
|
}, required: ["action"] },
|
|
2845
2828
|
run: async (args) => {
|
|
2846
2829
|
// dynamic by-variable import keeps the node-touching vault out of the neutral bundle (purity)
|
|
@@ -2851,33 +2834,33 @@ const TOOLS = [
|
|
|
2851
2834
|
},
|
|
2852
2835
|
{
|
|
2853
2836
|
name: "skill_catalog", safe: false,
|
|
2854
|
-
description: "The
|
|
2837
|
+
description: "The OFFICIAL optional-skills catalogue shipped with Operator; nothing in it is active until installed. browse(query?) lists entries; install(name) copies a skill into the operator home's skills/ (live next session); remove(name) deletes an installed copy (hand-written skills are never touched).",
|
|
2855
2838
|
parameters: { type: "object", properties: {
|
|
2856
2839
|
action: { type: "string", enum: ["browse", "install", "remove"], description: "what to do" },
|
|
2857
|
-
query: { type: "string", description: "browse:
|
|
2858
|
-
name: { type: "string", description: "install/remove: exact
|
|
2840
|
+
query: { type: "string", description: "browse: name/category/description filter" },
|
|
2841
|
+
name: { type: "string", description: "install/remove: exact name from browse" },
|
|
2859
2842
|
}, required: ["action"] },
|
|
2860
2843
|
run: runSkillCatalog,
|
|
2861
2844
|
},
|
|
2862
2845
|
// ── Chauffeur native tools (gated on binary availability) ──
|
|
2863
2846
|
{
|
|
2864
2847
|
name: "desktop_screenshot", safe: true,
|
|
2865
|
-
description: "
|
|
2848
|
+
description: "Screenshot the desktop or one window via Chauffeur (text + image).",
|
|
2866
2849
|
parameters: { type: "object", properties: {
|
|
2867
|
-
pid: { type: "number", description: "optional
|
|
2850
|
+
pid: { type: "number", description: "optional target process" },
|
|
2868
2851
|
window_id: { type: "number" },
|
|
2869
2852
|
} },
|
|
2870
2853
|
run: desktopScreenshot,
|
|
2871
2854
|
},
|
|
2872
2855
|
{
|
|
2873
2856
|
name: "desktop_click", safe: false,
|
|
2874
|
-
description: "Click
|
|
2857
|
+
description: "Click on the desktop via Chauffeur by coordinates (x, y), an accessibility element, or both; verifies the click landed.",
|
|
2875
2858
|
parameters: { type: "object", properties: {
|
|
2876
2859
|
description: { type: "string", description: "what you're clicking and why" },
|
|
2877
2860
|
x: { type: "number" }, y: { type: "number" },
|
|
2878
|
-
element: { type: "string", description: "accessibility element
|
|
2879
|
-
button: { type: "string", enum: ["left", "right"], description: "default
|
|
2880
|
-
verify: { type: "boolean", description: "
|
|
2861
|
+
element: { type: "string", description: "accessibility element" },
|
|
2862
|
+
button: { type: "string", enum: ["left", "right"], description: "default left" },
|
|
2863
|
+
verify: { type: "boolean", description: "default true" },
|
|
2881
2864
|
} },
|
|
2882
2865
|
run: desktopClick,
|
|
2883
2866
|
},
|
|
@@ -2891,12 +2874,12 @@ const TOOLS = [
|
|
|
2891
2874
|
},
|
|
2892
2875
|
{
|
|
2893
2876
|
name: "app_interact", safe: false,
|
|
2894
|
-
description: "High-level app
|
|
2877
|
+
description: "High-level app control via Chauffeur: launch an app, or find / click / type into / read an element.",
|
|
2895
2878
|
parameters: { type: "object", properties: {
|
|
2896
|
-
app: { type: "string", description: "
|
|
2879
|
+
app: { type: "string", description: "app name, e.g. 'Safari'" },
|
|
2897
2880
|
action: { type: "string", enum: ["launch", "find", "click", "type", "read"], description: "what to do" },
|
|
2898
|
-
element: { type: "string", description: "element
|
|
2899
|
-
text: { type: "string", description: "text
|
|
2881
|
+
element: { type: "string", description: "target element (click/find)" },
|
|
2882
|
+
text: { type: "string", description: "text for type" },
|
|
2900
2883
|
}, required: ["app", "action"] },
|
|
2901
2884
|
run: appInteract,
|
|
2902
2885
|
},
|
|
@@ -2911,17 +2894,16 @@ const TOOLS = [
|
|
|
2911
2894
|
},
|
|
2912
2895
|
{
|
|
2913
2896
|
name: "live_drive", safe: false,
|
|
2914
|
-
description: "
|
|
2915
|
-
"Each check is a labeled stage with === markers. Returns structured pass/fail. Use this for end-to-end UI verification.",
|
|
2897
|
+
description: "Live UI verification in the browser: open `url` and run labeled checks (screenshot, find, click, text); pass/fail per check.",
|
|
2916
2898
|
parameters: { type: "object", properties: {
|
|
2917
|
-
url: { type: "string", description: "URL to open
|
|
2899
|
+
url: { type: "string", description: "URL to open" },
|
|
2918
2900
|
checks: {
|
|
2919
2901
|
type: "array",
|
|
2920
2902
|
items: { type: "object", properties: {
|
|
2921
|
-
label: { type: "string", description: "check name
|
|
2903
|
+
label: { type: "string", description: "check name" },
|
|
2922
2904
|
action: { type: "string", enum: ["screenshot", "find", "click", "text"], description: "what to check" },
|
|
2923
|
-
selector: { type: "string", description: "CSS selector or text
|
|
2924
|
-
expect: { type: "string", description: "expected
|
|
2905
|
+
selector: { type: "string", description: "CSS selector or text" },
|
|
2906
|
+
expect: { type: "string", description: "text expected in the result" },
|
|
2925
2907
|
}, required: ["label", "action"] },
|
|
2926
2908
|
},
|
|
2927
2909
|
}, required: ["url", "checks"] },
|
|
@@ -3142,7 +3124,7 @@ export function toSchemas(reg = registry) {
|
|
|
3142
3124
|
function: { name: t.name, description: t.description, parameters: t.parameters },
|
|
3143
3125
|
}));
|
|
3144
3126
|
}
|
|
3145
|
-
const CATALOGUE_LIST_CAP =
|
|
3127
|
+
const CATALOGUE_LIST_CAP = 6000;
|
|
3146
3128
|
const MCP_NOTE_MAX = 12;
|
|
3147
3129
|
// Best-effort SYNCHRONOUS read of the owned-MCP registry (the name-keyed map loadMcpConfig consumes, from
|
|
3148
3130
|
// $KODE_MCP_CONFIG or ~/.axe/cli/backend/mcp_servers.json) so the catalogue names the servers actually
|
|
@@ -3176,42 +3158,41 @@ function ownedMcpNote() {
|
|
|
3176
3158
|
}
|
|
3177
3159
|
}
|
|
3178
3160
|
// A compact, SELF-MAINTAINING capability index for the system prompt. The per-call tool SCHEMAS
|
|
3179
|
-
// (toSchemas) already
|
|
3180
|
-
//
|
|
3181
|
-
//
|
|
3182
|
-
//
|
|
3183
|
-
//
|
|
3184
|
-
// (native + connected MCP tools) to include those too;
|
|
3185
|
-
// small-context model) skips the
|
|
3186
|
-
//
|
|
3161
|
+
// (toSchemas) already carry every tool's description and parameters, so this is only the MAP of the whole
|
|
3162
|
+
// surface: every native tool by NAME (declaration order, which is already grouped), plus the MCP layer, the
|
|
3163
|
+
// in-session /commands, the headless CLI modes, and the skills catalogue. Rendered from the LIVE registry so a
|
|
3164
|
+
// newly-added tool appears here automatically — "Operator aware of all its tools". It used to repeat a
|
|
3165
|
+
// 150-char description per tool (~15K chars, ~4K tokens of the cached prefix duplicating the schemas); names
|
|
3166
|
+
// alone keep the map at a tenth of that. Pass a merged map (native + connected MCP tools) to include those too;
|
|
3167
|
+
// `lean` (a small-context model) skips the name list, which is also char-capped for a large merged map. `deferred`
|
|
3168
|
+
// (the `deferredTools` flag) names the tools whose schemas are NOT attached: they are listed apart, reached through
|
|
3169
|
+
// tool_search / tool_call.
|
|
3187
3170
|
export function renderToolCatalogue(reg = registry, opts = {}) {
|
|
3188
|
-
const
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
return one;
|
|
3192
|
-
const cut = one.slice(0, 150);
|
|
3193
|
-
const sp = cut.lastIndexOf(" ");
|
|
3194
|
-
return (sp > 60 ? cut.slice(0, sp) : cut) + "…";
|
|
3195
|
-
};
|
|
3171
|
+
const deferNote = opts.deferred?.size
|
|
3172
|
+
? `\nDeferred tools (no schema attached): find one with \`tool_search\`, run it with \`tool_call\`.`
|
|
3173
|
+
: "";
|
|
3196
3174
|
let head;
|
|
3197
3175
|
if (opts.lean) {
|
|
3198
|
-
head = `Your tool schemas are attached to every request — they are the full list of what you can call; use a tool you HAVE, don't claim one you don't
|
|
3176
|
+
head = `Your tool schemas are attached to every request — they are the full list of what you can call; use a tool you HAVE, don't claim one you don't.` + deferNote;
|
|
3199
3177
|
}
|
|
3200
3178
|
else {
|
|
3201
3179
|
const tools = [...reg.values()];
|
|
3202
|
-
const
|
|
3180
|
+
const names = [];
|
|
3181
|
+
const later = [];
|
|
3203
3182
|
let used = 0;
|
|
3204
3183
|
for (const t of tools) {
|
|
3205
|
-
const
|
|
3206
|
-
if (used +
|
|
3184
|
+
const name = `\`${t.name}\``;
|
|
3185
|
+
if (used + name.length + 1 > CATALOGUE_LIST_CAP)
|
|
3207
3186
|
break;
|
|
3208
|
-
|
|
3209
|
-
used +=
|
|
3187
|
+
(opts.deferred?.has(t.name) ? later : names).push(name);
|
|
3188
|
+
used += name.length + 1;
|
|
3210
3189
|
}
|
|
3190
|
+
const listed = names.length + later.length;
|
|
3211
3191
|
head =
|
|
3212
3192
|
`You act through TOOLS, not prose. Your ${tools.length} native tools, each already callable this session` +
|
|
3213
|
-
(
|
|
3214
|
-
|
|
3193
|
+
(listed < tools.length ? ` (first ${listed} listed — the rest are in your attached tool schemas)` : "") +
|
|
3194
|
+
` — how to call each is in its attached schema:\n` + names.join(" ") +
|
|
3195
|
+
(later.length ? `${deferNote}\n` + later.join(" ") : "");
|
|
3215
3196
|
}
|
|
3216
3197
|
return (`\n\n## Your capabilities — the full surface (use a tool you HAVE; don't claim one you don't)\n` +
|
|
3217
3198
|
head +
|