@botbotgo/agent-harness 0.0.310 → 0.0.312
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/cli.d.ts
CHANGED
package/dist/cli.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AGENT_HARNESS_VERSION = "0.0.
|
|
1
|
+
export declare const AGENT_HARNESS_VERSION = "0.0.311";
|
package/dist/package-version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const AGENT_HARNESS_VERSION = "0.0.
|
|
1
|
+
export const AGENT_HARNESS_VERSION = "0.0.311";
|
|
@@ -9,7 +9,7 @@ import { executeRequestInvocation } from "./adapter/flow/invocation-flow.js";
|
|
|
9
9
|
import { streamRuntimeExecution } from "./adapter/flow/stream-runtime.js";
|
|
10
10
|
import { applyToolRecoveryInstruction as applyToolRecoveryInstructionHelper, applyStrictToolJsonInstruction as applyStrictToolJsonInstructionHelper, callRuntimeWithToolParseRecovery as callRuntimeWithToolParseRecoveryHelper, createModelFallbackRunnable as createModelFallbackRunnableHelper, invokeWithProviderRetry as invokeWithProviderRetryHelper, iterateWithTimeout as iterateWithTimeoutHelper, materializeModelStream as materializeModelStreamHelper, RuntimeOperationTimeoutError, withRuntimeTimeout, } from "./adapter/runtime-shell.js";
|
|
11
11
|
import { invokeBuiltinTaskTool as invokeBuiltinTaskToolHelper, materializeAutomaticSummarizationMiddleware as materializeAutomaticSummarizationMiddlewareHelper, resolveBuiltinMiddlewareBackend as resolveBuiltinMiddlewareBackendHelper, resolveBuiltinMiddlewareTools as resolveBuiltinMiddlewareToolsHelper, resolveLangChainRuntimeExtensionMiddleware as resolveLangChainRuntimeExtensionMiddlewareHelper, resolveMiddleware as resolveMiddlewareHelper, resolveSubagents as resolveSubagentsHelper, } from "./adapter/middleware-assembly.js";
|
|
12
|
-
import {
|
|
12
|
+
import { resolveBindingTimeout, resolveStreamIdleTimeout, } from "./adapter/resilience.js";
|
|
13
13
|
import { createResolvedModel } from "./adapter/model/model-providers.js";
|
|
14
14
|
import { resolveAdapterTools } from "./adapter/tool-resolution.js";
|
|
15
15
|
import { resolveRuntimeStreamExecutionContext, } from "./adapter/flow/execution-context.js";
|
|
@@ -477,7 +477,7 @@ export class AgentRuntimeAdapter {
|
|
|
477
477
|
createRunnable: () => this.create(binding, { sessionId }),
|
|
478
478
|
withTimeout: (producer, timeoutMs, operation, stage) => this.withTimeout(producer, timeoutMs, operation, stage),
|
|
479
479
|
iterateWithTimeout: (iterable, timeoutMs, operation, deadlineAt, deadlineTimeoutMs) => this.iterateWithTimeout(iterable, timeoutMs, operation, deadlineAt, deadlineTimeoutMs),
|
|
480
|
-
invokeTimeoutMs
|
|
480
|
+
invokeTimeoutMs,
|
|
481
481
|
streamIdleTimeoutMs,
|
|
482
482
|
streamDeadlineAt,
|
|
483
483
|
invoke: (activeBinding, activeInput, activeSessionId, activeRequestId, resumePayload, activeHistory, invokeOptions) => this.invoke(activeBinding, activeInput, activeSessionId, activeRequestId, resumePayload, activeHistory, invokeOptions),
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { readFileSync } from "node:fs";
|
|
1
|
+
import { existsSync, readFileSync } from "node:fs";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
2
3
|
const bundledTextCache = new Map();
|
|
3
4
|
export function readBundledText(relativePath) {
|
|
4
5
|
const normalized = relativePath.replace(/^\.?\//, "");
|
|
@@ -6,10 +7,23 @@ export function readBundledText(relativePath) {
|
|
|
6
7
|
if (cached !== undefined) {
|
|
7
8
|
return cached;
|
|
8
9
|
}
|
|
9
|
-
const
|
|
10
|
+
const resourceUrl = resolveBundledResourceUrl(normalized);
|
|
11
|
+
const value = readFileSync(resourceUrl, "utf8");
|
|
10
12
|
bundledTextCache.set(normalized, value);
|
|
11
13
|
return value;
|
|
12
14
|
}
|
|
15
|
+
function resolveBundledResourceUrl(relativePath) {
|
|
16
|
+
const candidates = [
|
|
17
|
+
new URL(`../resources/${relativePath}`, import.meta.url),
|
|
18
|
+
new URL(`../../resources/${relativePath}`, import.meta.url),
|
|
19
|
+
];
|
|
20
|
+
for (const candidate of candidates) {
|
|
21
|
+
if (existsSync(fileURLToPath(candidate))) {
|
|
22
|
+
return candidate;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return candidates[0];
|
|
26
|
+
}
|
|
13
27
|
export function renderTemplateText(template, values) {
|
|
14
28
|
return template
|
|
15
29
|
.replace(/\{\{([a-zA-Z0-9_]+)\}\}/g, (_match, key) => {
|