@openchamber/sdk 2.3.0 → 2.3.2

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.
Files changed (48) hide show
  1. package/GUEST_SERVICES.md +1 -0
  2. package/dist/contract.d.ts +7 -7
  3. package/dist/contract.js +1 -1
  4. package/dist/host.js +7 -7
  5. package/dist/index.js +15 -15
  6. package/dist/manifest.d.ts +12 -12
  7. package/dist/parse.d.ts +26 -26
  8. package/dist/parse.js +4 -4
  9. package/dist/popover-schemas.d.ts +3 -3
  10. package/dist/popover-schemas.js +1 -1
  11. package/dist/popover.d.ts +2 -2
  12. package/dist/protocol.d.ts +222 -222
  13. package/dist/protocol.js +7 -7
  14. package/dist/schemas.js +7 -7
  15. package/dist/service-provider-schemas.d.ts +6 -6
  16. package/dist/service-provider-schemas.js +1 -1
  17. package/dist/service-providers.d.ts +3 -3
  18. package/dist/service-surface-schemas.d.ts +9 -9
  19. package/dist/service-surface-schemas.js +1 -1
  20. package/dist/service-surface.d.ts +2 -2
  21. package/dist/shells.d.ts +1 -1
  22. package/dist/status-control-schemas.js +1 -1
  23. package/dist/ui/badge.js +2 -2
  24. package/dist/ui/banner.js +3 -3
  25. package/dist/ui/button.js +2 -2
  26. package/dist/ui/checkbox.js +3 -3
  27. package/dist/ui/dom.js +1 -1
  28. package/dist/ui/empty.js +3 -3
  29. package/dist/ui/field.js +2 -2
  30. package/dist/ui/icons.d.ts +4 -4
  31. package/dist/ui/index.js +19 -19
  32. package/dist/ui/list.js +4 -4
  33. package/dist/ui/menu.js +6 -6
  34. package/dist/ui/navigation.d.ts +1 -1
  35. package/dist/ui/option.d.ts +1 -1
  36. package/dist/ui/option.js +2 -2
  37. package/dist/ui/popup.js +1 -1
  38. package/dist/ui/progress.js +3 -3
  39. package/dist/ui/search.js +3 -3
  40. package/dist/ui/select.js +6 -6
  41. package/dist/ui/separator.js +2 -2
  42. package/dist/ui/spinner.js +2 -2
  43. package/dist/ui/style.js +1 -1
  44. package/dist/ui/tabs.js +3 -3
  45. package/dist/ui/text.js +2 -2
  46. package/dist/workspace-schemas.d.ts +14 -14
  47. package/dist/workspace-schemas.js +1 -1
  48. package/package.json +2 -2
package/GUEST_SERVICES.md CHANGED
@@ -156,6 +156,7 @@ Ship `service/main.js` already built. Same packaging rule as `panel/main.js`.
156
156
  | Panel open | Status via `serviceStatus`. Dead service restarts on the next `serviceRequest`. |
157
157
  | Uninstall | SIGTERM, then kill after timeout. Clear grant and socket overrides. Path-install does not delete the user's folder. |
158
158
  | Host quit | Kill every guest service. |
159
+ | Host crash | The service keeps running until the next host start, which stops it (SIGTERM, then kill after timeout) before spawning any service. |
159
160
  | Crash | Status `failed`. Panel sees `SERVICE_FAILED` / status. Manual retry, not silent loops. |
160
161
 
161
162
  ## Security invariants
@@ -53,7 +53,7 @@ export type HostTheme = {
53
53
  mode: HostThemeMode;
54
54
  tokens: HostThemeTokens;
55
55
  };
56
- export declare const START_SESSION_SENT: readonly ["sent", "no-model", "skipped", "failed"];
56
+ export declare const START_SESSION_SENT: readonly ['sent', 'no-model', 'skipped', 'failed'];
57
57
  export type StartSessionSent = (typeof START_SESSION_SENT)[number];
