@botbotgo/agent-harness 0.0.73 → 0.0.75
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/init-project.js
CHANGED
|
@@ -69,12 +69,12 @@ ${providerEnvLine}npm run start -- "Research the latest model serving stack for
|
|
|
69
69
|
|
|
70
70
|
- \`src/run.mjs\`: minimal launcher
|
|
71
71
|
- \`config/\`: workspace runtime and agent topology
|
|
72
|
-
- \`resources/\`: place local tools and skills here as your product grows
|
|
72
|
+
- \`resources/\`: place local \`tool({...})\` tools and skills here as your product grows
|
|
73
73
|
|
|
74
74
|
## Customize
|
|
75
75
|
|
|
76
76
|
- change \`config/models.yaml\` to switch models or providers
|
|
77
|
-
- add local tools under \`resources/tools/\`
|
|
77
|
+
- add local \`tool({...})\` tools under \`resources/tools/\`
|
|
78
78
|
- add product-specific skills under \`resources/skills/\`
|
|
79
79
|
- edit the prompts in \`config/agents/\` to turn this into your own product
|
|
80
80
|
`;
|
|
@@ -270,14 +270,32 @@ function renderRunScript(options) {
|
|
|
270
270
|
import { createAgentHarness, run, stop } from "@botbotgo/agent-harness";
|
|
271
271
|
|
|
272
272
|
const appRoot = fileURLToPath(new URL("..", import.meta.url));
|
|
273
|
-
const
|
|
273
|
+
const args = process.argv.slice(2);
|
|
274
|
+
let requestedAgentId = "research";
|
|
275
|
+
const inputParts = [];
|
|
276
|
+
|
|
277
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
278
|
+
const arg = args[index];
|
|
279
|
+
if (arg === "--agent") {
|
|
280
|
+
const next = args[index + 1]?.trim();
|
|
281
|
+
if (next) {
|
|
282
|
+
requestedAgentId = next;
|
|
283
|
+
index += 1;
|
|
284
|
+
continue;
|
|
285
|
+
}
|
|
286
|
+
throw new Error("Missing value for --agent");
|
|
287
|
+
}
|
|
288
|
+
inputParts.push(arg);
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
const input = inputParts.join(" ").trim() ||
|
|
274
292
|
${JSON.stringify(defaultInput)};
|
|
275
293
|
|
|
276
294
|
const runtime = await createAgentHarness(appRoot);
|
|
277
295
|
|
|
278
296
|
try {
|
|
279
297
|
const result = await run(runtime, {
|
|
280
|
-
agentId:
|
|
298
|
+
agentId: requestedAgentId,
|
|
281
299
|
input,
|
|
282
300
|
});
|
|
283
301
|
process.stdout.write(\`\${result.output}\\n\`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const AGENT_HARNESS_VERSION = "0.0.
|
|
1
|
+
export declare const AGENT_HARNESS_VERSION = "0.0.74";
|
package/dist/package-version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const AGENT_HARNESS_VERSION = "0.0.
|
|
1
|
+
export const AGENT_HARNESS_VERSION = "0.0.74";
|
package/dist/resource/sources.js
CHANGED
|
@@ -67,6 +67,7 @@ async function packAndExtract(packageSpec, cacheKey) {
|
|
|
67
67
|
const root = sourceCacheDir(cacheKey);
|
|
68
68
|
const extractRoot = path.join(root, "extract");
|
|
69
69
|
const packageRoot = path.join(extractRoot, "package");
|
|
70
|
+
const npmCacheRoot = path.join(root, ".npm-cache");
|
|
70
71
|
const tarballMarker = path.join(root, ".tarball-path");
|
|
71
72
|
if (existsSync(path.join(packageRoot, "package.json"))) {
|
|
72
73
|
const tarballPath = existsSync(tarballMarker) ? (await readFile(tarballMarker, "utf8")).trim() : undefined;
|
|
@@ -77,9 +78,14 @@ async function packAndExtract(packageSpec, cacheKey) {
|
|
|
77
78
|
}
|
|
78
79
|
await mkdir(root, { recursive: true });
|
|
79
80
|
await mkdir(extractRoot, { recursive: true });
|
|
81
|
+
await mkdir(npmCacheRoot, { recursive: true });
|
|
80
82
|
const packed = await execFileAsync("npm", ["pack", packageSpec, "--silent"], {
|
|
81
83
|
cwd: root,
|
|
82
84
|
maxBuffer: 1024 * 1024 * 10,
|
|
85
|
+
env: {
|
|
86
|
+
...process.env,
|
|
87
|
+
NPM_CONFIG_CACHE: npmCacheRoot,
|
|
88
|
+
},
|
|
83
89
|
});
|
|
84
90
|
const tarballName = packed.stdout.trim().split(/\r?\n/).filter(Boolean).at(-1);
|
|
85
91
|
if (!tarballName) {
|