@code-yeongyu/senpi 2026.11.10-3 → 2026.11.11

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.
Files changed (108) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/dist/bundle/chunks/{chunk-Z2C5N2LM.js → chunk-5F2XC6UC.js} +2 -2
  3. package/dist/bundle/chunks/{chunk-H3VJVKUK.js → chunk-5PIZWSNG.js} +2 -2
  4. package/dist/bundle/chunks/{chunk-DEQLHN2J.js → chunk-BPEA5SWW.js} +1 -1
  5. package/dist/bundle/chunks/{chunk-DIHIEJFV.js → chunk-BUDJLVMF.js} +1 -1
  6. package/dist/bundle/chunks/{chunk-47T6YMI2.js → chunk-IBDAV2AL.js} +1 -1
  7. package/dist/bundle/chunks/{chunk-O5WJVIEU.js → chunk-J4ADZ2OK.js} +1 -1
  8. package/dist/bundle/chunks/{chunk-T2SMQPRE.js → chunk-K3GAGIPX.js} +1 -1
  9. package/dist/bundle/chunks/{chunk-HZDKQOWB.js → chunk-L6DF5G6K.js} +1 -1
  10. package/dist/bundle/chunks/{chunk-E266ORGA.js → chunk-LJFQYCFH.js} +1 -1
  11. package/dist/bundle/chunks/{chunk-DHAAWL2H.js → chunk-NRZAJUUO.js} +1 -1
  12. package/dist/bundle/chunks/{chunk-R2Z7CX77.js → chunk-OSNR3IRD.js} +1 -1
  13. package/dist/bundle/chunks/{chunk-AC6MDRAE.js → chunk-PUZDKFRT.js} +81 -81
  14. package/dist/bundle/chunks/{chunk-6Q7Y2G5A.js → chunk-SANWO37B.js} +1 -1
  15. package/dist/bundle/chunks/{chunk-NN7NESW2.js → chunk-SS5VTBAV.js} +1 -1
  16. package/dist/bundle/chunks/{chunk-JSD6O3RJ.js → chunk-XUDKT4UH.js} +1 -1
  17. package/dist/bundle/chunks/{cli-main-ZTT3N4DO.js → cli-main-7II7GCIR.js} +1 -1
  18. package/dist/bundle/chunks/{credential-accounts-5KHVGSCY.js → credential-accounts-N3B5YJS7.js} +1 -1
  19. package/dist/bundle/chunks/github-copilot.js +1 -1
  20. package/dist/bundle/chunks/{hand-entry-UV5XPMBF.js → hand-entry-ONOLRMVB.js} +1 -1
  21. package/dist/bundle/chunks/{host-command-BZN7WYYV.js → host-command-KWMJLPBS.js} +1 -1
  22. package/dist/bundle/chunks/{host-lifecycle-TNHASSFJ.js → host-lifecycle-4WQDCN3Y.js} +1 -1
  23. package/dist/bundle/chunks/host-lifecycle.js +4 -4
  24. package/dist/bundle/chunks/{host-session-command-O5WYHZXH.js → host-session-command-ZDYEKCUB.js} +1 -1
  25. package/dist/bundle/chunks/{interactive-mode-OCU4NDPC.js → interactive-mode-EPE4M32G.js} +1 -1
  26. package/dist/bundle/chunks/{main-CNDP6HCF.js → main-OM7BKVZG.js} +1 -1
  27. package/dist/bundle/chunks/{multi-session-host-ODGJAGJP.js → multi-session-host-DB6XMY53.js} +2 -2
  28. package/dist/bundle/chunks/{package-manager-cli-HSPUG4RJ.js → package-manager-cli-GLU5Q2KV.js} +1 -1
  29. package/dist/bundle/chunks/{rpc-mode-KOZPXU3U.js → rpc-mode-SDJVBT36.js} +1 -1
  30. package/dist/bundle/chunks/{schedule-command-SG44FE23.js → schedule-command-5SQD7M5N.js} +1 -1
  31. package/dist/bundle/chunks/{session-control-endpoint-5A24JYPE.js → session-control-endpoint-R25A2QGS.js} +1 -1
  32. package/dist/bundle/chunks/{session-picker-73YRS3GE.js → session-picker-GZM5CVQL.js} +1 -1
  33. package/dist/bundle/chunks/session-worker.js +88 -88
  34. package/dist/bundle/cli.js +2 -2
  35. package/dist/bundle/host-supervisor.js +4 -4
  36. package/dist/bundle/index.js +1 -1
  37. package/dist/bundle/rpc-entry.js +1 -1
  38. package/dist/bundle/runtime-manifest.json +1 -1
  39. package/dist/core/agent-session.d.ts +2 -0
  40. package/dist/core/credential-accounts.d.ts +2 -0
  41. package/dist/core/credential-accounts.js +10 -1
  42. package/dist/core/dynamic-prompt/intent-gate.js +2 -2
  43. package/dist/core/dynamic-prompt/style.js +2 -2
  44. package/dist/core/dynamic-prompt/verification.js +2 -2
  45. package/dist/core/extensions/builtin/anthropic-subscription/accounts.d.ts +3 -0
  46. package/dist/core/extensions/builtin/anthropic-subscription/claude-cli-account-test.js +3 -1
  47. package/dist/core/extensions/builtin/anthropic-subscription/claude-cli-connection-test.d.ts +3 -1
  48. package/dist/core/extensions/builtin/anthropic-subscription/claude-cli-connection-test.js +47 -16
  49. package/dist/core/extensions/builtin/anthropic-subscription/claude-cli-login-slots.d.ts +1 -1
  50. package/dist/core/extensions/builtin/anthropic-subscription/claude-cli-login-slots.js +4 -2
  51. package/dist/core/extensions/builtin/anthropic-subscription/errors.d.ts +1 -0
  52. package/dist/core/extensions/builtin/anthropic-subscription/errors.js +14 -5
  53. package/dist/core/extensions/builtin/anthropic-subscription/oauth-login.js +3 -3
  54. package/dist/core/extensions/builtin/goal/continuation.d.ts +6 -0
  55. package/dist/core/extensions/builtin/goal/continuation.js +3 -2
  56. package/dist/core/extensions/builtin/goal/index.js +10 -26
  57. package/dist/core/extensions/builtin/goal/lifecycle-helpers.d.ts +0 -6
  58. package/dist/core/extensions/builtin/goal/lifecycle-helpers.js +3 -37
  59. package/dist/core/extensions/builtin/goal/monitor-continuation.js +66 -7
  60. package/dist/core/extensions/builtin/goal/provider-retry.d.ts +9 -0
  61. package/dist/core/extensions/builtin/goal/provider-retry.js +16 -0
  62. package/dist/core/extensions/builtin/goal/reload-reengagement.d.ts +3 -2
  63. package/dist/core/extensions/builtin/goal/reload-reengagement.js +4 -4
  64. package/dist/core/extensions/builtin/goal/session-start-continuation.d.ts +28 -0
  65. package/dist/core/extensions/builtin/goal/session-start-continuation.js +75 -0
  66. package/dist/core/extensions/builtin/goal/store.d.ts +1 -0
  67. package/dist/core/extensions/builtin/goal/store.js +1 -1
  68. package/dist/core/extensions/builtin/handoff-hint/index.js +15 -11
  69. package/dist/core/extensions/builtin/handoff-hint/replacement-relay.d.ts +16 -0
  70. package/dist/core/extensions/builtin/handoff-hint/replacement-relay.js +17 -0
  71. package/dist/core/extensions/builtin/prompt-preset/claude-fable-5-1.js +3 -3
  72. package/dist/core/extensions/builtin/prompt-preset/claude-fable-5-2.js +5 -4
  73. package/dist/core/extensions/builtin/prompt-preset/claude-fable-5.js +3 -3
  74. package/dist/core/extensions/builtin/prompt-preset/claude-haiku-5-5.js +3 -3
  75. package/dist/core/extensions/builtin/prompt-preset/claude-opus-5-5.js +3 -3
  76. package/dist/core/extensions/builtin/prompt-preset/claude-opus-5.js +4 -4
  77. package/dist/core/extensions/builtin/prompt-preset/claude-sonnet-5-5.js +3 -3
  78. package/dist/core/extensions/builtin/prompt-preset/deepseek-v4-1-flash.js +3 -3
  79. package/dist/core/extensions/builtin/prompt-preset/gpt-5.5.js +3 -3
  80. package/dist/core/extensions/builtin/prompt-preset/gpt-5.6.js +2 -2
  81. package/dist/core/extensions/builtin/prompt-preset/gpt-6-astra.js +3 -3
  82. package/dist/core/extensions/builtin/prompt-preset/grok-4.5.js +1 -1
  83. package/dist/core/extensions/builtin/prompt-preset/grok-4.6.js +4 -4
  84. package/dist/core/extensions/builtin/prompt-preset/grok-4.7.js +5 -5
  85. package/dist/core/extensions/builtin/prompt-preset/kimi-k3-1.js +4 -4
  86. package/dist/core/extensions/builtin/prompt-preset/kimi-k3.js +7 -6
  87. package/dist/core/resource-loader.js +19 -3
  88. package/dist/core/retry-fallback/controller-types.d.ts +2 -0
  89. package/dist/core/retry-fallback/controller.js +9 -2
  90. package/dist/core/retry-fallback/cooldown.d.ts +7 -0
  91. package/dist/core/retry-fallback/cooldown.js +13 -1
  92. package/dist/core/retry-fallback/credential-recovery.d.ts +7 -0
  93. package/dist/core/retry-fallback/credential-recovery.js +24 -0
  94. package/dist/core/retry-fallback/settings.d.ts +8 -5
  95. package/dist/core/retry-fallback/settings.js +9 -6
  96. package/dist/modes/rpc/delegation-declaration.js +1 -1
  97. package/dist/modes/rpc/host-gc-evidence.d.ts +1 -1
  98. package/dist/modes/rpc/host-gc-evidence.js +9 -3
  99. package/dist/modes/rpc/host-gc.js +4 -1
  100. package/dist/modes/rpc/rpc-session-state-types.d.ts +2 -0
  101. package/dist/modes/rpc/session-attachment-gate.js +3 -0
  102. package/dist/private-fd-startup-fillers.d.ts +2 -2
  103. package/dist/private-fd-startup-fillers.js +34 -4
  104. package/docs/rpc.md +2 -1
  105. package/docs/settings.md +1 -1
  106. package/native/socket-secret/prebuilds/win32-arm64/senpi_socket_secret.win32-arm64.node +0 -0
  107. package/native/socket-secret/prebuilds/win32-x64/senpi_socket_secret.win32-x64.node +0 -0
  108. package/package.json +6 -6
