@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 CHANGED
@@ -11,5 +11,5 @@ Install the public package instead:
11
11
  pnpm add @rivet-dev/agentos
12
12
  ```
13
13
 
14
- See the [AgentOS documentation](https://agentos-sdk.dev/docs) for supported
14
+ See the [AgentOS documentation](https://rivet.dev/agentos/docs) for supported
15
15
  APIs.
@@ -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 Bindings } from "./bindings.js";
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 binding registration and invocation limits. */
240
- bindings?: {
241
- defaultBindingTimeoutMs?: number;
242
- maxBindingTimeoutMs?: number;
239
+ /** Host function registration and invocation limits. */
240
+ hostFunctions?: {
241
+ defaultTimeoutMs?: number;
242
+ maxTimeoutMs?: number;
243
243
  maxRegisteredCollections?: number;
244
- maxRegisteredBindingsPerVm?: number;
245
- maxBindingsPerCollection?: number;
246
- maxBindingSchemaBytes?: number;
247
- maxExamplesPerBinding?: number;
248
- maxBindingExampleInputBytes?: number;
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 bindings. */
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-side bindings available to agents inside the VM. */
412
- bindings?: Bindings[];
411
+ /** Host functions available to agents inside the VM. */
412
+ hostFunctions?: HostFunctionCollections<HOST_FUNCTIONS>;
413
413
  /**
414
- * Custom permission policy for the kernel. Controls access to filesystem,
415
- * network, child process, and environment operations. Defaults to allowAll.
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 _bindings;
474
- private _bindingReference;
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(options?: AgentOsOptions): Promise<AgentOs>;
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;