@humain/terminal 0.0.13 → 0.0.15

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 (44) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/bundle/chunks/{chunk-V5XRWLQF.js → chunk-QMTWJZBT.js} +252 -40
  3. package/dist/bundle/cli.js +1 -1
  4. package/dist/bundle/index.js +1 -1
  5. package/dist/bundle/rpc-entry.js +1 -1
  6. package/dist/core/tools/subagent.d.ts.map +1 -1
  7. package/dist/core/tools/subagent.js +30 -9
  8. package/dist/core/tools/subagent.js.map +1 -1
  9. package/dist/humain/agent-execution-runtime.d.ts.map +1 -1
  10. package/dist/humain/agent-execution-runtime.js +3 -1
  11. package/dist/humain/agent-execution-runtime.js.map +1 -1
  12. package/dist/humain/mcp-adapter/vendor/CHANGELOG.md +27 -0
  13. package/dist/humain/mcp-adapter/vendor/README.md +13 -13
  14. package/dist/humain/mcp-adapter/vendor/commands.ts +58 -21
  15. package/dist/humain/mcp-adapter/vendor/config.ts +18 -4
  16. package/dist/humain/mcp-adapter/vendor/direct-tools.ts +26 -6
  17. package/dist/humain/mcp-adapter/vendor/dist/config.d.ts +4 -0
  18. package/dist/humain/mcp-adapter/vendor/dist/config.js +13 -4
  19. package/dist/humain/mcp-adapter/vendor/dist/config.js.map +1 -1
  20. package/dist/humain/mcp-adapter/vendor/dist/types.d.ts +11 -3
  21. package/dist/humain/mcp-adapter/vendor/dist/types.js.map +1 -1
  22. package/dist/humain/mcp-adapter/vendor/error-signal.ts +15 -4
  23. package/dist/humain/mcp-adapter/vendor/errors.ts +141 -0
  24. package/dist/humain/mcp-adapter/vendor/host-html-template.ts +58 -5
  25. package/dist/humain/mcp-adapter/vendor/index.bundle.mjs +1017 -160
  26. package/dist/humain/mcp-adapter/vendor/index.ts +2 -3
  27. package/dist/humain/mcp-adapter/vendor/init.ts +5 -0
  28. package/dist/humain/mcp-adapter/vendor/mcp-panel.ts +30 -9
  29. package/dist/humain/mcp-adapter/vendor/mcp-setup-panel.ts +66 -28
  30. package/dist/humain/mcp-adapter/vendor/mcp-status.ts +2 -0
  31. package/dist/humain/mcp-adapter/vendor/package.json +3 -2
  32. package/dist/humain/mcp-adapter/vendor/proxy-modes.ts +66 -13
  33. package/dist/humain/mcp-adapter/vendor/sandbox-proxy-template.ts +217 -0
  34. package/dist/humain/mcp-adapter/vendor/server-manager.ts +337 -6
  35. package/dist/humain/mcp-adapter/vendor/skills/mcp-scripting/SKILL.md +1 -0
  36. package/dist/humain/mcp-adapter/vendor/types.ts +18 -3
  37. package/dist/humain/mcp-adapter/vendor/ui-resource-handler.ts +18 -2
  38. package/dist/humain/mcp-adapter/vendor/ui-server.ts +179 -54
  39. package/dist/humain/mcp-adapter/vendor/ui-session.ts +28 -8
  40. package/npm-shrinkwrap.json +2 -2
  41. package/package.json +1 -1
  42. package/src/humain/mcp-adapter/UPSTREAM.md +1 -1
  43. package/src/humain/mcp-adapter/upstream.json +4 -4
  44. package/src/humain/mcp-adapter/vendor/CHANGELOG.md +27 -0
