@agimon-ai/doompi-web-contracts 0.0.1-alpha.17 → 0.0.1-alpha.19
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/index.d.cts +4 -3
- package/dist/index.d.mts +4 -3
- package/dist/services/testing/slotProps.cjs +1 -1
- package/dist/services/testing/slotProps.cjs.map +1 -1
- package/dist/services/testing/slotProps.d.cts +4 -2
- package/dist/services/testing/slotProps.d.cts.map +1 -1
- package/dist/services/testing/slotProps.d.mts +4 -2
- package/dist/services/testing/slotProps.d.mts.map +1 -1
- package/dist/services/testing/slotProps.mjs +1 -1
- package/dist/services/testing/slotProps.mjs.map +1 -1
- package/dist/types/modelContext.d.cts +44 -0
- package/dist/types/modelContext.d.cts.map +1 -0
- package/dist/types/modelContext.d.mts +44 -0
- package/dist/types/modelContext.d.mts.map +1 -0
- package/dist/types/webHub.d.cts +15 -1
- package/dist/types/webHub.d.cts.map +1 -1
- package/dist/types/webHub.d.mts +15 -1
- package/dist/types/webHub.d.mts.map +1 -1
- package/dist/types/webPlugin.d.cts +50 -1
- package/dist/types/webPlugin.d.cts.map +1 -1
- package/dist/types/webPlugin.d.mts +50 -1
- package/dist/types/webPlugin.d.mts.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModelContext, ModelContextAbortSignal, ModelContextBinding, ModelContextExecutionOptions, ModelContextRegistrationOptions, ModelContextTool, ModelContextToolChangeEvent, ModelContextToolChangeListener, ModelContextToolDescriptor } from "./types/modelContext.cjs";
|
|
2
|
+
import { ActivityGroupContribution, ComposerCapture, ComposerSubmission, ContextAction, ContextActionContribution, ContextActionRunContext, DockFaceContribution, FileLinkSource, GlobalStore, LeaderBindingContribution, LeaderKeyContribution, MinorModeContribution, PaletteCommandContext, PaletteCommandContribution, RepositorySettingsPanelContribution, RepositorySettingsPanelProps, RepositorySettingsRepository, SelectionAxisContribution, SessionChannelContribution, SessionFrameSender, SessionRecords, SessionStore, SessionStoreChannel, SettingsFieldContribution, SettingsFieldOption, SettingsPanelContribution, SettingsPanelProps, SettingsSectionContribution, SlotDataFill, SlotDeclaration, SlotFillContribution, SurfaceContribution, TabContribution, ThreadViewOptions, ToolMessageRenderProps, ToolPromptContribution, ToolPromptDialog, ToolPromptRenderProps, ToolRendererContribution, ToolResultView, TransientTab, WebPluginContextItem, WebPluginDefinition, WebPluginRuntime, WebPluginSlotProps } from "./types/webPlugin.cjs";
|
|
2
3
|
import { defineSessionChannel, defineSlot, defineWebPlugin } from "./services/define.cjs";
|
|
3
4
|
import { defineGlobalStore } from "./services/globalStore.cjs";
|
|
4
5
|
import { defineSessionStore } from "./services/sessionStore.cjs";
|
|
5
6
|
import { toolResultText, toolResultTextLines } from "./services/toolResult.cjs";
|
|
6
|
-
import { ChannelFrame, HubChannelConnection, HubChannelHost, HubChannelLifecycle, HubChannelSource, HubSessionApiRequest, HubSessionScope, WebHubChannel } from "./types/webHub.cjs";
|
|
7
|
-
export { type ActivityGroupContribution, type ChannelFrame, type ContextAction, type ContextActionContribution, type ContextActionRunContext, type FileLinkSource, type GlobalStore, type HubChannelConnection, type HubChannelHost, type HubChannelLifecycle, type HubChannelSource, type HubSessionApiRequest, type HubSessionScope, type LeaderBindingContribution, type LeaderKeyContribution, type MinorModeContribution, type PaletteCommandContext, type PaletteCommandContribution, type RepositorySettingsPanelContribution, type RepositorySettingsPanelProps, type RepositorySettingsRepository, type SelectionAxisContribution, type SessionChannelContribution, type SessionFrameSender, type SessionRecords, type SessionStore, type SessionStoreChannel, type SettingsFieldContribution, type SettingsFieldOption, type SettingsPanelContribution, type SettingsPanelProps, type SettingsSectionContribution, type SlotDataFill, type SlotDeclaration, type SlotFillContribution, type SurfaceContribution, type TabContribution, type ThreadViewOptions, type ToolMessageRenderProps, type ToolPromptContribution, type ToolPromptDialog, type ToolPromptRenderProps, type ToolRendererContribution, type ToolResultView, type TransientTab, type WebHubChannel, type WebPluginContextItem, type WebPluginDefinition, type WebPluginRuntime, type WebPluginSlotProps, defineGlobalStore, defineSessionChannel, defineSessionStore, defineSlot, defineWebPlugin, toolResultText, toolResultTextLines };
|
|
7
|
+
import { ChannelFrame, ComputerUseHostBinding, ComputerUseHostOperation, ComputerUseHostRequest, HubChannelConnection, HubChannelHost, HubChannelLifecycle, HubChannelSource, HubSessionApiRequest, HubSessionScope, WebHubChannel } from "./types/webHub.cjs";
|
|
8
|
+
export { type ActivityGroupContribution, type ChannelFrame, type ComposerCapture, type ComposerSubmission, type ComputerUseHostBinding, type ComputerUseHostOperation, type ComputerUseHostRequest, type ContextAction, type ContextActionContribution, type ContextActionRunContext, type DockFaceContribution, type FileLinkSource, type GlobalStore, type HubChannelConnection, type HubChannelHost, type HubChannelLifecycle, type HubChannelSource, type HubSessionApiRequest, type HubSessionScope, type LeaderBindingContribution, type LeaderKeyContribution, type MinorModeContribution, type ModelContext, type ModelContextAbortSignal, type ModelContextBinding, type ModelContextExecutionOptions, type ModelContextRegistrationOptions, type ModelContextTool, type ModelContextToolChangeEvent, type ModelContextToolChangeListener, type ModelContextToolDescriptor, type PaletteCommandContext, type PaletteCommandContribution, type RepositorySettingsPanelContribution, type RepositorySettingsPanelProps, type RepositorySettingsRepository, type SelectionAxisContribution, type SessionChannelContribution, type SessionFrameSender, type SessionRecords, type SessionStore, type SessionStoreChannel, type SettingsFieldContribution, type SettingsFieldOption, type SettingsPanelContribution, type SettingsPanelProps, type SettingsSectionContribution, type SlotDataFill, type SlotDeclaration, type SlotFillContribution, type SurfaceContribution, type TabContribution, type ThreadViewOptions, type ToolMessageRenderProps, type ToolPromptContribution, type ToolPromptDialog, type ToolPromptRenderProps, type ToolRendererContribution, type ToolResultView, type TransientTab, type WebHubChannel, type WebPluginContextItem, type WebPluginDefinition, type WebPluginRuntime, type WebPluginSlotProps, defineGlobalStore, defineSessionChannel, defineSessionStore, defineSlot, defineWebPlugin, toolResultText, toolResultTextLines };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ModelContext, ModelContextAbortSignal, ModelContextBinding, ModelContextExecutionOptions, ModelContextRegistrationOptions, ModelContextTool, ModelContextToolChangeEvent, ModelContextToolChangeListener, ModelContextToolDescriptor } from "./types/modelContext.mjs";
|
|
2
|
+
import { ActivityGroupContribution, ComposerCapture, ComposerSubmission, ContextAction, ContextActionContribution, ContextActionRunContext, DockFaceContribution, FileLinkSource, GlobalStore, LeaderBindingContribution, LeaderKeyContribution, MinorModeContribution, PaletteCommandContext, PaletteCommandContribution, RepositorySettingsPanelContribution, RepositorySettingsPanelProps, RepositorySettingsRepository, SelectionAxisContribution, SessionChannelContribution, SessionFrameSender, SessionRecords, SessionStore, SessionStoreChannel, SettingsFieldContribution, SettingsFieldOption, SettingsPanelContribution, SettingsPanelProps, SettingsSectionContribution, SlotDataFill, SlotDeclaration, SlotFillContribution, SurfaceContribution, TabContribution, ThreadViewOptions, ToolMessageRenderProps, ToolPromptContribution, ToolPromptDialog, ToolPromptRenderProps, ToolRendererContribution, ToolResultView, TransientTab, WebPluginContextItem, WebPluginDefinition, WebPluginRuntime, WebPluginSlotProps } from "./types/webPlugin.mjs";
|
|
2
3
|
import { defineSessionChannel, defineSlot, defineWebPlugin } from "./services/define.mjs";
|
|
3
4
|
import { defineGlobalStore } from "./services/globalStore.mjs";
|
|
4
5
|
import { defineSessionStore } from "./services/sessionStore.mjs";
|
|
5
6
|
import { toolResultText, toolResultTextLines } from "./services/toolResult.mjs";
|
|
6
|
-
import { ChannelFrame, HubChannelConnection, HubChannelHost, HubChannelLifecycle, HubChannelSource, HubSessionApiRequest, HubSessionScope, WebHubChannel } from "./types/webHub.mjs";
|
|
7
|
-
export { type ActivityGroupContribution, type ChannelFrame, type ContextAction, type ContextActionContribution, type ContextActionRunContext, type FileLinkSource, type GlobalStore, type HubChannelConnection, type HubChannelHost, type HubChannelLifecycle, type HubChannelSource, type HubSessionApiRequest, type HubSessionScope, type LeaderBindingContribution, type LeaderKeyContribution, type MinorModeContribution, type PaletteCommandContext, type PaletteCommandContribution, type RepositorySettingsPanelContribution, type RepositorySettingsPanelProps, type RepositorySettingsRepository, type SelectionAxisContribution, type SessionChannelContribution, type SessionFrameSender, type SessionRecords, type SessionStore, type SessionStoreChannel, type SettingsFieldContribution, type SettingsFieldOption, type SettingsPanelContribution, type SettingsPanelProps, type SettingsSectionContribution, type SlotDataFill, type SlotDeclaration, type SlotFillContribution, type SurfaceContribution, type TabContribution, type ThreadViewOptions, type ToolMessageRenderProps, type ToolPromptContribution, type ToolPromptDialog, type ToolPromptRenderProps, type ToolRendererContribution, type ToolResultView, type TransientTab, type WebHubChannel, type WebPluginContextItem, type WebPluginDefinition, type WebPluginRuntime, type WebPluginSlotProps, defineGlobalStore, defineSessionChannel, defineSessionStore, defineSlot, defineWebPlugin, toolResultText, toolResultTextLines };
|
|
7
|
+
import { ChannelFrame, ComputerUseHostBinding, ComputerUseHostOperation, ComputerUseHostRequest, HubChannelConnection, HubChannelHost, HubChannelLifecycle, HubChannelSource, HubSessionApiRequest, HubSessionScope, WebHubChannel } from "./types/webHub.mjs";
|
|
8
|
+
export { type ActivityGroupContribution, type ChannelFrame, type ComposerCapture, type ComposerSubmission, type ComputerUseHostBinding, type ComputerUseHostOperation, type ComputerUseHostRequest, type ContextAction, type ContextActionContribution, type ContextActionRunContext, type DockFaceContribution, type FileLinkSource, type GlobalStore, type HubChannelConnection, type HubChannelHost, type HubChannelLifecycle, type HubChannelSource, type HubSessionApiRequest, type HubSessionScope, type LeaderBindingContribution, type LeaderKeyContribution, type MinorModeContribution, type ModelContext, type ModelContextAbortSignal, type ModelContextBinding, type ModelContextExecutionOptions, type ModelContextRegistrationOptions, type ModelContextTool, type ModelContextToolChangeEvent, type ModelContextToolChangeListener, type ModelContextToolDescriptor, type PaletteCommandContext, type PaletteCommandContribution, type RepositorySettingsPanelContribution, type RepositorySettingsPanelProps, type RepositorySettingsRepository, type SelectionAxisContribution, type SessionChannelContribution, type SessionFrameSender, type SessionRecords, type SessionStore, type SessionStoreChannel, type SettingsFieldContribution, type SettingsFieldOption, type SettingsPanelContribution, type SettingsPanelProps, type SettingsSectionContribution, type SlotDataFill, type SlotDeclaration, type SlotFillContribution, type SurfaceContribution, type TabContribution, type ThreadViewOptions, type ToolMessageRenderProps, type ToolPromptContribution, type ToolPromptDialog, type ToolPromptRenderProps, type ToolRendererContribution, type ToolResultView, type TransientTab, type WebHubChannel, type WebPluginContextItem, type WebPluginDefinition, type WebPluginRuntime, type WebPluginSlotProps, defineGlobalStore, defineSessionChannel, defineSessionStore, defineSlot, defineWebPlugin, toolResultText, toolResultTextLines };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function e(e={}){let t=[],n={sessionId:e.sessionId===void 0?`s1`:e.sessionId,statuses:e.statuses??{},openTab:e=>{t.push({action:`openTab`,target:e})},openTransientTab:e=>{t.push({action:`openTransientTab`,target:e.id})},closeTransientTab:e=>{t.push({action:`closeTransientTab`,target:e})},fileTabFor:t=>e.fileTab?.(t),appendComposerDraft:e=>{t.push({action:`appendComposerDraft`,target:n.sessionId,text:e})},attachComposerContext:e=>{t.push({action:`attachComposerContext`,target:n.sessionId,context:e})},contextActionsFor:t=>e.contextActions?.(t)??[],sendSessionFrame:(e,n)=>{t.push({action:`sendSessionFrame`,target:e,frame:n})},renderThread:(t,n)=>e.thread?.(t,n)??null,renderSlot:t=>e.slotContent?.[t]??null,slotData:t=>e.slotData?.[t.slot]??[]};return{props:n,actions:t,frames:()=>t.flatMap(e=>e.frame?[e.frame]:[])}}function t(t){let n=e(t),r=t.result===void 0?null:t.result;return{...n,props:{...n.props,toolCallId:t.toolCallId??`call-1`,toolName:t.toolName,args:t.args??{},result:r,output:t.output??``,running:t.running??!1,isError:t.isError??!1}}}exports.slotPropsFixture=e,exports.toolMessagePropsFixture=t;
|
|
1
|
+
function e(e={}){let t=[],n={sessionId:e.sessionId===void 0?`s1`:e.sessionId,statuses:e.statuses??{},openTab:e=>{t.push({action:`openTab`,target:e})},openTransientTab:e=>{t.push({action:`openTransientTab`,target:e.id})},closeTransientTab:e=>{t.push({action:`closeTransientTab`,target:e})},fileTabFor:t=>e.fileTab?.(t),appendComposerDraft:e=>{t.push({action:`appendComposerDraft`,target:n.sessionId,text:e})},attachComposerContext:e=>{t.push({action:`attachComposerContext`,target:n.sessionId,context:e})},attachComposerCapture:e=>{t.push({action:`attachComposerCapture`,target:n.sessionId,capture:e})},contextActionsFor:t=>e.contextActions?.(t)??[],sendSessionFrame:(e,n)=>{t.push({action:`sendSessionFrame`,target:e,frame:n})},renderThread:(t,n)=>e.thread?.(t,n)??null,renderSlot:t=>e.slotContent?.[t]??null,slotData:t=>e.slotData?.[t.slot]??[]};return{props:n,actions:t,frames:()=>t.flatMap(e=>e.frame?[e.frame]:[])}}function t(t){let n=e(t),r=t.result===void 0?null:t.result;return{...n,props:{...n.props,toolCallId:t.toolCallId??`call-1`,toolName:t.toolName,args:t.args??{},result:r,output:t.output??``,running:t.running??!1,isError:t.isError??!1}}}exports.slotPropsFixture=e,exports.toolMessagePropsFixture=t;
|
|
2
2
|
//# sourceMappingURL=slotProps.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slotProps.cjs","names":[],"sources":["../../../src/services/testing/slotProps.ts"],"sourcesContent":["import type { ReactNode } from 'react';\nimport type {\n ContextAction,\n SlotDataFill,\n SlotDeclaration,\n ThreadViewOptions,\n ToolMessageRenderProps,\n ToolResultView,\n TransientTab,\n WebPluginContextItem,\n WebPluginSlotProps,\n} from '../../types/webPlugin.ts';\n\n/**\n * The props the cockpit hands a plugin's components, built for a test.\n *\n * A plugin component takes fifteen props and reads three of them. Written out\n * by hand in each test, the other twelve are noise that goes stale the moment\n * the contract grows a member; written as a cast, the component compiles\n * against props the host never sends. This builds all of them, records what the\n * component did with the actions, and lets a test override the two or three it\n * cares about.\n */\n\nexport interface RecordedSlotAction {\n action:\n | 'appendComposerDraft'\n | 'attachComposerContext'\n | 'openTab'\n | 'openTransientTab'\n | 'closeTransientTab'\n | 'sendSessionFrame';\n /** The tab id, the transient tab's id, or the target session of a frame or composer action. */\n target: string | null;\n /** The text passed to `appendComposerDraft`. */\n text?: string;\n /** The structured item passed to `attachComposerContext`. */\n context?: WebPluginContextItem;\n /** The frame a component sent, for `sendSessionFrame`. */\n frame?: Record<string, unknown>;\n}\n\nexport interface SlotPropsFixture {\n props: WebPluginSlotProps;\n /** Everything the component did through its props, in order. */\n readonly actions: readonly RecordedSlotAction[];\n /** Frames the component sent, which is what most assertions want. */\n frames(): readonly Record<string, unknown>[];\n}\n\nexport interface SlotPropsOptions {\n sessionId?: string | null;\n statuses?: Readonly<Record<string, string>>;\n /** Component fills this slot owner should see; keyed by slot name. */\n slotContent?: Readonly<Record<string, ReactNode>>;\n /** Data fills this slot owner should read back, keyed by slot name. */\n slotData?: Readonly<Record<string, readonly SlotDataFill[]>>;\n /** What `renderThread` returns for a plugin that renders one. */\n thread?: (threadId: string, options?: ThreadViewOptions) => ReactNode;\n /** The tab a path opens; by default no path opens one, as with no file plugin installed. */\n fileTab?: (path: string) => TransientTab | undefined;\n /** Context actions installed plugins should offer for the item under test. */\n contextActions?: (item: WebPluginContextItem) => readonly ContextAction[];\n}\n\nconst DEFAULT_SESSION_ID = 's1';\n\nexport function slotPropsFixture(options: SlotPropsOptions = {}): SlotPropsFixture {\n const actions: RecordedSlotAction[] = [];\n const props: WebPluginSlotProps = {\n sessionId: options.sessionId === undefined ? DEFAULT_SESSION_ID : options.sessionId,\n statuses: options.statuses ?? {},\n openTab: (tabId) => {\n actions.push({ action: 'openTab', target: tabId });\n },\n openTransientTab: (tab: TransientTab) => {\n actions.push({ action: 'openTransientTab', target: tab.id });\n },\n closeTransientTab: (tabId: string) => {\n actions.push({ action: 'closeTransientTab', target: tabId });\n },\n fileTabFor: (path: string) => options.fileTab?.(path),\n appendComposerDraft: (text) => {\n actions.push({ action: 'appendComposerDraft', target: props.sessionId, text });\n },\n attachComposerContext: (context) => {\n actions.push({ action: 'attachComposerContext', target: props.sessionId, context });\n },\n contextActionsFor: (item) => options.contextActions?.(item) ?? [],\n sendSessionFrame: (sessionId, frame) => {\n actions.push({ action: 'sendSessionFrame', target: sessionId, frame });\n },\n renderThread: (threadId, threadOptions) => options.thread?.(threadId, threadOptions) ?? null,\n renderSlot: (slot) => options.slotContent?.[slot] ?? null,\n // The host resolves fills by slot name and hands the owner its own typed\n // view, so a test declares them by name too.\n slotData: <Data>(slot: SlotDeclaration<Data>) =>\n (options.slotData?.[slot.slot] ?? []) as readonly SlotDataFill<Data>[],\n };\n\n return {\n props,\n actions,\n frames: () => actions.flatMap((entry) => (entry.frame ? [entry.frame] : [])),\n };\n}\n\nexport interface ToolMessagePropsOptions extends SlotPropsOptions {\n toolCallId?: string;\n toolName: string;\n args?: Record<string, unknown>;\n /** The newest result; null is what the host sends before any output. */\n result?: ToolResultView | null;\n /** The result's text blocks joined, as the host's own fallback item shows them. */\n output?: string;\n running?: boolean;\n isError?: boolean;\n}\n\nexport interface ToolMessagePropsFixture extends Omit<SlotPropsFixture, 'props'> {\n props: ToolMessageRenderProps;\n}\n\nconst DEFAULT_TOOL_CALL_ID = 'call-1';\n\n/** The props a tool's timeline item receives, in any of its four states. */\nexport function toolMessagePropsFixture(options: ToolMessagePropsOptions): ToolMessagePropsFixture {\n const base = slotPropsFixture(options);\n const result = options.result === undefined ? null : options.result;\n return {\n ...base,\n props: {\n ...base.props,\n toolCallId: options.toolCallId ?? DEFAULT_TOOL_CALL_ID,\n toolName: options.toolName,\n args: options.args ?? {},\n result,\n output: options.output ?? '',\n running: options.running ?? false,\n isError: options.isError ?? false,\n },\n };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"slotProps.cjs","names":[],"sources":["../../../src/services/testing/slotProps.ts"],"sourcesContent":["import type { ReactNode } from 'react';\nimport type {\n ComposerCapture,\n ContextAction,\n SlotDataFill,\n SlotDeclaration,\n ThreadViewOptions,\n ToolMessageRenderProps,\n ToolResultView,\n TransientTab,\n WebPluginContextItem,\n WebPluginSlotProps,\n} from '../../types/webPlugin.ts';\n\n/**\n * The props the cockpit hands a plugin's components, built for a test.\n *\n * A plugin component takes fifteen props and reads three of them. Written out\n * by hand in each test, the other twelve are noise that goes stale the moment\n * the contract grows a member; written as a cast, the component compiles\n * against props the host never sends. This builds all of them, records what the\n * component did with the actions, and lets a test override the two or three it\n * cares about.\n */\n\nexport interface RecordedSlotAction {\n action:\n | 'appendComposerDraft'\n | 'attachComposerCapture'\n | 'attachComposerContext'\n | 'openTab'\n | 'openTransientTab'\n | 'closeTransientTab'\n | 'sendSessionFrame';\n /** The tab id, the transient tab's id, or the target session of a frame or composer action. */\n target: string | null;\n /** The text passed to `appendComposerDraft`. */\n text?: string;\n /** The structured item passed to `attachComposerContext`. */\n context?: WebPluginContextItem;\n /** The atomic screenshot and context passed to `attachComposerCapture`. */\n capture?: ComposerCapture;\n /** The frame a component sent, for `sendSessionFrame`. */\n frame?: Record<string, unknown>;\n}\n\nexport interface SlotPropsFixture {\n props: WebPluginSlotProps;\n /** Everything the component did through its props, in order. */\n readonly actions: readonly RecordedSlotAction[];\n /** Frames the component sent, which is what most assertions want. */\n frames(): readonly Record<string, unknown>[];\n}\n\nexport interface SlotPropsOptions {\n sessionId?: string | null;\n statuses?: Readonly<Record<string, string>>;\n /** Component fills this slot owner should see; keyed by slot name. */\n slotContent?: Readonly<Record<string, ReactNode>>;\n /** Data fills this slot owner should read back, keyed by slot name. */\n slotData?: Readonly<Record<string, readonly SlotDataFill[]>>;\n /** What `renderThread` returns for a plugin that renders one. */\n thread?: (threadId: string, options?: ThreadViewOptions) => ReactNode;\n /** The tab a path opens; by default no path opens one, as with no file plugin installed. */\n fileTab?: (path: string) => TransientTab | undefined;\n /** Context actions installed plugins should offer for the item under test. */\n contextActions?: (item: WebPluginContextItem) => readonly ContextAction[];\n}\n\nconst DEFAULT_SESSION_ID = 's1';\n\nexport function slotPropsFixture(options: SlotPropsOptions = {}): SlotPropsFixture {\n const actions: RecordedSlotAction[] = [];\n const props: WebPluginSlotProps = {\n sessionId: options.sessionId === undefined ? DEFAULT_SESSION_ID : options.sessionId,\n statuses: options.statuses ?? {},\n openTab: (tabId) => {\n actions.push({ action: 'openTab', target: tabId });\n },\n openTransientTab: (tab: TransientTab) => {\n actions.push({ action: 'openTransientTab', target: tab.id });\n },\n closeTransientTab: (tabId: string) => {\n actions.push({ action: 'closeTransientTab', target: tabId });\n },\n fileTabFor: (path: string) => options.fileTab?.(path),\n appendComposerDraft: (text) => {\n actions.push({ action: 'appendComposerDraft', target: props.sessionId, text });\n },\n attachComposerContext: (context) => {\n actions.push({ action: 'attachComposerContext', target: props.sessionId, context });\n },\n attachComposerCapture: (capture) => {\n actions.push({ action: 'attachComposerCapture', target: props.sessionId, capture });\n },\n contextActionsFor: (item) => options.contextActions?.(item) ?? [],\n sendSessionFrame: (sessionId, frame) => {\n actions.push({ action: 'sendSessionFrame', target: sessionId, frame });\n },\n renderThread: (threadId, threadOptions) => options.thread?.(threadId, threadOptions) ?? null,\n renderSlot: (slot) => options.slotContent?.[slot] ?? null,\n // The host resolves fills by slot name and hands the owner its own typed\n // view, so a test declares them by name too.\n slotData: <Data>(slot: SlotDeclaration<Data>) =>\n (options.slotData?.[slot.slot] ?? []) as readonly SlotDataFill<Data>[],\n };\n\n return {\n props,\n actions,\n frames: () => actions.flatMap((entry) => (entry.frame ? [entry.frame] : [])),\n };\n}\n\nexport interface ToolMessagePropsOptions extends SlotPropsOptions {\n toolCallId?: string;\n toolName: string;\n args?: Record<string, unknown>;\n /** The newest result; null is what the host sends before any output. */\n result?: ToolResultView | null;\n /** The result's text blocks joined, as the host's own fallback item shows them. */\n output?: string;\n running?: boolean;\n isError?: boolean;\n}\n\nexport interface ToolMessagePropsFixture extends Omit<SlotPropsFixture, 'props'> {\n props: ToolMessageRenderProps;\n}\n\nconst DEFAULT_TOOL_CALL_ID = 'call-1';\n\n/** The props a tool's timeline item receives, in any of its four states. */\nexport function toolMessagePropsFixture(options: ToolMessagePropsOptions): ToolMessagePropsFixture {\n const base = slotPropsFixture(options);\n const result = options.result === undefined ? null : options.result;\n return {\n ...base,\n props: {\n ...base.props,\n toolCallId: options.toolCallId ?? DEFAULT_TOOL_CALL_ID,\n toolName: options.toolName,\n args: options.args ?? {},\n result,\n output: options.output ?? '',\n running: options.running ?? false,\n isError: options.isError ?? false,\n },\n };\n}\n"],"mappings":"AAuEA,SAAgB,EAAiB,EAA4B,CAAC,EAAqB,CACjF,IAAM,EAAgC,CAAC,EACjC,EAA4B,CAChC,UAAW,EAAQ,YAAc,IAAA,GAAY,KAAqB,EAAQ,UAC1E,SAAU,EAAQ,UAAY,CAAC,EAC/B,QAAU,GAAU,CAClB,EAAQ,KAAK,CAAE,OAAQ,UAAW,OAAQ,CAAM,CAAC,CACnD,EACA,iBAAmB,GAAsB,CACvC,EAAQ,KAAK,CAAE,OAAQ,mBAAoB,OAAQ,EAAI,EAAG,CAAC,CAC7D,EACA,kBAAoB,GAAkB,CACpC,EAAQ,KAAK,CAAE,OAAQ,oBAAqB,OAAQ,CAAM,CAAC,CAC7D,EACA,WAAa,GAAiB,EAAQ,UAAU,CAAI,EACpD,oBAAsB,GAAS,CAC7B,EAAQ,KAAK,CAAE,OAAQ,sBAAuB,OAAQ,EAAM,UAAW,MAAK,CAAC,CAC/E,EACA,sBAAwB,GAAY,CAClC,EAAQ,KAAK,CAAE,OAAQ,wBAAyB,OAAQ,EAAM,UAAW,SAAQ,CAAC,CACpF,EACA,sBAAwB,GAAY,CAClC,EAAQ,KAAK,CAAE,OAAQ,wBAAyB,OAAQ,EAAM,UAAW,SAAQ,CAAC,CACpF,EACA,kBAAoB,GAAS,EAAQ,iBAAiB,CAAI,GAAK,CAAC,EAChE,kBAAmB,EAAW,IAAU,CACtC,EAAQ,KAAK,CAAE,OAAQ,mBAAoB,OAAQ,EAAW,OAAM,CAAC,CACvE,EACA,cAAe,EAAU,IAAkB,EAAQ,SAAS,EAAU,CAAa,GAAK,KACxF,WAAa,GAAS,EAAQ,cAAc,IAAS,KAGrD,SAAiB,GACd,EAAQ,WAAW,EAAK,OAAS,CAAC,CACvC,EAEA,MAAO,CACL,QACA,UACA,WAAc,EAAQ,QAAS,GAAW,EAAM,MAAQ,CAAC,EAAM,KAAK,EAAI,CAAC,CAAE,CAC7E,CACF,CAqBA,SAAgB,EAAwB,EAA2D,CACjG,IAAM,EAAO,EAAiB,CAAO,EAC/B,EAAS,EAAQ,SAAW,IAAA,GAAY,KAAO,EAAQ,OAC7D,MAAO,CACL,GAAG,EACH,MAAO,CACL,GAAG,EAAK,MACR,WAAY,EAAQ,YAAc,SAClC,SAAU,EAAQ,SAClB,KAAM,EAAQ,MAAQ,CAAC,EACvB,SACA,OAAQ,EAAQ,QAAU,GAC1B,QAAS,EAAQ,SAAW,GAC5B,QAAS,EAAQ,SAAW,EAC9B,CACF,CACF"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContextAction, SlotDataFill, ThreadViewOptions, ToolMessageRenderProps, ToolResultView, TransientTab, WebPluginContextItem, WebPluginSlotProps } from "../../types/webPlugin.cjs";
|
|
1
|
+
import { ComposerCapture, ContextAction, SlotDataFill, ThreadViewOptions, ToolMessageRenderProps, ToolResultView, TransientTab, WebPluginContextItem, WebPluginSlotProps } from "../../types/webPlugin.cjs";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
//#region src/services/testing/slotProps.d.ts
|
|
4
4
|
/**
|
|
@@ -12,13 +12,15 @@ import { ReactNode } from "react";
|
|
|
12
12
|
* cares about.
|
|
13
13
|
*/
|
|
14
14
|
interface RecordedSlotAction {
|
|
15
|
-
action: 'appendComposerDraft' | 'attachComposerContext' | 'openTab' | 'openTransientTab' | 'closeTransientTab' | 'sendSessionFrame';
|
|
15
|
+
action: 'appendComposerDraft' | 'attachComposerCapture' | 'attachComposerContext' | 'openTab' | 'openTransientTab' | 'closeTransientTab' | 'sendSessionFrame';
|
|
16
16
|
/** The tab id, the transient tab's id, or the target session of a frame or composer action. */
|
|
17
17
|
target: string | null;
|
|
18
18
|
/** The text passed to `appendComposerDraft`. */
|
|
19
19
|
text?: string;
|
|
20
20
|
/** The structured item passed to `attachComposerContext`. */
|
|
21
21
|
context?: WebPluginContextItem;
|
|
22
|
+
/** The atomic screenshot and context passed to `attachComposerCapture`. */
|
|
23
|
+
capture?: ComposerCapture;
|
|
22
24
|
/** The frame a component sent, for `sendSessionFrame`. */
|
|
23
25
|
frame?: Record<string, unknown>;
|
|
24
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slotProps.d.cts","names":[],"sources":["../../../src/services/testing/slotProps.ts"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"slotProps.d.cts","names":[],"sources":["../../../src/services/testing/slotProps.ts"],"mappings":";;;;;;;;;;;;;UAyBiB;EACf;;EASA;;EAEA;;EAEA,UAAU;;EAEV,UAAU;;EAEV,QAAQ;;UAGO;EACf,OAAO;;WAEE,kBAAkB;;EAE3B,mBAAmB;;UAGJ;EACf;EACA,WAAW,SAAS;;EAEpB,cAAc,SAAS,eAAe;;EAEtC,WAAW,SAAS,wBAAwB;;EAE5C,UAAU,kBAAkB,UAAU,sBAAsB;;EAE5D,WAAW,iBAAiB;;EAE5B,kBAAkB,MAAM,kCAAkC;;iBAK5C,iBAAiB,UAAS,mBAAwB;UA2CjD,gCAAgC;EAC/C;EACA;EACA,OAAO;;EAEP,SAAS;;EAET;EACA;EACA;;UAGe,gCAAgC,KAAK;EACpD,OAAO;;;iBAMO,wBAAwB,SAAS,0BAA0B"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ContextAction, SlotDataFill, ThreadViewOptions, ToolMessageRenderProps, ToolResultView, TransientTab, WebPluginContextItem, WebPluginSlotProps } from "../../types/webPlugin.mjs";
|
|
1
|
+
import { ComposerCapture, ContextAction, SlotDataFill, ThreadViewOptions, ToolMessageRenderProps, ToolResultView, TransientTab, WebPluginContextItem, WebPluginSlotProps } from "../../types/webPlugin.mjs";
|
|
2
2
|
import { ReactNode } from "react";
|
|
3
3
|
//#region src/services/testing/slotProps.d.ts
|
|
4
4
|
/**
|
|
@@ -12,13 +12,15 @@ import { ReactNode } from "react";
|
|
|
12
12
|
* cares about.
|
|
13
13
|
*/
|
|
14
14
|
interface RecordedSlotAction {
|
|
15
|
-
action: 'appendComposerDraft' | 'attachComposerContext' | 'openTab' | 'openTransientTab' | 'closeTransientTab' | 'sendSessionFrame';
|
|
15
|
+
action: 'appendComposerDraft' | 'attachComposerCapture' | 'attachComposerContext' | 'openTab' | 'openTransientTab' | 'closeTransientTab' | 'sendSessionFrame';
|
|
16
16
|
/** The tab id, the transient tab's id, or the target session of a frame or composer action. */
|
|
17
17
|
target: string | null;
|
|
18
18
|
/** The text passed to `appendComposerDraft`. */
|
|
19
19
|
text?: string;
|
|
20
20
|
/** The structured item passed to `attachComposerContext`. */
|
|
21
21
|
context?: WebPluginContextItem;
|
|
22
|
+
/** The atomic screenshot and context passed to `attachComposerCapture`. */
|
|
23
|
+
capture?: ComposerCapture;
|
|
22
24
|
/** The frame a component sent, for `sendSessionFrame`. */
|
|
23
25
|
frame?: Record<string, unknown>;
|
|
24
26
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slotProps.d.mts","names":[],"sources":["../../../src/services/testing/slotProps.ts"],"mappings":";;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"slotProps.d.mts","names":[],"sources":["../../../src/services/testing/slotProps.ts"],"mappings":";;;;;;;;;;;;;UAyBiB;EACf;;EASA;;EAEA;;EAEA,UAAU;;EAEV,UAAU;;EAEV,QAAQ;;UAGO;EACf,OAAO;;WAEE,kBAAkB;;EAE3B,mBAAmB;;UAGJ;EACf;EACA,WAAW,SAAS;;EAEpB,cAAc,SAAS,eAAe;;EAEtC,WAAW,SAAS,wBAAwB;;EAE5C,UAAU,kBAAkB,UAAU,sBAAsB;;EAE5D,WAAW,iBAAiB;;EAE5B,kBAAkB,MAAM,kCAAkC;;iBAK5C,iBAAiB,UAAS,mBAAwB;UA2CjD,gCAAgC;EAC/C;EACA;EACA,OAAO;;EAEP,SAAS;;EAET;EACA;EACA;;UAGe,gCAAgC,KAAK;EACpD,OAAO;;;iBAMO,wBAAwB,SAAS,0BAA0B"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
function e(e={}){let t=[],n={sessionId:e.sessionId===void 0?`s1`:e.sessionId,statuses:e.statuses??{},openTab:e=>{t.push({action:`openTab`,target:e})},openTransientTab:e=>{t.push({action:`openTransientTab`,target:e.id})},closeTransientTab:e=>{t.push({action:`closeTransientTab`,target:e})},fileTabFor:t=>e.fileTab?.(t),appendComposerDraft:e=>{t.push({action:`appendComposerDraft`,target:n.sessionId,text:e})},attachComposerContext:e=>{t.push({action:`attachComposerContext`,target:n.sessionId,context:e})},contextActionsFor:t=>e.contextActions?.(t)??[],sendSessionFrame:(e,n)=>{t.push({action:`sendSessionFrame`,target:e,frame:n})},renderThread:(t,n)=>e.thread?.(t,n)??null,renderSlot:t=>e.slotContent?.[t]??null,slotData:t=>e.slotData?.[t.slot]??[]};return{props:n,actions:t,frames:()=>t.flatMap(e=>e.frame?[e.frame]:[])}}function t(t){let n=e(t),r=t.result===void 0?null:t.result;return{...n,props:{...n.props,toolCallId:t.toolCallId??`call-1`,toolName:t.toolName,args:t.args??{},result:r,output:t.output??``,running:t.running??!1,isError:t.isError??!1}}}export{e as slotPropsFixture,t as toolMessagePropsFixture};
|
|
1
|
+
function e(e={}){let t=[],n={sessionId:e.sessionId===void 0?`s1`:e.sessionId,statuses:e.statuses??{},openTab:e=>{t.push({action:`openTab`,target:e})},openTransientTab:e=>{t.push({action:`openTransientTab`,target:e.id})},closeTransientTab:e=>{t.push({action:`closeTransientTab`,target:e})},fileTabFor:t=>e.fileTab?.(t),appendComposerDraft:e=>{t.push({action:`appendComposerDraft`,target:n.sessionId,text:e})},attachComposerContext:e=>{t.push({action:`attachComposerContext`,target:n.sessionId,context:e})},attachComposerCapture:e=>{t.push({action:`attachComposerCapture`,target:n.sessionId,capture:e})},contextActionsFor:t=>e.contextActions?.(t)??[],sendSessionFrame:(e,n)=>{t.push({action:`sendSessionFrame`,target:e,frame:n})},renderThread:(t,n)=>e.thread?.(t,n)??null,renderSlot:t=>e.slotContent?.[t]??null,slotData:t=>e.slotData?.[t.slot]??[]};return{props:n,actions:t,frames:()=>t.flatMap(e=>e.frame?[e.frame]:[])}}function t(t){let n=e(t),r=t.result===void 0?null:t.result;return{...n,props:{...n.props,toolCallId:t.toolCallId??`call-1`,toolName:t.toolName,args:t.args??{},result:r,output:t.output??``,running:t.running??!1,isError:t.isError??!1}}}export{e as slotPropsFixture,t as toolMessagePropsFixture};
|
|
2
2
|
//# sourceMappingURL=slotProps.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"slotProps.mjs","names":[],"sources":["../../../src/services/testing/slotProps.ts"],"sourcesContent":["import type { ReactNode } from 'react';\nimport type {\n ContextAction,\n SlotDataFill,\n SlotDeclaration,\n ThreadViewOptions,\n ToolMessageRenderProps,\n ToolResultView,\n TransientTab,\n WebPluginContextItem,\n WebPluginSlotProps,\n} from '../../types/webPlugin.ts';\n\n/**\n * The props the cockpit hands a plugin's components, built for a test.\n *\n * A plugin component takes fifteen props and reads three of them. Written out\n * by hand in each test, the other twelve are noise that goes stale the moment\n * the contract grows a member; written as a cast, the component compiles\n * against props the host never sends. This builds all of them, records what the\n * component did with the actions, and lets a test override the two or three it\n * cares about.\n */\n\nexport interface RecordedSlotAction {\n action:\n | 'appendComposerDraft'\n | 'attachComposerContext'\n | 'openTab'\n | 'openTransientTab'\n | 'closeTransientTab'\n | 'sendSessionFrame';\n /** The tab id, the transient tab's id, or the target session of a frame or composer action. */\n target: string | null;\n /** The text passed to `appendComposerDraft`. */\n text?: string;\n /** The structured item passed to `attachComposerContext`. */\n context?: WebPluginContextItem;\n /** The frame a component sent, for `sendSessionFrame`. */\n frame?: Record<string, unknown>;\n}\n\nexport interface SlotPropsFixture {\n props: WebPluginSlotProps;\n /** Everything the component did through its props, in order. */\n readonly actions: readonly RecordedSlotAction[];\n /** Frames the component sent, which is what most assertions want. */\n frames(): readonly Record<string, unknown>[];\n}\n\nexport interface SlotPropsOptions {\n sessionId?: string | null;\n statuses?: Readonly<Record<string, string>>;\n /** Component fills this slot owner should see; keyed by slot name. */\n slotContent?: Readonly<Record<string, ReactNode>>;\n /** Data fills this slot owner should read back, keyed by slot name. */\n slotData?: Readonly<Record<string, readonly SlotDataFill[]>>;\n /** What `renderThread` returns for a plugin that renders one. */\n thread?: (threadId: string, options?: ThreadViewOptions) => ReactNode;\n /** The tab a path opens; by default no path opens one, as with no file plugin installed. */\n fileTab?: (path: string) => TransientTab | undefined;\n /** Context actions installed plugins should offer for the item under test. */\n contextActions?: (item: WebPluginContextItem) => readonly ContextAction[];\n}\n\nconst DEFAULT_SESSION_ID = 's1';\n\nexport function slotPropsFixture(options: SlotPropsOptions = {}): SlotPropsFixture {\n const actions: RecordedSlotAction[] = [];\n const props: WebPluginSlotProps = {\n sessionId: options.sessionId === undefined ? DEFAULT_SESSION_ID : options.sessionId,\n statuses: options.statuses ?? {},\n openTab: (tabId) => {\n actions.push({ action: 'openTab', target: tabId });\n },\n openTransientTab: (tab: TransientTab) => {\n actions.push({ action: 'openTransientTab', target: tab.id });\n },\n closeTransientTab: (tabId: string) => {\n actions.push({ action: 'closeTransientTab', target: tabId });\n },\n fileTabFor: (path: string) => options.fileTab?.(path),\n appendComposerDraft: (text) => {\n actions.push({ action: 'appendComposerDraft', target: props.sessionId, text });\n },\n attachComposerContext: (context) => {\n actions.push({ action: 'attachComposerContext', target: props.sessionId, context });\n },\n contextActionsFor: (item) => options.contextActions?.(item) ?? [],\n sendSessionFrame: (sessionId, frame) => {\n actions.push({ action: 'sendSessionFrame', target: sessionId, frame });\n },\n renderThread: (threadId, threadOptions) => options.thread?.(threadId, threadOptions) ?? null,\n renderSlot: (slot) => options.slotContent?.[slot] ?? null,\n // The host resolves fills by slot name and hands the owner its own typed\n // view, so a test declares them by name too.\n slotData: <Data>(slot: SlotDeclaration<Data>) =>\n (options.slotData?.[slot.slot] ?? []) as readonly SlotDataFill<Data>[],\n };\n\n return {\n props,\n actions,\n frames: () => actions.flatMap((entry) => (entry.frame ? [entry.frame] : [])),\n };\n}\n\nexport interface ToolMessagePropsOptions extends SlotPropsOptions {\n toolCallId?: string;\n toolName: string;\n args?: Record<string, unknown>;\n /** The newest result; null is what the host sends before any output. */\n result?: ToolResultView | null;\n /** The result's text blocks joined, as the host's own fallback item shows them. */\n output?: string;\n running?: boolean;\n isError?: boolean;\n}\n\nexport interface ToolMessagePropsFixture extends Omit<SlotPropsFixture, 'props'> {\n props: ToolMessageRenderProps;\n}\n\nconst DEFAULT_TOOL_CALL_ID = 'call-1';\n\n/** The props a tool's timeline item receives, in any of its four states. */\nexport function toolMessagePropsFixture(options: ToolMessagePropsOptions): ToolMessagePropsFixture {\n const base = slotPropsFixture(options);\n const result = options.result === undefined ? null : options.result;\n return {\n ...base,\n props: {\n ...base.props,\n toolCallId: options.toolCallId ?? DEFAULT_TOOL_CALL_ID,\n toolName: options.toolName,\n args: options.args ?? {},\n result,\n output: options.output ?? '',\n running: options.running ?? false,\n isError: options.isError ?? false,\n },\n };\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"slotProps.mjs","names":[],"sources":["../../../src/services/testing/slotProps.ts"],"sourcesContent":["import type { ReactNode } from 'react';\nimport type {\n ComposerCapture,\n ContextAction,\n SlotDataFill,\n SlotDeclaration,\n ThreadViewOptions,\n ToolMessageRenderProps,\n ToolResultView,\n TransientTab,\n WebPluginContextItem,\n WebPluginSlotProps,\n} from '../../types/webPlugin.ts';\n\n/**\n * The props the cockpit hands a plugin's components, built for a test.\n *\n * A plugin component takes fifteen props and reads three of them. Written out\n * by hand in each test, the other twelve are noise that goes stale the moment\n * the contract grows a member; written as a cast, the component compiles\n * against props the host never sends. This builds all of them, records what the\n * component did with the actions, and lets a test override the two or three it\n * cares about.\n */\n\nexport interface RecordedSlotAction {\n action:\n | 'appendComposerDraft'\n | 'attachComposerCapture'\n | 'attachComposerContext'\n | 'openTab'\n | 'openTransientTab'\n | 'closeTransientTab'\n | 'sendSessionFrame';\n /** The tab id, the transient tab's id, or the target session of a frame or composer action. */\n target: string | null;\n /** The text passed to `appendComposerDraft`. */\n text?: string;\n /** The structured item passed to `attachComposerContext`. */\n context?: WebPluginContextItem;\n /** The atomic screenshot and context passed to `attachComposerCapture`. */\n capture?: ComposerCapture;\n /** The frame a component sent, for `sendSessionFrame`. */\n frame?: Record<string, unknown>;\n}\n\nexport interface SlotPropsFixture {\n props: WebPluginSlotProps;\n /** Everything the component did through its props, in order. */\n readonly actions: readonly RecordedSlotAction[];\n /** Frames the component sent, which is what most assertions want. */\n frames(): readonly Record<string, unknown>[];\n}\n\nexport interface SlotPropsOptions {\n sessionId?: string | null;\n statuses?: Readonly<Record<string, string>>;\n /** Component fills this slot owner should see; keyed by slot name. */\n slotContent?: Readonly<Record<string, ReactNode>>;\n /** Data fills this slot owner should read back, keyed by slot name. */\n slotData?: Readonly<Record<string, readonly SlotDataFill[]>>;\n /** What `renderThread` returns for a plugin that renders one. */\n thread?: (threadId: string, options?: ThreadViewOptions) => ReactNode;\n /** The tab a path opens; by default no path opens one, as with no file plugin installed. */\n fileTab?: (path: string) => TransientTab | undefined;\n /** Context actions installed plugins should offer for the item under test. */\n contextActions?: (item: WebPluginContextItem) => readonly ContextAction[];\n}\n\nconst DEFAULT_SESSION_ID = 's1';\n\nexport function slotPropsFixture(options: SlotPropsOptions = {}): SlotPropsFixture {\n const actions: RecordedSlotAction[] = [];\n const props: WebPluginSlotProps = {\n sessionId: options.sessionId === undefined ? DEFAULT_SESSION_ID : options.sessionId,\n statuses: options.statuses ?? {},\n openTab: (tabId) => {\n actions.push({ action: 'openTab', target: tabId });\n },\n openTransientTab: (tab: TransientTab) => {\n actions.push({ action: 'openTransientTab', target: tab.id });\n },\n closeTransientTab: (tabId: string) => {\n actions.push({ action: 'closeTransientTab', target: tabId });\n },\n fileTabFor: (path: string) => options.fileTab?.(path),\n appendComposerDraft: (text) => {\n actions.push({ action: 'appendComposerDraft', target: props.sessionId, text });\n },\n attachComposerContext: (context) => {\n actions.push({ action: 'attachComposerContext', target: props.sessionId, context });\n },\n attachComposerCapture: (capture) => {\n actions.push({ action: 'attachComposerCapture', target: props.sessionId, capture });\n },\n contextActionsFor: (item) => options.contextActions?.(item) ?? [],\n sendSessionFrame: (sessionId, frame) => {\n actions.push({ action: 'sendSessionFrame', target: sessionId, frame });\n },\n renderThread: (threadId, threadOptions) => options.thread?.(threadId, threadOptions) ?? null,\n renderSlot: (slot) => options.slotContent?.[slot] ?? null,\n // The host resolves fills by slot name and hands the owner its own typed\n // view, so a test declares them by name too.\n slotData: <Data>(slot: SlotDeclaration<Data>) =>\n (options.slotData?.[slot.slot] ?? []) as readonly SlotDataFill<Data>[],\n };\n\n return {\n props,\n actions,\n frames: () => actions.flatMap((entry) => (entry.frame ? [entry.frame] : [])),\n };\n}\n\nexport interface ToolMessagePropsOptions extends SlotPropsOptions {\n toolCallId?: string;\n toolName: string;\n args?: Record<string, unknown>;\n /** The newest result; null is what the host sends before any output. */\n result?: ToolResultView | null;\n /** The result's text blocks joined, as the host's own fallback item shows them. */\n output?: string;\n running?: boolean;\n isError?: boolean;\n}\n\nexport interface ToolMessagePropsFixture extends Omit<SlotPropsFixture, 'props'> {\n props: ToolMessageRenderProps;\n}\n\nconst DEFAULT_TOOL_CALL_ID = 'call-1';\n\n/** The props a tool's timeline item receives, in any of its four states. */\nexport function toolMessagePropsFixture(options: ToolMessagePropsOptions): ToolMessagePropsFixture {\n const base = slotPropsFixture(options);\n const result = options.result === undefined ? null : options.result;\n return {\n ...base,\n props: {\n ...base.props,\n toolCallId: options.toolCallId ?? DEFAULT_TOOL_CALL_ID,\n toolName: options.to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M,KAAK,EAAI,CAAC,CAAE,CAC7E,CACF,CAqBA,SAAgB,EAAwB,EAA2D,CACjG,IAAM,EAAO,EAAiB,CAAO,EAC/B,EAAS,EAAQ,SAAW,IAAA,GAAY,KAAO,EAAQ,OAC7D,MAAO,CACL,GAAG,EACH,MAAO,CACL,GAAG,EAAK,MACR,WAAY,EAAQ,YAAc,SAClC,SAAU,EAAQ,SAClB,KAAM,EAAQ,MAAQ,CAAC,EACvB,SACA,OAAQ,EAAQ,QAAU,GAC1B,QAAS,EAAQ,SAAW,GAC5B,QAAS,EAAQ,SAAW,EAC9B,CACF,CACF"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//#region src/types/modelContext.d.ts
|
|
2
|
+
/** The model-visible part of a WebMCP tool registration. */
|
|
3
|
+
interface ModelContextToolDescriptor {
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly description: string;
|
|
6
|
+
readonly inputSchema: Readonly<Record<string, unknown>>;
|
|
7
|
+
}
|
|
8
|
+
interface ModelContextAbortSignal {
|
|
9
|
+
readonly aborted: boolean;
|
|
10
|
+
readonly reason?: unknown;
|
|
11
|
+
addEventListener(type: 'abort', listener: () => void, options?: {
|
|
12
|
+
readonly once?: boolean;
|
|
13
|
+
}): void;
|
|
14
|
+
removeEventListener(type: 'abort', listener: () => void): void;
|
|
15
|
+
}
|
|
16
|
+
interface ModelContextExecutionOptions {
|
|
17
|
+
readonly signal: ModelContextAbortSignal;
|
|
18
|
+
}
|
|
19
|
+
interface ModelContextRegistrationOptions {
|
|
20
|
+
readonly signal: ModelContextAbortSignal;
|
|
21
|
+
}
|
|
22
|
+
/** A descriptor plus the page callback that implements it. */
|
|
23
|
+
interface ModelContextTool extends ModelContextToolDescriptor {
|
|
24
|
+
execute(input: string, options: ModelContextExecutionOptions): Promise<unknown>;
|
|
25
|
+
}
|
|
26
|
+
interface ModelContextToolChangeEvent {
|
|
27
|
+
readonly type: 'toolchange';
|
|
28
|
+
}
|
|
29
|
+
type ModelContextToolChangeListener = (event: ModelContextToolChangeEvent) => void;
|
|
30
|
+
/** The common surface supplied by either the browser or DoomPi's simulator. */
|
|
31
|
+
interface ModelContext {
|
|
32
|
+
registerTool(tool: ModelContextTool, options: ModelContextRegistrationOptions): void | Promise<void>;
|
|
33
|
+
getTools(): Promise<readonly ModelContextToolDescriptor[]>;
|
|
34
|
+
executeTool(name: string, input: string, options: ModelContextExecutionOptions): Promise<unknown>;
|
|
35
|
+
addEventListener(type: 'toolchange', listener: ModelContextToolChangeListener): void;
|
|
36
|
+
removeEventListener(type: 'toolchange', listener: ModelContextToolChangeListener): void;
|
|
37
|
+
}
|
|
38
|
+
interface ModelContextBinding {
|
|
39
|
+
readonly kind: 'native' | 'simulator';
|
|
40
|
+
readonly modelContext: ModelContext;
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { ModelContext, ModelContextAbortSignal, ModelContextBinding, ModelContextExecutionOptions, ModelContextRegistrationOptions, ModelContextTool, ModelContextToolChangeEvent, ModelContextToolChangeListener, ModelContextToolDescriptor };
|
|
44
|
+
//# sourceMappingURL=modelContext.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modelContext.d.cts","names":[],"sources":["../../src/types/modelContext.ts"],"mappings":";;UACiB;WACN;WACA;WACA,aAAa,SAAS;;UAGhB;WACN;WACA;EACT,iBAAiB,eAAe,sBAAsB;aAAqB;;EAC3E,oBAAoB,eAAe;;UAGpB;WACN,QAAQ;;UAGF;WACN,QAAQ;;;UAIF,yBAAyB;EACxC,QAAQ,eAAe,SAAS,+BAA+B;;UAGhD;WACN;;KAGC,kCAAkC,OAAO;;UAGpC;EACf,aAAa,MAAM,kBAAkB,SAAS,yCAAyC;EACvF,YAAY,iBAAiB;EAC7B,YAAY,cAAc,eAAe,SAAS,+BAA+B;EACjF,iBAAiB,oBAAoB,UAAU;EAC/C,oBAAoB,oBAAoB,UAAU;;UAGnC;WACN;WACA,cAAc"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
//#region src/types/modelContext.d.ts
|
|
2
|
+
/** The model-visible part of a WebMCP tool registration. */
|
|
3
|
+
interface ModelContextToolDescriptor {
|
|
4
|
+
readonly name: string;
|
|
5
|
+
readonly description: string;
|
|
6
|
+
readonly inputSchema: Readonly<Record<string, unknown>>;
|
|
7
|
+
}
|
|
8
|
+
interface ModelContextAbortSignal {
|
|
9
|
+
readonly aborted: boolean;
|
|
10
|
+
readonly reason?: unknown;
|
|
11
|
+
addEventListener(type: 'abort', listener: () => void, options?: {
|
|
12
|
+
readonly once?: boolean;
|
|
13
|
+
}): void;
|
|
14
|
+
removeEventListener(type: 'abort', listener: () => void): void;
|
|
15
|
+
}
|
|
16
|
+
interface ModelContextExecutionOptions {
|
|
17
|
+
readonly signal: ModelContextAbortSignal;
|
|
18
|
+
}
|
|
19
|
+
interface ModelContextRegistrationOptions {
|
|
20
|
+
readonly signal: ModelContextAbortSignal;
|
|
21
|
+
}
|
|
22
|
+
/** A descriptor plus the page callback that implements it. */
|
|
23
|
+
interface ModelContextTool extends ModelContextToolDescriptor {
|
|
24
|
+
execute(input: string, options: ModelContextExecutionOptions): Promise<unknown>;
|
|
25
|
+
}
|
|
26
|
+
interface ModelContextToolChangeEvent {
|
|
27
|
+
readonly type: 'toolchange';
|
|
28
|
+
}
|
|
29
|
+
type ModelContextToolChangeListener = (event: ModelContextToolChangeEvent) => void;
|
|
30
|
+
/** The common surface supplied by either the browser or DoomPi's simulator. */
|
|
31
|
+
interface ModelContext {
|
|
32
|
+
registerTool(tool: ModelContextTool, options: ModelContextRegistrationOptions): void | Promise<void>;
|
|
33
|
+
getTools(): Promise<readonly ModelContextToolDescriptor[]>;
|
|
34
|
+
executeTool(name: string, input: string, options: ModelContextExecutionOptions): Promise<unknown>;
|
|
35
|
+
addEventListener(type: 'toolchange', listener: ModelContextToolChangeListener): void;
|
|
36
|
+
removeEventListener(type: 'toolchange', listener: ModelContextToolChangeListener): void;
|
|
37
|
+
}
|
|
38
|
+
interface ModelContextBinding {
|
|
39
|
+
readonly kind: 'native' | 'simulator';
|
|
40
|
+
readonly modelContext: ModelContext;
|
|
41
|
+
}
|
|
42
|
+
//#endregion
|
|
43
|
+
export { ModelContext, ModelContextAbortSignal, ModelContextBinding, ModelContextExecutionOptions, ModelContextRegistrationOptions, ModelContextTool, ModelContextToolChangeEvent, ModelContextToolChangeListener, ModelContextToolDescriptor };
|
|
44
|
+
//# sourceMappingURL=modelContext.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"modelContext.d.mts","names":[],"sources":["../../src/types/modelContext.ts"],"mappings":";;UACiB;WACN;WACA;WACA,aAAa,SAAS;;UAGhB;WACN;WACA;EACT,iBAAiB,eAAe,sBAAsB;aAAqB;;EAC3E,oBAAoB,eAAe;;UAGpB;WACN,QAAQ;;UAGF;WACN,QAAQ;;;UAIF,yBAAyB;EACxC,QAAQ,eAAe,SAAS,+BAA+B;;UAGhD;WACN;;KAGC,kCAAkC,OAAO;;UAGpC;EACf,aAAa,MAAM,kBAAkB,SAAS,yCAAyC;EACvF,YAAY,iBAAiB;EAC7B,YAAY,cAAc,eAAe,SAAS,+BAA+B;EACjF,iBAAiB,oBAAoB,UAAU;EAC/C,oBAAoB,oBAAoB,UAAU;;UAGnC;WACN;WACA,cAAc"}
|
package/dist/types/webHub.d.cts
CHANGED
|
@@ -27,6 +27,18 @@ interface HubSessionApiRequest {
|
|
|
27
27
|
body?: string | Uint8Array<ArrayBuffer> | null;
|
|
28
28
|
signal?: AbortSignal;
|
|
29
29
|
}
|
|
30
|
+
type ComputerUseHostOperation = 'status' | 'targets' | 'activate' | 'observe' | 'act' | 'stop';
|
|
31
|
+
interface ComputerUseHostRequest {
|
|
32
|
+
readonly operation: ComputerUseHostOperation;
|
|
33
|
+
readonly payload?: unknown;
|
|
34
|
+
readonly signal?: AbortSignal;
|
|
35
|
+
}
|
|
36
|
+
/** Narrow optional binding supplied only by a Desktop-owned cockpit hub. */
|
|
37
|
+
interface ComputerUseHostBinding {
|
|
38
|
+
readonly available: boolean;
|
|
39
|
+
request(scope: HubSessionScope, request: ComputerUseHostRequest): Promise<unknown>;
|
|
40
|
+
close?(): void;
|
|
41
|
+
}
|
|
30
42
|
interface HubChannelConnection {
|
|
31
43
|
/** Opaque for one page socket lifetime. */
|
|
32
44
|
connectionId: string;
|
|
@@ -41,6 +53,8 @@ interface HubChannelHost {
|
|
|
41
53
|
publishToConnection?(connectionId: string, sessionId: string, payload: unknown): boolean;
|
|
42
54
|
/** Authenticated machine-local transport to a session package API. */
|
|
43
55
|
requestSessionApi(scope: HubSessionScope, request: HubSessionApiRequest): Promise<Response>;
|
|
56
|
+
/** Absent unless this exact hub is the child owned by DoomPi Desktop. */
|
|
57
|
+
computerUse?: ComputerUseHostBinding;
|
|
44
58
|
onNotice(message: string): void;
|
|
45
59
|
}
|
|
46
60
|
/**
|
|
@@ -79,5 +93,5 @@ interface WebHubChannel {
|
|
|
79
93
|
disconnected?(connection: HubChannelConnection): void;
|
|
80
94
|
}
|
|
81
95
|
//#endregion
|
|
82
|
-
export { ChannelFrame, HubChannelConnection, HubChannelHost, HubChannelLifecycle, HubChannelSource, HubSessionApiRequest, HubSessionScope, WebHubChannel };
|
|
96
|
+
export { ChannelFrame, ComputerUseHostBinding, ComputerUseHostOperation, ComputerUseHostRequest, HubChannelConnection, HubChannelHost, HubChannelLifecycle, HubChannelSource, HubSessionApiRequest, HubSessionScope, WebHubChannel };
|
|
83
97
|
//# sourceMappingURL=webHub.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webHub.d.cts","names":[],"sources":["../../src/types/webHub.ts"],"mappings":";;;;;;;;;;;;UAYiB;EACf;EACA;EACA;;UAGe;EACf;;EAEA;;UAGe;EACf;EACA;EACA;EACA,gBAAgB,WAAW;EAC3B,SAAS;;
|
|
1
|
+
{"version":3,"file":"webHub.d.cts","names":[],"sources":["../../src/types/webHub.ts"],"mappings":";;;;;;;;;;;;UAYiB;EACf;EACA;EACA;;UAGe;EACf;;EAEA;;UAGe;EACf;EACA;EACA;EACA,gBAAgB,WAAW;EAC3B,SAAS;;KAGC;UAEK;WACN,WAAW;WACX;WACA,SAAS;;;UAIH;WACN;EACT,QAAQ,OAAO,iBAAiB,SAAS,yBAAyB;EAClE;;UAGe;;EAEf;;;UAIe;;EAEf,qBAAqB;;EAErB,QAAQ,mBAAmB;;EAE3B,qBAAqB,sBAAsB,mBAAmB;;EAE9D,kBAAkB,OAAO,iBAAiB,SAAS,uBAAuB,QAAQ;;EAElF,cAAc;EACd,SAAS;;;;;;;UAQM;;EAEf,WAAW,OAAO;EAClB,cAAc,OAAO;EACrB,gBAAgB;;;;;;EAMhB,eAAe,OAAO,iBAAiB;EACvC;;KAGU;UAEK;;EAEf;;;;;EAKA,YAAY;EACZ,MAAM,MAAM,iBAAiB;;EAE7B;;EAEA,SAAS,OAAO,iBAAiB,kBAAkB,YAAY;;EAE/D,cAAc,YAAY"}
|
package/dist/types/webHub.d.mts
CHANGED
|
@@ -27,6 +27,18 @@ interface HubSessionApiRequest {
|
|
|
27
27
|
body?: string | Uint8Array<ArrayBuffer> | null;
|
|
28
28
|
signal?: AbortSignal;
|
|
29
29
|
}
|
|
30
|
+
type ComputerUseHostOperation = 'status' | 'targets' | 'activate' | 'observe' | 'act' | 'stop';
|
|
31
|
+
interface ComputerUseHostRequest {
|
|
32
|
+
readonly operation: ComputerUseHostOperation;
|
|
33
|
+
readonly payload?: unknown;
|
|
34
|
+
readonly signal?: AbortSignal;
|
|
35
|
+
}
|
|
36
|
+
/** Narrow optional binding supplied only by a Desktop-owned cockpit hub. */
|
|
37
|
+
interface ComputerUseHostBinding {
|
|
38
|
+
readonly available: boolean;
|
|
39
|
+
request(scope: HubSessionScope, request: ComputerUseHostRequest): Promise<unknown>;
|
|
40
|
+
close?(): void;
|
|
41
|
+
}
|
|
30
42
|
interface HubChannelConnection {
|
|
31
43
|
/** Opaque for one page socket lifetime. */
|
|
32
44
|
connectionId: string;
|
|
@@ -41,6 +53,8 @@ interface HubChannelHost {
|
|
|
41
53
|
publishToConnection?(connectionId: string, sessionId: string, payload: unknown): boolean;
|
|
42
54
|
/** Authenticated machine-local transport to a session package API. */
|
|
43
55
|
requestSessionApi(scope: HubSessionScope, request: HubSessionApiRequest): Promise<Response>;
|
|
56
|
+
/** Absent unless this exact hub is the child owned by DoomPi Desktop. */
|
|
57
|
+
computerUse?: ComputerUseHostBinding;
|
|
44
58
|
onNotice(message: string): void;
|
|
45
59
|
}
|
|
46
60
|
/**
|
|
@@ -79,5 +93,5 @@ interface WebHubChannel {
|
|
|
79
93
|
disconnected?(connection: HubChannelConnection): void;
|
|
80
94
|
}
|
|
81
95
|
//#endregion
|
|
82
|
-
export { ChannelFrame, HubChannelConnection, HubChannelHost, HubChannelLifecycle, HubChannelSource, HubSessionApiRequest, HubSessionScope, WebHubChannel };
|
|
96
|
+
export { ChannelFrame, ComputerUseHostBinding, ComputerUseHostOperation, ComputerUseHostRequest, HubChannelConnection, HubChannelHost, HubChannelLifecycle, HubChannelSource, HubSessionApiRequest, HubSessionScope, WebHubChannel };
|
|
83
97
|
//# sourceMappingURL=webHub.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webHub.d.mts","names":[],"sources":["../../src/types/webHub.ts"],"mappings":";;;;;;;;;;;;UAYiB;EACf;EACA;EACA;;UAGe;EACf;;EAEA;;UAGe;EACf;EACA;EACA;EACA,gBAAgB,WAAW;EAC3B,SAAS;;
|
|
1
|
+
{"version":3,"file":"webHub.d.mts","names":[],"sources":["../../src/types/webHub.ts"],"mappings":";;;;;;;;;;;;UAYiB;EACf;EACA;EACA;;UAGe;EACf;;EAEA;;UAGe;EACf;EACA;EACA;EACA,gBAAgB,WAAW;EAC3B,SAAS;;KAGC;UAEK;WACN,WAAW;WACX;WACA,SAAS;;;UAIH;WACN;EACT,QAAQ,OAAO,iBAAiB,SAAS,yBAAyB;EAClE;;UAGe;;EAEf;;;UAIe;;EAEf,qBAAqB;;EAErB,QAAQ,mBAAmB;;EAE3B,qBAAqB,sBAAsB,mBAAmB;;EAE9D,kBAAkB,OAAO,iBAAiB,SAAS,uBAAuB,QAAQ;;EAElF,cAAc;EACd,SAAS;;;;;;;UAQM;;EAEf,WAAW,OAAO;EAClB,cAAc,OAAO;EACrB,gBAAgB;;;;;;EAMhB,eAAe,OAAO,iBAAiB;EACvC;;KAGU;UAEK;;EAEf;;;;;EAKA,YAAY;EACZ,MAAM,MAAM,iBAAiB;;EAE7B;;EAEA,SAAS,OAAO,iBAAiB,kBAAkB,YAAY;;EAE/D,cAAc,YAAY"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ModelContextBinding } from "./modelContext.cjs";
|
|
1
2
|
import { Store } from "@tanstack/store";
|
|
2
3
|
import { ComponentType, ReactNode } from "react";
|
|
3
4
|
//#region src/types/webPlugin.d.ts
|
|
@@ -57,6 +58,8 @@ interface TransientTab {
|
|
|
57
58
|
id: string;
|
|
58
59
|
label: string;
|
|
59
60
|
panel: ComponentType<WebPluginSlotProps>;
|
|
61
|
+
/** Keeps the host composer below this panel. Defaults to false. */
|
|
62
|
+
retainComposer?: boolean;
|
|
60
63
|
}
|
|
61
64
|
/**
|
|
62
65
|
* Which paths a message names can be opened, and what tab each one opens.
|
|
@@ -112,6 +115,22 @@ interface WebPluginContextItem {
|
|
|
112
115
|
/** Optional browser-safe destination for actions that need the source record. */
|
|
113
116
|
url?: string;
|
|
114
117
|
}
|
|
118
|
+
/** An atomic screenshot-and-context handoff from a plugin to the host composer. */
|
|
119
|
+
interface ComposerCapture {
|
|
120
|
+
/** Unprefixed base64 bytes. The host accepts PNG and JPEG only. */
|
|
121
|
+
data: string;
|
|
122
|
+
mimeType: 'image/png' | 'image/jpeg';
|
|
123
|
+
/** The model-facing context attached beside the screenshot. */
|
|
124
|
+
context: WebPluginContextItem;
|
|
125
|
+
}
|
|
126
|
+
/** One accepted composer delivery, published before its browser draft is cleared. */
|
|
127
|
+
interface ComposerSubmission {
|
|
128
|
+
sessionId: string;
|
|
129
|
+
message: string;
|
|
130
|
+
delivery: 'submit' | 'queue';
|
|
131
|
+
submittedAt: number;
|
|
132
|
+
contextItems: readonly WebPluginContextItem[];
|
|
133
|
+
}
|
|
115
134
|
/** One installed action another plugin may offer for a compatible context item. */
|
|
116
135
|
interface ContextAction {
|
|
117
136
|
/** Namespaced at install as `<pluginId>.<id>`. */
|
|
@@ -145,6 +164,8 @@ interface WebPluginSlotProps {
|
|
|
145
164
|
appendComposerDraft: (text: string) => void;
|
|
146
165
|
/** Adds browser-safe structured context as a removable chip without changing the visible draft. */
|
|
147
166
|
attachComposerContext: (item: WebPluginContextItem) => void;
|
|
167
|
+
/** Atomically stages a validated PNG or JPEG capture and its structured context for explicit submission. */
|
|
168
|
+
attachComposerCapture: (capture: ComposerCapture) => void;
|
|
148
169
|
/** Actions installed independent plugins offer for this context item, in display order. */
|
|
149
170
|
contextActionsFor: (item: WebPluginContextItem) => readonly ContextAction[];
|
|
150
171
|
/** The same sender palette commands and `start` receive; components act through it. */
|
|
@@ -160,6 +181,8 @@ interface WebPluginSlotProps {
|
|
|
160
181
|
* own surface needs the same facts the host folds into the selection bar.
|
|
161
182
|
*/
|
|
162
183
|
statuses: Readonly<Record<string, string>>;
|
|
184
|
+
/** Names of minor modes currently active in the session catalog. */
|
|
185
|
+
activeMinorModes?: readonly string[];
|
|
163
186
|
}
|
|
164
187
|
/**
|
|
165
188
|
* One contribution into a slot, keyed by (pluginId, id): independent plugins
|
|
@@ -179,6 +202,8 @@ interface TabContribution {
|
|
|
179
202
|
id: string;
|
|
180
203
|
label: string;
|
|
181
204
|
panel: ComponentType<WebPluginSlotProps>;
|
|
205
|
+
/** Keeps the host composer below this panel. Defaults to false. */
|
|
206
|
+
retainComposer?: boolean;
|
|
182
207
|
/** A React hook, fully typed inside the plugin; 0 hides the badge. */
|
|
183
208
|
useBadge?: (sessionId: string | null) => number;
|
|
184
209
|
}
|
|
@@ -295,6 +320,24 @@ interface SurfaceContribution {
|
|
|
295
320
|
id: string;
|
|
296
321
|
component: ComponentType<WebPluginSlotProps>;
|
|
297
322
|
}
|
|
323
|
+
/** One optional face inside the host-owned right dock. */
|
|
324
|
+
interface DockFaceContribution {
|
|
325
|
+
/** Unique across plugins. The host reserves `activity` and `context`. */
|
|
326
|
+
id: string;
|
|
327
|
+
label: string;
|
|
328
|
+
/** Lower values appear first after the host faces, then id breaks ties. */
|
|
329
|
+
order?: number;
|
|
330
|
+
/** Select this face when it becomes available for the focused session. */
|
|
331
|
+
autoSelect?: boolean;
|
|
332
|
+
/** Hide this face unless the session's named minor mode is active. */
|
|
333
|
+
requiredMinorMode?: string;
|
|
334
|
+
panel: ComponentType<WebPluginSlotProps>;
|
|
335
|
+
/** Optional reactive visibility owned by the contributing plugin. */
|
|
336
|
+
visibility?: {
|
|
337
|
+
subscribe(listener: () => void): () => void;
|
|
338
|
+
isVisible(sessionId: string | null): boolean;
|
|
339
|
+
};
|
|
340
|
+
}
|
|
298
341
|
interface PaletteCommandContext {
|
|
299
342
|
sessionId: string | null;
|
|
300
343
|
/** Host navigation; null returns to the conversation tab. */
|
|
@@ -605,10 +648,16 @@ interface WebPluginRuntime {
|
|
|
605
648
|
sendSessionFrame: SessionFrameSender;
|
|
606
649
|
sendHubFrame(frame: Record<string, unknown>): void;
|
|
607
650
|
onHubConnected(listener: () => void): () => void;
|
|
651
|
+
/** Acquires the browser's WebMCP surface, or the page-lifetime simulator when unavailable. */
|
|
652
|
+
acquireModelContext?(): Promise<ModelContextBinding>;
|
|
653
|
+
/** Observes accepted composer submissions for page-lifetime plugin correlation. */
|
|
654
|
+
onComposerSubmitted?(listener: (submission: ComposerSubmission) => void): () => void;
|
|
608
655
|
}
|
|
609
656
|
interface WebPluginDefinition {
|
|
610
657
|
id: string;
|
|
611
658
|
tabs?: TabContribution[];
|
|
659
|
+
/** Optional faces placed after the host-owned Activity and Context faces. */
|
|
660
|
+
dockFaces?: DockFaceContribution[];
|
|
612
661
|
channels?: SessionChannelContribution[];
|
|
613
662
|
selectionAxes?: SelectionAxisContribution[];
|
|
614
663
|
minorModes?: MinorModeContribution[];
|
|
@@ -658,5 +707,5 @@ interface WebPluginDefinition {
|
|
|
658
707
|
start?(runtime: WebPluginRuntime): (() => void) | void;
|
|
659
708
|
}
|
|
660
709
|
//#endregion
|
|
661
|
-
export { ActivityGroupActiveSource, ActivityGroupContribution, ContextAction, ContextActionContribution, ContextActionRunContext, FileLinkSource, GlobalStore, LeaderBindingBase, LeaderBindingContribution, LeaderKeyContribution, MinorModeContribution, PaletteCommandContext, PaletteCommandContribution, RepositorySettingsPanelContribution, RepositorySettingsPanelProps, RepositorySettingsRepository, SelectionAxisContribution, SessionChannelContribution, SessionFrameSender, SessionRecords, SessionStore, SessionStoreChannel, SettingsFieldContribution, SettingsFieldOption, SettingsPanelContribution, SettingsPanelProps, SettingsSectionContribution, SlotDataFill, SlotDeclaration, SlotFillContribution, SurfaceContribution, TabContribution, ThreadViewOptions, ToolMessageRenderProps, ToolPromptContribution, ToolPromptDialog, ToolPromptRenderProps, ToolRendererContribution, ToolResultView, TransientTab, WebPluginContextItem, WebPluginDefinition, WebPluginRuntime, WebPluginSlotProps };
|
|
710
|
+
export { ActivityGroupActiveSource, ActivityGroupContribution, ComposerCapture, ComposerSubmission, ContextAction, ContextActionContribution, ContextActionRunContext, DockFaceContribution, FileLinkSource, GlobalStore, LeaderBindingBase, LeaderBindingContribution, LeaderKeyContribution, MinorModeContribution, PaletteCommandContext, PaletteCommandContribution, RepositorySettingsPanelContribution, RepositorySettingsPanelProps, RepositorySettingsRepository, SelectionAxisContribution, SessionChannelContribution, SessionFrameSender, SessionRecords, SessionStore, SessionStoreChannel, SettingsFieldContribution, SettingsFieldOption, SettingsPanelContribution, SettingsPanelProps, SettingsSectionContribution, SlotDataFill, SlotDeclaration, SlotFillContribution, SurfaceContribution, TabContribution, ThreadViewOptions, ToolMessageRenderProps, ToolPromptContribution, ToolPromptDialog, ToolPromptRenderProps, ToolRendererContribution, ToolResultView, TransientTab, WebPluginContextItem, WebPluginDefinition, WebPluginRuntime, WebPluginSlotProps };
|
|
662
711
|
//# sourceMappingURL=webPlugin.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webPlugin.d.cts","names":[],"sources":["../../src/types/webPlugin.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"webPlugin.d.cts","names":[],"sources":["../../src/types/webPlugin.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;KA2BY,sBAAsB,mBAAmB,OAAO;;;;;;;;;;UAU3C,gBAAgB;EAC/B;;EAEA,OAAO,iBAAiB;;;UAGT,aAAa;EAC5B;EACA;EACA;EACA,MAAM;;;;;;;;UAQS;;EAEf;EACA;EACA,OAAO,cAAc;;EAErB;;;;;;;;;;;;UAYe;;EAEf,UAAU;;EAEV,YAAY;;EAEZ,QAAQ,0BAA0B,eAAe;;;;;;;;;;EAUjD,UAAU,0BAA0B,eAAe;;;;;;;UAOpC;;EAEf;;EAEA;;;UAIe;;EAEf;;EAEA;;EAEA;;EAEA;;EAEA;;EAEA;;;UAIe;;EAEf;EACA;;EAEA,SAAS;;;UAIM;EACf;EACA;EACA;EACA;EACA,uBAAuB;;;UAGR;;EAEf;EACA;EACA;EACA;;;UAIe;EACf;;EAEA,UAAU;;EAEV,mBAAmB,KAAK;EACxB,oBAAoB;;;;;;;EAOpB,aAAa,iBAAiB;;;;;;EAM9B,eAAe,kBAAkB,UAAU,sBAAsB;;EAEjE,sBAAsB;;EAEtB,wBAAwB,MAAM;;EAE9B,wBAAwB,SAAS;;EAEjC,oBAAoB,MAAM,kCAAkC;;EAE5D,kBAAkB;;EAElB,aAAa,iBAAiB;;EAE9B,WAAW,MAAM,MAAM,gBAAgB,mBAAmB,aAAa;;;;;;;EAOvE,UAAU,SAAS;;EAEnB;;;;;;;UAOe;EACf;EACA;;EAEA;EACA;EACA,YAAY,cAAc;;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B,mBAAmB;;;;;EAKnB,mBAAmB;;;;;;EAMnB,iBAAiB;;;;;EAKjB,0BAA0B;;EAE1B,QAAQ;;;EAGR,QAAQ;;EAER,YAAY;;EAEZ,OAAO,SAAS"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ModelContextBinding } from "./modelContext.mjs";
|
|
1
2
|
import { Store } from "@tanstack/store";
|
|
2
3
|
import { ComponentType, ReactNode } from "react";
|
|
3
4
|
//#region src/types/webPlugin.d.ts
|
|
@@ -57,6 +58,8 @@ interface TransientTab {
|
|
|
57
58
|
id: string;
|
|
58
59
|
label: string;
|
|
59
60
|
panel: ComponentType<WebPluginSlotProps>;
|
|
61
|
+
/** Keeps the host composer below this panel. Defaults to false. */
|
|
62
|
+
retainComposer?: boolean;
|
|
60
63
|
}
|
|
61
64
|
/**
|
|
62
65
|
* Which paths a message names can be opened, and what tab each one opens.
|
|
@@ -112,6 +115,22 @@ interface WebPluginContextItem {
|
|
|
112
115
|
/** Optional browser-safe destination for actions that need the source record. */
|
|
113
116
|
url?: string;
|
|
114
117
|
}
|
|
118
|
+
/** An atomic screenshot-and-context handoff from a plugin to the host composer. */
|
|
119
|
+
interface ComposerCapture {
|
|
120
|
+
/** Unprefixed base64 bytes. The host accepts PNG and JPEG only. */
|
|
121
|
+
data: string;
|
|
122
|
+
mimeType: 'image/png' | 'image/jpeg';
|
|
123
|
+
/** The model-facing context attached beside the screenshot. */
|
|
124
|
+
context: WebPluginContextItem;
|
|
125
|
+
}
|
|
126
|
+
/** One accepted composer delivery, published before its browser draft is cleared. */
|
|
127
|
+
interface ComposerSubmission {
|
|
128
|
+
sessionId: string;
|
|
129
|
+
message: string;
|
|
130
|
+
delivery: 'submit' | 'queue';
|
|
131
|
+
submittedAt: number;
|
|
132
|
+
contextItems: readonly WebPluginContextItem[];
|
|
133
|
+
}
|
|
115
134
|
/** One installed action another plugin may offer for a compatible context item. */
|
|
116
135
|
interface ContextAction {
|
|
117
136
|
/** Namespaced at install as `<pluginId>.<id>`. */
|
|
@@ -145,6 +164,8 @@ interface WebPluginSlotProps {
|
|
|
145
164
|
appendComposerDraft: (text: string) => void;
|
|
146
165
|
/** Adds browser-safe structured context as a removable chip without changing the visible draft. */
|
|
147
166
|
attachComposerContext: (item: WebPluginContextItem) => void;
|
|
167
|
+
/** Atomically stages a validated PNG or JPEG capture and its structured context for explicit submission. */
|
|
168
|
+
attachComposerCapture: (capture: ComposerCapture) => void;
|
|
148
169
|
/** Actions installed independent plugins offer for this context item, in display order. */
|
|
149
170
|
contextActionsFor: (item: WebPluginContextItem) => readonly ContextAction[];
|
|
150
171
|
/** The same sender palette commands and `start` receive; components act through it. */
|
|
@@ -160,6 +181,8 @@ interface WebPluginSlotProps {
|
|
|
160
181
|
* own surface needs the same facts the host folds into the selection bar.
|
|
161
182
|
*/
|
|
162
183
|
statuses: Readonly<Record<string, string>>;
|
|
184
|
+
/** Names of minor modes currently active in the session catalog. */
|
|
185
|
+
activeMinorModes?: readonly string[];
|
|
163
186
|
}
|
|
164
187
|
/**
|
|
165
188
|
* One contribution into a slot, keyed by (pluginId, id): independent plugins
|
|
@@ -179,6 +202,8 @@ interface TabContribution {
|
|
|
179
202
|
id: string;
|
|
180
203
|
label: string;
|
|
181
204
|
panel: ComponentType<WebPluginSlotProps>;
|
|
205
|
+
/** Keeps the host composer below this panel. Defaults to false. */
|
|
206
|
+
retainComposer?: boolean;
|
|
182
207
|
/** A React hook, fully typed inside the plugin; 0 hides the badge. */
|
|
183
208
|
useBadge?: (sessionId: string | null) => number;
|
|
184
209
|
}
|
|
@@ -295,6 +320,24 @@ interface SurfaceContribution {
|
|
|
295
320
|
id: string;
|
|
296
321
|
component: ComponentType<WebPluginSlotProps>;
|
|
297
322
|
}
|
|
323
|
+
/** One optional face inside the host-owned right dock. */
|
|
324
|
+
interface DockFaceContribution {
|
|
325
|
+
/** Unique across plugins. The host reserves `activity` and `context`. */
|
|
326
|
+
id: string;
|
|
327
|
+
label: string;
|
|
328
|
+
/** Lower values appear first after the host faces, then id breaks ties. */
|
|
329
|
+
order?: number;
|
|
330
|
+
/** Select this face when it becomes available for the focused session. */
|
|
331
|
+
autoSelect?: boolean;
|
|
332
|
+
/** Hide this face unless the session's named minor mode is active. */
|
|
333
|
+
requiredMinorMode?: string;
|
|
334
|
+
panel: ComponentType<WebPluginSlotProps>;
|
|
335
|
+
/** Optional reactive visibility owned by the contributing plugin. */
|
|
336
|
+
visibility?: {
|
|
337
|
+
subscribe(listener: () => void): () => void;
|
|
338
|
+
isVisible(sessionId: string | null): boolean;
|
|
339
|
+
};
|
|
340
|
+
}
|
|
298
341
|
interface PaletteCommandContext {
|
|
299
342
|
sessionId: string | null;
|
|
300
343
|
/** Host navigation; null returns to the conversation tab. */
|
|
@@ -605,10 +648,16 @@ interface WebPluginRuntime {
|
|
|
605
648
|
sendSessionFrame: SessionFrameSender;
|
|
606
649
|
sendHubFrame(frame: Record<string, unknown>): void;
|
|
607
650
|
onHubConnected(listener: () => void): () => void;
|
|
651
|
+
/** Acquires the browser's WebMCP surface, or the page-lifetime simulator when unavailable. */
|
|
652
|
+
acquireModelContext?(): Promise<ModelContextBinding>;
|
|
653
|
+
/** Observes accepted composer submissions for page-lifetime plugin correlation. */
|
|
654
|
+
onComposerSubmitted?(listener: (submission: ComposerSubmission) => void): () => void;
|
|
608
655
|
}
|
|
609
656
|
interface WebPluginDefinition {
|
|
610
657
|
id: string;
|
|
611
658
|
tabs?: TabContribution[];
|
|
659
|
+
/** Optional faces placed after the host-owned Activity and Context faces. */
|
|
660
|
+
dockFaces?: DockFaceContribution[];
|
|
612
661
|
channels?: SessionChannelContribution[];
|
|
613
662
|
selectionAxes?: SelectionAxisContribution[];
|
|
614
663
|
minorModes?: MinorModeContribution[];
|
|
@@ -658,5 +707,5 @@ interface WebPluginDefinition {
|
|
|
658
707
|
start?(runtime: WebPluginRuntime): (() => void) | void;
|
|
659
708
|
}
|
|
660
709
|
//#endregion
|
|
661
|
-
export { ActivityGroupActiveSource, ActivityGroupContribution, ContextAction, ContextActionContribution, ContextActionRunContext, FileLinkSource, GlobalStore, LeaderBindingBase, LeaderBindingContribution, LeaderKeyContribution, MinorModeContribution, PaletteCommandContext, PaletteCommandContribution, RepositorySettingsPanelContribution, RepositorySettingsPanelProps, RepositorySettingsRepository, SelectionAxisContribution, SessionChannelContribution, SessionFrameSender, SessionRecords, SessionStore, SessionStoreChannel, SettingsFieldContribution, SettingsFieldOption, SettingsPanelContribution, SettingsPanelProps, SettingsSectionContribution, SlotDataFill, SlotDeclaration, SlotFillContribution, SurfaceContribution, TabContribution, ThreadViewOptions, ToolMessageRenderProps, ToolPromptContribution, ToolPromptDialog, ToolPromptRenderProps, ToolRendererContribution, ToolResultView, TransientTab, WebPluginContextItem, WebPluginDefinition, WebPluginRuntime, WebPluginSlotProps };
|
|
710
|
+
export { ActivityGroupActiveSource, ActivityGroupContribution, ComposerCapture, ComposerSubmission, ContextAction, ContextActionContribution, ContextActionRunContext, DockFaceContribution, FileLinkSource, GlobalStore, LeaderBindingBase, LeaderBindingContribution, LeaderKeyContribution, MinorModeContribution, PaletteCommandContext, PaletteCommandContribution, RepositorySettingsPanelContribution, RepositorySettingsPanelProps, RepositorySettingsRepository, SelectionAxisContribution, SessionChannelContribution, SessionFrameSender, SessionRecords, SessionStore, SessionStoreChannel, SettingsFieldContribution, SettingsFieldOption, SettingsPanelContribution, SettingsPanelProps, SettingsSectionContribution, SlotDataFill, SlotDeclaration, SlotFillContribution, SurfaceContribution, TabContribution, ThreadViewOptions, ToolMessageRenderProps, ToolPromptContribution, ToolPromptDialog, ToolPromptRenderProps, ToolRendererContribution, ToolResultView, TransientTab, WebPluginContextItem, WebPluginDefinition, WebPluginRuntime, WebPluginSlotProps };
|
|
662
711
|
//# sourceMappingURL=webPlugin.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webPlugin.d.mts","names":[],"sources":["../../src/types/webPlugin.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":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
3
|
+
"version": "0.0.1-alpha.19",
|
|
4
4
|
"description": "Web cockpit plugin contracts for DoomPi: plugin definitions, slot contributions, session data channels, and hub channel sources.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|