@popmelt.com/core 0.8.3 → 0.8.4

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.
@@ -0,0 +1,26 @@
1
+ import { IncomingMessage, ServerResponse } from 'node:http';
2
+
3
+ type PopmeltPluginOptions = {
4
+ port?: number;
5
+ projectRoot?: string;
6
+ basePath?: string;
7
+ bridge?: boolean;
8
+ };
9
+ type ConnectNext = () => void;
10
+ type ConnectMiddleware = (req: IncomingMessage, res: ServerResponse, next: ConnectNext) => void;
11
+ type DevServerLike = {
12
+ config?: {
13
+ server?: {
14
+ host?: string | boolean;
15
+ port?: number;
16
+ };
17
+ };
18
+ middlewares: {
19
+ use: (middleware: ConnectMiddleware) => void;
20
+ };
21
+ httpServer?: {
22
+ once: (event: 'close', listener: () => void) => unknown;
23
+ } | null;
24
+ };
25
+
26
+ export type { DevServerLike as D, PopmeltPluginOptions as P };
package/dist/index.d.mts CHANGED
@@ -1,6 +1,13 @@
1
1
  import * as react from 'react';
2
2
  import { PropsWithChildren } from 'react';
3
3
 
4
+ /** Client-side envelope used for persisted and streaming bridge events. */
5
+ type BridgeEvent = {
6
+ type: string;
7
+ data: Record<string, unknown>;
8
+ timestamp: number;
9
+ };
10
+
4
11
  type PopmeltContextValue = {
5
12
  isEnabled: boolean;
6
13
  };
@@ -132,11 +139,6 @@ type BridgeStatus = {
132
139
  queueDepth: number;
133
140
  sessionId: string | null;
134
141
  };
135
- type BridgeEvent = {
136
- type: 'job_started' | 'delta' | 'tool_use' | 'done' | 'error';
137
- data: Record<string, unknown>;
138
- timestamp: number;
139
- };
140
142
  type ClaudeResponse = {
141
143
  jobId: string;
142
144
  sessionId?: string;