@botiverse/kimi-code-sdk 0.18.0 → 0.19.2-botiverse.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/NOTICE.md +1 -1
- package/README.md +1 -1
- package/dist/index.d.mts +151 -12
- package/dist/index.mjs +16301 -15430
- package/package.json +3 -3
package/NOTICE.md
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
# NOTICE
|
|
2
2
|
|
|
3
3
|
@botiverse/kimi-code-sdk is a repackage of the built **@moonshot-ai/kimi-code-sdk** node-sdk
|
|
4
|
-
from [MoonshotAI/kimi-code](https://github.com/MoonshotAI/kimi-code) at `@moonshot-ai/kimi-code@0.
|
|
4
|
+
from [MoonshotAI/kimi-code](https://github.com/MoonshotAI/kimi-code) at `@moonshot-ai/kimi-code@0.19.2`, distributed under upstream's MIT License (see LICENSE). Sibling packages are bundled into `dist`.
|
|
5
5
|
Mirror + provenance: https://github.com/botiverse/kimi-code-sdk
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @botiverse/kimi-code-sdk
|
|
2
2
|
|
|
3
|
-
Built repackage of `@moonshot-ai/kimi-code-sdk` (kimi-code @moonshot-ai/kimi-code@0.
|
|
3
|
+
Built repackage of `@moonshot-ai/kimi-code-sdk` (kimi-code @moonshot-ai/kimi-code@0.19.2) for Slock/Botiverse.
|
|
4
4
|
Read-only mirror + release notes: https://github.com/botiverse/kimi-code-sdk
|
|
5
5
|
|
|
6
6
|
> Not affiliated with Moonshot AI. MIT (see LICENSE).
|
package/dist/index.d.mts
CHANGED
|
@@ -61,6 +61,35 @@ declare interface ActivateSkillRpcInput extends SessionIdRpcInput {
|
|
|
61
61
|
readonly args?: string | undefined;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
+
export declare interface AddAdditionalDirInput {
|
|
65
|
+
readonly id: string;
|
|
66
|
+
readonly path: string;
|
|
67
|
+
readonly persist: boolean;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export declare interface AddAdditionalDirOptions {
|
|
71
|
+
readonly persist: boolean;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
declare interface AddAdditionalDirPayload {
|
|
75
|
+
readonly path: string;
|
|
76
|
+
readonly persist: boolean;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export declare interface AddAdditionalDirResult {
|
|
80
|
+
readonly additionalDirs: readonly string[];
|
|
81
|
+
readonly projectRoot: string;
|
|
82
|
+
readonly configPath: string;
|
|
83
|
+
readonly persisted: boolean;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
declare interface AddAdditionalDirResult_2 {
|
|
87
|
+
readonly additionalDirs: readonly string[];
|
|
88
|
+
readonly projectRoot: string;
|
|
89
|
+
readonly configPath: string;
|
|
90
|
+
readonly persisted: boolean;
|
|
91
|
+
}
|
|
92
|
+
|
|
64
93
|
declare class Agent {
|
|
65
94
|
readonly type: AgentType;
|
|
66
95
|
private _kaos;
|
|
@@ -97,8 +126,11 @@ declare class Agent {
|
|
|
97
126
|
readonly cron: CronManager | null;
|
|
98
127
|
readonly goal: GoalMode;
|
|
99
128
|
readonly replayBuilder: ReplayBuilder;
|
|
129
|
+
private additionalDirs;
|
|
100
130
|
constructor(options: AgentOptions);
|
|
101
131
|
setKaos(kaos: Kaos): void;
|
|
132
|
+
getAdditionalDirs(): readonly string[];
|
|
133
|
+
setAdditionalDirs(additionalDirs: readonly string[]): void;
|
|
102
134
|
get generate(): typeof generate;
|
|
103
135
|
get llm(): KosongLLM;
|
|
104
136
|
useProfile(profile: ResolvedAgentProfile, context?: PreparedSystemPromptContext): void;
|
|
@@ -132,6 +164,7 @@ declare interface AgentAPI {
|
|
|
132
164
|
unregisterTool: (payload: UnregisterToolPayload) => void;
|
|
133
165
|
setActiveTools: (payload: SetActiveToolsPayload) => void;
|
|
134
166
|
stopBackground: (payload: StopBackgroundPayload) => void;
|
|
167
|
+
detachBackground: (payload: DetachBackgroundPayload) => BackgroundTaskInfo | undefined;
|
|
135
168
|
clearContext: (payload: EmptyPayload) => void;
|
|
136
169
|
activateSkill: (payload: ActivateSkillPayload) => void;
|
|
137
170
|
startBtw: (payload: EmptyPayload) => string;
|
|
@@ -214,6 +247,7 @@ declare interface AgentOptions {
|
|
|
214
247
|
readonly pluginSessionStarts?: readonly EnabledPluginSessionStart[];
|
|
215
248
|
readonly experimentalFlags?: ExperimentalFlagResolver;
|
|
216
249
|
readonly replay?: ReplayBuilderOptions;
|
|
250
|
+
readonly additionalDirs?: readonly string[];
|
|
217
251
|
}
|
|
218
252
|
|
|
219
253
|
declare type AgentRecord = {
|
|
@@ -511,19 +545,14 @@ declare class BackgroundManager {
|
|
|
511
545
|
private readonly scheduledNotificationKeys;
|
|
512
546
|
private readonly deliveredNotificationKeys;
|
|
513
547
|
constructor(agent: Agent, persistence?: BackgroundTaskPersistence | undefined);
|
|
514
|
-
/**
|
|
515
|
-
* Fire terminal side effects for a live task. Idempotent: the second
|
|
516
|
-
* invocation for the same task is a no-op so a lagging `wait()`
|
|
517
|
-
* resolver or a race between `stop()` and natural exit cannot yield
|
|
518
|
-
* duplicate notifications/events.
|
|
519
|
-
*/
|
|
520
548
|
private fireTerminalEffects;
|
|
521
549
|
private emitTaskStarted;
|
|
522
550
|
private emitTaskTerminated;
|
|
523
|
-
private resolveWaiters;
|
|
524
551
|
private assertCanRegister;
|
|
525
|
-
private
|
|
526
|
-
|
|
552
|
+
private activeBackgroundAdmissionCount;
|
|
553
|
+
private startedInBackground;
|
|
554
|
+
private isDetached;
|
|
555
|
+
registerTask(task: BackgroundTask, options?: RegisterBackgroundTaskOptions): string;
|
|
527
556
|
/** Get info about a specific task. Falls back to reconcile ghosts. */
|
|
528
557
|
getTask(taskId: string): BackgroundTaskInfo | undefined;
|
|
529
558
|
/**
|
|
@@ -534,6 +563,7 @@ declare class BackgroundManager {
|
|
|
534
563
|
* restart. Active-only mode never shows ghosts (they're terminal).
|
|
535
564
|
*/
|
|
536
565
|
list(activeOnly?: boolean, limit?: number): BackgroundTaskInfo[];
|
|
566
|
+
private shouldListTask;
|
|
537
567
|
/**
|
|
538
568
|
* Return the output snapshot used by TaskOutput.
|
|
539
569
|
*
|
|
@@ -546,6 +576,7 @@ declare class BackgroundManager {
|
|
|
546
576
|
getOutputSnapshot(taskId: string, maxPreviewBytes: number): Promise<BackgroundTaskOutputSnapshot>;
|
|
547
577
|
readOutput(taskId: string, tail?: number): Promise<string>;
|
|
548
578
|
suppressTerminalNotification(taskId: string): Promise<void>;
|
|
579
|
+
detach(taskId: string): BackgroundTaskInfo | undefined;
|
|
549
580
|
/** Stop a running task. SIGTERM → 5s grace → SIGKILL. */
|
|
550
581
|
stop(taskId: string, reason?: string): Promise<BackgroundTaskInfo | undefined>;
|
|
551
582
|
stopAll(reason?: string): Promise<readonly BackgroundTaskInfo[]>;
|
|
@@ -554,6 +585,11 @@ declare class BackgroundManager {
|
|
|
554
585
|
* Returns immediately if already terminal. Times out after `timeoutMs`.
|
|
555
586
|
*/
|
|
556
587
|
wait(taskId: string, timeoutMs?: number): Promise<BackgroundTaskInfo | undefined>;
|
|
588
|
+
/**
|
|
589
|
+
* Wait until a foreground task either detaches from the current tool call or
|
|
590
|
+
* reaches a terminal state. Detached tasks return immediately.
|
|
591
|
+
*/
|
|
592
|
+
waitForForegroundRelease(taskId: string): Promise<ForegroundTaskReleaseReason | undefined>;
|
|
557
593
|
/**
|
|
558
594
|
* Load persisted task records into the ghost map. Does NOT reconcile
|
|
559
595
|
* (call `reconcile()` after `loadFromDisk()`). Idempotent; subsequent
|
|
@@ -574,6 +610,15 @@ declare class BackgroundManager {
|
|
|
574
610
|
*/
|
|
575
611
|
private persistLive;
|
|
576
612
|
private appendOutput;
|
|
613
|
+
/** Enqueue an `output.log` append, serialized per task. No-op when detached managers omit persistence. */
|
|
614
|
+
private appendTaskOutput;
|
|
615
|
+
/**
|
|
616
|
+
* Begin persisting `output.log` for a task that buffered while foreground.
|
|
617
|
+
* Flushes the buffered pre-detach output first (in order, ahead of the live
|
|
618
|
+
* stream) so the on-disk log stays complete, then releases the buffer.
|
|
619
|
+
* Idempotent.
|
|
620
|
+
*/
|
|
621
|
+
private startOutputPersist;
|
|
577
622
|
private restoreBackgroundTaskNotifications;
|
|
578
623
|
private notifyBackgroundTask;
|
|
579
624
|
private restoreBackgroundTaskNotification;
|
|
@@ -581,7 +626,10 @@ declare class BackgroundManager {
|
|
|
581
626
|
private fireNotificationHook;
|
|
582
627
|
markDeliveredNotification(origin: BackgroundTaskOrigin): void;
|
|
583
628
|
private isTerminalNotificationSuppressed;
|
|
584
|
-
private
|
|
629
|
+
private runTaskLifecycle;
|
|
630
|
+
private signalOutcome;
|
|
631
|
+
private settlementForOutcome;
|
|
632
|
+
private finalizeTask;
|
|
585
633
|
private toInfo;
|
|
586
634
|
}
|
|
587
635
|
|
|
@@ -591,6 +639,7 @@ declare interface BackgroundTask {
|
|
|
591
639
|
readonly description: string;
|
|
592
640
|
readonly timeoutMs?: number;
|
|
593
641
|
start(sink: BackgroundTaskSink): void | Promise<void>;
|
|
642
|
+
onDetach?(): void;
|
|
594
643
|
forceStop?(): Promise<void>;
|
|
595
644
|
toInfo(base: BackgroundTaskInfoBase): BackgroundTaskInfo;
|
|
596
645
|
}
|
|
@@ -601,6 +650,11 @@ declare interface BackgroundTaskInfoBase {
|
|
|
601
650
|
readonly taskId: string;
|
|
602
651
|
readonly description: string;
|
|
603
652
|
readonly status: BackgroundTaskStatus;
|
|
653
|
+
/**
|
|
654
|
+
* `false` means a tool call is still waiting on this task in the
|
|
655
|
+
* foreground. Omitted legacy records should be treated as detached.
|
|
656
|
+
*/
|
|
657
|
+
readonly detached?: boolean;
|
|
604
658
|
readonly startedAt: number;
|
|
605
659
|
readonly endedAt: number | null;
|
|
606
660
|
/** Human-readable reason for the terminal status, when available. */
|
|
@@ -1033,6 +1087,7 @@ declare class ContextMemory {
|
|
|
1033
1087
|
get lastAssistantAt(): number | null;
|
|
1034
1088
|
appendUserMessage(content: readonly ContentPart[], origin?: PromptOrigin): void;
|
|
1035
1089
|
appendSystemReminder(content: string, origin: PromptOrigin): void;
|
|
1090
|
+
appendLocalCommandStdout(content: string): void;
|
|
1036
1091
|
popMatchedMessage(matcher: (origin: PromptOrigin | undefined) => boolean): boolean;
|
|
1037
1092
|
clear(): void;
|
|
1038
1093
|
undo(count: number): void;
|
|
@@ -1045,6 +1100,7 @@ declare class ContextMemory {
|
|
|
1045
1100
|
get messages(): Message[];
|
|
1046
1101
|
useProjectedHistoryFrom(source: ContextMemory): void;
|
|
1047
1102
|
finishResume(): void;
|
|
1103
|
+
private closePendingToolResults;
|
|
1048
1104
|
appendLoopEvent(event: LoopRecordedEvent): void;
|
|
1049
1105
|
appendMessage(message: ContextMessage): void;
|
|
1050
1106
|
private flushDeferredMessagesIfToolExchangeClosed;
|
|
@@ -1124,6 +1180,7 @@ export declare interface CreateSessionOptions {
|
|
|
1124
1180
|
readonly metadata?: JsonObject | undefined;
|
|
1125
1181
|
readonly kaos?: Kaos | undefined;
|
|
1126
1182
|
readonly persistenceKaos?: Kaos | undefined;
|
|
1183
|
+
readonly additionalDirs?: readonly string[];
|
|
1127
1184
|
readonly sessionStartedProperties?: TelemetryProperties;
|
|
1128
1185
|
}
|
|
1129
1186
|
|
|
@@ -1135,6 +1192,7 @@ declare interface CreateSessionPayload {
|
|
|
1135
1192
|
readonly permission?: PermissionMode_2 | undefined;
|
|
1136
1193
|
readonly metadata?: JsonObject_2 | undefined;
|
|
1137
1194
|
readonly mcpServers?: Readonly<Record<string, McpServerConfig>>;
|
|
1195
|
+
readonly additionalDirs?: readonly string[];
|
|
1138
1196
|
readonly client?: ClientTelemetryInfo | undefined;
|
|
1139
1197
|
}
|
|
1140
1198
|
|
|
@@ -1464,6 +1522,10 @@ declare interface CronTask {
|
|
|
1464
1522
|
|
|
1465
1523
|
export declare const DEFAULT_CATALOG_URL = "https://models.dev/api.json";
|
|
1466
1524
|
|
|
1525
|
+
declare interface DetachBackgroundPayload {
|
|
1526
|
+
readonly taskId: string;
|
|
1527
|
+
}
|
|
1528
|
+
|
|
1467
1529
|
/** RFC 8628 §3.2 device authorization response. */
|
|
1468
1530
|
declare interface DeviceAuthorization {
|
|
1469
1531
|
readonly userCode: string;
|
|
@@ -1818,6 +1880,8 @@ export declare type FlagSurface = 'core' | 'tui' | 'both';
|
|
|
1818
1880
|
|
|
1819
1881
|
export declare function flushDiagnosticLogs(): Promise<boolean>;
|
|
1820
1882
|
|
|
1883
|
+
declare type ForegroundTaskReleaseReason = 'detached' | 'terminal';
|
|
1884
|
+
|
|
1821
1885
|
export declare interface ForkSessionInput {
|
|
1822
1886
|
readonly id: string;
|
|
1823
1887
|
readonly forkId?: string;
|
|
@@ -3303,6 +3367,7 @@ declare class KimiCore implements PromisableMethods<CoreAPI> {
|
|
|
3303
3367
|
unregisterTool({ sessionId, ...payload }: SessionAgentPayload<UnregisterToolPayload>): Promise<void>;
|
|
3304
3368
|
setActiveTools({ sessionId, ...payload }: SessionAgentPayload<SetActiveToolsPayload>): Promise<void>;
|
|
3305
3369
|
stopBackground({ sessionId, ...payload }: SessionAgentPayload<StopBackgroundPayload>): Promise<void>;
|
|
3370
|
+
detachBackground({ sessionId, ...payload }: SessionAgentPayload<DetachBackgroundPayload>): Promise<BackgroundTaskInfo | undefined>;
|
|
3306
3371
|
clearContext({ sessionId, ...payload }: SessionAgentPayload<EmptyPayload>): Promise<void>;
|
|
3307
3372
|
activateSkill({ sessionId, ...payload }: SessionAgentPayload<ActivateSkillPayload>): Promise<void>;
|
|
3308
3373
|
getBackgroundOutput({ sessionId, ...payload }: SessionAgentPayload<GetBackgroundOutputPayload>): Promise<string>;
|
|
@@ -3320,6 +3385,7 @@ declare class KimiCore implements PromisableMethods<CoreAPI> {
|
|
|
3320
3385
|
getMcpStartupMetrics({ sessionId, ...payload }: SessionScopedPayload<EmptyPayload>): Promise<McpStartupMetrics>;
|
|
3321
3386
|
reconnectMcpServer({ sessionId, ...payload }: SessionScopedPayload<ReconnectMcpServerPayload>): Promise<void>;
|
|
3322
3387
|
generateAgentsMd({ sessionId, ...payload }: SessionScopedPayload<EmptyPayload>): Promise<void>;
|
|
3388
|
+
addAdditionalDir({ sessionId, ...payload }: SessionScopedPayload<AddAdditionalDirPayload>): Promise<AddAdditionalDirResult_2>;
|
|
3323
3389
|
startBtw({ sessionId, ...payload }: SessionAgentPayload<EmptyPayload>): Promise<string>;
|
|
3324
3390
|
createGoal({ sessionId, ...payload }: SessionAgentPayload<CreateGoalPayload>): Promise<GoalSnapshot>;
|
|
3325
3391
|
getGoal({ sessionId, ...payload }: SessionAgentPayload<EmptyPayload>): Promise<GoalToolResult>;
|
|
@@ -3341,6 +3407,7 @@ declare class KimiCore implements PromisableMethods<CoreAPI> {
|
|
|
3341
3407
|
private mergePluginMcpConfig;
|
|
3342
3408
|
private withManagedKimiPluginEnv;
|
|
3343
3409
|
private managedKimiCodeEnvForPlugins;
|
|
3410
|
+
private requireSession;
|
|
3344
3411
|
private sessionApi;
|
|
3345
3412
|
private reloadProviderManager;
|
|
3346
3413
|
private readConfigForWrite;
|
|
@@ -4620,7 +4687,7 @@ export declare interface PluginSummary {
|
|
|
4620
4687
|
readonly github?: PluginGithubMetadata;
|
|
4621
4688
|
}
|
|
4622
4689
|
|
|
4623
|
-
declare type PreparedSystemPromptContext = Pick<SystemPromptContext, 'cwdListing' | 'agentsMd'>;
|
|
4690
|
+
declare type PreparedSystemPromptContext = Pick<SystemPromptContext, 'cwdListing' | 'agentsMd' | 'additionalDirsInfo'>;
|
|
4624
4691
|
|
|
4625
4692
|
declare interface PrepareToolExecutionResult extends AuthorizeToolExecutionResult {
|
|
4626
4693
|
readonly updatedArgs?: unknown;
|
|
@@ -4790,6 +4857,18 @@ declare interface ReconnectMcpServerRpcInput extends SessionIdRpcInput {
|
|
|
4790
4857
|
|
|
4791
4858
|
export declare function redact<T>(value: T): T;
|
|
4792
4859
|
|
|
4860
|
+
declare interface RegisterBackgroundTaskOptions {
|
|
4861
|
+
/**
|
|
4862
|
+
* When false, the task is tracked by the manager but a foreground tool call
|
|
4863
|
+
* is still waiting for it. It can later be detached through RPC.
|
|
4864
|
+
*/
|
|
4865
|
+
readonly detached?: boolean;
|
|
4866
|
+
/** Deadline owned by BackgroundManager. `0` and `undefined` do not arm a timer. */
|
|
4867
|
+
readonly timeoutMs?: number;
|
|
4868
|
+
/** Foreground caller signal. Ignored for tasks created already detached. */
|
|
4869
|
+
readonly signal?: AbortSignal;
|
|
4870
|
+
}
|
|
4871
|
+
|
|
4793
4872
|
declare interface RegisterToolPayload {
|
|
4794
4873
|
readonly name: string;
|
|
4795
4874
|
readonly description: string;
|
|
@@ -4933,12 +5012,14 @@ export declare interface ResumeSessionInput {
|
|
|
4933
5012
|
readonly id: string;
|
|
4934
5013
|
readonly kaos?: Kaos | undefined;
|
|
4935
5014
|
readonly persistenceKaos?: Kaos | undefined;
|
|
5015
|
+
readonly additionalDirs?: readonly string[];
|
|
4936
5016
|
readonly sessionStartedProperties?: TelemetryProperties;
|
|
4937
5017
|
}
|
|
4938
5018
|
|
|
4939
5019
|
declare interface ResumeSessionPayload {
|
|
4940
5020
|
readonly sessionId: string;
|
|
4941
5021
|
readonly mcpServers?: Readonly<Record<string, McpServerConfig>>;
|
|
5022
|
+
readonly additionalDirs?: readonly string[];
|
|
4942
5023
|
}
|
|
4943
5024
|
|
|
4944
5025
|
declare interface ResumeSessionResult extends SessionSummary_2 {
|
|
@@ -5063,6 +5144,7 @@ export declare abstract class SDKRpcClientBase {
|
|
|
5063
5144
|
prompt(input: SessionPromptRpcInput): Promise<void>;
|
|
5064
5145
|
steer(input: SessionPromptRpcInput): Promise<void>;
|
|
5065
5146
|
generateAgentsMd(input: SessionIdRpcInput): Promise<void>;
|
|
5147
|
+
addAdditionalDir(input: AddAdditionalDirInput): Promise<AddAdditionalDirResult>;
|
|
5066
5148
|
startBtw(input: SessionIdRpcInput): Promise<string>;
|
|
5067
5149
|
cancel(input: SessionIdRpcInput): Promise<void>;
|
|
5068
5150
|
setModel(input: SetSessionModelRpcInput): Promise<SetSessionModelRpcResult>;
|
|
@@ -5096,6 +5178,9 @@ export declare abstract class SDKRpcClientBase {
|
|
|
5096
5178
|
taskId: string;
|
|
5097
5179
|
reason?: string;
|
|
5098
5180
|
}): Promise<void>;
|
|
5181
|
+
detachBackgroundTask(input: SessionIdRpcInput & {
|
|
5182
|
+
taskId: string;
|
|
5183
|
+
}): Promise<BackgroundTaskInfo | undefined>;
|
|
5099
5184
|
createGoal(input: SessionIdRpcInput & CreateGoalInput): Promise<GoalSnapshot>;
|
|
5100
5185
|
getGoal(input: SessionIdRpcInput): Promise<GoalToolResult>;
|
|
5101
5186
|
pauseGoal(input: SessionIdRpcInput): Promise<GoalSnapshot>;
|
|
@@ -5191,6 +5276,7 @@ export declare class Session {
|
|
|
5191
5276
|
steer(input: string | PromptInput): Promise<void>;
|
|
5192
5277
|
swarm(input: string | PromptInput): Promise<void>;
|
|
5193
5278
|
init(): Promise<void>;
|
|
5279
|
+
addAdditionalDir(path: string, options?: AddAdditionalDirOptions): Promise<AddAdditionalDirResult>;
|
|
5194
5280
|
startBtw(): Promise<string>;
|
|
5195
5281
|
cancel(): Promise<void>;
|
|
5196
5282
|
setModel(model: string): Promise<void>;
|
|
@@ -5236,6 +5322,11 @@ export declare class Session {
|
|
|
5236
5322
|
stopBackgroundTask(taskId: string, options?: {
|
|
5237
5323
|
reason?: string;
|
|
5238
5324
|
}): Promise<void>;
|
|
5325
|
+
/**
|
|
5326
|
+
* Detach a running foreground task so the current tool call can return while
|
|
5327
|
+
* the task continues under background-task management.
|
|
5328
|
+
*/
|
|
5329
|
+
detachBackgroundTask(taskId: string): Promise<BackgroundTaskInfo | undefined>;
|
|
5239
5330
|
createGoal(input: CreateGoalInput): Promise<GoalSnapshot>;
|
|
5240
5331
|
getGoal(): Promise<GoalToolResult>;
|
|
5241
5332
|
pauseGoal(): Promise<GoalSnapshot>;
|
|
@@ -5259,6 +5350,7 @@ export declare class Session {
|
|
|
5259
5350
|
}): void;
|
|
5260
5351
|
private emit;
|
|
5261
5352
|
private ensureOpen;
|
|
5353
|
+
private requireSummary;
|
|
5262
5354
|
}
|
|
5263
5355
|
|
|
5264
5356
|
declare class Session_2 {
|
|
@@ -5274,12 +5366,19 @@ declare class Session_2 {
|
|
|
5274
5366
|
readonly experimentalFlags: ExperimentalFlagResolver;
|
|
5275
5367
|
private toolKaos;
|
|
5276
5368
|
private persistenceKaos;
|
|
5369
|
+
private additionalDirs;
|
|
5277
5370
|
private agentIdCounter;
|
|
5278
5371
|
private readonly skillsReady;
|
|
5279
5372
|
metadata: SessionMeta;
|
|
5280
5373
|
private writeMetadataPromise;
|
|
5281
5374
|
constructor(options: SessionOptions_2);
|
|
5282
5375
|
setToolKaos(kaos: Kaos): void;
|
|
5376
|
+
getAdditionalDirs(): readonly string[];
|
|
5377
|
+
setAdditionalDirs(additionalDirs: readonly string[]): Promise<void>;
|
|
5378
|
+
addAdditionalDir(path: string, persist?: boolean): Promise<WorkspaceAdditionalDirsLoadResult & {
|
|
5379
|
+
readonly persisted: boolean;
|
|
5380
|
+
}>;
|
|
5381
|
+
private notifyAdditionalDirAdded;
|
|
5283
5382
|
/**
|
|
5284
5383
|
* Kaos used by session-internal bootstrap (AGENTS.md context, cwd listing)
|
|
5285
5384
|
* and metadata persistence. Always backed by the persistence sink (typically
|
|
@@ -5345,6 +5444,7 @@ declare interface SessionAPI extends AgentAPIWithId {
|
|
|
5345
5444
|
getMcpStartupMetrics: (payload: EmptyPayload) => McpStartupMetrics;
|
|
5346
5445
|
reconnectMcpServer: (payload: ReconnectMcpServerPayload) => void;
|
|
5347
5446
|
generateAgentsMd: (payload: EmptyPayload) => void;
|
|
5447
|
+
addAdditionalDir: (payload: AddAdditionalDirPayload) => AddAdditionalDirResult_2;
|
|
5348
5448
|
}
|
|
5349
5449
|
|
|
5350
5450
|
declare type SessionAPIWithId = WithSessionId<SessionAPI>;
|
|
@@ -5465,6 +5565,7 @@ declare interface SessionOptions_2 {
|
|
|
5465
5565
|
readonly pluginSessionStarts?: readonly EnabledPluginSessionStart[];
|
|
5466
5566
|
readonly appVersion?: string;
|
|
5467
5567
|
readonly experimentalFlags?: ExperimentalFlagResolver;
|
|
5568
|
+
readonly additionalDirs?: readonly string[];
|
|
5468
5569
|
}
|
|
5469
5570
|
|
|
5470
5571
|
export declare type SessionPlan = PlanInfo | null;
|
|
@@ -5540,6 +5641,7 @@ declare class SessionSubagentHost {
|
|
|
5540
5641
|
suspended(event: SubagentSuspendedEvent_2): void;
|
|
5541
5642
|
startBtw(): Promise<string>;
|
|
5542
5643
|
cancelAll(reason?: unknown): void;
|
|
5644
|
+
markActiveChildDetached(agentId: string): void;
|
|
5543
5645
|
getProfileName(agentId: string): Promise<string | undefined>;
|
|
5544
5646
|
getSwarmItem(agentId: string): string | undefined;
|
|
5545
5647
|
private resolveProfile;
|
|
@@ -5565,6 +5667,7 @@ export declare interface SessionSummary {
|
|
|
5565
5667
|
readonly updatedAt: number;
|
|
5566
5668
|
readonly archived?: boolean | undefined;
|
|
5567
5669
|
readonly metadata?: JsonObject | undefined;
|
|
5670
|
+
readonly additionalDirs?: readonly string[];
|
|
5568
5671
|
}
|
|
5569
5672
|
|
|
5570
5673
|
declare interface SessionSummary_2 {
|
|
@@ -5577,6 +5680,7 @@ declare interface SessionSummary_2 {
|
|
|
5577
5680
|
readonly updatedAt: number;
|
|
5578
5681
|
readonly archived?: boolean | undefined;
|
|
5579
5682
|
readonly metadata?: JsonObject_2 | undefined;
|
|
5683
|
+
readonly additionalDirs?: readonly string[];
|
|
5580
5684
|
}
|
|
5581
5685
|
|
|
5582
5686
|
export declare interface SessionUsage {
|
|
@@ -6458,4 +6562,39 @@ declare type WithSessionId<T> = WithExtraPayload<T, {
|
|
|
6458
6562
|
readonly sessionId: string;
|
|
6459
6563
|
}>;
|
|
6460
6564
|
|
|
6461
|
-
|
|
6565
|
+
declare interface WorkspaceAdditionalDirsLoadResult {
|
|
6566
|
+
readonly projectRoot: string;
|
|
6567
|
+
readonly configPath: string;
|
|
6568
|
+
readonly additionalDirs: readonly string[];
|
|
6569
|
+
readonly warning?: string;
|
|
6570
|
+
}
|
|
6571
|
+
|
|
6572
|
+
export { }
|
|
6573
|
+
|
|
6574
|
+
// Botiverse mirror surface extension — see scripts/repackage-sdk.mjs.
|
|
6575
|
+
// Minimal type declaration; runtime implementation is bundled in dist/index.mjs.
|
|
6576
|
+
declare class LocalKaos implements Kaos {
|
|
6577
|
+
static create(): Promise<LocalKaos>;
|
|
6578
|
+
readonly name: string;
|
|
6579
|
+
readonly osEnv: Kaos['osEnv'];
|
|
6580
|
+
pathClass(): 'posix' | 'win32';
|
|
6581
|
+
normpath(path: string): string;
|
|
6582
|
+
gethome(): string;
|
|
6583
|
+
getcwd(): string;
|
|
6584
|
+
chdir(path: string): Promise<void>;
|
|
6585
|
+
withCwd(cwd: string): LocalKaos;
|
|
6586
|
+
withEnv(env: Record<string, string>): LocalKaos;
|
|
6587
|
+
stat: Kaos['stat'];
|
|
6588
|
+
iterdir: Kaos['iterdir'];
|
|
6589
|
+
glob: Kaos['glob'];
|
|
6590
|
+
readBytes: Kaos['readBytes'];
|
|
6591
|
+
readText: Kaos['readText'];
|
|
6592
|
+
readLines: Kaos['readLines'];
|
|
6593
|
+
writeBytes: Kaos['writeBytes'];
|
|
6594
|
+
writeText: Kaos['writeText'];
|
|
6595
|
+
mkdir: Kaos['mkdir'];
|
|
6596
|
+
exec: Kaos['exec'];
|
|
6597
|
+
execWithEnv: Kaos['execWithEnv'];
|
|
6598
|
+
}
|
|
6599
|
+
export { LocalKaos };
|
|
6600
|
+
export type { Kaos };
|