@atlasharness/atlascode 0.1.62 → 0.1.63

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 (2) hide show
  1. package/dist/cli.js +827 -552
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -27966,11 +27966,31 @@ function armGoal(condition) {
27966
27966
  reason: `Goal condition exceeds ${MAX_GOAL_CONDITION_CHARS} characters (got ${trimmed.length}).`
27967
27967
  };
27968
27968
  }
27969
- goalState = { armed: true, condition: trimmed };
27969
+ goalState = { armed: true, condition: trimmed, paused: false, pausedReason: undefined };
27970
27970
  return { ok: true };
27971
27971
  }
27972
27972
  function clearGoal() {
27973
- goalState = { armed: false, condition: undefined };
27973
+ goalState = { armed: false, condition: undefined, paused: false, pausedReason: undefined };
27974
+ }
27975
+ function pauseGoal(reason) {
27976
+ if (!goalState.armed)
27977
+ return;
27978
+ goalState = { ...goalState, paused: true, pausedReason: reason };
27979
+ }
27980
+ function resumeGoal() {
27981
+ if (!goalState.paused)
27982
+ return;
27983
+ goalState = { ...goalState, paused: false, pausedReason: undefined };
27984
+ }
27985
+ function isGoalPaused() {
27986
+ return goalState.armed && goalState.paused;
27987
+ }
27988
+ function getGoalPausedReason() {
27989
+ return goalState.armed && goalState.paused ? goalState.pausedReason : undefined;
27990
+ }
27991
+ function goalPausedNotification(reason) {
27992
+ return `Goal paused: ${reason}
27993
+ The goal will resume when the condition recovers.`;
27974
27994
  }
