@xenosystem/agent-sdk 0.9.24 → 0.9.26
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/dist/artifacts/index.cjs +1 -1
- package/dist/artifacts/index.js +1 -1
- package/dist/automation/index.cjs +9 -9
- package/dist/automation/index.d.cts +69 -3
- package/dist/automation/index.d.ts +69 -3
- package/dist/automation/index.js +9 -9
- package/dist/automation/metafile-cjs.json +1 -1
- package/dist/automation/metafile-esm.json +1 -1
- package/dist/control-plane/index.cjs +1 -1
- package/dist/control-plane/index.js +1 -1
- package/dist/coordination/index.cjs +2 -2
- package/dist/coordination/index.d.cts +15 -3
- package/dist/coordination/index.d.ts +15 -3
- package/dist/coordination/index.js +2 -2
- package/dist/coordination/metafile-cjs.json +1 -1
- package/dist/coordination/metafile-esm.json +1 -1
- package/dist/electron/index.cjs +157 -153
- package/dist/electron/index.d.cts +22 -3
- package/dist/electron/index.d.ts +22 -3
- package/dist/electron/index.js +157 -153
- package/dist/electron/metafile-cjs.json +1 -1
- package/dist/electron/metafile-esm.json +1 -1
- package/dist/governance/index.d.cts +2 -0
- package/dist/governance/index.d.ts +2 -0
- package/dist/hosted/index.cjs +1 -1
- package/dist/hosted/index.js +1 -1
- package/dist/hosted/metafile-cjs.json +1 -1
- package/dist/hosted/metafile-esm.json +1 -1
- package/dist/index.cjs +473 -343
- package/dist/index.d.cts +314 -31
- package/dist/index.d.ts +314 -31
- package/dist/index.js +473 -343
- package/dist/mcp/index.d.cts +3 -0
- package/dist/mcp/index.d.ts +3 -0
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/providers/index.cjs +10 -10
- package/dist/providers/index.d.cts +92 -17
- package/dist/providers/index.d.ts +92 -17
- package/dist/providers/index.js +10 -10
- package/dist/providers/metafile-cjs.json +1 -1
- package/dist/providers/metafile-esm.json +1 -1
- package/dist/session/index.cjs +1 -1
- package/dist/session/index.d.cts +2 -0
- package/dist/session/index.d.ts +2 -0
- package/dist/session/index.js +1 -1
- package/dist/session/metafile-cjs.json +1 -1
- package/dist/session/metafile-esm.json +1 -1
- package/dist/skills/index.d.cts +3 -0
- package/dist/skills/index.d.ts +3 -0
- package/dist/ui/index.d.cts +2 -0
- package/dist/ui/index.d.ts +2 -0
- package/dist/utils/index.d.cts +2 -0
- package/dist/utils/index.d.ts +2 -0
- package/package.json +10 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WebJobProgress } from "@xenosystem/web-context-client/progress";
|
|
1
2
|
interface FileSnapshot {
|
|
2
3
|
path: string;
|
|
3
4
|
exists: boolean;
|
|
@@ -37,6 +38,14 @@ declare class TurnDiffTracker {
|
|
|
37
38
|
private resolvePath;
|
|
38
39
|
private snapshot;
|
|
39
40
|
}
|
|
41
|
+
interface ProviderTransportLimits {
|
|
42
|
+
connectTimeoutMs?: number;
|
|
43
|
+
totalTimeoutMs?: number;
|
|
44
|
+
idleTimeoutMs?: number;
|
|
45
|
+
maxResponseBytes?: number;
|
|
46
|
+
maxHeaderBytes?: number;
|
|
47
|
+
maxEventBytes?: number;
|
|
48
|
+
}
|
|
40
49
|
type TokenEstimator = (text: string, model: string) => number;
|
|
41
50
|
type TokenAccountingSource = "exact" | "provider-reported" | "estimated";
|
|
42
51
|
interface TokenAccountingAdapter {
|
|
@@ -100,6 +109,7 @@ interface WebContextToolResult {
|
|
|
100
109
|
mediaType: string;
|
|
101
110
|
bytes: number;
|
|
102
111
|
};
|
|
112
|
+
jobProgress?: WebJobProgress;
|
|
103
113
|
}
|
|
104
114
|
type PermissionProfileName = "default" | "read-only" | "trusted-dev";
|
|
105
115
|
type PermissionProfileDecision = "allow" | "ask" | "deny";
|
|
@@ -220,6 +230,7 @@ interface ToolProgressUpdate {
|
|
|
220
230
|
bytes?: number;
|
|
221
231
|
outputBytes?: number;
|
|
222
232
|
nextOffset?: number;
|
|
233
|
+
webContextProgress?: WebJobProgress;
|
|
223
234
|
}
|
|
224
235
|
interface ToolAuthorizationReceipt {
|
|
225
236
|
turnId: string;
|
|
@@ -744,6 +755,8 @@ interface ApiRequestFailureDiagnostics {
|
|
|
744
755
|
interface LlmClientDeps {
|
|
745
756
|
readonly baseURL: string;
|
|
746
757
|
readonly ollamaBaseUrl: string;
|
|
758
|
+
readonly localRuntimeProtocol?: "openai-chat" | "ollama-native";
|
|
759
|
+
readonly localTransportLimits?: ProviderTransportLimits;
|
|
747
760
|
readonly apiKey?: string;
|
|
748
761
|
readonly maxTokens: number;
|
|
749
762
|
getApiRequestTimeoutMs(): number;
|
|
@@ -752,7 +765,6 @@ interface LlmClientDeps {
|
|
|
752
765
|
}
|
|
753
766
|
declare class LlmClient {
|
|
754
767
|
private readonly deps;
|
|
755
|
-
private ollamaMode;
|
|
756
768
|
constructor(deps: LlmClientDeps);
|
|
757
769
|
readonly id = "xeno-llm-client";
|
|
758
770
|
complete(model: string, messages: ApiMessage[], tools: ToolDefinition[], onText?: (text: string) => void, signal?: AbortSignal): Promise<StreamResult>;
|
|
@@ -796,8 +808,6 @@ declare class LlmClient {
|
|
|
796
808
|
callChatCompletionsNonStream(model: string, apiMessages: ApiMessage[], tools: ToolDefinition[], onText?: (text: string) => void, signal?: AbortSignal): Promise<StreamResult>;
|
|
797
809
|
callChatCompletions(model: string, apiMessages: ApiMessage[], tools: ToolDefinition[], onText?: (text: string) => void, signal?: AbortSignal): Promise<StreamResult>;
|
|
798
810
|
callOllama(model: string, apiMessages: ApiMessage[], tools: ToolDefinition[], onText?: (text: string) => void, signal?: AbortSignal): Promise<StreamResult>;
|
|
799
|
-
private callOllamaOpenAI;
|
|
800
|
-
private callOllamaNative;
|
|
801
811
|
}
|
|
802
812
|
type LLMProviderMessage = ApiMessage;
|
|
803
813
|
type LLMCompletionResult = StreamResult;
|
|
@@ -870,6 +880,12 @@ interface LLMProviderCapabilities {
|
|
|
870
880
|
readonly [capability: string]: boolean | undefined;
|
|
871
881
|
}
|
|
872
882
|
interface LLMProvider {
|
|
883
|
+
prepareQuotaRequest?(model: string, messages: LLMProviderMessage[], tools: ToolDefinition[], context?: LLMProviderRequestContext, signal?: AbortSignal): Promise<{
|
|
884
|
+
basis: "provider-enforced";
|
|
885
|
+
inputTokensUpperBound: number;
|
|
886
|
+
outputTokensUpperBound: number;
|
|
887
|
+
execute(onText?: (text: string) => void, signal?: AbortSignal): Promise<LLMCompletionResult>;
|
|
888
|
+
}>;
|
|
873
889
|
readonly id: string;
|
|
874
890
|
readonly model?: string;
|
|
875
891
|
readonly capabilities?: LLMProviderCapabilities;
|
|
@@ -1264,6 +1280,9 @@ interface AgentLoopConfig {
|
|
|
1264
1280
|
apiKey?: string;
|
|
1265
1281
|
baseURL: string;
|
|
1266
1282
|
ollamaBaseURL?: string;
|
|
1283
|
+
localRuntimeUrl?: string;
|
|
1284
|
+
localRuntimeProtocol?: "openai-chat" | "ollama-native";
|
|
1285
|
+
localTransportLimits?: ProviderTransportLimits;
|
|
1267
1286
|
model: string;
|
|
1268
1287
|
fallbackModels?: string[];
|
|
1269
1288
|
effort?: AgentEffortLevel;
|
package/dist/electron/index.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { WebJobProgress } from "@xenosystem/web-context-client/progress";
|
|
1
2
|
interface FileSnapshot {
|
|
2
3
|
path: string;
|
|
3
4
|
exists: boolean;
|
|
@@ -37,6 +38,14 @@ declare class TurnDiffTracker {
|
|
|
37
38
|
private resolvePath;
|
|
38
39
|
private snapshot;
|
|
39
40
|
}
|
|
41
|
+
interface ProviderTransportLimits {
|
|
42
|
+
connectTimeoutMs?: number;
|
|
43
|
+
totalTimeoutMs?: number;
|
|
44
|
+
idleTimeoutMs?: number;
|
|
45
|
+
maxResponseBytes?: number;
|
|
46
|
+
maxHeaderBytes?: number;
|
|
47
|
+
maxEventBytes?: number;
|
|
48
|
+
}
|
|
40
49
|
type TokenEstimator = (text: string, model: string) => number;
|
|
41
50
|
type TokenAccountingSource = "exact" | "provider-reported" | "estimated";
|
|
42
51
|
interface TokenAccountingAdapter {
|
|
@@ -100,6 +109,7 @@ interface WebContextToolResult {
|
|
|
100
109
|
mediaType: string;
|
|
101
110
|
bytes: number;
|
|
102
111
|
};
|
|
112
|
+
jobProgress?: WebJobProgress;
|
|
103
113
|
}
|
|
104
114
|
type PermissionProfileName = "default" | "read-only" | "trusted-dev";
|
|
105
115
|
type PermissionProfileDecision = "allow" | "ask" | "deny";
|
|
@@ -220,6 +230,7 @@ interface ToolProgressUpdate {
|
|
|
220
230
|
bytes?: number;
|
|
221
231
|
outputBytes?: number;
|
|
222
232
|
nextOffset?: number;
|
|
233
|
+
webContextProgress?: WebJobProgress;
|
|
223
234
|
}
|
|
224
235
|
interface ToolAuthorizationReceipt {
|
|
225
236
|
turnId: string;
|
|
@@ -744,6 +755,8 @@ interface ApiRequestFailureDiagnostics {
|
|
|
744
755
|
interface LlmClientDeps {
|
|
745
756
|
readonly baseURL: string;
|
|
746
757
|
readonly ollamaBaseUrl: string;
|
|
758
|
+
readonly localRuntimeProtocol?: "openai-chat" | "ollama-native";
|
|
759
|
+
readonly localTransportLimits?: ProviderTransportLimits;
|
|
747
760
|
readonly apiKey?: string;
|
|
748
761
|
readonly maxTokens: number;
|
|
749
762
|
getApiRequestTimeoutMs(): number;
|
|
@@ -752,7 +765,6 @@ interface LlmClientDeps {
|
|
|
752
765
|
}
|
|
753
766
|
declare class LlmClient {
|
|
754
767
|
private readonly deps;
|
|
755
|
-
private ollamaMode;
|
|
756
768
|
constructor(deps: LlmClientDeps);
|
|
757
769
|
readonly id = "xeno-llm-client";
|
|
758
770
|
complete(model: string, messages: ApiMessage[], tools: ToolDefinition[], onText?: (text: string) => void, signal?: AbortSignal): Promise<StreamResult>;
|
|
@@ -796,8 +808,6 @@ declare class LlmClient {
|
|
|
796
808
|
callChatCompletionsNonStream(model: string, apiMessages: ApiMessage[], tools: ToolDefinition[], onText?: (text: string) => void, signal?: AbortSignal): Promise<StreamResult>;
|
|
797
809
|
callChatCompletions(model: string, apiMessages: ApiMessage[], tools: ToolDefinition[], onText?: (text: string) => void, signal?: AbortSignal): Promise<StreamResult>;
|
|
798
810
|
callOllama(model: string, apiMessages: ApiMessage[], tools: ToolDefinition[], onText?: (text: string) => void, signal?: AbortSignal): Promise<StreamResult>;
|
|
799
|
-
private callOllamaOpenAI;
|
|
800
|
-
private callOllamaNative;
|
|
801
811
|
}
|
|
802
812
|
type LLMProviderMessage = ApiMessage;
|
|
803
813
|
type LLMCompletionResult = StreamResult;
|
|
@@ -870,6 +880,12 @@ interface LLMProviderCapabilities {
|
|
|
870
880
|
readonly [capability: string]: boolean | undefined;
|
|
871
881
|
}
|
|
872
882
|
interface LLMProvider {
|
|
883
|
+
prepareQuotaRequest?(model: string, messages: LLMProviderMessage[], tools: ToolDefinition[], context?: LLMProviderRequestContext, signal?: AbortSignal): Promise<{
|
|
884
|
+
basis: "provider-enforced";
|
|
885
|
+
inputTokensUpperBound: number;
|
|
886
|
+
outputTokensUpperBound: number;
|
|
887
|
+
execute(onText?: (text: string) => void, signal?: AbortSignal): Promise<LLMCompletionResult>;
|
|
888
|
+
}>;
|
|
873
889
|
readonly id: string;
|
|
874
890
|
readonly model?: string;
|
|
875
891
|
readonly capabilities?: LLMProviderCapabilities;
|
|
@@ -1264,6 +1280,9 @@ interface AgentLoopConfig {
|
|
|
1264
1280
|
apiKey?: string;
|
|
1265
1281
|
baseURL: string;
|
|
1266
1282
|
ollamaBaseURL?: string;
|
|
1283
|
+
localRuntimeUrl?: string;
|
|
1284
|
+
localRuntimeProtocol?: "openai-chat" | "ollama-native";
|
|
1285
|
+
localTransportLimits?: ProviderTransportLimits;
|
|
1267
1286
|
model: string;
|
|
1268
1287
|
fallbackModels?: string[];
|
|
1269
1288
|
effort?: AgentEffortLevel;
|