@nylorun/runtime 0.24.0-beta → 0.26.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 +143 -0
- package/README.md +18 -4
- package/dist/api/a2a/card.d.ts +11 -1
- package/dist/api/a2a/card.js +26 -2
- package/dist/api/a2a/endpoint.js +4 -2
- package/dist/api/a2a/protocol.d.ts +25 -2
- package/dist/api/a2a/protocol.js +20 -3
- package/dist/api/a2a/routes.d.ts +4 -1
- package/dist/api/a2a/routes.js +65 -7
- package/dist/api/ag-ui/endpoint.js +5 -2
- package/dist/api/ag-ui/history.d.ts +6 -1
- package/dist/api/ag-ui/history.js +35 -2
- package/dist/api/ag-ui/routes.js +53 -11
- package/dist/api/components.d.ts +1165 -678
- package/dist/api/components.js +16 -1
- package/dist/api/gate/keys.d.ts +2 -1
- package/dist/api/gate/keys.js +7 -0
- package/dist/api/gate/routes.js +13 -0
- package/dist/api/http/app.d.ts +2 -2
- package/dist/api/http/app.js +15 -4
- package/dist/api/http/body.d.ts +3 -3
- package/dist/api/http/body.js +7 -7
- package/dist/api/http/define.d.ts +1 -1
- package/dist/api/http/respond.js +1 -1
- package/dist/api/http/routes/environment-manifests.d.ts +9 -0
- package/dist/api/http/routes/environment-manifests.js +118 -0
- package/dist/api/http/routes/environments.js +61 -12
- package/dist/api/http/routes/reads.d.ts +52 -3
- package/dist/api/http/routes/sessions.js +14 -4
- package/dist/api/http/routes/tenant.js +35 -7
- package/dist/api/inbound-files.d.ts +65 -0
- package/dist/api/inbound-files.js +115 -0
- package/dist/api/openapi.js +18 -3
- package/dist/artifacts/disk.js +20 -14
- package/dist/artifacts/media-types.d.ts +15 -0
- package/dist/artifacts/media-types.js +56 -4
- package/dist/artifacts/parts.d.ts +12 -3
- package/dist/artifacts/parts.js +15 -4
- package/dist/artifacts/workspace.d.ts +4 -4
- package/dist/artifacts/workspace.js +6 -18
- package/dist/core/flow-host.d.ts +1 -1
- package/dist/core/flow-host.js +2 -2
- package/dist/core/sandbox-routes.js +2 -2
- package/dist/core/turn-manifest.d.ts +3 -2
- package/dist/core/turn-manifest.js +29 -5
- package/dist/gates/egress-credentials.js +1 -1
- package/dist/gates/egress.d.ts +13 -19
- package/dist/gates/egress.js +32 -29
- package/dist/gates/http-tool.d.ts +3 -4
- package/dist/gates/http-tool.js +23 -19
- package/dist/gates/journal.js +0 -1
- package/dist/gates/mcp-handler.js +2 -3
- package/dist/gates/policy.js +1 -3
- package/dist/gates/tool-contract.d.ts +1 -1
- package/dist/harness/calls.d.ts +2 -2
- package/dist/harness/calls.js +9 -12
- package/dist/harness/main.js +7 -1
- package/dist/harness/pod.d.ts +6 -1
- package/dist/harness/pod.js +5 -0
- package/dist/harness/service.js +5 -5
- package/dist/harness/setup.d.ts +2 -0
- package/dist/harness/setup.js +25 -1
- package/dist/harness-api/record.d.ts +1 -1
- package/dist/harness-api/record.js +13 -13
- package/dist/harness-api/server.d.ts +27 -4
- package/dist/harness-api/server.js +41 -8
- package/dist/harness-api/tool-journal.d.ts +17 -8
- package/dist/harness-api/tool-journal.js +41 -11
- package/dist/harness-api/workspace.d.ts +7 -5
- package/dist/harness-api/workspace.js +25 -19
- package/dist/host/gates.js +2 -2
- package/dist/host/stack-config.js +1 -1
- package/dist/keys/contract.d.ts +1 -1
- package/dist/keys/contract.js +1 -1
- package/dist/keys/keys.d.ts +9 -2
- package/dist/keys/keys.js +4 -1
- package/dist/management-openapi.json +366 -61
- package/dist/mcp/connect.d.ts +1 -2
- package/dist/mcp/connect.js +1 -4
- package/dist/mcp/pool.d.ts +1 -4
- package/dist/mcp/pool.js +13 -27
- package/dist/mcp/preview.d.ts +1 -1
- package/dist/mcp/preview.js +1 -2
- package/dist/mcp/snapshot.d.ts +11 -13
- package/dist/mcp/snapshot.js +27 -38
- package/dist/model/capabilities.d.ts +26 -0
- package/dist/model/capabilities.js +44 -0
- package/dist/model/catalog.d.ts +34 -3
- package/dist/model/catalog.js +38 -2
- package/dist/model/models.d.ts +2 -0
- package/dist/model/models.js +1 -1
- package/dist/model/native-blocks.d.ts +35 -0
- package/dist/model/native-blocks.js +170 -0
- package/dist/model/pi-model.js +106 -94
- package/dist/openapi.json +9554 -5076
- package/dist/record/environment.js +1 -1
- package/dist/sandbox/join.js +4 -0
- package/dist/sandbox/manager.d.ts +32 -14
- package/dist/sandbox/manager.js +132 -93
- package/dist/sandbox/placement.d.ts +1 -1
- package/dist/sandbox/placement.js +2 -2
- package/dist/sandbox/pods/client.d.ts +3 -1
- package/dist/sandbox/pods/lifecycle.d.ts +8 -0
- package/dist/sandbox/pods/lifecycle.js +15 -0
- package/dist/sandbox/pods/spec.js +2 -1
- package/dist/sandbox/resolve.d.ts +5 -3
- package/dist/sandbox/resolve.js +9 -2
- package/dist/sandbox/runtime-tools.d.ts +9 -0
- package/dist/sandbox/runtime-tools.js +16 -0
- package/dist/sandbox/session-sandbox.d.ts +4 -6
- package/dist/sandbox/session-sandbox.js +47 -94
- package/dist/sandbox/setup.d.ts +4 -1
- package/dist/sandbox/setup.js +46 -9
- package/dist/sandbox/share.d.ts +12 -7
- package/dist/sandbox/share.js +27 -25
- package/dist/sandbox/skills.d.ts +8 -6
- package/dist/sandbox/skills.js +24 -23
- package/dist/store/postgres/drizzle/0024_flat_manifest.sql +7 -0
- package/dist/store/postgres/drizzle/0025_environment_manifests.sql +14 -0
- package/dist/store/postgres/drizzle/0026_environment_forks.sql +1 -0
- package/dist/store/postgres/drizzle/0027_environment_image_digest.sql +1 -0
- package/dist/store/postgres/drizzle/meta/_journal.json +28 -0
- package/dist/store/postgres/migrate.js +1 -1
- package/dist/store/postgres/reads.js +8 -2
- package/dist/store/postgres/schema.d.ts +217 -0
- package/dist/store/postgres/schema.js +36 -2
- package/dist/store/postgres/store.js +79 -4
- package/dist/store/types.d.ts +68 -14
- package/dist/tenant/advance.js +3 -0
- package/dist/tenant/artifact-tool.d.ts +1 -1
- package/dist/tenant/artifact-tool.js +43 -22
- package/dist/tenant/commands.js +24 -4
- package/dist/tenant/context.d.ts +10 -4
- package/dist/tenant/effects.js +7 -9
- package/dist/tenant/environment-manifests.d.ts +57 -0
- package/dist/tenant/environment-manifests.js +200 -0
- package/dist/tenant/environments.d.ts +54 -47
- package/dist/tenant/environments.js +309 -85
- package/dist/tenant/ephemeral.d.ts +1 -1
- package/dist/tenant/host-token.js +1 -1
- package/dist/tenant/identity-file.d.ts +1 -1
- package/dist/tenant/identity-file.js +1 -1
- package/dist/tenant/model-setting.d.ts +14 -0
- package/dist/tenant/model-setting.js +51 -0
- package/dist/tenant/outbound.d.ts +6 -5
- package/dist/tenant/outbound.js +8 -6
- package/dist/tenant/sessions.d.ts +5 -1
- package/dist/tenant/sessions.js +45 -12
- package/dist/tenant/skill-tool.d.ts +3 -3
- package/dist/tenant/skill-tool.js +6 -11
- package/dist/tenant/sweep.js +1 -1
- package/dist/tenant/tool-results.js +1 -1
- package/dist/tenant/tool-search.d.ts +7 -11
- package/dist/tenant/tool-search.js +8 -5
- package/dist/tenant/transcript.d.ts +51 -32
- package/dist/tenant/transcript.js +2 -1
- package/dist/tenant/types.d.ts +2 -2
- package/dist/traces/ids.d.ts +0 -1
- package/dist/traces/ids.js +0 -4
- package/dist/traces/map.d.ts +2 -2
- package/dist/traces/map.js +1 -29
- package/dist/vault/coverage.js +11 -13
- package/dist/vault/host-model.d.ts +4 -1
- package/dist/vault/host-model.js +10 -2
- package/dist/vault/service.d.ts +49 -4
- package/dist/vault/service.js +153 -6
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +3 -3
- package/dist/sandbox/capability.d.ts +0 -3
- package/dist/sandbox/capability.js +0 -10
package/dist/host/gates.js
CHANGED
|
@@ -178,8 +178,8 @@ export async function startEgress(options) {
|
|
|
178
178
|
sandboxes: { live: async (sandboxId) => storeEgressSandboxes((await tenant.open()).store).live(sandboxId) },
|
|
179
179
|
// Each connection on the Tenant's record (R7.3): the gates' one write into it.
|
|
180
180
|
record: {
|
|
181
|
-
|
|
182
|
-
write: async (
|
|
181
|
+
runningTurns: async (environmentId) => storeEgressRecord((await tenant.open()).store).runningTurns(environmentId),
|
|
182
|
+
write: async (connection) => storeEgressRecord((await tenant.open()).store).write(connection),
|
|
183
183
|
},
|
|
184
184
|
credentials: {
|
|
185
185
|
bound: async (sandboxId, host) => (await tenant.open()).environmentSecretBound(sandboxId, host),
|
|
@@ -459,7 +459,7 @@ function parseSandboxes(env) {
|
|
|
459
459
|
return undefined;
|
|
460
460
|
const token = read(env, "NYLORUN_SANDBOXES_TOKEN");
|
|
461
461
|
if (token === undefined || token.length < 32)
|
|
462
|
-
throw new StackConfigError("NYLORUN_SANDBOXES_TOKEN (at least 32 characters) is required with NYLORUN_SANDBOXES_URL (`nylorun sandbox enable` sets both)");
|
|
462
|
+
throw new StackConfigError("NYLORUN_SANDBOXES_TOKEN (at least 32 characters) is required with NYLORUN_SANDBOXES_URL (`nylorun local sandbox enable` sets both)");
|
|
463
463
|
const harnessImage = read(env, "NYLORUN_SANDBOX_HARNESS_IMAGE");
|
|
464
464
|
if (harnessImage === undefined || /\s/.test(harnessImage))
|
|
465
465
|
throw new StackConfigError("NYLORUN_SANDBOX_HARNESS_IMAGE is required with NYLORUN_SANDBOXES_URL: the Runtime image sandbox pods copy the engine from (`nylorun start` sets it)");
|
package/dist/keys/contract.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* gates token. Internal: only core calls it, so it is not in the published OpenAPI documents.
|
|
5
5
|
*
|
|
6
6
|
* `200 {result}` when the operation succeeded, `200 {error}` when it refused: a vault error or
|
|
7
|
-
* a
|
|
7
|
+
* a Runtime or Management API error with its status, code and details, so the route that called it answers
|
|
8
8
|
* exactly what it answered when the operation ran in its own process.
|
|
9
9
|
*/
|
|
10
10
|
export declare const KEYS_PATH = "/nylorun/v1/keys";
|
package/dist/keys/contract.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* gates token. Internal: only core calls it, so it is not in the published OpenAPI documents.
|
|
5
5
|
*
|
|
6
6
|
* `200 {result}` when the operation succeeded, `200 {error}` when it refused: a vault error or
|
|
7
|
-
* a
|
|
7
|
+
* a Runtime or Management API error with its status, code and details, so the route that called it answers
|
|
8
8
|
* exactly what it answered when the operation ran in its own process.
|
|
9
9
|
*/
|
|
10
10
|
export const KEYS_PATH = "/nylorun/v1/keys";
|
package/dist/keys/keys.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import type { EnvironmentSecretView, HostModelView, McpPreview, McpPreviewReques
|
|
|
2
2
|
import type { SessionStore } from "../store/types.js";
|
|
3
3
|
import type { OutboundPolicy } from "../tenant/outbound.js";
|
|
4
4
|
import { type SigningKeys } from "../tenant/signing-keys.js";
|
|
5
|
-
import type { VaultService } from "../vault/service.js";
|
|
5
|
+
import type { SealedSecretCopies, VaultService } from "../vault/service.js";
|
|
6
6
|
/** One JWT to sign: its `typ` and every claim, `iss`, `aud`, `sub`, `iat`, `exp` and `jti` included. */
|
|
7
7
|
export interface SignRequest {
|
|
8
8
|
readonly typ: string;
|
|
@@ -18,6 +18,13 @@ export interface Keys {
|
|
|
18
18
|
putEnvironmentSecret(environmentId: string, name: string, body: PutEnvironmentSecretRequest, actor: string): Promise<EnvironmentSecretView>;
|
|
19
19
|
putHostModel(body: PutHostModelRequest): Promise<HostModelView>;
|
|
20
20
|
selectHostModel(body: SelectHostModelRequest): Promise<HostModelView>;
|
|
21
|
+
/**
|
|
22
|
+
* Environment `from`'s secrets sealed again for a fork's new vault `vaultId`, limited to
|
|
23
|
+
* `slots` when given (`VaultService.sealEnvironmentSecretCopies`, Q15). Writes nothing: the
|
|
24
|
+
* fork's transaction inserts the copies; call it before that transaction opens. `null`, not
|
|
25
|
+
* `undefined`, crosses the wire.
|
|
26
|
+
*/
|
|
27
|
+
sealEnvironmentSecretCopies(from: string, vaultId: string, slots: Readonly<Record<string, Record<string, unknown>>> | null): Promise<SealedSecretCopies>;
|
|
21
28
|
/** Signs with the current key, creating the Tenant's keys if it has none. */
|
|
22
29
|
sign(request: SignRequest): Promise<Signed>;
|
|
23
30
|
/** Rotates the signing keys (`SigningKeys.rotate`); 409 while the previous key may verify live tokens. */
|
|
@@ -41,7 +48,7 @@ export interface Keys {
|
|
|
41
48
|
signEgressLeaf(host: string, publicKey: string): Promise<string>;
|
|
42
49
|
}
|
|
43
50
|
/** The operations, by the name the HTTP route carries. */
|
|
44
|
-
export declare const KEYS_OPERATIONS: readonly ["putEnvironmentSecret", "putHostModel", "selectHostModel", "sign", "rotateSigningKeys", "ensureSigningKeys", "previewMcp", "egressCa", "signEgressLeaf"];
|
|
51
|
+
export declare const KEYS_OPERATIONS: readonly ["putEnvironmentSecret", "putHostModel", "selectHostModel", "sealEnvironmentSecretCopies", "sign", "rotateSigningKeys", "ensureSigningKeys", "previewMcp", "egressCa", "signEgressLeaf"];
|
|
45
52
|
export type KeysOperation = (typeof KEYS_OPERATIONS)[number];
|
|
46
53
|
export interface InProcessKeysOptions {
|
|
47
54
|
readonly store: SessionStore;
|
package/dist/keys/keys.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The keys seam (blueprint §14, F4.2): everything that needs the vault key. Vault writes that
|
|
3
3
|
* touch a secret (writing an Environment's secret, setting and selecting the host model;
|
|
4
|
-
* rotation and selection decrypt the old secret first
|
|
4
|
+
* rotation and selection decrypt the old secret first; sealing a fork's copies of its source's
|
|
5
|
+
* secrets, which the fork's transaction then inserts) and all token signing (capability
|
|
5
6
|
* links, run and host tokens, signing-key rotation) run here, whole, so the process that calls them never
|
|
6
7
|
* holds the key or a private signing key.
|
|
7
8
|
*
|
|
@@ -21,6 +22,7 @@ export const KEYS_OPERATIONS = [
|
|
|
21
22
|
"putEnvironmentSecret",
|
|
22
23
|
"putHostModel",
|
|
23
24
|
"selectHostModel",
|
|
25
|
+
"sealEnvironmentSecretCopies",
|
|
24
26
|
"sign",
|
|
25
27
|
"rotateSigningKeys",
|
|
26
28
|
"ensureSigningKeys",
|
|
@@ -35,6 +37,7 @@ export function inProcessKeys(options) {
|
|
|
35
37
|
putEnvironmentSecret: (environmentId, name, body, actor) => vault.putEnvironmentSecret(environmentId, name, body, actor),
|
|
36
38
|
putHostModel: (body) => vault.putHostModel(body),
|
|
37
39
|
selectHostModel: (body) => vault.selectHostModel(body),
|
|
40
|
+
sealEnvironmentSecretCopies: (from, vaultId, slots) => vault.sealEnvironmentSecretCopies(from, vaultId, slots),
|
|
38
41
|
async sign(request) {
|
|
39
42
|
const key = kek();
|
|
40
43
|
const row = await store.tx((t) => signingKeys.ensure(t, key));
|