@botbotgo/agent-harness 0.0.45 → 0.0.47
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/README.md +323 -29
- package/dist/api.d.ts +1 -0
- package/dist/api.js +3 -0
- package/dist/config/workspace.yaml +20 -18
- package/dist/contracts/types.d.ts +4 -2
- package/dist/extensions.js +3 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/package-version.d.ts +1 -1
- package/dist/package-version.js +1 -1
- package/dist/persistence/file-store.d.ts +14 -1
- package/dist/persistence/file-store.js +54 -0
- package/dist/resource/resource-impl.d.ts +1 -0
- package/dist/runtime/harness.d.ts +6 -0
- package/dist/runtime/harness.js +298 -112
- package/dist/runtime/thread-memory-sync.js +2 -0
- package/dist/tool-modules.d.ts +1 -0
- package/dist/tool-modules.js +11 -0
- package/dist/tools.d.ts +2 -0
- package/dist/workspace/object-loader.js +1 -0
- package/dist/workspace/resource-compilers.js +1 -0
- package/dist/workspace/support/workspace-ref-utils.d.ts +1 -1
- package/dist/workspace/support/workspace-ref-utils.js +1 -1
- package/dist/workspace/tool-hydration.js +1 -0
- package/package.json +1 -1
package/dist/tool-modules.js
CHANGED
|
@@ -76,6 +76,7 @@ function loadToolObjectDefinition(imported, exportName) {
|
|
|
76
76
|
invoke: definition.invoke,
|
|
77
77
|
schema: normalizeToolSchema(definition.schema),
|
|
78
78
|
description: definition.description.trim(),
|
|
79
|
+
retryable: definition.retryable === true,
|
|
79
80
|
};
|
|
80
81
|
}
|
|
81
82
|
export function isSupportedToolModulePath(filePath) {
|
|
@@ -113,6 +114,11 @@ export function discoverToolModuleDefinitions(sourceText, imported) {
|
|
|
113
114
|
invoke: invoke,
|
|
114
115
|
schema,
|
|
115
116
|
description: readToolDescription(imported, implementationName, schema),
|
|
117
|
+
retryable: typeof imported[`${implementationName}Retryable`] === "boolean"
|
|
118
|
+
? imported[`${implementationName}Retryable`] === true
|
|
119
|
+
: typeof imported.retryable === "boolean"
|
|
120
|
+
? imported.retryable === true
|
|
121
|
+
: undefined,
|
|
116
122
|
});
|
|
117
123
|
}
|
|
118
124
|
return discovered;
|
|
@@ -139,5 +145,10 @@ export function loadToolModuleDefinition(imported, implementationName) {
|
|
|
139
145
|
invoke: invoke,
|
|
140
146
|
schema,
|
|
141
147
|
description: readToolDescription(imported, implementationName, schema),
|
|
148
|
+
retryable: typeof imported[`${implementationName}Retryable`] === "boolean"
|
|
149
|
+
? imported[`${implementationName}Retryable`] === true
|
|
150
|
+
: typeof imported.retryable === "boolean"
|
|
151
|
+
? imported.retryable === true
|
|
152
|
+
: undefined,
|
|
142
153
|
};
|
|
143
154
|
}
|
package/dist/tools.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export type ToolDefinitionObject = {
|
|
|
5
5
|
name?: string;
|
|
6
6
|
description: string;
|
|
7
7
|
schema: SchemaInput;
|
|
8
|
+
retryable?: boolean;
|
|
8
9
|
invoke: (input: unknown, context?: Record<string, unknown>) => Promise<unknown> | unknown;
|
|
9
10
|
[TOOL_DEFINITION_MARKER]: true;
|
|
10
11
|
};
|
|
@@ -15,6 +16,7 @@ export declare function tool(definition: {
|
|
|
15
16
|
name?: string;
|
|
16
17
|
description: string;
|
|
17
18
|
schema: SchemaInput;
|
|
19
|
+
retryable?: boolean;
|
|
18
20
|
invoke: (input: unknown, context?: Record<string, unknown>) => Promise<unknown> | unknown;
|
|
19
21
|
}): ToolDefinitionObject;
|
|
20
22
|
export {};
|
|
@@ -566,6 +566,7 @@ export async function readToolModuleItems(root) {
|
|
|
566
566
|
name: definition.implementationName,
|
|
567
567
|
description: definition.description,
|
|
568
568
|
implementationName: definition.implementationName,
|
|
569
|
+
...(definition.retryable !== undefined ? { retryable: definition.retryable } : {}),
|
|
569
570
|
},
|
|
570
571
|
sourcePath: filePath,
|
|
571
572
|
});
|
|
@@ -22,7 +22,7 @@ export type RecoveryConfig = {
|
|
|
22
22
|
maxRecoveryAttempts: number;
|
|
23
23
|
};
|
|
24
24
|
export type ConcurrencyConfig = {
|
|
25
|
-
maxConcurrentRuns
|
|
25
|
+
maxConcurrentRuns: number;
|
|
26
26
|
};
|
|
27
27
|
export declare function getWorkspaceObject(refs: Map<string, WorkspaceObject | ParsedAgentObject>, ref: string | undefined): WorkspaceObject | undefined;
|
|
28
28
|
export declare function getRuntimeDefaults(refs: Map<string, WorkspaceObject | ParsedAgentObject>): Record<string, unknown> | undefined;
|
|
@@ -62,7 +62,7 @@ export function getConcurrencyConfig(refs) {
|
|
|
62
62
|
Number.isFinite(concurrency.maxConcurrentRuns) &&
|
|
63
63
|
concurrency.maxConcurrentRuns > 0
|
|
64
64
|
? Math.floor(concurrency.maxConcurrentRuns)
|
|
65
|
-
:
|
|
65
|
+
: 3;
|
|
66
66
|
return { maxConcurrentRuns };
|
|
67
67
|
}
|
|
68
68
|
export function getRoutingSystemPrompt(refs) {
|
|
@@ -105,6 +105,7 @@ export async function hydrateResourceAndExternalTools(tools, toolSourceRefs, wor
|
|
|
105
105
|
backendOperation: existing?.backendOperation ?? resourceTool.backendOperation,
|
|
106
106
|
bundleRefs: existing?.bundleRefs ?? [],
|
|
107
107
|
hitl: existing?.hitl ?? resourceTool.hitl,
|
|
108
|
+
retryable: existing?.retryable ?? resourceTool.retryable,
|
|
108
109
|
sourcePath: existing?.sourcePath ?? resourceTool.toolPath,
|
|
109
110
|
});
|
|
110
111
|
}
|