zitejs 0.10.0-start.23 → 0.10.0-start.24

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/dist/cjs/cli.js CHANGED
@@ -87,7 +87,7 @@ async function main() {
87
87
  console.error("A Start app under `vite dev` reaches Zite's data and services with these, from the app's .env:");
88
88
  console.error(" ZITE_DEV_API_KEY Your Zite API key, as the MCP takes it: mints dev tokens for the app zite.config.json's id names; each lasts 15 minutes and is renewed before it expires");
89
89
  console.error(' ZITE_DEV_TOKEN A dev token to use as it is instead, never renewed');
90
- console.error(' ZITE_URLS JSON naming the platform: {"baseRunner","backend","aiGateway"?,"runs"?,"email"?,"pdf"?,"uploads"?,"steps"?}; a service it doesn\'t name is the backend\'s');
90
+ console.error(' ZITE_URLS JSON naming the platform: {"baseRunner","backend","gateway"?,"runs"?,"email"?,"pdf"?,"uploads"?,"steps"?}; a service it doesn\'t name is the backend\'s');
91
91
  console.error(' ZITE_DEV_USER JSON of the signed-in stand-in: {"id","email","name"?,"roles"?,"isInternal"?}; unset, nobody is');
92
92
  process.exit(1);
93
93
  }
@@ -12,10 +12,10 @@ const expiresWithin = (token, ms) => {
12
12
  const claims = (0, appToken_js_1.appTokenClaims)(token);
13
13
  return claims !== undefined && claims.exp * 1000 - Date.now() < ms;
14
14
  };
15
- const URL_NAMES = ["baseRunner", "backend", "aiGateway", "runs", "email", "pdf", "uploads", "steps"];
16
- // `local` may leave out the AI gateway (a call on Zite's AI key is then refused), `runs` (a preview sends no analytics,
15
+ const URL_NAMES = ["baseRunner", "backend", "gateway", "runs", "email", "pdf", "uploads", "steps"];
16
+ // `local` may leave out the gateway (a call on Zite's AI key is then refused), `runs` (a preview sends no analytics,
17
17
  // and `local` keeps no run detail) and each service's own URL (the backend then answers it).
18
- const OPTIONAL_URLS = new Set(["aiGateway", "runs", "email", "pdf", "uploads", "steps"]);
18
+ const OPTIONAL_URLS = new Set(["gateway", "runs", "email", "pdf", "uploads", "steps"]);
19
19
  const trimmed = (urls) => Object.fromEntries(URL_NAMES.flatMap((name) => (urls[name] ? [[name, urls[name].replace(/\/+$/, "")]] : [])));
