@nexrall/code-core 1.4.67 → 1.4.68

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.
@@ -72,6 +72,33 @@ export declare function claimAgentForResume(id: string): boolean;
72
72
  export declare function releaseAgentForResume(id: string): void;
73
73
  /** Newest first — the order a "which agents can I resume?" list wants. */
74
74
  export declare function listAgents(): StoredAgent[];
75
+ /**
76
+ * One persisted sub-agent transcript, summarised: what ran, when, and how big it is.
77
+ * Deliberately WITHOUT the messages — see listPersistedAgents.
78
+ */
79
+ export interface PersistedAgentSummary {
80
+ id: string;
81
+ agentName: string | null;
82
+ description: string;
83
+ createdAt: number;
84
+ updatedAt: number;
85
+ /** Message count, so a listing can show how much context the transcript holds. */
86
+ messages: number;
87
+ bytes: number;
88
+ }
89
+ /**
90
+ * Summarise the transcripts written by enableAgentTranscriptPersistence().
91
+ *
92
+ * This is a READ-ONLY listing for a DIFFERENT process than the one that wrote them (the
93
+ * `nex agents` shell command): every session that enabled persistence writes here, so the
94
+ * view does not need any session to be awake. Message bodies are deliberately not returned
95
+ * — a row needs a description and an age, and loading every transcript would pull
96
+ * megabytes into memory for a table.
97
+ *
98
+ * Malformed or half-written files are SKIPPED, never thrown over: one bad file (a crash
99
+ * mid-write, a format from an older version) must not blank the whole view.
100
+ */
101
+ export declare function listPersistedAgents(dir?: string): PersistedAgentSummary[];
75
102
  /** Test seam. Not exported through index.ts's public surface by intent. */
76
103
  export declare function _resetAgentRegistry(): void;
