diff options
Diffstat (limited to 'init.lua')
| -rw-r--r-- | init.lua | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -210,7 +210,7 @@ local w = subagents.workflows["workflow-1"] return w.status .. (w.result and ("\n" .. w.result) or "") ``` -Workflow fields are `id`, `status`, `result`, `error`, and `agents`. Agents are available by name or iteration and expose `name`, `status`, `output`, `error`, and `id`. Records are read-only. Workflow completion wakes you with its id; use another `subagents.lua` call to retrieve whichever outputs you need. +Workflow fields are `id`, `status`, `result`, `error`, and `agents`; `workflow:cancel()` requests cancellation of every running agent. Agents are available by name or iteration and expose `name`, `status`, `output`, `error`, and `id`; `agent:cancel()` requests cancellation of that agent. Fields are read-only, and cancellation returns true only while the target is running. Workflow completion wakes you with its id; use another `subagents.lua` call to retrieve whichever outputs you need. ]=] local function install_guidance(ext) @@ -349,11 +349,11 @@ local function activate() ext.register_tool { name = "subagents.lua", - description = "Run sandboxed Lua that starts background subagent workflows or inspects existing ones. `source` can call subagents.workflow(function(ctx) ... end), which returns a workflow id immediately, and can read immutable records from subagents.workflows. Optional `agents` define profiles available only to workflows started by this call.", + description = "Run sandboxed Lua that starts background subagent workflows or inspects existing ones. `source` can call subagents.workflow(function(ctx) ... end), which returns a workflow id immediately, inspect field-read-only records from subagents.workflows, and request cancellation through their cancel methods. Optional `agents` define profiles available only to workflows started by this call.", schema = { type = "object", properties = { - source = { type = "string", description = "Lua source that starts a workflow or inspects subagents.workflows." }, + source = { type = "string", description = "Lua source that starts a workflow, inspects subagents.workflows, or cancels its workflows and agents." }, agents = { type = "array", description = "Agent profiles available only to this workflow. Inline profiles shadow discovered profiles with the same name.", |
