agent-neckbeard 1.1.27 → 1.1.29
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/CHANGELOG.md +16 -0
- package/README.md +53 -461
- package/dist/build.cjs +5715 -0
- package/dist/build.d.cts +80 -0
- package/dist/build.d.ts +80 -0
- package/dist/build.js +17 -0
- package/dist/chunk-BPXEIXPM.js +4363 -0
- package/dist/chunk-FSBTLBB5.js +346 -0
- package/dist/chunk-KG6SJM74.js +97 -0
- package/dist/chunk-YFG4EKZM.js +508 -0
- package/dist/cli.cjs +5761 -0
- package/dist/cli.d.cts +1 -0
- package/dist/cli.d.ts +1 -0
- package/dist/cli.js +75 -0
- package/dist/index.cjs +1599 -146
- package/dist/index.d.cts +321 -6
- package/dist/index.d.ts +321 -6
- package/dist/index.js +36 -3397
- package/dist/{invoke-client-YKWOTQWG.js → invoke-client-P2CPBYTF.js} +2 -41
- package/dist/serve-Du2NCz9_.d.cts +111 -0
- package/dist/serve-Du2NCz9_.d.ts +111 -0
- package/dist/serve.cjs +467 -0
- package/dist/serve.d.cts +1 -0
- package/dist/serve.d.ts +1 -0
- package/dist/serve.js +8 -0
- package/docs/AGENT.md +205 -0
- package/docs/DAYTONA.md +56 -0
- package/docs/DOCKER.md +7 -7
- package/docs/E2B.md +11 -0
- package/docs/LEGACY.md +335 -0
- package/docs/MODAL.md +14 -12
- package/docs/SUPERVISOR.md +2 -2
- package/package.json +43 -3
- package/dist/chunk-6GCQOKYI.js +0 -48
package/dist/cli.d.cts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
package/dist/cli.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
package/dist/cli.js
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import {
|
|
3
|
+
buildAgent,
|
|
4
|
+
pushAgent
|
|
5
|
+
} from "./chunk-FSBTLBB5.js";
|
|
6
|
+
import "./chunk-BPXEIXPM.js";
|
|
7
|
+
import "./chunk-6P5I7ZCH.js";
|
|
8
|
+
import "./chunk-YFG4EKZM.js";
|
|
9
|
+
import "./chunk-KG6SJM74.js";
|
|
10
|
+
import "./chunk-33IXN6MM.js";
|
|
11
|
+
|
|
12
|
+
// src/cli.ts
|
|
13
|
+
var USAGE = [
|
|
14
|
+
"Usage:",
|
|
15
|
+
" neckbeard build <module> [--export <name>] [--out <dir>]",
|
|
16
|
+
" neckbeard push <module> [--export <name>] [--tag <tag>]... [--cache] [--dry-run]"
|
|
17
|
+
].join("\n");
|
|
18
|
+
function parse(args, valueOptions, flagOptions) {
|
|
19
|
+
let module;
|
|
20
|
+
const values = /* @__PURE__ */ new Map();
|
|
21
|
+
const flags = /* @__PURE__ */ new Set();
|
|
22
|
+
for (let index = 0; index < args.length; index++) {
|
|
23
|
+
const arg = args[index];
|
|
24
|
+
if (valueOptions.includes(arg)) {
|
|
25
|
+
const value = args[++index];
|
|
26
|
+
if (!value) throw new Error(`${arg} needs a value.
|
|
27
|
+
${USAGE}`);
|
|
28
|
+
values.set(arg, [...values.get(arg) ?? [], value]);
|
|
29
|
+
} else if (flagOptions.includes(arg)) {
|
|
30
|
+
flags.add(arg);
|
|
31
|
+
} else if (!arg.startsWith("-") && !module) {
|
|
32
|
+
module = arg;
|
|
33
|
+
} else {
|
|
34
|
+
throw new Error(`Unknown argument ${arg}.
|
|
35
|
+
${USAGE}`);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
if (!module) throw new Error(USAGE);
|
|
39
|
+
return { module, values, flags };
|
|
40
|
+
}
|
|
41
|
+
async function main([command, ...args]) {
|
|
42
|
+
if (command === "build") {
|
|
43
|
+
const { module, values } = parse(args, ["--export", "--out"], []);
|
|
44
|
+
const exportName = values.get("--export")?.[0];
|
|
45
|
+
const outDir = values.get("--out")?.[0];
|
|
46
|
+
const result = await buildAgent({ module, ...exportName ? { exportName } : {}, ...outDir ? { outDir } : {} });
|
|
47
|
+
console.log(
|
|
48
|
+
`Built ${result.agent.name} in ${result.outDir} with ${JSON.stringify(result.dependencies)}; skills: ${[
|
|
49
|
+
...result.skills.own.map((name) => `${name} (skills/)`),
|
|
50
|
+
...result.skills.locked.map((name) => `${name} (skills-lock.json)`)
|
|
51
|
+
].join(", ")}`
|
|
52
|
+
);
|
|
53
|
+
return;
|
|
54
|
+
}
|
|
55
|
+
if (command === "push") {
|
|
56
|
+
const { module, values, flags } = parse(args, ["--export", "--tag"], ["--cache", "--dry-run"]);
|
|
57
|
+
const exportName = values.get("--export")?.[0];
|
|
58
|
+
const result = await pushAgent({
|
|
59
|
+
module,
|
|
60
|
+
...exportName ? { exportName } : {},
|
|
61
|
+
tags: values.get("--tag") ?? [],
|
|
62
|
+
cache: flags.has("--cache"),
|
|
63
|
+
dryRun: flags.has("--dry-run"),
|
|
64
|
+
onLog: (line) => console.log(line)
|
|
65
|
+
});
|
|
66
|
+
const ready = result.artifacts.length ? `; ${result.artifacts.join(", ")} ready, deleted ${JSON.stringify(result.deleted)}` : "";
|
|
67
|
+
console.log(`${flags.has("--dry-run") ? "Built" : "Pushed"} ${result.images.join(", ")}${ready}`);
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
throw new Error(USAGE);
|
|
71
|
+
}
|
|
72
|
+
main(process.argv.slice(2)).catch((error) => {
|
|
73
|
+
console.error(error instanceof Error ? error.message : error);
|
|
74
|
+
process.exit(1);
|
|
75
|
+
});
|