@midsummer-ai/sdk 0.1.0-staging.3479 → 0.1.0-staging.3485

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/ai/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as late, t as here } from "../here-CeqGJW21.mjs";
1
+ import { n as late, t as here } from "../here-CLbmaWH4.mjs";
2
2
  //#region src/ai/index.ts
3
3
  /**
4
4
  * AI: Model calls from a Project's code, streamed or whole, each with the tokens and credits it spent.
package/client.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { m as StorageEngine } from "./index-Ci6mGXqz.mjs";
1
+ import { m as StorageEngine } from "./index-BNxl2RLQ.mjs";
2
2
  import { S3Credential } from "./s3.mjs";
3
3
  import { Transport } from "./wire.mjs";
4
4
  import { socket } from "./socket.mjs";
package/client.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as SOCKET_PATH, c as signedHttp, i as FRAMES_PATH, o as client, s as serveSigned } from "./src-CkP59_Qu.mjs";
1
+ import { a as FRAMES_PATH, c as serveSigned, l as signedHttp, o as SOCKET_PATH, s as client } from "./src-BfPJG4Zj.mjs";
2
2
  export { FRAMES_PATH, SOCKET_PATH, client, serveSigned, signedHttp };
package/contract.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { p as Storage } from "./index-Ci6mGXqz.mjs";
1
+ import { p as Storage } from "./index-BNxl2RLQ.mjs";
2
2
  //#region src/contract.d.ts
3
3
  interface ContractCase {
4
4
  /** A line of the specification. */
package/contract.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { t as StorageError } from "./errors-B1tO_wdm.mjs";
2
- import "./src-CkP59_Qu.mjs";
2
+ import "./src-BfPJG4Zj.mjs";
3
3
  //#region src/contract.ts
