@nylorun/runtime 0.17.0-beta → 0.19.1-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.
Files changed (223) hide show
  1. package/CHANGELOG.md +155 -0
  2. package/README.md +89 -58
  3. package/dist/adapters/execution/restate.d.ts +1 -3
  4. package/dist/adapters/execution/restate.js +4 -31
  5. package/dist/adapters/replication/pgoutput.js +1 -1
  6. package/dist/adapters/sandbox/local.js +1 -1
  7. package/dist/adapters/sandbox/virtual.js +1 -1
  8. package/dist/api/ag-ui/routes.js +1 -1
  9. package/dist/api/ag-ui/translate.d.ts +1 -3
  10. package/dist/api/ag-ui/translate.js +2 -17
  11. package/dist/api/components.d.ts +4871 -2614
  12. package/dist/api/components.js +12 -11
  13. package/dist/api/gate/routes.d.ts +7 -8
  14. package/dist/api/gate/routes.js +58 -52
  15. package/dist/api/http/app.d.ts +6 -0
  16. package/dist/api/http/app.js +18 -14
  17. package/dist/api/http/define.d.ts +14 -2
  18. package/dist/api/http/define.js +34 -15
  19. package/dist/api/http/routes/access.d.ts +3 -3
  20. package/dist/api/http/routes/access.js +18 -17
  21. package/dist/api/http/routes/artifacts.js +2 -4
  22. package/dist/api/http/routes/files.d.ts +8 -0
  23. package/dist/api/http/routes/files.js +77 -0
  24. package/dist/api/http/routes/keys.d.ts +10 -0
  25. package/dist/api/http/routes/keys.js +64 -0
  26. package/dist/api/http/routes/me.js +5 -2
  27. package/dist/api/http/routes/reads.d.ts +66 -0
  28. package/dist/api/http/routes/reads.js +127 -0
  29. package/dist/api/http/routes/sandboxes.js +7 -4
  30. package/dist/api/http/routes/sessions.js +25 -8
  31. package/dist/api/http/routes/tenant.js +15 -18
  32. package/dist/api/http/routes/vaults.d.ts +10 -9
  33. package/dist/api/http/routes/vaults.js +27 -23
  34. package/dist/api/openapi.d.ts +10 -11
  35. package/dist/api/openapi.js +288 -63
  36. package/dist/artifacts/links.js +1 -1
  37. package/dist/core/flow-host.d.ts +44 -23
  38. package/dist/core/flow-host.js +88 -106
  39. package/dist/core/provider.d.ts +4 -1
  40. package/dist/core/provider.js +6 -1
  41. package/dist/core/sandbox-routes.d.ts +0 -9
  42. package/dist/core/sandbox-routes.js +2 -21
  43. package/dist/execution/memory.d.ts +4 -5
  44. package/dist/execution/memory.js +11 -25
  45. package/dist/execution/types.d.ts +3 -33
  46. package/dist/execution/types.js +2 -12
  47. package/dist/gates/http-tool.d.ts +86 -0
  48. package/dist/gates/http-tool.js +197 -0
  49. package/dist/gates/mcp-handler.d.ts +3 -0
  50. package/dist/gates/mcp-handler.js +1 -3
  51. package/dist/gates/meter.d.ts +2 -2
  52. package/dist/gates/meter.js +6 -0
  53. package/dist/gates/tenant-vaults.d.ts +5 -9
  54. package/dist/gates/tool-calls.d.ts +7 -15
  55. package/dist/gates/tool-calls.js +4 -4
  56. package/dist/gates/tool-client.d.ts +1 -1
  57. package/dist/gates/tool-client.js +23 -47
  58. package/dist/gates/tool-contract.d.ts +27 -39
  59. package/dist/gates/tool-contract.js +30 -21
  60. package/dist/gates/tool-gate.d.ts +25 -24
  61. package/dist/gates/tool-gate.js +11 -7
  62. package/dist/harness/calls.d.ts +10 -4
  63. package/dist/harness/calls.js +15 -6
  64. package/dist/harness/executors.d.ts +1 -1
  65. package/dist/harness/executors.js +17 -12
  66. package/dist/harness/main.d.ts +2 -2
  67. package/dist/harness/main.js +5 -13
  68. package/dist/harness/service.d.ts +4 -5
  69. package/dist/harness/service.js +9 -2
  70. package/dist/harness-api/in-process.js +2 -2
  71. package/dist/harness-api/record.d.ts +6 -3
  72. package/dist/harness-api/record.js +65 -72
  73. package/dist/harness-api/server.d.ts +1 -9
  74. package/dist/harness-api/server.js +19 -17
  75. package/dist/harness-api/start.js +1 -5
  76. package/dist/harness-api/workspace.js +2 -3
  77. package/dist/harness-api/ws-server.js +1 -1
  78. package/dist/host/app.d.ts +2 -9
  79. package/dist/host/app.js +15 -25
  80. package/dist/host/config-for.d.ts +1 -5
  81. package/dist/host/config-for.js +0 -3
  82. package/dist/host/config.d.ts +0 -5
  83. package/dist/host/create-host.d.ts +3 -33
  84. package/dist/host/create-host.js +18 -94
  85. package/dist/host/environment.d.ts +0 -3
  86. package/dist/host/environment.js +0 -9
  87. package/dist/host/gates.d.ts +4 -1
  88. package/dist/host/gates.js +3 -2
  89. package/dist/host/http.d.ts +1 -2
  90. package/dist/host/http.js +1 -7
  91. package/dist/host/index.d.ts +2 -2
  92. package/dist/host/index.js +2 -2
  93. package/dist/host/main.js +27 -34
  94. package/dist/host/operate.d.ts +29 -0
  95. package/dist/host/operate.js +223 -0
  96. package/dist/host/stack-config.d.ts +12 -12
  97. package/dist/host/stack-config.js +5 -32
  98. package/dist/index.d.ts +1 -1
  99. package/dist/index.js +1 -1
  100. package/dist/infra/workers.d.ts +1 -1
  101. package/dist/keys/keys.js +2 -2
  102. package/dist/management-openapi.json +6491 -0
  103. package/dist/mcp/connect.d.ts +8 -4
  104. package/dist/mcp/connect.js +6 -26
  105. package/dist/mcp/pool.d.ts +5 -9
  106. package/dist/mcp/pool.js +8 -19
  107. package/dist/mcp/snapshot.d.ts +8 -2
  108. package/dist/mcp/snapshot.js +29 -2
  109. package/dist/media.d.ts +1 -1
  110. package/dist/media.js +1 -1
  111. package/dist/model/pi-model.js +3 -0
  112. package/dist/openapi.json +9372 -17030
  113. package/dist/reads/access.d.ts +4 -0
  114. package/dist/reads/access.js +12 -0
  115. package/dist/reads/cursor.d.ts +11 -0
  116. package/dist/reads/cursor.js +80 -0
  117. package/dist/reads/types.d.ts +25 -0
  118. package/dist/reads/types.js +1 -0
  119. package/dist/sandbox/manager.d.ts +16 -0
  120. package/dist/sandbox/manager.js +40 -0
  121. package/dist/sandbox/session-sandbox.js +13 -3
  122. package/dist/sandbox/skills.d.ts +13 -0
  123. package/dist/sandbox/skills.js +46 -0
  124. package/dist/sandbox/types.d.ts +2 -2
  125. package/dist/store/ownership.d.ts +9 -0
  126. package/dist/store/ownership.js +13 -0
  127. package/dist/store/postgres/connect.d.ts +2 -0
  128. package/dist/store/postgres/connect.js +29 -0
  129. package/dist/store/postgres/drizzle/0011_key_roles.sql +3 -0
  130. package/dist/store/postgres/drizzle/0012_session_reads.sql +8 -0
  131. package/dist/store/postgres/drizzle/0013_definition_files.sql +16 -0
  132. package/dist/store/postgres/drizzle/0014_action_endpoints_removed.sql +2 -0
  133. package/dist/store/postgres/drizzle/meta/_journal.json +28 -0
  134. package/dist/store/postgres/reads.d.ts +3 -0
  135. package/dist/store/postgres/reads.js +272 -0
  136. package/dist/store/postgres/schema.d.ts +294 -489
  137. package/dist/store/postgres/schema.js +41 -76
  138. package/dist/store/postgres/store.js +51 -154
  139. package/dist/store/postgres/tenant.d.ts +34 -2
  140. package/dist/store/postgres/tenant.js +16 -32
  141. package/dist/store/types.d.ts +27 -96
  142. package/dist/store/types.js +0 -1
  143. package/dist/streams/control.d.ts +0 -2
  144. package/dist/streams/control.js +0 -5
  145. package/dist/streams/types.d.ts +1 -10
  146. package/dist/tenant/advance.d.ts +3 -3
  147. package/dist/tenant/advance.js +10 -7
  148. package/dist/tenant/auth.d.ts +14 -9
  149. package/dist/tenant/auth.js +24 -28
  150. package/dist/tenant/cause.d.ts +3 -3
  151. package/dist/tenant/cause.js +1 -1
  152. package/dist/tenant/commands.d.ts +2 -18
  153. package/dist/tenant/commands.js +35 -172
  154. package/dist/tenant/context.d.ts +14 -24
  155. package/dist/tenant/definition-files.d.ts +24 -0
  156. package/dist/tenant/definition-files.js +103 -0
  157. package/dist/tenant/effects.d.ts +18 -20
  158. package/dist/tenant/effects.js +56 -119
  159. package/dist/tenant/ephemeral.d.ts +7 -6
  160. package/dist/tenant/ephemeral.js +3 -11
  161. package/dist/tenant/host-token.js +1 -1
  162. package/dist/tenant/jwt.js +1 -1
  163. package/dist/tenant/module.d.ts +1 -4
  164. package/dist/tenant/module.js +3 -12
  165. package/dist/tenant/operator-keys.d.ts +34 -8
  166. package/dist/tenant/operator-keys.js +50 -18
  167. package/dist/tenant/outbound.d.ts +10 -1
  168. package/dist/tenant/outbound.js +44 -27
  169. package/dist/tenant/paths.d.ts +1 -1
  170. package/dist/tenant/paths.js +1 -3
  171. package/dist/tenant/principals.d.ts +11 -2
  172. package/dist/tenant/principals.js +27 -8
  173. package/dist/tenant/run-token.js +3 -3
  174. package/dist/tenant/runtime.d.ts +4 -6
  175. package/dist/tenant/runtime.js +19 -18
  176. package/dist/tenant/sandboxes.d.ts +4 -1
  177. package/dist/tenant/sandboxes.js +11 -0
  178. package/dist/tenant/scheduler.d.ts +1 -5
  179. package/dist/tenant/scheduler.js +2 -5
  180. package/dist/tenant/session-streams.d.ts +2 -1
  181. package/dist/tenant/session-streams.js +39 -5
  182. package/dist/tenant/session.d.ts +8 -41
  183. package/dist/tenant/session.js +0 -37
  184. package/dist/tenant/sessions.js +16 -8
  185. package/dist/tenant/signing-keys.d.ts +3 -3
  186. package/dist/tenant/signing-keys.js +5 -5
  187. package/dist/tenant/skill-tool.d.ts +20 -0
  188. package/dist/tenant/skill-tool.js +72 -0
  189. package/dist/tenant/slim.d.ts +1 -1
  190. package/dist/tenant/slim.js +1 -1
  191. package/dist/tenant/status.js +7 -12
  192. package/dist/tenant/store-pg.d.ts +15 -0
  193. package/dist/tenant/store-pg.js +7 -3
  194. package/dist/tenant/streams.d.ts +3 -10
  195. package/dist/tenant/streams.js +1 -24
  196. package/dist/tenant/sweep.js +0 -5
  197. package/dist/tenant/transcript.d.ts +2 -2
  198. package/dist/tenant/transcript.js +2 -2
  199. package/dist/tenant/types.d.ts +15 -22
  200. package/dist/tenant/worker.d.ts +1 -3
  201. package/dist/tenant/worker.js +3 -8
  202. package/dist/vault/sources.d.ts +7 -1
  203. package/dist/vault/sources.js +22 -11
  204. package/dist/version.d.ts +1 -1
  205. package/dist/version.js +1 -1
  206. package/package.json +4 -4
  207. package/dist/admin-openapi.json +0 -904
  208. package/dist/api/http/routes/actions.d.ts +0 -8
  209. package/dist/api/http/routes/actions.js +0 -75
  210. package/dist/api/http/routes/endpoints.d.ts +0 -7
  211. package/dist/api/http/routes/endpoints.js +0 -100
  212. package/dist/host/admin-api.d.ts +0 -30
  213. package/dist/host/admin-api.js +0 -140
  214. package/dist/mcp/stdio.d.ts +0 -17
  215. package/dist/mcp/stdio.js +0 -82
  216. package/dist/tenant/actions.d.ts +0 -14
  217. package/dist/tenant/actions.js +0 -29
  218. package/dist/tenant/delivery-token.d.ts +0 -41
  219. package/dist/tenant/delivery-token.js +0 -104
  220. package/dist/tenant/delivery.d.ts +0 -62
  221. package/dist/tenant/delivery.js +0 -481
  222. package/dist/tenant/endpoints.d.ts +0 -67
  223. package/dist/tenant/endpoints.js +0 -90
