@code-yeongyu/senpi 2026.10.24-2 → 2026.10.24-3
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 +15 -0
- package/dist/bundle/chunks/chunk-4TRKE3ZC.js +7 -0
- 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-ONLNXGO3.js → chunk-AVLYZET7.js} +1 -1
- package/dist/bundle/chunks/{chunk-VZAYN5SB.js → chunk-CYG4LS4S.js} +1 -1
- package/dist/bundle/chunks/chunk-CZYADQ2E.js +8 -0
- package/dist/bundle/chunks/{chunk-OA5INWHI.js → chunk-DITSGW4R.js} +68 -8
- package/dist/bundle/chunks/{chunk-IELM5U6I.js → chunk-DYWHYQUD.js} +2 -2
- package/dist/bundle/chunks/chunk-EWOEVVQT.js +4 -0
- package/dist/bundle/chunks/{chunk-RQHK4QZ5.js → chunk-FWXMMMCV.js} +1 -1
- package/dist/bundle/chunks/{chunk-HHYSXDYP.js → chunk-GOB5BLDV.js} +1 -1
- package/dist/bundle/chunks/{chunk-BRXN5R2F.js → chunk-H6IG2ITJ.js} +1 -1
- package/dist/bundle/chunks/{chunk-3N2PQEQV.js → chunk-I5NIJZDY.js} +1 -1
- package/dist/bundle/chunks/chunk-II22E3CV.js +3 -0
- package/dist/bundle/chunks/chunk-MRN6IKOQ.js +27 -0
- 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-RAIZG6HA.js → chunk-V3CK2AVC.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-QEQG42HL.js → chunk-ZGAB7WQA.js} +1 -1
- package/dist/bundle/chunks/cli-main-BOYWBHOB.js +3 -0
- package/dist/bundle/chunks/host-command-7MAXSZIH.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-L2UTORL5.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-NVBFOE5R.js +2 -0
- package/dist/bundle/chunks/{multi-session-host-O5GZQSRL.js → multi-session-host-3TVASSQD.js} +12 -12
- package/dist/bundle/chunks/{package-manager-cli-LC5GAGTW.js → package-manager-cli-5BHVDVJC.js} +1 -1
- package/dist/bundle/chunks/{role-4G43UDOC.js → role-BHA5ROSF.js} +1 -1
- package/dist/bundle/chunks/rpc-mode-LPP46I7H.js +2 -0
- package/dist/bundle/chunks/rpc-monitor-source-OL5KU6NO.js +3 -0
- package/dist/bundle/chunks/{schedule-command-QNCVE4HM.js → schedule-command-QW67J57R.js} +1 -1
- package/dist/bundle/chunks/session-control-endpoint-QQBBY5AT.js +3 -0
- package/dist/bundle/chunks/session-worker.js +425 -359
- 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/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/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/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/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/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-DITSGW4R.js";import{RpcClient,RpcClientOpenInFlightError,RpcTransportGoneError,UnknownCommandError,isTransportGoneError}from"./chunks/chunk-CZYADQ2E.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-GOB5BLDV.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-7UUOGZKR.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-MRN6IKOQ.js";import{GENERATION_HANDOFF_CAPABILITY,HOST_PROTOCOL_VERSION,HostEnsureRefusedError,REQUIRED_HOST_CAPABILITIES,compareEngineOrdinal,decideHostAction,engineBuildIdentity,engineBuildIdentityFrom,gcHostEndpoints,parseHostProtocolInfo,probeHost,stopHost}from"./chunks/chunk-4TRKE3ZC.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-BZ75DRZB.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-H6IG2ITJ.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-AVLYZET7.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-DYWHYQUD.js";import{main}from"./chunks/chunk-DITSGW4R.js";import"./chunks/chunk-CZYADQ2E.js";import"./chunks/chunk-CZR7C6CY.js";import{configureHttpDispatcher}from"./chunks/chunk-LR6Z6V54.js";import"./chunks/chunk-DXJJP6RP.js";import"./chunks/chunk-HCF5M6NA.js";import"./chunks/chunk-GOB5BLDV.js";import"./chunks/chunk-GY5MR5KR.js";import"./chunks/chunk-AGQSRWNN.js";import"./chunks/chunk-XF3LJC3O.js";import"./chunks/chunk-CNPDUC4D.js";import"./chunks/chunk-CDRFFHLL.js";import"./chunks/chunk-7UUOGZKR.js";import"./chunks/chunk-SGATKHO4.js";import"./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"./chunks/chunk-MTQQ2VQH.js";import"./chunks/chunk-MRN6IKOQ.js";import"./chunks/chunk-4TRKE3ZC.js";import"./chunks/chunk-QMRJYMNH.js";import"./chunks/chunk-FWXMMMCV.js";import"./chunks/chunk-4AOMNOGY.js";import"./chunks/chunk-KUPQO7MC.js";import"./chunks/chunk-BZ75DRZB.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-H6IG2ITJ.js";import"./chunks/chunk-YJA2B7FQ.js";import"./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-AVLYZET7.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":"a5d3a9e2318db93e","externals":["@earendil-works/chord","@earendil-works/pi-pty","@silvia-odwyer/photon-node","bufferutil","canvas","kerberos","supports-color","utf-8-validate"]}
|
|
@@ -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
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { FABLE55_LAUNCH, isFable55ModelId } from "@earendil-works/pi-ai/utils/fable55-launch";
|
|
2
|
-
import { extractClaudeOpusVersion, extractGpt5Version, isClaudeFable5Model, isClaudeFable51Model, isClaudeHaiku55Model, isClaudeOpus5Model, isClaudeOpus55Model, isClaudeSonnet55Model, isDeepseekV4Flash0731Model, isDeepseekV4FlashModel, isDeepseekV4ProModel, isDeepseekV41FlashModel, isGemini4ArgonModel, isGlm52Model, isGlm53Model, isGpt6FamilyModel, isGrok45Model, isGrok46Model, isGrok47Model, isKimiK3Model, isKimiK26Model, isKimiK27Model, isKimiK28Model, isSWE2Model, } from "./matchers.js";
|
|
2
|
+
import { extractClaudeOpusVersion, extractGpt5Version, isClaudeFable5Model, isClaudeFable51Model, isClaudeHaiku55Model, isClaudeOpus5Model, isClaudeOpus55Model, isClaudeSonnet55Model, isDeepseekV4Flash0731Model, isDeepseekV4FlashModel, isDeepseekV4ProModel, isDeepseekV41FlashModel, isGemini4ArgonModel, isGlm52Model, isGlm53Model, isGpt6FamilyModel, isGrok45Model, isGrok46Model, isGrok47Model, isKimiK3Model, isKimiK31Model, isKimiK26Model, isKimiK27Model, isKimiK28Model, isSWE2Model, } from "./matchers.js";
|
|
3
3
|
export function resolvePresetName(input) {
|
|
4
4
|
const model = { id: input.modelID, provider: input.providerID, name: input.name };
|
|
5
5
|
if (isGpt6FamilyModel(model)) {
|
|
@@ -9,6 +9,9 @@ export function resolvePresetName(input) {
|
|
|
9
9
|
if (gpt5Version) {
|
|
10
10
|
return gpt5Version;
|
|
11
11
|
}
|
|
12
|
+
if (isKimiK31Model(model)) {
|
|
13
|
+
return "kimi-k3-1";
|
|
14
|
+
}
|
|
12
15
|
if (isSWE2Model(model) || isKimiK3Model(model)) {
|
|
13
16
|
return "kimi-k3";
|
|
14
17
|
}
|
|
@@ -88,6 +91,7 @@ export const PROMPT_PRESET_MODEL_CASES = [
|
|
|
88
91
|
{ providerID: "openai", modelID: "gpt-5.4", preset: "gpt-5.4" },
|
|
89
92
|
{ providerID: "openai", modelID: "gpt-5.3-codex", preset: "gpt-5.3-codex" },
|
|
90
93
|
{ providerID: "openai", modelID: "gpt-5.2", preset: "gpt-5.2" },
|
|
94
|
+
{ providerID: "kimi-coding", modelID: "k3.1-pro", preset: "kimi-k3-1" },
|
|
91
95
|
{ providerID: "moonshotai", modelID: "kimi-k3", preset: "kimi-k3" },
|
|
92
96
|
{ providerID: "kimi-for-coding", modelID: "kimi-for-coding", preset: "kimi-k2-8" },
|
|
93
97
|
{ providerID: "kimi-for-coding", modelID: "kimi-for-coding-highspeed", preset: "kimi-k2-7" },
|
|
@@ -124,6 +128,7 @@ export const AUTO_RESOLVED_PRESET_NAMES = [
|
|
|
124
128
|
"gpt-5.4",
|
|
125
129
|
"gpt-5.3-codex",
|
|
126
130
|
"gpt-5.2",
|
|
131
|
+
"kimi-k3-1",
|
|
127
132
|
"kimi-k3",
|
|
128
133
|
"kimi-k2-8",
|
|
129
134
|
"kimi-k2-7",
|