4
4
  /**
5
5
  * Storage's contract: what every engine promises, as cases any test runner can run. The Stand-in
@@ -1,4 +1,4 @@
1
- import { p as Storage } from "../index-Ci6mGXqz.mjs";
1
+ import { p as Storage } from "../index-BNxl2RLQ.mjs";
2
2
  import { t as AuthConfig } from "../auth-B7rCtXFQ.mjs";
3
3
  import { a as FileMetadata, c as FunctionReference, d as HttpRouter, n as CronJob, s as FunctionKind, v as RegisteredFunction, y as Row } from "../server-B5HK2Ou9.mjs";
4
4
  import { r as Built } from "../build-BhmOZmGQ.mjs";
@@ -1,4 +1,4 @@
1
- import { n as storage } from "../src-CkP59_Qu.mjs";
1
+ import { r as storage } from "../src-BfPJG4Zj.mjs";
2
2
  import { standIn } from "../stand-in.mjs";
3
3
  import { _ as shapeError, a as tagBytes, b as valueAt, f as indexFields, g as shapeAt, i as keyBytes, o as untagBytes, v as tableCode } from "../bytes-C2pcyl9u.mjs";
4
4
  import { A as comparePrefix, M as indexTuple, O as valueKey, S as nextCron, T as readLimited, _ as isFunction, a as Refusal, b as limits, i as NotFoundError, j as documentBytes, k as compareKey, l as fetchOver, o as TooLarge, r as InsufficientError, y as isRouter } from "../server-Drjni3-F.mjs";
package/email/client.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { d as MESSAGES_PATH, f as boundEmail, h as serveMessages, m as serveBound, p as client } from "../email-IH5OllU2.mjs";
1
+ import { d as MESSAGES_PATH, f as boundEmail, h as serveMessages, m as serveBound, p as client } from "../email-DkEDxvot.mjs";
2
2
  export { MESSAGES_PATH, boundEmail, client, serveBound, serveMessages };
@@ -1,4 +1,4 @@
1
- import { t as EmailError } from "../email-IH5OllU2.mjs";
1
+ import { t as EmailError } from "../email-DkEDxvot.mjs";
2
2
  //#region src/email/contract.ts
3
3
  /**
4
4
  * Email's contract: what every engine promises, as cases any test runner can run. The Stand-in runs
package/email/index.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { a as MAX_MESSAGE_BYTES, c as checkMessage, i as MAX_BATCH, l as email, n as MAX_ATTACHMENTS, o as MAX_RECIPIENTS, r as MAX_ATTACHMENT_BYTES, s as addressOf, t as EmailError, u as verifyWebhook } from "../email-IH5OllU2.mjs";
1
+ import { a as MAX_MESSAGE_BYTES, c as checkMessage, i as MAX_BATCH, l as email, n as MAX_ATTACHMENTS, o as MAX_RECIPIENTS, r as MAX_ATTACHMENT_BYTES, s as addressOf, t as EmailError, u as verifyWebhook } from "../email-DkEDxvot.mjs";
2
2
  export { EmailError, MAX_ATTACHMENTS, MAX_ATTACHMENT_BYTES, MAX_BATCH, MAX_MESSAGE_BYTES, MAX_RECIPIENTS, addressOf, checkMessage, email, verifyWebhook };
package/email/smtp.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { l as email, p as client, t as EmailError } from "../email-IH5OllU2.mjs";
1
+ import { l as email, p as client, t as EmailError } from "../email-DkEDxvot.mjs";
2
2
  import { createServer } from "node:net";
3
3
  import { createServer as createServer$1 } from "node:tls";
4
4
  //#region src/email/smtp.ts
@@ -1,4 +1,4 @@
1
- import { s as addressOf, t as EmailError } from "../email-IH5OllU2.mjs";
1
+ import { s as addressOf, t as EmailError } from "../email-DkEDxvot.mjs";
2
2
  //#region src/email/stand-in.ts
3
3
  /**
4
4
  * Email's Stand-in: the Capability's behaviour in memory, for `midsummer dev` and tests. It sends
@@ -1,4 +1,4 @@
1
- import { n as late, t as here } from "./here-CeqGJW21.mjs";
1
+ import { n as late, t as here } from "./here-CLbmaWH4.mjs";
2
2
  import { verifyEvent } from "./apps.mjs";
3
3
  //#region src/email/client.ts
4
4
  /**
@@ -0,0 +1,54 @@
1
+ //#region src/here.ts
2
+ /** The current request's handles, or undefined outside a deployment's request. */
3
+ function here() {
4
+ const read = globalThis[Symbol.for("midsummer.context")];
5
+ return read?.();
6
+ }
7
+ /** The process's environment, where `midsummer dev` puts its Stand-ins' addresses; empty where there is none. */
8
+ function processEnv() {
9
+ return globalThis.process?.env ?? {};
10
+ }
11
+ /**
12
+ * An engine whose every call goes to the one `current` gives at that moment: the request's own, made
13
+ * when the call is. `current` throws the product's own error when there is none. It may give the
14
+ * engine as a promise, for one whose every call returns a promise, as the queues engine does.
15
+ */
16
+ function late(current) {
17
+ const call = (engine, key, args) => {
18
+ const method = engine[key];
19
+ if (typeof method !== "function") throw new TypeError(`${String(key)} is not a call this engine takes.`);
20
+ return method.apply(engine, args);
21
+ };
22
+ return new Proxy({}, { get: (_target, key) => (...args) => {
23
+ const engine = current();
24
+ return engine instanceof Promise ? engine.then((found) => call(found, key, args)) : call(engine, key, args);
25
+ } });
26
+ }
27
+ /**
28
+ * Where a run's frames go when Midsummer gave it a Workload session (`MIDSUMMER_IDENTITY_REQUEST_TOKEN`), as a CI run,
29
+ * an agent's Live workspace and `midsummer dev --view` have: `path` on the API its identity token comes from, sent with
30
+ * the session's token, so `bucket` and `queue` reach what its environment binds, and a view's own copies on a view.
31
+ * Undefined outside one. `fail` makes the product's own error: `forbidden` for a session that has ended, `unavailable`
32
+ * for an API that can't be reached.
33
+ */
34
+ function workloadTransport(path, fail) {
35
+ const env = processEnv(), token = env.MIDSUMMER_IDENTITY_REQUEST_TOKEN, tokenUrl = env.MIDSUMMER_IDENTITY_TOKEN_URL;
36
+ if (!token || !tokenUrl) return void 0;
37
+ const url = `${new URL(tokenUrl).origin}${path}`;
38
+ return { async send(frame) {
39
+ const response = await fetch(url, {
40
+ method: "POST",
41
+ headers: {
42
+ authorization: `Bearer ${token}`,
43
+ "content-type": "application/octet-stream"
44
+ },
45
+ body: frame
46
+ }).catch(() => void 0);
47
+ if (!response) throw fail("unavailable", `Midsummer couldn't be reached at ${new URL(url).origin}.`);
48
+ if (response.status === 401) throw fail("forbidden", "This run's session with Midsummer has ended. Start the run again.");
49
+ if (response.status !== 200) throw fail("unavailable", `Midsummer answered ${response.status}.`);
50
+ return new Uint8Array(await response.arrayBuffer());
51
+ } };
52
+ }
53
+ //#endregion
54
+ export { workloadTransport as i, late as n, processEnv as r, here as t };
@@ -206,13 +206,16 @@ interface EngineList {
206
206
  readonly after?: string;
207
207
  readonly limit: number;
208
208
  }
