agent-neckbeard 1.1.26 → 1.1.28
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 +18 -0
- package/README.md +53 -459
- package/dist/build.cjs +5560 -0
- package/dist/build.d.cts +80 -0
- package/dist/build.d.ts +80 -0
- package/dist/build.js +17 -0
- package/dist/chunk-JF5YPOBY.js +4339 -0
- package/dist/chunk-KG6SJM74.js +97 -0
- package/dist/chunk-M3FISP7J.js +377 -0
- package/dist/chunk-M7XNBKG4.js +346 -0
- package/dist/cli.cjs +5606 -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 +1572 -149
- package/dist/index.d.cts +338 -6
- package/dist/index.d.ts +338 -6
- package/dist/index.js +36 -3272
- package/dist/{invoke-client-YKWOTQWG.js → invoke-client-P2CPBYTF.js} +2 -41
- package/dist/serve-Dan1HQKN.d.cts +89 -0
- package/dist/serve-Dan1HQKN.d.ts +89 -0
- package/dist/serve.cjs +337 -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 +173 -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 +29 -13
- package/docs/SUPERVISOR.md +2 -2
- package/package.json +43 -3
- package/dist/chunk-6GCQOKYI.js +0 -48
package/dist/build.d.cts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { DefinedAgent } from './index.cjs';
|
|
2
|
+
import 'node:buffer';
|
|
3
|
+
import './sandbox-capabilities-CFjnZ_kB.cjs';
|
|
4
|
+
import './serve-Dan1HQKN.cjs';
|
|
5
|
+
|
|
6
|
+
interface PushAgentOptions {
|
|
7
|
+
/** The module that defines the agent with `defineAgent()`, relative to `cwd`. */
|
|
8
|
+
module: string;
|
|
9
|
+
/** Which export is the agent; defaults to the default export, or the module's only agent. */
|
|
10
|
+
exportName?: string;
|
|
11
|
+
/** The agent's package directory. Defaults to the current directory. */
|
|
12
|
+
cwd?: string;
|
|
13
|
+
/** Tags to push; the first is the one prepared. Defaults to the tag `resolveImageTag()` finds. */
|
|
14
|
+
tags?: string[];
|
|
15
|
+
/** Reuses and updates layers cached in the registry under the image's `buildcache` tag; needs buildx. */
|
|
16
|
+
cache?: boolean;
|
|
17
|
+
/** Builds the image without pushing or preparing it, as for a pull request. */
|
|
18
|
+
dryRun?: boolean;
|
|
19
|
+
/** The Docker-compatible command to build and push with. Defaults to `docker`. */
|
|
20
|
+
docker?: string;
|
|
21
|
+
onLog?: (line: string) => void;
|
|
22
|
+
}
|
|
23
|
+
interface PushAgentResult {
|
|
24
|
+
/** The image references built, the first of which was prepared. */
|
|
25
|
+
images: string[];
|
|
26
|
+
/** The Daytona snapshots or E2B templates built, one for each image; none on Modal or in a dry run. */
|
|
27
|
+
artifacts: string[];
|
|
28
|
+
/** Older snapshots or templates of this agent that were deleted. */
|
|
29
|
+
deleted: string[];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Builds the agent's image from the context `neckbeard build` writes and its Dockerfile, pushes
|
|
33
|
+
* it, then creates its Daytona snapshot or E2B template and deletes all but the newest three
|
|
34
|
+
* older ones, so no sandbox start waits on a build. Modal pulls the image itself.
|
|
35
|
+
*/
|
|
36
|
+
declare function pushAgent(options: PushAgentOptions): Promise<PushAgentResult>;
|
|
37
|
+
|
|
38
|
+
interface BuildAgentOptions {
|
|
39
|
+
/** The module that defines the agent with `defineAgent()`, relative to `cwd`. */
|
|
40
|
+
module: string;
|
|
41
|
+
/** Which export is the agent; defaults to the default export, or the module's only agent. */
|
|
42
|
+
exportName?: string;
|
|
43
|
+
/** The agent's package directory. Defaults to the current directory. */
|
|
44
|
+
cwd?: string;
|
|
45
|
+
/** Output directory, relative to `cwd`. Defaults to `dist-sandbox`. */
|
|
46
|
+
outDir?: string;
|
|
47
|
+
/** Receives the skills CLI's output. */
|
|
48
|
+
onLog?: (line: string) => void;
|
|
49
|
+
}
|
|
50
|
+
interface BuildAgentResult {
|
|
51
|
+
/** The agent the module defines. */
|
|
52
|
+
agent: DefinedAgent<unknown>;
|
|
53
|
+
outDir: string;
|
|
54
|
+
/** Versions of the packages the image installs. */
|
|
55
|
+
dependencies: Record<string, string>;
|
|
56
|
+
/** Installed skill names: the package's own, then the locked ones. */
|
|
57
|
+
skills: {
|
|
58
|
+
own: string[];
|
|
59
|
+
locked: string[];
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
/** The skills CLI release whose frozen restore fetches commit SHAs and verifies hashes. */
|
|
63
|
+
declare const SKILLS_CLI_VERSION = "1.8.1";
|
|
64
|
+
/**
|
|
65
|
+
* Bundles the agent into `agent.mjs`, whose entry point serves it, with a `package.json` pinning
|
|
66
|
+
* the external packages to the versions installed beside the agent, and installs its skills into
|
|
67
|
+
* `.agents/skills`: the package's own `skills/` and the third-party skills its `skills-lock.json`
|
|
68
|
+
* pins, restored by the skills CLI at their locked commits and verified against the lock.
|
|
69
|
+
*/
|
|
70
|
+
declare function buildAgent(options: BuildAgentOptions): Promise<BuildAgentResult>;
|
|
71
|
+
/**
|
|
72
|
+
* Imports the module that defines an agent, bundled with its packages left external so a
|
|
73
|
+
* TypeScript module loads without a loader, and returns the agent and its export's name.
|
|
74
|
+
*/
|
|
75
|
+
declare function loadAgent(module: string, exportName?: string): Promise<{
|
|
76
|
+
agent: DefinedAgent<unknown>;
|
|
77
|
+
exportName: string;
|
|
78
|
+
}>;
|
|
79
|
+
|
|
80
|
+
export { type BuildAgentOptions, type BuildAgentResult, type PushAgentOptions, type PushAgentResult, SKILLS_CLI_VERSION, buildAgent, loadAgent, pushAgent };
|
package/dist/build.d.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { DefinedAgent } from './index.js';
|
|
2
|
+
import 'node:buffer';
|
|
3
|
+
import './sandbox-capabilities-CFjnZ_kB.js';
|
|
4
|
+
import './serve-Dan1HQKN.js';
|
|
5
|
+
|
|
6
|
+
interface PushAgentOptions {
|
|
7
|
+
/** The module that defines the agent with `defineAgent()`, relative to `cwd`. */
|
|
8
|
+
module: string;
|
|
9
|
+
/** Which export is the agent; defaults to the default export, or the module's only agent. */
|
|
10
|
+
exportName?: string;
|
|
11
|
+
/** The agent's package directory. Defaults to the current directory. */
|
|
12
|
+
cwd?: string;
|
|
13
|
+
/** Tags to push; the first is the one prepared. Defaults to the tag `resolveImageTag()` finds. */
|
|
14
|
+
tags?: string[];
|
|
15
|
+
/** Reuses and updates layers cached in the registry under the image's `buildcache` tag; needs buildx. */
|
|
16
|
+
cache?: boolean;
|
|
17
|
+
/** Builds the image without pushing or preparing it, as for a pull request. */
|
|
18
|
+
dryRun?: boolean;
|
|
19
|
+
/** The Docker-compatible command to build and push with. Defaults to `docker`. */
|
|
20
|
+
docker?: string;
|
|
21
|
+
onLog?: (line: string) => void;
|
|
22
|
+
}
|
|
23
|
+
interface PushAgentResult {
|
|
24
|
+
/** The image references built, the first of which was prepared. */
|
|
25
|
+
images: string[];
|
|
26
|
+
/** The Daytona snapshots or E2B templates built, one for each image; none on Modal or in a dry run. */
|
|
27
|
+
artifacts: string[];
|
|
28
|
+
/** Older snapshots or templates of this agent that were deleted. */
|
|
29
|
+
deleted: string[];
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Builds the agent's image from the context `neckbeard build` writes and its Dockerfile, pushes
|
|
33
|
+
* it, then creates its Daytona snapshot or E2B template and deletes all but the newest three
|
|
34
|
+
* older ones, so no sandbox start waits on a build. Modal pulls the image itself.
|
|
35
|
+
*/
|
|
36
|
+
declare function pushAgent(options: PushAgentOptions): Promise<PushAgentResult>;
|
|
37
|
+
|
|
38
|
+
interface BuildAgentOptions {
|
|
39
|
+
/** The module that defines the agent with `defineAgent()`, relative to `cwd`. */
|
|
40
|
+
module: string;
|
|
41
|
+
/** Which export is the agent; defaults to the default export, or the module's only agent. */
|
|
42
|
+
exportName?: string;
|
|
43
|
+
/** The agent's package directory. Defaults to the current directory. */
|
|
44
|
+
cwd?: string;
|
|
45
|
+
/** Output directory, relative to `cwd`. Defaults to `dist-sandbox`. */
|
|
46
|
+
outDir?: string;
|
|
47
|
+
/** Receives the skills CLI's output. */
|
|
48
|
+
onLog?: (line: string) => void;
|
|
49
|
+
}
|
|
50
|
+
interface BuildAgentResult {
|
|
51
|
+
/** The agent the module defines. */
|
|
52
|
+
agent: DefinedAgent<unknown>;
|
|
53
|
+
outDir: string;
|
|
54
|
+
/** Versions of the packages the image installs. */
|
|
55
|
+
dependencies: Record<string, string>;
|
|
56
|
+
/** Installed skill names: the package's own, then the locked ones. */
|
|
57
|
+
skills: {
|
|
58
|
+
own: string[];
|
|
59
|
+
locked: string[];
|
|
60
|
+
};
|
|
61
|
+
}
|
|
62
|
+
/** The skills CLI release whose frozen restore fetches commit SHAs and verifies hashes. */
|
|
63
|
+
declare const SKILLS_CLI_VERSION = "1.8.1";
|
|
64
|
+
/**
|
|
65
|
+
* Bundles the agent into `agent.mjs`, whose entry point serves it, with a `package.json` pinning
|
|
66
|
+
* the external packages to the versions installed beside the agent, and installs its skills into
|
|
67
|
+
* `.agents/skills`: the package's own `skills/` and the third-party skills its `skills-lock.json`
|
|
68
|
+
* pins, restored by the skills CLI at their locked commits and verified against the lock.
|
|
69
|
+
*/
|
|
70
|
+
declare function buildAgent(options: BuildAgentOptions): Promise<BuildAgentResult>;
|
|
71
|
+
/**
|
|
72
|
+
* Imports the module that defines an agent, bundled with its packages left external so a
|
|
73
|
+
* TypeScript module loads without a loader, and returns the agent and its export's name.
|
|
74
|
+
*/
|
|
75
|
+
declare function loadAgent(module: string, exportName?: string): Promise<{
|
|
76
|
+
agent: DefinedAgent<unknown>;
|
|
77
|
+
exportName: string;
|
|
78
|
+
}>;
|
|
79
|
+
|
|
80
|
+
export { type BuildAgentOptions, type BuildAgentResult, type PushAgentOptions, type PushAgentResult, SKILLS_CLI_VERSION, buildAgent, loadAgent, pushAgent };
|
package/dist/build.js
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {
|
|
2
|
+
SKILLS_CLI_VERSION,
|
|
3
|
+
buildAgent,
|
|
4
|
+
loadAgent,
|
|
5
|
+
pushAgent
|
|
6
|
+
} from "./chunk-M7XNBKG4.js";
|
|
7
|
+
import "./chunk-JF5YPOBY.js";
|
|
8
|
+
import "./chunk-6P5I7ZCH.js";
|
|
9
|
+
import "./chunk-M3FISP7J.js";
|
|
10
|
+
import "./chunk-KG6SJM74.js";
|
|
11
|
+
import "./chunk-33IXN6MM.js";
|
|
12
|
+
export {
|
|
13
|
+
SKILLS_CLI_VERSION,
|
|
14
|
+
buildAgent,
|
|
15
|
+
loadAgent,
|
|
16
|
+
pushAgent
|
|
17
|
+
};
|