@tealbrick/avm 0.1.0

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.
@@ -0,0 +1,46 @@
1
+ import { fileURLToPath as __eveFileURLToPath } from "node:url";
2
+ import { dirname as __eveDirname } from "node:path";
3
+ import { createRequire as __eveCreateRequire } from "node:module";
4
+ const __filename = __eveFileURLToPath(import.meta.url);
5
+ __eveDirname(__filename);
6
+ __eveCreateRequire(import.meta.url);
7
+ import { t as extension_default } from "../../_chunks/extension-CS1otfhf.mjs";
8
+ import { n as SshTransport, t as AvmClient } from "../../_chunks/src-BhUiVsTW.mjs";
9
+ import { z } from "zod";
10
+ import { defineDynamic, defineTool } from "eve/tools";
11
+ const id = z.string().regex(/^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$/);
12
+ var action_default = defineDynamic({ events: { "session.started": () => {
13
+ const policy = extension_default.config.policy;
14
+ if (!policy.lifecycle.length && !policy.spawns.length && !policy.commands.length && !policy.administration.length) return null;
15
+ return defineTool({
16
+ description: "Perform only operator-configured exact AVMM worker or named administration actions. Destroy irreversibly deletes its worker disk. Never retry a timeout without reconciling host state. Arguments and grants are fixed by trusted configuration.",
17
+ inputSchema: z.discriminatedUnion("operation", [
18
+ z.object({
19
+ operation: z.literal("configured"),
20
+ action: id.describe(`Approved administration action names: ${policy.administration.map((g) => g.name).join(", ") || "none"}`)
21
+ }),
22
+ z.object({
23
+ operation: z.enum([
24
+ "spawn",
25
+ "start",
26
+ "stop",
27
+ "promote",
28
+ "destroy"
29
+ ]),
30
+ worker: id
31
+ }),
32
+ z.object({
33
+ operation: z.literal("exec"),
34
+ worker: id,
35
+ command: id
36
+ })
37
+ ]),
38
+ async execute(request, ctx) {
39
+ return new AvmClient(new SshTransport(extension_default.config), {
40
+ policy: extension_default.config.policy,
41
+ timeoutMs: extension_default.config.timeoutMs
42
+ }).request(request, { signal: ctx.abortSignal });
43
+ }
44
+ });
45
+ } } });
46
+ export { action_default as default };
@@ -0,0 +1,50 @@
1
+ declare const _default: import("eve/tools").ToolDefinition<{
2
+ operation: "resident" | "inventory" | "monitor" | "bundles" | "doctor" | "workers" | "poolStatus" | "poolPressure" | "poolQueue" | "poolPolicy" | "workspaces" | "users";
3
+ } | {
4
+ operation: "capabilities" | "owner" | "workerStatus" | "shares";
5
+ worker: string;
6
+ } | {
7
+ operation: "runs";
8
+ limit?: number | undefined;
9
+ } | {
10
+ operation: "events";
11
+ limit?: number | undefined;
12
+ worker?: string | undefined;
13
+ event?: string | undefined;
14
+ runId?: string | undefined;
15
+ } | {
16
+ operation: "runStatus";
17
+ runId: string;
18
+ } | {
19
+ operation: "workspace" | "user";
20
+ id: string;
21
+ } | {
22
+ operation: "ingress";
23
+ worker?: string | undefined;
24
+ }, import("../../src/index.js").Json> & {
25
+ execute(input: {
26
+ operation: "resident" | "inventory" | "monitor" | "bundles" | "doctor" | "workers" | "poolStatus" | "poolPressure" | "poolQueue" | "poolPolicy" | "workspaces" | "users";
27
+ } | {
28
+ operation: "capabilities" | "owner" | "workerStatus" | "shares";
29
+ worker: string;
30
+ } | {
31
+ operation: "runs";
32
+ limit?: number | undefined;
33
+ } | {
34
+ operation: "events";
35
+ limit?: number | undefined;
36
+ worker?: string | undefined;
37
+ event?: string | undefined;
38
+ runId?: string | undefined;
39
+ } | {
40
+ operation: "runStatus";
41
+ runId: string;
42
+ } | {
43
+ operation: "workspace" | "user";
44
+ id: string;
45
+ } | {
46
+ operation: "ingress";
47
+ worker?: string | undefined;
48
+ }, ctx: import("eve/tools").ToolContext): Promise<import("../../src/index.js").Json>;
49
+ };
50
+ export default _default;
@@ -0,0 +1,66 @@
1
+ import { fileURLToPath as __eveFileURLToPath } from "node:url";
2
+ import { dirname as __eveDirname } from "node:path";
3
+ import { createRequire as __eveCreateRequire } from "node:module";
4
+ const __filename = __eveFileURLToPath(import.meta.url);
5
+ __eveDirname(__filename);
6
+ __eveCreateRequire(import.meta.url);
7
+ import { t as extension_default } from "../../_chunks/extension-CS1otfhf.mjs";
8
+ import { n as SshTransport, t as AvmClient } from "../../_chunks/src-BhUiVsTW.mjs";
9
+ import { z } from "zod";
10
+ import { defineTool } from "eve/tools";
11
+ const id = z.string().regex(/^[A-Za-z0-9][A-Za-z0-9_.-]{0,127}$/);
12
+ var inspect_default = defineTool({
13
+ description: "Inspect host-owned AgentVM infrastructure metadata over configured SSH. Read operations only; no trusted-runtime wake, credentials, miniapps or execution.",
14
+ inputSchema: z.discriminatedUnion("operation", [
15
+ z.object({ operation: z.enum([
16
+ "doctor",
17
+ "inventory",
18
+ "workers",
19
+ "bundles",
20
+ "monitor",
21
+ "poolStatus",
22
+ "poolPressure",
23
+ "poolQueue",
24
+ "poolPolicy",
25
+ "workspaces",
26
+ "users",
27
+ "resident"
28
+ ]) }),
29
+ z.object({
30
+ operation: z.enum([
31
+ "workerStatus",
32
+ "capabilities",
33
+ "owner",
34
+ "shares"
35
+ ]),
36
+ worker: id
37
+ }),
38
+ z.object({
39
+ operation: z.literal("runs"),
40
+ limit: z.number().int().min(1).max(200).optional()
41
+ }),
42
+ z.object({
43
+ operation: z.literal("events"),
44
+ limit: z.number().int().min(1).max(200).optional(),
45
+ worker: id.optional(),
46
+ event: id.optional(),
47
+ runId: id.optional()
48
+ }),
49
+ z.object({
50
+ operation: z.literal("runStatus"),
51
+ runId: id
52
+ }),
53
+ z.object({
54
+ operation: z.enum(["workspace", "user"]),
55
+ id: z.string().regex(/^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$/)
56
+ }),
57
+ z.object({
58
+ operation: z.literal("ingress"),
59
+ worker: id.optional()
60
+ })
61
+ ]),
62
+ async execute(request, ctx) {
63
+ return new AvmClient(new SshTransport(extension_default.config), { timeoutMs: extension_default.config.timeoutMs }).request(request, { signal: ctx.abortSignal });
64
+ }
65
+ });
66
+ export { inspect_default as default };
@@ -0,0 +1,4 @@
1
+ // Generated by eve. Do not edit by hand.
2
+
3
+ export { default } from "./extension/extension.js";
4
+ export { default as avm } from "./extension/extension.js";
package/dist/index.mjs ADDED
@@ -0,0 +1,8 @@
1
+ import { fileURLToPath as __eveFileURLToPath } from "node:url";
2
+ import { dirname as __eveDirname } from "node:path";
3
+ import { createRequire as __eveCreateRequire } from "node:module";
4
+ const __filename = __eveFileURLToPath(import.meta.url);
5
+ __eveDirname(__filename);
6
+ __eveCreateRequire(import.meta.url);
7
+ import { t as extension_default } from "./_chunks/extension-CS1otfhf.mjs";
8
+ export { extension_default as avm, extension_default as default };
@@ -0,0 +1,4 @@
1
+ // Generated by eve. Do not edit by hand.
2
+
3
+ export { default as action } from "../extension/tools/action.js";
4
+ export { default as inspect } from "../extension/tools/inspect.js";
@@ -0,0 +1,9 @@
1
+ import { fileURLToPath as __eveFileURLToPath } from "node:url";
2
+ import { dirname as __eveDirname } from "node:path";
3
+ import { createRequire as __eveCreateRequire } from "node:module";
4
+ const __filename = __eveFileURLToPath(import.meta.url);
5
+ __eveDirname(__filename);
6
+ __eveCreateRequire(import.meta.url);
7
+ import action_default from "../extension/tools/action.mjs";
8
+ import inspect_default from "../extension/tools/inspect.mjs";
9
+ export { action_default as action, inspect_default as inspect };
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "@tealbrick/avm",
3
+ "version": "0.1.0",
4
+ "description": "Typed host-owned AgentVM transport and opt-in Eve capabilities",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "files": [
8
+ "dist",
9
+ "README.md",
10
+ "PROVENANCE.md",
11
+ "LICENSE"
12
+ ],
13
+ "engines": {
14
+ "node": ">=24"
15
+ },
16
+ "exports": {
17
+ "./client": {
18
+ "types": "./dist/client/index.d.ts",
19
+ "default": "./dist/client/index.js"
20
+ },
21
+ ".": {
22
+ "types": "./dist/index.d.ts",
23
+ "default": "./dist/index.mjs"
24
+ },
25
+ "./tools": {
26
+ "types": "./dist/tools/index.d.ts",
27
+ "default": "./dist/tools/index.mjs"
28
+ },
29
+ "./eve": {
30
+ "types": "./dist/index.d.ts",
31
+ "default": "./dist/index.mjs"
32
+ }
33
+ },
34
+ "eve": {
35
+ "extension": {
36
+ "source": "./extension",
37
+ "dist": "./dist/extension"
38
+ }
39
+ },
40
+ "scripts": {
41
+ "build": "eve extension build && tsc -p tsconfig.client.json",
42
+ "test": "node --experimental-test-module-mocks --test test/*.test.mjs",
43
+ "typecheck": "tsc --noEmit"
44
+ },
45
+ "dependencies": {
46
+ "zod": "^4.0.0"
47
+ },
48
+ "devDependencies": {
49
+ "eve": "0.55.0",
50
+ "typescript": "^5.9.3",
51
+ "@types/node": "^24.0.0"
52
+ },
53
+ "peerDependencies": {
54
+ "eve": ">=0.55.0 <0.56.0"
55
+ },
56
+ "peerDependenciesMeta": {
57
+ "eve": {
58
+ "optional": true
59
+ }
60
+ },
61
+ "publishConfig": {
62
+ "access": "public",
63
+ "registry": "https://registry.npmjs.org"
64
+ },
65
+ "repository": {
66
+ "type": "git",
67
+ "url": "git+https://github.com/Doppelabs/tealbrick-packages.git",
68
+ "directory": "packages/avm"
69
+ }
70
+ }