@xenosystem/agent-sdk 0.10.16 → 0.10.18
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 +1 -1
- package/dist/automation/index.d.cts +11 -1
- package/dist/automation/index.d.ts +11 -1
- package/dist/automation/index.js +1 -1
- package/dist/control-plane/index.cjs +1 -1
- package/dist/control-plane/index.js +1 -1
- package/dist/electron/index.cjs +174 -174
- package/dist/electron/index.d.cts +32 -3
- package/dist/electron/index.d.ts +32 -3
- package/dist/electron/index.js +174 -174
- package/dist/electron/metafile-cjs.json +1 -1
- package/dist/electron/metafile-esm.json +1 -1
- package/dist/governance/index.d.cts +10 -1
- package/dist/governance/index.d.ts +10 -1
- 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 +350 -350
- package/dist/index.d.cts +87 -5
- package/dist/index.d.ts +87 -5
- package/dist/index.js +356 -356
- package/dist/mcp/index.d.cts +11 -1
- package/dist/mcp/index.d.ts +11 -1
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/providers/index.d.cts +1 -0
- package/dist/providers/index.d.ts +1 -0
- package/dist/session/index.cjs +16 -16
- package/dist/session/index.d.cts +10 -1
- package/dist/session/index.d.ts +10 -1
- package/dist/session/index.js +14 -14
- package/dist/session/metafile-cjs.json +1 -1
- package/dist/session/metafile-esm.json +1 -1
- package/dist/skills/index.d.cts +11 -1
- package/dist/skills/index.d.ts +11 -1
- package/dist/ui/index.cjs +3 -3
- package/dist/ui/index.d.cts +10 -1
- package/dist/ui/index.d.ts +10 -1
- package/dist/ui/index.js +3 -3
- package/dist/ui/metafile-cjs.json +1 -1
- package/dist/ui/metafile-esm.json +1 -1
- package/dist/utils/index.d.cts +10 -1
- package/dist/utils/index.d.ts +10 -1
- package/package.json +1 -1
|
@@ -176,7 +176,16 @@ interface ResourceContentBlock {
|
|
|
176
176
|
}
|
|
177
177
|
type ToolAssistantContentBlock = TextBlock | ImageUrlBlock | ResourceContentBlock;
|
|
178
178
|
type ToolResultContent = string | ToolAssistantContentBlock[];
|
|
179
|
-
|
|
179
|
+
declare const TOOL_OPERATION_TERMINAL_STATES: readonly [
|
|
180
|
+
"completed",
|
|
181
|
+
"failed",
|
|
182
|
+
"timed_out",
|
|
183
|
+
"cancelled",
|
|
184
|
+
"outcome_unknown",
|
|
185
|
+
"orphaned"
|
|
186
|
+
];
|
|
187
|
+
type ToolOperationTerminalState = (typeof TOOL_OPERATION_TERMINAL_STATES)[number];
|
|
188
|
+
type ToolOperationState = "registered" | "starting" | "running_foreground" | "running_background" | "waiting_for_input" | "stalled" | "verifying" | ToolOperationTerminalState;
|
|
180
189
|
type ToolCompletionPolicy = "await" | "observe" | "detach";
|
|
181
190
|
interface ExpectedOutputContract {
|
|
182
191
|
path: string;
|
|
@@ -282,6 +291,7 @@ interface ToolPolicyProjection {
|
|
|
282
291
|
interface RegisteredTool {
|
|
283
292
|
definition: ToolDefinition;
|
|
284
293
|
execute: ToolExecutor;
|
|
294
|
+
readOnly?: boolean;
|
|
285
295
|
projectPolicyInput?: (input: Record<string, unknown>) => ToolPolicyProjection | {
|
|
286
296
|
error: ToolResult;
|
|
287
297
|
};
|
|
@@ -754,6 +764,7 @@ interface StreamResult {
|
|
|
754
764
|
inputTokens: number;
|
|
755
765
|
outputTokens: number;
|
|
756
766
|
usageReported: boolean;
|
|
767
|
+
incompleteToolCallIds?: string[];
|
|
757
768
|
}
|
|
758
769
|
interface ApiRequestFailureDiagnostics {
|
|
759
770
|
model: string;
|
|
@@ -785,6 +796,16 @@ interface LlmClientDeps {
|
|
|
785
796
|
} | null>;
|
|
786
797
|
readonly maxTokens: number;
|
|
787
798
|
getApiRequestTimeoutMs(): number;
|
|
799
|
+
getStreamDeadlines?(): {
|
|
800
|
+
firstResponseMs?: number;
|
|
801
|
+
idleMs?: number;
|
|
802
|
+
};
|
|
803
|
+
getNonStreamingMemoryMs?(): number | undefined;
|
|
804
|
+
reportTransportEvent?(event: {
|
|
805
|
+
type: "provider.warning";
|
|
806
|
+
code: string;
|
|
807
|
+
message: string;
|
|
808
|
+
}): void;
|
|
788
809
|
buildRuntimeSystemPrompt(): string;
|
|
789
810
|
reportFailure(diagnostics: ApiRequestFailureDiagnostics): Promise<void>;
|
|
790
811
|
}
|
|
@@ -831,8 +852,11 @@ declare class LlmClient {
|
|
|
831
852
|
private static stripHtml;
|
|
832
853
|
private static summarizeErrorBody;
|
|
833
854
|
private authorizationHeaders;
|
|
834
|
-
private
|
|
855
|
+
private createRequestDeadline;
|
|
856
|
+
private streamingMemoryKey;
|
|
857
|
+
private static normalizeRequestError;
|
|
835
858
|
callChatCompletionsNonStream(model: string, apiMessages: ApiMessage[], tools: ToolDefinition[], onText?: (text: string) => void, signal?: AbortSignal, maxOutputTokens?: number): Promise<StreamResult>;
|
|
859
|
+
private throwForErrorResponse;
|
|
836
860
|
callChatCompletions(model: string, apiMessages: ApiMessage[], tools: ToolDefinition[], onText?: (text: string) => void, signal?: AbortSignal, maxOutputTokens?: number): Promise<StreamResult>;
|
|
837
861
|
callOllama(model: string, apiMessages: ApiMessage[], tools: ToolDefinition[], onText?: (text: string) => void, signal?: AbortSignal): Promise<StreamResult>;
|
|
838
862
|
}
|
|
@@ -922,7 +946,7 @@ interface LLMProvider {
|
|
|
922
946
|
}
|
|
923
947
|
type QueryState = "idle" | "preparing" | "building_context" | "requesting_model" | "retrying" | "executing_tools" | "waiting_for_tool" | "evaluating_completion" | "finalizing" | "suspended" | "completed" | "failed" | "interrupted";
|
|
924
948
|
type QueryWatchdogReason = "idle" | "lease" | "hard";
|
|
925
|
-
type ToolOperationRuntimeEventType = "tool.operation.started" | "tool.operation.progress" | "tool.operation.promotion_requested" | "tool.operation.promoted" | "tool.operation.stalled" | "tool.operation.verifying" | "tool.operation.completed" | "tool.operation.failed" | "tool.operation.timed_out" | "tool.operation.cancelled";
|
|
949
|
+
type ToolOperationRuntimeEventType = "tool.operation.started" | "tool.operation.progress" | "tool.operation.promotion_requested" | "tool.operation.promoted" | "tool.operation.stalled" | "tool.operation.verifying" | "tool.operation.completed" | "tool.operation.failed" | "tool.operation.timed_out" | "tool.operation.cancelled" | "tool.operation.outcome_unknown";
|
|
926
950
|
type XenoRuntimeEventType = "thread.started" | "turn.started" | "turn.completed" | "turn.failed" | "turn.interrupted" | "query.state" | "query.watchdog" | "provider.event" | "model.text.delta" | "context.pressure" | "context.injected" | "context.history.compacted" | "tool.started" | "tool.permission" | "tool.completed" | "tool.history.repaired" | "tool.failure_guard.tripped" | ToolOperationRuntimeEventType | "turn.suspended" | "turn.continuation_enqueued" | "turn.continuation_resumed" | "turn.continuation_exhausted" | "diff.completed";
|
|
927
951
|
interface XenoRuntimeEventBase {
|
|
928
952
|
id: string;
|
|
@@ -1441,6 +1465,10 @@ interface AgentLoopConfig {
|
|
|
1441
1465
|
maxCompletionGuardReminders?: number;
|
|
1442
1466
|
progressGuardEveryIterations?: number;
|
|
1443
1467
|
apiRequestTimeoutMs?: number;
|
|
1468
|
+
apiFirstResponseTimeoutMs?: number;
|
|
1469
|
+
apiStreamIdleTimeoutMs?: number;
|
|
1470
|
+
streamAgentResponses?: boolean;
|
|
1471
|
+
apiNonStreamingMemoryMs?: number;
|
|
1444
1472
|
queryIdleTimeoutMs?: number;
|
|
1445
1473
|
queryLeaseTimeoutMs?: number;
|
|
1446
1474
|
queryHardTimeoutMs?: number;
|
|
@@ -1564,6 +1592,7 @@ declare class AgentLoop {
|
|
|
1564
1592
|
};
|
|
1565
1593
|
createSoftBudgetCloudProvider(): LLMProvider;
|
|
1566
1594
|
private callCloudWithOutputCap;
|
|
1595
|
+
private requestStreams;
|
|
1567
1596
|
configureModelExecution(options: {
|
|
1568
1597
|
provider?: LLMProvider;
|
|
1569
1598
|
modelWorkAccounting?: ModelWorkAccounting;
|
package/dist/electron/index.d.ts
CHANGED
|
@@ -176,7 +176,16 @@ interface ResourceContentBlock {
|
|
|
176
176
|
}
|
|
177
177
|
type ToolAssistantContentBlock = TextBlock | ImageUrlBlock | ResourceContentBlock;
|
|
178
178
|
type ToolResultContent = string | ToolAssistantContentBlock[];
|
|
179
|
-
|
|
179
|
+
declare const TOOL_OPERATION_TERMINAL_STATES: readonly [
|
|
180
|
+
"completed",
|
|
181
|
+
"failed",
|
|
182
|
+
"timed_out",
|
|
183
|
+
"cancelled",
|
|
184
|
+
"outcome_unknown",
|
|
185
|
+
"orphaned"
|
|
186
|
+
];
|
|
187
|
+
type ToolOperationTerminalState = (typeof TOOL_OPERATION_TERMINAL_STATES)[number];
|
|
188
|
+
type ToolOperationState = "registered" | "starting" | "running_foreground" | "running_background" | "waiting_for_input" | "stalled" | "verifying" | ToolOperationTerminalState;
|
|
180
189
|
type ToolCompletionPolicy = "await" | "observe" | "detach";
|
|
181
190
|
interface ExpectedOutputContract {
|
|
182
191
|
path: string;
|
|
@@ -282,6 +291,7 @@ interface ToolPolicyProjection {
|
|
|
282
291
|
interface RegisteredTool {
|
|
283
292
|
definition: ToolDefinition;
|
|
284
293
|
execute: ToolExecutor;
|
|
294
|
+
readOnly?: boolean;
|
|
285
295
|
projectPolicyInput?: (input: Record<string, unknown>) => ToolPolicyProjection | {
|
|
286
296
|
error: ToolResult;
|
|
287
297
|
};
|
|
@@ -754,6 +764,7 @@ interface StreamResult {
|
|
|
754
764
|
inputTokens: number;
|
|
755
765
|
outputTokens: number;
|
|
756
766
|
usageReported: boolean;
|
|
767
|
+
incompleteToolCallIds?: string[];
|
|
757
768
|
}
|
|
758
769
|
interface ApiRequestFailureDiagnostics {
|
|
759
770
|
model: string;
|
|
@@ -785,6 +796,16 @@ interface LlmClientDeps {
|
|
|
785
796
|
} | null>;
|
|
786
797
|
readonly maxTokens: number;
|
|
787
798
|
getApiRequestTimeoutMs(): number;
|
|
799
|
+
getStreamDeadlines?(): {
|
|
800
|
+
firstResponseMs?: number;
|
|
801
|
+
idleMs?: number;
|
|
802
|
+
};
|
|
803
|
+
getNonStreamingMemoryMs?(): number | undefined;
|
|
804
|
+
reportTransportEvent?(event: {
|
|
805
|
+
type: "provider.warning";
|
|
806
|
+
code: string;
|
|
807
|
+
message: string;
|
|
808
|
+
}): void;
|
|
788
809
|
buildRuntimeSystemPrompt(): string;
|
|
789
810
|
reportFailure(diagnostics: ApiRequestFailureDiagnostics): Promise<void>;
|
|
790
811
|
}
|
|
@@ -831,8 +852,11 @@ declare class LlmClient {
|
|
|
831
852
|
private static stripHtml;
|
|
832
853
|
private static summarizeErrorBody;
|
|
833
854
|
private authorizationHeaders;
|
|
834
|
-
private
|
|
855
|
+
private createRequestDeadline;
|
|
856
|
+
private streamingMemoryKey;
|
|
857
|
+
private static normalizeRequestError;
|
|
835
858
|
callChatCompletionsNonStream(model: string, apiMessages: ApiMessage[], tools: ToolDefinition[], onText?: (text: string) => void, signal?: AbortSignal, maxOutputTokens?: number): Promise<StreamResult>;
|
|
859
|
+
private throwForErrorResponse;
|
|
836
860
|
callChatCompletions(model: string, apiMessages: ApiMessage[], tools: ToolDefinition[], onText?: (text: string) => void, signal?: AbortSignal, maxOutputTokens?: number): Promise<StreamResult>;
|
|
837
861
|
callOllama(model: string, apiMessages: ApiMessage[], tools: ToolDefinition[], onText?: (text: string) => void, signal?: AbortSignal): Promise<StreamResult>;
|
|
838
862
|
}
|
|
@@ -922,7 +946,7 @@ interface LLMProvider {
|
|
|
922
946
|
}
|
|
923
947
|
type QueryState = "idle" | "preparing" | "building_context" | "requesting_model" | "retrying" | "executing_tools" | "waiting_for_tool" | "evaluating_completion" | "finalizing" | "suspended" | "completed" | "failed" | "interrupted";
|
|
924
948
|
type QueryWatchdogReason = "idle" | "lease" | "hard";
|
|
925
|
-
type ToolOperationRuntimeEventType = "tool.operation.started" | "tool.operation.progress" | "tool.operation.promotion_requested" | "tool.operation.promoted" | "tool.operation.stalled" | "tool.operation.verifying" | "tool.operation.completed" | "tool.operation.failed" | "tool.operation.timed_out" | "tool.operation.cancelled";
|
|
949
|
+
type ToolOperationRuntimeEventType = "tool.operation.started" | "tool.operation.progress" | "tool.operation.promotion_requested" | "tool.operation.promoted" | "tool.operation.stalled" | "tool.operation.verifying" | "tool.operation.completed" | "tool.operation.failed" | "tool.operation.timed_out" | "tool.operation.cancelled" | "tool.operation.outcome_unknown";
|
|
926
950
|
type XenoRuntimeEventType = "thread.started" | "turn.started" | "turn.completed" | "turn.failed" | "turn.interrupted" | "query.state" | "query.watchdog" | "provider.event" | "model.text.delta" | "context.pressure" | "context.injected" | "context.history.compacted" | "tool.started" | "tool.permission" | "tool.completed" | "tool.history.repaired" | "tool.failure_guard.tripped" | ToolOperationRuntimeEventType | "turn.suspended" | "turn.continuation_enqueued" | "turn.continuation_resumed" | "turn.continuation_exhausted" | "diff.completed";
|
|
927
951
|
interface XenoRuntimeEventBase {
|
|
928
952
|
id: string;
|
|
@@ -1441,6 +1465,10 @@ interface AgentLoopConfig {
|
|
|
1441
1465
|
maxCompletionGuardReminders?: number;
|
|
1442
1466
|
progressGuardEveryIterations?: number;
|
|
1443
1467
|
apiRequestTimeoutMs?: number;
|
|
1468
|
+
apiFirstResponseTimeoutMs?: number;
|
|
1469
|
+
apiStreamIdleTimeoutMs?: number;
|
|
1470
|
+
streamAgentResponses?: boolean;
|
|
1471
|
+
apiNonStreamingMemoryMs?: number;
|
|
1444
1472
|
queryIdleTimeoutMs?: number;
|
|
1445
1473
|
queryLeaseTimeoutMs?: number;
|
|
1446
1474
|
queryHardTimeoutMs?: number;
|
|
@@ -1564,6 +1592,7 @@ declare class AgentLoop {
|
|
|
1564
1592
|
};
|
|
1565
1593
|
createSoftBudgetCloudProvider(): LLMProvider;
|
|
1566
1594
|
private callCloudWithOutputCap;
|
|
1595
|
+
private requestStreams;
|
|
1567
1596
|
configureModelExecution(options: {
|
|
1568
1597
|
provider?: LLMProvider;
|
|
1569
1598
|
modelWorkAccounting?: ModelWorkAccounting;
|