openfox 2.0.62 → 2.0.63
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +14 -0
- package/dist/{chat-handler-TRAITVLO.js → chat-handler-WNARPARQ.js} +11 -11
- package/dist/{chunk-WEB4WBUF.js → chunk-5OPZLQDV.js} +38 -38
- package/dist/{chunk-3WL5YCP6.js → chunk-FGG4KRFX.js} +6 -6
- package/dist/{chunk-L4WACPUX.js → chunk-IVJYQZSN.js} +5 -5
- package/dist/{chunk-QZRS2RF5.js → chunk-N5JF4RYJ.js} +362 -92
- 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-BKTBHEPY.js → chunk-W4PUAODY.js} +32 -42
- 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-OIBLY5QJ.js} +14 -14
- package/dist/package.json +5 -1
- package/dist/{processor-3ZOFGZP5.js → processor-27VCKRGB.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-HB222ARV.js} +15 -16
- package/dist/server/index.d.ts +5 -87
- package/dist/server/index.js +12 -13
- package/dist/{server-CI5IEBOC.js → server-XDC7R2IX.js} +10 -14
- package/dist/shared/index.d.ts +3 -2
- package/dist/{tools-33FQNFKC.js → tools-W2FFSF4N.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-BGkyTfuQ.css → index-DvPmgi8F.css} +1 -1
- package/dist/web/assets/{index-CETZPQXr.js → index-bSaZSLjg.js} +74 -73
- 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
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { r as ModelConfig } from '../types-akHmgvBk.js';
|
|
2
|
+
export { J as ToolCall } from '../types-akHmgvBk.js';
|
|
3
|
+
import { L as LLMCompletionRequest, a as LLMCompletionResponse, b as LLMStreamEvent } from '../types-CDZakn7f.js';
|
|
4
|
+
export { c as LLMMessage, d as LLMToolDefinition } from '../types-CDZakn7f.js';
|
|
5
|
+
|
|
6
|
+
type ProviderAuthState = 'disconnected' | 'pending' | 'connected' | 'expired' | 'error';
|
|
7
|
+
interface ProviderAuthStatus {
|
|
8
|
+
state: ProviderAuthState;
|
|
9
|
+
accountLabel?: string;
|
|
10
|
+
error?: string;
|
|
11
|
+
}
|
|
12
|
+
interface ProviderLoginChallenge {
|
|
13
|
+
mode: 'device' | 'browser' | 'external';
|
|
14
|
+
verificationUrl: string;
|
|
15
|
+
directUrl?: string;
|
|
16
|
+
userCode?: string;
|
|
17
|
+
instructions: string;
|
|
18
|
+
expiresAt?: string;
|
|
19
|
+
intervalSeconds?: number;
|
|
20
|
+
}
|
|
21
|
+
interface ProviderLoginResult {
|
|
22
|
+
credentialRef: string;
|
|
23
|
+
}
|
|
24
|
+
interface ProviderAccessContext {
|
|
25
|
+
accessToken?: string;
|
|
26
|
+
accountId?: string;
|
|
27
|
+
headers?: Record<string, string>;
|
|
28
|
+
}
|
|
29
|
+
interface ProviderAuthAdapter {
|
|
30
|
+
readonly id: string;
|
|
31
|
+
beginLogin(context: {
|
|
32
|
+
providerId: string;
|
|
33
|
+
}): Promise<{
|
|
34
|
+
challenge: ProviderLoginChallenge;
|
|
35
|
+
completion: Promise<ProviderLoginResult>;
|
|
36
|
+
}>;
|
|
37
|
+
getStatus(context: {
|
|
38
|
+
providerId: string;
|
|
39
|
+
credentialRef?: string;
|
|
40
|
+
}): Promise<ProviderAuthStatus>;
|
|
41
|
+
getAccessContext(credentialRef: string): Promise<ProviderAccessContext>;
|
|
42
|
+
logout(credentialRef: string): Promise<void>;
|
|
43
|
+
}
|
|
44
|
+
interface ProviderRequestContext {
|
|
45
|
+
providerId: string;
|
|
46
|
+
credentialRef?: string;
|
|
47
|
+
auth?: ProviderAccessContext;
|
|
48
|
+
model?: string;
|
|
49
|
+
catalogModel?: string;
|
|
50
|
+
requestBody?: Record<string, unknown>;
|
|
51
|
+
}
|
|
52
|
+
interface ProviderTransportAdapter {
|
|
53
|
+
readonly id: string;
|
|
54
|
+
listModels(context: ProviderRequestContext): Promise<ModelConfig[]>;
|
|
55
|
+
complete(request: LLMCompletionRequest, context: ProviderRequestContext): Promise<LLMCompletionResponse>;
|
|
56
|
+
stream(request: LLMCompletionRequest, context: ProviderRequestContext): AsyncIterable<LLMStreamEvent>;
|
|
57
|
+
}
|
|
58
|
+
/** Describes a provider preset shown in the UI setup wizard. */
|
|
59
|
+
interface ProviderPreset {
|
|
60
|
+
id: string;
|
|
61
|
+
name: string;
|
|
62
|
+
description: string;
|
|
63
|
+
documentationUrl?: string;
|
|
64
|
+
requiresAuth: boolean;
|
|
65
|
+
authAdapter?: string;
|
|
66
|
+
transportAdapter?: string;
|
|
67
|
+
defaults: {
|
|
68
|
+
name?: string;
|
|
69
|
+
url: string;
|
|
70
|
+
backend: string;
|
|
71
|
+
models?: ModelConfig[];
|
|
72
|
+
};
|
|
73
|
+
connectLabel?: string;
|
|
74
|
+
disconnectLabel?: string;
|
|
75
|
+
missingPluginMessage?: string;
|
|
76
|
+
}
|
|
77
|
+
interface ProviderPluginRuntime {
|
|
78
|
+
readonly mode: 'production' | 'development';
|
|
79
|
+
readonly configDirectory: string;
|
|
80
|
+
}
|
|
81
|
+
interface ProviderPluginRegistry {
|
|
82
|
+
registerAuth(adapter: ProviderAuthAdapter): void;
|
|
83
|
+
registerTransport(adapter: ProviderTransportAdapter): void;
|
|
84
|
+
registerPreset(preset: ProviderPreset): void;
|
|
85
|
+
readonly runtime: ProviderPluginRuntime;
|
|
86
|
+
}
|
|
87
|
+
/** Describes an auth adapter contributed by a plugin (for UI metadata). */
|
|
88
|
+
interface PluginAuthDescriptor {
|
|
89
|
+
id: string;
|
|
90
|
+
label: string;
|
|
91
|
+
authUI?: {
|
|
92
|
+
type: 'device' | 'oauth' | 'api-key';
|
|
93
|
+
instructions?: string;
|
|
94
|
+
connectLabel?: string;
|
|
95
|
+
disconnectLabel?: string;
|
|
96
|
+
};
|
|
97
|
+
}
|
|
98
|
+
/** Describes a transport adapter contributed by a plugin. */
|
|
99
|
+
interface PluginTransportDescriptor {
|
|
100
|
+
id: string;
|
|
101
|
+
label: string;
|
|
102
|
+
}
|
|
103
|
+
/** A provider plugin manifest describes everything a plugin contributes. */
|
|
104
|
+
interface ProviderPluginManifest {
|
|
105
|
+
/** Unique plugin ID (npm package name). */
|
|
106
|
+
id: string;
|
|
107
|
+
/** Human-readable name. */
|
|
108
|
+
name: string;
|
|
109
|
+
/** Semver version string. */
|
|
110
|
+
version: string;
|
|
111
|
+
/** Auth adapters this plugin provides. */
|
|
112
|
+
authAdapters: PluginAuthDescriptor[];
|
|
113
|
+
/** Transport adapters this plugin provides. */
|
|
114
|
+
transportAdapters: PluginTransportDescriptor[];
|
|
115
|
+
}
|
|
116
|
+
/** A provider plugin registers adapters and presets with the runtime. */
|
|
117
|
+
interface ProviderPlugin {
|
|
118
|
+
readonly manifest: ProviderPluginManifest;
|
|
119
|
+
register(registry: ProviderPluginRegistry): void;
|
|
120
|
+
}
|
|
121
|
+
/** Frontend-facing metadata for a registered adapter. */
|
|
122
|
+
interface ProviderAdapterMeta {
|
|
123
|
+
id: string;
|
|
124
|
+
kind: 'auth' | 'transport';
|
|
125
|
+
label: string;
|
|
126
|
+
authUI?: PluginAuthDescriptor['authUI'];
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
export { LLMCompletionRequest, LLMCompletionResponse, LLMStreamEvent, ModelConfig, type PluginAuthDescriptor, type PluginTransportDescriptor, type ProviderAccessContext, type ProviderAdapterMeta, type ProviderAuthAdapter, type ProviderAuthState, type ProviderAuthStatus, type ProviderLoginChallenge, type ProviderLoginResult, type ProviderPlugin, type ProviderPluginManifest, type ProviderPluginRegistry, type ProviderPluginRuntime, type ProviderPreset, type ProviderRequestContext, type ProviderTransportAdapter };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -9,13 +9,12 @@ import {
|
|
|
9
9
|
be
|
|
10
10
|
} from "./chunk-XY3LESVZ.js";
|
|
11
11
|
import {
|
|
12
|
+
detectModel,
|
|
12
13
|
fetchAvailableModelsFromBackend
|
|
13
|
-
} from "./chunk-
|
|
14
|
-
import {
|
|
15
|
-
detectModel
|
|
16
|
-
} from "./chunk-M3RB4IF6.js";
|
|
14
|
+
} from "./chunk-RYIREJAW.js";
|
|
17
15
|
import "./chunk-J2GP3J3X.js";
|
|
18
|
-
import "./chunk-
|
|
16
|
+
import "./chunk-QBYQ7KDX.js";
|
|
17
|
+
import "./chunk-V4IE7HJY.js";
|
|
19
18
|
import "./chunk-YHEQTVFV.js";
|
|
20
19
|
import "./chunk-HNCM3D7Y.js";
|
|
21
20
|
import "./chunk-Z6W4YHJB.js";
|
|
@@ -28,9 +27,8 @@ import {
|
|
|
28
27
|
loadGlobalConfig,
|
|
29
28
|
removeProvider,
|
|
30
29
|
saveGlobalConfig
|
|
31
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-WGAAQASA.js";
|
|
32
31
|
import "./chunk-CQGTEGKL.js";
|
|
33
|
-
import "./chunk-V4IE7HJY.js";
|
|
34
32
|
import "./chunk-5WRI5ZAA.js";
|
|
35
33
|
|
|
36
34
|
// src/cli/provider.ts
|
|
@@ -270,7 +268,7 @@ async function runProviderAdd(mode) {
|
|
|
270
268
|
isActive: makeActive
|
|
271
269
|
});
|
|
272
270
|
if (makeActive) {
|
|
273
|
-
const { setDefaultModelSelection } = await import("./config-
|
|
271
|
+
const { setDefaultModelSelection } = await import("./config-EUMVEFHU.js");
|
|
274
272
|
newConfig = setDefaultModelSelection(
|
|
275
273
|
newConfig,
|
|
276
274
|
newConfig.providers[newConfig.providers.length - 1].id,
|
|
@@ -398,4 +396,4 @@ export {
|
|
|
398
396
|
runProviderRemove,
|
|
399
397
|
runProviderUse
|
|
400
398
|
};
|
|
401
|
-
//# sourceMappingURL=provider-
|
|
399
|
+
//# sourceMappingURL=provider-GYOW4OWQ.js.map
|
|
@@ -3,16 +3,15 @@ import {
|
|
|
3
3
|
fetchAvailableModelsFromBackend,
|
|
4
4
|
fetchModelsWithContext,
|
|
5
5
|
parseDefaultModelSelection
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-M3RB4IF6.js";
|
|
6
|
+
} from "./chunk-RYIREJAW.js";
|
|
8
7
|
import "./chunk-J2GP3J3X.js";
|
|
9
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-QBYQ7KDX.js";
|
|
9
|
+
import "./chunk-V4IE7HJY.js";
|
|
10
10
|
import "./chunk-YHEQTVFV.js";
|
|
11
11
|
import "./chunk-HNCM3D7Y.js";
|
|
12
12
|
import "./chunk-Z6W4YHJB.js";
|
|
13
13
|
import "./chunk-ZO5EXQMG.js";
|
|
14
14
|
import "./chunk-K44MW7JJ.js";
|
|
15
|
-
import "./chunk-V4IE7HJY.js";
|
|
16
15
|
import "./chunk-5WRI5ZAA.js";
|
|
17
16
|
export {
|
|
18
17
|
createProviderManager,
|
|
@@ -20,4 +19,4 @@ export {
|
|
|
20
19
|
fetchModelsWithContext,
|
|
21
20
|
parseDefaultModelSelection
|
|
22
21
|
};
|
|
23
|
-
//# sourceMappingURL=provider-manager-
|
|
22
|
+
//# sourceMappingURL=provider-manager-HRHNF73A.js.map
|
|
@@ -1,29 +1,29 @@
|
|
|
1
1
|
import {
|
|
2
2
|
VERSION,
|
|
3
3
|
createServer
|
|
4
|
-
} from "./chunk-
|
|
5
|
-
import "./chunk-
|
|
6
|
-
import "./chunk-
|
|
7
|
-
import "./chunk-
|
|
4
|
+
} from "./chunk-N5JF4RYJ.js";
|
|
5
|
+
import "./chunk-W4PUAODY.js";
|
|
6
|
+
import "./chunk-OESYKZCM.js";
|
|
7
|
+
import "./chunk-IVJYQZSN.js";
|
|
8
|
+
import "./chunk-5OPZLQDV.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";
|
|
12
|
-
import "./chunk-F4PMNP7S.js";
|
|
13
|
-
import "./chunk-EU3WWTFH.js";
|
|
14
|
-
import "./chunk-SVSKQYFH.js";
|
|
15
|
-
import "./chunk-YQ3SOPBI.js";
|
|
16
|
-
import "./chunk-GJU35MDV.js";
|
|
17
|
-
import "./chunk-6VDCH5ML.js";
|
|
18
14
|
import {
|
|
19
15
|
loadConfig
|
|
20
16
|
} from "./chunk-AIJE3RYH.js";
|
|
21
17
|
import "./chunk-TMUBLQFC.js";
|
|
18
|
+
import "./chunk-F4PMNP7S.js";
|
|
19
|
+
import "./chunk-EU3WWTFH.js";
|
|
20
|
+
import "./chunk-SVSKQYFH.js";
|
|
21
|
+
import "./chunk-YQ3SOPBI.js";
|
|
22
22
|
import "./chunk-ZPIZLTWU.js";
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-M3RB4IF6.js";
|
|
23
|
+
import "./chunk-RYIREJAW.js";
|
|
25
24
|
import "./chunk-J2GP3J3X.js";
|
|
26
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-QBYQ7KDX.js";
|
|
26
|
+
import "./chunk-V4IE7HJY.js";
|
|
27
27
|
import "./chunk-YHEQTVFV.js";
|
|
28
28
|
import "./chunk-HNCM3D7Y.js";
|
|
29
29
|
import "./chunk-Z6W4YHJB.js";
|
|
@@ -37,13 +37,12 @@ import {
|
|
|
37
37
|
getActiveProvider,
|
|
38
38
|
getDefaultModel,
|
|
39
39
|
loadGlobalConfig
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-WGAAQASA.js";
|
|
41
41
|
import {
|
|
42
42
|
ensureDataDirExists,
|
|
43
43
|
getDatabasePath,
|
|
44
44
|
getGlobalConfigPath
|
|
45
45
|
} from "./chunk-CQGTEGKL.js";
|
|
46
|
-
import "./chunk-V4IE7HJY.js";
|
|
47
46
|
import "./chunk-5WRI5ZAA.js";
|
|
48
47
|
|
|
49
48
|
// src/server/utils/network.ts
|
|
@@ -205,4 +204,4 @@ async function runServe(options) {
|
|
|
205
204
|
export {
|
|
206
205
|
runServe
|
|
207
206
|
};
|
|
208
|
-
//# sourceMappingURL=serve-
|
|
207
|
+
//# sourceMappingURL=serve-HB222ARV.js.map
|
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;
|
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-N5JF4RYJ.js";
|
|
5
|
+
import "../chunk-W4PUAODY.js";
|
|
6
|
+
import "../chunk-OESYKZCM.js";
|
|
7
|
+
import "../chunk-IVJYQZSN.js";
|
|
8
|
+
import "../chunk-5OPZLQDV.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-W4PUAODY.js";
|
|
5
|
+
import "./chunk-OESYKZCM.js";
|
|
6
|
+
import "./chunk-IVJYQZSN.js";
|
|
7
|
+
import "./chunk-5OPZLQDV.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-XDC7R2IX.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-5OPZLQDV.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-W2FFSF4N.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 };
|