@botbotgo/agent-harness 0.0.47 → 0.0.48
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 +1 -1
- package/dist/package-version.d.ts +1 -1
- package/dist/package-version.js +1 -1
- package/dist/workspace/object-loader.js +5 -44
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -521,7 +521,7 @@ spec:
|
|
|
521
521
|
systemPrompt: Coordinate the request.
|
|
522
522
|
```
|
|
523
523
|
|
|
524
|
-
|
|
524
|
+
Only `kind: Agent` is supported for agent objects. Select the concrete backend with `spec.execution.backend`.
|
|
525
525
|
|
|
526
526
|
Common client-configurable agent fields:
|
|
527
527
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AGENT_HARNESS_VERSION = "0.0.
|
|
1
|
+
export declare const AGENT_HARNESS_VERSION = "0.0.47";
|
package/dist/package-version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const AGENT_HARNESS_VERSION = "0.0.
|
|
1
|
+
export const AGENT_HARNESS_VERSION = "0.0.47";
|
|
@@ -93,10 +93,6 @@ function normalizeKind(kind) {
|
|
|
93
93
|
switch (kind) {
|
|
94
94
|
case "Agent":
|
|
95
95
|
return "agent";
|
|
96
|
-
case "LangChainAgent":
|
|
97
|
-
return "langchain-agent";
|
|
98
|
-
case "DeepAgent":
|
|
99
|
-
return "deepagent";
|
|
100
96
|
case "FileStore":
|
|
101
97
|
return "file-store";
|
|
102
98
|
case "InMemoryStore":
|
|
@@ -138,6 +134,9 @@ function normalizeKind(kind) {
|
|
|
138
134
|
}
|
|
139
135
|
}
|
|
140
136
|
export function normalizeYamlItem(item) {
|
|
137
|
+
if (item.kind === "DeepAgent" || item.kind === "LangChainAgent") {
|
|
138
|
+
throw new Error(`YAML object kind ${String(item.kind)} is no longer supported; use kind: Agent with spec.execution.backend instead`);
|
|
139
|
+
}
|
|
141
140
|
const metadata = asObject(item.metadata);
|
|
142
141
|
const spec = asObject(item.spec);
|
|
143
142
|
const kind = typeof item.kind === "string" ? normalizeKind(item.kind) : undefined;
|
|
@@ -161,20 +160,6 @@ export function normalizeYamlItem(item) {
|
|
|
161
160
|
...(kind ? { kind } : {}),
|
|
162
161
|
};
|
|
163
162
|
}
|
|
164
|
-
function normalizeResourceItem(item) {
|
|
165
|
-
if ("metadata" in item || "spec" in item || "path" in item || typeof item.name !== "string") {
|
|
166
|
-
return item;
|
|
167
|
-
}
|
|
168
|
-
const { name, description, kind, ...spec } = item;
|
|
169
|
-
return {
|
|
170
|
-
...(typeof kind === "string" ? { kind } : {}),
|
|
171
|
-
metadata: {
|
|
172
|
-
name,
|
|
173
|
-
...(typeof description === "string" ? { description } : {}),
|
|
174
|
-
},
|
|
175
|
-
spec,
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
163
|
function readRefArray(items) {
|
|
179
164
|
return toArray(items)
|
|
180
165
|
.map((item) => typeof item === "string"
|
|
@@ -323,32 +308,8 @@ async function objectItemsFromDocument(document, sourcePath) {
|
|
|
323
308
|
if (catalogItems.length > 0) {
|
|
324
309
|
return catalogItems;
|
|
325
310
|
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
const records = [];
|
|
329
|
-
for (const item of items) {
|
|
330
|
-
if (typeof item !== "object" || !item) {
|
|
331
|
-
continue;
|
|
332
|
-
}
|
|
333
|
-
const typedItem = item;
|
|
334
|
-
if (typeof typedItem.path === "string" && typedItem.path.trim()) {
|
|
335
|
-
const referencedPath = path.isAbsolute(typedItem.path)
|
|
336
|
-
? typedItem.path
|
|
337
|
-
: path.join(path.dirname(sourcePath), typedItem.path);
|
|
338
|
-
if (existsSync(referencedPath) && statSync(referencedPath).isDirectory()) {
|
|
339
|
-
const discoveredItems = await readYamlItems(referencedPath, undefined, { recursive: true });
|
|
340
|
-
records.push(...discoveredItems.map(({ item }) => item));
|
|
341
|
-
continue;
|
|
342
|
-
}
|
|
343
|
-
const parsedDocuments = parseAllDocuments(await readYamlOrJson(referencedPath));
|
|
344
|
-
for (const parsedDocument of parsedDocuments) {
|
|
345
|
-
records.push(...(await objectItemsFromDocument(parsedDocument.toJSON(), referencedPath)));
|
|
346
|
-
}
|
|
347
|
-
continue;
|
|
348
|
-
}
|
|
349
|
-
records.push(normalizeResourceItem(typedItem));
|
|
350
|
-
}
|
|
351
|
-
return records;
|
|
311
|
+
if ("items" in document) {
|
|
312
|
+
throw new Error(`YAML document ${sourcePath} uses unsupported legacy items wrapper; use kind/spec catalog documents or metadata/spec objects instead`);
|
|
352
313
|
}
|
|
353
314
|
return [document];
|
|
354
315
|
}
|