@mostra/protocol 0.10.0 → 0.11.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/browser.d.ts +42 -0
- package/dist/browser.d.ts.map +1 -1
- package/dist/browser.js +29 -1
- package/dist/browser.js.map +1 -1
- package/dist/diagnostics/codes/action.d.ts +1 -1
- package/dist/diagnostics/codes/action.d.ts.map +1 -1
- package/dist/diagnostics/codes/action.js +12 -1
- package/dist/diagnostics/codes/action.js.map +1 -1
- package/dist/diagnostics/codes/remote.d.ts +1 -1
- package/dist/diagnostics/codes/remote.d.ts.map +1 -1
- package/dist/diagnostics/codes/remote.js +78 -1
- package/dist/diagnostics/codes/remote.js.map +1 -1
- package/dist/diagnostics/codes/submit.d.ts +1 -1
- package/dist/diagnostics/codes/submit.d.ts.map +1 -1
- package/dist/diagnostics/codes/submit.js +12 -1
- package/dist/diagnostics/codes/submit.js.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.js +4 -1
- package/dist/interaction.d.ts +5 -0
- package/dist/interaction.d.ts.map +1 -1
- package/dist/interaction.js +2 -1
- package/dist/interaction.js.map +1 -1
- package/dist/methods/artifact/pause.d.ts +33 -0
- package/dist/methods/artifact/pause.d.ts.map +1 -0
- package/dist/methods/artifact/pause.js +33 -0
- package/dist/methods/artifact/pause.js.map +1 -0
- package/dist/methods/index.d.ts.map +1 -1
- package/dist/methods/index.js +7 -1
- package/dist/methods/index.js.map +1 -1
- package/dist/methods/port/relay-author.d.ts +28 -0
- package/dist/methods/port/relay-author.d.ts.map +1 -0
- package/dist/methods/port/relay-author.js +42 -0
- package/dist/methods/port/relay-author.js.map +1 -0
- package/dist/methods/remote/link.d.ts +40 -0
- package/dist/methods/remote/link.d.ts.map +1 -0
- package/dist/methods/remote/link.js +40 -0
- package/dist/methods/remote/link.js.map +1 -0
- package/dist/operator.d.ts +464 -0
- package/dist/operator.d.ts.map +1 -0
- package/dist/operator.js +134 -0
- package/dist/operator.js.map +1 -0
- package/package.json +11 -1
- package/schemas/protocol.draft-07.json +259 -0
- package/schemas/protocol.schema.json +259 -0
- package/src/browser.ts +64 -0
- package/src/diagnostics/codes/action.ts +12 -0
- package/src/diagnostics/codes/remote.ts +84 -0
- package/src/diagnostics/codes/submit.ts +12 -0
- package/src/index.ts +19 -0
- package/src/interaction.ts +6 -0
- package/src/methods/artifact/pause.ts +59 -0
- package/src/methods/index.ts +6 -0
- package/src/methods/port/relay-author.ts +57 -0
- package/src/methods/remote/link.ts +65 -0
- package/src/operator.ts +621 -0
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { ControlsPolicy, DeliveryTarget, REVIEW_SET_ID_PATTERN, SubmitChannel, T
|
|
|
8
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
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
10
|
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";
|
|
11
|
-
import { BROWSER_PROTOCOL_REVISION, BROWSER_PROTOCOL_REVISIONS, CarryOver, ChooseRequest, DocumentSnapshot, EnterRequest, EnterResult, FRAME_SESSION_HEADER, FieldsRequest, FollowRequest, FrameSessionFacts, FrameTicket, OrphanedField, PollResult, SHELL_SESSION_HEADER, SIGNAL_PAYLOAD_MAX_BYTES, ShellSubmitRequest, SignalRequest, StreamSnapshot, StreamTicket, StreamTicketRequest, SubmitRequest } from "./browser.js";
|
|
11
|
+
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
12
|
import { BUNDLE_NAME, BUNDLE_PLATFORMS, BUNDLE_SETUP_MARKER, BundleAsset, BundleBrowser, BundleFileEntry, BundleFiles, BundleInfo, BundleLinkEntry, BundlePins, BundlePlatform, BundlePlatformSchema, BundleSetup, bundleAssetName, isWindowsBundle } from "./bundle.js";
|
|
13
13
|
import { canonicalJson } from "./canonical.js";
|
|
14
14
|
import { ALL_SCOPES, CapabilityScope, normalizeScopes, scopeAllows } from "./capability.js";
|
|
@@ -49,6 +49,7 @@ import { ArtifactExportParams, ArtifactExportResult, ExportClass, artifactExport
|
|
|
49
49
|
import { ArtifactGetParams, ArtifactGetResult, artifactGetMethod } from "./methods/artifact/get.js";
|
|
50
50
|
import { ArtifactImportParams, ArtifactImportResult, artifactImportMethod } from "./methods/artifact/import.js";
|
|
51
51
|
import { ArtifactListFilter, ArtifactListParams, ArtifactListResult, artifactListMethod } from "./methods/artifact/list.js";
|
|
52
|
+
import { ArtifactPauseParams, ArtifactPauseResult, PausedBy, artifactPauseMethod } from "./methods/artifact/pause.js";
|
|
52
53
|
import { ArtifactPublishParams, ArtifactPublishResult, artifactPublishMethod } from "./methods/artifact/publish.js";
|
|
53
54
|
import { ARTIFACT_PROGRESS, ArtifactProgressParams, CompareRequest, CompareResult, DEFAULT_VIEWPORTS, ProbedField, RenderRequest, RenderResult, ScreenshotPolicy, TokenEstimate, VERIFY_PROBE, VERIFY_REPORT, VERIFY_RUNNER_METHODS, VerdictAria, VerdictScreenshot, VerifyVerdict, VerifyViewport, ariaSummary, estimateImageTokens, viewportsFor } from "./verify.js";
|
|
54
55
|
import { ArtifactVerifyParams, ArtifactVerifyResult, artifactVerifyMethod } from "./methods/artifact/verify.js";
|
|
@@ -75,6 +76,7 @@ import { MostraShutdownParams, MostraShutdownResult, mostraShutdownMethod } from
|
|
|
75
76
|
import { ExternalBase, OriginString, PortAddressingExternalBaseParams, PortAddressingExternalBaseResult, portAddressingExternalBaseMethod } from "./methods/port/addressing-external-base.js";
|
|
76
77
|
import { DraftMirror, DraftsMirrorResult, portDraftsMirrorMethod } from "./methods/port/drafts-mirror.js";
|
|
77
78
|
import { IdentityVia, PortIdentityResolveParams, PortIdentityResolveResult, portIdentityResolveMethod } from "./methods/port/identity-resolve.js";
|
|
79
|
+
import { PortRelayAuthorParams, PortRelayAuthorResult, RELAY_AUTHOR_METHODS, RelayAuthorMethod, portRelayAuthorMethod } from "./methods/port/relay-author.js";
|
|
78
80
|
import { PortRelayRunParams, PortRelayRunResult, RelayViewer, portRelayRunMethod } from "./methods/port/relay-run.js";
|
|
79
81
|
import { PortRelayCallParams, PortRelayCallResult, portRelayCallMethod } from "./methods/port/relay-call.js";
|
|
80
82
|
import { PortRelayCancelParams, PortRelayCancelResult, portRelayCancelMethod } from "./methods/port/relay-cancel.js";
|
|
@@ -87,6 +89,7 @@ import { RelayCallBatchParams, RelayCallBatchResult, relayCallBatchMethod } from
|
|
|
87
89
|
import { RelayEffectParams, RelayEffectResult, relayEffectMethod } from "./methods/relay/effect.js";
|
|
88
90
|
import { RelayLiveValueParams, RelayLiveValueResult, relayLiveValueMethod } from "./methods/relay/live-value.js";
|
|
89
91
|
import { RelayRunEnd, RelayRunUpdateParams, RelayRunUpdateResult, relayRunUpdateMethod } from "./methods/relay/run-update.js";
|
|
92
|
+
import { RemoteLinkParams, RemoteLinkResult, remoteLinkMethod } from "./methods/remote/link.js";
|
|
90
93
|
import { RemoteLoginParams, RemoteLoginResult, remoteLoginMethod } from "./methods/remote/login.js";
|
|
91
94
|
import { RemoteLoginWaitParams, RemoteLoginWaitResult, remoteLoginWaitMethod } from "./methods/remote/login-wait.js";
|
|
92
95
|
import { RemoteLogoutParams, RemoteLogoutResult, remoteLogoutMethod } from "./methods/remote/logout.js";
|
|
@@ -112,4 +115,4 @@ import { JSON_RPC_ERROR_CODES, RpcError } from "./rpc/error.js";
|
|
|
112
115
|
import { LineSplitter, MAX_LINE_LENGTH, encodeLine } from "./rpc/lines.js";
|
|
113
116
|
import { RpcPeer, RpcPeerOptions, RpcRequestContext, RpcRequestOptions, parseParams } from "./rpc/peer.js";
|
|
114
117
|
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";
|
|
115
|
-
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, 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 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 PlatformDiagnosticCode, PollResult, type PortAddressingExternalBaseParams, type PortAddressingExternalBaseResult, type PortIdentityResolveParams, type PortIdentityResolveResult, PortName, 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, REVIEW_SET_ID_PATTERN, RUN_KEY_MAX, RUN_LOG_MAX, RUN_LOG_TRUNCATED, RUN_STATUSES, type Rect, type Refusal, type RegressionDiagnosticCode, 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 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, 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, portRelayCallMethod, portRelayCancelMethod, portRelayLiveMethod, portRelayReconcileMethod, portRelayRunMethod, portSecretsGetMethod, portSubmissionsDeliverMethod, portTrustedControlsActivatedMethod, portTrustedControlsPolicyMethod, publishDiagnosticCodes, readViewContext, receivable, refusal, regressionDiagnosticCodes, relayCallBatchMethod, relayEffectMethod, relayLiveValueMethod, relayRunUpdateMethod, remoteDiagnosticCodes, 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 };
|
|
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 };
|
package/dist/index.js
CHANGED
|
@@ -52,6 +52,7 @@ import { ExportClass, artifactExportMethod } from "./methods/artifact/export.js"
|
|
|
52
52
|
import { artifactGetMethod } from "./methods/artifact/get.js";
|
|
53
53
|
import { artifactImportMethod } from "./methods/artifact/import.js";
|
|
54
54
|
import { artifactListMethod } from "./methods/artifact/list.js";
|
|
55
|
+
import { artifactPauseMethod } from "./methods/artifact/pause.js";
|
|
55
56
|
import { artifactPublishMethod } from "./methods/artifact/publish.js";
|
|
56
57
|
import { ARTIFACT_PROGRESS, ArtifactProgressParams, DEFAULT_VIEWPORTS, ScreenshotPolicy, VERIFY_PROBE, VERIFY_REPORT, VERIFY_RUNNER_METHODS, VerifyVerdict, ariaSummary, estimateImageTokens, viewportsFor } from "./verify.js";
|
|
57
58
|
import { artifactVerifyMethod } from "./methods/artifact/verify.js";
|
|
@@ -77,6 +78,7 @@ import { mostraShutdownMethod } from "./methods/mostra/shutdown.js";
|
|
|
77
78
|
import { ExternalBase, OriginString, portAddressingExternalBaseMethod } from "./methods/port/addressing-external-base.js";
|
|
78
79
|
import { DraftMirror, portDraftsMirrorMethod } from "./methods/port/drafts-mirror.js";
|
|
79
80
|
import { portIdentityResolveMethod } from "./methods/port/identity-resolve.js";
|
|
81
|
+
import { RELAY_AUTHOR_METHODS, portRelayAuthorMethod } from "./methods/port/relay-author.js";
|
|
80
82
|
import { RelayViewer, portRelayRunMethod } from "./methods/port/relay-run.js";
|
|
81
83
|
import { portRelayCallMethod } from "./methods/port/relay-call.js";
|
|
82
84
|
import { portRelayCancelMethod } from "./methods/port/relay-cancel.js";
|
|
@@ -89,6 +91,7 @@ import { relayCallBatchMethod } from "./methods/relay/call-batch.js";
|
|
|
89
91
|
import { relayEffectMethod } from "./methods/relay/effect.js";
|
|
90
92
|
import { relayLiveValueMethod } from "./methods/relay/live-value.js";
|
|
91
93
|
import { relayRunUpdateMethod } from "./methods/relay/run-update.js";
|
|
94
|
+
import { remoteLinkMethod } from "./methods/remote/link.js";
|
|
92
95
|
import { remoteLoginMethod } from "./methods/remote/login.js";
|
|
93
96
|
import { remoteLoginWaitMethod } from "./methods/remote/login-wait.js";
|
|
94
97
|
import { remoteLogoutMethod } from "./methods/remote/logout.js";
|
|
@@ -112,4 +115,4 @@ import { hostMethods, hostNotifications } from "./methods/index.js";
|
|
|
112
115
|
import { LineSplitter, MAX_LINE_LENGTH, encodeLine } from "./rpc/lines.js";
|
|
113
116
|
import { ARGUMENT_BIGINT_DIGITS_MAX, RemoteError, SerializationError, UNSERIALIZABLE_CODE, ValueReader, ValueWriter, checkArgumentFrames, deserializeAll, fromBase64, serializeAll, toBase64, wireError } from "./serializer.js";
|
|
114
117
|
import { DEFAULT_WORKER_LIMITS, ServerEmitParams, ServerLiveValueParams, ServerLogParams, ServerProgressParams, ServerSecretParams, ServerSignalParams, ServerStateGetParams, ServerStatePatchParams, WORKER_CHANNEL_REVISION, WORKER_METHODS, WorkerBatchParams, WorkerCallOutcome, WorkerCallParams, WorkerPingResult, WorkerStartParams, WorkerStartResult, WorkerVersionRef } from "./worker.js";
|
|
115
|
-
export { ACTION_ARGS_MAX, ACTION_RESULT_MAX, ALL_SCOPES, ARGUMENT_BIGINT_DIGITS_MAX, ARTIFACT_MANIFEST_KEYS, ARTIFACT_PROGRESS, AccountId, ActionError, Actor, AddedPackage, ArtifactDetail, ArtifactId, ArtifactLink, ArtifactManifest, ArtifactProgressParams, ArtifactRef, ArtifactSummary, BRIDGE_FIELDS_MAX, BRIDGE_MESSAGES, BRIDGE_TEXT_MAX, BROWSER_PROTOCOL_REVISION, BROWSER_PROTOCOL_REVISIONS, BUNDLE_NAME, BUNDLE_PLATFORMS, BUNDLE_SETUP_MARKER, Batches, BundleAsset, BundleBrowser, BundleFileEntry, BundleFiles, BundleInfo, BundleLinkEntry, BundlePins, BundlePlatformSchema, BundleSetup, CLI_CLIENT_NAME, CONTROL_LABEL_MAX, CSRF_HEADER, CallRequest, CapabilityLink, CapabilityScope, CarryOver, ChildProcessStatus, ChooseRequest, ClientCapabilities, ClientInfo, CommentId, ControlsPolicy, Cursor, DEFAULT_DOCS_BASE, DEFAULT_VIEWPORTS, DEFAULT_WORKER_LIMITS, DEV_NOTIFY, DIAGNOSTIC_AREAS, DeliveryCounts, DeliveryId, DeliveryStatus, DependencyPolicy, DevNotifyParams, Diagnostic, DiagnosticFix, DiagnosticLocation, DiagnosticPhase, DiagnosticSeverity, DocumentRevision, DocumentSnapshot, DraftMirror, Duration, EVENTS_NOTIFY, EVENTS_READ_MAX, EnterRequest, EnterResult, EventFilter, EventOrigin, EventRecord, EventTypePattern, EventsNotifyParams, ExportClass, ExternalBase, FIELD_ID_MAX_LENGTH, FRAME_SESSION_HEADER, FieldConflict, FieldOp, FieldState, FieldsRequest, FollowRequest, FrameSessionFacts, FrameTicket, GatewayStatus, HOSTED_OFFLINE_LIMIT_DEFAULT, HOSTED_OFFLINE_LIMIT_MAX_MS, HOST_PROTOCOL_REVISIONS, HomeConfig, HomeId, HostedRoute, HostedSettings, InstanceCapabilities, InstanceInfo, JSON_RPC_ERROR_CODES, JsonRpcErrorObject, JsonRpcFailure, JsonRpcNotification, JsonRpcRequest, JsonRpcSuccess, LIVE_KEY_PATTERN, LIVE_RING_DEFAULT, LIVE_RING_MAX, LIVE_VALUE_MAX, LineSplitter, LinkId, LiveRequest, MAX_LINE_LENGTH, MCP_APPS_PROTOCOL_VERSION, MutationId, MutationResult, OPEN_LINK_SCHEMES, OriginString, OrphanedField, OwnerLinkInfo, PUBLIC_SHARE_DEFAULT_TTL, PUBLIC_SHARE_MAX_TTL_MS, PollResult, PortName, PublishReceipt, READABLE_LIVE_KEY_PATTERN, REVIEW_SET_ID_PATTERN, RUN_KEY_MAX, RUN_LOG_MAX, RUN_LOG_TRUNCATED, RUN_STATUSES, RelayViewer, RemoteError, RemoteLink, ResultComment, Results, ResultsMarkdown, Revision, RouteId, RpcError, RpcPeer, RunAttachRequest, RunCancelRequest, RunId, RunProgress, RunRequest, RunState, SECRET_NAME_PATTERN, SECRET_VALUE_MAX, SHELL_SESSION_HEADER, SIGNAL_NAME_PATTERN, SIGNAL_PAYLOAD_MAX_BYTES, ScreenshotPolicy, SecretEntry, SerializationError, ServerEmitParams, ServerLiveValueParams, ServerLogParams, ServerOrigin, ServerProgressParams, ServerSecretParams, ServerSignalParams, ServerStateGetParams, ServerStatePatchParams, Share, ShareId, ShareVia, ShellSubmitRequest, SignalRequest, SourceRef, StreamSnapshot, StreamTicket, StreamTicketRequest, SubmissionEnvelope, SubmissionId, SubmissionPolicy, SubmissionSummary, SubmitChannel, SubmitRequest, TALLY_CHOICES_MAX, TALLY_CHOICES_MIN, TALLY_LIVE_PREFIX, TallySpec, ThreadId, TokenId, TrustedControl, UNSERIALIZABLE_CODE, VERIFY_PROBE, VERIFY_REPORT, VERIFY_RUNNER_METHODS, ValueReader, ValueWriter, VerifyVerdict, VersionId, VersionPush, VersionRef, VersionSummary, ViewContext, ViewContextWire, ViewId, Viewer, ViewerId, ViewerSpec, WAIT_MAX_MS, WORKER_CHANNEL_REVISION, WORKER_METHODS, WaitCondition, WorkerBatchParams, WorkerCallOutcome, WorkerCallParams, WorkerPingResult, WorkerStartParams, WorkerStartResult, WorkerStatus, WorkerVersionRef, a11yDiagnosticCodes, actionDiagnosticCodes, ariaSummary, artifactCreateMethod, artifactDiagnosticCodes, artifactExportMethod, artifactGetMethod, artifactImportMethod, artifactListMethod, 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, portRelayCallMethod, portRelayCancelMethod, portRelayLiveMethod, portRelayReconcileMethod, portRelayRunMethod, portSecretsGetMethod, portSubmissionsDeliverMethod, portTrustedControlsActivatedMethod, portTrustedControlsPolicyMethod, publishDiagnosticCodes, readViewContext, receivable, refusal, regressionDiagnosticCodes, relayCallBatchMethod, relayEffectMethod, relayLiveValueMethod, relayRunUpdateMethod, remoteDiagnosticCodes, 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 };
|
|
118
|
+
export { ACTION_ARGS_MAX, ACTION_RESULT_MAX, ALL_SCOPES, ARGUMENT_BIGINT_DIGITS_MAX, ARTIFACT_MANIFEST_KEYS, ARTIFACT_PROGRESS, AccountId, ActionError, Actor, AddedPackage, ArtifactDetail, ArtifactId, ArtifactLink, ArtifactManifest, ArtifactProgressParams, ArtifactRef, ArtifactSummary, BRIDGE_FIELDS_MAX, BRIDGE_MESSAGES, BRIDGE_TEXT_MAX, BROWSER_PROTOCOL_REVISION, BROWSER_PROTOCOL_REVISIONS, BUNDLE_NAME, BUNDLE_PLATFORMS, BUNDLE_SETUP_MARKER, Batches, BundleAsset, BundleBrowser, BundleFileEntry, BundleFiles, BundleInfo, BundleLinkEntry, BundlePins, BundlePlatformSchema, BundleSetup, CLI_CLIENT_NAME, CONTROL_LABEL_MAX, CSRF_HEADER, CallRequest, CapabilityLink, CapabilityScope, CarryOver, ChildProcessStatus, ChooseRequest, ClientCapabilities, ClientInfo, CommentId, ControlsPolicy, Cursor, DEFAULT_DOCS_BASE, DEFAULT_VIEWPORTS, DEFAULT_WORKER_LIMITS, DEV_NOTIFY, DIAGNOSTIC_AREAS, DeliveryCounts, DeliveryId, DeliveryStatus, DependencyPolicy, DevNotifyParams, Diagnostic, DiagnosticFix, DiagnosticLocation, DiagnosticPhase, DiagnosticSeverity, DocumentRevision, DocumentSnapshot, DraftMirror, Duration, EVENTS_NOTIFY, EVENTS_READ_MAX, EnterRequest, EnterResult, EventFilter, EventOrigin, EventRecord, EventTypePattern, EventsNotifyParams, ExportClass, ExternalBase, FIELD_ID_MAX_LENGTH, FRAME_SESSION_HEADER, FieldConflict, FieldOp, FieldState, FieldsRequest, FollowRequest, FrameSessionFacts, FrameTicket, GatewayStatus, HOSTED_OFFLINE_LIMIT_DEFAULT, HOSTED_OFFLINE_LIMIT_MAX_MS, HOST_PROTOCOL_REVISIONS, HomeConfig, HomeId, HostedRoute, HostedSettings, InstanceCapabilities, InstanceInfo, JSON_RPC_ERROR_CODES, JsonRpcErrorObject, JsonRpcFailure, JsonRpcNotification, JsonRpcRequest, JsonRpcSuccess, LIVE_KEY_PATTERN, LIVE_RING_DEFAULT, LIVE_RING_MAX, LIVE_VALUE_MAX, LineSplitter, LinkId, LiveRequest, MAX_LINE_LENGTH, MCP_APPS_PROTOCOL_VERSION, MutationId, MutationResult, OPEN_LINK_SCHEMES, OriginString, OrphanedField, OwnerLinkInfo, PUBLIC_SHARE_DEFAULT_TTL, PUBLIC_SHARE_MAX_TTL_MS, PollResult, PortName, PublishReceipt, READABLE_LIVE_KEY_PATTERN, RELAY_AUTHOR_METHODS, REVIEW_SET_ID_PATTERN, RUN_KEY_MAX, RUN_LOG_MAX, RUN_LOG_TRUNCATED, RUN_STATUSES, RelayViewer, RemoteError, RemoteLink, ResultComment, Results, ResultsMarkdown, Revision, RouteId, RpcError, RpcPeer, RunAttachRequest, RunCancelRequest, RunId, RunProgress, RunRequest, RunState, SECRET_NAME_PATTERN, SECRET_VALUE_MAX, SHELL_SESSION_HEADER, SIGNAL_NAME_PATTERN, SIGNAL_PAYLOAD_MAX_BYTES, ScreenshotPolicy, SecretEntry, SerializationError, ServerEmitParams, ServerLiveValueParams, ServerLogParams, ServerOrigin, ServerProgressParams, ServerSecretParams, ServerSignalParams, ServerStateGetParams, ServerStatePatchParams, Share, ShareId, ShareVia, ShellSubmitRequest, SignalRequest, SourceRef, StreamSnapshot, StreamTicket, StreamTicketRequest, SubmissionEnvelope, SubmissionId, SubmissionPolicy, SubmissionSummary, SubmitChannel, SubmitRequest, TALLY_CHOICES_MAX, TALLY_CHOICES_MIN, TALLY_LIVE_PREFIX, TallySpec, ThreadId, TokenId, TrustedControl, UNSERIALIZABLE_CODE, VERIFY_PROBE, VERIFY_REPORT, VERIFY_RUNNER_METHODS, ValueReader, ValueWriter, VerifyVerdict, VersionId, VersionPush, VersionRef, VersionSummary, ViewContext, ViewContextWire, ViewId, Viewer, ViewerId, ViewerSpec, WAIT_MAX_MS, WORKER_CHANNEL_REVISION, WORKER_METHODS, WaitCondition, WorkerBatchParams, WorkerCallOutcome, WorkerCallParams, 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 };
|
package/dist/interaction.d.ts
CHANGED
|
@@ -23,6 +23,11 @@ export interface Viewer {
|
|
|
23
23
|
readonly name?: string;
|
|
24
24
|
/** The host's own key for this person, as given to `view/url` (D104). */
|
|
25
25
|
readonly ref?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Whether an identity provider verified the name: `true` for a signed-in account, `false` for an
|
|
28
|
+
* anonymous viewer's self-chosen name (hosted links, D165 item 8). Absent for other kinds.
|
|
29
|
+
*/
|
|
30
|
+
readonly verified?: boolean;
|
|
26
31
|
}
|
|
27
32
|
/** The Zod schema of the `Viewer` type. */
|
|
28
33
|
export declare const Viewer: z.ZodType<Viewer>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interaction.d.ts","names":[],"sources":["../src/interaction.ts"],"mappings":";;;;;;;;;;;YA6BY;;;;;iBAMK;;WAEN;;WAEA,MAAM;;WAEN;;WAEA;;;qBAIE,QAAQ,EAAE,QAAQ;;;;;
|
|
1
|
+
{"version":3,"file":"interaction.d.ts","names":[],"sources":["../src/interaction.ts"],"mappings":";;;;;;;;;;;YA6BY;;;;;iBAMK;;WAEN;;WAEA,MAAM;;WAEN;;WAEA;;;;;WAKA;;;qBAIE,QAAQ,EAAE,QAAQ;;;;;iBAiBd;;WAEN;;WAEA;;;qBAIE,YAAY,EAAE,QAAQ;;iBAWlB;;WAEN;;WAEA;;WAEA;;;qBAIE,OAAO,EAAE,QAAQ;;qBAcjB;;;;;wBAMG,UAAU,cAAc;;YAY5B;;;;;YAMA;;qBAGC,kBAAkB,EAAE,QAAQ;;;;;iBAYxB;;WAEN;;WAEA;;WAEA;;WAEA;;WAEA;;WAEA;;;qBAIE,SAAS,EAAE,QAAQ;;iBAgBf;;WAEN;;WAEA,UAAU;;WAEV,YAAY;;WAEZ;;WAEA;;WAEA;;WAEA;;;qBAIE,YAAY,EAAE,QAAQ;;;;;iBAmBlB;;WAEN;;WAEA,UAAU;;WAEV;;WAEA;;WAEA,YAAY;;WAEZ;;;qBAIE,eAAe,EAAE,QAAQ;;iBAerB;;WAEN,UAAU;;WAEV;;WAEA,oBAAoB;;;qBAIlB,gBAAgB,EAAE,QAAQ;;;;;;iBAmBtB;;WAEN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F,mBAAmB;;WAEnB;aACE;aACA;aACA;aACA;;;WAGF;aACE;aACA;aACA;aACA;;;WAGF;aACE;aACA;aACA;;;WAGF;;WAEA;;;qBAWE,eAAe,EAAE,QAAQ;;qBAkCzB,SAAS,EAAE,QAAQ"}
|
package/dist/interaction.js
CHANGED
|
@@ -23,7 +23,8 @@ const Viewer = z.object({
|
|
|
23
23
|
"anonymous"
|
|
24
24
|
]),
|
|
25
25
|
name: z.string().exactOptional(),
|
|
26
|
-
ref: z.string().exactOptional()
|
|
26
|
+
ref: z.string().exactOptional(),
|
|
27
|
+
verified: z.boolean().exactOptional()
|
|
27
28
|
}).register(wireRegistry, {
|
|
28
29
|
id: "Viewer",
|
|
29
30
|
description: "A person who views an artifact: ID, kind, display name and the host's own key."
|
package/dist/interaction.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interaction.js","names":[],"sources":["../src/interaction.ts"],"sourcesContent":["/**\n * The interaction ledger's wire types (INTERFACES §4, §6, §7, §8; DATA_MODEL §3, §4): viewers,\n * fields and their mutations, events and their filters, `wait` conditions, submissions, deliveries\n * and results. The host protocol methods (`state/*`, `results/get`, `wait`, `events/*`), the\n * submissions and drafts ports, and the browser protocol all speak these shapes.\n */\nimport * as z from \"zod\";\nimport {\n ArtifactId,\n Cursor,\n DeliveryId,\n SubmissionId,\n VersionId,\n ViewerId,\n ViewId,\n} from \"./ids.ts\";\nimport { ArtifactLink, SubmissionPolicy } from \"./manifest.ts\";\nimport type { SubmitChannel } from \"./view.ts\";\nimport { wireRegistry } from \"./wire-registry.ts\";\n\nexport { ControlsPolicy, SubmitChannel, TrustedControl } from \"./view.ts\";\n\n// ── Viewers and actors ────────────────────────────────────────────────────────────────────\n\n/** How Mostra knows a viewer (DATA_MODEL §3 `viewer.kind`). */\n/**\n * How Mostra knows a viewer: `account` and `anonymous` are hosted links' (a signed-in person, and\n * one per browser who isn't signed in, D165 item 8).\n */\nexport type ViewerKind = \"local\" | \"tailnet\" | \"token\" | \"host\" | \"account\" | \"anonymous\";\n\n/**\n * A person who views an artifact (PRODUCT vocabulary). The home's local user is one viewer of kind\n * `local`; a link minted with `viewer` acts as a viewer of kind `token` (D104).\n */\nexport interface Viewer {\n /** The viewer's ID. */\n readonly id: string;\n /** How Mostra knows the viewer. */\n readonly kind: ViewerKind;\n /** The display name, when one is known. */\n readonly name?: string;\n /** The host's own key for this person, as given to `view/url` (D104). */\n readonly ref?: string;\n}\n\n/** The Zod schema of the `Viewer` type. */\nexport const Viewer: z.ZodType<Viewer> = z\n .object({\n id: ViewerId.schema,\n kind: z.enum([\"local\", \"tailnet\", \"token\", \"host\", \"account\", \"anonymous\"]),\n name: z.string().exactOptional(),\n ref: z.string().exactOptional(),\n })\n .register(wireRegistry, {\n id: \"Viewer\",\n description: \"A person who views an artifact: ID, kind, display name and the host's own key.\",\n });\n\n/**\n * The person a capability link acts for (`view/url`'s `viewer`, D104): the host's stable key for\n * them, such as an email or an account ID, and a display name.\n */\nexport interface ViewerSpec {\n /** The host's stable key for this person: the same `ref` always names the same viewer. */\n readonly ref: string;\n /** The name people see; updated when given again. */\n readonly name?: string;\n}\n\n/** The Zod schema of the `ViewerSpec` type. */\nexport const ViewerSpec: z.ZodType<ViewerSpec> = z\n .object({\n ref: z.string().min(1).max(256),\n name: z.string().min(1).max(256).exactOptional(),\n })\n .register(wireRegistry, {\n id: \"ViewerSpec\",\n description: \"The person a capability link acts for: the host's stable key and a display name.\",\n });\n\n/** Who caused an event or wrote a field (DATA_MODEL §4). */\nexport interface Actor {\n /** Who: a viewer, an agent (a protocol client), a host, or Mostra itself. */\n readonly kind: \"viewer\" | \"agent\" | \"host\" | \"mostra\";\n /** A viewer's ID, or the protocol client's name for agents and hosts. */\n readonly id?: string;\n /** A display name, when one is known. */\n readonly name?: string;\n}\n\n/** The Zod schema of the `Actor` type. */\nexport const Actor: z.ZodType<Actor> = z\n .object({\n kind: z.enum([\"viewer\", \"agent\", \"host\", \"mostra\"]),\n id: z.string().exactOptional(),\n name: z.string().exactOptional(),\n })\n .register(wireRegistry, {\n id: \"Actor\",\n description: \"Who caused an event or wrote a field: a viewer, an agent, a host or Mostra.\",\n });\n\n// ── Fields and mutations ──────────────────────────────────────────────────────────────────\n\n/** The longest field ID, in UTF-16 code units. */\nexport const FIELD_ID_MAX_LENGTH = 256;\n\n/**\n * Whether `id` is a field ID (D52): 1 to 256 characters without control characters; dots separate\n * the parts that nest in results, so none is empty.\n */\nexport function isFieldId(id: unknown): id is string {\n return (\n typeof id === \"string\" &&\n id.length >= 1 &&\n id.length <= FIELD_ID_MAX_LENGTH &&\n // biome-ignore lint/suspicious/noControlCharactersInRegex: control characters are what it refuses.\n !/[\\u0000-\\u001f\\u007f]/.test(id) &&\n !id.split(\".\").includes(\"\")\n );\n}\n\n/** Which document a field belongs to: the viewer's draft, or the artifact's shared state (D63). */\nexport type FieldScope = \"viewer\" | \"artifact\";\n\n/**\n * A document revision: the decimal string of a document's monotonic counter (DATA_MODEL §3).\n * `\"0\"` is a document nothing has written yet.\n */\nexport type DocumentRevision = string;\n\n/** The Zod schema of the `DocumentRevision` type. */\nexport const DocumentRevision: z.ZodType<DocumentRevision> = z\n .string()\n .regex(/^(0|[1-9][0-9]{0,15})$/)\n .register(wireRegistry, {\n id: \"DocumentRevision\",\n description: \"A draft's or artifact state's revision: a non-negative decimal integer string.\",\n });\n\n/**\n * One change to one field. Exactly one of `value` and `delete` is given. The optional metadata\n * travels with the field into results and decides what events redact (D52, D106).\n */\nexport interface FieldOp {\n /** The field ID (D52). */\n readonly id: string;\n /** The new value: any JSON value, `null` included. */\n readonly value?: unknown;\n /** Removes the field. */\n readonly delete?: true;\n /** The label people see in results and the shell's blocker list. */\n readonly label?: string;\n /** Whether the shell asks for it before submit. */\n readonly required?: boolean;\n /** Kept in submissions and results, redacted from events and logs (D52). */\n readonly sensitive?: boolean;\n}\n\n/** The Zod schema of the `FieldOp` type. */\nexport const FieldOp: z.ZodType<FieldOp> = z\n .object({\n id: z.string().min(1).max(FIELD_ID_MAX_LENGTH),\n value: z.unknown().exactOptional(),\n delete: z.literal(true).exactOptional(),\n label: z.string().max(1024).exactOptional(),\n required: z.boolean().exactOptional(),\n sensitive: z.boolean().exactOptional(),\n })\n .register(wireRegistry, {\n id: \"FieldOp\",\n description:\n \"One change to one field: a value or a delete, with optional label, required and sensitive.\",\n }) as z.ZodType<FieldOp>;\n\n/** A field's current state. */\nexport interface FieldState {\n /** The field's value: any JSON value. */\n readonly value: unknown;\n /** The document revision that last wrote it. */\n readonly revision: DocumentRevision;\n /** Who wrote it last. */\n readonly updatedBy?: Actor;\n /** When it was written last. */\n readonly updatedAt: string;\n /** The label people see. */\n readonly label?: string;\n /** Whether the shell asks for it before submit. */\n readonly required?: boolean;\n /** Whether events and logs redact its value (D52). */\n readonly sensitive?: boolean;\n}\n\n/** The Zod schema of the `FieldState` type. */\nexport const FieldState: z.ZodType<FieldState> = z\n .object({\n value: z.unknown(),\n revision: DocumentRevision,\n updatedBy: Actor.exactOptional(),\n updatedAt: z.iso.datetime(),\n label: z.string().exactOptional(),\n required: z.boolean().exactOptional(),\n sensitive: z.boolean().exactOptional(),\n })\n .register(wireRegistry, {\n id: \"FieldState\",\n description: \"A field's current value, the revision that wrote it, who wrote it and when.\",\n }) as z.ZodType<FieldState>;\n\n/**\n * A field op that wasn't applied because the field changed after the mutation's base revision\n * (D22, FAILURE_MODEL §5): what the field holds now, so the writer can keep theirs or take it.\n */\nexport interface FieldConflict {\n /** The field's ID. */\n readonly id: string;\n /** The revision that last changed the field. */\n readonly revision: DocumentRevision;\n /** Its current value; absent when it was deleted. */\n readonly value?: unknown;\n /** `true` when the field was deleted. */\n readonly deleted?: true;\n /** Who changed it. */\n readonly updatedBy?: Actor;\n /** When it changed. */\n readonly updatedAt?: string;\n}\n\n/** The Zod schema of the `FieldConflict` type. */\nexport const FieldConflict: z.ZodType<FieldConflict> = z\n .object({\n id: z.string(),\n revision: DocumentRevision,\n value: z.unknown().exactOptional(),\n deleted: z.literal(true).exactOptional(),\n updatedBy: Actor.exactOptional(),\n updatedAt: z.iso.datetime().exactOptional(),\n })\n .register(wireRegistry, {\n id: \"FieldConflict\",\n description: \"A field op not applied because the field changed after the base revision.\",\n }) as z.ZodType<FieldConflict>;\n\n/** What a mutation did: the document's revision after it, the ops applied, and the conflicts. */\nexport interface MutationResult {\n /** The document's revision after the mutation; unchanged when nothing applied. */\n readonly revision: DocumentRevision;\n /** The field IDs whose ops were applied. */\n readonly applied: readonly string[];\n /** The ops not applied, with what each field holds now. */\n readonly conflicts: readonly FieldConflict[];\n}\n\n/** The Zod schema of the `MutationResult` type. */\nexport const MutationResult: z.ZodType<MutationResult> = z\n .object({\n revision: DocumentRevision,\n applied: z.array(z.string()).readonly(),\n conflicts: z.array(FieldConflict).readonly(),\n })\n .register(wireRegistry, {\n id: \"MutationResult\",\n description:\n \"A mutation's outcome: the revision after it, the applied field IDs, the conflicts.\",\n });\n\n// ── Events ────────────────────────────────────────────────────────────────────────────────\n\n/**\n * Where an owner instance's copy of a hosted record came from (INTERFACES §18.2, D165 item 1): the\n * server, the hosted home, its incarnation and the record's cursor there (a submission's is the\n * cursor of its `submission.created`).\n */\nexport interface EventOrigin {\n /** The server's API origin. */\n readonly server: string;\n /** The hosted home's `hom_` ID. */\n readonly home: string;\n /** The hosted home's incarnation when the record was copied. */\n readonly incarnation: string;\n /** The record's cursor in the hosted home. */\n readonly cursor: Cursor;\n}\n\n/** The Zod schema of the `EventOrigin` type. */\nexport const EventOrigin: z.ZodType<EventOrigin> = z\n .object({\n server: z.string().min(1),\n home: z.string().min(1),\n incarnation: z.string().min(1),\n cursor: Cursor.schema,\n })\n .register(wireRegistry, {\n id: \"EventOrigin\",\n description:\n \"Where an owner's copy of a hosted record came from: server, home, incarnation, cursor.\",\n }) as z.ZodType<EventOrigin>;\n\n/**\n * One durable event (DATA_MODEL §4). Its cursor is its stable ID and its place in the home-wide\n * order; `seq` orders an artifact's own events without gaps.\n */\nexport interface EventRecord {\n /** The event's stable ID and home-wide position. */\n readonly cursor: Cursor;\n /** The artifact, or `null` for a home-wide event. */\n readonly artifactId: string | null;\n /** The artifact's sequence number, or `null` for a home-wide event. */\n readonly seq: number | null;\n /** The type from DATA_MODEL §4's catalog. */\n readonly type: string;\n /** When it was appended. */\n readonly at: string;\n /** Who caused it. */\n readonly actor: Actor;\n /** What caused it: a run, a mutation, a submission. */\n readonly causation?: Readonly<Record<string, string>>;\n /** The event's data; sensitive field values are redacted (D52). */\n readonly payload: Readonly<Record<string, unknown>>;\n /** For an event an owner instance copied from its hosted home: where it came from. */\n readonly origin?: EventOrigin;\n}\n\n/** The Zod schema of the `EventRecord` type. */\nexport const EventRecord: z.ZodType<EventRecord> = z\n .object({\n cursor: Cursor.schema,\n artifactId: ArtifactId.schema.nullable(),\n seq: z.int().min(1).nullable(),\n type: z.string(),\n at: z.iso.datetime(),\n actor: Actor,\n causation: z.record(z.string(), z.string()).exactOptional(),\n payload: z.record(z.string(), z.unknown()),\n origin: EventOrigin.exactOptional(),\n })\n .register(wireRegistry, {\n id: \"EventRecord\",\n description:\n \"One durable event: cursor, artifact, per-artifact sequence, type, time, actor, payload.\",\n }) as z.ZodType<EventRecord>;\n\n/**\n * An event type, or a family of them: `submission.created`, or `submission.*` for every type that\n * starts with `submission.`.\n */\nexport type EventTypePattern = string;\n\n/** The Zod schema of the `EventTypePattern` type. */\nexport const EventTypePattern: z.ZodType<EventTypePattern> = z\n .string()\n .regex(/^[a-z][a-zA-Z0-9_-]*(\\.[a-zA-Z0-9_-]+)*(\\.\\*)?$/)\n .register(wireRegistry, {\n id: \"EventTypePattern\",\n description: \"An event type (submission.created) or a family of them (submission.*).\",\n });\n\n/**\n * Which events a reader wants (IN-08, H-09). Both parts are optional, and an event must pass both.\n * `artifact.compacted` always passes for a matching artifact, so a filtered reader still learns of\n * a compaction (DATA_MODEL §4).\n */\nexport interface EventFilter {\n /** Only these artifacts' events; absent: every artifact's, and home-wide ones. */\n readonly artifacts?: readonly string[];\n /** Only these types; absent: every type. */\n readonly types?: readonly EventTypePattern[];\n}\n\n/** The Zod schema of the `EventFilter` type. */\nexport const EventFilter: z.ZodType<EventFilter> = z\n .object({\n artifacts: z.array(ArtifactId.schema).max(1000).readonly().exactOptional(),\n types: z.array(EventTypePattern).max(100).readonly().exactOptional(),\n })\n .register(wireRegistry, {\n id: \"EventFilter\",\n description:\n \"Which events a reader wants: these artifacts' and these types (patterns allowed).\",\n });\n\n/**\n * What `wait` waits for (ARCHITECTURE §6, D103): `submitted`, `signal:<name>`, `state:<fieldId>`\n * or `event:<type pattern>`.\n */\nexport type WaitCondition = string;\n\n/** A signal's name: letters, digits, `.`, `_` and `-`, starting with a letter or digit (D106). */\nexport const SIGNAL_NAME_PATTERN: RegExp = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;\n\n/** The Zod schema of the `WaitCondition` type. */\nexport const WaitCondition: z.ZodType<WaitCondition> = z\n .string()\n .regex(\n // biome-ignore lint/suspicious/noControlCharactersInRegex: field IDs exclude control characters.\n /^(submitted|signal:[A-Za-z0-9][A-Za-z0-9._-]{0,63}|state:[^\\u0000-\\u001f\\u007f]{1,256}|event:[a-z][a-zA-Z0-9_-]*(\\.[a-zA-Z0-9_-]+)*(\\.\\*)?)$/,\n )\n .register(wireRegistry, {\n id: \"WaitCondition\",\n description: \"What wait waits for: submitted, signal:<name>, state:<fieldId> or event:<type>.\",\n });\n\n// ── Submissions, deliveries and results ──────────────────────────────────────────────────\n\n/** A delivery's state (FAILURE_MODEL §4). */\nexport type DeliveryState = \"pending\" | \"delivered\" | \"rejected\" | \"undeliverable\";\n\n/** One submission's delivery to one host (D105). */\nexport interface DeliveryStatus {\n /** The delivery's stable ID (`dlv_`), repeated by every redelivery. */\n readonly deliveryId: string;\n /**\n * The host: its client name. Empty for Mostra's built-in adapter, which takes submissions when no\n * host does; client names are never empty, so no host can be mistaken for it (D105).\n */\n readonly owner: string;\n /** Where the delivery stands. */\n readonly state: DeliveryState;\n /** How many times Mostra called the host for it. */\n readonly attempts: number;\n /** The host's reason, for a rejection. */\n readonly reason?: string;\n /**\n * `true` while a pending delivery waits: its host isn't connected, or an attempt failed and it\n * will be retried (D47's \"Pending delivery\"). Absent while the first attempt is under way.\n */\n readonly waiting?: true;\n /** When its state last changed. */\n readonly updatedAt: string;\n}\n\n/** The Zod schema of the `DeliveryStatus` type. */\nexport const DeliveryStatus: z.ZodType<DeliveryStatus> = z\n .object({\n deliveryId: DeliveryId.schema,\n owner: z.string(),\n state: z.enum([\"pending\", \"delivered\", \"rejected\", \"undeliverable\"]),\n attempts: z.int().min(0),\n reason: z.string().exactOptional(),\n waiting: z.literal(true).exactOptional(),\n updatedAt: z.iso.datetime(),\n })\n .register(wireRegistry, {\n id: \"DeliveryStatus\",\n description: \"One submission's delivery to one host: owner, state, attempts and reason.\",\n });\n\n/** A submission as a submit answers it (INTERFACES §4). */\nexport interface SubmissionSummary {\n /** The submission's ID. */\n readonly id: string;\n /** When it was made. */\n readonly at: string;\n /** The draft epoch it closed (D103); 1 outside `epochs`. */\n readonly epoch: number;\n /** Where the submit came from (D40). */\n readonly channel: SubmitChannel;\n /** The version the view showed. */\n readonly versionId: string;\n /** That version's number. */\n readonly version: number;\n /** The view it was made from. */\n readonly viewId: string;\n /** Whether a newer version existed when the viewer submitted (H-10). */\n readonly staleView: boolean;\n /** The draft revision it was made from. */\n readonly draftRevision: DocumentRevision;\n /** SHA-256 of the snapshot's canonical JSON (RFC 8785), lowercase hex. */\n readonly digest: string;\n /** Every delivery's state, summed up: the worst of them. */\n readonly delivery: DeliveryState;\n /** Each host's delivery, so a viewer sees which host has it (IN-13). */\n readonly deliveries?: readonly DeliveryStatus[];\n /** `true` when this submit repeated an earlier one and got it back (D22). */\n readonly duplicate?: true;\n}\n\n/** The Zod schema of the `SubmissionSummary` type. */\nexport const SubmissionSummary: z.ZodType<SubmissionSummary> = z\n .object({\n id: SubmissionId.schema,\n at: z.iso.datetime(),\n epoch: z.int().min(1),\n channel: z.enum([\"shell\", \"artifact\"]),\n versionId: VersionId.schema,\n version: z.int().min(1),\n viewId: ViewId.schema,\n staleView: z.boolean(),\n draftRevision: DocumentRevision,\n digest: z.string().regex(/^[0-9a-f]{64}$/),\n delivery: z.enum([\"pending\", \"delivered\", \"rejected\", \"undeliverable\"]),\n deliveries: z.array(DeliveryStatus).readonly().exactOptional(),\n duplicate: z.literal(true).exactOptional(),\n })\n .register(wireRegistry, {\n id: \"SubmissionSummary\",\n description:\n \"A submission as a submit answers it: ID, time, epoch, version, view, digest, delivery.\",\n });\n\n/** A rectangle in CSS pixels, relative to its frame. */\nexport interface Rect {\n /** Distance from the frame's left edge. */\n readonly x: number;\n /** Distance from the frame's top edge. */\n readonly y: number;\n /** Width. */\n readonly width: number;\n /** Height. */\n readonly height: number;\n}\n\n/** A viewport: its size in CSS pixels and its device pixel ratio. */\nexport interface Viewport {\n /** Width in CSS pixels. */\n readonly width: number;\n /** Height in CSS pixels. */\n readonly height: number;\n /** Device pixel ratio. */\n readonly dpr: number;\n}\n\n/** One comment thread in results (INTERFACES §8; built by the review layer, WP-20). */\nexport interface ResultComment {\n /** The thread's ID. */\n readonly threadId: string;\n /** Whether the thread is open or resolved. */\n readonly status: \"open\" | \"resolved\";\n /** The thread's messages, oldest first, each with its author. */\n readonly messages: readonly {\n readonly author: Viewer;\n readonly at: string;\n readonly text: string;\n }[];\n /** Every layer of the anchor that applies (D23). */\n readonly anchor: {\n readonly reviewId?: string;\n /** W3C Web Annotation selectors. */\n readonly selectors?: readonly unknown[];\n readonly rect?: Rect;\n readonly viewport?: Viewport;\n readonly page?: string;\n readonly candidateId?: string;\n readonly terminal?: {\n readonly rows: readonly [number, number];\n readonly cols: readonly [number, number];\n readonly t?: number;\n };\n readonly time?: number;\n readonly slide?: { readonly index: number; readonly step: number };\n };\n /** The screenshot crop, always stored (D23). */\n readonly crop: { readonly path: string; readonly width: number; readonly height: number };\n}\n\n/**\n * The complete submission (INTERFACES §8): what `results/get`, `mostra results` and the\n * submissions port carry. Everything in it comes from the immutable submission and the version it\n * names, never from the live draft (IN-06).\n */\nexport interface Results {\n /** The artifact, with the metadata of the version the viewer saw. */\n readonly artifact: {\n readonly id: string;\n readonly title: string;\n readonly description?: string;\n readonly family?: string;\n readonly links: readonly ArtifactLink[];\n };\n /** The submission's facts: when, how, by whom, from which version and view, and its delivery. */\n readonly submission: {\n readonly id: string;\n readonly at: string;\n readonly epoch: number;\n /** The same viewer's previous submission, under `epochs` (D103). */\n readonly previous?: string;\n readonly policy: SubmissionPolicy;\n readonly channel: SubmitChannel;\n readonly viewer: Viewer;\n readonly versionId: string;\n readonly version: number;\n readonly viewId: string;\n /** Whether a newer version existed when the viewer submitted (H-10). */\n readonly staleView: boolean;\n /** The newest version's number at the time, when the view was stale. */\n readonly latestVersion?: number;\n readonly draftRevision: DocumentRevision;\n readonly stateRevision?: DocumentRevision;\n readonly digest: string;\n readonly delivery: DeliveryState;\n readonly deliveries: readonly DeliveryStatus[];\n /** For a submission imported from a hosted home: where it came from (D165 item 1). */\n readonly origin?: EventOrigin;\n };\n /** The draft's fields by ID, dotted IDs nested (D52). */\n readonly answers: Readonly<Record<string, unknown>>;\n /** Every field in `answers` and `state`, with its label and scope. */\n readonly fields: readonly {\n readonly id: string;\n readonly label?: string;\n readonly required?: boolean;\n readonly sensitive?: boolean;\n readonly scope: FieldScope;\n }[];\n /** Artifact state at `stateRevision`, dotted IDs nested (D63). */\n readonly state?: Readonly<Record<string, unknown>>;\n /** The review sets' choices: the fields `review.<set>.choice` (D65). */\n readonly choices: readonly {\n readonly reviewSetId: string;\n readonly candidateId: string;\n readonly label?: string;\n }[];\n /** Comment threads with their anchors and crops (WP-20). */\n readonly comments: readonly ResultComment[];\n /** Answers a newer version couldn't map (D42). */\n readonly orphaned: readonly {\n readonly id: string;\n readonly label?: string;\n readonly value: unknown;\n readonly fromVersion: number;\n }[];\n /** Action runs started in this view (WP-08). */\n readonly actions: readonly {\n readonly runId: string;\n readonly action: string;\n readonly status: string;\n readonly at: string;\n }[];\n /** Signals raised in this view before the submission: the newest 100, within 1 MiB of payloads. */\n readonly signals: readonly {\n readonly name: string;\n readonly at: string;\n readonly payload?: unknown;\n }[];\n /** How many older signals of the view the limit left out; absent when none. */\n readonly signalsOmitted?: number;\n /** Set when compaction removed events of this view before it submitted, so signals may be missing. */\n readonly signalsCompacted?: true;\n}\n\nconst RectSchema = z.object({\n x: z.number(),\n y: z.number(),\n width: z.number(),\n height: z.number(),\n});\n\n/** The Zod schema of the `ResultComment` type. */\nexport const ResultComment: z.ZodType<ResultComment> = z\n .object({\n threadId: z.string(),\n status: z.enum([\"open\", \"resolved\"]),\n messages: z\n .array(z.object({ author: Viewer, at: z.iso.datetime(), text: z.string() }))\n .readonly(),\n anchor: z.object({\n reviewId: z.string().exactOptional(),\n selectors: z.array(z.unknown()).readonly().exactOptional(),\n rect: RectSchema.exactOptional(),\n viewport: z\n .object({ width: z.number(), height: z.number(), dpr: z.number() })\n .exactOptional(),\n page: z.string().exactOptional(),\n candidateId: z.string().exactOptional(),\n terminal: z\n .object({\n rows: z.tuple([z.int(), z.int()]).readonly(),\n cols: z.tuple([z.int(), z.int()]).readonly(),\n t: z.number().exactOptional(),\n })\n .exactOptional(),\n time: z.number().exactOptional(),\n slide: z.object({ index: z.int(), step: z.int() }).exactOptional(),\n }),\n crop: z.object({ path: z.string(), width: z.int(), height: z.int() }),\n })\n .register(wireRegistry, {\n id: \"ResultComment\",\n description: \"One comment thread in results: messages, anchor layers and the screenshot crop.\",\n }) as z.ZodType<ResultComment>;\n\n/** The Zod schema of the `Results` type. */\nexport const Results: z.ZodType<Results> = z\n .object({\n artifact: z.object({\n id: ArtifactId.schema,\n title: z.string(),\n description: z.string().exactOptional(),\n family: z.string().exactOptional(),\n links: z.array(ArtifactLink).readonly(),\n }),\n submission: z.object({\n id: SubmissionId.schema,\n at: z.iso.datetime(),\n epoch: z.int().min(1),\n previous: SubmissionId.schema.exactOptional(),\n policy: SubmissionPolicy,\n channel: z.enum([\"shell\", \"artifact\"]),\n viewer: Viewer,\n versionId: VersionId.schema,\n version: z.int().min(1),\n viewId: ViewId.schema,\n staleView: z.boolean(),\n latestVersion: z.int().min(1).exactOptional(),\n draftRevision: DocumentRevision,\n stateRevision: DocumentRevision.exactOptional(),\n digest: z.string().regex(/^[0-9a-f]{64}$/),\n delivery: z.enum([\"pending\", \"delivered\", \"rejected\", \"undeliverable\"]),\n deliveries: z.array(DeliveryStatus).readonly(),\n origin: EventOrigin.exactOptional(),\n }),\n answers: z.record(z.string(), z.unknown()),\n fields: z\n .array(\n z.object({\n id: z.string(),\n label: z.string().exactOptional(),\n required: z.boolean().exactOptional(),\n sensitive: z.boolean().exactOptional(),\n scope: z.enum([\"viewer\", \"artifact\"]),\n }),\n )\n .readonly(),\n state: z.record(z.string(), z.unknown()).exactOptional(),\n choices: z\n .array(\n z.object({\n reviewSetId: z.string(),\n candidateId: z.string(),\n label: z.string().exactOptional(),\n }),\n )\n .readonly(),\n comments: z.array(ResultComment).readonly(),\n orphaned: z\n .array(\n z.object({\n id: z.string(),\n label: z.string().exactOptional(),\n value: z.unknown(),\n fromVersion: z.int().min(1),\n }),\n )\n .readonly(),\n actions: z\n .array(\n z.object({\n runId: z.string(),\n action: z.string(),\n status: z.string(),\n at: z.iso.datetime(),\n }),\n )\n .readonly(),\n signals: z\n .array(\n z.object({ name: z.string(), at: z.iso.datetime(), payload: z.unknown().exactOptional() }),\n )\n .readonly(),\n signalsOmitted: z.int().min(1).exactOptional(),\n signalsCompacted: z.literal(true).exactOptional(),\n })\n .register(wireRegistry, {\n id: \"Results\",\n description:\n \"The complete submission: artifact, submission facts, answers, fields, state, choices, comments, orphans, actions, signals.\",\n }) as z.ZodType<Results>;\n"],"mappings":";;;;;;;;;;;;;;AA+CA,MAAa,SAA4B,EACtC,OAAO;CACN,IAAI,SAAS;CACb,MAAM,EAAE,KAAK;EAAC;EAAS;EAAW;EAAS;EAAQ;EAAW;CAAW,CAAC;CAC1E,MAAM,EAAE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E,OAAO;EACP,IAAI,EAAE,OAAO;EACb,OAAO,EAAE,OAAO,CAAC,CAAC,cAAc;EAChC,OAAO,EAAE,QAAQ;EACjB,aAAa,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC;CAC5B,CAAC,CACH,CAAC,CACA,SAAS;CACZ,SAAS,EACN,MACC,EAAE,OAAO;EACP,OAAO,EAAE,OAAO;EAChB,QAAQ,EAAE,OAAO;EACjB,QAAQ,EAAE,OAAO;EACjB,IAAI,EAAE,IAAI,SAAS;CACrB,CAAC,CACH,CAAC,CACA,SAAS;CACZ,SAAS,EACN,MACC,EAAE,OAAO;EAAE,MAAM,EAAE,OAAO;EAAG,IAAI,EAAE,IAAI,SAAS;EAAG,SAAS,EAAE,QAAQ,CAAC,CAAC,cAAc;CAAE,CAAC,CAC3F,CAAC,CACA,SAAS;CACZ,gBAAgB,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc;CAC7C,kBAAkB,EAAE,QAAQ,IAAI,CAAC,CAAC,cAAc;AAClD,CAAC,CAAC,CACD,SAAS,cAAc;CACtB,IAAI;CACJ,aACE;AACJ,CAAC"}
|
|
1
|
+
{"version":3,"file":"interaction.js","names":[],"sources":["../src/interaction.ts"],"sourcesContent":["/**\n * The interaction ledger's wire types (INTERFACES §4, §6, §7, §8; DATA_MODEL §3, §4): viewers,\n * fields and their mutations, events and their filters, `wait` conditions, submissions, deliveries\n * and results. The host protocol methods (`state/*`, `results/get`, `wait`, `events/*`), the\n * submissions and drafts ports, and the browser protocol all speak these shapes.\n */\nimport * as z from \"zod\";\nimport {\n ArtifactId,\n Cursor,\n DeliveryId,\n SubmissionId,\n VersionId,\n ViewerId,\n ViewId,\n} from \"./ids.ts\";\nimport { ArtifactLink, SubmissionPolicy } from \"./manifest.ts\";\nimport type { SubmitChannel } from \"./view.ts\";\nimport { wireRegistry } from \"./wire-registry.ts\";\n\nexport { ControlsPolicy, SubmitChannel, TrustedControl } from \"./view.ts\";\n\n// ── Viewers and actors ────────────────────────────────────────────────────────────────────\n\n/** How Mostra knows a viewer (DATA_MODEL §3 `viewer.kind`). */\n/**\n * How Mostra knows a viewer: `account` and `anonymous` are hosted links' (a signed-in person, and\n * one per browser who isn't signed in, D165 item 8).\n */\nexport type ViewerKind = \"local\" | \"tailnet\" | \"token\" | \"host\" | \"account\" | \"anonymous\";\n\n/**\n * A person who views an artifact (PRODUCT vocabulary). The home's local user is one viewer of kind\n * `local`; a link minted with `viewer` acts as a viewer of kind `token` (D104).\n */\nexport interface Viewer {\n /** The viewer's ID. */\n readonly id: string;\n /** How Mostra knows the viewer. */\n readonly kind: ViewerKind;\n /** The display name, when one is known. */\n readonly name?: string;\n /** The host's own key for this person, as given to `view/url` (D104). */\n readonly ref?: string;\n /**\n * Whether an identity provider verified the name: `true` for a signed-in account, `false` for an\n * anonymous viewer's self-chosen name (hosted links, D165 item 8). Absent for other kinds.\n */\n readonly verified?: boolean;\n}\n\n/** The Zod schema of the `Viewer` type. */\nexport const Viewer: z.ZodType<Viewer> = z\n .object({\n id: ViewerId.schema,\n kind: z.enum([\"local\", \"tailnet\", \"token\", \"host\", \"account\", \"anonymous\"]),\n name: z.string().exactOptional(),\n ref: z.string().exactOptional(),\n verified: z.boolean().exactOptional(),\n })\n .register(wireRegistry, {\n id: \"Viewer\",\n description: \"A person who views an artifact: ID, kind, display name and the host's own key.\",\n });\n\n/**\n * The person a capability link acts for (`view/url`'s `viewer`, D104): the host's stable key for\n * them, such as an email or an account ID, and a display name.\n */\nexport interface ViewerSpec {\n /** The host's stable key for this person: the same `ref` always names the same viewer. */\n readonly ref: string;\n /** The name people see; updated when given again. */\n readonly name?: string;\n}\n\n/** The Zod schema of the `ViewerSpec` type. */\nexport const ViewerSpec: z.ZodType<ViewerSpec> = z\n .object({\n ref: z.string().min(1).max(256),\n name: z.string().min(1).max(256).exactOptional(),\n })\n .register(wireRegistry, {\n id: \"ViewerSpec\",\n description: \"The person a capability link acts for: the host's stable key and a display name.\",\n });\n\n/** Who caused an event or wrote a field (DATA_MODEL §4). */\nexport interface Actor {\n /** Who: a viewer, an agent (a protocol client), a host, or Mostra itself. */\n readonly kind: \"viewer\" | \"agent\" | \"host\" | \"mostra\";\n /** A viewer's ID, or the protocol client's name for agents and hosts. */\n readonly id?: string;\n /** A display name, when one is known. */\n readonly name?: string;\n}\n\n/** The Zod schema of the `Actor` type. */\nexport const Actor: z.ZodType<Actor> = z\n .object({\n kind: z.enum([\"viewer\", \"agent\", \"host\", \"mostra\"]),\n id: z.string().exactOptional(),\n name: z.string().exactOptional(),\n })\n .register(wireRegistry, {\n id: \"Actor\",\n description: \"Who caused an event or wrote a field: a viewer, an agent, a host or Mostra.\",\n });\n\n// ── Fields and mutations ──────────────────────────────────────────────────────────────────\n\n/** The longest field ID, in UTF-16 code units. */\nexport const FIELD_ID_MAX_LENGTH = 256;\n\n/**\n * Whether `id` is a field ID (D52): 1 to 256 characters without control characters; dots separate\n * the parts that nest in results, so none is empty.\n */\nexport function isFieldId(id: unknown): id is string {\n return (\n typeof id === \"string\" &&\n id.length >= 1 &&\n id.length <= FIELD_ID_MAX_LENGTH &&\n // biome-ignore lint/suspicious/noControlCharactersInRegex: control characters are what it refuses.\n !/[\\u0000-\\u001f\\u007f]/.test(id) &&\n !id.split(\".\").includes(\"\")\n );\n}\n\n/** Which document a field belongs to: the viewer's draft, or the artifact's shared state (D63). */\nexport type FieldScope = \"viewer\" | \"artifact\";\n\n/**\n * A document revision: the decimal string of a document's monotonic counter (DATA_MODEL §3).\n * `\"0\"` is a document nothing has written yet.\n */\nexport type DocumentRevision = string;\n\n/** The Zod schema of the `DocumentRevision` type. */\nexport const DocumentRevision: z.ZodType<DocumentRevision> = z\n .string()\n .regex(/^(0|[1-9][0-9]{0,15})$/)\n .register(wireRegistry, {\n id: \"DocumentRevision\",\n description: \"A draft's or artifact state's revision: a non-negative decimal integer string.\",\n });\n\n/**\n * One change to one field. Exactly one of `value` and `delete` is given. The optional metadata\n * travels with the field into results and decides what events redact (D52, D106).\n */\nexport interface FieldOp {\n /** The field ID (D52). */\n readonly id: string;\n /** The new value: any JSON value, `null` included. */\n readonly value?: unknown;\n /** Removes the field. */\n readonly delete?: true;\n /** The label people see in results and the shell's blocker list. */\n readonly label?: string;\n /** Whether the shell asks for it before submit. */\n readonly required?: boolean;\n /** Kept in submissions and results, redacted from events and logs (D52). */\n readonly sensitive?: boolean;\n}\n\n/** The Zod schema of the `FieldOp` type. */\nexport const FieldOp: z.ZodType<FieldOp> = z\n .object({\n id: z.string().min(1).max(FIELD_ID_MAX_LENGTH),\n value: z.unknown().exactOptional(),\n delete: z.literal(true).exactOptional(),\n label: z.string().max(1024).exactOptional(),\n required: z.boolean().exactOptional(),\n sensitive: z.boolean().exactOptional(),\n })\n .register(wireRegistry, {\n id: \"FieldOp\",\n description:\n \"One change to one field: a value or a delete, with optional label, required and sensitive.\",\n }) as z.ZodType<FieldOp>;\n\n/** A field's current state. */\nexport interface FieldState {\n /** The field's value: any JSON value. */\n readonly value: unknown;\n /** The document revision that last wrote it. */\n readonly revision: DocumentRevision;\n /** Who wrote it last. */\n readonly updatedBy?: Actor;\n /** When it was written last. */\n readonly updatedAt: string;\n /** The label people see. */\n readonly label?: string;\n /** Whether the shell asks for it before submit. */\n readonly required?: boolean;\n /** Whether events and logs redact its value (D52). */\n readonly sensitive?: boolean;\n}\n\n/** The Zod schema of the `FieldState` type. */\nexport const FieldState: z.ZodType<FieldState> = z\n .object({\n value: z.unknown(),\n revision: DocumentRevision,\n updatedBy: Actor.exactOptional(),\n updatedAt: z.iso.datetime(),\n label: z.string().exactOptional(),\n required: z.boolean().exactOptional(),\n sensitive: z.boolean().exactOptional(),\n })\n .register(wireRegistry, {\n id: \"FieldState\",\n description: \"A field's current value, the revision that wrote it, who wrote it and when.\",\n }) as z.ZodType<FieldState>;\n\n/**\n * A field op that wasn't applied because the field changed after the mutation's base revision\n * (D22, FAILURE_MODEL §5): what the field holds now, so the writer can keep theirs or take it.\n */\nexport interface FieldConflict {\n /** The field's ID. */\n readonly id: string;\n /** The revision that last changed the field. */\n readonly revision: DocumentRevision;\n /** Its current value; absent when it was deleted. */\n readonly value?: unknown;\n /** `true` when the field was deleted. */\n readonly deleted?: true;\n /** Who changed it. */\n readonly updatedBy?: Actor;\n /** When it changed. */\n readonly updatedAt?: string;\n}\n\n/** The Zod schema of the `FieldConflict` type. */\nexport const FieldConflict: z.ZodType<FieldConflict> = z\n .object({\n id: z.string(),\n revision: DocumentRevision,\n value: z.unknown().exactOptional(),\n deleted: z.literal(true).exactOptional(),\n updatedBy: Actor.exactOptional(),\n updatedAt: z.iso.datetime().exactOptional(),\n })\n .register(wireRegistry, {\n id: \"FieldConflict\",\n description: \"A field op not applied because the field changed after the base revision.\",\n }) as z.ZodType<FieldConflict>;\n\n/** What a mutation did: the document's revision after it, the ops applied, and the conflicts. */\nexport interface MutationResult {\n /** The document's revision after the mutation; unchanged when nothing applied. */\n readonly revision: DocumentRevision;\n /** The field IDs whose ops were applied. */\n readonly applied: readonly string[];\n /** The ops not applied, with what each field holds now. */\n readonly conflicts: readonly FieldConflict[];\n}\n\n/** The Zod schema of the `MutationResult` type. */\nexport const MutationResult: z.ZodType<MutationResult> = z\n .object({\n revision: DocumentRevision,\n applied: z.array(z.string()).readonly(),\n conflicts: z.array(FieldConflict).readonly(),\n })\n .register(wireRegistry, {\n id: \"MutationResult\",\n description:\n \"A mutation's outcome: the revision after it, the applied field IDs, the conflicts.\",\n });\n\n// ── Events ────────────────────────────────────────────────────────────────────────────────\n\n/**\n * Where an owner instance's copy of a hosted record came from (INTERFACES §18.2, D165 item 1): the\n * server, the hosted home, its incarnation and the record's cursor there (a submission's is the\n * cursor of its `submission.created`).\n */\nexport interface EventOrigin {\n /** The server's API origin. */\n readonly server: string;\n /** The hosted home's `hom_` ID. */\n readonly home: string;\n /** The hosted home's incarnation when the record was copied. */\n readonly incarnation: string;\n /** The record's cursor in the hosted home. */\n readonly cursor: Cursor;\n}\n\n/** The Zod schema of the `EventOrigin` type. */\nexport const EventOrigin: z.ZodType<EventOrigin> = z\n .object({\n server: z.string().min(1),\n home: z.string().min(1),\n incarnation: z.string().min(1),\n cursor: Cursor.schema,\n })\n .register(wireRegistry, {\n id: \"EventOrigin\",\n description:\n \"Where an owner's copy of a hosted record came from: server, home, incarnation, cursor.\",\n }) as z.ZodType<EventOrigin>;\n\n/**\n * One durable event (DATA_MODEL §4). Its cursor is its stable ID and its place in the home-wide\n * order; `seq` orders an artifact's own events without gaps.\n */\nexport interface EventRecord {\n /** The event's stable ID and home-wide position. */\n readonly cursor: Cursor;\n /** The artifact, or `null` for a home-wide event. */\n readonly artifactId: string | null;\n /** The artifact's sequence number, or `null` for a home-wide event. */\n readonly seq: number | null;\n /** The type from DATA_MODEL §4's catalog. */\n readonly type: string;\n /** When it was appended. */\n readonly at: string;\n /** Who caused it. */\n readonly actor: Actor;\n /** What caused it: a run, a mutation, a submission. */\n readonly causation?: Readonly<Record<string, string>>;\n /** The event's data; sensitive field values are redacted (D52). */\n readonly payload: Readonly<Record<string, unknown>>;\n /** For an event an owner instance copied from its hosted home: where it came from. */\n readonly origin?: EventOrigin;\n}\n\n/** The Zod schema of the `EventRecord` type. */\nexport const EventRecord: z.ZodType<EventRecord> = z\n .object({\n cursor: Cursor.schema,\n artifactId: ArtifactId.schema.nullable(),\n seq: z.int().min(1).nullable(),\n type: z.string(),\n at: z.iso.datetime(),\n actor: Actor,\n causation: z.record(z.string(), z.string()).exactOptional(),\n payload: z.record(z.string(), z.unknown()),\n origin: EventOrigin.exactOptional(),\n })\n .register(wireRegistry, {\n id: \"EventRecord\",\n description:\n \"One durable event: cursor, artifact, per-artifact sequence, type, time, actor, payload.\",\n }) as z.ZodType<EventRecord>;\n\n/**\n * An event type, or a family of them: `submission.created`, or `submission.*` for every type that\n * starts with `submission.`.\n */\nexport type EventTypePattern = string;\n\n/** The Zod schema of the `EventTypePattern` type. */\nexport const EventTypePattern: z.ZodType<EventTypePattern> = z\n .string()\n .regex(/^[a-z][a-zA-Z0-9_-]*(\\.[a-zA-Z0-9_-]+)*(\\.\\*)?$/)\n .register(wireRegistry, {\n id: \"EventTypePattern\",\n description: \"An event type (submission.created) or a family of them (submission.*).\",\n });\n\n/**\n * Which events a reader wants (IN-08, H-09). Both parts are optional, and an event must pass both.\n * `artifact.compacted` always passes for a matching artifact, so a filtered reader still learns of\n * a compaction (DATA_MODEL §4).\n */\nexport interface EventFilter {\n /** Only these artifacts' events; absent: every artifact's, and home-wide ones. */\n readonly artifacts?: readonly string[];\n /** Only these types; absent: every type. */\n readonly types?: readonly EventTypePattern[];\n}\n\n/** The Zod schema of the `EventFilter` type. */\nexport const EventFilter: z.ZodType<EventFilter> = z\n .object({\n artifacts: z.array(ArtifactId.schema).max(1000).readonly().exactOptional(),\n types: z.array(EventTypePattern).max(100).readonly().exactOptional(),\n })\n .register(wireRegistry, {\n id: \"EventFilter\",\n description:\n \"Which events a reader wants: these artifacts' and these types (patterns allowed).\",\n });\n\n/**\n * What `wait` waits for (ARCHITECTURE §6, D103): `submitted`, `signal:<name>`, `state:<fieldId>`\n * or `event:<type pattern>`.\n */\nexport type WaitCondition = string;\n\n/** A signal's name: letters, digits, `.`, `_` and `-`, starting with a letter or digit (D106). */\nexport const SIGNAL_NAME_PATTERN: RegExp = /^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$/;\n\n/** The Zod schema of the `WaitCondition` type. */\nexport const WaitCondition: z.ZodType<WaitCondition> = z\n .string()\n .regex(\n // biome-ignore lint/suspicious/noControlCharactersInRegex: field IDs exclude control characters.\n /^(submitted|signal:[A-Za-z0-9][A-Za-z0-9._-]{0,63}|state:[^\\u0000-\\u001f\\u007f]{1,256}|event:[a-z][a-zA-Z0-9_-]*(\\.[a-zA-Z0-9_-]+)*(\\.\\*)?)$/,\n )\n .register(wireRegistry, {\n id: \"WaitCondition\",\n description: \"What wait waits for: submitted, signal:<name>, state:<fieldId> or event:<type>.\",\n });\n\n// ── Submissions, deliveries and results ──────────────────────────────────────────────────\n\n/** A delivery's state (FAILURE_MODEL §4). */\nexport type DeliveryState = \"pending\" | \"delivered\" | \"rejected\" | \"undeliverable\";\n\n/** One submission's delivery to one host (D105). */\nexport interface DeliveryStatus {\n /** The delivery's stable ID (`dlv_`), repeated by every redelivery. */\n readonly deliveryId: string;\n /**\n * The host: its client name. Empty for Mostra's built-in adapter, which takes submissions when no\n * host does; client names are never empty, so no host can be mistaken for it (D105).\n */\n readonly owner: string;\n /** Where the delivery stands. */\n readonly state: DeliveryState;\n /** How many times Mostra called the host for it. */\n readonly attempts: number;\n /** The host's reason, for a rejection. */\n readonly reason?: string;\n /**\n * `true` while a pending delivery waits: its host isn't connected, or an attempt failed and it\n * will be retried (D47's \"Pending delivery\"). Absent while the first attempt is under way.\n */\n readonly waiting?: true;\n /** When its state last changed. */\n readonly updatedAt: string;\n}\n\n/** The Zod schema of the `DeliveryStatus` type. */\nexport const DeliveryStatus: z.ZodType<DeliveryStatus> = z\n .object({\n deliveryId: DeliveryId.schema,\n owner: z.string(),\n state: z.enum([\"pending\", \"delivered\", \"rejected\", \"undeliverable\"]),\n attempts: z.int().min(0),\n reason: z.string().exactOptional(),\n waiting: z.literal(true).exactOptional(),\n updatedAt: z.iso.datetime(),\n })\n .register(wireRegistry, {\n id: \"DeliveryStatus\",\n description: \"One submission's delivery to one host: owner, state, attempts and reason.\",\n });\n\n/** A submission as a submit answers it (INTERFACES §4). */\nexport interface SubmissionSummary {\n /** The submission's ID. */\n readonly id: string;\n /** When it was made. */\n readonly at: string;\n /** The draft epoch it closed (D103); 1 outside `epochs`. */\n readonly epoch: number;\n /** Where the submit came from (D40). */\n readonly channel: SubmitChannel;\n /** The version the view showed. */\n readonly versionId: string;\n /** That version's number. */\n readonly version: number;\n /** The view it was made from. */\n readonly viewId: string;\n /** Whether a newer version existed when the viewer submitted (H-10). */\n readonly staleView: boolean;\n /** The draft revision it was made from. */\n readonly draftRevision: DocumentRevision;\n /** SHA-256 of the snapshot's canonical JSON (RFC 8785), lowercase hex. */\n readonly digest: string;\n /** Every delivery's state, summed up: the worst of them. */\n readonly delivery: DeliveryState;\n /** Each host's delivery, so a viewer sees which host has it (IN-13). */\n readonly deliveries?: readonly DeliveryStatus[];\n /** `true` when this submit repeated an earlier one and got it back (D22). */\n readonly duplicate?: true;\n}\n\n/** The Zod schema of the `SubmissionSummary` type. */\nexport const SubmissionSummary: z.ZodType<SubmissionSummary> = z\n .object({\n id: SubmissionId.schema,\n at: z.iso.datetime(),\n epoch: z.int().min(1),\n channel: z.enum([\"shell\", \"artifact\"]),\n versionId: VersionId.schema,\n version: z.int().min(1),\n viewId: ViewId.schema,\n staleView: z.boolean(),\n draftRevision: DocumentRevision,\n digest: z.string().regex(/^[0-9a-f]{64}$/),\n delivery: z.enum([\"pending\", \"delivered\", \"rejected\", \"undeliverable\"]),\n deliveries: z.array(DeliveryStatus).readonly().exactOptional(),\n duplicate: z.literal(true).exactOptional(),\n })\n .register(wireRegistry, {\n id: \"SubmissionSummary\",\n description:\n \"A submission as a submit answers it: ID, time, epoch, version, view, digest, delivery.\",\n });\n\n/** A rectangle in CSS pixels, relative to its frame. */\nexport interface Rect {\n /** Distance from the frame's left edge. */\n readonly x: number;\n /** Distance from the frame's top edge. */\n readonly y: number;\n /** Width. */\n readonly width: number;\n /** Height. */\n readonly height: number;\n}\n\n/** A viewport: its size in CSS pixels and its device pixel ratio. */\nexport interface Viewport {\n /** Width in CSS pixels. */\n readonly width: number;\n /** Height in CSS pixels. */\n readonly height: number;\n /** Device pixel ratio. */\n readonly dpr: number;\n}\n\n/** One comment thread in results (INTERFACES §8; built by the review layer, WP-20). */\nexport interface ResultComment {\n /** The thread's ID. */\n readonly threadId: string;\n /** Whether the thread is open or resolved. */\n readonly status: \"open\" | \"resolved\";\n /** The thread's messages, oldest first, each with its author. */\n readonly messages: readonly {\n readonly author: Viewer;\n readonly at: string;\n readonly text: string;\n }[];\n /** Every layer of the anchor that applies (D23). */\n readonly anchor: {\n readonly reviewId?: string;\n /** W3C Web Annotation selectors. */\n readonly selectors?: readonly unknown[];\n readonly rect?: Rect;\n readonly viewport?: Viewport;\n readonly page?: string;\n readonly candidateId?: string;\n readonly terminal?: {\n readonly rows: readonly [number, number];\n readonly cols: readonly [number, number];\n readonly t?: number;\n };\n readonly time?: number;\n readonly slide?: { readonly index: number; readonly step: number };\n };\n /** The screenshot crop, always stored (D23). */\n readonly crop: { readonly path: string; readonly width: number; readonly height: number };\n}\n\n/**\n * The complete submission (INTERFACES §8): what `results/get`, `mostra results` and the\n * submissions port carry. Everything in it comes from the immutable submission and the version it\n * names, never from the live draft (IN-06).\n */\nexport interface Results {\n /** The artifact, with the metadata of the version the viewer saw. */\n readonly artifact: {\n readonly id: string;\n readonly title: string;\n readonly description?: string;\n readonly family?: string;\n readonly links: readonly ArtifactLink[];\n };\n /** The submission's facts: when, how, by whom, from which version and view, and its delivery. */\n readonly submission: {\n readonly id: string;\n readonly at: string;\n readonly epoch: number;\n /** The same viewer's previous submission, under `epochs` (D103). */\n readonly previous?: string;\n readonly policy: SubmissionPolicy;\n readonly channel: SubmitChannel;\n readonly viewer: Viewer;\n readonly versionId: string;\n readonly version: number;\n readonly viewId: string;\n /** Whether a newer version existed when the viewer submitted (H-10). */\n readonly staleView: boolean;\n /** The newest version's number at the time, when the view was stale. */\n readonly latestVersion?: number;\n readonly draftRevision: DocumentRevision;\n readonly stateRevision?: DocumentRevision;\n readonly digest: string;\n readonly delivery: DeliveryState;\n readonly deliveries: readonly DeliveryStatus[];\n /** For a submission imported from a hosted home: where it came from (D165 item 1). */\n readonly origin?: EventOrigin;\n };\n /** The draft's fields by ID, dotted IDs nested (D52). */\n readonly answers: Readonly<Record<string, unknown>>;\n /** Every field in `answers` and `state`, with its label and scope. */\n readonly fields: readonly {\n readonly id: string;\n readonly label?: string;\n readonly required?: boolean;\n readonly sensitive?: boolean;\n readonly scope: FieldScope;\n }[];\n /** Artifact state at `stateRevision`, dotted IDs nested (D63). */\n readonly state?: Readonly<Record<string, unknown>>;\n /** The review sets' choices: the fields `review.<set>.choice` (D65). */\n readonly choices: readonly {\n readonly reviewSetId: string;\n readonly candidateId: string;\n readonly label?: string;\n }[];\n /** Comment threads with their anchors and crops (WP-20). */\n readonly comments: readonly ResultComment[];\n /** Answers a newer version couldn't map (D42). */\n readonly orphaned: readonly {\n readonly id: string;\n readonly label?: string;\n readonly value: unknown;\n readonly fromVersion: number;\n }[];\n /** Action runs started in this view (WP-08). */\n readonly actions: readonly {\n readonly runId: string;\n readonly action: string;\n readonly status: string;\n readonly at: string;\n }[];\n /** Signals raised in this view before the submission: the newest 100, within 1 MiB of payloads. */\n readonly signals: readonly {\n readonly name: string;\n readonly at: string;\n readonly payload?: unknown;\n }[];\n /** How many older signals of the view the limit left out; absent when none. */\n readonly signalsOmitted?: number;\n /** Set when compaction removed events of this view before it submitted, so signals may be missing. */\n readonly signalsCompacted?: true;\n}\n\nconst RectSchema = z.object({\n x: z.number(),\n y: z.number(),\n width: z.number(),\n height: z.number(),\n});\n\n/** The Zod schema of the `ResultComment` type. */\nexport const ResultComment: z.ZodType<ResultComment> = z\n .object({\n threadId: z.string(),\n status: z.enum([\"open\", \"resolved\"]),\n messages: z\n .array(z.object({ author: Viewer, at: z.iso.datetime(), text: z.string() }))\n .readonly(),\n anchor: z.object({\n reviewId: z.string().exactOptional(),\n selectors: z.array(z.unknown()).readonly().exactOptional(),\n rect: RectSchema.exactOptional(),\n viewport: z\n .object({ width: z.number(), height: z.number(), dpr: z.number() })\n .exactOptional(),\n page: z.string().exactOptional(),\n candidateId: z.string().exactOptional(),\n terminal: z\n .object({\n rows: z.tuple([z.int(), z.int()]).readonly(),\n cols: z.tuple([z.int(), z.int()]).readonly(),\n t: z.number().exactOptional(),\n })\n .exactOptional(),\n time: z.number().exactOptional(),\n slide: z.object({ index: z.int(), step: z.int() }).exactOptional(),\n }),\n crop: z.object({ path: z.string(), width: z.int(), height: z.int() }),\n })\n .register(wireRegistry, {\n id: \"ResultComment\",\n description: \"One comment thread in results: messages, anchor layers and the screenshot crop.\",\n }) as z.ZodType<ResultComment>;\n\n/** The Zod schema of the `Results` type. */\nexport const Results: z.ZodType<Results> = z\n .object({\n artifact: z.object({\n id: ArtifactId.schema,\n title: z.string(),\n description: z.string().exactOptional(),\n family: z.string().exactOptional(),\n links: z.array(ArtifactLink).readonly(),\n }),\n submission: z.object({\n id: SubmissionId.schema,\n at: z.iso.datetime(),\n epoch: z.int().min(1),\n previous: SubmissionId.schema.exactOptional(),\n policy: SubmissionPolicy,\n channel: z.enum([\"shell\", \"artifact\"]),\n viewer: Viewer,\n versionId: VersionId.schema,\n version: z.int().min(1),\n viewId: ViewId.schema,\n staleView: z.boolean(),\n latestVersion: z.int().min(1).exactOptional(),\n draftRevision: DocumentRevision,\n stateRevision: DocumentRevision.exactOptional(),\n digest: z.string().regex(/^[0-9a-f]{64}$/),\n delivery: z.enum([\"pending\", \"delivered\", \"rejected\", \"undeliverable\"]),\n deliveries: z.array(DeliveryStatus).readonly(),\n origin: EventOrigin.exactOptional(),\n }),\n answers: z.record(z.string(), z.unknown()),\n fields: z\n .array(\n z.object({\n id: z.string(),\n label: z.string().exactOptional(),\n required: z.boolean().exactOptional(),\n sensitive: z.boolean().exactOptional(),\n scope: z.enum([\"viewer\", \"artifact\"]),\n }),\n )\n .readonly(),\n state: z.record(z.string(), z.unknown()).exactOptional(),\n choices: z\n .array(\n z.object({\n reviewSetId: z.string(),\n candidateId: z.string(),\n label: z.string().exactOptional(),\n }),\n )\n .readonly(),\n comments: z.array(ResultComment).readonly(),\n orphaned: z\n .array(\n z.object({\n id: z.string(),\n label: z.string().exactOptional(),\n value: z.unknown(),\n fromVersion: z.int().min(1),\n }),\n )\n .readonly(),\n actions: z\n .array(\n z.object({\n runId: z.string(),\n action: z.string(),\n status: z.string(),\n at: z.iso.datetime(),\n }),\n )\n .readonly(),\n signals: z\n .array(\n z.object({ name: z.string(), at: z.iso.datetime(), payload: z.unknown().exactOptional() }),\n )\n .readonly(),\n signalsOmitted: z.int().min(1).exactOptional(),\n signalsCompacted: z.literal(true).exactOptional(),\n })\n .register(wireRegistry, {\n id: \"Results\",\n description:\n \"The complete submission: artifact, submission facts, answers, fields, state, choices, comments, orphans, actions, signals.\",\n }) as z.ZodType<Results>;\n"],"mappings":";;;;;;;;;;;;;;AAoDA,MAAa,SAA4B,EACtC,OAAO;CACN,IAAI,SAAS;CACb,MAAM,EAAE,KAAK;EAAC;EAAS;EAAW;EAAS;EAAQ;EAAW;CAAW,CAAC;CAC1E,MAAM,EAAE,OAAO,CAAC,CAAC,cAAc;CAC/B,KAAK,EAAE,OAAO,CAAC,CAAC,cAAc;CAC9B,UAAU,EAAE,QAAQ,CAAC,CAAC,cAAc;AACtC,CAAC,CAAC,CACD,SAAS,cAAc;CACtB,IAAI;CACJ,aAAa;AACf,CAAC;;AAcH,MAAa,aAAoC,EAC9C,OAAO;CACN,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG;CAC9B,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,cAAc;AACjD,CAAC,CAAC,CACD,SAAS,cAAc;CACtB,IAAI;CACJ,aAAa;AACf,CAAC;;AAaH,MAAa,QAA0B,EACpC,OAAO;CACN,MAAM,EAAE,KAAK;EAAC;EAAU;EAAS;EAAQ;CAAQ,CAAC;CAClD,IAAI,EAAE,OAAO,CAAC,CAAC,cAAc;CAC7B,MAAM,EAAE,OAAO,CAAC,CAAC,cAAc;AACjC,CAAC,CAAC,CACD,SAAS,cAAc;CACtB,IAAI;CACJ,aAAa;AACf,CAAC;;AAKH,MAAa,sBAAsB;;;;;AAMnC,SAAgB,UAAU,IAA2B;CACnD,OACE,OAAO,OAAO,YACd,GAAG,UAAU,KACb,GAAG,UAAA,OAEH,CAAC,wBAAwB,KAAK,EAAE,KAChC,CAAC,GAAG,MAAM,GAAG,CAAC,CAAC,SAAS,EAAE;AAE9B;;AAYA,M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AC,UAAU,UAAU,CAAC;CACtC,CAAC,CACH,CAAC,CACA,SAAS;CACZ,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,cAAc;CACvD,SAAS,EACN,MACC,EAAE,OAAO;EACP,aAAa,EAAE,OAAO;EACtB,aAAa,EAAE,OAAO;EACtB,OAAO,EAAE,OAAO,CAAC,CAAC,cAAc;CAClC,CAAC,CACH,CAAC,CACA,SAAS;CACZ,UAAU,EAAE,MAAM,aAAa,CAAC,CAAC,SAAS;CAC1C,UAAU,EACP,MACC,EAAE,OAAO;EACP,IAAI,EAAE,OAAO;EACb,OAAO,EAAE,OAAO,CAAC,CAAC,cAAc;EAChC,OAAO,EAAE,QAAQ;EACjB,aAAa,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC;CAC5B,CAAC,CACH,CAAC,CACA,SAAS;CACZ,SAAS,EACN,MACC,EAAE,OAAO;EACP,OAAO,EAAE,OAAO;EAChB,QAAQ,EAAE,OAAO;EACjB,QAAQ,EAAE,OAAO;EACjB,IAAI,EAAE,IAAI,SAAS;CACrB,CAAC,CACH,CAAC,CACA,SAAS;CACZ,SAAS,EACN,MACC,EAAE,OAAO;EAAE,MAAM,EAAE,OAAO;EAAG,IAAI,EAAE,IAAI,SAAS;EAAG,SAAS,EAAE,QAAQ,CAAC,CAAC,cAAc;CAAE,CAAC,CAC3F,CAAC,CACA,SAAS;CACZ,gBAAgB,EAAE,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc;CAC7C,kBAAkB,EAAE,QAAQ,IAAI,CAAC,CAAC,cAAc;AAClD,CAAC,CAAC,CACD,SAAS,cAAc;CACtB,IAAI;CACJ,aACE;AACJ,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ArtifactRef } from "../../artifact.js";
|
|
2
|
+
import { MethodDefinition } from "../../method.js";
|
|
3
|
+
//#region src/methods/artifact/pause.d.ts
|
|
4
|
+
/** Who paused an artifact (D165 item 14). */
|
|
5
|
+
export type PausedBy = "owner" | "operator";
|
|
6
|
+
/** The params of `artifact/pause` (INTERFACES §18.2, D165 item 14). */
|
|
7
|
+
export interface ArtifactPauseParams {
|
|
8
|
+
/** The artifact to pause or resume. */
|
|
9
|
+
readonly artifact: ArtifactRef;
|
|
10
|
+
/** `true` pauses it, `false` resumes it. */
|
|
11
|
+
readonly paused: boolean;
|
|
12
|
+
/** Why, shown to viewers as text while it is paused. */
|
|
13
|
+
readonly reason?: string;
|
|
14
|
+
/** Makes retries idempotent: a repeated `requestId` returns the recorded result (H-03). */
|
|
15
|
+
readonly requestId?: string;
|
|
16
|
+
}
|
|
17
|
+
/** The result of `artifact/pause`: whether the artifact is paused now, and by whom. */
|
|
18
|
+
export interface ArtifactPauseResult {
|
|
19
|
+
/** Whether it is paused after the call. */
|
|
20
|
+
readonly paused: boolean;
|
|
21
|
+
/** Who paused it, while it is paused. */
|
|
22
|
+
readonly by?: PausedBy;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* `artifact/pause`: pauses or resumes an artifact. While paused it stays viewable and its shell
|
|
26
|
+
* says so; submissions answer 423 `MOSTRA_SUBMIT_PAUSED` and actions 423 `MOSTRA_ACTION_PAUSED`,
|
|
27
|
+
* each keeping the draft; links stay valid. On an owner instance it acts on the local artifact and,
|
|
28
|
+
* for a hosted one, on every server it is hosted on. An operator's pause can't be resumed by the
|
|
29
|
+
* owner (`MOSTRA_REMOTE_PAUSED_BY_OPERATOR`).
|
|
30
|
+
*/
|
|
31
|
+
export declare const artifactPauseMethod: MethodDefinition<ArtifactPauseParams, ArtifactPauseResult>;
|
|
32
|
+
//#endregion
|
|
33
|
+
//# sourceMappingURL=pause.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pause.d.ts","names":[],"sources":["../../../src/methods/artifact/pause.ts"],"mappings":";;;;YAMY;;iBAGK;;WAEN,UAAU;;WAEV;;WAEA;;WAEA;;;iBAIM;;WAEN;;WAEA,KAAK;;;;;;;;;qBA0BH,qBAAqB,iBAAiB,qBAAqB"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { wireRegistry } from "../../wire-registry.js";
|
|
2
|
+
import { ArtifactRef } from "../../artifact.js";
|
|
3
|
+
import { defineMethod } from "../../method.js";
|
|
4
|
+
import * as z from "zod";
|
|
5
|
+
//#region src/methods/artifact/pause.ts
|
|
6
|
+
const params = z.object({
|
|
7
|
+
artifact: ArtifactRef,
|
|
8
|
+
paused: z.boolean(),
|
|
9
|
+
reason: z.string().max(500).exactOptional(),
|
|
10
|
+
requestId: z.string().min(1).exactOptional()
|
|
11
|
+
}).register(wireRegistry, { id: "ArtifactPauseParams" });
|
|
12
|
+
const result = z.object({
|
|
13
|
+
paused: z.boolean(),
|
|
14
|
+
by: z.enum(["owner", "operator"]).exactOptional()
|
|
15
|
+
}).register(wireRegistry, { id: "ArtifactPauseResult" });
|
|
16
|
+
/**
|
|
17
|
+
* `artifact/pause`: pauses or resumes an artifact. While paused it stays viewable and its shell
|
|
18
|
+
* says so; submissions answer 423 `MOSTRA_SUBMIT_PAUSED` and actions 423 `MOSTRA_ACTION_PAUSED`,
|
|
19
|
+
* each keeping the draft; links stay valid. On an owner instance it acts on the local artifact and,
|
|
20
|
+
* for a hosted one, on every server it is hosted on. An operator's pause can't be resumed by the
|
|
21
|
+
* owner (`MOSTRA_REMOTE_PAUSED_BY_OPERATOR`).
|
|
22
|
+
*/
|
|
23
|
+
const artifactPauseMethod = defineMethod({
|
|
24
|
+
method: "artifact/pause",
|
|
25
|
+
direction: "client-to-instance",
|
|
26
|
+
mutating: true,
|
|
27
|
+
params,
|
|
28
|
+
result
|
|
29
|
+
});
|
|
30
|
+
//#endregion
|
|
31
|
+
export { artifactPauseMethod };
|
|
32
|
+
|
|
33
|
+
//# sourceMappingURL=pause.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pause.js","names":[],"sources":["../../../src/methods/artifact/pause.ts"],"sourcesContent":["import * as z from \"zod\";\nimport { ArtifactRef } from \"../../artifact.ts\";\nimport { defineMethod, type MethodDefinition } from \"../../method.ts\";\nimport { wireRegistry } from \"../../wire-registry.ts\";\n\n/** Who paused an artifact (D165 item 14). */\nexport type PausedBy = \"owner\" | \"operator\";\n\n/** The params of `artifact/pause` (INTERFACES §18.2, D165 item 14). */\nexport interface ArtifactPauseParams {\n /** The artifact to pause or resume. */\n readonly artifact: ArtifactRef;\n /** `true` pauses it, `false` resumes it. */\n readonly paused: boolean;\n /** Why, shown to viewers as text while it is paused. */\n readonly reason?: string;\n /** Makes retries idempotent: a repeated `requestId` returns the recorded result (H-03). */\n readonly requestId?: string;\n}\n\n/** The result of `artifact/pause`: whether the artifact is paused now, and by whom. */\nexport interface ArtifactPauseResult {\n /** Whether it is paused after the call. */\n readonly paused: boolean;\n /** Who paused it, while it is paused. */\n readonly by?: PausedBy;\n}\n\nconst params: z.ZodType<ArtifactPauseParams> = z\n .object({\n artifact: ArtifactRef,\n paused: z.boolean(),\n reason: z.string().max(500).exactOptional(),\n requestId: z.string().min(1).exactOptional(),\n })\n .register(wireRegistry, { id: \"ArtifactPauseParams\" });\n\nconst result: z.ZodType<ArtifactPauseResult> = z\n .object({\n paused: z.boolean(),\n by: z.enum([\"owner\", \"operator\"]).exactOptional(),\n })\n .register(wireRegistry, { id: \"ArtifactPauseResult\" });\n\n/**\n * `artifact/pause`: pauses or resumes an artifact. While paused it stays viewable and its shell\n * says so; submissions answer 423 `MOSTRA_SUBMIT_PAUSED` and actions 423 `MOSTRA_ACTION_PAUSED`,\n * each keeping the draft; links stay valid. On an owner instance it acts on the local artifact and,\n * for a hosted one, on every server it is hosted on. An operator's pause can't be resumed by the\n * owner (`MOSTRA_REMOTE_PAUSED_BY_OPERATOR`).\n */\nexport const artifactPauseMethod: MethodDefinition<ArtifactPauseParams, ArtifactPauseResult> =\n defineMethod({\n method: \"artifact/pause\",\n direction: \"client-to-instance\",\n mutating: true,\n params,\n result,\n });\n"],"mappings":";;;;;AA4BA,MAAM,SAAyC,EAC5C,OAAO;CACN,UAAU;CACV,QAAQ,EAAE,QAAQ;CAClB,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,GAAG,CAAC,CAAC,cAAc;CAC1C,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,cAAc;AAC7C,CAAC,CAAC,CACD,SAAS,cAAc,EAAE,IAAI,sBAAsB,CAAC;AAEvD,MAAM,SAAyC,EAC5C,OAAO;CACN,QAAQ,EAAE,QAAQ;CAClB,IAAI,EAAE,KAAK,CAAC,SAAS,UAAU,CAAC,CAAC,CAAC,cAAc;AAClD,CAAC,CAAC,CACD,SAAS,cAAc,EAAE,IAAI,sBAAsB,CAAC;;;;;;;;AASvD,MAAa,sBACX,aAAa;CACX,QAAQ;CACR,WAAW;CACX,UAAU;CACV;CACA;AACF,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/methods/index.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/methods/index.ts"],"mappings":";;;qBAsEa,sBAAsB;;qBAkEtB,4BAA4B"}
|
package/dist/methods/index.js
CHANGED
|
@@ -3,6 +3,7 @@ import { artifactExportMethod } from "./artifact/export.js";
|
|
|
3
3
|
import { artifactGetMethod } from "./artifact/get.js";
|
|
4
4
|
import { artifactImportMethod } from "./artifact/import.js";
|
|
5
5
|
import { artifactListMethod } from "./artifact/list.js";
|
|
6
|
+
import { artifactPauseMethod } from "./artifact/pause.js";
|
|
6
7
|
import { artifactPublishMethod } from "./artifact/publish.js";
|
|
7
8
|
import { ARTIFACT_PROGRESS, ArtifactProgressParams } from "../verify.js";
|
|
8
9
|
import { artifactVerifyMethod } from "./artifact/verify.js";
|
|
@@ -26,6 +27,7 @@ import { mostraShutdownMethod } from "./mostra/shutdown.js";
|
|
|
26
27
|
import { portAddressingExternalBaseMethod } from "./port/addressing-external-base.js";
|
|
27
28
|
import { portDraftsMirrorMethod } from "./port/drafts-mirror.js";
|
|
28
29
|
import { portIdentityResolveMethod } from "./port/identity-resolve.js";
|
|
30
|
+
import { portRelayAuthorMethod } from "./port/relay-author.js";
|
|
29
31
|
import { portRelayRunMethod } from "./port/relay-run.js";
|
|
30
32
|
import { portRelayCallMethod } from "./port/relay-call.js";
|
|
31
33
|
import { portRelayCancelMethod } from "./port/relay-cancel.js";
|
|
@@ -38,6 +40,7 @@ import { relayCallBatchMethod } from "./relay/call-batch.js";
|
|
|
38
40
|
import { relayEffectMethod } from "./relay/effect.js";
|
|
39
41
|
import { relayLiveValueMethod } from "./relay/live-value.js";
|
|
40
42
|
import { relayRunUpdateMethod } from "./relay/run-update.js";
|
|
43
|
+
import { remoteLinkMethod } from "./remote/link.js";
|
|
41
44
|
import { remoteLoginMethod } from "./remote/login.js";
|
|
42
45
|
import { remoteLoginWaitMethod } from "./remote/login-wait.js";
|
|
43
46
|
import { remoteLogoutMethod } from "./remote/logout.js";
|
|
@@ -117,7 +120,10 @@ const hostMethods = [
|
|
|
117
120
|
relayEffectMethod,
|
|
118
121
|
portRelayLiveMethod,
|
|
119
122
|
relayLiveValueMethod,
|
|
120
|
-
hostedSubmissionMethod
|
|
123
|
+
hostedSubmissionMethod,
|
|
124
|
+
artifactPauseMethod,
|
|
125
|
+
portRelayAuthorMethod,
|
|
126
|
+
remoteLinkMethod
|
|
121
127
|
];
|
|
122
128
|
/** Every notification the instance sends to its clients (INTERFACES §6). */
|
|
123
129
|
const hostNotifications = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/methods/index.ts"],"sourcesContent":["/**\n * Every host protocol method this package defines. `pnpm gen protocol-method` adds entries at the\n * markers; the method itself lives in its own module under `methods/<group>/`.\n */\nimport type { AnyMethod, AnyNotification } from \"../method.ts\";\nimport { ARTIFACT_PROGRESS, ArtifactProgressParams } from \"../verify.ts\";\nimport { artifactCreateMethod } from \"./artifact/create.ts\";\nimport { artifactExportMethod } from \"./artifact/export.ts\";\nimport { artifactGetMethod } from \"./artifact/get.ts\";\nimport { artifactImportMethod } from \"./artifact/import.ts\";\nimport { artifactListMethod } from \"./artifact/list.ts\";\nimport { artifactPublishMethod } from \"./artifact/publish.ts\";\nimport { artifactVerifyMethod } from \"./artifact/verify.ts\";\nimport { depsAddMethod } from \"./deps/add.ts\";\nimport { DEV_NOTIFY, DevNotifyParams, devStartMethod } from \"./dev/start.ts\";\nimport { devStopMethod } from \"./dev/stop.ts\";\nimport { eventsAckMethod } from \"./events/ack.ts\";\nimport { eventsReadMethod } from \"./events/read.ts\";\nimport { EVENTS_NOTIFY, EventsNotifyParams, eventsSubscribeMethod } from \"./events/subscribe.ts\";\nimport { eventsUnsubscribeMethod } from \"./events/unsubscribe.ts\";\nimport { gcRunMethod } from \"./gc/run.ts\";\nimport { hostedPushMethod } from \"./hosted/push.ts\";\nimport { hostedSubmissionMethod } from \"./hosted/submission.ts\";\nimport { instanceCheckMethod } from \"./instance/check.ts\";\nimport { instanceStatusMethod } from \"./instance/status.ts\";\nimport { livePushMethod } from \"./live/push.ts\";\nimport { mostraInitializeMethod } from \"./mostra/initialize.ts\";\nimport { mostraShutdownMethod } from \"./mostra/shutdown.ts\";\nimport { portAddressingExternalBaseMethod } from \"./port/addressing-external-base.ts\";\nimport { portDraftsMirrorMethod } from \"./port/drafts-mirror.ts\";\nimport { portIdentityResolveMethod } from \"./port/identity-resolve.ts\";\nimport { portRelayCallMethod } from \"./port/relay-call.ts\";\nimport { portRelayCancelMethod } from \"./port/relay-cancel.ts\";\nimport { portRelayLiveMethod } from \"./port/relay-live.ts\";\nimport { portRelayReconcileMethod } from \"./port/relay-reconcile.ts\";\nimport { portRelayRunMethod } from \"./port/relay-run.ts\";\nimport { portSecretsGetMethod } from \"./port/secrets-get.ts\";\nimport { portSubmissionsDeliverMethod } from \"./port/submissions-deliver.ts\";\nimport { portTrustedControlsActivatedMethod } from \"./port/trusted-controls-activated.ts\";\nimport { portTrustedControlsPolicyMethod } from \"./port/trusted-controls-policy.ts\";\nimport { relayCallBatchMethod } from \"./relay/call-batch.ts\";\nimport { relayEffectMethod } from \"./relay/effect.ts\";\nimport { relayLiveValueMethod } from \"./relay/live-value.ts\";\nimport { relayRunUpdateMethod } from \"./relay/run-update.ts\";\nimport { remoteLoginMethod } from \"./remote/login.ts\";\nimport { remoteLoginWaitMethod } from \"./remote/login-wait.ts\";\nimport { remoteLogoutMethod } from \"./remote/logout.ts\";\nimport { remoteStatusMethod } from \"./remote/status.ts\";\nimport { remoteTokenMethod } from \"./remote/token.ts\";\nimport { resultsGetMethod } from \"./results/get.ts\";\nimport { secretDeleteMethod } from \"./secret/delete.ts\";\nimport { secretListMethod } from \"./secret/list.ts\";\nimport { secretSetMethod } from \"./secret/set.ts\";\nimport { shareListMethod } from \"./share/list.ts\";\nimport { shareStartMethod } from \"./share/start.ts\";\nimport { shareStopMethod } from \"./share/stop.ts\";\nimport { stateGetMethod } from \"./state/get.ts\";\nimport { statePatchMethod } from \"./state/patch.ts\";\nimport { viewDefaultMethod } from \"./view/default.ts\";\nimport { viewLaunchMethod } from \"./view/launch.ts\";\nimport { viewRevokeMethod } from \"./view/revoke.ts\";\nimport { viewRotateMethod } from \"./view/rotate.ts\";\nimport { viewUrlMethod } from \"./view/url.ts\";\nimport { waitMethod } from \"./wait/wait.ts\";\n// gen:method-imports\n\n/** Every host protocol method, in the order they were added. */\nexport const hostMethods: readonly AnyMethod[] = [\n mostraInitializeMethod,\n mostraShutdownMethod,\n instanceStatusMethod,\n artifactCreateMethod,\n artifactPublishMethod,\n artifactListMethod,\n artifactGetMethod,\n depsAddMethod,\n viewUrlMethod,\n viewRevokeMethod,\n viewRotateMethod,\n stateGetMethod,\n resultsGetMethod,\n waitMethod,\n eventsReadMethod,\n eventsSubscribeMethod,\n eventsUnsubscribeMethod,\n statePatchMethod,\n eventsAckMethod,\n portSubmissionsDeliverMethod,\n portDraftsMirrorMethod,\n portTrustedControlsPolicyMethod,\n portTrustedControlsActivatedMethod,\n secretSetMethod,\n secretListMethod,\n secretDeleteMethod,\n livePushMethod,\n portSecretsGetMethod,\n artifactVerifyMethod,\n viewDefaultMethod,\n viewLaunchMethod,\n gcRunMethod,\n instanceCheckMethod,\n devStartMethod,\n devStopMethod,\n portIdentityResolveMethod,\n shareStartMethod,\n shareStopMethod,\n shareListMethod,\n portAddressingExternalBaseMethod,\n artifactExportMethod,\n artifactImportMethod,\n remoteLoginMethod,\n remoteLoginWaitMethod,\n remoteLogoutMethod,\n remoteStatusMethod,\n remoteTokenMethod,\n hostedPushMethod,\n portRelayRunMethod,\n portRelayCancelMethod,\n portRelayReconcileMethod,\n portRelayCallMethod,\n relayRunUpdateMethod,\n relayCallBatchMethod,\n relayEffectMethod,\n portRelayLiveMethod,\n relayLiveValueMethod,\n hostedSubmissionMethod,\n // gen:methods\n];\n\n/** Every notification the instance sends to its clients (INTERFACES §6). */\nexport const hostNotifications: readonly AnyNotification[] = [\n { method: EVENTS_NOTIFY, params: EventsNotifyParams as AnyNotification[\"params\"] },\n { method: ARTIFACT_PROGRESS, params: ArtifactProgressParams as AnyNotification[\"params\"] },\n { method: DEV_NOTIFY, params: DevNotifyParams as AnyNotification[\"params\"] },\n];\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/methods/index.ts"],"sourcesContent":["/**\n * Every host protocol method this package defines. `pnpm gen protocol-method` adds entries at the\n * markers; the method itself lives in its own module under `methods/<group>/`.\n */\nimport type { AnyMethod, AnyNotification } from \"../method.ts\";\nimport { ARTIFACT_PROGRESS, ArtifactProgressParams } from \"../verify.ts\";\nimport { artifactCreateMethod } from \"./artifact/create.ts\";\nimport { artifactExportMethod } from \"./artifact/export.ts\";\nimport { artifactGetMethod } from \"./artifact/get.ts\";\nimport { artifactImportMethod } from \"./artifact/import.ts\";\nimport { artifactListMethod } from \"./artifact/list.ts\";\nimport { artifactPauseMethod } from \"./artifact/pause.ts\";\nimport { artifactPublishMethod } from \"./artifact/publish.ts\";\nimport { artifactVerifyMethod } from \"./artifact/verify.ts\";\nimport { depsAddMethod } from \"./deps/add.ts\";\nimport { DEV_NOTIFY, DevNotifyParams, devStartMethod } from \"./dev/start.ts\";\nimport { devStopMethod } from \"./dev/stop.ts\";\nimport { eventsAckMethod } from \"./events/ack.ts\";\nimport { eventsReadMethod } from \"./events/read.ts\";\nimport { EVENTS_NOTIFY, EventsNotifyParams, eventsSubscribeMethod } from \"./events/subscribe.ts\";\nimport { eventsUnsubscribeMethod } from \"./events/unsubscribe.ts\";\nimport { gcRunMethod } from \"./gc/run.ts\";\nimport { hostedPushMethod } from \"./hosted/push.ts\";\nimport { hostedSubmissionMethod } from \"./hosted/submission.ts\";\nimport { instanceCheckMethod } from \"./instance/check.ts\";\nimport { instanceStatusMethod } from \"./instance/status.ts\";\nimport { livePushMethod } from \"./live/push.ts\";\nimport { mostraInitializeMethod } from \"./mostra/initialize.ts\";\nimport { mostraShutdownMethod } from \"./mostra/shutdown.ts\";\nimport { portAddressingExternalBaseMethod } from \"./port/addressing-external-base.ts\";\nimport { portDraftsMirrorMethod } from \"./port/drafts-mirror.ts\";\nimport { portIdentityResolveMethod } from \"./port/identity-resolve.ts\";\nimport { portRelayAuthorMethod } from \"./port/relay-author.ts\";\nimport { portRelayCallMethod } from \"./port/relay-call.ts\";\nimport { portRelayCancelMethod } from \"./port/relay-cancel.ts\";\nimport { portRelayLiveMethod } from \"./port/relay-live.ts\";\nimport { portRelayReconcileMethod } from \"./port/relay-reconcile.ts\";\nimport { portRelayRunMethod } from \"./port/relay-run.ts\";\nimport { portSecretsGetMethod } from \"./port/secrets-get.ts\";\nimport { portSubmissionsDeliverMethod } from \"./port/submissions-deliver.ts\";\nimport { portTrustedControlsActivatedMethod } from \"./port/trusted-controls-activated.ts\";\nimport { portTrustedControlsPolicyMethod } from \"./port/trusted-controls-policy.ts\";\nimport { relayCallBatchMethod } from \"./relay/call-batch.ts\";\nimport { relayEffectMethod } from \"./relay/effect.ts\";\nimport { relayLiveValueMethod } from \"./relay/live-value.ts\";\nimport { relayRunUpdateMethod } from \"./relay/run-update.ts\";\nimport { remoteLinkMethod } from \"./remote/link.ts\";\nimport { remoteLoginMethod } from \"./remote/login.ts\";\nimport { remoteLoginWaitMethod } from \"./remote/login-wait.ts\";\nimport { remoteLogoutMethod } from \"./remote/logout.ts\";\nimport { remoteStatusMethod } from \"./remote/status.ts\";\nimport { remoteTokenMethod } from \"./remote/token.ts\";\nimport { resultsGetMethod } from \"./results/get.ts\";\nimport { secretDeleteMethod } from \"./secret/delete.ts\";\nimport { secretListMethod } from \"./secret/list.ts\";\nimport { secretSetMethod } from \"./secret/set.ts\";\nimport { shareListMethod } from \"./share/list.ts\";\nimport { shareStartMethod } from \"./share/start.ts\";\nimport { shareStopMethod } from \"./share/stop.ts\";\nimport { stateGetMethod } from \"./state/get.ts\";\nimport { statePatchMethod } from \"./state/patch.ts\";\nimport { viewDefaultMethod } from \"./view/default.ts\";\nimport { viewLaunchMethod } from \"./view/launch.ts\";\nimport { viewRevokeMethod } from \"./view/revoke.ts\";\nimport { viewRotateMethod } from \"./view/rotate.ts\";\nimport { viewUrlMethod } from \"./view/url.ts\";\nimport { waitMethod } from \"./wait/wait.ts\";\n// gen:method-imports\n\n/** Every host protocol method, in the order they were added. */\nexport const hostMethods: readonly AnyMethod[] = [\n mostraInitializeMethod,\n mostraShutdownMethod,\n instanceStatusMethod,\n artifactCreateMethod,\n artifactPublishMethod,\n artifactListMethod,\n artifactGetMethod,\n depsAddMethod,\n viewUrlMethod,\n viewRevokeMethod,\n viewRotateMethod,\n stateGetMethod,\n resultsGetMethod,\n waitMethod,\n eventsReadMethod,\n eventsSubscribeMethod,\n eventsUnsubscribeMethod,\n statePatchMethod,\n eventsAckMethod,\n portSubmissionsDeliverMethod,\n portDraftsMirrorMethod,\n portTrustedControlsPolicyMethod,\n portTrustedControlsActivatedMethod,\n secretSetMethod,\n secretListMethod,\n secretDeleteMethod,\n livePushMethod,\n portSecretsGetMethod,\n artifactVerifyMethod,\n viewDefaultMethod,\n viewLaunchMethod,\n gcRunMethod,\n instanceCheckMethod,\n devStartMethod,\n devStopMethod,\n portIdentityResolveMethod,\n shareStartMethod,\n shareStopMethod,\n shareListMethod,\n portAddressingExternalBaseMethod,\n artifactExportMethod,\n artifactImportMethod,\n remoteLoginMethod,\n remoteLoginWaitMethod,\n remoteLogoutMethod,\n remoteStatusMethod,\n remoteTokenMethod,\n hostedPushMethod,\n portRelayRunMethod,\n portRelayCancelMethod,\n portRelayReconcileMethod,\n portRelayCallMethod,\n relayRunUpdateMethod,\n relayCallBatchMethod,\n relayEffectMethod,\n portRelayLiveMethod,\n relayLiveValueMethod,\n hostedSubmissionMethod,\n artifactPauseMethod,\n portRelayAuthorMethod,\n remoteLinkMethod,\n // gen:methods\n];\n\n/** Every notification the instance sends to its clients (INTERFACES §6). */\nexport const hostNotifications: readonly AnyNotification[] = [\n { method: EVENTS_NOTIFY, params: EventsNotifyParams as AnyNotification[\"params\"] },\n { method: ARTIFACT_PROGRESS, params: ArtifactProgressParams as AnyNotification[\"params\"] },\n { method: DEV_NOTIFY, params: DevNotifyParams as AnyNotification[\"params\"] },\n];\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsEA,MAAa,cAAoC;CAC/C;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;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;AAEF;;AAGA,MAAa,oBAAgD;CAC3D;EAAE,QAAQ;EAAe,QAAQ;CAAgD;CACjF;EAAE,QAAQ;EAAmB,QAAQ;CAAoD;CACzF;EAAE,QAAQ;EAAY,QAAQ;CAA6C;AAC7E"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { MethodDefinition } from "../../method.js";
|
|
2
|
+
//#region src/methods/port/relay-author.d.ts
|
|
3
|
+
/**
|
|
4
|
+
* What remote MCP may ask an owner instance to do for it (INTERFACES §18.8, D165 item 5): the
|
|
5
|
+
* authoring methods of the host protocol, and the owner's workspace (`McpWorkspace`, its root and
|
|
6
|
+
* its artifacts' files) and verify's screenshots, which only that machine holds.
|
|
7
|
+
*/
|
|
8
|
+
export declare const RELAY_AUTHOR_METHODS: readonly ["artifact/create", "artifact/verify", "artifact/publish", "artifact/get", "workspace/root", "workspace/allocate", "workspace/read", "workspace/apply", "verify/screenshot"];
|
|
9
|
+
/** One of {@link RELAY_AUTHOR_METHODS}. */
|
|
10
|
+
export type RelayAuthorMethod = (typeof RELAY_AUTHOR_METHODS)[number];
|
|
11
|
+
/** The params of `port/relay.author` (INTERFACES §18.3). */
|
|
12
|
+
export interface PortRelayAuthorParams {
|
|
13
|
+
/** What to do on the owner instance. */
|
|
14
|
+
readonly method: RelayAuthorMethod;
|
|
15
|
+
/** Its params: the host protocol method's, or the workspace operation's. */
|
|
16
|
+
readonly params: unknown;
|
|
17
|
+
}
|
|
18
|
+
/** The result of `port/relay.author`: the method's own result. */
|
|
19
|
+
export type PortRelayAuthorResult = unknown;
|
|
20
|
+
/**
|
|
21
|
+
* `port/relay.author`: the remote MCP server relays an authoring step to the account's default
|
|
22
|
+
* owner instance (D165 item 5), which runs it in its own workspace, builder and `verify`, and
|
|
23
|
+
* answers its result or its diagnostic. A publish through it also hosts the version on the server
|
|
24
|
+
* that asked and answers the hosted link. Workspace paths stay inside the owner's workspace.
|
|
25
|
+
*/
|
|
26
|
+
export declare const portRelayAuthorMethod: MethodDefinition<PortRelayAuthorParams, PortRelayAuthorResult>;
|
|
27
|
+
//#endregion
|
|
28
|
+
//# sourceMappingURL=relay-author.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"relay-author.d.ts","names":[],"sources":["../../../src/methods/port/relay-author.ts"],"mappings":";;;;;;;qBASa;;YAaD,4BAA4B;;iBAGvB;;WAEN,QAAQ;;WAER;;;YAIC;;;;;;;qBAgBC,uBAAuB,iBAAiB,uBAAuB"}
|