@botbotgo/agent-harness 0.0.114 → 0.0.115
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/contracts/workspace.d.ts +1 -1
- package/dist/package-version.d.ts +1 -1
- package/dist/package-version.js +1 -1
- package/dist/runtime/support/compiled-binding.d.ts +0 -2
- package/dist/runtime/support/compiled-binding.js +12 -12
- package/dist/workspace/agent-binding-compiler.js +0 -22
- package/package.json +1 -1
|
@@ -183,7 +183,7 @@ export type CompiledAgentBinding = {
|
|
|
183
183
|
agent: ParsedAgentObject;
|
|
184
184
|
adapter?: {
|
|
185
185
|
kind: string;
|
|
186
|
-
config
|
|
186
|
+
config?: Record<string, unknown>;
|
|
187
187
|
};
|
|
188
188
|
langchainAgentParams?: LangChainAgentParams;
|
|
189
189
|
deepAgentParams?: DeepAgentParams;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AGENT_HARNESS_VERSION = "0.0.
|
|
1
|
+
export declare const AGENT_HARNESS_VERSION = "0.0.114";
|
package/dist/package-version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const AGENT_HARNESS_VERSION = "0.0.
|
|
1
|
+
export const AGENT_HARNESS_VERSION = "0.0.114";
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { CompiledAgentBinding, CompiledModel, CompiledTool, DeepAgentParams, LangChainAgentParams } from "../../contracts/types.js";
|
|
2
2
|
export type BindingExecutionView = {
|
|
3
3
|
adapterKind: string;
|
|
4
|
-
adapterConfig: Record<string, unknown>;
|
|
5
4
|
langchainParams?: LangChainAgentParams;
|
|
6
5
|
deepAgentParams?: DeepAgentParams;
|
|
7
6
|
executionParams?: LangChainAgentParams | DeepAgentParams;
|
|
@@ -18,7 +17,6 @@ export type BindingExecutionView = {
|
|
|
18
17
|
};
|
|
19
18
|
export declare function getBindingExecutionView(binding: CompiledAgentBinding): BindingExecutionView;
|
|
20
19
|
export declare function getBindingAdapterKind(binding: CompiledAgentBinding): string;
|
|
21
|
-
export declare function getBindingAdapterConfig(binding: CompiledAgentBinding): Record<string, unknown>;
|
|
22
20
|
export declare function getBindingLangChainParams(binding: CompiledAgentBinding): LangChainAgentParams | undefined;
|
|
23
21
|
export declare function getBindingDeepAgentParams(binding: CompiledAgentBinding): DeepAgentParams | undefined;
|
|
24
22
|
export declare function isLangChainBinding(binding: CompiledAgentBinding): boolean;
|
|
@@ -1,19 +1,23 @@
|
|
|
1
1
|
import { asRecord } from "../../utils/object.js";
|
|
2
2
|
const bindingExecutionViewCache = new WeakMap();
|
|
3
|
+
function getLegacyAdapterParams(binding) {
|
|
4
|
+
return asRecord(binding.adapter?.config?.params);
|
|
5
|
+
}
|
|
3
6
|
function deriveBindingExecutionView(binding) {
|
|
4
7
|
const cached = bindingExecutionViewCache.get(binding);
|
|
5
8
|
if (cached) {
|
|
6
9
|
return cached;
|
|
7
10
|
}
|
|
8
11
|
const adapterKind = binding.adapter?.kind ?? binding.agent.executionMode;
|
|
9
|
-
const
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
const deepAgentParams =
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
const legacyAdapterParams = getLegacyAdapterParams(binding);
|
|
13
|
+
const langchainParams = binding.langchainAgentParams ??
|
|
14
|
+
(adapterKind === "langchain-v1" && legacyAdapterParams
|
|
15
|
+
? legacyAdapterParams
|
|
16
|
+
: undefined);
|
|
17
|
+
const deepAgentParams = binding.deepAgentParams ??
|
|
18
|
+
(adapterKind === "deepagent" && legacyAdapterParams
|
|
19
|
+
? legacyAdapterParams
|
|
20
|
+
: undefined);
|
|
17
21
|
const primaryTools = langchainParams?.tools ?? deepAgentParams?.tools ?? [];
|
|
18
22
|
const middlewareConfigs = langchainParams?.middleware ?? deepAgentParams?.middleware;
|
|
19
23
|
const middlewareKinds = new Set((middlewareConfigs ?? [])
|
|
@@ -21,7 +25,6 @@ function deriveBindingExecutionView(binding) {
|
|
|
21
25
|
.filter(Boolean));
|
|
22
26
|
const view = {
|
|
23
27
|
adapterKind,
|
|
24
|
-
adapterConfig,
|
|
25
28
|
langchainParams,
|
|
26
29
|
deepAgentParams,
|
|
27
30
|
executionParams: langchainParams ?? deepAgentParams,
|
|
@@ -48,9 +51,6 @@ export function getBindingExecutionView(binding) {
|
|
|
48
51
|
export function getBindingAdapterKind(binding) {
|
|
49
52
|
return getBindingExecutionView(binding).adapterKind;
|
|
50
53
|
}
|
|
51
|
-
export function getBindingAdapterConfig(binding) {
|
|
52
|
-
return getBindingExecutionView(binding).adapterConfig;
|
|
53
|
-
}
|
|
54
54
|
export function getBindingLangChainParams(binding) {
|
|
55
55
|
return getBindingExecutionView(binding).langchainParams;
|
|
56
56
|
}
|
|
@@ -263,16 +263,6 @@ export function compileBinding(workspaceRoot, agent, agents, referencedSubagentI
|
|
|
263
263
|
: path.join(workspaceRoot, "run-data");
|
|
264
264
|
const base = {
|
|
265
265
|
agent,
|
|
266
|
-
adapter: {
|
|
267
|
-
kind: agent.executionMode,
|
|
268
|
-
config: agent.executionMode === "deepagent"
|
|
269
|
-
? {
|
|
270
|
-
deepAgent: true,
|
|
271
|
-
}
|
|
272
|
-
: {
|
|
273
|
-
langchainV1: true,
|
|
274
|
-
},
|
|
275
|
-
},
|
|
276
266
|
harnessRuntime: {
|
|
277
267
|
runRoot,
|
|
278
268
|
workspaceRoot,
|
|
@@ -310,12 +300,6 @@ export function compileBinding(workspaceRoot, agent, agents, referencedSubagentI
|
|
|
310
300
|
};
|
|
311
301
|
return {
|
|
312
302
|
...base,
|
|
313
|
-
adapter: {
|
|
314
|
-
kind: "langchain-v1",
|
|
315
|
-
config: {
|
|
316
|
-
params: langchainAgentParams,
|
|
317
|
-
},
|
|
318
|
-
},
|
|
319
303
|
langchainAgentParams,
|
|
320
304
|
};
|
|
321
305
|
}
|
|
@@ -337,12 +321,6 @@ export function compileBinding(workspaceRoot, agent, agents, referencedSubagentI
|
|
|
337
321
|
};
|
|
338
322
|
return {
|
|
339
323
|
...base,
|
|
340
|
-
adapter: {
|
|
341
|
-
kind: "deepagent",
|
|
342
|
-
config: {
|
|
343
|
-
params: deepAgentParams,
|
|
344
|
-
},
|
|
345
|
-
},
|
|
346
324
|
deepAgentParams,
|
|
347
325
|
};
|
|
348
326
|
}
|