@nylorun/runtime 0.9.0-beta → 0.11.0-beta
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/CHANGELOG.md +81 -0
- package/README.md +110 -37
- package/dist/adapters/execution/restate.d.ts +130 -0
- package/dist/adapters/execution/restate.js +442 -0
- package/dist/adapters/media.d.ts +2 -2
- package/dist/adapters/media.js +2 -2
- package/dist/adapters/observe.d.ts +2 -1
- package/dist/adapters/observe.js +2 -3
- package/dist/adapters/sandbox/virtual.js +1 -1
- package/dist/adapters/streams/s2.d.ts +18 -0
- package/dist/adapters/streams/s2.js +361 -0
- package/dist/assets.d.ts +2 -2
- package/dist/assets.js +5 -3
- package/dist/core/executors.d.ts +15 -3
- package/dist/core/executors.js +40 -5
- package/dist/core/flow-host.d.ts +225 -0
- package/dist/core/flow-host.js +518 -0
- package/dist/core/limits.d.ts +40 -0
- package/dist/core/limits.js +76 -0
- package/dist/core/runtime.d.ts +5 -90
- package/dist/core/runtime.js +3 -1447
- package/dist/core/sandbox-routes.d.ts +40 -0
- package/dist/core/sandbox-routes.js +106 -0
- package/dist/core/turn-manifest.d.ts +50 -0
- package/dist/core/turn-manifest.js +66 -0
- package/dist/execution/memory.d.ts +54 -0
- package/dist/execution/memory.js +217 -0
- package/dist/execution/types.d.ts +125 -0
- package/dist/execution/types.js +52 -0
- package/dist/host/config-for.d.ts +17 -0
- package/dist/host/config-for.js +27 -0
- package/dist/host/config.d.ts +16 -0
- package/dist/host/create-host.d.ts +56 -0
- package/dist/host/create-host.js +420 -0
- package/dist/host/environment.d.ts +13 -0
- package/dist/host/environment.js +53 -0
- package/dist/host/execution.d.ts +61 -0
- package/dist/host/execution.js +69 -0
- package/dist/host/http.d.ts +39 -0
- package/dist/host/http.js +142 -0
- package/dist/host/index.d.ts +8 -0
- package/dist/host/index.js +7 -0
- package/dist/host/logger.d.ts +3 -0
- package/dist/host/logger.js +18 -0
- package/dist/host/main.d.ts +3 -0
- package/dist/host/main.js +201 -0
- package/dist/host/stack-config.d.ts +72 -0
- package/dist/host/stack-config.js +193 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.js +4 -2
- package/dist/infra/database.d.ts +16 -0
- package/dist/infra/database.js +31 -0
- package/dist/infra/execution.d.ts +39 -0
- package/dist/infra/execution.js +68 -0
- package/dist/infra/index.d.ts +42 -0
- package/dist/infra/index.js +56 -0
- package/dist/infra/readiness.d.ts +33 -0
- package/dist/infra/readiness.js +53 -0
- package/dist/infra/streams.d.ts +17 -0
- package/dist/infra/streams.js +33 -0
- package/dist/infra/workers.d.ts +39 -0
- package/dist/infra/workers.js +31 -0
- package/dist/mcp/connect.d.ts +1 -0
- package/dist/mcp/connect.js +2 -0
- package/dist/mcp/pool.d.ts +3 -1
- package/dist/mcp/pool.js +2 -1
- package/dist/mcp/stdio.d.ts +2 -0
- package/dist/mcp/stdio.js +3 -1
- package/dist/model/auth-store.d.ts +1 -1
- package/dist/model/auth-store.js +2 -2
- package/dist/model/models.d.ts +4 -0
- package/dist/model/models.js +22 -26
- package/dist/model/pi-model.d.ts +2 -2
- package/dist/model/pi-model.js +6 -6
- package/dist/model/settings.d.ts +5 -1
- package/dist/model/settings.js +6 -2
- package/dist/sandbox/manager.d.ts +26 -8
- package/dist/sandbox/manager.js +95 -47
- package/dist/sandbox/select.d.ts +5 -4
- package/dist/sandbox/select.js +18 -13
- package/dist/sandbox/share.d.ts +23 -0
- package/dist/sandbox/share.js +58 -0
- package/dist/sandbox/types.d.ts +2 -2
- package/dist/store/canonical.d.ts +5 -0
- package/dist/store/canonical.js +17 -0
- package/dist/store/cursor.d.ts +9 -0
- package/dist/store/cursor.js +18 -0
- package/dist/store/memory.d.ts +57 -0
- package/dist/store/memory.js +643 -0
- package/dist/store/ownership.d.ts +19 -0
- package/dist/store/ownership.js +33 -0
- package/dist/store/postgres/connect.d.ts +25 -0
- package/dist/store/postgres/connect.js +25 -0
- package/dist/store/postgres/locking.d.ts +16 -0
- package/dist/store/postgres/locking.js +22 -0
- package/dist/store/postgres/migrations/001_initial.d.ts +27 -0
- package/dist/store/postgres/migrations/001_initial.js +196 -0
- package/dist/store/postgres/migrations/index.d.ts +49 -0
- package/dist/store/postgres/migrations/index.js +75 -0
- package/dist/store/postgres/names.d.ts +11 -0
- package/dist/store/postgres/names.js +42 -0
- package/dist/store/postgres/store.d.ts +11 -0
- package/dist/store/postgres/store.js +790 -0
- package/dist/store/postgres/tenants.d.ts +90 -0
- package/dist/store/postgres/tenants.js +207 -0
- package/dist/store/types.d.ts +440 -0
- package/dist/store/types.js +10 -0
- package/dist/streams/basin.d.ts +23 -0
- package/dist/streams/basin.js +51 -0
- package/dist/streams/memory.d.ts +25 -0
- package/dist/streams/memory.js +124 -0
- package/dist/streams/relay.d.ts +37 -0
- package/dist/streams/relay.js +254 -0
- package/dist/streams/types.d.ts +115 -0
- package/dist/streams/types.js +86 -0
- package/dist/tenant/actions.d.ts +153 -0
- package/dist/tenant/actions.js +191 -0
- package/dist/tenant/advance.d.ts +15 -0
- package/dist/tenant/advance.js +439 -0
- package/dist/tenant/auth.d.ts +11 -0
- package/dist/tenant/auth.js +34 -0
- package/dist/tenant/commands.d.ts +3 -0
- package/dist/tenant/commands.js +384 -0
- package/dist/tenant/context.d.ts +140 -0
- package/dist/tenant/context.js +40 -0
- package/dist/tenant/effects.d.ts +20 -0
- package/dist/tenant/effects.js +539 -0
- package/dist/tenant/envelope.d.ts +7 -0
- package/dist/tenant/envelope.js +22 -0
- package/dist/tenant/ephemeral.d.ts +42 -0
- package/dist/tenant/ephemeral.js +224 -0
- package/dist/tenant/http.d.ts +32 -0
- package/dist/tenant/http.js +51 -0
- package/dist/tenant/live.d.ts +92 -0
- package/dist/tenant/live.js +290 -0
- package/dist/tenant/logger.d.ts +9 -0
- package/dist/tenant/logger.js +25 -0
- package/dist/tenant/model-setting.d.ts +16 -0
- package/dist/tenant/model-setting.js +12 -0
- package/dist/tenant/module.d.ts +38 -0
- package/dist/tenant/module.js +319 -0
- package/dist/tenant/paths.d.ts +28 -0
- package/dist/tenant/paths.js +91 -0
- package/dist/tenant/pool.d.ts +10 -0
- package/dist/tenant/pool.js +54 -0
- package/dist/tenant/principals.d.ts +13 -0
- package/dist/tenant/principals.js +37 -0
- package/dist/tenant/quarantine-error.d.ts +6 -0
- package/dist/tenant/quarantine-error.js +9 -0
- package/dist/tenant/quarantine.d.ts +27 -0
- package/dist/tenant/quarantine.js +72 -0
- package/dist/tenant/reset.d.ts +22 -0
- package/dist/tenant/reset.js +81 -0
- package/dist/tenant/routes-tenant.d.ts +12 -0
- package/dist/tenant/routes-tenant.js +126 -0
- package/dist/tenant/routes.d.ts +9 -0
- package/dist/tenant/routes.js +142 -0
- package/dist/tenant/runtime.d.ts +81 -0
- package/dist/tenant/runtime.js +298 -0
- package/dist/tenant/scheduler.d.ts +25 -0
- package/dist/tenant/scheduler.js +84 -0
- package/dist/tenant/session.d.ts +60 -0
- package/dist/tenant/session.js +94 -0
- package/dist/tenant/sessions.d.ts +34 -0
- package/dist/tenant/sessions.js +149 -0
- package/dist/tenant/status.d.ts +37 -0
- package/dist/tenant/status.js +130 -0
- package/dist/tenant/store-memory.d.ts +16 -0
- package/dist/tenant/store-memory.js +111 -0
- package/dist/tenant/store-pg.d.ts +15 -0
- package/dist/tenant/store-pg.js +140 -0
- package/dist/tenant/streams.d.ts +126 -0
- package/dist/tenant/streams.js +419 -0
- package/dist/tenant/sweep.d.ts +15 -0
- package/dist/tenant/sweep.js +122 -0
- package/dist/tenant/types.d.ts +205 -0
- package/dist/tenant/types.js +23 -0
- package/dist/tenant/worker.d.ts +84 -0
- package/dist/tenant/worker.js +189 -0
- package/dist/vault/kek.d.ts +5 -2
- package/dist/vault/kek.js +7 -10
- package/dist/vault/service.d.ts +37 -31
- package/dist/vault/service.js +439 -359
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +14 -11
- package/dist/adapters/sandbox/microsandbox.d.ts +0 -2
- package/dist/adapters/sandbox/microsandbox.js +0 -238
- package/dist/core/main.js +0 -35
- package/dist/core/store.d.ts +0 -30
- package/dist/core/store.js +0 -202
- /package/dist/{core/main.d.ts → host/config.js} +0 -0
package/dist/core/runtime.d.ts
CHANGED
|
@@ -1,90 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
export
|
|
6
|
-
sqlitePath: string;
|
|
7
|
-
serverToken: string;
|
|
8
|
-
executors: readonly (ExecutorScope & {
|
|
9
|
-
token: string;
|
|
10
|
-
})[];
|
|
11
|
-
model?: ModelProvider;
|
|
12
|
-
/** Read the model provider credential from the host vault at call time. */
|
|
13
|
-
useHostModel?: boolean;
|
|
14
|
-
leaseMs?: number;
|
|
15
|
-
/** 32-byte key, or base64 of that key. `null` disables env and file lookup. */
|
|
16
|
-
vaultKek?: Buffer | string | null;
|
|
17
|
-
vaultKekPath?: string;
|
|
18
|
-
vaultFetch?: typeof fetch;
|
|
19
|
-
sandbox?: {
|
|
20
|
-
/** `auto` (default), `microsandbox` or `virtual`. Defaults to NYLORUN_SANDBOX. */
|
|
21
|
-
backend?: string;
|
|
22
|
-
/** Host directory for virtual-backend workspaces. Defaults beside the SQLite file. */
|
|
23
|
-
root?: string;
|
|
24
|
-
/** Replace the backend list. Tests only. */
|
|
25
|
-
backends?: readonly SandboxBackend[];
|
|
26
|
-
};
|
|
27
|
-
}
|
|
28
|
-
export declare class CoreRuntime {
|
|
29
|
-
private readonly options;
|
|
30
|
-
private readonly store;
|
|
31
|
-
private readonly vault;
|
|
32
|
-
private kek;
|
|
33
|
-
private readonly kekPath;
|
|
34
|
-
private readonly running;
|
|
35
|
-
private readonly pending;
|
|
36
|
-
private readonly observers;
|
|
37
|
-
private readonly executorStreams;
|
|
38
|
-
private readonly registry;
|
|
39
|
-
private readonly scopeId;
|
|
40
|
-
private readonly mcp;
|
|
41
|
-
private readonly sandbox;
|
|
42
|
-
private server?;
|
|
43
|
-
private closing;
|
|
44
|
-
private closed;
|
|
45
|
-
private readonly lockPath?;
|
|
46
|
-
private readonly timer;
|
|
47
|
-
constructor(options: RuntimeOptions);
|
|
48
|
-
private session;
|
|
49
|
-
private publish;
|
|
50
|
-
private send;
|
|
51
|
-
private notify;
|
|
52
|
-
/**
|
|
53
|
-
* Manifest v4 replaced beforeModelCall/afterModelCall with scoped hooks. Turns started under
|
|
54
|
-
* an older manifest cannot continue, and their hook actions no longer parse, so end them.
|
|
55
|
-
*/
|
|
56
|
-
private retireLegacyHooks;
|
|
57
|
-
private expireClaims;
|
|
58
|
-
private schedule;
|
|
59
|
-
private execute;
|
|
60
|
-
private invokeModel;
|
|
61
|
-
private resolveEffect;
|
|
62
|
-
private scope;
|
|
63
|
-
private scoped;
|
|
64
|
-
private body;
|
|
65
|
-
private command;
|
|
66
|
-
private sse;
|
|
67
|
-
private handle;
|
|
68
|
-
private view;
|
|
69
|
-
private prepareMcp;
|
|
70
|
-
private callMcpTool;
|
|
71
|
-
private callSandboxTool;
|
|
72
|
-
authorize(sessionId: string, request: {
|
|
73
|
-
url: string;
|
|
74
|
-
serverName?: string;
|
|
75
|
-
}): Promise<AuthorizeResult>;
|
|
76
|
-
private ensureKek;
|
|
77
|
-
private dispatchHost;
|
|
78
|
-
private dispatchVault;
|
|
79
|
-
listen(port?: number, hostname?: string): Promise<{
|
|
80
|
-
url: string;
|
|
81
|
-
}>;
|
|
82
|
-
close(): Promise<void>;
|
|
83
|
-
}
|
|
84
|
-
export declare function createRuntime(options: RuntimeOptions): CoreRuntime;
|
|
85
|
-
export declare function startRuntime(options: RuntimeOptions & {
|
|
86
|
-
port?: number;
|
|
87
|
-
hostname?: string;
|
|
88
|
-
}): Promise<CoreRuntime & {
|
|
89
|
-
url: string;
|
|
90
|
-
}>;
|
|
1
|
+
export { openTenantRuntime, TenantRuntime, type TenantOpenHooks, } from "../tenant/runtime.js";
|
|
2
|
+
export { startEphemeralRuntime, type StartEphemeralRuntimeOptions, type EphemeralRuntime, } from "../tenant/ephemeral.js";
|
|
3
|
+
export { scriptedModel, gatewayModel, type ModelProvider } from "./provider.js";
|
|
4
|
+
/** @deprecated Use TenantHandle. */
|
|
5
|
+
export type { TenantHandle as CoreRuntime } from "../tenant/types.js";
|