@dexto/core 1.12.1 → 1.13.0
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.d.ts +2 -5
- package/dist/agent/DextoAgent.d.ts.map +1 -1
- package/dist/approval/index.cjs +4 -2
- package/dist/approval/index.d.ts +1 -1
- package/dist/approval/index.d.ts.map +1 -1
- package/dist/approval/index.js +3 -2
- package/dist/approval/manager.cjs +23 -4
- package/dist/approval/manager.d.ts +3 -2
- package/dist/approval/manager.d.ts.map +1 -1
- package/dist/approval/manager.js +21 -3
- package/dist/approval/schemas.cjs +5 -0
- package/dist/approval/schemas.d.ts +8 -0
- package/dist/approval/schemas.d.ts.map +1 -1
- package/dist/approval/schemas.js +5 -0
- package/dist/approval/types.d.ts +2 -2
- package/dist/approval/types.d.ts.map +1 -1
- package/dist/events/index.d.ts +2 -0
- package/dist/events/index.d.ts.map +1 -1
- package/dist/llm/executor/turn-executor.cjs +13 -20
- package/dist/llm/executor/turn-executor.d.ts +0 -1
- package/dist/llm/executor/turn-executor.d.ts.map +1 -1
- package/dist/llm/executor/turn-executor.js +13 -20
- package/dist/mcp/errors.cjs +9 -0
- package/dist/mcp/errors.d.ts +4 -0
- package/dist/mcp/errors.d.ts.map +1 -1
- package/dist/mcp/errors.js +9 -0
- package/dist/mcp/manager.cjs +79 -3
- package/dist/mcp/manager.d.ts +14 -7
- package/dist/mcp/manager.d.ts.map +1 -1
- package/dist/mcp/manager.js +79 -3
- package/dist/mcp/mcp-client.cjs +52 -62
- package/dist/mcp/mcp-client.d.ts.map +1 -1
- package/dist/mcp/mcp-client.js +54 -63
- package/dist/storage/tool-executions/types.cjs +12 -8
- package/dist/storage/tool-executions/types.d.ts +9 -0
- package/dist/storage/tool-executions/types.d.ts.map +1 -1
- package/dist/storage/tool-executions/types.js +12 -8
- package/dist/telemetry/decorators.cjs +47 -23
- package/dist/telemetry/decorators.d.ts +6 -0
- package/dist/telemetry/decorators.d.ts.map +1 -1
- package/dist/telemetry/decorators.js +47 -23
- package/dist/telemetry/operation-span.cjs +5 -2
- package/dist/telemetry/operation-span.d.ts +3 -0
- package/dist/telemetry/operation-span.d.ts.map +1 -1
- package/dist/telemetry/operation-span.js +5 -2
- package/dist/tools/approval/tool-approval-policy.cjs +11 -1
- package/dist/tools/approval/tool-approval-policy.d.ts +2 -2
- package/dist/tools/approval/tool-approval-policy.d.ts.map +1 -1
- package/dist/tools/approval/tool-approval-policy.js +11 -1
- package/dist/tools/identity.cjs +36 -0
- package/dist/tools/identity.d.ts +6 -0
- package/dist/tools/identity.d.ts.map +1 -0
- package/dist/tools/identity.js +13 -0
- package/dist/tools/index.cjs +2 -0
- package/dist/tools/index.d.ts +2 -1
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +4 -1
- package/dist/tools/presentation/tool-presentation.d.ts +5 -0
- package/dist/tools/presentation/tool-presentation.d.ts.map +1 -1
- package/dist/tools/schema-fingerprint.cjs +48 -0
- package/dist/tools/schema-fingerprint.d.ts +4 -0
- package/dist/tools/schema-fingerprint.d.ts.map +1 -0
- package/dist/tools/schema-fingerprint.js +25 -0
- package/dist/tools/schemas.cjs +3 -0
- package/dist/tools/schemas.d.ts +1 -0
- package/dist/tools/schemas.d.ts.map +1 -1
- package/dist/tools/schemas.js +2 -0
- package/dist/tools/tool-manager.cjs +160 -43
- package/dist/tools/tool-manager.d.ts +20 -11
- package/dist/tools/tool-manager.d.ts.map +1 -1
- package/dist/tools/tool-manager.js +160 -43
- package/dist/tools/types.d.ts +48 -0
- package/dist/tools/types.d.ts.map +1 -1
- package/dist/utils/schema.cjs +2 -2
- package/dist/utils/schema.d.ts +1 -1
- package/dist/utils/schema.d.ts.map +1 -1
- package/dist/utils/schema.js +2 -2
- package/dist/utils/stable-fingerprint.cjs +32 -0
- package/dist/utils/stable-fingerprint.d.ts +3 -0
- package/dist/utils/stable-fingerprint.d.ts.map +1 -0
- package/dist/utils/stable-fingerprint.js +9 -0
- package/package.json +9 -2
|
@@ -71,6 +71,7 @@ var import_errors = require("./errors.js");
|
|
|
71
71
|
var import_errors2 = require("../errors/index.js");
|
|
72
72
|
var import_types2 = require("../logger/v2/types.js");
|
|
73
73
|
var import_schema = require("../utils/schema.js");
|
|
74
|
+
var import_schema_fingerprint = require("./schema-fingerprint.js");
|
|
74
75
|
var import_types3 = require("../approval/types.js");
|
|
75
76
|
var import_schemas = require("../approval/schemas.js");
|
|
76
77
|
var import_session_tool_policy = require("./approval/session-tool-policy.js");
|
|
@@ -85,6 +86,9 @@ function isRecord(value) {
|
|
|
85
86
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
86
87
|
}
|
|
87
88
|
_ToolManager_decorators = [(0, import_decorators.InstrumentClass)({
|
|
89
|
+
captureArguments: false,
|
|
90
|
+
captureErrors: false,
|
|
91
|
+
captureResult: false,
|
|
88
92
|
prefix: "tool",
|
|
89
93
|
excludeMethods: ["setHookSupport", "getApprovalManager", "getAllowedToolsProvider"]
|
|
90
94
|
})];
|
|
@@ -595,15 +599,77 @@ let _ToolManager = class _ToolManager {
|
|
|
595
599
|
async getMcpTools() {
|
|
596
600
|
return await this.mcpManager.getAllTools();
|
|
597
601
|
}
|
|
602
|
+
/**
|
|
603
|
+
* Return canonical tool descriptions for host-owned discovery and type generation.
|
|
604
|
+
* Unlike getAllTools(), schemas are not rewritten for model-provider compatibility.
|
|
605
|
+
*/
|
|
606
|
+
async getToolDescriptors() {
|
|
607
|
+
const descriptors = [];
|
|
608
|
+
for (const tool of this.agentTools.values()) {
|
|
609
|
+
descriptors.push(await this.buildLocalToolDescriptor(tool));
|
|
610
|
+
}
|
|
611
|
+
for (const descriptor of this.mcpManager.getToolDescriptors()) {
|
|
612
|
+
descriptors.push(this.prefixMcpToolDescriptor(descriptor));
|
|
613
|
+
}
|
|
614
|
+
return descriptors;
|
|
615
|
+
}
|
|
616
|
+
async getToolDescriptor(toolName) {
|
|
617
|
+
const localTool = this.agentTools.get(toolName);
|
|
618
|
+
if (localTool !== void 0) {
|
|
619
|
+
return await this.buildLocalToolDescriptor(localTool);
|
|
620
|
+
}
|
|
621
|
+
if (!toolName.startsWith(_ToolManager.MCP_TOOL_PREFIX)) {
|
|
622
|
+
return void 0;
|
|
623
|
+
}
|
|
624
|
+
const mcpName = toolName.substring(_ToolManager.MCP_TOOL_PREFIX.length);
|
|
625
|
+
if (mcpName.length === 0) {
|
|
626
|
+
return void 0;
|
|
627
|
+
}
|
|
628
|
+
const descriptor = this.mcpManager.getToolDescriptor(mcpName);
|
|
629
|
+
return descriptor === void 0 ? void 0 : this.prefixMcpToolDescriptor(descriptor);
|
|
630
|
+
}
|
|
631
|
+
resolveToolIdentity(toolName) {
|
|
632
|
+
if (this.agentTools.has(toolName)) {
|
|
633
|
+
return { type: "local", toolId: toolName };
|
|
634
|
+
}
|
|
635
|
+
if (!toolName.startsWith(_ToolManager.MCP_TOOL_PREFIX)) {
|
|
636
|
+
return void 0;
|
|
637
|
+
}
|
|
638
|
+
const mcpName = toolName.substring(_ToolManager.MCP_TOOL_PREFIX.length);
|
|
639
|
+
return this.mcpManager.getToolDescriptor(mcpName)?.identity;
|
|
640
|
+
}
|
|
641
|
+
async buildLocalToolDescriptor(tool) {
|
|
642
|
+
const inputSchema = (0, import_schema.convertZodSchemaToJsonSchema)(tool.inputSchema, this.logger);
|
|
643
|
+
const outputSchema = tool.outputSchema === void 0 ? void 0 : (0, import_schema.convertZodSchemaToJsonSchema)(tool.outputSchema, this.logger, "output");
|
|
644
|
+
return {
|
|
645
|
+
name: tool.id,
|
|
646
|
+
description: await this.getLocalToolDescription(tool),
|
|
647
|
+
approval: this.approvalMode === "auto-approve" || tool.needsApproval === false || tool.needsApproval === null ? "never" : "possible",
|
|
648
|
+
identity: { type: "local", toolId: tool.id },
|
|
649
|
+
inputSchema,
|
|
650
|
+
...outputSchema === void 0 ? {} : { outputSchema },
|
|
651
|
+
schemaFingerprint: (0, import_schema_fingerprint.toolSchemaFingerprint)(inputSchema, outputSchema)
|
|
652
|
+
};
|
|
653
|
+
}
|
|
654
|
+
prefixMcpToolDescriptor(descriptor) {
|
|
655
|
+
return {
|
|
656
|
+
...descriptor,
|
|
657
|
+
approval: this.approvalMode === "auto-approve" ? "never" : "possible",
|
|
658
|
+
name: `${_ToolManager.MCP_TOOL_PREFIX}${descriptor.name}`,
|
|
659
|
+
description: `${descriptor.description || "No description provided"} (via MCP servers)`
|
|
660
|
+
};
|
|
661
|
+
}
|
|
598
662
|
buildToolExecutionContext(options) {
|
|
599
663
|
const workspace = this.currentWorkspace;
|
|
600
664
|
const baseContext = {
|
|
601
665
|
sessionId: options.sessionId,
|
|
602
666
|
runContext: options.runContext,
|
|
667
|
+
executionIdentity: options.executionIdentity,
|
|
603
668
|
workspaceId: workspace?.id,
|
|
604
669
|
workspace,
|
|
605
670
|
abortSignal: options.abortSignal,
|
|
606
671
|
toolCallId: options.toolCallId,
|
|
672
|
+
parentToolCallId: options.parentToolCallId,
|
|
607
673
|
hostRuntime: options.runContext?.hostRuntime,
|
|
608
674
|
logger: this.logger
|
|
609
675
|
};
|
|
@@ -617,8 +683,14 @@ let _ToolManager = class _ToolManager {
|
|
|
617
683
|
const sessionId = options.runContext?.sessionId ?? options.sessionId;
|
|
618
684
|
return { ...options, sessionId, hostRuntime: options.runContext?.hostRuntime };
|
|
619
685
|
}
|
|
620
|
-
resolveToolExecutionIdentity(invocation, toolCallId) {
|
|
686
|
+
resolveToolExecutionIdentity(invocation, toolCallId, parentToolCallId) {
|
|
621
687
|
if (invocation.executionIdentity !== void 0) {
|
|
688
|
+
if (invocation.executionIdentity.toolCallId !== toolCallId || invocation.executionIdentity.parentToolCallId !== parentToolCallId) {
|
|
689
|
+
throw import_errors.ToolError.executionFailed(
|
|
690
|
+
toolCallId,
|
|
691
|
+
"Tool execution identity does not match the prepared call"
|
|
692
|
+
);
|
|
693
|
+
}
|
|
622
694
|
return invocation.executionIdentity;
|
|
623
695
|
}
|
|
624
696
|
const ids = invocation.runContext?.hostRuntime?.ids;
|
|
@@ -635,6 +707,7 @@ let _ToolManager = class _ToolManager {
|
|
|
635
707
|
runId,
|
|
636
708
|
turnId,
|
|
637
709
|
modelStepId,
|
|
710
|
+
...parentToolCallId === void 0 ? {} : { parentToolCallId },
|
|
638
711
|
toolCallId
|
|
639
712
|
};
|
|
640
713
|
}
|
|
@@ -680,6 +753,16 @@ let _ToolManager = class _ToolManager {
|
|
|
680
753
|
}
|
|
681
754
|
return validated;
|
|
682
755
|
}
|
|
756
|
+
validateToolArgs(toolName, args) {
|
|
757
|
+
if (!toolName.startsWith(_ToolManager.MCP_TOOL_PREFIX)) {
|
|
758
|
+
return this.validateLocalToolArgs(toolName, args);
|
|
759
|
+
}
|
|
760
|
+
const mcpName = toolName.substring(_ToolManager.MCP_TOOL_PREFIX.length);
|
|
761
|
+
if (mcpName.length === 0) {
|
|
762
|
+
throw import_errors.ToolError.invalidName(toolName, "tool name cannot be empty after prefix");
|
|
763
|
+
}
|
|
764
|
+
return this.mcpManager.validateToolInput(mcpName, args);
|
|
765
|
+
}
|
|
683
766
|
async executeLocalTool(toolName, args, options) {
|
|
684
767
|
const tool = this.agentTools.get(toolName);
|
|
685
768
|
if (!tool) {
|
|
@@ -693,15 +776,15 @@ let _ToolManager = class _ToolManager {
|
|
|
693
776
|
const context = this.buildToolExecutionContext({
|
|
694
777
|
sessionId: options?.sessionId,
|
|
695
778
|
abortSignal: options?.abortSignal,
|
|
779
|
+
executionIdentity: options?.executionIdentity,
|
|
696
780
|
toolCallId: options?.toolCallId,
|
|
781
|
+
parentToolCallId: options?.parentToolCallId,
|
|
697
782
|
runContext: options?.runContext
|
|
698
783
|
});
|
|
699
784
|
const result = await tool.execute(args, context);
|
|
700
785
|
return result;
|
|
701
786
|
} catch (error) {
|
|
702
|
-
this.logger.error(
|
|
703
|
-
error: error instanceof Error ? error.message : String(error)
|
|
704
|
-
});
|
|
787
|
+
this.logger.error(`Local tool execution failed: ${toolName}`);
|
|
705
788
|
throw error;
|
|
706
789
|
}
|
|
707
790
|
}
|
|
@@ -730,21 +813,7 @@ let _ToolManager = class _ToolManager {
|
|
|
730
813
|
mcpTools = {};
|
|
731
814
|
}
|
|
732
815
|
for (const [toolName, tool] of this.agentTools) {
|
|
733
|
-
|
|
734
|
-
if (tool.getDescription) {
|
|
735
|
-
try {
|
|
736
|
-
const dynamicDescription = await tool.getDescription(
|
|
737
|
-
this.buildToolExecutionContext({})
|
|
738
|
-
);
|
|
739
|
-
if (dynamicDescription.trim()) {
|
|
740
|
-
description = dynamicDescription;
|
|
741
|
-
}
|
|
742
|
-
} catch (error) {
|
|
743
|
-
this.logger.warn(
|
|
744
|
-
`Failed to build dynamic description for '${toolName}': ${error instanceof Error ? error.message : String(error)}`
|
|
745
|
-
);
|
|
746
|
-
}
|
|
747
|
-
}
|
|
816
|
+
const description = await this.getLocalToolDescription(tool);
|
|
748
817
|
allTools[toolName] = {
|
|
749
818
|
name: toolName,
|
|
750
819
|
description,
|
|
@@ -770,6 +839,21 @@ let _ToolManager = class _ToolManager {
|
|
|
770
839
|
);
|
|
771
840
|
return allTools;
|
|
772
841
|
}
|
|
842
|
+
async getLocalToolDescription(tool) {
|
|
843
|
+
const fallback = tool.description || "No description provided";
|
|
844
|
+
if (!tool.getDescription) {
|
|
845
|
+
return fallback;
|
|
846
|
+
}
|
|
847
|
+
try {
|
|
848
|
+
const description = await tool.getDescription(this.buildToolExecutionContext({}));
|
|
849
|
+
return description.trim() ? description : fallback;
|
|
850
|
+
} catch (error) {
|
|
851
|
+
this.logger.warn(
|
|
852
|
+
`Failed to build dynamic description for '${tool.id}': ${error instanceof Error ? error.message : String(error)}`
|
|
853
|
+
);
|
|
854
|
+
return fallback;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
773
857
|
/**
|
|
774
858
|
* Get all available tools from all sources with conflict resolution
|
|
775
859
|
* This is the single interface the LLM uses to discover tools
|
|
@@ -786,8 +870,8 @@ let _ToolManager = class _ToolManager {
|
|
|
786
870
|
}
|
|
787
871
|
async prepareToolCall(input) {
|
|
788
872
|
const sessionId = input.runContext?.sessionId ?? input.sessionId;
|
|
789
|
-
const
|
|
790
|
-
if (
|
|
873
|
+
const identity = this.resolveToolIdentity(input.toolName);
|
|
874
|
+
if (identity === void 0) {
|
|
791
875
|
return this.createPreparedToolError(
|
|
792
876
|
"unknown-tool",
|
|
793
877
|
input.toolName,
|
|
@@ -806,7 +890,7 @@ let _ToolManager = class _ToolManager {
|
|
|
806
890
|
const approvalDescription = typeof meta.callActivity?.running === "string" ? meta.callActivity.running : typeof rawToolArgs.description === "string" ? rawToolArgs.description : void 0;
|
|
807
891
|
let validatedArgs;
|
|
808
892
|
try {
|
|
809
|
-
validatedArgs = this.
|
|
893
|
+
validatedArgs = this.validateToolArgs(input.toolName, rawToolArgs);
|
|
810
894
|
} catch (error) {
|
|
811
895
|
return this.createPreparedToolError(
|
|
812
896
|
"invalid-input",
|
|
@@ -818,13 +902,15 @@ let _ToolManager = class _ToolManager {
|
|
|
818
902
|
toolName: input.toolName,
|
|
819
903
|
args: validatedArgs,
|
|
820
904
|
toolCallId: input.toolCallId,
|
|
905
|
+
...input.parentToolCallId === void 0 ? {} : { parentToolCallId: input.parentToolCallId },
|
|
821
906
|
...sessionId !== void 0 ? { sessionId } : {},
|
|
822
907
|
...input.runContext !== void 0 ? { runContext: input.runContext } : {}
|
|
823
908
|
});
|
|
824
909
|
const call = {
|
|
910
|
+
identity,
|
|
825
911
|
input: validatedArgs,
|
|
912
|
+
...input.parentToolCallId === void 0 ? {} : { parentToolCallId: input.parentToolCallId },
|
|
826
913
|
presentationSnapshot,
|
|
827
|
-
source,
|
|
828
914
|
toolCallId: input.toolCallId,
|
|
829
915
|
toolName: input.toolName,
|
|
830
916
|
...eventMeta !== void 0 ? { meta: eventMeta } : {}
|
|
@@ -834,10 +920,11 @@ let _ToolManager = class _ToolManager {
|
|
|
834
920
|
getContext: () => this.buildToolExecutionContext({
|
|
835
921
|
sessionId,
|
|
836
922
|
toolCallId: input.toolCallId,
|
|
923
|
+
parentToolCallId: input.parentToolCallId,
|
|
837
924
|
runContext: input.runContext
|
|
838
925
|
}),
|
|
839
926
|
...sessionId !== void 0 ? { sessionId } : {},
|
|
840
|
-
|
|
927
|
+
identity,
|
|
841
928
|
toolName: input.toolName
|
|
842
929
|
});
|
|
843
930
|
if (approvalGate.kind === "ready") {
|
|
@@ -860,6 +947,7 @@ let _ToolManager = class _ToolManager {
|
|
|
860
947
|
...input.runContext !== void 0 ? { runContext: input.runContext } : {},
|
|
861
948
|
...input.sessionId !== void 0 ? { sessionId: input.sessionId } : {},
|
|
862
949
|
toolCallId: input.toolCallId,
|
|
950
|
+
...input.call.parentToolCallId === void 0 ? {} : { parentToolCallId: input.call.parentToolCallId },
|
|
863
951
|
toolName: input.toolName
|
|
864
952
|
});
|
|
865
953
|
const hostRuntime = input.runContext?.hostRuntime;
|
|
@@ -869,9 +957,11 @@ let _ToolManager = class _ToolManager {
|
|
|
869
957
|
...hostRuntime !== void 0 ? { hostRuntime } : {},
|
|
870
958
|
metadata: {
|
|
871
959
|
toolName: input.toolName,
|
|
960
|
+
toolIdentity: input.call.identity,
|
|
872
961
|
...input.approvalGate.approvalKey !== void 0 ? { approvalKey: input.approvalGate.approvalKey } : {},
|
|
873
962
|
presentationSnapshot: input.call.presentationSnapshot,
|
|
874
963
|
toolCallId: input.toolCallId,
|
|
964
|
+
...input.call.parentToolCallId === void 0 ? {} : { parentToolCallId: input.call.parentToolCallId },
|
|
875
965
|
args: input.args,
|
|
876
966
|
...input.approvalDescription !== void 0 ? { description: input.approvalDescription } : {},
|
|
877
967
|
...displayPreview !== void 0 ? { displayPreview } : {}
|
|
@@ -932,6 +1022,14 @@ let _ToolManager = class _ToolManager {
|
|
|
932
1022
|
async requestApprovalDecision(recorded) {
|
|
933
1023
|
return this.approvalManager.requestApprovalDecision(recorded.request);
|
|
934
1024
|
}
|
|
1025
|
+
async cancelApprovalRequest(recorded) {
|
|
1026
|
+
await this.approvalManager.cancelApproval(recorded.request.approvalId);
|
|
1027
|
+
await this.applyApprovalDecision(recorded, {
|
|
1028
|
+
approvalId: recorded.request.approvalId,
|
|
1029
|
+
reason: "system_cancelled",
|
|
1030
|
+
status: import_types3.ApprovalStatus.CANCELLED
|
|
1031
|
+
});
|
|
1032
|
+
}
|
|
935
1033
|
assertRecordedApprovalMatchesPreparedCall(prepared, request) {
|
|
936
1034
|
const expected = {
|
|
937
1035
|
type: prepared.requestDetails.type,
|
|
@@ -1008,15 +1106,6 @@ let _ToolManager = class _ToolManager {
|
|
|
1008
1106
|
const outcome = response.status === import_types3.ApprovalStatus.DENIED ? "approval was denied" : "approval was cancelled";
|
|
1009
1107
|
return `Tool '${toolName}' was not executed because ${outcome}${response.message ? `: ${response.message}` : ""}.`;
|
|
1010
1108
|
}
|
|
1011
|
-
async resolveExecutableToolSource(toolName) {
|
|
1012
|
-
if (this.agentTools.has(toolName)) {
|
|
1013
|
-
return "local";
|
|
1014
|
-
}
|
|
1015
|
-
if (toolName.startsWith(_ToolManager.MCP_TOOL_PREFIX) && toolName.length > _ToolManager.MCP_TOOL_PREFIX.length) {
|
|
1016
|
-
return "mcp";
|
|
1017
|
-
}
|
|
1018
|
-
return "unknown";
|
|
1019
|
-
}
|
|
1020
1109
|
createPreparedToolError(kind, toolName, error) {
|
|
1021
1110
|
return {
|
|
1022
1111
|
kind: "terminal",
|
|
@@ -1044,7 +1133,6 @@ let _ToolManager = class _ToolManager {
|
|
|
1044
1133
|
async executeTool(toolName, args, toolCallId, invocation) {
|
|
1045
1134
|
const { sessionId, runContext, hostRuntime } = this.resolveToolExecutionInvocation(invocation);
|
|
1046
1135
|
this.logger.debug(`\u{1F527} Tool execution requested: '${toolName}' (toolCallId: ${toolCallId})`);
|
|
1047
|
-
this.logger.debug(`Tool args: ${JSON.stringify(args, null, 2)}`);
|
|
1048
1136
|
if (toolName === _ToolManager.MCP_TOOL_PREFIX) {
|
|
1049
1137
|
throw import_errors.ToolError.invalidName(toolName, "tool name cannot be empty after prefix");
|
|
1050
1138
|
}
|
|
@@ -1052,6 +1140,7 @@ let _ToolManager = class _ToolManager {
|
|
|
1052
1140
|
toolName,
|
|
1053
1141
|
input: args,
|
|
1054
1142
|
toolCallId,
|
|
1143
|
+
...invocation?.executionIdentity?.parentToolCallId === void 0 ? {} : { parentToolCallId: invocation.executionIdentity.parentToolCallId },
|
|
1055
1144
|
...sessionId !== void 0 ? { sessionId } : {},
|
|
1056
1145
|
...runContext !== void 0 ? { runContext } : {}
|
|
1057
1146
|
});
|
|
@@ -1070,7 +1159,11 @@ let _ToolManager = class _ToolManager {
|
|
|
1070
1159
|
try {
|
|
1071
1160
|
const recorded = await this.recordApprovalRequest(
|
|
1072
1161
|
prepared,
|
|
1073
|
-
this.resolveDirectApprovalIdentity(
|
|
1162
|
+
this.resolveDirectApprovalIdentity(
|
|
1163
|
+
invocation,
|
|
1164
|
+
toolCallId,
|
|
1165
|
+
prepared.call.parentToolCallId
|
|
1166
|
+
)
|
|
1074
1167
|
);
|
|
1075
1168
|
const response = await this.requestApprovalDecision(recorded);
|
|
1076
1169
|
applied = await this.applyApprovalDecision(recorded, {
|
|
@@ -1099,6 +1192,9 @@ let _ToolManager = class _ToolManager {
|
|
|
1099
1192
|
if (!sessionId) {
|
|
1100
1193
|
return;
|
|
1101
1194
|
}
|
|
1195
|
+
if (call.parentToolCallId !== void 0) {
|
|
1196
|
+
return;
|
|
1197
|
+
}
|
|
1102
1198
|
this.agentEventBus.emit("llm:tool-call", {
|
|
1103
1199
|
toolName: call.toolName,
|
|
1104
1200
|
presentationSnapshot: this.toolPresentation.snapshotForToolCallEvent({
|
|
@@ -1120,7 +1216,11 @@ let _ToolManager = class _ToolManager {
|
|
|
1120
1216
|
if ((0, import_env.isBackgroundTasksEnabled)() && call.meta?.runInBackground === true && sessionId !== void 0) {
|
|
1121
1217
|
return void 0;
|
|
1122
1218
|
}
|
|
1123
|
-
const identity = this.resolveToolExecutionIdentity(
|
|
1219
|
+
const identity = this.resolveToolExecutionIdentity(
|
|
1220
|
+
invocation ?? {},
|
|
1221
|
+
call.toolCallId,
|
|
1222
|
+
call.parentToolCallId
|
|
1223
|
+
);
|
|
1124
1224
|
if (identity === void 0) {
|
|
1125
1225
|
return void 0;
|
|
1126
1226
|
}
|
|
@@ -1154,7 +1254,11 @@ let _ToolManager = class _ToolManager {
|
|
|
1154
1254
|
);
|
|
1155
1255
|
}
|
|
1156
1256
|
async recordDirectToolExecutionFailure(call, invocation, error) {
|
|
1157
|
-
const identity = this.resolveToolExecutionIdentity(
|
|
1257
|
+
const identity = this.resolveToolExecutionIdentity(
|
|
1258
|
+
invocation ?? {},
|
|
1259
|
+
call.toolCallId,
|
|
1260
|
+
call.parentToolCallId
|
|
1261
|
+
);
|
|
1158
1262
|
if (identity === void 0) {
|
|
1159
1263
|
return;
|
|
1160
1264
|
}
|
|
@@ -1187,8 +1291,12 @@ let _ToolManager = class _ToolManager {
|
|
|
1187
1291
|
error: error instanceof Error ? error.message : String(error)
|
|
1188
1292
|
});
|
|
1189
1293
|
}
|
|
1190
|
-
resolveDirectApprovalIdentity(invocation, toolCallId) {
|
|
1191
|
-
const executionIdentity = this.resolveToolExecutionIdentity(
|
|
1294
|
+
resolveDirectApprovalIdentity(invocation, toolCallId, parentToolCallId) {
|
|
1295
|
+
const executionIdentity = this.resolveToolExecutionIdentity(
|
|
1296
|
+
invocation ?? {},
|
|
1297
|
+
toolCallId,
|
|
1298
|
+
parentToolCallId
|
|
1299
|
+
);
|
|
1192
1300
|
if (executionIdentity !== void 0) {
|
|
1193
1301
|
return {
|
|
1194
1302
|
runId: executionIdentity.runId,
|
|
@@ -1239,7 +1347,8 @@ let _ToolManager = class _ToolManager {
|
|
|
1239
1347
|
const { sessionId, abortSignal, runContext, hostRuntime } = this.resolveToolExecutionInvocation(invocation);
|
|
1240
1348
|
const durableIdentity = this.resolveToolExecutionIdentity(
|
|
1241
1349
|
invocation ?? {},
|
|
1242
|
-
call.toolCallId
|
|
1350
|
+
call.toolCallId,
|
|
1351
|
+
call.parentToolCallId
|
|
1243
1352
|
);
|
|
1244
1353
|
const backgroundTasksEnabled = (0, import_env.isBackgroundTasksEnabled)();
|
|
1245
1354
|
const willRunInBackground = backgroundTasksEnabled && call.meta?.runInBackground === true && sessionId !== void 0;
|
|
@@ -1303,6 +1412,9 @@ let _ToolManager = class _ToolManager {
|
|
|
1303
1412
|
this.agentEventBus.emit("tool:running", {
|
|
1304
1413
|
toolName: call.toolName,
|
|
1305
1414
|
toolCallId: call.toolCallId,
|
|
1415
|
+
...call.parentToolCallId !== void 0 && {
|
|
1416
|
+
parentToolCallId: call.parentToolCallId
|
|
1417
|
+
},
|
|
1306
1418
|
sessionId,
|
|
1307
1419
|
...hostRuntime !== void 0 && { hostRuntime }
|
|
1308
1420
|
});
|
|
@@ -1327,7 +1439,7 @@ let _ToolManager = class _ToolManager {
|
|
|
1327
1439
|
);
|
|
1328
1440
|
toolArgs = modifiedPayload.args;
|
|
1329
1441
|
try {
|
|
1330
|
-
toolArgs = this.
|
|
1442
|
+
toolArgs = this.validateToolArgs(call.toolName, toolArgs);
|
|
1331
1443
|
} catch (error) {
|
|
1332
1444
|
this.logger.error(
|
|
1333
1445
|
`Post-hook validation failed for tool '${call.toolName}': a beforeToolCall hook may have set invalid args`
|
|
@@ -1346,7 +1458,7 @@ let _ToolManager = class _ToolManager {
|
|
|
1346
1458
|
promise
|
|
1347
1459
|
};
|
|
1348
1460
|
};
|
|
1349
|
-
if (call.
|
|
1461
|
+
if (call.identity.type === "mcp") {
|
|
1350
1462
|
const actualToolName = call.toolName.substring(_ToolManager.MCP_TOOL_PREFIX.length);
|
|
1351
1463
|
if (actualToolName.length === 0) {
|
|
1352
1464
|
throw import_errors.ToolError.invalidName(
|
|
@@ -1403,7 +1515,9 @@ let _ToolManager = class _ToolManager {
|
|
|
1403
1515
|
this.executeLocalTool(call.toolName, toolArgs, {
|
|
1404
1516
|
sessionId: backgroundSessionId,
|
|
1405
1517
|
abortSignal,
|
|
1518
|
+
executionIdentity,
|
|
1406
1519
|
toolCallId: call.toolCallId,
|
|
1520
|
+
parentToolCallId: call.parentToolCallId,
|
|
1407
1521
|
runContext
|
|
1408
1522
|
}),
|
|
1409
1523
|
`Tool ${call.toolName}`
|
|
@@ -1427,7 +1541,9 @@ let _ToolManager = class _ToolManager {
|
|
|
1427
1541
|
result = await this.executeLocalTool(call.toolName, toolArgs, {
|
|
1428
1542
|
sessionId,
|
|
1429
1543
|
abortSignal,
|
|
1544
|
+
executionIdentity,
|
|
1430
1545
|
toolCallId: call.toolCallId,
|
|
1546
|
+
parentToolCallId: call.parentToolCallId,
|
|
1431
1547
|
runContext
|
|
1432
1548
|
});
|
|
1433
1549
|
}
|
|
@@ -1463,6 +1579,7 @@ let _ToolManager = class _ToolManager {
|
|
|
1463
1579
|
result,
|
|
1464
1580
|
args: toolArgs,
|
|
1465
1581
|
toolCallId: call.toolCallId,
|
|
1582
|
+
...call.parentToolCallId === void 0 ? {} : { parentToolCallId: call.parentToolCallId },
|
|
1466
1583
|
...sessionId !== void 0 ? { sessionId } : {},
|
|
1467
1584
|
...runContext !== void 0 ? { runContext } : {}
|
|
1468
1585
|
});
|
|
@@ -1494,7 +1611,7 @@ let _ToolManager = class _ToolManager {
|
|
|
1494
1611
|
} catch (error) {
|
|
1495
1612
|
const duration = Date.now() - startTime;
|
|
1496
1613
|
this.logger.error(
|
|
1497
|
-
|
|
1614
|
+
`Prepared tool execution failed for ${call.toolName} after ${duration}ms, sessionId: ${sessionId ?? "global"}`
|
|
1498
1615
|
);
|
|
1499
1616
|
const message = error instanceof Error ? error.message : String(error);
|
|
1500
1617
|
if (executionId !== void 0) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { MCPManager } from '../mcp/manager.js';
|
|
2
2
|
import type { ToolPolicies } from './schemas.js';
|
|
3
|
-
import { ToolSet, ToolExecutionContext, ToolExecutionContextBase, Tool, ToolPresentationSnapshotV1, ToolExecutionResult } from './types.js';
|
|
3
|
+
import { ToolSet, ToolExecutionContext, ToolExecutionContextBase, Tool, ToolPresentationSnapshotV1, ToolExecutionResult, ToolDescriptor, ToolIdentity } from './types.js';
|
|
4
4
|
import type { Logger } from '../logger/v2/types.js';
|
|
5
5
|
import type { AgentEventBus } from '../events/index.js';
|
|
6
6
|
import type { ApprovalDecisionInput, ApprovalManager, ApprovalRecordIdentity } from '../approval/manager.js';
|
|
@@ -11,26 +11,23 @@ import type { SessionManager } from '../session/index.js';
|
|
|
11
11
|
import type { AgentStateManager } from '../agent/state-manager.js';
|
|
12
12
|
import type { WorkspaceManager } from '../workspace/manager.js';
|
|
13
13
|
import type { SessionToolPreferencesStore } from './session-tool-preferences-store.js';
|
|
14
|
-
import type {
|
|
14
|
+
import type { ToolExecutionStore } from '../storage/tool-executions/types.js';
|
|
15
15
|
import { type ToolCallMetadata } from './tool-call-metadata.js';
|
|
16
16
|
import type { DynamicContributorContext, DynamicContributorContextFactory } from '../systemPrompt/types.js';
|
|
17
17
|
import type { AgentRunContext } from '../runtime/run-context.js';
|
|
18
18
|
export type ToolExecutionContextFactory = (baseContext: ToolExecutionContextBase) => ToolExecutionContext;
|
|
19
|
-
type
|
|
20
|
-
|
|
21
|
-
abortSignal?: AbortSignal | undefined;
|
|
22
|
-
runContext?: AgentRunContext | undefined;
|
|
23
|
-
executionIdentity?: ToolExecutionIdentity | undefined;
|
|
24
|
-
};
|
|
19
|
+
type ToolExecutionRoutingContext = Pick<ToolExecutionContextBase, 'abortSignal' | 'executionIdentity' | 'parentToolCallId' | 'runContext' | 'sessionId' | 'toolCallId'>;
|
|
20
|
+
export type ToolExecutionInvocation = Pick<ToolExecutionRoutingContext, 'abortSignal' | 'executionIdentity' | 'runContext' | 'sessionId'>;
|
|
25
21
|
export type ExecutableToolCall = {
|
|
26
22
|
approval?: {
|
|
27
23
|
approvalStatus: 'approved';
|
|
28
24
|
requireApproval: true;
|
|
29
25
|
};
|
|
26
|
+
identity: ToolIdentity;
|
|
30
27
|
input: Record<string, unknown>;
|
|
31
28
|
meta?: ToolCallMetadata;
|
|
29
|
+
parentToolCallId?: string;
|
|
32
30
|
presentationSnapshot: ToolPresentationSnapshotV1;
|
|
33
|
-
source: 'local' | 'mcp';
|
|
34
31
|
toolCallId: string;
|
|
35
32
|
toolName: string;
|
|
36
33
|
};
|
|
@@ -55,7 +52,7 @@ export type PreparedToolCall = {
|
|
|
55
52
|
export type ApprovalRequiredPreparedToolCall = Extract<PreparedToolCall, {
|
|
56
53
|
kind: 'approval-required';
|
|
57
54
|
}>;
|
|
58
|
-
export type ToolApprovalRecordIdentity =
|
|
55
|
+
export type ToolApprovalRecordIdentity = Pick<ApprovalRecordIdentity, 'runId' | 'turnId' | 'modelStepId'>;
|
|
59
56
|
export type RecordedToolApproval = {
|
|
60
57
|
prepared: ApprovalRequiredPreparedToolCall;
|
|
61
58
|
request: ApprovalRequest;
|
|
@@ -73,6 +70,7 @@ export type PrepareToolCallInput = {
|
|
|
73
70
|
toolName: string;
|
|
74
71
|
input: unknown;
|
|
75
72
|
toolCallId: string;
|
|
73
|
+
parentToolCallId?: string | undefined;
|
|
76
74
|
sessionId?: string | undefined;
|
|
77
75
|
runContext?: AgentRunContext | undefined;
|
|
78
76
|
};
|
|
@@ -268,11 +266,21 @@ export declare class ToolManager {
|
|
|
268
266
|
* This provides access to MCP tools while maintaining separation of concerns
|
|
269
267
|
*/
|
|
270
268
|
getMcpTools(): Promise<ToolSet>;
|
|
269
|
+
/**
|
|
270
|
+
* Return canonical tool descriptions for host-owned discovery and type generation.
|
|
271
|
+
* Unlike getAllTools(), schemas are not rewritten for model-provider compatibility.
|
|
272
|
+
*/
|
|
273
|
+
getToolDescriptors(): Promise<ToolDescriptor[]>;
|
|
274
|
+
getToolDescriptor(toolName: string): Promise<ToolDescriptor | undefined>;
|
|
275
|
+
private resolveToolIdentity;
|
|
276
|
+
private buildLocalToolDescriptor;
|
|
277
|
+
private prefixMcpToolDescriptor;
|
|
271
278
|
private buildToolExecutionContext;
|
|
272
279
|
private resolveToolExecutionInvocation;
|
|
273
280
|
private resolveToolExecutionIdentity;
|
|
274
281
|
private assertToolExecutionRecordMatches;
|
|
275
282
|
private validateLocalToolArgs;
|
|
283
|
+
private validateToolArgs;
|
|
276
284
|
private executeLocalTool;
|
|
277
285
|
/**
|
|
278
286
|
* Build all tools from sources.
|
|
@@ -288,6 +296,7 @@ export declare class ToolManager {
|
|
|
288
296
|
* Related: Tool policies now support dual matching (exact + suffix) as a workaround
|
|
289
297
|
*/
|
|
290
298
|
private buildAllTools;
|
|
299
|
+
private getLocalToolDescription;
|
|
291
300
|
/**
|
|
292
301
|
* Get all available tools from all sources with conflict resolution
|
|
293
302
|
* This is the single interface the LLM uses to discover tools
|
|
@@ -299,12 +308,12 @@ export declare class ToolManager {
|
|
|
299
308
|
recordApprovalRequest(prepared: ApprovalRequiredPreparedToolCall, identity: ToolApprovalRecordIdentity): Promise<RecordedToolApproval>;
|
|
300
309
|
applyApprovalDecision(recorded: RecordedToolApproval, decision: ApprovalDecisionInput): Promise<ToolApprovalDecisionApplication>;
|
|
301
310
|
requestApprovalDecision(recorded: RecordedToolApproval): Promise<ApprovalResponse>;
|
|
311
|
+
cancelApprovalRequest(recorded: RecordedToolApproval): Promise<void>;
|
|
302
312
|
private assertRecordedApprovalMatchesPreparedCall;
|
|
303
313
|
private assertOnGrantedRequestMatchesPreparedCall;
|
|
304
314
|
private applyApprovalGrantedEffects;
|
|
305
315
|
private createApprovalTerminalResult;
|
|
306
316
|
private formatApprovalTerminalMessage;
|
|
307
|
-
private resolveExecutableToolSource;
|
|
308
317
|
private createPreparedToolError;
|
|
309
318
|
private createPreparedToolTerminal;
|
|
310
319
|
executeTool(toolName: string, args: Record<string, unknown>, toolCallId: string, invocation?: ToolExecutionInvocation): Promise<import('./types.js').ToolExecutionResult>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-manager.d.ts","sourceRoot":"","sources":["../../src/tools/tool-manager.ts"],"names":[],"mappings":"AACA,OA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