20
20
  const ziteProvider = (props) => {
21
21
  let current = props.appToken;
@@ -60,7 +60,7 @@ const localUrls = (raw) => {
60
60
  const given = (parsed ?? {});
61
61
  const isUrl = (value) => typeof value === "string" && /^https?:\/\//.test(value);
62
62
  if (URL_NAMES.some((name) => (given[name] === undefined ? !OPTIONAL_URLS.has(name) : !isUrl(given[name])))) {
63
- throw new Error(`${exports.LOCAL_ENV.urls} must be JSON naming the baseRunner and backend URLs, and may name aiGateway, runs, email, pdf, uploads and steps`);
63
+ throw new Error(`${exports.LOCAL_ENV.urls} must be JSON naming the baseRunner and backend URLs, and may name gateway, runs, email, pdf, uploads and steps`);
64
64
  }
65
65
  return trimmed(given);
66
66
  };
@@ -94,7 +94,7 @@ export type FetchRecord = {
94
94
  ai?: AiUsageRecord;
95
95
  };
96
96
  /**
97
- * Where the platform's services answer this app: `aiGateway` takes calls on Zite's AI key, `runs` a live page's
97
+ * Where the platform's services answer this app: `gateway` takes calls on a key Zite pays for, `runs` a live page's
98
98
  * analytics and each request's run detail. `email`, `pdf`, `uploads` (the upload session) and `steps` (a workflow
99
99
  * run's saved steps) are each that service's own endpoint, which the platform picks per workspace; without one, the
100
100
  * backend's route answers it.
@@ -102,7 +102,7 @@ export type FetchRecord = {
102
102
  export type PlatformUrls = {
103
103
  baseRunner: string;
104
104
  backend: string;
105
- aiGateway?: string;
105
+ gateway?: string;
106
106
  runs?: string;
107
107
  email?: string;
108
108
  pdf?: string;
@@ -288,7 +288,7 @@ export type HostRequestState = {
288
288
  sql: () => Promise<() => void>;
289
289
  };
290
290
  /** This request's calls on Zite's AI key waiting on the gateway's answer, capped as the host once capped them. */
291
- aiSlots?: () => Promise<() => void>;
291
+ gatewaySlots?: () => Promise<() => void>;
292
292
  /** This request's router, so a page's status can follow the error it rendered. */
293
293
  router?: unknown;
294
294
  /** The platform's head entries for its pages; unset when the host writes them itself. */
package/dist/esm/cli.js CHANGED
@@ -52,7 +52,7 @@ async function main() {
52
52
  console.error("A Start app under `vite dev` reaches Zite's data and services with these, from the app's .env:");
53
53
  console.error(" ZITE_DEV_API_KEY Your Zite API key, as the MCP takes it: mints dev tokens for the app zite.config.json's id names; each lasts 15 minutes and is renewed before it expires");
54
54
  console.error(' ZITE_DEV_TOKEN A dev token to use as it is instead, never renewed');
55
- console.error(' ZITE_URLS JSON naming the platform: {"baseRunner","backend","aiGateway"?,"runs"?,"email"?,"pdf"?,"uploads"?,"steps"?}; a service it doesn\'t name is the backend\'s');
55
+ console.error(' ZITE_URLS JSON naming the platform: {"baseRunner","backend","gateway"?,"runs"?,"email"?,"pdf"?,"uploads"?,"steps"?}; a service it doesn\'t name is the backend\'s');
56
56
  console.error(' ZITE_DEV_USER JSON of the signed-in stand-in: {"id","email","name"?,"roles"?,"isInternal"?}; unset, nobody is');
57
57
  process.exit(1);
58
58
  }
@@ -2,18 +2,18 @@
2
2
  * Every fetch an app makes on the server, wrapped as classic's runtime wraps
3
3
  * it: logged, every secret it knows redacted, with the connection whose token
4
4
  * it carries and what an org's own AI key used; a 401 on a connection's token
5
- * refreshed and sent once more; and a call on Zite's own AI key sent to the
6
- * AI gateway on the request's app token.
5
+ * refreshed and sent once more; and a call on Zite's own AI key sent to Zite's
6
+ * gateway on the request's app token.
7
7
  */
8
8
  import type { HostRequestState } from "./types.js";
9
9
  /** At the gateway, the connection a call on Zite's AI key bills to: the marker's, which the token takes the place of. */
10
- export declare const AI_CONNECTION_HEADER = "x-zite-ai-connection";
10
+ export declare const GATEWAY_CONNECTION_HEADER = "x-zite-gateway-connection";
11
11
  /** An `integrations.get` answer, whose values name the calls that carry them. */
12
12
  export declare const rememberConnection: (host: HostRequestState, name: string, connection: unknown) => void;
13
13
  /** An `integrations.get` answer with each token this isolate has since refreshed swapped for its replacement. */
14
14
  export declare const withRefreshedTokens: (answer: unknown) => unknown;
15
15
  /** A connection on Zite's AI key as `integrations.get` answers it, its `baseUrl` at the provider's gateway. */
16
- export declare const withAiGatewayUrl: (host: HostRequestState, answer: unknown) => unknown;
16
+ export declare const withGatewayUrl: (host: HostRequestState, answer: unknown) => unknown;
17
17
  export declare const createOutboundFetch: (nativeFetch: typeof fetch) => typeof fetch;
18
18
  /** Wraps the global fetch once. Next patches fetch for the same reason: the run log must hear of each. */
19
19
  export declare const watchOutboundFetches: () => void;
@@ -2,8 +2,8 @@
2
2
  * Every fetch an app makes on the server, wrapped as classic's runtime wraps
3
3
  * it: logged, every secret it knows redacted, with the connection whose token
4
4
  * it carries and what an org's own AI key used; a 401 on a connection's token
5
- * refreshed and sent once more; and a call on Zite's own AI key sent to the
6
- * AI gateway on the request's app token.
5
+ * refreshed and sent once more; and a call on Zite's own AI key sent to Zite's
6
+ * gateway on the request's app token.
7
7
  */
8
8
  import { isPlatformRequest } from "../internal/platformFetch.js";
9
9
  import { AI_USAGE_HOSTS, meterAiResponse, withStreamUsage } from "./aiUsage.js";
@@ -17,11 +17,11 @@ const MIN_TOKEN_LENGTH = 8;
17
17
  // As classic: Workers send no User-Agent, and some APIs (GitHub) refuse a request without one.
18
18
  const DEFAULT_USER_AGENT = "zite";
19
19
  // The backend's stand-in for Zite's own AI key, naming the connection a call bills to. Nowhere is it a key.
20
- const AI_MARKER = /^zite_ai_gateway:[a-z]+:(.+)$/;
21
- // The gateway's name in a connection's `baseUrl`, which zitejs resolves to the provider's `urls.aiGateway`.
22
- const AI_HOST = "zite-ai.invalid";
20
+ const GATEWAY_MARKER = /^zite_gateway:[a-z]+:(.+)$/;
21
+ // The gateway's name in a connection's `baseUrl`, which zitejs resolves to the provider's `urls.gateway`.
22
+ const GATEWAY_HOST = "zite-gateway.invalid";
23
23
  /** At the gateway, the connection a call on Zite's AI key bills to: the marker's, which the token takes the place of. */
24
- export const AI_CONNECTION_HEADER = "x-zite-ai-connection";
24
+ export const GATEWAY_CONNECTION_HEADER = "x-zite-gateway-connection";
25
25
  // A provider's own base URL at the host: `/v1` is OpenAI's, Anthropic's SDK sends it in the path.
26
26
  const AI_PROVIDER_HOSTS = {
27
27
  "api.openai.com": { provider: "openai", strip: "/v1" },
@@ -36,7 +36,7 @@ const SECRET_HEADER = /auth|key|token|secret|signature|password|cookie|session/i
36
36
  // Usage still being read when the request's log is flushed isn't waited on for longer.
37
37
  const USAGE_WAIT_MS = 10_000;
38
38
  // A request's calls on Zite's AI key at once, until each is answered, as the host once had them.
39
- const AI_CONCURRENCY = 4;
39
+ const GATEWAY_CONCURRENCY = 4;
40
40
  // Tokens refreshed in this isolate, which a later request's props may not name yet.
41
41
  const MAX_REFRESHED = 50;
42
42
  const refreshedTokens = new Map();
@@ -93,7 +93,7 @@ const secretsOf = (host) => {
93
93
  const values = new Set([...refreshedTokens.keys(), ...replacements.values()]);
94
94
  // A connection's own URL (an instance, an account) says which call failed; a user's secret may be a URL.
95
95
  const add = (value, urls) => {
96
- if (typeof value !== "string" || value.length < MIN_TOKEN_LENGTH || AI_MARKER.test(value))
96
+ if (typeof value !== "string" || value.length < MIN_TOKEN_LENGTH || GATEWAY_MARKER.test(value))
97
97
  return;
98
98
  if (urls || !isUrl(value))
99
99
  values.add(value);
@@ -113,7 +113,7 @@ const secretsOf = (host) => {
113
113
  /** The values a request's own credential headers carry, which the log redacts too. */
114
114
  const headerSecrets = (headers) => [...headers].flatMap(([name, value]) => {
115
115
  const secret = bare(value);
116
- return SECRET_HEADER.test(name) && secret.length >= MIN_TOKEN_LENGTH && !AI_MARKER.test(secret) ? [secret] : [];
116
+ return SECRET_HEADER.test(name) && secret.length >= MIN_TOKEN_LENGTH && !GATEWAY_MARKER.test(secret) ? [secret] : [];
117
117
  });
118
118
  /** `text` cut to `max`, every secret in it redacted, none cut in half first, however it was written. */
119
119
  const loggable = (text, secrets, max) => {
@@ -228,9 +228,9 @@ const swapHeaders = (headers, from, to) => {
228
228
  headers.set(name, value.split(from).join(to));
229
229
  }
230
230
  };
231
- /** The provider's AI gateway, from `urls.aiGateway`. */
231
+ /** The provider's gateway, from `urls.gateway`. */
232
232
  const gatewayOf = (host) => {
233
- const configured = host.provider?.urls?.aiGateway;
233
+ const configured = host.provider?.urls?.gateway;
234
234
  if (!configured)
235
235
  return undefined;
236
236
  try {
@@ -249,10 +249,10 @@ const underBase = (url, basePath) => {
249
249
  return { provider, path: `/${rest.join("/")}${url.search}` };
250
250
  };
251
251
  /** A call on Zite's AI key, whether the app named the provider, the `baseUrl` it was given, or the gateway itself. */
252
- const aiCallOf = (url, headers, gateway) => {
253
- const found = [...headers].map(([, value]) => AI_MARKER.exec(bare(value))).find(Boolean);
252
+ const gatewayCallOf = (url, headers, gateway) => {
253
+ const found = [...headers].map(([, value]) => GATEWAY_MARKER.exec(bare(value))).find(Boolean);
254
254
  const marker = found ? { marker: found[0], connection: found[1] } : { marker: undefined, connection: undefined };
255
- if (url.hostname === AI_HOST) {
255
+ if (url.hostname === GATEWAY_HOST) {
256
256
  const route = underBase(url, "");
257
257
  return route && { ...route, ...marker };
258
258
  }
@@ -269,7 +269,7 @@ const aiCallOf = (url, headers, gateway) => {
269
269
  return { provider: route.provider, path: `${path}${url.search}`, ...marker };
270
270
  };
271
271
  /** A connection on Zite's AI key as `integrations.get` answers it, its `baseUrl` at the provider's gateway. */
272
- export const withAiGatewayUrl = (host, answer) => {
272
+ export const withGatewayUrl = (host, answer) => {
273
273
  const gateway = gatewayOf(host);
274
274
  const baseUrl = answer?.baseUrl;
275
275
  if (!gateway || typeof baseUrl !== "string" || !answer || typeof answer !== "object")
@@ -281,7 +281,7 @@ export const withAiGatewayUrl = (host, answer) => {
281
281
  catch {
282
282
  return answer;
283
283
  }
284
- if (url.hostname !== AI_HOST)
284
+ if (url.hostname !== GATEWAY_HOST)
285
285
  return answer;
286
286
  return { ...answer, baseUrl: `${gateway.origin}${gateway.pathname.replace(/\/+$/, "")}${url.pathname}` };
287
287
  };
@@ -320,24 +320,24 @@ const freshToken = async (host, token, connection) => {
320
320
  }
321
321
  return value;
322
322
  };
323
- const aiRefusal = (status, type, message) => Response.json({ error: { type, code: type, message } }, { status });
324
- const aiUnavailable = (host) => aiRefusal(503, "unavailable", host.provider?.kind === "local"
325
- ? "Zite's AI key needs the AI gateway: name aiGateway in ZITE_URLS"
326
- : "Zite's AI key needs the platform's AI gateway, which this request wasn't given");
323
+ const refusal = (status, type, message) => Response.json({ error: { type, code: type, message } }, { status });
324
+ const gatewayUnavailable = (host) => refusal(503, "unavailable", host.provider?.kind === "local"
325
+ ? "Zite's AI key needs Zite's gateway: name gateway in ZITE_URLS"
326
+ : "Zite's AI key needs Zite's gateway, which this request wasn't given");
327
327
  /**
328
328
  * A call on Zite's AI key at the gateway, the marker swapped for the request's app token. The token goes to the
329
329
  * gateway's origin alone: the target is built from it, and a redirect is handed back rather than followed.
330
330
  */
331
- const toAiGateway = async (nativeFetch, base, headers, call, gateway, token) => {
331
+ const toGateway = async (nativeFetch, base, headers, call, gateway, token) => {
332
332
  const target = new URL(`${gateway.origin}${gateway.pathname.replace(/\/+$/, "")}/${call.provider}${call.path}`);
333
333
  const sent = new Headers(headers);
334
- sent.delete(AI_CONNECTION_HEADER);
334
+ sent.delete(GATEWAY_CONNECTION_HEADER);
335
335
  sent.delete("content-length");
336
336
  // As for a connection's call: a Node SDK that asks for gzip inflates a body Workers already inflated.
337
337
  sent.delete("accept-encoding");
338
338
  if (call.marker && call.connection) {
339
339
  swapHeaders(sent, call.marker, token);
340
- sent.set(AI_CONNECTION_HEADER, call.connection);
340
+ sent.set(GATEWAY_CONNECTION_HEADER, call.connection);
341
341
  }
342
342
  // Whole, so it goes with its length and the gateway holds only what it is.
343
343
  const body = base.body ? await base.arrayBuffer() : undefined;
@@ -360,8 +360,8 @@ export const createOutboundFetch = (nativeFetch) => async (input, init) => {
360
360
  headers.set("user-agent", DEFAULT_USER_AGENT);
361
361
  const method = (init?.method ?? (input instanceof Request ? input.method : "GET")).toUpperCase();
362
362
  const gateway = gatewayOf(host);
363
- const ai = aiCallOf(url, headers, gateway);
364
- const found = ai ? undefined : carried(headers, url, tokensOf(host));
363
+ const gatewayCall = gatewayCallOf(url, headers, gateway);
364
+ const found = gatewayCall ? undefined : carried(headers, url, tokensOf(host));
365
365
  const startedAt = Date.now();
366
366
  const sentBody = bodyText(init?.body);
367
367
  const sentHeaderSecrets = headerSecrets(headers);
@@ -369,7 +369,7 @@ export const createOutboundFetch = (nativeFetch) => async (input, init) => {
369
369
  const fetches = (host.fetches ??= []);
370
370
  if (fetches.length >= MAX_FETCHES)
371
371
  return undefined;
372
- const connection = ai?.connection ?? found?.connection;
372
+ const connection = gatewayCall?.connection ?? found?.connection;
373
373
  const secrets = [...sentHeaderSecrets, ...secretsOf(host)].sort((a, b) => b.length - a.length);
374
374
  const bodyRoom = Math.min(MAX_BODY_CHARS, MAX_LOGGED_CHARS - (host.fetchLogChars ?? 0));
375
375
  const requestBody = sentBody !== undefined && bodyRoom > 0 ? loggable(sentBody, secrets, bodyRoom) : undefined;
@@ -386,13 +386,13 @@ export const createOutboundFetch = (nativeFetch) => async (input, init) => {
386
386
  error: loggable(outcome.error instanceof Error ? outcome.error.message : String(outcome.error), secrets, MAX_ERROR_CHARS),
387
387
  }),
388
388
  ...(connection && { connection }),
389
- ...(ai && { ziteAi: true }),
389
+ ...(gatewayCall && { ziteAi: true }),
390
390
  ...(outcome.retried && { retried: true }),
391
391
  };
392
392
  fetches.push(entry);
393
393
  return entry;
394
394
  };
395
- if (!ai && !found) {
395
+ if (!gatewayCall && !found) {
396
396
  try {
397
397
  // The app's own call, `cf` and all; only the headers are ours.
398
398
  const response = await nativeFetch(input, { ...init, headers });
@@ -410,19 +410,19 @@ export const createOutboundFetch = (nativeFetch) => async (input, init) => {
410
410
  if (usageBody !== undefined)
411
411
  headers.delete("content-length");
412
412
  const base = new Request(input, usageBody === undefined ? init : { ...init, body: usageBody });
413
- if (ai) {
413
+ if (gatewayCall) {
414
414
  try {
415
415
  // As the gateway and the host refuse it: a demo has no AI on Zite's key.
416
416
  if (host.mode === "demo") {
417
- const refused = aiRefusal(403, "permission_denied", DEMO_UNAVAILABLE_MESSAGE);
417
+ const refused = refusal(403, "permission_denied", DEMO_UNAVAILABLE_MESSAGE);
418
418
  record({ status: refused.status });
419
419
  return refused;
420
420
  }
421
421
  const access = gateway ? await directAccess(host) : undefined;
422
422
  if (gateway && access) {
423
- const release = await (host.aiSlots ??= limiter(AI_CONCURRENCY))();
423
+ const release = await (host.gatewaySlots ??= limiter(GATEWAY_CONCURRENCY))();
424
424
  try {
425
- const response = await toAiGateway(nativeFetch, base, headers, ai, gateway, access.token);
425
+ const response = await toGateway(nativeFetch, base, headers, gatewayCall, gateway, access.token);
426
426
  record({ status: response.status });
427
427
  return response;
428
428
  }
@@ -430,7 +430,7 @@ export const createOutboundFetch = (nativeFetch) => async (input, init) => {
430
430
  release();
431
431
  }
432
432
  }
433
- const refused = aiUnavailable(host);
433
+ const refused = gatewayUnavailable(host);
434
434
  record({ status: refused.status });
435
435
  return refused;
436
436
  }
@@ -9,10 +9,10 @@ const expiresWithin = (token, ms) => {
9
9
  const claims = appTokenClaims(token);
10
10
  return claims !== undefined && claims.exp * 1000 - Date.now() < ms;
11
11
  };
12
- const URL_NAMES = ["baseRunner", "backend", "aiGateway", "runs", "email", "pdf", "uploads", "steps"];
13
- // `local` may leave out the AI gateway (a call on Zite's AI key is then refused), `runs` (a preview sends no analytics,
12
+ const URL_NAMES = ["baseRunner", "backend", "gateway", "runs", "email", "pdf", "uploads", "steps"];
13
+ // `local` may leave out the gateway (a call on Zite's AI key is then refused), `runs` (a preview sends no analytics,
14
14
  // and `local` keeps no run detail) and each service's own URL (the backend then answers it).
15
- const OPTIONAL_URLS = new Set(["aiGateway", "runs", "email", "pdf", "uploads", "steps"]);
15
+ const OPTIONAL_URLS = new Set(["gateway", "runs", "email", "pdf", "uploads", "steps"]);
16
16
  const trimmed = (urls) => Object.fromEntries(URL_NAMES.flatMap((name) => (urls[name] ? [[name, urls[name].replace(/\/+$/, "")]] : [])));
17
17
  export const ziteProvider = (props) => {
18
18
  let current = props.appToken;
@@ -56,7 +56,7 @@ export const localUrls = (raw) => {
56
56
  const given = (parsed ?? {});
57
57
  const isUrl = (value) => typeof value === "string" && /^https?:\/\//.test(value);
58
58
  if (URL_NAMES.some((name) => (given[name] === undefined ? !OPTIONAL_URLS.has(name) : !isUrl(given[name])))) {
59
- throw new Error(`${LOCAL_ENV.urls} must be JSON naming the baseRunner and backend URLs, and may name aiGateway, runs, email, pdf, uploads and steps`);
59
+ throw new Error(`${LOCAL_ENV.urls} must be JSON naming the baseRunner and backend URLs, and may name gateway, runs, email, pdf, uploads and steps`);
60
60
  }
61
61
  return trimmed(given);
62
62
  };
@@ -10,7 +10,7 @@ import { errorOf, preview } from "./runLog.js";
10
10
  import { DATA_INTEGRATION_ID, runDataCall } from "./data/index.js";
11
11
  import { airtableSettingsOf, runAirtableCall } from "./airtable/index.js";
12
12
  import { withoutConsole } from "./quiet.js";
13
- import { rememberConnection, watchOutboundFetches, withAiGatewayUrl, withRefreshedTokens } from "./outbound.js";
13
+ import { rememberConnection, watchOutboundFetches, withGatewayUrl, withRefreshedTokens } from "./outbound.js";
14
14
  import { INTEGRATIONS_PLATFORM_ID } from "./credentials.js";
15
15
  import { connectionsOnToken, directAccess, directCall, directDataFetch, localPagePlan, NoPlatformError } from "./direct.js";
16
16
  import { takeAnalytics } from "./analytics.js";
@@ -76,7 +76,7 @@ export function installPlatformTransport() {
76
76
  /** `integrations.get`'s answer, whose values then name the calls made with them. */
77
77
  const connectionAnswer = (host, name, result) => {
78
78
  if ("value" in result) {
79
- const value = withAiGatewayUrl(host, withRefreshedTokens(result.value));
79
+ const value = withGatewayUrl(host, withRefreshedTokens(result.value));
80
80
  rememberConnection(host, name, value);
81
81
  return value;
82
82
  }
@@ -94,7 +94,7 @@ export type FetchRecord = {
94
94
  ai?: AiUsageRecord;
95
95
  };
96
96
  /**
97
- * Where the platform's services answer this app: `aiGateway` takes calls on Zite's AI key, `runs` a live page's
97
+ * Where the platform's services answer this app: `gateway` takes calls on a key Zite pays for, `runs` a live page's
98
98
  * analytics and each request's run detail. `email`, `pdf`, `uploads` (the upload session) and `steps` (a workflow
99
99
  * run's saved steps) are each that service's own endpoint, which the platform picks per workspace; without one, the
100
100
  * backend's route answers it.
@@ -102,7 +102,7 @@ export type FetchRecord = {
102
102
  export type PlatformUrls = {
103
103
  baseRunner: string;
104
104
  backend: string;
105
- aiGateway?: string;
105
+ gateway?: string;
106
106
  runs?: string;
107
107
  email?: string;
108
108
  pdf?: string;
@@ -288,7 +288,7 @@ export type HostRequestState = {
288
288
  sql: () => Promise<() => void>;
289
289
  };
290
290
  /** This request's calls on Zite's AI key waiting on the gateway's answer, capped as the host once capped them. */
291
- aiSlots?: () => Promise<() => void>;
291
+ gatewaySlots?: () => Promise<() => void>;
292
292
  /** This request's router, so a page's status can follow the error it rendered. */
293
293
  router?: unknown;
294
294
  /** The platform's head entries for its pages; unset when the host writes them itself. */
@@ -1 +1 @@
1
- export declare const ZITEJS_VERSION = "0.10.0-start.23";
1
+ export declare const ZITEJS_VERSION = "0.10.0-start.24";
@@ -1,2 +1,2 @@
1
1
  // Written by scripts/write-version.mjs from package.json.
2
- export const ZITEJS_VERSION = "0.10.0-start.23";
2
+ export const ZITEJS_VERSION = "0.10.0-start.24";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zitejs",
3
- "version": "0.10.0-start.23",
3
+ "version": "0.10.0-start.24",
4
4
  "description": "The Zite framework — build apps on Zite Database",
5
5
  "type": "module",
6
6
  "sideEffects": [