agent-console-server 4.1.2 → 4.2.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/package.json +6 -6
- package/dist/EphemeralAgentEventTypes-Spjnk48Y.js +0 -869
- package/dist/agentConsoleServerCommand-B7491RR7.js +0 -3275
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +0 -5
- package/dist/contracts-DPknvuKq.d.ts +0 -1220
- package/dist/contracts-la_KkjCS.js +0 -1
- package/dist/contracts.d.ts +0 -2
- package/dist/contracts.js +0 -2
- package/dist/index.d.ts +0 -828
- package/dist/index.js +0 -21
package/dist/index.js
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { $ as childSessionOpenMessageSchema, $t as signNonce, A as createEventLog, At as mapAssistantContent, B as readSessionWindows, Bt as DEFAULT_DENY_MESSAGE, C as resolveRepositoryPath, Cn as hostArgs, Ct as toSessionInitEvent, D as getSessionCwd, Dt as mapSystemMessage, E as REPOSITORY_WALK_IGNORED_NAMES, Et as toToolResultText, F as launchSessionWindow, Ft as createFileOriginTracker, G as SESSION_WINDOWS_FILENAME, Gt as toSessionClosedEvents, H as SESSION_SECRET_BYTE_LENGTH, Ht as SESSION_LIST_LIMIT, I as createWindowDriver, It as createPermissionBridge, J as SESSION_WINDOW_REJOIN_DURATION_MS, K as SESSION_WINDOW_CONNECT_TIMEOUT_MS, Kt as getEventId, L as checkIsTokenValid, Lt as toPermissionResult, M as getPublicKeyText, Mt as createTodoTracker, N as getDeviceName, Nt as TodoToolName, O as handleCommand, Ot as mapTaskMessage, P as findDevice, Pt as createStreamTracker, Q as childSessionsChangeMessageSchema, Qt as HOST_PROBE_TIMEOUT_MS, R as takeChildReply, Rt as toPermissionRequestEvent, S as readRepositoryFile, Sn as NODE_PTY_DIRECTORY_NAME, St as toTurnResultEvents, T as REPOSITORY_FILE_MAX_BYTE_LENGTH, Tt as mapUserContent, U as SESSION_SECRET_ENVIRONMENT_VARIABLE, Ut as SETTING_SOURCES, V as sessionWindowsSchema, Vt as IGNORED_SDK_MESSAGE_TYPES, W as SESSION_SUBCOMMAND, Wt as closeOpenSession, X as SessionWindowCloseCode, Xt as sendToRunningHost, Y as hashCredential, Yt as runDevicesCommand, Z as childMessageSchema, Zt as readMessageText, _ as createAgentConsoleServer, _n as CLAUDE_CODE_EXECUTABLE_FILENAME, _t as toCapabilitiesEvent, a as checkIsSchemeLaunchTampered, an as writeStateFile, at as ChildMessageType, b as handleShellCommand, bn as HOST_INSTALL_DIRECTORY_SEGMENTS, bt as readSessionHistory, c as sessionCommand, cn as HOST_KEY_FILENAME, ct as createClaudeAgentSdkDriver, d as formatSessionLogLine, dn as STATE_DIRECTORY_NAME, dt as readSessionCwd, en as checkIsSignatureValid, et as childRejoinMessageSchema, f as serveCommand, fn as writeLine, ft as listSessionSummaries, g as getShellFile, gn as getHostInstallDirectory, gt as toContextUsageEvent, h as loadNodePty, hn as checkIsHostInstalled, ht as watchSession, i as getSchemeLaunch, in as readHostKey, it as childCommandErrorMessageSchema, j as answerHttpRequest, jt as toUnknownEvent, k as createPairingCodes, kt as mapHookMessage, l as runSessionChild, ln as PRINTED_PAIRING_CODE_DURATION_MS, lt as createTaskRegistry, m as spawnPtyShell, mn as installHost, mt as getClaudeCodeExecutablePath, n as runConsoleListAgent, nn as readDevices, nt as childEventsMessageSchema, o as uninstallCommand, on as getStateDirectory, ot as childMessageTypeSchema, p as serveHost, pn as installDownloadedHost, pt as createSessionOpener, q as SESSION_WINDOW_RECONNECT_DELAY_MS, qt as devicesCommand, r as CONSOLE_LIST_AGENT_NAME, rn as deviceSchema, rt as childCommandResultMessageSchema, s as uninstallHost, sn as DEVICES_FILENAME, st as createBaseChildMessageSchema, t as agentConsoleServerCommand, tn as writeDevices, tt as rejoiningSessionSchema, u as serveSessionChild, un as SECRET_BYTE_LENGTH, ut as toContentBlockParam, v as createShellRegistry, vn as HOST_DIRECTORY_ENVIRONMENT_VARIABLE, vt as getSessionTitle, w as listRepositoryFiles, wn as getReachableHostname, wt as parseMessageBody, x as handleFileCommand, xn as HOST_SCHEME_REGISTRY_KEY, xt as createSdkMessageMapper, y as sendServerMessage, yn as HOST_EXECUTABLE_FILENAME, yt as readToolUseResultMap, z as sendChildCommand, zt as createInputQueue } from "./agentConsoleServerCommand-B7491RR7.js";
|
|
2
|
-
import { $ as pairedMessageSchema, $t as AgentEventType, A as listSessionsCommandSchema, At as rateLimitEventSchema, B as AttachmentMediaType, Bt as contextUsageEventSchema, C as setModelCommandSchema, Ct as SessionState, D as promptCommandSchema, Dt as PermissionMode, E as resumeAtCommandSchema, Et as sessionInitEventSchema, F as backgroundTasksCommandSchema, Ft as hostErrorEventSchema, G as shellOpenedMessageSchema, Gt as capabilitiesEventSchema, H as getSignedText, Ht as CompactionTrigger, I as sessionIdSchema, It as hookEventSchema, J as sessionsMessageSchema, Jt as assistantMessageEventSchema, K as shellClosedMessageSchema, Kt as slashCommandSchema, L as createBaseCommandSchema, Lt as HookPhase, M as forkCommandSchema, Mt as PermissionBehavior, N as createSessionCommandSchema, Nt as permissionBehaviorSchema, O as attachmentSchema, Ot as permissionModeSchema, P as closeSessionCommandSchema, Pt as permissionRequestEventSchema, Q as proofMessageSchema, Qt as createBaseAgentEventSchema, R as CommandType, Rt as hookPhaseSchema, S as setPermissionModeCommandSchema, St as sessionStateEventSchema, T as resumeCommandSchema, Tt as sessionSettingsEventSchema, U as serverMessageSchema, Ut as compactionTriggerSchema, V as attachmentMediaTypeSchema, Vt as compactionEventSchema, W as shellOutputMessageSchema, Wt as commandOutputEventSchema, X as sessionResetMessageSchema, Xt as parentToolUseIdSchema, Y as sessionSummarySchema, Yt as createBaseMessageAgentEventSchema, Z as sessionOpenedMessageSchema, Zt as messageUuidSchema, _ as readFileCommandSchema, _n as SHELL_OUTPUT_LENGTH, _t as thinkingEventSchema, a as pairMessageSchema, an as createBaseServerMessageSchema, at as userMessageEventSchema, b as stopTaskCommandSchema, bt as subagentStatusSchema, c as authenticateMessageSchema, cn as HandshakeMessageType, ct as turnResultEventSchema, d as shellCommandSchema, dn as DEFAULT_HOSTNAME, dt as toolResultEventSchema, en as agentEventTypeSchema, et as hostStoppingMessageSchema, f as shellResizeCommandSchema, fn as DEFAULT_PORT, ft as toolProgressEventSchema, g as closeShellCommandSchema, gn as SCHEME_PAIRING_CODE_DURATION_MS, gt as todoStatusSchema, h as terminalSizeSchema, hn as PAIRING_HASH_PARAMETER, ht as TodoStatus, i as revokeMessageSchema, in as serverMessageTypeSchema, it as agentEventSchema, j as interruptCommandSchema, jt as permissionResolutionEventSchema, k as permissionVerdictCommandSchema, kt as mcpServerSchema, l as createBaseHandshakeMessageSchema, ln as handshakeMessageTypeSchema, lt as tokenUsageSchema, m as openShellCommandSchema, mn as PAIRING_CODE_PARAMETER, mt as todoSchema, n as HostCloseCode, nn as authenticatedMessageSchema, nt as fileContentMessageSchema, o as handOffMessageSchema, on as SignaturePurpose, ot as unknownEventSchema, p as shellInputCommandSchema, pn as HOST_SCHEME, pt as todoUpdateEventSchema, q as shellIdSchema, qt as modelSchema, r as handshakeMessageSchema, rn as ServerMessageType, rt as eventsMessageSchema, s as challengeMessageSchema, sn as signaturePurposeSchema, st as turnUsageEventSchema, t as EphemeralAgentEventTypes, tn as commandErrorMessageSchema, tt as filesMessageSchema, u as commandSchema, un as DEFAULT_APP_ORIGIN, ut as toolUseEventSchema, v as listFilesCommandSchema, vt as subagentEventSchema, w as rewindFilesCommandSchema, wt as sessionStateSchema, x as slashCommandCommandSchema, xt as streamDeltaEventSchema, y as driverCommandSchema, yt as SubagentStatus, z as commandTypeSchema, zt as fileRewindEventSchema } from "./EphemeralAgentEventTypes-Spjnk48Y.js";
|
|
3
|
-
import { InvalidOperationError, Operation } from "@esposter/shared";
|
|
4
|
-
//#region src/services/drivers/claudeAgentSdk/readMcpAppResource.ts
|
|
5
|
-
/**
|
|
6
|
-
* One MCP Apps widget, read from the server the session's CLI dialed. The contents are untrusted third-party HTML,
|
|
7
|
-
* so only a ui:// resource of an HTML type is accepted, and its own _meta (the csp and permissions the app declares)
|
|
8
|
-
* travels with it for the host to enforce
|
|
9
|
-
*/
|
|
10
|
-
const readMcpAppResource = async (query, serverName, uri) => {
|
|
11
|
-
if (!uri.startsWith("ui://")) throw new InvalidOperationError(Operation.Read, uri, "an MCP app is read from a ui:// resource only");
|
|
12
|
-
const { contents } = await query.readMcpResource(serverName, uri);
|
|
13
|
-
const [content] = contents;
|
|
14
|
-
if (content?.text === void 0 || !content.mimeType?.startsWith("text/html")) throw new InvalidOperationError(Operation.Read, uri, "the server returned no HTML for the app");
|
|
15
|
-
return {
|
|
16
|
-
html: content.text,
|
|
17
|
-
meta: content._meta ?? {}
|
|
18
|
-
};
|
|
19
|
-
};
|
|
20
|
-
//#endregion
|
|
21
|
-
export { AgentEventType, AttachmentMediaType, CLAUDE_CODE_EXECUTABLE_FILENAME, CONSOLE_LIST_AGENT_NAME, ChildMessageType, CommandType, CompactionTrigger, DEFAULT_APP_ORIGIN, DEFAULT_DENY_MESSAGE, DEFAULT_HOSTNAME, DEFAULT_PORT, DEVICES_FILENAME, EphemeralAgentEventTypes, HOST_DIRECTORY_ENVIRONMENT_VARIABLE, HOST_EXECUTABLE_FILENAME, HOST_INSTALL_DIRECTORY_SEGMENTS, HOST_KEY_FILENAME, HOST_PROBE_TIMEOUT_MS, HOST_SCHEME, HOST_SCHEME_REGISTRY_KEY, HandshakeMessageType, HookPhase, HostCloseCode, IGNORED_SDK_MESSAGE_TYPES, NODE_PTY_DIRECTORY_NAME, PAIRING_CODE_PARAMETER, PAIRING_HASH_PARAMETER, PRINTED_PAIRING_CODE_DURATION_MS, PermissionBehavior, PermissionMode, REPOSITORY_FILE_MAX_BYTE_LENGTH, REPOSITORY_WALK_IGNORED_NAMES, SCHEME_PAIRING_CODE_DURATION_MS, SECRET_BYTE_LENGTH, SESSION_LIST_LIMIT, SESSION_SECRET_BYTE_LENGTH, SESSION_SECRET_ENVIRONMENT_VARIABLE, SESSION_SUBCOMMAND, SESSION_WINDOWS_FILENAME, SESSION_WINDOW_CONNECT_TIMEOUT_MS, SESSION_WINDOW_RECONNECT_DELAY_MS, SESSION_WINDOW_REJOIN_DURATION_MS, SETTING_SOURCES, SHELL_OUTPUT_LENGTH, STATE_DIRECTORY_NAME, ServerMessageType, SessionState, SessionWindowCloseCode, SignaturePurpose, SubagentStatus, TodoStatus, TodoToolName, agentConsoleServerCommand, agentEventSchema, agentEventTypeSchema, answerHttpRequest, assistantMessageEventSchema, attachmentMediaTypeSchema, attachmentSchema, authenticateMessageSchema, authenticatedMessageSchema, backgroundTasksCommandSchema, capabilitiesEventSchema, challengeMessageSchema, checkIsHostInstalled, checkIsSchemeLaunchTampered, checkIsSignatureValid, checkIsTokenValid, childCommandErrorMessageSchema, childCommandResultMessageSchema, childEventsMessageSchema, childMessageSchema, childMessageTypeSchema, childRejoinMessageSchema, childSessionOpenMessageSchema, childSessionsChangeMessageSchema, closeOpenSession, closeSessionCommandSchema, closeShellCommandSchema, commandErrorMessageSchema, commandOutputEventSchema, commandSchema, commandTypeSchema, compactionEventSchema, compactionTriggerSchema, contextUsageEventSchema, createAgentConsoleServer, createBaseAgentEventSchema, createBaseChildMessageSchema, createBaseCommandSchema, createBaseHandshakeMessageSchema, createBaseMessageAgentEventSchema, createBaseServerMessageSchema, createClaudeAgentSdkDriver, createEventLog, createFileOriginTracker, createInputQueue, createPairingCodes, createPermissionBridge, createSdkMessageMapper, createSessionCommandSchema, createSessionOpener, createShellRegistry, createStreamTracker, createTaskRegistry, createTodoTracker, createWindowDriver, deviceSchema, devicesCommand, driverCommandSchema, eventsMessageSchema, fileContentMessageSchema, fileRewindEventSchema, filesMessageSchema, findDevice, forkCommandSchema, formatSessionLogLine, getClaudeCodeExecutablePath, getDeviceName, getEventId, getHostInstallDirectory, getPublicKeyText, getReachableHostname, getSchemeLaunch, getSessionCwd, getSessionTitle, getShellFile, getSignedText, getStateDirectory, handOffMessageSchema, handleCommand, handleFileCommand, handleShellCommand, handshakeMessageSchema, handshakeMessageTypeSchema, hashCredential, hookEventSchema, hookPhaseSchema, hostArgs, hostErrorEventSchema, hostStoppingMessageSchema, installDownloadedHost, installHost, interruptCommandSchema, launchSessionWindow, listFilesCommandSchema, listRepositoryFiles, listSessionSummaries, listSessionsCommandSchema, loadNodePty, mapAssistantContent, mapHookMessage, mapSystemMessage, mapTaskMessage, mapUserContent, mcpServerSchema, messageUuidSchema, modelSchema, openShellCommandSchema, pairMessageSchema, pairedMessageSchema, parentToolUseIdSchema, parseMessageBody, permissionBehaviorSchema, permissionModeSchema, permissionRequestEventSchema, permissionResolutionEventSchema, permissionVerdictCommandSchema, promptCommandSchema, proofMessageSchema, rateLimitEventSchema, readDevices, readFileCommandSchema, readHostKey, readMcpAppResource, readMessageText, readRepositoryFile, readSessionCwd, readSessionHistory, readSessionWindows, readToolUseResultMap, rejoiningSessionSchema, resolveRepositoryPath, resumeAtCommandSchema, resumeCommandSchema, revokeMessageSchema, rewindFilesCommandSchema, runConsoleListAgent, runDevicesCommand, runSessionChild, sendChildCommand, sendServerMessage, sendToRunningHost, serveCommand, serveHost, serveSessionChild, serverMessageSchema, serverMessageTypeSchema, sessionCommand, sessionIdSchema, sessionInitEventSchema, sessionOpenedMessageSchema, sessionResetMessageSchema, sessionSettingsEventSchema, sessionStateEventSchema, sessionStateSchema, sessionSummarySchema, sessionWindowsSchema, sessionsMessageSchema, setModelCommandSchema, setPermissionModeCommandSchema, shellClosedMessageSchema, shellCommandSchema, shellIdSchema, shellInputCommandSchema, shellOpenedMessageSchema, shellOutputMessageSchema, shellResizeCommandSchema, signNonce, signaturePurposeSchema, slashCommandCommandSchema, slashCommandSchema, spawnPtyShell, stopTaskCommandSchema, streamDeltaEventSchema, subagentEventSchema, subagentStatusSchema, takeChildReply, terminalSizeSchema, thinkingEventSchema, toCapabilitiesEvent, toContentBlockParam, toContextUsageEvent, toPermissionRequestEvent, toPermissionResult, toSessionClosedEvents, toSessionInitEvent, toToolResultText, toTurnResultEvents, toUnknownEvent, todoSchema, todoStatusSchema, todoUpdateEventSchema, tokenUsageSchema, toolProgressEventSchema, toolResultEventSchema, toolUseEventSchema, turnResultEventSchema, turnUsageEventSchema, uninstallCommand, uninstallHost, unknownEventSchema, userMessageEventSchema, watchSession, writeDevices, writeLine, writeStateFile };
|