@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.
- package/dist/bridge-entry.mjs +52 -52
- package/dist/canvas.mjs +1 -1
- package/dist/chunk-3TS7MVTZ.mjs +1 -0
- package/dist/chunk-RBFQCZQP.mjs +1 -0
- package/dist/cli.mjs +54 -54
- package/dist/dev-server-rQIWJcSX.d.mts +26 -0
- package/dist/index.d.mts +7 -5
- package/dist/index.mjs +27 -27
- package/dist/plugin-astro.d.mts +8 -7
- package/dist/plugin-astro.mjs +1 -1
- package/dist/plugin-next.mjs +1 -1
- package/dist/plugin-vite.d.mts +4 -7
- package/dist/plugin-vite.mjs +1 -1
- package/dist/server-7UMGXB6S.mjs +421 -0
- package/dist/server.d.mts +7 -3
- package/dist/server.mjs +53 -53
- package/package.json +18 -5
- package/dist/server-2X6UD5RQ.mjs +0 -421
|
@@ -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;
|