-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathindex.ts
More file actions
53 lines (50 loc) · 1.71 KB
/
index.ts
File metadata and controls
53 lines (50 loc) · 1.71 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
* Permission tier for WASM command execution.
* Mirrors the PermissionTier from @rivet-dev/agent-os-posix.
*
* - full: spawn processes, network I/O, file read/write
* - read-write: file read/write, no network or process spawning
* - read-only: file read-only, no writes, no spawn, no network
* - isolated: restricted to cwd subtree reads only
*/
export type PermissionTier = "full" | "read-write" | "read-only" | "isolated";
/**
* Descriptor for a single command within a WASM command package.
*/
export interface WasmCommandEntry {
/** Command name as invoked (e.g., "grep", "egrep"). */
name: string;
/** Default permission tier for this command. */
permissionTier: PermissionTier;
/** If set, this command is an alias for another command in the same package. */
aliasOf?: string;
}
/**
* Descriptor for a WASM command package.
* Each @rivet-dev/agent-os-* package exports a default value satisfying this type.
*/
export interface WasmCommandPackage {
/** Package name without scope (e.g., "coreutils", "grep"). */
name: string;
/** Apt/Debian equivalent package name. */
aptName: string;
/** Human-readable description. */
description: string;
/** Build source: "rust", "c", or "go". */
source: "rust" | "c" | "go";
/** Commands provided by this package. */
commands: WasmCommandEntry[];
/** Absolute path to the directory containing WASM command binaries. */
readonly commandDir: string;
}
/**
* Descriptor for a meta-package that aggregates other WASM command packages.
*/
export interface WasmMetaPackage {
/** Package name without scope. */
name: string;
/** Human-readable description. */
description: string;
/** Package names (without scope) included in this meta-package. */
includes: string[];
}