209
+ /** Where a run's Storage frames go with its Workload token (`workloadTransport`). */
210
+ declare const WORKLOAD_PATH = "/storage/workload";
209
211
  /**
210
- * The bucket the environment binds under `name`, from code in a deployment in any framework, or
211
- * `midsummer dev`'s bucket of that name. Code that runs outside Midsummer connects with a storage
212
+ * The bucket the environment binds under `name`, from code in a deployment in any framework, in a run
213
+ * Midsummer starts (a CI run, an agent's Live workspace, `midsummer dev --view`; a view's own folder on
214
+ * a view), or `midsummer dev`'s bucket of that name. Code that runs outside Midsummer connects with a storage
212
215
  * key instead: `storage(client(origin, { key, secret }))`.
213
216
  */
214
217
  declare function bucket(name: string): Bucket;
215
218
  /** Storage over `engine`. */
216
219
  declare function storage(engine: StorageEngine): Storage;
217
220
  //#endregion
218
- export { StorageErrorReason as S, bucket as _, ListOptions as a, StorageError as b, ObjectStream as c, PutOptions as d, Range as f, Usage as g, StoredObject as h, EnginePut as i, Operations as l, StorageEngine as m, Bucket as n, Listing as o, Storage as p, EngineList as r, ObjectRead as s, Body as t, Part as u, storage as v, StorageErrorCode as x, streamsOf as y };
221
+ export { StorageErrorReason as C, StorageErrorCode as S, WORKLOAD_PATH as _, ListOptions as a, streamsOf as b, ObjectStream as c, PutOptions as d, Range as f, Usage as g, StoredObject as h, EnginePut as i, Operations as l, StorageEngine as m, Bucket as n, Listing as o, Storage as p, EngineList as r, ObjectRead as s, Body as t, Part as u, bucket as v, StorageError as x, storage as y };
package/index.d.mts CHANGED
@@ -1,2 +1,2 @@
1
- import { S as StorageErrorReason, _ as bucket, a as ListOptions, b as StorageError, c as ObjectStream, d as PutOptions, f as Range, g as Usage, h as StoredObject, i as EnginePut, l as Operations, m as StorageEngine, n as Bucket, o as Listing, p as Storage, r as EngineList, s as ObjectRead, t as Body, u as Part, v as storage, x as StorageErrorCode, y as streamsOf } from "./index-Ci6mGXqz.mjs";
2
- export { Body, Bucket, EngineList, EnginePut, ListOptions, Listing, ObjectRead, ObjectStream, Operations, Part, PutOptions, Range, Storage, StorageEngine, StorageError, type StorageErrorCode, type StorageErrorReason, StoredObject, Usage, bucket, storage, streamsOf };
1
+ import { C as StorageErrorReason, S as StorageErrorCode, _ as WORKLOAD_PATH, a as ListOptions, b as streamsOf, c as ObjectStream, d as PutOptions, f as Range, g as Usage, h as StoredObject, i as EnginePut, l as Operations, m as StorageEngine, n as Bucket, o as Listing, p as Storage, r as EngineList, s as ObjectRead, t as Body, u as Part, v as bucket, x as StorageError, y as storage } from "./index-BNxl2RLQ.mjs";
2
+ export { Body, Bucket, EngineList, EnginePut, ListOptions, Listing, ObjectRead, ObjectStream, Operations, Part, PutOptions, Range, Storage, StorageEngine, StorageError, type StorageErrorCode, type StorageErrorReason, StoredObject, Usage, WORKLOAD_PATH, bucket, storage, streamsOf };
package/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  import { t as StorageError } from "./errors-B1tO_wdm.mjs";
2
- import { n as storage, r as streamsOf, t as bucket } from "./src-CkP59_Qu.mjs";
3
- export { StorageError, bucket, storage, streamsOf };
2
+ import { i as streamsOf, n as bucket, r as storage, t as WORKLOAD_PATH } from "./src-BfPJG4Zj.mjs";
3
+ export { StorageError, WORKLOAD_PATH, bucket, storage, streamsOf };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@midsummer-ai/sdk",
3
- "version": "0.1.0-staging.3479",
3
+ "version": "0.1.0-staging.3485",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "description": "Midsummer's handles for an app's code: its Database, Storage, Queues, Vector DB, AI, Email and Agents, with stand-ins for tests.",
@@ -293,6 +293,8 @@ interface QueueEngine {
293
293
  }