@@ -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,BashExecutionComponent,BorderedLoader,BranchSummaryMessageComponent,CompactionSummaryMessageComponent,CredentialSynchronizationError,CustomMessageComponent,DEFAULT_COMPACTION_SETTINGS,DefaultResourceLoader,EVAL_HANDLE_ERROR_CODES,EvalHandleError,ExtensionRunner,FooterComponent,InteractiveMode,JOB_WIDGET_STATE_EVENT,KILL_GUARD_MODULE_URL,LoginDialogComponent,ModelRegistry,ModelRuntime,ModelSelectorComponent,OAuthSelectorComponent,ReservedCustodyKey,SettingsSelectorComponent,ShowImagesSelectorComponent,SkillInvocationMessageComponent,TextTap,ThemeSelectorComponent,ThinkingSelectorComponent,ToolExecutionComponent,TreeSelectorComponent,UserMessageSelectorComponent,buildNoticeBox,calculateContextTokens,classifyRead,collectEntriesForBranchSummary,collectOrphanedChildren,compact,connectWebViewService,convertToPng,createAgentSession,createAgentSessionFromServices,createAgentSessionRuntime,createAgentSessionServices,createBashTool,createBashToolDefinition,createCodingTools,createEditTool,createEditToolDefinition,createEventBus,createExtensionRuntime,createFindTool,createFindToolDefinition,createGrepTool,createGrepToolDefinition,createLocalBashOperations,createLsTool,createLsToolDefinition,createPowerShellTool,createReadOnlyTools,createReadTool,createReadToolDefinition,createWriteTool,createWriteToolDefinition,defineTool,detectSupportedImageMimeTypeFromFile,discoverAndLoadExtensions,estimateTokens,findCutPoint,findTurnStartIndex,formatDimensionNote,formatSkillsForPrompt,generateBranchSummary,generateDiffString,generateSummary,generateSummaryWithUsage,generateUnifiedPatch,getLastAssistantUsage,isBashToolResult,isEditToolResult,isFindToolResult,isGrepToolResult,isLsToolResult,isPowerShellToolResult,isReadToolResult,isToolCallEventType,isWriteToolResult,kernelToolsStorage,killGuardProtectedPids,loadProjectContextFiles,loadSkills,loadSkillsFromDir,main,noticeEntryRenderer,noticeMessageRenderer,parseFrontmatter,parseSkillBlock,prepareBranchEntries,readKillGuardSetting,readStoredCredential,registerReadClassifier,renderDiff,resizeImage,resolveCliModel,resolveModelScopeWithDiagnostics,runPrintMode,runRpcMode,serializeConversation,shouldCompact,stripFrontmatter,withFileMutationQueue,wrapRegisteredTool,wrapRegisteredTools}from"./chunks/chunk-AC6MDRAE.js";import"./chunks/chunk-O5WJVIEU.js";import{RELOCATION_TOOL_NAMES,SESSION_CONTROL_DELIVERY_TYPE,isSessionControlDeliveryDetails,sessionControlRemoteOriginOf,sessionControlSenderOf}from"./chunks/chunk-H3VJVKUK.js";import{RpcClient,RpcClientOpenInFlightError,RpcTransportGoneError,UnknownCommandError,isTransportGoneError}from"./chunks/chunk-NN7NESW2.js";import"./chunks/chunk-3IYEGHBI.js";import"./chunks/chunk-S7NAJQB3.js";import"./chunks/chunk-NLYT7BND.js";import{DefaultPackageManager,SessionSelectorComponent,SettingsManager}from"./chunks/chunk-JSD6O3RJ.js";import"./chunks/chunk-FEQDJBDL.js";import"./chunks/chunk-XI6THO4F.js";import{CURRENT_SESSION_VERSION,SessionManager,VIRTUAL_MODEL_STATE_ENTRY,buildContextEntries,buildSessionContext,buildSessionProjection,convertToLlm,getLatestCompactionEntry,migrateSessionEntries,parseSessionEntries,sessionEntryToContextMessages}from"./chunks/chunk-L3KVP7VJ.js";import"./chunks/chunk-J2I56WLK.js";import"./chunks/chunk-GTJJ73DE.js";import{ProjectTrustStore,hasTrustRequiringProjectResources}from"./chunks/chunk-VD7AKTGP.js";import{AssistantMessageComponent,CustomEditor,ExtensionEditorComponent,REQUIRED_COMPACTION_ERROR_MESSAGE,RequiredCompactionError,UserMessageComponent,copyToClipboard}from"./chunks/chunk-L7DGTA3L.js";import"./chunks/chunk-M2VJVJMK.js";import"./chunks/chunk-TQHNFP77.js";import{DynamicBorder,ExtensionInputComponent,ExtensionSelectorComponent,Theme,findReservedKeywordRuns,findReservedKeywordSpans,getLanguageFromPath,getMarkdownTheme,getSelectListTheme,getSettingsListTheme,highlightCode,initTheme,keyHint,keyText,rawKeyHint}from"./chunks/chunk-2ODGHBUD.js";import{SecretInputUnavailableError}from"./chunks/chunk-HKCFMDJN.js";import"./chunks/chunk-E6ZBTSC6.js";import"./chunks/chunk-3QPE75AR.js";import"./chunks/chunk-4GKU755E.js";import"./chunks/chunk-Y3TMJV3J.js";import"./chunks/chunk-PJI5GT7U.js";import"./chunks/chunk-MOVB6H22.js";import{registerRpcRemoteSource}from"./chunks/chunk-DLPV4B3R.js";import"./chunks/chunk-VPVD5G32.js";import"./chunks/chunk-H4QOEVS5.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-HZDKQOWB.js";import{GENERATION_HANDOFF_CAPABILITY,HOST_PROTOCOL_VERSION,HostEnsureRefusedError,REQUIRED_HOST_CAPABILITIES,compareEngineOrdinal,decideHostAction,engineBuildIdentity,engineBuildIdentityFrom,gcHostEndpoints,parseHostProtocolInfo,probeHost,stopHost}from"./chunks/chunk-Z2C5N2LM.js";import{createSyntheticSourceInfo}from"./chunks/chunk-QMRJYMNH.js";import{listHostEndpoints}from"./chunks/chunk-DZQA5LVN.js";import{parseArgs}from"./chunks/chunk-IEY2SL46.js";import"./chunks/chunk-26UBFF6N.js";import"./chunks/chunk-4JMGWVRH.js";import"./chunks/chunk-E5O4SP5I.js";import"./chunks/chunk-DX43FSQT.js";import"./chunks/chunk-7WYJAYHH.js";import"./chunks/chunk-47T6YMI2.js";import"./chunks/chunk-R2Z7CX77.js";import"./chunks/chunk-UCXBDE6R.js";import{ENDPOINT_REGISTRY_VERSION,createHostDaemonPaths,daemonDirectoryName,shardKey,shardSocketPath,shardSocketPathForKey}from"./chunks/chunk-YI6KRJDC.js";import"./chunks/chunk-VUY4BZDI.js";import"./chunks/chunk-SF4MQDKZ.js";import"./chunks/chunk-DHAAWL2H.js";import"./chunks/chunk-DQY26AX3.js";import"./chunks/chunk-GILDYS3O.js";import"./chunks/chunk-KLAX467B.js";import"./chunks/chunk-C4AHHZ6P.js";import"./chunks/chunk-TCZORL3V.js";import"./chunks/chunk-DHORIIVQ.js";import"./chunks/chunk-GZVCRV7I.js";import"./chunks/chunk-KUPQO7MC.js";import"./chunks/chunk-U3VOXCGP.js";import"./chunks/chunk-7X72IACK.js";import"./chunks/chunk-5H43O4MA.js";import"./chunks/chunk-WHQ2QPP5.js";import"./chunks/chunk-LXINMDMX.js";import"./chunks/chunk-WB4BUHOH.js";import"./chunks/chunk-NJ43NBSP.js";import"./chunks/chunk-KDUJCDLM.js";import{decideKillGuardRequest}from"./chunks/chunk-6APXZK7W.js";import"./chunks/chunk-YU2P3CAR.js";import"./chunks/chunk-2IKL4F24.js";import"./chunks/chunk-KJR3XXMI.js";import"./chunks/chunk-IYL5E4QQ.js";import"./chunks/chunk-7THM57HH.js";import"./chunks/chunk-AC72EWI5.js";import"./chunks/chunk-RQFD6LG2.js";import{DEFAULT_MAX_BYTES,DEFAULT_MAX_LINES,formatSize,getJobWidgetState,registerJobWidgetSource,setJobWidgetAuthorResolver,truncateHead,truncateLine,truncateTail,truncateToVisualLines}from"./chunks/chunk-NNQ34ZDW.js";import{sanitizeTerminalLabel,visibleWidth}from"./chunks/chunk-TMXRR3N7.js";import"./chunks/chunk-LPYBKMPT.js";import{activateKillGuardRuntime,activeKillGuardEnvironment,getPowerShellConfig,getShellConfig,releaseKillGuardRuntime,withBundledBunCommands}from"./chunks/chunk-B4WD5XHP.js";import"./chunks/chunk-COKX65TE.js";import"./chunks/chunk-R7J5TEYK.js";import"./chunks/chunk-QUVSIW2R.js";import"./chunks/chunk-NQKCJQHB.js";import"./chunks/chunk-QX7WD3IM.js";import{KILL_GUARD_TAG}from"./chunks/chunk-WOHQJ6JB.js";import"./chunks/chunk-COH5F7QV.js";import"./chunks/chunk-RFB5CBW7.js";import"./chunks/chunk-Y7QPP7BG.js";import"./chunks/chunk-IREUIMFE.js";import"./chunks/chunk-GVSBCJFI.js";import"./chunks/chunk-QTS2XGPQ.js";import"./chunks/chunk-Z6TEQEZO.js";import"./chunks/chunk-ZG3MNTNX.js";import"./chunks/chunk-WHPDEDCC.js";import"./chunks/chunk-HK46JMSC.js";import"./chunks/chunk-5ROMKDLK.js";import"./chunks/chunk-3W47LTXQ.js";import"./chunks/chunk-UAOOH2V7.js";import"./chunks/chunk-WDTJ6JKE.js";import"./chunks/chunk-OH5TKHW7.js";import"./chunks/chunk-NDNQ23SK.js";import"./chunks/chunk-JGKH3D6W.js";import"./chunks/chunk-3SASTB6Y.js";import"./chunks/chunk-PJ34QVL5.js";import"./chunks/chunk-BMX2U22F.js";import"./chunks/chunk-GLTOBXZY.js";import"./chunks/chunk-6Q7Y2G5A.js";import"./chunks/chunk-ZOFZRJSL.js";import"./chunks/chunk-ZFIC2DZV.js";import"./chunks/chunk-2SOVDETB.js";import"./chunks/chunk-E266ORGA.js";import"./chunks/chunk-T2SMQPRE.js";import"./chunks/chunk-RUGTHELO.js";import"./chunks/chunk-42XRJQM6.js";import"./chunks/chunk-IHES3JES.js";import"./chunks/chunk-5XHOHZIR.js";import"./chunks/chunk-HW6AAS3R.js";import{CONFIG_DIR_NAME,VERSION,getAgentDir,getDocsPath,getExamplesPath,getPackageDir,getReadmePath}from"./chunks/chunk-SODMQEHO.js";import"./chunks/chunk-ATQFN5HI.js";import"./chunks/chunk-EYSV6A7S.js";import"./chunks/chunk-MIENF2YK.js";import"./chunks/chunk-OXNWERO4.js";import"./chunks/chunk-44BJPS5I.js";import"./chunks/chunk-AOTHPTMU.js";import"./chunks/chunk-O5RYI3IW.js";import"./chunks/chunk-RFFMEA4B.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,JOB_WIDGET_STATE_EVENT,KILL_GUARD_MODULE_URL,KILL_GUARD_TAG,LoginDialogComponent,ModelRegistry,ModelRuntime,ModelSelectorComponent,OAuthSelectorComponent,PINNED_HOST_CLIENT_CAPABILITIES,ProjectTrustStore,RELOCATION_TOOL_NAMES,REQUIRED_COMPACTION_ERROR_MESSAGE,REQUIRED_HOST_CAPABILITIES,RequiredCompactionError,ReservedCustodyKey,RpcClient,RpcClientOpenInFlightError,RpcTransportGoneError,SESSION_CONTROL_DELIVERY_TYPE,SecretInputUnavailableError,SessionManager,SessionSelectorComponent,SettingsManager,SettingsSelectorComponent,ShowImagesSelectorComponent,SkillInvocationMessageComponent,TUI_PROBE_TIMEOUT_MS,TextTap,Theme,ThemeSelectorComponent,ThinkingSelectorComponent,ToolExecutionComponent,TreeSelectorComponent,UnknownCommandError,UserMessageComponent,UserMessageSelectorComponent,VERSION,VIRTUAL_MODEL_STATE_ENTRY,activateKillGuardRuntime,activeKillGuardEnvironment,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,decideKillGuardRequest,defineTool,detectSupportedImageMimeTypeFromFile,discoverAndLoadExtensions,endpointProbeTimeoutMs,engineBuildIdentity,engineBuildIdentityFrom,ensureHost,estimateTokens,findCutPoint,findReservedKeywordRuns,findReservedKeywordSpans,findTurnStartIndex,formatDimensionNote,formatSize,formatSkillsForPrompt,gcHostEndpoints,generateBranchSummary,generateDiffString,generateSummary,generateSummaryWithUsage,generateUnifiedPatch,getAgentDir,getDocsPath,getExamplesPath,getJobWidgetState,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,killGuardProtectedPids,listHostEndpoints,loadHostLaunchSpec,loadProjectContextFiles,loadSkills,loadSkillsFromDir,main,migrateSessionEntries,noticeEntryRenderer,noticeMessageRenderer,parseArgs,parseFrontmatter,parseHostLaunchSpec,parseHostProtocolInfo,parseSessionEntries,parseSkillBlock,prepareBranchEntries,probeHost,rawKeyHint,readAllHostStatus,readHostStatus,readKillGuardSetting,readOwnFootprint,readProcessFootprint,readStoredCredential,registerJobWidgetSource,registerReadClassifier,registerRpcRemoteSource,releaseKillGuardRuntime,renderDiff,resizeImage,resolveCliModel,resolveModelScopeWithDiagnostics,runHostCommand,runHostRequest,runPrintMode,runRpcMode,sanitizeTerminalLabel,serializeConversation,sessionControlRemoteOriginOf,sessionControlSenderOf,sessionEntryToContextMessages,setJobWidgetAuthorResolver,shardKey,shardSocketPath,shardSocketPathForKey,shouldCompact,stopHost,stripFrontmatter,truncateHead,truncateLine,truncateTail,truncateToVisualLines,visibleWidth,withBundledBunCommands,withFileMutationQueue,wrapRegisteredTool,wrapRegisteredTools};
2
+ import{AgentSession,AgentSessionRuntime,ArminComponent,BashExecutionComponent,BorderedLoader,BranchSummaryMessageComponent,CompactionSummaryMessageComponent,CredentialSynchronizationError,CustomMessageComponent,DEFAULT_COMPACTION_SETTINGS,DefaultResourceLoader,EVAL_HANDLE_ERROR_CODES,EvalHandleError,ExtensionRunner,FooterComponent,InteractiveMode,JOB_WIDGET_STATE_EVENT,KILL_GUARD_MODULE_URL,LoginDialogComponent,ModelRegistry,ModelRuntime,ModelSelectorComponent,OAuthSelectorComponent,ReservedCustodyKey,SettingsSelectorComponent,ShowImagesSelectorComponent,SkillInvocationMessageComponent,TextTap,ThemeSelectorComponent,ThinkingSelectorComponent,ToolExecutionComponent,TreeSelectorComponent,UserMessageSelectorComponent,buildNoticeBox,calculateContextTokens,classifyRead,collectEntriesForBranchSummary,collectOrphanedChildren,compact,connectWebViewService,convertToPng,createAgentSession,createAgentSessionFromServices,createAgentSessionRuntime,createAgentSessionServices,createBashTool,createBashToolDefinition,createCodingTools,createEditTool,createEditToolDefinition,createEventBus,createExtensionRuntime,createFindTool,createFindToolDefinition,createGrepTool,createGrepToolDefinition,createLocalBashOperations,createLsTool,createLsToolDefinition,createPowerShellTool,createReadOnlyTools,createReadTool,createReadToolDefinition,createWriteTool,createWriteToolDefinition,defineTool,detectSupportedImageMimeTypeFromFile,discoverAndLoadExtensions,estimateTokens,findCutPoint,findTurnStartIndex,formatDimensionNote,formatSkillsForPrompt,generateBranchSummary,generateDiffString,generateSummary,generateSummaryWithUsage,generateUnifiedPatch,getLastAssistantUsage,isBashToolResult,isEditToolResult,isFindToolResult,isGrepToolResult,isLsToolResult,isPowerShellToolResult,isReadToolResult,isToolCallEventType,isWriteToolResult,kernelToolsStorage,killGuardProtectedPids,loadProjectContextFiles,loadSkills,loadSkillsFromDir,main,noticeEntryRenderer,noticeMessageRenderer,parseFrontmatter,parseSkillBlock,prepareBranchEntries,readKillGuardSetting,readStoredCredential,registerReadClassifier,renderDiff,resizeImage,resolveCliModel,resolveModelScopeWithDiagnostics,runPrintMode,runRpcMode,serializeConversation,shouldCompact,stripFrontmatter,withFileMutationQueue,wrapRegisteredTool,wrapRegisteredTools}from"./chunks/chunk-PUZDKFRT.js";import"./chunks/chunk-J4ADZ2OK.js";import{RELOCATION_TOOL_NAMES,SESSION_CONTROL_DELIVERY_TYPE,isSessionControlDeliveryDetails,sessionControlRemoteOriginOf,sessionControlSenderOf}from"./chunks/chunk-5PIZWSNG.js";import{RpcClient,RpcClientOpenInFlightError,RpcTransportGoneError,UnknownCommandError,isTransportGoneError}from"./chunks/chunk-SS5VTBAV.js";import"./chunks/chunk-3IYEGHBI.js";import"./chunks/chunk-S7NAJQB3.js";import"./chunks/chunk-NLYT7BND.js";import{DefaultPackageManager,SessionSelectorComponent,SettingsManager}from"./chunks/chunk-XUDKT4UH.js";import"./chunks/chunk-FEQDJBDL.js";import"./chunks/chunk-XI6THO4F.js";import{CURRENT_SESSION_VERSION,SessionManager,VIRTUAL_MODEL_STATE_ENTRY,buildContextEntries,buildSessionContext,buildSessionProjection,convertToLlm,getLatestCompactionEntry,migrateSessionEntries,parseSessionEntries,sessionEntryToContextMessages}from"./chunks/chunk-L3KVP7VJ.js";import"./chunks/chunk-J2I56WLK.js";import"./chunks/chunk-GTJJ73DE.js";import{ProjectTrustStore,hasTrustRequiringProjectResources}from"./chunks/chunk-VD7AKTGP.js";import{AssistantMessageComponent,CustomEditor,ExtensionEditorComponent,REQUIRED_COMPACTION_ERROR_MESSAGE,RequiredCompactionError,UserMessageComponent,copyToClipboard}from"./chunks/chunk-L7DGTA3L.js";import"./chunks/chunk-M2VJVJMK.js";import"./chunks/chunk-TQHNFP77.js";import{DynamicBorder,ExtensionInputComponent,ExtensionSelectorComponent,Theme,findReservedKeywordRuns,findReservedKeywordSpans,getLanguageFromPath,getMarkdownTheme,getSelectListTheme,getSettingsListTheme,highlightCode,initTheme,keyHint,keyText,rawKeyHint}from"./chunks/chunk-2ODGHBUD.js";import{SecretInputUnavailableError}from"./chunks/chunk-HKCFMDJN.js";import"./chunks/chunk-E6ZBTSC6.js";import"./chunks/chunk-3QPE75AR.js";import"./chunks/chunk-4GKU755E.js";import"./chunks/chunk-Y3TMJV3J.js";import"./chunks/chunk-PJI5GT7U.js";import"./chunks/chunk-MOVB6H22.js";import{registerRpcRemoteSource}from"./chunks/chunk-DLPV4B3R.js";import"./chunks/chunk-VPVD5G32.js";import"./chunks/chunk-H4QOEVS5.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-L6DF5G6K.js";import{GENERATION_HANDOFF_CAPABILITY,HOST_PROTOCOL_VERSION,HostEnsureRefusedError,REQUIRED_HOST_CAPABILITIES,compareEngineOrdinal,decideHostAction,engineBuildIdentity,engineBuildIdentityFrom,gcHostEndpoints,parseHostProtocolInfo,probeHost,stopHost}from"./chunks/chunk-5F2XC6UC.js";import{createSyntheticSourceInfo}from"./chunks/chunk-QMRJYMNH.js";import{listHostEndpoints}from"./chunks/chunk-DZQA5LVN.js";import{parseArgs}from"./chunks/chunk-IEY2SL46.js";import"./chunks/chunk-26UBFF6N.js";import"./chunks/chunk-4JMGWVRH.js";import"./chunks/chunk-E5O4SP5I.js";import"./chunks/chunk-DX43FSQT.js";import"./chunks/chunk-7WYJAYHH.js";import"./chunks/chunk-IBDAV2AL.js";import"./chunks/chunk-OSNR3IRD.js";import"./chunks/chunk-UCXBDE6R.js";import{ENDPOINT_REGISTRY_VERSION,createHostDaemonPaths,daemonDirectoryName,shardKey,shardSocketPath,shardSocketPathForKey}from"./chunks/chunk-YI6KRJDC.js";import"./chunks/chunk-VUY4BZDI.js";import"./chunks/chunk-SF4MQDKZ.js";import"./chunks/chunk-NRZAJUUO.js";import"./chunks/chunk-DQY26AX3.js";import"./chunks/chunk-GILDYS3O.js";import"./chunks/chunk-KLAX467B.js";import"./chunks/chunk-C4AHHZ6P.js";import"./chunks/chunk-TCZORL3V.js";import"./chunks/chunk-DHORIIVQ.js";import"./chunks/chunk-GZVCRV7I.js";import"./chunks/chunk-KUPQO7MC.js";import"./chunks/chunk-U3VOXCGP.js";import"./chunks/chunk-7X72IACK.js";import"./chunks/chunk-5H43O4MA.js";import"./chunks/chunk-WHQ2QPP5.js";import"./chunks/chunk-LXINMDMX.js";import"./chunks/chunk-WB4BUHOH.js";import"./chunks/chunk-NJ43NBSP.js";import"./chunks/chunk-KDUJCDLM.js";import{decideKillGuardRequest}from"./chunks/chunk-6APXZK7W.js";import"./chunks/chunk-YU2P3CAR.js";import"./chunks/chunk-2IKL4F24.js";import"./chunks/chunk-KJR3XXMI.js";import"./chunks/chunk-IYL5E4QQ.js";import"./chunks/chunk-7THM57HH.js";import"./chunks/chunk-AC72EWI5.js";import"./chunks/chunk-RQFD6LG2.js";import{DEFAULT_MAX_BYTES,DEFAULT_MAX_LINES,formatSize,getJobWidgetState,registerJobWidgetSource,setJobWidgetAuthorResolver,truncateHead,truncateLine,truncateTail,truncateToVisualLines}from"./chunks/chunk-NNQ34ZDW.js";import{sanitizeTerminalLabel,visibleWidth}from"./chunks/chunk-TMXRR3N7.js";import"./chunks/chunk-LPYBKMPT.js";import{activateKillGuardRuntime,activeKillGuardEnvironment,getPowerShellConfig,getShellConfig,releaseKillGuardRuntime,withBundledBunCommands}from"./chunks/chunk-B4WD5XHP.js";import"./chunks/chunk-COKX65TE.js";import"./chunks/chunk-R7J5TEYK.js";import"./chunks/chunk-QUVSIW2R.js";import"./chunks/chunk-NQKCJQHB.js";import"./chunks/chunk-QX7WD3IM.js";import{KILL_GUARD_TAG}from"./chunks/chunk-WOHQJ6JB.js";import"./chunks/chunk-COH5F7QV.js";import"./chunks/chunk-RFB5CBW7.js";import"./chunks/chunk-Y7QPP7BG.js";import"./chunks/chunk-IREUIMFE.js";import"./chunks/chunk-GVSBCJFI.js";import"./chunks/chunk-QTS2XGPQ.js";import"./chunks/chunk-Z6TEQEZO.js";import"./chunks/chunk-ZG3MNTNX.js";import"./chunks/chunk-WHPDEDCC.js";import"./chunks/chunk-HK46JMSC.js";import"./chunks/chunk-5ROMKDLK.js";import"./chunks/chunk-3W47LTXQ.js";import"./chunks/chunk-UAOOH2V7.js";import"./chunks/chunk-WDTJ6JKE.js";import"./chunks/chunk-OH5TKHW7.js";import"./chunks/chunk-NDNQ23SK.js";import"./chunks/chunk-JGKH3D6W.js";import"./chunks/chunk-3SASTB6Y.js";import"./chunks/chunk-PJ34QVL5.js";import"./chunks/chunk-BMX2U22F.js";import"./chunks/chunk-GLTOBXZY.js";import"./chunks/chunk-SANWO37B.js";import"./chunks/chunk-ZOFZRJSL.js";import"./chunks/chunk-ZFIC2DZV.js";import"./chunks/chunk-2SOVDETB.js";import"./chunks/chunk-LJFQYCFH.js";import"./chunks/chunk-K3GAGIPX.js";import"./chunks/chunk-RUGTHELO.js";import"./chunks/chunk-42XRJQM6.js";import"./chunks/chunk-IHES3JES.js";import"./chunks/chunk-5XHOHZIR.js";import"./chunks/chunk-HW6AAS3R.js";import{CONFIG_DIR_NAME,VERSION,getAgentDir,getDocsPath,getExamplesPath,getPackageDir,getReadmePath}from"./chunks/chunk-SODMQEHO.js";import"./chunks/chunk-ATQFN5HI.js";import"./chunks/chunk-EYSV6A7S.js";import"./chunks/chunk-MIENF2YK.js";import"./chunks/chunk-OXNWERO4.js";import"./chunks/chunk-44BJPS5I.js";import"./chunks/chunk-AOTHPTMU.js";import"./chunks/chunk-O5RYI3IW.js";import"./chunks/chunk-RFFMEA4B.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,JOB_WIDGET_STATE_EVENT,KILL_GUARD_MODULE_URL,KILL_GUARD_TAG,LoginDialogComponent,ModelRegistry,ModelRuntime,ModelSelectorComponent,OAuthSelectorComponent,PINNED_HOST_CLIENT_CAPABILITIES,ProjectTrustStore,RELOCATION_TOOL_NAMES,REQUIRED_COMPACTION_ERROR_MESSAGE,REQUIRED_HOST_CAPABILITIES,RequiredCompactionError,ReservedCustodyKey,RpcClient,RpcClientOpenInFlightError,RpcTransportGoneError,SESSION_CONTROL_DELIVERY_TYPE,SecretInputUnavailableError,SessionManager,SessionSelectorComponent,SettingsManager,SettingsSelectorComponent,ShowImagesSelectorComponent,SkillInvocationMessageComponent,TUI_PROBE_TIMEOUT_MS,TextTap,Theme,ThemeSelectorComponent,ThinkingSelectorComponent,ToolExecutionComponent,TreeSelectorComponent,UnknownCommandError,UserMessageComponent,UserMessageSelectorComponent,VERSION,VIRTUAL_MODEL_STATE_ENTRY,activateKillGuardRuntime,activeKillGuardEnvironment,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,decideKillGuardRequest,defineTool,detectSupportedImageMimeTypeFromFile,discoverAndLoadExtensions,endpointProbeTimeoutMs,engineBuildIdentity,engineBuildIdentityFrom,ensureHost,estimateTokens,findCutPoint,findReservedKeywordRuns,findReservedKeywordSpans,findTurnStartIndex,formatDimensionNote,formatSize,formatSkillsForPrompt,gcHostEndpoints,generateBranchSummary,generateDiffString,generateSummary,generateSummaryWithUsage,generateUnifiedPatch,getAgentDir,getDocsPath,getExamplesPath,getJobWidgetState,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,killGuardProtectedPids,listHostEndpoints,loadHostLaunchSpec,loadProjectContextFiles,loadSkills,loadSkillsFromDir,main,migrateSessionEntries,noticeEntryRenderer,noticeMessageRenderer,parseArgs,parseFrontmatter,parseHostLaunchSpec,parseHostProtocolInfo,parseSessionEntries,parseSkillBlock,prepareBranchEntries,probeHost,rawKeyHint,readAllHostStatus,readHostStatus,readKillGuardSetting,readOwnFootprint,readProcessFootprint,readStoredCredential,registerJobWidgetSource,registerReadClassifier,registerRpcRemoteSource,releaseKillGuardRuntime,renderDiff,resizeImage,resolveCliModel,resolveModelScopeWithDiagnostics,runHostCommand,runHostRequest,runPrintMode,runRpcMode,sanitizeTerminalLabel,serializeConversation,sessionControlRemoteOriginOf,sessionControlSenderOf,sessionEntryToContextMessages,setJobWidgetAuthorResolver,shardKey,shardSocketPath,shardSocketPathForKey,shouldCompact,stopHost,stripFrontmatter,truncateHead,truncateLine,truncateTail,truncateToVisualLines,visibleWidth,withBundledBunCommands,withFileMutationQueue,wrapRegisteredTool,wrapRegisteredTools};
@@ -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-VGSWOLIY.js";import{main}from"./chunks/chunk-AC6MDRAE.js";import"./chunks/chunk-O5WJVIEU.js";import"./chunks/chunk-H3VJVKUK.js";import"./chunks/chunk-NN7NESW2.js";import"./chunks/chunk-3IYEGHBI.js";import"./chunks/chunk-S7NAJQB3.js";import"./chunks/chunk-NLYT7BND.js";import"./chunks/chunk-JSD6O3RJ.js";import{configureHttpDispatcher}from"./chunks/chunk-FEQDJBDL.js";import"./chunks/chunk-XI6THO4F.js";import"./chunks/chunk-L3KVP7VJ.js";import"./chunks/chunk-J2I56WLK.js";import"./chunks/chunk-GTJJ73DE.js";import"./chunks/chunk-VD7AKTGP.js";import"./chunks/chunk-L7DGTA3L.js";import"./chunks/chunk-M2VJVJMK.js";import"./chunks/chunk-TQHNFP77.js";import"./chunks/chunk-2ODGHBUD.js";import"./chunks/chunk-HKCFMDJN.js";import"./chunks/chunk-E6ZBTSC6.js";import"./chunks/chunk-3QPE75AR.js";import"./chunks/chunk-4GKU755E.js";import"./chunks/chunk-Y3TMJV3J.js";import"./chunks/chunk-PJI5GT7U.js";import"./chunks/chunk-MOVB6H22.js";import"./chunks/chunk-DLPV4B3R.js";import"./chunks/chunk-VPVD5G32.js";import"./chunks/chunk-H4QOEVS5.js";import"./chunks/chunk-SOMFLLPD.js";import"./chunks/chunk-MTQQ2VQH.js";import"./chunks/chunk-HZDKQOWB.js";import"./chunks/chunk-Z2C5N2LM.js";import"./chunks/chunk-QMRJYMNH.js";import"./chunks/chunk-DZQA5LVN.js";import"./chunks/chunk-IEY2SL46.js";import"./chunks/chunk-26UBFF6N.js";import"./chunks/chunk-4JMGWVRH.js";import"./chunks/chunk-E5O4SP5I.js";import"./chunks/chunk-DX43FSQT.js";import"./chunks/chunk-7WYJAYHH.js";import"./chunks/chunk-47T6YMI2.js";import"./chunks/chunk-R2Z7CX77.js";import"./chunks/chunk-UCXBDE6R.js";import"./chunks/chunk-YI6KRJDC.js";import"./chunks/chunk-VUY4BZDI.js";import"./chunks/chunk-SF4MQDKZ.js";import"./chunks/chunk-DHAAWL2H.js";import"./chunks/chunk-DQY26AX3.js";import"./chunks/chunk-GILDYS3O.js";import"./chunks/chunk-KLAX467B.js";import"./chunks/chunk-C4AHHZ6P.js";import"./chunks/chunk-TCZORL3V.js";import"./chunks/chunk-DHORIIVQ.js";import"./chunks/chunk-GZVCRV7I.js";import"./chunks/chunk-KUPQO7MC.js";import"./chunks/chunk-U3VOXCGP.js";import"./chunks/chunk-7X72IACK.js";import"./chunks/chunk-5H43O4MA.js";import"./chunks/chunk-WHQ2QPP5.js";import"./chunks/chunk-LXINMDMX.js";import"./chunks/chunk-WB4BUHOH.js";import"./chunks/chunk-NJ43NBSP.js";import"./chunks/chunk-KDUJCDLM.js";import"./chunks/chunk-6APXZK7W.js";import"./chunks/chunk-YU2P3CAR.js";import"./chunks/chunk-2IKL4F24.js";import"./chunks/chunk-KJR3XXMI.js";import"./chunks/chunk-IYL5E4QQ.js";import"./chunks/chunk-7THM57HH.js";import"./chunks/chunk-AC72EWI5.js";import"./chunks/chunk-RQFD6LG2.js";import"./chunks/chunk-NNQ34ZDW.js";import"./chunks/chunk-TMXRR3N7.js";import"./chunks/chunk-LPYBKMPT.js";import"./chunks/chunk-B4WD5XHP.js";import"./chunks/chunk-COKX65TE.js";import"./chunks/chunk-R7J5TEYK.js";import"./chunks/chunk-QUVSIW2R.js";import"./chunks/chunk-NQKCJQHB.js";import"./chunks/chunk-QX7WD3IM.js";import"./chunks/chunk-WOHQJ6JB.js";import"./chunks/chunk-COH5F7QV.js";import"./chunks/chunk-RFB5CBW7.js";import"./chunks/chunk-Y7QPP7BG.js";import"./chunks/chunk-IREUIMFE.js";import"./chunks/chunk-GVSBCJFI.js";import"./chunks/chunk-QTS2XGPQ.js";import"./chunks/chunk-Z6TEQEZO.js";import"./chunks/chunk-ZG3MNTNX.js";import"./chunks/chunk-WHPDEDCC.js";import"./chunks/chunk-HK46JMSC.js";import"./chunks/chunk-5ROMKDLK.js";import"./chunks/chunk-3W47LTXQ.js";import"./chunks/chunk-UAOOH2V7.js";import"./chunks/chunk-WDTJ6JKE.js";import"./chunks/chunk-OH5TKHW7.js";import"./chunks/chunk-NDNQ23SK.js";import"./chunks/chunk-JGKH3D6W.js";import"./chunks/chunk-3SASTB6Y.js";import"./chunks/chunk-PJ34QVL5.js";import"./chunks/chunk-BMX2U22F.js";import"./chunks/chunk-GLTOBXZY.js";import"./chunks/chunk-6Q7Y2G5A.js";import"./chunks/chunk-ZOFZRJSL.js";import"./chunks/chunk-ZFIC2DZV.js";import"./chunks/chunk-2SOVDETB.js";import"./chunks/chunk-E266ORGA.js";import"./chunks/chunk-T2SMQPRE.js";import"./chunks/chunk-RUGTHELO.js";import"./chunks/chunk-42XRJQM6.js";import"./chunks/chunk-IHES3JES.js";import"./chunks/chunk-5XHOHZIR.js";import"./chunks/chunk-HW6AAS3R.js";import{APP_NAME,scrubBrandFromEnvironment}from"./chunks/chunk-SODMQEHO.js";import"./chunks/chunk-ATQFN5HI.js";import"./chunks/chunk-EYSV6A7S.js";import"./chunks/chunk-MIENF2YK.js";import"./chunks/chunk-FQXWKEVK.js";import"./chunks/chunk-OXNWERO4.js";import"./chunks/chunk-44BJPS5I.js";import"./chunks/chunk-AOTHPTMU.js";import"./chunks/chunk-O5RYI3IW.js";import"./chunks/chunk-RFFMEA4B.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)]);
3
+ import"./chunks/chunk-VGSWOLIY.js";import{main}from"./chunks/chunk-PUZDKFRT.js";import"./chunks/chunk-J4ADZ2OK.js";import"./chunks/chunk-5PIZWSNG.js";import"./chunks/chunk-SS5VTBAV.js";import"./chunks/chunk-3IYEGHBI.js";import"./chunks/chunk-S7NAJQB3.js";import"./chunks/chunk-NLYT7BND.js";import"./chunks/chunk-XUDKT4UH.js";import{configureHttpDispatcher}from"./chunks/chunk-FEQDJBDL.js";import"./chunks/chunk-XI6THO4F.js";import"./chunks/chunk-L3KVP7VJ.js";import"./chunks/chunk-J2I56WLK.js";import"./chunks/chunk-GTJJ73DE.js";import"./chunks/chunk-VD7AKTGP.js";import"./chunks/chunk-L7DGTA3L.js";import"./chunks/chunk-M2VJVJMK.js";import"./chunks/chunk-TQHNFP77.js";import"./chunks/chunk-2ODGHBUD.js";import"./chunks/chunk-HKCFMDJN.js";import"./chunks/chunk-E6ZBTSC6.js";import"./chunks/chunk-3QPE75AR.js";import"./chunks/chunk-4GKU755E.js";import"./chunks/chunk-Y3TMJV3J.js";import"./chunks/chunk-PJI5GT7U.js";import"./chunks/chunk-MOVB6H22.js";import"./chunks/chunk-DLPV4B3R.js";import"./chunks/chunk-VPVD5G32.js";import"./chunks/chunk-H4QOEVS5.js";import"./chunks/chunk-SOMFLLPD.js";import"./chunks/chunk-MTQQ2VQH.js";import"./chunks/chunk-L6DF5G6K.js";import"./chunks/chunk-5F2XC6UC.js";import"./chunks/chunk-QMRJYMNH.js";import"./chunks/chunk-DZQA5LVN.js";import"./chunks/chunk-IEY2SL46.js";import"./chunks/chunk-26UBFF6N.js";import"./chunks/chunk-4JMGWVRH.js";import"./chunks/chunk-E5O4SP5I.js";import"./chunks/chunk-DX43FSQT.js";import"./chunks/chunk-7WYJAYHH.js";import"./chunks/chunk-IBDAV2AL.js";import"./chunks/chunk-OSNR3IRD.js";import"./chunks/chunk-UCXBDE6R.js";import"./chunks/chunk-YI6KRJDC.js";import"./chunks/chunk-VUY4BZDI.js";import"./chunks/chunk-SF4MQDKZ.js";import"./chunks/chunk-NRZAJUUO.js";import"./chunks/chunk-DQY26AX3.js";import"./chunks/chunk-GILDYS3O.js";import"./chunks/chunk-KLAX467B.js";import"./chunks/chunk-C4AHHZ6P.js";import"./chunks/chunk-TCZORL3V.js";import"./chunks/chunk-DHORIIVQ.js";import"./chunks/chunk-GZVCRV7I.js";import"./chunks/chunk-KUPQO7MC.js";import"./chunks/chunk-U3VOXCGP.js";import"./chunks/chunk-7X72IACK.js";import"./chunks/chunk-5H43O4MA.js";import"./chunks/chunk-WHQ2QPP5.js";import"./chunks/chunk-LXINMDMX.js";import"./chunks/chunk-WB4BUHOH.js";import"./chunks/chunk-NJ43NBSP.js";import"./chunks/chunk-KDUJCDLM.js";import"./chunks/chunk-6APXZK7W.js";import"./chunks/chunk-YU2P3CAR.js";import"./chunks/chunk-2IKL4F24.js";import"./chunks/chunk-KJR3XXMI.js";import"./chunks/chunk-IYL5E4QQ.js";import"./chunks/chunk-7THM57HH.js";import"./chunks/chunk-AC72EWI5.js";import"./chunks/chunk-RQFD6LG2.js";import"./chunks/chunk-NNQ34ZDW.js";import"./chunks/chunk-TMXRR3N7.js";import"./chunks/chunk-LPYBKMPT.js";import"./chunks/chunk-B4WD5XHP.js";import"./chunks/chunk-COKX65TE.js";import"./chunks/chunk-R7J5TEYK.js";import"./chunks/chunk-QUVSIW2R.js";import"./chunks/chunk-NQKCJQHB.js";import"./chunks/chunk-QX7WD3IM.js";import"./chunks/chunk-WOHQJ6JB.js";import"./chunks/chunk-COH5F7QV.js";import"./chunks/chunk-RFB5CBW7.js";import"./chunks/chunk-Y7QPP7BG.js";import"./chunks/chunk-IREUIMFE.js";import"./chunks/chunk-GVSBCJFI.js";import"./chunks/chunk-QTS2XGPQ.js";import"./chunks/chunk-Z6TEQEZO.js";import"./chunks/chunk-ZG3MNTNX.js";import"./chunks/chunk-WHPDEDCC.js";import"./chunks/chunk-HK46JMSC.js";import"./chunks/chunk-5ROMKDLK.js";import"./chunks/chunk-3W47LTXQ.js";import"./chunks/chunk-UAOOH2V7.js";import"./chunks/chunk-WDTJ6JKE.js";import"./chunks/chunk-OH5TKHW7.js";import"./chunks/chunk-NDNQ23SK.js";import"./chunks/chunk-JGKH3D6W.js";import"./chunks/chunk-3SASTB6Y.js";import"./chunks/chunk-PJ34QVL5.js";import"./chunks/chunk-BMX2U22F.js";import"./chunks/chunk-GLTOBXZY.js";import"./chunks/chunk-SANWO37B.js";import"./chunks/chunk-ZOFZRJSL.js";import"./chunks/chunk-ZFIC2DZV.js";import"./chunks/chunk-2SOVDETB.js";import"./chunks/chunk-LJFQYCFH.js";import"./chunks/chunk-K3GAGIPX.js";import"./chunks/chunk-RUGTHELO.js";import"./chunks/chunk-42XRJQM6.js";import"./chunks/chunk-IHES3JES.js";import"./chunks/chunk-5XHOHZIR.js";import"./chunks/chunk-HW6AAS3R.js";import{APP_NAME,scrubBrandFromEnvironment}from"./chunks/chunk-SODMQEHO.js";import"./chunks/chunk-ATQFN5HI.js";import"./chunks/chunk-EYSV6A7S.js";import"./chunks/chunk-MIENF2YK.js";import"./chunks/chunk-FQXWKEVK.js";import"./chunks/chunk-OXNWERO4.js";import"./chunks/chunk-44BJPS5I.js";import"./chunks/chunk-AOTHPTMU.js";import"./chunks/chunk-O5RYI3IW.js";import"./chunks/chunk-RFFMEA4B.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":"97a5928ce5689af5","externals":["@earendil-works/chord","@earendil-works/pi-pty","@silvia-odwyer/photon-node","bufferutil","canvas","kerberos","supports-color","utf-8-validate"]}
1
+ {"buildId":"fa0084eb8586c359","externals":["@earendil-works/chord","@earendil-works/pi-pty","@silvia-odwyer/photon-node","bufferutil","canvas","kerberos","supports-color","utf-8-validate"]}
@@ -394,6 +394,8 @@ export type AgentSessionEvent = WithParentToolCallId<Exclude<AgentEvent, {
394
394
  model: string;
395
395
  outcome: "ok" | "failed";
396
396
  reason?: string;
397
+ message?: string;
398
+ status?: number;
397
399
  at: number;
398
400
  };