58
58
  export type SessionSnapshot = {
59
59
  id: string;
@@ -103,16 +103,16 @@ export type PromptRequest = {
103
103
  export type PromptResult = {
104
104
  sent: StartSessionSent;
105
105
  };
106
- export declare const SESSION_LIFECYCLE_PHASES: readonly ["started", "completed", "failure"];
106
+ export declare const SESSION_LIFECYCLE_PHASES: readonly ['started', 'completed', 'failure'];
107
107
  export type SessionLifecyclePhase = (typeof SESSION_LIFECYCLE_PHASES)[number];
108
108
  export type SessionLifecycleEvent = {
109
109
  sessionId: string;
110
110
  phase: SessionLifecyclePhase;
111
111
  };
112
- export declare const GUEST_FILE_ENTRY_KINDS: readonly ["file", "directory", "other"];
112
+ export declare const GUEST_FILE_ENTRY_KINDS: readonly ['file', 'directory', 'other'];
113
113
  /** What a directory entry or an existing path is. */
114
114
  export type GuestFileEntryKind = (typeof GUEST_FILE_ENTRY_KINDS)[number];
115
- export declare const GUEST_FILE_STAT_KINDS: readonly ["file", "directory", "other", "missing"];
115
+ export declare const GUEST_FILE_STAT_KINDS: readonly ['file', 'directory', 'other', 'missing'];
116
116
  /** `stat` answer: an entry kind, or `missing` when nothing is at that path. */
117
117
  export type GuestFileStatKind = (typeof GUEST_FILE_STAT_KINDS)[number];
118
118
  /**
@@ -364,8 +364,8 @@ export declare const GUEST_BADGE_MAX = 999;
364
364
  export declare const GUEST_FRAME_HEIGHT_MAX = 10000;
365
365
  /** Characters in a `resolve-result` error string. */
366
366
  export declare const GUEST_RESOLVE_ERROR_MAX = 500;
367
- export declare const HOST_REQUEST_ERROR_CODES: readonly ["HOST_UNAVAILABLE", "HOST_TIMEOUT", "HOST_REJECTED", "DISCONNECTED", "DISABLED", "BAD_PATH", "NO_INTEGRATION", "NO_SERVICE", "SERVICE_FAILED", "REQUEST_FAILED", "RESPONSE_TOO_LARGE", "NO_SESSION", "SESSION_BUSY", "NOT_GRANTED", "NO_DIRECTORY", "NOT_FOUND", "FILE_TOO_LARGE", "DENIED", "NO_MODEL", "MODEL_FAILED", "UNSUPPORTED"];
368
- export declare const SERVICE_STATUS_VALUES: readonly ["stopped", "starting", "ready", "failed"];
367
+ export declare const HOST_REQUEST_ERROR_CODES: readonly ['HOST_UNAVAILABLE', 'HOST_TIMEOUT', 'HOST_REJECTED', 'DISCONNECTED', 'DISABLED', 'BAD_PATH', 'NO_INTEGRATION', 'NO_SERVICE', 'SERVICE_FAILED', 'REQUEST_FAILED', 'RESPONSE_TOO_LARGE', 'NO_SESSION', 'SESSION_BUSY', 'NOT_GRANTED', 'NO_DIRECTORY', 'NOT_FOUND', 'FILE_TOO_LARGE', 'DENIED', 'NO_MODEL', 'MODEL_FAILED', 'UNSUPPORTED'];
368
+ export declare const SERVICE_STATUS_VALUES: readonly ['stopped', 'starting', 'ready', 'failed'];
369
369
  export type ServiceStatus = (typeof SERVICE_STATUS_VALUES)[number];
370
370
  export type ServiceStatusResult = {
371
371
  status: ServiceStatus;
@@ -613,5 +613,5 @@ export declare const isGenerateResult: (value: HostResultPayload | undefined) =>
613
613
  * carries no schema library for it. The host side parses guest input with
614
614
  * `guestMessageSchema` in `@openchamber/sdk/schemas`.
615
615
  */
616
- export declare const readHostMessage: (data: MessageEvent["data"]) => HostMessage | null;
616
+ export declare const readHostMessage: (data: MessageEvent['data']) => HostMessage | null;
617
617
  export {};
package/dist/contract.js CHANGED
@@ -1,4 +1,4 @@
1
- import { OPENCHAMBER_SDK_API_VERSION, OPENCHAMBER_SDK_CHANNEL } from "./api-version.js";
1
+ import { OPENCHAMBER_SDK_API_VERSION, OPENCHAMBER_SDK_CHANNEL } from './api-version.js';
2
2
  export const START_SESSION_SENT = ['sent', 'no-model', 'skipped', 'failed'];
3
3
  export const SESSION_LIFECYCLE_PHASES = ['started', 'completed', 'failure'];
4
4
  export const GUEST_FILE_ENTRY_KINDS = ['file', 'directory', 'other'];
package/dist/host.js CHANGED
@@ -1,10 +1,10 @@
1
- import { OPENCHAMBER_SDK_API_VERSION, OPENCHAMBER_SDK_CHANNEL } from "./api-version.js";
2
- import { GUEST_STORAGE_KEY_MAX, GUEST_STORAGE_VALUE_BYTES } from "./workspace.js";
3
- import { isGuestStatusControls } from "./status-controls.js";
4
- import { isGuestPopoverRequest } from "./popover.js";
5
- import { GUEST_FILE_EDITOR_CONTENT_MAX, GUEST_FILE_EDITOR_VERSION_MAX, fileEditorPayloadSize, sameFileEditorDocument, } from "./file-editor.js";
6
- import { GUEST_FILE_CONTENT_MAX, GUEST_CLIPBOARD_TEXT_MAX, GUEST_TOAST_MAX, GUEST_FILE_PATH_MAX, GUEST_GENERATE_OUTPUT_TOKENS_MAX, GUEST_GENERATE_PROMPT_MAX, GUEST_GENERATE_SYSTEM_MAX, GUEST_GENERATE_TIMEOUT_MS, GUEST_REQUEST_TIMEOUT_MS, GUEST_RESOLVE_ERROR_MAX, isGuestFilePath, isGuestRequestPath, clampAttachRequest, clampBadgeCount, clampFrameHeight, isGuestCommitSha, clampPromptRequest, clampStartSessionRequest, readHostMessage, isGenerateResult, isFileListResult, isFileReadResult, isFileStatResult, isJsonValue, isFileWriteResult, isServiceStatusResult, isGuestRequestResult, isPromptResult, isStartSessionResult, } from "./contract.js";
7
- import { GUEST_SHELL_ID_MAX, GUEST_SHELL_OUTPUT_TAIL_MAX } from "./shells.js";
1
+ import { OPENCHAMBER_SDK_API_VERSION, OPENCHAMBER_SDK_CHANNEL } from './api-version.js';
2
+ import { GUEST_STORAGE_KEY_MAX, GUEST_STORAGE_VALUE_BYTES } from './workspace.js';
3
+ import { isGuestStatusControls } from './status-controls.js';
4
+ import { isGuestPopoverRequest } from './popover.js';
5
+ import { GUEST_FILE_EDITOR_CONTENT_MAX, GUEST_FILE_EDITOR_VERSION_MAX, fileEditorPayloadSize, sameFileEditorDocument, } from './file-editor.js';
6
+ import { GUEST_FILE_CONTENT_MAX, GUEST_CLIPBOARD_TEXT_MAX, GUEST_TOAST_MAX, GUEST_FILE_PATH_MAX, GUEST_GENERATE_OUTPUT_TOKENS_MAX, GUEST_GENERATE_PROMPT_MAX, GUEST_GENERATE_SYSTEM_MAX, GUEST_GENERATE_TIMEOUT_MS, GUEST_REQUEST_TIMEOUT_MS, GUEST_RESOLVE_ERROR_MAX, isGuestFilePath, isGuestRequestPath, clampAttachRequest, clampBadgeCount, clampFrameHeight, isGuestCommitSha, clampPromptRequest, clampStartSessionRequest, readHostMessage, isGenerateResult, isFileListResult, isFileReadResult, isFileStatResult, isJsonValue, isFileWriteResult, isServiceStatusResult, isGuestRequestResult, isPromptResult, isStartSessionResult, } from './contract.js';
7
+ import { GUEST_SHELL_ID_MAX, GUEST_SHELL_OUTPUT_TAIL_MAX } from './shells.js';
8
8
  // Structural, not `instanceof KeyboardEvent`: the frame's own realm owns that
9
9
  // constructor, and non-browser runtimes have none.
10
10
  const isKeyEvent = (event) => 'key' in event && 'metaKey' in event && 'ctrlKey' in event;
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
- export { OPENCHAMBER_SDK_API_VERSION, OPENCHAMBER_SDK_CHANNEL, OPENCHAMBER_SDK_MANIFEST_API_VERSIONS } from "./api-version.js";
2
- export { GUEST_SCROLLBAR_CSS, GUEST_SCROLLBAR_SCRIPT } from "./scrollbar-style.js";
3
- export { guestFramePolicy } from "./frame-policy.js";
4
- export { GUEST_STORAGE_KEY_MAX, GUEST_STORAGE_KEYS_MAX, GUEST_STORAGE_VALUE_BYTES, GUEST_STORAGE_TOTAL_BYTES, GUEST_DEVICE_STORAGE_TOTAL_BYTES } from "./workspace.js";
5
- export { GUEST_SHELL_END_STATUSES, GUEST_SHELL_ID_MAX, GUEST_SHELLS_MAX, GUEST_SHELL_OUTPUT_TAIL_MAX, } from "./shells.js";
6
- export { GUEST_STATUS_CONTROLS_MAX, GUEST_STATUS_CONTROL_ID, GUEST_STATUS_CONTROL_LABEL_MAX, GUEST_STATUS_CONTROL_OPTIONS_MAX, GUEST_STATUS_CONTROL_VALUE_MAX } from "./status-controls.js";
7
- export { compareOpenChamberVersions, hostMeetsOpenChamberEngine, openChamberEngineMinimum, OPENCHAMBER_ENGINE_PATTERN, parseOpenChamberVersion, } from "./host-version.js";
8
- export { DECLARED_GUEST_CAPABILITIES, GUEST_ACTIONS_MAX, GUEST_ACTION_LABEL_MAX, GUEST_CAPABILITIES, GUEST_COMMANDS_MAX, GUEST_COMMAND_DESCRIPTION_MAX, GUEST_COMMAND_NAME, GUEST_TOOLS_MAX, GUEST_TOOL_COLUMNS_MAX, GUEST_TOOL_COLUMN_MAX, GUEST_TOOL_LANGUAGE_MAX, GUEST_TOOL_MATCH, GUEST_TOOL_MATCH_MAX, GUEST_TOOL_NAME_MAX, GUEST_TOOL_OUTPUTS, GUEST_TOOL_TEMPLATE_MAX, GUEST_TOOL_TEMPLATE_VALUE_MAX, guestActionsNeedConversation, GUEST_FILESYSTEM_PATTERN_MAX, GUEST_FILESYSTEM_PATTERNS_MAX, GUEST_ORIGINS_MAX, GUEST_SERVICE_PROVIDES, GUEST_SURFACE_DOCKS, GUEST_SURFACE_DOCK_DEFAULT, GUEST_SURFACE_DOCK_SIZE_DEFAULT, GUEST_SURFACE_DOCK_SIZE_MAX, GUEST_SURFACE_DOCK_SIZE_MIN, GUEST_STATUS_SECTION_HEIGHT_DEFAULT, GUEST_STATUS_SECTION_HEIGHT_MAX, GUEST_STATUS_SECTION_HEIGHT_MIN, GUEST_STATUS_SECTION_TITLE_MAX, clampStatusSectionHeight, HOST_LINEAR_API_ORIGIN, isGuestFilesystemPattern, hasGuestCapability, hasGuestPage, isGuestApproved, isGuestPackageSvgIcon, requestedGuestCapabilities, resolveAttachEntry, resolvePageEntry, resolveStatusSectionEntry, resolveAttachMode, resolveIntegrationApi, resolveIntegrationAuth, serviceProvides, toPublicService, toPublicIntegration, } from "./manifest.js";
9
- export { GUEST_FILE_EDITORS_MAX, GUEST_FILE_EDITOR_CONTENT_MAX, GUEST_FILE_EDITOR_PATTERNS_MAX, GUEST_FILE_EDITOR_PATTERN_MAX, GUEST_FILE_EDITOR_TITLE_MAX, GUEST_FILE_EDITOR_VERSION_MAX, createFileSaveTracker, fileEditorPayloadSize, isFileEditorPattern, matchesFileEditorPattern, } from "./file-editor.js";
10
- export { connectHost, HostRequestError } from "./host.js";
11
- export { GUEST_POPOVER_COORDINATE_MAX, GUEST_POPOVER_DATA_DEPTH_MAX, GUEST_POPOVER_DATA_MAX, GUEST_POPOVER_HEIGHT_MAX, GUEST_POPOVER_HEIGHT_MIN, GUEST_POPOVER_ID, GUEST_POPOVER_SIDES, GUEST_POPOVER_WIDTH_MAX, GUEST_POPOVER_WIDTH_MIN, GUEST_POPOVER_CLOSE_REASONS, isGuestPopoverRequest, } from "./popover.js";
12
- export { clampAttachRequest, clampBadgeCount, clampFrameHeight, isGuestCommitSha, GUEST_COMMIT_SHA, clampPromptRequest, clampStartSessionRequest, guestFileScope, isAttachData, isJsonValue, isFileListResult, isFileReadResult, isFileStatResult, isGenerateResult, isFileWriteResult, isGuestFilePath, isGuestAttachItem, isGuestMessageItem, isGuestSessionItem, isServiceStatusResult, isGuestRequestPath, isGuestRequestResult, isHostRequestErrorCode, isPromptResult, isStartSessionResult, readHostMessage, resolveHostRequestErrorCode, } from "./contract.js";
13
- export { EMPTY_GUEST_CONNECTION, GUEST_BADGE_MAX, GUEST_FRAME_HEIGHT_MAX, GUEST_ITEM_MESSAGE_TEXT_MAX, GUEST_ITEM_SESSION_MAX, GUEST_RESOLVE_ERROR_MAX, GUEST_FILE_CONTENT_MAX, GUEST_FILE_ENTRY_KINDS, GUEST_FILE_LIST_MAX, GUEST_FILE_PATH_MAX, GUEST_GENERATE_OUTPUT_TOKENS_MAX, GUEST_GENERATE_PROMPT_MAX, GUEST_GENERATE_SYSTEM_MAX, GUEST_GENERATE_TEXT_MAX, GUEST_GENERATE_TIMEOUT_MS, GUEST_FILE_STAT_KINDS, SERVICE_STATUS_VALUES, HOST_REQUEST_ERROR_CODES, SESSION_LIFECYCLE_PHASES, START_SESSION_SENT, GUEST_ACCOUNT_MAX, GUEST_SESSION_AGENT_MAX, GUEST_SESSION_MODEL_MAX, GUEST_ATTACH_AUTHOR_MAX, GUEST_ATTACH_BRANCH_MAX, GUEST_ATTACH_DATA_MAX, GUEST_ATTACH_ID_MAX, GUEST_ATTACH_TEXT_MAX, GUEST_ATTACH_TITLE_MAX, GUEST_ATTACH_URL_MAX, GUEST_CLIPBOARD_TEXT_MAX, GUEST_TOAST_MAX, GUEST_COMPOSE_TEXT_MAX, GUEST_REQUEST_BODY_MAX, GUEST_REQUEST_PATH_MAX, GUEST_REQUEST_RESPONSE_MAX, GUEST_REQUEST_TIMEOUT_MS, GUEST_SETTING_VALUE_MAX, } from "./contract.js";
14
- export { BROWSER_CONTROL_ACTIONS, BROWSER_PROVIDER_ACTION_TIMEOUT_MS, BROWSER_PROVIDER_IDLE_MS, BROWSER_PROVIDER_OPEN_TIMEOUT_MS, BROWSER_PROVIDER_PATH, BROWSER_PROVIDER_RESPONSE_MAX, BROWSER_SCROLL_DIRECTIONS, BROWSER_VIEWPORT_MODES, isBrowserControlAction, readBrowserProviderRequest, } from "./service-providers.js";
15
- export { SURFACE_AGENT_ACTIVE_HEADER, SURFACE_AGENT_HOLD_MS, SURFACE_CLIPBOARD_PATH, SURFACE_CONTROL_PATH, SURFACE_CONTROLLERS, SURFACE_DIMENSION_MAX, SURFACE_FRAME_MAX_BYTES, SURFACE_FRAME_MIMES, SURFACE_FRAME_PATH, SURFACE_FRAME_SEQ_HEADER, SURFACE_FRAME_WAIT_MS, SURFACE_HEIGHT_HEADER, SURFACE_INPUT_BATCH_MAX, SURFACE_INPUT_PATH, SURFACE_RESIZE_PATH, SURFACE_SEQ_HEADER, SURFACE_TEXT_MAX, SURFACE_TITLE_HEADER, SURFACE_TITLE_MAX, SURFACE_VIEWER_CONTROLS_HEADER, SURFACE_VIEWER_HEADER, SURFACE_WIDTH_HEADER, readSurfaceControlNotice, readSurfaceInputBatch, readSurfaceResizeRequest, } from "./service-surface.js";
1
+ export { OPENCHAMBER_SDK_API_VERSION, OPENCHAMBER_SDK_CHANNEL, OPENCHAMBER_SDK_MANIFEST_API_VERSIONS } from './api-version.js';
2
+ export { GUEST_SCROLLBAR_CSS, GUEST_SCROLLBAR_SCRIPT } from './scrollbar-style.js';
3
+ export { guestFramePolicy } from './frame-policy.js';
4
+ export { GUEST_STORAGE_KEY_MAX, GUEST_STORAGE_KEYS_MAX, GUEST_STORAGE_VALUE_BYTES, GUEST_STORAGE_TOTAL_BYTES, GUEST_DEVICE_STORAGE_TOTAL_BYTES } from './workspace.js';
5
+ export { GUEST_SHELL_END_STATUSES, GUEST_SHELL_ID_MAX, GUEST_SHELLS_MAX, GUEST_SHELL_OUTPUT_TAIL_MAX, } from './shells.js';
6
+ export { GUEST_STATUS_CONTROLS_MAX, GUEST_STATUS_CONTROL_ID, GUEST_STATUS_CONTROL_LABEL_MAX, GUEST_STATUS_CONTROL_OPTIONS_MAX, GUEST_STATUS_CONTROL_VALUE_MAX } from './status-controls.js';
7
+ export { compareOpenChamberVersions, hostMeetsOpenChamberEngine, openChamberEngineMinimum, OPENCHAMBER_ENGINE_PATTERN, parseOpenChamberVersion, } from './host-version.js';
8
+ export { DECLARED_GUEST_CAPABILITIES, GUEST_ACTIONS_MAX, GUEST_ACTION_LABEL_MAX, GUEST_CAPABILITIES, GUEST_COMMANDS_MAX, GUEST_COMMAND_DESCRIPTION_MAX, GUEST_COMMAND_NAME, GUEST_TOOLS_MAX, GUEST_TOOL_COLUMNS_MAX, GUEST_TOOL_COLUMN_MAX, GUEST_TOOL_LANGUAGE_MAX, GUEST_TOOL_MATCH, GUEST_TOOL_MATCH_MAX, GUEST_TOOL_NAME_MAX, GUEST_TOOL_OUTPUTS, GUEST_TOOL_TEMPLATE_MAX, GUEST_TOOL_TEMPLATE_VALUE_MAX, guestActionsNeedConversation, GUEST_FILESYSTEM_PATTERN_MAX, GUEST_FILESYSTEM_PATTERNS_MAX, GUEST_ORIGINS_MAX, GUEST_SERVICE_PROVIDES, GUEST_SURFACE_DOCKS, GUEST_SURFACE_DOCK_DEFAULT, GUEST_SURFACE_DOCK_SIZE_DEFAULT, GUEST_SURFACE_DOCK_SIZE_MAX, GUEST_SURFACE_DOCK_SIZE_MIN, GUEST_STATUS_SECTION_HEIGHT_DEFAULT, GUEST_STATUS_SECTION_HEIGHT_MAX, GUEST_STATUS_SECTION_HEIGHT_MIN, GUEST_STATUS_SECTION_TITLE_MAX, clampStatusSectionHeight, HOST_LINEAR_API_ORIGIN, isGuestFilesystemPattern, hasGuestCapability, hasGuestPage, isGuestApproved, isGuestPackageSvgIcon, requestedGuestCapabilities, resolveAttachEntry, resolvePageEntry, resolveStatusSectionEntry, resolveAttachMode, resolveIntegrationApi, resolveIntegrationAuth, serviceProvides, toPublicService, toPublicIntegration, } from './manifest.js';
9
+ export { GUEST_FILE_EDITORS_MAX, GUEST_FILE_EDITOR_CONTENT_MAX, GUEST_FILE_EDITOR_PATTERNS_MAX, GUEST_FILE_EDITOR_PATTERN_MAX, GUEST_FILE_EDITOR_TITLE_MAX, GUEST_FILE_EDITOR_VERSION_MAX, createFileSaveTracker, fileEditorPayloadSize, isFileEditorPattern, matchesFileEditorPattern, } from './file-editor.js';
10
+ export { connectHost, HostRequestError } from './host.js';
11
+ export { GUEST_POPOVER_COORDINATE_MAX, GUEST_POPOVER_DATA_DEPTH_MAX, GUEST_POPOVER_DATA_MAX, GUEST_POPOVER_HEIGHT_MAX, GUEST_POPOVER_HEIGHT_MIN, GUEST_POPOVER_ID, GUEST_POPOVER_SIDES, GUEST_POPOVER_WIDTH_MAX, GUEST_POPOVER_WIDTH_MIN, GUEST_POPOVER_CLOSE_REASONS, isGuestPopoverRequest, } from './popover.js';
12
+ export { clampAttachRequest, clampBadgeCount, clampFrameHeight, isGuestCommitSha, GUEST_COMMIT_SHA, clampPromptRequest, clampStartSessionRequest, guestFileScope, isAttachData, isJsonValue, isFileListResult, isFileReadResult, isFileStatResult, isGenerateResult, isFileWriteResult, isGuestFilePath, isGuestAttachItem, isGuestMessageItem, isGuestSessionItem, isServiceStatusResult, isGuestRequestPath, isGuestRequestResult, isHostRequestErrorCode, isPromptResult, isStartSessionResult, readHostMessage, resolveHostRequestErrorCode, } from './contract.js';
13
+ export { EMPTY_GUEST_CONNECTION, GUEST_BADGE_MAX, GUEST_FRAME_HEIGHT_MAX, GUEST_ITEM_MESSAGE_TEXT_MAX, GUEST_ITEM_SESSION_MAX, GUEST_RESOLVE_ERROR_MAX, GUEST_FILE_CONTENT_MAX, GUEST_FILE_ENTRY_KINDS, GUEST_FILE_LIST_MAX, GUEST_FILE_PATH_MAX, GUEST_GENERATE_OUTPUT_TOKENS_MAX, GUEST_GENERATE_PROMPT_MAX, GUEST_GENERATE_SYSTEM_MAX, GUEST_GENERATE_TEXT_MAX, GUEST_GENERATE_TIMEOUT_MS, GUEST_FILE_STAT_KINDS, SERVICE_STATUS_VALUES, HOST_REQUEST_ERROR_CODES, SESSION_LIFECYCLE_PHASES, START_SESSION_SENT, GUEST_ACCOUNT_MAX, GUEST_SESSION_AGENT_MAX, GUEST_SESSION_MODEL_MAX, GUEST_ATTACH_AUTHOR_MAX, GUEST_ATTACH_BRANCH_MAX, GUEST_ATTACH_DATA_MAX, GUEST_ATTACH_ID_MAX, GUEST_ATTACH_TEXT_MAX, GUEST_ATTACH_TITLE_MAX, GUEST_ATTACH_URL_MAX, GUEST_CLIPBOARD_TEXT_MAX, GUEST_TOAST_MAX, GUEST_COMPOSE_TEXT_MAX, GUEST_REQUEST_BODY_MAX, GUEST_REQUEST_PATH_MAX, GUEST_REQUEST_RESPONSE_MAX, GUEST_REQUEST_TIMEOUT_MS, GUEST_SETTING_VALUE_MAX, } from './contract.js';
14
+ export { BROWSER_CONTROL_ACTIONS, BROWSER_PROVIDER_ACTION_TIMEOUT_MS, BROWSER_PROVIDER_IDLE_MS, BROWSER_PROVIDER_OPEN_TIMEOUT_MS, BROWSER_PROVIDER_PATH, BROWSER_PROVIDER_RESPONSE_MAX, BROWSER_SCROLL_DIRECTIONS, BROWSER_VIEWPORT_MODES, isBrowserControlAction, readBrowserProviderRequest, } from './service-providers.js';
15
+ export { SURFACE_AGENT_ACTIVE_HEADER, SURFACE_AGENT_HOLD_MS, SURFACE_CLIPBOARD_PATH, SURFACE_CONTROL_PATH, SURFACE_CONTROLLERS, SURFACE_DIMENSION_MAX, SURFACE_FRAME_MAX_BYTES, SURFACE_FRAME_MIMES, SURFACE_FRAME_PATH, SURFACE_FRAME_SEQ_HEADER, SURFACE_FRAME_WAIT_MS, SURFACE_HEIGHT_HEADER, SURFACE_INPUT_BATCH_MAX, SURFACE_INPUT_PATH, SURFACE_RESIZE_PATH, SURFACE_SEQ_HEADER, SURFACE_TEXT_MAX, SURFACE_TITLE_HEADER, SURFACE_TITLE_MAX, SURFACE_VIEWER_CONTROLS_HEADER, SURFACE_VIEWER_HEADER, SURFACE_WIDTH_HEADER, readSurfaceControlNotice, readSurfaceInputBatch, readSurfaceResizeRequest, } from './service-surface.js';
@@ -22,7 +22,7 @@ export type PanelContribution = {
22
22
  dock?: GuestSurfaceDock;
23
23
  size?: number;
24
24
  };
25
- export declare const GUEST_SURFACE_DOCKS: readonly ["top", "bottom", "left", "right"];
25
+ export declare const GUEST_SURFACE_DOCKS: readonly ['top', 'bottom', 'left', 'right'];
26
26
  export type GuestSurfaceDock = (typeof GUEST_SURFACE_DOCKS)[number];
27
27
  export declare const GUEST_SURFACE_DOCK_DEFAULT: GuestSurfaceDock;
28
28
  /** Thickness in CSS px of a docked `panel.entry` when the manifest names none. */
@@ -129,7 +129,7 @@ export declare const GUEST_TOOL_LANGUAGE_MAX = 32;
129
129
  export declare const GUEST_TOOL_COLUMNS_MAX = 16;
130
130
  /** Characters in one column path. */
131
131
  export declare const GUEST_TOOL_COLUMN_MAX = 64;
132
- export declare const GUEST_TOOL_OUTPUTS: readonly ["auto", "text", "json", "markdown", "code", "table"];
132
+ export declare const GUEST_TOOL_OUTPUTS: readonly ['auto', 'text', 'json', 'markdown', 'code', 'table'];
133
133
  /** How the expanded body of a matched tool call renders. `auto` keeps the host's own detection. */
134
134
  export type GuestToolOutput = (typeof GUEST_TOOL_OUTPUTS)[number];
135
135
  /**
@@ -215,7 +215,7 @@ export type PublicIntegration = {
215
215
  apiOrigin?: string;
216
216
  settings?: IntegrationSettingField[];
217
217
  };
218
- export declare const resolveIntegrationAuth: (integration: Pick<IntegrationContribution, "oauth" | "token" | "host">) => IntegrationAuth | null;
218
+ export declare const resolveIntegrationAuth: (integration: Pick<IntegrationContribution, 'oauth' | 'token' | 'host'>) => IntegrationAuth | null;
219
219
  export declare const resolveIntegrationApi: (integration: IntegrationContribution) => ResolvedGuestApi | null;
220
220
  export type SocketPlatform = 'linux' | 'darwin' | 'win32';
221
221
  /** Declared socket the service may dial. Candidates are per host platform. */
@@ -245,7 +245,7 @@ export type PublicSocketBinding = {
245
245
  * `service-providers.ts`. A service that provides a role needs no panel or
246
246
  * background entry: the host starts it on the first action.
247
247
  */
248
- export declare const GUEST_SERVICE_PROVIDES: readonly ["browser"];
248
+ export declare const GUEST_SERVICE_PROVIDES: readonly ['browser'];
249
249
  export type GuestServiceProvides = (typeof GUEST_SERVICE_PROVIDES)[number];
250
250
  export type ServiceContribution = {
251
251
  entry: string;
@@ -269,7 +269,7 @@ export type PublicService = {
269
269
  surface?: true;
270
270
  granted: boolean;
271
271
  };
272
- export declare const serviceProvides: (service: Pick<ServiceContribution, "provides"> | undefined, role: GuestServiceProvides) => boolean;
272
+ export declare const serviceProvides: (service: Pick<ServiceContribution, 'provides'> | undefined, role: GuestServiceProvides) => boolean;
273
273
  /**
274
274
  * What a guest may do beyond drawing its own panel. The user approves the
275
275
  * full list once, when the package is installed; a later package that asks
@@ -279,9 +279,9 @@ export declare const serviceProvides: (service: Pick<ServiceContribution, "provi
279
279
  * `contributes.integration`, `contributes.filesystem` and `contributes.origins`. `model` is one-off text generation with the
280
280
  * user's Small Model (`host.generate`), outside any session.
281
281
  */
282
- export declare const GUEST_CAPABILITIES: readonly ["prompt", "sessions", "files", "model", "shells", "conversation", "service", "network", "filesystem", "origins"];
282
+ export declare const GUEST_CAPABILITIES: readonly ['prompt', 'sessions', 'files', 'model', 'shells', 'conversation', 'service', 'network', 'filesystem', 'origins'];
283
283
  export type GuestCapability = (typeof GUEST_CAPABILITIES)[number];
284
- export declare const DECLARED_GUEST_CAPABILITIES: readonly ["prompt", "sessions", "files", "model", "shells"];
284
+ export declare const DECLARED_GUEST_CAPABILITIES: readonly ['prompt', 'sessions', 'files', 'model', 'shells'];
285
285
  /** The capabilities a manifest may ask for directly. */
286
286
  export type DeclaredGuestCapability = (typeof DECLARED_GUEST_CAPABILITIES)[number];
287
287
  /** How many `contributes.origins` a package may declare. */
@@ -329,12 +329,12 @@ export type PublicGuestCapabilities = {
329
329
  requested: GuestCapability[];
330
330
  granted: GuestCapability[];
331
331
  };
332
- export declare const requestedGuestCapabilities: (contributes: Pick<OpenChamberContributes, "capabilities" | "integration" | "service" | "filesystem" | "actions" | "origins">) => GuestCapability[];
332
+ export declare const requestedGuestCapabilities: (contributes: Pick<OpenChamberContributes, 'capabilities' | 'integration' | 'service' | 'filesystem' | 'actions' | 'origins'>) => GuestCapability[];
333
333
  /**
334
334
  * Whether the package ships a visible panel. Background-only extensions can
335
335
  * execute code but have no rail surface, attach picker, or full-screen page.
336
336
  */
337
- export declare const hasGuestPage: (contributes: Pick<OpenChamberContributes, "panel">) => boolean;
337
+ export declare const hasGuestPage: (contributes: Pick<OpenChamberContributes, 'panel'>) => boolean;
338
338
  export declare const isGuestApproved: (capabilities: PublicGuestCapabilities) => boolean;
339
339
  export declare const hasGuestCapability: (capabilities: PublicGuestCapabilities, capability: GuestCapability) => boolean;
340
340
  export declare const resolveAttachMode: (attach: AttachContribution | undefined) => AttachMode | null;
@@ -342,14 +342,14 @@ export declare const resolveAttachMode: (attach: AttachContribution | undefined)
342
342
  * The page the attach dialog loads, or `null` when the dialog reuses
343
343
  * `panel.entry`. Only the object form with `mode: "dialog"` can name one.
344
344
  */
345
- export declare const resolveAttachEntry: (contributes: Pick<OpenChamberContributes, "attach">) => string | null;
346
- export declare const resolvePageEntry: (contributes: Pick<OpenChamberContributes, "panel" | "page">) => string | null;
345
+ export declare const resolveAttachEntry: (contributes: Pick<OpenChamberContributes, 'attach'>) => string | null;
346
+ export declare const resolvePageEntry: (contributes: Pick<OpenChamberContributes, 'panel' | 'page'>) => string | null;
347
347
  /**
348
348
  * The HTML the Work Status section loads: `panel.entry` for `true`, the
349
349
  * object's own `entry` otherwise, `null` when nothing is declared or `true`
350
350
  * has no panel page to reuse.
351
351
  */
352
- export declare const resolveStatusSectionEntry: (contributes: Pick<OpenChamberContributes, "panel" | "statusSection">) => string | null;
352
+ export declare const resolveStatusSectionEntry: (contributes: Pick<OpenChamberContributes, 'panel' | 'statusSection'>) => string | null;
353
353
  /** Clamp a requested status section height to what the host allows. */
354
354
  export declare const clampStatusSectionHeight: (height: number) => number;
355
355
  export type OpenChamberEngines = {
package/dist/parse.d.ts CHANGED
@@ -12,10 +12,10 @@ export declare const openChamberManifestSchema: z.ZodObject<{
12
12
  icon: z.ZodString;
13
13
  entry: z.ZodOptional<z.ZodString>;
14
14
  dock: z.ZodOptional<z.ZodEnum<{
15
+ bottom: "bottom";
15
16
  left: "left";
16
17
  right: "right";
17
18
  top: "top";
18
- bottom: "bottom";
19
19
  }>>;
20
20
  size: z.ZodOptional<z.ZodNumber>;
21
21
  }, z.core.$strip>;
@@ -23,12 +23,12 @@ export declare const openChamberManifestSchema: z.ZodObject<{
23
23
  entry: z.ZodString;
24
24
  }, z.core.$strip>>;
25
25
  attach: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
26
- panel: "panel";
27
26
  dialog: "dialog";
27
+ panel: "panel";
28
28
  }>, z.ZodObject<{
29
29
  mode: z.ZodEnum<{
30
- panel: "panel";
31
30
  dialog: "dialog";
31
+ panel: "panel";
32
32
  }>;
33
33
  entry: z.ZodOptional<z.ZodString>;
34
34
  }, z.core.$strip>]>>;
@@ -44,11 +44,11 @@ export declare const openChamberManifestSchema: z.ZodObject<{
44
44
  requiresProject: z.ZodOptional<z.ZodBoolean>;
45
45
  }, z.core.$strip>]>>;
46
46
  capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
47
- shells: "shells";
48
- sessions: "sessions";
49
- prompt: "prompt";
50
47
  files: "files";
51
48
  model: "model";
49
+ prompt: "prompt";
50
+ sessions: "sessions";
51
+ shells: "shells";
52
52
  }>>>;
53
53
  integration: z.ZodOptional<z.ZodObject<{
54
54
  name: z.ZodString;
@@ -70,9 +70,9 @@ export declare const openChamberManifestSchema: z.ZodObject<{
70
70
  name: z.ZodString;
71
71
  }, z.core.$strip>>;
72
72
  scheme: z.ZodOptional<z.ZodEnum<{
73
- raw: "raw";
74
- bearer: "bearer";
75
73
  basic: "basic";
74
+ bearer: "bearer";
75
+ raw: "raw";
76
76
  }>>;
77
77
  usernameLabel: z.ZodOptional<z.ZodString>;
78
78
  }, z.core.$strip>>;
@@ -124,16 +124,16 @@ export declare const openChamberManifestSchema: z.ZodObject<{
124
124
  label: z.ZodString;
125
125
  icon: z.ZodOptional<z.ZodString>;
126
126
  where: z.ZodEnum<{
127
- session: "session";
128
127
  message: "message";
128
+ session: "session";
129
129
  }>;
130
130
  mode: z.ZodOptional<z.ZodEnum<{
131
131
  background: "background";
132
132
  open: "open";
133
133
  }>>;
134
134
  roles: z.ZodOptional<z.ZodArray<z.ZodEnum<{
135
- user: "user";
136
135
  assistant: "assistant";
136
+ user: "user";
137
137
  }>>>;
138
138
  payload: z.ZodOptional<z.ZodArray<z.ZodEnum<{
139
139
  messages: "messages";
@@ -150,12 +150,12 @@ export declare const openChamberManifestSchema: z.ZodObject<{
150
150
  title: z.ZodOptional<z.ZodString>;
151
151
  subtitle: z.ZodOptional<z.ZodString>;
152
152
  output: z.ZodOptional<z.ZodEnum<{
153
- text: "text";
154
- code: "code";
155
153
  auto: "auto";
154
+ code: "code";
156
155
  json: "json";
157
156
  markdown: "markdown";
158
157
  table: "table";
158
+ text: "text";
159
159
  }>>;
160
160
  language: z.ZodOptional<z.ZodString>;
161
161
  columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -166,8 +166,8 @@ export declare const openChamberManifestSchema: z.ZodObject<{
166
166
  match: z.ZodArray<z.ZodString>;
167
167
  entry: z.ZodString;
168
168
  content: z.ZodOptional<z.ZodEnum<{
169
- text: "text";
170
169
  binary: "binary";
170
+ text: "text";
171
171
  }>>;
172
172
  }, z.core.$strip>>>;
173
173
  }, z.core.$strip>;
@@ -187,10 +187,10 @@ export declare const packageManifestSchema: z.ZodObject<{
187
187
  icon: z.ZodString;
188
188
  entry: z.ZodOptional<z.ZodString>;
189
189
  dock: z.ZodOptional<z.ZodEnum<{
190
+ bottom: "bottom";
190
191
  left: "left";
191
192
  right: "right";
192
193
  top: "top";
193
- bottom: "bottom";
194
194
  }>>;
195
195
  size: z.ZodOptional<z.ZodNumber>;
196
196
  }, z.core.$strip>;
@@ -198,12 +198,12 @@ export declare const packageManifestSchema: z.ZodObject<{
198
198
  entry: z.ZodString;
199
199
  }, z.core.$strip>>;
200
200
  attach: z.ZodOptional<z.ZodUnion<readonly [z.ZodBoolean, z.ZodEnum<{
201
- panel: "panel";
202
201
  dialog: "dialog";
202
+ panel: "panel";
203
203
  }>, z.ZodObject<{
204
204
  mode: z.ZodEnum<{
205
- panel: "panel";
206
205
  dialog: "dialog";
206
+ panel: "panel";
207
207
  }>;
208
208
  entry: z.ZodOptional<z.ZodString>;
209
209
  }, z.core.$strip>]>>;
@@ -219,11 +219,11 @@ export declare const packageManifestSchema: z.ZodObject<{
219
219
  requiresProject: z.ZodOptional<z.ZodBoolean>;
220
220
  }, z.core.$strip>]>>;
221
221
  capabilities: z.ZodOptional<z.ZodArray<z.ZodEnum<{
222
- shells: "shells";
223
- sessions: "sessions";
224
- prompt: "prompt";
225
222
  files: "files";
226
223
  model: "model";
224
+ prompt: "prompt";
225
+ sessions: "sessions";
226
+ shells: "shells";
227
227
  }>>>;
228
228
  integration: z.ZodOptional<z.ZodObject<{
229
229
  name: z.ZodString;
@@ -245,9 +245,9 @@ export declare const packageManifestSchema: z.ZodObject<{
245
245
  name: z.ZodString;
246
246
  }, z.core.$strip>>;
247
247
  scheme: z.ZodOptional<z.ZodEnum<{
248
- raw: "raw";
249
- bearer: "bearer";
250
248
  basic: "basic";
249
+ bearer: "bearer";
250
+ raw: "raw";
251
251
  }>>;
252
252
  usernameLabel: z.ZodOptional<z.ZodString>;
253
253
  }, z.core.$strip>>;
@@ -299,16 +299,16 @@ export declare const packageManifestSchema: z.ZodObject<{
299
299
  label: z.ZodString;
300
300
  icon: z.ZodOptional<z.ZodString>;
301
301
  where: z.ZodEnum<{
302
- session: "session";
303
302
  message: "message";
303
+ session: "session";
304
304
  }>;
305
305
  mode: z.ZodOptional<z.ZodEnum<{
306
306
  background: "background";
307
307
  open: "open";
308
308
  }>>;
309
309
  roles: z.ZodOptional<z.ZodArray<z.ZodEnum<{
310
- user: "user";
311
310
  assistant: "assistant";
311
+ user: "user";
312
312
  }>>>;
313
313
  payload: z.ZodOptional<z.ZodArray<z.ZodEnum<{
314
314
  messages: "messages";
@@ -325,12 +325,12 @@ export declare const packageManifestSchema: z.ZodObject<{
325
325
  title: z.ZodOptional<z.ZodString>;
326
326
  subtitle: z.ZodOptional<z.ZodString>;
327
327
  output: z.ZodOptional<z.ZodEnum<{
328
- text: "text";
329
- code: "code";
330
328
  auto: "auto";
329
+ code: "code";
331
330
  json: "json";
332
331
  markdown: "markdown";
333
332
  table: "table";
333
+ text: "text";
334
334
  }>>;
335
335
  language: z.ZodOptional<z.ZodString>;
336
336
  columns: z.ZodOptional<z.ZodArray<z.ZodString>>;
@@ -341,8 +341,8 @@ export declare const packageManifestSchema: z.ZodObject<{
341
341
  match: z.ZodArray<z.ZodString>;
342
342
  entry: z.ZodString;
343
343
  content: z.ZodOptional<z.ZodEnum<{
344
- text: "text";
345
344
  binary: "binary";
345
+ text: "text";
346
346
  }>>;
347
347
  }, z.core.$strip>>>;
348
348
  }, z.core.$strip>;
package/dist/parse.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import { z } from 'zod';
2
- import { OPENCHAMBER_SDK_MANIFEST_API_VERSIONS } from "./api-version.js";
3
- import { OPENCHAMBER_ENGINE_PATTERN } from "./host-version.js";
4
- import { DECLARED_GUEST_CAPABILITIES, GUEST_ACTIONS_MAX, GUEST_ACTION_LABEL_MAX, GUEST_COMMANDS_MAX, GUEST_COMMAND_DESCRIPTION_MAX, GUEST_COMMAND_NAME, GUEST_FILESYSTEM_PATTERNS_MAX, GUEST_FILESYSTEM_PATTERN_MAX, GUEST_ORIGINS_MAX, GUEST_SERVICE_PROVIDES, GUEST_TOOLS_MAX, GUEST_TOOL_COLUMNS_MAX, GUEST_TOOL_COLUMN_MAX, GUEST_TOOL_LANGUAGE_MAX, GUEST_TOOL_MATCH, GUEST_TOOL_MATCH_MAX, GUEST_TOOL_NAME_MAX, GUEST_TOOL_OUTPUTS, GUEST_TOOL_TEMPLATE_MAX, PANEL_ID, hasGuestPage, isGuestFilesystemPattern, isGuestPackageSvgIcon, isSafeAssetPath, resolveIntegrationAuth, GUEST_SURFACE_DOCKS, GUEST_SURFACE_DOCK_SIZE_MAX, GUEST_SURFACE_DOCK_SIZE_MIN, GUEST_STATUS_SECTION_HEIGHT_MAX, GUEST_STATUS_SECTION_HEIGHT_MIN, GUEST_STATUS_SECTION_TITLE_MAX, } from "./manifest.js";
5
- import { GUEST_FILE_EDITORS_MAX, GUEST_FILE_EDITOR_PATTERNS_MAX, GUEST_FILE_EDITOR_TITLE_MAX, isFileEditorPattern, } from "./file-editor.js";
2
+ import { OPENCHAMBER_SDK_MANIFEST_API_VERSIONS } from './api-version.js';
3
+ import { OPENCHAMBER_ENGINE_PATTERN } from './host-version.js';
4
+ import { DECLARED_GUEST_CAPABILITIES, GUEST_ACTIONS_MAX, GUEST_ACTION_LABEL_MAX, GUEST_COMMANDS_MAX, GUEST_COMMAND_DESCRIPTION_MAX, GUEST_COMMAND_NAME, GUEST_FILESYSTEM_PATTERNS_MAX, GUEST_FILESYSTEM_PATTERN_MAX, GUEST_ORIGINS_MAX, GUEST_SERVICE_PROVIDES, GUEST_TOOLS_MAX, GUEST_TOOL_COLUMNS_MAX, GUEST_TOOL_COLUMN_MAX, GUEST_TOOL_LANGUAGE_MAX, GUEST_TOOL_MATCH, GUEST_TOOL_MATCH_MAX, GUEST_TOOL_NAME_MAX, GUEST_TOOL_OUTPUTS, GUEST_TOOL_TEMPLATE_MAX, PANEL_ID, hasGuestPage, isGuestFilesystemPattern, isGuestPackageSvgIcon, isSafeAssetPath, resolveIntegrationAuth, GUEST_SURFACE_DOCKS, GUEST_SURFACE_DOCK_SIZE_MAX, GUEST_SURFACE_DOCK_SIZE_MIN, GUEST_STATUS_SECTION_HEIGHT_MAX, GUEST_STATUS_SECTION_HEIGHT_MIN, GUEST_STATUS_SECTION_TITLE_MAX, } from './manifest.js';
5
+ import { GUEST_FILE_EDITORS_MAX, GUEST_FILE_EDITOR_PATTERNS_MAX, GUEST_FILE_EDITOR_TITLE_MAX, isFileEditorPattern, } from './file-editor.js';
6
6
  const isPanelIcon = (value) => (PANEL_ID.test(value) || isGuestPackageSvgIcon(value));
7
7
  const isHttpsUrl = (value) => {
8
8
  try {
@@ -12,10 +12,10 @@ export declare const guestPopoverRequestSchema: z.ZodObject<{
12
12
  width: z.ZodNumber;
13
13
  height: z.ZodNumber;
14
14
  side: z.ZodOptional<z.ZodEnum<{
15
+ bottom: "bottom";
15
16
  left: "left";
16
17
  right: "right";
17
18
  top: "top";
18
- bottom: "bottom";
19
19
  }>>;
20
20
  focus: z.ZodOptional<z.ZodBoolean>;
21
21
  data: z.ZodCustom<JsonValue, JsonValue>;
@@ -23,11 +23,11 @@ export declare const guestPopoverRequestSchema: z.ZodObject<{
23
23
  export declare const guestPopoverClosedEventSchema: z.ZodObject<{
24
24
  id: z.ZodString;
25
25
  reason: z.ZodEnum<{
26
+ anchor: "anchor";
27
+ closed: "closed";
26
28
  escape: "escape";
27
29
  outside: "outside";
28
- anchor: "anchor";
29
30
  owner: "owner";
30
- closed: "closed";
31
31
  replaced: "replaced";
32
32
  }>;
33
33
  }, z.core.$strict>;
@@ -1,5 +1,5 @@
1
1
  import { z } from 'zod';
2
- import { GUEST_POPOVER_CLOSE_REASONS, GUEST_POPOVER_COORDINATE_MAX, GUEST_POPOVER_DATA_MAX, GUEST_POPOVER_DATA_DEPTH_MAX, GUEST_POPOVER_HEIGHT_MAX, GUEST_POPOVER_HEIGHT_MIN, GUEST_POPOVER_ID, GUEST_POPOVER_SIDES, GUEST_POPOVER_WIDTH_MAX, GUEST_POPOVER_WIDTH_MIN, } from "./popover.js";
2
+ import { GUEST_POPOVER_CLOSE_REASONS, GUEST_POPOVER_COORDINATE_MAX, GUEST_POPOVER_DATA_MAX, GUEST_POPOVER_DATA_DEPTH_MAX, GUEST_POPOVER_HEIGHT_MAX, GUEST_POPOVER_HEIGHT_MIN, GUEST_POPOVER_ID, GUEST_POPOVER_SIDES, GUEST_POPOVER_WIDTH_MAX, GUEST_POPOVER_WIDTH_MIN, } from './popover.js';
3
3
  const jsonPrimitive = z.union([z.string().max(GUEST_POPOVER_DATA_MAX), z.number(), z.boolean(), z.null()]);
4
4
  const jsonRecord = z.record(z.string().max(GUEST_POPOVER_DATA_MAX), z.unknown());
5
5
  // Parse one level at a time: recursive z.json() would traverse a hostile cycle
package/dist/popover.d.ts CHANGED
@@ -7,7 +7,7 @@ export declare const GUEST_POPOVER_HEIGHT_MIN = 48;
7
7
  export declare const GUEST_POPOVER_HEIGHT_MAX = 480;
8
8
  export declare const GUEST_POPOVER_DATA_MAX = 16000;
9
9
  export declare const GUEST_POPOVER_DATA_DEPTH_MAX = 32;
10
- export declare const GUEST_POPOVER_SIDES: readonly ["left", "right", "top", "bottom"];
10
+ export declare const GUEST_POPOVER_SIDES: readonly ['left', 'right', 'top', 'bottom'];
11
11
  export type GuestPopoverSide = (typeof GUEST_POPOVER_SIDES)[number];
12
12
  export type GuestPopoverAnchor = {
13
13
  x: number;
@@ -28,7 +28,7 @@ export type GuestPopoverContext = {
28
28
  id: string;
29
29
  data: JsonValue;
30
30
  };
31
- export declare const GUEST_POPOVER_CLOSE_REASONS: readonly ["escape", "outside", "anchor", "owner", "closed", "replaced"];
31
+ export declare const GUEST_POPOVER_CLOSE_REASONS: readonly ['escape', 'outside', 'anchor', 'owner', 'closed', 'replaced'];
32
32
  export type GuestPopoverClosedEvent = {
33
33
  id: string;
34
34
  reason: (typeof GUEST_POPOVER_CLOSE_REASONS)[number];