294
294
  /** The suffix that marks a Queue's dead-letter Queue; no Queue's own name has a dot. */
295
295
  declare const DEAD = ".dead";
296
+ /** Where a run's Queues frames go with its Workload token (`workloadTransport`). */
297
+ declare const WORKLOAD_PATH = "/queues/workload";
296
298
  /** The delay before a Message's next delivery after its `attempt`-th: 10 seconds, doubling, at most 10 minutes. */
297
299
  declare function backoffMs(attempt: number): number;
298
300
  /** Stats' counts stop at this many. */
@@ -324,8 +326,9 @@ declare function checkReceive(options: {
324
326
  readonly maxAttempts: number;
325
327
  }): void;
326
328
  /**
327
- * The engine of the environment this code runs in: the request's own in a deployment, or `midsummer
328
- * dev`'s on this computer. Every call goes to the one current when it is made. Flows reach their
329
+ * The engine of the environment this code runs in: the request's own in a deployment, a run's
330
+ * through its Workload session (a CI run, an agent's Live workspace, `midsummer dev --view`; a view's
331
+ * own queue on a view), or `midsummer dev`'s on this computer. Every call goes to the one current when it is made. Flows reach their
329
332
  * Queues through it too.
330
333
  */
331
334
  declare function hereEngine(): QueueEngine;
@@ -337,4 +340,4 @@ declare function queue(name: string): Queue;
337
340
  /** Queues over `engine`: the Stand-in's in tests, or `hereEngine()`. */
338
341
  declare function queues(engine: QueueEngine): Queues;
339
342
  //#endregion
340
- export { DEAD, Delivery, EngineDelivery, EngineMessage, EngineRun, EngineStep, Json, MAX_BODY, MAX_WAIT_MS, Queue, QueueEngine, QueueError, QueueErrorCode, QueueStats, Queues, ReceiveOptions, RunStatus, STATS_CAP, SendOptions, StepWrite, backoffMs, bodyText, checkDelaySeconds, checkEngineQueue, checkEvent, checkKey, checkQueueName, checkReceipt, checkReceive, checkStepName, checkToken, checkVisibilityMs, hereEngine, invalid, queue, queueErrorCodes, queues };
343
+ export { DEAD, Delivery, EngineDelivery, EngineMessage, EngineRun, EngineStep, Json, MAX_BODY, MAX_WAIT_MS, Queue, QueueEngine, QueueError, QueueErrorCode, QueueStats, Queues, ReceiveOptions, RunStatus, STATS_CAP, SendOptions, StepWrite, WORKLOAD_PATH, backoffMs, bodyText, checkDelaySeconds, checkEngineQueue, checkEvent, checkKey, checkQueueName, checkReceipt, checkReceive, checkStepName, checkToken, checkVisibilityMs, hereEngine, invalid, queue, queueErrorCodes, queues };
package/queues/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as late, r as processEnv, t as here } from "../here-CeqGJW21.mjs";
1
+ import { i as workloadTransport, n as late, r as processEnv, t as here } from "../here-CLbmaWH4.mjs";
2
2
  //#region src/queues/index.ts