@@ -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);
3
- import{configureHttpDispatcher,main}from"./chunks/chunk-V5XRWLQF.js";import{APP_NAME,ENV_PREFIX}from"./chunks/chunk-ARF4OE6X.js";import"./chunks/chunk-MA4UUCYX.js";import"./chunks/chunk-JUUC5AZY.js";import"./chunks/chunk-SGTGQNNP.js";import"./chunks/chunk-ECWELYBH.js";import"./chunks/chunk-74NVHVNZ.js";import"./chunks/chunk-CBHC6EL7.js";import"./chunks/chunk-7DDKXS2Q.js";import"./chunks/chunk-D7XAASZM.js";import"./chunks/chunk-WJZ4KLGL.js";import"./chunks/chunk-72KO4OMP.js";import"./chunks/chunk-JXWJOIH4.js";process.title=APP_NAME;process.env[`${ENV_PREFIX}_CODING_AGENT`]="true";process.emitWarning=(()=>{});configureHttpDispatcher();main(process.argv.slice(2));
3
+ import{configureHttpDispatcher,main}from"./chunks/chunk-QMTWJZBT.js";import{APP_NAME,ENV_PREFIX}from"./chunks/chunk-ARF4OE6X.js";import"./chunks/chunk-MA4UUCYX.js";import"./chunks/chunk-JUUC5AZY.js";import"./chunks/chunk-SGTGQNNP.js";import"./chunks/chunk-ECWELYBH.js";import"./chunks/chunk-74NVHVNZ.js";import"./chunks/chunk-CBHC6EL7.js";import"./chunks/chunk-7DDKXS2Q.js";import"./chunks/chunk-D7XAASZM.js";import"./chunks/chunk-WJZ4KLGL.js";import"./chunks/chunk-72KO4OMP.js";import"./chunks/chunk-JXWJOIH4.js";process.title=APP_NAME;process.env[`${ENV_PREFIX}_CODING_AGENT`]="true";process.emitWarning=(()=>{});configureHttpDispatcher();main(process.argv.slice(2));
@@ -1,2 +1,2 @@
1
1
  import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
