@rivet-dev/agentos-core 0.2.20-rc.1 → 0.2.21
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/README.md +1 -1
- package/dist/agent-os.d.ts +21 -20
- package/dist/agent-os.js +155 -201
- package/dist/generated/HostFunctionLimitsConfig.d.ts +10 -0
- package/dist/generated/PermissionsPolicy.d.ts +1 -1
- package/dist/generated/VmLimitsConfig.d.ts +2 -2
- package/dist/host-dir-mount.d.ts +9 -1
- package/dist/host-dir-mount.js +13 -6
- package/dist/index.d.ts +9 -8
- package/dist/index.js +6 -5
- package/dist/language-execution.d.ts +5 -0
- package/dist/options-schema.d.ts +23 -22
- package/dist/options-schema.js +15 -21
- package/dist/runtime-compat.d.ts +6 -6
- package/dist/runtime.d.ts +6 -6
- package/dist/sandbox.d.ts +76 -4
- package/dist/sandbox.js +147 -138
- package/dist/sidecar/permissions.d.ts +5 -1
- package/dist/sidecar/permissions.js +8 -11
- package/dist/sidecar/rpc-client.d.ts +3 -3
- package/dist/sidecar/rpc-client.js +6 -6
- package/dist/types.d.ts +1 -1
- package/package.json +7 -7
- package/dist/bindings-zod.d.ts +0 -7
- package/dist/bindings-zod.js +0 -270
- package/dist/bindings.d.ts +0 -43
- package/dist/bindings.js +0 -34
- package/dist/generated/BindingLimitsConfig.d.ts +0 -10
- /package/dist/generated/{BindingLimitsConfig.js → HostFunctionLimitsConfig.js} +0 -0
package/README.md
CHANGED
package/dist/agent-os.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { NativeMountPluginDescriptor } from "@rivet-dev/agentos-runtime-core/descriptors";
|
|
2
2
|
import type { VmUserConfig } from "@rivet-dev/agentos-runtime-core/vm-config";
|
|
3
|
-
import { type
|
|
3
|
+
import { type HostFunctionCollections, type HostFunctionSchemas } from "@rivet-dev/agentos-runtime-core/host-functions";
|
|
4
4
|
import type { CodeEvaluationResult, CodeExecutionResult, ContextDescriptor, ExecutionSignal, InlineExecutionOptions, JavaScriptEvaluationOptions, JavaScriptExecutionOptions, LanguageExecutionOptions, LanguageSpawnOptions, NpmPackageInstallOptions, NpmProjectInstallOptions, OutputReplay, ProcessDescriptor, ProcessExit, PythonInstallOptions, SpawnOptions, TypeScriptCheckOptions, TypeScriptCheckResult, TypeScriptEvaluationOptions, TypeScriptExecutionOptions, TypeScriptFileExecutionOptions } from "./language-execution.js";
|
|
5
5
|
import type { ConnectTerminalOptions, Kernel, KernelExecOptions, KernelExecResult, OpenShellOptions, Permissions, VirtualFileSystem, VirtualStat } from "./runtime-compat.js";
|
|
6
6
|
import { type AgentOsSandboxInput } from "./sandbox.js";
|
|
@@ -236,16 +236,16 @@ export interface AgentOsLimits {
|
|
|
236
236
|
tls?: {
|
|
237
237
|
maxBufferedBytes?: number;
|
|
238
238
|
};
|
|
239
|
-
/** Host
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
239
|
+
/** Host function registration and invocation limits. */
|
|
240
|
+
hostFunctions?: {
|
|
241
|
+
defaultTimeoutMs?: number;
|
|
242
|
+
maxTimeoutMs?: number;
|
|
243
243
|
maxRegisteredCollections?: number;
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
244
|
+
maxRegisteredFunctionsPerVm?: number;
|
|
245
|
+
maxFunctionsPerCollection?: number;
|
|
246
|
+
maxSchemaBytes?: number;
|
|
247
|
+
maxExamplesPerFunction?: number;
|
|
248
|
+
maxExampleInputBytes?: number;
|
|
249
249
|
};
|
|
250
250
|
/** Mount plugin manifest size limits. */
|
|
251
251
|
plugins?: {
|
|
@@ -367,7 +367,7 @@ export type LimitWarningHandler = (warning: LimitWarning) => void;
|
|
|
367
367
|
* `packages/core/src/options-schema.ts::agentOsOptionsSchema`. The TypeScript
|
|
368
368
|
* Rivet actor accepts this surface directly alongside ordinary actor options.
|
|
369
369
|
*/
|
|
370
|
-
export interface AgentOsOptions {
|
|
370
|
+
export interface AgentOsOptions<HOST_FUNCTIONS extends HostFunctionSchemas = HostFunctionSchemas> {
|
|
371
371
|
/** Initial virtual Linux credentials and account record. Defaults to `1000:1000` (`agentos`). */
|
|
372
372
|
user?: VmUserConfig;
|
|
373
373
|
/**
|
|
@@ -404,15 +404,17 @@ export interface AgentOsOptions {
|
|
|
404
404
|
rootFilesystem?: RootFilesystemConfig;
|
|
405
405
|
/** Filesystems to mount at boot time. */
|
|
406
406
|
mounts?: MountConfig[];
|
|
407
|
-
/** External sandbox mounted into this VM with process
|
|
407
|
+
/** External sandbox mounted into this VM with process hostFunctions. */
|
|
408
408
|
sandbox?: AgentOsSandboxInput;
|
|
409
409
|
/** Custom schedule driver for cron jobs. Defaults to TimerScheduleDriver. */
|
|
410
410
|
scheduleDriver?: ScheduleDriver;
|
|
411
|
-
/** Host
|
|
412
|
-
|
|
411
|
+
/** Host functions available to agents inside the VM. */
|
|
412
|
+
hostFunctions?: HostFunctionCollections<HOST_FUNCTIONS>;
|
|
413
413
|
/**
|
|
414
|
-
*
|
|
415
|
-
*
|
|
414
|
+
* Permission policy for the kernel. By default the guest behaves like a
|
|
415
|
+
* sandboxed machine: its virtual filesystem, processes, environment, listeners,
|
|
416
|
+
* and loopback networking work, while external network access is denied. Your
|
|
417
|
+
* policy is merged over that default, so an omitted scope keeps it.
|
|
416
418
|
*/
|
|
417
419
|
permissions?: Permissions;
|
|
418
420
|
/**
|
|
@@ -470,9 +472,8 @@ export declare class AgentOs {
|
|
|
470
472
|
private _acpTerminalCounter;
|
|
471
473
|
private _softwareRoots;
|
|
472
474
|
private _cronManager;
|
|
473
|
-
private
|
|
474
|
-
private
|
|
475
|
-
private _permissions;
|
|
475
|
+
private _hostFunctions;
|
|
476
|
+
private _hostFunctionReference;
|
|
476
477
|
private _hostMounts;
|
|
477
478
|
private _env;
|
|
478
479
|
private _rootFilesystem;
|
|
@@ -623,7 +624,7 @@ export declare class AgentOs {
|
|
|
623
624
|
private constructor();
|
|
624
625
|
static createSidecar(options?: AgentOsCreateSidecarOptions): Promise<AgentOsSidecar>;
|
|
625
626
|
static getSharedSidecar(options?: AgentOsSharedSidecarOptions): Promise<AgentOsSidecar>;
|
|
626
|
-
static create(
|
|
627
|
+
static create<HOST_FUNCTIONS extends HostFunctionSchemas>(callerOptions?: AgentOsOptions<HOST_FUNCTIONS>): Promise<AgentOs>;
|
|
627
628
|
createContext(contextId: string): Promise<void>;
|
|
628
629
|
private _executionOperation;
|
|
629
630
|
private _spawnLanguageOperation;
|