3
3
  /**
4
4
  * Queues: a Team's Queues of Messages, which the SDK reaches by the name an Environment binds each one
@@ -71,6 +71,8 @@ var QueueError = class extends Error {
71
71
  };
72
72
  /** The suffix that marks a Queue's dead-letter Queue; no Queue's own name has a dot. */
73
73
  const DEAD = ".dead";
74
+ /** Where a run's Queues frames go with its Workload token (`workloadTransport`). */
75
+ const WORKLOAD_PATH = "/queues/workload";
74
76
  /** The delay before a Message's next delivery after its `attempt`-th: 10 seconds, doubling, at most 10 minutes. */
75
77
  function backoffMs(attempt) {
76
78
  return Math.min(1e4 * 2 ** Math.max(0, attempt - 1), 6e5);
@@ -137,8 +139,9 @@ function checkReceive(options) {
137
139
  if (!whole(options.maxAttempts, 1, 100)) invalid("maxAttempts is 1 to 100");
138
140
  }
139
141
  /**
140
- * The engine of the environment this code runs in: the request's own in a deployment, or `midsummer
141
- * dev`'s on this computer. Every call goes to the one current when it is made. Flows reach their
142
+ * The engine of the environment this code runs in: the request's own in a deployment, a run's
143
+ * through its Workload session (a CI run, an agent's Live workspace, `midsummer dev --view`; a view's
144
+ * own queue on a view), or `midsummer dev`'s on this computer. Every call goes to the one current when it is made. Flows reach their
142
145
  * Queues through it too.
143
146
  */
144
147
  function hereEngine() {
@@ -158,6 +161,8 @@ function hereEngine() {
158
161
  if (!response || response.status !== 200) throw new QueueError("unavailable", "Queues could not be reached. Is midsummer dev still running?");
159
162
  return new Uint8Array(await response.arrayBuffer());
160
163
  } });
164
+ const transport = workloadTransport(WORKLOAD_PATH, (code, why) => new QueueError(code, why));
165
+ if (transport) return remoteOver(transport);
161
166
  throw new QueueError("forbidden", "This code runs outside Midsummer, so no environment binds a queue for it.");
162
167
  });
163
168
  }
@@ -237,4 +242,4 @@ function queues(engine) {
237
242
  } };
238
243
  }
239
244
  //#endregion
240
- export { DEAD, MAX_BODY, MAX_WAIT_MS, QueueError, STATS_CAP, backoffMs, bodyText, checkDelaySeconds, checkEngineQueue, checkEvent, checkKey, checkQueueName, checkReceipt, checkReceive, checkStepName, checkToken, checkVisibilityMs, hereEngine, invalid, queue, queueErrorCodes, queues };
245
+ export { DEAD, MAX_BODY, MAX_WAIT_MS, QueueError, STATS_CAP, WORKLOAD_PATH, backoffMs, bodyText, checkDelaySeconds, checkEngineQueue, checkEvent, checkKey, checkQueueName, checkReceipt, checkReceive, checkStepName, checkToken, checkVisibilityMs, hereEngine, invalid, queue, queueErrorCodes, queues };
package/s3.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { m as StorageEngine } from "./index-Ci6mGXqz.mjs";
1
+ import { m as StorageEngine } from "./index-BNxl2RLQ.mjs";
2
2
  //#region src/s3.d.ts
3
3
  /** What one access key may do. */
