openfox 2.0.62 → 2.0.64
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/README.md +14 -0
- package/dist/{chat-handler-TRAITVLO.js → chat-handler-LI4R4Z2E.js} +11 -11
- package/dist/{chunk-L4WACPUX.js → chunk-73N5CJH3.js} +5 -5
- package/dist/{chunk-BKTBHEPY.js → chunk-HZNY77HZ.js} +32 -42
- package/dist/{chunk-QZRS2RF5.js → chunk-JFQSQO2N.js} +362 -92
- package/dist/{chunk-3WL5YCP6.js → chunk-O3G6X5CT.js} +6 -6
- package/dist/{chunk-GJU35MDV.js → chunk-OESYKZCM.js} +2 -2
- package/dist/{chunk-JKLPWTUN.js → chunk-QBYQ7KDX.js} +9 -4
- package/dist/{chunk-NVPVDDQZ.js → chunk-QJ5FH5DP.js} +14 -10
- package/dist/{chunk-H774GQJW.js → chunk-RYIREJAW.js} +234 -40
- package/dist/{chunk-WEB4WBUF.js → chunk-WD75RSGR.js} +149 -117
- package/dist/{chunk-43UFGATL.js → chunk-WGAAQASA.js} +31 -9
- package/dist/{chunk-6VDCH5ML.js → chunk-X5YCWKNS.js} +4 -4
- package/dist/cli/dev.js +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/{client-KRFGMNGN.js → client-LAKW7TA5.js} +3 -3
- package/dist/{compactor-Q33AJPCQ.js → compactor-I3N56PSJ.js} +4 -4
- package/dist/{config-GMQUPNBY.js → config-EUMVEFHU.js} +2 -2
- package/dist/{orchestrator-TQ23BAFQ.js → orchestrator-PFN7C5JI.js} +14 -14
- package/dist/package.json +5 -1
- package/dist/{processor-3ZOFGZP5.js → processor-AYYXP5NS.js} +13 -12
- package/dist/protocol-Cq66hdDX.d.ts +375 -0
- package/dist/provider/index.d.ts +129 -0
- package/dist/provider/index.js +1 -0
- package/dist/{provider-LBYBC5AG.js → provider-GYOW4OWQ.js} +7 -9
- package/dist/{provider-manager-ABEUYU3K.js → provider-manager-HRHNF73A.js} +4 -5
- package/dist/{serve-CNA5NKOR.js → serve-54KALE6R.js} +15 -16
- package/dist/server/index.d.ts +6 -87
- package/dist/server/index.js +12 -13
- package/dist/{server-CI5IEBOC.js → server-Z2A5YZM6.js} +10 -14
- package/dist/shared/index.d.ts +3 -2
- package/dist/{tools-33FQNFKC.js → tools-R6LPK6OS.js} +7 -7
- package/dist/types-CDZakn7f.d.ts +89 -0
- package/dist/{protocol-J7khRG62.d.ts → types-akHmgvBk.d.ts} +17 -373
- package/dist/web/assets/{index-CETZPQXr.js → index-CkE65FP4.js} +74 -73
- package/dist/web/assets/{index-BGkyTfuQ.css → index-DvPmgi8F.css} +1 -1
- package/dist/web/index.html +2 -2
- package/dist/web/sw.js +1 -1
- package/package.json +5 -1
- package/dist/chunk-M3RB4IF6.js +0 -114
package/dist/server/index.d.ts
CHANGED
|
@@ -1,91 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { h as Diagnostic, u as Provider, r as ModelConfig, w as Session, B as SessionSummary, t as Project, y as SessionMode, z as SessionPhase, M as Message, d as Criterion, f as CriterionStatus, q as MetadataEntry, A as Attachment, b as ContextState, D as DangerLevel$1, H as StatsIdentity, O as ToolResult, a as Config } from '../types-akHmgvBk.js';
|
|
2
2
|
import { Server } from 'node:http';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
6
|
-
content: string;
|
|
7
|
-
thinkingContent?: string;
|
|
8
|
-
toolCalls?: ToolCall[];
|
|
9
|
-
toolCallId?: string;
|
|
10
|
-
name?: string;
|
|
11
|
-
attachments?: Attachment[];
|
|
12
|
-
}
|
|
13
|
-
interface LLMToolDefinition {
|
|
14
|
-
type: 'function';
|
|
15
|
-
function: {
|
|
16
|
-
name: string;
|
|
17
|
-
description: string;
|
|
18
|
-
parameters: Record<string, unknown>;
|
|
19
|
-
};
|
|
20
|
-
}
|
|
21
|
-
type ReasoningEffort = 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
22
|
-
interface LLMCompletionRequest {
|
|
23
|
-
messages: LLMMessage[];
|
|
24
|
-
tools?: LLMToolDefinition[];
|
|
25
|
-
toolChoice?: 'auto' | 'none' | 'required' | {
|
|
26
|
-
type: 'function';
|
|
27
|
-
function: {
|
|
28
|
-
name: string;
|
|
29
|
-
};
|
|
30
|
-
};
|
|
31
|
-
temperature?: number;
|
|
32
|
-
maxTokens?: number;
|
|
33
|
-
stream?: boolean;
|
|
34
|
-
signal?: AbortSignal;
|
|
35
|
-
reasoningEffort?: ReasoningEffort;
|
|
36
|
-
modelSettings?: {
|
|
37
|
-
temperature?: number;
|
|
38
|
-
topP?: number;
|
|
39
|
-
topK?: number;
|
|
40
|
-
maxTokens?: number;
|
|
41
|
-
supportsVision?: boolean;
|
|
42
|
-
chatTemplateKwargs?: Record<string, unknown>;
|
|
43
|
-
queryParams?: Record<string, unknown>;
|
|
44
|
-
};
|
|
45
|
-
/** When true, include the raw API response body in the result */
|
|
46
|
-
returnRaw?: boolean;
|
|
47
|
-
/** When true, the client-level reasoningEffort (from thinkingLevel) is NOT applied.
|
|
48
|
-
* Used by non-thinking callers (e.g. title generation) that want to opt out. */
|
|
49
|
-
skipClientReasoningEffort?: boolean;
|
|
50
|
-
}
|
|
51
|
-
interface LLMCompletionResponse {
|
|
52
|
-
id: string;
|
|
53
|
-
content: string;
|
|
54
|
-
toolCalls?: ToolCall[];
|
|
55
|
-
thinkingContent?: string;
|
|
56
|
-
reasoning_content?: string;
|
|
57
|
-
finishReason: 'stop' | 'tool_calls' | 'length' | 'content_filter';
|
|
58
|
-
usage: {
|
|
59
|
-
promptTokens: number;
|
|
60
|
-
completionTokens: number;
|
|
61
|
-
totalTokens: number;
|
|
62
|
-
};
|
|
63
|
-
/** Raw API response body, only set when returnRaw was requested */
|
|
64
|
-
raw?: string;
|
|
65
|
-
}
|
|
66
|
-
type LLMStreamEvent = {
|
|
67
|
-
type: 'text_delta';
|
|
68
|
-
content: string;
|
|
69
|
-
} | {
|
|
70
|
-
type: 'thinking_delta';
|
|
71
|
-
content: string;
|
|
72
|
-
} | {
|
|
73
|
-
type: 'tool_call_delta';
|
|
74
|
-
index: number;
|
|
75
|
-
id?: string;
|
|
76
|
-
name?: string;
|
|
77
|
-
arguments?: string;
|
|
78
|
-
} | {
|
|
79
|
-
type: 'done';
|
|
80
|
-
response: LLMCompletionResponse;
|
|
81
|
-
} | {
|
|
82
|
-
type: 'error';
|
|
83
|
-
error: string;
|
|
84
|
-
};
|
|
85
|
-
interface LLMClient {
|
|
86
|
-
complete(request: LLMCompletionRequest): Promise<LLMCompletionResponse>;
|
|
87
|
-
stream(request: LLMCompletionRequest): AsyncIterable<LLMStreamEvent>;
|
|
88
|
-
}
|
|
3
|
+
import { e as LLMClient, d as LLMToolDefinition } from '../types-CDZakn7f.js';
|
|
4
|
+
import { a0 as QueuedMessage, a1 as ServerMessage } from '../protocol-Cq66hdDX.js';
|
|
89
5
|
|
|
90
6
|
/**
|
|
91
7
|
* Model-specific configuration profiles.
|
|
@@ -214,6 +130,8 @@ interface ModelSettingsUpdate {
|
|
|
214
130
|
}
|
|
215
131
|
interface ProviderManager {
|
|
216
132
|
getProviders(): Provider[];
|
|
133
|
+
createClient(providerId: string, model: string): LLMClientWithModel | undefined;
|
|
134
|
+
resolveModel(providerId: string, model?: string): string | undefined;
|
|
217
135
|
getActiveProvider(): Provider | undefined;
|
|
218
136
|
getActiveProviderId(): string | undefined;
|
|
219
137
|
getCurrentModel(): string | undefined;
|
|
@@ -624,6 +542,7 @@ interface ToolContext {
|
|
|
624
542
|
sessionId: string;
|
|
625
543
|
sessionManager: SessionManager;
|
|
626
544
|
dangerLevel?: DangerLevel$1;
|
|
545
|
+
isSubAgent?: boolean;
|
|
627
546
|
signal?: AbortSignal | undefined;
|
|
628
547
|
onProgress?: ((message: string) => void) | undefined;
|
|
629
548
|
onEvent?: ((event: ServerMessage) => void) | undefined;
|
package/dist/server/index.js
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createServer,
|
|
3
3
|
createServerHandle
|
|
4
|
-
} from "../chunk-
|
|
5
|
-
import "../chunk-
|
|
6
|
-
import "../chunk-
|
|
7
|
-
import "../chunk-
|
|
4
|
+
} from "../chunk-JFQSQO2N.js";
|
|
5
|
+
import "../chunk-HZNY77HZ.js";
|
|
6
|
+
import "../chunk-OESYKZCM.js";
|
|
7
|
+
import "../chunk-73N5CJH3.js";
|
|
8
|
+
import "../chunk-WD75RSGR.js";
|
|
9
|
+
import "../chunk-X5YCWKNS.js";
|
|
8
10
|
import "../chunk-LBGHZLLH.js";
|
|
9
11
|
import "../chunk-BGTEIA2S.js";
|
|
10
12
|
import "../chunk-PK2RMVMB.js";
|
|
11
13
|
import "../chunk-NWO6GRYE.js";
|
|
14
|
+
import "../chunk-AIJE3RYH.js";
|
|
15
|
+
import "../chunk-TMUBLQFC.js";
|
|
12
16
|
import "../chunk-F4PMNP7S.js";
|
|
13
17
|
import "../chunk-EU3WWTFH.js";
|
|
14
18
|
import "../chunk-SVSKQYFH.js";
|
|
15
19
|
import "../chunk-YQ3SOPBI.js";
|
|
16
|
-
import "../chunk-GJU35MDV.js";
|
|
17
|
-
import "../chunk-6VDCH5ML.js";
|
|
18
|
-
import "../chunk-AIJE3RYH.js";
|
|
19
|
-
import "../chunk-TMUBLQFC.js";
|
|
20
20
|
import "../chunk-ZPIZLTWU.js";
|
|
21
|
-
import "../chunk-
|
|
22
|
-
import "../chunk-M3RB4IF6.js";
|
|
21
|
+
import "../chunk-RYIREJAW.js";
|
|
23
22
|
import "../chunk-J2GP3J3X.js";
|
|
24
|
-
import "../chunk-
|
|
23
|
+
import "../chunk-QBYQ7KDX.js";
|
|
24
|
+
import "../chunk-V4IE7HJY.js";
|
|
25
25
|
import "../chunk-YHEQTVFV.js";
|
|
26
26
|
import "../chunk-HNCM3D7Y.js";
|
|
27
27
|
import "../chunk-Z6W4YHJB.js";
|
|
@@ -29,9 +29,8 @@ import "../chunk-ZO5EXQMG.js";
|
|
|
29
29
|
import "../chunk-K44MW7JJ.js";
|
|
30
30
|
import "../chunk-VUQCQXXJ.js";
|
|
31
31
|
import "../chunk-YD6NDTKF.js";
|
|
32
|
-
import "../chunk-
|
|
32
|
+
import "../chunk-WGAAQASA.js";
|
|
33
33
|
import "../chunk-CQGTEGKL.js";
|
|
34
|
-
import "../chunk-V4IE7HJY.js";
|
|
35
34
|
import "../chunk-5WRI5ZAA.js";
|
|
36
35
|
export {
|
|
37
36
|
createServer,
|
|
@@ -1,38 +1,34 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createWebSocketServer,
|
|
3
3
|
signalMcpReady
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-HZNY77HZ.js";
|
|
5
|
+
import "./chunk-OESYKZCM.js";
|
|
6
|
+
import "./chunk-73N5CJH3.js";
|
|
7
|
+
import "./chunk-WD75RSGR.js";
|
|
8
|
+
import "./chunk-X5YCWKNS.js";
|
|
7
9
|
import "./chunk-LBGHZLLH.js";
|
|
8
10
|
import "./chunk-BGTEIA2S.js";
|
|
9
11
|
import "./chunk-PK2RMVMB.js";
|
|
10
12
|
import "./chunk-NWO6GRYE.js";
|
|
13
|
+
import "./chunk-AIJE3RYH.js";
|
|
14
|
+
import "./chunk-TMUBLQFC.js";
|
|
11
15
|
import "./chunk-F4PMNP7S.js";
|
|
12
16
|
import "./chunk-EU3WWTFH.js";
|
|
13
17
|
import "./chunk-SVSKQYFH.js";
|
|
14
18
|
import "./chunk-YQ3SOPBI.js";
|
|
15
|
-
import "./chunk-GJU35MDV.js";
|
|
16
|
-
import "./chunk-6VDCH5ML.js";
|
|
17
|
-
import "./chunk-AIJE3RYH.js";
|
|
18
|
-
import "./chunk-TMUBLQFC.js";
|
|
19
19
|
import "./chunk-ZPIZLTWU.js";
|
|
20
|
-
import "./chunk-M3RB4IF6.js";
|
|
21
20
|
import "./chunk-J2GP3J3X.js";
|
|
22
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-V4IE7HJY.js";
|
|
23
22
|
import "./chunk-YHEQTVFV.js";
|
|
24
|
-
import "./chunk-HNCM3D7Y.js";
|
|
25
23
|
import "./chunk-Z6W4YHJB.js";
|
|
26
|
-
import "./chunk-ZO5EXQMG.js";
|
|
27
24
|
import "./chunk-K44MW7JJ.js";
|
|
28
25
|
import "./chunk-VUQCQXXJ.js";
|
|
29
26
|
import "./chunk-YD6NDTKF.js";
|
|
30
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-WGAAQASA.js";
|
|
31
28
|
import "./chunk-CQGTEGKL.js";
|
|
32
|
-
import "./chunk-V4IE7HJY.js";
|
|
33
29
|
import "./chunk-5WRI5ZAA.js";
|
|
34
30
|
export {
|
|
35
31
|
createWebSocketServer,
|
|
36
32
|
signalMcpReady
|
|
37
33
|
};
|
|
38
|
-
//# sourceMappingURL=server-
|
|
34
|
+
//# sourceMappingURL=server-Z2A5YZM6.js.map
|
package/dist/shared/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { M as Message, S as SessionStats } from '../
|
|
2
|
-
export { A as
|
|
1
|
+
import { M as Message, S as SessionStats } from '../types-akHmgvBk.js';
|
|
2
|
+
export { A as Attachment, C as CallStatsDataPoint, a as Config, b as ContextState, c as ContextWindow, d as Criterion, e as CriterionAttempt, f as CriterionStatus, g as CriterionValidation, D as DangerLevel, h as Diagnostic, E as EditContextEdit, i as EditContextLine, j as EditContextRegion, k as ElementData, l as ExecutionState, F as FileReadEntry, I as InjectedFile, L as LLMCallStats, m as LlmBackend, n as MessageRole, o as MessageSegment, p as MessageStats, q as MetadataEntry, r as ModelConfig, s as ModelSessionStats, P as PreparingToolCall, t as Project, u as Provider, v as ProviderBackend, R as RecentUserPrompt, w as Session, x as SessionMetadata, y as SessionMode, z as SessionPhase, B as SessionSummary, G as StatsDataPoint, H as StatsIdentity, T as Todo, J as ToolCall, K as ToolMode, N as ToolName, O as ToolResult, V as ValidationResult } from '../types-akHmgvBk.js';
|
|
3
|
+
export { A as AgentEvent, a as AskAnswerPayload, b as AskUserEvent, B as BackgroundProcess, c as BackgroundProcessExitedPayload, d as BackgroundProcessOutputPayload, e as BackgroundProcessRemovedPayload, f as BackgroundProcessStartedPayload, g as BackgroundProcessStatus, C as ChatAskUserPayload, h as ChatDeltaPayload, i as ChatDonePayload, j as ChatErrorPayload, k as ChatFormatRetryPayload, l as ChatMessagePayload, m as ChatMessageUpdatedPayload, n as ChatPathConfirmationPayload, o as ChatProgressPayload, p as ChatThinkingPayload, q as ChatTodoPayload, r as ChatToolCallPayload, s as ChatToolOutputPayload, t as ChatToolPreparingPayload, u as ChatToolResultPayload, v as ChatVisionFallbackPayload, w as ClientMessage, x as ClientMessageType, y as ContextCompactionEvent, z as ContextStatePayload, D as CriteriaUpdatedPayload, E as DevServerOutputPayload, F as DevServerStatePayload, G as ErrorPayload, H as GitDiffFile, I as GitStatusPayload, L as LogLine, J as LspDiagnosticsPayload, M as MetadataUpdatedPayload, K as ModeChangedPayload, P as PathConfirmPayload, N as PathConfirmationReason, O as PendingPathConfirmationPayload, Q as PendingQuestionPayload, R as PhaseChangedPayload, S as ProjectDeletedPayload, T as ProjectListPayload, U as ProjectStatePayload, V as ProviderChangedPayload, W as QueueAddedEvent, X as QueueCancelledEvent, Y as QueueDrainedEvent, Z as QueueEvent, _ as QueueEventType, $ as QueueStatePayload, a0 as QueuedMessage, a1 as ServerMessage, a2 as ServerMessageType, a3 as SessionListPayload, a4 as SessionLoadPayload, a5 as SessionNameGeneratedPayload, a6 as SessionRunningPayload, a7 as SessionStatePayload, a8 as TaskCompletedPayload, a9 as createClientMessage, aa as createServerMessage, ab as isClientMessage, ac as isServerMessage } from '../protocol-Cq66hdDX.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* Session stats computation - aggregates response-level MessageStats from
|
|
@@ -12,11 +12,14 @@ import {
|
|
|
12
12
|
setMcpTools,
|
|
13
13
|
stepDoneTool,
|
|
14
14
|
validateToolAction
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-WD75RSGR.js";
|
|
16
|
+
import "./chunk-X5YCWKNS.js";
|
|
16
17
|
import "./chunk-LBGHZLLH.js";
|
|
17
18
|
import "./chunk-BGTEIA2S.js";
|
|
18
19
|
import "./chunk-PK2RMVMB.js";
|
|
19
20
|
import "./chunk-NWO6GRYE.js";
|
|
21
|
+
import "./chunk-AIJE3RYH.js";
|
|
22
|
+
import "./chunk-TMUBLQFC.js";
|
|
20
23
|
import "./chunk-F4PMNP7S.js";
|
|
21
24
|
import {
|
|
22
25
|
AskUserInterrupt,
|
|
@@ -26,18 +29,15 @@ import {
|
|
|
26
29
|
} from "./chunk-EU3WWTFH.js";
|
|
27
30
|
import "./chunk-SVSKQYFH.js";
|
|
28
31
|
import "./chunk-YQ3SOPBI.js";
|
|
29
|
-
import "./chunk-6VDCH5ML.js";
|
|
30
|
-
import "./chunk-AIJE3RYH.js";
|
|
31
|
-
import "./chunk-TMUBLQFC.js";
|
|
32
32
|
import "./chunk-ZPIZLTWU.js";
|
|
33
33
|
import "./chunk-J2GP3J3X.js";
|
|
34
|
+
import "./chunk-V4IE7HJY.js";
|
|
34
35
|
import "./chunk-YHEQTVFV.js";
|
|
35
36
|
import "./chunk-Z6W4YHJB.js";
|
|
36
37
|
import "./chunk-K44MW7JJ.js";
|
|
37
38
|
import "./chunk-YD6NDTKF.js";
|
|
38
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-WGAAQASA.js";
|
|
39
40
|
import "./chunk-CQGTEGKL.js";
|
|
40
|
-
import "./chunk-V4IE7HJY.js";
|
|
41
41
|
import "./chunk-5WRI5ZAA.js";
|
|
42
42
|
export {
|
|
43
43
|
AskUserInterrupt,
|
|
@@ -58,4 +58,4 @@ export {
|
|
|
58
58
|
stepDoneTool,
|
|
59
59
|
validateToolAction
|
|
60
60
|
};
|
|
61
|
-
//# sourceMappingURL=tools-
|
|
61
|
+
//# sourceMappingURL=tools-R6LPK6OS.js.map
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { J as ToolCall, A as Attachment } from './types-akHmgvBk.js';
|
|
2
|
+
|
|
3
|
+
interface LLMMessage {
|
|
4
|
+
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
5
|
+
content: string;
|
|
6
|
+
thinkingContent?: string;
|
|
7
|
+
toolCalls?: ToolCall[];
|
|
8
|
+
toolCallId?: string;
|
|
9
|
+
name?: string;
|
|
10
|
+
attachments?: Attachment[];
|
|
11
|
+
}
|
|
12
|
+
interface LLMToolDefinition {
|
|
13
|
+
type: 'function';
|
|
14
|
+
function: {
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
parameters: Record<string, unknown>;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
type ReasoningEffort = 'low' | 'medium' | 'high' | 'xhigh' | 'max';
|
|
21
|
+
interface LLMCompletionRequest {
|
|
22
|
+
messages: LLMMessage[];
|
|
23
|
+
tools?: LLMToolDefinition[];
|
|
24
|
+
toolChoice?: 'auto' | 'none' | 'required' | {
|
|
25
|
+
type: 'function';
|
|
26
|
+
function: {
|
|
27
|
+
name: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
temperature?: number;
|
|
31
|
+
maxTokens?: number;
|
|
32
|
+
stream?: boolean;
|
|
33
|
+
signal?: AbortSignal;
|
|
34
|
+
reasoningEffort?: ReasoningEffort;
|
|
35
|
+
modelSettings?: {
|
|
36
|
+
temperature?: number;
|
|
37
|
+
topP?: number;
|
|
38
|
+
topK?: number;
|
|
39
|
+
maxTokens?: number;
|
|
40
|
+
supportsVision?: boolean;
|
|
41
|
+
chatTemplateKwargs?: Record<string, unknown>;
|
|
42
|
+
queryParams?: Record<string, unknown>;
|
|
43
|
+
};
|
|
44
|
+
/** When true, include the raw API response body in the result */
|
|
45
|
+
returnRaw?: boolean;
|
|
46
|
+
/** When true, the client-level reasoningEffort (from thinkingLevel) is NOT applied.
|
|
47
|
+
* Used by non-thinking callers (e.g. title generation) that want to opt out. */
|
|
48
|
+
skipClientReasoningEffort?: boolean;
|
|
49
|
+
}
|
|
50
|
+
interface LLMCompletionResponse {
|
|
51
|
+
id: string;
|
|
52
|
+
content: string;
|
|
53
|
+
toolCalls?: ToolCall[];
|
|
54
|
+
thinkingContent?: string;
|
|
55
|
+
reasoning_content?: string;
|
|
56
|
+
finishReason: 'stop' | 'tool_calls' | 'length' | 'content_filter';
|
|
57
|
+
usage: {
|
|
58
|
+
promptTokens: number;
|
|
59
|
+
completionTokens: number;
|
|
60
|
+
totalTokens: number;
|
|
61
|
+
};
|
|
62
|
+
/** Raw API response body, only set when returnRaw was requested */
|
|
63
|
+
raw?: string;
|
|
64
|
+
}
|
|
65
|
+
type LLMStreamEvent = {
|
|
66
|
+
type: 'text_delta';
|
|
67
|
+
content: string;
|
|
68
|
+
} | {
|
|
69
|
+
type: 'thinking_delta';
|
|
70
|
+
content: string;
|
|
71
|
+
} | {
|
|
72
|
+
type: 'tool_call_delta';
|
|
73
|
+
index: number;
|
|
74
|
+
id?: string;
|
|
75
|
+
name?: string;
|
|
76
|
+
arguments?: string;
|
|
77
|
+
} | {
|
|
78
|
+
type: 'done';
|
|
79
|
+
response: LLMCompletionResponse;
|
|
80
|
+
} | {
|
|
81
|
+
type: 'error';
|
|
82
|
+
error: string;
|
|
83
|
+
};
|
|
84
|
+
interface LLMClient {
|
|
85
|
+
complete(request: LLMCompletionRequest): Promise<LLMCompletionResponse>;
|
|
86
|
+
stream(request: LLMCompletionRequest): AsyncIterable<LLMStreamEvent>;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export type { LLMCompletionRequest as L, LLMCompletionResponse as a, LLMStreamEvent as b, LLMMessage as c, LLMToolDefinition as d, LLMClient as e };
|