399
401
  } | {
@@ -53,6 +53,8 @@ export type CredentialAccountCheck = {
53
53
  readonly model: string;
54
54
  readonly outcome: "ok" | "failed";
55
55
  readonly reason?: string;
56
+ readonly message?: string;
57
+ readonly status?: number;
56
58
  readonly at: number;
57
59
  };
58
60
  export declare function assertValidAccountName(name: string): void;
@@ -38,7 +38,16 @@ function storedCheck(slot) {
38
38
  if (model === undefined || at === undefined || (outcome !== "ok" && outcome !== "failed"))
39
39
  return undefined;
40
40
  const reason = stringField(check, "reason");
41
- return { model, outcome, ...(reason === undefined ? {} : { reason }), at };
41
+ const message = stringField(check, "message");
42
+ const status = numberField(check, "status");
43
+ return {
44
+ model,
45
+ outcome,
46
+ ...(reason === undefined ? {} : { reason }),
47
+ ...(message === undefined ? {} : { message }),
48
+ ...(status === undefined ? {} : { status }),
49
+ at,
50
+ };
42
51
  }
43
52
  /** The listing fields of a stored `claude-cli` slot, read defensively: auth.json is a trust boundary. */
44
53
  function claudeCliSlotFields(slot) {
@@ -24,7 +24,7 @@ const ROUTE_RULES = {
24
24
  full: `Route by true intent, not surface form:
25
25
  - Information asks (explain, look into, investigate): read the code, report the answer or findings - no edits, no fixes yet.
26
26
  - Judgment asks (what do you think, review) and open-ended changes (refactor, improve, clean up): assess and propose, then wait for confirmation.
27
- - Change asks (implement, add, fix this error): build, or diagnose and fix minimally, at exactly the asked scope - the smallest path that fully satisfies an open-ended goal; name an ambiguity and resolve it from context when possible.
27
+ - Change asks (implement, add, fix this error): build, or diagnose and fix at the cause, at exactly the asked scope - what fully satisfies an open-ended goal and nothing beyond it; name an ambiguity and resolve it from context when possible.
28
28
 
29
29
  Deliver the task at the scope asked - never quietly narrow, widen, or swap it. Make routine judgment calls yourself; ask only when different readings of the request would lead to materially different work.
30
30
 
@@ -32,7 +32,7 @@ Derive intent from the latest user turn alone: a new direction drops the stale p
32
32
  diet: `Route by true intent, not surface form:
33
33
  - Information ask (explain, look into, investigate): read code, report answer/findings; no edits, no fixes yet.
34
34
  - Judgment ask (what do you think, review) / open-ended change (refactor, improve, clean up): assess, propose, wait for confirmation.
35
- - Change ask (implement, add, fix this error): build, or diagnose + minimal fix, exactly at asked scope = smallest path fully satisfying an open-ended goal; name ambiguity, resolve from context when possible.
35
+ - Change ask (implement, add, fix this error): build, or diagnose + fix at the cause, exactly at asked scope = what fully satisfies an open-ended goal, nothing beyond; name ambiguity, resolve from context when possible.
36
36
 
37
37
  Deliver at asked scope; never quietly narrow, widen, swap. Routine calls: decide yourself; ask only when readings diverge into materially different work.
38
38
 
@@ -4,7 +4,7 @@ export function buildStyleSection(options = {}) {
4
4
  if (options.sharedSections === "full") {
5
5
  return `## Style
6
6
 
7
- Smallest correct change wins: no refactors beside a focused fix, no helpers or abstractions for hypothetical needs, no defensive checks inside trusted code. Trust framework guarantees; validate only at system boundaries. Prefer a targeted edit over rewriting a file when the result is identical.
7
+ This codebase is yours: what it's for and how it's built are your call, and you'll keep building on it. Change it the way its owner would: build on the code that already does the job instead of adding a parallel copy, fit new behavior into the structure that is there, and leave no duplicate or dead code behind. A defect in the code you are changing is yours to fix now; one elsewhere goes in your summary as a follow-up. No helpers or abstractions for hypothetical needs, no defensive checks inside trusted code. Trust framework guarantees; validate only at system boundaries. Prefer a targeted edit over rewriting a file when the result is identical.
8
8
 
9
9
  Act, then report. Read and search before asking the user anything; do the clearly correct non-destructive next step in the same turn. Permission-begging ("Shall I?") is prohibited. Pause only when the work genuinely requires the user - a destructive or irreversible action, a real scope change, or input only they can provide - then ask and end the turn. Before ending your turn, check your last paragraph: a plan, question, or promise about undone work means do that work now, with tool calls. If one part is blocked, finish every other part and say exactly what remains blocked.
10
10
 
@@ -16,7 +16,7 @@ Do not stop, summarize, or suggest a new session on account of context limits: t
16
16
  }
17
17
  return `## Style
18
18
 
19
- Smallest correct change: no refactors beside a focused fix, no helpers/abstractions for hypothetical needs, no defensive checks in trusted code. Trust framework guarantees; validate at system boundaries only. Targeted edit over file rewrite when result identical.
19
+ This codebase is yours: what it's for and how it's built are your call, and you'll keep building on it. Change it as its owner would: build on the code that already does the job, not a parallel copy; fit new behavior into the structure that is there; leave no duplicate or dead code behind. Defect in the code you are changing -> fix it now; elsewhere -> follow-up in your summary. No helpers/abstractions for hypothetical needs, no defensive checks in trusted code. Trust framework guarantees; validate at system boundaries only. Targeted edit over file rewrite when result identical.
20
20
 
21
21
  Act, then report. Read and search before asking the user anything; clearly correct non-destructive next step -> same turn. Permission-begging ("Shall I?") prohibited. Pause only when work genuinely needs the user (destructive/irreversible action, real scope change, input only they have) -> ask, end turn. Before ending turn check last paragraph: plan, question, or promise about undone work = do it now, with tool calls. One part blocked -> finish the rest, state exactly what remains blocked.
22
22
 
@@ -69,7 +69,7 @@ Tier the scope, never the rigor.
69
69
 
70
70
  ${buildTestDisciplineSection("full")}
71
71
 
72
- "Should pass" is not verification - run the validator. Before reporting progress, audit each claim against a tool result from this session: ${FULL_CLAIM_AUDIT[terminalOrApp(options.surface ?? "terminal")]} Fix only issues your changes caused; note pre-existing failures separately.`;
72
+ "Should pass" is not verification - run the validator. Before reporting progress, audit each claim against a tool result from this session: ${FULL_CLAIM_AUDIT[terminalOrApp(options.surface ?? "terminal")]} Fix failures your change caused and any that sit in the code you changed; note other pre-existing failures separately.`;
73
73
  }
74
74
  return `## Verification
75
75
 
@@ -81,6 +81,6 @@ Tier the scope, never the rigor.
81
81
 
82
82
  ${buildTestDisciplineSection()}
83
83
 
84
- Before reporting progress: audit each claim against a tool result from this session; ${CLAIM_AUDIT[terminalOrApp(options.surface ?? "terminal")]} Fix only issues your changes caused; note pre-existing failures separately.`;
84
+ Before reporting progress: audit each claim against a tool result from this session; ${CLAIM_AUDIT[terminalOrApp(options.surface ?? "terminal")]} Fix failures your change caused and any that sit in the code you changed; note other pre-existing failures separately.`;
85
85
  }
86
86
  //# sourceMappingURL=verification.js.map
@@ -36,6 +36,9 @@ export type ClaudeCliAccountCheck = {
36
36
  model: string;
37
37
  outcome: "ok" | "failed";
38
38
  reason?: string;
39
+ /** Provider diagnostics, redacted before they enter the credential store. */
40
+ message?: string;
41
+ status?: number;
39
42
  at: number;
40
43
  };
41
44
  /**
@@ -61,7 +61,9 @@ export async function testClaudeCliAccount(input) {
61
61
  return stored;
62
62
  return {
63
63
  ...credential,
64
- accounts: (credential.accounts ?? []).map((slot) => slot.name === input.name ? checkedSlot(slot, check) : slot),
64
+ accounts: (credential.accounts ?? []).map((slot) => slot.name === input.name && slot.store === "claude-cli" && slot.dirId === before.dirId
65
+ ? checkedSlot(slot, check)
66
+ : slot),
65
67
  };
66
68
  });
67
69
  return check;
@@ -4,6 +4,8 @@ export type DefaultModelSelection = {
4
4
  readonly provider?: string;
5
5
  readonly model?: string;
6
6
  };
7
+ /** auth.json keeps the redacted provider message for the UI; a proxy's HTML error page must not bloat it. */
8
+ export declare const STORED_CHECK_MESSAGE_MAX_CHARS = 2000;
7
9
  /**
8
10
  * The model the sign-in connection test runs on: the default model when the default provider is this one, else the
9
11
  * provider's own default (`defaultModelPerProvider`), so the test exercises the model the user's turns will use.
@@ -21,7 +23,7 @@ export type ClaudeCliConnectionTestInput = {
21
23
  };
22
24
  /**
23
25
  * One "Reply with OK" turn on the named account, pinned with account fallback off, no tools, no setting sources and
24
- * no persisted session. The outcome is classified with the turn classifiers; only the kind is kept, never error text.
26
+ * no persisted session. The outcome uses the turn classifiers and retains the provider status and redacted message.
25
27
  */
26
28
  export declare function runClaudeCliConnectionTest(input: ClaudeCliConnectionTestInput): Promise<ClaudeCliAccountCheck>;
27
29
  //# sourceMappingURL=claude-cli-connection-test.d.ts.map
@@ -1,11 +1,25 @@
1
1
  import { defaultModelPerProvider } from "../../../model-resolver.js";
2
+ import { redactSecrets } from "../../../sensitive-output.js";
2
3
  import { ANTHROPIC_SUBSCRIPTION_PROVIDER_ID } from "./account-management.js";
3
4
  import { queryWithAuthLane } from "./auth-lane.js";
4
- import { classifySdkError, sdkAssistantFailure, sdkResultFailure } from "./errors.js";
5
+ import { classifySdkError, errorText, sdkAssistantFailure, sdkResultFailure } from "./errors.js";
5
6
  import { refusalError } from "./refusal.js";
6
7
  import { getSdkBoundary, loadClaudeAgentSdk } from "./sdk-boundary.js";
7
8
  const CONNECTION_TEST_PROMPT = "Reply with OK";
8
9
  const CONNECTION_TEST_TIMEOUT_MS = 60_000;
10
+ /** auth.json keeps the redacted provider message for the UI; a proxy's HTML error page must not bloat it. */
11
+ export const STORED_CHECK_MESSAGE_MAX_CHARS = 2_000;
12
+ function storedMessage(error) {
13
+ const message = redactSecrets(errorText(error));
14
+ if (message.length <= STORED_CHECK_MESSAGE_MAX_CHARS)
15
+ return message;
16
+ let end = STORED_CHECK_MESSAGE_MAX_CHARS - 1;
17
+ // Never end on the first half of a surrogate pair.
18
+ const last = message.charCodeAt(end - 1);
19
+ if (last >= 0xd800 && last <= 0xdbff)
20
+ end -= 1;
21
+ return `${message.slice(0, end)}…`;
22
+ }
9
23
  /**
10
24
  * The model the sign-in connection test runs on: the default model when the default provider is this one, else the
11
25
  * provider's own default (`defaultModelPerProvider`), so the test exercises the model the user's turns will use.
@@ -20,7 +34,7 @@ export function connectionTestModel(defaults) {
20
34
  }
21
35
  /**
22
36
  * One "Reply with OK" turn on the named account, pinned with account fallback off, no tools, no setting sources and
23
- * no persisted session. The outcome is classified with the turn classifiers; only the kind is kept, never error text.
37
+ * no persisted session. The outcome uses the turn classifiers and retains the provider status and redacted message.
24
38
  */
25
39
  export async function runClaudeCliConnectionTest(input) {
26
40
  const now = input.now ?? Date.now;
@@ -29,12 +43,27 @@ export async function runClaudeCliConnectionTest(input) {
29
43
  let handle;
30
44
  const closeOnAbort = () => handle?.close();
31
45
  signal.addEventListener("abort", closeOnAbort, { once: true });
32
- const finish = (outcome, reason) => ({
33
- model: input.model,
34
- outcome,
35
- ...(reason === undefined ? {} : { reason }),
36
- at: now(),
37
- });
46
+ const finish = (failure) => {
47
+ if (failure === undefined)
48
+ return { model: input.model, outcome: "ok", at: now() };
49
+ const { reason, error } = failure;
50
+ const status = failure.providerStatus ??
51
+ (error !== null && typeof error === "object" && "status" in error ? error.status : undefined);
52
+ return {
53
+ model: input.model,
54
+ outcome: "failed",
55
+ reason,
56
+ message: storedMessage(error),
57
+ ...(typeof status === "number" ? { status } : {}),
58
+ at: now(),
59
+ };
60
+ };
61
+ // The deadline and the caller's cancel win over whatever the SDK reports after close().
62
+ const abortedCheck = () => deadline.aborted
63
+ ? finish({ reason: "timeout", error: "Connection test timed out." })
64
+ : input.signal?.aborted
65
+ ? finish({ reason: "cancelled", error: "Connection test was cancelled." })
66
+ : undefined;
38
67
  try {
39
68
  await loadClaudeAgentSdk();
40
69
  const messages = queryWithAuthLane({
@@ -69,18 +98,20 @@ export async function runClaudeCliConnectionTest(input) {
69
98
  ? sdkResultFailure(message)
70
99
  : undefined);
71
100
  if (failure)
72
- throw failure;
101
+ return (abortedCheck() ??
102
+ finish({
103
+ reason: classifySdkError(failure).kind,
104
+ error: failure,
105
+ providerStatus: message.type === "result" && "api_error_status" in message ? message.api_error_status : undefined,
106
+ }));
73
107
  if (message.type === "result")
74
- return finish("ok");
108
+ return finish();
75
109
  }
76
- return finish("failed", signal.aborted ? (deadline.aborted ? "timeout" : "cancelled") : "no_result");
110
+ return (abortedCheck() ??
111
+ finish({ reason: "no_result", error: "Claude Code ended the connection test without a result." }));
77
112
  }
78
113
  catch (error) {
79
- if (deadline.aborted)
80
- return finish("failed", "timeout");
81
- if (input.signal?.aborted)
82
- return finish("failed", "cancelled");
83
- return finish("failed", classifySdkError(error).kind);
114
+ return abortedCheck() ?? finish({ reason: classifySdkError(error).kind, error });
84
115
  }
85
116
  finally {
86
117
  signal.removeEventListener("abort", closeOnAbort);
@@ -6,7 +6,7 @@ import type { ClaudeCliProfile } from "./claude-cli-auth-status.ts";
6
6
  */
7
7
  export declare function signedInSlot(previous: AccountSlot | undefined, name: string, dirId: string, profile: ClaudeCliProfile, at: number): ClaudeCliAccountSlot;
8
8
  export declare function withSlot(credential: AnthropicSubscriptionCredential, slot: AccountSlot): AnthropicSubscriptionCredential;
9
- export declare function withCheck(credential: AnthropicSubscriptionCredential, name: string, check: ClaudeCliAccountCheck): AnthropicSubscriptionCredential;
9
+ export declare function withCheck(credential: AnthropicSubscriptionCredential, name: string, check: ClaudeCliAccountCheck, dirId: string): AnthropicSubscriptionCredential;
10
10
  /**
11
11
  * The accounts with this login taken back. Only a slot that still points at this login's dir is touched: a new
12
12
  * account's slot is removed. For a re-login the login-bound fields always return to their previous values; every
@@ -27,10 +27,12 @@ export function withSlot(credential, slot) {
27
27
  ? { ...credential, accounts: accounts.map((candidate) => (candidate.name === slot.name ? slot : candidate)) }
28
28
  : { ...credential, accounts: [...accounts, slot] };
29
29
  }
30
- export function withCheck(credential, name, check) {
30
+ export function withCheck(credential, name, check, dirId) {
31
31
  return {
32
32
  ...credential,
33
- accounts: (credential.accounts ?? []).map((candidate) => candidate.name === name && candidate.store === "claude-cli" ? { ...candidate, check } : candidate),
33
+ accounts: (credential.accounts ?? []).map((candidate) => candidate.name === name && candidate.store === "claude-cli" && candidate.dirId === dirId
34
+ ? { ...candidate, check }
35
+ : candidate),
34
36
  };
35
37
  }
36
38
  /**
@@ -10,6 +10,7 @@ export type SdkErrorClassification = {
10
10
  /** Set on an auth failure that proves the login itself is gone, so the account needs a new sign-in (senpi#5350). */
11
11
  signInRequired?: "login_expired";
12
12
  };
13
+ export declare function errorText(error: unknown): string;
13
14
  export declare function isExtraUsageExhausted(error: unknown): boolean;
14
15
  export type SdkResultUsage = Extract<SDKMessage, {
15
16
  type: "result";
@@ -21,21 +21,30 @@ function record(value) {
21
21
  ? value
22
22
  : undefined;
23
23
  }
24
- function errorText(error) {
24
+ /** `String()` throws for a null-prototype object or a throwing `toString`; the classifiers must never throw. */
25
+ function safeString(value) {
26
+ try {
27
+ return String(value);
28
+ }
29
+ catch {
30
+ return Object.prototype.toString.call(value);
31
+ }
32
+ }
33
+ export function errorText(error) {
25
34
  if (typeof error === "string")
26
35
  return error;
27
- if (error instanceof Error)
28
- return error.message;
29
36
  const value = record(error);
30
37
  if (!value)
31
- return String(error);
38
+ return safeString(error);
32
39
  const message = value.message;
33
40
  if (typeof message === "string")
34
41
  return message;
42
+ if (error instanceof Error)
43
+ return safeString(message);
35
44
  const code = value.error;
36
45
  if (typeof code === "string")
37
46
  return code;
38
- return String(error);
47
+ return safeString(error);
39
48
  }
40
49
  export function isExtraUsageExhausted(error) {
41
50
  return EXTRA_USAGE_EXHAUSTED.test(errorText(error).toLowerCase());
@@ -306,17 +306,17 @@ export function createOAuthConfig(deps) {
306
306
  cancelled();
307
307
  callbacks.onProgress?.(check.outcome === "ok"
308
308
  ? `Connection test passed on ${model}`
309
- : `Connection test failed on ${model} (${check.reason ?? "unknown"}); the account was kept. Retry from the account list.`);
309
+ : `Connection test failed on ${model}: ${check.status === undefined ? "" : `HTTP ${check.status}: `}${check.message ?? check.reason ?? "No provider response was retained"}; the account was kept. Retry from the account list.`);
310
310
  // The slot stays written: the caller's commit merges onto it, so the account owns its dir throughout.
311
311
  let tested = slot;
312
312
  const saved = await credentials.modify(ANTHROPIC_SUBSCRIPTION_PROVIDER_ID, async (stored) => {
313
313
  const base = storedSubscription(stored) ?? withSlot(current, slot);
314
314
  tested = base.accounts?.find((candidate) => candidate.name === name) ?? slot;
315
- return withCheck(base, name, check);
315
+ return withCheck(base, name, check, dirId);
316
316
  });
317
317
  if (callbacks.signal !== undefined)
318
318
  recordClaudeCliLoginOutcome(callbacks.signal, { account: { name }, check });
319
- signedInCredential = withCheck(withSlot(storedSubscription(saved) ?? current, tested), name, check);
319
+ signedInCredential = withCheck(withSlot(storedSubscription(saved) ?? current, tested), name, check, dirId);
320
320
  }
321
321
  catch (error) {
322
322
  try {
@@ -33,6 +33,12 @@ export type GoalContinuationInput = {
33
33
  readonly continuationPending: boolean;
34
34
  /** The last turn was rejected (or silently starved) by context size and recovery did not shrink it. */
35
35
  readonly lastTurnStuckOnContextOverflow: boolean;
36
+ /**
37
+ * The wake re-checks a provider that refused for a usage or rate limit, either on the armed provider retry or as
38
+ * the first wake of a session opened in the middle of that wait. Waiting out a limit is not a stall, so it spends
39
+ * neither the continuation cap nor the no-progress budget (senpi#4085).
40
+ */
41
+ readonly limitWait?: boolean;
36
42
  };
37
43
  export type GoalContinuationVerdict = {
38
44
  kind: "continue";
@@ -67,9 +67,10 @@ export function evaluateGoalContinuation(input) {
67
67
  return { kind: "deny", reason: "single-flight" };
68
68
  if (hasRepeatedNormalizedOutputHash(input.recentNormalizedOutputHashes))
69
69
  return { kind: "deny", reason: "repetition" };
70
- if (isNoProgressBudgetExhausted(input))
70
+ const limitWait = (input.path === "providerRecovery" || input.path === "sessionStart") && input.limitWait === true;
71
+ if (!limitWait && isNoProgressBudgetExhausted(input))
71
72
  return { kind: "deny", reason: "no-progress" };
72
- if (input.consecutiveContinuations >= GOAL_CONTINUATION_CAP) {
73
+ if (!limitWait && input.consecutiveContinuations >= GOAL_CONTINUATION_CAP) {
73
74
  return { kind: "deny", reason: "cap" };
74
75
  }
75
76
  if ((input.path === "immediate" || input.path === "userGrace") &&
@@ -1,5 +1,4 @@
1
1
  import { MANUAL_CONTINUE_CUSTOM_TYPE } from "../../../manual-continue.js";
2
- import { GOAL_CONTINUATION_MESSAGE_TYPE } from "../../../messages.js";
3
2
  import { buildDeadlineStopNotice, deadlineStopPendingSinceLastTurn, TURN_DEADLINE_ENTRY_TYPE, } from "../../../turn-deadline.js";
4
3
  import { noticeEntryRenderer } from "../../notice/index.js";
5
4
  import { continueGoalAfterAgentEnd } from "./agent-end-continuation.js";
@@ -11,10 +10,11 @@ import { GoalDirectInputLifecycle } from "./direct-input-lifecycle.js";
11
10
  import { GoalElapsedTicker } from "./elapsed-ticker.js";
12
11
  import { formatGoalForTool, goalStatusLabel } from "./format.js";
13
12
  import { goalLifecycleChanged, registerGoalLifecycleCollector } from "./lifecycle-facts.js";
14
- import { GOAL_STALE_STOP_NOTICE, isResumeOfStoppedGoal, queueGoalContinuation, recoverMissingGoalContinuationStop, } from "./lifecycle-helpers.js";
13
+ import { GOAL_STALE_STOP_NOTICE, isResumeOfStoppedGoal, recoverMissingGoalContinuationStop, } from "./lifecycle-helpers.js";
15
14
  import { GOAL_CONTINUATION_SCHEDULED_EVENT, MonitorAwareGoalContinuation } from "./monitor-continuation.js";
16
15
  import { reengageGoalAfterReload } from "./reload-reengagement.js";
17
16
  import { registerGoalFireNowRequest } from "./rpc-wait-surface.js";
17
+ import { queueGoalContinuation, readTrailingGoalContinuations } from "./session-start-continuation.js";
18
18
  import { isStaleExtensionContextError } from "./stale-context.js";
19
19
  import { interruptedRunHeld, markStopPaused, markStopResumed, pausedByStop, stopHoldLive } from "./stop-pause.js";
20
20
  import { accountGoalUsage, migrateLegacyGoal, readGoal, updateGoal } from "./store.js";
@@ -206,26 +206,26 @@ export default function goalExtension(pi) {
206
206
  ctx,
207
207
  goal,
208
208
  monitor: monitorContinuation,
209
- countTrailingContinuations: () => countTrailingGoalContinuationEntries(ctx.sessionManager.getBranch()),
210
- queueContinuation: () => queueGoalContinuationForCurrentSession(pi, ctx, goal),
209
+ readTrailingContinuations: () => readTrailingGoalContinuations(ctx.sessionManager.getBranch()),
210
+ queueContinuation: (limitWait) => queueGoalContinuationForCurrentSession(pi, ctx, goal, limitWait),
211
211
  });
212
212
  }
213
213
  else if (goal) {
214
214
  // Migration-lite admission: a resumed session carrying a trailing flood of
215
215
  // historical continuations must not reignite on load. Skip the auto-queue,
216
216
  // leave the goal active (no status rewrite), and tell the user how to resume.
217
- const trailingContinuations = countTrailingGoalContinuationEntries(ctx.sessionManager.getBranch());
218
- if (trailingContinuations >= GOAL_CONTINUATION_CAP) {
217
+ const trailing = readTrailingGoalContinuations(ctx.sessionManager.getBranch());
218
+ if (trailing.counted >= GOAL_CONTINUATION_CAP) {
219
219
  // The load-time flood suppression parks the goal without rewriting its
220
220
  // status, so the only resume signal left is the user's next message.
221
221
  // Arm the one-shot latch the direct-input lifecycle fires when that
222
222
  // message is accepted; without it the promise in the notice is a lie
223
223
  // and the resumed session sits idle until the goal is recreated.
224
224
  directInputLifecycle.armSuppressedLoadResume();
225
- ctx.ui.notify(`Goal auto-continuation suppressed for this resumed session (${trailingContinuations} historical continuations). Send a message to resume.`, "info");
225
+ ctx.ui.notify(`Goal auto-continuation suppressed for this resumed session (${trailing.counted} historical continuations). Send a message to resume.`, "info");
226
226
  }
227
227
  else {
228
- await queueGoalContinuationForCurrentSession(pi, ctx, goal);
228
+ await queueGoalContinuationForCurrentSession(pi, ctx, goal, trailing.waitingOutLimit);
229
229
  }
230
230
  }
231
231
  });
@@ -411,12 +411,13 @@ export default function goalExtension(pi) {
411
411
  await queueGoalContinuationForCurrentSession(pi, ctx, resumed);
412
412
  return true;
413
413
  }
414
- async function queueGoalContinuationForCurrentSession(extensionApi, ctx, goal) {
414
+ async function queueGoalContinuationForCurrentSession(extensionApi, ctx, goal, limitWait = false) {
415
415
  const continuedGoal = await queueGoalContinuation(extensionApi, ctx, goal, {
416
416
  continuationPending,
417
417
  markContinuationPending: () => {
418
418
  continuationPending = true;
419
419
  },
420
+ limitWait,
420
421
  });
421
422
  if (continuedGoal === null) {
422
423
  clearAgentGoalAccounting();
@@ -537,23 +538,6 @@ export default function goalExtension(pi) {
537
538
  return goal;
538
539
  }
539
540
  }
540
- /**
541
- * Counts goal-continuation entries queued since the most recent real user message
542
- * in the current branch (mirrors the todo-gate / todo-bridge backward branch read).
543
- * A real user message is the only reset: the assistant turns in between are exactly
544
- * the unattended loop this admission guard exists to stop.
545
- */
546
- function countTrailingGoalContinuationEntries(entries) {
547
- let count = 0;
548
- for (let index = entries.length - 1; index >= 0; index--) {
549
- const entry = entries[index];
550
- if (entry?.type === "message" && entry.message.role === "user")
551
- break;
552
- if (entry?.type === "custom_message" && entry.customType === GOAL_CONTINUATION_MESSAGE_TYPE)
553
- count += 1;
554
- }
555
- return count;
556
- }
557
541
  function goalStoreRef(ctx) {
558
542
  return buildGoalStoreRef(ctx.sessionManager, ctx.cwd);
559
543
  }
@@ -11,10 +11,6 @@ type GoalContinuationDeliveryOptions = {
11
11
  readonly content: (verdict: ContinuingGoalContinuationVerdict) => string;
12
12
  readonly markContinuationPending: () => void;
13
13
  };
14
- export type SessionStartContinuationOptions = {
15
- readonly continuationPending: boolean;
16
- readonly markContinuationPending: () => void;
17
- };
18
14
  /**
19
15
  * Mirrors codex `maybe_prompt_resume_paused_goal_after_resume`
20
16
  * (codex-rs/tui/src/app/thread_goal_actions.rs), which prompts on resume for every
@@ -24,8 +20,6 @@ export type SessionStartContinuationOptions = {
24
20
  export declare function isResumeOfStoppedGoal(ctx: ExtensionContext, sessionStartReason: string, goal: Goal | null): goal is Goal;
25
21
  /** Evaluates and delivers a continuation only after all guardrail checks admit it. */
26
22
  export declare function admitAndQueueGoalContinuation(pi: ExtensionAPI, ctx: ExtensionContext, goal: Goal, options: GoalContinuationDeliveryOptions): Promise<Goal | null>;
27
- /** Routes startup and resume continuations through the same verdict and delivery accounting as agent-end paths. */
28
- export declare function queueGoalContinuation(pi: ExtensionAPI, ctx: ExtensionContext, goal: Goal, options: SessionStartContinuationOptions): Promise<Goal | null>;
29
23
  export declare function buildCurrentGoalContinuationSignature(ctx: ExtensionContext, goal: Goal, lastAssistantText: string): string;
30
24
  export declare function lastAssistantText(messages: readonly AgentMessage[]): string;
31
25
  export declare function isLastTurnStuckOnContextOverflow(ctx: ExtensionContext, lastAssistant: Extract<AgentMessage, {