27975
27995
  function isGoalArmed() {
27976
27996
  return goalState.armed;
@@ -27986,13 +28006,27 @@ function getGoalStateForPersistence() {
27986
28006
  }
27987
28007
  function restoreGoalState(snapshot) {
27988
28008
  if (snapshot && snapshot.armed && snapshot.condition.trim() !== "") {
27989
- goalState = { armed: true, condition: snapshot.condition.trim() };
28009
+ goalState = { armed: true, condition: snapshot.condition.trim(), paused: false, pausedReason: undefined };
27990
28010
  } else {
27991
- goalState = { armed: false, condition: undefined };
28011
+ goalState = { armed: false, condition: undefined, paused: false, pausedReason: undefined };
27992
28012
  }
27993
28013
  }
27994
28014
  function resetGoalStateForTesting() {
27995
- goalState = { armed: false, condition: undefined };
28015
+ goalState = { armed: false, condition: undefined, paused: false, pausedReason: undefined };
28016
+ }
28017
+ function classifyGoalError(err) {
28018
+ const msg = (err instanceof Error ? err.message : String(err ?? "")).toLowerCase();
28019
+ if (/\b401\b/.test(msg) || /\b403\b/.test(msg) || msg.includes("unauthorized") || msg.includes("forbidden")) {
28020
+ return "unrecoverable";
28021
+ }
28022
+ if (msg.includes("context length exceeded") || msg.includes("prompt too long") || msg.includes("context window")) {
28023
+ return "unrecoverable";
28024
+ }
28025
+ return "recoverable";
28026
+ }
28027
+ function goalUnrecoverableNotification(reason) {
28028
+ return `Goal cleared (unrecoverable): ${reason}
28029
+ The goal can no longer be pursued. Set a new goal if needed.`;
27996
28030
  }
27997
28031
  function extractConversationEvidence(messages, maxMessages = 12) {
27998
28032
  const recent = messages.slice(-maxMessages);
@@ -28070,297 +28104,146 @@ The goal has been auto-cleared.`;
28070
28104
  function goalClearedNotification() {
28071
28105
  return "Goal cleared.";
28072
28106
  }
28107
+ function goalHookGateNotification() {
28108
+ return "Goal cleared: hooks are disabled (disableAllHooks). Goals require hooks to continue.";
28109
+ }
28073
28110
  var MAX_GOAL_CONDITION_CHARS = 500, DEFAULT_MAX_GOAL_TURNS = 10, goalState, EVALUATOR_SYSTEM_PROMPT = `You are a goal-condition evaluator. You are given a goal condition and the recent conversation. Determine whether the goal condition has been MET based solely on the conversation evidence — do not run commands, do not read files, do not make assumptions beyond what is shown.
28074
28111
 
28075
28112
  Respond on the first line with exactly "MET" or "UNMET". On the following line, give a one-sentence reason citing the conversation evidence.`;
28076
28113
  var init_goalState = __esm(() => {
28077
- goalState = { armed: false, condition: undefined };
28114
+ goalState = { armed: false, condition: undefined, paused: false, pausedReason: undefined };
28078
28115
  });
28079
28116
 
28080
- // src/engine/pipeline/errorClassification.ts
28081
- function classifyToolError(error) {
28082
- if (error instanceof Error) {
28083
- const errnoCode = error.code;
28084
- if (typeof errnoCode === "string") {
28085
- return `Error:${errnoCode}`;
28086
- }
28087
- if (error.name && error.name !== "Error" && error.name.length > 3) {
28088
- return error.name.slice(0, 60);
28089
- }
28090
- return "Error";
28091
- }
28092
- return "UnknownError";
28117
+ // src/engine/config/settingsCache.ts
28118
+ function getSessionSettingsCache() {
28119
+ return sessionSettingsCache;
28093
28120
  }
28094
-
28095
- // src/engine/pipeline/schemaValidation.ts
28096
- function typeName(v) {
28097
- if (v === null)
28098
- return "null";
28099
- if (Array.isArray(v))
28100
- return "array";
28101
- return typeof v;
28121
+ function setSessionSettingsCache(value) {
28122
+ sessionSettingsCache = value;
28102
28123
  }
28103
- function checkBasicType(value, type) {
28104
- switch (type) {
28105
- case "string":
28106
- return typeof value === "string" ? null : `expected string, got ${typeName(value)}`;
28107
- case "number":
28108
- if (typeof value === "number") {
28109
- return Number.isFinite(value) ? null : "expected number, got non-finite number";
28110
- }
28111
- return `expected number, got ${typeName(value)}`;
28112
- case "integer":
28113
- if (typeof value === "number") {
28114
- return Number.isInteger(value) ? null : "expected integer, got non-integer number";
28115
- }
28116
- return `expected integer, got ${typeName(value)}`;
28117
- case "boolean":
28118
- return typeof value === "boolean" ? null : `expected boolean, got ${typeName(value)}`;
28119
- case "array":
28120
- return Array.isArray(value) ? null : `expected array, got ${typeName(value)}`;
28121
- case "object":
28122
- return typeof value === "object" && value !== null && !Array.isArray(value) ? null : `expected object, got ${typeName(value)}`;
28123
- case "null":
28124
- return value === null ? null : `expected null, got ${typeName(value)}`;
28125
- default:
28126
- return null;
28127
- }
28124
+ function getCachedSettingsForSource(source) {
28125
+ return perSourceCache.has(source) ? perSourceCache.get(source) : undefined;
28128
28126
  }
28129
- function validateInputBySchema(input, schema) {
28130
- if (!schema) {
28131
- return { valid: true };
28132
- }
28133
- if (input === null || typeof input !== "object" || Array.isArray(input)) {
28134
- return { valid: false, message: "expected object input" };
28135
- }
28136
- const record = input;
28137
- const errors = [];
28138
- const required = schema.required;
28139
- if (Array.isArray(required)) {
28140
- for (const rawKey of required) {
28141
- const key = String(rawKey);
28142
- if (!(key in record) || record[key] === undefined) {
28143
- errors.push(`missing required field "${key}"`);
28144
- }
28145
- }
28146
- }
28147
- const properties = schema.properties;
28148
- if (properties) {
28149
- for (const [key, value] of Object.entries(record)) {
28150
- if (value === undefined)
28151
- continue;
28152
- const propSchema = properties[key];
28153
- if (!propSchema || typeof propSchema !== "object")
28154
- continue;
28155
- const type = propSchema.type;
28156
- if (typeof type !== "string")
28157
- continue;
28158
- const err = checkBasicType(value, type);
28159
- if (err)
28160
- errors.push(`field "${key}": ${err}`);
28161
- }
28162
- }
28163
- return errors.length > 0 ? { valid: false, message: errors.join("; ") } : { valid: true };
28127
+ function setCachedSettingsForSource(source, value) {
28128
+ perSourceCache.set(source, value);
28164
28129
  }
28165
- function buildSchemaNotSentHint(tool, discoveredToolNames) {
28166
- if (!tool.shouldDefer)
28167
- return null;
28168
- if (discoveredToolNames.has(tool.name))
28169
- return null;
28170
- return `
28171
-
28172
- This tool's schema was not sent to the API — it was not in the discovered-tool set derived from message history. ` + `Without the schema in your prompt, typed parameters (arrays, numbers, booleans) get emitted as strings and the client-side parser rejects them. ` + `Re-issue the call with correctly-typed parameters (arrays/numbers/booleans, not their string forms).`;
28130
+ function getCachedParsedFile(path) {
28131
+ return parseFileCache.get(path);
28132
+ }
28133
+ function setCachedParsedFile(path, value) {
28134
+ parseFileCache.set(path, value);
28135
+ }
28136
+ function resetSettingsCache() {
28137
+ sessionSettingsCache = null;
28138
+ perSourceCache.clear();
28139
+ parseFileCache.clear();
28173
28140
  }
28141
+ function getPluginSettingsBase() {
28142
+ return pluginSettingsBase;
28143
+ }
28144
+ function setPluginSettingsBase(settings) {
28145
+ pluginSettingsBase = settings;
28146
+ }
28147
+ function clearPluginSettingsBase() {
28148
+ pluginSettingsBase = undefined;
28149
+ }
28150
+ var sessionSettingsCache = null, perSourceCache, parseFileCache, pluginSettingsBase;
28151
+ var init_settingsCache = __esm(() => {
28152
+ perSourceCache = new Map;
28153
+ parseFileCache = new Map;
28154
+ });
28174
28155
 
28175
- // src/engine/pipeline/toolExecution.ts
28176
- function mergeHookPermission(hookBehavior, gate, hookReason) {
28177
- if (hookBehavior === "defer") {
28178
- return {
28179
- allowed: false,
28180
- deferred: true,
28181
- reason: hookReason ?? "deferred by hook"
28182
- };
28183
- }
28184
- if (hookBehavior === "deny") {
28185
- return { allowed: false, reason: "blocked by hook" };
28186
- }
28187
- if (!gate.allowed)
28188
- return gate;
28189
- if (hookBehavior === "ask") {
28190
- return { allowed: false, ask: true, reason: "hook requested confirmation" };
28191
- }
28192
- return gate;
28156
+ // node_modules/zod/index.js
28157
+ var init_zod = __esm(() => {
28158
+ init_external();
28159
+ init_external();
28160
+ });
28161
+
28162
+ // src/engine/config/configRoot.ts
28163
+ import { homedir as homedir2 } from "os";
28164
+ import { join as join2 } from "path";
28165
+ function getAtlasConfigHomeDir() {
28166
+ return (process.env.ATLAS_CONFIG_DIR ?? join2(homedir2(), getConfigDirName())).normalize("NFC");
28193
28167
  }
28194
- function findTool(tools, name) {
28195
- return tools.find((t) => t.name === name || (t.aliases?.includes(name) ?? false));
28168
+ var init_configRoot = __esm(() => {
28169
+ init_shared();
28170
+ });
28171
+
28172
+ // src/engine/config/constants.ts
28173
+ function getEnabledSettingSources() {
28174
+ const result = new Set(ALLOWED_SETTING_SOURCES);
28175
+ result.add("policySettings");
28176
+ result.add("flagSettings");
28177
+ return Array.from(result);
28196
28178
  }
28197
- async function executeToolUse(tu, assistantMsg, deps) {
28198
- const tool = findTool(deps.tools, tu.name);
28199
- if (!tool) {
28200
- return {
28201
- block: {
28202
- type: "tool_result",
28203
- tool_use_id: tu.id,
28204
- content: `unknown tool: ${tu.name}`,
28205
- is_error: true
28206
- },
28207
- isError: true
28208
- };
28209
- }
28210
- const toolCallContext = deps.toolContext !== undefined ? { ...deps.toolContext, signal: deps.signal, checkPermission: deps.checkPermission } : { signal: deps.signal, checkPermission: deps.checkPermission };
28211
- const schemaResult = validateInputBySchema(tu.input, tool.inputSchema);
28212
- if (schemaResult.valid === false) {
28213
- const discovered = deps.discoveredToolNames ?? new Set(deps.tools.map((t) => t.name));
28214
- const schemaHint = buildSchemaNotSentHint(tool, discovered);
28215
- const errorContent = schemaHint ? `${schemaResult.message}${schemaHint}` : schemaResult.message;
28216
- return {
28217
- block: {
28218
- type: "tool_result",
28219
- tool_use_id: tu.id,
28220
- content: `<tool_use_error>InputValidationError: ${errorContent}</tool_use_error>`,
28221
- is_error: true
28222
- },
28223
- isError: true
28224
- };
28225
- }
28226
- const validation = await tool.validateInput?.(tu.input, toolCallContext);
28227
- if (validation && validation.result === false) {
28228
- return {
28229
- block: {
28230
- type: "tool_result",
28231
- tool_use_id: tu.id,
28232
- content: `<tool_use_error>InputValidationError: ${validation.message}</tool_use_error>`,
28233
- is_error: true
28234
- },
28235
- isError: true
28236
- };
28237
- }
28238
- const preOutcome = await deps.hooks?.preToolUse?.(tool, tu.input, tu.id);
28239
- if (preOutcome?.blockingError) {
28240
- return {
28241
- block: {
28242
- type: "tool_result",
28243
- tool_use_id: tu.id,
28244
- content: `<tool_use_error>hook blocked: ${preOutcome.blockingError}</tool_use_error>`,
28245
- is_error: true
28246
- },
28247
- isError: true
28248
- };
28249
- }
28250
- if (preOutcome?.preventContinuation) {
28251
- return {
28252
- block: {
28253
- type: "tool_result",
28254
- tool_use_id: tu.id,
28255
- content: `<tool_use_error>Execution stopped by PreToolUse hook${preOutcome.stopReason ? `: ${preOutcome.stopReason}` : ""}</tool_use_error>`,
28256
- is_error: true
28257
- },
28258
- isError: true
28259
- };
28260
- }
28261
- const effectiveInput = preOutcome?.updatedInput ?? tu.input;
28262
- const gateVerdict = deps.checkPermission ? await deps.checkPermission(tool, effectiveInput, {
28263
- toolUseId: tu.id,
28264
- assistantMessage: assistantMsg
28265
- }) : { allowed: true };
28266
- const verdict = mergeHookPermission(preOutcome?.hookBehavior, gateVerdict, preOutcome?.hookPermissionDecisionReason);
28267
- if (verdict.deferred) {
28268
- return { deferred: true, deferReason: verdict.reason, isError: false };
28269
- }
28270
- if (!verdict.allowed) {
28271
- const content = verdict.ask ? `<tool_use_error>permission confirmation required (prompt 面残留守): ${verdict.reason ?? tu.name}</tool_use_error>` : `<tool_use_error>permission denied: ${verdict.reason ?? tu.name}</tool_use_error>`;
28272
- return {
28273
- block: {
28274
- type: "tool_result",
28275
- tool_use_id: tu.id,
28276
- content,
28277
- is_error: true
28278
- },
28279
- isError: true
28280
- };
28281
- }
28282
- const callInput = verdict.updatedInput ?? effectiveInput;
28283
- let block;
28284
- let isError = false;
28285
- let toolUseResult;
28286
- try {
28287
- const res = await tool.call(callInput, toolCallContext, undefined, assistantMsg);
28288
- block = tool.mapToolResultToToolResultBlockParam(res.data, tu.id);
28289
- toolUseResult = res.data;
28290
- } catch (error) {
28291
- const errorText = `tool error [${classifyToolError(error)}]: ${String(error?.message ?? error)}`;
28292
- block = {
28293
- type: "tool_result",
28294
- tool_use_id: tu.id,
28295
- content: `<tool_use_error>${errorText}</tool_use_error>`,
28296
- is_error: true
28297
- };
28298
- isError = true;
28299
- toolUseResult = errorText;
28300
- }
28301
- const postOutcome = await deps.hooks?.postToolUse?.(tool, callInput, block, tu.id);
28302
- if (postOutcome?.updatedToolOutput !== undefined) {
28303
- block = { ...block, content: postOutcome.updatedToolOutput };
28304
- toolUseResult = postOutcome.updatedToolOutput;
28305
- }
28306
- return { block, isError, toolUseResult };
28179
+ function isSettingSourceEnabled(source) {
28180
+ const enabled = getEnabledSettingSources();
28181
+ return enabled.includes(source);
28307
28182
  }
28308
- var init_toolExecution = () => {};
28183
+ var SETTING_SOURCES, ALLOWED_SETTING_SOURCES;
28184
+ var init_constants3 = __esm(() => {
28185
+ SETTING_SOURCES = [
28186
+ "userSettings",
28187
+ "projectSettings",
28188
+ "localSettings",
28189
+ "flagSettings",
28190
+ "policySettings"
28191
+ ];
28192
+ ALLOWED_SETTING_SOURCES = ["userSettings"];
28193
+ });
28309
28194
 
28310
- // src/engine/pipeline/toolOrchestration.ts
28311
- function partitionToolCalls(toolUses, tools) {
28312
- return toolUses.reduce((acc, tu) => {
28313
- const tool = findTool(tools, tu.name);
28314
- let safe = false;
28315
- try {
28316
- safe = tool ? tool.isConcurrencySafe(tu.input) : false;
28317
- } catch {
28318
- safe = false;
28195
+ // src/engine/config/merge.ts
28196
+ function isPlainObject2(v) {
28197
+ return typeof v === "object" && v !== null && !Array.isArray(v);
28198
+ }
28199
+ function mergeWith(target, source, customizer) {
28200
+ for (const key of Object.keys(source)) {
28201
+ const srcValue = source[key];
28202
+ const objValue = target[key];
28203
+ if (customizer) {
28204
+ const customized = customizer(objValue, srcValue, key, target);
28205
+ if (customized !== undefined) {
28206
+ target[key] = customized;
28207
+ continue;
28208
+ }
28319
28209
  }
28320
- if (safe && acc[acc.length - 1]?.isConcurrencySafe) {
28321
- acc[acc.length - 1].blocks.push(tu);
28210
+ if (srcValue === undefined)
28211
+ continue;
28212
+ if (isPlainObject2(objValue) && isPlainObject2(srcValue)) {
28213
+ mergeWith(objValue, srcValue, customizer);
28322
28214
  } else {
28323
- acc.push({ isConcurrencySafe: safe, blocks: [tu] });
28215
+ target[key] = srcValue;
28324
28216
  }
28325
- return acc;
28326
- }, []);
28217
+ }
28218
+ return target;
28327
28219
  }
28328
- async function runToolBatch(toolUses, assistantMsg, deps) {
28329
- const outcomes = [];
28330
- for (const batch of partitionToolCalls(toolUses, deps.tools)) {
28331
- for (const tu of batch.blocks) {
28332
- const r = await executeToolUse(tu, assistantMsg, deps);
28333
- outcomes.push({
28334
- toolUseId: tu.id,
28335
- name: tu.name,
28336
- block: r.block,
28337
- isError: r.isError,
28338
- toolUseResult: r.toolUseResult,
28339
- deferred: r.deferred,
28340
- deferReason: r.deferReason
28341
- });
28342
- if (r.deferred) {
28343
- return outcomes;
28344
- }
28220
+ function uniq(arr) {
28221
+ const seen = new Set;
28222
+ const out = [];
28223
+ for (const x of arr) {
28224
+ if (!seen.has(x)) {
28225
+ seen.add(x);
28226
+ out.push(x);
28345
28227
  }
28346
28228
  }
28347
- return outcomes;
28229
+ return out;
28230
+ }
28231
+ function settingsMergeCustomizer(objValue, srcValue) {
28232
+ if (Array.isArray(objValue) && Array.isArray(srcValue)) {
28233
+ return uniq([...objValue, ...srcValue]);
28234
+ }
28235
+ return;
28348
28236
  }
28349
- var init_toolOrchestration = __esm(() => {
28350
- init_toolExecution();
28351
- });
28352
-
28353
- // src/engine/pipeline/index.ts
28354
- var init_pipeline = __esm(() => {
28355
- init_toolExecution();
28356
- init_toolOrchestration();
28357
- });
28358
28237
 
28359
- // node_modules/zod/index.js
28360
- var init_zod = __esm(() => {
28361
- init_external();
28362
- init_external();
28363
- });
28238
+ // src/engine/config/managedPath.ts
28239
+ import { join as join3 } from "path";
28240
+ function getManagedSettingsDir() {
28241
+ return "/etc/atlas";
28242
+ }
28243
+ function getManagedSettingsDropInDir() {
28244
+ return join3(getManagedSettingsDir(), "managed-settings.d");
28245
+ }
28246
+ var init_managedPath = () => {};
28364
28247
 
28365
28248
  // src/hooks/hookEvents.ts
28366
28249
  var HOOK_EVENTS;
@@ -28950,131 +28833,6 @@ var init_types3 = __esm(() => {
28950
28833
  init_hooksSchema();
28951
28834
  });
28952
28835
 
28953
- // src/engine/config/constants.ts
28954
- function getEnabledSettingSources() {
28955
- const result = new Set(ALLOWED_SETTING_SOURCES);
28956
- result.add("policySettings");
28957
- result.add("flagSettings");
28958
- return Array.from(result);
28959
- }
28960
- function isSettingSourceEnabled(source) {
28961
- const enabled = getEnabledSettingSources();
28962
- return enabled.includes(source);
28963
- }
28964
- var SETTING_SOURCES, ALLOWED_SETTING_SOURCES;
28965
- var init_constants3 = __esm(() => {
28966
- SETTING_SOURCES = [
28967
- "userSettings",
28968
- "projectSettings",
28969
- "localSettings",
28970
- "flagSettings",
28971
- "policySettings"
28972
- ];
28973
- ALLOWED_SETTING_SOURCES = ["userSettings"];
28974
- });
28975
-
28976
- // src/engine/config/settingsCache.ts
28977
- function getSessionSettingsCache() {
28978
- return sessionSettingsCache;
28979
- }
28980
- function setSessionSettingsCache(value) {
28981
- sessionSettingsCache = value;
28982
- }
28983
- function getCachedSettingsForSource(source) {
28984
- return perSourceCache.has(source) ? perSourceCache.get(source) : undefined;
28985
- }
28986
- function setCachedSettingsForSource(source, value) {
28987
- perSourceCache.set(source, value);
28988
- }
28989
- function getCachedParsedFile(path) {
28990
- return parseFileCache.get(path);
28991
- }
28992
- function setCachedParsedFile(path, value) {
28993
- parseFileCache.set(path, value);
28994
- }
28995
- function resetSettingsCache() {
28996
- sessionSettingsCache = null;
28997
- perSourceCache.clear();
28998
- parseFileCache.clear();
28999
- }
29000
- function getPluginSettingsBase() {
29001
- return pluginSettingsBase;
29002
- }
29003
- function setPluginSettingsBase(settings) {
29004
- pluginSettingsBase = settings;
29005
- }
29006
- function clearPluginSettingsBase() {
29007
- pluginSettingsBase = undefined;
29008
- }
29009
- var sessionSettingsCache = null, perSourceCache, parseFileCache, pluginSettingsBase;
29010
- var init_settingsCache = __esm(() => {
29011
- perSourceCache = new Map;
29012
- parseFileCache = new Map;
29013
- });
29014
-
29015
- // src/engine/config/managedPath.ts
29016
- import { join as join2 } from "path";
29017
- function getManagedSettingsDir() {
29018
- return "/etc/atlas";
29019
- }
29020
- function getManagedSettingsDropInDir() {
29021
- return join2(getManagedSettingsDir(), "managed-settings.d");
29022
- }
29023
- var init_managedPath = () => {};
29024
-
29025
- // src/engine/config/configRoot.ts
29026
- import { homedir as homedir2 } from "os";
29027
- import { join as join3 } from "path";
29028
- function getAtlasConfigHomeDir() {
29029
- return (process.env.ATLAS_CONFIG_DIR ?? join3(homedir2(), getConfigDirName())).normalize("NFC");
29030
- }
29031
- var init_configRoot = __esm(() => {
29032
- init_shared();
29033
- });
29034
-
29035
- // src/engine/config/merge.ts
29036
- function isPlainObject2(v) {
29037
- return typeof v === "object" && v !== null && !Array.isArray(v);
29038
- }
29039
- function mergeWith(target, source, customizer) {
29040
- for (const key of Object.keys(source)) {
29041
- const srcValue = source[key];
29042
- const objValue = target[key];
29043
- if (customizer) {
29044
- const customized = customizer(objValue, srcValue, key, target);
29045
- if (customized !== undefined) {
29046
- target[key] = customized;
29047
- continue;
29048
- }
29049
- }
29050
- if (srcValue === undefined)
29051
- continue;
29052
- if (isPlainObject2(objValue) && isPlainObject2(srcValue)) {
29053
- mergeWith(objValue, srcValue, customizer);
29054
- } else {
29055
- target[key] = srcValue;
29056
- }
29057
- }
29058
- return target;
29059
- }
29060
- function uniq(arr) {
29061
- const seen = new Set;
29062
- const out = [];
29063
- for (const x of arr) {
29064
- if (!seen.has(x)) {
29065
- seen.add(x);
29066
- out.push(x);
29067
- }
29068
- }
29069
- return out;
29070
- }
29071
- function settingsMergeCustomizer(objValue, srcValue) {
29072
- if (Array.isArray(objValue) && Array.isArray(srcValue)) {
29073
- return uniq([...objValue, ...srcValue]);
29074
- }
29075
- return;
29076
- }
29077
-
29078
28836
  // src/permissions/PermissionRule.ts
29079
28837
  var permissionBehaviorSchema, permissionRuleValueSchema;
29080
28838
  var init_PermissionRule = __esm(() => {
@@ -31706,6 +31464,285 @@ var init_hooksConfig = __esm(() => {
31706
31464
  init_settings();
31707
31465
  });
31708
31466
 
31467
+ // src/engine/pipeline/errorClassification.ts
31468
+ function classifyToolError(error) {
31469
+ if (error instanceof Error) {
31470
+ const errnoCode = error.code;
31471
+ if (typeof errnoCode === "string") {
31472
+ return `Error:${errnoCode}`;
31473
+ }
31474
+ if (error.name && error.name !== "Error" && error.name.length > 3) {
31475
+ return error.name.slice(0, 60);
31476
+ }
31477
+ return "Error";
31478
+ }
31479
+ return "UnknownError";
31480
+ }
31481
+
31482
+ // src/engine/pipeline/schemaValidation.ts
31483
+ function typeName(v) {
31484
+ if (v === null)
31485
+ return "null";
31486
+ if (Array.isArray(v))
31487
+ return "array";
31488
+ return typeof v;
31489
+ }
31490
+ function checkBasicType(value, type) {
31491
+ switch (type) {
31492
+ case "string":
31493
+ return typeof value === "string" ? null : `expected string, got ${typeName(value)}`;
31494
+ case "number":
31495
+ if (typeof value === "number") {
31496
+ return Number.isFinite(value) ? null : "expected number, got non-finite number";
31497
+ }
31498
+ return `expected number, got ${typeName(value)}`;
31499
+ case "integer":
31500
+ if (typeof value === "number") {
31501
+ return Number.isInteger(value) ? null : "expected integer, got non-integer number";
31502
+ }
31503
+ return `expected integer, got ${typeName(value)}`;
31504
+ case "boolean":
31505
+ return typeof value === "boolean" ? null : `expected boolean, got ${typeName(value)}`;
31506
+ case "array":
31507
+ return Array.isArray(value) ? null : `expected array, got ${typeName(value)}`;
31508
+ case "object":
31509
+ return typeof value === "object" && value !== null && !Array.isArray(value) ? null : `expected object, got ${typeName(value)}`;
31510
+ case "null":
31511
+ return value === null ? null : `expected null, got ${typeName(value)}`;
31512
+ default:
31513
+ return null;
31514
+ }
31515
+ }
31516
+ function validateInputBySchema(input, schema) {
31517
+ if (!schema) {
31518
+ return { valid: true };
31519
+ }
31520
+ if (input === null || typeof input !== "object" || Array.isArray(input)) {
31521
+ return { valid: false, message: "expected object input" };
31522
+ }
31523
+ const record = input;
31524
+ const errors = [];
31525
+ const required = schema.required;
31526
+ if (Array.isArray(required)) {
31527
+ for (const rawKey of required) {
31528
+ const key = String(rawKey);
31529
+ if (!(key in record) || record[key] === undefined) {
31530
+ errors.push(`missing required field "${key}"`);
31531
+ }
31532
+ }
31533
+ }
31534
+ const properties = schema.properties;
31535
+ if (properties) {
31536
+ for (const [key, value] of Object.entries(record)) {
31537
+ if (value === undefined)
31538
+ continue;
31539
+ const propSchema = properties[key];
31540
+ if (!propSchema || typeof propSchema !== "object")
31541
+ continue;
31542
+ const type = propSchema.type;
31543
+ if (typeof type !== "string")
31544
+ continue;
31545
+ const err = checkBasicType(value, type);
31546
+ if (err)
31547
+ errors.push(`field "${key}": ${err}`);
31548
+ }
31549
+ }
31550
+ return errors.length > 0 ? { valid: false, message: errors.join("; ") } : { valid: true };
31551
+ }
31552
+ function buildSchemaNotSentHint(tool, discoveredToolNames) {
31553
+ if (!tool.shouldDefer)
31554
+ return null;
31555
+ if (discoveredToolNames.has(tool.name))
31556
+ return null;
31557
+ return `
31558
+
31559
+ This tool's schema was not sent to the API — it was not in the discovered-tool set derived from message history. ` + `Without the schema in your prompt, typed parameters (arrays, numbers, booleans) get emitted as strings and the client-side parser rejects them. ` + `Re-issue the call with correctly-typed parameters (arrays/numbers/booleans, not their string forms).`;
31560
+ }
31561
+
31562
+ // src/engine/pipeline/toolExecution.ts
31563
+ function mergeHookPermission(hookBehavior, gate, hookReason) {
31564
+ if (hookBehavior === "defer") {
31565
+ return {
31566
+ allowed: false,
31567
+ deferred: true,
31568
+ reason: hookReason ?? "deferred by hook"
31569
+ };
31570
+ }
31571
+ if (hookBehavior === "deny") {
31572
+ return { allowed: false, reason: "blocked by hook" };
31573
+ }
31574
+ if (!gate.allowed)
31575
+ return gate;
31576
+ if (hookBehavior === "ask") {
31577
+ return { allowed: false, ask: true, reason: "hook requested confirmation" };
31578
+ }
31579
+ return gate;
31580
+ }
31581
+ function findTool(tools, name) {
31582
+ return tools.find((t) => t.name === name || (t.aliases?.includes(name) ?? false));
31583
+ }
31584
+ async function executeToolUse(tu, assistantMsg, deps) {
31585
+ const tool = findTool(deps.tools, tu.name);
31586
+ if (!tool) {
31587
+ return {
31588
+ block: {
31589
+ type: "tool_result",
31590
+ tool_use_id: tu.id,
31591
+ content: `unknown tool: ${tu.name}`,
31592
+ is_error: true
31593
+ },
31594
+ isError: true
31595
+ };
31596
+ }
31597
+ const toolCallContext = deps.toolContext !== undefined ? { ...deps.toolContext, signal: deps.signal, checkPermission: deps.checkPermission } : { signal: deps.signal, checkPermission: deps.checkPermission };
31598
+ const schemaResult = validateInputBySchema(tu.input, tool.inputSchema);
31599
+ if (schemaResult.valid === false) {
31600
+ const discovered = deps.discoveredToolNames ?? new Set(deps.tools.map((t) => t.name));
31601
+ const schemaHint = buildSchemaNotSentHint(tool, discovered);
31602
+ const errorContent = schemaHint ? `${schemaResult.message}${schemaHint}` : schemaResult.message;
31603
+ return {
31604
+ block: {
31605
+ type: "tool_result",
31606
+ tool_use_id: tu.id,
31607
+ content: `<tool_use_error>InputValidationError: ${errorContent}</tool_use_error>`,
31608
+ is_error: true
31609
+ },
31610
+ isError: true
31611
+ };
31612
+ }
31613
+ const validation = await tool.validateInput?.(tu.input, toolCallContext);
31614
+ if (validation && validation.result === false) {
31615
+ return {
31616
+ block: {
31617
+ type: "tool_result",
31618
+ tool_use_id: tu.id,
31619
+ content: `<tool_use_error>InputValidationError: ${validation.message}</tool_use_error>`,
31620
+ is_error: true
31621
+ },
31622
+ isError: true
31623
+ };
31624
+ }
31625
+ const preOutcome = await deps.hooks?.preToolUse?.(tool, tu.input, tu.id);
31626
+ if (preOutcome?.blockingError) {
31627
+ return {
31628
+ block: {
31629
+ type: "tool_result",
31630
+ tool_use_id: tu.id,
31631
+ content: `<tool_use_error>hook blocked: ${preOutcome.blockingError}</tool_use_error>`,
31632
+ is_error: true
31633
+ },
31634
+ isError: true
31635
+ };
31636
+ }
31637
+ if (preOutcome?.preventContinuation) {
31638
+ return {
31639
+ block: {
31640
+ type: "tool_result",
31641
+ tool_use_id: tu.id,
31642
+ content: `<tool_use_error>Execution stopped by PreToolUse hook${preOutcome.stopReason ? `: ${preOutcome.stopReason}` : ""}</tool_use_error>`,
31643
+ is_error: true
31644
+ },
31645
+ isError: true
31646
+ };
31647
+ }
31648
+ const effectiveInput = preOutcome?.updatedInput ?? tu.input;
31649
+ const gateVerdict = deps.checkPermission ? await deps.checkPermission(tool, effectiveInput, {
31650
+ toolUseId: tu.id,
31651
+ assistantMessage: assistantMsg
31652
+ }) : { allowed: true };
31653
+ const verdict = mergeHookPermission(preOutcome?.hookBehavior, gateVerdict, preOutcome?.hookPermissionDecisionReason);
31654
+ if (verdict.deferred) {
31655
+ return { deferred: true, deferReason: verdict.reason, isError: false };
31656
+ }
31657
+ if (!verdict.allowed) {
31658
+ const content = verdict.ask ? `<tool_use_error>permission confirmation required (prompt 面残留守): ${verdict.reason ?? tu.name}</tool_use_error>` : `<tool_use_error>permission denied: ${verdict.reason ?? tu.name}</tool_use_error>`;
31659
+ return {
31660
+ block: {
31661
+ type: "tool_result",
31662
+ tool_use_id: tu.id,
31663
+ content,
31664
+ is_error: true
31665
+ },
31666
+ isError: true
31667
+ };
31668
+ }
31669
+ const callInput = verdict.updatedInput ?? effectiveInput;
31670
+ let block;
31671
+ let isError = false;
31672
+ let toolUseResult;
31673
+ try {
31674
+ const res = await tool.call(callInput, toolCallContext, undefined, assistantMsg);
31675
+ block = tool.mapToolResultToToolResultBlockParam(res.data, tu.id);
31676
+ toolUseResult = res.data;
31677
+ } catch (error) {
31678
+ const errorText = `tool error [${classifyToolError(error)}]: ${String(error?.message ?? error)}`;
31679
+ block = {
31680
+ type: "tool_result",
31681
+ tool_use_id: tu.id,
31682
+ content: `<tool_use_error>${errorText}</tool_use_error>`,
31683
+ is_error: true
31684
+ };
31685
+ isError = true;
31686
+ toolUseResult = errorText;
31687
+ }
31688
+ const postOutcome = await deps.hooks?.postToolUse?.(tool, callInput, block, tu.id);
31689
+ if (postOutcome?.updatedToolOutput !== undefined) {
31690
+ block = { ...block, content: postOutcome.updatedToolOutput };
31691
+ toolUseResult = postOutcome.updatedToolOutput;
31692
+ }
31693
+ return { block, isError, toolUseResult };
31694
+ }
31695
+ var init_toolExecution = () => {};
31696
+
31697
+ // src/engine/pipeline/toolOrchestration.ts
31698
+ function partitionToolCalls(toolUses, tools) {
31699
+ return toolUses.reduce((acc, tu) => {
31700
+ const tool = findTool(tools, tu.name);
31701
+ let safe = false;
31702
+ try {
31703
+ safe = tool ? tool.isConcurrencySafe(tu.input) : false;
31704
+ } catch {
31705
+ safe = false;
31706
+ }
31707
+ if (safe && acc[acc.length - 1]?.isConcurrencySafe) {
31708
+ acc[acc.length - 1].blocks.push(tu);
31709
+ } else {
31710
+ acc.push({ isConcurrencySafe: safe, blocks: [tu] });
31711
+ }
31712
+ return acc;
31713
+ }, []);
31714
+ }
31715
+ async function runToolBatch(toolUses, assistantMsg, deps) {
31716
+ const outcomes = [];
31717
+ for (const batch of partitionToolCalls(toolUses, deps.tools)) {
31718
+ for (const tu of batch.blocks) {
31719
+ const r = await executeToolUse(tu, assistantMsg, deps);
31720
+ outcomes.push({
31721
+ toolUseId: tu.id,
31722
+ name: tu.name,
31723
+ block: r.block,
31724
+ isError: r.isError,
31725
+ toolUseResult: r.toolUseResult,
31726
+ deferred: r.deferred,
31727
+ deferReason: r.deferReason
31728
+ });
31729
+ if (r.deferred) {
31730
+ return outcomes;
31731
+ }
31732
+ }
31733
+ }
31734
+ return outcomes;
31735
+ }
31736
+ var init_toolOrchestration = __esm(() => {
31737
+ init_toolExecution();
31738
+ });
31739
+
31740
+ // src/engine/pipeline/index.ts
31741
+ var init_pipeline = __esm(() => {
31742
+ init_toolExecution();
31743
+ init_toolOrchestration();
31744
+ });
31745
+
31709
31746
  // src/engine/config/managedEnv.ts
31710
31747
  function applySafeConfigEnvironmentVariables() {
31711
31748
  for (const source of TRUSTED_SETTING_SOURCES) {
@@ -33876,7 +33913,7 @@ var init_project = __esm(() => {
33876
33913
  var AGENT_TOOL_NAME = "Agent", MAX_WORKER_SPAWN_DEPTH = 2;
33877
33914
 
33878
33915
  // src/engine/tools/toolNames.ts
33879
- var FILE_READ_TOOL_NAME = "Read", WEB_SEARCH_TOOL_NAME = "WebSearch", TODO_WRITE_TOOL_NAME = "TodoWrite", GREP_TOOL_NAME = "Grep", WEB_FETCH_TOOL_NAME = "WebFetch", GLOB_TOOL_NAME = "Glob", BASH_TOOL_NAME2 = "Bash", POWERSHELL_TOOL_NAME = "PowerShell", FILE_EDIT_TOOL_NAME = "Edit", FILE_WRITE_TOOL_NAME = "Write", NOTEBOOK_EDIT_TOOL_NAME = "NotebookEdit", SKILL_TOOL_NAME = "Skill", SYNTHETIC_OUTPUT_TOOL_NAME = "StructuredOutput", TOOL_SEARCH_TOOL_NAME = "ToolSearch", ENTER_WORKTREE_TOOL_NAME = "EnterWorktree", EXIT_WORKTREE_TOOL_NAME = "ExitWorktree", TEAM_CREATE_TOOL_NAME = "TeamCreate", TEAM_DELETE_TOOL_NAME = "TeamDelete", SNIP_TOOL_NAME = "Snip", SEND_MESSAGE_TOOL_NAME = "SendMessage", TASK_STOP_TOOL_NAME = "TaskStop", TASK_OUTPUT_TOOL_NAME = "TaskOutput", ENTER_PLAN_MODE_TOOL_NAME = "EnterPlanMode", EXIT_PLAN_MODE_V2_TOOL_NAME = "ExitPlanMode", ASK_USER_QUESTION_TOOL_NAME = "AskUserQuestion", TASK_CREATE_TOOL_NAME = "TaskCreate", TASK_GET_TOOL_NAME = "TaskGet", TASK_LIST_TOOL_NAME = "TaskList", TASK_UPDATE_TOOL_NAME = "TaskUpdate", CRON_CREATE_TOOL_NAME = "CronCreate", CRON_DELETE_TOOL_NAME = "CronDelete", CRON_LIST_TOOL_NAME = "CronList", CONFIG_TOOL_NAME = "Config", WORKFLOW_TOOL_NAME = "Workflow", REPL_TOOL_NAME = "REPL", LIST_MCP_RESOURCES_TOOL_NAME = "ListMcpResourcesTool", READ_MCP_RESOURCE_TOOL_NAME = "ReadMcpResourceTool", LSP_TOOL_NAME = "LSP", SHELL_TOOL_NAMES, ASYNC_AGENT_ALLOWED_TOOLS, INTERNAL_WORKER_TOOLS, ALL_AGENT_DISALLOWED_TOOLS, CUSTOM_AGENT_DISALLOWED_TOOLS, IN_PROCESS_TEAMMATE_ALLOWED_TOOLS, COORDINATOR_MODE_ALLOWED_TOOLS;
33916
+ var FILE_READ_TOOL_NAME = "Read", WEB_SEARCH_TOOL_NAME = "WebSearch", TODO_WRITE_TOOL_NAME = "TodoWrite", GREP_TOOL_NAME = "Grep", WEB_FETCH_TOOL_NAME = "WebFetch", GLOB_TOOL_NAME = "Glob", BASH_TOOL_NAME2 = "Bash", POWERSHELL_TOOL_NAME = "PowerShell", FILE_EDIT_TOOL_NAME = "Edit", FILE_WRITE_TOOL_NAME = "Write", NOTEBOOK_EDIT_TOOL_NAME = "NotebookEdit", SKILL_TOOL_NAME = "Skill", SYNTHETIC_OUTPUT_TOOL_NAME = "StructuredOutput", TOOL_SEARCH_TOOL_NAME = "ToolSearch", ENTER_WORKTREE_TOOL_NAME = "EnterWorktree", EXIT_WORKTREE_TOOL_NAME = "ExitWorktree", TEAM_CREATE_TOOL_NAME = "TeamCreate", TEAM_DELETE_TOOL_NAME = "TeamDelete", SNIP_TOOL_NAME = "Snip", SEND_MESSAGE_TOOL_NAME = "SendMessage", TASK_STOP_TOOL_NAME = "TaskStop", TASK_OUTPUT_TOOL_NAME = "TaskOutput", ENTER_PLAN_MODE_TOOL_NAME = "EnterPlanMode", EXIT_PLAN_MODE_V2_TOOL_NAME = "ExitPlanMode", ASK_USER_QUESTION_TOOL_NAME = "AskUserQuestion", TASK_CREATE_TOOL_NAME = "TaskCreate", TASK_GET_TOOL_NAME = "TaskGet", TASK_LIST_TOOL_NAME = "TaskList", TASK_UPDATE_TOOL_NAME = "TaskUpdate", CRON_CREATE_TOOL_NAME = "CronCreate", CRON_DELETE_TOOL_NAME = "CronDelete", CRON_LIST_TOOL_NAME = "CronList", CONFIG_TOOL_NAME = "Config", WORKFLOW_TOOL_NAME = "Workflow", REPL_TOOL_NAME = "REPL", LIST_MCP_RESOURCES_TOOL_NAME = "ListMcpResourcesTool", READ_MCP_RESOURCE_TOOL_NAME = "ReadMcpResourceTool", LSP_TOOL_NAME = "LSP", PROPOSE_GOAL_TOOL_NAME = "ProposeGoal", SHELL_TOOL_NAMES, ASYNC_AGENT_ALLOWED_TOOLS, INTERNAL_WORKER_TOOLS, ALL_AGENT_DISALLOWED_TOOLS, CUSTOM_AGENT_DISALLOWED_TOOLS, IN_PROCESS_TEAMMATE_ALLOWED_TOOLS, COORDINATOR_MODE_ALLOWED_TOOLS;
33880
33917
  var init_toolNames = __esm(() => {
33881
33918
  SHELL_TOOL_NAMES = [BASH_TOOL_NAME2, POWERSHELL_TOOL_NAME];
33882
33919
  ASYNC_AGENT_ALLOWED_TOOLS = new Set([
@@ -82033,6 +82070,18 @@ async function queryAgentLoop(deps, args) {
82033
82070
  effectiveDeps = { ...deps, sessionModel: nextRef };
82034
82071
  continue;
82035
82072
  }
82073
+ if (isGoalArmed() && !deps.signal?.aborted) {
82074
+ const goalCondition = getGoalCondition();
82075
+ const errorReason = errorMessage(err);
82076
+ if (classifyGoalError(err) === "unrecoverable") {
82077
+ clearGoal();
82078
+ deps.transcript?.saveGoalState?.(null);
82079
+ deps.emit?.({ type: "goal_unrecoverable", condition: goalCondition, reason: errorReason });
82080
+ } else {
82081
+ pauseGoal(errorReason);
82082
+ deps.emit?.({ type: "goal_paused", condition: goalCondition, reason: errorReason });
82083
+ }
82084
+ }
82036
82085
  throw err;
82037
82086
  }
82038
82087
  messages = lastRound.messages;
@@ -82050,7 +82099,7 @@ async function queryAgentLoop(deps, args) {
82050
82099
  break;
82051
82100
  }
82052
82101
  if (lastRound.toolResults.length === 0) {
82053
- if (isGoalArmed()) {
82102
+ if (isGoalArmed() && !isGoalPaused()) {
82054
82103
  const condition = getGoalCondition();
82055
82104
  if (goalTurns >= maxGoalTurns) {
82056
82105
  clearGoal();
@@ -82058,13 +82107,45 @@ async function queryAgentLoop(deps, args) {
82058
82107
  terminated = true;
82059
82108
  break;
82060
82109
  }
82110
+ if (shouldDisableAllHooksIncludingManaged()) {
82111
+ clearGoal();
82112
+ deps.transcript?.saveGoalState?.(null);
82113
+ deps.emit?.({
82114
+ type: "goal_unrecoverable",
82115
+ condition,
82116
+ reason: goalHookGateNotification()
82117
+ });
82118
+ terminated = true;
82119
+ break;
82120
+ }
82121
+ if (deps.hasPendingBackgroundTasks?.()) {
82122
+ terminated = true;
82123
+ break;
82124
+ }
82061
82125
  goalTurns++;
82062
- const evalResult = await evaluateGoal({
82063
- modelProvider: deps.modelProvider,
82064
- signal: deps.signal,
82065
- messages,
82066
- condition
82067
- });
82126
+ let evalResult;
82127
+ try {
82128
+ evalResult = await evaluateGoal({
82129
+ modelProvider: deps.modelProvider,
82130
+ signal: deps.signal,
82131
+ messages,
82132
+ condition
82133
+ });
82134
+ } catch (evalErr) {
82135
+ if (deps.signal?.aborted)
82136
+ throw evalErr;
82137
+ const errorReason = errorMessage(evalErr);
82138
+ if (classifyGoalError(evalErr) === "unrecoverable") {
82139
+ clearGoal();
82140
+ deps.transcript?.saveGoalState?.(null);
82141
+ deps.emit?.({ type: "goal_unrecoverable", condition, reason: errorReason });
82142
+ } else {
82143
+ pauseGoal(errorReason);
82144
+ deps.emit?.({ type: "goal_paused", condition, reason: errorReason });
82145
+ }
82146
+ terminated = true;
82147
+ break;
82148
+ }
82068
82149
  if (evalResult.met) {
82069
82150
  clearGoal();
82070
82151
  deps.transcript?.saveGoalState?.(null);
@@ -82083,6 +82164,9 @@ async function queryAgentLoop(deps, args) {
82083
82164
  turn: turns,
82084
82165
  reason: evalResult.reason
82085
82166
  });
82167
+ } else if (isGoalPaused()) {
82168
+ terminated = true;
82169
+ break;
82086
82170
  } else {
82087
82171
  const stop = deps.hooks?.stopHooks;
82088
82172
  const preventStop = stop ? (await stop(deps.signal)).preventContinuation : false;
@@ -82115,6 +82199,7 @@ var init_loop = __esm(() => {
82115
82199
  init_modelprovider2();
82116
82200
  init_turnRecovery();
82117
82201
  init_goalState();
82202
+ init_hooksConfig();
82118
82203
  init_pipeline();
82119
82204
  init_context();
82120
82205
  init_reactiveCompactError();
@@ -82192,6 +82277,105 @@ var init_toolHooks = __esm(() => {
82192
82277
  init_hooks();
82193
82278
  });
82194
82279
 
82280
+ // src/engine/tools/proposeGoal/proposeGoalPrompt.ts
82281
+ var PROPOSE_GOAL_PROMPT = `Propose a goal condition that can be verified across multiple turns of conversation. The goal will be armed and the agent will continue working until an evaluator determines the condition has been met based solely on conversation evidence.
82282
+
82283
+ Parameters:
82284
+ - condition (string, required): A single testable end-state condition, maximum 500 characters. The condition should describe a verifiable outcome, not a process.
82285
+ - ask_user (boolean, default true): Whether to ask the user to approve the goal.
82286
+
82287
+ ask_user semantics:
82288
+ - ask_user=true (default): Present the goal to the user for single-key approval. If the user approves, the goal is armed. If the user declines, no goal is armed and no notification is sent.
82289
+ - ask_user=false: Arm the goal directly without asking. Use this ONLY when the user's own words explicitly stated the desired outcome and they want the agent to pursue it as a goal. Setting ask_user=false when the user did not explicitly request this outcome is a misuse of the tool.
82290
+
82291
+ Evaluator behavior: A separate evaluator checks whether the goal condition has been met based only on the conversation. It does not run commands, does not read files, and does not make assumptions beyond what is shown in the conversation.
82292
+
82293
+ One goal at a time: If a goal is already armed, proposing a new goal replaces the previous one (after approval if ask_user=true).
82294
+
82295
+ Use this tool when the user describes an outcome they want achieved that can be verified from the conversation, and that may require multiple turns of work.`;
82296
+
82297
+ // src/engine/tools/proposeGoal/ProposeGoal.ts
82298
+ var PROPOSE_GOAL_INPUT_SCHEMA, ProposeGoalTool;
82299
+ var init_ProposeGoal = __esm(() => {
82300
+ init_json();
82301
+ init_toolNames();
82302
+ init_goalState();
82303
+ PROPOSE_GOAL_INPUT_SCHEMA = {
82304
+ type: "object",
82305
+ properties: {
82306
+ condition: {
82307
+ type: "string",
82308
+ description: `A single testable end-state condition (maximum ${MAX_GOAL_CONDITION_CHARS} characters). Describes a verifiable outcome, not a process.`
82309
+ },
82310
+ ask_user: {
82311
+ type: "boolean",
82312
+ description: "Whether to ask the user to approve the goal (default true). Set to false ONLY when the user explicitly requested this outcome."
82313
+ }
82314
+ },
82315
+ required: ["condition"],
82316
+ additionalProperties: false
82317
+ };
82318
+ ProposeGoalTool = {
82319
+ name: PROPOSE_GOAL_TOOL_NAME,
82320
+ inputSchema: PROPOSE_GOAL_INPUT_SCHEMA,
82321
+ inputJSONSchema: PROPOSE_GOAL_INPUT_SCHEMA,
82322
+ searchHint: "propose a verifiable goal condition to pursue across multiple turns",
82323
+ maxResultSizeChars: 2000,
82324
+ isEnabled: () => true,
82325
+ isReadOnly: () => false,
82326
+ isConcurrencySafe: () => false,
82327
+ isDestructive: () => false,
82328
+ userFacingName: () => "ProposeGoal",
82329
+ toAutoClassifierInput: () => "",
82330
+ async checkPermissions(input) {
82331
+ const { condition, ask_user = true } = input;
82332
+ if (ask_user) {
82333
+ return {
82334
+ behavior: "ask",
82335
+ message: `Approve goal: "${condition}"?`,
82336
+ updatedInput: input
82337
+ };
82338
+ }
82339
+ return {
82340
+ behavior: "allow",
82341
+ updatedInput: input
82342
+ };
82343
+ },
82344
+ async description() {
82345
+ return PROPOSE_GOAL_PROMPT;
82346
+ },
82347
+ mapToolResultToToolResultBlockParam(data, toolUseID) {
82348
+ return {
82349
+ tool_use_id: toolUseID,
82350
+ type: "tool_result",
82351
+ content: jsonStringify2(data)
82352
+ };
82353
+ },
82354
+ async call(args, _context) {
82355
+ const { condition } = args ?? { condition: "" };
82356
+ const result = armGoal(condition);
82357
+ if (result.ok === true) {
82358
+ return {
82359
+ data: {
82360
+ armed: true,
82361
+ condition: condition.trim()
82362
+ }
82363
+ };
82364
+ }
82365
+ return {
82366
+ data: {
82367
+ armed: false,
82368
+ condition: condition ?? "",
82369
+ reason: result.reason
82370
+ }
82371
+ };
82372
+ },
82373
+ renderToolUseMessage() {
82374
+ return null;
82375
+ }
82376
+ };
82377
+ });
82378
+
82195
82379
  // src/engine/loopDeps.ts
82196
82380
  function setAgentLoopDepsTeammatePoolSync(fn) {
82197
82381
  teammatePoolSync = fn;
@@ -82208,7 +82392,8 @@ async function createAgentLoopDeps(config = {}) {
82208
82392
  ...config.toolRegistryDeps?.baseTools ?? [],
82209
82393
  SnipTool,
82210
82394
  TeamCreateTool,
82211
- TeamDeleteTool
82395
+ TeamDeleteTool,
82396
+ ProposeGoalTool
82212
82397
  ],
82213
82398
  mcpTools: [...config.toolRegistryDeps?.mcpTools ?? [], ...mcpTools],
82214
82399
  ascendTools: getDomainMount()?.tools
@@ -82293,6 +82478,7 @@ var init_loopDeps = __esm(() => {
82293
82478
  init_snipTool();
82294
82479
  init_teamCreateTool();
82295
82480
  init_teamDeleteTool();
82481
+ init_ProposeGoal();
82296
82482
  init_context();
82297
82483
  });
82298
82484
 
@@ -82343,6 +82529,62 @@ var init_hooks2 = __esm(() => {
82343
82529
  init_hooks();
82344
82530
  });
82345
82531
 
82532
+ // src/engine/goal/goalCheckIn.ts
82533
+ function getGoalCheckInMinutes() {
82534
+ const raw = process.env.ATLAS_GOAL_CHECKIN_MINUTES;
82535
+ if (raw === undefined || raw === "")
82536
+ return DEFAULT_GOAL_CHECKIN_MINUTES;
82537
+ const parsed = Number(raw);
82538
+ if (!Number.isFinite(parsed) || parsed < 0)
82539
+ return DEFAULT_GOAL_CHECKIN_MINUTES;
82540
+ return parsed;
82541
+ }
82542
+ function getCheckInDelayMs(checkInIndex, baseMinutes) {
82543
+ const multiplier = GOAL_CHECKIN_BACKOFF_MULTIPLIERS[checkInIndex];
82544
+ if (multiplier === undefined)
82545
+ return Infinity;
82546
+ return baseMinutes * MS_PER_MINUTE * multiplier;
82547
+ }
82548
+ function resetCheckInState() {
82549
+ checkInState = { checkInCount: 0 };
82550
+ }
82551
+ function recordCheckIn() {
82552
+ checkInState = { checkInCount: checkInState.checkInCount + 1 };
82553
+ }
82554
+ function refreshOnUserMessage() {
82555
+ checkInState = { checkInCount: 0 };
82556
+ }
82557
+ function getRemainingCheckIns() {
82558
+ return Math.max(0, MAX_GOAL_CHECKINS - checkInState.checkInCount);
82559
+ }
82560
+ function canCheckIn() {
82561
+ if (getGoalCheckInMinutes() === 0)
82562
+ return false;
82563
+ return checkInState.checkInCount < MAX_GOAL_CHECKINS;
82564
+ }
82565
+ function getCheckInStateForTesting() {
82566
+ return { ...checkInState };
82567
+ }
82568
+ function goalCheckInPrompt(condition) {
82569
+ return `This is an automated goal check-in. A goal is still active and the session appears idle or blocked by background work.
82570
+
82571
+ Goal condition: ${condition}
82572
+
82573
+ Review the progress toward this goal based on the conversation so far:
82574
+ - If work toward the goal is unfinished, continue it.
82575
+ - If background tasks are still running, wait for them and then reassess.
82576
+ - If the goal appears unachievable, explain why and what was attempted.
82577
+
82578
+ Do not start new unrelated work. Focus on the goal condition above. Assess whether meaningful progress has been made since the last check-in.`;
82579
+ }
82580
+ var DEFAULT_GOAL_CHECKIN_MINUTES = 30, GOAL_CHECKIN_BACKOFF_MULTIPLIERS, MAX_GOAL_CHECKINS, CHECKIN_REFRESH_AMOUNT, MS_PER_MINUTE = 60000, checkInState;
82581
+ var init_goalCheckIn = __esm(() => {
82582
+ GOAL_CHECKIN_BACKOFF_MULTIPLIERS = [1, 2, 4];
82583
+ MAX_GOAL_CHECKINS = GOAL_CHECKIN_BACKOFF_MULTIPLIERS.length;
82584
+ CHECKIN_REFRESH_AMOUNT = MAX_GOAL_CHECKINS;
82585
+ checkInState = { checkInCount: 0 };
82586
+ });
82587
+
82346
82588
  // src/engine/index.ts
82347
82589
  var init_engine = __esm(() => {
82348
82590
  init_query2();
@@ -82379,6 +82621,7 @@ var init_engine = __esm(() => {
82379
82621
  init_tasks2();
82380
82622
  init_messaging();
82381
82623
  init_goalState();
82624
+ init_goalCheckIn();
82382
82625
  });
82383
82626
 
82384
82627
  // src/cli/entryInit.ts
@@ -179712,6 +179955,7 @@ __export(exports_engineCompat, {
179712
179955
  BASH_TOOL_NAME: () => BASH_TOOL_NAME2,
179713
179956
  BING_DEFAULT_ENDPOINT: () => BING_DEFAULT_ENDPOINT,
179714
179957
  BashTool: () => BashTool,
179958
+ CHECKIN_REFRESH_AMOUNT: () => CHECKIN_REFRESH_AMOUNT,
179715
179959
  COMMAND_NAME_TAG: () => COMMAND_NAME_TAG,
179716
179960
  COMPACT_MAX_OUTPUT_TOKENS: () => COMPACT_MAX_OUTPUT_TOKENS,
179717
179961
  CONFIG_TOOL_NAME: () => CONFIG_TOOL_NAME,
@@ -179726,6 +179970,7 @@ __export(exports_engineCompat, {
179726
179970
  CronListTool: () => CronListTool,
179727
179971
  DEFAULT_AGENT_LOOP_MAX_TURNS: () => DEFAULT_AGENT_LOOP_MAX_TURNS,
179728
179972
  DEFAULT_CRON_JITTER_CONFIG: () => DEFAULT_CRON_JITTER_CONFIG,
179973
+ DEFAULT_GOAL_CHECKIN_MINUTES: () => DEFAULT_GOAL_CHECKIN_MINUTES,
179729
179974
  DEFAULT_MAX_GOAL_TURNS: () => DEFAULT_MAX_GOAL_TURNS,
179730
179975
  DEFAULT_SESSION_MEMORY_CONFIG: () => DEFAULT_SESSION_MEMORY_CONFIG,
179731
179976
  DEFAULT_TASKS_MODE_TASK_LIST_ID: () => DEFAULT_TASKS_MODE_TASK_LIST_ID,
@@ -179754,6 +179999,7 @@ __export(exports_engineCompat, {
179754
179999
  GENERAL_PURPOSE_AGENT: () => GENERAL_PURPOSE_AGENT,
179755
180000
  GIT_NO_PROMPT_ENV: () => GIT_NO_PROMPT_ENV,
179756
180001
  GLOB_TOOL_NAME: () => GLOB_TOOL_NAME,
180002
+ GOAL_CHECKIN_BACKOFF_MULTIPLIERS: () => GOAL_CHECKIN_BACKOFF_MULTIPLIERS,
179757
180003
  GREP_TOOL_NAME: () => GREP_TOOL_NAME,
179758
180004
  GlobTool: () => GlobTool,
179759
180005
  GrepTool: () => GrepTool,
@@ -179773,6 +180019,7 @@ __export(exports_engineCompat, {
179773
180019
  LocalShellTask: () => LocalShellTask,
179774
180020
  MANUAL_COMPACT_BUFFER_TOKENS: () => MANUAL_COMPACT_BUFFER_TOKENS,
179775
180021
  MAX_CONSECUTIVE_AUTOCOMPACT_FAILURES: () => MAX_CONSECUTIVE_AUTOCOMPACT_FAILURES,
180022
+ MAX_GOAL_CHECKINS: () => MAX_GOAL_CHECKINS,
179776
180023
  MAX_GOAL_CONDITION_CHARS: () => MAX_GOAL_CONDITION_CHARS,
179777
180024
  MAX_PTL_RETRIES: () => MAX_PTL_RETRIES,
179778
180025
  MAX_TRANSCRIPT_READ_BYTES: () => MAX_TRANSCRIPT_READ_BYTES,
@@ -179870,9 +180117,11 @@ __export(exports_engineCompat, {
179870
180117
  builtInCommandNames: () => builtInCommandNames2,
179871
180118
  cacheSessionTitle: () => cacheSessionTitle,
179872
180119
  calculateTokenWarningState: () => calculateTokenWarningState,
180120
+ canCheckIn: () => canCheckIn,
179873
180121
  captureHooksConfigSnapshot: () => captureHooksConfigSnapshot,
179874
180122
  check: () => check,
179875
180123
  claimTask: () => claimTask,
180124
+ classifyGoalError: () => classifyGoalError,
179876
180125
  classifyToolError: () => classifyToolError,
179877
180126
  cleanMessagesForLogging: () => cleanMessagesForLogging,
179878
180127
  cleanupStaleAgentWorktrees: () => cleanupStaleAgentWorktrees,
@@ -180000,6 +180249,8 @@ __export(exports_engineCompat, {
180000
180249
  getCachedMCModulePort: () => getCachedMCModulePort,
180001
180250
  getCachedParsedFile: () => getCachedParsedFile,
180002
180251
  getCachedSettingsForSource: () => getCachedSettingsForSource,
180252
+ getCheckInDelayMs: () => getCheckInDelayMs,
180253
+ getCheckInStateForTesting: () => getCheckInStateForTesting,
180003
180254
  getCommandQueue: () => getCommandQueue,
180004
180255
  getCommandQueueLength: () => getCommandQueueLength,
180005
180256
  getCommandQueueSnapshot: () => getCommandQueueSnapshot,
@@ -180024,7 +180275,9 @@ __export(exports_engineCompat, {
180024
180275
  getEntrypoint: () => getEntrypoint,
180025
180276
  getFirstMeaningfulUserMessageTextContent: () => getFirstMeaningfulUserMessageTextContent,
180026
180277
  getGitBranch: () => getGitBranch,
180278
+ getGoalCheckInMinutes: () => getGoalCheckInMinutes,
180027
180279
  getGoalCondition: () => getGoalCondition,
180280
+ getGoalPausedReason: () => getGoalPausedReason,
180028
180281
  getGoalStateForPersistence: () => getGoalStateForPersistence,
180029
180282
  getHooksConfigFromSnapshot: () => getHooksConfigFromSnapshot,
180030
180283
  getInboxPath: () => getInboxPath,
@@ -180048,6 +180301,7 @@ __export(exports_engineCompat, {
180048
180301
  getPrompt: () => getPrompt,
180049
180302
  getPromptTooLongTokenGap: () => getPromptTooLongTokenGap,
180050
180303
  getRelativeSettingsFilePathForSource: () => getRelativeSettingsFilePathForSource,
180304
+ getRemainingCheckIns: () => getRemainingCheckIns,
180051
180305
  getRunningTasks: () => getRunningTasks,
180052
180306
  getSchedulerEnv: () => getSchedulerEnv,
180053
180307
  getSessionContextPort: () => getSessionContextPort,
@@ -180086,9 +180340,13 @@ __export(exports_engineCompat, {
180086
180340
  getUserType: () => getUserType,
180087
180341
  getVersion: () => getVersion2,
180088
180342
  gitExe: () => gitExe,
180343
+ goalCheckInPrompt: () => goalCheckInPrompt,
180089
180344
  goalClearedNotification: () => goalClearedNotification,
180090
180345
  goalContinuationReminder: () => goalContinuationReminder,
180346
+ goalHookGateNotification: () => goalHookGateNotification,
180091
180347
  goalMetNotification: () => goalMetNotification,
180348
+ goalPausedNotification: () => goalPausedNotification,
180349
+ goalUnrecoverableNotification: () => goalUnrecoverableNotification,
180092
180350
  groupMessagesByApiRound: () => groupMessagesByApiRound,
180093
180351
  hasActiveInProcessTeammates: () => hasActiveInProcessTeammates,
180094
180352
  hasAutoModeOptIn: () => hasAutoModeOptIn,
@@ -180117,6 +180375,7 @@ __export(exports_engineCompat, {
180117
180375
  isEphemeralToolProgress: () => isEphemeralToolProgress,
180118
180376
  isForkSubagentEnabled: () => isForkSubagentEnabled,
180119
180377
  isGoalArmed: () => isGoalArmed,
180378
+ isGoalPaused: () => isGoalPaused,
180120
180379
  isHumanTurn: () => isHumanTurn,
180121
180380
  isIdleNotification: () => isIdleNotification,
180122
180381
  isInForkChild: () => isInForkChild,
@@ -180231,6 +180490,7 @@ __export(exports_engineCompat, {
180231
180490
  parseWorktreeListPorcelain: () => parseWorktreeListPorcelain,
180232
180491
  partialCompactConversation: () => partialCompactConversation,
180233
180492
  partitionToolCalls: () => partitionToolCalls,
180493
+ pauseGoal: () => pauseGoal,
180234
180494
  peek: () => peek,
180235
180495
  persistPermissionUpdate: () => persistPermissionUpdate,
180236
180496
  persistPermissionUpdates: () => persistPermissionUpdates,
@@ -180255,10 +180515,12 @@ __export(exports_engineCompat, {
180255
180515
  readWorktreeHeadSha: () => readWorktreeHeadSha,
180256
180516
  recheckCommandQueue: () => recheckCommandQueue,
180257
180517
  recheckPendingNotifications: () => recheckPendingNotifications,
180518
+ recordCheckIn: () => recordCheckIn,
180258
180519
  recordContentReplacement: () => recordContentReplacement,
180259
180520
  recordExtractionTokenCount: () => recordExtractionTokenCount,
180260
180521
  recordSidechainTranscript: () => recordSidechainTranscript,
180261
180522
  recordTranscript: () => recordTranscript,
180523
+ refreshOnUserMessage: () => refreshOnUserMessage,
180262
180524
  registerAgentForeground: () => registerAgentForeground,
180263
180525
  registerAsyncAgent: () => registerAsyncAgent,
180264
180526
  registerCleanup: () => registerCleanup2,
@@ -180276,6 +180538,7 @@ __export(exports_engineCompat, {
180276
180538
  reportAutoCompactCircuitFailures: () => reportAutoCompactCircuitFailures,
180277
180539
  resetAutoCompactCircuitForTesting: () => resetAutoCompactCircuitForTesting,
180278
180540
  resetBuiltinCommandNamesSourceForTesting: () => resetBuiltinCommandNamesSourceForTesting,
180541
+ resetCheckInState: () => resetCheckInState,
180279
180542
  resetCommandQueue: () => resetCommandQueue,
180280
180543
  resetDomainMountForTests: () => resetDomainMountForTests,
180281
180544
  resetGoalStateForTesting: () => resetGoalStateForTesting,
@@ -180308,6 +180571,7 @@ __export(exports_engineCompat, {
180308
180571
  restoreGoalState: () => restoreGoalState,
180309
180572
  restoreSessionMetadata: () => restoreSessionMetadata,
180310
180573
  restoreWorktreeSession: () => restoreWorktreeSession,
180574
+ resumeGoal: () => resumeGoal,
180311
180575
  roughTokenCountEstimation: () => roughTokenCountEstimation2,
180312
180576
  roughTokenCountEstimationForContent: () => roughTokenCountEstimationForContent,
180313
180577
  roughTokenCountEstimationForMessages: () => roughTokenCountEstimationForMessages,
@@ -411296,7 +411560,7 @@ var init_output_style2 = __esm(() => {
411296
411560
  });
411297
411561
 
411298
411562
  // src/tui/components/GoalOverlay.tsx
411299
- function GoalOverlay({
411563
+ function GoalOverlayInner({
411300
411564
  armed,
411301
411565
  condition,
411302
411566
  turns,
@@ -411335,11 +411599,13 @@ function GoalOverlay({
411335
411599
  ]
411336
411600
  }, undefined, true, undefined, this);
411337
411601
  }
411338
- var jsx_dev_runtime296;
411602
+ var React87, jsx_dev_runtime296, GoalOverlay;
411339
411603
  var init_GoalOverlay = __esm(() => {
411340
411604
  init_ink2();
411341
411605
  init_format2();
411606
+ React87 = __toESM(require_react(), 1);
411342
411607
  jsx_dev_runtime296 = __toESM(require_jsx_dev_runtime(), 1);
411608
+ GoalOverlay = React87.memo(GoalOverlayInner);
411343
411609
  });
411344
411610
 
411345
411611
  // src/tui/commands/goal/goal.tsx
@@ -414009,7 +414275,7 @@ function SetModelAndClose({
414009
414275
  }) {
414010
414276
  const setAppState = useSetAppState();
414011
414277
  const model = args === "default" ? null : args;
414012
- React90.useEffect(() => {
414278
+ React91.useEffect(() => {
414013
414279
  async function handleModelChange() {
414014
414280
  if (model && !isModelAllowed(model)) {
414015
414281
  onDone(`Model '${model}' is not available. Your organization restricts model selection.`, {
@@ -414096,7 +414362,7 @@ function renderModelLabel(model) {
414096
414362
  const rendered = renderDefaultModelSetting(model ?? getDefaultMainLoopModelSetting());
414097
414363
  return model === null ? `${rendered} (default)` : rendered;
414098
414364
  }
414099
- var import_compiler_runtime237, React90, jsx_dev_runtime309, call57 = async (onDone, _context, args) => {
414365
+ var import_compiler_runtime237, React91, jsx_dev_runtime309, call57 = async (onDone, _context, args) => {
414100
414366
  args = args?.trim() || "";
414101
414367
  if (COMMON_INFO_ARGS.includes(args)) {
414102
414368
  return /* @__PURE__ */ jsx_dev_runtime309.jsxDEV(ShowModelAndClose, {
@@ -414131,7 +414397,7 @@ var init_model2 = __esm(() => {
414131
414397
  init_validateModel();
414132
414398
  init_modelSwitchHooks();
414133
414399
  import_compiler_runtime237 = __toESM(require_compiler_runtime(), 1);
414134
- React90 = __toESM(require_react(), 1);
414400
+ React91 = __toESM(require_react(), 1);
414135
414401
  jsx_dev_runtime309 = __toESM(require_jsx_dev_runtime(), 1);
414136
414402
  });
414137
414403
 
@@ -414239,8 +414505,8 @@ function ToggleTagAndClose(t0) {
414239
414505
  tagName,
414240
414506
  onDone
414241
414507
  } = t0;
414242
- const [showConfirm, setShowConfirm] = React91.useState(false);
414243
- const [sessionId, setSessionId] = React91.useState(null);
414508
+ const [showConfirm, setShowConfirm] = React92.useState(false);
414509
+ const [sessionId, setSessionId] = React92.useState(null);
414244
414510
  let t1;
414245
414511
  if ($[0] !== tagName) {
414246
414512
  t1 = recursivelySanitizeUnicode2(tagName).trim();
@@ -414291,7 +414557,7 @@ function ToggleTagAndClose(t0) {
414291
414557
  t2 = $[4];
414292
414558
  t3 = $[5];
414293
414559
  }
414294
- React91.useEffect(t2, t3);
414560
+ React92.useEffect(t2, t3);
414295
414561
  if (showConfirm && sessionId) {
414296
414562
  let t4;
414297
414563
  if ($[6] !== normalizedTag || $[7] !== onDone || $[8] !== sessionId) {
@@ -414371,7 +414637,7 @@ Examples:
414371
414637
  t1 = $[1];
414372
414638
  t2 = $[2];
414373
414639
  }
414374
- React91.useEffect(t1, t2);
414640
+ React92.useEffect(t1, t2);
414375
414641
  return null;
414376
414642
  }
414377
414643
  async function call58(onDone, _context, args) {
@@ -414391,7 +414657,7 @@ async function call58(onDone, _context, args) {
414391
414657
  onDone
414392
414658
  }, undefined, false, undefined, this);
414393
414659
  }
414394
- var import_compiler_runtime238, React91, jsx_dev_runtime310;
414660
+ var import_compiler_runtime238, React92, jsx_dev_runtime310;
414395
414661
  var init_tag = __esm(() => {
414396
414662
  init_source2();
414397
414663
  init_bootstrap();
@@ -414401,7 +414667,7 @@ var init_tag = __esm(() => {
414401
414667
  init_ink2();
414402
414668
  init_sessionStorage();
414403
414669
  import_compiler_runtime238 = __toESM(require_compiler_runtime(), 1);
414404
- React91 = __toESM(require_react(), 1);
414670
+ React92 = __toESM(require_react(), 1);
414405
414671
  jsx_dev_runtime310 = __toESM(require_jsx_dev_runtime(), 1);
414406
414672
  });
414407
414673
 
@@ -414592,7 +414858,7 @@ function ApplyEffortAndClose(t0) {
414592
414858
  t1 = $[4];
414593
414859
  t2 = $[5];
414594
414860
  }
414595
- React92.useEffect(t1, t2);
414861
+ React93.useEffect(t1, t2);
414596
414862
  return null;
414597
414863
  }
414598
414864
  async function call59(onDone, _context, args) {
@@ -414620,14 +414886,14 @@ Effort levels:
414620
414886
  onDone
414621
414887
  }, undefined, false, undefined, this);
414622
414888
  }
414623
- var import_compiler_runtime239, React92, jsx_dev_runtime311, COMMON_HELP_ARGS2;
414889
+ var import_compiler_runtime239, React93, jsx_dev_runtime311, COMMON_HELP_ARGS2;
414624
414890
  var init_effort3 = __esm(() => {
414625
414891
  init_useMainLoopModel();
414626
414892
  init_AppState();
414627
414893
  init_effort2();
414628
414894
  init_settings3();
414629
414895
  import_compiler_runtime239 = __toESM(require_compiler_runtime(), 1);
414630
- React92 = __toESM(require_react(), 1);
414896
+ React93 = __toESM(require_react(), 1);
414631
414897
  jsx_dev_runtime311 = __toESM(require_jsx_dev_runtime(), 1);
414632
414898
  COMMON_HELP_ARGS2 = ["help", "-h", "--help"];
414633
414899
  });
@@ -449960,7 +450226,7 @@ function AutoUpdater({
449960
450226
  }, []);
449961
450227
  const isUpdatingRef = import_react204.useRef(isUpdating);
449962
450228
  isUpdatingRef.current = isUpdating;
449963
- const checkForUpdates = React109.useCallback(async () => {
450229
+ const checkForUpdates = React110.useCallback(async () => {
449964
450230
  if (isUpdatingRef.current) {
449965
450231
  return;
449966
450232
  }
@@ -450091,7 +450357,7 @@ function AutoUpdater({
450091
450357
  ]
450092
450358
  }, undefined, true, undefined, this);
450093
450359
  }
450094
- var React109, import_react204, jsx_dev_runtime358;
450360
+ var React110, import_react204, jsx_dev_runtime358;
450095
450361
  var init_AutoUpdater = __esm(() => {
450096
450362
  init_dist3();
450097
450363
  init_useUpdateNotification();
@@ -450103,7 +450369,7 @@ var init_AutoUpdater = __esm(() => {
450103
450369
  init_localInstaller();
450104
450370
  init_nativeInstaller();
450105
450371
  init_settings3();
450106
- React109 = __toESM(require_react(), 1);
450372
+ React110 = __toESM(require_react(), 1);
450107
450373
  import_react204 = __toESM(require_react(), 1);
450108
450374
  jsx_dev_runtime358 = __toESM(require_jsx_dev_runtime(), 1);
450109
450375
  });
@@ -450147,7 +450413,7 @@ function NativeAutoUpdater({
450147
450413
  const channel = getInitialSettings2()?.autoUpdatesChannel ?? "latest";
450148
450414
  const isUpdatingRef = import_react205.useRef(isUpdating);
450149
450415
  isUpdatingRef.current = isUpdating;
450150
- const checkForUpdates = React110.useCallback(async () => {
450416
+ const checkForUpdates = React111.useCallback(async () => {
450151
450417
  if (isUpdatingRef.current) {
450152
450418
  return;
450153
450419
  }
@@ -450243,7 +450509,7 @@ function NativeAutoUpdater({
450243
450509
  ]
450244
450510
  }, undefined, true, undefined, this);
450245
450511
  }
450246
- var React110, import_react205, jsx_dev_runtime359;
450512
+ var React111, import_react205, jsx_dev_runtime359;
450247
450513
  var init_NativeAutoUpdater = __esm(() => {
450248
450514
  init_debug();
450249
450515
  init_log5();
@@ -450254,7 +450520,7 @@ var init_NativeAutoUpdater = __esm(() => {
450254
450520
  init_config6();
450255
450521
  init_nativeInstaller();
450256
450522
  init_settings3();
450257
- React110 = __toESM(require_react(), 1);
450523
+ React111 = __toESM(require_react(), 1);
450258
450524
  import_react205 = __toESM(require_react(), 1);
450259
450525
  jsx_dev_runtime359 = __toESM(require_jsx_dev_runtime(), 1);
450260
450526
  });
@@ -450310,7 +450576,7 @@ function PackageManagerAutoUpdater(t0) {
450310
450576
  t2 = $[1];
450311
450577
  t3 = $[2];
450312
450578
  }
450313
- React111.useEffect(t2, t3);
450579
+ React112.useEffect(t2, t3);
450314
450580
  useInterval(checkForUpdates, 1800000);
450315
450581
  if (!updateAvailable) {
450316
450582
  return null;
@@ -450365,7 +450631,7 @@ function PackageManagerAutoUpdater(t0) {
450365
450631
  }
450366
450632
  return t6;
450367
450633
  }
450368
- var import_compiler_runtime278, React111, import_react206, jsx_dev_runtime360;
450634
+ var import_compiler_runtime278, React112, import_react206, jsx_dev_runtime360;
450369
450635
  var init_PackageManagerAutoUpdater = __esm(() => {
450370
450636
  init_dist3();
450371
450637
  init_ink2();
@@ -450375,7 +450641,7 @@ var init_PackageManagerAutoUpdater = __esm(() => {
450375
450641
  init_packageManagers();
450376
450642
  init_settings3();
450377
450643
  import_compiler_runtime278 = __toESM(require_compiler_runtime(), 1);
450378
- React111 = __toESM(require_react(), 1);
450644
+ React112 = __toESM(require_react(), 1);
450379
450645
  import_react206 = __toESM(require_react(), 1);
450380
450646
  jsx_dev_runtime360 = __toESM(require_jsx_dev_runtime(), 1);
450381
450647
  });
@@ -450391,8 +450657,8 @@ function AutoUpdaterWrapper(t0) {
450391
450657
  showSuccessMessage,
450392
450658
  verbose
450393
450659
  } = t0;
450394
- const [useNativeInstaller, setUseNativeInstaller] = React112.useState(null);
450395
- const [isPackageManager, setIsPackageManager] = React112.useState(null);
450660
+ const [useNativeInstaller, setUseNativeInstaller] = React113.useState(null);
450661
+ const [isPackageManager, setIsPackageManager] = React113.useState(null);
450396
450662
  let t1;
450397
450663
  let t2;
450398
450664
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
@@ -450416,7 +450682,7 @@ function AutoUpdaterWrapper(t0) {
450416
450682
  t1 = $[0];
450417
450683
  t2 = $[1];
450418
450684
  }
450419
- React112.useEffect(t1, t2);
450685
+ React113.useEffect(t1, t2);
450420
450686
  if (useNativeInstaller === null || isPackageManager === null) {
450421
450687
  return null;
450422
450688
  }
@@ -450467,7 +450733,7 @@ function AutoUpdaterWrapper(t0) {
450467
450733
  }
450468
450734
  return t3;
450469
450735
  }
450470
- var import_compiler_runtime279, React112, jsx_dev_runtime361;
450736
+ var import_compiler_runtime279, React113, jsx_dev_runtime361;
450471
450737
  var init_AutoUpdaterWrapper = __esm(() => {
450472
450738
  init_shared();
450473
450739
  init_config6();
@@ -450477,7 +450743,7 @@ var init_AutoUpdaterWrapper = __esm(() => {
450477
450743
  init_NativeAutoUpdater();
450478
450744
  init_PackageManagerAutoUpdater();
450479
450745
  import_compiler_runtime279 = __toESM(require_compiler_runtime(), 1);
450480
- React112 = __toESM(require_react(), 1);
450746
+ React113 = __toESM(require_react(), 1);
450481
450747
  jsx_dev_runtime361 = __toESM(require_jsx_dev_runtime(), 1);
450482
450748
  });
450483
450749
 
@@ -455748,7 +456014,7 @@ function useCoordinatorTaskCount() {
455748
456014
  function _temp164(s) {
455749
456015
  return s.tasks;
455750
456016
  }
455751
- var import_compiler_runtime286, React115;
456017
+ var import_compiler_runtime286, React116;
455752
456018
  var init_CoordinatorAgentStatus = __esm(() => {
455753
456019
  init_figures2();
455754
456020
  init_useTerminalSize();
@@ -455761,7 +456027,7 @@ var init_CoordinatorAgentStatus = __esm(() => {
455761
456027
  init_framework2();
455762
456028
  init_taskStatusUtils();
455763
456029
  import_compiler_runtime286 = __toESM(require_compiler_runtime(), 1);
455764
- React115 = __toESM(require_react(), 1);
456030
+ React116 = __toESM(require_react(), 1);
455765
456031
  });
455766
456032
 
455767
456033
  // src/tui/utils/highlightMatch.tsx
@@ -459535,9 +459801,9 @@ var init_gitStore = __esm(() => {
459535
459801
  });
459536
459802
 
459537
459803
  // src/tui/components/StatusLine/segments/GitBranchSegment.tsx
459538
- var React118, import_react225, jsx_dev_runtime387, GitBranchSegment = () => {
459804
+ var React119, import_react225, jsx_dev_runtime387, GitBranchSegment = () => {
459539
459805
  const gitState = import_react225.useSyncExternalStore(subscribeToGitState, getGitSnapshot);
459540
- const ref = React118.useRef(false);
459806
+ const ref = React119.useRef(false);
459541
459807
  if (!ref.current) {
459542
459808
  ref.current = true;
459543
459809
  refreshGitState();
@@ -459565,15 +459831,15 @@ var React118, import_react225, jsx_dev_runtime387, GitBranchSegment = () => {
459565
459831
  var init_GitBranchSegment = __esm(() => {
459566
459832
  init_ink2();
459567
459833
  init_gitStore();
459568
- React118 = __toESM(require_react(), 1);
459834
+ React119 = __toESM(require_react(), 1);
459569
459835
  import_react225 = __toESM(require_react(), 1);
459570
459836
  jsx_dev_runtime387 = __toESM(require_jsx_dev_runtime(), 1);
459571
459837
  });
459572
459838
 
459573
459839
  // src/tui/components/StatusLine/segments/GitFilesSegment.tsx
459574
- var React119, import_react226, jsx_dev_runtime388, GitFilesSegment = () => {
459840
+ var React120, import_react226, jsx_dev_runtime388, GitFilesSegment = () => {
459575
459841
  const gitState = import_react226.useSyncExternalStore(subscribeToGitState, getGitSnapshot);
459576
- const ref = React119.useRef(false);
459842
+ const ref = React120.useRef(false);
459577
459843
  if (!ref.current) {
459578
459844
  ref.current = true;
459579
459845
  refreshGitState();
@@ -459595,15 +459861,15 @@ var React119, import_react226, jsx_dev_runtime388, GitFilesSegment = () => {
459595
459861
  var init_GitFilesSegment = __esm(() => {
459596
459862
  init_ink2();
459597
459863
  init_gitStore();
459598
- React119 = __toESM(require_react(), 1);
459864
+ React120 = __toESM(require_react(), 1);
459599
459865
  import_react226 = __toESM(require_react(), 1);
459600
459866
  jsx_dev_runtime388 = __toESM(require_jsx_dev_runtime(), 1);
459601
459867
  });
459602
459868
 
459603
459869
  // src/tui/components/StatusLine/segments/GitCombinedSegment.tsx
459604
- var React120, import_react227, jsx_dev_runtime389, GitCombinedSegment = () => {
459870
+ var React121, import_react227, jsx_dev_runtime389, GitCombinedSegment = () => {
459605
459871
  const gitState = import_react227.useSyncExternalStore(subscribeToGitState, getGitSnapshot);
459606
- const ref = React120.useRef(false);
459872
+ const ref = React121.useRef(false);
459607
459873
  if (!ref.current) {
459608
459874
  ref.current = true;
459609
459875
  refreshGitState();
@@ -459632,7 +459898,7 @@ var React120, import_react227, jsx_dev_runtime389, GitCombinedSegment = () => {
459632
459898
  var init_GitCombinedSegment = __esm(() => {
459633
459899
  init_ink2();
459634
459900
  init_gitStore();
459635
- React120 = __toESM(require_react(), 1);
459901
+ React121 = __toESM(require_react(), 1);
459636
459902
  import_react227 = __toESM(require_react(), 1);
459637
459903
  jsx_dev_runtime389 = __toESM(require_jsx_dev_runtime(), 1);
459638
459904
  });
@@ -459780,18 +460046,27 @@ var init_SessionDurationSegment = __esm(() => {
459780
460046
  });
459781
460047
 
459782
460048
  // src/tui/components/StatusLine/segments/GoalSegment.tsx
459783
- var jsx_dev_runtime395, GOAL_PREFIX = "\uD83C\uDFAF ", MAX_GOAL_DISPLAY_CHARS = 40, GoalSegment = () => {
459784
- if (!isGoalArmed())
459785
- return null;
459786
- const condition = getGoalCondition() ?? "";
459787
- const truncated = truncateToWidth3(condition, MAX_GOAL_DISPLAY_CHARS);
459788
- return /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedText, {
459789
- color: "yellow",
459790
- children: [
459791
- GOAL_PREFIX,
459792
- truncated
459793
- ]
459794
- }, undefined, true, undefined, this);
460049
+ var jsx_dev_runtime395, GOAL_PREFIX = "\uD83C\uDFAF ", MAX_GOAL_DISPLAY_CHARS = 40, _cachedArmed = false, _cachedCondition, _cachedNode = null, GoalSegment = () => {
460050
+ const armed = isGoalArmed();
460051
+ const condition = getGoalCondition();
460052
+ if (armed === _cachedArmed && condition === _cachedCondition) {
460053
+ return _cachedNode;
460054
+ }
460055
+ _cachedArmed = armed;
460056
+ _cachedCondition = condition;
460057
+ if (!armed) {
460058
+ _cachedNode = null;
460059
+ } else {
460060
+ const truncated = truncateToWidth3(condition ?? "", MAX_GOAL_DISPLAY_CHARS);
460061
+ _cachedNode = /* @__PURE__ */ jsx_dev_runtime395.jsxDEV(ThemedText, {
460062
+ color: "yellow",
460063
+ children: [
460064
+ GOAL_PREFIX,
460065
+ truncated
460066
+ ]
460067
+ }, undefined, true, undefined, this);
460068
+ }
460069
+ return _cachedNode;
459795
460070
  };
459796
460071
  var init_GoalSegment = __esm(() => {
459797
460072
  init_ink2();
@@ -460219,9 +460494,9 @@ function StatusLineInner({
460219
460494
  ]
460220
460495
  }, undefined, true, undefined, this);
460221
460496
  }
460222
- const handleMouseEnter = React121.useCallback(() => setHover(true), []);
460223
- const handleMouseLeave = React121.useCallback(() => setHover(false), []);
460224
- const handleClick = React121.useCallback(() => toggleDensity(), []);
460497
+ const handleMouseEnter = React122.useCallback(() => setHover(true), []);
460498
+ const handleMouseLeave = React122.useCallback(() => setHover(false), []);
460499
+ const handleClick = React122.useCallback(() => toggleDensity(), []);
460225
460500
  const hoverHint = hovered && useChannelB ? /* @__PURE__ */ jsx_dev_runtime396.jsxDEV(ThemedText, {
460226
460501
  dimColor: true,
460227
460502
  children: [
@@ -460250,7 +460525,7 @@ function StatusLineInner({
460250
460525
  ]
460251
460526
  }, undefined, true, undefined, this);
460252
460527
  }
460253
- var React121, import_react228, jsx_dev_runtime396, StatusLine;
460528
+ var React122, import_react228, jsx_dev_runtime396, StatusLine;
460254
460529
  var init_StatusLine = __esm(() => {
460255
460530
  init_AppState();
460256
460531
  init_bootstrap();
@@ -460277,7 +460552,7 @@ var init_StatusLine = __esm(() => {
460277
460552
  init_statusLineConfig();
460278
460553
  init_densityStore();
460279
460554
  init_useTerminalSize();
460280
- React121 = __toESM(require_react(), 1);
460555
+ React122 = __toESM(require_react(), 1);
460281
460556
  import_react228 = __toESM(require_react(), 1);
460282
460557
  jsx_dev_runtime396 = __toESM(require_jsx_dev_runtime(), 1);
460283
460558
  StatusLine = import_react228.memo(StatusLineInner);
@@ -460627,7 +460902,7 @@ function BackgroundTaskStatus(t0) {
460627
460902
  if ($[25] !== selectedIdx || $[26] !== setAppState || $[27] !== viewedIdx || $[28] !== visiblePills) {
460628
460903
  t13 = visiblePills.map((pill_1, i_1) => {
460629
460904
  const needsSeparator = i_1 > 0;
460630
- return /* @__PURE__ */ jsx_dev_runtime398.jsxDEV(React122.Fragment, {
460905
+ return /* @__PURE__ */ jsx_dev_runtime398.jsxDEV(React123.Fragment, {
460631
460906
  children: [
460632
460907
  needsSeparator && /* @__PURE__ */ jsx_dev_runtime398.jsxDEV(ThemedText, {
460633
460908
  children: " "
@@ -460997,7 +461272,7 @@ function getAgentThemeColor(colorName) {
460997
461272
  }
460998
461273
  return;
460999
461274
  }
461000
- var import_compiler_runtime293, React122, import_react231, jsx_dev_runtime398;
461275
+ var import_compiler_runtime293, React123, import_react231, jsx_dev_runtime398;
461001
461276
  var init_BackgroundTaskStatus = __esm(() => {
461002
461277
  init_figures();
461003
461278
  init_useTerminalSize();
@@ -461012,7 +461287,7 @@ var init_BackgroundTaskStatus = __esm(() => {
461012
461287
  init_KeyboardShortcutHint();
461013
461288
  init_taskStatusUtils();
461014
461289
  import_compiler_runtime293 = __toESM(require_compiler_runtime(), 1);
461015
- React122 = __toESM(require_react(), 1);
461290
+ React123 = __toESM(require_react(), 1);
461016
461291
  import_react231 = __toESM(require_react(), 1);
461017
461292
  jsx_dev_runtime398 = __toESM(require_jsx_dev_runtime(), 1);
461018
461293
  });
@@ -462123,7 +462398,7 @@ function PromptInputQueuedCommandsImpl() {
462123
462398
  }, i, false, undefined, this))
462124
462399
  }, undefined, false, undefined, this);
462125
462400
  }
462126
- var React123, import_react235, jsx_dev_runtime404, EMPTY_SET2, MAX_VISIBLE_NOTIFICATIONS = 3, PromptInputQueuedCommands;
462401
+ var React124, import_react235, jsx_dev_runtime404, EMPTY_SET2, MAX_VISIBLE_NOTIFICATIONS = 3, PromptInputQueuedCommands;
462127
462402
  var init_PromptInputQueuedCommands = __esm(() => {
462128
462403
  init_ink2();
462129
462404
  init_AppState();
@@ -462134,11 +462409,11 @@ var init_PromptInputQueuedCommands = __esm(() => {
462134
462409
  init_messages3();
462135
462410
  init_slowOperations();
462136
462411
  init_Message();
462137
- React123 = __toESM(require_react(), 1);
462412
+ React124 = __toESM(require_react(), 1);
462138
462413
  import_react235 = __toESM(require_react(), 1);
462139
462414
  jsx_dev_runtime404 = __toESM(require_jsx_dev_runtime(), 1);
462140
462415
  EMPTY_SET2 = new Set;
462141
- PromptInputQueuedCommands = React123.memo(PromptInputQueuedCommandsImpl);
462416
+ PromptInputQueuedCommands = React124.memo(PromptInputQueuedCommandsImpl);
462142
462417
  });
462143
462418
 
462144
462419
  // src/tui/components/PromptInput/PromptInputStashNotice.tsx
@@ -462455,8 +462730,8 @@ function useSwarmBanner() {
462455
462730
  const agent = useAppState((s) => s.agent);
462456
462731
  useAppState((s) => s.viewingAgentTaskId);
462457
462732
  const store = useAppStateStore();
462458
- const [insideTmux, setInsideTmux] = React124.useState(null);
462459
- React124.useEffect(() => {
462733
+ const [insideTmux, setInsideTmux] = React125.useState(null);
462734
+ React125.useEffect(() => {
462460
462735
  isInsideTmux3().then(setInsideTmux);
462461
462736
  }, []);
462462
462737
  const state = store.getState();
@@ -462523,7 +462798,7 @@ function useSwarmBanner() {
462523
462798
  function toThemeColor(colorName, fallback = "cyan_FOR_SUBAGENTS_ONLY") {
462524
462799
  return colorName && AGENT_COLORS2.includes(colorName) ? AGENT_COLOR_TO_THEME_COLOR[colorName] : fallback;
462525
462800
  }
462526
- var React124;
462801
+ var React125;
462527
462802
  var init_useSwarmBanner = __esm(() => {
462528
462803
  init_AppState();
462529
462804
  init_selectors();
@@ -462533,7 +462808,7 @@ var init_useSwarmBanner = __esm(() => {
462533
462808
  init_registry3();
462534
462809
  init_teammate2();
462535
462810
  init_teammateContext3();
462536
- React124 = __toESM(require_react(), 1);
462811
+ React125 = __toESM(require_react(), 1);
462537
462812
  });
462538
462813
 
462539
462814
  // src/tui/components/PromptInput/PromptInput.tsx
@@ -462589,12 +462864,12 @@ function PromptInput({
462589
462864
  show: false
462590
462865
  });
462591
462866
  const [cursorOffset, setCursorOffset] = import_react238.useState(input.length);
462592
- const lastInternalInputRef = React125.useRef(input);
462867
+ const lastInternalInputRef = React126.useRef(input);
462593
462868
  if (input !== lastInternalInputRef.current) {
462594
462869
  setCursorOffset(input.length);
462595
462870
  lastInternalInputRef.current = input;
462596
462871
  }
462597
- const trackAndSetInput = React125.useCallback((value) => {
462872
+ const trackAndSetInput = React126.useCallback((value) => {
462598
462873
  lastInternalInputRef.current = value;
462599
462874
  onInputChange(value);
462600
462875
  }, [onInputChange]);
@@ -464249,7 +464524,7 @@ function getInitialPasteId(messages) {
464249
464524
  }
464250
464525
  return maxId + 1;
464251
464526
  }
464252
- var React125, import_react238, jsx_dev_runtime406, PROMPT_FOOTER_LINES = 5, MIN_INPUT_VIEWPORT_LINES = 3, PromptInput_default;
464527
+ var React126, import_react238, jsx_dev_runtime406, PROMPT_FOOTER_LINES = 5, MIN_INPUT_VIEWPORT_LINES = 3, PromptInput_default;
464253
464528
  var init_PromptInput = __esm(() => {
464254
464529
  init_shared();
464255
464530
  init_notifications();
@@ -464336,10 +464611,10 @@ var init_PromptInput = __esm(() => {
464336
464611
  init_usePromptInputPlaceholder();
464337
464612
  init_useSwarmBanner();
464338
464613
  init_utils11();
464339
- React125 = __toESM(require_react(), 1);
464614
+ React126 = __toESM(require_react(), 1);
464340
464615
  import_react238 = __toESM(require_react(), 1);
464341
464616
  jsx_dev_runtime406 = __toESM(require_jsx_dev_runtime(), 1);
464342
- PromptInput_default = React125.memo(PromptInput);
464617
+ PromptInput_default = React126.memo(PromptInput);
464343
464618
  });
464344
464619
 
464345
464620
  // src/tui/utils/hooks/apiQueryHookHelper.ts
@@ -472574,7 +472849,7 @@ function useLspInitializationNotification() {
472574
472849
  addNotification
472575
472850
  } = useNotifications();
472576
472851
  const setAppState = useSetAppState();
472577
- const [shouldPoll, setShouldPoll] = React126.useState(_temp183);
472852
+ const [shouldPoll, setShouldPoll] = React127.useState(_temp183);
472578
472853
  let t0;
472579
472854
  if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
472580
472855
  t0 = new Set;
@@ -472582,7 +472857,7 @@ function useLspInitializationNotification() {
472582
472857
  } else {
472583
472858
  t0 = $[0];
472584
472859
  }
472585
- const notifiedErrorsRef = React126.useRef(t0);
472860
+ const notifiedErrorsRef = React127.useRef(t0);
472586
472861
  let t1;
472587
472862
  if ($[1] !== addNotification || $[2] !== setAppState) {
472588
472863
  t1 = (source, errorMessage) => {
@@ -472693,7 +472968,7 @@ function useLspInitializationNotification() {
472693
472968
  t3 = $[8];
472694
472969
  t4 = $[9];
472695
472970
  }
472696
- React126.useEffect(t3, t4);
472971
+ React127.useEffect(t3, t4);
472697
472972
  }
472698
472973
  function _temp280(e) {
472699
472974
  if (e.type === "generic-error") {
@@ -472704,7 +472979,7 @@ function _temp280(e) {
472704
472979
  function _temp183() {
472705
472980
  return isEnvTruthy2("true");
472706
472981
  }
472707
- var import_compiler_runtime308, React126, jsx_dev_runtime418, LSP_POLL_INTERVAL_MS = 5000;
472982
+ var import_compiler_runtime308, React127, jsx_dev_runtime418, LSP_POLL_INTERVAL_MS = 5000;
472708
472983
  var init_useLspInitializationNotification = __esm(() => {
472709
472984
  init_dist3();
472710
472985
  init_bootstrapState();
@@ -472715,7 +472990,7 @@ var init_useLspInitializationNotification = __esm(() => {
472715
472990
  init_debug();
472716
472991
  init_envUtils2();
472717
472992
  import_compiler_runtime308 = __toESM(require_compiler_runtime(), 1);
472718
- React126 = __toESM(require_react(), 1);
472993
+ React127 = __toESM(require_react(), 1);
472719
472994
  jsx_dev_runtime418 = __toESM(require_jsx_dev_runtime(), 1);
472720
472995
  });
472721
472996
 
@@ -472928,8 +473203,8 @@ var init_lspRecommendation = __esm(() => {
472928
473203
  // src/tui/hooks/usePluginRecommendationBase.tsx
472929
473204
  function usePluginRecommendationBase() {
472930
473205
  const $ = import_compiler_runtime309.c(6);
472931
- const [recommendation, setRecommendation] = React127.useState(null);
472932
- const isCheckingRef = React127.useRef(false);
473206
+ const [recommendation, setRecommendation] = React128.useState(null);
473207
+ const isCheckingRef = React128.useRef(false);
472933
473208
  let t0;
472934
473209
  if ($[0] !== recommendation) {
472935
473210
  t0 = (resolve) => {
@@ -473017,7 +473292,7 @@ async function installPluginAndNotify(pluginId, pluginName, keyPrefix, addNotifi
473017
473292
  });
473018
473293
  }
473019
473294
  }
473020
- var import_compiler_runtime309, React127, jsx_dev_runtime419;
473295
+ var import_compiler_runtime309, React128, jsx_dev_runtime419;
473021
473296
  var init_usePluginRecommendationBase = __esm(() => {
473022
473297
  init_figures();
473023
473298
  init_bootstrapState();
@@ -473025,7 +473300,7 @@ var init_usePluginRecommendationBase = __esm(() => {
473025
473300
  init_log5();
473026
473301
  init_marketplaceManager();
473027
473302
  import_compiler_runtime309 = __toESM(require_compiler_runtime(), 1);
473028
- React127 = __toESM(require_react(), 1);
473303
+ React128 = __toESM(require_react(), 1);
473029
473304
  jsx_dev_runtime419 = __toESM(require_jsx_dev_runtime(), 1);
473030
473305
  });
473031
473306
 
@@ -473044,7 +473319,7 @@ function useLspPluginRecommendation() {
473044
473319
  } else {
473045
473320
  t0 = $[0];
473046
473321
  }
473047
- const checkedFilesRef = React128.useRef(t0);
473322
+ const checkedFilesRef = React129.useRef(t0);
473048
473323
  const {
473049
473324
  recommendation,
473050
473325
  clearRecommendation,
@@ -473097,7 +473372,7 @@ function useLspPluginRecommendation() {
473097
473372
  t1 = $[3];
473098
473373
  t2 = $[4];
473099
473374
  }
473100
- React128.useEffect(t1, t2);
473375
+ React129.useEffect(t1, t2);
473101
473376
  let t3;
473102
473377
  if ($[5] !== addNotification || $[6] !== clearRecommendation || $[7] !== recommendation) {
473103
473378
  t3 = (response) => {
@@ -473180,7 +473455,7 @@ function _temp281(current) {
473180
473455
  function _temp184(s) {
473181
473456
  return s.fileHistory.trackedFiles;
473182
473457
  }
473183
- var import_compiler_runtime310, React128, TIMEOUT_THRESHOLD_MS = 28000;
473458
+ var import_compiler_runtime310, React129, TIMEOUT_THRESHOLD_MS = 28000;
473184
473459
  var init_useLspPluginRecommendation = __esm(() => {
473185
473460
  init_bootstrapState();
473186
473461
  init_notifications();
@@ -473193,7 +473468,7 @@ var init_useLspPluginRecommendation = __esm(() => {
473193
473468
  init_settings3();
473194
473469
  init_usePluginRecommendationBase();
473195
473470
  import_compiler_runtime310 = __toESM(require_compiler_runtime(), 1);
473196
- React128 = __toESM(require_react(), 1);
473471
+ React129 = __toESM(require_react(), 1);
473197
473472
  });
473198
473473
 
473199
473474
  // src/tui/components/LspRecommendation/LspRecommendationMenu.tsx
@@ -473203,9 +473478,9 @@ function LspRecommendationMenu({
473203
473478
  fileExtension,
473204
473479
  onResponse
473205
473480
  }) {
473206
- const onResponseRef = React129.useRef(onResponse);
473481
+ const onResponseRef = React130.useRef(onResponse);
473207
473482
  onResponseRef.current = onResponse;
473208
- React129.useEffect(() => {
473483
+ React130.useEffect(() => {
473209
473484
  const timeoutId = setTimeout((ref) => ref.current("no"), AUTO_DISMISS_MS, onResponseRef);
473210
473485
  return () => clearTimeout(timeoutId);
473211
473486
  }, []);
@@ -473320,19 +473595,19 @@ function LspRecommendationMenu({
473320
473595
  }, undefined, true, undefined, this)
473321
473596
  }, undefined, false, undefined, this);
473322
473597
  }
473323
- var React129, jsx_dev_runtime420, AUTO_DISMISS_MS = 30000;
473598
+ var React130, jsx_dev_runtime420, AUTO_DISMISS_MS = 30000;
473324
473599
  var init_LspRecommendationMenu = __esm(() => {
473325
473600
  init_ink2();
473326
473601
  init_select();
473327
473602
  init_PermissionDialog();
473328
- React129 = __toESM(require_react(), 1);
473603
+ React130 = __toESM(require_react(), 1);
473329
473604
  jsx_dev_runtime420 = __toESM(require_jsx_dev_runtime(), 1);
473330
473605
  });
473331
473606
 
473332
473607
  // src/tui/hooks/useAtlasCodeHintRecommendation.tsx
473333
473608
  function useAtlasCodeHintRecommendation() {
473334
473609
  const $ = import_compiler_runtime311.c(11);
473335
- const pendingHint = React130.useSyncExternalStore(subscribeToPendingHint, getPendingHintSnapshot);
473610
+ const pendingHint = React131.useSyncExternalStore(subscribeToPendingHint, getPendingHintSnapshot);
473336
473611
  const {
473337
473612
  addNotification
473338
473613
  } = useNotifications();
@@ -473369,7 +473644,7 @@ function useAtlasCodeHintRecommendation() {
473369
473644
  t0 = $[2];
473370
473645
  t1 = $[3];
473371
473646
  }
473372
- React130.useEffect(t0, t1);
473647
+ React131.useEffect(t0, t1);
473373
473648
  let t2;
473374
473649
  if ($[4] !== addNotification || $[5] !== clearRecommendation || $[6] !== recommendation) {
473375
473650
  t2 = (response) => {
@@ -473429,7 +473704,7 @@ function useAtlasCodeHintRecommendation() {
473429
473704
  }
473430
473705
  return t3;
473431
473706
  }
473432
- var import_compiler_runtime311, React130;
473707
+ var import_compiler_runtime311, React131;
473433
473708
  var init_useAtlasCodeHintRecommendation = __esm(() => {
473434
473709
  init_notifications();
473435
473710
  init_atlasCodeHints();
@@ -473438,7 +473713,7 @@ var init_useAtlasCodeHintRecommendation = __esm(() => {
473438
473713
  init_pluginInstallationHelpers();
473439
473714
  init_usePluginRecommendationBase();
473440
473715
  import_compiler_runtime311 = __toESM(require_compiler_runtime(), 1);
473441
- React130 = __toESM(require_react(), 1);
473716
+ React131 = __toESM(require_react(), 1);
473442
473717
  });
473443
473718
 
473444
473719
  // src/tui/components/PluginHint/PluginHintMenu.tsx
@@ -473449,9 +473724,9 @@ function PluginHintMenu({
473449
473724
  sourceCommand,
473450
473725
  onResponse
473451
473726
  }) {
473452
- const onResponseRef = React131.useRef(onResponse);
473727
+ const onResponseRef = React132.useRef(onResponse);
473453
473728
  onResponseRef.current = onResponse;
473454
- React131.useEffect(() => {
473729
+ React132.useEffect(() => {
473455
473730
  const timeoutId = setTimeout((ref) => ref.current("no"), AUTO_DISMISS_MS2, onResponseRef);
473456
473731
  return () => clearTimeout(timeoutId);
473457
473732
  }, []);
@@ -473557,12 +473832,12 @@ function PluginHintMenu({
473557
473832
  }, undefined, true, undefined, this)
473558
473833
  }, undefined, false, undefined, this);
473559
473834
  }
473560
- var React131, jsx_dev_runtime421, AUTO_DISMISS_MS2 = 30000;
473835
+ var React132, jsx_dev_runtime421, AUTO_DISMISS_MS2 = 30000;
473561
473836
  var init_PluginHintMenu = __esm(() => {
473562
473837
  init_ink2();
473563
473838
  init_select();
473564
473839
  init_PermissionDialog();
473565
- React131 = __toESM(require_react(), 1);
473840
+ React132 = __toESM(require_react(), 1);
473566
473841
  jsx_dev_runtime421 = __toESM(require_jsx_dev_runtime(), 1);
473567
473842
  });
473568
473843
 
@@ -475157,31 +475432,31 @@ function SessionTreeScreen({
475157
475432
  onResume,
475158
475433
  onAgenticSearch
475159
475434
  }) {
475160
- const [logs, setLogs] = React134.useState([]);
475161
- const [loading, setLoading] = React134.useState(true);
475162
- const [focusedIdx, setFocusedIdx] = React134.useState(0);
475163
- const [selectedIdx, setSelectedIdx] = React134.useState(null);
475164
- const [rowStates, setRowStates] = React134.useState(new Map);
475165
- const [scrollOffset, setScrollOffset] = React134.useState(0);
475166
- const [expanded, setExpanded] = React134.useState(false);
475435
+ const [logs, setLogs] = React135.useState([]);
475436
+ const [loading, setLoading] = React135.useState(true);
475437
+ const [focusedIdx, setFocusedIdx] = React135.useState(0);
475438
+ const [selectedIdx, setSelectedIdx] = React135.useState(null);
475439
+ const [rowStates, setRowStates] = React135.useState(new Map);
475440
+ const [scrollOffset, setScrollOffset] = React135.useState(0);
475441
+ const [expanded, setExpanded] = React135.useState(false);
475167
475442
  const expandedIdx = expanded ? focusedIdx : null;
475168
- const [searchMode, setSearchMode] = React134.useState(false);
475169
- const [query, setQuery] = React134.useState("");
475170
- const [sortKey, setSortKey] = React134.useState("modified");
475171
- const [agenticResults, setAgenticResults] = React134.useState(null);
475172
- const exactCountCacheRef = React134.useRef(makeLru(64));
475173
- const [, bumpExactCounts] = React134.useReducer((x) => x + 1, 0);
475174
- const confirmTimerRef = React134.useRef(null);
475175
- const forkInFlightRef = React134.useRef(false);
475176
- const fileMetaCacheRef = React134.useRef(new Map);
475177
- const setRowState = React134.useCallback((sid, s) => {
475443
+ const [searchMode, setSearchMode] = React135.useState(false);
475444
+ const [query, setQuery] = React135.useState("");
475445
+ const [sortKey, setSortKey] = React135.useState("modified");
475446
+ const [agenticResults, setAgenticResults] = React135.useState(null);
475447
+ const exactCountCacheRef = React135.useRef(makeLru(64));
475448
+ const [, bumpExactCounts] = React135.useReducer((x) => x + 1, 0);
475449
+ const confirmTimerRef = React135.useRef(null);
475450
+ const forkInFlightRef = React135.useRef(false);
475451
+ const fileMetaCacheRef = React135.useRef(new Map);
475452
+ const setRowState = React135.useCallback((sid, s) => {
475178
475453
  setRowStates((prev) => {
475179
475454
  const next = new Map(prev);
475180
475455
  next.set(sid, s);
475181
475456
  return next;
475182
475457
  });
475183
475458
  }, []);
475184
- const loadLogs = React134.useCallback(async () => {
475459
+ const loadLogs = React135.useCallback(async () => {
475185
475460
  const wt = getCurrentWorktreeSession2();
475186
475461
  const paths = wt ? [wt.worktreePath] : [getOriginalCwd()];
475187
475462
  const l = await loadSameRepoAllMessageLogs(paths);
@@ -475200,14 +475475,14 @@ function SessionTreeScreen({
475200
475475
  setLogs(l);
475201
475476
  setLoading(false);
475202
475477
  }, []);
475203
- React134.useEffect(() => {
475478
+ React135.useEffect(() => {
475204
475479
  loadLogs();
475205
475480
  return () => {
475206
475481
  if (confirmTimerRef.current)
475207
475482
  clearTimeout(confirmTimerRef.current);
475208
475483
  };
475209
475484
  }, [loadLogs]);
475210
- const doFork = React134.useCallback(async (target) => {
475485
+ const doFork = React135.useCallback(async (target) => {
475211
475486
  if (!target.sessionId || !target.fullPath)
475212
475487
  return;
475213
475488
  if (forkInFlightRef.current)
@@ -475240,12 +475515,12 @@ function SessionTreeScreen({
475240
475515
  setFocusedIdx(idx);
475241
475516
  setSelectedIdx(null);
475242
475517
  }
475243
- const computeViewLogs = React134.useCallback((base, q, sk, agentic) => {
475518
+ const computeViewLogs = React135.useCallback((base, q, sk, agentic) => {
475244
475519
  const local = q ? filterLogs(base, q) : base;
475245
475520
  const chosen = agentic && local.length === 0 ? agentic : local;
475246
475521
  return sortLogsBy(chosen, sk);
475247
475522
  }, []);
475248
- const ensureExactCount = React134.useCallback(async (log) => {
475523
+ const ensureExactCount = React135.useCallback(async (log) => {
475249
475524
  const sid = log.sessionId ?? "";
475250
475525
  if (!sid)
475251
475526
  return;
@@ -475520,7 +475795,7 @@ function SessionTreeScreen({
475520
475795
  }
475521
475796
  line += " " + flags;
475522
475797
  const summaryLine = " └ " + truncateToVisibleWidth(getSummaryLine(log), termCols - 4 - 6);
475523
- return /* @__PURE__ */ jsx_dev_runtime428.jsxDEV(React134.Fragment, {
475798
+ return /* @__PURE__ */ jsx_dev_runtime428.jsxDEV(React135.Fragment, {
475524
475799
  children: [
475525
475800
  /* @__PURE__ */ jsx_dev_runtime428.jsxDEV(ThemedBox_default, {
475526
475801
  noSelect: true,
@@ -475577,7 +475852,7 @@ function SessionTreeScreen({
475577
475852
  ]
475578
475853
  }, undefined, true, undefined, this);
475579
475854
  }
475580
- var React134, jsx_dev_runtime428, AGENT_COLOR_THEME_FIELD, SESSION_ROW_HINT = "\uD83D\uDDB1 点击移动光标 · 滚轮/↑↓ 滚动 · enter 选中/进入 · f fork · x 摘要 · q 返回", SESSION_SORT_KEYS, SESSION_SORT_LABELS, HEADER_ROWS = 4, FOOTER_ROWS = 2;
475855
+ var React135, jsx_dev_runtime428, AGENT_COLOR_THEME_FIELD, SESSION_ROW_HINT = "\uD83D\uDDB1 点击移动光标 · 滚轮/↑↓ 滚动 · enter 选中/进入 · f fork · x 摘要 · q 返回", SESSION_SORT_KEYS, SESSION_SORT_LABELS, HEADER_ROWS = 4, FOOTER_ROWS = 2;
475581
475856
  var init_SessionTreeScreen = __esm(() => {
475582
475857
  init_ink2();
475583
475858
  init_config6();
@@ -475590,7 +475865,7 @@ var init_SessionTreeScreen = __esm(() => {
475590
475865
  init_displayTags();
475591
475866
  init_sessionStorage();
475592
475867
  init_branch();
475593
- React134 = __toESM(require_react(), 1);
475868
+ React135 = __toESM(require_react(), 1);
475594
475869
  jsx_dev_runtime428 = __toESM(require_jsx_dev_runtime(), 1);
475595
475870
  AGENT_COLOR_THEME_FIELD = {
475596
475871
  red: "red_FOR_SUBAGENTS_ONLY",
@@ -477495,8 +477770,8 @@ function TranscriptSearchBar({
477495
477770
  onExit: () => onClose(query),
477496
477771
  onCancel
477497
477772
  });
477498
- const [indexStatus, setIndexStatus] = React137.useState("building");
477499
- React137.useEffect(() => {
477773
+ const [indexStatus, setIndexStatus] = React138.useState("building");
477774
+ React138.useEffect(() => {
477500
477775
  let alive = true;
477501
477776
  const warm = jumpRef.current?.warmSearchIndex;
477502
477777
  if (!warm) {
@@ -477681,8 +477956,8 @@ function REPL({
477681
477956
  const viewingAgentTaskId = useAppState((s) => s.viewingAgentTaskId);
477682
477957
  const setAppState = useSetAppState();
477683
477958
  const pendingScreen = useAppState((s) => s.pendingScreen);
477684
- const statuslineMouseWriteRef = React137.useContext(TerminalWriteContext);
477685
- React137.useEffect(() => {
477959
+ const statuslineMouseWriteRef = React138.useContext(TerminalWriteContext);
477960
+ React138.useEffect(() => {
477686
477961
  if (!statuslineMouseWriteRef)
477687
477962
  return;
477688
477963
  if (!isMouseTrackingEnabled())
@@ -477692,7 +477967,7 @@ function REPL({
477692
477967
  statuslineMouseWriteRef(DISABLE_MOUSE_TRACKING);
477693
477968
  };
477694
477969
  }, [statuslineMouseWriteRef]);
477695
- React137.useEffect(() => {
477970
+ React138.useEffect(() => {
477696
477971
  if (pendingScreen === "session-tree") {
477697
477972
  setAppState((prev) => ({ ...prev, pendingScreen: undefined }));
477698
477973
  setScreen("session-tree");
@@ -477848,36 +478123,36 @@ function REPL({
477848
478123
  const scrollRef = import_react281.useRef(null);
477849
478124
  const modalScrollRef = import_react281.useRef(null);
477850
478125
  const lastUserScrollTsRef = import_react281.useRef(0);
477851
- const queryGuard = React137.useRef(new QueryGuard).current;
477852
- const isQueryActive = React137.useSyncExternalStore(queryGuard.subscribe, queryGuard.getSnapshot);
477853
- const [isExternalLoading, setIsExternalLoadingRaw] = React137.useState(remoteSessionConfig?.hasInitialPrompt ?? false);
478126
+ const queryGuard = React138.useRef(new QueryGuard).current;
478127
+ const isQueryActive = React138.useSyncExternalStore(queryGuard.subscribe, queryGuard.getSnapshot);
478128
+ const [isExternalLoading, setIsExternalLoadingRaw] = React138.useState(remoteSessionConfig?.hasInitialPrompt ?? false);
477854
478129
  const isLoading = isQueryActive || isExternalLoading;
477855
- const [userInputOnProcessing, setUserInputOnProcessingRaw] = React137.useState(undefined);
477856
- const userInputBaselineRef = React137.useRef(0);
477857
- const userMessagePendingRef = React137.useRef(false);
477858
- const loadingStartTimeRef = React137.useRef(0);
477859
- const totalPausedMsRef = React137.useRef(0);
477860
- const pauseStartTimeRef = React137.useRef(null);
477861
- const resetTimingRefs = React137.useCallback(() => {
478130
+ const [userInputOnProcessing, setUserInputOnProcessingRaw] = React138.useState(undefined);
478131
+ const userInputBaselineRef = React138.useRef(0);
478132
+ const userMessagePendingRef = React138.useRef(false);
478133
+ const loadingStartTimeRef = React138.useRef(0);
478134
+ const totalPausedMsRef = React138.useRef(0);
478135
+ const pauseStartTimeRef = React138.useRef(null);
478136
+ const resetTimingRefs = React138.useCallback(() => {
477862
478137
  loadingStartTimeRef.current = Date.now();
477863
478138
  totalPausedMsRef.current = 0;
477864
478139
  pauseStartTimeRef.current = null;
477865
478140
  }, []);
477866
- const wasQueryActiveRef = React137.useRef(false);
478141
+ const wasQueryActiveRef = React138.useRef(false);
477867
478142
  if (isQueryActive && !wasQueryActiveRef.current) {
477868
478143
  resetTimingRefs();
477869
478144
  }
477870
478145
  wasQueryActiveRef.current = isQueryActive;
477871
- const setIsExternalLoading = React137.useCallback((value) => {
478146
+ const setIsExternalLoading = React138.useCallback((value) => {
477872
478147
  setIsExternalLoadingRaw(value);
477873
478148
  if (value)
477874
478149
  resetTimingRefs();
477875
478150
  }, [resetTimingRefs]);
477876
- const swarmStartTimeRef = React137.useRef(null);
477877
- const swarmBudgetInfoRef = React137.useRef(undefined);
477878
- const focusedInputDialogRef = React137.useRef(undefined);
478151
+ const swarmStartTimeRef = React138.useRef(null);
478152
+ const swarmBudgetInfoRef = React138.useRef(undefined);
478153
+ const focusedInputDialogRef = React138.useRef(undefined);
477879
478154
  const PROMPT_SUPPRESSION_MS = 1500;
477880
- const [isPromptInputActive, setIsPromptInputActive] = React137.useState(false);
478155
+ const [isPromptInputActive, setIsPromptInputActive] = React138.useState(false);
477881
478156
  const [autoUpdaterResult, setAutoUpdaterResult] = import_react281.useState(null);
477882
478157
  import_react281.useEffect(() => {
477883
478158
  if (autoUpdaterResult?.notifications) {
@@ -479894,8 +480169,8 @@ Note: ctrl + z now suspends AtlasCode, ctrl + _ undoes input.
479894
480169
  setPositions
479895
480170
  } = useSearchHighlight();
479896
480171
  const transcriptCols = useTerminalSize().columns;
479897
- const prevColsRef = React137.useRef(transcriptCols);
479898
- React137.useEffect(() => {
480172
+ const prevColsRef = React138.useRef(transcriptCols);
480173
+ React138.useEffect(() => {
479899
480174
  if (prevColsRef.current !== transcriptCols) {
479900
480175
  prevColsRef.current = transcriptCols;
479901
480176
  if (searchQuery || searchOpen) {
@@ -480691,7 +480966,7 @@ Note: ctrl + z now suspends AtlasCode, ctrl + _ undoes input.
480691
480966
  }
480692
480967
  return mainReturn;
480693
480968
  }
480694
- var import_compiler_runtime320, React137, import_react281, jsx_dev_runtime431, UltraplanChoiceDialog = () => null, UltraplanLaunchDialog = () => null, launchUltraplan2 = null, useVoiceIntegration2, VoiceKeybindingHandler2, useAntOrgWarningNotification = () => {}, getCoordinatorUserContext3, SUGGEST_BG_PR_NOOP = (_p, _n) => false, useScheduledTasks2, EMPTY_MCP_CLIENTS2, RECENT_SCROLL_REPIN_WINDOW_MS = 3000, TITLE_ANIMATION_FRAMES, TITLE_STATIC_PREFIX = "✳", TITLE_ANIMATION_INTERVAL_MS = 960;
480969
+ var import_compiler_runtime320, React138, import_react281, jsx_dev_runtime431, UltraplanChoiceDialog = () => null, UltraplanLaunchDialog = () => null, launchUltraplan2 = null, useVoiceIntegration2, VoiceKeybindingHandler2, useAntOrgWarningNotification = () => {}, getCoordinatorUserContext3, SUGGEST_BG_PR_NOOP = (_p, _n) => false, useScheduledTasks2, EMPTY_MCP_CLIENTS2, RECENT_SCROLL_REPIN_WINDOW_MS = 3000, TITLE_ANIMATION_FRAMES, TITLE_STATIC_PREFIX = "✳", TITLE_ANIMATION_INTERVAL_MS = 960;
480695
480970
  var init_REPL = __esm(() => {
480696
480971
  init_shared();
480697
480972
  init_modelprovider2();
@@ -480879,7 +481154,7 @@ var init_REPL = __esm(() => {
480879
481154
  init_osc();
480880
481155
  init_attachments();
480881
481156
  import_compiler_runtime320 = __toESM(require_compiler_runtime(), 1);
480882
- React137 = __toESM(require_react(), 1);
481157
+ React138 = __toESM(require_react(), 1);
480883
481158
  import_react281 = __toESM(require_react(), 1);
480884
481159
  jsx_dev_runtime431 = __toESM(require_jsx_dev_runtime(), 1);
480885
481160
  useVoiceIntegration2 = feature("VOICE_MODE") ? (init_useVoiceIntegration(), __toCommonJS(exports_useVoiceIntegration)).useVoiceIntegration : () => ({