4
4
  interface S3Credential {
package/s3.mjs CHANGED
@@ -1,6 +1,6 @@
1
1
  import { t as StorageError } from "./errors-B1tO_wdm.mjs";
2
2
  import { a as checkMetadata, l as checkUploadId, m as sha256, n as checkBucketName, o as checkPartNumber, r as checkKey, s as checkParts } from "./names-Do0ot5Ha.mjs";
3
- import { r as streamsOf } from "./src-CkP59_Qu.mjs";
3
+ import { i as streamsOf } from "./src-BfPJG4Zj.mjs";
4
4
  //#region src/s3.ts
5
5
  /**
6
6
  * Storage over the S3 protocol, so the tools and SDKs that speak it reach a Project's Buckets
package/socket.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { m as StorageEngine } from "./index-Ci6mGXqz.mjs";
1
+ import { m as StorageEngine } from "./index-BNxl2RLQ.mjs";
2
2
  import { S3Credential } from "./s3.mjs";
3
3
  import { Transport } from "./wire.mjs";
4
4
  //#region src/socket.d.ts
package/socket.mjs CHANGED
@@ -1,2 +1,2 @@
1
- import { d as sign, f as socket, l as keyed, p as socketSession, u as sameHex } from "./src-CkP59_Qu.mjs";
1
+ import { d as sameHex, f as sign, m as socketSession, p as socket, u as keyed } from "./src-BfPJG4Zj.mjs";
2
2
  export { keyed, sameHex, sign, socket, socketSession };
@@ -1,7 +1,7 @@
1
1
  import { t as StorageError } from "./errors-B1tO_wdm.mjs";
2
2
  import { a as checkMetadata, c as checkRange, d as invalid, i as checkListLimit, l as checkUploadId, n as checkBucketName, o as checkPartNumber, r as checkKey, s as checkParts } from "./names-Do0ot5Ha.mjs";
3
3
  import { bucketsOf, remote, repeatable, serve } from "./wire.mjs";
4
- import { n as late, r as processEnv, t as here } from "./here-CeqGJW21.mjs";
4
+ import { i as workloadTransport, n as late, r as processEnv, t as here } from "./here-CLbmaWH4.mjs";
5
5
  //#region src/socket.ts
6
6
  /**
7
7
  * Storage's wire over a WebSocket: one connection carries every call, so a client pays for one HTTP
@@ -403,11 +403,14 @@ function streamsOf(engine, read, write) {
403
403
  ...uploadPartStream ? { uploadPartStream: (bucket, key, uploadId, partNumber, body, size, sha256) => uploadPartStream.call(engine, write(bucket), key, uploadId, partNumber, body, size, sha256) } : {}
404
404
  };
405
405
  }
406
+ /** Where a run's Storage frames go with its Workload token (`workloadTransport`). */
407
+ const WORKLOAD_PATH = "/storage/workload";
406
408
  /** `midsummer dev`'s Stand-in, reached once per process with the key it hands the code it runs. */
407
409
  let dev;
408
410
  /**
409
- * The bucket the environment binds under `name`, from code in a deployment in any framework, or
410
- * `midsummer dev`'s bucket of that name. Code that runs outside Midsummer connects with a storage
411
+ * The bucket the environment binds under `name`, from code in a deployment in any framework, in a run
412
+ * Midsummer starts (a CI run, an agent's Live workspace, `midsummer dev --view`; a view's own folder on
413
+ * a view), or `midsummer dev`'s bucket of that name. Code that runs outside Midsummer connects with a storage
411
414
  * key instead: `storage(client(origin, { key, secret }))`.
412
415
  */
413
416
  function bucket(name) {
@@ -425,6 +428,8 @@ function bucket(name) {
425
428
  };
426
429
  return dev.engine;
427
430
  }
431
+ const transport = workloadTransport(WORKLOAD_PATH, (code, why) => new StorageError(code, why));
432
+ if (transport) return remote(transport, { batch: true });
428
433
  throw new StorageError("forbidden", "This code runs outside Midsummer, so no environment binds a bucket for it. Connect with a storage key: storage(client(origin, { key, secret })).");
429
434
  })).bucket(name);