2
- import{AgentExecInputError,AgentSession,AgentSessionRuntime,ArminComponent,AssistantMessageComponent,BashExecutionComponent,BorderedLoader,BranchSummaryMessageComponent,CURRENT_SESSION_VERSION,CompactionSummaryMessageComponent,CredentialSynchronizationError,CustomEditor,CustomMessageComponent,DEFAULT_COMPACTION_SETTINGS,DEFAULT_MAX_BYTES,DEFAULT_MAX_LINES,DefaultPackageManager,DefaultResourceLoader,DynamicBorder,ExtensionEditorComponent,ExtensionInputComponent,ExtensionRunner,ExtensionSelectorComponent,FooterComponent,HUMAIN_AGENT_EXECUTION_FAILURE_CODES,HUMAIN_AGENT_EXECUTION_SCHEMA_VERSION,HumainAgentArtifactSchema,HumainAgentExecutionClaimSchema,HumainAgentExecutionControlsSchema,HumainAgentExecutionOutcomeSchema,HumainAgentExecutionRequestSchema,HumainAgentExecutionResponseSchema,HumainAgentRouteRefSchema,HumainAgentUsageSchema,InteractiveMode,LoginDialogComponent,ModelRegistry,ModelRuntime,ModelSelectorComponent,OAuthSelectorComponent,ProjectTrustStore,RpcClient,SessionManager,SessionSelectorComponent,SettingsManager,SettingsSelectorComponent,ShowImagesSelectorComponent,SkillInvocationMessageComponent,Theme,ThemeSelectorComponent,ThinkingSelectorComponent,ToolExecutionComponent,TreeSelectorComponent,UserMessageComponent,UserMessageSelectorComponent,buildContextEntries,buildSessionContext,calculateContextTokens,collectEntriesForBranchSummary,compact,convertToLlm,convertToPng,copyToClipboard,createAgentSession,createAgentSessionFromServices,createAgentSessionRuntime,createAgentSessionServices,createBashTool,createBashToolDefinition,createCodingTools,createEditTool,createEditToolDefinition,createEventBus,createExtensionRuntime,createFindTool,createFindToolDefinition,createGrepTool,createGrepToolDefinition,createLocalBashOperations,createLocalPowerShellOperations,createLsTool,createLsToolDefinition,createPiAgentExecutionHost,createPowerShellTool,createPowerShellToolDefinition,createReadOnlyTools,createReadTool,createReadToolDefinition,createSyntheticSourceInfo,createWriteTool,createWriteToolDefinition,defineTool,detectSupportedImageMimeTypeFromFile,discoverAndLoadExtensions,estimateTokens,executeHumainAgentRequest,findCutPoint,findTurnStartIndex,formatSize,formatSkillsForPrompt,generateBranchSummary,generateDiffString,generateSummary,generateSummaryWithUsage,generateUnifiedPatch,getLanguageFromPath,getLastAssistantUsage,getLatestCompactionEntry,getMarkdownTheme,getPowerShellConfig,getSelectListTheme,getSettingsListTheme,getShellConfig,hasTrustRequiringProjectResources,highlightCode,initTheme,isBashToolResult,isEditToolResult,isFindToolResult,isGrepToolResult,isLsToolResult,isPowerShellToolResult,isReadToolResult,isToolCallEventType,isWriteToolResult,keyHint,keyText,loadProjectContextFiles,loadSkills,loadSkillsFromDir,main,migrateSessionEntries,parseArgs,parseFrontmatter,parseHumainAgentExecutionRequest,parseHumainAgentExecutionResponse,parseSessionEntries,parseSkillBlock,prepareBranchEntries,rawKeyHint,readStoredCredential,renderDiff,resolveCliModel,resolveModelScopeWithDiagnostics,runAgentExecMode,runPrintMode,runRpcMode,serializeConversation,sessionEntryToContextMessages,shouldCompact,stripFrontmatter,truncateHead,truncateLine,truncateTail,truncateToVisualLines,withFileMutationQueue,wrapRegisteredTool,wrapRegisteredTools}from"./chunks/chunk-V5XRWLQF.js";import{CONFIG_DIR_NAME,UPSTREAM_PI_VERSION,VERSION,formatDimensionNote,getAgentDir,getDocsPath,getExamplesPath,getPackageDir,getReadmePath,resizeImage}from"./chunks/chunk-ARF4OE6X.js";import"./chunks/chunk-MA4UUCYX.js";import"./chunks/chunk-JUUC5AZY.js";import"./chunks/chunk-SGTGQNNP.js";import"./chunks/chunk-ECWELYBH.js";import"./chunks/chunk-74NVHVNZ.js";import"./chunks/chunk-CBHC6EL7.js";import"./chunks/chunk-7DDKXS2Q.js";import"./chunks/chunk-D7XAASZM.js";import"./chunks/chunk-WJZ4KLGL.js";import"./chunks/chunk-72KO4OMP.js";import"./chunks/chunk-JXWJOIH4.js";export{AgentExecInputError,AgentSession,AgentSessionRuntime,ArminComponent,AssistantMessageComponent,BashExecutionComponent,BorderedLoader,BranchSummaryMessageComponent,CONFIG_DIR_NAME,CURRENT_SESSION_VERSION,CompactionSummaryMessageComponent,CredentialSynchronizationError,CustomEditor,CustomMessageComponent,DEFAULT_COMPACTION_SETTINGS,DEFAULT_MAX_BYTES,DEFAULT_MAX_LINES,DefaultPackageManager,DefaultResourceLoader,DynamicBorder,ExtensionEditorComponent,ExtensionInputComponent,ExtensionRunner,ExtensionSelectorComponent,FooterComponent,HUMAIN_AGENT_EXECUTION_FAILURE_CODES,HUMAIN_AGENT_EXECUTION_SCHEMA_VERSION,HumainAgentArtifactSchema,HumainAgentExecutionClaimSchema,HumainAgentExecutionControlsSchema,HumainAgentExecutionOutcomeSchema,HumainAgentExecutionRequestSchema,HumainAgentExecutionResponseSchema,HumainAgentRouteRefSchema,HumainAgentUsageSchema,InteractiveMode,LoginDialogComponent,ModelRegistry,ModelRuntime,ModelSelectorComponent,OAuthSelectorComponent,ProjectTrustStore,RpcClient,SessionManager,SessionSelectorComponent,SettingsManager,SettingsSelectorComponent,ShowImagesSelectorComponent,SkillInvocationMessageComponent,Theme,ThemeSelectorComponent,ThinkingSelectorComponent,ToolExecutionComponent,TreeSelectorComponent,UPSTREAM_PI_VERSION,UserMessageComponent,UserMessageSelectorComponent,VERSION,buildContextEntries,buildSessionContext,calculateContextTokens,collectEntriesForBranchSummary,compact,convertToLlm,convertToPng,copyToClipboard,createAgentSession,createAgentSessionFromServices,createAgentSessionRuntime,createAgentSessionServices,createBashTool,createBashToolDefinition,createCodingTools,createEditTool,createEditToolDefinition,createEventBus,createExtensionRuntime,createFindTool,createFindToolDefinition,createGrepTool,createGrepToolDefinition,createLocalBashOperations,createLocalPowerShellOperations,createLsTool,createLsToolDefinition,createPiAgentExecutionHost,createPowerShellTool,createPowerShellToolDefinition,createReadOnlyTools,createReadTool,createReadToolDefinition,createSyntheticSourceInfo,createWriteTool,createWriteToolDefinition,defineTool,detectSupportedImageMimeTypeFromFile,discoverAndLoadExtensions,estimateTokens,executeHumainAgentRequest,findCutPoint,findTurnStartIndex,formatDimensionNote,formatSize,formatSkillsForPrompt,generateBranchSummary,generateDiffString,generateSummary,generateSummaryWithUsage,generateUnifiedPatch,getAgentDir,getDocsPath,getExamplesPath,getLanguageFromPath,getLastAssistantUsage,getLatestCompactionEntry,getMarkdownTheme,getPackageDir,getPowerShellConfig,getReadmePath,getSelectListTheme,getSettingsListTheme,getShellConfig,hasTrustRequiringProjectResources,highlightCode,initTheme,isBashToolResult,isEditToolResult,isFindToolResult,isGrepToolResult,isLsToolResult,isPowerShellToolResult,isReadToolResult,isToolCallEventType,isWriteToolResult,keyHint,keyText,loadProjectContextFiles,loadSkills,loadSkillsFromDir,main,migrateSessionEntries,parseArgs,parseFrontmatter,parseHumainAgentExecutionRequest,parseHumainAgentExecutionResponse,parseSessionEntries,parseSkillBlock,prepareBranchEntries,rawKeyHint,readStoredCredential,renderDiff,resizeImage,resolveCliModel,resolveModelScopeWithDiagnostics,runAgentExecMode,runPrintMode,runRpcMode,serializeConversation,sessionEntryToContextMessages,shouldCompact,stripFrontmatter,truncateHead,truncateLine,truncateTail,truncateToVisualLines,withFileMutationQueue,wrapRegisteredTool,wrapRegisteredTools};
2
+ import{AgentExecInputError,AgentSession,AgentSessionRuntime,ArminComponent,AssistantMessageComponent,BashExecutionComponent,BorderedLoader,BranchSummaryMessageComponent,CURRENT_SESSION_VERSION,CompactionSummaryMessageComponent,CredentialSynchronizationError,CustomEditor,CustomMessageComponent,DEFAULT_COMPACTION_SETTINGS,DEFAULT_MAX_BYTES,DEFAULT_MAX_LINES,DefaultPackageManager,DefaultResourceLoader,DynamicBorder,ExtensionEditorComponent,ExtensionInputComponent,ExtensionRunner,ExtensionSelectorComponent,FooterComponent,HUMAIN_AGENT_EXECUTION_FAILURE_CODES,HUMAIN_AGENT_EXECUTION_SCHEMA_VERSION,HumainAgentArtifactSchema,HumainAgentExecutionClaimSchema,HumainAgentExecutionControlsSchema,HumainAgentExecutionOutcomeSchema,HumainAgentExecutionRequestSchema,HumainAgentExecutionResponseSchema,HumainAgentRouteRefSchema,HumainAgentUsageSchema,InteractiveMode,LoginDialogComponent,ModelRegistry,ModelRuntime,ModelSelectorComponent,OAuthSelectorComponent,ProjectTrustStore,RpcClient,SessionManager,SessionSelectorComponent,SettingsManager,SettingsSelectorComponent,ShowImagesSelectorComponent,SkillInvocationMessageComponent,Theme,ThemeSelectorComponent,ThinkingSelectorComponent,ToolExecutionComponent,TreeSelectorComponent,UserMessageComponent,UserMessageSelectorComponent,buildContextEntries,buildSessionContext,calculateContextTokens,collectEntriesForBranchSummary,compact,convertToLlm,convertToPng,copyToClipboard,createAgentSession,createAgentSessionFromServices,createAgentSessionRuntime,createAgentSessionServices,createBashTool,createBashToolDefinition,createCodingTools,createEditTool,createEditToolDefinition,createEventBus,createExtensionRuntime,createFindTool,createFindToolDefinition,createGrepTool,createGrepToolDefinition,createLocalBashOperations,createLocalPowerShellOperations,createLsTool,createLsToolDefinition,createPiAgentExecutionHost,createPowerShellTool,createPowerShellToolDefinition,createReadOnlyTools,createReadTool,createReadToolDefinition,createSyntheticSourceInfo,createWriteTool,createWriteToolDefinition,defineTool,detectSupportedImageMimeTypeFromFile,discoverAndLoadExtensions,estimateTokens,executeHumainAgentRequest,findCutPoint,findTurnStartIndex,formatSize,formatSkillsForPrompt,generateBranchSummary,generateDiffString,generateSummary,generateSummaryWithUsage,generateUnifiedPatch,getLanguageFromPath,getLastAssistantUsage,getLatestCompactionEntry,getMarkdownTheme,getPowerShellConfig,getSelectListTheme,getSettingsListTheme,getShellConfig,hasTrustRequiringProjectResources,highlightCode,initTheme,isBashToolResult,isEditToolResult,isFindToolResult,isGrepToolResult,isLsToolResult,isPowerShellToolResult,isReadToolResult,isToolCallEventType,isWriteToolResult,keyHint,keyText,loadProjectContextFiles,loadSkills,loadSkillsFromDir,main,migrateSessionEntries,parseArgs,parseFrontmatter,parseHumainAgentExecutionRequest,parseHumainAgentExecutionResponse,parseSessionEntries,parseSkillBlock,prepareBranchEntries,rawKeyHint,readStoredCredential,renderDiff,resolveCliModel,resolveModelScopeWithDiagnostics,runAgentExecMode,runPrintMode,runRpcMode,serializeConversation,sessionEntryToContextMessages,shouldCompact,stripFrontmatter,truncateHead,truncateLine,truncateTail,truncateToVisualLines,withFileMutationQueue,wrapRegisteredTool,wrapRegisteredTools}from"./chunks/chunk-QMTWJZBT.js";import{CONFIG_DIR_NAME,UPSTREAM_PI_VERSION,VERSION,formatDimensionNote,getAgentDir,getDocsPath,getExamplesPath,getPackageDir,getReadmePath,resizeImage}from"./chunks/chunk-ARF4OE6X.js";import"./chunks/chunk-MA4UUCYX.js";import"./chunks/chunk-JUUC5AZY.js";import"./chunks/chunk-SGTGQNNP.js";import"./chunks/chunk-ECWELYBH.js";import"./chunks/chunk-74NVHVNZ.js";import"./chunks/chunk-CBHC6EL7.js";import"./chunks/chunk-7DDKXS2Q.js";import"./chunks/chunk-D7XAASZM.js";import"./chunks/chunk-WJZ4KLGL.js";import"./chunks/chunk-72KO4OMP.js";import"./chunks/chunk-JXWJOIH4.js";export{AgentExecInputError,AgentSession,AgentSessionRuntime,ArminComponent,AssistantMessageComponent,BashExecutionComponent,BorderedLoader,BranchSummaryMessageComponent,CONFIG_DIR_NAME,CURRENT_SESSION_VERSION,CompactionSummaryMessageComponent,CredentialSynchronizationError,CustomEditor,CustomMessageComponent,DEFAULT_COMPACTION_SETTINGS,DEFAULT_MAX_BYTES,DEFAULT_MAX_LINES,DefaultPackageManager,DefaultResourceLoader,DynamicBorder,ExtensionEditorComponent,ExtensionInputComponent,ExtensionRunner,ExtensionSelectorComponent,FooterComponent,HUMAIN_AGENT_EXECUTION_FAILURE_CODES,HUMAIN_AGENT_EXECUTION_SCHEMA_VERSION,HumainAgentArtifactSchema,HumainAgentExecutionClaimSchema,HumainAgentExecutionControlsSchema,HumainAgentExecutionOutcomeSchema,HumainAgentExecutionRequestSchema,HumainAgentExecutionResponseSchema,HumainAgentRouteRefSchema,HumainAgentUsageSchema,InteractiveMode,LoginDialogComponent,ModelRegistry,ModelRuntime,ModelSelectorComponent,OAuthSelectorComponent,ProjectTrustStore,RpcClient,SessionManager,SessionSelectorComponent,SettingsManager,SettingsSelectorComponent,ShowImagesSelectorComponent,SkillInvocationMessageComponent,Theme,ThemeSelectorComponent,ThinkingSelectorComponent,ToolExecutionComponent,TreeSelectorComponent,UPSTREAM_PI_VERSION,UserMessageComponent,UserMessageSelectorComponent,VERSION,buildContextEntries,buildSessionContext,calculateContextTokens,collectEntriesForBranchSummary,compact,convertToLlm,convertToPng,copyToClipboard,createAgentSession,createAgentSessionFromServices,createAgentSessionRuntime,createAgentSessionServices,createBashTool,createBashToolDefinition,createCodingTools,createEditTool,createEditToolDefinition,createEventBus,createExtensionRuntime,createFindTool,createFindToolDefinition,createGrepTool,createGrepToolDefinition,createLocalBashOperations,createLocalPowerShellOperations,createLsTool,createLsToolDefinition,createPiAgentExecutionHost,createPowerShellTool,createPowerShellToolDefinition,createReadOnlyTools,createReadTool,createReadToolDefinition,createSyntheticSourceInfo,createWriteTool,createWriteToolDefinition,defineTool,detectSupportedImageMimeTypeFromFile,discoverAndLoadExtensions,estimateTokens,executeHumainAgentRequest,findCutPoint,findTurnStartIndex,formatDimensionNote,formatSize,formatSkillsForPrompt,generateBranchSummary,generateDiffString,generateSummary,generateSummaryWithUsage,generateUnifiedPatch,getAgentDir,getDocsPath,getExamplesPath,getLanguageFromPath,getLastAssistantUsage,getLatestCompactionEntry,getMarkdownTheme,getPackageDir,getPowerShellConfig,getReadmePath,getSelectListTheme,getSettingsListTheme,getShellConfig,hasTrustRequiringProjectResources,highlightCode,initTheme,isBashToolResult,isEditToolResult,isFindToolResult,isGrepToolResult,isLsToolResult,isPowerShellToolResult,isReadToolResult,isToolCallEventType,isWriteToolResult,keyHint,keyText,loadProjectContextFiles,loadSkills,loadSkillsFromDir,main,migrateSessionEntries,parseArgs,parseFrontmatter,parseHumainAgentExecutionRequest,parseHumainAgentExecutionResponse,parseSessionEntries,parseSkillBlock,prepareBranchEntries,rawKeyHint,readStoredCredential,renderDiff,resizeImage,resolveCliModel,resolveModelScopeWithDiagnostics,runAgentExecMode,runPrintMode,runRpcMode,serializeConversation,sessionEntryToContextMessages,shouldCompact,stripFrontmatter,truncateHead,truncateLine,truncateTail,truncateToVisualLines,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);
3
- import{configureHttpDispatcher,main}from"./chunks/chunk-V5XRWLQF.js";import{APP_NAME}from"./chunks/chunk-ARF4OE6X.js";import"./chunks/chunk-MA4UUCYX.js";import"./chunks/chunk-JUUC5AZY.js";import"./chunks/chunk-SGTGQNNP.js";import"./chunks/chunk-ECWELYBH.js";import"./chunks/chunk-74NVHVNZ.js";import"./chunks/chunk-CBHC6EL7.js";import"./chunks/chunk-7DDKXS2Q.js";import"./chunks/chunk-D7XAASZM.js";import"./chunks/chunk-WJZ4KLGL.js";import"./chunks/chunk-72KO4OMP.js";import"./chunks/chunk-JXWJOIH4.js";process.title=`${APP_NAME}-rpc`;process.env.PI_CODING_AGENT="true";process.env.AI_AGENT="pi";process.emitWarning=(()=>{});configureHttpDispatcher();main(["--mode","rpc",...process.argv.slice(2)]);
3
+ import{configureHttpDispatcher,main}from"./chunks/chunk-QMTWJZBT.js";import{APP_NAME}from"./chunks/chunk-ARF4OE6X.js";import"./chunks/chunk-MA4UUCYX.js";import"./chunks/chunk-JUUC5AZY.js";import"./chunks/chunk-SGTGQNNP.js";import"./chunks/chunk-ECWELYBH.js";import"./chunks/chunk-74NVHVNZ.js";import"./chunks/chunk-CBHC6EL7.js";import"./chunks/chunk-7DDKXS2Q.js";import"./chunks/chunk-D7XAASZM.js";import"./chunks/chunk-WJZ4KLGL.js";import"./chunks/chunk-72KO4OMP.js";import"./chunks/chunk-JXWJOIH4.js";process.title=`${APP_NAME}-rpc`;process.env.PI_CODING_AGENT="true";process.env.AI_AGENT="pi";process.emitWarning=(()=>{});configureHttpDispatcher();main(["--mode","rpc",...process.argv.slice(2)]);
@@ -1 +1 @@
1
- {"version":3,"file":"subagent.d.ts","sourceRoot":"","sources":["../../../src/core/tools/subagent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAOH,OAAO,KAAK,EAAO,OAAO,EAAS,MAAM,uBAAuB,CAAC;AAGjE,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAI/B,OAAO,KAAK,EAAoB,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAU/E,4FAA4F;AAC5F,eAAO,MAAM,kBAAkB,mCAAmC,CAAC;AAUnE,MAAM,MAAM,UAAU,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,CAAC;AAErD,MAAM,WAAW,WAAW;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAA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C;CACd;AAED,MAAM,WAAW,oBAAoB;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,GAAG,SAAS,GAAG,SAAS,CAAC;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,kBAAkB,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,eAAe;IAC/B,IAAI,EAAE,QAAQ,GAAG,UAAU,GAAG,OAAO,CAAC;IACtC,UAAU,EAAE,UAAU,CAAC;IACvB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,OAAO,EAAE,oBAAoB,EAAE,CAAC;CAChC;AAoTD,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;EAelB,CAAC;AAEH,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,MAAM,GAAG,cAAc,CAAC,OAAO,cAAc,EAAE,eAAe,CAAC,CAsoBhH;AAED,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,2EAE7C"}
@@ -297,7 +297,7 @@ function getCliInvocation(args) {
297
297
  }
298
298
  return { command: "humain-terminal", args };
299
299
  }