@@ -1,5 +1,5 @@
1
1
  import type { IncomingMessage, ServerResponse } from "node:http";
2
- import type { HarnessStatus, HostAggregate, HostTenant, TenantEnvelope } from "@nylorun/core/contracts";
2
+ import type { HarnessStatus, HostTenant, TenantEnvelope } from "@nylorun/core/contracts";
3
3
  import type { HarnessChannel } from "@nylorun/core/harness-api";
4
4
  import type { FlowLimits } from "../core/limits.js";
5
5
  import type { HarnessPeer } from "../harness-api/server.js";
@@ -7,23 +7,20 @@ import type { HostAuthority } from "../sandbox/join.js";
7
7
  import type { SessionStore } from "../store/types.js";
8
8
  import type { SandboxBackend } from "../sandbox/types.js";
9
9
  import type { TenantCause } from "./cause.js";
10
- import type { OperatorKeys } from "./operator-keys.js";
11
10
  import type { OutboundPolicy } from "./outbound.js";
12
11
  import type { ResolverConfig } from "../vault/sources.js";
13
12
  import type { TenantWorker } from "./worker.js";
14
13
  export type TenantMode = "shared" | "ephemeral" | "test";
15
14
  /**
16
15
  * The Tenant directory on the Host root (`<Host root>/tenant/`). The Tenant's data lives in
17
- * its database; this holds what stays on the Host: the vault key, plugin data, logs, and the
18
- * private home, tmp and sandbox directories.
16
+ * its database; this holds what stays on the Host: the vault key, logs, and the private home
17
+ * and sandbox directories.
19
18
  */