430
435
  }
@@ -517,4 +522,4 @@ async function bytesOfBlob(body) {
517
522
  return new Uint8Array(await body.arrayBuffer());
518
523
  }
519
524
  //#endregion
520
- export { SOCKET_PATH as a, signedHttp as c, sign as d, socket as f, FRAMES_PATH as i, keyed as l, storage as n, client as o, socketSession as p, streamsOf as r, serveSigned as s, bucket as t, sameHex as u };
525
+ export { FRAMES_PATH as a, serveSigned as c, sameHex as d, sign as f, streamsOf as i, signedHttp as l, socketSession as m, bucket as n, SOCKET_PATH as o, socket as p, storage as r, client as s, WORKLOAD_PATH as t, keyed as u };
package/stand-in.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { m as StorageEngine } from "./index-Ci6mGXqz.mjs";
1
+ import { m as StorageEngine } from "./index-BNxl2RLQ.mjs";
2
2
  //#region src/stand-in.d.ts
3
3
  declare function standIn(options: {
4
4
  readonly clock: () => number;
@@ -1,4 +1,4 @@
1
- import { m as StorageEngine, t as Body } from "../index-Ci6mGXqz.mjs";
1
+ import { m as StorageEngine, t as Body } from "../index-BNxl2RLQ.mjs";
2
2
  import { n as AuthProvider, r as VerifierOptions } from "../auth-B7rCtXFQ.mjs";
3
3
  //#region src/storage/files.d.ts
4
4
  /** Whether a rule only reads its folder, or reads, puts and deletes in it. */
package/vector/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { n as late, t as here } from "../here-CeqGJW21.mjs";
1
+ import { n as late, t as here } from "../here-CLbmaWH4.mjs";
2
2
  import { C as checked, S as Vectors, T as vectorErrorCodes, _ as MAX_VALUE, b as Query, c as Ids, d as MAX_DIMENSION, f as MAX_FULL_TEXT, g as MAX_TOP_K, h as MAX_TEXT, i as remote, l as List, m as MAX_QUERIES, p as MAX_METADATA_BYTES, s as Aggregation, u as MAX_BATCH, v as MultiQuery, w as VectorError, x as TextSearch, y as NamespaceName } from "../wire-BdNDzlIN.mjs";
3
3
  //#region src/vector/index.ts
4
4
  /**
package/wire.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { m as StorageEngine } from "./index-Ci6mGXqz.mjs";
1
+ import { m as StorageEngine } from "./index-BNxl2RLQ.mjs";
2
2
  //#region src/wire.d.ts
3
3
  /** Carries one request frame to a server and brings back its answer frame. */
4
4
  interface Transport {
package/here-CeqGJW21.mjs DELETED
@@ -1,28 +0,0 @@
1
- //#region src/here.ts
2
- /** The current request's handles, or undefined outside a deployment's request. */
3
- function here() {
4
- const read = globalThis[Symbol.for("midsummer.context")];
5
- return read?.();
6
- }
7
- /** The process's environment, where `midsummer dev` puts its Stand-ins' addresses; empty where there is none. */
8
- function processEnv() {
9
- return globalThis.process?.env ?? {};
10
- }
11
- /**
12
- * An engine whose every call goes to the one `current` gives at that moment: the request's own, made
13
- * when the call is. `current` throws the product's own error when there is none. It may give the
14
- * engine as a promise, for one whose every call returns a promise, as the queues engine does.
15
- */
16
- function late(current) {
17
- const call = (engine, key, args) => {
18
- const method = engine[key];
19
- if (typeof method !== "function") throw new TypeError(`${String(key)} is not a call this engine takes.`);
20
- return method.apply(engine, args);
21
- };
22
- return new Proxy({}, { get: (_target, key) => (...args) => {
23
- const engine = current();
24
- return engine instanceof Promise ? engine.then((found) => call(found, key, args)) : call(engine, key, args);
25
- } });
26
- }
27
- //#endregion
28
- export { late as n, processEnv as r, here as t };