300
- async function runSingleAgent(defaultCwd, agents, agentName, task, cwd, step, parentModel, signal, onUpdate, makeDetails) {
300
+ async function runSingleAgent(defaultCwd, agents, agentName, task, cwd, step, model, parentModel, signal, onUpdate, makeDetails) {
301
301
  const agent = agents.find((a) => a.name === agentName);
302
302
  if (!agent) {
303
303
  const available = agents.map((a) => `"${a.name}"`).join(", ") || "none";
@@ -313,7 +313,22 @@ async function runSingleAgent(defaultCwd, agents, agentName, task, cwd, step, pa
313
313
  };
314
314
  }
315
315
  const args = ["--mode", "json", "-p", "--no-session"];
316
- args.push("--provider", parentModel.provider, "--model", parentModel.id);
316
+ if (model) {
317
+ // Canonical "provider/modelId" handle: split on the FIRST slash so
318
+ // provider-prefixed ids (e.g. "bedrock/global.anthropic....") pass
319
+ // through `--provider`/`--model` instead of being fuzzy-matched as one
320
+ // string (see model-resolver.ts resolveCliModel).
321
+ const slashIndex = model.indexOf("/");
322
+ if (slashIndex !== -1) {
323
+ args.push("--provider", model.slice(0, slashIndex), "--model", model.slice(slashIndex + 1));
324
+ }
325
+ else {
326
+ args.push("--model", model);
327
+ }
328
+ }
329
+ else {
330
+ args.push("--provider", parentModel.provider, "--model", parentModel.id);
331
+ }
317
332
  if (agent.tools && agent.tools.length > 0)
318
333
  args.push("--tools", agent.tools.join(","));
319
334
  let tmpPromptDir = null;
@@ -326,7 +341,7 @@ async function runSingleAgent(defaultCwd, agents, agentName, task, cwd, step, pa
326
341
  messages: [],
327
342
  stderr: "",
328
343
  usage: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0, cost: 0, contextTokens: 0, turns: 0 },
329
- model: `${parentModel.provider}/${parentModel.id}`,
344
+ model: model ?? `${parentModel.provider}/${parentModel.id}`,
330
345
  step,
331
346
  };
332
347
  const emitUpdate = () => {
@@ -451,13 +466,17 @@ async function runSingleAgent(defaultCwd, agents, agentName, task, cwd, step, pa
451
466
  const TaskItem = Type.Object({
452
467
  agent: Type.String({ description: "Name of the agent to invoke" }),
453
468
  task: Type.String({ description: "Task to delegate to the agent" }),
454
- model: Type.Optional(Type.String({ description: "Ignored: children inherit the parent provider/model." })),
469
+ model: Type.Optional(Type.String({
470
+ description: "Optional canonical provider/model for this child. Defaults to the parent provider/model.",
471
+ })),
455
472
  cwd: Type.Optional(Type.String({ description: "Working directory for the agent process" })),
456
473
  });
457
474
  const ChainItem = Type.Object({
458
475
  agent: Type.String({ description: "Name of the agent to invoke" }),
459
476
  task: Type.String({ description: "Task with optional {previous} placeholder for prior output" }),
460
- model: Type.Optional(Type.String({ description: "Ignored: children inherit the parent provider/model." })),
477
+ model: Type.Optional(Type.String({
478
+ description: "Optional canonical provider/model for this child. Defaults to the parent provider/model.",
479
+ })),
461
480
  cwd: Type.Optional(Type.String({ description: "Working directory for the agent process" })),
462
481
  });
463
482
  const AgentScopeSchema = StringEnum(["user", "project", "both"], {
@@ -467,7 +486,9 @@ const AgentScopeSchema = StringEnum(["user", "project", "both"], {
467
486
  const SubagentParams = Type.Object({
468
487
  agent: Type.Optional(Type.String({ description: "Name of the agent to invoke (for single mode)" })),
469
488
  task: Type.Optional(Type.String({ description: "Task to delegate (for single mode)" })),
470
- model: Type.Optional(Type.String({ description: "Ignored: children inherit the parent provider/model." })),
489
+ model: Type.Optional(Type.String({
490
+ description: "Optional canonical provider/model for this child. Defaults to the parent provider/model.",
491
+ })),
471
492
  tasks: Type.Optional(Type.Array(TaskItem, { description: "Array of {agent, task} for parallel execution" })),
472
493
  chain: Type.Optional(Type.Array(ChainItem, { description: "Array of {agent, task} for sequential execution" })),
473
494
  agentScope: Type.Optional(AgentScopeSchema),
@@ -610,7 +631,7 @@ export function createSubagentToolDefinition(cwd) {
610
631
  }
611
632
  }
612
633
  : undefined;
613
- const result = await runSingleAgent(defaultCwd, agents, step.agent, taskWithContext, step.cwd, i + 1, parentModel, signal, chainUpdate, makeDetails("chain"));
634
+ const result = await runSingleAgent(defaultCwd, agents, step.agent, taskWithContext, step.cwd, i + 1, step.model, parentModel, signal, chainUpdate, makeDetails("chain"));
614
635
  results.push(result);
615
636
  const isError = isFailedResult(result);
616
637
  if (isError) {
@@ -670,7 +691,7 @@ export function createSubagentToolDefinition(cwd) {
670
691
  }
671
692
  };
672
693
  const results = await mapWithConcurrencyLimit(params.tasks, MAX_CONCURRENCY, async (t, index) => {
673
- const result = await runSingleAgent(defaultCwd, agents, t.agent, t.task, t.cwd, undefined, parentModel, signal,
694
+ const result = await runSingleAgent(defaultCwd, agents, t.agent, t.task, t.cwd, undefined, t.model, parentModel, signal,
674
695
  // Per-task update callback
675
696
  (partial) => {
676
697
  if (partial.details?.results[0]) {
@@ -701,7 +722,7 @@ export function createSubagentToolDefinition(cwd) {
701
722
  };
702
723
  }
703
724
  if (params.agent && params.task) {
704
- const result = await runSingleAgent(defaultCwd, agents, params.agent, params.task, params.cwd, undefined, parentModel, signal, onUpdate, makeDetails("single"));
725
+ const result = await runSingleAgent(defaultCwd, agents, params.agent, params.task, params.cwd, undefined, params.model, parentModel, signal, onUpdate, makeDetails("single"));
705
726
  const isError = isFailedResult(result);
706
727
  if (isError) {
707
728
  const errorMsg = getResultOutput(result);