@mostra/protocol 0.11.0 → 0.12.0
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/actions.d.ts +11 -3
- package/dist/actions.d.ts.map +1 -1
- package/dist/actions.js.map +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/diagnostics/codes/index.d.ts +3 -2
- package/dist/diagnostics/codes/index.d.ts.map +1 -1
- package/dist/diagnostics/codes/index.js +3 -1
- package/dist/diagnostics/codes/index.js.map +1 -1
- package/dist/diagnostics/codes/team.d.ts +8 -0
- package/dist/diagnostics/codes/team.d.ts.map +1 -0
- package/dist/diagnostics/codes/team.js +44 -0
- package/dist/diagnostics/codes/team.js.map +1 -0
- package/dist/diagnostics/diagnostic.d.ts +1 -1
- package/dist/diagnostics/diagnostic.d.ts.map +1 -1
- package/dist/diagnostics/diagnostic.js +2 -1
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/index.d.ts +13 -6
- package/dist/index.js +11 -4
- package/dist/interaction.d.ts +12 -3
- package/dist/interaction.d.ts.map +1 -1
- package/dist/interaction.js +15 -12
- package/dist/interaction.js.map +1 -1
- package/dist/manifest.d.ts +3 -0
- package/dist/manifest.d.ts.map +1 -1
- package/dist/manifest.js +5 -2
- package/dist/manifest.js.map +1 -1
- package/dist/methods/index.d.ts.map +1 -1
- package/dist/methods/index.js +10 -2
- package/dist/methods/index.js.map +1 -1
- package/dist/methods/port/trusted-controls-policy.d.ts +1 -1
- package/dist/methods/results/get.d.ts +3 -1
- package/dist/methods/results/get.d.ts.map +1 -1
- package/dist/methods/results/get.js +4 -3
- package/dist/methods/results/get.js.map +1 -1
- package/dist/methods/results/list.d.ts +33 -0
- package/dist/methods/results/list.d.ts.map +1 -0
- package/dist/methods/results/list.js +35 -0
- package/dist/methods/results/list.js.map +1 -0
- package/dist/methods/roster/add.d.ts +47 -0
- package/dist/methods/roster/add.d.ts.map +1 -0
- package/dist/methods/roster/add.js +46 -0
- package/dist/methods/roster/add.js.map +1 -0
- package/dist/methods/roster/get.d.ts +18 -0
- package/dist/methods/roster/get.d.ts.map +1 -0
- package/dist/methods/roster/get.js +22 -0
- package/dist/methods/roster/get.js.map +1 -0
- package/dist/methods/roster/remove.d.ts +28 -0
- package/dist/methods/roster/remove.d.ts.map +1 -0
- package/dist/methods/roster/remove.js +31 -0
- package/dist/methods/roster/remove.js.map +1 -0
- package/dist/methods/share/start.d.ts +15 -2
- package/dist/methods/share/start.d.ts.map +1 -1
- package/dist/methods/share/start.js +5 -1
- package/dist/methods/share/start.js.map +1 -1
- package/dist/methods/state/get.d.ts +1 -1
- package/dist/methods/state/patch.d.ts +1 -1
- package/dist/methods/view/url.d.ts +1 -1
- package/dist/methods/wait/wait.d.ts +1 -1
- package/dist/operator.d.ts +50 -3
- package/dist/operator.d.ts.map +1 -1
- package/dist/operator.js.map +1 -1
- package/dist/team-settings.d.ts +21 -0
- package/dist/team-settings.d.ts.map +1 -0
- package/dist/team-settings.js +27 -0
- package/dist/team-settings.js.map +1 -0
- package/dist/team.d.ts +221 -0
- package/dist/team.d.ts.map +1 -0
- package/dist/team.js +162 -0
- package/dist/team.js.map +1 -0
- package/dist/verify.d.ts +7 -0
- package/dist/verify.d.ts.map +1 -1
- package/dist/verify.js.map +1 -1
- package/dist/worker.d.ts +1 -1
- package/package.json +1 -1
- package/schemas/protocol.draft-07.json +802 -79
- package/schemas/protocol.schema.json +782 -91
- package/src/actions.ts +8 -4
- package/src/diagnostics/codes/index.ts +6 -2
- package/src/diagnostics/codes/team.ts +53 -0
- package/src/diagnostics/diagnostic.ts +3 -1
- package/src/index.ts +47 -2
- package/src/interaction.ts +24 -5
- package/src/manifest.ts +5 -0
- package/src/methods/index.ts +8 -0
- package/src/methods/results/get.ts +3 -2
- package/src/methods/results/list.ts +61 -0
- package/src/methods/roster/add.ts +77 -0
- package/src/methods/roster/get.ts +30 -0
- package/src/methods/roster/remove.ts +49 -0
- package/src/methods/share/start.ts +23 -3
- package/src/operator.ts +42 -3
- package/src/team-settings.ts +38 -0
- package/src/team.ts +398 -0
- package/src/verify.ts +7 -0
package/dist/actions.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Frame, WireError } from "./serializer.js";
|
|
2
|
+
import { PresenceState, RosterForPage } from "./team.js";
|
|
2
3
|
import * as z from "zod";
|
|
3
4
|
//#region src/actions.d.ts
|
|
4
5
|
/** A value written by the serializer: its batches, in order (`serializeAll`). */
|
|
@@ -177,9 +178,10 @@ export interface LiveUpdate {
|
|
|
177
178
|
readonly awaiting?: boolean;
|
|
178
179
|
}
|
|
179
180
|
/**
|
|
180
|
-
* An ephemeral message on a page's event stream (SSE `event: run
|
|
181
|
-
* `id`, so a reconnect's cursor is untouched) or in a poll's `ephemeral`:
|
|
182
|
-
* never stored as an event.
|
|
181
|
+
* An ephemeral message on a page's event stream (SSE `event: run`, `live`, `respondents` or
|
|
182
|
+
* `presence`, without an `id`, so a reconnect's cursor is untouched) or in a poll's `ephemeral`:
|
|
183
|
+
* lossy, coalesced, and never stored as an event. `respondents` and `presence` (D168) reach only a
|
|
184
|
+
* page that asked for them, so a version built before them never receives one.
|
|
183
185
|
*/
|
|
184
186
|
export type EphemeralMessage = {
|
|
185
187
|
readonly kind: "run";
|
|
@@ -187,6 +189,12 @@ export type EphemeralMessage = {
|
|
|
187
189
|
} | {
|
|
188
190
|
readonly kind: "live";
|
|
189
191
|
readonly live: LiveUpdate;
|
|
192
|
+
} | {
|
|
193
|
+
readonly kind: "respondents";
|
|
194
|
+
readonly respondents: RosterForPage;
|
|
195
|
+
} | {
|
|
196
|
+
readonly kind: "presence";
|
|
197
|
+
readonly presence: PresenceState;
|
|
190
198
|
};
|
|
191
199
|
/** `POST …/call/{fnId}`: a plain server-function call, no durable record (D54). */
|
|
192
200
|
export interface CallRequest {
|
package/dist/actions.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","names":[],"sources":["../src/actions.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"actions.d.ts","names":[],"sources":["../src/actions.ts"],"mappings":";;;;;YAiBY,6BAA6B;;;;;qBAM5B,SAAS,EAAE,QAAQ;;iBASf,oBAAoB;;WAE1B;;;qBAIE,aAAa,EAAE,QAAQ;;qBAYvB;;qBAGA;;qBAGA;;qBAGA;;qBAGA;;;;;;;;YASD;;qBAUC,uBAAuB;;wBAWpB,iBAAiB,QAAQ;;;;;;;YAU7B;;iBAGK;;WAEN;;WAEA;;;qBAIE,aAAa,EAAE,QAAQ;;;;;iBAcnB;;WAEN;;WAEA;;WAEA;;WAEA,QAAQ;;WAER,SAAS;;WAET,WAAW;;WAEX;;WAEA,SAAS;;WAET,QAAQ;;WAER;;WAEA;;WAEA;;;;;WAKA;;WAEA;;;;;WAKA;;;qBAIE,UAAU,EAAE,QAAQ;;;;;;iBA4BhB;;WAEN;;WAEA,QAAQ;;WAER,SAAS;;WAET,WAAW;;WAEX;;WAEA;;WAEA;;WAEA,SAAS;;WAET,QAAQ;;WAER;;;iBAIM;;WAEN;;WAEA;;WAEA;;WAEA,QAAQ;;;;;WAKR;aACE;aACA;aACA,OAAO;;;WAGT,QAAQ;;;;;;;WAOR;;;;;WAKA;;;iBAIM;;WAEN;;WAEA;;WAEA;;WAEA,QAAQ;;WAER,QAAQ;;;;;WAKR;;;;;;;;YASC;WACG;WAAsB,KAAK;;WAC3B;WAAuB,MAAM;;WAC7B;WAA8B,aAAa;;WAC3C;WAA2B,UAAU;;;iBAGnC;;WAEN;;WAEA,MAAM;;;qBAIJ,aAAa,EAAE,QAAQ;;;;YAUxB;WACG,gBAAgB;;WAChB;aAAgB;;;WAChB;aAAgB;aAA2B,OAAO;;;;iBAGhD;;WAEN;;WAEA;;WAEA,MAAM;;WAEN;;WAEA;;;qBAIE,YAAY,EAAE,QAAQ;;;;;iBAiBlB;;WAEN;;WAEA;;WAEA;aAA4B;aAAuB;;;;;;;WAMnD;aACE;aACA;aACA;;;;qBAKA,kBAAkB,EAAE,QAAQ;;iBA6BxB;;WAEN;;;qBAIE,kBAAkB,EAAE,QAAQ;;qBAK5B,kBAAkB;;;;;;qBAOlB;;iBAGI;;WAEN,SAAS,SAAS;;WAElB;;;qBAIE,2BAA2B;;qBAK3B;;qBAGA;;qBAGA;;;;;iBAMI;;WAEN;;;;;WAKA;aACE;aACA;aACA;;;;qBAKA,aAAa,EAAE,QAAQ;;qBAoBvB,qBAAqB;;qBAGrB"}
|
package/dist/actions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","names":[],"sources":["../src/actions.ts"],"sourcesContent":["/**\n * Actions, live data and secrets (INTERFACES §2.4, §4, §6; D24, D44, D54, D56): the shapes the\n * browser protocol, the host protocol and the worker channel share. Server-function arguments and\n * results travel as the serializer's batches (`Batches`).\n *\n * ```ts\n * const run: RunState = await post(\"runs\", { viewId, fnId: \"actions.ts#sendReply\", args, clientKey });\n * if (run.status === \"succeeded\") show(await deserializeAll(run.batches));\n * ```\n */\nimport * as z from \"zod\";\nimport { ViewId } from \"./ids.ts\";\nimport type { Frame, WireError } from \"./serializer.ts\";\nimport { wireRegistry } from \"./wire-registry.ts\";\n\n/** A value written by the serializer: its batches, in order (`serializeAll`). */\nexport type Batches = readonly (readonly Frame[])[];\n\n/**\n * The Zod schema of the `Batches` type: a list of batches, each a list of frames. The frames\n * themselves are checked by the reader (`ValueReader`), which refuses anything malformed.\n */\nexport const Batches: z.ZodType<Batches> = z\n .array(z.array(z.record(z.string(), z.unknown())).readonly())\n .readonly()\n .register(wireRegistry, {\n id: \"Batches\",\n description: \"A serialized server-function value: its batches of frames, in order.\",\n }) as unknown as z.ZodType<Batches>;\n\n/** An error as runs, calls and live sources report it. */\nexport interface ActionError extends WireError {\n /** The stack of the thrown error, kept in the run log and never sent to a page. */\n readonly stack?: string;\n}\n\n/** The Zod schema of the `ActionError` type. */\nexport const ActionError: z.ZodType<ActionError> = z\n .object({\n message: z.string(),\n code: z.string().exactOptional(),\n stack: z.string().exactOptional(),\n })\n .register(wireRegistry, {\n id: \"ActionError\",\n description: \"An error from server code: its message and diagnostic code.\",\n });\n\n/** The largest serialized arguments a call or run takes, in characters of JSON. */\nexport const ACTION_ARGS_MAX: number = 16 * 1024 * 1024;\n\n/** The largest serialized result a run keeps, in characters of JSON (larger fails the run). */\nexport const ACTION_RESULT_MAX: number = 16 * 1024 * 1024;\n\n/** The cap of a run's log, in UTF-16 code units of its lines (D47's 1 MB). */\nexport const RUN_LOG_MAX: number = 1024 * 1024;\n\n/** The line a capped log ends with. */\nexport const RUN_LOG_TRUNCATED = \"[log truncated at 1 MB]\";\n\n/** The longest run key, in characters. */\nexport const RUN_KEY_MAX = 256;\n\n/**\n * A run's state (D24, ARCHITECTURE §7). `queued`: recorded, not yet started in a worker.\n * `running`: started. `waiting`: a remote server's run that waits for its owner's instance (D165\n * item 4); a page that doesn't know it treats it like `queued`. `unknown`: a relayed run whose\n * owner never reported its end within the artifact's offline limit, which may have taken effect;\n * the owner's later report replaces it once. The others are final.\n */\nexport type RunStatus =\n | \"queued\"\n | \"running\"\n | \"waiting\"\n | \"succeeded\"\n | \"failed\"\n | \"cancelled\"\n | \"unknown\";\n\n/** Every run status. */\nexport const RUN_STATUSES: readonly RunStatus[] = [\n \"queued\",\n \"running\",\n \"waiting\",\n \"succeeded\",\n \"failed\",\n \"cancelled\",\n \"unknown\",\n];\n\n/** Whether a run in `status` has ended. */\nexport function isFinalRunStatus(status: RunStatus): boolean {\n return status === \"succeeded\" || status === \"failed\" || status === \"cancelled\";\n}\n\n/**\n * Why a run ended the way it did, beside its status: `interrupted` (its worker or the instance\n * stopped while it ran, D24), `threw` (the action threw), `unserializable` (its result is outside\n * the type set), `too-large`, `parked` (its artifact's worker keeps crashing), `cancelled` (by a\n * viewer), `unknown-function`. Later releases add reasons.\n */\nexport type RunReason = string;\n\n/** A run's progress, as the action last reported it. */\nexport interface RunProgress {\n /** From 0 to 1. */\n readonly fraction?: number;\n /** One short line for people. */\n readonly message?: string;\n}\n\n/** The Zod schema of the `RunProgress` type. */\nexport const RunProgress: z.ZodType<RunProgress> = z\n .object({\n fraction: z.number().min(0).max(1).exactOptional(),\n message: z.string().max(1000).exactOptional(),\n })\n .register(wireRegistry, {\n id: \"RunProgress\",\n description: \"A run's progress: fraction and message.\",\n });\n\n/**\n * One action run as a page reads it (D54): its state, progress, log and the result written so far.\n * A result that is an async iterable grows item by item while the run is `running`.\n */\nexport interface RunState {\n /** The run's `run_` ID. */\n readonly runId: string;\n /** The server function it runs: `<module path>#<export>`. */\n readonly fnId: string;\n /** The idempotency key it was started with, if any. */\n readonly key?: string;\n /** The run's state. */\n readonly status: RunStatus;\n /** Why it ended, for `failed` and `cancelled`. */\n readonly reason?: RunReason;\n /** Its latest progress. */\n readonly progress?: RunProgress;\n /** The log lines, capped at 1 MB with a marker line. */\n readonly log: readonly string[];\n /** The result's batches so far. */\n readonly batches: Batches;\n /** For `failed`: what went wrong, without the stack. */\n readonly error?: WireError;\n /** When it was recorded. */\n readonly startedAt: string;\n /** When it ended. */\n readonly finishedAt?: string;\n /** Whether this request joined a run that already existed (a key or a retried `clientKey`). */\n readonly joined?: boolean;\n /**\n * The index of the first line in `log`, when the request said which lines the page holds\n * (`RunAttachRequest.held`); absent: 0, the whole log.\n */\n readonly logFrom?: number;\n /** The index of the first batch in `batches`, as `logFrom`; absent: 0. */\n readonly batchFrom?: number;\n /**\n * On a remote server: the run is `running` on its owner's instance, which can't be reached now\n * (D165 item 4); it ends when the owner reports, or becomes `unknown` past the offline limit.\n */\n readonly ownerUnreachable?: boolean;\n}\n\n/** The Zod schema of the `RunState` type. */\nexport const RunState: z.ZodType<RunState> = z\n .object({\n runId: z.string(),\n fnId: z.string(),\n key: z.string().exactOptional(),\n status: z.enum(RUN_STATUSES as [RunStatus, ...RunStatus[]]),\n reason: z.string().exactOptional(),\n progress: RunProgress.exactOptional(),\n log: z.array(z.string()).readonly(),\n batches: Batches,\n error: z.object({ message: z.string(), code: z.string().exactOptional() }).exactOptional(),\n startedAt: z.string(),\n finishedAt: z.string().exactOptional(),\n joined: z.boolean().exactOptional(),\n logFrom: z.number().int().nonnegative().exactOptional(),\n batchFrom: z.number().int().nonnegative().exactOptional(),\n ownerUnreachable: z.boolean().exactOptional(),\n })\n .register(wireRegistry, {\n id: \"RunState\",\n description: \"An action run: status, progress, log and the result written so far.\",\n });\n\n/**\n * What changed in a run since a page last heard: a lossy notification on the event stream. Lines\n * start at `logFrom` and batches at `batchFrom`; a page that holds fewer reads the run again\n * (`runs/attach`).\n */\nexport interface RunDelta {\n /** The run's `run_` ID. */\n readonly runId: string;\n /** The run's state. */\n readonly status: RunStatus;\n /** Why it ended so, for `failed` and `cancelled`. */\n readonly reason?: RunReason;\n /** Its latest progress. */\n readonly progress?: RunProgress;\n /** The index of the first line in `log`. */\n readonly logFrom: number;\n /** Log lines, starting at `logFrom`. */\n readonly log: readonly string[];\n /** The index of the first batch in `batches`. */\n readonly batchFrom: number;\n /** Result batches, starting at `batchFrom`. */\n readonly batches: Batches;\n /** What went wrong. */\n readonly error?: WireError;\n /** When it ended. */\n readonly finishedAt?: string;\n}\n\n/** A live source's value as a page reads it (D56). */\nexport interface LiveState {\n /** The idempotency key it was started with, if any. */\n readonly key: string;\n /** The value's revision, a decimal string that only grows; absent before any value. */\n readonly revision?: string;\n /** When the value was produced. */\n readonly at?: string;\n /** The latest value, serialized. */\n readonly value?: Batches;\n /**\n * Append mode (`useLive(key, { mode: \"append\" })`): the values kept in the source's ring, oldest\n * first, at most the window the page asked for.\n */\n readonly ring?: readonly {\n readonly revision: string;\n readonly at: string;\n readonly value: Batches;\n }[];\n /** The producer's last failure, while the last good value stays (FAILURE_MODEL §6). */\n readonly error?: WireError;\n /**\n * `true` while the source has no value and no failure and the artifact's latest version has a\n * producer whose first `load` is on its way: the page shows it loading, and verify waits for it.\n * Absent for a key nothing produces (one only `mostra push` writes) and for a source that only\n * streams, whose first value may never come (WP-14's Opus review).\n */\n readonly awaiting?: boolean;\n /**\n * `true` on a hosted page while the artifact's owner instance is offline, so its producers\n * can't refresh the value: the last value stays, with its `at` (D165 item 4).\n */\n readonly ownerOffline?: boolean;\n}\n\n/** One live update on the event stream: never stored as an event (D63, LL-04). */\nexport interface LiveUpdate {\n /** The live source's key. */\n readonly key: string;\n /** The value's revision. */\n readonly revision?: string;\n /** When the value was produced. */\n readonly at?: string;\n /** The value, serialized. */\n readonly value?: Batches;\n /** What went wrong. */\n readonly error?: WireError;\n /**\n * `false` when a source read as {@link LiveState.awaiting} turned out to have no first `load`\n * (its producer only streams): the page stops waiting for a first value.\n */\n readonly awaiting?: boolean;\n}\n\n/**\n * An ephemeral message on a page's event stream (SSE `event: run` or `event: live`, without an\n * `id`, so a reconnect's cursor is untouched) or in a poll's `ephemeral`: lossy, coalesced, and\n * never stored as an event.\n */\nexport type EphemeralMessage =\n | { readonly kind: \"run\"; readonly run: RunDelta }\n | { readonly kind: \"live\"; readonly live: LiveUpdate };\n\n/** `POST …/call/{fnId}`: a plain server-function call, no durable record (D54). */\nexport interface CallRequest {\n /** The view the page was opened as (D104). */\n readonly viewId: string;\n /** The arguments, serialized as one array value. */\n readonly args: Batches;\n}\n\n/** The Zod schema of the `CallRequest` type. */\nexport const CallRequest: z.ZodType<CallRequest> = z\n .object({ viewId: ViewId.schema, args: Batches })\n .register(wireRegistry, {\n id: \"CallRequest\",\n description: \"A plain server-function call: the view and the serialized arguments.\",\n });\n\n/**\n * One line of a plain call's answer (`application/x-ndjson`): a batch of the result, then the end.\n */\nexport type CallLine =\n | { readonly batch: readonly Frame[] }\n | { readonly end: { readonly status: \"succeeded\" } }\n | { readonly end: { readonly status: \"failed\"; readonly error: WireError } };\n\n/** `POST …/runs`: start a durable action run, or join one (D54, AC-02, AC-03). */\nexport interface RunRequest {\n /** The view the page was opened as (D104). */\n readonly viewId: string;\n /** `<module path>#<export>`. */\n readonly fnId: string;\n /** The arguments, serialized as one array value. */\n readonly args: Batches;\n /** The author's idempotency key: one run per artifact, function and key, ever. */\n readonly key?: string;\n /** A fresh ID per invocation, so a retried request joins the run it already started. */\n readonly clientKey: string;\n}\n\n/** The Zod schema of the `RunRequest` type. */\nexport const RunRequest: z.ZodType<RunRequest> = z\n .object({\n viewId: ViewId.schema,\n fnId: z.string().min(3).max(1024),\n args: Batches,\n key: z.string().min(1).max(RUN_KEY_MAX).exactOptional(),\n clientKey: z.string().min(8).max(64),\n })\n .register(wireRegistry, {\n id: \"RunRequest\",\n description: \"Start or join an action run: the function, its arguments and keys.\",\n });\n\n/**\n * `POST …/runs/attach`: read runs and hear their changes on the event stream for the next minute\n * (re-attach after a reload, AC-02). By ID, or by function and key.\n */\nexport interface RunAttachRequest {\n /** The view the page was opened as (D104). */\n readonly viewId: string;\n /** Runs by ID. */\n readonly runIds?: readonly string[];\n /** Runs by function and key. */\n readonly keyed?: readonly { readonly fnId: string; readonly key: string }[];\n /**\n * What the page already holds of runs it names by ID: so many log lines and batches. Each such\n * run's answer starts there (`RunState.logFrom`, `batchFrom`), so a page renewing its interest\n * doesn't read the whole run again (Opus review 14).\n */\n readonly held?: readonly {\n readonly runId: string;\n readonly log: number;\n readonly batches: number;\n }[];\n}\n\n/** The Zod schema of the `RunAttachRequest` type. */\nexport const RunAttachRequest: z.ZodType<RunAttachRequest> = z\n .object({\n viewId: ViewId.schema,\n runIds: z.array(z.string().max(64)).max(100).readonly().exactOptional(),\n keyed: z\n .array(\n z.object({ fnId: z.string().min(3).max(1024), key: z.string().min(1).max(RUN_KEY_MAX) }),\n )\n .max(100)\n .readonly()\n .exactOptional(),\n held: z\n .array(\n z.object({\n runId: z.string().max(64),\n log: z.number().int().nonnegative(),\n batches: z.number().int().nonnegative(),\n }),\n )\n .max(100)\n .readonly()\n .exactOptional(),\n })\n .register(wireRegistry, {\n id: \"RunAttachRequest\",\n description: \"Runs a page reads and follows: by ID, or by function and key.\",\n });\n\n/** `POST …/runs/{id}/cancel`. */\nexport interface RunCancelRequest {\n /** The view the page was opened as (D104). */\n readonly viewId: string;\n}\n\n/** The Zod schema of the `RunCancelRequest` type. */\nexport const RunCancelRequest: z.ZodType<RunCancelRequest> = z\n .object({ viewId: ViewId.schema })\n .register(wireRegistry, { id: \"RunCancelRequest\", description: \"Cancel a run, from a view.\" });\n\n/** The keys of live sources: like JavaScript export names, which is what `live.ts` declares. */\nexport const LIVE_KEY_PATTERN: RegExp = /^[A-Za-z_$][A-Za-z0-9_$]{0,127}$/;\n\n/**\n * The reserved live keys of tallies (D165 item 12, INTERFACES §18.4): `$tally/<field>` reads the\n * count by choice of a manifest `tally` entry. No producer or push writes one (their keys follow\n * {@link LIVE_KEY_PATTERN}); only a page reads them.\n */\nexport const TALLY_LIVE_PREFIX = \"$tally/\";\n\n/** The value of a tally's live key: the counts by choice, or only the total below `minTotal`. */\nexport interface TallyValue {\n /** Each listed choice's count, absent while fewer than `minTotal` answers were counted. */\n readonly counts?: Readonly<Record<string, number>>;\n /** How many answers were counted: answers, never people. */\n readonly total: number;\n}\n\n/** The keys a page may read: a source's ({@link LIVE_KEY_PATTERN}) or a tally's (`$tally/<field>`). */\nexport const READABLE_LIVE_KEY_PATTERN: RegExp =\n // biome-ignore lint/suspicious/noControlCharactersInRegex: control characters are what it refuses.\n /^(?:[A-Za-z_$][A-Za-z0-9_$]{0,127}$|\\$tally\\/[^\\u0000-\\u001f\\u007f]{1,256}$)/;\n\n/** The largest live value, in characters of serialized JSON (DATA_MODEL §5's 4 MiB). */\nexport const LIVE_VALUE_MAX: number = 4 * 1024 * 1024;\n\n/** The ring size of a pushed source in append mode that no `defineLive` sized. */\nexport const LIVE_RING_DEFAULT = 1024;\n\n/** The largest ring a source may keep. */\nexport const LIVE_RING_MAX = 100_000;\n\n/**\n * `POST …/live`: read live sources and keep their producers running for this view for the next\n * minute (D56, LL-04); a page asks again while it shows them.\n */\nexport interface LiveRequest {\n /** The view the page was opened as (D104). */\n readonly viewId: string;\n /**\n * The sources, each with its append window; `refresh` asks the source's producer to load again\n * now (`useLive`'s `refresh()`).\n */\n readonly keys: readonly {\n readonly key: string;\n readonly window?: number;\n readonly refresh?: boolean;\n }[];\n}\n\n/** The Zod schema of the `LiveRequest` type. */\nexport const LiveRequest: z.ZodType<LiveRequest> = z\n .object({\n viewId: ViewId.schema,\n keys: z\n .array(\n z.object({\n key: z.string().regex(READABLE_LIVE_KEY_PATTERN),\n window: z.int().min(1).max(LIVE_RING_MAX).exactOptional(),\n refresh: z.boolean().exactOptional(),\n }),\n )\n .max(256)\n .readonly(),\n })\n .register(wireRegistry, {\n id: \"LiveRequest\",\n description: \"Live sources a page reads and keeps running: keys and append windows.\",\n });\n\n/** Secret names: letters, digits, `_`, `.` and `-`, starting with a letter or `_` (D44). */\nexport const SECRET_NAME_PATTERN: RegExp = /^[A-Za-z_][A-Za-z0-9_.-]{0,127}$/;\n\n/** The largest secret value, in UTF-8 bytes. */\nexport const SECRET_VALUE_MAX: number = 64 * 1024;\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"actions.js","names":[],"sources":["../src/actions.ts"],"sourcesContent":["/**\n * Actions, live data and secrets (INTERFACES §2.4, §4, §6; D24, D44, D54, D56): the shapes the\n * browser protocol, the host protocol and the worker channel share. Server-function arguments and\n * results travel as the serializer's batches (`Batches`).\n *\n * ```ts\n * const run: RunState = await post(\"runs\", { viewId, fnId: \"actions.ts#sendReply\", args, clientKey });\n * if (run.status === \"succeeded\") show(await deserializeAll(run.batches));\n * ```\n */\nimport * as z from \"zod\";\nimport { ViewId } from \"./ids.ts\";\nimport type { Frame, WireError } from \"./serializer.ts\";\nimport type { PresenceState, RosterForPage } from \"./team.ts\";\nimport { wireRegistry } from \"./wire-registry.ts\";\n\n/** A value written by the serializer: its batches, in order (`serializeAll`). */\nexport type Batches = readonly (readonly Frame[])[];\n\n/**\n * The Zod schema of the `Batches` type: a list of batches, each a list of frames. The frames\n * themselves are checked by the reader (`ValueReader`), which refuses anything malformed.\n */\nexport const Batches: z.ZodType<Batches> = z\n .array(z.array(z.record(z.string(), z.unknown())).readonly())\n .readonly()\n .register(wireRegistry, {\n id: \"Batches\",\n description: \"A serialized server-function value: its batches of frames, in order.\",\n }) as unknown as z.ZodType<Batches>;\n\n/** An error as runs, calls and live sources report it. */\nexport interface ActionError extends WireError {\n /** The stack of the thrown error, kept in the run log and never sent to a page. */\n readonly stack?: string;\n}\n\n/** The Zod schema of the `ActionError` type. */\nexport const ActionError: z.ZodType<ActionError> = z\n .object({\n message: z.string(),\n code: z.string().exactOptional(),\n stack: z.string().exactOptional(),\n })\n .register(wireRegistry, {\n id: \"ActionError\",\n description: \"An error from server code: its message and diagnostic code.\",\n });\n\n/** The largest serialized arguments a call or run takes, in characters of JSON. */\nexport const ACTION_ARGS_MAX: number = 16 * 1024 * 1024;\n\n/** The largest serialized result a run keeps, in characters of JSON (larger fails the run). */\nexport const ACTION_RESULT_MAX: number = 16 * 1024 * 1024;\n\n/** The cap of a run's log, in UTF-16 code units of its lines (D47's 1 MB). */\nexport const RUN_LOG_MAX: number = 1024 * 1024;\n\n/** The line a capped log ends with. */\nexport const RUN_LOG_TRUNCATED = \"[log truncated at 1 MB]\";\n\n/** The longest run key, in characters. */\nexport const RUN_KEY_MAX = 256;\n\n/**\n * A run's state (D24, ARCHITECTURE §7). `queued`: recorded, not yet started in a worker.\n * `running`: started. `waiting`: a remote server's run that waits for its owner's instance (D165\n * item 4); a page that doesn't know it treats it like `queued`. `unknown`: a relayed run whose\n * owner never reported its end within the artifact's offline limit, which may have taken effect;\n * the owner's later report replaces it once. The others are final.\n */\nexport type RunStatus =\n | \"queued\"\n | \"running\"\n | \"waiting\"\n | \"succeeded\"\n | \"failed\"\n | \"cancelled\"\n | \"unknown\";\n\n/** Every run status. */\nexport const RUN_STATUSES: readonly RunStatus[] = [\n \"queued\",\n \"running\",\n \"waiting\",\n \"succeeded\",\n \"failed\",\n \"cancelled\",\n \"unknown\",\n];\n\n/** Whether a run in `status` has ended. */\nexport function isFinalRunStatus(status: RunStatus): boolean {\n return status === \"succeeded\" || status === \"failed\" || status === \"cancelled\";\n}\n\n/**\n * Why a run ended the way it did, beside its status: `interrupted` (its worker or the instance\n * stopped while it ran, D24), `threw` (the action threw), `unserializable` (its result is outside\n * the type set), `too-large`, `parked` (its artifact's worker keeps crashing), `cancelled` (by a\n * viewer), `unknown-function`. Later releases add reasons.\n */\nexport type RunReason = string;\n\n/** A run's progress, as the action last reported it. */\nexport interface RunProgress {\n /** From 0 to 1. */\n readonly fraction?: number;\n /** One short line for people. */\n readonly message?: string;\n}\n\n/** The Zod schema of the `RunProgress` type. */\nexport const RunProgress: z.ZodType<RunProgress> = z\n .object({\n fraction: z.number().min(0).max(1).exactOptional(),\n message: z.string().max(1000).exactOptional(),\n })\n .register(wireRegistry, {\n id: \"RunProgress\",\n description: \"A run's progress: fraction and message.\",\n });\n\n/**\n * One action run as a page reads it (D54): its state, progress, log and the result written so far.\n * A result that is an async iterable grows item by item while the run is `running`.\n */\nexport interface RunState {\n /** The run's `run_` ID. */\n readonly runId: string;\n /** The server function it runs: `<module path>#<export>`. */\n readonly fnId: string;\n /** The idempotency key it was started with, if any. */\n readonly key?: string;\n /** The run's state. */\n readonly status: RunStatus;\n /** Why it ended, for `failed` and `cancelled`. */\n readonly reason?: RunReason;\n /** Its latest progress. */\n readonly progress?: RunProgress;\n /** The log lines, capped at 1 MB with a marker line. */\n readonly log: readonly string[];\n /** The result's batches so far. */\n readonly batches: Batches;\n /** For `failed`: what went wrong, without the stack. */\n readonly error?: WireError;\n /** When it was recorded. */\n readonly startedAt: string;\n /** When it ended. */\n readonly finishedAt?: string;\n /** Whether this request joined a run that already existed (a key or a retried `clientKey`). */\n readonly joined?: boolean;\n /**\n * The index of the first line in `log`, when the request said which lines the page holds\n * (`RunAttachRequest.held`); absent: 0, the whole log.\n */\n readonly logFrom?: number;\n /** The index of the first batch in `batches`, as `logFrom`; absent: 0. */\n readonly batchFrom?: number;\n /**\n * On a remote server: the run is `running` on its owner's instance, which can't be reached now\n * (D165 item 4); it ends when the owner reports, or becomes `unknown` past the offline limit.\n */\n readonly ownerUnreachable?: boolean;\n}\n\n/** The Zod schema of the `RunState` type. */\nexport const RunState: z.ZodType<RunState> = z\n .object({\n runId: z.string(),\n fnId: z.string(),\n key: z.string().exactOptional(),\n status: z.enum(RUN_STATUSES as [RunStatus, ...RunStatus[]]),\n reason: z.string().exactOptional(),\n progress: RunProgress.exactOptional(),\n log: z.array(z.string()).readonly(),\n batches: Batches,\n error: z.object({ message: z.string(), code: z.string().exactOptional() }).exactOptional(),\n startedAt: z.string(),\n finishedAt: z.string().exactOptional(),\n joined: z.boolean().exactOptional(),\n logFrom: z.number().int().nonnegative().exactOptional(),\n batchFrom: z.number().int().nonnegative().exactOptional(),\n ownerUnreachable: z.boolean().exactOptional(),\n })\n .register(wireRegistry, {\n id: \"RunState\",\n description: \"An action run: status, progress, log and the result written so far.\",\n });\n\n/**\n * What changed in a run since a page last heard: a lossy notification on the event stream. Lines\n * start at `logFrom` and batches at `batchFrom`; a page that holds fewer reads the run again\n * (`runs/attach`).\n */\nexport interface RunDelta {\n /** The run's `run_` ID. */\n readonly runId: string;\n /** The run's state. */\n readonly status: RunStatus;\n /** Why it ended so, for `failed` and `cancelled`. */\n readonly reason?: RunReason;\n /** Its latest progress. */\n readonly progress?: RunProgress;\n /** The index of the first line in `log`. */\n readonly logFrom: number;\n /** Log lines, starting at `logFrom`. */\n readonly log: readonly string[];\n /** The index of the first batch in `batches`. */\n readonly batchFrom: number;\n /** Result batches, starting at `batchFrom`. */\n readonly batches: Batches;\n /** What went wrong. */\n readonly error?: WireError;\n /** When it ended. */\n readonly finishedAt?: string;\n}\n\n/** A live source's value as a page reads it (D56). */\nexport interface LiveState {\n /** The idempotency key it was started with, if any. */\n readonly key: string;\n /** The value's revision, a decimal string that only grows; absent before any value. */\n readonly revision?: string;\n /** When the value was produced. */\n readonly at?: string;\n /** The latest value, serialized. */\n readonly value?: Batches;\n /**\n * Append mode (`useLive(key, { mode: \"append\" })`): the values kept in the source's ring, oldest\n * first, at most the window the page asked for.\n */\n readonly ring?: readonly {\n readonly revision: string;\n readonly at: string;\n readonly value: Batches;\n }[];\n /** The producer's last failure, while the last good value stays (FAILURE_MODEL §6). */\n readonly error?: WireError;\n /**\n * `true` while the source has no value and no failure and the artifact's latest version has a\n * producer whose first `load` is on its way: the page shows it loading, and verify waits for it.\n * Absent for a key nothing produces (one only `mostra push` writes) and for a source that only\n * streams, whose first value may never come (WP-14's Opus review).\n */\n readonly awaiting?: boolean;\n /**\n * `true` on a hosted page while the artifact's owner instance is offline, so its producers\n * can't refresh the value: the last value stays, with its `at` (D165 item 4).\n */\n readonly ownerOffline?: boolean;\n}\n\n/** One live update on the event stream: never stored as an event (D63, LL-04). */\nexport interface LiveUpdate {\n /** The live source's key. */\n readonly key: string;\n /** The value's revision. */\n readonly revision?: string;\n /** When the value was produced. */\n readonly at?: string;\n /** The value, serialized. */\n readonly value?: Batches;\n /** What went wrong. */\n readonly error?: WireError;\n /**\n * `false` when a source read as {@link LiveState.awaiting} turned out to have no first `load`\n * (its producer only streams): the page stops waiting for a first value.\n */\n readonly awaiting?: boolean;\n}\n\n/**\n * An ephemeral message on a page's event stream (SSE `event: run`, `live`, `respondents` or\n * `presence`, without an `id`, so a reconnect's cursor is untouched) or in a poll's `ephemeral`:\n * lossy, coalesced, and never stored as an event. `respondents` and `presence` (D168) reach only a\n * page that asked for them, so a version built before them never receives one.\n */\nexport type EphemeralMessage =\n | { readonly kind: \"run\"; readonly run: RunDelta }\n | { readonly kind: \"live\"; readonly live: LiveUpdate }\n | { readonly kind: \"respondents\"; readonly respondents: RosterForPage }\n | { readonly kind: \"presence\"; readonly presence: PresenceState };\n\n/** `POST …/call/{fnId}`: a plain server-function call, no durable record (D54). */\nexport interface CallRequest {\n /** The view the page was opened as (D104). */\n readonly viewId: string;\n /** The arguments, serialized as one array value. */\n readonly args: Batches;\n}\n\n/** The Zod schema of the `CallRequest` type. */\nexport const CallRequest: z.ZodType<CallRequest> = z\n .object({ viewId: ViewId.schema, args: Batches })\n .register(wireRegistry, {\n id: \"CallRequest\",\n description: \"A plain server-function call: the view and the serialized arguments.\",\n });\n\n/**\n * One line of a plain call's answer (`application/x-ndjson`): a batch of the result, then the end.\n */\nexport type CallLine =\n | { readonly batch: readonly Frame[] }\n | { readonly end: { readonly status: \"succeeded\" } }\n | { readonly end: { readonly status: \"failed\"; readonly error: WireError } };\n\n/** `POST …/runs`: start a durable action run, or join one (D54, AC-02, AC-03). */\nexport interface RunRequest {\n /** The view the page was opened as (D104). */\n readonly viewId: string;\n /** `<module path>#<export>`. */\n readonly fnId: string;\n /** The arguments, serialized as one array value. */\n readonly args: Batches;\n /** The author's idempotency key: one run per artifact, function and key, ever. */\n readonly key?: string;\n /** A fresh ID per invocation, so a retried request joins the run it already started. */\n readonly clientKey: string;\n}\n\n/** The Zod schema of the `RunRequest` type. */\nexport const RunRequest: z.ZodType<RunRequest> = z\n .object({\n viewId: ViewId.schema,\n fnId: z.string().min(3).max(1024),\n args: Batches,\n key: z.string().min(1).max(RUN_KEY_MAX).exactOptional(),\n clientKey: z.string().min(8).max(64),\n })\n .register(wireRegistry, {\n id: \"RunRequest\",\n description: \"Start or join an action run: the function, its arguments and keys.\",\n });\n\n/**\n * `POST …/runs/attach`: read runs and hear their changes on the event stream for the next minute\n * (re-attach after a reload, AC-02). By ID, or by function and key.\n */\nexport interface RunAttachRequest {\n /** The view the page was opened as (D104). */\n readonly viewId: string;\n /** Runs by ID. */\n readonly runIds?: readonly string[];\n /** Runs by function and key. */\n readonly keyed?: readonly { readonly fnId: string; readonly key: string }[];\n /**\n * What the page already holds of runs it names by ID: so many log lines and batches. Each such\n * run's answer starts there (`RunState.logFrom`, `batchFrom`), so a page renewing its interest\n * doesn't read the whole run again (Opus review 14).\n */\n readonly held?: readonly {\n readonly runId: string;\n readonly log: number;\n readonly batches: number;\n }[];\n}\n\n/** The Zod schema of the `RunAttachRequest` type. */\nexport const RunAttachRequest: z.ZodType<RunAttachRequest> = z\n .object({\n viewId: ViewId.schema,\n runIds: z.array(z.string().max(64)).max(100).readonly().exactOptional(),\n keyed: z\n .array(\n z.object({ fnId: z.string().min(3).max(1024), key: z.string().min(1).max(RUN_KEY_MAX) }),\n )\n .max(100)\n .readonly()\n .exactOptional(),\n held: z\n .array(\n z.object({\n runId: z.string().max(64),\n log: z.number().int().nonnegative(),\n batches: z.number().int().nonnegative(),\n }),\n )\n .max(100)\n .readonly()\n .exactOptional(),\n })\n .register(wireRegistry, {\n id: \"RunAttachRequest\",\n description: \"Runs a page reads and follows: by ID, or by function and key.\",\n });\n\n/** `POST …/runs/{id}/cancel`. */\nexport interface RunCancelRequest {\n /** The view the page was opened as (D104). */\n readonly viewId: string;\n}\n\n/** The Zod schema of the `RunCancelRequest` type. */\nexport const RunCancelRequest: z.ZodType<RunCancelRequest> = z\n .object({ viewId: ViewId.schema })\n .register(wireRegistry, { id: \"RunCancelRequest\", description: \"Cancel a run, from a view.\" });\n\n/** The keys of live sources: like JavaScript export names, which is what `live.ts` declares. */\nexport const LIVE_KEY_PATTERN: RegExp = /^[A-Za-z_$][A-Za-z0-9_$]{0,127}$/;\n\n/**\n * The reserved live keys of tallies (D165 item 12, INTERFACES §18.4): `$tally/<field>` reads the\n * count by choice of a manifest `tally` entry. No producer or push writes one (their keys follow\n * {@link LIVE_KEY_PATTERN}); only a page reads them.\n */\nexport const TALLY_LIVE_PREFIX = \"$tally/\";\n\n/** The value of a tally's live key: the counts by choice, or only the total below `minTotal`. */\nexport interface TallyValue {\n /** Each listed choice's count, absent while fewer than `minTotal` answers were counted. */\n readonly counts?: Readonly<Record<string, number>>;\n /** How many answers were counted: answers, never people. */\n readonly total: number;\n}\n\n/** The keys a page may read: a source's ({@link LIVE_KEY_PATTERN}) or a tally's (`$tally/<field>`). */\nexport const READABLE_LIVE_KEY_PATTERN: RegExp =\n // biome-ignore lint/suspicious/noControlCharactersInRegex: control characters are what it refuses.\n /^(?:[A-Za-z_$][A-Za-z0-9_$]{0,127}$|\\$tally\\/[^\\u0000-\\u001f\\u007f]{1,256}$)/;\n\n/** The largest live value, in characters of serialized JSON (DATA_MODEL §5's 4 MiB). */\nexport const LIVE_VALUE_MAX: number = 4 * 1024 * 1024;\n\n/** The ring size of a pushed source in append mode that no `defineLive` sized. */\nexport const LIVE_RING_DEFAULT = 1024;\n\n/** The largest ring a source may keep. */\nexport const LIVE_RING_MAX = 100_000;\n\n/**\n * `POST …/live`: read live sources and keep their producers running for this view for the next\n * minute (D56, LL-04); a page asks again while it shows them.\n */\nexport interface LiveRequest {\n /** The view the page was opened as (D104). */\n readonly viewId: string;\n /**\n * The sources, each with its append window; `refresh` asks the source's producer to load again\n * now (`useLive`'s `refresh()`).\n */\n readonly keys: readonly {\n readonly key: string;\n readonly window?: number;\n readonly refresh?: boolean;\n }[];\n}\n\n/** The Zod schema of the `LiveRequest` type. */\nexport const LiveRequest: z.ZodType<LiveRequest> = z\n .object({\n viewId: ViewId.schema,\n keys: z\n .array(\n z.object({\n key: z.string().regex(READABLE_LIVE_KEY_PATTERN),\n window: z.int().min(1).max(LIVE_RING_MAX).exactOptional(),\n refresh: z.boolean().exactOptional(),\n }),\n )\n .max(256)\n .readonly(),\n })\n .register(wireRegistry, {\n id: \"LiveRequest\",\n description: \"Live sources a page reads and keeps running: keys and append windows.\",\n });\n\n/** Secret names: letters, digits, `_`, `.` and `-`, starting with a letter or `_` (D44). */\nexport const SECRET_NAME_PATTERN: RegExp = /^[A-Za-z_][A-Za-z0-9_.-]{0,127}$/;\n\n/** The largest secret value, in UTF-8 bytes. */\nexport const SECRET_VALUE_MAX: number = 64 * 1024;\n"],"mappings":"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"}
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { EphemeralMessage } from "./actions.js";
|
|
2
1
|
import { DeliveryTarget, REVIEW_SET_ID_PATTERN, VersionRef, ViewContext, ViewContextWire, readViewContext } from "./view.js";
|
|
3
2
|
import { DocumentRevision, EventRecord, FieldOp, FieldState, SubmissionSummary, Viewer } from "./interaction.js";
|
|
3
|
+
import { EphemeralMessage } from "./actions.js";
|
|
4
4
|
import * as z from "zod";
|
|
5
5
|
//#region src/browser.d.ts
|
|
6
6
|
/** Every browser-protocol revision this release serves, oldest first. */
|
|
@@ -25,11 +25,12 @@ import { ShareDiagnosticCode, shareDiagnosticCodes } from "./share.js";
|
|
|
25
25
|
import { SmokeDiagnosticCode, smokeDiagnosticCodes } from "./smoke.js";
|
|
26
26
|
import { SubmitDiagnosticCode, submitDiagnosticCodes } from "./submit.js";
|
|
27
27
|
import { TargetDiagnosticCode, targetDiagnosticCodes } from "./target.js";
|
|
28
|
+
import { TeamDiagnosticCode, teamDiagnosticCodes } from "./team.js";
|
|
28
29
|
import { TypeDiagnosticCode, typeDiagnosticCodes } from "./type.js";
|
|
29
30
|
import { VerifyDiagnosticCode, verifyDiagnosticCodes } from "./verify.js";
|
|
30
31
|
//#region src/diagnostics/codes/index.d.ts
|
|
31
32
|
/** Every code in the catalog. Codes are semver surface and are never removed (AX-03). */
|
|
32
|
-
export type KnownDiagnosticCode = RemoteDiagnosticCode | ShareDiagnosticCode | CliDiagnosticCode | RegressionDiagnosticCode | SmokeDiagnosticCode | A11yDiagnosticCode | NetworkDiagnosticCode | ConsoleDiagnosticCode | TypeDiagnosticCode | VerifyDiagnosticCode | LiveDiagnosticCode | SecretDiagnosticCode | RuntimeDiagnosticCode | FieldDiagnosticCode | SubmitDiagnosticCode | HygieneDiagnosticCode | DepDiagnosticCode | EnvDiagnosticCode | TargetDiagnosticCode | ArtifactDiagnosticCode | PublishDiagnosticCode | ActionDiagnosticCode | BuildDiagnosticCode | ManifestDiagnosticCode | HomeDiagnosticCode | PlatformDiagnosticCode | HostDiagnosticCode;
|
|
33
|
+
export type KnownDiagnosticCode = TeamDiagnosticCode | RemoteDiagnosticCode | ShareDiagnosticCode | CliDiagnosticCode | RegressionDiagnosticCode | SmokeDiagnosticCode | A11yDiagnosticCode | NetworkDiagnosticCode | ConsoleDiagnosticCode | TypeDiagnosticCode | VerifyDiagnosticCode | LiveDiagnosticCode | SecretDiagnosticCode | RuntimeDiagnosticCode | FieldDiagnosticCode | SubmitDiagnosticCode | HygieneDiagnosticCode | DepDiagnosticCode | EnvDiagnosticCode | TargetDiagnosticCode | ArtifactDiagnosticCode | PublishDiagnosticCode | ActionDiagnosticCode | BuildDiagnosticCode | ManifestDiagnosticCode | HomeDiagnosticCode | PlatformDiagnosticCode | HostDiagnosticCode;
|
|
33
34
|
/** Every cataloged code with its severity, phase, title, default hint and docs text. */
|
|
34
35
|
export declare const diagnosticCatalog: Readonly<Record<KnownDiagnosticCode, DiagnosticSpec>>;
|
|
35
36
|
/** Options for {@link createDiagnostic}. */
|
|
@@ -49,5 +50,5 @@ export interface CreateDiagnosticOptions {
|
|
|
49
50
|
*/
|
|
50
51
|
export declare function createDiagnostic(code: KnownDiagnosticCode, details: DiagnosticDetails, options?: CreateDiagnosticOptions): Diagnostic;
|
|
51
52
|
//#endregion
|
|
52
|
-
export { type A11yDiagnosticCode, type ActionDiagnosticCode, type ArtifactDiagnosticCode, type BuildDiagnosticCode, type CliDiagnosticCode, type ConsoleDiagnosticCode, type DepDiagnosticCode, type EnvDiagnosticCode, type FieldDiagnosticCode, type HomeDiagnosticCode, type HostDiagnosticCode, type HygieneDiagnosticCode, type LiveDiagnosticCode, type ManifestDiagnosticCode, type NetworkDiagnosticCode, type PlatformDiagnosticCode, type PublishDiagnosticCode, type RegressionDiagnosticCode, type RemoteDiagnosticCode, type RuntimeDiagnosticCode, type SecretDiagnosticCode, type ShareDiagnosticCode, type SmokeDiagnosticCode, type SubmitDiagnosticCode, type TargetDiagnosticCode, type TypeDiagnosticCode, type VerifyDiagnosticCode, a11yDiagnosticCodes, actionDiagnosticCodes, artifactDiagnosticCodes, buildDiagnosticCodes, cliDiagnosticCodes, consoleDiagnosticCodes, depDiagnosticCodes, envDiagnosticCodes, fieldDiagnosticCodes, homeDiagnosticCodes, hostDiagnosticCodes, hygieneDiagnosticCodes, liveDiagnosticCodes, manifestDiagnosticCodes, networkDiagnosticCodes, platformDiagnosticCodes, publishDiagnosticCodes, regressionDiagnosticCodes, remoteDiagnosticCodes, runtimeDiagnosticCodes, secretDiagnosticCodes, shareDiagnosticCodes, smokeDiagnosticCodes, submitDiagnosticCodes, targetDiagnosticCodes, typeDiagnosticCodes, verifyDiagnosticCodes };
|
|
53
|
+
export { type A11yDiagnosticCode, type ActionDiagnosticCode, type ArtifactDiagnosticCode, type BuildDiagnosticCode, type CliDiagnosticCode, type ConsoleDiagnosticCode, type DepDiagnosticCode, type EnvDiagnosticCode, type FieldDiagnosticCode, type HomeDiagnosticCode, type HostDiagnosticCode, type HygieneDiagnosticCode, type LiveDiagnosticCode, type ManifestDiagnosticCode, type NetworkDiagnosticCode, type PlatformDiagnosticCode, type PublishDiagnosticCode, type RegressionDiagnosticCode, type RemoteDiagnosticCode, type RuntimeDiagnosticCode, type SecretDiagnosticCode, type ShareDiagnosticCode, type SmokeDiagnosticCode, type SubmitDiagnosticCode, type TargetDiagnosticCode, type TeamDiagnosticCode, type TypeDiagnosticCode, type VerifyDiagnosticCode, a11yDiagnosticCodes, actionDiagnosticCodes, artifactDiagnosticCodes, buildDiagnosticCodes, cliDiagnosticCodes, consoleDiagnosticCodes, depDiagnosticCodes, envDiagnosticCodes, fieldDiagnosticCodes, homeDiagnosticCodes, hostDiagnosticCodes, hygieneDiagnosticCodes, liveDiagnosticCodes, manifestDiagnosticCodes, networkDiagnosticCodes, platformDiagnosticCodes, publishDiagnosticCodes, regressionDiagnosticCodes, remoteDiagnosticCodes, runtimeDiagnosticCodes, secretDiagnosticCodes, shareDiagnosticCodes, smokeDiagnosticCodes, submitDiagnosticCodes, targetDiagnosticCodes, teamDiagnosticCodes, typeDiagnosticCodes, verifyDiagnosticCodes };
|
|
53
54
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/diagnostics/codes/index.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../../src/diagnostics/codes/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YAmEY,sBAER,qBACA,uBACA,sBACA,oBACA,2BACA,sBACA,qBACA,wBACA,wBACA,qBACA,uBACA,qBACA,uBACA,wBACA,sBACA,uBACA,wBACA,oBACA,oBACA,uBACA,yBACA,wBACA,uBACA,sBACA,yBACA,qBACA,yBACA;;qBAGS,mBAAmB,SAAS,OAAO,qBAAqB;;iBAiCpD;;WAEN;;;;;;;;;;;;wBAaK,iBACd,MAAM,qBACN,SAAS,mBACT,UAAS,0BACR"}
|
|
@@ -24,11 +24,13 @@ import { shareDiagnosticCodes, shareDiagnostics } from "./share.js";
|
|
|
24
24
|
import { smokeDiagnosticCodes, smokeDiagnostics } from "./smoke.js";
|
|
25
25
|
import { submitDiagnosticCodes, submitDiagnostics } from "./submit.js";
|
|
26
26
|
import { targetDiagnosticCodes, targetDiagnostics } from "./target.js";
|
|
27
|
+
import { teamDiagnosticCodes, teamDiagnostics } from "./team.js";
|
|
27
28
|
import { typeDiagnosticCodes, typeDiagnostics } from "./type.js";
|
|
28
29
|
import { verifyDiagnosticCodes, verifyDiagnostics } from "./verify.js";
|
|
29
30
|
//#region src/diagnostics/codes/index.ts
|
|
30
31
|
/** Every cataloged code with its severity, phase, title, default hint and docs text. */
|
|
31
32
|
const diagnosticCatalog = {
|
|
33
|
+
...teamDiagnostics,
|
|
32
34
|
...remoteDiagnostics,
|
|
33
35
|
...shareDiagnostics,
|
|
34
36
|
...cliDiagnostics,
|
|
@@ -71,6 +73,6 @@ function createDiagnostic(code, details, options = {}) {
|
|
|
71
73
|
return buildDiagnostic(code, diagnosticCatalog[code], details, options.docsBase);
|
|
72
74
|
}
|
|
73
75
|
//#endregion
|
|
74
|
-
export { a11yDiagnosticCodes, actionDiagnosticCodes, artifactDiagnosticCodes, buildDiagnosticCodes, cliDiagnosticCodes, consoleDiagnosticCodes, createDiagnostic, depDiagnosticCodes, diagnosticCatalog, envDiagnosticCodes, fieldDiagnosticCodes, homeDiagnosticCodes, hostDiagnosticCodes, hygieneDiagnosticCodes, liveDiagnosticCodes, manifestDiagnosticCodes, networkDiagnosticCodes, platformDiagnosticCodes, publishDiagnosticCodes, regressionDiagnosticCodes, remoteDiagnosticCodes, runtimeDiagnosticCodes, secretDiagnosticCodes, shareDiagnosticCodes, smokeDiagnosticCodes, submitDiagnosticCodes, targetDiagnosticCodes, typeDiagnosticCodes, verifyDiagnosticCodes };
|
|
76
|
+
export { a11yDiagnosticCodes, actionDiagnosticCodes, artifactDiagnosticCodes, buildDiagnosticCodes, cliDiagnosticCodes, consoleDiagnosticCodes, createDiagnostic, depDiagnosticCodes, diagnosticCatalog, envDiagnosticCodes, fieldDiagnosticCodes, homeDiagnosticCodes, hostDiagnosticCodes, hygieneDiagnosticCodes, liveDiagnosticCodes, manifestDiagnosticCodes, networkDiagnosticCodes, platformDiagnosticCodes, publishDiagnosticCodes, regressionDiagnosticCodes, remoteDiagnosticCodes, runtimeDiagnosticCodes, secretDiagnosticCodes, shareDiagnosticCodes, smokeDiagnosticCodes, submitDiagnosticCodes, targetDiagnosticCodes, teamDiagnosticCodes, typeDiagnosticCodes, verifyDiagnosticCodes };
|
|
75
77
|
|
|
76
78
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../../src/diagnostics/codes/index.ts"],"sourcesContent":["/**\n * The diagnostic catalog, assembled from one source file per area. `pnpm gen diagnostic` keeps\n * the lists below in step with the area files; edit the area files, not these lists.\n */\nimport type { Diagnostic } from \"../diagnostic.ts\";\nimport { buildDiagnostic, type DiagnosticDetails, type DiagnosticSpec } from \"../spec.ts\";\nimport { type A11yDiagnosticCode, a11yDiagnostics } from \"./a11y.ts\";\nimport { type ActionDiagnosticCode, actionDiagnostics } from \"./action.ts\";\nimport { type ArtifactDiagnosticCode, artifactDiagnostics } from \"./artifact.ts\";\nimport { type BuildDiagnosticCode, buildDiagnostics } from \"./build.ts\";\nimport { type CliDiagnosticCode, cliDiagnostics } from \"./cli.ts\";\nimport { type ConsoleDiagnosticCode, consoleDiagnostics } from \"./console.ts\";\nimport { type DepDiagnosticCode, depDiagnostics } from \"./dep.ts\";\nimport { type EnvDiagnosticCode, envDiagnostics } from \"./env.ts\";\nimport { type FieldDiagnosticCode, fieldDiagnostics } from \"./field.ts\";\nimport { type HomeDiagnosticCode, homeDiagnostics } from \"./home.ts\";\nimport { type HostDiagnosticCode, hostDiagnostics } from \"./host.ts\";\nimport { type HygieneDiagnosticCode, hygieneDiagnostics } from \"./hygiene.ts\";\nimport { type LiveDiagnosticCode, liveDiagnostics } from \"./live.ts\";\nimport { type ManifestDiagnosticCode, manifestDiagnostics } from \"./manifest.ts\";\nimport { type NetworkDiagnosticCode, networkDiagnostics } from \"./network.ts\";\nimport { type PlatformDiagnosticCode, platformDiagnostics } from \"./platform.ts\";\nimport { type PublishDiagnosticCode, publishDiagnostics } from \"./publish.ts\";\nimport { type RegressionDiagnosticCode, regressionDiagnostics } from \"./regression.ts\";\
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../../src/diagnostics/codes/index.ts"],"sourcesContent":["/**\n * The diagnostic catalog, assembled from one source file per area. `pnpm gen diagnostic` keeps\n * the lists below in step with the area files; edit the area files, not these lists.\n */\nimport type { Diagnostic } from \"../diagnostic.ts\";\nimport { buildDiagnostic, type DiagnosticDetails, type DiagnosticSpec } from \"../spec.ts\";\nimport { type A11yDiagnosticCode, a11yDiagnostics } from \"./a11y.ts\";\nimport { type ActionDiagnosticCode, actionDiagnostics } from \"./action.ts\";\nimport { type ArtifactDiagnosticCode, artifactDiagnostics } from \"./artifact.ts\";\nimport { type BuildDiagnosticCode, buildDiagnostics } from \"./build.ts\";\nimport { type CliDiagnosticCode, cliDiagnostics } from \"./cli.ts\";\nimport { type ConsoleDiagnosticCode, consoleDiagnostics } from \"./console.ts\";\nimport { type DepDiagnosticCode, depDiagnostics } from \"./dep.ts\";\nimport { type EnvDiagnosticCode, envDiagnostics } from \"./env.ts\";\nimport { type FieldDiagnosticCode, fieldDiagnostics } from \"./field.ts\";\nimport { type HomeDiagnosticCode, homeDiagnostics } from \"./home.ts\";\nimport { type HostDiagnosticCode, hostDiagnostics } from \"./host.ts\";\nimport { type HygieneDiagnosticCode, hygieneDiagnostics } from \"./hygiene.ts\";\nimport { type LiveDiagnosticCode, liveDiagnostics } from \"./live.ts\";\nimport { type ManifestDiagnosticCode, manifestDiagnostics } from \"./manifest.ts\";\nimport { type NetworkDiagnosticCode, networkDiagnostics } from \"./network.ts\";\nimport { type PlatformDiagnosticCode, platformDiagnostics } from \"./platform.ts\";\nimport { type PublishDiagnosticCode, publishDiagnostics } from \"./publish.ts\";\nimport { type RegressionDiagnosticCode, regressionDiagnostics } from \"./regression.ts\";\nimport { type RemoteDiagnosticCode, remoteDiagnostics } from \"./remote.ts\";\nimport { type RuntimeDiagnosticCode, runtimeDiagnostics } from \"./runtime.ts\";\nimport { type SecretDiagnosticCode, secretDiagnostics } from \"./secret.ts\";\nimport { type ShareDiagnosticCode, shareDiagnostics } from \"./share.ts\";\nimport { type SmokeDiagnosticCode, smokeDiagnostics } from \"./smoke.ts\";\nimport { type SubmitDiagnosticCode, submitDiagnostics } from \"./submit.ts\";\nimport { type TargetDiagnosticCode, targetDiagnostics } from \"./target.ts\";\n// gen:area-imports\nimport { type TeamDiagnosticCode, teamDiagnostics } from \"./team.ts\";\nimport { type TypeDiagnosticCode, typeDiagnostics } from \"./type.ts\";\nimport { type VerifyDiagnosticCode, verifyDiagnostics } from \"./verify.ts\";\n\nexport { type A11yDiagnosticCode, a11yDiagnosticCodes } from \"./a11y.ts\";\nexport { type ActionDiagnosticCode, actionDiagnosticCodes } from \"./action.ts\";\nexport { type ArtifactDiagnosticCode, artifactDiagnosticCodes } from \"./artifact.ts\";\nexport { type BuildDiagnosticCode, buildDiagnosticCodes } from \"./build.ts\";\nexport { type CliDiagnosticCode, cliDiagnosticCodes } from \"./cli.ts\";\nexport { type ConsoleDiagnosticCode, consoleDiagnosticCodes } from \"./console.ts\";\nexport { type DepDiagnosticCode, depDiagnosticCodes } from \"./dep.ts\";\nexport { type EnvDiagnosticCode, envDiagnosticCodes } from \"./env.ts\";\nexport { type FieldDiagnosticCode, fieldDiagnosticCodes } from \"./field.ts\";\nexport { type HomeDiagnosticCode, homeDiagnosticCodes } from \"./home.ts\";\nexport { type HostDiagnosticCode, hostDiagnosticCodes } from \"./host.ts\";\nexport { type HygieneDiagnosticCode, hygieneDiagnosticCodes } from \"./hygiene.ts\";\nexport { type LiveDiagnosticCode, liveDiagnosticCodes } from \"./live.ts\";\nexport { type ManifestDiagnosticCode, manifestDiagnosticCodes } from \"./manifest.ts\";\nexport { type NetworkDiagnosticCode, networkDiagnosticCodes } from \"./network.ts\";\nexport { type PlatformDiagnosticCode, platformDiagnosticCodes } from \"./platform.ts\";\nexport { type PublishDiagnosticCode, publishDiagnosticCodes } from \"./publish.ts\";\nexport { type RegressionDiagnosticCode, regressionDiagnosticCodes } from \"./regression.ts\";\nexport { type RemoteDiagnosticCode, remoteDiagnosticCodes } from \"./remote.ts\";\nexport { type RuntimeDiagnosticCode, runtimeDiagnosticCodes } from \"./runtime.ts\";\nexport { type SecretDiagnosticCode, secretDiagnosticCodes } from \"./secret.ts\";\nexport { type ShareDiagnosticCode, shareDiagnosticCodes } from \"./share.ts\";\nexport { type SmokeDiagnosticCode, smokeDiagnosticCodes } from \"./smoke.ts\";\nexport { type SubmitDiagnosticCode, submitDiagnosticCodes } from \"./submit.ts\";\nexport { type TargetDiagnosticCode, targetDiagnosticCodes } from \"./target.ts\";\n// gen:area-exports\nexport { type TeamDiagnosticCode, teamDiagnosticCodes } from \"./team.ts\";\nexport { type TypeDiagnosticCode, typeDiagnosticCodes } from \"./type.ts\";\nexport { type VerifyDiagnosticCode, verifyDiagnosticCodes } from \"./verify.ts\";\n\n/** Every code in the catalog. Codes are semver surface and are never removed (AX-03). */\nexport type KnownDiagnosticCode =\n // gen:area-codes\n | TeamDiagnosticCode\n | RemoteDiagnosticCode\n | ShareDiagnosticCode\n | CliDiagnosticCode\n | RegressionDiagnosticCode\n | SmokeDiagnosticCode\n | A11yDiagnosticCode\n | NetworkDiagnosticCode\n | ConsoleDiagnosticCode\n | TypeDiagnosticCode\n | VerifyDiagnosticCode\n | LiveDiagnosticCode\n | SecretDiagnosticCode\n | RuntimeDiagnosticCode\n | FieldDiagnosticCode\n | SubmitDiagnosticCode\n | HygieneDiagnosticCode\n | DepDiagnosticCode\n | EnvDiagnosticCode\n | TargetDiagnosticCode\n | ArtifactDiagnosticCode\n | PublishDiagnosticCode\n | ActionDiagnosticCode\n | BuildDiagnosticCode\n | ManifestDiagnosticCode\n | HomeDiagnosticCode\n | PlatformDiagnosticCode\n | HostDiagnosticCode;\n\n/** Every cataloged code with its severity, phase, title, default hint and docs text. */\nexport const diagnosticCatalog: Readonly<Record<KnownDiagnosticCode, DiagnosticSpec>> = {\n // gen:area-spreads\n ...teamDiagnostics,\n ...remoteDiagnostics,\n ...shareDiagnostics,\n ...cliDiagnostics,\n ...regressionDiagnostics,\n ...smokeDiagnostics,\n ...a11yDiagnostics,\n ...networkDiagnostics,\n ...consoleDiagnostics,\n ...typeDiagnostics,\n ...verifyDiagnostics,\n ...liveDiagnostics,\n ...secretDiagnostics,\n ...runtimeDiagnostics,\n ...fieldDiagnostics,\n ...submitDiagnostics,\n ...hygieneDiagnostics,\n ...depDiagnostics,\n ...envDiagnostics,\n ...targetDiagnostics,\n ...artifactDiagnostics,\n ...publishDiagnostics,\n ...actionDiagnostics,\n ...buildDiagnostics,\n ...manifestDiagnostics,\n ...homeDiagnostics,\n ...platformDiagnostics,\n ...hostDiagnostics,\n};\n\n/** Options for {@link createDiagnostic}. */\nexport interface CreateDiagnosticOptions {\n /** The docs site base URL. Defaults to `DEFAULT_DOCS_BASE`. */\n readonly docsBase?: string;\n}\n\n/**\n * Creates the diagnostic for one occurrence of a cataloged code. Severity, phase, the default hint\n * and the docs link come from the catalog.\n *\n * ```ts\n * createDiagnostic(\"MOSTRA_HOST_REVISION_UNSUPPORTED\", {\n * message: \"The client offered 2026-01-01; this instance supports 2026-10-10.\",\n * });\n * ```\n */\nexport function createDiagnostic(\n code: KnownDiagnosticCode,\n details: DiagnosticDetails,\n options: CreateDiagnosticOptions = {},\n): Diagnostic {\n return buildDiagnostic(code, diagnosticCatalog[code], details, options.docsBase);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmGA,MAAa,oBAA2E;CAEtF,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;CACH,GAAG;AACL;;;;;;;;;;;AAkBA,SAAgB,iBACd,MACA,SACA,UAAmC,CAAC,GACxB;CACZ,OAAO,gBAAgB,MAAM,kBAAkB,OAAO,SAAS,QAAQ,QAAQ;AACjF"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "../spec.js";
|
|
2
|
+
//#region src/diagnostics/codes/team.d.ts
|
|
3
|
+
/** The codes of the TEAM area, in the order they were added. */
|
|
4
|
+
export declare const teamDiagnosticCodes: readonly ["MOSTRA_TEAM_ROSTER_POLICY", "MOSTRA_TEAM_ROSTER_TOO_LARGE", "MOSTRA_TEAM_PRESENCE_RATE_LIMITED"];
|
|
5
|
+
/** The codes of the TEAM area. */
|
|
6
|
+
export type TeamDiagnosticCode = (typeof teamDiagnosticCodes)[number];
|
|
7
|
+
//#endregion
|
|
8
|
+
//# sourceMappingURL=team.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team.d.ts","names":[],"sources":["../../../src/diagnostics/codes/team.ts"],"mappings":";;;qBAMa;;YAQD,6BAA6B"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//#region src/diagnostics/codes/team.ts
|
|
2
|
+
/** The codes of the TEAM area, in the order they were added. */
|
|
3
|
+
const teamDiagnosticCodes = [
|
|
4
|
+
"MOSTRA_TEAM_ROSTER_POLICY",
|
|
5
|
+
"MOSTRA_TEAM_ROSTER_TOO_LARGE",
|
|
6
|
+
"MOSTRA_TEAM_PRESENCE_RATE_LIMITED"
|
|
7
|
+
];
|
|
8
|
+
/** The TEAM area's catalog entries. */
|
|
9
|
+
const teamDiagnostics = {
|
|
10
|
+
MOSTRA_TEAM_ROSTER_POLICY: {
|
|
11
|
+
severity: "error",
|
|
12
|
+
phase: "host",
|
|
13
|
+
title: "This artifact's policy can't wait for every respondent",
|
|
14
|
+
hint: "Publish with the submission policy once per-viewer or epochs, then wait again; or wait for submitted.",
|
|
15
|
+
docs: {
|
|
16
|
+
explanation: "`submitted:all` waits until every expected respondent has submitted, and `submitted:<N>` for N submissions. Both need a policy that takes a submission from each person: `once` with scope `per-viewer`, or `epochs`. Under `once` per-artifact the artifact takes one submission in all, so neither can be met beyond the first, and Mostra refuses the wait instead of letting it run forever.",
|
|
17
|
+
fix: "Publish again with `mostra publish <path> --policy once-per-viewer` (or `--policy epochs`), or wait for `submitted`."
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
MOSTRA_TEAM_ROSTER_TOO_LARGE: {
|
|
21
|
+
severity: "error",
|
|
22
|
+
phase: "host",
|
|
23
|
+
title: "Roster larger than 1,000 respondents",
|
|
24
|
+
hint: "Name at most 1,000 expected respondents; share one link for everyone else instead.",
|
|
25
|
+
docs: {
|
|
26
|
+
explanation: "A roster lists the people an artifact expects answers from, each with a personal link and a status. It holds at most 1,000 of them. Nothing was added: the roster is as it was.",
|
|
27
|
+
fix: "Remove respondents you no longer expect (`mostra roster remove`), or, for a page many people answer, share one link and wait for `submitted:<N>` instead."
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
MOSTRA_TEAM_PRESENCE_RATE_LIMITED: {
|
|
31
|
+
severity: "error",
|
|
32
|
+
phase: "hygiene",
|
|
33
|
+
title: "Presence updates too fast",
|
|
34
|
+
hint: "Send presence at most 10 times a second; usePresence does this for you.",
|
|
35
|
+
docs: {
|
|
36
|
+
explanation: "A page shares its viewer's cursor and selection through `POST /_mostra/v/<rev>/presence`. Each view may send 20 updates a second; past that the gateway answers 429 with `Retry-After`. Presence is never stored, so nothing is lost: the next update replaces the last one.",
|
|
37
|
+
fix: "Use `usePresence` from `@mostra/react`, which sends at most 10 updates a second, or throttle your own calls to the route."
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
//#endregion
|
|
42
|
+
export { teamDiagnosticCodes, teamDiagnostics };
|
|
43
|
+
|
|
44
|
+
//# sourceMappingURL=team.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team.js","names":[],"sources":["../../../src/diagnostics/codes/team.ts"],"sourcesContent":["/**\n * Diagnostic codes of the TEAM area.\n */\nimport type { AreaCatalog } from \"../spec.ts\";\n\n/** The codes of the TEAM area, in the order they were added. */\nexport const teamDiagnosticCodes = [\n \"MOSTRA_TEAM_ROSTER_POLICY\",\n \"MOSTRA_TEAM_ROSTER_TOO_LARGE\",\n \"MOSTRA_TEAM_PRESENCE_RATE_LIMITED\",\n // gen:codes\n] as const;\n\n/** The codes of the TEAM area. */\nexport type TeamDiagnosticCode = (typeof teamDiagnosticCodes)[number];\n\n/** The TEAM area's catalog entries. */\nexport const teamDiagnostics: AreaCatalog<TeamDiagnosticCode> = {\n MOSTRA_TEAM_ROSTER_POLICY: {\n severity: \"error\",\n phase: \"host\",\n title: \"This artifact's policy can't wait for every respondent\",\n hint: \"Publish with the submission policy once per-viewer or epochs, then wait again; or wait for submitted.\",\n docs: {\n explanation:\n \"`submitted:all` waits until every expected respondent has submitted, and `submitted:<N>` for N submissions. Both need a policy that takes a submission from each person: `once` with scope `per-viewer`, or `epochs`. Under `once` per-artifact the artifact takes one submission in all, so neither can be met beyond the first, and Mostra refuses the wait instead of letting it run forever.\",\n fix: \"Publish again with `mostra publish <path> --policy once-per-viewer` (or `--policy epochs`), or wait for `submitted`.\",\n },\n },\n MOSTRA_TEAM_ROSTER_TOO_LARGE: {\n severity: \"error\",\n phase: \"host\",\n title: \"Roster larger than 1,000 respondents\",\n hint: \"Name at most 1,000 expected respondents; share one link for everyone else instead.\",\n docs: {\n explanation:\n \"A roster lists the people an artifact expects answers from, each with a personal link and a status. It holds at most 1,000 of them. Nothing was added: the roster is as it was.\",\n fix: \"Remove respondents you no longer expect (`mostra roster remove`), or, for a page many people answer, share one link and wait for `submitted:<N>` instead.\",\n },\n },\n MOSTRA_TEAM_PRESENCE_RATE_LIMITED: {\n severity: \"error\",\n phase: \"hygiene\",\n title: \"Presence updates too fast\",\n hint: \"Send presence at most 10 times a second; usePresence does this for you.\",\n docs: {\n explanation:\n \"A page shares its viewer's cursor and selection through `POST /_mostra/v/<rev>/presence`. Each view may send 20 updates a second; past that the gateway answers 429 with `Retry-After`. Presence is never stored, so nothing is lost: the next update replaces the last one.\",\n fix: \"Use `usePresence` from `@mostra/react`, which sends at most 10 updates a second, or throttle your own calls to the route.\",\n },\n },\n // gen:entries\n};\n"],"mappings":";;AAMA,MAAa,sBAAsB;CACjC;CACA;CACA;AAEF;;AAMA,MAAa,kBAAmD;CAC9D,2BAA2B;EACzB,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,8BAA8B;EAC5B,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;CACA,mCAAmC;EACjC,UAAU;EACV,OAAO;EACP,OAAO;EACP,MAAM;EACN,MAAM;GACJ,aACE;GACF,KAAK;EACP;CACF;AAEF"}
|
|
@@ -4,7 +4,7 @@ import * as z from "zod";
|
|
|
4
4
|
* Diagnostic areas. A code is `MOSTRA_<AREA>_<NAME>`. INTERFACES §13 holds the authoritative list,
|
|
5
5
|
* which only grows.
|
|
6
6
|
*/
|
|
7
|
-
export type DiagnosticArea = "MANIFEST" | "BUILD" | "TYPE" | "LINT" | "DEP" | "KIT" | "FIELD" | "ACTION" | "LIVE" | "RUNTIME" | "CONSOLE" | "NETWORK" | "A11Y" | "VISUAL" | "SMOKE" | "REGRESSION" | "TERM" | "PUBLISH" | "SUBMIT" | "HOST" | "HOME" | "HYGIENE" | "SECRET" | "SHARE" | "VERIFY" | "TARGET" | "ENV" | "PLATFORM" | "ARTIFACT" | "CLI" | "REMOTE";
|
|
7
|
+
export type DiagnosticArea = "MANIFEST" | "BUILD" | "TYPE" | "LINT" | "DEP" | "KIT" | "FIELD" | "ACTION" | "LIVE" | "RUNTIME" | "CONSOLE" | "NETWORK" | "A11Y" | "VISUAL" | "SMOKE" | "REGRESSION" | "TERM" | "PUBLISH" | "SUBMIT" | "HOST" | "HOME" | "HYGIENE" | "SECRET" | "SHARE" | "VERIFY" | "TARGET" | "ENV" | "PLATFORM" | "ARTIFACT" | "CLI" | "REMOTE" | "TEAM";
|
|
8
8
|
/** Every diagnostic area, in INTERFACES §13 order. */
|
|
9
9
|
export declare const DIAGNOSTIC_AREAS: readonly DiagnosticArea[];
|
|
10
10
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostic.d.ts","names":[],"sources":["../../src/diagnostics/diagnostic.ts"],"mappings":";;;;;;YAWY;;
|
|
1
|
+
{"version":3,"file":"diagnostic.d.ts","names":[],"sources":["../../src/diagnostics/diagnostic.ts"],"mappings":";;;;;;YAWY;;qBAmCC,2BAA2B;;;;;YAuC5B,2BAA2B;;;;;YAM3B;;YAGA;;;;;iBAqBK;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;;YAIC;WACG;WAAuB;WAAuB;;WAC9C;WAA2B;;;iBAGzB;;WAEN,MAAM;;WAEN,UAAU;;WAEV;;WAEA;;WAEA,MAAM;;WAEN,WAAW;;WAEX,OAAO;;WAEP;;WAEA;;;qBAkBE,oBAAoB,EAAE,QAAQ;;qBAQ9B,iBAAiB,EAAE,QAAQ;;qBAwB3B,eAAe,EAAE,QAAQ;;qBAezB,oBAAoB,EAAE,QAAQ;;qBAW9B,YAAY,EAAE,QAAQ"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostic.js","names":[],"sources":["../../src/diagnostics/diagnostic.ts"],"sourcesContent":["/**\n * The one diagnostic object every Mostra interface uses for errors, warnings and hints\n * (INTERFACES §1 and §13, AX-03).\n */\nimport * as z from \"zod\";\nimport { wireRegistry } from \"../wire-registry.ts\";\n\n/**\n * Diagnostic areas. A code is `MOSTRA_<AREA>_<NAME>`. INTERFACES §13 holds the authoritative list,\n * which only grows.\n */\nexport type DiagnosticArea =\n | \"MANIFEST\"\n | \"BUILD\"\n | \"TYPE\"\n | \"LINT\"\n | \"DEP\"\n | \"KIT\"\n | \"FIELD\"\n | \"ACTION\"\n | \"LIVE\"\n | \"RUNTIME\"\n | \"CONSOLE\"\n | \"NETWORK\"\n | \"A11Y\"\n | \"VISUAL\"\n | \"SMOKE\"\n | \"REGRESSION\"\n | \"TERM\"\n | \"PUBLISH\"\n | \"SUBMIT\"\n | \"HOST\"\n | \"HOME\"\n | \"HYGIENE\"\n | \"SECRET\"\n | \"SHARE\"\n | \"VERIFY\"\n | \"TARGET\"\n | \"ENV\"\n | \"PLATFORM\"\n | \"ARTIFACT\"\n | \"CLI\"\n | \"REMOTE\";\n\n/** Every diagnostic area, in INTERFACES §13 order. */\nexport const DIAGNOSTIC_AREAS: readonly DiagnosticArea[] = [\n \"MANIFEST\",\n \"BUILD\",\n \"TYPE\",\n \"LINT\",\n \"DEP\",\n \"KIT\",\n \"FIELD\",\n \"ACTION\",\n \"LIVE\",\n \"RUNTIME\",\n \"CONSOLE\",\n \"NETWORK\",\n \"A11Y\",\n \"VISUAL\",\n \"SMOKE\",\n \"REGRESSION\",\n \"TERM\",\n \"PUBLISH\",\n \"SUBMIT\",\n \"HOST\",\n \"HOME\",\n \"HYGIENE\",\n \"SECRET\",\n \"SHARE\",\n \"VERIFY\",\n \"TARGET\",\n \"ENV\",\n \"PLATFORM\",\n \"ARTIFACT\",\n \"CLI\",\n \"REMOTE\",\n];\n\n/**\n * A diagnostic code. Codes are semver surface: once released, a code keeps its meaning and is\n * never removed (AX-03).\n */\nexport type DiagnosticCode = `MOSTRA_${DiagnosticArea}_${string}`;\n\n/**\n * How bad it is. `error` is only for definite failures; observations that might be fine are\n * warnings (D72).\n */\nexport type DiagnosticSeverity = \"error\" | \"warning\" | \"hint\";\n\n/** The stage of work that produced the diagnostic. */\nexport type DiagnosticPhase =\n | \"manifest\"\n | \"compile\"\n | \"lint\"\n | \"runtime\"\n | \"console\"\n | \"network\"\n | \"a11y\"\n | \"visual\"\n | \"smoke\"\n | \"regression\"\n | \"contract\"\n | \"publish\"\n | \"host\"\n | \"hygiene\"\n | \"platform\";\n\n/**\n * A machine-applicable fix. `range` is `[startLine, startColumn, endLine, endColumn]`, 1-based,\n * with the end exclusive.\n */\nexport interface DiagnosticFix {\n /** Replace, insert or delete text in `file`, or run `command`. */\n readonly kind: \"replace\" | \"insert\" | \"delete\" | \"command\";\n /** The file to edit, relative to the artifact or project root. */\n readonly file?: string;\n /** The span to edit. */\n readonly range?: readonly [number, number, number, number];\n /** The replacement or inserted text. */\n readonly text?: string;\n /** The command to run, for `kind: \"command\"`. */\n readonly command?: string;\n}\n\n/** Where the problem is: a source position (1-based) or a place in a rendered viewport. */\nexport type DiagnosticLocation =\n | { readonly file: string; readonly line: number; readonly column: number }\n | { readonly viewport: string; readonly selector?: string };\n\n/** One diagnostic (INTERFACES §13). */\nexport interface Diagnostic {\n /** The stable code, `MOSTRA_<AREA>_<NAME>`. */\n readonly code: DiagnosticCode;\n /** How bad it is. */\n readonly severity: DiagnosticSeverity;\n /** What is wrong, for this occurrence. */\n readonly message: string;\n /** What to do: one imperative sentence. */\n readonly hint?: string;\n /** A machine-applicable fix, when one exists. */\n readonly fix?: DiagnosticFix;\n /** Where the problem is, when it has a place. */\n readonly location?: DiagnosticLocation;\n /** The stage of work that produced it. */\n readonly phase: DiagnosticPhase;\n /** The code's documentation page: `${docsBase}/errors/${code}` (D37). */\n readonly docs: string;\n /** How many identical occurrences this one stands for, when deduplicated. */\n readonly count?: number;\n}\n\nconst positiveInt = z.int().min(1);\n\n/**\n * Codes on the wire accept any area, so a client keeps working when a newer Mostra reports a code\n * from an area it doesn't know yet. Producers are typed against {@link DiagnosticArea}.\n */\nconst codeSchema = z\n .string()\n .regex(/^MOSTRA_[A-Z0-9]+_[A-Z0-9_]+$/)\n .register(wireRegistry, {\n id: \"DiagnosticCode\",\n description: \"Stable diagnostic code: MOSTRA_<AREA>_<NAME>.\",\n }) as unknown as z.ZodType<DiagnosticCode, string>;\n\n/** The Zod schema of the `DiagnosticSeverity` type. */\nexport const DiagnosticSeverity: z.ZodType<DiagnosticSeverity, string> = z\n .enum([\"error\", \"warning\", \"hint\"])\n .register(wireRegistry, {\n id: \"DiagnosticSeverity\",\n description: \"How bad it is: error only for definite failures.\",\n });\n\n/** The Zod schema of the `DiagnosticPhase` type. */\nexport const DiagnosticPhase: z.ZodType<DiagnosticPhase, string> = z\n .enum([\n \"manifest\",\n \"compile\",\n \"lint\",\n \"runtime\",\n \"console\",\n \"network\",\n \"a11y\",\n \"visual\",\n \"smoke\",\n \"regression\",\n \"contract\",\n \"publish\",\n \"host\",\n \"hygiene\",\n \"platform\",\n ])\n .register(wireRegistry, {\n id: \"DiagnosticPhase\",\n description: \"The stage of work that produced the diagnostic.\",\n });\n\n/** The Zod schema of the `DiagnosticFix` type. */\nexport const DiagnosticFix: z.ZodType<DiagnosticFix> = z\n .object({\n kind: z.enum([\"replace\", \"insert\", \"delete\", \"command\"]),\n file: z.string().exactOptional(),\n range: z.tuple([positiveInt, positiveInt, positiveInt, positiveInt]).readonly().exactOptional(),\n text: z.string().exactOptional(),\n command: z.string().exactOptional(),\n })\n .register(wireRegistry, {\n id: \"DiagnosticFix\",\n description:\n \"A machine-applicable fix; range is [startLine, startColumn, endLine, endColumn], 1-based, end exclusive.\",\n });\n\n/** The Zod schema of the `DiagnosticLocation` type. */\nexport const DiagnosticLocation: z.ZodType<DiagnosticLocation> = z\n .union([\n z.object({ file: z.string(), line: positiveInt, column: positiveInt }),\n z.object({ viewport: z.string(), selector: z.string().exactOptional() }),\n ])\n .register(wireRegistry, {\n id: \"DiagnosticLocation\",\n description: \"A 1-based source position, or a place in a rendered viewport.\",\n });\n\n/** The Zod schema of the `Diagnostic` type. */\nexport const Diagnostic: z.ZodType<Diagnostic> = z\n .object({\n code: codeSchema,\n severity: DiagnosticSeverity,\n message: z.string(),\n hint: z.string().exactOptional(),\n fix: DiagnosticFix.exactOptional(),\n location: DiagnosticLocation.exactOptional(),\n phase: DiagnosticPhase,\n docs: z.url(),\n count: positiveInt.exactOptional(),\n })\n .register(wireRegistry, {\n id: \"Diagnostic\",\n description: \"One diagnostic: a stable code, severity, message, hint, fix and docs link.\",\n });\n"],"mappings":";;;;;;;;
|
|
1
|
+
{"version":3,"file":"diagnostic.js","names":[],"sources":["../../src/diagnostics/diagnostic.ts"],"sourcesContent":["/**\n * The one diagnostic object every Mostra interface uses for errors, warnings and hints\n * (INTERFACES §1 and §13, AX-03).\n */\nimport * as z from \"zod\";\nimport { wireRegistry } from \"../wire-registry.ts\";\n\n/**\n * Diagnostic areas. A code is `MOSTRA_<AREA>_<NAME>`. INTERFACES §13 holds the authoritative list,\n * which only grows.\n */\nexport type DiagnosticArea =\n | \"MANIFEST\"\n | \"BUILD\"\n | \"TYPE\"\n | \"LINT\"\n | \"DEP\"\n | \"KIT\"\n | \"FIELD\"\n | \"ACTION\"\n | \"LIVE\"\n | \"RUNTIME\"\n | \"CONSOLE\"\n | \"NETWORK\"\n | \"A11Y\"\n | \"VISUAL\"\n | \"SMOKE\"\n | \"REGRESSION\"\n | \"TERM\"\n | \"PUBLISH\"\n | \"SUBMIT\"\n | \"HOST\"\n | \"HOME\"\n | \"HYGIENE\"\n | \"SECRET\"\n | \"SHARE\"\n | \"VERIFY\"\n | \"TARGET\"\n | \"ENV\"\n | \"PLATFORM\"\n | \"ARTIFACT\"\n | \"CLI\"\n | \"REMOTE\"\n | \"TEAM\";\n\n/** Every diagnostic area, in INTERFACES §13 order. */\nexport const DIAGNOSTIC_AREAS: readonly DiagnosticArea[] = [\n \"MANIFEST\",\n \"BUILD\",\n \"TYPE\",\n \"LINT\",\n \"DEP\",\n \"KIT\",\n \"FIELD\",\n \"ACTION\",\n \"LIVE\",\n \"RUNTIME\",\n \"CONSOLE\",\n \"NETWORK\",\n \"A11Y\",\n \"VISUAL\",\n \"SMOKE\",\n \"REGRESSION\",\n \"TERM\",\n \"PUBLISH\",\n \"SUBMIT\",\n \"HOST\",\n \"HOME\",\n \"HYGIENE\",\n \"SECRET\",\n \"SHARE\",\n \"VERIFY\",\n \"TARGET\",\n \"ENV\",\n \"PLATFORM\",\n \"ARTIFACT\",\n \"CLI\",\n \"REMOTE\",\n \"TEAM\",\n];\n\n/**\n * A diagnostic code. Codes are semver surface: once released, a code keeps its meaning and is\n * never removed (AX-03).\n */\nexport type DiagnosticCode = `MOSTRA_${DiagnosticArea}_${string}`;\n\n/**\n * How bad it is. `error` is only for definite failures; observations that might be fine are\n * warnings (D72).\n */\nexport type DiagnosticSeverity = \"error\" | \"warning\" | \"hint\";\n\n/** The stage of work that produced the diagnostic. */\nexport type DiagnosticPhase =\n | \"manifest\"\n | \"compile\"\n | \"lint\"\n | \"runtime\"\n | \"console\"\n | \"network\"\n | \"a11y\"\n | \"visual\"\n | \"smoke\"\n | \"regression\"\n | \"contract\"\n | \"publish\"\n | \"host\"\n | \"hygiene\"\n | \"platform\";\n\n/**\n * A machine-applicable fix. `range` is `[startLine, startColumn, endLine, endColumn]`, 1-based,\n * with the end exclusive.\n */\nexport interface DiagnosticFix {\n /** Replace, insert or delete text in `file`, or run `command`. */\n readonly kind: \"replace\" | \"insert\" | \"delete\" | \"command\";\n /** The file to edit, relative to the artifact or project root. */\n readonly file?: string;\n /** The span to edit. */\n readonly range?: readonly [number, number, number, number];\n /** The replacement or inserted text. */\n readonly text?: string;\n /** The command to run, for `kind: \"command\"`. */\n readonly command?: string;\n}\n\n/** Where the problem is: a source position (1-based) or a place in a rendered viewport. */\nexport type DiagnosticLocation =\n | { readonly file: string; readonly line: number; readonly column: number }\n | { readonly viewport: string; readonly selector?: string };\n\n/** One diagnostic (INTERFACES §13). */\nexport interface Diagnostic {\n /** The stable code, `MOSTRA_<AREA>_<NAME>`. */\n readonly code: DiagnosticCode;\n /** How bad it is. */\n readonly severity: DiagnosticSeverity;\n /** What is wrong, for this occurrence. */\n readonly message: string;\n /** What to do: one imperative sentence. */\n readonly hint?: string;\n /** A machine-applicable fix, when one exists. */\n readonly fix?: DiagnosticFix;\n /** Where the problem is, when it has a place. */\n readonly location?: DiagnosticLocation;\n /** The stage of work that produced it. */\n readonly phase: DiagnosticPhase;\n /** The code's documentation page: `${docsBase}/errors/${code}` (D37). */\n readonly docs: string;\n /** How many identical occurrences this one stands for, when deduplicated. */\n readonly count?: number;\n}\n\nconst positiveInt = z.int().min(1);\n\n/**\n * Codes on the wire accept any area, so a client keeps working when a newer Mostra reports a code\n * from an area it doesn't know yet. Producers are typed against {@link DiagnosticArea}.\n */\nconst codeSchema = z\n .string()\n .regex(/^MOSTRA_[A-Z0-9]+_[A-Z0-9_]+$/)\n .register(wireRegistry, {\n id: \"DiagnosticCode\",\n description: \"Stable diagnostic code: MOSTRA_<AREA>_<NAME>.\",\n }) as unknown as z.ZodType<DiagnosticCode, string>;\n\n/** The Zod schema of the `DiagnosticSeverity` type. */\nexport const DiagnosticSeverity: z.ZodType<DiagnosticSeverity, string> = z\n .enum([\"error\", \"warning\", \"hint\"])\n .register(wireRegistry, {\n id: \"DiagnosticSeverity\",\n description: \"How bad it is: error only for definite failures.\",\n });\n\n/** The Zod schema of the `DiagnosticPhase` type. */\nexport const DiagnosticPhase: z.ZodType<DiagnosticPhase, string> = z\n .enum([\n \"manifest\",\n \"compile\",\n \"lint\",\n \"runtime\",\n \"console\",\n \"network\",\n \"a11y\",\n \"visual\",\n \"smoke\",\n \"regression\",\n \"contract\",\n \"publish\",\n \"host\",\n \"hygiene\",\n \"platform\",\n ])\n .register(wireRegistry, {\n id: \"DiagnosticPhase\",\n description: \"The stage of work that produced the diagnostic.\",\n });\n\n/** The Zod schema of the `DiagnosticFix` type. */\nexport const DiagnosticFix: z.ZodType<DiagnosticFix> = z\n .object({\n kind: z.enum([\"replace\", \"insert\", \"delete\", \"command\"]),\n file: z.string().exactOptional(),\n range: z.tuple([positiveInt, positiveInt, positiveInt, positiveInt]).readonly().exactOptional(),\n text: z.string().exactOptional(),\n command: z.string().exactOptional(),\n })\n .register(wireRegistry, {\n id: \"DiagnosticFix\",\n description:\n \"A machine-applicable fix; range is [startLine, startColumn, endLine, endColumn], 1-based, end exclusive.\",\n });\n\n/** The Zod schema of the `DiagnosticLocation` type. */\nexport const DiagnosticLocation: z.ZodType<DiagnosticLocation> = z\n .union([\n z.object({ file: z.string(), line: positiveInt, column: positiveInt }),\n z.object({ viewport: z.string(), selector: z.string().exactOptional() }),\n ])\n .register(wireRegistry, {\n id: \"DiagnosticLocation\",\n description: \"A 1-based source position, or a place in a rendered viewport.\",\n });\n\n/** The Zod schema of the `Diagnostic` type. */\nexport const Diagnostic: z.ZodType<Diagnostic> = z\n .object({\n code: codeSchema,\n severity: DiagnosticSeverity,\n message: z.string(),\n hint: z.string().exactOptional(),\n fix: DiagnosticFix.exactOptional(),\n location: DiagnosticLocation.exactOptional(),\n phase: DiagnosticPhase,\n docs: z.url(),\n count: positiveInt.exactOptional(),\n })\n .register(wireRegistry, {\n id: \"Diagnostic\",\n description: \"One diagnostic: a stable code, severity, message, hint, fix and docs link.\",\n });\n"],"mappings":";;;;;;;;AA8CA,MAAa,mBAA8C;CACzD;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AA4EA,MAAM,cAAc,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC;;;;;AAMjC,MAAM,aAAa,EAChB,OAAO,CAAC,CACR,MAAM,+BAA+B,CAAC,CACtC,SAAS,cAAc;CACtB,IAAI;CACJ,aAAa;AACf,CAAC;;AAGH,MAAa,qBAA4D,EACtE,KAAK;CAAC;CAAS;CAAW;AAAM,CAAC,CAAC,CAClC,SAAS,cAAc;CACtB,IAAI;CACJ,aAAa;AACf,CAAC;;AAGH,MAAa,kBAAsD,EAChE,KAAK;CACJ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC,CAAC,CACD,SAAS,cAAc;CACtB,IAAI;CACJ,aAAa;AACf,CAAC;;AAGH,MAAa,gBAA0C,EACpD,OAAO;CACN,MAAM,EAAE,KAAK;EAAC;EAAW;EAAU;EAAU;CAAS,CAAC;CACvD,MAAM,EAAE,OAAO,CAAC,CAAC,cAAc;CAC/B,OAAO,EAAE,MAAM;EAAC;EAAa;EAAa;EAAa;CAAW,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,cAAc;CAC9F,MAAM,EAAE,OAAO,CAAC,CAAC,cAAc;CAC/B,SAAS,EAAE,OAAO,CAAC,CAAC,cAAc;AACpC,CAAC,CAAC,CACD,SAAS,cAAc;CACtB,IAAI;CACJ,aACE;AACJ,CAAC;;AAGH,MAAa,qBAAoD,EAC9D,MAAM,CACL,EAAE,OAAO;CAAE,MAAM,EAAE,OAAO;CAAG,MAAM;CAAa,QAAQ;AAAY,CAAC,GACrE,EAAE,OAAO;CAAE,UAAU,EAAE,OAAO;CAAG,UAAU,EAAE,OAAO,CAAC,CAAC,cAAc;AAAE,CAAC,CACzE,CAAC,CAAC,CACD,SAAS,cAAc;CACtB,IAAI;CACJ,aAAa;AACf,CAAC;;AAGH,MAAa,aAAoC,EAC9C,OAAO;CACN,MAAM;CACN,UAAU;CACV,SAAS,EAAE,OAAO;CAClB,MAAM,EAAE,OAAO,CAAC,CAAC,cAAc;CAC/B,KAAK,cAAc,cAAc;CACjC,UAAU,mBAAmB,cAAc;CAC3C,OAAO;CACP,MAAM,EAAE,IAAI;CACZ,OAAO,YAAY,cAAc;AACnC,CAAC,CAAC,CACD,SAAS,cAAc;CACtB,IAAI;CACJ,aAAa;AACf,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
import { ARGUMENT_BIGINT_DIGITS_MAX, AnyFunction, Frame, RemoteError, SerializationError, SerializeMode, UNSERIALIZABLE_CODE, ValueReader, ValueReaderOptions, ValueWriter, ValueWriterOptions, WireError, checkArgumentFrames, deserializeAll, fromBase64, serializeAll, toBase64, wireError } from "./serializer.js";
|
|
2
|
-
import {
|
|
2
|
+
import { AccountId, ArtifactId, CommentId, Cursor, DeliveryId, GeneratedIdKind, HomeId, Id, IdBody, IdKind, IdPrefix, LinkId, MutationId, RouteId, RunId, ShareId, SubmissionId, ThreadId, TokenId, VersionId, VersionIdKind, ViewId, ViewerId } from "./ids.js";
|
|
3
3
|
import { Duration, durationMs } from "./duration.js";
|
|
4
4
|
import { SubmissionPolicy } from "./policy.js";
|
|
5
|
+
import { DEFAULT_TEAM_VISIBILITY, TeamSettings, TeamVisibility } from "./team-settings.js";
|
|
5
6
|
import { ARTIFACT_MANIFEST_KEYS, ArtifactFamily, ArtifactLink, ArtifactManifest, DemoSpec, HOSTED_OFFLINE_LIMIT_DEFAULT, HOSTED_OFFLINE_LIMIT_MAX_MS, HostedSettings, TALLY_CHOICES_MAX, TALLY_CHOICES_MIN, TallySpec, TerminalSpec, manifestProblem } from "./manifest.js";
|
|
6
|
-
import { ArtifactDetail, ArtifactRef, ArtifactSummary, PublishReceipt, SourceRef, VersionSummary } from "./artifact.js";
|
|
7
7
|
import { ControlsPolicy, DeliveryTarget, REVIEW_SET_ID_PATTERN, SubmitChannel, TrustedControl, VersionRef, ViewContext, ViewContextWire, readViewContext } from "./view.js";
|
|
8
|
-
import { AnyBridgeMessage, BRIDGE_FIELDS_MAX, BRIDGE_MESSAGES, BRIDGE_TEXT_MAX, Bridge, BridgeEvent, BridgeHostContext, BridgeImplementation, BridgeMessage, BridgeOptions, BridgePeer, BridgeReceiver, BridgeRejection, BridgeSide, CONTROL_LABEL_MAX, ControlRequest, FieldRegistration, FieldsParams, FlushResult, FrameSessionFailedParams, MCP_APPS_PROTOCOL_VERSION, OPEN_LINK_SCHEMES, SaveState, SubmitBlocker, UiInitializeParams, UiInitializeResult, VersionAvailableParams, connectBridge, mostraControlsRequest, mostraFieldFocus, mostraFields, mostraFlush, mostraFrameSessionEntered, mostraFrameSessionFailed, mostraPage, mostraReady, mostraVersionAvailable, uiInitialize, uiInitialized, uiOpenLink, uiSizeChanged } from "./bridge.js";
|
|
9
|
-
import { AccountId, ArtifactId, CommentId, Cursor, DeliveryId, GeneratedIdKind, HomeId, Id, IdBody, IdKind, IdPrefix, LinkId, MutationId, RouteId, RunId, ShareId, SubmissionId, ThreadId, TokenId, VersionId, VersionIdKind, ViewId, ViewerId } from "./ids.js";
|
|
10
8
|
import { Actor, DeliveryState, DeliveryStatus, DocumentRevision, EventFilter, EventOrigin, EventRecord, EventTypePattern, FIELD_ID_MAX_LENGTH, FieldConflict, FieldOp, FieldScope, FieldState, MutationResult, Rect, ResultComment, Results, SIGNAL_NAME_PATTERN, SubmissionSummary, Viewer, ViewerKind, ViewerSpec, Viewport, WaitCondition, isFieldId } from "./interaction.js";
|
|
9
|
+
import { PRESENCE_COORDINATE_MAX, Peer, PresenceCursor, PresencePeer, PresenceRequest, PresenceSelection, PresenceState, ROSTER_MAX, Respondent, RespondentForPage, RespondentSpec, RespondentStatus, RespondentsRequest, Roster, RosterCounts, RosterForPage } from "./team.js";
|
|
10
|
+
import { ACTION_ARGS_MAX, ACTION_RESULT_MAX, ActionError, Batches, CallLine, CallRequest, EphemeralMessage, LIVE_KEY_PATTERN, LIVE_RING_DEFAULT, LIVE_RING_MAX, LIVE_VALUE_MAX, LiveRequest, LiveState, LiveUpdate, READABLE_LIVE_KEY_PATTERN, RUN_KEY_MAX, RUN_LOG_MAX, RUN_LOG_TRUNCATED, RUN_STATUSES, RunAttachRequest, RunCancelRequest, RunDelta, RunProgress, RunReason, RunRequest, RunState, RunStatus, SECRET_NAME_PATTERN, SECRET_VALUE_MAX, TALLY_LIVE_PREFIX, TallyValue, isFinalRunStatus } from "./actions.js";
|
|
11
|
+
import { ArtifactDetail, ArtifactRef, ArtifactSummary, PublishReceipt, SourceRef, VersionSummary } from "./artifact.js";
|
|
12
|
+
import { AnyBridgeMessage, BRIDGE_FIELDS_MAX, BRIDGE_MESSAGES, BRIDGE_TEXT_MAX, Bridge, BridgeEvent, BridgeHostContext, BridgeImplementation, BridgeMessage, BridgeOptions, BridgePeer, BridgeReceiver, BridgeRejection, BridgeSide, CONTROL_LABEL_MAX, ControlRequest, FieldRegistration, FieldsParams, FlushResult, FrameSessionFailedParams, MCP_APPS_PROTOCOL_VERSION, OPEN_LINK_SCHEMES, SaveState, SubmitBlocker, UiInitializeParams, UiInitializeResult, VersionAvailableParams, connectBridge, mostraControlsRequest, mostraFieldFocus, mostraFields, mostraFlush, mostraFrameSessionEntered, mostraFrameSessionFailed, mostraPage, mostraReady, mostraVersionAvailable, uiInitialize, uiInitialized, uiOpenLink, uiSizeChanged } from "./bridge.js";
|
|
11
13
|
import { BROWSER_PROTOCOL_REVISION, BROWSER_PROTOCOL_REVISIONS, CarryOver, ChooseRequest, DocumentSnapshot, EnterRequest, EnterResult, FRAME_SESSION_HEADER, FieldsRequest, FollowRequest, FrameSessionFacts, FrameTicket, HostedChrome, OrphanedField, PollResult, SHELL_SESSION_HEADER, SIGNAL_PAYLOAD_MAX_BYTES, ShellSubmitRequest, SignalRequest, StreamSnapshot, StreamTicket, StreamTicketRequest, SubmitRequest } from "./browser.js";
|
|
12
14
|
import { BUNDLE_NAME, BUNDLE_PLATFORMS, BUNDLE_SETUP_MARKER, BundleAsset, BundleBrowser, BundleFileEntry, BundleFiles, BundleInfo, BundleLinkEntry, BundlePins, BundlePlatform, BundlePlatformSchema, BundleSetup, bundleAssetName, isWindowsBundle } from "./bundle.js";
|
|
13
15
|
import { canonicalJson } from "./canonical.js";
|
|
@@ -39,6 +41,7 @@ import { ShareDiagnosticCode, shareDiagnosticCodes } from "./diagnostics/codes/s
|
|
|
39
41
|
import { SmokeDiagnosticCode, smokeDiagnosticCodes } from "./diagnostics/codes/smoke.js";
|
|
40
42
|
import { SubmitDiagnosticCode, submitDiagnosticCodes } from "./diagnostics/codes/submit.js";
|
|
41
43
|
import { TargetDiagnosticCode, targetDiagnosticCodes } from "./diagnostics/codes/target.js";
|
|
44
|
+
import { TeamDiagnosticCode, teamDiagnosticCodes } from "./diagnostics/codes/team.js";
|
|
42
45
|
import { TypeDiagnosticCode, typeDiagnosticCodes } from "./diagnostics/codes/type.js";
|
|
43
46
|
import { VerifyDiagnosticCode, verifyDiagnosticCodes } from "./diagnostics/codes/verify.js";
|
|
44
47
|
import { CreateDiagnosticOptions, KnownDiagnosticCode, createDiagnostic, diagnosticCatalog } from "./diagnostics/codes/index.js";
|
|
@@ -69,6 +72,8 @@ import { InstanceCheck, InstanceCheckParams, InstanceCheckResult, instanceCheckM
|
|
|
69
72
|
import { OwnerLinkInfo, RemoteLink, RemoteLinkState, ServerOrigin } from "./remote.js";
|
|
70
73
|
import { HOST_PROTOCOL_REVISIONS, Revision, RevisionNegotiation, negotiateRevision } from "./revision.js";
|
|
71
74
|
import { CLI_CLIENT_NAME, ClientCapabilities, ClientInfo, DependencyPolicy, HomeConfig, InstanceCapabilities, InstanceInfo, MostraInitializeParams, MostraInitializeResult, PortName, mostraInitializeMethod } from "./methods/mostra/initialize.js";
|
|
75
|
+
import { CapabilityLink, ViewUrlParams, ViewUrlResult, viewUrlMethod } from "./methods/view/url.js";
|
|
76
|
+
import { RespondentLink, RosterAddParams, RosterAddResult, rosterAddMethod } from "./methods/roster/add.js";
|
|
72
77
|
import { PUBLIC_SHARE_DEFAULT_TTL, PUBLIC_SHARE_MAX_TTL_MS, Share, ShareStartParams, ShareStartResult, ShareVia, shareStartMethod } from "./methods/share/start.js";
|
|
73
78
|
import { ChildProcessStatus, DeliveryCounts, FaceStatus, GatewayStatus, InstanceStatusParams, InstanceStatusResult, WorkerStatus, instanceStatusMethod } from "./methods/instance/status.js";
|
|
74
79
|
import { LivePushParams, LivePushResult, livePushMethod } from "./methods/live/push.js";
|
|
@@ -96,6 +101,9 @@ import { RemoteLogoutParams, RemoteLogoutResult, remoteLogoutMethod } from "./me
|
|
|
96
101
|
import { RemoteStatusParams, RemoteStatusResult, remoteStatusMethod } from "./methods/remote/status.js";
|
|
97
102
|
import { RemoteTokenParams, RemoteTokenResult, remoteTokenMethod } from "./methods/remote/token.js";
|
|
98
103
|
import { ResultsGetParams, ResultsGetResult, ResultsMarkdown, resultsGetMethod } from "./methods/results/get.js";
|
|
104
|
+
import { RESULTS_LIST_MAX, ResultsListParams, ResultsListResult, resultsListMethod } from "./methods/results/list.js";
|
|
105
|
+
import { RosterGetParams, RosterGetResult, rosterGetMethod } from "./methods/roster/get.js";
|
|
106
|
+
import { RosterRemoveParams, RosterRemoveResult, rosterRemoveMethod } from "./methods/roster/remove.js";
|
|
99
107
|
import { SecretDeleteParams, SecretDeleteResult, secretDeleteMethod } from "./methods/secret/delete.js";
|
|
100
108
|
import { SecretEntry, SecretSetParams, SecretSetResult, secretSetMethod } from "./methods/secret/set.js";
|
|
101
109
|
import { SecretListParams, SecretListResult, secretListMethod } from "./methods/secret/list.js";
|
|
@@ -103,7 +111,6 @@ import { ShareListParams, ShareListResult, shareListMethod } from "./methods/sha
|
|
|
103
111
|
import { ShareStopParams, ShareStopResult, shareStopMethod } from "./methods/share/stop.js";
|
|
104
112
|
import { StateGetParams, StateGetResult, stateGetMethod } from "./methods/state/get.js";
|
|
105
113
|
import { StatePatchParams, StatePatchResult, statePatchMethod } from "./methods/state/patch.js";
|
|
106
|
-
import { CapabilityLink, ViewUrlParams, ViewUrlResult, viewUrlMethod } from "./methods/view/url.js";
|
|
107
114
|
import { ViewDefaultParams, ViewDefaultResult, viewDefaultMethod } from "./methods/view/default.js";
|
|
108
115
|
import { ViewLaunchParams, ViewLaunchResult, viewLaunchMethod } from "./methods/view/launch.js";
|
|
109
116
|
import { ViewRevokeParams, ViewRevokeResult, viewRevokeMethod } from "./methods/view/revoke.js";
|
|
@@ -115,4 +122,4 @@ import { JSON_RPC_ERROR_CODES, RpcError } from "./rpc/error.js";
|
|
|
115
122
|
import { LineSplitter, MAX_LINE_LENGTH, encodeLine } from "./rpc/lines.js";
|
|
116
123
|
import { RpcPeer, RpcPeerOptions, RpcRequestContext, RpcRequestOptions, parseParams } from "./rpc/peer.js";
|
|
117
124
|
import { CallContext, DEFAULT_WORKER_LIMITS, LiveSourceInfo, ServerEmitParams, ServerLiveValueParams, ServerLogParams, ServerProgressParams, ServerSecretParams, ServerSignalParams, ServerStateGetParams, ServerStatePatchParams, ServerStatePatchResult, WORKER_CHANNEL_REVISION, WORKER_METHODS, WorkerBatchParams, WorkerCallOutcome, WorkerCallParams, WorkerCancelParams, WorkerLimits, WorkerLiveParams, WorkerPingResult, WorkerStartParams, WorkerStartResult, WorkerVersionRef } from "./worker.js";
|
|
118
|
-
export { type A11yDiagnosticCode, ACTION_ARGS_MAX, ACTION_RESULT_MAX, ALL_SCOPES, ARGUMENT_BIGINT_DIGITS_MAX, ARTIFACT_MANIFEST_KEYS, ARTIFACT_PROGRESS, AccountId, type ActionDiagnosticCode, ActionError, Actor, AddedPackage, type AnyBridgeMessage, type AnyFunction, type AnyMethod, type AnyNotification, type AreaCatalog, type ArtifactCreateParams, type ArtifactCreateResult, ArtifactDetail, type ArtifactDiagnosticCode, type ArtifactExportParams, type ArtifactExportResult, type ArtifactFamily, type ArtifactGetParams, type ArtifactGetResult, ArtifactId, type ArtifactImportParams, type ArtifactImportResult, ArtifactLink, type ArtifactListFilter, type ArtifactListParams, type ArtifactListResult, ArtifactManifest, type ArtifactPauseParams, type ArtifactPauseResult, ArtifactProgressParams, type ArtifactPublishParams, type ArtifactPublishResult, ArtifactRef, ArtifactSummary, type ArtifactVerifyParams, type ArtifactVerifyResult, BRIDGE_FIELDS_MAX, BRIDGE_MESSAGES, BRIDGE_TEXT_MAX, BROWSER_PROTOCOL_REVISION, BROWSER_PROTOCOL_REVISIONS, BUNDLE_NAME, BUNDLE_PLATFORMS, BUNDLE_SETUP_MARKER, Batches, type Bridge, type BridgeEvent, type BridgeHostContext, type BridgeImplementation, type BridgeMessage, type BridgeOptions, type BridgePeer, type BridgeReceiver, type BridgeRejection, type BridgeSide, type BuildDiagnosticCode, BundleAsset, BundleBrowser, BundleFileEntry, BundleFiles, BundleInfo, BundleLinkEntry, BundlePins, type BundlePlatform, BundlePlatformSchema, BundleSetup, CLI_CLIENT_NAME, CONTROL_LABEL_MAX, CSRF_HEADER, type CallContext, type CallLine, CallRequest, CapabilityLink, CapabilityScope, CarryOver, ChildProcessStatus, ChooseRequest, type ClassifiedMessage, type CliDiagnosticCode, ClientCapabilities, ClientInfo, CommentId, type CompareRequest, type CompareResult, type ConsoleDiagnosticCode, type ControlRequest, ControlsPolicy, type CreateDiagnosticOptions, Cursor, DEFAULT_DOCS_BASE, DEFAULT_VIEWPORTS, DEFAULT_WORKER_LIMITS, DEV_NOTIFY, DIAGNOSTIC_AREAS, DeliveryCounts, DeliveryId, type DeliveryState, DeliveryStatus, type DeliveryTarget, type DemoSpec, type DepDiagnosticCode, DependencyPolicy, type DepsAddParams, type DepsAddResult, type DevEventKind, DevNotifyParams, type DevStartParams, type DevStartResult, type DevStopParams, type DevStopResult, Diagnostic, type DiagnosticArea, type DiagnosticCode, type DiagnosticDetails, DiagnosticFix, DiagnosticLocation, DiagnosticPhase, DiagnosticSeverity, type DiagnosticSpec, DocumentRevision, DocumentSnapshot, DraftMirror, type DraftsMirrorResult, Duration, EVENTS_NOTIFY, EVENTS_READ_MAX, EnterRequest, EnterResult, type EnvDiagnosticCode, type EphemeralMessage, EventFilter, EventOrigin, EventRecord, EventTypePattern, type EventsAckParams, type EventsAckResult, EventsNotifyParams, type EventsReadParams, type EventsReadResult, type EventsSubscribeParams, type EventsSubscribeResult, type EventsUnsubscribeParams, type EventsUnsubscribeResult, ExportClass, ExternalBase, FIELD_ID_MAX_LENGTH, FRAME_SESSION_HEADER, type FaceStatus, FieldConflict, type FieldDiagnosticCode, FieldOp, type FieldRegistration, type FieldScope, FieldState, type FieldsParams, FieldsRequest, type FlushResult, FollowRequest, type Frame, FrameSessionFacts, type FrameSessionFailedParams, FrameTicket, GatewayStatus, type GcCompactEvents, type GcCompacted, type GcCount, type GcRunParams, type GcRunResult, type GcVersion, type GeneratedIdKind, HOSTED_OFFLINE_LIMIT_DEFAULT, HOSTED_OFFLINE_LIMIT_MAX_MS, HOST_PROTOCOL_REVISIONS, HomeConfig, type HomeDiagnosticCode, HomeId, type HostDiagnosticCode, type HostedChrome, type HostedPushParams, type HostedPushResult, HostedRoute, HostedSettings, type HostedSubmissionParams, type HostedSubmissionResult, type HygieneDiagnosticCode, type Id, type IdBody, type IdKind, type IdPrefix, type IdentityVia, InstanceCapabilities, type InstanceCheck, type InstanceCheckParams, type InstanceCheckResult, InstanceInfo, type InstanceStatusParams, type InstanceStatusResult, JSON_RPC_ERROR_CODES, JsonRpcErrorObject, JsonRpcFailure, type JsonRpcId, type JsonRpcMessage, JsonRpcNotification, type JsonRpcParams, JsonRpcRequest, type JsonRpcResponse, JsonRpcSuccess, type KnownDiagnosticCode, LIVE_KEY_PATTERN, LIVE_RING_DEFAULT, LIVE_RING_MAX, LIVE_VALUE_MAX, LineSplitter, LinkId, type ListingEntry, type LiveDiagnosticCode, type LivePushParams, type LivePushResult, LiveRequest, type LiveSourceInfo, type LiveState, type LiveUpdate, MAX_LINE_LENGTH, MCP_APPS_PROTOCOL_VERSION, type ManifestDiagnosticCode, type MethodDefinition, type MethodDirection, type MostraInitializeParams, type MostraInitializeResult, type MostraShutdownParams, type MostraShutdownResult, MutationId, MutationResult, type NetworkDiagnosticCode, type NotificationDefinition, OPEN_LINK_SCHEMES, OriginString, OrphanedField, OwnerLinkInfo, PUBLIC_SHARE_DEFAULT_TTL, PUBLIC_SHARE_MAX_TTL_MS, type PausedBy, type PlatformDiagnosticCode, PollResult, type PortAddressingExternalBaseParams, type PortAddressingExternalBaseResult, type PortIdentityResolveParams, type PortIdentityResolveResult, PortName, type PortRelayAuthorParams, type PortRelayAuthorResult, type PortRelayCallParams, type PortRelayCallResult, type PortRelayCancelParams, type PortRelayCancelResult, type PortRelayLiveParams, type PortRelayLiveResult, type PortRelayReconcileParams, type PortRelayReconcileResult, type PortRelayRunParams, type PortRelayRunResult, type PortSecretsGetParams, type PortSecretsGetResult, type PortTrustedControlsActivatedParams, type PortTrustedControlsActivatedResult, type PortTrustedControlsPolicyParams, type PortTrustedControlsPolicyResult, type ProbedField, type PublishDiagnosticCode, PublishReceipt, READABLE_LIVE_KEY_PATTERN, RELAY_AUTHOR_METHODS, REVIEW_SET_ID_PATTERN, RUN_KEY_MAX, RUN_LOG_MAX, RUN_LOG_TRUNCATED, RUN_STATUSES, type Rect, type Refusal, type RegressionDiagnosticCode, type RelayAuthorMethod, type RelayCallBatchParams, type RelayCallBatchResult, type RelayEffectParams, type RelayEffectResult, type RelayHeld, type RelayLiveValueParams, type RelayLiveValueResult, type RelayReconciled, type RelayRunEnd, type RelayRunUpdateParams, type RelayRunUpdateResult, RelayViewer, type RemoteDiagnosticCode, RemoteError, RemoteLink, type RemoteLinkParams, type RemoteLinkResult, type RemoteLinkState, type RemoteLoginParams, type RemoteLoginResult, type RemoteLoginWaitParams, type RemoteLoginWaitResult, type RemoteLogoutParams, type RemoteLogoutResult, type RemoteStatusParams, type RemoteStatusResult, type RemoteTokenParams, type RemoteTokenResult, type RenderRequest, type RenderResult, type RequestFacts, type RequestIntent, type RequestPolicy, ResultComment, Results, type ResultsGetParams, type ResultsGetResult, ResultsMarkdown, Revision, type RevisionNegotiation, RouteId, RpcError, RpcPeer, type RpcPeerOptions, type RpcRequestContext, type RpcRequestOptions, RunAttachRequest, RunCancelRequest, type RunDelta, RunId, RunProgress, type RunReason, RunRequest, RunState, type RunStatus, type RuntimeDiagnosticCode, SECRET_NAME_PATTERN, SECRET_VALUE_MAX, SHELL_SESSION_HEADER, SIGNAL_NAME_PATTERN, SIGNAL_PAYLOAD_MAX_BYTES, type SaveState, ScreenshotPolicy, type SecretDeleteParams, type SecretDeleteResult, type SecretDiagnosticCode, SecretEntry, type SecretListParams, type SecretListResult, type SecretSetParams, type SecretSetResult, SerializationError, type SerializeMode, ServerEmitParams, ServerLiveValueParams, ServerLogParams, ServerOrigin, ServerProgressParams, ServerSecretParams, ServerSignalParams, ServerStateGetParams, ServerStatePatchParams, type ServerStatePatchResult, Share, type ShareDiagnosticCode, ShareId, type ShareListParams, type ShareListResult, type ShareStartParams, type ShareStartResult, type ShareStopParams, type ShareStopResult, ShareVia, ShellSubmitRequest, SignalRequest, type SmokeDiagnosticCode, SourceRef, type StateGetParams, type StateGetResult, type StatePatchParams, type StatePatchResult, StreamSnapshot, StreamTicket, StreamTicketRequest, SubmissionEnvelope, SubmissionId, SubmissionPolicy, SubmissionSummary, type SubmissionsDeliverResult, type SubmitBlocker, SubmitChannel, type SubmitDiagnosticCode, SubmitRequest, TALLY_CHOICES_MAX, TALLY_CHOICES_MIN, TALLY_LIVE_PREFIX, TallySpec, type TallyValue, type TargetDiagnosticCode, type TerminalSpec, ThreadId, type TokenEstimate, TokenId, TrustedControl, type TypeDiagnosticCode, UNSERIALIZABLE_CODE, type UiInitializeParams, type UiInitializeResult, VERIFY_PROBE, VERIFY_REPORT, VERIFY_RUNNER_METHODS, ValueReader, type ValueReaderOptions, ValueWriter, type ValueWriterOptions, type VerdictAria, type VerdictScreenshot, type VerifyDiagnosticCode, VerifyVerdict, type VerifyViewport, type VersionAvailableParams, VersionId, type VersionIdKind, VersionPush, VersionRef, VersionSummary, ViewContext, ViewContextWire, type ViewDefaultParams, type ViewDefaultResult, ViewId, type ViewLaunchParams, type ViewLaunchResult, type ViewRevokeParams, type ViewRevokeResult, type ViewRotateParams, type ViewRotateResult, type ViewUrlParams, type ViewUrlResult, Viewer, ViewerId, type ViewerKind, ViewerSpec, type Viewport, WAIT_MAX_MS, WORKER_CHANNEL_REVISION, WORKER_METHODS, WaitCondition, type WaitParams, type WaitResult, type WireError, WorkerBatchParams, WorkerCallOutcome, WorkerCallParams, type WorkerCancelParams, type WorkerLimits, type WorkerLiveParams, WorkerPingResult, WorkerStartParams, WorkerStartResult, WorkerStatus, WorkerVersionRef, a11yDiagnosticCodes, actionDiagnosticCodes, ariaSummary, artifactCreateMethod, artifactDiagnosticCodes, artifactExportMethod, artifactGetMethod, artifactImportMethod, artifactListMethod, artifactPauseMethod, artifactPublishMethod, artifactVerifyMethod, buildDiagnosticCodes, bundleAssetName, canonicalJson, checkArgumentFrames, checkRequest, classifyMessage, cliDiagnosticCodes, connectBridge, consoleDiagnosticCodes, createDiagnostic, defineMethod, depDiagnosticCodes, depsAddMethod, deserializeAll, devStartMethod, devStopMethod, diagnosticCatalog, docsUrl, durationMs, encodeLine, envDiagnosticCodes, estimateImageTokens, eventsAckMethod, eventsReadMethod, eventsSubscribeMethod, eventsUnsubscribeMethod, fieldDiagnosticCodes, fromBase64, gcRunMethod, headerValue, homeDiagnosticCodes, hostDiagnosticCodes, hostMethods, hostNotifications, hostedPushMethod, hostedSubmissionMethod, hygieneDiagnosticCodes, instanceCheckMethod, instanceStatusMethod, isFieldId, isFinalRunStatus, isJsonContentType, isWindowsBundle, liveDiagnosticCodes, livePushMethod, manifestDiagnosticCodes, manifestProblem, mostraControlsRequest, mostraFieldFocus, mostraFields, mostraFlush, mostraFrameSessionEntered, mostraFrameSessionFailed, mostraInitializeMethod, mostraPage, mostraReady, mostraShutdownMethod, mostraVersionAvailable, negotiateRevision, networkDiagnosticCodes, normalizeScopes, parseParams, platformDiagnosticCodes, portAddressingExternalBaseMethod, portDraftsMirrorMethod, portIdentityResolveMethod, portRelayAuthorMethod, portRelayCallMethod, portRelayCancelMethod, portRelayLiveMethod, portRelayReconcileMethod, portRelayRunMethod, portSecretsGetMethod, portSubmissionsDeliverMethod, portTrustedControlsActivatedMethod, portTrustedControlsPolicyMethod, publishDiagnosticCodes, readViewContext, receivable, refusal, regressionDiagnosticCodes, relayCallBatchMethod, relayEffectMethod, relayLiveValueMethod, relayRunUpdateMethod, remoteDiagnosticCodes, remoteLinkMethod, remoteLoginMethod, remoteLoginWaitMethod, remoteLogoutMethod, remoteStatusMethod, remoteTokenMethod, resultsGetMethod, runtimeDiagnosticCodes, safeEqual, safePath, scopeAllows, secretDeleteMethod, secretDiagnosticCodes, secretListMethod, secretSetMethod, serializeAll, shareDiagnosticCodes, shareListMethod, shareStartMethod, shareStopMethod, smokeDiagnosticCodes, stateGetMethod, statePatchMethod, submitDiagnosticCodes, targetDiagnosticCodes, toBase64, typeDiagnosticCodes, uiInitialize, uiInitialized, uiOpenLink, uiSizeChanged, verifyDiagnosticCodes, viewDefaultMethod, viewLaunchMethod, viewRevokeMethod, viewRotateMethod, viewUrlMethod, viewportsFor, waitMethod, wireError };
|
|
125
|
+
export { type A11yDiagnosticCode, ACTION_ARGS_MAX, ACTION_RESULT_MAX, ALL_SCOPES, ARGUMENT_BIGINT_DIGITS_MAX, ARTIFACT_MANIFEST_KEYS, ARTIFACT_PROGRESS, AccountId, type ActionDiagnosticCode, ActionError, Actor, AddedPackage, type AnyBridgeMessage, type AnyFunction, type AnyMethod, type AnyNotification, type AreaCatalog, type ArtifactCreateParams, type ArtifactCreateResult, ArtifactDetail, type ArtifactDiagnosticCode, type ArtifactExportParams, type ArtifactExportResult, type ArtifactFamily, type ArtifactGetParams, type ArtifactGetResult, ArtifactId, type ArtifactImportParams, type ArtifactImportResult, ArtifactLink, type ArtifactListFilter, type ArtifactListParams, type ArtifactListResult, ArtifactManifest, type ArtifactPauseParams, type ArtifactPauseResult, ArtifactProgressParams, type ArtifactPublishParams, type ArtifactPublishResult, ArtifactRef, ArtifactSummary, type ArtifactVerifyParams, type ArtifactVerifyResult, BRIDGE_FIELDS_MAX, BRIDGE_MESSAGES, BRIDGE_TEXT_MAX, BROWSER_PROTOCOL_REVISION, BROWSER_PROTOCOL_REVISIONS, BUNDLE_NAME, BUNDLE_PLATFORMS, BUNDLE_SETUP_MARKER, Batches, type Bridge, type BridgeEvent, type BridgeHostContext, type BridgeImplementation, type BridgeMessage, type BridgeOptions, type BridgePeer, type BridgeReceiver, type BridgeRejection, type BridgeSide, type BuildDiagnosticCode, BundleAsset, BundleBrowser, BundleFileEntry, BundleFiles, BundleInfo, BundleLinkEntry, BundlePins, type BundlePlatform, BundlePlatformSchema, BundleSetup, CLI_CLIENT_NAME, CONTROL_LABEL_MAX, CSRF_HEADER, type CallContext, type CallLine, CallRequest, CapabilityLink, CapabilityScope, CarryOver, ChildProcessStatus, ChooseRequest, type ClassifiedMessage, type CliDiagnosticCode, ClientCapabilities, ClientInfo, CommentId, type CompareRequest, type CompareResult, type ConsoleDiagnosticCode, type ControlRequest, ControlsPolicy, type CreateDiagnosticOptions, Cursor, DEFAULT_DOCS_BASE, DEFAULT_TEAM_VISIBILITY, DEFAULT_VIEWPORTS, DEFAULT_WORKER_LIMITS, DEV_NOTIFY, DIAGNOSTIC_AREAS, DeliveryCounts, DeliveryId, type DeliveryState, DeliveryStatus, type DeliveryTarget, type DemoSpec, type DepDiagnosticCode, DependencyPolicy, type DepsAddParams, type DepsAddResult, type DevEventKind, DevNotifyParams, type DevStartParams, type DevStartResult, type DevStopParams, type DevStopResult, Diagnostic, type DiagnosticArea, type DiagnosticCode, type DiagnosticDetails, DiagnosticFix, DiagnosticLocation, DiagnosticPhase, DiagnosticSeverity, type DiagnosticSpec, DocumentRevision, DocumentSnapshot, DraftMirror, type DraftsMirrorResult, Duration, EVENTS_NOTIFY, EVENTS_READ_MAX, EnterRequest, EnterResult, type EnvDiagnosticCode, type EphemeralMessage, EventFilter, EventOrigin, EventRecord, EventTypePattern, type EventsAckParams, type EventsAckResult, EventsNotifyParams, type EventsReadParams, type EventsReadResult, type EventsSubscribeParams, type EventsSubscribeResult, type EventsUnsubscribeParams, type EventsUnsubscribeResult, ExportClass, ExternalBase, FIELD_ID_MAX_LENGTH, FRAME_SESSION_HEADER, type FaceStatus, FieldConflict, type FieldDiagnosticCode, FieldOp, type FieldRegistration, type FieldScope, FieldState, type FieldsParams, FieldsRequest, type FlushResult, FollowRequest, type Frame, FrameSessionFacts, type FrameSessionFailedParams, FrameTicket, GatewayStatus, type GcCompactEvents, type GcCompacted, type GcCount, type GcRunParams, type GcRunResult, type GcVersion, type GeneratedIdKind, HOSTED_OFFLINE_LIMIT_DEFAULT, HOSTED_OFFLINE_LIMIT_MAX_MS, HOST_PROTOCOL_REVISIONS, HomeConfig, type HomeDiagnosticCode, HomeId, type HostDiagnosticCode, type HostedChrome, type HostedPushParams, type HostedPushResult, HostedRoute, HostedSettings, type HostedSubmissionParams, type HostedSubmissionResult, type HygieneDiagnosticCode, type Id, type IdBody, type IdKind, type IdPrefix, type IdentityVia, InstanceCapabilities, type InstanceCheck, type InstanceCheckParams, type InstanceCheckResult, InstanceInfo, type InstanceStatusParams, type InstanceStatusResult, JSON_RPC_ERROR_CODES, JsonRpcErrorObject, JsonRpcFailure, type JsonRpcId, type JsonRpcMessage, JsonRpcNotification, type JsonRpcParams, JsonRpcRequest, type JsonRpcResponse, JsonRpcSuccess, type KnownDiagnosticCode, LIVE_KEY_PATTERN, LIVE_RING_DEFAULT, LIVE_RING_MAX, LIVE_VALUE_MAX, LineSplitter, LinkId, type ListingEntry, type LiveDiagnosticCode, type LivePushParams, type LivePushResult, LiveRequest, type LiveSourceInfo, type LiveState, type LiveUpdate, MAX_LINE_LENGTH, MCP_APPS_PROTOCOL_VERSION, type ManifestDiagnosticCode, type MethodDefinition, type MethodDirection, type MostraInitializeParams, type MostraInitializeResult, type MostraShutdownParams, type MostraShutdownResult, MutationId, MutationResult, type NetworkDiagnosticCode, type NotificationDefinition, OPEN_LINK_SCHEMES, OriginString, OrphanedField, OwnerLinkInfo, PRESENCE_COORDINATE_MAX, PUBLIC_SHARE_DEFAULT_TTL, PUBLIC_SHARE_MAX_TTL_MS, type PausedBy, type Peer, type PlatformDiagnosticCode, PollResult, type PortAddressingExternalBaseParams, type PortAddressingExternalBaseResult, type PortIdentityResolveParams, type PortIdentityResolveResult, PortName, type PortRelayAuthorParams, type PortRelayAuthorResult, type PortRelayCallParams, type PortRelayCallResult, type PortRelayCancelParams, type PortRelayCancelResult, type PortRelayLiveParams, type PortRelayLiveResult, type PortRelayReconcileParams, type PortRelayReconcileResult, type PortRelayRunParams, type PortRelayRunResult, type PortSecretsGetParams, type PortSecretsGetResult, type PortTrustedControlsActivatedParams, type PortTrustedControlsActivatedResult, type PortTrustedControlsPolicyParams, type PortTrustedControlsPolicyResult, PresenceCursor, PresencePeer, PresenceRequest, PresenceSelection, PresenceState, type ProbedField, type PublishDiagnosticCode, PublishReceipt, READABLE_LIVE_KEY_PATTERN, RELAY_AUTHOR_METHODS, RESULTS_LIST_MAX, REVIEW_SET_ID_PATTERN, ROSTER_MAX, RUN_KEY_MAX, RUN_LOG_MAX, RUN_LOG_TRUNCATED, RUN_STATUSES, type Rect, type Refusal, type RegressionDiagnosticCode, type RelayAuthorMethod, type RelayCallBatchParams, type RelayCallBatchResult, type RelayEffectParams, type RelayEffectResult, type RelayHeld, type RelayLiveValueParams, type RelayLiveValueResult, type RelayReconciled, type RelayRunEnd, type RelayRunUpdateParams, type RelayRunUpdateResult, RelayViewer, type RemoteDiagnosticCode, RemoteError, RemoteLink, type RemoteLinkParams, type RemoteLinkResult, type RemoteLinkState, type RemoteLoginParams, type RemoteLoginResult, type RemoteLoginWaitParams, type RemoteLoginWaitResult, type RemoteLogoutParams, type RemoteLogoutResult, type RemoteStatusParams, type RemoteStatusResult, type RemoteTokenParams, type RemoteTokenResult, type RenderRequest, type RenderResult, type RequestFacts, type RequestIntent, type RequestPolicy, Respondent, RespondentForPage, RespondentLink, RespondentSpec, RespondentStatus, RespondentsRequest, ResultComment, Results, type ResultsGetParams, ResultsGetResult, type ResultsListParams, type ResultsListResult, ResultsMarkdown, Revision, type RevisionNegotiation, Roster, type RosterAddParams, type RosterAddResult, RosterCounts, RosterForPage, type RosterGetParams, type RosterGetResult, type RosterRemoveParams, type RosterRemoveResult, RouteId, RpcError, RpcPeer, type RpcPeerOptions, type RpcRequestContext, type RpcRequestOptions, RunAttachRequest, RunCancelRequest, type RunDelta, RunId, RunProgress, type RunReason, RunRequest, RunState, type RunStatus, type RuntimeDiagnosticCode, SECRET_NAME_PATTERN, SECRET_VALUE_MAX, SHELL_SESSION_HEADER, SIGNAL_NAME_PATTERN, SIGNAL_PAYLOAD_MAX_BYTES, type SaveState, ScreenshotPolicy, type SecretDeleteParams, type SecretDeleteResult, type SecretDiagnosticCode, SecretEntry, type SecretListParams, type SecretListResult, type SecretSetParams, type SecretSetResult, SerializationError, type SerializeMode, ServerEmitParams, ServerLiveValueParams, ServerLogParams, ServerOrigin, ServerProgressParams, ServerSecretParams, ServerSignalParams, ServerStateGetParams, ServerStatePatchParams, type ServerStatePatchResult, Share, type ShareDiagnosticCode, ShareId, type ShareListParams, type ShareListResult, type ShareStartParams, type ShareStartResult, type ShareStopParams, type ShareStopResult, ShareVia, ShellSubmitRequest, SignalRequest, type SmokeDiagnosticCode, SourceRef, type StateGetParams, type StateGetResult, type StatePatchParams, type StatePatchResult, StreamSnapshot, StreamTicket, StreamTicketRequest, SubmissionEnvelope, SubmissionId, SubmissionPolicy, SubmissionSummary, type SubmissionsDeliverResult, type SubmitBlocker, SubmitChannel, type SubmitDiagnosticCode, SubmitRequest, TALLY_CHOICES_MAX, TALLY_CHOICES_MIN, TALLY_LIVE_PREFIX, TallySpec, type TallyValue, type TargetDiagnosticCode, type TeamDiagnosticCode, TeamSettings, TeamVisibility, type TerminalSpec, ThreadId, type TokenEstimate, TokenId, TrustedControl, type TypeDiagnosticCode, UNSERIALIZABLE_CODE, type UiInitializeParams, type UiInitializeResult, VERIFY_PROBE, VERIFY_REPORT, VERIFY_RUNNER_METHODS, ValueReader, type ValueReaderOptions, ValueWriter, type ValueWriterOptions, type VerdictAria, type VerdictScreenshot, type VerifyDiagnosticCode, VerifyVerdict, type VerifyViewport, type VersionAvailableParams, VersionId, type VersionIdKind, VersionPush, VersionRef, VersionSummary, ViewContext, ViewContextWire, type ViewDefaultParams, type ViewDefaultResult, ViewId, type ViewLaunchParams, type ViewLaunchResult, type ViewRevokeParams, type ViewRevokeResult, type ViewRotateParams, type ViewRotateResult, type ViewUrlParams, type ViewUrlResult, Viewer, ViewerId, ViewerKind, ViewerSpec, type Viewport, WAIT_MAX_MS, WORKER_CHANNEL_REVISION, WORKER_METHODS, WaitCondition, type WaitParams, type WaitResult, type WireError, WorkerBatchParams, WorkerCallOutcome, WorkerCallParams, type WorkerCancelParams, type WorkerLimits, type WorkerLiveParams, WorkerPingResult, WorkerStartParams, WorkerStartResult, WorkerStatus, WorkerVersionRef, a11yDiagnosticCodes, actionDiagnosticCodes, ariaSummary, artifactCreateMethod, artifactDiagnosticCodes, artifactExportMethod, artifactGetMethod, artifactImportMethod, artifactListMethod, artifactPauseMethod, artifactPublishMethod, artifactVerifyMethod, buildDiagnosticCodes, bundleAssetName, canonicalJson, checkArgumentFrames, checkRequest, classifyMessage, cliDiagnosticCodes, connectBridge, consoleDiagnosticCodes, createDiagnostic, defineMethod, depDiagnosticCodes, depsAddMethod, deserializeAll, devStartMethod, devStopMethod, diagnosticCatalog, docsUrl, durationMs, encodeLine, envDiagnosticCodes, estimateImageTokens, eventsAckMethod, eventsReadMethod, eventsSubscribeMethod, eventsUnsubscribeMethod, fieldDiagnosticCodes, fromBase64, gcRunMethod, headerValue, homeDiagnosticCodes, hostDiagnosticCodes, hostMethods, hostNotifications, hostedPushMethod, hostedSubmissionMethod, hygieneDiagnosticCodes, instanceCheckMethod, instanceStatusMethod, isFieldId, isFinalRunStatus, isJsonContentType, isWindowsBundle, liveDiagnosticCodes, livePushMethod, manifestDiagnosticCodes, manifestProblem, mostraControlsRequest, mostraFieldFocus, mostraFields, mostraFlush, mostraFrameSessionEntered, mostraFrameSessionFailed, mostraInitializeMethod, mostraPage, mostraReady, mostraShutdownMethod, mostraVersionAvailable, negotiateRevision, networkDiagnosticCodes, normalizeScopes, parseParams, platformDiagnosticCodes, portAddressingExternalBaseMethod, portDraftsMirrorMethod, portIdentityResolveMethod, portRelayAuthorMethod, portRelayCallMethod, portRelayCancelMethod, portRelayLiveMethod, portRelayReconcileMethod, portRelayRunMethod, portSecretsGetMethod, portSubmissionsDeliverMethod, portTrustedControlsActivatedMethod, portTrustedControlsPolicyMethod, publishDiagnosticCodes, readViewContext, receivable, refusal, regressionDiagnosticCodes, relayCallBatchMethod, relayEffectMethod, relayLiveValueMethod, relayRunUpdateMethod, remoteDiagnosticCodes, remoteLinkMethod, remoteLoginMethod, remoteLoginWaitMethod, remoteLogoutMethod, remoteStatusMethod, remoteTokenMethod, resultsGetMethod, resultsListMethod, rosterAddMethod, rosterGetMethod, rosterRemoveMethod, runtimeDiagnosticCodes, safeEqual, safePath, scopeAllows, secretDeleteMethod, secretDiagnosticCodes, secretListMethod, secretSetMethod, serializeAll, shareDiagnosticCodes, shareListMethod, shareStartMethod, shareStopMethod, smokeDiagnosticCodes, stateGetMethod, statePatchMethod, submitDiagnosticCodes, targetDiagnosticCodes, teamDiagnosticCodes, toBase64, typeDiagnosticCodes, uiInitialize, uiInitialized, uiOpenLink, uiSizeChanged, verifyDiagnosticCodes, viewDefaultMethod, viewLaunchMethod, viewRevokeMethod, viewRotateMethod, viewUrlMethod, viewportsFor, waitMethod, wireError };
|