ezship 0.1.15 → 0.1.17

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/commands.d.mts CHANGED
@@ -95,7 +95,7 @@ export type Changes = { added: string[]; modified: string[]; deleted: string[] }
95
95
  */
96
96
  export interface Workspace {
97
97
  callFunction(name: string, input: unknown, preview?: string): Promise<FunctionResult>;
98
- // Documents (docs/adr/0105)
98
+ // Documents (docs/adr/0233)
99
99
  renderDocument(input: RenderRequest): Promise<RenderRow>;
100
100
  listRenders(): Promise<RenderRow[]>;
101
101
  renderInfo(id: string): Promise<RenderRow>;
@@ -115,8 +115,6 @@ export interface Workspace {
115
115
  globalWorkspace?(): Workspace | Promise<Workspace>;
116
116
  globalFiles?(): Promise<Record<string, string> | undefined>;
117
117
  previewName?(): Promise<string | null>;
118
- /** The names this client's editor declarations export per module (`@ezship/react`, ...); the CLI's bundle. */
119
- editorExports?(): Promise<Record<string, string[]>>;
120
118
  // the Instance
121
119
  instanceStatus(): Promise<InstanceInfo>;
122
120
  updateInstance(patch: { name?: string }): Promise<InstanceInfo>;
@@ -133,7 +131,7 @@ export interface Workspace {
133
131
  setBuilderRole(id: string, role: string): Promise<void>;
134
132
  removeBuilder(id: string): Promise<void>;
135
133
  listUsers(): Promise<MemberRow[]>;
136
- /** Support Requests to the Host's Developers (docs/adr/0080); `site` is the bound Site, or null. */
134
+ /** Support Requests to the Host's Developers (docs/adr/0208); `site` is the bound Site, or null. */
137
135
  openSupportRequest(input: {
138
136
  subject: string;
139
137
  body: string;
@@ -141,14 +139,14 @@ export interface Workspace {
141
139
  }): Promise<SupportRequest>;
142
140
  listSupportRequests(): Promise<SupportRequest[]>;
143
141
  supportRequest(id: string): Promise<SupportRequest>;
144
- /** Emails server code sent (docs/adr/0149), newest first; a Limited Builder sees only their Sites'. */
142
+ /** Emails server code sent (docs/adr/0234), newest first; a Limited Builder sees only their Sites'. */
145
143
  listEmails(filter?: EmailFilter): Promise<EmailRow[]>;
146
144
  emailInfo(id: string): Promise<EmailInfo>;
147
- /** Integrations (docs/adr/0092): every Builder lists; Admins set, preview and remove. */
145
+ /** Integrations (docs/adr/0231): every Builder lists; Admins set, preview and remove. */
148
146
  listIntegrations(): Promise<Integration[]>;
149
147
  setIntegration(name: string, input: IntegrationInput): Promise<Integration>;
150
148
  setIntegrationPreview(name: string, input: IntegrationPreviewInput): Promise<Integration>;
151
- /** ADR 0138: Admins set or remove one header or parameter a binding adds. */
149
+ /** ADR 0231: Admins set or remove one header or parameter a binding adds. */
152
150
  setIntegrationValue(name: string, input: IntegrationValueInput): Promise<Integration>;
153
151
  removeIntegrationValue(name: string, key: IntegrationValueKey): Promise<Integration>;
154
152
  removeIntegration(name: string, force: boolean): Promise<void>;
@@ -160,19 +158,18 @@ export interface Workspace {
160
158
  }): Promise<{ id: string; alreadyMember: boolean; resent?: boolean }>;
161
159
  setUserStatus(id: string, status: string): Promise<void>;
162
160
  removeUser(id: string): Promise<void>;
163
- /** Admins: replace a Member's roster groups (docs/adr/0098). */
161
+ /** Admins: replace a Member's roster groups (docs/adr/0225). */
164
162
  setUserGroups(id: string, groups: string[]): Promise<void>;
165
- // the Instance's assets (docs/adr/0014)
163
+ // the Instance's assets (docs/adr/0213)
166
164
  listAssets(): Promise<AssetRow[]>;
167
165
  requestUpload(input: UploadRequest): Promise<UploadTicket>;
168
166
  finalizeUpload(id: string): Promise<AssetRow>;
169
- deleteAsset(id: string, force: boolean): Promise<void>;
170
167
  /** The adapter's part of an upload: a local file's size and type, and sending its bytes to the ticket's URL. */
171
168
  fileInfo?(
172
169
  source: string,
173
170
  ): Promise<{ size: number; contentType: string | null; filename: string }>;
174
171
  sendFile?(upload: UploadTicket["upload"], source: string): Promise<void>;
175
- // App Attachments (docs/adr/0047): `ez db attach` and `ez db attachment`
172
+ // App Attachments (docs/adr/0221): `ez db attach` and `ez db attachment`
176
173
  requestAttachment(input: AttachmentRequest): Promise<UploadTicket>;
177
174
  finalizeAttachment(id: string): Promise<AttachmentRow>;
178
175
  attachmentInfo(id: string): Promise<AttachmentInfo>;
@@ -196,52 +193,52 @@ export interface Workspace {
196
193
  },
197
194
  ): Promise<PushResult>;
198
195
  deploy(): Promise<DeployResult>;
199
- /** The Instance's pushed global/schedules.json (ADRs 0076, 0136), each with its next due time and latest run. */
196
+ /** The Instance's pushed global/schedules.json (ADR 0230), each with its next due time and latest run. */
200
197
  listSchedules(): Promise<Schedule[]>;
201
- /** Listeners (docs/adr/0092): any Builder of the Site. */
198
+ /** Listeners (docs/adr/0231): any Builder of the Site. */
202
199
  listListeners(): Promise<Listener[]>;
203
200
  setListenerSecret(name: string, input: { secret: string; overlapHours?: number }): Promise<void>;
204
201
  removeListenerSecret(name: string): Promise<void>;
205
202
  listenerEvents(name: string, dead: boolean): Promise<ListenerEvent[]>;
206
203
  listenerEvent(name: string, id: string): Promise<ListenerEvent>;
207
204
  retryListenerEvent(name: string, id: string): Promise<ListenerEvent>;
208
- /** API Keys (docs/adr/0119): Admins create and revoke; any Builder of the Site lists. */
205
+ /** API Keys (docs/adr/0232): Admins create and revoke; any Builder of the Site lists. */
209
206
  listApiKeys(): Promise<ApiKey[]>;
210
207
  createApiKey(input: ApiKeyInput): Promise<CreatedApiKey>;
211
208
  revokeApiKey(name: string): Promise<ApiKey>;
212
209
  listScheduleRuns(name: string): Promise<ScheduleRun[]>;
213
210
  /** Runs a schedule's job now, as its actor; answers the run, failed or not. */
214
211
  runSchedule(name: string): Promise<ScheduleRun>;
215
- /** Stops a schedule's due times (ADR 0120); answers the schedule. */
212
+ /** Stops a schedule's due times (ADR 0230); answers the schedule. */
216
213
  pauseSchedule(name: string): Promise<Schedule>;
217
214
  /** Starts a paused schedule's due times again from now, never catching up; answers the schedule. */
218
215
  resumeSchedule(name: string): Promise<Schedule>;
219
- /** `global`: the Global Working Copy to check against, as a Preview would upload it (ADR 0021). */
216
+ /** `global`: the Global Working Copy to check against, as a Preview would upload it (ADR 0217). */
220
217
  check(
221
218
  files: Record<string, string>,
222
219
  global?: Record<string, string>,
223
220
  ): Promise<{ diagnostics: Diagnostic[] }>;
224
- /** `ez format` (docs/adr/0089): the formatter's changed files, or the syntax errors that stopped it. */
221
+ /** `ez format` (docs/adr/0237): the formatter's changed files, or the syntax errors that stopped it. */
225
222
  format(files: Record<string, string>): Promise<FormatResult>;
226
223
  listPreviews(): Promise<PreviewRow[]>;
227
- /** Other Builders' Previews of this Site, most recently active first (docs/adr/0141). */
224
+ /** Other Builders' Previews of this Site, most recently active first (docs/adr/0211). */
228
225
  listOtherPreviews(): Promise<OtherPreview[]>;
229
226
  uploadPreview(name: string, input: PreviewInput): Promise<PreviewResult>;
230
227
  deletePreview(name: string): Promise<void>;
231
- /** A one-time link to the deployed app, or to the caller's Preview `preview` (docs/adr/0059). */
228
+ /** A one-time link to the deployed app, or to the caller's Preview `preview` (docs/adr/0203). */
232
229
  appLink(preview?: string | null): Promise<AppLink>;
233
230
  dbSchema(): Promise<LiveSchema>;
234
231
  dbTables(): Promise<TableInfo[]>;
235
232
  dbSql(statement: string): Promise<SqlResult>;
236
233
  dbAggregate(table: string, query: AggregateQuery): Promise<DataResult<AggregateRow>>;
237
- /** A query under one Member's access rules (docs/adr/0098); `as` is their id or email. */
234
+ /** A query under one Member's access rules (docs/adr/0225); `as` is their id or email. */
238
235
  dbQueryAs(
239
236
  table: string,
240
237
  as: string,
241
238
  query: Record<string, unknown>,
242
239
  ): Promise<DataResult<Record<string, unknown>>>;
243
240
  dbActors(query: DataQuery): Promise<DataResult<ActorRow>>;
244
- /** Admins: blank columns of a Table's closed History rows (docs/adr/0106). */
241
+ /** Admins: blank columns of a Table's closed History rows (docs/adr/0218). */
245
242
  dbRedact(input: RedactInput): Promise<RedactResult>;
246
243
  siteAccess(): Promise<SiteAccess>;
247
244
  setRestricted(restricted: boolean): Promise<SiteAccess>;
@@ -249,7 +246,7 @@ export interface Workspace {
249
246
  denyBuilder(id: string): Promise<void>;
250
247
  allowUser(id: string): Promise<void>;
251
248
  denyUser(id: string): Promise<void>;
252
- /** Members in this group, implied ones included, may open the Restricted Site (docs/adr/0101). */
249
+ /** Members in this group, implied ones included, may open the Restricted Site (docs/adr/0225). */
253
250
  allowGroup(name: string): Promise<void>;
254
251
  denyGroup(name: string): Promise<void>;
255
252
  }
@@ -263,7 +260,6 @@ export type RemoteMethod = Exclude<
263
260
  | "pulled"
264
261
  | "setPulled"
265
262
  | "previewName"
266
- | "editorExports"
267
263
  | "globalFiles"
268
264
  | "globalWorkspace"
269
265
  | "workspaceFor"
@@ -304,11 +300,11 @@ export function matchRoute(
304
300
 
305
301
  export const MAIN_FILE: "App.tsx";
306
302
  export const CONTEXT_FILE: "CONTEXT.md";
307
- /** Docs (ADR 0144): docs/<name>.md in a Site or the Global Workspace, Markdown never built or served. */
303
+ /** Docs (ADR 0209): docs/<name>.md in a Site or the Global Workspace, Markdown never built or served. */
308
304
  export const DOCS_DIR: "docs/";
309
305
  export function docName(path: string): string | null;
310
306
  export function contextError(content: string | undefined): string | null;
311
- /** CONTEXT.md's generated file inventory markers (docs/adr/0108). */
307
+ /** CONTEXT.md's generated file inventory markers (docs/adr/0215). */
312
308
  export const INVENTORY_START: string;
313
309
  export const INVENTORY_END: string;
314
310
  /** The inventory block for a Working Copy's files, markers included. */
@@ -317,39 +313,29 @@ export function contextInventory(files: Record<string, string>): string;
317
313
  export function withContextInventory(context: string, files: Record<string, string>): string;
318
314
  export const PAGES_DIR: "pages/";
319
315
  export const COMPONENTS_DIR: "components/";
320
- /** Custom hooks (ADR 0091): `hooks/use<Name>.ts` in a Site or the Global Workspace (`global/hooks/use<Name>`). */
316
+ /** Custom hooks (ADR 0209): `hooks/use<Name>.ts` in a Site or the Global Workspace (`global/hooks/use<Name>`). */
321
317
  export const HOOKS_DIR: "hooks/";
322
318
  export function hookName(path: string): string | null;
323
319
  export const FUNCTIONS_DIR: "functions/";
324
320
  export const FUNCTION_ARTIFACT: "_server/functions.json";
325
- /** The Instance's compiled Table rules (docs/adr/0099). */
321
+ /** The Instance's compiled Table rules (docs/adr/0226). */
326
322
  export const RULES_ARTIFACT: "_server/rules.json";
327
- /** The Instance's compiled scheduled jobs (ADR 0136). */
323
+ /** The Instance's compiled scheduled jobs (ADR 0230). */
328
324
  export const JOBS_ARTIFACT: "_server/jobs.json";
329
- export const FUNCTION_BASE_PATH: "/_ez/functions";
330
- /** Global Documents (docs/adr/0105): the folder, the private artifact, the app-host paths and the input cap. */
325
+ /** Global Documents (docs/adr/0233): the folder, the private artifact, the app-host paths and the input cap. */
331
326
  export const DOCUMENTS_DIR: "documents/";
332
327
  export const DOCUMENT_ARTIFACT: "_server/documents.json";
333
- export const DOCUMENT_BASE_PATH: "/_ez/documents";
334
328
  export const DOCUMENT_RE: RegExp;
335
329
  export const MAX_RENDER_INPUT_BYTES: 1000000;
336
330
  export function documentName(path: string): string | null;
337
331
  export const FUNCTION_NAME_RE: RegExp;
338
- /** Live Table versions for pages (docs/adr/0053): the push stream, the one-shot map, and the write header. */
339
- export const LIVE_STREAM_PATH: "/_ez/db/stream";
340
- export const LIVE_VERSIONS_PATH: "/_ez/db/versions";
341
- /** The declared Tables' access rules for `useCan` (docs/adr/0098). */
342
- export const ACCESS_RULES_PATH: "/_ez/access";
343
- /** The active scope's values for the Framework's switcher (docs/adr/0098). */
344
- export const SCOPE_PATH: "/_ez/scope";
345
- export const VERSIONS_HEADER: "ez-versions";
346
332
  export function functionName(path: string): string | null;
347
- /** Local functions (ADR 0048): Node code the Desktop runs on the Member's computer. */
333
+ /** Local functions (ADR 0235): Node code the Desktop runs on the Member's computer. */
348
334
  export const LOCAL_DIR: "local/";
349
335
  export const LOCAL_ARTIFACT: "_local/functions.json";
350
336
  export const LOCAL_BASE_PATH: "/_ez/local";
351
337
  export function localFunctionName(path: string): string | null;
352
- /** Scheduled jobs (ADRs 0076, 0136): the Global Workspace's jobs/<name>.ts, run by its schedules.json, never by a browser. */
338
+ /** Scheduled jobs (ADR 0230): the Global Workspace's jobs/<name>.ts, run by its schedules.json, never by a browser. */
353
339
  export const JOBS_DIR: "jobs/";
354
340
  export function jobName(path: string): string | null;
355
341
  export const SCHEDULES_FILE: "schedules.json";
@@ -361,7 +347,7 @@ export function parseSchedules(
361
347
  source: string,
362
348
  files: Record<string, string>,
363
349
  ): { entries: ScheduleEntry[]; errors: string[] };
364
- /** The deployed page's settings (ADR 0148): `page.json` in a Site and in the Global Workspace, the Site's winning. */
350
+ /** The deployed page's settings (ADR 0209): `page.json` in a Site and in the Global Workspace, the Site's winning. */
365
351
  export const PAGE_FILE: "page.json";
366
352
  export const PAGE_ICON_MAX: 16000;
367
353
  /** The browser icon of a page whose Site and Global Workspace set none. */
@@ -370,7 +356,7 @@ export const DEFAULT_PAGE_ICON: string;
370
356
  export function parsePage(source: string): { page: { icon?: string }; errors: string[] };
371
357
  /** The SVG a Site's page shows as its browser icon: the Site's page.json, else the Global one, else the default. */
372
358
  export function pageIcon(files: Record<string, string>, global: Record<string, string>): string;
373
- /** Listeners (docs/adr/0092): `listeners/<name>.ts`, named in `listeners.json`, received under LISTENER_BASE_PATH. */
359
+ /** Listeners (docs/adr/0231): `listeners/<name>.ts`, named in `listeners.json`, received under LISTENER_BASE_PATH. */
374
360
  export const LISTENERS_DIR: "listeners/";
375
361
  export function listenerName(path: string): string | null;
376
362
  export const LISTENERS_FILE: "listeners.json";
@@ -378,7 +364,7 @@ export const LISTENER_MAX: number;
378
364
  export const LISTENER_BASE_PATH: "/_ez/listeners/";
379
365
  export const WEBHOOK_SCHEMES: readonly ["standard", "stripe", "github", "token"];
380
366
  export const LISTENER_OVERLAP_HOURS: { readonly default: number; readonly max: number };
381
- /** The Data API (docs/adr/0151): `/_ez/api/...` on the app origin with `Authorization: Bearer ezk_...`. */
367
+ /** The Data API (docs/adr/0232): `/_ez/api/...` on the app origin with `Authorization: Bearer ezk_...`. */
382
368
  export const API_BASE_PATH: "/_ez/api";
383
369
  export const API_KEY_PREFIX: "ezk_";
384
370
  export const API_KEY_NAME_RE: RegExp;
@@ -391,16 +377,16 @@ export function parseListeners(
391
377
  source: string,
392
378
  files: Record<string, string>,
393
379
  ): { entries: ListenerEntry[]; errors: string[]; warnings: string[] };
394
- /** Global lib modules (ADR 0077): `lib/<name>.ts`, imported by Sites as `global/lib/<name>`. */
380
+ /** Global lib modules (ADR 0210): `lib/<name>.ts`, imported by Sites as `global/lib/<name>`. */
395
381
  export const LIB_DIR: "lib/";
396
382
  export function libModuleName(path: string): string | null;
397
- /** Table rules (docs/adr/0099): `rules/<table>.ts` in the Global Workspace. */
383
+ /** Table rules (docs/adr/0226): `rules/<table>.ts` in the Global Workspace. */
398
384
  export const RULES_DIR: "rules/";
399
385
  export function ruleTableName(path: string): string | null;
400
- /** Workflows (docs/adr/0103): `workflows/<table>.ts` in the Global Workspace. */
386
+ /** Workflows (docs/adr/0227): `workflows/<table>.ts` in the Global Workspace. */
401
387
  export const WORKFLOWS_DIR: "workflows/";
402
388
  export function workflowTableName(path: string): string | null;
403
- /** Desktop release files (ADR 0048): the feed path on every app origin, the file-name rule and the cap. */
389
+ /** Desktop release files (ADR 0235): the feed path on every app origin, the file-name rule and the cap. */
404
390
  export const DESKTOP_PATH: "/_ez/desktop";
405
391
  export const DESKTOP_FILE_RE: RegExp;
406
392
  export const MAX_DESKTOP_FILE_BYTES: 100000000;
@@ -412,7 +398,9 @@ export const DEFAULT_GLOBAL_FILES: Readonly<Record<string, string>>;
412
398
  export const STARTER_GLOBAL_FILES: Readonly<Record<string, string>>;
413
399
  export const BUILD_ENTRY: "index.html";
414
400
  export const BUILD_CONFIG_MARKER: "<!--ez:config-->";
415
- /** The compiler options of every Site type check, Pipeline and editor alike (docs/adr/0078). */
401
+ /** Marks the built page's preload link for the vendor chunk, for the app host (docs/adr/0216). */
402
+ export const BUILD_VENDOR_ATTR: "data-ez-vendor";
403
+ /** The compiler options of every Site type check, Pipeline and editor alike (docs/adr/0236). */
416
404
  export const COMPILER_OPTIONS: Readonly<{
417
405
  target: "ES2022";
418
406
  lib: string[];
@@ -445,7 +433,22 @@ export {
445
433
  SESSION_VERSION_KEY,
446
434
  } from "./session.d.mts";
447
435
  export type { SessionDeclaration, SessionLifetime } from "./session.d.mts";
448
- /** The packages Site UI and Global components and hooks may import by name (docs/adr/0114). */
436
+ /** The page's side of the wire (docs/adr/0216), declared in paths.d.mts. */
437
+ export {
438
+ ACCESS_RULES_PATH,
439
+ ASSET_PATH,
440
+ ASSET_TYPES,
441
+ ATTACHMENT_PATH,
442
+ ATTACHMENT_TYPES,
443
+ attachmentContentType,
444
+ DOCUMENT_BASE_PATH,
445
+ FUNCTION_BASE_PATH,
446
+ LIVE_STREAM_PATH,
447
+ LIVE_VERSIONS_PATH,
448
+ SCOPE_PATH,
449
+ VERSIONS_HEADER,
450
+ } from "./paths.d.mts";
451
+ /** The packages Site UI and Global components and hooks may import by name (docs/adr/0209). */
449
452
  export const SITE_PACKAGES: readonly string[];
450
453
  export function globalFileError(path: string): string | null;
451
454
  export function globalImportError(
@@ -459,7 +462,7 @@ export type DiagnosticRange = {
459
462
  start: { line: number; character: number };
460
463
  end: { line: number; character: number };
461
464
  };
462
- /** LSP-shaped, 0-based. `code` is a `CHECK_RULES` id; severity 1 is an error, 2 a warning (docs/adr/0078). */
465
+ /** LSP-shaped, 0-based. `code` is a `CHECK_RULES` id; severity 1 is an error, 2 a warning (docs/adr/0236). */
463
466
  export type Diagnostic = {
464
467
  file: string;
465
468
  range: DiagnosticRange;
@@ -512,7 +515,6 @@ export const INSTANCE_ID_RE: RegExp;
512
515
  export const RESERVED_INSTANCE_IDS: Set<string>;
513
516
  export function isValidInstanceId(id: string): boolean;
514
517
  export const SITE_ID_RE: RegExp;
515
- export const RESERVED_SITE_IDS: Set<string>;
516
518
  export function isValidSiteId(id: string): boolean;
517
519
  export const SITES_FOLDER: "sites";
518
520
  export const RESERVED_FOLDER_NAMES: Set<string>;
@@ -520,34 +522,29 @@ export function siteFolderName(name: string): string;
520
522
  export function siteNameError(name: string): string | null;
521
523
  export function isValidTargetId(id: string): boolean;
522
524
  export const ASSET_NAME_RE: RegExp;
523
- export const ASSET_TYPES: Readonly<Record<string, string>>;
524
525
  export const MAX_ASSET_BYTES: 100000000;
525
526
  export const MAX_INSTANCE_ASSET_BYTES: 2000000000;
526
- export const ASSET_PATH: "/_ez/files";
527
527
  export function assetContentType(filename: string): string | null;
528
- /** App Attachments (docs/adr/0047): the type table, the caps and the app-host path. */
529
- export const ATTACHMENT_TYPES: Readonly<Record<string, string>>;
528
+ /** App Attachments (docs/adr/0221): the caps; the type table and the app-host path are in paths.d.mts. */
530
529
  export const MAX_ATTACHMENT_BYTES: 25000000;
531
530
  export const MAX_INSTANCE_ATTACHMENT_BYTES: 10000000000;
532
531
  export const MAX_UNBOUND_ATTACHMENTS: 20;
533
532
  export const MAX_UNBOUND_ATTACHMENT_BYTES: 250000000;
534
533
  export const UNBOUND_ATTACHMENT_TTL_MS: 86400000;
535
- export const ATTACHMENT_PATH: "/_ez/attachments";
536
- export function attachmentContentType(filename: string): string | null;
537
- /** Hosted Previews (docs/adr/0013): the URL segment, the name shape, the per-Builder cap and the idle expiry. */
534
+ /** Hosted Previews (docs/adr/0212): the URL segment, the name shape, the per-Builder cap and the idle expiry. */
538
535
  export const PREVIEW_SEGMENT: "~preview";
539
536
  export const PREVIEW_NAME_RE: RegExp;
540
537
  export const MAX_PREVIEWS_PER_BUILDER: 10;
541
538
  export const PREVIEW_IDLE_MS: number;
542
539
  export function previewNameError(name: string): string | null;
543
540
  export function previewNameFrom(text: string): string;
544
- /** One-time app links (docs/adr/0059): how long a link works after `ez link` mints it. */
541
+ /** One-time app links (docs/adr/0203): how long a link works after `ez link` mints it. */
545
542
  export const APP_LINK_TTL_MS: number;
546
- /** Support Requests (docs/adr/0080): subject and body lengths in characters, and requests per Builder per day. */
543
+ /** Support Requests (docs/adr/0208): subject and body lengths in characters, and requests per Builder per day. */
547
544
  export const SUPPORT_SUBJECT_MAX: number;
548
545
  export const SUPPORT_BODY_MAX: number;
549
546
  export const SUPPORT_REQUESTS_PER_DAY: number;
550
- /** Email limits (docs/adr/0149). */
547
+ /** Email limits (docs/adr/0234). */
551
548
  export const EMAIL_LIMITS: Readonly<{
552
549
  perInvocation: number;
553
550
  subject: number;
@@ -559,7 +556,7 @@ export const EMAIL_LIMITS: Readonly<{
559
556
  attempts: number;
560
557
  }>;
561
558
  export const EMAIL_STATUSES: readonly EmailStatus[];
562
- /** Integrations (docs/adr/0092): names, kinds, credential types, limits and the origin and name checks. */
559
+ /** Integrations (docs/adr/0231): names, kinds, credential types, limits and the origin and name checks. */
563
560
  export const INTEGRATION_NAME_RE: RegExp;
564
561
  export const INTEGRATION_KINDS: readonly ["http"];
565
562
  export const CREDENTIAL_TYPES: readonly ["header", "query", "basic", "oauth"];
@@ -588,7 +585,7 @@ export function integrationOriginError(origin: string, allowHttp?: boolean): str
588
585
  export function credentialHeaderError(name: string): string | null;
589
586
  export function credentialParamError(param: string): string | null;
590
587
  export function basicUserError(user: string): string | null;
591
- /** OAuth (docs/adr/0140, a draft): the configuration a credential holds; its flows are not built. */
588
+ /** OAuth (docs/adr/0252, a draft): the configuration a credential holds; its flows are not built. */
592
589
  export const OAUTH_GRANTS: readonly ["client-credentials", "password", "authorization-code"];
593
590
  export const OAUTH_CLIENT_AUTH: readonly ["basic", "post"];
594
591
  export const OAUTH_NOT_BUILT: string;
@@ -605,7 +602,7 @@ export type OAuthPreset = {
605
602
  readonly rotatesRefreshTokens: boolean;
606
603
  /** The connection values a grant brings (the callback's or the token answer's). */
607
604
  readonly connection: readonly string[];
608
- /** Plain values every request needs (docs/adr/0138). */
605
+ /** Plain values every request needs (docs/adr/0231). */
609
606
  readonly values: readonly {
610
607
  readonly place: "header" | "query";
611
608
  readonly name: string;
@@ -618,7 +615,7 @@ export function oauthCredentialError(
618
615
  credential: Partial<Extract<IntegrationCredential, { type: "oauth" }>>,
619
616
  allowHttp?: boolean,
620
617
  ): string | null;
621
- /** Invites (docs/adr/0025): the claim window and the listing status. */
618
+ /** Invites (docs/adr/0202): the claim window and the listing status. */
622
619
  export const INVITE_TTL_MS: number;
623
620
  export const BUILDER_ROLES: readonly BuilderRole[];
624
621
  export type InviteStatus = null | { daysLeft: number } | { expired: true };
@@ -633,7 +630,7 @@ export function hashContent(s: string): string;
633
630
  export function localChanges(files: Record<string, string>, pulled: Pulled | null): Changes;
634
631
  /**
635
632
  * Whether a change to this Global Workspace file reaches a deployed Site only at its next Preview or Deploy
636
- * (docs/adr/0096): false for the Live-only files (session.ts, schedules.json, jobs/) and the files no app is
633
+ * (docs/adr/0224): false for the Live-only files (session.ts, schedules.json, jobs/) and the files no app is
637
634
  * built from (CONTEXT.md, docs/, the generated db/types.d.ts).
638
635
  */
639
636
  export function pinnedGlobalPath(path: string): boolean;
@@ -676,6 +673,25 @@ export type Recipe = {
676
673
  notes: string;
677
674
  };
678
675
  export const RECIPES: readonly Recipe[];
676
+ /** A help topic's code block, checked by the Pipeline's tests as `before + code + after` in the file `path`. */
677
+ export type HelpSnippet = {
678
+ name: string;
679
+ /** The help topic that prints `code`. */
680
+ topic: string;
681
+ /** The Working Copy `path` is in: a Site unless "global". */
682
+ tree?: "global";
683
+ path: string;
684
+ /** What the topic prints. */
685
+ code: string;
686
+ /** What the check adds around `code` to make the file; never printed. */
687
+ before?: string;
688
+ after?: string;
689
+ /** Other Site files the block needs, by path; never printed. */
690
+ files?: Readonly<Record<string, string>>;
691
+ };
692
+ export const HELP_SNIPPETS: readonly HelpSnippet[];
693
+ /** The Tables the snippets are checked against. */
694
+ export const HELP_SNIPPET_SCHEMA: string;
679
695
 
680
696
  export function describeCommand(argv: string[]): string;
681
697
  export function runCommand(ws: Workspace, argv: string[], stdin?: string): Promise<string>;