@yukino.js/yukino 0.0.11 → 0.0.13-dev

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 (53) hide show
  1. package/README.md +111 -68
  2. package/dist/a2a-DG2JNM3U.js +14 -0
  3. package/dist/acp-DCZDS6FQ.js +14 -0
  4. package/dist/anthropic-5BTWVZVT.js +4 -0
  5. package/dist/chunk-4CLD7LEU.js +5 -0
  6. package/dist/{chunk-QMHSZVNF.js → chunk-5DK2M7VI.js} +1 -1
  7. package/dist/chunk-5URXBVET.js +4 -0
  8. package/dist/{chunk-3VTVI62N.js → chunk-AZQD75PX.js} +1 -1
  9. package/dist/{chunk-WH5FUZXY.js → chunk-BDLFNDC4.js} +3 -3
  10. package/dist/{chunk-TPEUG7AU.js → chunk-COHBT6M7.js} +161 -155
  11. package/dist/chunk-CW5XFH7H.js +59 -0
  12. package/dist/{chunk-YWTRNPNR.js → chunk-IWMCIYOG.js} +21 -21
  13. package/dist/chunk-OI2W6R6H.js +28 -0
  14. package/dist/chunk-SZXXASVH.js +4 -0
  15. package/dist/chunk-UGX62ZSO.js +4 -0
  16. package/dist/chunk-W4GMCNWF.js +65 -0
  17. package/dist/lib/{anthropic-7HQY42TP.js → anthropic-AVZIC22O.js} +5 -5
  18. package/dist/lib/bwrap-JS5GRKWY.js +7 -0
  19. package/dist/lib/{chunk-QQ2V5EX3.js → chunk-EGJKLA2W.js} +3 -3
  20. package/dist/lib/{chunk-AUU4RKMV.js → chunk-GVI5R2DA.js} +47 -29
  21. package/dist/lib/{chunk-XDGZMZ2B.js → chunk-LSI3T24Q.js} +2 -2
  22. package/dist/lib/{chunk-EATSQNOB.js → chunk-O2H6VKKR.js} +3 -3
  23. package/dist/lib/{chunk-55LKYMVV.js → chunk-OFDOP6I2.js} +2 -2
  24. package/dist/lib/{chunk-JXZ5KIUV.js → chunk-PCZ63WQL.js} +1 -1
  25. package/dist/lib/{chunk-Q6B6TAR3.js → chunk-QJ32WYQY.js} +120 -152
  26. package/dist/lib/{chunk-VXHBKGZW.js → chunk-TUNZLQLO.js} +12 -13
  27. package/dist/lib/{chunk-OCGX3ISG.js → chunk-XH7D5FLE.js} +4 -4
  28. package/dist/lib/{chunk-KC54MV5H.js → chunk-XLRV26YW.js} +1 -1
  29. package/dist/lib/index.d.ts +380 -351
  30. package/dist/lib/index.js +925 -638
  31. package/dist/lib/{openai-Z7PCXN2X.js → openai-54IQOU6Y.js} +4 -4
  32. package/dist/lib/{providers-GOU5DD3X.js → providers-MOCB6Y5L.js} +3 -3
  33. package/dist/lib/seatbelt-LDM6UB6N.js +7 -0
  34. package/dist/lib/{tool-filter-GVVYY5QO.js → tool-filter-5Z6UTRRR.js} +4 -4
  35. package/dist/main-IA22XMQR.js +494 -0
  36. package/dist/main.js +2 -487
  37. package/dist/{openai-WNPMC64P.js → openai-I2TTMBWK.js} +1 -1
  38. package/dist/providers-DXQRJUIY.js +4 -0
  39. package/dist/server-QS7CX37F.js +4 -0
  40. package/dist/tool-filter-KDQMXIDC.js +4 -0
  41. package/package.json +2 -2
  42. package/dist/a2a-WKGEGTP6.js +0 -14
  43. package/dist/acp-W2I7T2NT.js +0 -14
  44. package/dist/anthropic-CQUMQFUK.js +0 -4
  45. package/dist/chunk-CH7VZVG4.js +0 -4
  46. package/dist/chunk-F6WFTAOT.js +0 -59
  47. package/dist/chunk-R567WVDL.js +0 -90
  48. package/dist/chunk-ZPL2YHQU.js +0 -5
  49. package/dist/lib/bwrap-V6MFP7PT.js +0 -7
  50. package/dist/lib/seatbelt-2OE46ZE7.js +0 -7
  51. package/dist/providers-CMCKMYGG.js +0 -4
  52. package/dist/server-OQ5XVSZY.js +0 -4
  53. package/dist/tool-filter-BTQ7WTHR.js +0 -4
@@ -127,7 +127,7 @@ declare const SnapshotSchema: z.ZodObject<{
127
127
  }, z.core.$strip>;
128
128
  type Snapshot = z.infer<typeof SnapshotSchema>;
129
129
  /** Single source of truth for a session's file-history directory layout. */
