@dexto/core 1.8.3 → 1.8.4
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/agent/DextoAgent.cjs +3 -1
- package/dist/agent/DextoAgent.d.ts +2 -0
- package/dist/agent/DextoAgent.d.ts.map +1 -1
- package/dist/agent/DextoAgent.js +7 -2
- package/dist/events/index.d.ts +3 -0
- package/dist/events/index.d.ts.map +1 -1
- package/dist/index.browser.cjs +6 -0
- package/dist/index.browser.d.ts +2 -0
- package/dist/index.browser.d.ts.map +1 -1
- package/dist/index.browser.js +4 -0
- package/dist/llm/executor/provider-error.cjs +214 -0
- package/dist/llm/executor/provider-error.d.ts +26 -0
- package/dist/llm/executor/provider-error.d.ts.map +1 -0
- package/dist/llm/executor/provider-error.js +190 -0
- package/dist/llm/executor/stream-processor.cjs +34 -5
- package/dist/llm/executor/stream-processor.d.ts +4 -1
- package/dist/llm/executor/stream-processor.d.ts.map +1 -1
- package/dist/llm/executor/stream-processor.js +34 -5
- package/dist/llm/executor/turn-executor.cjs +185 -124
- package/dist/llm/executor/turn-executor.d.ts +5 -5
- package/dist/llm/executor/turn-executor.d.ts.map +1 -1
- package/dist/llm/executor/turn-executor.js +184 -120
- package/dist/session/title-generator.cjs +19 -2
- package/dist/session/title-generator.d.ts +8 -0
- package/dist/session/title-generator.d.ts.map +1 -1
- package/dist/session/title-generator.js +19 -2
- package/dist/systemPrompt/contributors.cjs +10 -1
- package/dist/systemPrompt/contributors.d.ts.map +1 -1
- package/dist/systemPrompt/contributors.js +10 -1
- package/dist/telemetry/browser.cjs +138 -0
- package/dist/telemetry/browser.d.ts +30 -0
- package/dist/telemetry/browser.d.ts.map +1 -0
- package/dist/telemetry/browser.js +115 -0
- package/dist/telemetry/index.cjs +5 -2
- package/dist/telemetry/index.d.ts +1 -0
- package/dist/telemetry/index.d.ts.map +1 -1
- package/dist/telemetry/index.js +3 -1
- package/dist/telemetry/operation-span.cjs +73 -0
- package/dist/telemetry/operation-span.d.ts +13 -0
- package/dist/telemetry/operation-span.d.ts.map +1 -0
- package/dist/telemetry/operation-span.js +50 -0
- package/dist/telemetry/telemetry.cjs +2 -3
- package/dist/telemetry/telemetry.d.ts.map +1 -1
- package/dist/telemetry/telemetry.js +2 -3
- package/dist/telemetry/utils.cjs +11 -12
- package/dist/telemetry/utils.d.ts.map +1 -1
- package/dist/telemetry/utils.js +11 -12
- package/dist/tools/tool-call-metadata.cjs +118 -6
- package/dist/tools/tool-call-metadata.d.ts.map +1 -1
- package/dist/tools/tool-call-metadata.js +118 -6
- package/package.json +2 -2
|
@@ -42,13 +42,12 @@ var import_stream_processor = require("./stream-processor.js");
|
|
|
42
42
|
var import_tool_output_truncator = require("./tool-output-truncator.js");
|
|
43
43
|
var import_provider_options = require("./provider-options.js");
|
|
44
44
|
var import_types = require("../../logger/v2/types.js");
|
|
45
|
-
var
|
|
46
|
-
var
|
|
47
|
-
var import_error_codes = require("../error-codes.js");
|
|
45
|
+
var import_operation_span = require("../../telemetry/operation-span.js");
|
|
46
|
+
var import_provider_error = require("./provider-error.js");
|
|
48
47
|
var import_error_conversion = require("../../utils/error-conversion.js");
|
|
49
48
|
var import_codex_base_url = require("../providers/codex-base-url.js");
|
|
50
49
|
var import_tool_definitions = require("./tool-definitions.js");
|
|
51
|
-
var
|
|
50
|
+
var import_types3 = require("../../approval/types.js");
|
|
52
51
|
const MCP_TOOL_PREFIX = "mcp--";
|
|
53
52
|
const MODEL_REQUEST_MAX_RETRIES = 2;
|
|
54
53
|
const LLMFinishReasonStateSchema = import_zod.z.enum([
|
|
@@ -379,11 +378,19 @@ class TurnExecutor {
|
|
|
379
378
|
this.currentModelStepId = `in-memory-model-step-${stepCount}`;
|
|
380
379
|
modelStepPreparing = true;
|
|
381
380
|
try {
|
|
382
|
-
preparedModelRequest = await
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
381
|
+
preparedModelRequest = await (0, import_operation_span.recordOperationSpan)(
|
|
382
|
+
{
|
|
383
|
+
name: "turn.prepare_model_step",
|
|
384
|
+
componentName: "TurnExecutor",
|
|
385
|
+
attributes: { "turn.step_count": stepCount }
|
|
386
|
+
},
|
|
387
|
+
() => this.prepareNextModelRequest({
|
|
388
|
+
contributorContext,
|
|
389
|
+
supportsTools: turn.supportsTools,
|
|
390
|
+
streaming: options.streaming
|
|
391
|
+
}),
|
|
392
|
+
this.logger
|
|
393
|
+
);
|
|
387
394
|
} catch (error) {
|
|
388
395
|
currentStepScope[Symbol.dispose]();
|
|
389
396
|
currentStepScope = null;
|
|
@@ -409,11 +416,19 @@ class TurnExecutor {
|
|
|
409
416
|
}
|
|
410
417
|
currentStepScope = this.startModelStepScope();
|
|
411
418
|
this.currentModelStepId = `in-memory-model-step-${stepCount}`;
|
|
412
|
-
preparedModelRequest = await
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
419
|
+
preparedModelRequest = await (0, import_operation_span.recordOperationSpan)(
|
|
420
|
+
{
|
|
421
|
+
name: "turn.prepare_model_step",
|
|
422
|
+
componentName: "TurnExecutor",
|
|
423
|
+
attributes: { "turn.step_count": stepCount }
|
|
424
|
+
},
|
|
425
|
+
() => this.prepareNextModelRequest({
|
|
426
|
+
contributorContext,
|
|
427
|
+
supportsTools: turn.supportsTools,
|
|
428
|
+
streaming: options.streaming
|
|
429
|
+
}),
|
|
430
|
+
this.logger
|
|
431
|
+
);
|
|
417
432
|
}
|
|
418
433
|
const modelStepRequest = preparedModelRequest;
|
|
419
434
|
if (currentStepScope === null || modelStepRequest === null) {
|
|
@@ -605,7 +620,13 @@ class TurnExecutor {
|
|
|
605
620
|
this.eventBus.emit("llm:error", {
|
|
606
621
|
error: mappedError,
|
|
607
622
|
context: "TurnExecutor",
|
|
608
|
-
recoverable: false
|
|
623
|
+
recoverable: false,
|
|
624
|
+
details: (0, import_provider_error.extractProviderErrorDetails)({
|
|
625
|
+
error,
|
|
626
|
+
provider: this.llmContext.provider,
|
|
627
|
+
model: this.llmContext.model,
|
|
628
|
+
sessionId: this.sessionId
|
|
629
|
+
})
|
|
609
630
|
});
|
|
610
631
|
await this.contextManager.flush();
|
|
611
632
|
this.eventBus.emit("run:complete", {
|
|
@@ -802,48 +823,159 @@ class TurnExecutor {
|
|
|
802
823
|
await this.injectQueuedMessages(coalesced);
|
|
803
824
|
}
|
|
804
825
|
await this.pruneOldToolOutputs();
|
|
805
|
-
let
|
|
806
|
-
|
|
807
|
-
|
|
826
|
+
let systemPrompt = await (0, import_operation_span.recordOperationSpan)(
|
|
827
|
+
{
|
|
828
|
+
name: "system_prompt.build",
|
|
829
|
+
componentName: "TurnExecutor",
|
|
830
|
+
attributes: {
|
|
831
|
+
"llm.model": this.llmContext.model,
|
|
832
|
+
"llm.provider": this.llmContext.provider
|
|
833
|
+
}
|
|
834
|
+
},
|
|
835
|
+
() => this.contextManager.getSystemPrompt(input.contributorContext),
|
|
836
|
+
this.logger
|
|
808
837
|
);
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
838
|
+
let { preparedHistory, formattedMessages } = await (0, import_operation_span.recordOperationSpan)(
|
|
839
|
+
{
|
|
840
|
+
name: "context.build_messages",
|
|
841
|
+
componentName: "TurnExecutor",
|
|
842
|
+
attributes: {
|
|
843
|
+
"llm.model": this.llmContext.model,
|
|
844
|
+
"llm.provider": this.llmContext.provider
|
|
845
|
+
}
|
|
846
|
+
},
|
|
847
|
+
async () => {
|
|
848
|
+
const preparedHistory2 = (await this.contextManager.prepareHistory()).preparedHistory;
|
|
849
|
+
const formattedMessages2 = await this.contextManager.getFormattedMessages(
|
|
850
|
+
input.contributorContext,
|
|
851
|
+
this.llmContext,
|
|
852
|
+
systemPrompt,
|
|
853
|
+
preparedHistory2
|
|
854
|
+
);
|
|
855
|
+
return { preparedHistory: preparedHistory2, formattedMessages: formattedMessages2 };
|
|
856
|
+
},
|
|
857
|
+
this.logger
|
|
858
|
+
);
|
|
859
|
+
const toolDefinitions = input.supportsTools ? await (0, import_operation_span.recordOperationSpan)(
|
|
860
|
+
{
|
|
861
|
+
name: "tools.list",
|
|
862
|
+
componentName: "TurnExecutor",
|
|
863
|
+
attributes: { "tools.supports": input.supportsTools },
|
|
864
|
+
resultAttributes: (tools) => ({ "tools.count": Object.keys(tools).length })
|
|
865
|
+
},
|
|
866
|
+
async () => this.toolManager.filterToolsForSession(
|
|
867
|
+
await this.toolManager.getAllTools(),
|
|
868
|
+
this.sessionId
|
|
869
|
+
),
|
|
870
|
+
this.logger
|
|
812
871
|
) : {};
|
|
813
|
-
let estimatedInputTokens = await
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
872
|
+
let estimatedInputTokens = await (0, import_operation_span.recordOperationSpan)(
|
|
873
|
+
{
|
|
874
|
+
name: "context.token_estimate",
|
|
875
|
+
componentName: "TurnExecutor",
|
|
876
|
+
attributes: { "tools.count": Object.keys(toolDefinitions).length },
|
|
877
|
+
resultAttributes: (tokens) => ({ "context.estimated_input_tokens": tokens })
|
|
878
|
+
},
|
|
879
|
+
() => this.contextManager.getEstimatedNextInputTokens(
|
|
880
|
+
systemPrompt,
|
|
881
|
+
preparedHistory,
|
|
882
|
+
toolDefinitions
|
|
883
|
+
),
|
|
884
|
+
this.logger
|
|
817
885
|
);
|
|
818
886
|
if (this.shouldCompact(estimatedInputTokens)) {
|
|
819
887
|
this.logger.debug(
|
|
820
888
|
`Pre-check: estimated ${estimatedInputTokens} tokens exceeds threshold, compacting`
|
|
821
889
|
);
|
|
822
|
-
const didCompact = await
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
890
|
+
const didCompact = await (0, import_operation_span.recordOperationSpan)(
|
|
891
|
+
{
|
|
892
|
+
name: "context.compact",
|
|
893
|
+
componentName: "TurnExecutor",
|
|
894
|
+
attributes: { "context.estimated_input_tokens": estimatedInputTokens }
|
|
895
|
+
},
|
|
896
|
+
() => this.compactContext(
|
|
897
|
+
estimatedInputTokens,
|
|
898
|
+
input.contributorContext,
|
|
899
|
+
toolDefinitions
|
|
900
|
+
),
|
|
901
|
+
this.logger
|
|
826
902
|
);
|
|
827
903
|
if (didCompact) {
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
904
|
+
systemPrompt = await (0, import_operation_span.recordOperationSpan)(
|
|
905
|
+
{
|
|
906
|
+
name: "system_prompt.build",
|
|
907
|
+
componentName: "TurnExecutor",
|
|
908
|
+
attributes: {
|
|
909
|
+
"context.after_compaction": true,
|
|
910
|
+
"llm.model": this.llmContext.model,
|
|
911
|
+
"llm.provider": this.llmContext.provider
|
|
912
|
+
}
|
|
913
|
+
},
|
|
914
|
+
() => this.contextManager.getSystemPrompt(input.contributorContext),
|
|
915
|
+
this.logger
|
|
831
916
|
);
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
917
|
+
({ preparedHistory, formattedMessages } = await (0, import_operation_span.recordOperationSpan)(
|
|
918
|
+
{
|
|
919
|
+
name: "context.build_messages",
|
|
920
|
+
componentName: "TurnExecutor",
|
|
921
|
+
attributes: {
|
|
922
|
+
"context.after_compaction": true,
|
|
923
|
+
"llm.model": this.llmContext.model,
|
|
924
|
+
"llm.provider": this.llmContext.provider
|
|
925
|
+
}
|
|
926
|
+
},
|
|
927
|
+
async () => {
|
|
928
|
+
const preparedHistory2 = (await this.contextManager.prepareHistory()).preparedHistory;
|
|
929
|
+
const formattedMessages2 = await this.contextManager.getFormattedMessages(
|
|
930
|
+
input.contributorContext,
|
|
931
|
+
this.llmContext,
|
|
932
|
+
systemPrompt,
|
|
933
|
+
preparedHistory2
|
|
934
|
+
);
|
|
935
|
+
return { preparedHistory: preparedHistory2, formattedMessages: formattedMessages2 };
|
|
936
|
+
},
|
|
937
|
+
this.logger
|
|
938
|
+
));
|
|
939
|
+
estimatedInputTokens = await (0, import_operation_span.recordOperationSpan)(
|
|
940
|
+
{
|
|
941
|
+
name: "context.token_estimate",
|
|
942
|
+
componentName: "TurnExecutor",
|
|
943
|
+
attributes: {
|
|
944
|
+
"context.after_compaction": true,
|
|
945
|
+
"tools.count": Object.keys(toolDefinitions).length
|
|
946
|
+
},
|
|
947
|
+
resultAttributes: (tokens) => ({
|
|
948
|
+
"context.estimated_input_tokens": tokens
|
|
949
|
+
})
|
|
950
|
+
},
|
|
951
|
+
() => this.contextManager.getEstimatedNextInputTokens(
|
|
952
|
+
systemPrompt,
|
|
953
|
+
preparedHistory,
|
|
954
|
+
toolDefinitions
|
|
955
|
+
),
|
|
956
|
+
this.logger
|
|
836
957
|
);
|
|
837
958
|
this.logger.debug(
|
|
838
959
|
`Post-compaction: recomputed estimate is ${estimatedInputTokens} tokens`
|
|
839
960
|
);
|
|
840
961
|
}
|
|
841
962
|
}
|
|
842
|
-
const providerOptions = (0,
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
963
|
+
const providerOptions = await (0, import_operation_span.recordOperationSpan)(
|
|
964
|
+
{
|
|
965
|
+
name: "llm.request_setup",
|
|
966
|
+
componentName: "TurnExecutor",
|
|
967
|
+
attributes: {
|
|
968
|
+
"llm.model": this.llmContext.model,
|
|
969
|
+
"llm.provider": this.llmContext.provider
|
|
970
|
+
}
|
|
971
|
+
},
|
|
972
|
+
() => (0, import_provider_options.buildProviderOptions)({
|
|
973
|
+
provider: this.llmContext.provider,
|
|
974
|
+
model: this.llmContext.model,
|
|
975
|
+
reasoning: this.config.reasoning
|
|
976
|
+
}),
|
|
977
|
+
this.logger
|
|
978
|
+
);
|
|
847
979
|
this.logger.debug("LLM request options", {
|
|
848
980
|
provider: this.llmContext.provider,
|
|
849
981
|
model: this.llmContext.model,
|
|
@@ -860,7 +992,7 @@ class TurnExecutor {
|
|
|
860
992
|
...reasoningBudgetTokens !== void 0 && { reasoningBudgetTokens }
|
|
861
993
|
} : void 0;
|
|
862
994
|
return {
|
|
863
|
-
messages:
|
|
995
|
+
messages: formattedMessages,
|
|
864
996
|
tools: input.supportsTools ? (0, import_tool_definitions.createModelToolDefinitions)(toolDefinitions) : {},
|
|
865
997
|
toolDefinitions,
|
|
866
998
|
estimatedInputTokens,
|
|
@@ -891,7 +1023,8 @@ class TurnExecutor {
|
|
|
891
1023
|
this.stepAbortController.signal,
|
|
892
1024
|
this.getStreamProcessorConfig(request.estimatedInputTokens, request.reasoning),
|
|
893
1025
|
this.logger,
|
|
894
|
-
request.streaming
|
|
1026
|
+
request.streaming,
|
|
1027
|
+
false
|
|
895
1028
|
);
|
|
896
1029
|
return streamProcessor.process(
|
|
897
1030
|
() => (0, import_ai.streamText)({
|
|
@@ -1260,14 +1393,14 @@ class TurnExecutor {
|
|
|
1260
1393
|
};
|
|
1261
1394
|
}
|
|
1262
1395
|
toApprovalDecisionInput(response) {
|
|
1263
|
-
if (response.status ===
|
|
1396
|
+
if (response.status === import_types3.ApprovalStatus.APPROVED) {
|
|
1264
1397
|
return {
|
|
1265
1398
|
approvalId: response.approvalId,
|
|
1266
|
-
status:
|
|
1399
|
+
status: import_types3.ApprovalStatus.APPROVED,
|
|
1267
1400
|
...response.data !== void 0 ? { data: response.data } : {}
|
|
1268
1401
|
};
|
|
1269
1402
|
}
|
|
1270
|
-
const status = response.status ===
|
|
1403
|
+
const status = response.status === import_types3.ApprovalStatus.DENIED ? import_types3.ApprovalStatus.DENIED : import_types3.ApprovalStatus.CANCELLED;
|
|
1271
1404
|
return {
|
|
1272
1405
|
approvalId: response.approvalId,
|
|
1273
1406
|
status,
|
|
@@ -1528,84 +1661,12 @@ class TurnExecutor {
|
|
|
1528
1661
|
* Map provider errors to DextoRuntimeError.
|
|
1529
1662
|
*/
|
|
1530
1663
|
mapProviderError(err) {
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
|
|
1534
|
-
|
|
1535
|
-
|
|
1536
|
-
|
|
1537
|
-
let balance;
|
|
1538
|
-
try {
|
|
1539
|
-
const parsed = JSON.parse(body);
|
|
1540
|
-
const msg = parsed?.error?.message || "";
|
|
1541
|
-
const match = msg.match(/Balance:\s*\$?([\d.]+)/i);
|
|
1542
|
-
if (match) {
|
|
1543
|
-
balance = parseFloat(match[1]);
|
|
1544
|
-
}
|
|
1545
|
-
} catch {
|
|
1546
|
-
}
|
|
1547
|
-
return new import_DextoRuntimeError.DextoRuntimeError(
|
|
1548
|
-
import_error_codes.LLMErrorCode.INSUFFICIENT_CREDITS,
|
|
1549
|
-
import_types3.ErrorScope.LLM,
|
|
1550
|
-
import_types3.ErrorType.PAYMENT_REQUIRED,
|
|
1551
|
-
`Insufficient Dexto credits${balance !== void 0 ? `. Balance: $${balance.toFixed(2)}` : ""}`,
|
|
1552
|
-
{
|
|
1553
|
-
sessionId: this.sessionId,
|
|
1554
|
-
provider: this.llmContext.provider,
|
|
1555
|
-
model: this.llmContext.model,
|
|
1556
|
-
status,
|
|
1557
|
-
balance,
|
|
1558
|
-
body
|
|
1559
|
-
},
|
|
1560
|
-
"Run `dexto billing` to check your balance"
|
|
1561
|
-
);
|
|
1562
|
-
}
|
|
1563
|
-
if (status === 429) {
|
|
1564
|
-
return new import_DextoRuntimeError.DextoRuntimeError(
|
|
1565
|
-
import_error_codes.LLMErrorCode.RATE_LIMIT_EXCEEDED,
|
|
1566
|
-
import_types3.ErrorScope.LLM,
|
|
1567
|
-
import_types3.ErrorType.RATE_LIMIT,
|
|
1568
|
-
`Rate limit exceeded${body ? ` - ${body}` : ""}`,
|
|
1569
|
-
{
|
|
1570
|
-
sessionId: this.sessionId,
|
|
1571
|
-
provider: this.llmContext.provider,
|
|
1572
|
-
model: this.llmContext.model,
|
|
1573
|
-
status,
|
|
1574
|
-
retryAfter,
|
|
1575
|
-
body
|
|
1576
|
-
}
|
|
1577
|
-
);
|
|
1578
|
-
}
|
|
1579
|
-
if (status === 408) {
|
|
1580
|
-
return new import_DextoRuntimeError.DextoRuntimeError(
|
|
1581
|
-
import_error_codes.LLMErrorCode.GENERATION_FAILED,
|
|
1582
|
-
import_types3.ErrorScope.LLM,
|
|
1583
|
-
import_types3.ErrorType.TIMEOUT,
|
|
1584
|
-
`Provider timed out${body ? ` - ${body}` : ""}`,
|
|
1585
|
-
{
|
|
1586
|
-
sessionId: this.sessionId,
|
|
1587
|
-
provider: this.llmContext.provider,
|
|
1588
|
-
model: this.llmContext.model,
|
|
1589
|
-
status,
|
|
1590
|
-
body
|
|
1591
|
-
}
|
|
1592
|
-
);
|
|
1593
|
-
}
|
|
1594
|
-
return new import_DextoRuntimeError.DextoRuntimeError(
|
|
1595
|
-
import_error_codes.LLMErrorCode.GENERATION_FAILED,
|
|
1596
|
-
import_types3.ErrorScope.LLM,
|
|
1597
|
-
import_types3.ErrorType.THIRD_PARTY,
|
|
1598
|
-
`Provider error ${status}${body ? ` - ${body}` : ""}`,
|
|
1599
|
-
{
|
|
1600
|
-
sessionId: this.sessionId,
|
|
1601
|
-
provider: this.llmContext.provider,
|
|
1602
|
-
model: this.llmContext.model,
|
|
1603
|
-
status,
|
|
1604
|
-
body
|
|
1605
|
-
}
|
|
1606
|
-
);
|
|
1607
|
-
}
|
|
1608
|
-
return (0, import_error_conversion.toError)(err, this.logger);
|
|
1664
|
+
return (0, import_provider_error.mapProviderError)({
|
|
1665
|
+
error: err,
|
|
1666
|
+
provider: this.llmContext.provider,
|
|
1667
|
+
model: this.llmContext.model,
|
|
1668
|
+
sessionId: this.sessionId
|
|
1669
|
+
});
|
|
1609
1670
|
}
|
|
1610
1671
|
}
|
|
1611
1672
|
// Annotate the CommonJS export names for ESM import in node:
|
|
@@ -21,8 +21,8 @@ export declare const ModelStepResultStateSchema: z.ZodObject<{
|
|
|
21
21
|
unknown: "unknown";
|
|
22
22
|
length: "length";
|
|
23
23
|
cancelled: "cancelled";
|
|
24
|
-
other: "other";
|
|
25
24
|
stop: "stop";
|
|
25
|
+
other: "other";
|
|
26
26
|
"content-filter": "content-filter";
|
|
27
27
|
"tool-calls": "tool-calls";
|
|
28
28
|
"max-steps": "max-steps";
|
|
@@ -74,8 +74,8 @@ export declare const TurnDriverStateSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
74
74
|
unknown: "unknown";
|
|
75
75
|
length: "length";
|
|
76
76
|
cancelled: "cancelled";
|
|
77
|
-
other: "other";
|
|
78
77
|
stop: "stop";
|
|
78
|
+
other: "other";
|
|
79
79
|
"content-filter": "content-filter";
|
|
80
80
|
"tool-calls": "tool-calls";
|
|
81
81
|
"max-steps": "max-steps";
|
|
@@ -118,8 +118,8 @@ export declare const TurnDriverStateSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
118
118
|
unknown: "unknown";
|
|
119
119
|
length: "length";
|
|
120
120
|
cancelled: "cancelled";
|
|
121
|
-
other: "other";
|
|
122
121
|
stop: "stop";
|
|
122
|
+
other: "other";
|
|
123
123
|
"content-filter": "content-filter";
|
|
124
124
|
"tool-calls": "tool-calls";
|
|
125
125
|
"max-steps": "max-steps";
|
|
@@ -137,8 +137,8 @@ export declare const TurnDriverStateSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
137
137
|
unknown: "unknown";
|
|
138
138
|
length: "length";
|
|
139
139
|
cancelled: "cancelled";
|
|
140
|
-
other: "other";
|
|
141
140
|
stop: "stop";
|
|
141
|
+
other: "other";
|
|
142
142
|
"content-filter": "content-filter";
|
|
143
143
|
"tool-calls": "tool-calls";
|
|
144
144
|
"max-steps": "max-steps";
|
|
@@ -191,8 +191,8 @@ export declare const TurnDriverStateSchema: z.ZodDiscriminatedUnion<[z.ZodObject
|
|
|
191
191
|
unknown: "unknown";
|
|
192
192
|
length: "length";
|
|
193
193
|
cancelled: "cancelled";
|
|
194
|
-
other: "other";
|
|
195
194
|
stop: "stop";
|
|
195
|
+
other: "other";
|
|
196
196
|
"content-filter": "content-filter";
|
|
197
197
|
"tool-calls": "tool-calls";
|
|
198
198
|
"max-steps": "max-steps";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"turn-executor.d.ts","sourceRoot":"","sources":["../../../src/llm/executor/turn-executor.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,aAAa,EAMb,KAAK,YAAY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