@nylorun/runtime 0.23.0-beta → 0.25.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 +252 -0
- package/README.md +87 -28
- package/dist/adapters/execution/restate.js +1 -1
- package/dist/adapters/replication/pgoutput.d.ts +2 -0
- package/dist/adapters/replication/pgoutput.js +6 -3
- package/dist/adapters/sandbox/local.d.ts +9 -1
- package/dist/adapters/sandbox/local.js +16 -4
- package/dist/adapters/sandbox/virtual.js +4 -1
- package/dist/api/a2a/card.d.ts +11 -1
- package/dist/api/a2a/card.js +26 -2
- package/dist/api/a2a/endpoint.js +9 -3
- package/dist/api/a2a/protocol.d.ts +25 -2
- package/dist/api/a2a/protocol.js +20 -3
- package/dist/api/a2a/routes.d.ts +6 -1
- package/dist/api/a2a/routes.js +67 -9
- package/dist/api/a2a/tasks.js +2 -1
- package/dist/api/ag-ui/endpoint.js +8 -3
- package/dist/api/ag-ui/history.d.ts +6 -1
- package/dist/api/ag-ui/history.js +39 -3
- package/dist/api/ag-ui/routes.d.ts +4 -1
- package/dist/api/ag-ui/routes.js +63 -20
- package/dist/api/ag-ui/translate.js +3 -2
- package/dist/api/components.d.ts +5327 -1091
- package/dist/api/components.js +40 -16
- package/dist/api/gate/keys.d.ts +2 -1
- package/dist/api/gate/keys.js +14 -1
- package/dist/api/gate/routes.d.ts +6 -0
- package/dist/api/gate/routes.js +52 -3
- package/dist/api/http/app.js +17 -6
- package/dist/api/http/body.d.ts +3 -3
- package/dist/api/http/body.js +7 -7
- package/dist/api/http/define.d.ts +6 -0
- package/dist/api/http/define.js +13 -1
- package/dist/api/http/respond.js +1 -1
- package/dist/api/http/routes/artifacts.js +35 -8
- package/dist/api/http/routes/coverage.d.ts +9 -0
- package/dist/api/http/routes/coverage.js +34 -0
- 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.d.ts +11 -0
- package/dist/api/http/routes/environments.js +332 -0
- package/dist/api/http/routes/mcp.d.ts +1 -1
- package/dist/api/http/routes/mcp.js +2 -2
- package/dist/api/http/routes/me.js +1 -1
- package/dist/api/http/routes/reads.d.ts +94 -9
- package/dist/api/http/routes/reads.js +54 -5
- package/dist/api/http/routes/sessions.js +24 -9
- package/dist/api/http/routes/tenant.js +65 -15
- package/dist/api/inbound-files.d.ts +65 -0
- package/dist/api/inbound-files.js +115 -0
- package/dist/api/openapi.js +48 -28
- package/dist/artifacts/disk.d.ts +59 -0
- package/dist/artifacts/disk.js +569 -0
- package/dist/artifacts/export.d.ts +1 -1
- package/dist/artifacts/export.js +2 -3
- package/dist/artifacts/folders.d.ts +6 -3
- package/dist/artifacts/folders.js +17 -12
- 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/service.d.ts +2 -1
- package/dist/artifacts/service.js +6 -1
- package/dist/artifacts/workspace.d.ts +5 -5
- package/dist/artifacts/workspace.js +7 -19
- package/dist/core/flow-host.d.ts +3 -4
- package/dist/core/flow-host.js +5 -2
- package/dist/core/provider.d.ts +3 -2
- package/dist/core/provider.js +5 -37
- package/dist/core/sandbox-routes.d.ts +2 -21
- package/dist/core/sandbox-routes.js +11 -44
- package/dist/core/turn-manifest.d.ts +3 -2
- package/dist/core/turn-manifest.js +29 -5
- package/dist/execution/types.d.ts +1 -1
- package/dist/gates/contract.d.ts +3 -24
- package/dist/gates/contract.js +1 -36
- package/dist/gates/egress-credentials.d.ts +9 -0
- package/dist/gates/egress-credentials.js +11 -4
- package/dist/gates/egress.d.ts +22 -1
- package/dist/gates/egress.js +116 -10
- package/dist/gates/fixture-model.d.ts +28 -0
- package/dist/gates/fixture-model.js +92 -0
- package/dist/gates/handler.js +4 -4
- package/dist/gates/http-tool.d.ts +9 -6
- package/dist/gates/http-tool.js +11 -17
- package/dist/gates/in-process.d.ts +5 -0
- package/dist/gates/in-process.js +12 -1
- package/dist/gates/journal.d.ts +30 -0
- package/dist/gates/journal.js +51 -0
- package/dist/gates/mcp-handler.d.ts +4 -0
- package/dist/gates/mcp-handler.js +7 -4
- package/dist/gates/meter.d.ts +10 -2
- package/dist/gates/meter.js +20 -5
- package/dist/gates/policy.d.ts +49 -0
- package/dist/gates/policy.js +132 -0
- package/dist/gates/tenant-vaults.d.ts +7 -7
- package/dist/gates/tenant-vaults.js +5 -5
- package/dist/gates/tool-calls.d.ts +10 -5
- package/dist/gates/tool-calls.js +28 -10
- package/dist/gates/tool-client.d.ts +8 -0
- package/dist/gates/tool-client.js +27 -11
- package/dist/gates/tool-contract.d.ts +11 -69
- package/dist/gates/tool-contract.js +1 -85
- package/dist/gates/tool-gate.d.ts +1 -1
- package/dist/harness/calls.d.ts +14 -7
- package/dist/harness/calls.js +30 -24
- package/dist/harness/executors.js +12 -9
- package/dist/harness/main.js +24 -5
- package/dist/harness/pod.d.ts +39 -0
- package/dist/harness/pod.js +46 -0
- package/dist/harness/service.d.ts +0 -1
- package/dist/harness/service.js +17 -9
- package/dist/harness/setup.d.ts +29 -0
- package/dist/harness/setup.js +174 -0
- package/dist/harness/ws-client.js +3 -2
- package/dist/harness/ws-port.d.ts +1 -5
- package/dist/harness/ws-port.js +1 -5
- package/dist/harness-api/in-process.js +3 -3
- package/dist/harness-api/record.d.ts +15 -1
- package/dist/harness-api/record.js +180 -50
- package/dist/harness-api/redact.d.ts +3 -0
- package/dist/harness-api/redact.js +45 -0
- package/dist/harness-api/server.d.ts +35 -4
- package/dist/harness-api/server.js +130 -17
- package/dist/harness-api/start.d.ts +10 -3
- package/dist/harness-api/start.js +40 -10
- package/dist/harness-api/tool-journal.d.ts +105 -0
- package/dist/harness-api/tool-journal.js +132 -0
- package/dist/harness-api/tool-status.d.ts +13 -0
- package/dist/harness-api/tool-status.js +26 -0
- package/dist/harness-api/workspace.d.ts +12 -7
- package/dist/harness-api/workspace.js +47 -25
- package/dist/harness-api/ws-server.d.ts +11 -3
- package/dist/harness-api/ws-server.js +94 -15
- package/dist/host/gates.d.ts +2 -1
- package/dist/host/gates.js +10 -2
- package/dist/host/main.js +54 -5
- package/dist/host/operate.js +67 -5
- package/dist/host/stack-config.d.ts +64 -0
- package/dist/host/stack-config.js +62 -2
- package/dist/keys/client.js +4 -1
- package/dist/keys/keys.d.ts +13 -6
- package/dist/keys/keys.js +9 -8
- package/dist/management-openapi.json +1264 -2171
- package/dist/mcp/connect.d.ts +26 -22
- package/dist/mcp/connect.js +30 -34
- package/dist/mcp/pool.d.ts +3 -6
- package/dist/mcp/pool.js +14 -28
- package/dist/mcp/preview.d.ts +3 -3
- package/dist/mcp/preview.js +10 -21
- package/dist/mcp/snapshot.d.ts +16 -24
- package/dist/mcp/snapshot.js +33 -45
- 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 +114 -94
- package/dist/openapi.json +12822 -3943
- package/dist/reads/types.d.ts +16 -3
- package/dist/record/append.d.ts +3 -1
- package/dist/record/append.js +1 -0
- package/dist/record/envelope.d.ts +5 -1
- package/dist/record/envelope.js +7 -3
- package/dist/record/environment.d.ts +25 -0
- package/dist/record/environment.js +44 -0
- package/dist/record/index.d.ts +1 -1
- package/dist/record/index.js +1 -1
- package/dist/sandbox/disk-fs.d.ts +95 -0
- package/dist/sandbox/disk-fs.js +206 -0
- package/dist/sandbox/join.d.ts +17 -18
- package/dist/sandbox/join.js +46 -15
- package/dist/sandbox/manager.d.ts +47 -21
- package/dist/sandbox/manager.js +162 -107
- package/dist/sandbox/placement.d.ts +14 -13
- package/dist/sandbox/placement.js +31 -14
- package/dist/sandbox/pods/client.d.ts +9 -2
- package/dist/sandbox/pods/lifecycle.d.ts +36 -27
- package/dist/sandbox/pods/lifecycle.js +29 -26
- package/dist/sandbox/pods/reconcile.js +18 -12
- package/dist/sandbox/pods/spec.d.ts +15 -13
- package/dist/sandbox/pods/spec.js +17 -20
- package/dist/sandbox/records.d.ts +2 -2
- package/dist/sandbox/records.js +3 -3
- package/dist/sandbox/resolve.d.ts +37 -27
- package/dist/sandbox/resolve.js +73 -41
- 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 +64 -0
- package/dist/sandbox/setup.js +160 -0
- package/dist/sandbox/share.d.ts +21 -26
- package/dist/sandbox/share.js +36 -63
- package/dist/sandbox/skills.d.ts +8 -6
- package/dist/sandbox/skills.js +24 -23
- package/dist/sandbox/tenant-config.d.ts +12 -14
- package/dist/sandbox/tenant-config.js +12 -17
- package/dist/sandbox/types.d.ts +6 -0
- package/dist/store/postgres/drizzle/0020_environments.sql +63 -0
- package/dist/store/postgres/drizzle/0021_disk_versions.sql +7 -0
- package/dist/store/postgres/drizzle/0022_model_usage_timing.sql +5 -0
- package/dist/store/postgres/drizzle/0023_artifact_pages.sql +1 -0
- 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 +56 -0
- package/dist/store/postgres/reads.js +123 -17
- package/dist/store/postgres/record-writer.d.ts +4 -4
- package/dist/store/postgres/record-writer.js +9 -9
- package/dist/store/postgres/record.d.ts +7 -0
- package/dist/store/postgres/record.js +23 -2
- package/dist/store/postgres/schema.d.ts +1126 -736
- package/dist/store/postgres/schema.js +136 -73
- package/dist/store/postgres/store.js +195 -67
- package/dist/store/types.d.ts +165 -50
- package/dist/tenant/advance.d.ts +7 -6
- package/dist/tenant/advance.js +118 -42
- package/dist/tenant/artifact-tool.d.ts +1 -1
- package/dist/tenant/artifact-tool.js +46 -26
- package/dist/tenant/commands.d.ts +15 -2
- package/dist/tenant/commands.js +115 -14
- package/dist/tenant/context.d.ts +56 -24
- package/dist/tenant/context.js +4 -15
- package/dist/tenant/effects.d.ts +1 -1
- package/dist/tenant/effects.js +44 -29
- package/dist/tenant/environment-manifests.d.ts +57 -0
- package/dist/tenant/environment-manifests.js +200 -0
- package/dist/tenant/environments.d.ts +174 -0
- package/dist/tenant/environments.js +1044 -0
- package/dist/tenant/harness-tokens.d.ts +21 -0
- package/dist/tenant/harness-tokens.js +61 -0
- package/dist/tenant/host-token.d.ts +1 -1
- package/dist/tenant/host-token.js +2 -4
- package/dist/tenant/identity-file.d.ts +4 -4
- package/dist/tenant/identity-file.js +17 -8
- package/dist/tenant/issuers.js +3 -3
- package/dist/tenant/model-setting.d.ts +14 -0
- package/dist/tenant/model-setting.js +51 -0
- package/dist/tenant/principals.js +1 -1
- package/dist/tenant/reset.js +3 -3
- package/dist/tenant/runtime.d.ts +6 -1
- package/dist/tenant/runtime.js +7 -1
- package/dist/tenant/session.d.ts +3 -3
- package/dist/tenant/session.js +0 -14
- package/dist/tenant/sessions.d.ts +18 -14
- package/dist/tenant/sessions.js +99 -143
- package/dist/tenant/signing-keys.d.ts +5 -1
- package/dist/tenant/skill-tool.d.ts +3 -3
- package/dist/tenant/skill-tool.js +6 -11
- package/dist/tenant/status.js +3 -3
- package/dist/tenant/sweep.js +13 -7
- 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 +245 -36
- package/dist/tenant/transcript.js +64 -12
- package/dist/tenant/turn-timing.d.ts +43 -0
- package/dist/tenant/turn-timing.js +39 -0
- package/dist/tenant/types.d.ts +2 -0
- package/dist/traces/ids.d.ts +41 -0
- package/dist/traces/ids.js +81 -0
- package/dist/traces/key.d.ts +6 -0
- package/dist/traces/key.js +37 -0
- package/dist/traces/map.d.ts +113 -0
- package/dist/traces/map.js +289 -0
- package/dist/traces/options.d.ts +7 -0
- package/dist/traces/options.js +1 -0
- package/dist/traces/otlp.d.ts +42 -0
- package/dist/traces/otlp.js +84 -0
- package/dist/traces/projector.d.ts +58 -0
- package/dist/traces/projector.js +200 -0
- package/dist/traces/read.d.ts +23 -0
- package/dist/traces/read.js +16 -0
- package/dist/vault/coverage.d.ts +26 -0
- package/dist/vault/coverage.js +62 -0
- package/dist/vault/error.d.ts +11 -1
- package/dist/vault/error.js +5 -1
- package/dist/vault/host-model.d.ts +4 -1
- package/dist/vault/host-model.js +10 -2
- package/dist/vault/service.d.ts +92 -48
- package/dist/vault/service.js +462 -376
- package/dist/vault/sources.d.ts +5 -16
- package/dist/vault/sources.js +6 -8
- package/dist/version.d.ts +1 -1
- package/dist/version.js +2 -2
- package/package.json +13 -13
- package/dist/api/http/routes/sandboxes.d.ts +0 -9
- package/dist/api/http/routes/sandboxes.js +0 -153
- package/dist/api/http/routes/vaults.d.ts +0 -10
- package/dist/api/http/routes/vaults.js +0 -139
- package/dist/record/sandbox.d.ts +0 -25
- package/dist/record/sandbox.js +0 -43
- package/dist/sandbox/capability.d.ts +0 -3
- package/dist/sandbox/capability.js +0 -10
- package/dist/tenant/sandboxes.d.ts +0 -123
- package/dist/tenant/sandboxes.js +0 -566
package/dist/vault/service.d.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { CredentialCoverage, CredentialCoverageRequest, CredentialIdentity, EnvironmentSecretView, HostModelProviderInfo, HostModelView, PutEnvironmentSecretRequest, PutHostModelRequest, CustomModelSettings, ModelInput, SelectHostModelRequest } from "@nylorun/core/contracts";
|
|
2
|
+
import type { AgentManifest, WorkflowManifest } from "@nylorun/core/define";
|
|
2
3
|
import type { SessionStore, Tx, VaultCredentialRow } from "../store/types.js";
|
|
3
4
|
export declare const HOST_VAULT_ID = "host";
|
|
4
5
|
export type HostModelSecret = {
|
|
5
6
|
provider: string;
|
|
6
7
|
model: string;
|
|
7
8
|
baseUrl?: string;
|
|
8
|
-
/** A custom endpoint's window, output limit, reasoning and pi-ai compat (Model Calls §7). */
|
|
9
|
+
/** A custom endpoint's window, output limit, reasoning, inputs and pi-ai compat (Model Calls §7). */
|
|
9
10
|
settings?: CustomModelSettings;
|
|
11
|
+
/** The inputs the operator added to catalog models, by `<provider>/<model>` (protocol 12). */
|
|
12
|
+
addedInputs?: Readonly<Record<string, readonly ModelInput[]>>;
|
|
10
13
|
authType: "api_key" | "oauth";
|
|
11
14
|
credential: {
|
|
12
15
|
type: "api_key" | "oauth";
|
|
@@ -18,6 +21,28 @@ export type HostModelSecret = {
|
|
|
18
21
|
[key: string]: unknown;
|
|
19
22
|
};
|
|
20
23
|
};
|
|
24
|
+
type UserCredentialRow = VaultCredentialRow & {
|
|
25
|
+
type: "bearer" | "headers" | "environment_secret" | "environment_variable";
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* A fork's secrets sealed for its new vault (`sealEnvironmentSecretCopies`): each copy's
|
|
29
|
+
* ciphertext, base64 so it crosses the keys service's JSON, and what about it is not secret.
|
|
30
|
+
*/
|
|
31
|
+
export interface SealedSecretCopies {
|
|
32
|
+
readonly copies: readonly {
|
|
33
|
+
readonly id: string;
|
|
34
|
+
readonly name: string;
|
|
35
|
+
readonly type: UserCredentialRow["type"];
|
|
36
|
+
readonly bindingJson: string;
|
|
37
|
+
readonly expiresAt: string | null;
|
|
38
|
+
readonly kekId: string;
|
|
39
|
+
readonly nonce: string;
|
|
40
|
+
readonly ciphertext: string;
|
|
41
|
+
readonly wrappedDek: string;
|
|
42
|
+
}[];
|
|
43
|
+
/** Names left behind: no slot of the fork declares them, or their slot cannot take the value. */
|
|
44
|
+
readonly dropped: readonly string[];
|
|
45
|
+
}
|
|
21
46
|
export type AuthorizeResult = {
|
|
22
47
|
status: "unauthenticated";
|
|
23
48
|
url: string;
|
|
@@ -31,8 +56,6 @@ export type AuthorizeResult = {
|
|
|
31
56
|
via?: string;
|
|
32
57
|
/** The header that names the session owner; `sessionCredentials` adds it. */
|
|
33
58
|
identity?: CredentialIdentity;
|
|
34
|
-
/** The scope of the vault the credential is in. */
|
|
35
|
-
vault: "installation" | "user";
|
|
36
59
|
} | {
|
|
37
60
|
status: "refused";
|
|
38
61
|
url: string;
|
|
@@ -48,54 +71,64 @@ export declare class VaultService {
|
|
|
48
71
|
private readonly store;
|
|
49
72
|
private readonly kek;
|
|
50
73
|
constructor(options: VaultServiceOptions);
|
|
51
|
-
createVault(body: CreateVaultRequest): Promise<VaultInfo>;
|
|
52
74
|
/**
|
|
53
|
-
*
|
|
54
|
-
*
|
|
75
|
+
* Creates Environment `environmentId`'s vault (D56), in the transaction that creates it; answers
|
|
76
|
+
* its id, `id` when given (a fork's, whose secrets were sealed for it first).
|
|
55
77
|
*/
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
78
|
+
createEnvironmentVault(t: Tx, environmentId: string, actor: string, id?: string): Promise<string>;
|
|
79
|
+
/**
|
|
80
|
+
* Deletes Environment `environmentId`'s vault and its credentials, with their audit rows, in
|
|
81
|
+
* the transaction that deletes the Environment: no release or tool call finds them after it
|
|
82
|
+
* commits.
|
|
83
|
+
*/
|
|
84
|
+
deleteEnvironmentVault(t: Tx, environmentId: string, actor: string): Promise<void>;
|
|
85
|
+
/**
|
|
86
|
+
* Seals Environment `from`'s secrets again for vault `vaultId`, a fork's new vault (Q15): each
|
|
87
|
+
* value is unsealed and sealed under the new vault's and credential's ids, which its AAD binds.
|
|
88
|
+
* Needs the vault key, so callers reach it through `Keys`; it reads `from` in its own
|
|
89
|
+
* transaction and writes nothing. With `slots` (what the fork runs declares secret slots, D64),
|
|
90
|
+
* only the names it declares are sealed, each with its slot's binding; a value the slot's type
|
|
91
|
+
* cannot take is left behind. The fork's transaction inserts the copies
|
|
92
|
+
* (`insertEnvironmentSecretCopies`).
|
|
93
|
+
*/
|
|
94
|
+
sealEnvironmentSecretCopies(from: string, vaultId: string, slots?: Readonly<Record<string, Record<string, unknown>>> | null): Promise<SealedSecretCopies>;
|
|
95
|
+
/**
|
|
96
|
+
* Inserts a fork's sealed copies (`sealEnvironmentSecretCopies`) into vault `vaultId`, in the
|
|
97
|
+
* transaction that creates the fork, with an audit row each naming `from`. Reads no secret.
|
|
98
|
+
*/
|
|
99
|
+
insertEnvironmentSecretCopies(t: Tx, vaultId: string, from: string, actor: string, sealed: SealedSecretCopies): Promise<{
|
|
100
|
+
copied: string[];
|
|
101
|
+
dropped: string[];
|
|
69
102
|
}>;
|
|
70
103
|
/**
|
|
71
|
-
*
|
|
72
|
-
*
|
|
104
|
+
* `PUT /v1/environments/{id}/secrets/{name}`: creates or replaces one credential. The same
|
|
105
|
+
* name and type keeps the credential's id and re-seals its value and binding; another type
|
|
106
|
+
* replaces it. Refused (`409 credential_conflict`) when another credential of the vault is
|
|
107
|
+
* bound to one of its hosts or to its URL. Runs under the Environment row's lock, which also
|
|
108
|
+
* orders it with session opens and deletes, and counts as the Environment's use.
|
|
73
109
|
*/
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
110
|
+
putEnvironmentSecret(environmentId: string, name: string, body: PutEnvironmentSecretRequest, actor: string): Promise<EnvironmentSecretView>;
|
|
111
|
+
/** The Environment's secrets: names, types and bindings, never values. */
|
|
112
|
+
listEnvironmentSecrets(environmentId: string): Promise<EnvironmentSecretView[]>;
|
|
113
|
+
getEnvironmentSecret(environmentId: string, name: string): Promise<EnvironmentSecretView>;
|
|
114
|
+
deleteEnvironmentSecret(environmentId: string, name: string, actor: string): Promise<{
|
|
115
|
+
id: string;
|
|
116
|
+
}>;
|
|
79
117
|
/**
|
|
80
118
|
* The variables a session's sandbox commands get (R2c, D50): each `environment_secret`'s name
|
|
81
|
-
* set to the sentinel, each `environment_variable`'s value,
|
|
82
|
-
*
|
|
83
|
-
* secrets bound to one host. Reads rows only; no plaintext. Run in the caller's transaction.
|
|
119
|
+
* set to the sentinel, and each `environment_variable`'s value, from the Environment's vault.
|
|
120
|
+
* Reads rows only; no plaintext. Run in the caller's transaction.
|
|
84
121
|
*/
|
|
85
|
-
|
|
86
|
-
environment: Record<string, string>;
|
|
87
|
-
secretHosts: Record<string, string>;
|
|
88
|
-
conflict?: string;
|
|
89
|
-
}>;
|
|
122
|
+
environmentVariables(t: Tx, environmentId: string | undefined): Promise<Record<string, string>>;
|
|
90
123
|
/**
|
|
91
|
-
* The header egress-gate sets on a request from
|
|
92
|
-
* `
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
124
|
+
* The header egress-gate sets on a request from Environment `environmentId`'s sandbox to
|
|
125
|
+
* `host` (R2c, D50): the `environment_secret` of its vault bound to `host`, its value unsealed
|
|
126
|
+
* and rendered into its format. `none` when no secret is bound to the host; `refused` when the
|
|
127
|
+
* sealed value cannot be read. One query and one unseal per call; nothing is cached (E3).
|
|
128
|
+
* Plaintext exists only in the returned header.
|
|
96
129
|
*/
|
|
97
130
|
releaseEnvironmentSecret(input: {
|
|
98
|
-
|
|
131
|
+
environmentId: string;
|
|
99
132
|
host: string;
|
|
100
133
|
}): Promise<{
|
|
101
134
|
status: "none";
|
|
@@ -108,16 +141,24 @@ export declare class VaultService {
|
|
|
108
141
|
status: "refused";
|
|
109
142
|
reason: "ambiguous" | "unreadable";
|
|
110
143
|
}>;
|
|
111
|
-
/** Whether
|
|
112
|
-
environmentSecretBound(
|
|
144
|
+
/** Whether an `environment_secret` of Environment `environmentId` is bound to `host`. */
|
|
145
|
+
environmentSecretBound(environmentId: string, host: string): Promise<boolean>;
|
|
146
|
+
/**
|
|
147
|
+
* The headers a request to `url` carries: the credential of the Environment's vault bound to
|
|
148
|
+
* it, or none (`unauthenticated`) without an Environment or such a credential.
|
|
149
|
+
*/
|
|
113
150
|
authorize(input: {
|
|
114
151
|
/** The session the request is made for; absent for a tool preview (R2b C12). */
|
|
115
152
|
sessionId?: string;
|
|
116
|
-
|
|
117
|
-
credentialSelections: readonly CredentialSelection[];
|
|
153
|
+
environmentId?: string;
|
|
118
154
|
url: string;
|
|
119
|
-
serverName?: string;
|
|
120
155
|
}): Promise<AuthorizeResult>;
|
|
156
|
+
/**
|
|
157
|
+
* What a session that names `request.environmentId` would send for each URL `manifest` names
|
|
158
|
+
* (`credentialNeeds`), decided as `authorize` decides a call: the credential of the
|
|
159
|
+
* Environment's vault bound to the URL. Reads no secret, writes no audit row.
|
|
160
|
+
*/
|
|
161
|
+
coverage(manifest: AgentManifest | WorkflowManifest, request: CredentialCoverageRequest): Promise<CredentialCoverage>;
|
|
121
162
|
getHostModel(): Promise<HostModelView>;
|
|
122
163
|
listHostProviders(): Promise<{
|
|
123
164
|
providers: HostModelProviderInfo[];
|
|
@@ -127,14 +168,17 @@ export declare class VaultService {
|
|
|
127
168
|
private replay;
|
|
128
169
|
/** Re-seals a user credential's payload with its new binding and returns the updated row. */
|
|
129
170
|
private writePayload;
|
|
130
|
-
|
|
171
|
+
/**
|
|
172
|
+
* The vault of a live Environment (not being deleted), or the 404 of a missing one. With
|
|
173
|
+
* `lock`, the Environment's row is locked until the transaction ends.
|
|
174
|
+
*/
|
|
175
|
+
private environmentVault;
|
|
131
176
|
private ensureHostVault;
|
|
132
177
|
private validateHostModel;
|
|
133
178
|
private insertHostCredential;
|
|
134
179
|
private hostModelView;
|
|
135
180
|
private setActiveProvider;
|
|
136
181
|
private deleteHostProviderRows;
|
|
137
|
-
private credentialRow;
|
|
138
182
|
private audit;
|
|
139
183
|
}
|
|
140
184
|
/** The host vault's model credential rows that parse. */
|