@rivet-dev/agentos 0.0.0-integrate-dylib-into-main.815fcda → 0.0.0-main.2f99c77

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/actor.d.ts DELETED
@@ -1,52 +0,0 @@
1
- /**
2
- * Rust-backed `agentOs(...)` definition.
3
- *
4
- * Produces an `ActorDefinition` whose `nativeFactoryBuilder` constructs a
5
- * native-actor-plugin factory through `runtime.createNativePluginFactory(...)`
6
- * (NAPI → `dlopen` of the agent-os actor plugin cdylib, the inverse of the
7
- * generic host loader). All lifecycle, state, and action dispatch live in the
8
- * Rust plugin (`crates/agentos-actor-plugin`). This JS shim only validates
9
- * configuration, resolves the plugin + sidecar binaries, and hands the opaque
10
- * config envelope across the bridge — it owns no agent-os runtime logic.
11
- */
12
- import { type ActorDefinition, type DatabaseProvider, type RawAccess } from "rivetkit";
13
- import { type AgentOsActorConfig, type AgentOsActorConfigInput } from "./config.js";
14
- import type { AgentOsActorState, AgentOsActorVars } from "./types.js";
15
- /**
16
- * A native `host_dir` mount of a host `node_modules` directory at
17
- * `/root/node_modules`, the serializable form `agentOs({ options: { mounts } })`
18
- * accepts across the NAPI boundary.
19
- */
20
- export interface NodeModulesMountConfig {
21
- path: "/root/node_modules";
22
- plugin: {
23
- id: "host_dir";
24
- config: {
25
- hostPath: string;
26
- readOnly: boolean;
27
- };
28
- };
29
- readOnly: boolean;
30
- }
31
- /**
32
- * Mount a host `node_modules` directory into the VM at `/root/node_modules`.
33
- *
34
- * This is the explicit, mount-based replacement for the removed `moduleAccessCwd`
35
- * mechanism: the VM module resolver reads the mounted tree through the kernel
36
- * VFS, so the caller supplies exactly the `node_modules` directory whose
37
- * packages should resolve in the guest.
38
- *
39
- * @param hostNodeModulesDir Absolute host path to a `node_modules` directory.
40
- * @param opts.readOnly Defaults to `true`; the mount is read-only.
41
- */
42
- export declare function nodeModulesMount(hostNodeModulesDir: string, opts?: {
43
- readOnly?: boolean;
44
- }): NodeModulesMountConfig;
45
- export declare function buildConfigJson<TConnParams>(parsed: AgentOsActorConfig<TConnParams>): string;
46
- /**
47
- * Type alias for the `agentOs(...)` return type. Events are not typed at the
48
- * TS surface because the Rust plugin owns the broadcast set and the
49
- * test/client surface uses `any` for actions.
50
- */
51
- export type AgentOsActorDefinition<TConnParams> = ActorDefinition<AgentOsActorState, TConnParams, undefined, AgentOsActorVars, undefined, DatabaseProvider<RawAccess>, Record<never, never>, Record<never, never>, any>;
52
- export declare function agentOs<TConnParams = undefined>(config: AgentOsActorConfigInput<TConnParams>): AgentOsActorDefinition<TConnParams>;
package/dist/actor.js DELETED
@@ -1,252 +0,0 @@
1
- /**
2
- * Rust-backed `agentOs(...)` definition.
3
- *
4
- * Produces an `ActorDefinition` whose `nativeFactoryBuilder` constructs a
5
- * native-actor-plugin factory through `runtime.createNativePluginFactory(...)`
6
- * (NAPI → `dlopen` of the agent-os actor plugin cdylib, the inverse of the
7
- * generic host loader). All lifecycle, state, and action dispatch live in the
8
- * Rust plugin (`crates/agentos-actor-plugin`). This JS shim only validates
9
- * configuration, resolves the plugin + sidecar binaries, and hands the opaque
10
- * config envelope across the bridge — it owns no agent-os runtime logic.
11
- */
12
- import { sep } from "node:path";
13
- import common from "@agentos-software/common";
14
- import { getSidecarPath } from "@rivet-dev/agentos-sidecar";
15
- import { actor, } from "rivetkit";
16
- import { agentOsActorConfigSchema, } from "./config.js";
17
- import { getPluginPath } from "./plugin-binary.js";
18
- /**
19
- * Mount a host `node_modules` directory into the VM at `/root/node_modules`.
20
- *
21
- * This is the explicit, mount-based replacement for the removed `moduleAccessCwd`
22
- * mechanism: the VM module resolver reads the mounted tree through the kernel
23
- * VFS, so the caller supplies exactly the `node_modules` directory whose
24
- * packages should resolve in the guest.
25
- *
26
- * @param hostNodeModulesDir Absolute host path to a `node_modules` directory.
27
- * @param opts.readOnly Defaults to `true`; the mount is read-only.
28
- */
29
- export function nodeModulesMount(hostNodeModulesDir, opts) {
30
- const readOnly = opts?.readOnly ?? true;
31
- return {
32
- path: "/root/node_modules",
33
- plugin: {
34
- id: "host_dir",
35
- config: { hostPath: hostNodeModulesDir, readOnly },
36
- },
37
- readOnly,
38
- };
39
- }
40
- /**
41
- * Derive the `node_modules` root that contains an installed package directory.
42
- * For an agent descriptor whose `packageDir` is `<root>/node_modules/@scope/pkg`,
43
- * this returns `<root>/node_modules` — the hoist root that also holds the agent's
44
- * `requires` (the ACP adapter + agent SDK) and their transitive deps under a
45
- * flat (npm) install. Returns `undefined` when `packageDir` is not inside a
46
- * `node_modules` tree (e.g. a linked monorepo checkout), where the caller must
47
- * supply an explicit `nodeModulesMount(...)`.
48
- */
49
- function nodeModulesRootOf(packageDir) {
50
- const parts = packageDir.split(sep);
51
- const idx = parts.lastIndexOf("node_modules");
52
- if (idx === -1)
53
- return undefined;
54
- return parts.slice(0, idx + 1).join(sep);
55
- }
56
- /**
57
- * Agents run their ACP adapter + SDK inside the VM from `/root/node_modules`.
58
- * Rather than make the caller hand-write `nodeModulesMount(...)`, auto-derive a
59
- * read-only `host_dir` mount of the `node_modules` root that holds the agent
60
- * packages (`requires`) from each agent descriptor's installed `packageDir`.
61
- *
62
- * An explicit `/root/node_modules` mount in `options.mounts` always wins. If
63
- * agents resolve to more than one distinct `node_modules` root the derivation is
64
- * ambiguous and the caller must mount explicitly.
65
- */
66
- function withAutoAgentNodeModulesMount(mounts, descriptors) {
67
- if (mounts?.some((mount) => mount.path === "/root/node_modules")) {
68
- return mounts;
69
- }
70
- const roots = new Set();
71
- for (const d of descriptors) {
72
- if (!d.agent || typeof d.packageDir !== "string")
73
- continue;
74
- const root = nodeModulesRootOf(d.packageDir);
75
- if (root)
76
- roots.add(root);
77
- }
78
- if (roots.size === 0)
79
- return mounts;
80
- if (roots.size > 1) {
81
- throw new Error("agentOs() could not auto-mount agent node_modules: agents resolved to " +
82
- `multiple node_modules roots (${[...roots].join(", ")}). Pass an ` +
83
- "explicit nodeModulesMount(...) in options.mounts.");
84
- }
85
- const [hostNodeModulesDir] = [...roots];
86
- return [...(mounts ?? []), nodeModulesMount(hostNodeModulesDir)];
87
- }
88
- /**
89
- * Stable identity for a software descriptor, used to de-duplicate the
90
- * auto-injected default bundle against software the caller passed explicitly.
91
- * Resolved `commandDir`/`packageDir` paths are the most reliable key; `name`
92
- * is the fallback for descriptors without a directory.
93
- */
94
- function softwareIdentity(d) {
95
- if (typeof d.commandDir === "string")
96
- return `dir:${d.commandDir}`;
97
- if (typeof d.packageDir === "string")
98
- return `dir:${d.packageDir}`;
99
- const name = d.name;
100
- if (typeof name === "string")
101
- return `name:${name}`;
102
- return JSON.stringify(d);
103
- }
104
- function flattenSoftware(input, out) {
105
- if (input == null)
106
- return;
107
- if (Array.isArray(input)) {
108
- for (const item of input)
109
- flattenSoftware(item, out);
110
- return;
111
- }
112
- if (typeof input === "object")
113
- out.push(input);
114
- }
115
- export function buildConfigJson(parsed) {
116
- const descriptors = [];
117
- flattenSoftware(parsed.options?.software, descriptors);
118
- // Auto-include the default software bundle (`@agentos-software/common`: `sh` +
119
- // coreutils + the standard CLI tools agents rely on) unless the caller opted
120
- // out with `defaultSoftware: false`. Anything already listed in `software`
121
- // (e.g. an explicit `common`) is not duplicated. Prepended so the baseline
122
- // tools come first, matching the previous explicit `[common, ...]` ordering.
123
- const defaultSoftwareEnabled = parsed.options?.defaultSoftware !== false;
124
- if (defaultSoftwareEnabled) {
125
- const defaults = [];
126
- flattenSoftware(common, defaults);
127
- const seen = new Set(descriptors.map(softwareIdentity));
128
- const toPrepend = defaults.filter((d) => !seen.has(softwareIdentity(d)));
129
- descriptors.unshift(...toPrepend);
130
- }
131
- const software = [];
132
- for (const d of descriptors) {
133
- if (typeof d.commandDir === "string") {
134
- // Wasm command directory (kind defaults to WasmCommands on the Rust side).
135
- software.push({ package: d.commandDir });
136
- }
137
- else if (typeof d.packageDir === "string") {
138
- // Agent SDK / host-tool package: forwarded but not mounted as commands.
139
- // `kind` matches the kebab-case serde tags of the Rust `SoftwareKind`
140
- // enum (`wasm-commands` / `agent` / `tool`).
141
- software.push({
142
- package: d.packageDir,
143
- kind: d.hostTool || d.toolkit ? "tool" : "agent",
144
- });
145
- }
146
- }
147
- // `/root/node_modules` (agent ACP adapter + SDK + transitive dep resolution)
148
- // is auto-derived from the agent descriptors so the standard quickstart needs
149
- // no manual `nodeModulesMount(...)`: see `withAutoAgentNodeModulesMount`. An
150
- // explicit `/root/node_modules` mount in `options.mounts` always wins. The VM
151
- // module resolver reads the mounted tree through the kernel VFS.
152
- const options = (parsed.options ?? {});
153
- const mounts = withAutoAgentNodeModulesMount(serializeNativeMounts(options.mounts), descriptors);
154
- const sidecar = serializeSidecar(options.sidecar);
155
- return JSON.stringify({
156
- software,
157
- additionalInstructions: options.additionalInstructions,
158
- loopbackExemptPorts: options.loopbackExemptPorts,
159
- allowedNodeBuiltins: options.allowedNodeBuiltins,
160
- permissions: options.permissions,
161
- rootFilesystem: options.rootFilesystem,
162
- mounts,
163
- limits: options.limits,
164
- sidecar,
165
- });
166
- }
167
- function serializeNativeMounts(input) {
168
- if (input == null)
169
- return undefined;
170
- if (!Array.isArray(input)) {
171
- throw new Error("agentOs() options.mounts must be an array");
172
- }
173
- return input.map((mount, index) => {
174
- if (!mount || typeof mount !== "object") {
175
- throw new Error(`agentOs() options.mounts[${index}] must be an object`);
176
- }
177
- const record = mount;
178
- if (record.driver !== undefined) {
179
- throw new Error("agentOs() only supports Native mounts across the NAPI boundary; Plain mounts with driver callbacks are not serializable");
180
- }
181
- if (record.filesystem !== undefined) {
182
- throw new Error("agentOs() only supports Native mounts across the NAPI boundary; Overlay mounts are not serializable");
183
- }
184
- const plugin = record.plugin;
185
- if (typeof record.path !== "string" ||
186
- !plugin ||
187
- typeof plugin !== "object" ||
188
- typeof plugin.id !== "string") {
189
- throw new Error(`agentOs() options.mounts[${index}] must be a Native mount with { path, plugin: { id, config? } }`);
190
- }
191
- return {
192
- path: record.path,
193
- plugin: {
194
- id: plugin.id,
195
- config: plugin.config,
196
- },
197
- readOnly: typeof record.readOnly === "boolean" ? record.readOnly : undefined,
198
- };
199
- });
200
- }
201
- function serializeSidecar(input) {
202
- if (input == null)
203
- return undefined;
204
- if (!input || typeof input !== "object") {
205
- throw new Error("agentOs() options.sidecar must be an object");
206
- }
207
- const record = input;
208
- if (record.kind === "explicit" || record.handle !== undefined) {
209
- throw new Error("agentOs() only supports sidecar shared pool configuration across the NAPI boundary; explicit sidecar handles are not serializable");
210
- }
211
- if (record.kind !== undefined && record.kind !== "shared") {
212
- throw new Error('agentOs() options.sidecar.kind must be "shared"');
213
- }
214
- return typeof record.pool === "string" ? { pool: record.pool } : {};
215
- }
216
- function buildNativeFactoryBuilder(parsed) {
217
- return (runtime) => {
218
- if (runtime.kind !== "napi") {
219
- throw new Error(`agentOs() is only supported on the native NAPI runtime (current runtime kind: ${runtime.kind})`);
220
- }
221
- if (!runtime.createNativePluginFactory) {
222
- throw new Error("runtime.createNativePluginFactory is not implemented on the active CoreRuntime");
223
- }
224
- const options = {
225
- // Resolve the prebuilt agent-os actor plugin cdylib; RivetKit `dlopen`s
226
- // it through the generic native-plugin ABI.
227
- pluginPath: getPluginPath(),
228
- // Opaque config envelope the plugin parses (config.rs::AgentOsConfigJson).
229
- configJson: buildConfigJson(parsed),
230
- // Resolve the prebuilt sidecar binary from the npm package so the plugin
231
- // spawns the bundled binary rather than relying on `agentos-sidecar`
232
- // being on PATH.
233
- sidecarPath: getSidecarPath(),
234
- };
235
- return runtime.createNativePluginFactory(options);
236
- };
237
- }
238
- export function agentOs(config) {
239
- const parsed = agentOsActorConfigSchema.parse(config);
240
- // Construct a minimal definition through the existing actor() helper, then
241
- // attach the Rust factory builder marker. The actions block stays empty
242
- // because no JS-side action ever runs: the engine driver branches on
243
- // `nativeFactoryBuilder` before reaching the JS dispatch path.
244
- const actorOptions = parsed
245
- .actorOptions;
246
- const definition = actor({
247
- actions: {},
248
- ...(actorOptions ? { options: actorOptions } : {}),
249
- });
250
- definition.nativeFactoryBuilder = buildNativeFactoryBuilder(parsed);
251
- return definition;
252
- }
package/dist/config.d.ts DELETED
@@ -1,23 +0,0 @@
1
- import type { AgentOsOptions, JsonRpcNotification, PermissionRequest } from "@rivet-dev/agentos-core";
2
- import type { ActorContext, BeforeConnectContext } from "rivetkit";
3
- import { z } from "zod/v4";
4
- import type { AgentOsActorState, AgentOsActorVars } from "./types.js";
5
- export declare const agentOsActorConfigSchema: z.ZodObject<{
6
- options: z.ZodOptional<z.ZodCustom<AgentOsOptions, AgentOsOptions>>;
7
- preview: z.ZodPrefault<z.ZodObject<{
8
- defaultExpiresInSeconds: z.ZodDefault<z.ZodNumber>;
9
- maxExpiresInSeconds: z.ZodDefault<z.ZodNumber>;
10
- }, z.core.$strict>>;
11
- onBeforeConnect: z.ZodOptional<z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>;
12
- onSessionEvent: z.ZodOptional<z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>;
13
- onPermissionRequest: z.ZodOptional<z.ZodCustom<(...args: unknown[]) => unknown, (...args: unknown[]) => unknown>>;
14
- }, z.core.$strict>;
15
- type AgentOsActorContext<TConnParams> = ActorContext<AgentOsActorState, TConnParams, undefined, AgentOsActorVars, undefined, any>;
16
- interface AgentOsActorConfigCallbacks<TConnParams> {
17
- onBeforeConnect?: (c: BeforeConnectContext<AgentOsActorState, AgentOsActorVars, undefined, any>, params: TConnParams) => void | Promise<void>;
18
- onSessionEvent?: (c: AgentOsActorContext<TConnParams>, sessionId: string, event: JsonRpcNotification) => void | Promise<void>;
19
- onPermissionRequest?: (c: AgentOsActorContext<TConnParams>, sessionId: string, request: PermissionRequest) => void | Promise<void>;
20
- }
21
- export type AgentOsActorConfig<TConnParams = undefined> = Omit<z.infer<typeof agentOsActorConfigSchema>, "onBeforeConnect" | "onSessionEvent" | "onPermissionRequest"> & AgentOsActorConfigCallbacks<TConnParams>;
22
- export type AgentOsActorConfigInput<TConnParams = undefined> = Omit<z.input<typeof agentOsActorConfigSchema>, "onBeforeConnect" | "onSessionEvent" | "onPermissionRequest"> & AgentOsActorConfigCallbacks<TConnParams>;
23
- export {};
package/dist/config.js DELETED
@@ -1,18 +0,0 @@
1
- import { z } from "zod/v4";
2
- const zFunction = () => z.custom((val) => typeof val === "function");
3
- const AgentOsOptionsSchema = z.custom((val) => typeof val === "object" && val !== null);
4
- export const agentOsActorConfigSchema = z
5
- .object({
6
- options: AgentOsOptionsSchema.optional(),
7
- preview: z
8
- .object({
9
- defaultExpiresInSeconds: z.number().positive().default(3600),
10
- maxExpiresInSeconds: z.number().positive().default(86400),
11
- })
12
- .strict()
13
- .prefault(() => ({})),
14
- onBeforeConnect: zFunction().optional(),
15
- onSessionEvent: zFunction().optional(),
16
- onPermissionRequest: zFunction().optional(),
17
- })
18
- .strict();
@@ -1,5 +0,0 @@
1
- /**
2
- * Resolve the absolute path to the agent-os actor plugin cdylib. RivetKit
3
- * `dlopen`s this path through the generic native-plugin ABI.
4
- */
5
- export declare function getPluginPath(): string;
@@ -1,84 +0,0 @@
1
- // Platform-specific resolver for the prebuilt agent-os actor plugin cdylib
2
- // (`libagentos_actor_plugin.{so,dylib,dll}`). Mirrors the sidecar-binary
3
- // resolver (`@rivet-dev/agentos-sidecar`): the library ships inside one of the
4
- // `@rivet-dev/agentos-plugin-<platform>` packages, declared as
5
- // optionalDependencies so npm installs only the one matching the current
6
- // `os`/`cpu`/`libc` at install time (spec phase 6).
7
- //
8
- // Resolution priority:
9
- // 1. `AGENTOS_PLUGIN_BIN` env var (absolute path override).
10
- // 2. A cargo build output under the repo `target/{release,debug}/` (dev).
11
- // 3. The platform-specific `@rivet-dev/agentos-plugin-<platform>` package.
12
- import { existsSync } from "node:fs";
13
- import { createRequire } from "node:module";
14
- import { dirname, join } from "node:path";
15
- import { fileURLToPath } from "node:url";
16
- const PLUGIN_BIN_ENV = "AGENTOS_PLUGIN_BIN";
17
- /** The cdylib filename for the current platform. */
18
- function libraryName() {
19
- switch (process.platform) {
20
- case "darwin":
21
- return "libagentos_actor_plugin.dylib";
22
- case "win32":
23
- return "agentos_actor_plugin.dll";
24
- default:
25
- return "libagentos_actor_plugin.so";
26
- }
27
- }
28
- function getPlatformPackageName() {
29
- const { platform, arch } = process;
30
- switch (platform) {
31
- case "linux":
32
- if (arch === "x64")
33
- return "@rivet-dev/agentos-plugin-linux-x64-gnu";
34
- if (arch === "arm64")
35
- return "@rivet-dev/agentos-plugin-linux-arm64-gnu";
36
- break;
37
- default:
38
- break;
39
- }
40
- return null;
41
- }
42
- /**
43
- * Resolve the absolute path to the agent-os actor plugin cdylib. RivetKit
44
- * `dlopen`s this path through the generic native-plugin ABI.
45
- */
46
- export function getPluginPath() {
47
- const override = process.env[PLUGIN_BIN_ENV];
48
- if (override) {
49
- if (!existsSync(override)) {
50
- throw new Error(`${PLUGIN_BIN_ENV} is set to ${override} but the file does not exist`);
51
- }
52
- return override;
53
- }
54
- const lib = libraryName();
55
- // Dev: a cargo build output under the repo `target/`. `import.meta.url` is
56
- // `packages/agentos/dist/plugin-binary.js`, so the repo root is three levels up.
57
- const here = dirname(fileURLToPath(import.meta.url));
58
- for (const profile of ["release", "debug"]) {
59
- const candidate = join(here, "..", "..", "..", "target", profile, lib);
60
- if (existsSync(candidate)) {
61
- return candidate;
62
- }
63
- }
64
- // Prod: the platform-specific package.
65
- const platformPkg = getPlatformPackageName();
66
- if (!platformPkg) {
67
- throw new Error(`@rivet-dev/agentos: unsupported platform ${process.platform}/${process.arch}. ` +
68
- "The Agent OS actor plugin currently supports linux x64 and arm64. " +
69
- `Set ${PLUGIN_BIN_ENV} to a local cdylib to override.`);
70
- }
71
- const require = createRequire(import.meta.url);
72
- let pkgJsonPath;
73
- try {
74
- pkgJsonPath = require.resolve(`${platformPkg}/package.json`);
75
- }
76
- catch {
77
- throw new Error(`@rivet-dev/agentos: platform package ${platformPkg} is not installed.\n` +
78
- "This usually means the platform is unsupported or optionalDependencies\n" +
79
- `were skipped during install. Try: npm install --include=optional ${platformPkg}\n` +
80
- `Or set ${PLUGIN_BIN_ENV} to a local cdylib, or build it with\n` +
81
- "`cargo build -p agentos-actor-plugin`.");
82
- }
83
- return join(dirname(pkgJsonPath), lib);
84
- }
package/dist/types.d.ts DELETED
@@ -1,102 +0,0 @@
1
- import type { AgentCapabilities, AgentInfo, AgentOs, CronEvent, JsonRpcNotification, JsonRpcResponse, PermissionRequest } from "@rivet-dev/agentos-core";
2
- import type { ActionContext } from "rivetkit";
3
- export type AgentOsActorState = {};
4
- export interface AgentOsActorVars {
5
- agentOs: AgentOs | null;
6
- activeSessionIds: Set<string>;
7
- activeProcesses: Set<number>;
8
- activeHooks: Set<Promise<void>>;
9
- activeShells: Set<string>;
10
- sessions: Set<string>;
11
- }
12
- export interface SessionEventPayload {
13
- sessionId: string;
14
- event: JsonRpcNotification;
15
- }
16
- export interface PermissionRequestPayload {
17
- sessionId: string;
18
- request: PermissionRequest;
19
- }
20
- export type VmBootedPayload = Record<string, never>;
21
- export interface VmShutdownPayload {
22
- reason: "sleep" | "destroy" | "error";
23
- }
24
- export interface ProcessOutputPayload {
25
- pid: number;
26
- stream: "stdout" | "stderr";
27
- data: Uint8Array;
28
- }
29
- export interface ProcessExitPayload {
30
- pid: number;
31
- exitCode: number;
32
- }
33
- export interface ShellDataPayload {
34
- shellId: string;
35
- data: Uint8Array;
36
- }
37
- export interface CronEventPayload {
38
- event: CronEvent;
39
- }
40
- export interface AgentOsEvents {
41
- sessionEvent: SessionEventPayload;
42
- permissionRequest: PermissionRequestPayload;
43
- vmBooted: VmBootedPayload;
44
- vmShutdown: VmShutdownPayload;
45
- processOutput: ProcessOutputPayload;
46
- processExit: ProcessExitPayload;
47
- shellData: ShellDataPayload;
48
- cronEvent: CronEventPayload;
49
- }
50
- /** Result from sendPrompt. */
51
- export interface PromptResult {
52
- /** Raw JSON-RPC response from the ACP adapter. */
53
- response: JsonRpcResponse;
54
- /** Accumulated agent text output from streamed message chunks. */
55
- text: string;
56
- }
57
- export interface SessionRecord {
58
- sessionId: string;
59
- agentType: string;
60
- capabilities: AgentCapabilities;
61
- agentInfo: AgentInfo | null;
62
- }
63
- export interface PersistedSessionRecord {
64
- sessionId: string;
65
- agentType: string;
66
- capabilities: AgentCapabilities;
67
- agentInfo: AgentInfo | null;
68
- createdAt: number;
69
- }
70
- export interface PersistedSessionEvent {
71
- sessionId: string;
72
- seq: number;
73
- event: JsonRpcNotification;
74
- createdAt: number;
75
- }
76
- export type SerializableCronAction = {
77
- type: "session";
78
- agentType: string;
79
- prompt: string;
80
- cwd?: string;
81
- } | {
82
- type: "exec";
83
- command: string;
84
- args?: string[];
85
- };
86
- export interface SerializableCronJobOptions {
87
- id?: string;
88
- schedule: string;
89
- action: SerializableCronAction;
90
- overlap?: "allow" | "skip" | "queue";
91
- }
92
- export interface SerializableCronJobInfo {
93
- id: string;
94
- schedule: string;
95
- action: SerializableCronAction;
96
- overlap: "allow" | "skip" | "queue";
97
- lastRun?: string;
98
- nextRun?: string;
99
- runCount: number;
100
- running: boolean;
101
- }
102
- export type AgentOsActionContext<TConnParams = undefined> = ActionContext<AgentOsActorState, TConnParams, undefined, AgentOsActorVars, undefined, any>;
package/dist/types.js DELETED
@@ -1 +0,0 @@
1
- export {};