@dougbots/avenor-pi 0.5.1 → 0.6.0

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.
Files changed (3) hide show
  1. package/README.md +3 -3
  2. package/dist/index.js +11 -10
  3. package/package.json +2 -2
package/README.md CHANGED
@@ -111,9 +111,9 @@ Available tools for LLM sub-agent management:
111
111
 
112
112
  | Tool | Description |
113
113
  |---|---|
114
- | `avenor_spawn` | Dispatch an agent run (blocking or fire-and-forget). Accepts `agent` (optional, maps to a named profile in `agents.json`), `model`, `prompt`, and `dir`. |
114
+ | `avenor_spawn` | Dispatch an agent run (blocking or fire-and-forget). Uses the `pi` backend by default; accepts `agent`, `model`, `prompt`, and `dir`. |
115
115
  | `avenor_status` | Get status of a run or all runs; use `view="lifecycle"` for compact progress and permission checks |
116
- | `avenor_result` | Wait for a run and return its bounded final output without transcript details |
116
+ | `avenor_result` | Wait for a run and return its complete final output without transcript details |
117
117
  | `avenor_inspect` | Review a bounded transcript, tool activity, permissions, and final output |
118
118
  | `avenor_answer_permission` | Answer a pending permission request |
119
119
  | `avenor_follow_up` | Resume a completed run with a follow-up message |
