@giselles-ai/sandkit 0.1.1 → 0.1.2
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 +46 -6
- package/dist/adapters/drizzle.d.ts +1 -1
- package/dist/adapters/memory.d.ts +1 -1
- package/dist/adapters/sqlite-bun.d.ts +1 -1
- package/dist/chunk-T76VM5D2.js +23 -0
- package/dist/chunk-T76VM5D2.js.map +1 -0
- package/dist/{chunk-HVYCAAZQ.js → chunk-XN6DGLRP.js} +1 -1
- package/dist/chunk-XN6DGLRP.js.map +1 -0
- package/dist/chunk-YGUNJGP7.js +23 -0
- package/dist/chunk-YGUNJGP7.js.map +1 -0
- package/dist/index.d.ts +9 -5
- package/dist/index.js +348 -122
- package/dist/index.js.map +1 -1
- package/dist/integrations/mock.d.ts +2 -2
- package/dist/integrations/mock.js +20 -3
- package/dist/integrations/mock.js.map +1 -1
- package/dist/integrations/vercel.d.ts +2 -2
- package/dist/integrations/vercel.js +40 -10
- package/dist/integrations/vercel.js.map +1 -1
- package/dist/policies/bun.d.ts +9 -0
- package/dist/policies/bun.js +10 -0
- package/dist/policies/bun.js.map +1 -0
- package/dist/policies/npm.d.ts +12 -0
- package/dist/policies/npm.js +10 -0
- package/dist/policies/npm.js.map +1 -0
- package/dist/{types-BRMAvcWc.d.ts → types-DNpj280o.d.ts} +1 -1
- package/dist/{types-B5N9o-ew.d.ts → types-nu3vpBCZ.d.ts} +34 -4
- package/package.json +11 -1
- package/dist/chunk-HVYCAAZQ.js.map +0 -1
package/README.md
CHANGED
|
@@ -11,6 +11,8 @@ It keeps two paths explicit:
|
|
|
11
11
|
|
|
12
12
|
An active session is an exclusive workspace lease. While a live session is open, `runCommand()` is unavailable until you attach to that session or commit it.
|
|
13
13
|
|
|
14
|
+
Durable lock enforcement is currently in-process (`packages/sandkit` only). Concurrent durable commands for the same workspace are excluded while one is in flight in the same process.
|
|
15
|
+
|
|
14
16
|
Provider-specific behavior still matters, but the public API stays centered on workspaces, policies, and durable state.
|
|
15
17
|
|
|
16
18
|
## Problem
|
|
@@ -95,18 +97,43 @@ const result = await workspace.sandbox.runCommand({
|
|
|
95
97
|
console.log(result.stdout.trim());
|
|
96
98
|
```
|
|
97
99
|
|
|
100
|
+
`runCommand(...)` (without `detached`) resolves to `CommandResult` only after the full unit-of-work is complete: process exit, snapshot/commit, and persist.
|
|
101
|
+
|
|
102
|
+
For detached execution, pass `detached: true` and you get a `Command` object. Observe logs and then await durable completion:
|
|
103
|
+
|
|
104
|
+
```ts
|
|
105
|
+
const command = await workspace.sandbox.runCommand({
|
|
106
|
+
command: "sh",
|
|
107
|
+
args: ["-lc", "echo 'start'; sleep 1; echo 'done'"],
|
|
108
|
+
detached: true,
|
|
109
|
+
});
|
|
110
|
+
for await (const chunk of command.logs?.() ?? []) {
|
|
111
|
+
console.log(`${chunk.stream}: ${chunk.chunk}`);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const commandResult = await command.wait();
|
|
115
|
+
```
|
|
116
|
+
|
|
98
117
|
Set `VERCEL_OIDC_TOKEN` for local runs or `VERCEL_ACCESS_TOKEN` in CI before creating a Vercel-backed sandbox.
|
|
99
118
|
|
|
100
119
|
Declare `exposedPorts` on `createWorkspace({ sandbox: ... })` only when you need a live session URL. `defaultTimeout` is the provider-level lease default; override a specific live session with `openSession({ timeoutMs })`.
|
|
101
120
|
|
|
102
121
|
## Setup bootstrap
|
|
103
122
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
123
|
+
`setup` is the shared bootstrap definition, not the materialized artifact.
|
|
124
|
+
It is optional.
|
|
125
|
+
When `setup` is provided, it is the shared bootstrap command, args, and required durable `policy`.
|
|
126
|
+
This produces adapter-scoped shared bootstrap state keyed by `adapter.id` + setup definition fingerprint.
|
|
127
|
+
Multiple Sandkit instances using the same adapter and setup definition can reuse the same shared bootstrap state.
|
|
128
|
+
|
|
129
|
+
`sandkit.bootstrap()` is an optional eager materialization step:
|
|
130
|
+
|
|
131
|
+
- it creates shared bootstrap state if missing,
|
|
132
|
+
- it leaves existing shared bootstrap state untouched,
|
|
133
|
+
- it does not run a restore path to prove an existing shared bootstrap state is still usable.
|
|
134
|
+
|
|
135
|
+
Without `bootstrap()`, shared setup is still materialized lazily on first workspace use (first `runCommand(...)` or `openSession(...)` that needs it).
|
|
136
|
+
Stale or unusable shared bootstrap artifacts are detected and rebuilt in those workspace flows, not by `bootstrap()` alone.
|
|
110
137
|
|
|
111
138
|
`setup` durability is adapter-backed. With a persistent adapter such as Bun SQLite or Drizzle, the shared bootstrap survives process restarts. With the default in-memory adapter, it does not.
|
|
112
139
|
|
|
@@ -123,6 +150,9 @@ const sandkit = createSandkit({
|
|
|
123
150
|
},
|
|
124
151
|
});
|
|
125
152
|
|
|
153
|
+
await sandkit.bootstrap();
|
|
154
|
+
|
|
155
|
+
// Optional: omit bootstrap() and let setup materialize on first workspace use.
|
|
126
156
|
const workspace = await sandkit.createWorkspace({
|
|
127
157
|
name: "bootstrapped-workspace",
|
|
128
158
|
});
|
|
@@ -135,6 +165,8 @@ If you do not pass `database`, Sandkit defaults to the in-memory adapter. That d
|
|
|
135
165
|
|
|
136
166
|
## Policies
|
|
137
167
|
|
|
168
|
+
- `npm()` allows the public npm registry host `registry.npmjs.org`
|
|
169
|
+
- `bun()` allows Bun install/distribution hosts `bun.sh` and `bun.com`
|
|
138
170
|
- `codex()` reads `CODEX_API_KEY`
|
|
139
171
|
- `gemini()` reads `GEMINI_API_KEY`
|
|
140
172
|
- `github()` reads `GITHUB_TOKEN` and maps it through Vercel Sandbox firewall transforms:
|
|
@@ -144,6 +176,14 @@ If you do not pass `database`, Sandkit defaults to the in-memory adapter. That d
|
|
|
144
176
|
- `aiGateway()` reads `AI_GATEWAY_API_KEY` from host env and allows the hostname (plus wildcard) from `AI_GATEWAY_BASE_URL`.
|
|
145
177
|
`AI_GATEWAY_BASE_URL` ports are ignored for allow-listing; only host/domain matches are used.
|
|
146
178
|
|
|
179
|
+
For JavaScript package bootstrap, prefer explicit service presets over `allowAll()`:
|
|
180
|
+
|
|
181
|
+
```ts
|
|
182
|
+
import { allowServices, bun, npm } from "@giselles-ai/sandkit";
|
|
183
|
+
|
|
184
|
+
const policy = allowServices([bun(), npm()]);
|
|
185
|
+
```
|
|
186
|
+
|
|
147
187
|
Durable default policy belongs to the workspace: use `createWorkspace({ policy: ... })` when you create it, or `workspace.setPolicy(...)` later. Pass `policy` to `runCommand(...)` for one-off overrides.
|
|
148
188
|
|
|
149
189
|
## Schema Generation
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Database } from 'bun:sqlite';
|
|
2
|
-
import { a as SandkitAdapter } from '../types-
|
|
2
|
+
import { a as SandkitAdapter } from '../types-DNpj280o.js';
|
|
3
3
|
import '../types-Dpr_BkF9.js';
|
|
4
4
|
|
|
5
5
|
declare function createBunSqliteAdapter(db: Database): SandkitAdapter;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
allowService
|
|
3
|
+
} from "./chunk-NKTNTBOY.js";
|
|
4
|
+
|
|
5
|
+
// src/policies/npm.ts
|
|
6
|
+
var NPM_DOMAINS = ["registry.npmjs.org"];
|
|
7
|
+
function npm() {
|
|
8
|
+
return {
|
|
9
|
+
id: "npm",
|
|
10
|
+
name: "npm",
|
|
11
|
+
description: "Allow outbound access to the public npm package registry.",
|
|
12
|
+
domains: NPM_DOMAINS
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function allowNpm() {
|
|
16
|
+
return allowService(npm());
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
npm,
|
|
21
|
+
allowNpm
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=chunk-T76VM5D2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/policies/npm.ts"],"sourcesContent":["import { allowService } from \"./dsl.ts\";\nimport type { PolicyServiceDescriptor, WorkspacePolicy } from \"./types.ts\";\n\nconst NPM_DOMAINS = [\"registry.npmjs.org\"] as const;\n\n/**\n * Allow outbound access to the public npm package registry.\n *\n * Keep this preset scoped to the actual package source host instead of\n * broadening to unrelated npm web properties.\n */\nexport function npm(): PolicyServiceDescriptor {\n return {\n id: \"npm\",\n name: \"npm\",\n description: \"Allow outbound access to the public npm package registry.\",\n domains: NPM_DOMAINS,\n };\n}\n\nexport function allowNpm(): WorkspacePolicy {\n return allowService(npm());\n}\n"],"mappings":";;;;;AAGA,IAAM,cAAc,CAAC,oBAAoB;AAQlC,SAAS,MAA+B;AAC7C,SAAO;AAAA,IACL,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,IACb,SAAS;AAAA,EACX;AACF;AAEO,SAAS,WAA4B;AAC1C,SAAO,aAAa,IAAI,CAAC;AAC3B;","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/types.ts"],"sourcesContent":["import type { SandkitAdapter, WorkspaceRecord } from \"./adapters/types.ts\";\nimport type {\n PolicySnapshotAdapter,\n PolicySnapshotRecord,\n PolicySnapshotCreateInput,\n RunAdapter,\n RunCreateInput,\n RunFinishInput,\n RunRecord,\n RunStatus,\n SetupStateAdapter,\n SetupStateRecord,\n SetupStatePutInput,\n WorkspaceMetadata,\n SharedSetup,\n SharedSetupState,\n WorkspaceStatus,\n} from \"./adapters/types.ts\";\nimport type { WorkspacePolicy } from \"./policies/types.ts\";\n\nexport type JsonPrimitive = boolean | number | string | null;\n\nexport type JsonValue =\n | JsonPrimitive\n | JsonValue[]\n | {\n [key: string]: JsonValue;\n };\n\nexport type {\n SandkitAdapter,\n WorkspaceRecord,\n RunAdapter,\n RunCreateInput,\n RunFinishInput,\n RunRecord,\n PolicySnapshotAdapter,\n PolicySnapshotRecord,\n PolicySnapshotCreateInput,\n RunStatus,\n SetupStateAdapter,\n SetupStateRecord,\n SetupStatePutInput,\n SharedSetup,\n SharedSetupState,\n};\nexport type { WorkspacePolicy };\n\nexport interface WorkspaceCreateOptions {\n id?: string;\n name?: string;\n metadata?: WorkspaceMetadata;\n policy?: WorkspacePolicy;\n sandbox?: {\n /**\n * Durable workspace default for provider port publication. This affects\n * create/restore behavior for live session/public URL flows, not the\n * durable runCommand() unit-of-work model itself.\n */\n readonly exposedPorts?: readonly number[];\n };\n status?: WorkspaceStatus;\n sandboxId?: string;\n lastResumedAt?: string;\n}\n\nexport interface CommandResult {\n exitCode: number;\n stderr: string;\n stdout: string;\n}\n\nexport interface Command {\n /**\n * Wait for durable completion of the command unit-of-work: process exit,\n * snapshot/commit, and persist outcome.\n */\n readonly wait: () => Promise<CommandResult>;\n /**\n * Ephemeral log stream for detached execution. The stream is live-only and does\n * not participate in durable state replay.\n */\n readonly logs?: () => AsyncIterable<WorkspaceSessionLog>;\n}\n\nexport interface SandboxSessionLease {\n readonly sandboxId: string;\n readonly observedAt: string;\n readonly expiresAt: string;\n}\n\nexport interface WorkspaceSandboxLease {\n readonly sandboxId: string;\n readonly observedAt: string;\n readonly expiresAt: string;\n readonly remainingMs: number;\n}\n\nexport interface WorkspaceSessionProcess {\n readonly processId: string;\n wait(): Promise<CommandResult>;\n /**\n * Accesses the same normalized log stream used by onStdout/onStderr callbacks.\n * Sandkit keeps a single internal stream, so callbacks and logs() observe\n * the same sequence and buffered historical chunks are replayed to new readers.\n */\n logs?: () => AsyncIterable<WorkspaceSessionLog>;\n}\n\nexport interface WorkspaceSessionLog {\n readonly stream: \"stdout\" | \"stderr\";\n readonly chunk: string;\n}\n\nexport interface WorkspaceSessionProcessStartInput {\n readonly command: string;\n readonly args: readonly string[];\n /**\n * Optional per-call policy override for this session process.\n */\n readonly policy?: WorkspacePolicy;\n /**\n * Callbacks consume chunks from Sandkit's normalized process log stream.\n */\n readonly onStdout?: ((chunk: string) => void) | undefined;\n /**\n * Callbacks consume chunks from Sandkit's normalized process log stream.\n */\n readonly onStderr?: ((chunk: string) => void) | undefined;\n}\n\nexport interface WorkspaceSessionRunCommandOptions {\n readonly command: string;\n readonly args?: readonly string[];\n readonly policy?: WorkspacePolicy;\n}\n\ninterface WorkspaceRunCommandBaseOptions {\n readonly command: string;\n readonly args?: readonly string[];\n readonly policy?: WorkspacePolicy;\n /**\n * Ephemeral timeout override for this durable runCommand() invocation.\n * This affects sandbox create/restore lease timing for the run only and\n * must not mutate durable workspace defaults.\n */\n readonly timeoutMs?: number;\n}\n\nexport interface WorkspaceRunCommandOptions extends WorkspaceRunCommandBaseOptions {}\n\nexport interface WorkspaceRunCommandDetachedOptions extends WorkspaceRunCommandBaseOptions {\n readonly detached: true;\n}\n\nexport type SandboxRunCommandOptions =\n | WorkspaceRunCommandOptions\n | WorkspaceRunCommandDetachedOptions;\n\nexport interface PersistedSandboxState {\n readonly kind: string;\n readonly sessionId: string;\n readonly state?: JsonValue;\n}\n\nexport interface SandboxDriver {\n readonly id: string;\n readonly provider: string;\n applyPolicy(policy: WorkspacePolicy): Promise<void>;\n /**\n * Returns lease timing observed from the current sandbox instance.\n * Some providers expose this as an interpreted timeout value.\n * Sandkit persists lease updates only from explicit session open/extend paths,\n * so callers should not treat mere reads as lease refreshes.\n */\n getSessionLease(): Promise<SandboxSessionLease>;\n runCommand(\n command: string,\n args: string[],\n options?: { readonly detached?: boolean },\n ): Promise<Command>;\n startProcess?(input: WorkspaceSessionProcessStartInput): Promise<WorkspaceSessionProcess>;\n /** Persists and restores durability state through commit() and attach/restore APIs. */\n snapshot(): Promise<PersistedSandboxState>;\n url?(port: number): Promise<string>;\n extendTimeout?(durationMs: number): Promise<void>;\n}\n\nexport interface SandboxCreateOptions {\n readonly policy: WorkspacePolicy;\n readonly exposedPorts?: readonly number[];\n readonly timeoutMs?: number;\n}\n\nexport interface SandboxDriverFactory {\n createSandbox(workspace: WorkspaceRecord, options: SandboxCreateOptions): Promise<SandboxDriver>;\n resumeSandbox(\n workspace: WorkspaceRecord,\n snapshot: PersistedSandboxState,\n options: SandboxCreateOptions,\n ): Promise<SandboxDriver>;\n isSessionUnavailableError?(error: unknown): boolean;\n}\n\nexport interface VercelSandboxOptions {\n runtime?: string;\n /**\n * Provider default sandbox lease timeout in milliseconds. Sandkit uses this\n * when creating or restoring a sandbox unless openSession({ timeoutMs })\n * supplies a live-session override.\n */\n defaultTimeout?: number;\n /**\n * Legacy alias retained for compatibility with existing call sites.\n * Prefer defaultTimeout for new code.\n */\n timeout?: number;\n}\n\nconst sandboxProviderContract = Symbol(\"sandkit.sandbox.provider\");\n\ntype SandboxProviderRecord = {\n readonly provider: string;\n readonly driverFactory: SandboxDriverFactory;\n};\n\nexport interface SandkitSandboxProvider {\n readonly [sandboxProviderContract]: SandboxProviderRecord;\n}\n\nexport function createSandboxProvider(\n provider: string,\n driverFactory: SandboxDriverFactory,\n): SandkitSandboxProvider {\n return {\n [sandboxProviderContract]: {\n provider,\n driverFactory,\n },\n };\n}\n\nexport function getSandboxDriverFactory(\n sandboxProvider: SandkitSandboxProvider,\n): SandboxDriverFactory {\n const driverFactory = sandboxProvider[sandboxProviderContract]?.driverFactory;\n if (!driverFactory) {\n throw new Error(\n \"SandkitOptions.sandbox is invalid. Pass a provider created by Sandkit integrations such as vercelSandbox(...).\",\n );\n }\n\n return driverFactory;\n}\n\nexport interface SandkitOptions {\n readonly database?: SandkitAdapter | undefined;\n readonly setup?: SharedSetup | undefined;\n readonly network?: readonly unknown[] | undefined;\n readonly sandbox: SandkitSandboxProvider;\n}\n"],"mappings":";AA2NA,IAAM,0BAA0B,uBAAO,0BAA0B;AAW1D,SAAS,sBACd,UACA,eACwB;AACxB,SAAO;AAAA,IACL,CAAC,uBAAuB,GAAG;AAAA,MACzB;AAAA,MACA;AAAA,IACF;AAAA,EACF;AACF;AAEO,SAAS,wBACd,iBACsB;AACtB,QAAM,gBAAgB,gBAAgB,uBAAuB,GAAG;AAChE,MAAI,CAAC,eAAe;AAClB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEA,SAAO;AACT;","names":[]}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import {
|
|
2
|
+
allowService
|
|
3
|
+
} from "./chunk-NKTNTBOY.js";
|
|
4
|
+
|
|
5
|
+
// src/policies/bun.ts
|
|
6
|
+
var BUN_DOMAINS = ["bun.sh", "bun.com"];
|
|
7
|
+
function bun() {
|
|
8
|
+
return {
|
|
9
|
+
id: "bun",
|
|
10
|
+
name: "Bun",
|
|
11
|
+
description: "Allow outbound access to Bun install and distribution endpoints.",
|
|
12
|
+
domains: BUN_DOMAINS
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function allowBun() {
|
|
16
|
+
return allowService(bun());
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export {
|
|
20
|
+
bun,
|
|
21
|
+
allowBun
|
|
22
|
+
};
|
|
23
|
+
//# sourceMappingURL=chunk-YGUNJGP7.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/policies/bun.ts"],"sourcesContent":["import { allowService } from \"./dsl.ts\";\nimport type { PolicyServiceDescriptor, WorkspacePolicy } from \"./types.ts\";\n\nconst BUN_DOMAINS = [\"bun.sh\", \"bun.com\"] as const;\n\n/**\n * Allow outbound access to Bun distribution and install endpoints.\n */\nexport function bun(): PolicyServiceDescriptor {\n return {\n id: \"bun\",\n name: \"Bun\",\n description: \"Allow outbound access to Bun install and distribution endpoints.\",\n domains: BUN_DOMAINS,\n };\n}\n\nexport function allowBun(): WorkspacePolicy {\n return allowService(bun());\n}\n"],"mappings":";;;;;AAGA,IAAM,cAAc,CAAC,UAAU,SAAS;AAKjC,SAAS,MAA+B;AAC7C,SAAO;AAAA,IACL,IAAI;AAAA,IACJ,MAAM;AAAA,IACN,aAAa;AAAA,IACb,SAAS;AAAA,EACX;AACF;AAEO,SAAS,WAA4B;AAC1C,SAAO,aAAa,IAAI,CAAC;AAC3B;","names":[]}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
-
import { S as SandkitOptions, a as SandboxDriverFactory, C as CommandResult, b as
|
|
1
|
+
import { S as SandkitOptions, a as SandboxDriverFactory, C as CommandResult, W as WorkspaceRunCommandOptions, b as WorkspaceRunCommandDetachedOptions, c as Command, d as WorkspaceSessionRunCommandOptions, e as WorkspaceSessionProcess, f as WorkspaceSessionProcessStartInput, g as WorkspaceSandboxLease, h as WorkspaceCreateOptions } from './types-nu3vpBCZ.js';
|
|
2
2
|
import { W as WorkspacePolicy, P as PolicyServiceDescriptor } from './types-Dpr_BkF9.js';
|
|
3
3
|
export { a as PolicyServiceCredentialSource } from './types-Dpr_BkF9.js';
|
|
4
4
|
export { aiGateway } from './policies/ai-gateway.js';
|
|
5
|
+
export { allowBun, bun } from './policies/bun.js';
|
|
5
6
|
export { codex } from './policies/codex.js';
|
|
6
7
|
export { gemini } from './policies/gemini.js';
|
|
7
|
-
export {
|
|
8
|
+
export { allowNpm, npm } from './policies/npm.js';
|
|
9
|
+
export { S as SharedSetup } from './types-DNpj280o.js';
|
|
8
10
|
|
|
9
11
|
interface SandkitContext {
|
|
10
12
|
readonly adapter: NonNullable<SandkitOptions["database"]>;
|
|
@@ -14,7 +16,8 @@ interface SandkitContext {
|
|
|
14
16
|
|
|
15
17
|
interface WorkspaceSandboxHandle {
|
|
16
18
|
runCommand(command: string, args: string[]): Promise<CommandResult>;
|
|
17
|
-
runCommand(input:
|
|
19
|
+
runCommand(input: WorkspaceRunCommandOptions): Promise<CommandResult>;
|
|
20
|
+
runCommand(input: WorkspaceRunCommandDetachedOptions): Promise<Command>;
|
|
18
21
|
/**
|
|
19
22
|
* Opens a live sandbox lease. timeoutMs overrides the provider's default
|
|
20
23
|
* lease timeout for this session start; it does not change runCommand()
|
|
@@ -28,7 +31,7 @@ interface WorkspaceSandboxHandle {
|
|
|
28
31
|
}
|
|
29
32
|
interface WorkspaceSessionHandle {
|
|
30
33
|
exec(command: string, args: string[]): Promise<CommandResult>;
|
|
31
|
-
exec(input:
|
|
34
|
+
exec(input: WorkspaceSessionRunCommandOptions): Promise<CommandResult>;
|
|
32
35
|
commit(): Promise<void>;
|
|
33
36
|
/**
|
|
34
37
|
* Sets a non-durable, session-scoped policy override for subsequent session
|
|
@@ -60,6 +63,7 @@ declare class Sandkit {
|
|
|
60
63
|
#private;
|
|
61
64
|
constructor(options: SandkitOptions);
|
|
62
65
|
get context(): SandkitContext;
|
|
66
|
+
bootstrap(): Promise<void>;
|
|
63
67
|
createWorkspace(input?: WorkspaceCreateOptions): Promise<PublicWorkspaceHandle>;
|
|
64
68
|
getWorkspace(id: string): Promise<PublicWorkspaceHandle>;
|
|
65
69
|
}
|
|
@@ -75,4 +79,4 @@ interface GithubOptions {
|
|
|
75
79
|
}
|
|
76
80
|
declare function github(options?: GithubOptions): PolicyServiceDescriptor;
|
|
77
81
|
|
|
78
|
-
export { PolicyServiceDescriptor, type PublicWorkspaceHandle, Sandkit, SandkitOptions, WorkspaceCreateOptions, type WorkspaceDescriptor, WorkspacePolicy, type WorkspaceSandboxHandle, type WorkspaceSessionHandle, type WorkspaceStatus, allowAll, allowService, allowServices, createSandkit, denyAll, github };
|
|
82
|
+
export { Command, CommandResult, PolicyServiceDescriptor, type PublicWorkspaceHandle, Sandkit, SandkitOptions, WorkspaceCreateOptions, type WorkspaceDescriptor, WorkspacePolicy, WorkspaceRunCommandDetachedOptions, WorkspaceRunCommandOptions, type WorkspaceSandboxHandle, type WorkspaceSessionHandle, WorkspaceSessionRunCommandOptions, type WorkspaceStatus, allowAll, allowService, allowServices, createSandkit, denyAll, github };
|