20
19
  export interface TenantPaths {
21
20
  root: string;
22
21
  kek: string;
23
22
  home: string;
24
- tmp: string;
25
23
  sandboxes: string;
26
- pluginData: string;
27
24
  /** The `fs` BlobStore's directory, used when the Host has no Object store. */
28
25
  blobs: string;
29
26
  logs: string;
@@ -55,18 +52,14 @@ export interface TenantConfig {
55
52
  steps?: number;
56
53
  ms?: number;
57
54
  };
58
- /**
59
- * How long a run waits in its lease for a pending Action's outcome (F6.2): the turn goes on
60
- * at once when the Action endpoint answers in time, and ends its segment as waiting (resumed
61
- * by replay) otherwise. Default 5 minutes; 0 never waits.
62
- */
63
- actionHoldMs?: number;
64
55
  /** Retries and timeouts for model calls (Model Calls §5, §6). Defaults in `piModel`. */
65
56
  modelCall?: import("../gates/model-gate.js").ModelCallSettings;
66
- childEnv: Readonly<Record<string, string>>;
67
- /** Action claim lease. Default 30 s. */
68
- /** How the Runtime may call Action endpoints (Host settings). Default: http and private addresses allowed. */
57
+ /**
58
+ * How the Runtime may call MCP servers and HTTP tools (Host settings). Default: http and
59
+ * private addresses allowed.
60
+ */
69
61
  delivery?: OutboundPolicy;
62
+ /** Bounds the default Tenant sweep interval (`sweepIntervalMs`). Default 30 s. */
70
63
  leaseMs?: number;
71
64
  /** Ownership lease of an advance (§10.6); renewed every third while it runs. Default 30 s. */
72
65
  ownerLeaseMs?: number;
@@ -110,9 +103,6 @@ export interface Logger {
110
103
  export interface TenantSummary {
111
104
  ready: boolean;
112
105
  runningSessions: number;
113
- /** Deliveries to Action endpoints in flight on this process. */
114
- inFlightDeliveries: number;
115
- pendingActions: number;
116
106
  uncertainEffects: number;
117
107
  /** The Tenant's harnesses (F6.2). */
118
108
  harness?: HarnessStatus;
@@ -143,8 +133,8 @@ export interface TenantHandle {
143
133
  attachHarness?(channel: HarnessChannel, peer: HarnessPeer): () => void;
144
134
  /** The Tenant's side of a sandbox pod's join (F7.2); absent without sandbox pods. */
145
135
  hostAuthority?(): HostAuthority | undefined;
146
- /** The Tenant's operator keys, for the Admin API (`/v1/admin/keys`, F9 I1). */
147
- operatorKeys?(): OperatorKeys;
136
+ /** The Tenant's harnesses (F6.2), for `/ready`. */
137
+ harnessStatus?(): HarnessStatus;
148
138
  }
149
139
  /**
150
140
  * The Host's Tenant for a request: open, or unavailable. `cause` says why when opening it
@@ -183,9 +173,10 @@ export interface TenantModule {
183
173
  * Undefined otherwise, or once the module is closed.
184
174
  */
185
175
  worker(id: string): Promise<TenantWorker | undefined>;
186
- /** The Tenant as `/v1/admin/status` reports it. */
176
+ /** The Tenant, open or why not. */
187
177
  tenant(): HostTenant;
188
- summarize(): Promise<HostAggregate>;
178
+ /** The open Tenant's harnesses (`/ready`); undefined while it is not open. */
179
+ harnessStatus(): HarnessStatus | undefined;
189
180
  close(): Promise<void>;
190
181
  }
191
182
  /**
@@ -208,6 +199,8 @@ export declare class TenantUnavailableError extends Error {
208
199
  }
209
200
  /** What the Tenant opener hands the Tenant Runtime it opens. */
210
201
  export interface OpenedTenant {
202
+ /** The isolated read pool, owned and closed with the Tenant. */
203
+ reads?: import("../reads/types.js").ReadStore;
211
204
  /**
212
205
  * The Tenant's opened Session Store. The Tenant Runtime owns it from here on and closes it
213
206
  * on close or on a failed open.
@@ -1,6 +1,6 @@
1
1
  import type { AbortReason } from "@nylorun/core/harness-api";
2
2
  import { RunAbort } from "@nylorun/harness/api";
3
- import type { AdvanceResult, DeliverResult, SandboxResult, SandboxTrigger, DurableExecution, StuckInvocation, WorkerHandlers } from "../execution/types.js";
3
+ import type { AdvanceResult, SandboxResult, SandboxTrigger, DurableExecution, StuckInvocation, WorkerHandlers } from "../execution/types.js";
4
4
  import type { Logger } from "./types.js";
5
5
  /** This process's Worker id: the `owner` it writes on the sessions it advances (§10.6). */
6
6
  export declare const WORKER_ID: string;
@@ -42,8 +42,6 @@ export interface TenantWorker {
42
42
  advance(sessionId: string, signal: AbortSignal): Promise<AdvanceResult>;
43
43
  /** One pass of the Tenant sweep. */
44
44
  sweep(): Promise<void>;
45
- /** Delivers one Action to its endpoint. Only infrastructure errors throw. */
46
- deliver?(actionId: string, signal: AbortSignal): Promise<DeliverResult>;
47
45
  /** Reconciles one pod sandbox (F7.2). Only infrastructure errors throw. */
48
46
  sandbox?(sandboxId: string, trigger: SandboxTrigger, signal: AbortSignal): Promise<SandboxResult>;
49
47
  }
@@ -4,15 +4,14 @@
4
4
  *
5
5
  * - `TenantWorker` is one open Tenant's handlers: `advance(sessionId, signal)` (§10.5, in
6
6
  * `advance.ts`), `sweep()` (the Tenant sweep, in `sweep.ts`) and, optionally,
7
- * `deliver(actionId, signal)` (one Action to its Action endpoint).
7
+ * `sandbox(sandboxId, trigger, signal)` (one pod sandbox's reconcile).
8
8
  * - `TenantWorkers` is the registry. Its `handlers` are the `WorkerHandlers` an execution is
9
9
  * started with; they dispatch by `tenantId` to the registered `TenantWorker`. A Tenant
10
10
  * registers when it opens and unregisters when it closes. A call for a Tenant that is not
11
11
  * open here asks the optional `resolve` hook (the Host's, which waits for its Tenant to
12
12
  * open, and knows no other); without one,
13
- * the advance and the delivery return `done` and the sweep does nothing. Nothing is lost:
14
- * the Tenant's sweep re-wakes its orphaned sessions once it is open again, and an Action
15
- * that was not delivered stays pending.
13
+ * the advance returns `done` and the sweep does nothing. Nothing is lost: the Tenant's
14
+ * sweep re-wakes its orphaned sessions once it is open again.
16
15
  * - `TenantExecution` pairs an execution with its registry. The Host creates one per process
17
16
  * (`host/execution.ts`) and passes it to its Tenant; a Tenant opened without one
18
17
  * (tests, ephemeral) gets its own in-process `MemoryExecution`.
@@ -136,10 +135,6 @@ export class TenantWorkers {
136
135
  sweep: async (tenantId) => {
137
136
  await (await this.find(tenantId))?.sweep();
138
137
  },
139
- deliver: async (tenantId, actionId, signal) => {
140
- const worker = await this.find(tenantId);
141
- return worker?.deliver ? worker.deliver(actionId, signal) : DONE;
142
- },
143
138
  sandbox: async (tenantId, sandboxId, trigger, signal) => {
144
139
  const worker = await this.find(tenantId);
145
140
  return worker?.sandbox ? worker.sandbox(sandboxId, trigger, signal) : {};
@@ -13,9 +13,15 @@ export interface CredentialSession {
13
13
  readonly vaultIds?: readonly string[];
14
14
  readonly credentialSelections?: readonly CredentialSelection[];
15
15
  }
16
- /** One MCP request: the declared server's URL, its name and the agent that declares it. */
16
+ /**
17
+ * One MCP request: the declared server's URL, its name and the agent that declares it. Or, with
18
+ * `kind: "http"`, an HTTP tool's request: its URL and its `credential` name as `serverName`.
19
+ */
17
20
  export interface McpCredentialRequest {
21
+ /** Default `mcp`. */
22
+ readonly kind?: "mcp" | "http";
18
23
  readonly url: string;
24
+ /** The server's name, or the HTTP tool's `credential`: what a credential selection names. */
19
25
  readonly serverName?: string;
20
26
  /** The agent used as a tool that declares the server; absent for the session's root agent. */
21
27
  readonly agentId?: string;
@@ -1,10 +1,11 @@
1
1
  /**
2
- * Where a session's MCP credential comes from (F9 C1): the session's attached vaults first,
3
- * then the operator's credential resolver, an HTTP service on the operator's own network that
4
- * holds people's own credentials (OSS never stores them, F9-D7).
2
+ * Where a session's MCP or HTTP tool credential comes from (F9 C1): the session's attached
3
+ * vaults first, then the operator's credential resolver, an HTTP service on the operator's own
4
+ * network that holds people's own credentials (OSS never stores them, F9-D7).
5
5
  *
6
- * Both authorize sites call this: the gateway (`gates/tenant-vaults.ts`, remote MCP servers in
7
- * the gates service) and the Tenant (`tenant/effects.ts`, the in-process MCP pool).
6
+ * Both authorize sites call this: the gateway (`gates/tenant-vaults.ts`, remote MCP servers and
7
+ * HTTP tools in the gates service) and the Tenant (`tenant/effects.ts`, the in-process MCP pool
8
+ * and Tool Gate).
8
9
  *
9
10
  * ## The resolver contract
10
11
  *
@@ -22,6 +23,9 @@
22
23
  * anything else, a bad body, or no answer in 5 s → refused: credential_unavailable
23
24
  * ```
24
25
  *
26
+ * An HTTP tool's request (R2 M3) names its `credential` instead of a server:
27
+ * `"target": { "kind": "http", "credential": "billing", "agent"?: "support", "url": "https://…" }`.
28
+ *
25
29
  * `owner` and `turn` come from the session row, never from the harness. Because authorize runs
26
30
  * on every MCP HTTP request, answers (200 and 404) are cached per (owner, url): until
27
31
  * `expiresAt`, at most 5 minutes, and 60 s without one. Concurrent misses for one key share one
@@ -122,12 +126,19 @@ export class CredentialSources {
122
126
  owner: session.ownerUserId,
123
127
  session: session.id,
124
128
  turn: session.activeTurnId ?? null,
125
- target: {
126
- kind: "mcp",
127
- ...(request.serverName ? { server: request.serverName } : {}),
128
- ...(request.agentId ? { agent: request.agentId } : {}),
129
- url,
130
- },
129
+ target: request.kind === "http"
130
+ ? {
131
+ kind: "http",
132
+ ...(request.serverName ? { credential: request.serverName } : {}),
133
+ ...(request.agentId ? { agent: request.agentId } : {}),
134
+ url,
135
+ }
136
+ : {
137
+ kind: "mcp",
138
+ ...(request.serverName ? { server: request.serverName } : {}),
139
+ ...(request.agentId ? { agent: request.agentId } : {}),
140
+ url,
141
+ },
131
142
  };
132
143
  try {
133
144
  const response = await this.fetchImpl(resolver.url, {
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const RUNTIME_VERSION = "0.17.0-beta";
1
+ export declare const RUNTIME_VERSION = "0.19.1-beta";
package/dist/version.js CHANGED
@@ -1,3 +1,3 @@
1
1
  // Kept in step with package.json by runtime/scripts/check-package.mjs, which runs in npm run check.
2
2
  // release:prepare also rewrites this when it bumps @nylorun/runtime.
3
- export const RUNTIME_VERSION = "0.17.0-beta";
3
+ export const RUNTIME_VERSION = "0.19.1-beta";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nylorun/runtime",
3
- "version": "0.17.0-beta",
3
+ "version": "0.19.1-beta",
4
4
  "description": "Nylorun Runtime: the agent execution Host on Postgres, Restate and S2, and model providers.",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -31,7 +31,7 @@
31
31
  "import": "./dist/configuration.js"
32
32
  },
33
33
  "./openapi.json": "./dist/openapi.json",
34
- "./admin-openapi.json": "./dist/admin-openapi.json",
34
+ "./management-openapi.json": "./dist/management-openapi.json",
35
35
  "./package.json": "./package.json"
36
36
  },
37
37
  "files": [
@@ -65,8 +65,8 @@
65
65
  "@hono/node-server": "^2.1.3",
66
66
  "@hono/zod-openapi": "^1.6.3",
67
67
  "@modelcontextprotocol/sdk": "^1.31.0",
68
- "@nylorun/core": "0.13.0-beta",
69
- "@nylorun/harness": "0.22.1-beta",
68
+ "@nylorun/core": "0.15.0-beta",
69
+ "@nylorun/harness": "0.23.0-beta",
70
70
  "@restatedev/restate-sdk": "1.17.2",
71
71
  "@s2-dev/streamstore": "0.28.0",
72
72
  "aws4fetch": "1.0.20",