@humain/humain-code 0.4.10 → 0.4.12

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.
@@ -1,13 +1,13 @@
1
1
  import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
2
- import{ShowImagesSelectorComponent,ThemeSelectorComponent}from"./chunks/chunk-76X5KOIA.js";import{ACCOUNT_RETURN_COOLDOWN_MS,ACCOUNT_RETURN_MAX_COOLDOWN_MS,AgentExecInputError,AgentSession,AgentSessionRuntime,AssistantMessageComponent,BashExecutionComponent,BorderedLoader,BranchSummaryMessageComponent,CompactionSummaryMessageComponent,CredentialSynchronizationError,CustomEditor,CustomMessageComponent,DEFAULT_COMPACTION_SETTINGS,DefaultPackageManager,DefaultResourceLoader,DynamicBorder,ExtensionEditorComponent,
2
+ import{ShowImagesSelectorComponent,ThemeSelectorComponent}from"./chunks/chunk-45ZBHMQG.js";import{ACCOUNT_RETURN_COOLDOWN_MS,ACCOUNT_RETURN_MAX_COOLDOWN_MS,AgentExecInputError,AgentSession,AgentSessionRuntime,AssistantMessageComponent,BashExecutionComponent,BorderedLoader,BranchSummaryMessageComponent,CompactionSummaryMessageComponent,CredentialSynchronizationError,CustomEditor,CustomMessageComponent,DEFAULT_COMPACTION_SETTINGS,DefaultPackageManager,DefaultResourceLoader,DynamicBorder,ExtensionEditorComponent,
3
3
  ExtensionInputComponent,ExtensionRunner,ExtensionSelectorComponent,FLOW_ACCOUNT_PERSISTENCE_NOTICE,FLOW_SETUP_TERMINAL_ONLY,FLOW_SUBCOMMANDS,FooterComponent,InteractiveMode,LoginDialogComponent,ModelRegistry,ModelRuntime,ModelSelectorComponent,OAuthAccountPool,OAuthSelectorComponent,RpcClient,SessionSelectorComponent,SettingsManager,SettingsSelectorComponent,SkillInvocationMessageComponent,ThinkingSelectorComponent,ToolExecutionComponent,TreeSelectorComponent,UserMessageComponent,UserMessageSelectorComponent,
4
4
  VIRTUAL_MODEL_STATE_ENTRY,assessNodeFallback,calculateContextTokens,collectEntriesForBranchSummary,compact,completeFlowArguments,convertToPng,copyToClipboard,createAgentSession,createAgentSessionFromServices,createAgentSessionRuntime,createAgentSessionServices,createBashTool,createBashToolDefinition,createCodemodeExtension,createCodingTools,createEditTool,createEditToolDefinition,createEventBus,createExtensionRuntime,createFindTool,createFindToolDefinition,createGrepTool,createGrepToolDefinition,
5
5
  createLocalBashOperations,createLocalPowerShellOperations,createLsTool,createLsToolDefinition,createMcpExtension,createPiAgentExecutionHost,createPowerShellTool,createPowerShellToolDefinition,createReadOnlyTools,createReadTool,createReadToolDefinition,createSubagentTool,createSyntheticSourceInfo,createToolSearchExtension,createWriteTool,createWriteToolDefinition,defineTool,detectSupportedImageMimeTypeFromFile,discoverAgents,discoverAndLoadExtensions,estimateTokens,executeHumainAgentRequest,findCutPoint,
6
6
  findTurnStartIndex,flowBuildUnavailable,formatSkillsForPrompt,generateBranchSummary,generateDiffString,generateSummary,generateSummaryWithUsage,generateUnifiedPatch,getFlowAccountsHost,getFlowChildLaunchHost,getFlowControlHost,getFlowTraceProducer,getLastAssistantUsage,isBashToolResult,isEditToolResult,isFindToolResult,isGrepToolResult,isLsToolResult,isPowerShellToolResult,isReadToolResult,isToolCallEventType,isWriteToolResult,loadProjectContextFiles,loadSkills,loadSkillsFromDir,main,parseArgs,parseFlowCommand,
7
- parseFrontmatter,parseSkillBlock,prepareBranchEntries,prepareChildLaunch,renderDiff,renderFlowHelp,renderTaskWithContext,resolveCliModel,resolveModelScopeWithDiagnostics,runAgentExecMode,runPrintMode,runRpcMode,serializeConversation,shouldCompact,stripFrontmatter,withFileMutationQueue,wrapRegisteredTool,wrapRegisteredTools}from"./chunks/chunk-2QTTNAD4.js";import"./chunks/chunk-HMWAH7ZY.js";import"./chunks/chunk-I2ZWZAIV.js";import{ArminComponent}from"./chunks/chunk-LCOHFEZZ.js";import{ProjectTrustStore,
8
- hasTrustRequiringProjectResources}from"./chunks/chunk-77EWF2NW.js";import{CURRENT_SESSION_VERSION,SessionManager,buildContextEntries,buildSessionContext,buildSessionProjection,convertToLlm,formatDimensionNote,getLatestCompactionEntry,migrateSessionEntries,parseSessionEntries,resizeImage,sessionEntryToContextMessages}from"./chunks/chunk-V5ZF7Q7L.js";import"./chunks/chunk-BCF7KZ3R.js";import"./chunks/chunk-QSPDLT2R.js";import{readStoredCredential}from"./chunks/chunk-HSDTSUZE.js";import{DEFAULT_MAX_BYTES,
7
+ parseFrontmatter,parseSkillBlock,prepareBranchEntries,prepareChildLaunch,renderDiff,renderFlowHelp,renderTaskWithContext,resolveCliModel,resolveModelScopeWithDiagnostics,runAgentExecMode,runPrintMode,runRpcMode,serializeConversation,shouldCompact,stripFrontmatter,withFileMutationQueue,wrapRegisteredTool,wrapRegisteredTools}from"./chunks/chunk-NLTW6A7G.js";import"./chunks/chunk-HMWAH7ZY.js";import"./chunks/chunk-I2ZWZAIV.js";import{ArminComponent}from"./chunks/chunk-LCOHFEZZ.js";import{ProjectTrustStore,
8
+ hasTrustRequiringProjectResources}from"./chunks/chunk-77EWF2NW.js";import{CURRENT_SESSION_VERSION,SessionManager,buildContextEntries,buildSessionContext,buildSessionProjection,convertToLlm,formatDimensionNote,getLatestCompactionEntry,migrateSessionEntries,parseSessionEntries,resizeImage,sessionEntryToContextMessages}from"./chunks/chunk-V5ZF7Q7L.js";import"./chunks/chunk-KGI4EX6R.js";import"./chunks/chunk-QSPDLT2R.js";import{readStoredCredential}from"./chunks/chunk-HSDTSUZE.js";import{DEFAULT_MAX_BYTES,
9
9
  DEFAULT_MAX_LINES,formatSize,getPowerShellConfig,getShellConfig,truncateHead,truncateLine,truncateTail,truncateToVisualLines}from"./chunks/chunk-XMHLSV3I.js";import{Theme,getLanguageFromPath,getMarkdownTheme,getSelectListTheme,getSettingsListTheme,highlightCode,initTheme,keyHint,keyText,rawKeyHint}from"./chunks/chunk-VYIIPF57.js";import"./chunks/chunk-SCIGZFN5.js";import"./chunks/chunk-WBJN6PEI.js";import"./chunks/chunk-R5VIAWGA.js";import"./chunks/chunk-KQM7ZGL6.js";import"./chunks/chunk-CIA6V3BP.js";
10
- import"./chunks/chunk-XQZG5HPT.js";import"./chunks/chunk-FACBDLFU.js";import{HUMAIN_AGENT_EXECUTION_FAILURE_CODES,HUMAIN_AGENT_EXECUTION_SCHEMA_VERSION,HumainAgentArtifactSchema,HumainAgentExecutionClaimSchema,HumainAgentExecutionControlsSchema,HumainAgentExecutionOutcomeSchema,HumainAgentExecutionRequestSchema,HumainAgentExecutionResponseSchema,HumainAgentRouteRefSchema,HumainAgentUsageSchema,parseHumainAgentExecutionRequest,parseHumainAgentExecutionResponse}from"./chunks/chunk-AUFEF24K.js";import{
10
+ import"./chunks/chunk-XQZG5HPT.js";import"./chunks/chunk-FACBDLFU.js";import{HUMAIN_AGENT_EXECUTION_FAILURE_CODES,HUMAIN_AGENT_EXECUTION_SCHEMA_VERSION,HumainAgentArtifactSchema,HumainAgentExecutionClaimSchema,HumainAgentExecutionControlsSchema,HumainAgentExecutionOutcomeSchema,HumainAgentExecutionRequestSchema,HumainAgentExecutionResponseSchema,HumainAgentRouteRefSchema,HumainAgentUsageSchema,parseHumainAgentExecutionRequest,parseHumainAgentExecutionResponse}from"./chunks/chunk-SZRZXVVZ.js";import{
11
11
  CONFIG_DIR_NAME,UPSTREAM_PI_VERSION,VERSION,getAgentDir,getDocsPath,getExamplesPath,getPackageDir,getReadmePath}from"./chunks/chunk-YJBE3IGR.js";import"./chunks/chunk-BRXQUQSC.js";import"./chunks/chunk-YKZGL4MB.js";import"./chunks/chunk-DBL35X7L.js";import"./chunks/chunk-GVVRXZHN.js";import"./chunks/chunk-DZ5C66IU.js";import"./chunks/chunk-RYC5BYVE.js";import"./chunks/chunk-VEYTRNQC.js";import"./chunks/chunk-QMUIATLD.js";import"./chunks/chunk-BHM75BJJ.js";import"./chunks/chunk-JXWJOIH4.js";export{ACCOUNT_RETURN_COOLDOWN_MS,ACCOUNT_RETURN_MAX_COOLDOWN_MS,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,
12
12
  ExtensionInputComponent,ExtensionRunner,ExtensionSelectorComponent,FLOW_ACCOUNT_PERSISTENCE_NOTICE,FLOW_SETUP_TERMINAL_ONLY,FLOW_SUBCOMMANDS,FooterComponent,HUMAIN_AGENT_EXECUTION_FAILURE_CODES,HUMAIN_AGENT_EXECUTION_SCHEMA_VERSION,HumainAgentArtifactSchema,HumainAgentExecutionClaimSchema,HumainAgentExecutionControlsSchema,HumainAgentExecutionOutcomeSchema,HumainAgentExecutionRequestSchema,HumainAgentExecutionResponseSchema,HumainAgentRouteRefSchema,HumainAgentUsageSchema,InteractiveMode,LoginDialogComponent,
13
13
  ModelRegistry,ModelRuntime,ModelSelectorComponent,OAuthAccountPool,OAuthSelectorComponent,ProjectTrustStore,RpcClient,SessionManager,SessionSelectorComponent,SettingsManager,SettingsSelectorComponent,ShowImagesSelectorComponent,SkillInvocationMessageComponent,Theme,ThemeSelectorComponent,ThinkingSelectorComponent,ToolExecutionComponent,TreeSelectorComponent,UPSTREAM_PI_VERSION,UserMessageComponent,UserMessageSelectorComponent,VERSION,VIRTUAL_MODEL_STATE_ENTRY,assessNodeFallback,buildContextEntries,
@@ -1,5 +1,5 @@
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-2QTTNAD4.js";import"./chunks/chunk-HMWAH7ZY.js";import"./chunks/chunk-I2ZWZAIV.js";import"./chunks/chunk-LCOHFEZZ.js";import"./chunks/chunk-77EWF2NW.js";import"./chunks/chunk-V5ZF7Q7L.js";import"./chunks/chunk-BCF7KZ3R.js";import"./chunks/chunk-QSPDLT2R.js";import"./chunks/chunk-HSDTSUZE.js";import"./chunks/chunk-XMHLSV3I.js";import"./chunks/chunk-VYIIPF57.js";import"./chunks/chunk-SCIGZFN5.js";import"./chunks/chunk-WBJN6PEI.js";import"./chunks/chunk-R5VIAWGA.js";
4
- import"./chunks/chunk-KQM7ZGL6.js";import"./chunks/chunk-CIA6V3BP.js";import"./chunks/chunk-XQZG5HPT.js";import"./chunks/chunk-FACBDLFU.js";import"./chunks/chunk-AUFEF24K.js";import{APP_COMMAND}from"./chunks/chunk-YJBE3IGR.js";import"./chunks/chunk-BRXQUQSC.js";import"./chunks/chunk-YKZGL4MB.js";import"./chunks/chunk-DBL35X7L.js";import"./chunks/chunk-GVVRXZHN.js";import"./chunks/chunk-DZ5C66IU.js";import"./chunks/chunk-RYC5BYVE.js";import"./chunks/chunk-VEYTRNQC.js";import"./chunks/chunk-QMUIATLD.js";import"./chunks/chunk-BHM75BJJ.js";
3
+ import{configureHttpDispatcher,main}from"./chunks/chunk-NLTW6A7G.js";import"./chunks/chunk-HMWAH7ZY.js";import"./chunks/chunk-I2ZWZAIV.js";import"./chunks/chunk-LCOHFEZZ.js";import"./chunks/chunk-77EWF2NW.js";import"./chunks/chunk-V5ZF7Q7L.js";import"./chunks/chunk-KGI4EX6R.js";import"./chunks/chunk-QSPDLT2R.js";import"./chunks/chunk-HSDTSUZE.js";import"./chunks/chunk-XMHLSV3I.js";import"./chunks/chunk-VYIIPF57.js";import"./chunks/chunk-SCIGZFN5.js";import"./chunks/chunk-WBJN6PEI.js";import"./chunks/chunk-R5VIAWGA.js";
4
+ import"./chunks/chunk-KQM7ZGL6.js";import"./chunks/chunk-CIA6V3BP.js";import"./chunks/chunk-XQZG5HPT.js";import"./chunks/chunk-FACBDLFU.js";import"./chunks/chunk-SZRZXVVZ.js";import{APP_COMMAND}from"./chunks/chunk-YJBE3IGR.js";import"./chunks/chunk-BRXQUQSC.js";import"./chunks/chunk-YKZGL4MB.js";import"./chunks/chunk-DBL35X7L.js";import"./chunks/chunk-GVVRXZHN.js";import"./chunks/chunk-DZ5C66IU.js";import"./chunks/chunk-RYC5BYVE.js";import"./chunks/chunk-VEYTRNQC.js";import"./chunks/chunk-QMUIATLD.js";import"./chunks/chunk-BHM75BJJ.js";
5
5
  import"./chunks/chunk-JXWJOIH4.js";process.title=`${APP_COMMAND}-rpc`;process.env.PI_CODING_AGENT="true";process.env.AI_AGENT="pi";process.emitWarning=(()=>{});configureHttpDispatcher();main(["--mode","rpc",...process.argv.slice(2)]);
@@ -2131,7 +2131,8 @@ function convertToolConfig(tools, toolChoice, supportsStrictMode) {
2131
2131
  if (!tools?.length) return void 0;
2132
2132
  if (toolChoice === "none") return void 0;
2133
2133
  const bedrockTools = tools.map((tool) => {
2134
- const strict = resolveJsonSchemaStrictSampling(tool, supportsStrictMode);
2134
+ const sampling = tool.constrainedSampling;
2135
+ const strict = sampling && sampling.type === "json_schema" && sampling.strict === "prefer" ? void 0 : resolveJsonSchemaStrictSampling(tool, supportsStrictMode);
2135
2136
  return {
2136
2137
  toolSpec: {
2137
2138
  name: tool.name,
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@humain/humain-code",
3
- "version": "0.4.10",
3
+ "version": "0.4.12",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@humain/humain-code",
9
- "version": "0.4.10",
9
+ "version": "0.4.12",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "@humain/humain-code-contracts": "0.4.10",
12
+ "@humain/humain-code-contracts": "0.4.12",
13
13
  "@aws-sdk/client-bedrock-runtime": "3.1146.0",
14
14
  "@aws-sdk/client-cloudwatch": "3.1146.0",
15
15
  "@earendil-works/pi-agent-core": "1.1.0",
@@ -1045,9 +1045,9 @@
1045
1045
  "hasInstallScript": true
1046
1046
  },
1047
1047
  "node_modules/@humain/humain-code-contracts": {
1048
- "version": "0.4.10",
1049
- "resolved": "https://registry.npmjs.org/@humain/humain-code-contracts/-/humain-code-contracts-0.4.10.tgz",
1050
- "integrity": "sha512-GhUkIhqYGZBUXonZ48OqllzcJZ/tNjvS8AFDg/JsSuFJyGjfzbkhoNIdNXcdJu1tiS3xg5hQDyAlkP2mD7ddOw==",
1048
+ "version": "0.4.12",
1049
+ "resolved": "https://registry.npmjs.org/@humain/humain-code-contracts/-/humain-code-contracts-0.4.12.tgz",
1050
+ "integrity": "sha512-u+ZSaXttFHtKA6YNeEtyJgIOv9wUxGhcpsSxYr2WTFRabehqS3aXHW8FBc2H81dof5okhPJ3uoifm93fFxEAww==",
1051
1051
  "license": "MIT",
1052
1052
  "dependencies": {
1053
1053
  "typebox": "1.3.35"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humain/humain-code",
3
- "version": "0.4.10",
3
+ "version": "0.4.12",
4
4
  "description": "Coding agent CLI with read, bash, edit, write tools and session management",
5
5
  "type": "module",
6
6
  "humainTerminalConfig": {
@@ -86,7 +86,7 @@
86
86
  "prepublishOnly": "npm run clean && npm run build && npm run shrinkwrap"
87
87
  },
88
88
  "dependencies": {
89
- "@humain/humain-code-contracts": "0.4.10",
89
+ "@humain/humain-code-contracts": "0.4.12",
90
90
  "@aws-sdk/client-bedrock-runtime": "3.1146.0",
91
91
  "@aws-sdk/client-cloudwatch": "3.1146.0",
92
92
  "@earendil-works/pi-agent-core": "1.1.0",