@xenosystem/agent-sdk 0.9.9 → 0.9.10
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/artifacts/metafile-cjs.json +1 -1
- package/dist/artifacts/metafile-esm.json +1 -1
- package/dist/control-plane/index.cjs +1 -1
- package/dist/control-plane/index.js +1 -1
- package/dist/control-plane/metafile-cjs.json +1 -1
- package/dist/control-plane/metafile-esm.json +1 -1
- package/dist/electron/index.cjs +94 -92
- package/dist/electron/index.d.cts +33 -1
- package/dist/electron/index.d.ts +33 -1
- package/dist/electron/index.js +101 -99
- package/dist/electron/metafile-cjs.json +1 -1
- package/dist/electron/metafile-esm.json +1 -1
- package/dist/index.cjs +195 -193
- package/dist/index.d.cts +34 -2
- package/dist/index.d.ts +34 -2
- package/dist/index.js +195 -193
- package/dist/metafile-cjs.json +1 -1
- package/dist/metafile-esm.json +1 -1
- package/dist/recipes/metafile-cjs.json +1 -1
- package/dist/recipes/metafile-esm.json +1 -1
- package/dist/research/metafile-cjs.json +1 -1
- package/dist/research/metafile-esm.json +1 -1
- package/dist/session/index.cjs +1 -1
- package/dist/session/index.js +1 -1
- package/dist/session/metafile-cjs.json +1 -1
- package/dist/session/metafile-esm.json +1 -1
- package/package.json +22 -22
|
@@ -834,7 +834,7 @@ interface LLMProvider {
|
|
|
834
834
|
type QueryState = "idle" | "preparing" | "building_context" | "requesting_model" | "retrying" | "executing_tools" | "waiting_for_tool" | "evaluating_completion" | "finalizing" | "suspended" | "completed" | "failed" | "interrupted";
|
|
835
835
|
type QueryWatchdogReason = "idle" | "lease" | "hard";
|
|
836
836
|
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";
|
|
837
|
-
type XenoRuntimeEventType = "thread.started" | "turn.started" | "turn.completed" | "turn.failed" | "turn.interrupted" | "query.state" | "query.watchdog" | "provider.event" | "model.text.delta" | "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";
|
|
837
|
+
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" | "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";
|
|
838
838
|
interface XenoRuntimeEventBase {
|
|
839
839
|
id: string;
|
|
840
840
|
sequence: number;
|
|
@@ -853,6 +853,8 @@ type XenoRuntimeEvent = (XenoRuntimeEventBase & {
|
|
|
853
853
|
model: string;
|
|
854
854
|
effort?: string;
|
|
855
855
|
promptPreview: string;
|
|
856
|
+
contextBudgetTokens?: number;
|
|
857
|
+
contextBudgetSource?: "config" | "provider" | "fallback";
|
|
856
858
|
}) | (XenoRuntimeEventBase & {
|
|
857
859
|
type: "turn.completed";
|
|
858
860
|
outputPreview: string;
|
|
@@ -861,6 +863,22 @@ type XenoRuntimeEvent = (XenoRuntimeEventBase & {
|
|
|
861
863
|
output: number;
|
|
862
864
|
total: number;
|
|
863
865
|
};
|
|
866
|
+
contextTokens?: number;
|
|
867
|
+
}) | (XenoRuntimeEventBase & {
|
|
868
|
+
type: "context.pressure";
|
|
869
|
+
turnId: string;
|
|
870
|
+
iteration: number;
|
|
871
|
+
contextTokens: number;
|
|
872
|
+
budgetTokens: number;
|
|
873
|
+
budgetSource: "config" | "provider" | "fallback";
|
|
874
|
+
}) | (XenoRuntimeEventBase & {
|
|
875
|
+
type: "context.injected";
|
|
876
|
+
messageId: string;
|
|
877
|
+
sourceNodeId?: string;
|
|
878
|
+
label?: string;
|
|
879
|
+
deferred: boolean;
|
|
880
|
+
turnId?: string;
|
|
881
|
+
iteration?: number;
|
|
864
882
|
}) | (XenoRuntimeEventBase & {
|
|
865
883
|
type: "turn.failed" | "turn.interrupted";
|
|
866
884
|
error: string;
|
|
@@ -1264,6 +1282,8 @@ declare class AgentLoop {
|
|
|
1264
1282
|
private _messages;
|
|
1265
1283
|
private totalInputTokens;
|
|
1266
1284
|
private totalOutputTokens;
|
|
1285
|
+
private lastRequestInputTokens;
|
|
1286
|
+
private pendingContextInjections;
|
|
1267
1287
|
private lastCheckpointMessageCount;
|
|
1268
1288
|
private ollamaBaseUrl;
|
|
1269
1289
|
private activeAbortController;
|
|
@@ -1360,9 +1380,21 @@ declare class AgentLoop {
|
|
|
1360
1380
|
private summarizeBackgroundTaskSnapshot;
|
|
1361
1381
|
private maybeDrainBackgroundTasksAtIterationBudget;
|
|
1362
1382
|
private getApiRequestTimeoutMs;
|
|
1383
|
+
private resolveContextBudget;
|
|
1363
1384
|
private getModelContextLimit;
|
|
1364
1385
|
private createApiRequestSignal;
|
|
1365
1386
|
private buildRuntimeSystemPrompt;
|
|
1387
|
+
private unresolvedToolUseIds;
|
|
1388
|
+
injectContext(input: {
|
|
1389
|
+
content: string;
|
|
1390
|
+
sourceNodeId?: string;
|
|
1391
|
+
label?: string;
|
|
1392
|
+
}): Promise<{
|
|
1393
|
+
status: "injected" | "deferred";
|
|
1394
|
+
pendingCount: number;
|
|
1395
|
+
}>;
|
|
1396
|
+
get pendingContextInjectionCount(): number;
|
|
1397
|
+
private flushContextInjections;
|
|
1366
1398
|
get messages(): Message[];
|
|
1367
1399
|
set messages(value: Message[]);
|
|
1368
1400
|
private shouldAutoCheckpoint;
|
package/dist/electron/index.d.ts
CHANGED
|
@@ -834,7 +834,7 @@ interface LLMProvider {
|
|
|
834
834
|
type QueryState = "idle" | "preparing" | "building_context" | "requesting_model" | "retrying" | "executing_tools" | "waiting_for_tool" | "evaluating_completion" | "finalizing" | "suspended" | "completed" | "failed" | "interrupted";
|
|
835
835
|
type QueryWatchdogReason = "idle" | "lease" | "hard";
|
|
836
836
|
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";
|
|
837
|
-
type XenoRuntimeEventType = "thread.started" | "turn.started" | "turn.completed" | "turn.failed" | "turn.interrupted" | "query.state" | "query.watchdog" | "provider.event" | "model.text.delta" | "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";
|
|
837
|
+
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" | "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";
|
|
838
838
|
interface XenoRuntimeEventBase {
|
|
839
839
|
id: string;
|
|
840
840
|
sequence: number;
|
|
@@ -853,6 +853,8 @@ type XenoRuntimeEvent = (XenoRuntimeEventBase & {
|
|
|
853
853
|
model: string;
|
|
854
854
|
effort?: string;
|
|
855
855
|
promptPreview: string;
|
|
856
|
+
contextBudgetTokens?: number;
|
|
857
|
+
contextBudgetSource?: "config" | "provider" | "fallback";
|
|
856
858
|
}) | (XenoRuntimeEventBase & {
|
|
857
859
|
type: "turn.completed";
|
|
858
860
|
outputPreview: string;
|
|
@@ -861,6 +863,22 @@ type XenoRuntimeEvent = (XenoRuntimeEventBase & {
|
|
|
861
863
|
output: number;
|
|
862
864
|
total: number;
|
|
863
865
|
};
|
|
866
|
+
contextTokens?: number;
|
|
867
|
+
}) | (XenoRuntimeEventBase & {
|
|
868
|
+
type: "context.pressure";
|
|
869
|
+
turnId: string;
|
|
870
|
+
iteration: number;
|
|
871
|
+
contextTokens: number;
|
|
872
|
+
budgetTokens: number;
|
|
873
|
+
budgetSource: "config" | "provider" | "fallback";
|
|
874
|
+
}) | (XenoRuntimeEventBase & {
|
|
875
|
+
type: "context.injected";
|
|
876
|
+
messageId: string;
|
|
877
|
+
sourceNodeId?: string;
|
|
878
|
+
label?: string;
|
|
879
|
+
deferred: boolean;
|
|
880
|
+
turnId?: string;
|
|
881
|
+
iteration?: number;
|
|
864
882
|
}) | (XenoRuntimeEventBase & {
|
|
865
883
|
type: "turn.failed" | "turn.interrupted";
|
|
866
884
|
error: string;
|
|
@@ -1264,6 +1282,8 @@ declare class AgentLoop {
|
|
|
1264
1282
|
private _messages;
|
|
1265
1283
|
private totalInputTokens;
|
|
1266
1284
|
private totalOutputTokens;
|
|
1285
|
+
private lastRequestInputTokens;
|
|
1286
|
+
private pendingContextInjections;
|
|
1267
1287
|
private lastCheckpointMessageCount;
|
|
1268
1288
|
private ollamaBaseUrl;
|
|
1269
1289
|
private activeAbortController;
|
|
@@ -1360,9 +1380,21 @@ declare class AgentLoop {
|
|
|
1360
1380
|
private summarizeBackgroundTaskSnapshot;
|
|
1361
1381
|
private maybeDrainBackgroundTasksAtIterationBudget;
|
|
1362
1382
|
private getApiRequestTimeoutMs;
|
|
1383
|
+
private resolveContextBudget;
|
|
1363
1384
|
private getModelContextLimit;
|
|
1364
1385
|
private createApiRequestSignal;
|
|
1365
1386
|
private buildRuntimeSystemPrompt;
|
|
1387
|
+
private unresolvedToolUseIds;
|
|
1388
|
+
injectContext(input: {
|
|
1389
|
+
content: string;
|
|
1390
|
+
sourceNodeId?: string;
|
|
1391
|
+
label?: string;
|
|
1392
|
+
}): Promise<{
|
|
1393
|
+
status: "injected" | "deferred";
|
|
1394
|
+
pendingCount: number;
|
|
1395
|
+
}>;
|
|
1396
|
+
get pendingContextInjectionCount(): number;
|
|
1397
|
+
private flushContextInjections;
|
|
1366
1398
|
get messages(): Message[];
|
|
1367
1399
|
set messages(value: Message[]);
|
|
1368
1400
|
private shouldAutoCheckpoint;
|