@livx.cc/agentx 0.99.125 → 0.99.126

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.
@@ -322,8 +322,9 @@ type ModeTool = {
322
322
  declare function delegateWorkerFor(planner: string, worker?: string | false | null): string | undefined;
323
323
  /** The advisor model when advisor mode can run for this worker, else undefined. */
324
324
  declare function advisorFor(worker: string, advisor?: string | false | null): string | undefined;
325
- /** Refuse the planner's file-changing tools; a worker (any other `ctx.model`) runs them as usual. */
326
- declare function delegateTools<T extends ModeTool>(tools: T[], planner: string): T[];
325
+ /** Refuse the planner's file-changing tools; a worker (any other `ctx.model`) runs them as usual.
326
+ * `plannerMay(tool, args)`: a call the HOST lets the planner make itself (e.g. its private notes, not the build). */
327
+ declare function delegateTools<T extends ModeTool>(tools: T[], planner: string, plannerMay?: (tool: string, args: unknown) => boolean): T[];
327
328
  /** Appended to the PLANNER's system prompt only (workers inherit the host's base prompt). */
328
329
  declare function delegatePrompt(worker: string): string;
329
330
  /** Appended to the advised worker's system prompt. */
@@ -596,9 +597,12 @@ declare class AgentOptions {
596
597
  subagents: boolean;
597
598
  /** DELEGATE MODE: `model` plans, `worker` writes. The planner's Write/Edit/MultiEdit/ApplyEdits/bash/Shell are
598
599
  * refused at execution; Task/TaskBatch are on (maxDepth 1, children default to `worker`) and children get the
599
- * parent's `postToolUse` too. Off when the models are equal or either is cursor/*. Wins over `advisor`. */
600
+ * parent's `postToolUse` too. Off when the models are equal or either is cursor/*. Wins over `advisor`.
601
+ * `plannerMay(tool, args)`: a blocked call the planner may still make itself (the host's own carve-out, e.g. its
602
+ * private notes) — say so in the host prompt, the planner prompt says it cannot write. */
600
603
  delegate?: {
601
604
  worker: string;
605
+ plannerMay?: (tool: string, args: unknown) => boolean;
602
606
  };
603
607
  /** ADVISOR MODE: `model` does the work; an `Advise` tool asks `advisor.model` (≤`limit`, default 3) with only
604
608
  * the request + `snapshot()` (host state, optional) + the question. The first write waits for one consult. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@livx.cc/agentx",
3
- "version": "0.99.125",
3
+ "version": "0.99.126",
4
4
  "description": "Edge-native AI agent runtime — drives a virtual filesystem via any LLM (ai.libx.js). Same bytes run in node, browser, or edge.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",