dsh-image-gen 0.6.11 → 0.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,48 +0,0 @@
1
- /**
2
- * Dedicated DSH agent session backing the workbench chat panel.
3
- *
4
- * The panel is a real DSH conversation driven from the plugin, not a parallel
5
- * chat implementation: on first use the host creates an agent through
6
- * ctx.agents.create (the same factory the sidebar uses), then archives the
7
- * session through ctx.workspaceRegistry so it never appears in the sidebar
8
- * history list while remaining fully usable. The plugin never calls
9
- * sessions.open - archiving the selected session would clear the user's
10
- * current selection - and drives turns purely through agent.followup().
11
- *
12
- * Session events are projected into a small lossless-enough StudioChatEvent
13
- * feed (text turns, tool summaries, generated-image references) and served to
14
- * the browser through CHAT_ROUTE. The browser pulls increments with
15
- * ?since=<seq>; images land on the tldraw canvas from the browser side via
16
- * the existing IMAGE_ROUTE + landing-queue path.
17
- */
18
- import type { IncomingMessage, ServerResponse } from 'node:http';
19
- import type { Context } from '@deepseek-ai/cordis';
20
- import { type StudioChatEvent } from './shared.js';
21
- /** Wire responses for CHAT_ROUTE. */
22
- export interface StudioChatStateResponse {
23
- ok: true;
24
- latestSeq: number;
25
- events: StudioChatEvent[];
26
- /** Why the backing agent is missing, when creation failed; absent otherwise. */
27
- unavailable?: string;
28
- }
29
- export interface StudioChatSendResponse {
30
- ok: true;
31
- }
32
- export interface StudioChatErrorResponse {
33
- error: string;
34
- }
35
- export interface StudioChatDeps {
36
- maxBodyBytes: number;
37
- }
38
- /**
39
- * Install the studio chat: ensure the dedicated agent session, subscribe to
40
- * its events, and return the CHAT_ROUTE handler plus a disposer. Creation
41
- * failures never break the plugin load - the route reports the error and the
42
- * panel shows it, so a host without agent services degrades visibly instead
43
- * of fatally.
44
- */
45
- export declare function createStudioChat(ctx: Context, deps: StudioChatDeps): {
46
- serve: (req: IncomingMessage, res: ServerResponse) => Promise<void>;
47
- dispose(): void;
48
- };