@code-yeongyu/senpi 2026.10.24-2 → 2026.10.24-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/CHANGELOG.md +37 -0
- package/dist/bundle/chunks/{args-6T5EQVY3.js → args-JXULI4EH.js} +1 -1
- package/dist/bundle/chunks/{chunk-VUKNGMDT.js → chunk-3LNSLJ7N.js} +1 -1
- package/dist/bundle/chunks/chunk-3VOG6WFU.js +27 -0
- package/dist/bundle/chunks/{chunk-HHYSXDYP.js → chunk-42OY5SZZ.js} +2 -2
- package/dist/bundle/chunks/chunk-7IRLFYNM.js +23 -0
- package/dist/bundle/chunks/{chunk-FIBIVBQK.js → chunk-7UUOGZKR.js} +1 -1
- package/dist/bundle/chunks/chunk-BMYNMUVZ.js +7 -0
- package/dist/bundle/chunks/{chunk-JAXZOEJE.js → chunk-BWA4FVFW.js} +1 -1
- package/dist/bundle/chunks/{chunk-AGQSRWNN.js → chunk-EHQXLHRB.js} +1 -1
- package/dist/bundle/chunks/chunk-EWOEVVQT.js +4 -0
- package/dist/bundle/chunks/{chunk-YJA2B7FQ.js → chunk-FDL4CF6F.js} +1 -1
- package/dist/bundle/chunks/{chunk-RQHK4QZ5.js → chunk-FWXMMMCV.js} +1 -1
- package/dist/bundle/chunks/{chunk-OA5INWHI.js → chunk-GVJ76VQI.js} +102 -42
- package/dist/bundle/chunks/{chunk-HCF5M6NA.js → chunk-GXY5JEI5.js} +1 -1
- package/dist/bundle/chunks/{chunk-VZAYN5SB.js → chunk-HKUXKTFW.js} +1 -1
- package/dist/bundle/chunks/chunk-II22E3CV.js +3 -0
- package/dist/bundle/chunks/{chunk-ONLNXGO3.js → chunk-IUHU5PEC.js} +1 -1
- package/dist/bundle/chunks/{chunk-LR6Z6V54.js → chunk-NQC7MI2G.js} +1 -1
- package/dist/bundle/chunks/{chunk-IELM5U6I.js → chunk-PXKF2RHD.js} +2 -2
- package/dist/bundle/chunks/{chunk-BRXN5R2F.js → chunk-QH2HSCMX.js} +1 -1
- package/dist/bundle/chunks/{chunk-QQSCUEYJ.js → chunk-RHHBXIRN.js} +2 -5
- package/dist/bundle/chunks/chunk-RVYSJBZ7.js +7 -0
- package/dist/bundle/chunks/chunk-SGDOZT6B.js +8 -0
- package/dist/bundle/chunks/{chunk-BZ75DRZB.js → chunk-U67ML6CQ.js} +4 -2
- package/dist/bundle/chunks/{chunk-3N2PQEQV.js → chunk-UT6AJHPK.js} +1 -1
- package/dist/bundle/chunks/{chunk-RAIZG6HA.js → chunk-V3CK2AVC.js} +1 -1
- package/dist/bundle/chunks/{chunk-CZR7C6CY.js → chunk-VOBD6FQG.js} +1 -1
- package/dist/bundle/chunks/{chunk-HRPMLI7O.js → chunk-VRDU425E.js} +2 -2
- package/dist/bundle/chunks/{chunk-OUPD5LWY.js → chunk-XUFUKDKJ.js} +3 -3
- package/dist/bundle/chunks/{chunk-SGATKHO4.js → chunk-Y5OTHMXO.js} +1 -1
- package/dist/bundle/chunks/{chunk-QEQG42HL.js → chunk-ZGAB7WQA.js} +1 -1
- package/dist/bundle/chunks/cli-main-UH3MAREK.js +3 -0
- package/dist/bundle/chunks/{dispatch-KQEGIXQW.js → dispatch-DEP4PEDZ.js} +3 -2
- package/dist/bundle/chunks/{help-fast-path-6PVN7WI5.js → help-fast-path-ZHZGXAUG.js} +1 -1
- package/dist/bundle/chunks/host-command-OQR4RDTM.js +2 -0
- package/dist/bundle/chunks/host-lifecycle-U36U7JTE.js +3 -0
- package/dist/bundle/chunks/host-lifecycle.js +26 -21
- package/dist/bundle/chunks/host-session-command-IGB27ZPJ.js +20 -0
- package/dist/bundle/chunks/{host-socket-request-KKGH3JHV.js → host-socket-request-ZDJGSSZO.js} +1 -1
- package/dist/bundle/chunks/interactive-mode-R5RCSJ2F.js +2 -0
- package/dist/bundle/chunks/{list-tips-BO5RP34W.js → list-tips-CREX4IXZ.js} +1 -1
- package/dist/bundle/chunks/{multi-session-host-O5GZQSRL.js → multi-session-host-YZEMYUFY.js} +12 -12
- package/dist/bundle/chunks/{package-manager-cli-LC5GAGTW.js → package-manager-cli-5FOXDKUA.js} +1 -1
- package/dist/bundle/chunks/{role-4G43UDOC.js → role-M2MTVACJ.js} +1 -1
- package/dist/bundle/chunks/{rotation-stream-RXMCJJUL.js → rotation-stream-U7YQMC7H.js} +1 -1
- package/dist/bundle/chunks/rpc-mode-6K62CZBW.js +2 -0
- package/dist/bundle/chunks/rpc-monitor-source-OL5KU6NO.js +3 -0
- package/dist/bundle/chunks/{schedule-command-QNCVE4HM.js → schedule-command-XBW4EOG5.js} +1 -1
- package/dist/bundle/chunks/session-control-endpoint-54TMCS7Q.js +3 -0
- package/dist/bundle/chunks/{session-picker-HIC5ZTE6.js → session-picker-P2VUU2MQ.js} +1 -1
- package/dist/bundle/chunks/session-worker.js +437 -368
- package/dist/bundle/cli.js +2 -2
- package/dist/bundle/host-supervisor.js +26 -21
- package/dist/bundle/index.js +1 -1
- package/dist/bundle/rpc-entry.js +1 -1
- package/dist/bundle/runtime-manifest.json +1 -1
- package/dist/cli/args.d.ts +2 -0
- package/dist/cli/args.js +27 -0
- package/dist/cli/host-command-args.d.ts +33 -0
- package/dist/cli/host-command-args.js +145 -0
- package/dist/cli/host-command.d.ts +1 -30
- package/dist/cli/host-command.js +5 -137
- package/dist/cli/host-session-command.d.ts +1 -0
- package/dist/cli/host-session-command.js +5 -3
- package/dist/core/agent-session.js +1 -1
- package/dist/core/extensions/builtin/anthropic-subscription/index.js +4 -2
- package/dist/core/extensions/builtin/anthropic-subscription/options.js +2 -1
- package/dist/core/extensions/builtin/anthropic-subscription/sdk-boundary.js +9 -2
- package/dist/core/extensions/builtin/anthropic-subscription/session-cwd.d.ts +3 -0
- package/dist/core/extensions/builtin/anthropic-subscription/session-cwd.js +9 -0
- package/dist/core/extensions/builtin/anthropic-subscription/settings.d.ts +1 -1
- package/dist/core/extensions/builtin/anthropic-subscription/settings.js +3 -1
- package/dist/core/extensions/builtin/anthropic-subscription/stream.js +4 -1
- package/dist/core/extensions/builtin/btw/index.js +4 -1
- package/dist/core/extensions/builtin/compaction/lane-policy.js +3 -1
- package/dist/core/extensions/builtin/look-at/runner.js +1 -0
- package/dist/core/extensions/builtin/mcp/connection-types.d.ts +2 -0
- package/dist/core/extensions/builtin/mcp/connection.js +3 -0
- package/dist/core/extensions/builtin/mcp/elicitation.d.ts +5 -2
- package/dist/core/extensions/builtin/mcp/elicitation.js +57 -11
- package/dist/core/extensions/builtin/mcp/index.js +1 -1
- package/dist/core/extensions/builtin/mcp/modern/dispatch.js +6 -9
- package/dist/core/extensions/builtin/mcp/service-connection.d.ts +1 -0
- package/dist/core/extensions/builtin/mcp/service-connection.js +1 -0
- package/dist/core/extensions/builtin/mcp/service.js +1 -0
- package/dist/core/extensions/builtin/mcp/transport-sdk.d.ts +1 -0
- package/dist/core/extensions/builtin/mcp/transport-sdk.js +5 -5
- package/dist/core/extensions/builtin/mcp/transport.d.ts +1 -0
- package/dist/core/extensions/builtin/mcp/transport.js +1 -0
- package/dist/core/extensions/builtin/prompt-preset/contract.js +6 -1
- package/dist/core/extensions/builtin/prompt-preset/kimi-k3-1.d.ts +3 -0
- package/dist/core/extensions/builtin/prompt-preset/kimi-k3-1.js +93 -0
- package/dist/core/extensions/builtin/prompt-preset/matchers.d.ts +2 -0
- package/dist/core/extensions/builtin/prompt-preset/matchers.js +9 -0
- package/dist/core/extensions/builtin/prompt-preset/presets.js +3 -0
- package/dist/core/extensions/builtin/prompt-preset/settings.d.ts +1 -1
- package/dist/core/extensions/builtin/prompt-preset/settings.js +1 -0
- package/dist/core/extensions/builtin/terminal/rpc-monitor-observer.d.ts +2 -1
- package/dist/core/extensions/builtin/terminal/rpc-monitor-observer.js +12 -4
- package/dist/core/external-admission.d.ts +4 -1
- package/dist/core/external-admission.js +18 -2
- package/dist/core/lifecycle-session-binding.js +20 -0
- package/dist/core/sdk.js +1 -0
- package/dist/core/session-spawned-by.d.ts +4 -0
- package/dist/core/session-spawned-by.js +16 -0
- package/dist/main.js +7 -2
- package/dist/modes/rpc/host-admission-proxy.d.ts +2 -1
- package/dist/modes/rpc/host-admission-proxy.js +10 -9
- package/dist/modes/rpc/host-cli-entry.d.ts +2 -0
- package/dist/modes/rpc/host-cli-entry.js +13 -1
- package/dist/modes/rpc/host-ensure-client.d.ts +5 -1
- package/dist/modes/rpc/host-ensure-client.js +8 -0
- package/dist/modes/rpc/host-ensure-types.d.ts +1 -0
- package/dist/modes/rpc/host-ensure.js +6 -11
- package/dist/modes/rpc/host-gc-pass.js +3 -0
- package/dist/modes/rpc/host-gc.js +3 -0
- package/dist/modes/rpc/host-internal-transport.d.ts +16 -5
- package/dist/modes/rpc/host-internal-transport.js +40 -9
- package/dist/modes/rpc/host-lifecycle-proxy.d.ts +4 -8
- package/dist/modes/rpc/host-lifecycle-proxy.js +9 -21
- package/dist/modes/rpc/host-lifecycle-shutdown.d.ts +2 -0
- package/dist/modes/rpc/host-lifecycle-shutdown.js +3 -0
- package/dist/modes/rpc/host-lifecycle.js +9 -16
- package/dist/modes/rpc/host-observe-request.js +1 -1
- package/dist/modes/rpc/host-probe.d.ts +8 -6
- package/dist/modes/rpc/host-probe.js +13 -13
- package/dist/modes/rpc/host-request-key-root.d.ts +8 -0
- package/dist/modes/rpc/host-request-key-root.js +14 -0
- package/dist/modes/rpc/host-runner.d.ts +3 -1
- package/dist/modes/rpc/host-runner.js +6 -1
- package/dist/modes/rpc/host-socket-bind.d.ts +6 -0
- package/dist/modes/rpc/host-socket-bind.js +42 -0
- package/dist/modes/rpc/host-socket-request.d.ts +3 -2
- package/dist/modes/rpc/host-socket-request.js +55 -10
- package/dist/modes/rpc/host-status.d.ts +3 -2
- package/dist/modes/rpc/host-status.js +5 -0
- package/dist/modes/rpc/host-supervisor-log.d.ts +1 -0
- package/dist/modes/rpc/host-supervisor-log.js +3 -0
- package/dist/modes/rpc/host-watchdog.d.ts +8 -1
- package/dist/modes/rpc/host-watchdog.js +37 -12
- package/dist/modes/rpc/internal-channel.js +14 -14
- package/dist/modes/rpc/multi-session-host.js +18 -46
- package/dist/modes/rpc/rpc-auth-client.d.ts +13 -0
- package/dist/modes/rpc/rpc-auth-client.js +142 -0
- package/dist/modes/rpc/rpc-auth-proof.d.ts +12 -0
- package/dist/modes/rpc/rpc-auth-proof.js +27 -0
- package/dist/modes/rpc/rpc-client-socket.d.ts +5 -0
- package/dist/modes/rpc/rpc-client-socket.js +30 -0
- package/dist/modes/rpc/rpc-client.d.ts +2 -0
- package/dist/modes/rpc/rpc-client.js +2 -24
- package/dist/modes/rpc/rpc-host-command-types.d.ts +4 -0
- package/dist/modes/rpc/rpc-protocol-info-types.d.ts +6 -0
- package/dist/modes/rpc/rpc-public-auth.d.ts +41 -0
- package/dist/modes/rpc/rpc-public-auth.js +237 -0
- package/dist/modes/rpc/rpc-public-key.d.ts +28 -0
- package/dist/modes/rpc/rpc-public-key.js +193 -0
- package/dist/modes/rpc/session-router-open-profile.js +2 -10
- package/dist/modes/rpc/socket-ownership.d.ts +7 -0
- package/dist/modes/rpc/socket-ownership.js +17 -0
- package/docs/rpc.md +108 -2
- package/docs/settings.md +1 -1
- package/docs/usage.md +14 -0
- package/package.json +6 -6
- package/dist/bundle/chunks/chunk-3474DPZK.js +0 -2
- package/dist/bundle/chunks/chunk-64CFJHKT.js +0 -7
- package/dist/bundle/chunks/chunk-B6NJHBLH.js +0 -21
- package/dist/bundle/chunks/chunk-HZTQHE5O.js +0 -26
- package/dist/bundle/chunks/chunk-IBDADH5Z.js +0 -4
- package/dist/bundle/chunks/chunk-OJZD7CO7.js +0 -8
- package/dist/bundle/chunks/cli-main-4JNPG6LB.js +0 -3
- package/dist/bundle/chunks/host-command-I3ZMWQQ3.js +0 -2
- package/dist/bundle/chunks/host-lifecycle-QEO422VW.js +0 -3
- package/dist/bundle/chunks/host-session-command-INULKX6E.js +0 -20
- package/dist/bundle/chunks/interactive-mode-SYWJVPKK.js +0 -2
- package/dist/bundle/chunks/rpc-mode-JMCYSP4P.js +0 -2
- package/dist/bundle/chunks/rpc-monitor-source-34AQDTZ6.js +0 -3
- package/dist/bundle/chunks/session-control-endpoint-IW5X56WN.js +0 -3
package/dist/bundle/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url); { const __piWorkerThreads = require("node:worker_threads"); if (typeof __piWorkerThreads.markAsUncloneable !== "function") { __piWorkerThreads.markAsUncloneable = () => {}; } }
|
|
2
|
-
import{AgentSession,AgentSessionRuntime,ArminComponent,AssistantMessageComponent,BashExecutionComponent,BorderedLoader,BranchSummaryMessageComponent,CompactionSummaryMessageComponent,CredentialSynchronizationError,CustomEditor,CustomMessageComponent,DefaultResourceLoader,EVAL_HANDLE_ERROR_CODES,EvalHandleError,ExtensionEditorComponent,ExtensionRunner,FooterComponent,InteractiveMode,LoginDialogComponent,ModelRegistry,ModelRuntime,ModelSelectorComponent,OAuthSelectorComponent,ReservedCustodyKey,SettingsSelectorComponent,ShowImagesSelectorComponent,SkillInvocationMessageComponent,ThemeSelectorComponent,ThinkingSelectorComponent,ToolExecutionComponent,TreeSelectorComponent,UserMessageComponent,UserMessageSelectorComponent,buildNoticeBox,classifyRead,collectOrphanedChildren,connectWebViewService,convertToPng,copyToClipboard,createAgentSession,createAgentSessionFromServices,createAgentSessionRuntime,createAgentSessionServices,createBashTool,createBashToolDefinition,createCodingTools,createEditTool,createEditToolDefinition,createEventBus,createExtensionRuntime,createFindTool,createFindToolDefinition,createGrepTool,createGrepToolDefinition,createLocalBashOperations,createLsTool,createLsToolDefinition,createPowerShellTool,createReadOnlyTools,createReadTool,createReadToolDefinition,createWriteTool,createWriteToolDefinition,detectSupportedImageMimeTypeFromFile,discoverAndLoadExtensions,formatDimensionNote,formatSkillsForPrompt,generateDiffString,generateUnifiedPatch,kernelToolsStorage,loadProjectContextFiles,loadSkills,loadSkillsFromDir,main,noticeEntryRenderer,noticeMessageRenderer,parseFrontmatter,readStoredCredential,registerReadClassifier,renderDiff,resizeImage,resolveCliModel,resolveModelScopeWithDiagnostics,runPrintMode,runRpcMode,stripFrontmatter,wrapRegisteredTool,wrapRegisteredTools}from"./chunks/chunk-OA5INWHI.js";import{RpcClient,RpcClientOpenInFlightError,RpcTransportGoneError,UnknownCommandError,isTransportGoneError}from"./chunks/chunk-OJZD7CO7.js";import"./chunks/chunk-CZR7C6CY.js";import{DefaultPackageManager,DynamicBorder,ExtensionInputComponent,ExtensionSelectorComponent,SessionSelectorComponent,SettingsManager,keyHint,keyText,parseSkillBlock,rawKeyHint}from"./chunks/chunk-LR6Z6V54.js";import"./chunks/chunk-DXJJP6RP.js";import"./chunks/chunk-HCF5M6NA.js";import{DEFAULT_COMPACTION_SETTINGS,SESSION_CONTROL_DELIVERY_TYPE,calculateContextTokens,collectEntriesForBranchSummary,compact,defineTool,estimateTokens,findCutPoint,findTurnStartIndex,generateBranchSummary,generateSummary,generateSummaryWithUsage,getLastAssistantUsage,isBashToolResult,isEditToolResult,isFindToolResult,isGrepToolResult,isLsToolResult,isPowerShellToolResult,isReadToolResult,isSessionControlDeliveryDetails,isToolCallEventType,isWriteToolResult,prepareBranchEntries,serializeConversation,sessionControlSenderOf,shouldCompact,withFileMutationQueue}from"./chunks/chunk-HHYSXDYP.js";import"./chunks/chunk-GY5MR5KR.js";import{Theme,findReservedKeywordRuns,findReservedKeywordSpans,getLanguageFromPath,getMarkdownTheme,getSelectListTheme,getSettingsListTheme,highlightCode,initTheme}from"./chunks/chunk-AGQSRWNN.js";import{CURRENT_SESSION_VERSION,SessionManager,VIRTUAL_MODEL_STATE_ENTRY,buildContextEntries,buildSessionContext,buildSessionProjection,convertToLlm,getLatestCompactionEntry,migrateSessionEntries,parseSessionEntries,sessionEntryToContextMessages}from"./chunks/chunk-XF3LJC3O.js";import"./chunks/chunk-CNPDUC4D.js";import"./chunks/chunk-CDRFFHLL.js";import"./chunks/chunk-FIBIVBQK.js";import"./chunks/chunk-SGATKHO4.js";import{ProjectTrustStore,hasTrustRequiringProjectResources}from"./chunks/chunk-MLVIYDHK.js";import"./chunks/chunk-TIVW4P37.js";import"./chunks/chunk-H4QOEVS5.js";import"./chunks/chunk-VUKNGMDT.js";import"./chunks/chunk-MSQCTH6V.js";import"./chunks/chunk-KLAX467B.js";import"./chunks/chunk-JFFS72FL.js";import"./chunks/chunk-ORXZXUMC.js";import"./chunks/chunk-GZVCRV7I.js";import"./chunks/chunk-SOMFLLPD.js";import{readOwnFootprint,readProcessFootprint}from"./chunks/chunk-MTQQ2VQH.js";import{DEFAULT_HOST_LAUNCH_SPEC,HOST_EXIT_ERROR,HOST_EXIT_FALLBACK,HOST_EXIT_OK,HOST_EXIT_REFUSED,HOST_EXIT_USAGE,HostLaunchSpecError,PINNED_HOST_CLIENT_CAPABILITIES,TUI_PROBE_TIMEOUT_MS,classifyEndpointLiveness,endpointProbeTimeoutMs,ensureHost,handoffHost,loadHostLaunchSpec,parseHostLaunchSpec,readAllHostStatus,readHostStatus,runHostCommand,runHostRequest}from"./chunks/chunk-HZTQHE5O.js";import{GENERATION_HANDOFF_CAPABILITY,HOST_PROTOCOL_VERSION,HostEnsureRefusedError,REQUIRED_HOST_CAPABILITIES,compareEngineOrdinal,decideHostAction,engineBuildIdentity,engineBuildIdentityFrom,gcHostEndpoints,parseHostProtocolInfo,probeHost,stopHost}from"./chunks/chunk-64CFJHKT.js";import{createSyntheticSourceInfo}from"./chunks/chunk-QMRJYMNH.js";import{listHostEndpoints}from"./chunks/chunk-RQHK4QZ5.js";import"./chunks/chunk-4AOMNOGY.js";import"./chunks/chunk-KUPQO7MC.js";import{parseArgs}from"./chunks/chunk-BZ75DRZB.js";import"./chunks/chunk-26UBFF6N.js";import"./chunks/chunk-IBDADH5Z.js";import"./chunks/chunk-3474DPZK.js";import"./chunks/chunk-B6NJHBLH.js";import"./chunks/chunk-OUPD5LWY.js";import{ENDPOINT_REGISTRY_VERSION,createHostDaemonPaths,daemonDirectoryName,shardKey,shardSocketPath,shardSocketPathForKey}from"./chunks/chunk-QQSCUEYJ.js";import"./chunks/chunk-U3VOXCGP.js";import"./chunks/chunk-HB35RBP4.js";import"./chunks/chunk-Z6WGAK7W.js";import"./chunks/chunk-DLAY7CIU.js";import"./chunks/chunk-3BTN337S.js";import"./chunks/chunk-QXREUA5F.js";import"./chunks/chunk-RUGYFYH7.js";import"./chunks/chunk-OEFCY46F.js";import"./chunks/chunk-KRNXUTZJ.js";import"./chunks/chunk-TAV6QZFM.js";import"./chunks/chunk-PELNNWGO.js";import{DEFAULT_MAX_BYTES,DEFAULT_MAX_LINES,formatSize,truncateHead,truncateLine,truncateTail,truncateToVisualLines}from"./chunks/chunk-BRXN5R2F.js";import{sanitizeTerminalLabel,visibleWidth}from"./chunks/chunk-YJA2B7FQ.js";import{getPowerShellConfig,getShellConfig,withBundledBunCommands}from"./chunks/chunk-JAXZOEJE.js";import"./chunks/chunk-YU4AYH4C.js";import"./chunks/chunk-E6WYH3ZL.js";import"./chunks/chunk-COH5F7QV.js";import"./chunks/chunk-RFB5CBW7.js";import"./chunks/chunk-2VZJTDUX.js";import"./chunks/chunk-E4LBKOZG.js";import"./chunks/chunk-GVSBCJFI.js";import"./chunks/chunk-WASCMT6Y.js";import"./chunks/chunk-T36LJ6MW.js";import"./chunks/chunk-QGJLZ6BI.js";import"./chunks/chunk-WHPDEDCC.js";import"./chunks/chunk-AA2L2RHH.js";import"./chunks/chunk-HK46JMSC.js";import"./chunks/chunk-4P7WARQZ.js";import"./chunks/chunk-WDTJ6JKE.js";import"./chunks/chunk-5ROMKDLK.js";import"./chunks/chunk-3W47LTXQ.js";import"./chunks/chunk-6AOVUTUR.js";import"./chunks/chunk-45SZOLCU.js";import"./chunks/chunk-DMI55M2N.js";import"./chunks/chunk-PJ34QVL5.js";import"./chunks/chunk-BMX2U22F.js";import"./chunks/chunk-YU2P3CAR.js";import"./chunks/chunk-ONLNXGO3.js";import"./chunks/chunk-ZOFZRJSL.js";import"./chunks/chunk-2SOVDETB.js";import"./chunks/chunk-RAIZG6HA.js";import"./chunks/chunk-HRPMLI7O.js";import"./chunks/chunk-QEQG42HL.js";import{CONFIG_DIR_NAME,VERSION,getAgentDir,getDocsPath,getExamplesPath,getPackageDir,getReadmePath}from"./chunks/chunk-7YO7VQZW.js";import"./chunks/chunk-ATQFN5HI.js";import"./chunks/chunk-MIENF2YK.js";import"./chunks/chunk-OXNWERO4.js";import"./chunks/chunk-QN2BHP3M.js";import"./chunks/chunk-NTK2MHJ5.js";import"./chunks/chunk-7ASLQ243.js";import"./chunks/chunk-IKOFCODM.js";export{AgentSession,AgentSessionRuntime,ArminComponent,AssistantMessageComponent,BashExecutionComponent,BorderedLoader,BranchSummaryMessageComponent,CONFIG_DIR_NAME,CURRENT_SESSION_VERSION,CompactionSummaryMessageComponent,CredentialSynchronizationError,CustomEditor,CustomMessageComponent,DEFAULT_COMPACTION_SETTINGS,DEFAULT_HOST_LAUNCH_SPEC,DEFAULT_MAX_BYTES,DEFAULT_MAX_LINES,DefaultPackageManager,DefaultResourceLoader,DynamicBorder,ENDPOINT_REGISTRY_VERSION,EVAL_HANDLE_ERROR_CODES,EvalHandleError,ExtensionEditorComponent,ExtensionInputComponent,ExtensionRunner,ExtensionSelectorComponent,FooterComponent,GENERATION_HANDOFF_CAPABILITY,HOST_EXIT_ERROR,HOST_EXIT_FALLBACK,HOST_EXIT_OK,HOST_EXIT_REFUSED,HOST_EXIT_USAGE,HOST_PROTOCOL_VERSION,HostEnsureRefusedError,HostLaunchSpecError,InteractiveMode,LoginDialogComponent,ModelRegistry,ModelRuntime,ModelSelectorComponent,OAuthSelectorComponent,PINNED_HOST_CLIENT_CAPABILITIES,ProjectTrustStore,REQUIRED_HOST_CAPABILITIES,ReservedCustodyKey,RpcClient,RpcClientOpenInFlightError,RpcTransportGoneError,SESSION_CONTROL_DELIVERY_TYPE,SessionManager,SessionSelectorComponent,SettingsManager,SettingsSelectorComponent,ShowImagesSelectorComponent,SkillInvocationMessageComponent,TUI_PROBE_TIMEOUT_MS,Theme,ThemeSelectorComponent,ThinkingSelectorComponent,ToolExecutionComponent,TreeSelectorComponent,UnknownCommandError,UserMessageComponent,UserMessageSelectorComponent,VERSION,VIRTUAL_MODEL_STATE_ENTRY,buildContextEntries,buildNoticeBox,buildSessionContext,buildSessionProjection,calculateContextTokens,classifyEndpointLiveness,classifyRead,collectEntriesForBranchSummary,collectOrphanedChildren,compact,compareEngineOrdinal,connectWebViewService,convertToLlm,convertToPng,copyToClipboard,createAgentSession,createAgentSessionFromServices,createAgentSessionRuntime,createAgentSessionServices,createBashTool,createBashToolDefinition,createCodingTools,createEditTool,createEditToolDefinition,createEventBus,createExtensionRuntime,createFindTool,createFindToolDefinition,createGrepTool,createGrepToolDefinition,createHostDaemonPaths,createLocalBashOperations,createLsTool,createLsToolDefinition,createPowerShellTool,createReadOnlyTools,createReadTool,createReadToolDefinition,createSyntheticSourceInfo,createWriteTool,createWriteToolDefinition,daemonDirectoryName,decideHostAction,defineTool,detectSupportedImageMimeTypeFromFile,discoverAndLoadExtensions,endpointProbeTimeoutMs,engineBuildIdentity,engineBuildIdentityFrom,ensureHost,estimateTokens,findCutPoint,findReservedKeywordRuns,findReservedKeywordSpans,findTurnStartIndex,formatDimensionNote,formatSize,formatSkillsForPrompt,gcHostEndpoints,generateBranchSummary,generateDiffString,generateSummary,generateSummaryWithUsage,generateUnifiedPatch,getAgentDir,getDocsPath,getExamplesPath,getLanguageFromPath,getLastAssistantUsage,getLatestCompactionEntry,getMarkdownTheme,getPackageDir,getPowerShellConfig,getReadmePath,getSelectListTheme,getSettingsListTheme,getShellConfig,handoffHost,hasTrustRequiringProjectResources,highlightCode,initTheme,isBashToolResult,isEditToolResult,isFindToolResult,isGrepToolResult,isLsToolResult,isPowerShellToolResult,isReadToolResult,isSessionControlDeliveryDetails,isToolCallEventType,isTransportGoneError,isWriteToolResult,kernelToolsStorage,keyHint,keyText,listHostEndpoints,loadHostLaunchSpec,loadProjectContextFiles,loadSkills,loadSkillsFromDir,main,migrateSessionEntries,noticeEntryRenderer,noticeMessageRenderer,parseArgs,parseFrontmatter,parseHostLaunchSpec,parseHostProtocolInfo,parseSessionEntries,parseSkillBlock,prepareBranchEntries,probeHost,rawKeyHint,readAllHostStatus,readHostStatus,readOwnFootprint,readProcessFootprint,readStoredCredential,registerReadClassifier,renderDiff,resizeImage,resolveCliModel,resolveModelScopeWithDiagnostics,runHostCommand,runHostRequest,runPrintMode,runRpcMode,sanitizeTerminalLabel,serializeConversation,sessionControlSenderOf,sessionEntryToContextMessages,shardKey,shardSocketPath,shardSocketPathForKey,shouldCompact,stopHost,stripFrontmatter,truncateHead,truncateLine,truncateTail,truncateToVisualLines,visibleWidth,withBundledBunCommands,withFileMutationQueue,wrapRegisteredTool,wrapRegisteredTools};
|
|
2
|
+
import{AgentSession,AgentSessionRuntime,ArminComponent,AssistantMessageComponent,BashExecutionComponent,BorderedLoader,BranchSummaryMessageComponent,CompactionSummaryMessageComponent,CredentialSynchronizationError,CustomEditor,CustomMessageComponent,DefaultResourceLoader,EVAL_HANDLE_ERROR_CODES,EvalHandleError,ExtensionEditorComponent,ExtensionRunner,FooterComponent,InteractiveMode,LoginDialogComponent,ModelRegistry,ModelRuntime,ModelSelectorComponent,OAuthSelectorComponent,ReservedCustodyKey,SettingsSelectorComponent,ShowImagesSelectorComponent,SkillInvocationMessageComponent,ThemeSelectorComponent,ThinkingSelectorComponent,ToolExecutionComponent,TreeSelectorComponent,UserMessageComponent,UserMessageSelectorComponent,buildNoticeBox,classifyRead,collectOrphanedChildren,connectWebViewService,convertToPng,copyToClipboard,createAgentSession,createAgentSessionFromServices,createAgentSessionRuntime,createAgentSessionServices,createBashTool,createBashToolDefinition,createCodingTools,createEditTool,createEditToolDefinition,createEventBus,createExtensionRuntime,createFindTool,createFindToolDefinition,createGrepTool,createGrepToolDefinition,createLocalBashOperations,createLsTool,createLsToolDefinition,createPowerShellTool,createReadOnlyTools,createReadTool,createReadToolDefinition,createWriteTool,createWriteToolDefinition,detectSupportedImageMimeTypeFromFile,discoverAndLoadExtensions,formatDimensionNote,formatSkillsForPrompt,generateDiffString,generateUnifiedPatch,kernelToolsStorage,loadProjectContextFiles,loadSkills,loadSkillsFromDir,main,noticeEntryRenderer,noticeMessageRenderer,parseFrontmatter,readStoredCredential,registerReadClassifier,renderDiff,resizeImage,resolveCliModel,resolveModelScopeWithDiagnostics,runPrintMode,runRpcMode,stripFrontmatter,wrapRegisteredTool,wrapRegisteredTools}from"./chunks/chunk-GVJ76VQI.js";import{RpcClient,RpcClientOpenInFlightError,RpcTransportGoneError,UnknownCommandError,isTransportGoneError}from"./chunks/chunk-SGDOZT6B.js";import"./chunks/chunk-VOBD6FQG.js";import{DefaultPackageManager,DynamicBorder,ExtensionInputComponent,ExtensionSelectorComponent,SessionSelectorComponent,SettingsManager,keyHint,keyText,parseSkillBlock,rawKeyHint}from"./chunks/chunk-NQC7MI2G.js";import"./chunks/chunk-DXJJP6RP.js";import"./chunks/chunk-GXY5JEI5.js";import{DEFAULT_COMPACTION_SETTINGS,SESSION_CONTROL_DELIVERY_TYPE,calculateContextTokens,collectEntriesForBranchSummary,compact,defineTool,estimateTokens,findCutPoint,findTurnStartIndex,generateBranchSummary,generateSummary,generateSummaryWithUsage,getLastAssistantUsage,isBashToolResult,isEditToolResult,isFindToolResult,isGrepToolResult,isLsToolResult,isPowerShellToolResult,isReadToolResult,isSessionControlDeliveryDetails,isToolCallEventType,isWriteToolResult,prepareBranchEntries,serializeConversation,sessionControlSenderOf,shouldCompact,withFileMutationQueue}from"./chunks/chunk-42OY5SZZ.js";import"./chunks/chunk-GY5MR5KR.js";import{Theme,findReservedKeywordRuns,findReservedKeywordSpans,getLanguageFromPath,getMarkdownTheme,getSelectListTheme,getSettingsListTheme,highlightCode,initTheme}from"./chunks/chunk-EHQXLHRB.js";import{CURRENT_SESSION_VERSION,SessionManager,VIRTUAL_MODEL_STATE_ENTRY,buildContextEntries,buildSessionContext,buildSessionProjection,convertToLlm,getLatestCompactionEntry,migrateSessionEntries,parseSessionEntries,sessionEntryToContextMessages}from"./chunks/chunk-XF3LJC3O.js";import"./chunks/chunk-CNPDUC4D.js";import"./chunks/chunk-CDRFFHLL.js";import"./chunks/chunk-7UUOGZKR.js";import"./chunks/chunk-Y5OTHMXO.js";import{ProjectTrustStore,hasTrustRequiringProjectResources}from"./chunks/chunk-MLVIYDHK.js";import"./chunks/chunk-TIVW4P37.js";import"./chunks/chunk-H4QOEVS5.js";import"./chunks/chunk-3LNSLJ7N.js";import"./chunks/chunk-MSQCTH6V.js";import"./chunks/chunk-KLAX467B.js";import"./chunks/chunk-JFFS72FL.js";import"./chunks/chunk-ORXZXUMC.js";import"./chunks/chunk-GZVCRV7I.js";import"./chunks/chunk-SOMFLLPD.js";import{readOwnFootprint,readProcessFootprint}from"./chunks/chunk-MTQQ2VQH.js";import{DEFAULT_HOST_LAUNCH_SPEC,HOST_EXIT_ERROR,HOST_EXIT_FALLBACK,HOST_EXIT_OK,HOST_EXIT_REFUSED,HOST_EXIT_USAGE,HostLaunchSpecError,PINNED_HOST_CLIENT_CAPABILITIES,TUI_PROBE_TIMEOUT_MS,classifyEndpointLiveness,endpointProbeTimeoutMs,ensureHost,handoffHost,loadHostLaunchSpec,parseHostLaunchSpec,readAllHostStatus,readHostStatus,runHostCommand,runHostRequest}from"./chunks/chunk-3VOG6WFU.js";import{GENERATION_HANDOFF_CAPABILITY,HOST_PROTOCOL_VERSION,HostEnsureRefusedError,REQUIRED_HOST_CAPABILITIES,compareEngineOrdinal,decideHostAction,engineBuildIdentity,engineBuildIdentityFrom,gcHostEndpoints,parseHostProtocolInfo,probeHost,stopHost}from"./chunks/chunk-BMYNMUVZ.js";import{createSyntheticSourceInfo}from"./chunks/chunk-QMRJYMNH.js";import{listHostEndpoints}from"./chunks/chunk-FWXMMMCV.js";import"./chunks/chunk-4AOMNOGY.js";import"./chunks/chunk-KUPQO7MC.js";import{parseArgs}from"./chunks/chunk-U67ML6CQ.js";import"./chunks/chunk-26UBFF6N.js";import"./chunks/chunk-EWOEVVQT.js";import"./chunks/chunk-II22E3CV.js";import"./chunks/chunk-7IRLFYNM.js";import"./chunks/chunk-XUFUKDKJ.js";import{ENDPOINT_REGISTRY_VERSION,createHostDaemonPaths,daemonDirectoryName,shardKey,shardSocketPath,shardSocketPathForKey}from"./chunks/chunk-RHHBXIRN.js";import"./chunks/chunk-U3VOXCGP.js";import"./chunks/chunk-RVYSJBZ7.js";import"./chunks/chunk-HB35RBP4.js";import"./chunks/chunk-Z6WGAK7W.js";import"./chunks/chunk-DLAY7CIU.js";import"./chunks/chunk-3BTN337S.js";import"./chunks/chunk-QXREUA5F.js";import"./chunks/chunk-RUGYFYH7.js";import"./chunks/chunk-OEFCY46F.js";import"./chunks/chunk-KRNXUTZJ.js";import"./chunks/chunk-TAV6QZFM.js";import"./chunks/chunk-PELNNWGO.js";import{DEFAULT_MAX_BYTES,DEFAULT_MAX_LINES,formatSize,truncateHead,truncateLine,truncateTail,truncateToVisualLines}from"./chunks/chunk-QH2HSCMX.js";import{sanitizeTerminalLabel,visibleWidth}from"./chunks/chunk-FDL4CF6F.js";import{getPowerShellConfig,getShellConfig,withBundledBunCommands}from"./chunks/chunk-BWA4FVFW.js";import"./chunks/chunk-YU4AYH4C.js";import"./chunks/chunk-E6WYH3ZL.js";import"./chunks/chunk-COH5F7QV.js";import"./chunks/chunk-RFB5CBW7.js";import"./chunks/chunk-2VZJTDUX.js";import"./chunks/chunk-E4LBKOZG.js";import"./chunks/chunk-GVSBCJFI.js";import"./chunks/chunk-WASCMT6Y.js";import"./chunks/chunk-T36LJ6MW.js";import"./chunks/chunk-QGJLZ6BI.js";import"./chunks/chunk-WHPDEDCC.js";import"./chunks/chunk-AA2L2RHH.js";import"./chunks/chunk-HK46JMSC.js";import"./chunks/chunk-4P7WARQZ.js";import"./chunks/chunk-WDTJ6JKE.js";import"./chunks/chunk-5ROMKDLK.js";import"./chunks/chunk-3W47LTXQ.js";import"./chunks/chunk-6AOVUTUR.js";import"./chunks/chunk-45SZOLCU.js";import"./chunks/chunk-DMI55M2N.js";import"./chunks/chunk-PJ34QVL5.js";import"./chunks/chunk-BMX2U22F.js";import"./chunks/chunk-YU2P3CAR.js";import"./chunks/chunk-IUHU5PEC.js";import"./chunks/chunk-ZOFZRJSL.js";import"./chunks/chunk-2SOVDETB.js";import"./chunks/chunk-V3CK2AVC.js";import"./chunks/chunk-VRDU425E.js";import"./chunks/chunk-ZGAB7WQA.js";import{CONFIG_DIR_NAME,VERSION,getAgentDir,getDocsPath,getExamplesPath,getPackageDir,getReadmePath}from"./chunks/chunk-7YO7VQZW.js";import"./chunks/chunk-ATQFN5HI.js";import"./chunks/chunk-MIENF2YK.js";import"./chunks/chunk-OXNWERO4.js";import"./chunks/chunk-QN2BHP3M.js";import"./chunks/chunk-NTK2MHJ5.js";import"./chunks/chunk-7ASLQ243.js";import"./chunks/chunk-IKOFCODM.js";export{AgentSession,AgentSessionRuntime,ArminComponent,AssistantMessageComponent,BashExecutionComponent,BorderedLoader,BranchSummaryMessageComponent,CONFIG_DIR_NAME,CURRENT_SESSION_VERSION,CompactionSummaryMessageComponent,CredentialSynchronizationError,CustomEditor,CustomMessageComponent,DEFAULT_COMPACTION_SETTINGS,DEFAULT_HOST_LAUNCH_SPEC,DEFAULT_MAX_BYTES,DEFAULT_MAX_LINES,DefaultPackageManager,DefaultResourceLoader,DynamicBorder,ENDPOINT_REGISTRY_VERSION,EVAL_HANDLE_ERROR_CODES,EvalHandleError,ExtensionEditorComponent,ExtensionInputComponent,ExtensionRunner,ExtensionSelectorComponent,FooterComponent,GENERATION_HANDOFF_CAPABILITY,HOST_EXIT_ERROR,HOST_EXIT_FALLBACK,HOST_EXIT_OK,HOST_EXIT_REFUSED,HOST_EXIT_USAGE,HOST_PROTOCOL_VERSION,HostEnsureRefusedError,HostLaunchSpecError,InteractiveMode,LoginDialogComponent,ModelRegistry,ModelRuntime,ModelSelectorComponent,OAuthSelectorComponent,PINNED_HOST_CLIENT_CAPABILITIES,ProjectTrustStore,REQUIRED_HOST_CAPABILITIES,ReservedCustodyKey,RpcClient,RpcClientOpenInFlightError,RpcTransportGoneError,SESSION_CONTROL_DELIVERY_TYPE,SessionManager,SessionSelectorComponent,SettingsManager,SettingsSelectorComponent,ShowImagesSelectorComponent,SkillInvocationMessageComponent,TUI_PROBE_TIMEOUT_MS,Theme,ThemeSelectorComponent,ThinkingSelectorComponent,ToolExecutionComponent,TreeSelectorComponent,UnknownCommandError,UserMessageComponent,UserMessageSelectorComponent,VERSION,VIRTUAL_MODEL_STATE_ENTRY,buildContextEntries,buildNoticeBox,buildSessionContext,buildSessionProjection,calculateContextTokens,classifyEndpointLiveness,classifyRead,collectEntriesForBranchSummary,collectOrphanedChildren,compact,compareEngineOrdinal,connectWebViewService,convertToLlm,convertToPng,copyToClipboard,createAgentSession,createAgentSessionFromServices,createAgentSessionRuntime,createAgentSessionServices,createBashTool,createBashToolDefinition,createCodingTools,createEditTool,createEditToolDefinition,createEventBus,createExtensionRuntime,createFindTool,createFindToolDefinition,createGrepTool,createGrepToolDefinition,createHostDaemonPaths,createLocalBashOperations,createLsTool,createLsToolDefinition,createPowerShellTool,createReadOnlyTools,createReadTool,createReadToolDefinition,createSyntheticSourceInfo,createWriteTool,createWriteToolDefinition,daemonDirectoryName,decideHostAction,defineTool,detectSupportedImageMimeTypeFromFile,discoverAndLoadExtensions,endpointProbeTimeoutMs,engineBuildIdentity,engineBuildIdentityFrom,ensureHost,estimateTokens,findCutPoint,findReservedKeywordRuns,findReservedKeywordSpans,findTurnStartIndex,formatDimensionNote,formatSize,formatSkillsForPrompt,gcHostEndpoints,generateBranchSummary,generateDiffString,generateSummary,generateSummaryWithUsage,generateUnifiedPatch,getAgentDir,getDocsPath,getExamplesPath,getLanguageFromPath,getLastAssistantUsage,getLatestCompactionEntry,getMarkdownTheme,getPackageDir,getPowerShellConfig,getReadmePath,getSelectListTheme,getSettingsListTheme,getShellConfig,handoffHost,hasTrustRequiringProjectResources,highlightCode,initTheme,isBashToolResult,isEditToolResult,isFindToolResult,isGrepToolResult,isLsToolResult,isPowerShellToolResult,isReadToolResult,isSessionControlDeliveryDetails,isToolCallEventType,isTransportGoneError,isWriteToolResult,kernelToolsStorage,keyHint,keyText,listHostEndpoints,loadHostLaunchSpec,loadProjectContextFiles,loadSkills,loadSkillsFromDir,main,migrateSessionEntries,noticeEntryRenderer,noticeMessageRenderer,parseArgs,parseFrontmatter,parseHostLaunchSpec,parseHostProtocolInfo,parseSessionEntries,parseSkillBlock,prepareBranchEntries,probeHost,rawKeyHint,readAllHostStatus,readHostStatus,readOwnFootprint,readProcessFootprint,readStoredCredential,registerReadClassifier,renderDiff,resizeImage,resolveCliModel,resolveModelScopeWithDiagnostics,runHostCommand,runHostRequest,runPrintMode,runRpcMode,sanitizeTerminalLabel,serializeConversation,sessionControlSenderOf,sessionEntryToContextMessages,shardKey,shardSocketPath,shardSocketPathForKey,shouldCompact,stopHost,stripFrontmatter,truncateHead,truncateLine,truncateTail,truncateToVisualLines,visibleWidth,withBundledBunCommands,withFileMutationQueue,wrapRegisteredTool,wrapRegisteredTools};
|
package/dist/bundle/rpc-entry.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url); { const __piWorkerThreads = require("node:worker_threads"); if (typeof __piWorkerThreads.markAsUncloneable !== "function") { __piWorkerThreads.markAsUncloneable = () => {}; } }
|
|
3
|
-
import"./chunks/chunk-
|
|
3
|
+
import"./chunks/chunk-PXKF2RHD.js";import{main}from"./chunks/chunk-GVJ76VQI.js";import"./chunks/chunk-SGDOZT6B.js";import"./chunks/chunk-VOBD6FQG.js";import{configureHttpDispatcher}from"./chunks/chunk-NQC7MI2G.js";import"./chunks/chunk-DXJJP6RP.js";import"./chunks/chunk-GXY5JEI5.js";import"./chunks/chunk-42OY5SZZ.js";import"./chunks/chunk-GY5MR5KR.js";import"./chunks/chunk-EHQXLHRB.js";import"./chunks/chunk-XF3LJC3O.js";import"./chunks/chunk-CNPDUC4D.js";import"./chunks/chunk-CDRFFHLL.js";import"./chunks/chunk-7UUOGZKR.js";import"./chunks/chunk-Y5OTHMXO.js";import"./chunks/chunk-MLVIYDHK.js";import"./chunks/chunk-TIVW4P37.js";import"./chunks/chunk-H4QOEVS5.js";import"./chunks/chunk-3LNSLJ7N.js";import"./chunks/chunk-MSQCTH6V.js";import"./chunks/chunk-KLAX467B.js";import"./chunks/chunk-JFFS72FL.js";import"./chunks/chunk-ORXZXUMC.js";import"./chunks/chunk-GZVCRV7I.js";import"./chunks/chunk-SOMFLLPD.js";import"./chunks/chunk-MTQQ2VQH.js";import"./chunks/chunk-3VOG6WFU.js";import"./chunks/chunk-BMYNMUVZ.js";import"./chunks/chunk-QMRJYMNH.js";import"./chunks/chunk-FWXMMMCV.js";import"./chunks/chunk-4AOMNOGY.js";import"./chunks/chunk-KUPQO7MC.js";import"./chunks/chunk-U67ML6CQ.js";import"./chunks/chunk-26UBFF6N.js";import"./chunks/chunk-EWOEVVQT.js";import"./chunks/chunk-II22E3CV.js";import"./chunks/chunk-7IRLFYNM.js";import"./chunks/chunk-XUFUKDKJ.js";import"./chunks/chunk-RHHBXIRN.js";import"./chunks/chunk-U3VOXCGP.js";import"./chunks/chunk-RVYSJBZ7.js";import"./chunks/chunk-HB35RBP4.js";import"./chunks/chunk-Z6WGAK7W.js";import"./chunks/chunk-DLAY7CIU.js";import"./chunks/chunk-3BTN337S.js";import"./chunks/chunk-QXREUA5F.js";import"./chunks/chunk-RUGYFYH7.js";import"./chunks/chunk-OEFCY46F.js";import"./chunks/chunk-KRNXUTZJ.js";import"./chunks/chunk-TAV6QZFM.js";import"./chunks/chunk-PELNNWGO.js";import"./chunks/chunk-QH2HSCMX.js";import"./chunks/chunk-FDL4CF6F.js";import"./chunks/chunk-BWA4FVFW.js";import"./chunks/chunk-YU4AYH4C.js";import"./chunks/chunk-E6WYH3ZL.js";import"./chunks/chunk-COH5F7QV.js";import"./chunks/chunk-RFB5CBW7.js";import"./chunks/chunk-2VZJTDUX.js";import"./chunks/chunk-E4LBKOZG.js";import"./chunks/chunk-GVSBCJFI.js";import"./chunks/chunk-WASCMT6Y.js";import"./chunks/chunk-T36LJ6MW.js";import"./chunks/chunk-QGJLZ6BI.js";import"./chunks/chunk-WHPDEDCC.js";import"./chunks/chunk-AA2L2RHH.js";import"./chunks/chunk-HK46JMSC.js";import"./chunks/chunk-4P7WARQZ.js";import"./chunks/chunk-WDTJ6JKE.js";import"./chunks/chunk-5ROMKDLK.js";import"./chunks/chunk-3W47LTXQ.js";import"./chunks/chunk-6AOVUTUR.js";import"./chunks/chunk-45SZOLCU.js";import"./chunks/chunk-DMI55M2N.js";import"./chunks/chunk-PJ34QVL5.js";import"./chunks/chunk-BMX2U22F.js";import"./chunks/chunk-YU2P3CAR.js";import"./chunks/chunk-IUHU5PEC.js";import"./chunks/chunk-ZOFZRJSL.js";import"./chunks/chunk-2SOVDETB.js";import"./chunks/chunk-V3CK2AVC.js";import"./chunks/chunk-VRDU425E.js";import"./chunks/chunk-ZGAB7WQA.js";import{APP_NAME,scrubBrandFromEnvironment}from"./chunks/chunk-7YO7VQZW.js";import"./chunks/chunk-ATQFN5HI.js";import"./chunks/chunk-MIENF2YK.js";import"./chunks/chunk-OXNWERO4.js";import"./chunks/chunk-QN2BHP3M.js";import"./chunks/chunk-NTK2MHJ5.js";import"./chunks/chunk-7ASLQ243.js";import"./chunks/chunk-IKOFCODM.js";process.title=`${APP_NAME}-rpc`;scrubBrandFromEnvironment();process.env.PI_CODING_AGENT="true";process.env.AI_AGENT=APP_NAME;process.emitWarning=(()=>{});configureHttpDispatcher();main(["--mode","rpc",...process.argv.slice(2)]);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"buildId":"
|
|
1
|
+
{"buildId":"3f292cb226833e18","externals":["@earendil-works/chord","@earendil-works/pi-pty","@silvia-odwyer/photon-node","bufferutil","canvas","kerberos","supports-color","utf-8-validate"]}
|
package/dist/cli/args.d.ts
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { ThinkingLevel } from "@earendil-works/pi-agent-core";
|
|
5
5
|
import type { ExtensionFlag } from "../core/extensions/types.ts";
|
|
6
|
+
import type { SpawnedBy } from "../core/session-lifecycle-types.ts";
|
|
6
7
|
import type { TuiMode } from "../core/settings-manager.ts";
|
|
7
8
|
import { type ToolRuntimeKind } from "./tool-runtime.ts";
|
|
8
9
|
export type Mode = "text" | "json" | "rpc";
|
|
@@ -22,6 +23,7 @@ export interface Args {
|
|
|
22
23
|
noSession?: boolean;
|
|
23
24
|
session?: string;
|
|
24
25
|
sessionId?: string;
|
|
26
|
+
spawnedBy?: SpawnedBy;
|
|
25
27
|
fork?: string;
|
|
26
28
|
rebind?: string;
|
|
27
29
|
sessionDir?: string;
|
package/dist/cli/args.js
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { legacyProviderIdRejection } from "@earendil-works/pi-ai";
|
|
6
6
|
import chalk from "chalk";
|
|
7
7
|
import { APP_NAME, CONFIG_DIR_NAME, ENV_AGENT_DIR, ENV_SESSION_DIR } from "../config.js";
|
|
8
|
+
import { isSpawnedBy } from "../core/session-spawned-by.js";
|
|
8
9
|
import { isGrokNeoEnabled } from "./grok-neo-gate.js";
|
|
9
10
|
import { isToolRuntimeKind } from "./tool-runtime.js";
|
|
10
11
|
const SESSION_RUNTIMES = ["in-process", "worker"];
|
|
@@ -128,6 +129,30 @@ export function parseArgs(args, options = {}) {
|
|
|
128
129
|
else if (arg === "--session-id" && i + 1 < args.length) {
|
|
129
130
|
result.sessionId = args[++i];
|
|
130
131
|
}
|
|
132
|
+
else if (arg === "--spawned-by") {
|
|
133
|
+
const value = args[i + 1];
|
|
134
|
+
if (value === undefined || value.startsWith("-")) {
|
|
135
|
+
result.diagnostics.push({ type: "error", message: "--spawned-by requires a JSON object" });
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
i++;
|
|
139
|
+
try {
|
|
140
|
+
const ancestry = JSON.parse(value);
|
|
141
|
+
if (isSpawnedBy(ancestry))
|
|
142
|
+
result.spawnedBy = ancestry;
|
|
143
|
+
else
|
|
144
|
+
result.diagnostics.push({
|
|
145
|
+
type: "error",
|
|
146
|
+
message: "--spawned-by requires non-empty parentSessionId, rootSessionId, and taskId strings",
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
catch (error) {
|
|
150
|
+
if (!(error instanceof SyntaxError))
|
|
151
|
+
throw error;
|
|
152
|
+
result.diagnostics.push({ type: "error", message: "--spawned-by must be valid JSON" });
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
}
|
|
131
156
|
else if (arg === "--fork" && i + 1 < args.length) {
|
|
132
157
|
result.fork = args[++i];
|
|
133
158
|
}
|
|
@@ -394,6 +419,8 @@ ${chalk.bold("Options:")}
|
|
|
394
419
|
--resume, -r Select a session to resume
|
|
395
420
|
--session <path|id> Use specific session file or partial UUID
|
|
396
421
|
--session-id <id> Use exact project session ID, creating it if missing
|
|
422
|
+
--spawned-by <json> Fresh session ancestry: parentSessionId, rootSessionId, taskId
|
|
423
|
+
Ignored with a warning when resuming or forking
|
|
397
424
|
--fork <path|id> Fork specific session file or partial UUID into a new session
|
|
398
425
|
--rebind <path|id> Move a session from a moved or re-cloned repository into this directory and continue it
|
|
399
426
|
--session-dir <dir> Directory for session storage and lookup
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { ShardKind } from "../modes/rpc/host-daemon-paths.ts";
|
|
2
|
+
import type { HostDecisionPolicy } from "../modes/rpc/host-decision.ts";
|
|
3
|
+
import type { IdleHandoverTerms } from "../modes/rpc/host-handover-request.ts";
|
|
4
|
+
import { type HostStopGeneration } from "../modes/rpc/host-stop-generation.ts";
|
|
5
|
+
declare const SUBCOMMANDS: readonly ["ensure", "status", "stop", "handoff", "shard-path", "gc"];
|
|
6
|
+
type HostSubcommand = (typeof SUBCOMMANDS)[number];
|
|
7
|
+
export interface ParsedHostArgs {
|
|
8
|
+
readonly subcommand: HostSubcommand;
|
|
9
|
+
readonly specPath?: string;
|
|
10
|
+
readonly policy: HostDecisionPolicy;
|
|
11
|
+
readonly socket?: string;
|
|
12
|
+
readonly includeWorkers: boolean;
|
|
13
|
+
readonly all: boolean;
|
|
14
|
+
readonly drain: boolean;
|
|
15
|
+
readonly force: boolean;
|
|
16
|
+
readonly expectedGeneration?: HostStopGeneration;
|
|
17
|
+
/** `stop --drain`: the generation to drain, by instance id. */
|
|
18
|
+
readonly instanceId?: string;
|
|
19
|
+
/** `stop --drain`: how long to wait for the drained generation to exit. */
|
|
20
|
+
readonly waitMs?: number;
|
|
21
|
+
readonly json: boolean;
|
|
22
|
+
readonly kind?: ShardKind;
|
|
23
|
+
readonly owner?: string;
|
|
24
|
+
readonly root?: string;
|
|
25
|
+
readonly agentDir?: string;
|
|
26
|
+
/** Endpoint credentials only: where the public endpoint's key records live; the profile is unchanged. */
|
|
27
|
+
readonly keyRoot?: string;
|
|
28
|
+
readonly handover?: IdleHandoverTerms;
|
|
29
|
+
}
|
|
30
|
+
/** Parses the command line, or answers with the message that says why it could not. */
|
|
31
|
+
export declare function parseHostArgs(args: readonly string[]): ParsedHostArgs | string;
|
|
32
|
+
export {};
|
|
33
|
+
//# sourceMappingURL=host-command-args.d.ts.map
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
import { resolve } from "node:path";
|
|
2
|
+
import { APP_NAME } from "../config.js";
|
|
3
|
+
import { parseHostStopGeneration } from "../modes/rpc/host-stop-generation.js";
|
|
4
|
+
import { handoverTerms } from "./host-handover-args.js";
|
|
5
|
+
const SUBCOMMANDS = ["ensure", "status", "stop", "handoff", "shard-path", "gc"];
|
|
6
|
+
const POLICIES = ["upgrade", "fallback", "never"];
|
|
7
|
+
/** Parses the command line, or answers with the message that says why it could not. */
|
|
8
|
+
export function parseHostArgs(args) {
|
|
9
|
+
const [subcommand, ...rest] = args;
|
|
10
|
+
if (subcommand === undefined || !isSubcommand(subcommand)) {
|
|
11
|
+
return `Error: unknown host command "${subcommand ?? ""}".`;
|
|
12
|
+
}
|
|
13
|
+
let specPath;
|
|
14
|
+
let policy = "upgrade";
|
|
15
|
+
let socket;
|
|
16
|
+
let includeWorkers = false;
|
|
17
|
+
let all = false;
|
|
18
|
+
let drain = false;
|
|
19
|
+
let force = false;
|
|
20
|
+
let expectedGeneration;
|
|
21
|
+
let instanceId;
|
|
22
|
+
let waitMs;
|
|
23
|
+
let json = false;
|
|
24
|
+
let kind;
|
|
25
|
+
let owner;
|
|
26
|
+
let root;
|
|
27
|
+
let agentDir;
|
|
28
|
+
let keyRoot;
|
|
29
|
+
const handover = {};
|
|
30
|
+
for (let index = 0; index < rest.length; index++) {
|
|
31
|
+
const flag = rest[index];
|
|
32
|
+
const value = rest[index + 1];
|
|
33
|
+
if (flag === "--rpc-key-root" && value !== undefined && !value.startsWith("--")) {
|
|
34
|
+
keyRoot = resolve(value);
|
|
35
|
+
index++;
|
|
36
|
+
}
|
|
37
|
+
else if (flag === "--json") {
|
|
38
|
+
json = true;
|
|
39
|
+
}
|
|
40
|
+
else if (flag === "--include-workers") {
|
|
41
|
+
includeWorkers = true;
|
|
42
|
+
}
|
|
43
|
+
else if (flag === "--all" && subcommand === "status") {
|
|
44
|
+
all = true;
|
|
45
|
+
}
|
|
46
|
+
else if (flag === "--kind" && subcommand === "shard-path" && (value === "p" || value === "i")) {
|
|
47
|
+
kind = value;
|
|
48
|
+
index++;
|
|
49
|
+
}
|
|
50
|
+
else if (flag === "--owner" && subcommand === "shard-path" && value !== undefined) {
|
|
51
|
+
owner = value;
|
|
52
|
+
index++;
|
|
53
|
+
}
|
|
54
|
+
else if (flag === "--root" && subcommand === "shard-path" && value !== undefined) {
|
|
55
|
+
root = value;
|
|
56
|
+
index++;
|
|
57
|
+
}
|
|
58
|
+
else if (flag === "--agent-dir" && subcommand === "gc" && value !== undefined) {
|
|
59
|
+
agentDir = value;
|
|
60
|
+
index++;
|
|
61
|
+
}
|
|
62
|
+
else if (subcommand === "handoff" && value !== undefined && HANDOVER_FLAGS.has(flag ?? "")) {
|
|
63
|
+
handover[flag ?? ""] = value;
|
|
64
|
+
index++;
|
|
65
|
+
}
|
|
66
|
+
else if (flag === "--expected-generation" && subcommand === "stop" && value !== undefined) {
|
|
67
|
+
expectedGeneration = parseHostStopGeneration(value);
|
|
68
|
+
if (expectedGeneration === undefined)
|
|
69
|
+
return "Error: --expected-generation needs instanceId, generation, pid and processStartTime (null where the platform records none).";
|
|
70
|
+
index++;
|
|
71
|
+
}
|
|
72
|
+
else if (flag === "--instance" && subcommand === "stop" && value !== undefined) {
|
|
73
|
+
instanceId = value;
|
|
74
|
+
index++;
|
|
75
|
+
}
|
|
76
|
+
else if (flag === "--wait-ms" && subcommand === "stop" && value !== undefined) {
|
|
77
|
+
waitMs = value;
|
|
78
|
+
index++;
|
|
79
|
+
}
|
|
80
|
+
else if (flag === "--drain") {
|
|
81
|
+
drain = true;
|
|
82
|
+
}
|
|
83
|
+
else if (flag === "--force") {
|
|
84
|
+
force = true;
|
|
85
|
+
}
|
|
86
|
+
else if (flag === "--launch-spec" && value !== undefined) {
|
|
87
|
+
specPath = value;
|
|
88
|
+
index++;
|
|
89
|
+
}
|
|
90
|
+
else if (flag === "--socket" && value !== undefined) {
|
|
91
|
+
socket = value;
|
|
92
|
+
index++;
|
|
93
|
+
}
|
|
94
|
+
else if (flag === "--policy" && value !== undefined && isPolicy(value)) {
|
|
95
|
+
policy = value;
|
|
96
|
+
index++;
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
return `Error: unknown option "${flag}" for "${APP_NAME} host ${subcommand}".`;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if (subcommand === "shard-path" && (kind === undefined || owner === undefined)) {
|
|
103
|
+
return `Error: "${APP_NAME} host shard-path" needs --kind <p|i> and --owner <id>.`;
|
|
104
|
+
}
|
|
105
|
+
if ((instanceId !== undefined || waitMs !== undefined) && !drain) {
|
|
106
|
+
return `Error: "${APP_NAME} host stop" takes --instance and --wait-ms only with --drain.`;
|
|
107
|
+
}
|
|
108
|
+
const parsedWaitMs = waitMs === undefined ? undefined : Number(waitMs);
|
|
109
|
+
if (expectedGeneration !== undefined && drain)
|
|
110
|
+
return "Error: --expected-generation is for a hard stop, not --drain.";
|
|
111
|
+
if (parsedWaitMs !== undefined && (!Number.isSafeInteger(parsedWaitMs) || parsedWaitMs <= 0)) {
|
|
112
|
+
return `Error: "${APP_NAME} host stop --wait-ms" needs a positive whole number of milliseconds.`;
|
|
113
|
+
}
|
|
114
|
+
const terms = Object.keys(handover).length === 0 ? undefined : handoverTerms(handover);
|
|
115
|
+
if (typeof terms === "string")
|
|
116
|
+
return terms;
|
|
117
|
+
return {
|
|
118
|
+
subcommand,
|
|
119
|
+
...(specPath !== undefined && { specPath }),
|
|
120
|
+
policy,
|
|
121
|
+
...(socket !== undefined && { socket }),
|
|
122
|
+
includeWorkers,
|
|
123
|
+
all,
|
|
124
|
+
drain,
|
|
125
|
+
force,
|
|
126
|
+
...(expectedGeneration !== undefined && { expectedGeneration }),
|
|
127
|
+
...(instanceId !== undefined && { instanceId }),
|
|
128
|
+
...(parsedWaitMs !== undefined && { waitMs: parsedWaitMs }),
|
|
129
|
+
json,
|
|
130
|
+
...(kind !== undefined && { kind }),
|
|
131
|
+
...(owner !== undefined && { owner }),
|
|
132
|
+
...(root !== undefined && { root }),
|
|
133
|
+
...(agentDir !== undefined && { agentDir }),
|
|
134
|
+
...(keyRoot !== undefined && { keyRoot }),
|
|
135
|
+
...(terms !== undefined && { handover: terms }),
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
const HANDOVER_FLAGS = new Set(["--when", "--operation", "--if-instance", "--if-generation", "--target-build"]);
|
|
139
|
+
function isSubcommand(value) {
|
|
140
|
+
return SUBCOMMANDS.includes(value);
|
|
141
|
+
}
|
|
142
|
+
function isPolicy(value) {
|
|
143
|
+
return POLICIES.includes(value);
|
|
144
|
+
}
|
|
145
|
+
//# sourceMappingURL=host-command-args.js.map
|
|
@@ -1,30 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import type { HostDecisionPolicy } from "../modes/rpc/host-decision.ts";
|
|
3
|
-
import type { IdleHandoverTerms } from "../modes/rpc/host-handover-request.ts";
|
|
4
|
-
import { type HostStopGeneration } from "../modes/rpc/host-stop-generation.ts";
|
|
5
|
-
declare const SUBCOMMANDS: readonly ["ensure", "status", "stop", "handoff", "shard-path", "gc"];
|
|
6
|
-
type HostSubcommand = (typeof SUBCOMMANDS)[number];
|
|
7
|
-
interface ParsedHostArgs {
|
|
8
|
-
readonly subcommand: HostSubcommand;
|
|
9
|
-
readonly specPath?: string;
|
|
10
|
-
readonly policy: HostDecisionPolicy;
|
|
11
|
-
readonly socket?: string;
|
|
12
|
-
readonly includeWorkers: boolean;
|
|
13
|
-
readonly all: boolean;
|
|
14
|
-
readonly drain: boolean;
|
|
15
|
-
readonly force: boolean;
|
|
16
|
-
readonly expectedGeneration?: HostStopGeneration;
|
|
17
|
-
/** `stop --drain`: the generation to drain, by instance id. */
|
|
18
|
-
readonly instanceId?: string;
|
|
19
|
-
/** `stop --drain`: how long to wait for the drained generation to exit. */
|
|
20
|
-
readonly waitMs?: number;
|
|
21
|
-
readonly json: boolean;
|
|
22
|
-
readonly kind?: ShardKind;
|
|
23
|
-
readonly owner?: string;
|
|
24
|
-
readonly root?: string;
|
|
25
|
-
readonly agentDir?: string;
|
|
26
|
-
readonly handover?: IdleHandoverTerms;
|
|
27
|
-
}
|
|
1
|
+
export { parseHostArgs } from "./host-command-args.ts";
|
|
28
2
|
/**
|
|
29
3
|
* Runs one `host` invocation and returns the exit code it means, having written its single JSON
|
|
30
4
|
* line. Exported for the launchers that drive the same surface without a shell.
|
|
@@ -32,7 +6,4 @@ interface ParsedHostArgs {
|
|
|
32
6
|
export declare function runHostCommand(args: readonly string[]): Promise<number>;
|
|
33
7
|
/** The endpoint this client would reach: the one it was given, the branded override, or the default. */
|
|
34
8
|
export declare function resolveHostSocket(explicit: string | undefined, agentDir: string): string;
|
|
35
|
-
/** Parses the command line, or answers with the message that says why it could not. */
|
|
36
|
-
export declare function parseHostArgs(args: readonly string[]): ParsedHostArgs | string;
|
|
37
|
-
export {};
|
|
38
9
|
//# sourceMappingURL=host-command.d.ts.map
|
package/dist/cli/host-command.js
CHANGED
|
@@ -26,11 +26,9 @@ import { APP_NAME, getAgentDir } from "../config.js";
|
|
|
26
26
|
import { envValue } from "../core/brand.js";
|
|
27
27
|
import { DEFAULT_HOST_LAUNCH_SPEC, HostLaunchSpecError, loadHostLaunchSpec, } from "../modes/rpc/host-launch-spec.js";
|
|
28
28
|
import { HOST_EXIT_ERROR, HOST_EXIT_USAGE, runHostRequest, } from "../modes/rpc/host-runner.js";
|
|
29
|
-
import {
|
|
29
|
+
import { parseHostArgs } from "./host-command-args.js";
|
|
30
30
|
import { emit } from "./host-emit.js";
|
|
31
|
-
|
|
32
|
-
const SUBCOMMANDS = ["ensure", "status", "stop", "handoff", "shard-path", "gc"];
|
|
33
|
-
const POLICIES = ["upgrade", "fallback", "never"];
|
|
31
|
+
export { parseHostArgs } from "./host-command-args.js";
|
|
34
32
|
const USAGE = `usage: ${APP_NAME} host <ensure|status|stop|handoff|shard-path|gc> [options]
|
|
35
33
|
|
|
36
34
|
ensure [--launch-spec <file>] [--policy upgrade|fallback|never] [--socket <path>]
|
|
@@ -43,6 +41,7 @@ const USAGE = `usage: ${APP_NAME} host <ensure|status|stop|handoff|shard-path|gc
|
|
|
43
41
|
gc [--agent-dir <dir>] [--json] (removes provably dead endpoints only; ignores --socket)
|
|
44
42
|
session <open|close|model|prompt|steer|abort|read|state|list|wait> [...] (see "senpi host session")
|
|
45
43
|
|
|
44
|
+
--rpc-key-root <dir> endpoint credentials only; keeps this client's profile
|
|
46
45
|
--json the answer is one JSON line on stdout (always, except shard-path's bare path)`;
|
|
47
46
|
/**
|
|
48
47
|
* Runs one `host` invocation and returns the exit code it means, having written its single JSON
|
|
@@ -55,7 +54,8 @@ export async function runHostCommand(args) {
|
|
|
55
54
|
return HOST_EXIT_USAGE;
|
|
56
55
|
}
|
|
57
56
|
try {
|
|
58
|
-
const
|
|
57
|
+
const request = await hostRequest(parsed);
|
|
58
|
+
const outcome = await runHostRequest(request, parsed.keyRoot === undefined ? {} : { keyRoot: parsed.keyRoot });
|
|
59
59
|
if (parsed.subcommand === "shard-path" && !parsed.json)
|
|
60
60
|
writeSync(1, `${String(outcome.payload.socket)}\n`);
|
|
61
61
|
else
|
|
@@ -116,138 +116,6 @@ function launchSpec(specPath) {
|
|
|
116
116
|
export function resolveHostSocket(explicit, agentDir) {
|
|
117
117
|
return explicit ?? envValue("RPC_SOCKET") ?? resolve(agentDir, "rpc", "rpc.sock");
|
|
118
118
|
}
|
|
119
|
-
/** Parses the command line, or answers with the message that says why it could not. */
|
|
120
|
-
export function parseHostArgs(args) {
|
|
121
|
-
const [subcommand, ...rest] = args;
|
|
122
|
-
if (subcommand === undefined || !isSubcommand(subcommand)) {
|
|
123
|
-
return `Error: unknown host command "${subcommand ?? ""}".`;
|
|
124
|
-
}
|
|
125
|
-
let specPath;
|
|
126
|
-
let policy = "upgrade";
|
|
127
|
-
let socket;
|
|
128
|
-
let includeWorkers = false;
|
|
129
|
-
let all = false;
|
|
130
|
-
let drain = false;
|
|
131
|
-
let force = false;
|
|
132
|
-
let expectedGeneration;
|
|
133
|
-
let instanceId;
|
|
134
|
-
let waitMs;
|
|
135
|
-
let json = false;
|
|
136
|
-
let kind;
|
|
137
|
-
let owner;
|
|
138
|
-
let root;
|
|
139
|
-
let agentDir;
|
|
140
|
-
const handover = {};
|
|
141
|
-
for (let index = 0; index < rest.length; index++) {
|
|
142
|
-
const flag = rest[index];
|
|
143
|
-
const value = rest[index + 1];
|
|
144
|
-
if (flag === "--json") {
|
|
145
|
-
json = true;
|
|
146
|
-
}
|
|
147
|
-
else if (flag === "--include-workers") {
|
|
148
|
-
includeWorkers = true;
|
|
149
|
-
}
|
|
150
|
-
else if (flag === "--all" && subcommand === "status") {
|
|
151
|
-
all = true;
|
|
152
|
-
}
|
|
153
|
-
else if (flag === "--kind" && subcommand === "shard-path" && (value === "p" || value === "i")) {
|
|
154
|
-
kind = value;
|
|
155
|
-
index++;
|
|
156
|
-
}
|
|
157
|
-
else if (flag === "--owner" && subcommand === "shard-path" && value !== undefined) {
|
|
158
|
-
owner = value;
|
|
159
|
-
index++;
|
|
160
|
-
}
|
|
161
|
-
else if (flag === "--root" && subcommand === "shard-path" && value !== undefined) {
|
|
162
|
-
root = value;
|
|
163
|
-
index++;
|
|
164
|
-
}
|
|
165
|
-
else if (flag === "--agent-dir" && subcommand === "gc" && value !== undefined) {
|
|
166
|
-
agentDir = value;
|
|
167
|
-
index++;
|
|
168
|
-
}
|
|
169
|
-
else if (subcommand === "handoff" && value !== undefined && HANDOVER_FLAGS.has(flag ?? "")) {
|
|
170
|
-
handover[flag ?? ""] = value;
|
|
171
|
-
index++;
|
|
172
|
-
}
|
|
173
|
-
else if (flag === "--expected-generation" && subcommand === "stop" && value !== undefined) {
|
|
174
|
-
expectedGeneration = parseHostStopGeneration(value);
|
|
175
|
-
if (expectedGeneration === undefined)
|
|
176
|
-
return "Error: --expected-generation needs instanceId, generation, pid and processStartTime (null where the platform records none).";
|
|
177
|
-
index++;
|
|
178
|
-
}
|
|
179
|
-
else if (flag === "--instance" && subcommand === "stop" && value !== undefined) {
|
|
180
|
-
instanceId = value;
|
|
181
|
-
index++;
|
|
182
|
-
}
|
|
183
|
-
else if (flag === "--wait-ms" && subcommand === "stop" && value !== undefined) {
|
|
184
|
-
waitMs = value;
|
|
185
|
-
index++;
|
|
186
|
-
}
|
|
187
|
-
else if (flag === "--drain") {
|
|
188
|
-
drain = true;
|
|
189
|
-
}
|
|
190
|
-
else if (flag === "--force") {
|
|
191
|
-
force = true;
|
|
192
|
-
}
|
|
193
|
-
else if (flag === "--launch-spec" && value !== undefined) {
|
|
194
|
-
specPath = value;
|
|
195
|
-
index++;
|
|
196
|
-
}
|
|
197
|
-
else if (flag === "--socket" && value !== undefined) {
|
|
198
|
-
socket = value;
|
|
199
|
-
index++;
|
|
200
|
-
}
|
|
201
|
-
else if (flag === "--policy" && value !== undefined && isPolicy(value)) {
|
|
202
|
-
policy = value;
|
|
203
|
-
index++;
|
|
204
|
-
}
|
|
205
|
-
else {
|
|
206
|
-
return `Error: unknown option "${flag}" for "${APP_NAME} host ${subcommand}".`;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
if (subcommand === "shard-path" && (kind === undefined || owner === undefined)) {
|
|
210
|
-
return `Error: "${APP_NAME} host shard-path" needs --kind <p|i> and --owner <id>.`;
|
|
211
|
-
}
|
|
212
|
-
if ((instanceId !== undefined || waitMs !== undefined) && !drain) {
|
|
213
|
-
return `Error: "${APP_NAME} host stop" takes --instance and --wait-ms only with --drain.`;
|
|
214
|
-
}
|
|
215
|
-
const parsedWaitMs = waitMs === undefined ? undefined : Number(waitMs);
|
|
216
|
-
if (expectedGeneration !== undefined && drain)
|
|
217
|
-
return "Error: --expected-generation is for a hard stop, not --drain.";
|
|
218
|
-
if (parsedWaitMs !== undefined && (!Number.isSafeInteger(parsedWaitMs) || parsedWaitMs <= 0)) {
|
|
219
|
-
return `Error: "${APP_NAME} host stop --wait-ms" needs a positive whole number of milliseconds.`;
|
|
220
|
-
}
|
|
221
|
-
const terms = Object.keys(handover).length === 0 ? undefined : handoverTerms(handover);
|
|
222
|
-
if (typeof terms === "string")
|
|
223
|
-
return terms;
|
|
224
|
-
return {
|
|
225
|
-
subcommand,
|
|
226
|
-
...(specPath !== undefined && { specPath }),
|
|
227
|
-
policy,
|
|
228
|
-
...(socket !== undefined && { socket }),
|
|
229
|
-
includeWorkers,
|
|
230
|
-
all,
|
|
231
|
-
drain,
|
|
232
|
-
force,
|
|
233
|
-
...(expectedGeneration !== undefined && { expectedGeneration }),
|
|
234
|
-
...(instanceId !== undefined && { instanceId }),
|
|
235
|
-
...(parsedWaitMs !== undefined && { waitMs: parsedWaitMs }),
|
|
236
|
-
json,
|
|
237
|
-
...(kind !== undefined && { kind }),
|
|
238
|
-
...(owner !== undefined && { owner }),
|
|
239
|
-
...(root !== undefined && { root }),
|
|
240
|
-
...(agentDir !== undefined && { agentDir }),
|
|
241
|
-
...(terms !== undefined && { handover: terms }),
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
const HANDOVER_FLAGS = new Set(["--when", "--operation", "--if-instance", "--if-generation", "--target-build"]);
|
|
245
|
-
function isSubcommand(value) {
|
|
246
|
-
return SUBCOMMANDS.includes(value);
|
|
247
|
-
}
|
|
248
|
-
function isPolicy(value) {
|
|
249
|
-
return POLICIES.includes(value);
|
|
250
|
-
}
|
|
251
119
|
function assertNever(value) {
|
|
252
120
|
throw new Error(`unreachable host subcommand: ${JSON.stringify(value)}`);
|
|
253
121
|
}
|
|
@@ -4,6 +4,7 @@ export interface ParsedHostSessionArgs {
|
|
|
4
4
|
readonly command: CommandArgs<HostSessionRequest>;
|
|
5
5
|
readonly socket?: string;
|
|
6
6
|
readonly specPath?: string;
|
|
7
|
+
readonly keyRoot?: string;
|
|
7
8
|
}
|
|
8
9
|
export declare function parseHostSessionArgs(args: readonly string[]): ParsedHostSessionArgs | string;
|
|
9
10
|
export declare function runHostSessionCommand(args: readonly string[]): Promise<number>;
|
|
@@ -4,9 +4,10 @@ import { APP_NAME, getAgentDir } from "../config.js";
|
|
|
4
4
|
import { DEFAULT_HOST_LAUNCH_SPEC, HostLaunchSpecError, loadHostLaunchSpec } from "../modes/rpc/host-launch-spec.js";
|
|
5
5
|
import { HOST_EXIT_ERROR, HOST_EXIT_USAGE } from "../modes/rpc/host-outcome.js";
|
|
6
6
|
import { runHostSessionRequest } from "../modes/rpc/host-session-runner.js";
|
|
7
|
+
import { withRpcKeyRoot } from "../modes/rpc/rpc-auth-client.js";
|
|
7
8
|
import { resolveHostSocket } from "./host-command.js";
|
|
8
9
|
import { emit } from "./host-emit.js";
|
|
9
|
-
const USAGE = `usage: ${APP_NAME} host session <command> [--socket <path>] [--json]
|
|
10
|
+
const USAGE = `usage: ${APP_NAME} host session <command> [--socket <path>] [--rpc-key-root <dir>] [--json]
|
|
10
11
|
|
|
11
12
|
open --cwd <dir> [--model <provider/id>] [--name <text>] [--prompt <text|@file>] [--launch-spec <file>]
|
|
12
13
|
close <ref>
|
|
@@ -48,6 +49,7 @@ export function parseHostSessionArgs(args) {
|
|
|
48
49
|
continue;
|
|
49
50
|
}
|
|
50
51
|
const allowed = flag === "--socket" ||
|
|
52
|
+
flag === "--rpc-key-root" ||
|
|
51
53
|
(action === "open" && ["--cwd", "--model", "--name", "--prompt", "--launch-spec"].includes(flag)) ||
|
|
52
54
|
(action === "read" && ["--tail", "--since"].includes(flag)) ||
|
|
53
55
|
(action === "wait" && ["--until", "--timeout"].includes(flag)) ||
|
|
@@ -61,7 +63,7 @@ export function parseHostSessionArgs(args) {
|
|
|
61
63
|
if (positional.length !== count)
|
|
62
64
|
return `${action} expects ${count} positional argument(s).`;
|
|
63
65
|
const ref = positional[0] ?? "";
|
|
64
|
-
const common = { socket: values["--socket"], specPath: values["--launch-spec"] };
|
|
66
|
+
const common = { socket: values["--socket"], specPath: values["--launch-spec"], keyRoot: values["--rpc-key-root"] };
|
|
65
67
|
switch (action) {
|
|
66
68
|
case "open": {
|
|
67
69
|
if (!values["--cwd"])
|
|
@@ -161,7 +163,7 @@ export async function runHostSessionCommand(args) {
|
|
|
161
163
|
: await loadHostLaunchSpec(parsed.specPath),
|
|
162
164
|
}
|
|
163
165
|
: { ...command, target };
|
|
164
|
-
const outcome = await runHostSessionRequest(request);
|
|
166
|
+
const outcome = await withRpcKeyRoot(parsed.keyRoot === undefined ? (process.env.SENPI_RPC_KEY_ROOT ?? agentDir) : resolve(parsed.keyRoot), () => runHostSessionRequest(request));
|
|
165
167
|
emit(outcome.payload);
|
|
166
168
|
return outcome.exitCode;
|
|
167
169
|
}
|
|
@@ -2975,7 +2975,7 @@ export class AgentSession {
|
|
|
2975
2975
|
timestamp: now,
|
|
2976
2976
|
},
|
|
2977
2977
|
],
|
|
2978
|
-
}, { maxTokens: 1, signal });
|
|
2978
|
+
}, { maxTokens: 1, signal, cwd: this._cwd });
|
|
2979
2979
|
const ok = result.stopReason !== "error" && result.stopReason !== "aborted";
|
|
2980
2980
|
if (!ok && result.stopReason === "error" && admission.kind === "probe") {
|
|
2981
2981
|
this._fallbackCircuits.noteFailure(selector, { errorMessage: result.errorMessage });
|
|
@@ -12,6 +12,7 @@ import { plannedContextWindow } from "./context-window.js";
|
|
|
12
12
|
import { longContextAvailable, onLongContextAvailabilityChange } from "./long-context.js";
|
|
13
13
|
import { createOAuthConfig } from "./oauth-login.js";
|
|
14
14
|
import { registerSessionRegistry } from "./session-registry-wiring.js";
|
|
15
|
+
import { requireAnthropicSubscriptionCwd } from "./session-cwd.js";
|
|
15
16
|
import { loadAnthropicSubscriptionProviderSettingsFromDisk, } from "./settings.js";
|
|
16
17
|
import { streamAnthropicSubscription } from "./stream.js";
|
|
17
18
|
export { ANTHROPIC_SUBSCRIPTION_PROVIDER_ID } from "./account-management.js";
|
|
@@ -51,6 +52,7 @@ function readStoredCredential(providerId) {
|
|
|
51
52
|
}
|
|
52
53
|
}
|
|
53
54
|
export function registerAnthropicSubscriptionExtension(pi, deps = {}) {
|
|
55
|
+
const cwd = requireAnthropicSubscriptionCwd(pi.cwd);
|
|
54
56
|
registerClaudeAccountCommand(pi);
|
|
55
57
|
registerSessionRegistry(pi);
|
|
56
58
|
// The lane re-registers whenever the 1M window is refused or offered again, so the session's current
|
|
@@ -68,7 +70,7 @@ export function registerAnthropicSubscriptionExtension(pi, deps = {}) {
|
|
|
68
70
|
try {
|
|
69
71
|
const settings = deps.readSettings
|
|
70
72
|
? deps.readSettings()
|
|
71
|
-
: loadAnthropicSubscriptionProviderSettingsFromDisk(
|
|
73
|
+
: loadAnthropicSubscriptionProviderSettingsFromDisk(cwd);
|
|
72
74
|
return settings.enabled !== false;
|
|
73
75
|
}
|
|
74
76
|
catch {
|
|
@@ -85,7 +87,7 @@ export function registerAnthropicSubscriptionExtension(pi, deps = {}) {
|
|
|
85
87
|
try {
|
|
86
88
|
const settings = deps.readSettings
|
|
87
89
|
? deps.readSettings()
|
|
88
|
-
: loadAnthropicSubscriptionProviderSettingsFromDisk(
|
|
90
|
+
: loadAnthropicSubscriptionProviderSettingsFromDisk(cwd);
|
|
89
91
|
return { tokenInjection: settings.tokenInjection, enabled: settings.enabled };
|
|
90
92
|
}
|
|
91
93
|
catch {
|