@asyncify-hq/node@0.8.7
Patch Changes
-
07eb07c: Agents gain a kill-switch and a file format.
agents.pause(id)stops an agent answering right now without shutting the door on your customers: messages still land in the conversation exactly as they were sent, nothing is refused, and the transcript stays true — what stops is the answering (no model calls, no tools, no calls to your own handler). Each customer is told once that a person is taking over and their conversation moves to your team's human queue, because during an incident filling that queue is the point, not hiding it behind an error.agents.resume(id)puts the agent back on new messages while leaving threads a teammate already picked up with that teammate until they hand back. This is deliberately notupdate(id, { status: 'disabled' })—disabledis a hard off that refuses messages at the door, a pause keeps taking them, and the two are separate axes that can both be true at once, which is whyAgentgainspausedAt(a timestamp, so a post-mortem can read when) besidestatusrather than a third value inside it. Both calls are idempotent, since a double-pressed emergency button must never error, and neither mints a prompt version because a pause changes no config.agents.export(id)returns the whole agent as one JSON file — prompt, model, all six knobs, the budget and backstop numbers, tools with their guards, knowledge as references and workflow keys as requirements — and never a secret of any kind, by construction, so it is safe to commit and read in a diff. The body is the file, with no envelope, so whatexportreturns goes straight back intoagents.importPreview(file)andagents.import(file, { llmApiKey? }). Importing is two steps because "what changes?" is a real question and a green checkmark is not an answer to it: the preview is field-level (changes,toolChanges,mode: 'create' | 'update',missingWorkflows,missingKnowledge,needsLlmKey) and it validates everything the apply validates — through the same schemas the ordinary save routes use — so "preview clean, apply 400" cannot happen. An import deletes nothing: a knob the file does not mention is left as it is, and a tool on the agent but absent from the file is kept, which is whatremovalPolicy: 'kept'states out loud so no client can rendertoolChanges.removedas a threat — an import must not destroy what the file's author never knew about. Applying an update rides the normal save path, so a changed prompt or model mints a version like any other save;status,pausedAt, the canary and version history are never touched. Because keys never travel, creating a managed agent from a file takes the target environment's own key asllmApiKey, a file'sllmBaseUrlonly takes effect alongside a fresh key (so a config file can never repoint a stored credential at another host), and each newly created tool's signing secret is returned exactly once intools.created. New types:AgentConfigFile,AgentConfigTool,AgentConfigKnowledge,AgentConfigChange,AgentConfigToolChanges,AgentImportPreview,AgentImportResult.