agent-console-server 3.3.0 → 3.4.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/README.md +1 -1
- package/dist/cli.js +1 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +2 -2
- package/dist/{readToken-CAukYBGj.js → readToken-BSQZ8ZVf.js} +13 -13
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -31,7 +31,7 @@ We highly recommend you take a look at the [documentation](https://esposter.com/
|
|
|
31
31
|
|
|
32
32
|
| Flag | Default | What it does |
|
|
33
33
|
| :----------- | :--------------------- | :-------------------------------------------------------------------------------------------------------- |
|
|
34
|
-
| `--port` | `7437` | The port to listen on
|
|
34
|
+
| `--port` | `7437` | The port to listen on, and the one in the host URL it prints |
|
|
35
35
|
| `--hostname` | `127.0.0.1` | The address to listen on. `0.0.0.0` lets another machine reach the host, over a network you already trust |
|
|
36
36
|
| `--origin` | `https://esposter.com` | The app the printed pairing link opens, for example `http://localhost:3000` against a local dev server |
|
|
37
37
|
|
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { G as TOKEN_QUERY_PARAMETER, H as DEFAULT_HOSTNAME, U as DEFAULT_PORT, V as DEFAULT_APP_ORIGIN, W as PAIRING_HASH_PARAMETER } from "./EphemeralAgentEventTypes-Cm5oNQXu.js";
|
|
2
|
-
import {
|
|
2
|
+
import { a as createAgentConsoleServer, d as createClaudeAgentSdkDriver, t as readToken } from "./readToken-BSQZ8ZVf.js";
|
|
3
3
|
import { RoutePath } from "@esposter/shared";
|
|
4
4
|
import { hostname } from "node:os";
|
|
5
5
|
import { once } from "node:events";
|
package/dist/index.d.ts
CHANGED
|
@@ -196,7 +196,6 @@ export declare const answerHttpRequest: ({ headers, method }: IncomingMessage, r
|
|
|
196
196
|
export declare const checkIsTokenValid: (candidate: string, token: string) => boolean;
|
|
197
197
|
//#endregion
|
|
198
198
|
//#region src/services/server/constants.d.ts
|
|
199
|
-
export declare const HOST_NAME = "agent-console-server";
|
|
200
199
|
export declare const TOKEN_DIRECTORY_NAME = ".agent-console-server";
|
|
201
200
|
export declare const TOKEN_FILENAME = "token";
|
|
202
201
|
export declare const TOKEN_BYTE_LENGTH = 32;
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { A as compactionTriggerSchema, B as agentEventTypeSchema, C as AttachmentMediaType, D as HookPhase, E as subagentStatusSchema, F as PermissionBehavior, G as TOKEN_QUERY_PARAMETER, H as DEFAULT_HOSTNAME, I as permissionBehaviorSchema, L as SessionState, M as todoStatusSchema, N as PermissionMode, O as hookPhaseSchema, P as permissionModeSchema, R as sessionStateSchema, S as createBaseCommandSchema, T as SubagentStatus, U as DEFAULT_PORT, V as DEFAULT_APP_ORIGIN, W as PAIRING_HASH_PARAMETER, _ as createSessionCommandSchema, a as slashCommandCommandSchema, b as CommandType, c as rewindFilesCommandSchema, d as promptCommandSchema, f as attachmentSchema, g as forkCommandSchema, h as interruptCommandSchema, i as commandSchema, j as TodoStatus, k as CompactionTrigger, l as resumeCommandSchema, m as listSessionsCommandSchema, n as ServerMessageType, o as setPermissionModeCommandSchema, p as permissionVerdictCommandSchema, r as serverMessageTypeSchema, s as setModelCommandSchema, t as EphemeralAgentEventTypes, u as resumeAtCommandSchema, v as closeSessionCommandSchema, w as attachmentMediaTypeSchema, x as commandTypeSchema, y as sessionIdSchema, z as AgentEventType } from "./EphemeralAgentEventTypes-Cm5oNQXu.js";
|
|
2
|
-
import { A as
|
|
2
|
+
import { A as mapHookMessage, B as createInputQueue, C as toTurnResultEvents, D as toToolResultText, E as mapUserContent, F as createStreamTracker, G as closeOpenSession, H as IGNORED_SDK_MESSAGE_TYPES, I as createFileOriginTracker, K as getEventId, L as createPermissionBridge, M as toUnknownEvent, N as createTodoTracker, O as mapSystemMessage, P as TodoToolName, R as toPermissionResult, S as createSdkMessageMapper, T as parseMessageBody, U as SESSION_LIST_LIMIT, V as DEFAULT_DENY_MESSAGE, W as SETTING_SOURCES, _ as toContextUsageEvent, a as createAgentConsoleServer, b as readToolUseResultMap, c as createEventLog, d as createClaudeAgentSdkDriver, f as createTaskRegistry, g as watchSession, h as createSessionOpener, i as TOKEN_FILENAME, j as mapAssistantContent, k as mapTaskMessage, l as checkIsTokenValid, m as readSessionCwd, n as TOKEN_BYTE_LENGTH, o as sendServerMessage, p as toContentBlockParam, r as TOKEN_DIRECTORY_NAME, s as handleCommand, t as readToken, u as answerHttpRequest, v as toCapabilitiesEvent, w as toSessionInitEvent, x as readSessionHistory, y as getSessionTitle, z as toPermissionRequestEvent } from "./readToken-BSQZ8ZVf.js";
|
|
3
3
|
import { A as hostErrorEventSchema, B as parentToolUseIdSchema, C as sessionStateEventSchema, D as rateLimitEventSchema, E as mcpServerSchema, F as commandOutputEventSchema, H as createBaseAgentEventSchema, I as capabilitiesEventSchema, L as slashCommandSchema, M as fileRewindEventSchema, N as contextUsageEventSchema, O as permissionResolutionEventSchema, P as compactionEventSchema, R as modelSchema, S as streamDeltaEventSchema, T as sessionInitEventSchema, V as messageUuidSchema, _ as toolProgressEventSchema, a as sessionOpenedMessageSchema, b as thinkingEventSchema, c as createBaseServerMessageSchema, d as unknownEventSchema, f as turnUsageEventSchema, g as toolResultEventSchema, h as toolUseEventSchema, i as sessionResetMessageSchema, j as hookEventSchema, k as permissionRequestEventSchema, l as agentEventSchema, m as tokenUsageSchema, n as sessionsMessageSchema, o as eventsMessageSchema, p as turnResultEventSchema, r as sessionSummarySchema, s as commandErrorMessageSchema, t as serverMessageSchema, u as userMessageEventSchema, v as todoUpdateEventSchema, w as sessionSettingsEventSchema, x as subagentEventSchema, y as todoSchema, z as assistantMessageEventSchema } from "./ServerMessage-Deh-bExC.js";
|
|
4
|
-
export { AgentEventType, AttachmentMediaType, CommandType, CompactionTrigger, DEFAULT_APP_ORIGIN, DEFAULT_DENY_MESSAGE, DEFAULT_HOSTNAME, DEFAULT_PORT, EphemeralAgentEventTypes,
|
|
4
|
+
export { AgentEventType, AttachmentMediaType, CommandType, CompactionTrigger, DEFAULT_APP_ORIGIN, DEFAULT_DENY_MESSAGE, DEFAULT_HOSTNAME, DEFAULT_PORT, EphemeralAgentEventTypes, HookPhase, IGNORED_SDK_MESSAGE_TYPES, PAIRING_HASH_PARAMETER, PermissionBehavior, PermissionMode, SESSION_LIST_LIMIT, SETTING_SOURCES, ServerMessageType, SessionState, SubagentStatus, TOKEN_BYTE_LENGTH, TOKEN_DIRECTORY_NAME, TOKEN_FILENAME, TOKEN_QUERY_PARAMETER, TodoStatus, TodoToolName, agentEventSchema, agentEventTypeSchema, answerHttpRequest, assistantMessageEventSchema, attachmentMediaTypeSchema, attachmentSchema, capabilitiesEventSchema, checkIsTokenValid, closeOpenSession, closeSessionCommandSchema, commandErrorMessageSchema, commandOutputEventSchema, commandSchema, commandTypeSchema, compactionEventSchema, compactionTriggerSchema, contextUsageEventSchema, createAgentConsoleServer, createBaseAgentEventSchema, createBaseCommandSchema, createBaseServerMessageSchema, createClaudeAgentSdkDriver, createEventLog, createFileOriginTracker, createInputQueue, createPermissionBridge, createSdkMessageMapper, createSessionCommandSchema, createSessionOpener, createStreamTracker, createTaskRegistry, createTodoTracker, eventsMessageSchema, fileRewindEventSchema, forkCommandSchema, getEventId, getSessionTitle, handleCommand, hookEventSchema, hookPhaseSchema, hostErrorEventSchema, interruptCommandSchema, listSessionsCommandSchema, mapAssistantContent, mapHookMessage, mapSystemMessage, mapTaskMessage, mapUserContent, mcpServerSchema, messageUuidSchema, modelSchema, parentToolUseIdSchema, parseMessageBody, permissionBehaviorSchema, permissionModeSchema, permissionRequestEventSchema, permissionResolutionEventSchema, permissionVerdictCommandSchema, promptCommandSchema, rateLimitEventSchema, readSessionCwd, readSessionHistory, readToken, readToolUseResultMap, resumeAtCommandSchema, resumeCommandSchema, rewindFilesCommandSchema, sendServerMessage, serverMessageSchema, serverMessageTypeSchema, sessionIdSchema, sessionInitEventSchema, sessionOpenedMessageSchema, sessionResetMessageSchema, sessionSettingsEventSchema, sessionStateEventSchema, sessionStateSchema, sessionSummarySchema, sessionsMessageSchema, setModelCommandSchema, setPermissionModeCommandSchema, slashCommandCommandSchema, slashCommandSchema, streamDeltaEventSchema, subagentEventSchema, subagentStatusSchema, thinkingEventSchema, toCapabilitiesEvent, toContentBlockParam, toContextUsageEvent, toPermissionRequestEvent, toPermissionResult, toSessionInitEvent, toToolResultText, toTurnResultEvents, toUnknownEvent, todoSchema, todoStatusSchema, todoUpdateEventSchema, tokenUsageSchema, toolProgressEventSchema, toolResultEventSchema, toolUseEventSchema, turnResultEventSchema, turnUsageEventSchema, unknownEventSchema, userMessageEventSchema, watchSession };
|
|
@@ -1147,23 +1147,18 @@ const createClaudeAgentSdkDriver = ({ onEvents, onSessionOpen, onSessionsChange
|
|
|
1147
1147
|
};
|
|
1148
1148
|
};
|
|
1149
1149
|
//#endregion
|
|
1150
|
-
//#region src/services/server/constants.ts
|
|
1151
|
-
const HOST_NAME = "agent-console-server";
|
|
1152
|
-
const TOKEN_DIRECTORY_NAME = ".agent-console-server";
|
|
1153
|
-
const TOKEN_FILENAME = "token";
|
|
1154
|
-
const TOKEN_BYTE_LENGTH = 32;
|
|
1155
|
-
//#endregion
|
|
1156
1150
|
//#region src/services/server/answerHttpRequest.ts
|
|
1157
1151
|
const answerHttpRequest = ({ headers, method }, response) => {
|
|
1152
|
+
if (method !== "OPTIONS") {
|
|
1153
|
+
response.writeHead(405).end();
|
|
1154
|
+
return;
|
|
1155
|
+
}
|
|
1158
1156
|
response.setHeader("Access-Control-Allow-Origin", headers.origin ?? "*");
|
|
1159
1157
|
response.setHeader("Access-Control-Allow-Private-Network", "true");
|
|
1158
|
+
response.setHeader("Access-Control-Allow-Methods", "GET");
|
|
1159
|
+
response.setHeader("Access-Control-Allow-Headers", headers["access-control-request-headers"] ?? "*");
|
|
1160
1160
|
response.setHeader("Vary", "Origin");
|
|
1161
|
-
|
|
1162
|
-
response.setHeader("Access-Control-Allow-Methods", "GET");
|
|
1163
|
-
response.setHeader("Access-Control-Allow-Headers", headers["access-control-request-headers"] ?? "*");
|
|
1164
|
-
response.writeHead(204).end();
|
|
1165
|
-
} else if (method === "GET") response.writeHead(200, { "Content-Type": "application/json" }).end(JSON.stringify({ name: HOST_NAME }));
|
|
1166
|
-
else response.writeHead(405).end();
|
|
1161
|
+
response.writeHead(204).end();
|
|
1167
1162
|
};
|
|
1168
1163
|
//#endregion
|
|
1169
1164
|
//#region src/services/server/checkIsTokenValid.ts
|
|
@@ -1361,6 +1356,11 @@ const createAgentConsoleServer = async ({ createDriver, hostname, port, token })
|
|
|
1361
1356
|
};
|
|
1362
1357
|
};
|
|
1363
1358
|
//#endregion
|
|
1359
|
+
//#region src/services/server/constants.ts
|
|
1360
|
+
const TOKEN_DIRECTORY_NAME = ".agent-console-server";
|
|
1361
|
+
const TOKEN_FILENAME = "token";
|
|
1362
|
+
const TOKEN_BYTE_LENGTH = 32;
|
|
1363
|
+
//#endregion
|
|
1364
1364
|
//#region src/services/server/readToken.ts
|
|
1365
1365
|
const readToken = () => {
|
|
1366
1366
|
const tokenDirectory = join(homedir(), TOKEN_DIRECTORY_NAME);
|
|
@@ -1374,4 +1374,4 @@ const readToken = () => {
|
|
|
1374
1374
|
return token;
|
|
1375
1375
|
};
|
|
1376
1376
|
//#endregion
|
|
1377
|
-
export {
|
|
1377
|
+
export { mapHookMessage as A, createInputQueue as B, toTurnResultEvents as C, toToolResultText as D, mapUserContent as E, createStreamTracker as F, closeOpenSession as G, IGNORED_SDK_MESSAGE_TYPES as H, createFileOriginTracker as I, getEventId as K, createPermissionBridge as L, toUnknownEvent as M, createTodoTracker as N, mapSystemMessage as O, TodoToolName as P, toPermissionResult as R, createSdkMessageMapper as S, parseMessageBody as T, SESSION_LIST_LIMIT as U, DEFAULT_DENY_MESSAGE as V, SETTING_SOURCES as W, toContextUsageEvent as _, createAgentConsoleServer as a, readToolUseResultMap as b, createEventLog as c, createClaudeAgentSdkDriver as d, createTaskRegistry as f, watchSession as g, createSessionOpener as h, TOKEN_FILENAME as i, mapAssistantContent as j, mapTaskMessage as k, checkIsTokenValid as l, readSessionCwd as m, TOKEN_BYTE_LENGTH as n, sendServerMessage as o, toContentBlockParam as p, TOKEN_DIRECTORY_NAME as r, handleCommand as s, readToken as t, answerHttpRequest as u, toCapabilitiesEvent as v, toSessionInitEvent as w, readSessionHistory as x, getSessionTitle as y, toPermissionRequestEvent as z };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "agent-console-server",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.4.0",
|
|
4
4
|
"description": "The host behind the Esposter agent console — a loopback WebSocket that runs Claude Code sessions through the Claude Agent SDK and speaks a typed wire to the page.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent",
|
|
@@ -56,12 +56,12 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@anthropic-ai/claude-agent-sdk": "^0.3.283",
|
|
59
|
-
"@esposter/shared": "3.
|
|
59
|
+
"@esposter/shared": "3.4.0",
|
|
60
60
|
"ws": "^8.21.3"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@arethetypeswrong/core": "^0.18.5",
|
|
64
|
-
"@esposter/configuration": "3.
|
|
64
|
+
"@esposter/configuration": "3.4.0",
|
|
65
65
|
"@types/node": "^26.6.3",
|
|
66
66
|
"@types/ws": "^8.18.1",
|
|
67
67
|
"publint": "^0.3.24",
|
|
@@ -71,5 +71,5 @@
|
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"zod": "^4.6.5"
|
|
73
73
|
},
|
|
74
|
-
"gitHead": "
|
|
74
|
+
"gitHead": "8eed442bbd2c402cdd4a09cd286595bb8feb3951"
|
|
75
75
|
}
|