130
- declare function fileHistoryDir(baseDir: string, sessionId: string): string;
130
+ declare function fileHistoryDir(sessionId: string): string;
131
131
  declare class FileHistory {
132
132
  private sessionDir;
133
133
  private statePath;
@@ -138,7 +138,7 @@ declare class FileHistory {
138
138
  private snapshots;
139
139
  /** Monotonic backup-name counter; array positions recycle, this must not. */
140
140
  private nextSnapshotSeq;
141
- constructor(baseDir: string, sessionID: string);
141
+ constructor(sessionID: string);
142
142
  /**
143
143
  * Registers a file immediately before its first edit. Its original content,
144
144
  * absence, or an unavailable read is captured once so rewind can safely cross
@@ -164,15 +164,15 @@ declare class FileHistory {
164
164
  private loadUnlocked;
165
165
  }
166
166
 
167
- type index$y_Backup = Backup;
168
- declare const index$y_BackupSchema: typeof BackupSchema;
169
- type index$y_FileHistory = FileHistory;
170
- declare const index$y_FileHistory: typeof FileHistory;
171
- type index$y_Snapshot = Snapshot;
172
- declare const index$y_SnapshotSchema: typeof SnapshotSchema;
173
- declare const index$y_fileHistoryDir: typeof fileHistoryDir;
174
- declare namespace index$y {
175
- export { type index$y_Backup as Backup, index$y_BackupSchema as BackupSchema, index$y_FileHistory as FileHistory, type index$y_Snapshot as Snapshot, index$y_SnapshotSchema as SnapshotSchema, index$y_fileHistoryDir as fileHistoryDir };
167
+ type index$z_Backup = Backup;
168
+ declare const index$z_BackupSchema: typeof BackupSchema;
169
+ type index$z_FileHistory = FileHistory;
170
+ declare const index$z_FileHistory: typeof FileHistory;
171
+ type index$z_Snapshot = Snapshot;
172
+ declare const index$z_SnapshotSchema: typeof SnapshotSchema;
173
+ declare const index$z_fileHistoryDir: typeof fileHistoryDir;
174
+ declare namespace index$z {
175
+ export { type index$z_Backup as Backup, index$z_BackupSchema as BackupSchema, index$z_FileHistory as FileHistory, type index$z_Snapshot as Snapshot, index$z_SnapshotSchema as SnapshotSchema, index$z_fileHistoryDir as fileHistoryDir };
176
176
  }
177
177
 
178
178
  declare const MAX_GOAL_TURNS = 150;
@@ -197,12 +197,12 @@ declare const GoalSchema: z$1.ZodObject<{
197
197
  }, z$1.core.$strip>;
198
198
  type GoalState = z$1.infer<typeof GoalSchema>;
199
199
  declare class GoalManager {
200
- private workDir;
200
+ private cwd;
201
201
  readonly sessionId: string;
202
202
  private state;
203
203
  private activeSince;
204
204
  private trackingUsage;
205
- constructor(workDir: string, sessionId: string);
205
+ constructor(cwd: string, sessionId: string);
206
206
  get(): GoalState | null;
207
207
  private elapsed;
208
208
  private persist;
@@ -224,15 +224,15 @@ declare function handleGoalCommand(manager: GoalManager, args: string): {
224
224
  isError?: boolean;
225
225
  };
226
226
 
227
- declare const index$x_GOAL_RECORD: typeof GOAL_RECORD;
228
- type index$x_GoalManager = GoalManager;
229
- declare const index$x_GoalManager: typeof GoalManager;
230
- declare const index$x_GoalSchema: typeof GoalSchema;
231
- type index$x_GoalState = GoalState;
232
- declare const index$x_MAX_GOAL_TURNS: typeof MAX_GOAL_TURNS;
233
- declare const index$x_handleGoalCommand: typeof handleGoalCommand;
234
- declare namespace index$x {
235
- export { index$x_GOAL_RECORD as GOAL_RECORD, index$x_GoalManager as GoalManager, index$x_GoalSchema as GoalSchema, type index$x_GoalState as GoalState, index$x_MAX_GOAL_TURNS as MAX_GOAL_TURNS, index$x_handleGoalCommand as handleGoalCommand };
227
+ declare const index$y_GOAL_RECORD: typeof GOAL_RECORD;
228
+ type index$y_GoalManager = GoalManager;
229
+ declare const index$y_GoalManager: typeof GoalManager;
230
+ declare const index$y_GoalSchema: typeof GoalSchema;
231
+ type index$y_GoalState = GoalState;
232
+ declare const index$y_MAX_GOAL_TURNS: typeof MAX_GOAL_TURNS;
233
+ declare const index$y_handleGoalCommand: typeof handleGoalCommand;
234
+ declare namespace index$y {
235
+ export { index$y_GOAL_RECORD as GOAL_RECORD, index$y_GoalManager as GoalManager, index$y_GoalSchema as GoalSchema, type index$y_GoalState as GoalState, index$y_MAX_GOAL_TURNS as MAX_GOAL_TURNS, index$y_handleGoalCommand as handleGoalCommand };
236
236
  }
237
237
 
238
238
  declare function requestToolPermission(handler: PermissionRequestHandler, toolName: string, args: Record<string, unknown>, decision: Decision, toolCallId: string, signal?: AbortSignal): ReturnType<PermissionRequestHandler>;
@@ -273,14 +273,14 @@ declare class RuleEngine {
273
273
  private userPath;
274
274
  private projectPath;
275
275
  private cache;
276
- constructor(workDir: string);
276
+ constructor(cwd: string);
277
277
  private rulesFor;
278
278
  snapshot(): Rule[];
279
279
  appendProjectRule(rule: Rule): void;
280
280
  }
281
281
  declare function isSafeCommand(command: string): boolean;
282
282
  declare class PermissionChecker {
283
- private readonly workDir;
283
+ private readonly cwd;
284
284
  private modeState;
285
285
  private delegated;
286
286
  planModeLocked: boolean;
@@ -290,13 +290,13 @@ declare class PermissionChecker {
290
290
  sandboxAutoAllow: boolean;
291
291
  private sandbox;
292
292
  private ruleEngine;
293
- constructor(workDir: string, mode?: PermissionMode, modeSource?: () => PermissionMode);
293
+ constructor(cwd: string, mode?: PermissionMode, modeSource?: () => PermissionMode);
294
294
  get mode(): PermissionMode;
295
295
  set mode(mode: PermissionMode);
296
296
  get delegatedMode(): Exclude<PermissionMode, "plan">;
297
297
  subscribeMode(listener: () => void): () => void;
298
- forWorkDir(workDir: string): PermissionChecker;
299
- forSubagent(workDir: string): PermissionChecker;
298
+ forCwd(cwd: string): PermissionChecker;
299
+ forSubagent(cwd: string): PermissionChecker;
300
300
  check(toolName: string, category: "read" | "write" | "command", args: Record<string, unknown>): Decision;
301
301
  allowExtraRoot(path: string): void;
302
302
  allowAlways(toolName: string, args: Record<string, unknown>): void;
@@ -308,23 +308,23 @@ declare class PermissionChecker {
308
308
  describeToolAction(toolName: string, args: Record<string, unknown>): string;
309
309
  }
310
310
 
311
- declare const index$w_DANGEROUS_PATTERNS: typeof DANGEROUS_PATTERNS;
312
- type index$w_DangerousPattern = DangerousPattern;
313
- type index$w_Decision = Decision;
314
- type index$w_DecisionEffect = DecisionEffect;
315
- type index$w_PathSandbox = PathSandbox;
316
- declare const index$w_PathSandbox: typeof PathSandbox;
317
- type index$w_PermissionChecker = PermissionChecker;
318
- declare const index$w_PermissionChecker: typeof PermissionChecker;
319
- type index$w_PermissionMode = PermissionMode;
320
- type index$w_RuleEngine = RuleEngine;
321
- declare const index$w_RuleEngine: typeof RuleEngine;
322
- declare const index$w_SAFE_PREFIXES: typeof SAFE_PREFIXES;
323
- declare const index$w_evaluateRules: typeof evaluateRules;
324
- declare const index$w_extractContent: typeof extractContent;
325
- declare const index$w_isSafeCommand: typeof isSafeCommand;
326
- declare namespace index$w {
327
- export { index$w_DANGEROUS_PATTERNS as DANGEROUS_PATTERNS, type index$w_DangerousPattern as DangerousPattern, type index$w_Decision as Decision, type index$w_DecisionEffect as DecisionEffect, index$w_PathSandbox as PathSandbox, index$w_PermissionChecker as PermissionChecker, type index$w_PermissionMode as PermissionMode, request as Request, index$w_RuleEngine as RuleEngine, index$w_SAFE_PREFIXES as SAFE_PREFIXES, index$w_evaluateRules as evaluateRules, index$w_extractContent as extractContent, index$w_isSafeCommand as isSafeCommand };
311
+ declare const index$x_DANGEROUS_PATTERNS: typeof DANGEROUS_PATTERNS;
312
+ type index$x_DangerousPattern = DangerousPattern;
313
+ type index$x_Decision = Decision;
314
+ type index$x_DecisionEffect = DecisionEffect;
315
+ type index$x_PathSandbox = PathSandbox;
316
+ declare const index$x_PathSandbox: typeof PathSandbox;
317
+ type index$x_PermissionChecker = PermissionChecker;
318
+ declare const index$x_PermissionChecker: typeof PermissionChecker;
319
+ type index$x_PermissionMode = PermissionMode;
320
+ type index$x_RuleEngine = RuleEngine;
321
+ declare const index$x_RuleEngine: typeof RuleEngine;
322
+ declare const index$x_SAFE_PREFIXES: typeof SAFE_PREFIXES;
323
+ declare const index$x_evaluateRules: typeof evaluateRules;
324
+ declare const index$x_extractContent: typeof extractContent;
325
+ declare const index$x_isSafeCommand: typeof isSafeCommand;
326
+ declare namespace index$x {
327
+ export { index$x_DANGEROUS_PATTERNS as DANGEROUS_PATTERNS, type index$x_DangerousPattern as DangerousPattern, type index$x_Decision as Decision, type index$x_DecisionEffect as DecisionEffect, index$x_PathSandbox as PathSandbox, index$x_PermissionChecker as PermissionChecker, type index$x_PermissionMode as PermissionMode, request as Request, index$x_RuleEngine as RuleEngine, index$x_SAFE_PREFIXES as SAFE_PREFIXES, index$x_evaluateRules as evaluateRules, index$x_extractContent as extractContent, index$x_isSafeCommand as isSafeCommand };
328
328
  }
329
329
 
330
330
  type AgentTaskStatus = "running" | "completed" | "failed" | "cancelled";
@@ -425,7 +425,7 @@ interface ToolResult {
425
425
  }
426
426
  type PermissionRequestHandler = (toolName: string, args: Record<string, unknown>, decision: Decision, toolCallId: string, abortSignal?: AbortSignal) => Promise<"allow" | "deny" | "allowAlways">;
427
427
  interface ToolContext {
428
- workDir: string;
428
+ cwd: string;
429
429
  goalManager?: GoalManager;
430
430
  toolCallId?: string;
431
431
  backgroundTaskId?: string;
@@ -445,6 +445,7 @@ interface ToolContext {
445
445
  * backgrounded there could never deliver a notification).
446
446
  */
447
447
  taskManager?: TaskManager | null;
448
+ shellTimeoutDisabled?: boolean;
448
449
  abortSignal?: AbortSignal;
449
450
  onOutput?: (output: string) => void;
450
451
  fileHistory?: FileHistory | undefined;
@@ -556,8 +557,8 @@ declare namespace types$1 {
556
557
  export { type types$1_AnthropicToolSchema as AnthropicToolSchema, type types$1_MCPToolLike as MCPToolLike, type types$1_McpLoadingMode as McpLoadingMode, type types$1_OpenAICompatToolSchema as OpenAICompatToolSchema, type types$1_OpenAIResponsesToolSchema as OpenAIResponsesToolSchema, type types$1_PermissionRequestHandler as PermissionRequestHandler, type types$1_ProviderToolSchema as ProviderToolSchema, types$1_SKIP_DIRS as SKIP_DIRS, type types$1_Tool as Tool, type types$1_ToolCategory as ToolCategory, type types$1_ToolContext as ToolContext, type types$1_ToolProtocol as ToolProtocol, type types$1_ToolResult as ToolResult, type types$1_ToolResultContentBlock as ToolResultContentBlock, type types$1_ToolSchema as ToolSchema, types$1_isToolResultContentBlock as isToolResultContentBlock, types$1_normalizeToolResultContentBlock as normalizeToolResultContentBlock };
557
558
  }
558
559
 
559
- declare function expandAtRefs(text: string, workDir: string): string;
560
- declare function expandAtRefsWithImages(text: string, workDir: string): Promise<string | Record<string, unknown>[]>;
560
+ declare function expandAtRefs(text: string, cwd: string): string;
561
+ declare function expandAtRefsWithImages(text: string, cwd: string): Promise<string | Record<string, unknown>[]>;
561
562
 
562
563
  declare const atExpand_expandAtRefs: typeof expandAtRefs;
563
564
  declare const atExpand_expandAtRefsWithImages: typeof expandAtRefsWithImages;
@@ -661,15 +662,15 @@ declare class ConversationManager {
661
662
  } | null;
662
663
  }
663
664
 
664
- type index$v_ConversationManager = ConversationManager;
665
- declare const index$v_ConversationManager: typeof ConversationManager;
666
- type index$v_Message = Message;
667
- type index$v_ThinkingBlock = ThinkingBlock;
668
- type index$v_ToolResultBlock = ToolResultBlock;
669
- type index$v_ToolUseBlock = ToolUseBlock;
670
- type index$v_UserBashResult = UserBashResult;
671
- declare namespace index$v {
672
- export { atExpand as AtExpand, index$v_ConversationManager as ConversationManager, type index$v_Message as Message, pairing as Pairing, type index$v_ThinkingBlock as ThinkingBlock, type index$v_ToolResultBlock as ToolResultBlock, type index$v_ToolUseBlock as ToolUseBlock, type index$v_UserBashResult as UserBashResult };
665
+ type index$w_ConversationManager = ConversationManager;
666
+ declare const index$w_ConversationManager: typeof ConversationManager;
667
+ type index$w_Message = Message;
668
+ type index$w_ThinkingBlock = ThinkingBlock;
669
+ type index$w_ToolResultBlock = ToolResultBlock;
670
+ type index$w_ToolUseBlock = ToolUseBlock;
671
+ type index$w_UserBashResult = UserBashResult;
672
+ declare namespace index$w {
673
+ export { atExpand as AtExpand, index$w_ConversationManager as ConversationManager, type index$w_Message as Message, pairing as Pairing, type index$w_ThinkingBlock as ThinkingBlock, type index$w_ToolResultBlock as ToolResultBlock, type index$w_ToolUseBlock as ToolUseBlock, type index$w_UserBashResult as UserBashResult };
673
674
  }
674
675
 
675
676
  declare const COMPACT_BOUNDARY = "compact_boundary";
@@ -810,11 +811,11 @@ interface SessionInfo {
810
811
  size: number;
811
812
  modTime: Date;
812
813
  }
813
- declare function getSessionArtifactsDir(workDir: string, sessionId: string): string;
814
- declare function getSessionFilePath(workDir: string, sessionId: string): string;
814
+ declare function getSessionArtifactsDir(sessionId: string): string;
815
+ declare function getSessionFilePath(cwd: string, sessionId: string): string;
815
816
  declare function newSessionId(): string;
816
- declare function saveMessage(workDir: string, sessionId: string, msg: SessionMessage): void;
817
- declare function saveCompactBoundary(workDir: string, sessionId: string, payload: CompactBoundaryPayload): void;
817
+ declare function saveMessage(cwd: string, sessionId: string, msg: SessionMessage): void;
818
+ declare function saveCompactBoundary(cwd: string, sessionId: string, payload: CompactBoundaryPayload): void;
818
819
  /** Count the non-empty lines of a session log; undefined when it doesn't exist. */
819
820
  declare function sessionLineCount(filePath: string): number | undefined;
820
821
  /**
@@ -826,13 +827,13 @@ declare function sessionLineCount(filePath: string): number | undefined;
826
827
  * rebuildFromSession — reconstructs exactly the rewound conversation.
827
828
  */
828
829
  declare function truncateSessionLines(filePath: string, keepLines: number): void;
829
- declare function loadSession(workDir: string, sessionId: string): SessionMessage[];
830
+ declare function loadSession(cwd: string, sessionId: string): SessionMessage[];
830
831
  /**
831
832
  * Marks a session as recently active by refreshing its mtime. Session writes,
832
833
  * loads, rewinds, touches, and expiry cleanup share the same cross-process lock,
833
834
  * so cleanup cannot unlink a session that another process is resuming.
834
835
  */
835
- declare function touchSession(workDir: string, sessionId: string): void;
836
+ declare function touchSession(cwd: string, sessionId: string): void;
836
837
  interface RestoredMessage {
837
838
  role: "user" | "assistant";
838
839
  content: string | Record<string, unknown>[];
@@ -849,43 +850,42 @@ interface RestoredMessage {
849
850
  declare function rebuildFromSession(saved: SessionMessage[], options?: {
850
851
  includeExcludedUserBash?: boolean;
851
852
  }): RestoredMessage[];
852
- declare function listSessions(workDir: string): SessionInfo[];
853
+ declare function listSessions(cwd: string): SessionInfo[];
853
854
  /**
854
855
  * Cleans up expired sessions: deletes .jsonl files whose last modified time
855
- * exceeds SESSION_EXPIRY_DAYS, together with each session's subdirectory
856
- * (which holds the tool-results spill files written by spillDir()) and its
857
- * file-history directory (backup snapshots, clipboard images), to prevent
856
+ * exceeds SESSION_EXPIRY_DAYS, together with their artifacts (tool results,
857
+ * shell output, file snapshots, clipboard images, and private tasks), to prevent
858
858
  * on-disk session state from growing indefinitely.
859
859
  * Invoked lazily by listSessions (once per process per sessions directory).
860
860
  * Failures are logged and skipped (best-effort).
861
861
  */
862
- declare function cleanExpiredSessions(workDir: string): number;
863
-
864
- declare const index$u_COMPACT_BOUNDARY: typeof COMPACT_BOUNDARY;
865
- type index$u_CompactBoundaryPayload = CompactBoundaryPayload;
866
- type index$u_KeptMessage = KeptMessage;
867
- type index$u_RestoredMessage = RestoredMessage;
868
- type index$u_SessionInfo = SessionInfo;
869
- type index$u_SessionMessage = SessionMessage;
870
- type index$u_ToolResultRecord = ToolResultRecord;
871
- type index$u_ToolUseRecord = ToolUseRecord;
872
- declare const index$u_cleanExpiredSessions: typeof cleanExpiredSessions;
873
- declare const index$u_getSessionArtifactsDir: typeof getSessionArtifactsDir;
874
- declare const index$u_getSessionFilePath: typeof getSessionFilePath;
875
- declare const index$u_listSessions: typeof listSessions;
876
- declare const index$u_loadSession: typeof loadSession;
877
- declare const index$u_messageToKeptRecord: typeof messageToKeptRecord;
878
- declare const index$u_newSessionId: typeof newSessionId;
879
- declare const index$u_rebuildFromSession: typeof rebuildFromSession;
880
- declare const index$u_saveCompactBoundary: typeof saveCompactBoundary;
881
- declare const index$u_saveMessage: typeof saveMessage;
882
- declare const index$u_sessionLineCount: typeof sessionLineCount;
883
- declare const index$u_toolResultsToRecords: typeof toolResultsToRecords;
884
- declare const index$u_toolUsesToRecords: typeof toolUsesToRecords;
885
- declare const index$u_touchSession: typeof touchSession;
886
- declare const index$u_truncateSessionLines: typeof truncateSessionLines;
887
- declare namespace index$u {
888
- export { index$u_COMPACT_BOUNDARY as COMPACT_BOUNDARY, type index$u_CompactBoundaryPayload as CompactBoundaryPayload, type index$u_KeptMessage as KeptMessage, type index$u_RestoredMessage as RestoredMessage, type index$u_SessionInfo as SessionInfo, type index$u_SessionMessage as SessionMessage, type index$u_ToolResultRecord as ToolResultRecord, type index$u_ToolUseRecord as ToolUseRecord, index$u_cleanExpiredSessions as cleanExpiredSessions, index$u_getSessionArtifactsDir as getSessionArtifactsDir, index$u_getSessionFilePath as getSessionFilePath, index$u_listSessions as listSessions, index$u_loadSession as loadSession, index$u_messageToKeptRecord as messageToKeptRecord, index$u_newSessionId as newSessionId, index$u_rebuildFromSession as rebuildFromSession, index$u_saveCompactBoundary as saveCompactBoundary, index$u_saveMessage as saveMessage, index$u_sessionLineCount as sessionLineCount, index$u_toolResultsToRecords as toolResultsToRecords, index$u_toolUsesToRecords as toolUsesToRecords, index$u_touchSession as touchSession, index$u_truncateSessionLines as truncateSessionLines };
862
+ declare function cleanExpiredSessions(cwd: string): number;
863
+
864
+ declare const index$v_COMPACT_BOUNDARY: typeof COMPACT_BOUNDARY;
865
+ type index$v_CompactBoundaryPayload = CompactBoundaryPayload;
866
+ type index$v_KeptMessage = KeptMessage;
867
+ type index$v_RestoredMessage = RestoredMessage;
868
+ type index$v_SessionInfo = SessionInfo;
869
+ type index$v_SessionMessage = SessionMessage;
870
+ type index$v_ToolResultRecord = ToolResultRecord;
871
+ type index$v_ToolUseRecord = ToolUseRecord;
872
+ declare const index$v_cleanExpiredSessions: typeof cleanExpiredSessions;
873
+ declare const index$v_getSessionArtifactsDir: typeof getSessionArtifactsDir;
874
+ declare const index$v_getSessionFilePath: typeof getSessionFilePath;
875
+ declare const index$v_listSessions: typeof listSessions;
876
+ declare const index$v_loadSession: typeof loadSession;
877
+ declare const index$v_messageToKeptRecord: typeof messageToKeptRecord;
878
+ declare const index$v_newSessionId: typeof newSessionId;
879
+ declare const index$v_rebuildFromSession: typeof rebuildFromSession;
880
+ declare const index$v_saveCompactBoundary: typeof saveCompactBoundary;
881
+ declare const index$v_saveMessage: typeof saveMessage;
882
+ declare const index$v_sessionLineCount: typeof sessionLineCount;
883
+ declare const index$v_toolResultsToRecords: typeof toolResultsToRecords;
884
+ declare const index$v_toolUsesToRecords: typeof toolUsesToRecords;
885
+ declare const index$v_touchSession: typeof touchSession;
886
+ declare const index$v_truncateSessionLines: typeof truncateSessionLines;
887
+ declare namespace index$v {
888
+ export { index$v_COMPACT_BOUNDARY as COMPACT_BOUNDARY, type index$v_CompactBoundaryPayload as CompactBoundaryPayload, type index$v_KeptMessage as KeptMessage, type index$v_RestoredMessage as RestoredMessage, type index$v_SessionInfo as SessionInfo, type index$v_SessionMessage as SessionMessage, type index$v_ToolResultRecord as ToolResultRecord, type index$v_ToolUseRecord as ToolUseRecord, index$v_cleanExpiredSessions as cleanExpiredSessions, index$v_getSessionArtifactsDir as getSessionArtifactsDir, index$v_getSessionFilePath as getSessionFilePath, index$v_listSessions as listSessions, index$v_loadSession as loadSession, index$v_messageToKeptRecord as messageToKeptRecord, index$v_newSessionId as newSessionId, index$v_rebuildFromSession as rebuildFromSession, index$v_saveCompactBoundary as saveCompactBoundary, index$v_saveMessage as saveMessage, index$v_sessionLineCount as sessionLineCount, index$v_toolResultsToRecords as toolResultsToRecords, index$v_toolUsesToRecords as toolUsesToRecords, index$v_touchSession as touchSession, index$v_truncateSessionLines as truncateSessionLines };
889
889
  }
890
890
 
891
891
  type AgentEvent = {
@@ -1033,7 +1033,7 @@ declare namespace conversion$1 {
1033
1033
  /** Minimal agent runtime surface the A2A executor drives. */
1034
1034
  interface A2aRuntime {
1035
1035
  sessionId: string;
1036
- workDir: string;
1036
+ cwd: string;
1037
1037
  run(text: string, callbacks: {
1038
1038
  onPermissionRequest: PermissionRequestHandler;
1039
1039
  }): AsyncGenerator<AgentEvent>;
@@ -1041,13 +1041,13 @@ interface A2aRuntime {
1041
1041
  dispose(): Promise<void>;
1042
1042
  }
1043
1043
  /**
1044
- * Builds a runtime for `workDir`. When `sessionId` is supplied the runtime is
1044
+ * Builds a runtime for `cwd`. When `sessionId` is supplied the runtime is
1045
1045
  * a recreation of a previously evicted session and restores that session's
1046
1046
  * transcript so the conversation continues across eviction.
1047
1047
  */
1048
- type A2aRuntimeFactory = (workDir: string, sessionId?: string) => Promise<A2aRuntime>;
1049
- /** Default factory: boots the full yukino agent stack for `workDir`. */
1050
- declare function createA2aRuntime(workDir: string, sessionId?: string): Promise<A2aRuntime>;
1048
+ type A2aRuntimeFactory = (cwd: string, sessionId?: string) => Promise<A2aRuntime>;
1049
+ /** Default factory: boots the full yukino agent stack for `cwd`. */
1050
+ declare function createA2aRuntime(cwd: string, sessionId?: string): Promise<A2aRuntime>;
1051
1051
  /** Idle grace period before an agent runtime is disposed to reclaim resources. */
1052
1052
  declare const DEFAULT_IDLE_TIMEOUT_MS: number;
1053
1053
  /**
@@ -1065,11 +1065,11 @@ declare const DEFAULT_IDLE_TIMEOUT_MS: number;
1065
1065
  */
1066
1066
  declare class YukinoA2aExecutor implements AgentExecutor {
1067
1067
  private readonly runtimeFactory;
1068
- private readonly workDir;
1068
+ private readonly cwd;
1069
1069
  private readonly idleTimeoutMs;
1070
1070
  private readonly sessions;
1071
1071
  private permissionCounter;
1072
- constructor(runtimeFactory?: A2aRuntimeFactory, workDir?: string, idleTimeoutMs?: number);
1072
+ constructor(runtimeFactory?: A2aRuntimeFactory, cwd?: string, idleTimeoutMs?: number);
1073
1073
  execute(requestContext: RequestContext, eventBus: ExecutionEventBus): Promise<void>;
1074
1074
  private dispatch;
1075
1075
  cancelTask(taskId: string, eventBus: ExecutionEventBus): Promise<void>;
@@ -1131,7 +1131,7 @@ declare function parseA2aAddress(address?: string): {
1131
1131
  interface StartA2aServerOptions {
1132
1132
  address?: string;
1133
1133
  runtimeFactory?: A2aRuntimeFactory;
1134
- workDir?: string;
1134
+ cwd?: string;
1135
1135
  }
1136
1136
  /**
1137
1137
  * Starts the A2A HTTP server: the agent card at
@@ -1158,16 +1158,16 @@ interface A2aMode {
1158
1158
  declare function parseA2aMode(args: string[]): A2aMode | null;
1159
1159
  declare function runA2a(args: string[]): Promise<void>;
1160
1160
 
1161
- type index$t_A2aMode = A2aMode;
1162
- declare const index$t_parseA2aMode: typeof parseA2aMode;
1163
- declare const index$t_runA2a: typeof runA2a;
1164
- declare namespace index$t {
1165
- export { type index$t_A2aMode as A2aMode, card as Card, conversion$1 as Conversion, executor$1 as Executor, server$1 as Server, index$t_parseA2aMode as parseA2aMode, index$t_runA2a as runA2a };
1161
+ type index$u_A2aMode = A2aMode;
1162
+ declare const index$u_parseA2aMode: typeof parseA2aMode;
1163
+ declare const index$u_runA2a: typeof runA2a;
1164
+ declare namespace index$u {
1165
+ export { type index$u_A2aMode as A2aMode, card as Card, conversion$1 as Conversion, executor$1 as Executor, server$1 as Server, index$u_parseA2aMode as parseA2aMode, index$u_runA2a as runA2a };
1166
1166
  }
1167
1167
 
1168
1168
  interface AcpRuntime {
1169
1169
  sessionId: string;
1170
- workDir: string;
1170
+ cwd: string;
1171
1171
  contextWindow: number;
1172
1172
  conv: ConversationManager;
1173
1173
  run(text: string, callbacks: {
@@ -1176,7 +1176,7 @@ interface AcpRuntime {
1176
1176
  abort(): void;
1177
1177
  dispose(): Promise<void>;
1178
1178
  }
1179
- type AcpRuntimeFactory = (workDir: string, sessionId?: string) => Promise<AcpRuntime>;
1179
+ type AcpRuntimeFactory = (cwd: string, sessionId?: string) => Promise<AcpRuntime>;
1180
1180
  interface YukinoAcpApp {
1181
1181
  app: AgentApp;
1182
1182
  dispose(): Promise<void>;
@@ -1212,14 +1212,14 @@ declare namespace agent {
1212
1212
 
1213
1213
  declare function promptToText(prompt: ContentBlock[]): string;
1214
1214
  declare function toolKind(toolName: string): ToolKind;
1215
- declare function toolLocations(args: Record<string, unknown>, workDir: string): ToolCallLocation[] | undefined;
1216
- declare function agentEventToUpdate(event: AgentEvent, workDir: string, contextWindow: number): SessionUpdate | null;
1215
+ declare function toolLocations(args: Record<string, unknown>, cwd: string): ToolCallLocation[] | undefined;
1216
+ declare function agentEventToUpdate(event: AgentEvent, cwd: string, contextWindow: number): SessionUpdate | null;
1217
1217
  declare function addUsage(total: Usage, event: Extract<AgentEvent, {
1218
1218
  type: "usage";
1219
1219
  }>): Usage;
1220
1220
  declare function emptyUsage(): Usage;
1221
1221
  declare function stopReason(reason: string): StopReason;
1222
- declare function historyNotifications(sessionId: string, messages: SessionMessage[], workDir: string): Generator<SessionNotification>;
1222
+ declare function historyNotifications(sessionId: string, messages: SessionMessage[], cwd: string): Generator<SessionNotification>;
1223
1223
 
1224
1224
  declare const conversion_addUsage: typeof addUsage;
1225
1225
  declare const conversion_agentEventToUpdate: typeof agentEventToUpdate;
@@ -1268,11 +1268,11 @@ type AcpMode = {
1268
1268
  declare function parseAcpMode(args: string[]): AcpMode | null;
1269
1269
  declare function runAcp(args: string[]): Promise<void>;
1270
1270
 
1271
- type index$s_AcpMode = AcpMode;
1272
- declare const index$s_parseAcpMode: typeof parseAcpMode;
1273
- declare const index$s_runAcp: typeof runAcp;
1274
- declare namespace index$s {
1275
- export { type index$s_AcpMode as AcpMode, agent as Agent, conversion as Conversion, stdio as Stdio, websocket as Websocket, index$s_parseAcpMode as parseAcpMode, index$s_runAcp as runAcp };
1271
+ type index$t_AcpMode = AcpMode;
1272
+ declare const index$t_parseAcpMode: typeof parseAcpMode;
1273
+ declare const index$t_runAcp: typeof runAcp;
1274
+ declare namespace index$t {
1275
+ export { type index$t_AcpMode as AcpMode, agent as Agent, conversion as Conversion, stdio as Stdio, websocket as Websocket, index$t_parseAcpMode as parseAcpMode, index$t_runAcp as runAcp };
1276
1276
  }
1277
1277
 
1278
1278
  interface FileReadRecord {
@@ -1814,38 +1814,38 @@ declare function forkEnabled(cfg: AppConfig): boolean;
1814
1814
  declare function memoryEnabled(cfg: AppConfig): boolean;
1815
1815
  type AppConfig = z.infer<typeof AppConfigSchema>;
1816
1816
  /**
1817
- * Reads project-level MCP servers from `<workDir>/.mcp.json`. A missing file
1817
+ * Reads project-level MCP servers from `<cwd>/.mcp.json`. A missing file
1818
1818
  * yields [] silently and a malformed one yields [] with a log entry, so a
1819
1819
  * broken repo-side config does not prevent startup, and an entry that cannot
1820
1820
  * be mapped is skipped so one bad server does not hide its siblings.
1821
1821
  */
1822
- declare function loadProjectMcpServers(workDir: string): MCPServerConfig[];
1822
+ declare function loadProjectMcpServers(cwd: string): MCPServerConfig[];
1823
1823
  /**
1824
- * Returns a copy of `config` with the servers from `<workDir>/.mcp.json`
1824
+ * Returns a copy of `config` with the servers from `<cwd>/.mcp.json`
1825
1825
  * appended. User-level (config.yaml) entries win on a name collision: the
1826
1826
  * project file ships with the repository and is less trusted than the user's
1827
1827
  * own config.
1828
1828
  */
1829
- declare function withProjectMcpServers(config: AppConfig, workDir: string): AppConfig;
1829
+ declare function withProjectMcpServers(config: AppConfig, cwd: string): AppConfig;
1830
1830
  declare function loadConfig(path?: string, options?: {
1831
1831
  allowEmptyProviders?: boolean;
1832
1832
  }): AppConfig;
1833
1833
 
1834
- type index$r_AppConfig = AppConfig;
1835
- type index$r_ConfigError = ConfigError;
1836
- declare const index$r_ConfigError: typeof ConfigError;
1837
- type index$r_HookConfig = HookConfig;
1838
- declare const index$r_HookConfigSchema: typeof HookConfigSchema;
1839
- type index$r_MCPServerConfig = MCPServerConfig;
1840
- type index$r_SandboxYamlConfig = SandboxYamlConfig;
1841
- declare const index$r_forkEnabled: typeof forkEnabled;
1842
- declare const index$r_loadConfig: typeof loadConfig;
1843
- declare const index$r_loadProjectMcpServers: typeof loadProjectMcpServers;
1844
- declare const index$r_memoryEnabled: typeof memoryEnabled;
1845
- declare const index$r_resolveAPIKey: typeof resolveAPIKey;
1846
- declare const index$r_withProjectMcpServers: typeof withProjectMcpServers;
1847
- declare namespace index$r {
1848
- export { type index$r_AppConfig as AppConfig, index$r_ConfigError as ConfigError, type index$r_HookConfig as HookConfig, index$r_HookConfigSchema as HookConfigSchema, type index$r_MCPServerConfig as MCPServerConfig, providerConfig as ProviderConfig, providerLogin as ProviderLogin, type index$r_SandboxYamlConfig as SandboxYamlConfig, index$r_forkEnabled as forkEnabled, index$r_loadConfig as loadConfig, index$r_loadProjectMcpServers as loadProjectMcpServers, index$r_memoryEnabled as memoryEnabled, index$r_resolveAPIKey as resolveAPIKey, index$r_withProjectMcpServers as withProjectMcpServers };
1834
+ type index$s_AppConfig = AppConfig;
1835
+ type index$s_ConfigError = ConfigError;
1836
+ declare const index$s_ConfigError: typeof ConfigError;
1837
+ type index$s_HookConfig = HookConfig;
1838
+ declare const index$s_HookConfigSchema: typeof HookConfigSchema;
1839
+ type index$s_MCPServerConfig = MCPServerConfig;
1840
+ type index$s_SandboxYamlConfig = SandboxYamlConfig;
1841
+ declare const index$s_forkEnabled: typeof forkEnabled;
1842
+ declare const index$s_loadConfig: typeof loadConfig;
1843
+ declare const index$s_loadProjectMcpServers: typeof loadProjectMcpServers;
1844
+ declare const index$s_memoryEnabled: typeof memoryEnabled;
1845
+ declare const index$s_resolveAPIKey: typeof resolveAPIKey;
1846
+ declare const index$s_withProjectMcpServers: typeof withProjectMcpServers;
1847
+ declare namespace index$s {
1848
+ export { type index$s_AppConfig as AppConfig, index$s_ConfigError as ConfigError, type index$s_HookConfig as HookConfig, index$s_HookConfigSchema as HookConfigSchema, type index$s_MCPServerConfig as MCPServerConfig, providerConfig as ProviderConfig, providerLogin as ProviderLogin, type index$s_SandboxYamlConfig as SandboxYamlConfig, index$s_forkEnabled as forkEnabled, index$s_loadConfig as loadConfig, index$s_loadProjectMcpServers as loadProjectMcpServers, index$s_memoryEnabled as memoryEnabled, index$s_resolveAPIKey as resolveAPIKey, index$s_withProjectMcpServers as withProjectMcpServers };
1849
1849
  }
1850
1850
 
1851
1851
  type EventName = "session_start" | "session_end" | "turn_start" | "turn_end" | "pre_send" | "post_receive" | "pre_tool_use" | "post_tool_use" | "shutdown";
@@ -1862,7 +1862,7 @@ interface HookResult {
1862
1862
  reject: boolean;
1863
1863
  }
1864
1864
  interface HookRuntimeOptions {
1865
- workDir?: string;
1865
+ cwd?: string;
1866
1866
  abortSignal?: AbortSignal;
1867
1867
  }
1868
1868
  declare class HookEngine {
@@ -1882,15 +1882,15 @@ declare class HookEngine {
1882
1882
  }
1883
1883
  declare function validate(hooks: HookConfig[]): Error | null;
1884
1884
 
1885
- type index$q_EventName = EventName;
1886
- type index$q_HookContext = HookContext;
1887
- type index$q_HookEngine = HookEngine;
1888
- declare const index$q_HookEngine: typeof HookEngine;
1889
- type index$q_HookResult = HookResult;
1890
- type index$q_HookRuntimeOptions = HookRuntimeOptions;
1891
- declare const index$q_validate: typeof validate;
1892
- declare namespace index$q {
1893
- export { type index$q_EventName as EventName, type index$q_HookContext as HookContext, index$q_HookEngine as HookEngine, type index$q_HookResult as HookResult, type index$q_HookRuntimeOptions as HookRuntimeOptions, index$q_validate as validate };
1885
+ type index$r_EventName = EventName;
1886
+ type index$r_HookContext = HookContext;
1887
+ type index$r_HookEngine = HookEngine;
1888
+ declare const index$r_HookEngine: typeof HookEngine;
1889
+ type index$r_HookResult = HookResult;
1890
+ type index$r_HookRuntimeOptions = HookRuntimeOptions;
1891
+ declare const index$r_validate: typeof validate;
1892
+ declare namespace index$r {
1893
+ export { type index$r_EventName as EventName, type index$r_HookContext as HookContext, index$r_HookEngine as HookEngine, type index$r_HookResult as HookResult, type index$r_HookRuntimeOptions as HookRuntimeOptions, index$r_validate as validate };
1894
1894
  }
1895
1895
 
1896
1896
  declare class OpenAIClient implements LLMClient {
@@ -2061,7 +2061,7 @@ declare class MemoryManager {
2061
2061
  private userDir;
2062
2062
  private projectDir;
2063
2063
  private malformedFingerprints;
2064
- constructor(workDir: string);
2064
+ constructor(cwd: string);
2065
2065
  private readMemory;
2066
2066
  private scanAllMemories;
2067
2067
  loadAll(): MemoryFile[];
@@ -2241,22 +2241,22 @@ declare function shutdownTelemetry(): Promise<void>;
2241
2241
  */
2242
2242
  declare function installRemoteTelemetrySignalHandlers(onShutdown?: (exitCode: number) => void | Promise<void>): void;
2243
2243
 
2244
- type index$p_TelemetryAttributes = TelemetryAttributes;
2245
- type index$p_TelemetryMetricKind = TelemetryMetricKind;
2246
- type index$p_TelemetryMode = TelemetryMode;
2247
- type index$p_TelemetryObservation = TelemetryObservation;
2248
- type index$p_TelemetryObservationKind = TelemetryObservationKind;
2249
- type index$p_TelemetryObservationUpdate = TelemetryObservationUpdate;
2250
- type index$p_TelemetryRuntime = TelemetryRuntime;
2251
- declare const index$p_captureTelemetryError: typeof captureTelemetryError;
2252
- declare const index$p_flushTelemetry: typeof flushTelemetry;
2253
- declare const index$p_getTelemetryRuntime: typeof getTelemetryRuntime;
2254
- declare const index$p_initializeTelemetry: typeof initializeTelemetry;
2255
- declare const index$p_installRemoteTelemetrySignalHandlers: typeof installRemoteTelemetrySignalHandlers;
2256
- declare const index$p_setTelemetryMode: typeof setTelemetryMode;
2257
- declare const index$p_shutdownTelemetry: typeof shutdownTelemetry;
2258
- declare namespace index$p {
2259
- export { instrumentation as Instrumentation, privacy as Privacy, providers as Providers, type index$p_TelemetryAttributes as TelemetryAttributes, type index$p_TelemetryMetricKind as TelemetryMetricKind, type index$p_TelemetryMode as TelemetryMode, type index$p_TelemetryObservation as TelemetryObservation, type index$p_TelemetryObservationKind as TelemetryObservationKind, type index$p_TelemetryObservationUpdate as TelemetryObservationUpdate, type index$p_TelemetryRuntime as TelemetryRuntime, index$p_captureTelemetryError as captureTelemetryError, index$p_flushTelemetry as flushTelemetry, index$p_getTelemetryRuntime as getTelemetryRuntime, index$p_initializeTelemetry as initializeTelemetry, index$p_installRemoteTelemetrySignalHandlers as installRemoteTelemetrySignalHandlers, index$p_setTelemetryMode as setTelemetryMode, index$p_shutdownTelemetry as shutdownTelemetry };
2244
+ type index$q_TelemetryAttributes = TelemetryAttributes;
2245
+ type index$q_TelemetryMetricKind = TelemetryMetricKind;
2246
+ type index$q_TelemetryMode = TelemetryMode;
2247
+ type index$q_TelemetryObservation = TelemetryObservation;
2248
+ type index$q_TelemetryObservationKind = TelemetryObservationKind;
2249
+ type index$q_TelemetryObservationUpdate = TelemetryObservationUpdate;
2250
+ type index$q_TelemetryRuntime = TelemetryRuntime;
2251
+ declare const index$q_captureTelemetryError: typeof captureTelemetryError;
2252
+ declare const index$q_flushTelemetry: typeof flushTelemetry;
2253
+ declare const index$q_getTelemetryRuntime: typeof getTelemetryRuntime;
2254
+ declare const index$q_initializeTelemetry: typeof initializeTelemetry;
2255
+ declare const index$q_installRemoteTelemetrySignalHandlers: typeof installRemoteTelemetrySignalHandlers;
2256
+ declare const index$q_setTelemetryMode: typeof setTelemetryMode;
2257
+ declare const index$q_shutdownTelemetry: typeof shutdownTelemetry;
2258
+ declare namespace index$q {
2259
+ export { instrumentation as Instrumentation, privacy as Privacy, providers as Providers, type index$q_TelemetryAttributes as TelemetryAttributes, type index$q_TelemetryMetricKind as TelemetryMetricKind, type index$q_TelemetryMode as TelemetryMode, type index$q_TelemetryObservation as TelemetryObservation, type index$q_TelemetryObservationKind as TelemetryObservationKind, type index$q_TelemetryObservationUpdate as TelemetryObservationUpdate, type index$q_TelemetryRuntime as TelemetryRuntime, index$q_captureTelemetryError as captureTelemetryError, index$q_flushTelemetry as flushTelemetry, index$q_getTelemetryRuntime as getTelemetryRuntime, index$q_initializeTelemetry as initializeTelemetry, index$q_installRemoteTelemetrySignalHandlers as installRemoteTelemetrySignalHandlers, index$q_setTelemetryMode as setTelemetryMode, index$q_shutdownTelemetry as shutdownTelemetry };
2260
2260
  }
2261
2261
 
2262
2262
  interface LlmMetadata {
@@ -2314,7 +2314,7 @@ interface AgentConfig {
2314
2314
  registry: ToolRegistry;
2315
2315
  checker: PermissionChecker;
2316
2316
  conversation: ConversationManager;
2317
- workDir: string;
2317
+ cwd: string;
2318
2318
  sessionId?: string;
2319
2319
  goalManager?: GoalManager;
2320
2320
  shouldContinueGoal?: () => boolean;
@@ -2359,7 +2359,7 @@ declare class Agent {
2359
2359
  private registry;
2360
2360
  private checker;
2361
2361
  private conversation;
2362
- private workDir;
2362
+ private cwd;
2363
2363
  private sessionId;
2364
2364
  private sessionFilePath;
2365
2365
  private goalManager?;
@@ -2428,11 +2428,11 @@ declare class Agent {
2428
2428
  private persistLastMessage;
2429
2429
  }
2430
2430
 
2431
- type index$o_Agent = Agent;
2432
- declare const index$o_Agent: typeof Agent;
2433
- type index$o_AgentConfig = AgentConfig;
2434
- declare namespace index$o {
2435
- export { index$o_Agent as Agent, type index$o_AgentConfig as AgentConfig, events as Events, streamingExecutor as StreamingExecutor };
2431
+ type index$p_Agent = Agent;
2432
+ declare const index$p_Agent: typeof Agent;
2433
+ type index$p_AgentConfig = AgentConfig;
2434
+ declare namespace index$p {
2435
+ export { index$p_Agent as Agent, type index$p_AgentConfig as AgentConfig, events as Events, streamingExecutor as StreamingExecutor };
2436
2436
  }
2437
2437
 
2438
2438
  type Cleanup = () => void;
@@ -2472,7 +2472,7 @@ declare namespace interactionSummary {
2472
2472
 
2473
2473
  type CommandType = "local" | "local_ui" | "prompt" | "skill_fork";
2474
2474
  interface CommandContext {
2475
- workDir: string;
2475
+ cwd: string;
2476
2476
  args: string;
2477
2477
  conversation?: unknown;
2478
2478
  registry?: unknown;
@@ -2586,14 +2586,14 @@ declare namespace publicHttp {
2586
2586
  }
2587
2587
 
2588
2588
  declare class InstallSkillTool implements Tool {
2589
- private workDir;
2589
+ private cwd;
2590
2590
  private catalog;
2591
2591
  private onInstalled?;
2592
2592
  private network;
2593
2593
  name: string;
2594
2594
  description: string;
2595
2595
  category: "write";
2596
- constructor(workDir: string, catalog: SkillCatalog, onInstalled?: (() => void) | undefined, network?: PublicHttpDependencies);
2596
+ constructor(cwd: string, catalog: SkillCatalog, onInstalled?: (() => void) | undefined, network?: PublicHttpDependencies);
2597
2597
  schema(): ToolSchema;
2598
2598
  execute(ctx: ToolContext, args: Record<string, unknown>): Promise<ToolResult>;
2599
2599
  }
@@ -2643,19 +2643,19 @@ interface SkillForkHost extends SkillHost {
2643
2643
  snapshotParentMessages(count: number): string;
2644
2644
  }
2645
2645
 
2646
- type index$n_Skill = Skill;
2647
- type index$n_SkillForkHost = SkillForkHost;
2648
- type index$n_SkillHost = SkillHost;
2649
- type index$n_SkillMeta = SkillMeta;
2650
- declare namespace index$n {
2651
- export { catalog as Catalog, executor as Executor, installSkillTool as InstallSkillTool, loadSkillTool as LoadSkillTool, type index$n_Skill as Skill, type index$n_SkillForkHost as SkillForkHost, type index$n_SkillHost as SkillHost, type index$n_SkillMeta as SkillMeta };
2646
+ type index$o_Skill = Skill;
2647
+ type index$o_SkillForkHost = SkillForkHost;
2648
+ type index$o_SkillHost = SkillHost;
2649
+ type index$o_SkillMeta = SkillMeta;
2650
+ declare namespace index$o {
2651
+ export { catalog as Catalog, executor as Executor, installSkillTool as InstallSkillTool, loadSkillTool as LoadSkillTool, type index$o_Skill as Skill, type index$o_SkillForkHost as SkillForkHost, type index$o_SkillHost as SkillHost, type index$o_SkillMeta as SkillMeta };
2652
2652
  }
2653
2653
 
2654
2654
  declare class SkillCatalog {
2655
2655
  private entries;
2656
- private workDir;
2656
+ private cwd;
2657
2657
  private dirModTimes;
2658
- load(workDir: string): void;
2658
+ load(cwd: string): void;
2659
2659
  /**
2660
2660
  * Check whether a watched directory mtime has changed (a skill directory or
2661
2661
  * an entry inside one was added or removed). Content edits to existing files
@@ -2683,7 +2683,7 @@ declare function parseSkillFile(content: string): {
2683
2683
  } | null;
2684
2684
  declare function escapeSkillXml(text: string): string;
2685
2685
  /** Metadata-only conversation reminder; bodies load on demand without changing the system prefix. */
2686
- declare function buildSkillSection(catalog: SkillCatalog, workDir: string): string;
2686
+ declare function buildSkillSection(catalog: SkillCatalog): string;
2687
2687
 
2688
2688
  type catalog_SkillCatalog = SkillCatalog;
2689
2689
  declare const catalog_SkillCatalog: typeof SkillCatalog;
@@ -2896,7 +2896,7 @@ declare const TaskSnapshotSchema: z$1.ZodObject<{
2896
2896
  }, z$1.core.$strip>;
2897
2897
  declare class TaskStore {
2898
2898
  private filePath;
2899
- constructor(workDir: string, listId: string);
2899
+ constructor(listId: string);
2900
2900
  load(): z$1.infer<typeof TaskSnapshotSchema>;
2901
2901
  save(tasks: StoredTask[], nextId: number): void;
2902
2902
  }
@@ -3050,15 +3050,15 @@ declare class TaskList {
3050
3050
  replace(todos: TodoInput[]): Task[];
3051
3051
  }
3052
3052
 
3053
- type index$m_Task = Task;
3054
- type index$m_TaskBoard = TaskBoard;
3055
- type index$m_TaskList = TaskList;
3056
- declare const index$m_TaskList: typeof TaskList;
3057
- type index$m_TaskUpdates = TaskUpdates;
3058
- type index$m_TodoInput = TodoInput;
3059
- declare const index$m_mergeTaskMetadata: typeof mergeTaskMetadata;
3060
- declare namespace index$m {
3061
- export { dependencies as Dependencies, store as Store, type index$m_Task as Task, type index$m_TaskBoard as TaskBoard, index$m_TaskList as TaskList, type index$m_TaskUpdates as TaskUpdates, type index$m_TodoInput as TodoInput, tools$2 as Tools, index$m_mergeTaskMetadata as mergeTaskMetadata };
3053
+ type index$n_Task = Task;
3054
+ type index$n_TaskBoard = TaskBoard;
3055
+ type index$n_TaskList = TaskList;
3056
+ declare const index$n_TaskList: typeof TaskList;
3057
+ type index$n_TaskUpdates = TaskUpdates;
3058
+ type index$n_TodoInput = TodoInput;
3059
+ declare const index$n_mergeTaskMetadata: typeof mergeTaskMetadata;
3060
+ declare namespace index$n {
3061
+ export { dependencies as Dependencies, store as Store, type index$n_Task as Task, type index$n_TaskBoard as TaskBoard, index$n_TaskList as TaskList, type index$n_TaskUpdates as TaskUpdates, type index$n_TodoInput as TodoInput, tools$2 as Tools, index$n_mergeTaskMetadata as mergeTaskMetadata };
3062
3062
  }
3063
3063
 
3064
3064
  interface SharedTask extends Task {
@@ -3173,31 +3173,31 @@ declare const TeamFileSchema: z$1.ZodObject<{
3173
3173
  }, z$1.core.$strip>;
3174
3174
  type TeamFile = z$1.infer<typeof TeamFileSchema>;
3175
3175
  /**
3176
- * Project-scoped root directory for team data. The canonical work directory is
3176
+ * Project-scoped root directory for team data. The canonical cwd is
3177
3177
  * hashed so unrelated projects cannot restore, list, mutate, or delete each
3178
3178
  * other's teams while pane teammates can still use a home-anchored path.
3179
3179
  */
3180
- declare function teamsBaseDir(workDir: string): string;
3180
+ declare function teamsBaseDir(cwd: string): string;
3181
3181
  /**
3182
3182
  * Compresses a team name into a valid directory name: all non-alphanumeric characters
3183
3183
  * are replaced with hyphens and the result is lowercased. This slug is also the
3184
3184
  * canonical identity used by TeamManager, while config.json retains the display name.
3185
3185
  */
3186
3186
  declare function sanitizeTeamName(name: string): string;
3187
- declare function teamDir(workDir: string, name: string): string;
3187
+ declare function teamDir(cwd: string, name: string): string;
3188
3188
  /**
3189
3189
  * Lists every team in one project namespace, identified by its (already
3190
3190
  * sanitized) directory name. Returns an empty list when the base dir does
3191
3191
  * not exist. Used to sweep residual teams left behind by previous sessions.
3192
3192
  */
3193
- declare function listTeamNames(workDir: string): string[];
3194
- declare function teamConfigPath(workDir: string, name: string): string;
3193
+ declare function listTeamNames(cwd: string): string[];
3194
+ declare function teamConfigPath(cwd: string, name: string): string;
3195
3195
  /**
3196
3196
  * Reads team configuration. Returns null when the file does not exist or fails to
3197
3197
  * parse/validate, allowing the caller to treat it as "team not found" rather than
3198
3198
  * propagating an exception.
3199
3199
  */
3200
- declare function readTeamFile(workDir: string, name: string): TeamFile | null;
3200
+ declare function readTeamFile(cwd: string, name: string): TeamFile | null;
3201
3201
  declare function readTeamFileAtPath(path: string): TeamFile | null;
3202
3202
  /**
3203
3203
  * Writes team configuration under the same cross-process lock used by other
@@ -3205,7 +3205,7 @@ declare function readTeamFileAtPath(path: string): TeamFile | null;
3205
3205
  * rename publishes a complete JSON document atomically to unlocked readers.
3206
3206
  * Persistence remains best-effort for the in-memory team.
3207
3207
  */
3208
- declare function writeTeamFile(workDir: string, name: string, file: TeamFile, removedMembers?: string[]): void;
3208
+ declare function writeTeamFile(cwd: string, name: string, file: TeamFile, removedMembers?: string[]): void;
3209
3209
  declare function registerTeammateProcess(configPath: string, memberName: string, pid: number): void;
3210
3210
 
3211
3211
  type teamFile_TeamFile = TeamFile;
@@ -3286,7 +3286,7 @@ interface SubagentRunOptions {
3286
3286
  */
3287
3287
  backgroundTasks?: boolean;
3288
3288
  }
3289
- declare function spawnSubagent(definition: AgentDefinition, prompt: string, parentClient: LLMClient, parentRegistry: ToolRegistry, parentProvider: ProviderConfig, workDir: string, onProgress?: (p: {
3289
+ declare function spawnSubagent(definition: AgentDefinition, prompt: string, parentClient: LLMClient, parentRegistry: ToolRegistry, parentProvider: ProviderConfig, cwd: string, onProgress?: (p: {
3290
3290
  turn?: number;
3291
3291
  lastTool?: string;
3292
3292
  }) => void, onEvent?: AgentEventSink, modelOverride?: string, checkerOverride?: PermissionChecker, options?: SubagentRunOptions): Promise<string>;
@@ -3619,7 +3619,7 @@ declare class Team {
3619
3619
  members: Map<string, Member>;
3620
3620
  leaderMailbox: FileMailbox;
3621
3621
  private mailboxDir;
3622
- private workDir;
3622
+ private cwd;
3623
3623
  private lastLivenessCheck;
3624
3624
  leaderAgentId: string;
3625
3625
  permissionMode: PermissionChecker["mode"];
@@ -3631,7 +3631,7 @@ declare class Team {
3631
3631
  * restarted leader re-claims it when the team is restored from disk.
3632
3632
  */
3633
3633
  leaderPid: number;
3634
- constructor(name: string, mode: TeamMode, workDir: string);
3634
+ constructor(name: string, mode: TeamMode, cwd: string);
3635
3635
  private createMember;
3636
3636
  addMember(name: string): Member;
3637
3637
  removeMember(name: string): void;
@@ -3665,7 +3665,7 @@ declare class Team {
3665
3665
  * Falls back to in-process when the external backend is unavailable (tmux not installed,
3666
3666
  * non-iTerm environment, etc.) to avoid crashes.
3667
3667
  */
3668
- spawnTeammate(name: string, task: string, runAgent: RunAgent, checker?: PermissionChecker, providerIndex?: number, originToolCallId?: string, memberWorkDir?: string, role?: {
3668
+ spawnTeammate(name: string, task: string, runAgent: RunAgent, checker?: PermissionChecker, providerIndex?: number, originToolCallId?: string, memberCwd?: string, role?: {
3669
3669
  agentType?: string;
3670
3670
  model?: string;
3671
3671
  planApprovalRequired?: boolean;
@@ -3739,12 +3739,12 @@ interface TeamManagerOptions {
3739
3739
  declare class TeamManager {
3740
3740
  /** Teams keyed by their canonical disk slug; Team.name remains the display name. */
3741
3741
  private teams;
3742
- private workDir;
3742
+ private cwd;
3743
3743
  private claimLeadership;
3744
3744
  private permissionChecker?;
3745
3745
  private unsubscribePermissions?;
3746
3746
  private taskStores;
3747
- constructor(workDir: string, opts?: TeamManagerOptions);
3747
+ constructor(cwd: string, opts?: TeamManagerOptions);
3748
3748
  setPermissionChecker(checker: PermissionChecker): void;
3749
3749
  private teamKey;
3750
3750
  private teamDir;
@@ -3787,17 +3787,17 @@ declare class TeamManager {
3787
3787
  drainLeaderMailbox(): string[];
3788
3788
  }
3789
3789
 
3790
- type index$l_AgentEventCallback = AgentEventCallback;
3791
- type index$l_Member = Member;
3792
- type index$l_RunAgent = RunAgent;
3793
- type index$l_Team = Team;
3794
- declare const index$l_Team: typeof Team;
3795
- type index$l_TeamManager = TeamManager;
3796
- declare const index$l_TeamManager: typeof TeamManager;
3797
- type index$l_TeamManagerOptions = TeamManagerOptions;
3798
- type index$l_TeamMode = TeamMode;
3799
- declare namespace index$l {
3800
- export { type index$l_AgentEventCallback as AgentEventCallback, backend as Backend, coordinator$1 as Coordinator, fileLock as FileLock, fileMailbox as FileMailbox, type index$l_Member as Member, progress as Progress, protocol as Protocol, registry as Registry, type index$l_RunAgent as RunAgent, sharedTask as SharedTask, taskStop as TaskStop, taskTools as TaskTools, index$l_Team as Team, teamFile as TeamFile, index$l_TeamManager as TeamManager, type index$l_TeamManagerOptions as TeamManagerOptions, type index$l_TeamMode as TeamMode, tools$1 as Tools };
3790
+ type index$m_AgentEventCallback = AgentEventCallback;
3791
+ type index$m_Member = Member;
3792
+ type index$m_RunAgent = RunAgent;
3793
+ type index$m_Team = Team;
3794
+ declare const index$m_Team: typeof Team;
3795
+ type index$m_TeamManager = TeamManager;
3796
+ declare const index$m_TeamManager: typeof TeamManager;
3797
+ type index$m_TeamManagerOptions = TeamManagerOptions;
3798
+ type index$m_TeamMode = TeamMode;
3799
+ declare namespace index$m {
3800
+ export { type index$m_AgentEventCallback as AgentEventCallback, backend as Backend, coordinator$1 as Coordinator, fileLock as FileLock, fileMailbox as FileMailbox, type index$m_Member as Member, progress as Progress, protocol as Protocol, registry as Registry, type index$m_RunAgent as RunAgent, sharedTask as SharedTask, taskStop as TaskStop, taskTools as TaskTools, index$m_Team as Team, teamFile as TeamFile, index$m_TeamManager as TeamManager, type index$m_TeamManagerOptions as TeamManagerOptions, type index$m_TeamMode as TeamMode, tools$1 as Tools };
3801
3801
  }
3802
3802
 
3803
3803
  declare function countMcpTools(registry: ToolRegistry): number;
@@ -3807,7 +3807,7 @@ declare function countMcpTools(registry: ToolRegistry): number;
3807
3807
  * not linger while unchanged wrappers keep their discovery state.
3808
3808
  */
3809
3809
  declare function removeMcpTools(registry: ToolRegistry, serverNames?: ReadonlySet<string>): void;
3810
- declare function createToolRegistry(workDir: string, taskList: TaskList, options?: {
3810
+ declare function createToolRegistry(cwd: string, taskList: TaskList, options?: {
3811
3811
  lspServers?: readonly LspServerConfig[];
3812
3812
  teamManager?: TeamManager;
3813
3813
  }): ToolRegistry;
@@ -3823,14 +3823,14 @@ declare namespace toolRegistry {
3823
3823
  export { toolRegistry_buildComposedToolFilter as buildComposedToolFilter, toolRegistry_countMcpTools as countMcpTools, toolRegistry_createToolRegistry as createToolRegistry, toolRegistry_removeMcpTools as removeMcpTools, toolRegistry_wireSkillsToRegistry as wireSkillsToRegistry };
3824
3824
  }
3825
3825
 
3826
- declare function configureBashSandbox(registry: ToolRegistry, workDir: string, config?: SandboxYamlConfig, checker?: PermissionChecker): Promise<void>;
3826
+ declare function configureBashSandbox(registry: ToolRegistry, cwd: string, config?: SandboxYamlConfig, checker?: PermissionChecker): Promise<void>;
3827
3827
 
3828
3828
  declare const sandbox_configureBashSandbox: typeof configureBashSandbox;
3829
3829
  declare namespace sandbox {
3830
3830
  export { sandbox_configureBashSandbox as configureBashSandbox };
3831
3831
  }
3832
3832
 
3833
- declare namespace index$k {
3833
+ declare namespace index$l {
3834
3834
  export { exitCleanup as ExitCleanup, interactionSummary as InteractionSummary, sandbox as Sandbox, toolRegistry as ToolRegistry };
3835
3835
  }
3836
3836
 
@@ -3907,7 +3907,7 @@ interface ReviewProgressEvent {
3907
3907
  progress?: number;
3908
3908
  }
3909
3909
  interface CodeReviewOptions {
3910
- workDir: string;
3910
+ cwd: string;
3911
3911
  /** Free-form focus/background text from the code review form. */
3912
3912
  background?: string;
3913
3913
  from?: string;
@@ -4195,7 +4195,7 @@ declare namespace format {
4195
4195
  }
4196
4196
 
4197
4197
  interface CollectDiffsOptions {
4198
- workDir: string;
4198
+ cwd: string;
4199
4199
  mode: ReviewMode;
4200
4200
  from?: string;
4201
4201
  to?: string;
@@ -4508,11 +4508,11 @@ declare namespace selection {
4508
4508
  export { selection_FILE_TOKEN_LIMIT as FILE_TOKEN_LIMIT, selection_PROMPT_TOKEN_RATIO as PROMPT_TOKEN_RATIO, type selection_SelectionOptions as SelectionOptions, type selection_SelectionSummary as SelectionSummary, selection_effectivePath as effectivePath, estimateTokens$1 as estimateTokens, selection_selectFiles as selectFiles, selection_summarizeSelection as summarizeSelection };
4509
4509
  }
4510
4510
 
4511
- declare namespace index$j {
4511
+ declare namespace index$k {
4512
4512
  export { commentTool as CommentTool, diffParser as DiffParser, fileReadDiff as FileReadDiff, filter as Filter, form as Form, format as Format, git as Git, grouping as Grouping, llmCall as LlmCall, prompts$1 as Prompts, relocate as Relocate, report as Report, resolve as Resolve, runner as Runner, selection as Selection, types as Types };
4513
4513
  }
4514
4514
 
4515
- declare function loadUserCommands(workDir: string): Command[];
4515
+ declare function loadUserCommands(): Command[];
4516
4516
  declare function parseCommandArgs(input: string): string[];
4517
4517
  declare function renderBody(body: string, args: string): string;
4518
4518
 
@@ -4526,7 +4526,7 @@ declare namespace loader$1 {
4526
4526
  declare class CommandUsageTracker {
4527
4527
  private usage;
4528
4528
  private filePath;
4529
- constructor(workDir: string);
4529
+ constructor();
4530
4530
  record(name: string): void;
4531
4531
  getScore(name: string): number;
4532
4532
  getRecentlyUsed(limit?: number): string[];
@@ -4540,7 +4540,7 @@ declare namespace usageTracker {
4540
4540
  export { usageTracker_CommandUsageTracker as CommandUsageTracker };
4541
4541
  }
4542
4542
 
4543
- declare namespace index$i {
4543
+ declare namespace index$j {
4544
4544
  export { commands as Commands, loader$1 as Loader, usageTracker as UsageTracker };
4545
4545
  }
4546
4546
 
@@ -4592,19 +4592,19 @@ declare namespace prompts {
4592
4592
  export { prompts_SUMMARY_INSTRUCTIONS as SUMMARY_INSTRUCTIONS, prompts_buildCompactionSummaryMessage as buildCompactionSummaryMessage, prompts_buildSummaryInstructions as buildSummaryInstructions, prompts_buildSummaryPrompt as buildSummaryPrompt };
4593
4593
  }
4594
4594
 
4595
- declare namespace index$h {
4595
+ declare namespace index$i {
4596
4596
  export { compact as Compact, prompts as Prompts, recovery as Recovery };
4597
4597
  }
4598
4598
 
4599
- declare const MAX_HISTORY_ENTRIES = 200;
4600
- declare function load(dir: string): string[];
4601
- declare function append(dir: string, text: string): string[];
4599
+ declare const MAX_HISTORY_ENTRIES = 10000;
4600
+ declare function load(): string[];
4601
+ declare function append(text: string): string[];
4602
4602
 
4603
- declare const index$g_MAX_HISTORY_ENTRIES: typeof MAX_HISTORY_ENTRIES;
4604
- declare const index$g_append: typeof append;
4605
- declare const index$g_load: typeof load;
4606
- declare namespace index$g {
4607
- export { index$g_MAX_HISTORY_ENTRIES as MAX_HISTORY_ENTRIES, index$g_append as append, index$g_load as load };
4603
+ declare const index$h_MAX_HISTORY_ENTRIES: typeof MAX_HISTORY_ENTRIES;
4604
+ declare const index$h_append: typeof append;
4605
+ declare const index$h_load: typeof load;
4606
+ declare namespace index$h {
4607
+ export { index$h_MAX_HISTORY_ENTRIES as MAX_HISTORY_ENTRIES, index$h_append as append, index$h_load as load };
4608
4608
  }
4609
4609
 
4610
4610
  type SaveClipboardImageResult = {
@@ -4616,14 +4616,14 @@ type SaveClipboardImageResult = {
4616
4616
  };
4617
4617
  declare function isPngBuffer(bytes: Buffer): boolean;
4618
4618
  declare function clipboardImageFileName(bytes: Buffer): string;
4619
- declare function storeClipboardImage(workDir: string, sessionId: string, bytes: Buffer): Promise<string>;
4619
+ declare function storeClipboardImage(sessionId: string, bytes: Buffer): Promise<string>;
4620
4620
  /**
4621
4621
  * Read an image from the system clipboard and save it as a PNG under
4622
- * `${workDir}/.yukino/file-history/${sessionId}/`. On success, `value` is the
4622
+ * `~/.yukino/sessions/artifacts/${sessionId}/file-history/`. On success, `value` is the
4623
4623
  * absolute file path, ready to be referenced in a prompt and read back via
4624
4624
  * ReadFile; on failure, `reason` explains why.
4625
4625
  */
4626
- declare function saveClipboardImage(workDir: string, sessionId: string): Promise<SaveClipboardImageResult>;
4626
+ declare function saveClipboardImage(sessionId: string): Promise<SaveClipboardImageResult>;
4627
4627
 
4628
4628
  type clipboard_SaveClipboardImageResult = SaveClipboardImageResult;
4629
4629
  declare const clipboard_clipboardImageFileName: typeof clipboardImageFileName;
@@ -4659,20 +4659,20 @@ declare function loadImageAttachment(absPath: string, signal?: AbortSignal): Pro
4659
4659
  type ResizedImage = Omit<ImageAttachment, "sourcePath">;
4660
4660
  declare function maybeResizeAndDownsampleImage(buf: Buffer, mediaType: ImageMediaType): Promise<ResizedImage>;
4661
4661
 
4662
- type index$f_ImageTooLargeError = ImageTooLargeError;
4663
- declare const index$f_ImageTooLargeError: typeof ImageTooLargeError;
4664
- declare const index$f_MAX_DIMENSION_PX: typeof MAX_DIMENSION_PX;
4665
- declare const index$f_MAX_IMAGES_PER_MESSAGE: typeof MAX_IMAGES_PER_MESSAGE;
4666
- declare const index$f_MAX_IMAGE_BYTES_PASSTHROUGH: typeof MAX_IMAGE_BYTES_PASSTHROUGH;
4667
- declare const index$f_asImageMediaType: typeof asImageMediaType;
4668
- declare const index$f_getMediaType: typeof getMediaType;
4669
- declare const index$f_isImagePath: typeof isImagePath;
4670
- declare const index$f_loadImageAttachment: typeof loadImageAttachment;
4671
- declare const index$f_maybeResizeAndDownsampleImage: typeof maybeResizeAndDownsampleImage;
4672
- declare const index$f_sniffFileMediaType: typeof sniffFileMediaType;
4673
- declare const index$f_sniffMediaType: typeof sniffMediaType;
4674
- declare namespace index$f {
4675
- export { clipboard as Clipboard, index$f_ImageTooLargeError as ImageTooLargeError, index$f_MAX_DIMENSION_PX as MAX_DIMENSION_PX, index$f_MAX_IMAGES_PER_MESSAGE as MAX_IMAGES_PER_MESSAGE, index$f_MAX_IMAGE_BYTES_PASSTHROUGH as MAX_IMAGE_BYTES_PASSTHROUGH, index$f_asImageMediaType as asImageMediaType, index$f_getMediaType as getMediaType, index$f_isImagePath as isImagePath, index$f_loadImageAttachment as loadImageAttachment, index$f_maybeResizeAndDownsampleImage as maybeResizeAndDownsampleImage, index$f_sniffFileMediaType as sniffFileMediaType, index$f_sniffMediaType as sniffMediaType };
4662
+ type index$g_ImageTooLargeError = ImageTooLargeError;
4663
+ declare const index$g_ImageTooLargeError: typeof ImageTooLargeError;
4664
+ declare const index$g_MAX_DIMENSION_PX: typeof MAX_DIMENSION_PX;
4665
+ declare const index$g_MAX_IMAGES_PER_MESSAGE: typeof MAX_IMAGES_PER_MESSAGE;
4666
+ declare const index$g_MAX_IMAGE_BYTES_PASSTHROUGH: typeof MAX_IMAGE_BYTES_PASSTHROUGH;
4667
+ declare const index$g_asImageMediaType: typeof asImageMediaType;
4668
+ declare const index$g_getMediaType: typeof getMediaType;
4669
+ declare const index$g_isImagePath: typeof isImagePath;
4670
+ declare const index$g_loadImageAttachment: typeof loadImageAttachment;
4671
+ declare const index$g_maybeResizeAndDownsampleImage: typeof maybeResizeAndDownsampleImage;
4672
+ declare const index$g_sniffFileMediaType: typeof sniffFileMediaType;
4673
+ declare const index$g_sniffMediaType: typeof sniffMediaType;
4674
+ declare namespace index$g {
4675
+ export { clipboard as Clipboard, index$g_ImageTooLargeError as ImageTooLargeError, index$g_MAX_DIMENSION_PX as MAX_DIMENSION_PX, index$g_MAX_IMAGES_PER_MESSAGE as MAX_IMAGES_PER_MESSAGE, index$g_MAX_IMAGE_BYTES_PASSTHROUGH as MAX_IMAGE_BYTES_PASSTHROUGH, index$g_asImageMediaType as asImageMediaType, index$g_getMediaType as getMediaType, index$g_isImagePath as isImagePath, index$g_loadImageAttachment as loadImageAttachment, index$g_maybeResizeAndDownsampleImage as maybeResizeAndDownsampleImage, index$g_sniffFileMediaType as sniffFileMediaType, index$g_sniffMediaType as sniffMediaType };
4676
4676
  }
4677
4677
 
4678
4678
  declare class LLMError extends Error {
@@ -4754,7 +4754,7 @@ declare namespace retry {
4754
4754
  export { retry_llmRetryDelay as llmRetryDelay, retry_waitForLlmRetry as waitForLlmRetry };
4755
4755
  }
4756
4756
 
4757
- declare namespace index$e {
4757
+ declare namespace index$f {
4758
4758
  export { anthropic as Anthropic, client$2 as Client, errors as Errors, events$1 as Events, modelDiscovery as ModelDiscovery, modelResolver as ModelResolver, openai as OpenAI, retry as Retry };
4759
4759
  }
4760
4760
 
@@ -4766,11 +4766,6 @@ interface InitLoggerOptions {
4766
4766
  sessionId: string;
4767
4767
  /** Execution mode. */
4768
4768
  mode: LoggerMode;
4769
- /**
4770
- * Working directory; defaults to process.cwd(). Logs go to
4771
- * <workDir>/.yukino/logs/ unless logDir is set.
4772
- */
4773
- workDir?: string;
4774
4769
  /** Override log directory (teammates use ~/.yukino/teams/<namespace>/<team>/logs/). */
4775
4770
  logDir?: string;
4776
4771
  /** Subprocess passes true to skip expired-log cleanup (avoid multi-process races). */
@@ -4818,18 +4813,18 @@ declare function createChildLogger(bindings: {
4818
4813
  module: string;
4819
4814
  }): Logger;
4820
4815
 
4821
- declare const index$d_closeLogger: typeof closeLogger;
4822
- declare const index$d_createChildLogger: typeof createChildLogger;
4823
- declare const index$d_initLogger: typeof initLogger;
4824
- declare const index$d_logger: typeof logger;
4825
- declare const index$d_sanitizeNameSegment: typeof sanitizeNameSegment;
4826
- declare namespace index$d {
4827
- export { index$d_closeLogger as closeLogger, index$d_createChildLogger as createChildLogger, index$d_initLogger as initLogger, index$d_logger as logger, index$d_sanitizeNameSegment as sanitizeNameSegment };
4816
+ declare const index$e_closeLogger: typeof closeLogger;
4817
+ declare const index$e_createChildLogger: typeof createChildLogger;
4818
+ declare const index$e_initLogger: typeof initLogger;
4819
+ declare const index$e_logger: typeof logger;
4820
+ declare const index$e_sanitizeNameSegment: typeof sanitizeNameSegment;
4821
+ declare namespace index$e {
4822
+ export { index$e_closeLogger as closeLogger, index$e_createChildLogger as createChildLogger, index$e_initLogger as initLogger, index$e_logger as logger, index$e_sanitizeNameSegment as sanitizeNameSegment };
4828
4823
  }
4829
4824
 
4830
4825
  declare class LspClient {
4831
4826
  private config;
4832
- private workDir;
4827
+ private cwd;
4833
4828
  private child;
4834
4829
  private buffer;
4835
4830
  private nextId;
@@ -4842,7 +4837,7 @@ declare class LspClient {
4842
4837
  private exited;
4843
4838
  private notifications;
4844
4839
  capabilities: Record<string, unknown>;
4845
- constructor(config: LspServerConfig, workDir: string);
4840
+ constructor(config: LspServerConfig, cwd: string);
4846
4841
  get isClosed(): boolean;
4847
4842
  private killTree;
4848
4843
  private fail;
@@ -4863,7 +4858,7 @@ declare namespace client$1 {
4863
4858
  export { client$1_LspClient as LspClient };
4864
4859
  }
4865
4860
 
4866
- declare namespace index$c {
4861
+ declare namespace index$d {
4867
4862
  export { client$1 as Client, config as Config };
4868
4863
  }
4869
4864
 
@@ -5128,7 +5123,7 @@ declare namespace toolWrapper {
5128
5123
  export { toolWrapper_MCPToolWrapper as MCPToolWrapper, toolWrapper_MCP_NAME_SEP as MCP_NAME_SEP, toolWrapper_MCP_TOOL_PREFIX as MCP_TOOL_PREFIX, toolWrapper_buildMcpToolName as buildMcpToolName, toolWrapper_mcpToolNamePrefix as mcpToolNamePrefix, toolWrapper_sanitizeSegment as sanitizeSegment };
5129
5124
  }
5130
5125
 
5131
- declare namespace index$b {
5126
+ declare namespace index$c {
5132
5127
  export { client as Client, instructions$1 as Instructions, manager as Manager, strategy as Strategy, toolWrapper as ToolWrapper };
5133
5128
  }
5134
5129
 
@@ -5141,12 +5136,12 @@ declare namespace index$b {
5141
5136
  */
5142
5137
  declare class MemoryConsolidator {
5143
5138
  private client;
5144
- private workDir;
5139
+ private cwd;
5145
5140
  private lastScanAt;
5146
5141
  private minHours;
5147
5142
  private minSessions;
5148
5143
  private appendSystem?;
5149
- constructor(client: LLMClient, workDir: string, opts?: {
5144
+ constructor(client: LLMClient, cwd: string, opts?: {
5150
5145
  minHours?: number;
5151
5146
  minSessions?: number;
5152
5147
  appendSystem?: (msg: string) => void;
@@ -5176,10 +5171,10 @@ declare namespace consolidation {
5176
5171
  */
5177
5172
  declare class MemoryExtractor {
5178
5173
  private client;
5179
- private workDir;
5174
+ private cwd;
5180
5175
  private inProgress;
5181
5176
  private pendingContext;
5182
- constructor(client: LLMClient, workDir: string);
5177
+ constructor(client: LLMClient, cwd: string);
5183
5178
  extract(conversationSummary: string): Promise<string[]>;
5184
5179
  private runExtraction;
5185
5180
  /** Scan existing memory files and build a manifest for LLM deduplication */
@@ -5219,8 +5214,8 @@ interface InstructionSource {
5219
5214
  * Discovery order (later entries take higher precedence — the model attends
5220
5215
  * more to content appearing later):
5221
5216
  * 1. User-global: ~/.yukino/AGENTS.md
5222
- * 2. Project: AGENTS.md, and .yukino/AGENTS.md in every
5223
- * directory from the git root down to workDir
5217
+ * 2. Project: AGENTS.md in every
5218
+ * directory from the git root down to cwd
5224
5219
  *
5225
5220
  * Supports @include directives:
5226
5221
  * - @./relative/path, @../relative/path, @~/home/path, @/absolute/path
@@ -5228,12 +5223,12 @@ interface InstructionSource {
5228
5223
  * - Ignored inside fenced code blocks
5229
5224
  * - Cycle detection (the same absolute path is never included twice)
5230
5225
  */
5231
- declare function loadInstructions(workDir: string): string;
5226
+ declare function loadInstructions(cwd: string): string;
5232
5227
  /**
5233
5228
  * Returns all loaded instruction sources in priority order.
5234
5229
  * Lowest priority first (user-global), highest last (local override).
5235
5230
  */
5236
- declare function discoverInstructions(workDir: string): InstructionSource[];
5231
+ declare function discoverInstructions(cwd: string): InstructionSource[];
5237
5232
 
5238
5233
  type instructions_InstructionSource = InstructionSource;
5239
5234
  declare const instructions_discoverInstructions: typeof discoverInstructions;
@@ -5259,10 +5254,10 @@ declare namespace memoryAge$1 {
5259
5254
  }
5260
5255
 
5261
5256
  declare class MemoryPermissionChecker extends PermissionChecker {
5262
- private memoryWorkDir;
5257
+ private memoryCwd;
5263
5258
  private allowProjectReads;
5264
5259
  private memoryRoots;
5265
- constructor(memoryWorkDir: string, allowProjectReads?: boolean);
5260
+ constructor(memoryCwd: string, allowProjectReads?: boolean);
5266
5261
  check(_name: string, category: ToolCategory, args: Record<string, unknown>): Decision;
5267
5262
  }
5268
5263
 
@@ -5280,31 +5275,31 @@ declare namespace writtenPaths {
5280
5275
  export { writtenPaths_extractWrittenPaths as extractWrittenPaths };
5281
5276
  }
5282
5277
 
5283
- declare namespace index$a {
5278
+ declare namespace index$b {
5284
5279
  export { consolidation as Consolidation, extractor as Extractor, instructions as Instructions, manager$1 as Manager, memoryAge$1 as MemoryAge, permissions as Permissions, writtenPaths as WrittenPaths };
5285
5280
  }
5286
5281
 
5287
5282
  interface PlanOwner {
5288
5283
  planFilePath?: string;
5289
5284
  }
5290
- declare function getOrCreatePlanPath(workDir: string, owner: PlanOwner): string;
5291
- declare function createPlanPath(workDir: string): string;
5292
- declare function savePlan(workDir: string, owner: PlanOwner, content: string): void;
5285
+ declare function getOrCreatePlanPath(owner: PlanOwner): string;
5286
+ declare function createPlanPath(): string;
5287
+ declare function savePlan(owner: PlanOwner, content: string): void;
5293
5288
  declare function loadPlan(owner: PlanOwner): string | null;
5294
- declare function planExists(workDir: string, owner: PlanOwner): boolean;
5289
+ declare function planExists(owner: PlanOwner): boolean;
5295
5290
  declare function resetPlanPath(owner: PlanOwner): void;
5296
5291
  declare function getCurrentPlanPath(owner: PlanOwner): string | null;
5297
5292
 
5298
- type index$9_PlanOwner = PlanOwner;
5299
- declare const index$9_createPlanPath: typeof createPlanPath;
5300
- declare const index$9_getCurrentPlanPath: typeof getCurrentPlanPath;
5301
- declare const index$9_getOrCreatePlanPath: typeof getOrCreatePlanPath;
5302
- declare const index$9_loadPlan: typeof loadPlan;
5303
- declare const index$9_planExists: typeof planExists;
5304
- declare const index$9_resetPlanPath: typeof resetPlanPath;
5305
- declare const index$9_savePlan: typeof savePlan;
5306
- declare namespace index$9 {
5307
- export { type index$9_PlanOwner as PlanOwner, index$9_createPlanPath as createPlanPath, index$9_getCurrentPlanPath as getCurrentPlanPath, index$9_getOrCreatePlanPath as getOrCreatePlanPath, index$9_loadPlan as loadPlan, index$9_planExists as planExists, index$9_resetPlanPath as resetPlanPath, index$9_savePlan as savePlan };
5293
+ type index$a_PlanOwner = PlanOwner;
5294
+ declare const index$a_createPlanPath: typeof createPlanPath;
5295
+ declare const index$a_getCurrentPlanPath: typeof getCurrentPlanPath;
5296
+ declare const index$a_getOrCreatePlanPath: typeof getOrCreatePlanPath;
5297
+ declare const index$a_loadPlan: typeof loadPlan;
5298
+ declare const index$a_planExists: typeof planExists;
5299
+ declare const index$a_resetPlanPath: typeof resetPlanPath;
5300
+ declare const index$a_savePlan: typeof savePlan;
5301
+ declare namespace index$a {
5302
+ export { type index$a_PlanOwner as PlanOwner, index$a_createPlanPath as createPlanPath, index$a_getCurrentPlanPath as getCurrentPlanPath, index$a_getOrCreatePlanPath as getOrCreatePlanPath, index$a_loadPlan as loadPlan, index$a_planExists as planExists, index$a_resetPlanPath as resetPlanPath, index$a_savePlan as savePlan };
5308
5303
  }
5309
5304
 
5310
5305
  interface Section {
@@ -5319,7 +5314,7 @@ declare function usingToolsSection(): Section;
5319
5314
  declare function toneStyleSection(): Section;
5320
5315
  declare function outputEfficiencySection(): Section;
5321
5316
  interface EnvironmentContext {
5322
- workDir: string;
5317
+ cwd: string;
5323
5318
  os: string;
5324
5319
  arch: string;
5325
5320
  shell: string;
@@ -5349,7 +5344,7 @@ declare class PromptBuilder {
5349
5344
  add(s: Section): this;
5350
5345
  build(): string;
5351
5346
  }
5352
- declare function detectEnvironment(workDir: string): EnvironmentContext;
5347
+ declare function detectEnvironment(cwd: string): EnvironmentContext;
5353
5348
  declare function buildSystemPrompt(env: EnvironmentContext): string;
5354
5349
 
5355
5350
  type builder_PromptBuilder = PromptBuilder;
@@ -5418,7 +5413,7 @@ declare namespace tools {
5418
5413
  export { tools_DEFERRED_GUIDANCE_MARKER as DEFERRED_GUIDANCE_MARKER, tools_TOOL_GUIDANCE_MARKER as TOOL_GUIDANCE_MARKER, tools_buildDeferredToolGuidance as buildDeferredToolGuidance, tools_buildToolGuidance as buildToolGuidance };
5419
5414
  }
5420
5415
 
5421
- declare namespace index$8 {
5416
+ declare namespace index$9 {
5422
5417
  export { builder as Builder, coordinator as Coordinator, delegation as Delegation, planMode as PlanMode, sections as Sections, tools as Tools };
5423
5418
  }
5424
5419
 
@@ -5538,7 +5533,7 @@ interface RemoteAgentHandle {
5538
5533
  longTermMemoryInstructions: string;
5539
5534
  longTermMemoryMemoryContent: string;
5540
5535
  provider: ProviderConfig;
5541
- workDir: string;
5536
+ cwd: string;
5542
5537
  /** Current permission mode; plan mode is enforced through the run() checker. */
5543
5538
  permissionMode: PermissionMode;
5544
5539
  /** Shared task board; /clear and /resume swap its store to the target session. */
@@ -5566,7 +5561,7 @@ interface RemoteAgentHandle {
5566
5561
  interface CreateRemoteAgentOptions {
5567
5562
  sandboxConfig?: SandboxYamlConfig;
5568
5563
  provider: ProviderConfig;
5569
- workDir: string;
5564
+ cwd: string;
5570
5565
  hooks?: HookConfig[];
5571
5566
  mcpServers?: MCPServerConfig[];
5572
5567
  lspServers?: LspServerConfig[];
@@ -5736,7 +5731,7 @@ declare namespace server {
5736
5731
  export { type server_CreateRemoteAgentOptions as CreateRemoteAgentOptions, type server_RemoteAgentHandle as RemoteAgentHandle, server_RemoteServer as RemoteServer, type server_RunCallbacks as RunCallbacks, server_createRemoteAgent as createRemoteAgent };
5737
5732
  }
5738
5733
 
5739
- type SessionState = Pick<RemoteAgentHandle, "conv" | "sessionId" | "workDir" | "fileHistory" | "fileStateCache" | "recoveryState" | "activeSkills" | "toolFilter" | "taskList" | "planFilePath" | "goalManager">;
5734
+ type SessionState = Pick<RemoteAgentHandle, "conv" | "sessionId" | "cwd" | "fileHistory" | "fileStateCache" | "recoveryState" | "activeSkills" | "toolFilter" | "taskList" | "planFilePath" | "goalManager">;
5740
5735
  declare function restoreRemoteSession(state: SessionState, sessionId: string, saved: SessionMessage[]): RestoredMessage[];
5741
5736
 
5742
5737
  declare const sessionState_restoreRemoteSession: typeof restoreRemoteSession;
@@ -5744,7 +5739,7 @@ declare namespace sessionState {
5744
5739
  export { sessionState_restoreRemoteSession as restoreRemoteSession };
5745
5740
  }
5746
5741
 
5747
- declare namespace index$7 {
5742
+ declare namespace index$8 {
5748
5743
  export { address as Address, log as Log, server as Server, sessionState as SessionState };
5749
5744
  }
5750
5745
 
@@ -5823,14 +5818,14 @@ interface Sandbox {
5823
5818
  */
5824
5819
  declare function createSandbox(): Promise<Sandbox | null>;
5825
5820
 
5826
- type index$6_PreparedSandboxCommand = PreparedSandboxCommand;
5827
- type index$6_Sandbox = Sandbox;
5828
- type index$6_SandboxConfig = SandboxConfig;
5829
- type index$6_SandboxExecutionContext = SandboxExecutionContext;
5830
- type index$6_SandboxImplementation = SandboxImplementation;
5831
- declare const index$6_createSandbox: typeof createSandbox;
5832
- declare namespace index$6 {
5833
- export { bwrap as Bwrap, type index$6_PreparedSandboxCommand as PreparedSandboxCommand, type index$6_Sandbox as Sandbox, type index$6_SandboxConfig as SandboxConfig, type index$6_SandboxExecutionContext as SandboxExecutionContext, type index$6_SandboxImplementation as SandboxImplementation, seatbelt as Seatbelt, index$6_createSandbox as createSandbox };
5821
+ type index$7_PreparedSandboxCommand = PreparedSandboxCommand;
5822
+ type index$7_Sandbox = Sandbox;
5823
+ type index$7_SandboxConfig = SandboxConfig;
5824
+ type index$7_SandboxExecutionContext = SandboxExecutionContext;
5825
+ type index$7_SandboxImplementation = SandboxImplementation;
5826
+ declare const index$7_createSandbox: typeof createSandbox;
5827
+ declare namespace index$7 {
5828
+ export { bwrap as Bwrap, type index$7_PreparedSandboxCommand as PreparedSandboxCommand, type index$7_Sandbox as Sandbox, type index$7_SandboxConfig as SandboxConfig, type index$7_SandboxExecutionContext as SandboxExecutionContext, type index$7_SandboxImplementation as SandboxImplementation, seatbelt as Seatbelt, index$7_createSandbox as createSandbox };
5834
5829
  }
5835
5830
 
5836
5831
  interface TeammateRunOptions {
@@ -5850,7 +5845,7 @@ declare class AgentTool implements Tool {
5850
5845
  querySource: string;
5851
5846
  /** Optional: Team manager, enables the team_name parameter. */
5852
5847
  private teamManager?;
5853
- private workDir;
5848
+ private cwd;
5854
5849
  /**
5855
5850
  * When fork is disabled, omitting subagent_type no longer forks but falls back to the
5856
5851
  * general-purpose agent. The "disabled" semantics (rather than "enabled") are used so
@@ -5867,12 +5862,12 @@ declare class AgentTool implements Tool {
5867
5862
  private teamProviderIndex?;
5868
5863
  private spawnHandler;
5869
5864
  private forkHandler?;
5870
- constructor(workDir: string, registry: ToolRegistry, spawnHandler: (def: AgentDefinition, prompt: string, bg: boolean, modelOverride?: string, workDirOverride?: string, context?: ToolContext) => Promise<string>, conversation?: ConversationManager, forkHandler?: (prompt: string, conversation: ConversationManager, registry: ToolRegistry, modelOverride?: string, context?: ToolContext) => Promise<string>, taskManager?: TaskManager);
5865
+ constructor(cwd: string, registry: ToolRegistry, spawnHandler: (def: AgentDefinition, prompt: string, bg: boolean, modelOverride?: string, cwdOverride?: string, context?: ToolContext) => Promise<string>, conversation?: ConversationManager, forkHandler?: (prompt: string, conversation: ConversationManager, registry: ToolRegistry, modelOverride?: string, context?: ToolContext) => Promise<string>, taskManager?: TaskManager);
5871
5866
  /**
5872
5867
  * Sets the team manager and teammate run callback, enabling the team_name parameter
5873
5868
  * so teammates can be spawned directly through the Agent tool.
5874
5869
  */
5875
- setTeamManager(mgr: TeamManager, runAgentFactory: (registry: ToolRegistry, checker?: PermissionChecker, workDir?: string, options?: TeammateRunOptions) => RunAgent, providerIndex?: number): void;
5870
+ setTeamManager(mgr: TeamManager, runAgentFactory: (registry: ToolRegistry, checker?: PermissionChecker, cwd?: string, options?: TeammateRunOptions) => RunAgent, providerIndex?: number): void;
5876
5871
  forFork(registry: ToolRegistry): AgentTool;
5877
5872
  schema(): ToolSchema;
5878
5873
  private buildDescription;
@@ -5899,11 +5894,8 @@ declare namespace agentTool {
5899
5894
  export { agentTool_AgentTool as AgentTool, type agentTool_TeammateRunOptions as TeammateRunOptions };
5900
5895
  }
5901
5896
 
5902
- /**
5903
- * Loads Agent definitions in order: built-in → user-level (~/.yukino/agents/) → project-level (.yukino/agents/).
5904
- * Later definitions with the same name override earlier ones. Priority: project > user > built-in.
5905
- */
5906
- declare function loadAgentDefinitions(workDir: string): AgentDefinition[];
5897
+ /** User definitions override built-in agents. */
5898
+ declare function loadAgentDefinitions(): AgentDefinition[];
5907
5899
 
5908
5900
  declare const loader_loadAgentDefinitions: typeof loadAgentDefinitions;
5909
5901
  declare namespace loader {
@@ -5943,12 +5935,12 @@ declare namespace toolFilter {
5943
5935
  export { toolFilter_ASYNC_AGENT_ALLOWED_TOOLS as ASYNC_AGENT_ALLOWED_TOOLS, toolFilter_FORK_QUERY_SOURCE as FORK_QUERY_SOURCE, toolFilter_MAIN_AGENT_ONLY_TOOLS as MAIN_AGENT_ONLY_TOOLS, toolFilter_SUBAGENT_DISALLOWED_TOOLS as SUBAGENT_DISALLOWED_TOOLS, toolFilter_cloneRegistryForFork as cloneRegistryForFork, toolFilter_cloneRegistryForTeammate as cloneRegistryForTeammate, toolFilter_filterToolsForAgent as filterToolsForAgent };
5944
5936
  }
5945
5937
 
5946
- declare namespace index$5 {
5938
+ declare namespace index$6 {
5947
5939
  export { agentTool as AgentTool, definition as Definition, loader as Loader, spawn as Spawn, taskManager as TaskManager, toolFilter as ToolFilter };
5948
5940
  }
5949
5941
 
5950
5942
  declare const TOOL_RESULT_PREVIEW_CHARS = 2000;
5951
- declare function spillDir(workDir: string, sessionId: string): string;
5943
+ declare function spillDir(sessionId: string): string;
5952
5944
  declare function toDisplayPreview(content: string): string;
5953
5945
  declare function replaceToolResultContent(result: ToolResultBlock, content: string): void;
5954
5946
  /**
@@ -5964,7 +5956,7 @@ declare function buildPersistedOutputPreview(totalSize: number, preview: string,
5964
5956
  * never sees the full text, and it would loop between "read back" and
5965
5957
  * "spill".
5966
5958
  */
5967
- declare function isSpillReadback(toolName: string, args: Record<string, unknown> | undefined, workDir: string, sessionId: string): boolean;
5959
+ declare function isSpillReadback(toolName: string, args: Record<string, unknown> | undefined, cwd: string, sessionId: string): boolean;
5968
5960
  /**
5969
5961
  * applyBudget runs the aggregate budget before a turn's tool results enter
5970
5962
  * the conversation history: when the total character count of the batch
@@ -5979,25 +5971,25 @@ declare function isSpillReadback(toolName: string, args: Record<string, unknown>
5979
5971
  * text), and results already spilled individually this turn. When everything
5980
5972
  * is exempt, the overage is accepted.
5981
5973
  */
5982
- declare function applyBudget(toolResults: ToolResultBlock[], workDir: string, sessionId: string, exemptIds?: Set<string>): void;
5974
+ declare function applyBudget(toolResults: ToolResultBlock[], sessionId: string, exemptIds?: Set<string>): void;
5983
5975
  /**
5984
5976
  * Spill an oversized tool output to disk and return the preview text. On
5985
5977
  * write failure the content is returned unchanged. Called from agent/index.ts
5986
5978
  * when tool results enter the conversation history, in place of direct
5987
5979
  * truncation.
5988
5980
  */
5989
- declare function persistLargeResult(workDir: string, sessionId: string, toolUseId: string, content: string): string;
5981
+ declare function persistLargeResult(sessionId: string, toolUseId: string, content: string): string;
5990
5982
 
5991
- declare const index$4_TOOL_RESULT_PREVIEW_CHARS: typeof TOOL_RESULT_PREVIEW_CHARS;
5992
- declare const index$4_applyBudget: typeof applyBudget;
5993
- declare const index$4_buildPersistedOutputPreview: typeof buildPersistedOutputPreview;
5994
- declare const index$4_isSpillReadback: typeof isSpillReadback;
5995
- declare const index$4_persistLargeResult: typeof persistLargeResult;
5996
- declare const index$4_replaceToolResultContent: typeof replaceToolResultContent;
5997
- declare const index$4_spillDir: typeof spillDir;
5998
- declare const index$4_toDisplayPreview: typeof toDisplayPreview;
5999
- declare namespace index$4 {
6000
- export { index$4_TOOL_RESULT_PREVIEW_CHARS as TOOL_RESULT_PREVIEW_CHARS, index$4_applyBudget as applyBudget, index$4_buildPersistedOutputPreview as buildPersistedOutputPreview, index$4_isSpillReadback as isSpillReadback, index$4_persistLargeResult as persistLargeResult, index$4_replaceToolResultContent as replaceToolResultContent, index$4_spillDir as spillDir, index$4_toDisplayPreview as toDisplayPreview };
5983
+ declare const index$5_TOOL_RESULT_PREVIEW_CHARS: typeof TOOL_RESULT_PREVIEW_CHARS;
5984
+ declare const index$5_applyBudget: typeof applyBudget;
5985
+ declare const index$5_buildPersistedOutputPreview: typeof buildPersistedOutputPreview;
5986
+ declare const index$5_isSpillReadback: typeof isSpillReadback;
5987
+ declare const index$5_persistLargeResult: typeof persistLargeResult;
5988
+ declare const index$5_replaceToolResultContent: typeof replaceToolResultContent;
5989
+ declare const index$5_spillDir: typeof spillDir;
5990
+ declare const index$5_toDisplayPreview: typeof toDisplayPreview;
5991
+ declare namespace index$5 {
5992
+ export { index$5_TOOL_RESULT_PREVIEW_CHARS as TOOL_RESULT_PREVIEW_CHARS, index$5_applyBudget as applyBudget, index$5_buildPersistedOutputPreview as buildPersistedOutputPreview, index$5_isSpillReadback as isSpillReadback, index$5_persistLargeResult as persistLargeResult, index$5_replaceToolResultContent as replaceToolResultContent, index$5_spillDir as spillDir, index$5_toDisplayPreview as toDisplayPreview };
6001
5993
  }
6002
5994
 
6003
5995
  declare class BashTool implements Tool {
@@ -6148,13 +6140,13 @@ declare const BASH_DESCRIPTION = "Execute command in Bash; return stdout and std
6148
6140
  * run_in_background parameter and its guidance never advertise a capability
6149
6141
  * the current host cannot deliver.
6150
6142
  */
6151
- declare const BASH_BACKGROUND_DESCRIPTION = "- Set run_in_background to true to run the command in the background. The call returns a task ID immediately and the result arrives later as a task notification; do not poll or sleep waiting for it. Use this for long-running commands you do not need the result of right away. Use TaskStop with the task_id to kill a background command early. A foreground command that exceeds its timeout is moved to the background automatically instead of being killed, unless it is a bare sleep.";
6143
+ declare const BASH_BACKGROUND_DESCRIPTION = "- Set run_in_background to true to run the command in the background. The call returns a task ID immediately and the result arrives later as a task notification; do not poll or sleep waiting for it. Use this for long-running commands you do not need the result of right away. Use TaskStop with the task_id to kill a background command early. A foreground command that exceeds its timeout is moved to the background automatically instead of being killed.";
6152
6144
  declare const POWERSHELL_DESCRIPTION = "Execute command in PowerShell; return stdout and stderr. Recommended on Windows (powershell.exe); uses pwsh elsewhere.\n- timeout is in seconds: default 120, maximum 600. Each call starts a fresh, independent shell in the Agent's working directory; location, variables, and options do not persist.\n- Quote paths with spaces; use Set-Location -LiteralPath \"path\" in the same call. Separate independent commands. For dependencies, check $LASTEXITCODE for native commands and use -ErrorAction Stop for cmdlets; ; does not stop on failure. Do not assume PowerShell 7 syntax.\n- Prefer dedicated file/search tools over Get-Content, Select-String, or Write-Output. Scope recursion to a directory, not a drive root. Diagnose failures rather than retrying in Start-Sleep loops.\nGit: commit or push only when requested. Destructive operations (push --force, reset --hard, checkout ., clean -f, branch -D), amending, or skipping hooks/signing require explicit authorization; never bypass permission/hook denials. Prefer new commits. When committing, include Co-Authored-By: Yukino <usr161043261@outlook.com>.";
6153
6145
  /**
6154
6146
  * Appended to the PowerShell schema description only when background execution
6155
6147
  * is available; mirrors BASH_BACKGROUND_DESCRIPTION with PS-flavored wording.
6156
6148
  */
6157
- declare const POWERSHELL_BACKGROUND_DESCRIPTION = "- Set run_in_background to true to run the command in the background. The call returns a task ID immediately and the result arrives later as a task notification; do not poll or Start-Sleep waiting for it. Use this for long-running commands you do not need the result of right away. Use TaskStop with the task_id to kill a background command early. A foreground command that exceeds its timeout is moved to the background automatically instead of being killed, unless it is a bare Start-Sleep.";
6149
+ declare const POWERSHELL_BACKGROUND_DESCRIPTION = "- Set run_in_background to true to run the command in the background. The call returns a task ID immediately and the result arrives later as a task notification; do not poll or Start-Sleep waiting for it. Use this for long-running commands you do not need the result of right away. Use TaskStop with the task_id to kill a background command early. A foreground command that exceeds its timeout is moved to the background automatically instead of being killed.";
6158
6150
  declare const READ_FILE_DESCRIPTION = "Read text with 1-based display line numbers, or images (png, jpg, jpeg, gif, webp) as visual content; not directories.\n- file_path is absolute or relative to the Agent's working directory. offset skips lines (0-based, default 0); limit defaults to 2000 lines, with a 50KB text output cap. Displayed line 101 starts at offset=100. Follow continuation/readback instructions for partial output.\n- Images ignore offset/limit. A successful read refreshes the file-state cache used by EditFile/WriteFile; re-read after an external-change error.";
6159
6151
  declare const EDIT_FILE_DESCRIPTION = "Replace exact text in an existing file and return a diff. Prefer this over whole-file rewrites; batch disjoint changes in one edits array to read and write the file once.\n- file_path is absolute or relative to the Agent's working directory. ReadFile is required first; stale file-state errors require a fresh read and revised edit.\n- Each edits entry contains old_string and new_string, with optional replace_all. All matches use the original file; overlapping edits are rejected before writing. Merge overlapping changes into one entry.\n- old_string must be non-empty and unique unless replace_all=true (default false). LF and CRLF line endings match equivalently. Use enough context to disambiguate; preserve all other whitespace and exclude display line numbers. If matching fails, stray carriage returns in both edit strings are removed before retrying.\n- new_string must differ from old_string; an empty string deletes the match. The file's line endings and unchanged text are preserved.";
6160
6152
  declare const WRITE_FILE_DESCRIPTION = "Write complete UTF-8 content to file_path, creating parent directories and overwriting existing content. Use for new files or complete rewrites; prefer EditFile for targeted changes.\n- file_path is absolute or relative to the Agent's working directory. Existing files require ReadFile first; re-read if the cached state is stale.\n- content includes any desired trailing newline; an empty string creates or truncates an empty file. Avoid unrelated files or unsolicited documentation.";
@@ -6227,6 +6219,13 @@ declare namespace editFile {
6227
6219
  export { editFile_EditFileTool as EditFileTool };
6228
6220
  }
6229
6221
 
6222
+ declare function describeEditMismatch(content: string, oldString: string): string;
6223
+
6224
+ declare const editFileDiagnostics_describeEditMismatch: typeof describeEditMismatch;
6225
+ declare namespace editFileDiagnostics {
6226
+ export { editFileDiagnostics_describeEditMismatch as describeEditMismatch };
6227
+ }
6228
+
6230
6229
  declare class EnterWorktreeTool implements Tool {
6231
6230
  name: string;
6232
6231
  description: string;
@@ -6550,15 +6549,6 @@ interface CommandHandle {
6550
6549
  */
6551
6550
  background: (reason: BackgroundReason) => string | null;
6552
6551
  }
6553
- /**
6554
- * Whether a command may be *automatically* backgrounded on timeout. Bare
6555
- * sleeps are killed instead: backgrounding one would just hold a task slot
6556
- * until session end. Explicit run_in_background and manual Ctrl+B are always
6557
- * honored regardless of this gate. Only the first token is considered:
6558
- * `sleep 60` should die on timeout, but `npm run build && sleep 1` is a real
6559
- * workload worth keeping alive.
6560
- */
6561
- declare function isAutobackgroundingAllowed(command: string, disallowed: ReadonlySet<string>): boolean;
6562
6552
  declare function backgroundTaskName(command: string): string;
6563
6553
  declare function backgroundMessage(reason: BackgroundReason, taskId: string, timeout: number): string;
6564
6554
  /** Slice buf to at most maxBytes, ending on a UTF-8 character boundary. */
@@ -6578,7 +6568,7 @@ declare function openOutputFd(path: string): number;
6578
6568
  * the model for backgrounded commands); falls back to the OS temp dir when
6579
6569
  * that directory cannot be created.
6580
6570
  */
6581
- declare function createShellOutputFile(workDir: string, sessionId: string): {
6571
+ declare function createShellOutputFile(sessionId: string): {
6582
6572
  path: string;
6583
6573
  fd: number;
6584
6574
  };
@@ -6644,13 +6634,12 @@ declare const shellBackground_createShellOutputFile: typeof createShellOutputFil
6644
6634
  declare const shellBackground_discardFd: typeof discardFd;
6645
6635
  declare const shellBackground_formatFinalResult: typeof formatFinalResult;
6646
6636
  declare const shellBackground_hasAnyForegroundTasks: typeof hasAnyForegroundTasks;
6647
- declare const shellBackground_isAutobackgroundingAllowed: typeof isAutobackgroundingAllowed;
6648
6637
  declare const shellBackground_openOutputFd: typeof openOutputFd;
6649
6638
  declare const shellBackground_readOutputFile: typeof readOutputFile;
6650
6639
  declare const shellBackground_sliceUtf8Safe: typeof sliceUtf8Safe;
6651
6640
  declare const shellBackground_unlinkQuiet: typeof unlinkQuiet;
6652
6641
  declare namespace shellBackground {
6653
- export { shellBackground_BACKGROUNDABLE_TOOL_NAMES as BACKGROUNDABLE_TOOL_NAMES, shellBackground_BACKGROUND_MAX_OUTPUT_BYTES as BACKGROUND_MAX_OUTPUT_BYTES, shellBackground_BACKGROUND_NOTIFICATION_BYTES as BACKGROUND_NOTIFICATION_BYTES, type shellBackground_BackgroundReason as BackgroundReason, type shellBackground_BackgroundableTool as BackgroundableTool, type shellBackground_CommandHandle as CommandHandle, shellBackground_SIZE_WATCHDOG_INTERVAL_MS as SIZE_WATCHDOG_INTERVAL_MS, type shellBackground_ShellExit as ShellExit, shellBackground_attachBackgroundTaskManager as attachBackgroundTaskManager, shellBackground_backgroundAllForegroundTasks as backgroundAllForegroundTasks, shellBackground_backgroundMessage as backgroundMessage, shellBackground_backgroundTaskName as backgroundTaskName, shellBackground_buildBackgroundBody as buildBackgroundBody, shellBackground_createShellOutputFile as createShellOutputFile, shellBackground_discardFd as discardFd, shellBackground_formatFinalResult as formatFinalResult, shellBackground_hasAnyForegroundTasks as hasAnyForegroundTasks, shellBackground_isAutobackgroundingAllowed as isAutobackgroundingAllowed, shellBackground_openOutputFd as openOutputFd, shellBackground_readOutputFile as readOutputFile, shellBackground_sliceUtf8Safe as sliceUtf8Safe, shellBackground_unlinkQuiet as unlinkQuiet };
6642
+ export { shellBackground_BACKGROUNDABLE_TOOL_NAMES as BACKGROUNDABLE_TOOL_NAMES, shellBackground_BACKGROUND_MAX_OUTPUT_BYTES as BACKGROUND_MAX_OUTPUT_BYTES, shellBackground_BACKGROUND_NOTIFICATION_BYTES as BACKGROUND_NOTIFICATION_BYTES, type shellBackground_BackgroundReason as BackgroundReason, type shellBackground_BackgroundableTool as BackgroundableTool, type shellBackground_CommandHandle as CommandHandle, shellBackground_SIZE_WATCHDOG_INTERVAL_MS as SIZE_WATCHDOG_INTERVAL_MS, type shellBackground_ShellExit as ShellExit, shellBackground_attachBackgroundTaskManager as attachBackgroundTaskManager, shellBackground_backgroundAllForegroundTasks as backgroundAllForegroundTasks, shellBackground_backgroundMessage as backgroundMessage, shellBackground_backgroundTaskName as backgroundTaskName, shellBackground_buildBackgroundBody as buildBackgroundBody, shellBackground_createShellOutputFile as createShellOutputFile, shellBackground_discardFd as discardFd, shellBackground_formatFinalResult as formatFinalResult, shellBackground_hasAnyForegroundTasks as hasAnyForegroundTasks, shellBackground_openOutputFd as openOutputFd, shellBackground_readOutputFile as readOutputFile, shellBackground_sliceUtf8Safe as sliceUtf8Safe, shellBackground_unlinkQuiet as unlinkQuiet };
6654
6643
  }
6655
6644
 
6656
6645
  declare const MAX_SHELL_OUTPUT_BYTES: number;
@@ -6786,11 +6775,51 @@ declare namespace writeFile {
6786
6775
  export { writeFile_WriteFileTool as WriteFileTool };
6787
6776
  }
6788
6777
 
6778
+ declare namespace index$4 {
6779
+ export { askUser as AskUser, bash as Bash, bingSearch as BingSearch, computerUse as ComputerUse, descriptions as Descriptions, diff as Diff, editFile as EditFile, editFileDiagnostics as EditFileDiagnostics, enterWorktree as EnterWorktree, exitCodeHints as ExitCodeHints, exitPlanMode as ExitPlanMode, exitWorktree as ExitWorktree, fileMutationQueue as FileMutationQueue, fileStateCache as FileStateCache, glob as Glob, goal as Goal, grep as Grep, isDiffTool$1 as IsDiffTool, lsp as LSP, mcpCall as McpCall, powershell as PowerShell, readFile as ReadFile, registry$1 as Registry, searchOutput as SearchOutput, shellBackground as ShellBackground, shellOutput as ShellOutput, snippets as Snippets, syntheticOutput as SyntheticOutput, taskOutput as TaskOutput, toolSearch as ToolSearch, types$1 as Types, webFetch as WebFetch, webSearch as WebSearch, writeFile as WriteFile };
6780
+ }
6781
+
6782
+ type PackageManager = "npm" | "yarn" | "pnpm";
6783
+ interface UpdateCommand {
6784
+ command: PackageManager;
6785
+ args: string[];
6786
+ }
6787
+ declare function packageManagerInvocation(command: PackageManager, args: string[], platform?: NodeJS.Platform): {
6788
+ command: string;
6789
+ args: string[];
6790
+ };
6791
+ declare function getSelfUpdateCommand(latest: string, packageDirectory?: string): Promise<UpdateCommand>;
6792
+ declare function runSelfUpdate(update: UpdateCommand): Promise<void>;
6793
+
6794
+ type install_UpdateCommand = UpdateCommand;
6795
+ declare const install_getSelfUpdateCommand: typeof getSelfUpdateCommand;
6796
+ declare const install_packageManagerInvocation: typeof packageManagerInvocation;
6797
+ declare const install_runSelfUpdate: typeof runSelfUpdate;
6798
+ declare namespace install {
6799
+ export { type install_UpdateCommand as UpdateCommand, install_getSelfUpdateCommand as getSelfUpdateCommand, install_packageManagerInvocation as packageManagerInvocation, install_runSelfUpdate as runSelfUpdate };
6800
+ }
6801
+
6802
+ declare const PACKAGE_NAME = "@yukino.js/yukino";
6803
+ declare function isNewerVersion(candidate: string, current: string): boolean;
6804
+ declare function getLatestVersion(signal?: AbortSignal): Promise<string>;
6805
+ declare function checkForUpdate(signal?: AbortSignal): Promise<string | undefined>;
6806
+
6807
+ declare const versionCheck_PACKAGE_NAME: typeof PACKAGE_NAME;
6808
+ declare const versionCheck_checkForUpdate: typeof checkForUpdate;
6809
+ declare const versionCheck_getLatestVersion: typeof getLatestVersion;
6810
+ declare const versionCheck_isNewerVersion: typeof isNewerVersion;
6811
+ declare namespace versionCheck {
6812
+ export { versionCheck_PACKAGE_NAME as PACKAGE_NAME, versionCheck_checkForUpdate as checkForUpdate, versionCheck_getLatestVersion as getLatestVersion, versionCheck_isNewerVersion as isNewerVersion };
6813
+ }
6814
+
6815
+ declare function handleUpdateCommand(args: string[]): Promise<boolean>;
6816
+
6817
+ declare const index$3_handleUpdateCommand: typeof handleUpdateCommand;
6789
6818
  declare namespace index$3 {
6790
- export { askUser as AskUser, bash as Bash, bingSearch as BingSearch, computerUse as ComputerUse, descriptions as Descriptions, diff as Diff, editFile as EditFile, enterWorktree as EnterWorktree, exitCodeHints as ExitCodeHints, exitPlanMode as ExitPlanMode, exitWorktree as ExitWorktree, fileMutationQueue as FileMutationQueue, fileStateCache as FileStateCache, glob as Glob, goal as Goal, grep as Grep, isDiffTool$1 as IsDiffTool, lsp as LSP, mcpCall as McpCall, powershell as PowerShell, readFile as ReadFile, registry$1 as Registry, searchOutput as SearchOutput, shellBackground as ShellBackground, shellOutput as ShellOutput, snippets as Snippets, syntheticOutput as SyntheticOutput, taskOutput as TaskOutput, toolSearch as ToolSearch, types$1 as Types, webFetch as WebFetch, webSearch as WebSearch, writeFile as WriteFile };
6819
+ export { install as Install, versionCheck as VersionCheck, index$3_handleUpdateCommand as handleUpdateCommand };
6791
6820
  }
6792
6821
 
6793
- declare function resolveToolPath(workDir: string, path: string): string;
6822
+ declare function resolveToolPath(cwd: string, path: string): string;
6794
6823
  /** Resolve symlinks even when the final file or some parent directories do not exist yet. */
6795
6824
  declare function canonicalPath(path: string): string;
6796
6825
  declare function isPathWithin(root: string, path: string): boolean;
@@ -6939,7 +6968,7 @@ declare function readWorktreeHeadSha(worktreePath: string): Promise<string>;
6939
6968
  * Returns an empty string if detached HEAD or not a git repository.
6940
6969
  */
6941
6970
  declare function getCurrentBranch(repoRoot: string): Promise<string>;
6942
- declare function createAgentWorktree(slug: string, gitRoot?: string, workDir?: string): Promise<WorktreeResult>;
6971
+ declare function createAgentWorktree(slug: string, gitRoot?: string, cwd?: string): Promise<WorktreeResult>;
6943
6972
  declare function removeAgentWorktree(path: string, branch: string, gitRoot: string): Promise<void>;
6944
6973
  declare function hasWorktreeChanges(path: string, headCommit: string): Promise<boolean>;
6945
6974
  declare function buildWorktreeNotice(parentCwd: string, wtPath: string): string;
@@ -7024,7 +7053,7 @@ declare namespace recover$1 {
7024
7053
 
7025
7054
  interface TeammateArgs {
7026
7055
  teamDir: string;
7027
- teamWorkDir?: string;
7056
+ teamCwd?: string;
7028
7057
  teamName: string;
7029
7058
  memberName: string;
7030
7059
  initialTask: string;
@@ -7048,8 +7077,8 @@ declare function parseTeammateFlags(args: string[]): TeammateArgs | null;
7048
7077
  */
7049
7078
  declare function buildTeammateRegistry(opts: {
7050
7079
  sandboxConfig?: SandboxYamlConfig;
7051
- workDir: string;
7052
- teamWorkDir?: string;
7080
+ cwd: string;
7081
+ teamCwd?: string;
7053
7082
  definition?: AgentDefinition;
7054
7083
  teamName: string;
7055
7084
  memberName: string;
@@ -7081,4 +7110,4 @@ declare namespace version$1 {
7081
7110
  export { version$1_version as version };
7082
7111
  }
7083
7112
 
7084
- export { index$t as A2a, index$s as Acp, index$o as Agent, index$k as Bootstrap, index$j as CodeReview, index$i as Commands, index$h as Compact, index$r as Config, index$v as Conversation, index$y as FileHistory, index$x as Goal, index$g as History, index$q as Hooks, index$f as Images, index$e as LLM, index$c as LSP, index$d as Logger, index$b as MCP, index$a as Memory, index$w as Permissions, index$9 as PlanFile, printMode as PrintMode, index$8 as Prompt, recover$1 as Recover, index$7 as Remote, index$6 as Sandbox, index$u as Session, index$n as Skills, index$5 as Subagent, teammate as Teammate, index$l as Teams, index$p as Telemetry, index$m as Todo, index$4 as ToolResult, index$3 as Tools, index$2 as Utils, index$1 as VSCode, version$1 as Version, index as Worktree };
7113
+ export { index$u as A2a, index$t as Acp, index$p as Agent, index$l as Bootstrap, index$k as CodeReview, index$j as Commands, index$i as Compact, index$s as Config, index$w as Conversation, index$z as FileHistory, index$y as Goal, index$h as History, index$r as Hooks, index$g as Images, index$f as LLM, index$d as LSP, index$e as Logger, index$c as MCP, index$b as Memory, index$x as Permissions, index$a as PlanFile, printMode as PrintMode, index$9 as Prompt, recover$1 as Recover, index$8 as Remote, index$7 as Sandbox, index$v as Session, index$o as Skills, index$6 as Subagent, teammate as Teammate, index$m as Teams, index$q as Telemetry, index$n as Todo, index$5 as ToolResult, index$4 as Tools, index$3 as Update, index$2 as Utils, index$1 as VSCode, version$1 as Version, index as Worktree };