@syrin/iris 0.4.0 → 0.5.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.
- package/dist/cli.js +1112 -234
- package/dist/index.js +5 -0
- package/dist/server.d.ts +10 -1
- package/dist/server.js +718 -215
- package/dist/test.js +542 -222
- package/package.json +9 -9
package/dist/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
var IRIS_DEFAULT_PORT = 4400;
|
|
3
3
|
var IRIS_WS_PATH = "/iris";
|
|
4
4
|
var IRIS_PROTOCOL_VERSION = 1;
|
|
5
|
+
var UpdateCheckIntervalMs = 24 * 60 * 60 * 1e3;
|
|
5
6
|
var RunKind = {
|
|
6
7
|
FLOW_REPLAY: "flow_replay",
|
|
7
8
|
// auto-recorded by iris_flow_replay
|
|
@@ -1644,6 +1645,7 @@ var Transport = class {
|
|
|
1644
1645
|
for (const msg of this.#queue)
|
|
1645
1646
|
ws.send(msg);
|
|
1646
1647
|
this.#queue = [];
|
|
1648
|
+
this.#deps.onConnected?.();
|
|
1647
1649
|
};
|
|
1648
1650
|
ws.onmessage = (event) => {
|
|
1649
1651
|
const data = event.data;
|
|
@@ -3504,6 +3506,9 @@ var Iris = class {
|
|
|
3504
3506
|
url,
|
|
3505
3507
|
hello: () => this.#hello(),
|
|
3506
3508
|
handleCommand: (command) => this.#handleCommand(command),
|
|
3509
|
+
// Show the presenter HUD as soon as the agent bridge connects — the user immediately sees
|
|
3510
|
+
// the glow border and narration panel, even before the first tool call lands.
|
|
3511
|
+
onConnected: () => this.#presenter?.sessionStart(),
|
|
3507
3512
|
// Liveness fallback: if the bridge stays unreachable (the agent killed the server process),
|
|
3508
3513
|
// no server-pushed end can arrive — so end the run we're presenting ourselves. A returning
|
|
3509
3514
|
// agent revives it via the normal sessionStart() path on its next command.
|
package/dist/server.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export { FileSystemPort, createNodeFileSystem } from './project/fs-port.js';
|
|
|
14
14
|
export { FlowReplaySession, WaitForSignal, nearestTestid, replayFlow } from './flows/flow-replay.js';
|
|
15
15
|
export { IrisDirPaths, ReadContractResult, baselinePath, ensureIrisDir, flowPath, irisDirPaths, readContract, writeContract } from './project/iris-dir.js';
|
|
16
16
|
export { IrisTool } from './tools/tool-names.js';
|
|
17
|
+
export { MCP_MESSAGE_PATH, MCP_SSE_PATH } from './http-server.js';
|
|
17
18
|
export { ProjectStore, ReadProjectResult } from './project/project-store.js';
|
|
18
19
|
export { RecommendationInputs, buildSessionRecommendation } from './session/session-recommendation.js';
|
|
19
20
|
export { RingBuffer } from './events/ring-buffer.js';
|
|
@@ -24,6 +25,7 @@ export { TOOLS, ToolDef, ToolDeps } from './tools/tools.js';
|
|
|
24
25
|
export { ToolInvoker, UNKNOWN_TOOL_ERROR, createToolInvoker } from './tools/tool-invoker.js';
|
|
25
26
|
export { VisualStore } from './visual/visual-store.js';
|
|
26
27
|
export { buildReactionReport } from './events/reaction.js';
|
|
28
|
+
export { isAlive, isRunning, logPath, readPid, removePid, writePid } from './daemon.js';
|
|
27
29
|
|
|
28
30
|
interface StartOptions {
|
|
29
31
|
port?: number;
|
|
@@ -55,5 +57,12 @@ interface RunningServer {
|
|
|
55
57
|
}
|
|
56
58
|
/** Start the Iris bridge (browser WS endpoint) and, by default, the MCP stdio server. */
|
|
57
59
|
declare function start(options?: StartOptions): Promise<RunningServer>;
|
|
60
|
+
/**
|
|
61
|
+
* Start the Iris bridge in daemon mode: a single HTTP server handles both the WebSocket
|
|
62
|
+
* bridge (browser SDK) and the SSE MCP transport (Claude/agent). Unlike start(), the MCP
|
|
63
|
+
* connection is not tied to the process lifetime — Claude reconnects across sessions while
|
|
64
|
+
* browser sessions persist in the daemon.
|
|
65
|
+
*/
|
|
66
|
+
declare function startDaemon(options?: StartOptions): Promise<RunningServer>;
|
|
58
67
|
|
|
59
|
-
export { type RunningServer, type StartOptions, start };
|
|
68
|
+
export { type RunningServer, type StartOptions, start, startDaemon };
|