@openchamber/sdk 2.4.0 → 2.5.1
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/API.md +30 -7
- package/DOCUMENTATION.md +67 -6
- package/GUEST_SERVICES.md +131 -4
- package/dist/contract.d.ts +46 -4
- package/dist/contract.js +18 -2
- package/dist/host.d.ts +19 -1
- package/dist/host.js +30 -0
- package/dist/index.d.ts +6 -6
- package/dist/index.js +3 -3
- package/dist/manifest.d.ts +178 -4
- package/dist/manifest.js +30 -4
- package/dist/parse.d.ts +220 -0
- package/dist/parse.js +174 -2
- package/dist/protocol.d.ts +51 -0
- package/dist/protocol.js +14 -6
- package/dist/schemas.d.ts +1 -1
- package/dist/schemas.js +1 -1
- package/dist/service-provider-schemas.d.ts +511 -0
- package/dist/service-provider-schemas.js +221 -1
- package/dist/service-providers.d.ts +390 -2
- package/dist/service-providers.js +217 -0
- package/dist/ui/style.js +16 -9
- package/package.json +2 -2
package/dist/contract.js
CHANGED
|
@@ -50,8 +50,23 @@ export const GUEST_GENERATE_SYSTEM_MAX = 8_000;
|
|
|
50
50
|
export const GUEST_GENERATE_OUTPUT_TOKENS_MAX = 4_000;
|
|
51
51
|
/** Characters in a `generate` answer. */
|
|
52
52
|
export const GUEST_GENERATE_TEXT_MAX = 256_000;
|
|
53
|
-
/**
|
|
54
|
-
|
|
53
|
+
/**
|
|
54
|
+
* How long `generate` waits for the model before `HOST_TIMEOUT`.
|
|
55
|
+
*
|
|
56
|
+
* Must exceed the largest deadline the Small Model server can derive for a
|
|
57
|
+
* guest-shaped request, plus margin for the iframe → host bridge → HTTP chain.
|
|
58
|
+
* The server no longer cuts at a flat 60 s: it budgets 60 s base plus 40 ms per
|
|
59
|
+
* estimated token (~4 chars/token), capped at 900 s
|
|
60
|
+
* (`generationBudgetMs` in `packages/web/server/lib/small-model/index.js`,
|
|
61
|
+
* issue #5017). At the guest limits (`GUEST_GENERATE_PROMPT_MAX` +
|
|
62
|
+
* `GUEST_GENERATE_SYSTEM_MAX` = 72 000 chars ≈ 18 000 tokens) that is 780 s,
|
|
63
|
+
* so 960 s leaves the chain ~3 minutes.
|
|
64
|
+
*/
|
|
65
|
+
export const GUEST_GENERATE_TIMEOUT_MS = 960_000;
|
|
66
|
+
/** How long the host keeps a `LateGenerateResult` nobody has taken. */
|
|
67
|
+
export const GUEST_GENERATE_LATE_KEEP_MS = 60 * 60_000;
|
|
68
|
+
/** `LateGenerateResult`s the host keeps per extension; a newer one drops the oldest. */
|
|
69
|
+
export const GUEST_GENERATE_LATE_MAX = 8;
|
|
55
70
|
/** Characters of one message's text on a `GuestMessageItem` or a `GuestSessionItem` message. */
|
|
56
71
|
export const GUEST_ITEM_MESSAGE_TEXT_MAX = 200_000;
|
|
57
72
|
/** `JSON.stringify` length ceiling for a `GuestSessionItem`; the host drops the oldest messages to stay under it. */
|
|
@@ -217,6 +232,7 @@ const HOST_PUSH_TYPES = new Set([
|
|
|
217
232
|
'ready', 'directory', 'session', 'connection', 'settings', 'session-lifecycle', 'item', 'resolve', 'action',
|
|
218
233
|
'status-control-event', 'popover-closed',
|
|
219
234
|
'file-open', 'file-snapshot', 'file-saved',
|
|
235
|
+
'generate-late',
|
|
220
236
|
]);
|
|
221
237
|
const asWireRecord = (data) => (Object(data) === data ? data : null);
|
|
222
238
|
const isNonEmptyString = (value) => (String(value) === value && value.length > 0);
|
package/dist/host.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { GuestStatusControl, GuestStatusControlEvent } from './status-contr
|
|
|
3
3
|
import type { JsonValue } from './contract.ts';
|
|
4
4
|
import { type GuestPopoverClosedEvent, type GuestPopoverRequest } from './popover.ts';
|
|
5
5
|
import { type FileEditorChange, type FileEditorDocument, type FileEditorSnapshot, type FileSnapshotPurpose } from './file-editor.ts';
|
|
6
|
-
import { type AttachIssueRequest, type GuestActionItem, type ComposeRequest, type PromptRequest, type PromptResult, type SessionLifecycleEvent, type StartSessionRequest, type GuestConnection, type GuestItem, type GuestMessage, type GuestRequest, type GuestRequestResult, type GuestSettings, type HostReadyContext, type HostRequestErrorCode, type ResolveRequest, type SessionSnapshot, type StartSessionResult, type ToastRequest, type ServiceStatusResult, type FileListResult, type FileReadResult, type FileStatResult, type FileWriteResult, type GenerateRequest, type GenerateResult } from './contract.ts';
|
|
6
|
+
import { type AttachIssueRequest, type GuestActionItem, type ComposeRequest, type PromptRequest, type PromptResult, type SessionLifecycleEvent, type StartSessionRequest, type GuestConnection, type GuestItem, type GuestMessage, type GuestRequest, type GuestRequestResult, type GuestSettings, type HostReadyContext, type HostRequestErrorCode, type ResolveRequest, type SessionSnapshot, type StartSessionResult, type ToastRequest, type ServiceStatusResult, type FileListResult, type FileReadResult, type FileStatResult, type FileWriteResult, type GenerateRequest, type GenerateResult, type LateGenerateResult } from './contract.ts';
|
|
7
7
|
import { type GuestRunningShellsSnapshot, type GuestShellOutputResult, type GuestShellStopResult, type GuestShellsScope } from './shells.ts';
|
|
8
8
|
export type HostFrame = {
|
|
9
9
|
addEventListener: Window['addEventListener'];
|
|
@@ -82,6 +82,11 @@ export type HostClient = {
|
|
|
82
82
|
* Diff view `UNSUPPORTED`.
|
|
83
83
|
*/
|
|
84
84
|
openCommit: (sha: string) => Promise<void>;
|
|
85
|
+
/**
|
|
86
|
+
* Show a context panel surface (`git`, or `plugin:<panel id>`). Resolves once
|
|
87
|
+
* it is on screen; one already open stays open. No chat or project yet is
|
|
88
|
+
* `NO_DIRECTORY`, a surface that cannot open here `UNSUPPORTED`.
|
|
89
|
+
*/
|
|
85
90
|
openSurface: (surfaceId: string) => Promise<void>;
|
|
86
91
|
writeClipboard: (text: string) => Promise<void>;
|
|
87
92
|
compose: (request: ComposeRequest) => Promise<void>;
|
|
@@ -121,6 +126,19 @@ export type HostClient = {
|
|
|
121
126
|
* failed is `MODEL_FAILED`. Waits up to `GUEST_GENERATE_TIMEOUT_MS`.
|
|
122
127
|
*/
|
|
123
128
|
generate: (request: GenerateRequest) => Promise<GenerateResult>;
|
|
129
|
+
/**
|
|
130
|
+
* `generate` outcomes that arrived after the frame that asked was gone:
|
|
131
|
+
* the user closed the panel, or the frame reloaded, before the model
|
|
132
|
+
* answered. The host keeps each one for a frame of this extension on the
|
|
133
|
+
* same surface and project and hands it over once, up to
|
|
134
|
+
* `GUEST_GENERATE_LATE_MAX` per extension for `GUEST_GENERATE_LATE_KEEP_MS`.
|
|
135
|
+
* One that lands while this frame listens arrives at once. Register when
|
|
136
|
+
* the frame can use them; the host hands nothing over before the first
|
|
137
|
+
* listener, or on a host without `ready.features.lateGenerateResults`.
|
|
138
|
+
* One that arrives after the last listener was removed waits in this frame
|
|
139
|
+
* for the next listener.
|
|
140
|
+
*/
|
|
141
|
+
onLateGenerateResult: (listener: (result: LateGenerateResult) => void) => () => void;
|
|
124
142
|
/** Number on this guest's rail icon (0 to `GUEST_BADGE_MAX`); `null` clears it. Opening the panel clears it too. */
|
|
125
143
|
setBadge: (count: number | null) => Promise<void>;
|
|
126
144
|
/**
|
package/dist/host.js
CHANGED
|
@@ -51,6 +51,10 @@ export const connectHost = (options = {}) => {
|
|
|
51
51
|
const itemListeners = new Set();
|
|
52
52
|
const statusControlListeners = new Set();
|
|
53
53
|
const popoverClosedListeners = new Set();
|
|
54
|
+
const lateGenerateListeners = new Set();
|
|
55
|
+
// Answers the host handed over after the last listener left; each one comes
|
|
56
|
+
// from a `generate` this extension made.
|
|
57
|
+
const unclaimedLateGenerate = [];
|
|
54
58
|
let resolveHandler = null;
|
|
55
59
|
let actionHandler = null;
|
|
56
60
|
const fileOpenListeners = new Set();
|
|
@@ -79,6 +83,14 @@ export const connectHost = (options = {}) => {
|
|
|
79
83
|
const post = (message) => {
|
|
80
84
|
target.parent.postMessage(message, '*');
|
|
81
85
|
};
|
|
86
|
+
// Sent again on every `ready`: the host forgets a listening frame when it
|
|
87
|
+
// re-attaches, and the notice costs nothing to repeat.
|
|
88
|
+
const listenForLateGenerate = () => {
|
|
89
|
+
if (disposed || target.parent === target || lateGenerateListeners.size === 0
|
|
90
|
+
|| lastReady?.features?.lateGenerateResults !== true)
|
|
91
|
+
return;
|
|
92
|
+
post({ channel: OPENCHAMBER_SDK_CHANNEL, v: OPENCHAMBER_SDK_API_VERSION, type: 'generate-late-listen' });
|
|
93
|
+
};
|
|
82
94
|
// One listener that throws must not starve the ones after it; the error
|
|
83
95
|
// surfaces on the console the way an event handler's would.
|
|
84
96
|
const emit = (listeners, value) => {
|
|
@@ -123,6 +135,15 @@ export const connectHost = (options = {}) => {
|
|
|
123
135
|
emit(connectionListeners, message.payload.connection);
|
|
124
136
|
emit(settingsListeners, message.payload.settings);
|
|
125
137
|
emit(itemListeners, message.payload.item);
|
|
138
|
+
listenForLateGenerate();
|
|
139
|
+
return;
|
|
140
|
+
}
|
|
141
|
+
if (message.type === 'generate-late') {
|
|
142
|
+
// The host already let go of it; keep it for the next listener.
|
|
143
|
+
if (lateGenerateListeners.size === 0)
|
|
144
|
+
unclaimedLateGenerate.push(message.payload);
|
|
145
|
+
else
|
|
146
|
+
emit(lateGenerateListeners, message.payload);
|
|
126
147
|
return;
|
|
127
148
|
}
|
|
128
149
|
if (message.type === 'directory') {
|
|
@@ -864,6 +885,13 @@ export const connectHost = (options = {}) => {
|
|
|
864
885
|
return result;
|
|
865
886
|
});
|
|
866
887
|
},
|
|
888
|
+
onLateGenerateResult: (listener) => {
|
|
889
|
+
lateGenerateListeners.add(listener);
|
|
890
|
+
for (const result of unclaimedLateGenerate.splice(0))
|
|
891
|
+
emit([listener], result);
|
|
892
|
+
listenForLateGenerate();
|
|
893
|
+
return () => { lateGenerateListeners.delete(listener); };
|
|
894
|
+
},
|
|
867
895
|
setBadge: (count) => request({
|
|
868
896
|
channel: OPENCHAMBER_SDK_CHANNEL,
|
|
869
897
|
v: OPENCHAMBER_SDK_API_VERSION,
|
|
@@ -944,6 +972,8 @@ export const connectHost = (options = {}) => {
|
|
|
944
972
|
itemListeners.clear();
|
|
945
973
|
statusControlListeners.clear();
|
|
946
974
|
popoverClosedListeners.clear();
|
|
975
|
+
lateGenerateListeners.clear();
|
|
976
|
+
unclaimedLateGenerate.length = 0;
|
|
947
977
|
},
|
|
948
978
|
};
|
|
949
979
|
};
|
package/dist/index.d.ts
CHANGED
|
@@ -9,8 +9,8 @@ export { GUEST_STATUS_CONTROLS_MAX, GUEST_STATUS_CONTROL_ID, GUEST_STATUS_CONTRO
|
|
|
9
9
|
export type { GuestStatusControl, GuestStatusControlEvent, GuestStatusControlOption } from './status-controls.ts';
|
|
10
10
|
export type { OpenChamberManifestApiVersion } from './api-version.ts';
|
|
11
11
|
export { compareOpenChamberVersions, hostMeetsOpenChamberEngine, openChamberEngineMinimum, OPENCHAMBER_ENGINE_PATTERN, parseOpenChamberVersion, } from './host-version.ts';
|
|
12
|
-
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.ts';
|
|
13
|
-
export type { GuestServiceProvides, GuestSurfaceDock, ServiceContribution, ServicePermissions, GuestActionContribution, GuestActionPayload, GuestActionRole, GuestActionWhere, GuestCommandContribution, GuestToolContribution, GuestToolOutput, AttachContribution, AttachContributionObject, AttachMode, DeclaredGuestCapability, GuestAuthorization, GuestCapability, IntegrationAuth, IntegrationContribution, IntegrationHost, IntegrationHostProvider, IntegrationOAuth, IntegrationOAuthAccount, IntegrationSettingField, IntegrationToken, IntegrationTokenScheme, OpenChamberContributes, OpenChamberEngines, OpenChamberManifest, PanelContribution, BackgroundContribution, PageContribution, StatusSectionContribution, ParseManifestErrorCode, ParseManifestFailure, ParseManifestResult, ParseManifestSuccess, PublicService, PublicServicePermissions, PublicGuestCapabilities, PublicIntegration, PublicIntegrationToken, PublicSocketBinding, ResolvedGuestApi, SocketBinding, SocketPlatform, } from './manifest.ts';
|
|
12
|
+
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, SOURCE_CONTROL_DEFAULT_INSTANCES_MAX, SOURCE_CONTROL_GUEST_ID_MAX, SOURCE_CONTROL_URL_TEMPLATES_MAX, SOURCE_CONTROL_URL_TEMPLATE_MAX, SOURCE_CONTROL_URL_TOKENS, sourceControlProviderIdOf, toPublicService, toPublicSourceControl, toPublicIntegration, } from './manifest.ts';
|
|
13
|
+
export type { GuestServiceProvides, GuestSurfaceDock, ServiceContribution, ServicePermissions, GuestActionContribution, GuestActionPayload, GuestActionRole, GuestActionWhere, GuestCommandContribution, GuestToolContribution, GuestToolOutput, AttachContribution, AttachContributionObject, AttachMode, DeclaredGuestCapability, GuestAuthorization, GuestCapability, IntegrationAuth, IntegrationContribution, IntegrationHost, IntegrationHostProvider, IntegrationOAuth, IntegrationOAuthAccount, IntegrationSettingField, IntegrationToken, IntegrationTokenScheme, OpenChamberContributes, OpenChamberEngines, OpenChamberManifest, PanelContribution, BackgroundContribution, PageContribution, StatusSectionContribution, ParseManifestErrorCode, ParseManifestFailure, ParseManifestResult, ParseManifestSuccess, PublicService, PublicServicePermissions, PublicSourceControl, SourceControlCapabilities, SourceControlContribution, SourceControlMergeMethod, PublicGuestCapabilities, PublicIntegration, PublicIntegrationToken, PublicSocketBinding, ResolvedGuestApi, SocketBinding, SocketPlatform, } from './manifest.ts';
|
|
14
14
|
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.ts';
|
|
15
15
|
export type { FileEditorChange, FileEditorContentKind, FileEditorContribution, FileEditorDocument, FileEditorSnapshot, FileSnapshotPurpose, FileSnapshotRequest, FileSnapshotResultPayload, } from './file-editor.ts';
|
|
16
16
|
export { connectHost, HostRequestError } from './host.ts';
|
|
@@ -18,9 +18,9 @@ export type { HostClient, HostClientOptions, HostFrame } from './host.ts';
|
|
|
18
18
|
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.ts';
|
|
19
19
|
export type { GuestPopoverAnchor, GuestPopoverClosedEvent, GuestPopoverContext, GuestPopoverRequest, GuestPopoverSide } from './popover.ts';
|
|
20
20
|
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.ts';
|
|
21
|
-
export type { BadgeRequest, ActionResultPayload, GuestActionItem, GuestActionResultMessage, HostActionMessage, HostFileOpenMessage, HostFileSnapshotMessage, HostFileSavedMessage, GuestFileSnapshotResultMessage, GuestFileChangeMessage, GuestFileSaveMessage, GuestFileUnsupportedMessage, GuestBadgeMessage, GuestResizeMessage, GuestOpenCommitMessage, GuestStatusControlsMessage, GuestPopoverAnchorMessage, GuestPopoverCloseMessage, GuestPopoverOpenMessage, OpenCommitRequest, ResizeRequest, GuestItem, GuestItemRole, GuestMessageItem, GuestResolveResultMessage, GuestSessionItem, GuestSessionItemMessage, HostResolveMessage, ResolveRequest, ResolveResultPayload, FileListEntry, FileListRequest, FileListResult, FileReadRequest, FileReadResult, FileStatRequest, FileStatResult, FileWriteRequest, FileWriteResult, GenerateRequest, GenerateResult, GuestFileEntryKind, GuestFileListMessage, GuestFileReadMessage, GuestFileScope, GuestFileStatKind, GuestFileStatMessage, GuestGenerateMessage, GuestFileWriteMessage, ServiceStatus, ServiceStatusResult, HostRequestErrorCode, AttachBranches, AttachIssueRequest, AttachThreadKind, JsonValue, HostResultPayload, PromptRequest, PromptResult, SessionLifecycleEvent, SessionLifecyclePhase, StartSessionRequest, StartSessionResult, StartSessionSent, ComposeRequest, GuestServiceRequestMessage, GuestServiceStatusMessage, GuestShellOutputMessage, GuestShellsSubscribeMessage, GuestShellsUnsubscribeMessage, GuestShellStopMessage, GuestAttachMessage, GuestClipboardWriteMessage, GuestCloseMessage, GuestComposeMessage, GuestConnection, GuestHelloMessage, GuestMessage, GuestOauthDisconnectMessage, GuestOauthStartMessage, GuestOpenSurfaceMessage, GuestOpenUrlMessage, GuestRequest, GuestRequestMessage, GuestRequestMethod, GuestPromptMessage, GuestSessionLinkMessage, GuestStartSessionMessage, GuestRequestResult, GuestSettings, GuestToastMessage, GuestHostSurface, HostConnectionMessage, HostDirectoryMessage, HostItemMessage, HostStatusControlEventMessage, HostPopoverClosedMessage, HostMessage, HostReadyContext, HostReadyMessage, HostResultMessage, HostSessionLifecycleMessage, HostSessionMessage, HostSettingsMessage, HostShellsMessage, HostTheme, HostThemeMode, HostThemeTokens, SessionSnapshot, ToastKind, ToastRequest, } from './contract.ts';
|
|
22
|
-
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.ts';
|
|
23
|
-
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.ts';
|
|
24
|
-
export type { BrowserCaptureData, BrowserCaptureParameters, BrowserClickData, BrowserClickParameters, BrowserConsoleProblem, BrowserControlAction, BrowserElementBounds, BrowserInspectData, BrowserInspectParameters, BrowserNavigationData, BrowserOpenData, BrowserOpenParameters, BrowserProviderContext, BrowserProviderData, BrowserProviderRequest, BrowserProviderResult, BrowserResizeData, BrowserResizeParameters, BrowserScrollData, BrowserScrollDirection, BrowserScrollParameters, BrowserSnapshotData, BrowserSnapshotElement, BrowserSnapshotParameters, BrowserTab, BrowserTabTarget, BrowserTypeData, BrowserTypeParameters, BrowserViewportMode, BrowserViewportSummary, } from './service-providers.ts';
|
|
21
|
+
export type { BadgeRequest, ActionResultPayload, GuestActionItem, GuestActionResultMessage, HostActionMessage, HostFileOpenMessage, HostFileSnapshotMessage, HostFileSavedMessage, HostGenerateLateMessage, GuestFileSnapshotResultMessage, GuestFileChangeMessage, GuestFileSaveMessage, GuestFileUnsupportedMessage, GuestGenerateLateListenMessage, GuestBadgeMessage, GuestResizeMessage, GuestOpenCommitMessage, GuestStatusControlsMessage, GuestPopoverAnchorMessage, GuestPopoverCloseMessage, GuestPopoverOpenMessage, OpenCommitRequest, ResizeRequest, GuestItem, GuestItemRole, GuestMessageItem, GuestResolveResultMessage, GuestSessionItem, GuestSessionItemMessage, HostResolveMessage, ResolveRequest, ResolveResultPayload, FileListEntry, FileListRequest, FileListResult, FileReadRequest, FileReadResult, FileStatRequest, FileStatResult, FileWriteRequest, FileWriteResult, GenerateRequest, GenerateResult, LateGenerateResult, GuestFileEntryKind, GuestFileListMessage, GuestFileReadMessage, GuestFileScope, GuestFileStatKind, GuestFileStatMessage, GuestGenerateMessage, GuestFileWriteMessage, ServiceStatus, ServiceStatusResult, HostRequestErrorCode, AttachBranches, AttachIssueRequest, AttachThreadKind, JsonValue, HostResultPayload, PromptRequest, PromptResult, SessionLifecycleEvent, SessionLifecyclePhase, StartSessionRequest, StartSessionResult, StartSessionSent, ComposeRequest, GuestServiceRequestMessage, GuestServiceStatusMessage, GuestShellOutputMessage, GuestShellsSubscribeMessage, GuestShellsUnsubscribeMessage, GuestShellStopMessage, GuestAttachMessage, GuestClipboardWriteMessage, GuestCloseMessage, GuestComposeMessage, GuestConnection, GuestHelloMessage, GuestMessage, GuestOauthDisconnectMessage, GuestOauthStartMessage, GuestOpenSurfaceMessage, GuestOpenUrlMessage, GuestRequest, GuestRequestMessage, GuestRequestMethod, GuestPromptMessage, GuestSessionLinkMessage, GuestStartSessionMessage, GuestRequestResult, GuestSettings, GuestToastMessage, GuestHostSurface, HostConnectionMessage, HostDirectoryMessage, HostItemMessage, HostStatusControlEventMessage, HostPopoverClosedMessage, HostMessage, HostReadyContext, HostReadyMessage, HostResultMessage, HostSessionLifecycleMessage, HostSessionMessage, HostSettingsMessage, HostShellsMessage, HostTheme, HostThemeMode, HostThemeTokens, SessionSnapshot, ToastKind, ToastRequest, } from './contract.ts';
|
|
22
|
+
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_GENERATE_LATE_KEEP_MS, GUEST_GENERATE_LATE_MAX, 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.ts';
|
|
23
|
+
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, OPENCHAMBER_HOST_CALLBACK_URL, SOURCE_CONTROL_OUTBOUND_BODY_MAX, SOURCE_CONTROL_OUTBOUND_METHODS, SOURCE_CONTROL_OUTBOUND_PATH, SOURCE_CONTROL_OUTBOUND_REQUEST_HEADERS, SOURCE_CONTROL_OUTBOUND_RESPONSE_HEADERS, SOURCE_CONTROL_OUTBOUND_RESPONSE_HEADER_PREFIX, SOURCE_CONTROL_OUTBOUND_RESPONSE_MAX, SOURCE_CONTROL_OUTBOUND_TIMEOUT_MS, SOURCE_CONTROL_PROVIDER_AUTH_TIMEOUT_MS, SOURCE_CONTROL_PROVIDER_ERROR_MESSAGE_MAX, SOURCE_CONTROL_PROVIDER_IDLE_MS, SOURCE_CONTROL_PROVIDER_METHODS, SOURCE_CONTROL_PROVIDER_MUTATION_TIMEOUT_MS, SOURCE_CONTROL_PROVIDER_PATH, SOURCE_CONTROL_PROVIDER_READ_TIMEOUT_MS, SOURCE_CONTROL_PROVIDER_RESPONSE_MAX, SOURCE_CONTROL_PROVIDER_STATUS_TIMEOUT_MS, SOURCE_CONTROL_PROVIDER_TARGET_MAX, SOURCE_CONTROL_PROVIDER_WIRE_VERSION, SourceControlForgeError, createSourceControlForge, isSourceControlProviderMethod, readSourceControlProviderRequest, sourceControlProviderTimeoutMs, } from './service-providers.ts';
|
|
24
|
+
export type { BrowserCaptureData, BrowserCaptureParameters, BrowserClickData, BrowserClickParameters, BrowserCloseData, BrowserCloseParameters, BrowserConsoleProblem, BrowserControlAction, BrowserElementBounds, BrowserInspectData, BrowserInspectParameters, BrowserNavigationData, BrowserOpenData, BrowserOpenParameters, BrowserProviderContext, BrowserProviderData, BrowserProviderRequest, BrowserProviderResult, BrowserResizeData, BrowserResizeParameters, BrowserScrollData, BrowserScrollDirection, BrowserScrollParameters, BrowserSnapshotData, BrowserSnapshotElement, BrowserSnapshotOption, BrowserSnapshotParameters, BrowserSelectData, BrowserSelectParameters, BrowserTab, BrowserTabTarget, BrowserTypeData, BrowserTypeParameters, BrowserViewportMode, BrowserViewportSummary, SourceControlChangeRequestHead, SourceControlChangeRequestSource, SourceControlForge, SourceControlForgeUser, SourceControlJson, SourceControlJsonObject, SourceControlMutationMethod, SourceControlMutationResolution, SourceControlMutationResult, SourceControlMutationTarget, SourceControlOutboundMethod, SourceControlOutboundRequest, SourceControlOutboundResponse, SourceControlProbeData, SourceControlProjectRef, SourceControlProjectSelector, SourceControlProviderError, SourceControlProviderInputs, SourceControlProviderMethod, SourceControlProviderRequest, SourceControlProviderResult, SourceControlProviderSession, SourceControlProviderUser, SourceControlReconcileData, SourceControlResourceMethod, SourceControlVerifyData, } from './service-providers.ts';
|
|
25
25
|
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.ts';
|
|
26
26
|
export type { SurfaceClipboardAnswer, SurfaceControlNotice, SurfaceController, SurfaceFrameMime, SurfaceInputBatch, SurfaceInputEvent, SurfaceKeyEvent, SurfaceModifiers, SurfacePointerEvent, SurfaceResizeAnswer, SurfaceResizeRequest, SurfaceTextEvent, SurfaceWheelEvent, } from './service-surface.ts';
|
package/dist/index.js
CHANGED
|
@@ -5,11 +5,11 @@ export { GUEST_STORAGE_KEY_MAX, GUEST_STORAGE_KEYS_MAX, GUEST_STORAGE_VALUE_BYTE
|
|
|
5
5
|
export { GUEST_SHELL_END_STATUSES, GUEST_SHELL_ID_MAX, GUEST_SHELLS_MAX, GUEST_SHELL_OUTPUT_TAIL_MAX, } from './shells.js';
|
|
6
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
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';
|
|
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, SOURCE_CONTROL_DEFAULT_INSTANCES_MAX, SOURCE_CONTROL_GUEST_ID_MAX, SOURCE_CONTROL_URL_TEMPLATES_MAX, SOURCE_CONTROL_URL_TEMPLATE_MAX, SOURCE_CONTROL_URL_TOKENS, sourceControlProviderIdOf, toPublicService, toPublicSourceControl, toPublicIntegration, } from './manifest.js';
|
|
9
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
10
|
export { connectHost, HostRequestError } from './host.js';
|
|
11
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
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';
|
|
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_GENERATE_LATE_KEEP_MS, GUEST_GENERATE_LATE_MAX, 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, OPENCHAMBER_HOST_CALLBACK_URL, SOURCE_CONTROL_OUTBOUND_BODY_MAX, SOURCE_CONTROL_OUTBOUND_METHODS, SOURCE_CONTROL_OUTBOUND_PATH, SOURCE_CONTROL_OUTBOUND_REQUEST_HEADERS, SOURCE_CONTROL_OUTBOUND_RESPONSE_HEADERS, SOURCE_CONTROL_OUTBOUND_RESPONSE_HEADER_PREFIX, SOURCE_CONTROL_OUTBOUND_RESPONSE_MAX, SOURCE_CONTROL_OUTBOUND_TIMEOUT_MS, SOURCE_CONTROL_PROVIDER_AUTH_TIMEOUT_MS, SOURCE_CONTROL_PROVIDER_ERROR_MESSAGE_MAX, SOURCE_CONTROL_PROVIDER_IDLE_MS, SOURCE_CONTROL_PROVIDER_METHODS, SOURCE_CONTROL_PROVIDER_MUTATION_TIMEOUT_MS, SOURCE_CONTROL_PROVIDER_PATH, SOURCE_CONTROL_PROVIDER_READ_TIMEOUT_MS, SOURCE_CONTROL_PROVIDER_RESPONSE_MAX, SOURCE_CONTROL_PROVIDER_STATUS_TIMEOUT_MS, SOURCE_CONTROL_PROVIDER_TARGET_MAX, SOURCE_CONTROL_PROVIDER_WIRE_VERSION, SourceControlForgeError, createSourceControlForge, isSourceControlProviderMethod, readSourceControlProviderRequest, sourceControlProviderTimeoutMs, } from './service-providers.js';
|
|
15
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';
|
package/dist/manifest.d.ts
CHANGED
|
@@ -241,12 +241,184 @@ export type PublicSocketBinding = {
|
|
|
241
241
|
};
|
|
242
242
|
/**
|
|
243
243
|
* Host roles a service can stand in for. `browser` answers the agent's
|
|
244
|
-
* `browser.*` actions in place of the in-app browser view
|
|
245
|
-
*
|
|
246
|
-
*
|
|
244
|
+
* `browser.*` actions in place of the in-app browser view. `source-control`
|
|
245
|
+
* makes the extension a Git host next to GitHub, GitLab and Gitea, described
|
|
246
|
+
* by `contributes.sourceControl`. Both contracts are in `service-providers.ts`.
|
|
247
|
+
* A service that provides a role needs no panel or background entry: the host
|
|
248
|
+
* starts it on the first call.
|
|
247
249
|
*/
|
|
248
|
-
export declare const GUEST_SERVICE_PROVIDES: readonly ['browser'];
|
|
250
|
+
export declare const GUEST_SERVICE_PROVIDES: readonly ['browser', 'source-control'];
|
|
249
251
|
export type GuestServiceProvides = (typeof GUEST_SERVICE_PROVIDES)[number];
|
|
252
|
+
/**
|
|
253
|
+
* The host names an extension's Git host `ext-<panel.id>`, and provider ids
|
|
254
|
+
* are at most 32 characters, so a guest taking the role has an id of at most
|
|
255
|
+
* this many.
|
|
256
|
+
*/
|
|
257
|
+
export declare const SOURCE_CONTROL_GUEST_ID_MAX = 28;
|
|
258
|
+
/** The provider id OpenChamber gives the Git host an extension provides. */
|
|
259
|
+
export declare const sourceControlProviderIdOf: (guestId: string) => string;
|
|
260
|
+
/** Default instances a Git host extension may name. */
|
|
261
|
+
export declare const SOURCE_CONTROL_DEFAULT_INSTANCES_MAX = 4;
|
|
262
|
+
/** URL templates per kind (`presentation.urls.changeRequest` / `.issue`). */
|
|
263
|
+
export declare const SOURCE_CONTROL_URL_TEMPLATES_MAX = 8;
|
|
264
|
+
/** Characters in one URL template. */
|
|
265
|
+
export declare const SOURCE_CONTROL_URL_TEMPLATE_MAX = 256;
|
|
266
|
+
/**
|
|
267
|
+
* The placeholders a URL template may use, each a whole path segment.
|
|
268
|
+
* `{namespace+}` is one or more segments (GitLab groups); `{owner}` exactly one.
|
|
269
|
+
*/
|
|
270
|
+
export declare const SOURCE_CONTROL_URL_TOKENS: readonly ['{owner}', '{namespace+}', '{repo}', '{number}'];
|
|
271
|
+
/** `submit` is a change-based host's own merge (Gerrit's): when declared it is the only method. */
|
|
272
|
+
export type SourceControlMergeMethod = 'merge' | 'squash' | 'rebase' | 'submit';
|
|
273
|
+
/**
|
|
274
|
+
* What the Git host can do. A capability left out is off. `merge` lists the
|
|
275
|
+
* methods it offers, or is `false`. Review threads, uploads, stacks, the
|
|
276
|
+
* reference picker and multiple accounts are not declared: the host fixes them
|
|
277
|
+
* for every extension.
|
|
278
|
+
*/
|
|
279
|
+
export type SourceControlCapabilities = {
|
|
280
|
+
projects: boolean;
|
|
281
|
+
issues: boolean;
|
|
282
|
+
changeRequests: boolean;
|
|
283
|
+
draftChangeRequests: boolean;
|
|
284
|
+
merge: false | {
|
|
285
|
+
methods: SourceControlMergeMethod[];
|
|
286
|
+
};
|
|
287
|
+
ci: boolean;
|
|
288
|
+
comments: boolean;
|
|
289
|
+
reviews: boolean;
|
|
290
|
+
state: boolean;
|
|
291
|
+
labels: boolean;
|
|
292
|
+
reviewers: boolean;
|
|
293
|
+
changeRequestPatch: boolean;
|
|
294
|
+
liveSummaries: boolean;
|
|
295
|
+
/**
|
|
296
|
+
* How a review is given. `verdict` (the default when left out): approve or
|
|
297
|
+
* request changes. `votes`: per-label scores, such as Code-Review -2..+2;
|
|
298
|
+
* the labels and their ranges come with each change request's context.
|
|
299
|
+
*/
|
|
300
|
+
reviewModel?: 'verdict' | 'votes';
|
|
301
|
+
/**
|
|
302
|
+
* Whether a change request has numbered revisions (patchsets) that can be
|
|
303
|
+
* read one at a time: reads then may carry `revision`, a commit sha.
|
|
304
|
+
*/
|
|
305
|
+
revisions?: boolean;
|
|
306
|
+
};
|
|
307
|
+
/**
|
|
308
|
+
* `contributes.sourceControl`: the Git host an extension with
|
|
309
|
+
* `service.provides: ["source-control"]` adds, declared in the manifest so
|
|
310
|
+
* OpenChamber can draw and route it without starting the service. The
|
|
311
|
+
* provider id is not declared: OpenChamber names it `ext-<panel.id>`.
|
|
312
|
+
*/
|
|
313
|
+
export type SourceControlContribution = {
|
|
314
|
+
/** Wire version of the role's service contract; `1`. */
|
|
315
|
+
wire: 1;
|
|
316
|
+
/** The product name, shown untranslated. 1 to 64 characters. */
|
|
317
|
+
label: string;
|
|
318
|
+
/** `change` names a change-based host's unit of review (Gerrit's change). */
|
|
319
|
+
terminology: {
|
|
320
|
+
changeRequest: 'pullRequest' | 'mergeRequest' | 'change';
|
|
321
|
+
ci: 'checks' | 'pipeline';
|
|
322
|
+
};
|
|
323
|
+
/** `#`, `!`: what precedes a number. 1 to 4 characters. */
|
|
324
|
+
referencePrefix: {
|
|
325
|
+
changeRequest: string;
|
|
326
|
+
issue: string;
|
|
327
|
+
};
|
|
328
|
+
/** `owner/name`: two segments. `namespace/name`: nested groups before the name. */
|
|
329
|
+
repositoryPath: 'owner/name' | 'namespace/name';
|
|
330
|
+
instances: {
|
|
331
|
+
/** Up to 4 https origins offered without typing one. */
|
|
332
|
+
defaultInstances: string[];
|
|
333
|
+
/** Whether the user may add an instance outside `defaultInstances`. */
|
|
334
|
+
custom: boolean;
|
|
335
|
+
/** Whether a typed instance may be `http://` on a loopback address. */
|
|
336
|
+
allowLoopbackHttp: boolean;
|
|
337
|
+
/** Whether a typed instance may carry a port. */
|
|
338
|
+
allowPort: boolean;
|
|
339
|
+
/** Example text in the instance field. */
|
|
340
|
+
placeholder: string;
|
|
341
|
+
};
|
|
342
|
+
capabilities: SourceControlCapabilities;
|
|
343
|
+
/** How OpenChamber sends the token: which header, with which prefix. */
|
|
344
|
+
token: {
|
|
345
|
+
header: 'authorization' | 'private-token';
|
|
346
|
+
/**
|
|
347
|
+
* `bearer` → `Bearer <token>`, `token` → `token <token>`, `basic` →
|
|
348
|
+
* `Basic base64(<login>:<token>)`, `none` → the bare token (only with `private-token`).
|
|
349
|
+
*/
|
|
350
|
+
scheme: 'bearer' | 'token' | 'basic' | 'none';
|
|
351
|
+
/** Settings asks for the account's username beside the token. Required with, and only with, `basic`. */
|
|
352
|
+
username?: boolean;
|
|
353
|
+
/** Scopes the Settings card asks the user to grant. */
|
|
354
|
+
scopes: string[];
|
|
355
|
+
/** Path on the instance where tokens are created, linked from Settings. */
|
|
356
|
+
createPath?: string;
|
|
357
|
+
};
|
|
358
|
+
/** How Git over HTTPS signs in with the stored token. */
|
|
359
|
+
transport: {
|
|
360
|
+
httpsUsername: {
|
|
361
|
+
kind: 'login';
|
|
362
|
+
} | {
|
|
363
|
+
kind: 'fixed';
|
|
364
|
+
value: string;
|
|
365
|
+
};
|
|
366
|
+
appendDotGitToHttpsClone: boolean;
|
|
367
|
+
};
|
|
368
|
+
limits: {
|
|
369
|
+
commentMaxLength: number;
|
|
370
|
+
/** How a reviewer is named in a reviewer mutation: a numeric user id or a login. */
|
|
371
|
+
reviewerId: 'numeric' | 'login';
|
|
372
|
+
labelsMax: number;
|
|
373
|
+
reviewersMax: number;
|
|
374
|
+
};
|
|
375
|
+
/** Pull requests and issues read in one `liveSummaries` call. */
|
|
376
|
+
trackedItems: {
|
|
377
|
+
batchLimit: number;
|
|
378
|
+
};
|
|
379
|
+
presentation: {
|
|
380
|
+
/** `PR`, `MR`: shown untranslated. 1 to 8 characters. */
|
|
381
|
+
abbreviation: string;
|
|
382
|
+
/** English noun for generation prompts, such as `pull request`. */
|
|
383
|
+
promptNoun: string;
|
|
384
|
+
/** Whether issues and change requests share one number sequence. */
|
|
385
|
+
sharedNumberSpace: boolean;
|
|
386
|
+
/** A 24×24 SVG path `d`, the mark drawn for the Git host. */
|
|
387
|
+
iconPath?: string;
|
|
388
|
+
/**
|
|
389
|
+
* Web paths of a change request and an issue on the instance, made of
|
|
390
|
+
* literal segments and the `SOURCE_CONTROL_URL_TOKENS` placeholders, such
|
|
391
|
+
* as `/{owner}/{repo}/pulls/{number}`. OpenChamber compiles them; an
|
|
392
|
+
* extension never supplies a regular expression.
|
|
393
|
+
*/
|
|
394
|
+
urls: {
|
|
395
|
+
changeRequest: string[];
|
|
396
|
+
issue: string[];
|
|
397
|
+
};
|
|
398
|
+
/**
|
|
399
|
+
* Review threads are not part of the role: OpenChamber keeps starting one
|
|
400
|
+
* off for an extension's Git host, so there is no `startThread` here.
|
|
401
|
+
*/
|
|
402
|
+
/**
|
|
403
|
+
* `submitRequirements`: each change request's context lists what must
|
|
404
|
+
* hold before it can be submitted, and the UI shows them by the Submit button.
|
|
405
|
+
*/
|
|
406
|
+
features: {
|
|
407
|
+
authorCanReview: boolean;
|
|
408
|
+
issueCloseReason: boolean;
|
|
409
|
+
submitRequirements?: boolean;
|
|
410
|
+
};
|
|
411
|
+
/** Repository paths read as the change request template, first match wins. */
|
|
412
|
+
changeRequestTemplates: string[];
|
|
413
|
+
};
|
|
414
|
+
};
|
|
415
|
+
/** What the extension catalog and approval dialog show of the role; never a token. */
|
|
416
|
+
export type PublicSourceControl = {
|
|
417
|
+
label: string;
|
|
418
|
+
defaultInstances: string[];
|
|
419
|
+
custom: boolean;
|
|
420
|
+
};
|
|
421
|
+
export declare const toPublicSourceControl: (contribution: SourceControlContribution) => PublicSourceControl;
|
|
250
422
|
export type ServiceContribution = {
|
|
251
423
|
entry: string;
|
|
252
424
|
runtime: 'host';
|
|
@@ -321,6 +493,8 @@ export type OpenChamberContributes = {
|
|
|
321
493
|
tools?: GuestToolContribution[];
|
|
322
494
|
/** Editors the Files view opens matching files in. */
|
|
323
495
|
fileEditors?: FileEditorContribution[];
|
|
496
|
+
/** The Git host a `source-control` service provides; present exactly when it does. */
|
|
497
|
+
sourceControl?: SourceControlContribution;
|
|
324
498
|
};
|
|
325
499
|
/** Whether any declared action asks for a session's messages, which needs `conversation`. */
|
|
326
500
|
export declare const guestActionsNeedConversation: (actions: readonly GuestActionContribution[] | undefined) => boolean;
|
package/dist/manifest.js
CHANGED
|
@@ -87,11 +87,37 @@ export const resolveIntegrationApi = (integration) => {
|
|
|
87
87
|
};
|
|
88
88
|
/**
|
|
89
89
|
* Host roles a service can stand in for. `browser` answers the agent's
|
|
90
|
-
* `browser.*` actions in place of the in-app browser view
|
|
91
|
-
*
|
|
92
|
-
*
|
|
90
|
+
* `browser.*` actions in place of the in-app browser view. `source-control`
|
|
91
|
+
* makes the extension a Git host next to GitHub, GitLab and Gitea, described
|
|
92
|
+
* by `contributes.sourceControl`. Both contracts are in `service-providers.ts`.
|
|
93
|
+
* A service that provides a role needs no panel or background entry: the host
|
|
94
|
+
* starts it on the first call.
|
|
93
95
|
*/
|
|
94
|
-
export const GUEST_SERVICE_PROVIDES = ['browser'];
|
|
96
|
+
export const GUEST_SERVICE_PROVIDES = ['browser', 'source-control'];
|
|
97
|
+
/**
|
|
98
|
+
* The host names an extension's Git host `ext-<panel.id>`, and provider ids
|
|
99
|
+
* are at most 32 characters, so a guest taking the role has an id of at most
|
|
100
|
+
* this many.
|
|
101
|
+
*/
|
|
102
|
+
export const SOURCE_CONTROL_GUEST_ID_MAX = 28;
|
|
103
|
+
/** The provider id OpenChamber gives the Git host an extension provides. */
|
|
104
|
+
export const sourceControlProviderIdOf = (guestId) => `ext-${guestId}`;
|
|
105
|
+
/** Default instances a Git host extension may name. */
|
|
106
|
+
export const SOURCE_CONTROL_DEFAULT_INSTANCES_MAX = 4;
|
|
107
|
+
/** URL templates per kind (`presentation.urls.changeRequest` / `.issue`). */
|
|
108
|
+
export const SOURCE_CONTROL_URL_TEMPLATES_MAX = 8;
|
|
109
|
+
/** Characters in one URL template. */
|
|
110
|
+
export const SOURCE_CONTROL_URL_TEMPLATE_MAX = 256;
|
|
111
|
+
/**
|
|
112
|
+
* The placeholders a URL template may use, each a whole path segment.
|
|
113
|
+
* `{namespace+}` is one or more segments (GitLab groups); `{owner}` exactly one.
|
|
114
|
+
*/
|
|
115
|
+
export const SOURCE_CONTROL_URL_TOKENS = ['{owner}', '{namespace+}', '{repo}', '{number}'];
|
|
116
|
+
export const toPublicSourceControl = (contribution) => ({
|
|
117
|
+
label: contribution.label,
|
|
118
|
+
defaultInstances: [...contribution.instances.defaultInstances],
|
|
119
|
+
custom: contribution.instances.custom,
|
|
120
|
+
});
|
|
95
121
|
export const serviceProvides = (service, role) => Boolean(service?.provides?.includes(role));
|
|
96
122
|
/**
|
|
97
123
|
* What a guest may do beyond drawing its own panel. The user approves the
|