77
104
  export declare const _limits: {
@@ -1 +1 @@
1
- {"version":3,"file":"agentRegistry.d.ts","sourceRoot":"","sources":["../../src/agent/agentRegistry.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AA8CxC,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX;;;;;;OAMG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB;;;;;;;;;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EAAE,OAAO,EAAE,EAAE,KAAK,SAAS,EAAE,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAiBtG;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAU5D;AAMD,6EAA6E;AAC7E,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAIvD;AACD,wBAAgB,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,IAAI,CAAuB;AAE9E,0EAA0E;AAC1E,wBAAgB,UAAU,IAAI,WAAW,EAAE,CAE1C;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,kFAAkF;IAClF,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,qBAAqB,EAAE,CAuBzE;AAED,2EAA2E;AAC3E,wBAAgB,mBAAmB,IAAI,IAAI,CAI1C;AAED,eAAO,MAAM,OAAO;;;CAAkC,CAAC"}
@@ -43,6 +43,7 @@ exports.getAgent = getAgent;
43
43
  exports.claimAgentForResume = claimAgentForResume;
44
44
  exports.releaseAgentForResume = releaseAgentForResume;
45
45
  exports.listAgents = listAgents;
46
+ exports.listPersistedAgents = listPersistedAgents;
46
47
  exports._resetAgentRegistry = _resetAgentRegistry;
47
48
  const node_crypto_1 = require("node:crypto");
48
49
  const fs = __importStar(require("node:fs"));
@@ -279,6 +280,50 @@ function releaseAgentForResume(id) { _inUse.delete(id); }
279
280
  function listAgents() {
280
281
  return [..._agents.values()].sort((a, b) => b.seq - a.seq);
281
282
  }
283
+ /**
284
+ * Summarise the transcripts written by enableAgentTranscriptPersistence().
285
+ *
286
+ * This is a READ-ONLY listing for a DIFFERENT process than the one that wrote them (the
287
+ * `nex agents` shell command): every session that enabled persistence writes here, so the
288
+ * view does not need any session to be awake. Message bodies are deliberately not returned
289
+ * — a row needs a description and an age, and loading every transcript would pull
290
+ * megabytes into memory for a table.
291
+ *
292
+ * Malformed or half-written files are SKIPPED, never thrown over: one bad file (a crash
293
+ * mid-write, a format from an older version) must not blank the whole view.
294
+ */
295
+ function listPersistedAgents(dir) {
296
+ const root = dir ?? process.env.NEXRALL_AGENT_TRANSCRIPTS_DIR ?? path.join(os.homedir(), '.nexrall', 'agent-transcripts');
297
+ let names;
298
+ try {
299
+ names = fs.readdirSync(root).filter((f) => f.endsWith('.json'));
300
+ }
301
+ catch {
302
+ return [];
303
+ }
304
+ const out = [];
305
+ for (const name of names) {
306
+ try {
307
+ const a = JSON.parse(fs.readFileSync(path.join(root, name), 'utf-8'));
308
+ // The same id shape persistedPath() writes — anything else is not ours to show.
309
+ if (!a || typeof a.id !== 'string' || !/^agent_\d+_[0-9a-f]{8}$/.test(a.id))
310
+ continue;
311
+ if (!Array.isArray(a.messages))
312
+ continue;
313
+ out.push({
314
+ id: a.id,
315
+ agentName: typeof a.agentName === 'string' ? a.agentName : null,
316
+ description: typeof a.description === 'string' ? a.description : '',
317
+ createdAt: typeof a.createdAt === 'number' ? a.createdAt : 0,
318
+ updatedAt: typeof a.updatedAt === 'number' ? a.updatedAt : 0,
319
+ messages: a.messages.length,
320
+ bytes: typeof a.bytes === 'number' ? a.bytes : 0,
321
+ });
322
+ }
323
+ catch { /* one unreadable transcript must not blank the list */ }
324
+ }
325
+ return out.sort((x, y) => y.updatedAt - x.updatedAt);
326
+ }
282
327
  /** Test seam. Not exported through index.ts's public surface by intent. */
283
328
  function _resetAgentRegistry() {
284
329
  _agents.clear();
@@ -54,6 +54,13 @@ export interface HookDef {
54
54
  * original type.
55
55
  */
56
56
  input?: Record<string, unknown>;
57
+ /**
58
+ * Which plugin this handler came from (stamped by the loader when it merges a
59
+ * plugin's hooks.json — see pluginHooks in ../plugins/index). Its processes are
60
+ * then started with NEXRALL_PLUGIN_DATA pointing at that plugin's OWN persistent
61
+ * data directory, the one place it may keep files across plugin updates.
62
+ */
63
+ plugin?: string;
57
64
  }
58
65
  export interface HookEntry {
59
66
  matcher?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/agent/hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA0C,UAAU,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAGjH,OAAO,EAAqB,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AASlE,MAAM,WAAW,OAAO;IACtB,IAAI,EAAE,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,GAAG,UAAU,CAAC;IAC3D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,4EAA4E;IAC5E,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,oFAAoF;IACpF,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACjC,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B;;;;;;;OAOG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,gFAAgF;IAChF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;;OAKG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,wFAAwF;IACxF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2DAA2D;IAC3D,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0FAA0F;IAC1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MAAM,CAAC,CAOjB;AAED,mGAAmG;AACnG,wBAAgB,qBAAqB,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,SAAsB,GAAG,IAAI,CAMxG;AAED,iHAAiH;AACjH,uFAAuF;AACvF,wBAAsB,yBAAyB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,kBAAkB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAO7H;AAED,wBAAsB,wBAAwB,CAAC,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,mBAAmB,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAO7H"}
@@ -64,6 +64,7 @@ const executor_1 = require("../tools/executor");
64
64
  const agentTypes_1 = require("./agentTypes");
65
65
  const rules_1 = require("../permissions/rules");
66
66
  const index_1 = require("../plugins/index");
67
+ const data_1 = require("../plugins/data");
67
68
  const fs = __importStar(require("fs"));
68
69
  const path = __importStar(require("path"));
69
70
  const child_process_1 = require("child_process");
@@ -182,8 +183,10 @@ const _hookOnceDone = new Set();
182
183
  function hookIdentity(event, hook, matcher, dir) {
183
184
  const body = hook.command ?? hook.url ?? hook.prompt ?? `${hook.server ?? ''}__${hook.tool ?? ''}`;
184
185
  // `dir` is part of it: ONE process can serve several projects (worktrees, /add-dir), and
185
- // "once" must not leak from one project into another.
186
- return `${dir ?? ''}|${event}|${matcher ?? ''}|${body}`;
186
+ // "once" must not leak from one project into another. Same reasoning for `plugin`: two
187
+ // plugins may ship the same relative command ("node ./check.js"), and one plugin's run
188
+ // must not silence the other's.
189
+ return `${dir ?? ''}|${event}|${matcher ?? ''}|${hook.plugin ?? ''}|${body}`;
187
190
  }
188
191
  /** Forget which `once` hooks have run (a new session: /clear, a fresh run). */
189
192
  function resetHookOnceState() { _hookOnceDone.clear(); }
@@ -572,6 +575,14 @@ function mcpHookInput(input, payload) {
572
575
  }
573
576
  /** One handler, whichever transport it declares. `event` labels its lifecycle records. */
574
577
  async function runHookHandler(hook, payload, opts) {
578
+ // A hook shipped by a plugin runs with NEXRALL_PLUGIN_DATA pointing at that plugin's
579
+ // persistent data directory (created on first reference). Done HERE rather than at each
580
+ // call site because there are ten of them and every one spawns the same way — a site that
581
+ // forgot would silently break the plugin's only place to keep state. HTTP and model
582
+ // handlers ignore the variable; passing it costs nothing.
583
+ const env = hook.plugin
584
+ ? { ...(opts.env ?? process.env), NEXRALL_PLUGIN_DATA: (0, data_1.ensurePluginDataDir)(hook.plugin) }
585
+ : opts.env;
575
586
  return runWithHookEvents(hook, opts.event ?? 'hook', (onData) => {
576
587
  if (hook.type === 'http')
577
588
  return httpHook(hook, payload, opts.timeoutMs ?? 60000);
@@ -580,7 +591,7 @@ async function runHookHandler(hook, payload, opts) {
580
591
  if (hook.type === 'prompt' || hook.type === 'agent') {
581
592
  return promptHook(hook, payload, { ...opts, timeoutMs: opts.timeoutMs ?? 60000, envCtx: opts.hookEnv });
582
593
  }
583
- return spawnHook(String(hook.command ?? ''), { cwd: opts.cwd, timeout: opts.timeoutMs, input: payload, env: opts.env, onData });
594
+ return spawnHook(String(hook.command ?? ''), { cwd: opts.cwd, timeout: opts.timeoutMs, input: payload, env, onData });
584
595
  });
585
596
  }
586
597
  // ─── Prompt / agent hooks ──────────────────────────────────────────────────────
@@ -12,6 +12,8 @@ export type { AgentMemoryBinding, StopReason } from './iterationPolicy';
12
12
  export { lockPathsFor } from './fileLocks';
13
13
  export { resolveMaxConcurrentSubtasks, resolveMaxSubagentsPerSession, createLimiter, _resetSubTaskLimiter, resetSessionSubAgentBudget, _sessionSubAgentCount } from './subAgentBudget';
14
14
  export { resolveMaxSubagentDepth, noSpawnReason, intersectAllowlists, canSpawnSubAgents, resolveSubtaskTimeoutMs, ToolNotAllowedError, extractSubTaskText, capSubTaskText, summariseSubTaskProgress, lastToolResults } from './subTaskSupport';
15
+ import { type ForkContext } from './subTask';
16
+ export type { ForkContext };
15
17
  /**
16
18
  * Dispatch one `task` (sub-agent) call — the exact same path the `task` tool's
17
19
  * `runAgentLoop` switch-case uses (session-budget claim, per-depth concurrency
@@ -28,6 +30,32 @@ export { resolveMaxSubagentDepth, noSpawnReason, intersectAllowlists, canSpawnSu
28
30
  */
29
31
  export declare function dispatchSubAgent(input: Record<string, unknown>, options: AgentLoopOptions, agentTypes: AgentType[]): Promise<ToolResult>;
30
32
  export declare function dispatchBackgroundSubAgent(input: Record<string, unknown>, options: AgentLoopOptions, agentTypes: AgentType[], hub: BackgroundAgentHub): ToolResult;
33
+ /**
34
+ * `/subtask` — fork the CURRENT conversation into a background agent.
35
+ *
36
+ * The difference from `dispatchBackgroundSubAgent` above is the starting history: that one
37
+ * hands the child a self-contained prompt (fresh context, described work, `task` tool
38
+ * semantics), whereas this one COPIES the caller's transcript in and appends the user's
39
+ * instruction to it. A user who has spent a conversation narrowing down a problem should not
40
+ * have to write a brief that re-states it — and a child that re-reads everything to catch up
41
+ * pays for the same context twice.
42
+ *
43
+ * Returns as soon as the child is started (the child runs detached, exactly like a
44
+ * background `task`): the caller gets the id and the description to show, and the report
45
+ * arrives later through the hub's notifications. Never `ToolResult`: nothing here is a tool
46
+ * result for a model to read, so the wording lives with whoever renders it.
47
+ *
48
+ * Permission policy is the shared background policy — the child cannot ask the user
49
+ * anything, because the user is not watching it.
50
+ */
51
+ export declare function dispatchForkedSubAgent(conversation: Message[], prompt: string, options: AgentLoopOptions, agentTypes: AgentType[], hub: BackgroundAgentHub): {
52
+ id: string;
53
+ description: string;
54
+ agentType: string;
55
+ messages: number;
56
+ } | {
57
+ error: string;
58
+ };
31
59
  export declare function runAgentLoop(initialMessages: Message[], options: AgentLoopOptions): Promise<Message[]>;
32
60
  /**
33
61
  * Cut a history back to the last point the API will accept as a resumable
@@ -1 +1 @@
1
- {"version":3,"file":"loop.d.ts","sourceRoot":"","sources":["../../src/agent/loop.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EAKP,UAAU,EACV,gBAAg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,CAwD9F;AAID,wBAAsB,YAAY,CAChC,eAAe,EAAE,OAAO,EAAE,EAC1B,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,OAAO,EAAE,CAAC,CA6/CpB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE,CAqCtE"}
@@ -4,6 +4,7 @@ exports.resolveMaxIterations = exports.stopReasonNotice = exports.executeAgentMe
4
4
  exports.lastToolResults = exports.summariseSubTaskProgress = exports.capSubTaskText = exports.extractSubTaskText = exports.ToolNotAllowedError = exports.resolveSubtaskTimeoutMs = exports.canSpawnSubAgents = exports.intersectAllowlists = exports.noSpawnReason = exports.resolveMaxSubagentDepth = exports._sessionSubAgentCount = exports.resetSessionSubAgentBudget = exports._resetSubTaskLimiter = exports.createLimiter = exports.resolveMaxSubagentsPerSession = exports.resolveMaxConcurrentSubtasks = exports.lockPathsFor = void 0;
5
5
  exports.dispatchSubAgent = dispatchSubAgent;
6
6
  exports.dispatchBackgroundSubAgent = dispatchBackgroundSubAgent;
7
+ exports.dispatchForkedSubAgent = dispatchForkedSubAgent;
7
8
  exports.runAgentLoop = runAgentLoop;
8
9
  exports.trimToResumableBoundary = trimToResumableBoundary;
9
10
  const readDedupe_1 = require("./readDedupe");
@@ -119,7 +120,7 @@ Object.defineProperty(exports, "lastToolResults", { enumerable: true, get: funct
119
120
  const subTask_1 = require("./subTask");
120
121
  const _sessionStarted = new Set();
121
122
  // runSubTask lives in subTask.ts and never imports this file: the recursive entry point is injected.
122
- const runSubTask = (input, options, agentTypes, started) => (0, subTask_1.runSubTask)(input, options, agentTypes, started, runAgentLoop);
123
+ const runSubTask = (input, options, agentTypes, started, fork) => (0, subTask_1.runSubTask)(input, options, agentTypes, started, runAgentLoop, fork);
123
124
  /**
124
125
  * Dispatch one `task` (sub-agent) call — the exact same path the `task` tool's
125
126
  * `runAgentLoop` switch-case uses (session-budget claim, per-depth concurrency
@@ -203,15 +204,19 @@ async function taskHookVeto(entries, event, input, options, extra = {}) {
203
204
  return null;
204
205
  }
205
206
  }
206
- function dispatchBackgroundSubAgent(input, options, agentTypes, hub) {
207
- const overBudget = (0, subAgentBudget_1.claimSessionSubAgentSlot)(options.workDir, options.onNotice ?? options.onText, options.sessionId);
208
- if (overBudget)
209
- return { error: overBudget };
210
- const agentType = (typeof input.subagent_type === 'string' && input.subagent_type) || 'general-purpose';
211
- const description = (typeof input.description === 'string' && input.description.trim())
212
- || String(input.prompt ?? '').trim().slice(0, 60) || agentType;
213
- const mode = (0, modePolicy_1.parseMode)(options.mode);
214
- const backgroundPermission = async (req) => {
207
+ /**
208
+ * What a sub-agent that runs WITHOUT the user at the keyboard is allowed to do: only what the
209
+ * project's rules or the current mode already pre-approve.
210
+ *
211
+ * Shared by `task(run_in_background: true)` and `/subtask` so the two cannot drift — this is
212
+ * the whole permission story for a detached agent, and a second hand-written copy is exactly
213
+ * how one of them would end up slightly more permissive than the other.
214
+ *
215
+ * A refusal carries the reason AND the instruction, because the child reads it: it must stop
216
+ * asking and report the step as needing the main agent, not burn its budget retrying.
217
+ */
218
+ function backgroundPermissionPolicy(options, mode) {
219
+ return async (req) => {
215
220
  const rule = (0, rules_1.evaluatePermission)((0, rules_1.loadSettings)(options.workDir).permissions, req.tool, req.input, options.workDir);
216
221
  if (rule === 'deny')
217
222
  throw new subTaskSupport_1.ToolNotAllowedError(`\`${req.tool}\` is denied by a permission rule in this project.`);
@@ -224,6 +229,16 @@ function dispatchBackgroundSubAgent(input, options, agentTypes, hub) {
224
229
  `current mode (${mode}). Do not retry it: finish what you can without it and say in your report that ` +
225
230
  'this step needs the main agent (or the user) to run it.');
226
231
  };
232
+ }
233
+ function dispatchBackgroundSubAgent(input, options, agentTypes, hub) {
234
+ const overBudget = (0, subAgentBudget_1.claimSessionSubAgentSlot)(options.workDir, options.onNotice ?? options.onText, options.sessionId);
235
+ if (overBudget)
236
+ return { error: overBudget };
237
+ const agentType = (typeof input.subagent_type === 'string' && input.subagent_type) || 'general-purpose';
238
+ const description = (typeof input.description === 'string' && input.description.trim())
239
+ || String(input.prompt ?? '').trim().slice(0, 60) || agentType;
240
+ const mode = (0, modePolicy_1.parseMode)(options.mode);
241
+ const backgroundPermission = backgroundPermissionPolicy(options, mode);
227
242
  const started = hub.start({ description, agentType }, async ({ abort, onToolUse }) => {
228
243
  const didStart = { value: false };
229
244
  try {
@@ -261,6 +276,74 @@ function dispatchBackgroundSubAgent(input, options, agentTypes, hub) {
261
276
  'else needs doing now.',
262
277
  };
263
278
  }
279
+ /**
280
+ * `/subtask` — fork the CURRENT conversation into a background agent.
281
+ *
282
+ * The difference from `dispatchBackgroundSubAgent` above is the starting history: that one
283
+ * hands the child a self-contained prompt (fresh context, described work, `task` tool
284
+ * semantics), whereas this one COPIES the caller's transcript in and appends the user's
285
+ * instruction to it. A user who has spent a conversation narrowing down a problem should not
286
+ * have to write a brief that re-states it — and a child that re-reads everything to catch up
287
+ * pays for the same context twice.
288
+ *
289
+ * Returns as soon as the child is started (the child runs detached, exactly like a
290
+ * background `task`): the caller gets the id and the description to show, and the report
291
+ * arrives later through the hub's notifications. Never `ToolResult`: nothing here is a tool
292
+ * result for a model to read, so the wording lives with whoever renders it.
293
+ *
294
+ * Permission policy is the shared background policy — the child cannot ask the user
295
+ * anything, because the user is not watching it.
296
+ */
297
+ function dispatchForkedSubAgent(conversation, prompt, options, agentTypes, hub) {
298
+ const overBudget = (0, subAgentBudget_1.claimSessionSubAgentSlot)(options.workDir, options.onNotice ?? options.onText, options.sessionId);
299
+ // The shared guard's message is addressed to the MODEL ("do the remaining work directly,
300
+ // and say in your final message…"). `/subtask` is typed by a human, so restate the same
301
+ // refusal for the person who can act on it — model-facing wording is nonsense on a
302
+ // terminal. (The "raise maxSubagentsPerSession" notice fires separately, through onNotice,
303
+ // the first time the guard trips.)
304
+ if (overBudget) {
305
+ return {
306
+ error: 'This session has already spent its sub-agent budget, and /subtask spawns an agent like any ' +
307
+ 'other delegation — so the same runaway guard refuses it. Raise "maxSubagentsPerSession" in ' +
308
+ '.nexrall/settings.json, or start a new session (the budget is per session, not per day).',
309
+ };
310
+ }
311
+ const description = prompt.trim().slice(0, 60) || 'forked task';
312
+ const agentType = 'general-purpose';
313
+ const mode = (0, modePolicy_1.parseMode)(options.mode);
314
+ const backgroundPermission = backgroundPermissionPolicy(options, mode);
315
+ const started = hub.start({ description, agentType }, async ({ abort, onToolUse }) => {
316
+ const didStart = { value: false };
317
+ try {
318
+ return await runSubTask({ prompt, description, subagent_type: agentType }, {
319
+ ...options,
320
+ abortSignal: abort,
321
+ backgroundAgents: undefined,
322
+ requestPermission: backgroundPermission,
323
+ onText: () => { },
324
+ onNotice: () => { },
325
+ onToolUse: (name) => onToolUse(name),
326
+ onToolResult: () => { },
327
+ onToolStreamChunk: undefined,
328
+ onThinking: undefined,
329
+ onThinkingDelta: undefined,
330
+ onThinkingProgress: undefined,
331
+ onStreamRestart: undefined,
332
+ onRetry: undefined,
333
+ onRetryResolved: undefined,
334
+ }, agentTypes, didStart, { messages: conversation });
335
+ }
336
+ finally {
337
+ if (!didStart.value)
338
+ (0, subAgentBudget_1.refundSessionSubAgentSlot)(options.sessionId);
339
+ }
340
+ });
341
+ if ('error' in started) {
342
+ (0, subAgentBudget_1.refundSessionSubAgentSlot)(options.sessionId);
343
+ return { error: started.error };
344
+ }
345
+ return { id: started.id, description, agentType, messages: conversation.length };
346
+ }
264
347
  // ─── Agent Loop ───────────────────────────────────────────────────────────────
265
348
  async function runAgentLoop(initialMessages, options) {
266
349
  const messages = [...initialMessages];
@@ -1,6 +1,15 @@
1
1
  import type { Message, ToolResult, AgentLoopOptions } from '../types';
2
2
  import { type AgentType } from './agentTypes';
3
+ /**
4
+ * A conversation to FORK into the sub-agent (the `/subtask` command) instead of running it
5
+ * with a fresh, isolated context. The parent's transcript is copied in as the child's
6
+ * opening history, so it starts out knowing everything the main agent knows.
7
+ */
8
+ export interface ForkContext {
9
+ /** The conversation so far, as the caller's live array — copied, never aliased. */
10
+ messages: Message[];
11
+ }
3
12
  export declare function runSubTask(input: Record<string, unknown>, options: AgentLoopOptions, agentTypes: AgentType[], started: {
4
13
  value: boolean;
5
- } | undefined, runChild: (messages: Message[], options: AgentLoopOptions) => Promise<Message[]>): Promise<ToolResult>;
14
+ } | undefined, runChild: (messages: Message[], options: AgentLoopOptions) => Promise<Message[]>, fork?: ForkContext): Promise<ToolResult>;
6
15
  //# sourceMappingURL=subTask.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"subTask.d.ts","sourceRoot":"","sources":["../../src/agent/subTask.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAiB,MAAM,UAAU,CAAC;AAGrF,OAAO,EAA6C,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAezF,wBAAsB,UAAU,CAC9B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,OAAO,EAAE,gBAAgB,EACzB,UAAU,EAAE,SAAS,EAAE,EAQvB,OAAO,EAAE;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,EAEvC,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,GAC/E,OAAO,CAAC,UAAU,CAAC,CAsuBrB"}
1
+ {"version":3,"file":"subTask.d.ts","sourceRoot":"","sources":["../../src/agent/subTask.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAiB,MAAM,UAAU,CAAC;AAGrF,OAAO,EAA6C,KAAK,SAAS,EAAE,MAAM,cAAc,CAAC;AAezF;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,mFAAmF;IACnF,QAAQ,EAAE,OAAO,EAAE,CAAC;CACrB;AAED,wBAAsB,UAAU,CAC9B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC9B,OAAO,EAAE,gBAAgB,EACzB,UAAU,EAAE,SAAS,EAAE,EAQvB,OAAO,EAAE;IAAE,KAAK,EAAE,OAAO,CAAA;CAAE,GAAG,SAAS,EAEvC,QAAQ,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,OAAO,EAAE,gBAAgB,KAAK,OAAO,CAAC,OAAO,EAAE,CAAC,EAIhF,IAAI,CAAC,EAAE,WAAW,GACjB,OAAO,CAAC,UAAU,CAAC,CAmvBrB"}
@@ -24,7 +24,11 @@ async function runSubTask(input, options, agentTypes,
24
24
  // point of no return cannot go stale, and a path added later is a non-start by default.
25
25
  started,
26
26
  // Seam: the recursive entry point (loop.ts's runAgentLoop), injected so this module never imports loop.ts.
27
- runChild) {
27
+ runChild,
28
+ // Set by `/subtask` (see dispatchForkedSubAgent): run this sub-agent as a FORK of the
29
+ // caller's conversation instead of a fresh delegate. Mutually exclusive with a resume —
30
+ // the fork IS the history, so `resume_agent_id` in `input` is ignored rather than merged.
31
+ fork) {
28
32
  const prompt = typeof input.prompt === 'string' ? input.prompt.trim() : '';
29
33
  if (!prompt)
30
34
  return { error: 'task tool requires a non-empty prompt' };
@@ -63,7 +67,7 @@ runChild) {
63
67
  // still resume it, with the deny rule looking like it was applied. Re-deriving
64
68
  // the name from storage also stops a mismatched `subagent_type` from being
65
69
  // used to launder a denied agent under an allowed name.
66
- const resumeId = typeof input.resume_agent_id === 'string' ? input.resume_agent_id.trim() : '';
70
+ const resumeId = fork ? '' : (typeof input.resume_agent_id === 'string' ? input.resume_agent_id.trim() : '');
67
71
  const resumed = resumeId ? (0, agentRegistry_1.getAgent)(resumeId) : undefined;
68
72
  // OWNERSHIP, in addition to the deny-rule re-authorisation below.
69
73
  //
@@ -191,7 +195,7 @@ runChild) {
191
195
  // tool enforcement never depended on prompt order (see the allowlist below).
192
196
  const subNexrallMd = [
193
197
  inheritedMd,
194
- subTaskSupport_1.SUBAGENT_PREAMBLE,
198
+ fork ? subTaskSupport_1.FORKED_SUBAGENT_PREAMBLE : subTaskSupport_1.SUBAGENT_PREAMBLE,
195
199
  agent ? `# Sub-agent role: ${agent.name}\n${agent.prompt}` : '',
196
200
  preloadedSkills,
197
201
  agentMemoryNotes,
@@ -329,9 +333,22 @@ runChild) {
329
333
  // this, "now also check the auth path" means re-describing the entire job and
330
334
  // re-reading everything — the most common and most expensive kind of waste in
331
335
  // a delegated workflow.
332
- const subMessages = resumed
333
- ? [...resumed.messages, { role: 'user', content: [{ type: 'text', text: prompt }] }]
334
- : [{ role: 'user', content: [{ type: 'text', text: prompt }] }];
336
+ // ── Fork: the parent's transcript becomes this sub-agent's history ──────────
337
+ //
338
+ // Deep-copied, not aliased. The caller hands us its LIVE array (the CLI keeps appending to
339
+ // `messages` while the fork runs) and the child's loop edits messages in place (pruning
340
+ // oversized tool results, replacing a compacted turn's content). Sharing objects would let
341
+ // the child rewrite the parent's transcript — the user's next turn would then send bytes
342
+ // that no longer match what is on their screen, and `/rewind`/checkpoints index into it.
343
+ // A JSON round-trip is exact here: Message is plain data (role, content blocks, stopReason).
344
+ const forkHistory = fork
345
+ ? JSON.parse(JSON.stringify(fork.messages))
346
+ : [];
347
+ const subMessages = fork
348
+ ? [...forkHistory, { role: 'user', content: [{ type: 'text', text: prompt }] }]
349
+ : resumed
350
+ ? [...resumed.messages, { role: 'user', content: [{ type: 'text', text: prompt }] }]
351
+ : [{ role: 'user', content: [{ type: 'text', text: prompt }] }];
335
352
  // A dedicated abort signal for this sub-agent, distinct from the parent's own
336
353
  // options.abortSignal (user hit Ctrl+C). Set to true either when the parent
337
354
  // aborts OR when the stall timeout below fires, whichever happens first —
@@ -151,6 +151,17 @@ export declare const ABNORMAL_SUBAGENT_STOPS: Set<string>;
151
151
  * "you are a sub-agent; your final message is the report" contract.
152
152
  */
153
153
  export declare const SUBAGENT_PREAMBLE: string;
154
+ /**
155
+ * The preamble for a FORKED sub-agent (`/subtask`): it was started by the USER from this
156
+ * conversation and inherits the whole transcript, so SUBAGENT_PREAMBLE's "you cannot see
157
+ * its conversation with the user — only the task you were given" would be a lie that
158
+ * makes it re-derive everything it can already read.
159
+ *
160
+ * What still holds is the part that made the original contract work: nobody is watching
161
+ * it live, nothing it writes is seen until it finishes, it cannot ask a question, and its
162
+ * final message is the entire result.
163
+ */
164
+ export declare const FORKED_SUBAGENT_PREAMBLE: string;
154
165
  export declare function formatTokenCount(n: number): string;
155
166
  export declare function formatElapsed(ms: number): string;
156
167
  //# sourceMappingURL=subTaskSupport.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"subTaskSupport.d.ts","sourceRoot":"","sources":["../../src/agent/subTaskSupport.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAmCpD;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,MAAM,CAOzF;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,OAAO,GAAG,QAAQ,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAe9E;AAED;;;;;;;;;;;;;;;GAeG;AACH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,mBAAmB,CACjC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,EACvB,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,SAAS,GAC9B,GAAG,CAAC,MAAM,CAAC,GAAG,IAAI,CAIpB;AAED,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EACb,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,CAAC,EAC1B,KAAK,GAAE,MAA+B,GACrC,OAAO,CAMT;AAaD;;;;;;;;;;GAUG;AACH,wBAAgB,uBAAuB,CAAC,WAAW,EAAE,MAAM,CAAC,M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6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.SUBAGENT_PREAMBLE = exports.ABNORMAL_SUBAGENT_STOPS = exports.DEFAULT_SUBAGENT_MAX_TURNS = exports.STOP_TIMEOUT_RESULT = exports.HARD_STOPPED = exports.ToolNotAllowedError = void 0;
3
+ exports.FORKED_SUBAGENT_PREAMBLE = exports.SUBAGENT_PREAMBLE = exports.ABNORMAL_SUBAGENT_STOPS = exports.DEFAULT_SUBAGENT_MAX_TURNS = exports.STOP_TIMEOUT_RESULT = exports.HARD_STOPPED = exports.ToolNotAllowedError = void 0;
4
4
  exports.resolveMaxSubagentDepth = resolveMaxSubagentDepth;
5
5
  exports.noSpawnReason = noSpawnReason;
6
6
  exports.intersectAllowlists = intersectAllowlists;
@@ -399,6 +399,22 @@ exports.SUBAGENT_PREAMBLE = [
399
399
  'The main agent started you for ONE delegated task. You cannot see its conversation with the user — only the task you were given — and you cannot ask the user anything: if something is ambiguous, make the most reasonable assumption and state it.',
400
400
  'Your FINAL message is the only thing returned to the main agent, and the user does not see it directly. Make it a concise, self-contained report: what you found or changed (with file paths and line numbers), what you verified and how, and anything left undone or uncertain. Do not pad it, and do not paste whole files — cite locations instead.',
401
401
  ].join('\n');
402
+ /**
403
+ * The preamble for a FORKED sub-agent (`/subtask`): it was started by the USER from this
404
+ * conversation and inherits the whole transcript, so SUBAGENT_PREAMBLE's "you cannot see
405
+ * its conversation with the user — only the task you were given" would be a lie that
406
+ * makes it re-derive everything it can already read.
407
+ *
408
+ * What still holds is the part that made the original contract work: nobody is watching
409
+ * it live, nothing it writes is seen until it finishes, it cannot ask a question, and its
410
+ * final message is the entire result.
411
+ */
412
+ exports.FORKED_SUBAGENT_PREAMBLE = [
413
+ '# You are a forked sub-agent',
414
+ 'You were forked from this conversation and CAN read the whole transcript above — the request, the files already read, the conclusions already reached, the work already done. Your fork is INDEPENDENT: the main agent is not watching you work, no one can answer a question mid-run, and nothing you write is seen until you finish.',
415
+ 'Carry the task through to the end on your own: read what else you need, make the changes the task calls for, and run the checks that prove them. If something is genuinely ambiguous, choose the reading that best fits the conversation, say which reading you chose, and continue.',
416
+ 'Your FINAL message is the only thing that comes back. Make it a concise, self-contained report: what you changed or found (file paths and line numbers), what you verified and how, and anything left undone or uncertain. Do not replay the transcript and do not paste whole files — cite locations instead. If you hit a limit you cannot work around (a permission you could not be granted, the turn budget), say exactly what was left.',
417
+ ].join('\n');
402
418
  function formatTokenCount(n) {
403
419
  return n >= 1000000 ? `${(n / 1000000).toFixed(1)}M` : n >= 1000 ? `${(n / 1000).toFixed(1)}K` : String(n);
404
420
  }
@@ -261,4 +261,45 @@ export interface UserProfile {
261
261
  * identical account data.
262
262
  */
263
263
  export declare function getUserProfile(): Promise<UserProfile>;
264
+ export declare const SCHEDULE_MIN_MINUTES = 15;
265
+ export declare const SCHEDULE_MAX_MINUTES: number;
266
+ export interface CloudSchedule {
267
+ id: string;
268
+ task: string;
269
+ startUrl: string | null;
270
+ domains: string[] | null;
271
+ intervalMinutes: number;
272
+ enabled: boolean;
273
+ nextRunAt: string | null;
274
+ lastRunAt: string | null;
275
+ lastStatus: string | null;
276
+ }
277
+ export interface CloudScheduleRun {
278
+ id: string;
279
+ status: string;
280
+ summary: string | null;
281
+ steps: number;
282
+ createdAt: string | null;
283
+ }
284
+ /** Enforce the server's own bounds with a message that names them. */
285
+ export declare function clampScheduleMinutes(v: number): number;
286
+ export declare function listCloudSchedules(): Promise<CloudSchedule[]>;
287
+ export declare function createCloudSchedule(input: {
288
+ task: string;
289
+ intervalMinutes: number;
290
+ startUrl?: string | null;
291
+ domains?: string[] | null;
292
+ /** Pass false to create it paused; the server defaults to enabled. */
293
+ enabled?: boolean;
294
+ }): Promise<CloudSchedule>;
295
+ export declare function updateCloudSchedule(id: string, patch: {
296
+ task?: string;
297
+ intervalMinutes?: number;
298
+ enabled?: boolean;
299
+ /** '' clears the start URL — the server stores it as NULL. */
300
+ startUrl?: string;
301
+ domains?: string[];
302
+ }): Promise<CloudSchedule>;
303
+ export declare function deleteCloudSchedule(id: string): Promise<void>;
304
+ export declare function getCloudScheduleRuns(id: string): Promise<CloudScheduleRun[]>;
264
305
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/api/client.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,UAAU,EAA8B,UAAU,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAiErH,eAAO,MAAM,QAAQ,QAAmB,CAAC;AAIzC;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,EAC5D,OAAO,EAAE,CAAC,EAAE,EACZ,UAAU,EAAE,KAAK,CAAC;IAAE,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,IAAI,GAAG,SAAS,GACtD,CAAC,EAAE,CAeL;AAiGD,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,UAAU,CAAC;IACjB,aAAa,CAAC,EAAE,aAAa,GAAG,IAAI,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAC;IACnC,oFAAoF;IACpF,UAAU,CAAC,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;KAAE,CAAC,CAAC;IACjG,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MA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