@@ -157,7 +157,7 @@ If you don't need a named profile, `model` alone is sufficient — no agent conf
157
157
  ```
158
158
  1. avenor_spawn → tool call shows live progress, blocks until done
159
159
  2. tool call returns → completion preview with status + session_id
160
- 3. avenor_result → retrieve the bounded final output when needed
160
+ 3. avenor_result → retrieve the complete final output when needed
161
161
  4. avenor_inspect → inspect transcript and tool details when needed
162
162
  5. avenor_follow_up → optionally iterate
163
163
  6. avenor_shutdown → clean up when finished
package/dist/index.js CHANGED
@@ -155,7 +155,7 @@ function helpText(state) {
155
155
  "home/end jump",
156
156
  "esc close"
157
157
  ];
158
- if (state.status && isPromptable(state.status, state.snapshot)) actions.unshift("enter send prompt", "ctrl-c cancel run");
158
+ if (state.status && isPromptable(state.status, state.snapshot)) actions.unshift("enter interrupt and send", "ctrl-c cancel run");
159
159
  else if (isFollowUpable(state.status, state.snapshot)) actions.unshift("enter follow up");
160
160
  return actions.join(" · ");
161
161
  }
@@ -319,12 +319,12 @@ var RunInspectorOverlay = class {
319
319
  const runtimeId = this.state.run.runtimeId ?? this.state.status?.runtime_id ?? this.state.snapshot.identity.runtime_id;
320
320
  if (this.state.status && isPromptable(this.state.status, this.state.snapshot) && runtimeId) {
321
321
  this.runAction(async () => {
322
- await this.deps.promptRun(this.state.run, runtimeId, text);
322
+ await this.deps.interruptAndPromptRun(this.state.run, runtimeId, text);
323
323
  this.state = {
324
324
  ...this.state,
325
- actionMessage: clipText(`Queued prompt: ${text}`, ACTION_STATUS_CHARS)
325
+ actionMessage: clipText(`Interrupted and sent: ${text}`, ACTION_STATUS_CHARS)
326
326
  };
327
- }, "sending prompt…");
327
+ }, "interrupting and sending…");
328
328
  return;
329
329
  }
330
330
  if (!isFollowUpable(this.state.status, this.state.snapshot)) return;
@@ -463,7 +463,7 @@ var RunInspectorOverlay = class {
463
463
  for (const line of body) lines.push(padLine(line, innerWidth));
464
464
  lines.push(horizontal);
465
465
  lines.push(...this.input.render(innerWidth).map((line) => truncateToWidth(line, innerWidth)));
466
- const promptHint = this.state.status && isPromptable(this.state.status, this.state.snapshot) ? "send prompt to running/waiting run" : isFollowUpable(this.state.status, this.state.snapshot) ? "start a follow-up run from this transcript" : "read-only view";
466
+ const promptHint = this.state.status && isPromptable(this.state.status, this.state.snapshot) ? "interrupt and send to running/waiting run" : isFollowUpable(this.state.status, this.state.snapshot) ? "start a follow-up run from this transcript" : "read-only view";
467
467
  lines.push(truncateToWidth(theme.fg("dim", `${promptHint} · ${helpText(this.state)}`), innerWidth));
468
468
  lines.push(horizontal);
469
469
  return lines.map((line) => truncateToWidth(line, innerWidth));
@@ -915,9 +915,9 @@ function createExtension(deps = defaultDeps) {
915
915
  await client.cancel(runtimeId);
916
916
  });
917
917
  },
918
- promptRun(run, runtimeId, text) {
918
+ interruptAndPromptRun(run, runtimeId, text) {
919
919
  return withClient(run, async (client) => {
920
- await client.prompt(runtimeId, text);
920
+ await client.interruptAndPrompt(runtimeId, text);
921
921
  });
922
922
  },
923
923
  followUpRun(run, text) {
@@ -1120,7 +1120,7 @@ function createExtension(deps = defaultDeps) {
1120
1120
  label: Type.Optional(Type.String({ description: "Human-readable label for the run" })),
1121
1121
  timeout: Type.Optional(Type.String({ description: "Timeout duration (e.g. 3600s)" })),
1122
1122
  model: Type.Optional(Type.String({ description: "Model override" })),
1123
- backend: Type.Optional(Type.String({ description: "Backend override" })),
1123
+ backend: Type.Optional(Type.String({ description: "Backend override (defaults to pi)" })),
1124
1124
  server_url: Type.Optional(Type.String({ description: "Backend server URL" })),
1125
1125
  supervisor_id: Type.Optional(Type.String({ description: "Reuse an existing supervisor by socket path" })),
1126
1126
  wait: Type.Optional(Type.Boolean({ description: "Block until complete (default true)" }))
@@ -1133,6 +1133,7 @@ function createExtension(deps = defaultDeps) {
1133
1133
  const wait = params.wait ?? true;
1134
1134
  const dir = params.dir ?? ctx.cwd;
1135
1135
  const label = params.label ?? `${params.agent}-${Date.now()}`;
1136
+ const backend = params.backend ?? "pi";
1136
1137
  const result = await deps.spawnTool({
1137
1138
  agent: params.agent,
1138
1139
  prompt: params.prompt,
@@ -1141,7 +1142,7 @@ function createExtension(deps = defaultDeps) {
1141
1142
  dir,
1142
1143
  timeout: params.timeout,
1143
1144
  model: params.model,
1144
- backend: params.backend,
1145
+ backend,
1145
1146
  serverUrl: params.server_url,
1146
1147
  supervisorId: params.supervisor_id
1147
1148
  });
@@ -1303,7 +1304,7 @@ function createExtension(deps = defaultDeps) {
1303
1304
  pi.registerTool({
1304
1305
  name: "avenor_result",
1305
1306
  label: "Avenor Result",
1306
- description: "Wait for a run to finish and return its bounded final output without transcript or event details.",
1307
+ description: "Wait for a run to finish and return its complete final output without transcript or event details.",
1307
1308
  parameters: Type.Object({
1308
1309
  run_id: Type.String({ description: "Run ID to await" }),
1309
1310
  wait: Type.Optional(Type.Boolean({ description: "Wait for a terminal result (default true)" })),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dougbots/avenor-pi",
3
- "version": "0.5.1",
3
+ "version": "0.6.0",
4
4
  "type": "module",
5
5
  "keywords": [
6
6
  "pi-package"
@@ -35,7 +35,7 @@
35
35
  "dev": "tsdown --watch"
36
36
  },
37
37
  "dependencies": {
38
- "@dougbots/avenor-core": "^0.5.1"
38
+ "@dougbots/avenor-core": "^0.6.0"
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@earendil-works/pi-coding-agent": "*",