@humain/humain-code 0.4.2 → 0.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +15 -0
- package/dist/bundle/chunks/bedrock-converse-stream.js +23 -28
- package/dist/bundle/chunks/{chunk-6AANPPHY.js → chunk-FHLF33QE.js} +30 -35
- package/dist/bundle/chunks/{chunk-AYG2Z4S7.js → chunk-H6YXYISM.js} +287 -288
- package/dist/bundle/chunks/{chunk-LA6XSQ4X.js → chunk-IUZLRXBD.js} +1 -1
- package/dist/bundle/chunks/{chunk-UBQSONVR.js → chunk-Q5TQLAOM.js} +1 -1
- package/dist/bundle/chunks/{compat-5GFZUIMF.js → compat-HHX6L5CV.js} +1 -1
- package/dist/bundle/chunks/{dist-APWFFGCD.js → dist-PHLMPB47.js} +282 -258
- package/dist/bundle/chunks/{event-streams-CGCQQL5M.js → event-streams-PKTMLNE5.js} +1 -1
- package/dist/bundle/chunks/{virtual-modules-CKAUGQGB.js → virtual-modules-3UEIUCY5.js} +1 -1
- package/dist/bundle/cli-runtime.js +1 -1
- package/dist/bundle/flow/package.json +1 -1
- package/dist/bundle/index.js +3 -3
- package/dist/bundle/rpc-entry.js +1 -1
- package/docs/flow.md +6 -0
- package/npm-shrinkwrap.json +6 -6
- package/package.json +2 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
|
|
2
|
-
import{EventStreamCodec,EventStreamMarshaller,EventStreamMarshaller2,EventStreamSerde,HeaderMarshaller,Int64,MessageDecoderStream,MessageEncoderStream,SmithyMessageDecoderStream,SmithyMessageEncoderStream,eventStreamSerdeProvider,eventStreamSerdeProvider2,getChunkedStream,getMessageUnmarshaller,getUnmarshalledStream,init_event_streams,iterableToReadableStream,readableStreamToIterable,resolveEventStreamSerdeConfig}from"./chunk-
|
|
2
|
+
import{EventStreamCodec,EventStreamMarshaller,EventStreamMarshaller2,EventStreamSerde,HeaderMarshaller,Int64,MessageDecoderStream,MessageEncoderStream,SmithyMessageDecoderStream,SmithyMessageEncoderStream,eventStreamSerdeProvider,eventStreamSerdeProvider2,getChunkedStream,getMessageUnmarshaller,getUnmarshalledStream,init_event_streams,iterableToReadableStream,readableStreamToIterable,resolveEventStreamSerdeConfig}from"./chunk-Q5TQLAOM.js";import"./chunk-JXWJOIH4.js";init_event_streams();export{EventStreamCodec,EventStreamMarshaller2 as EventStreamMarshaller,EventStreamSerde,HeaderMarshaller,Int64,MessageDecoderStream,MessageEncoderStream,SmithyMessageDecoderStream,SmithyMessageEncoderStream,EventStreamMarshaller as UniversalEventStreamMarshaller,eventStreamSerdeProvider2 as eventStreamSerdeProvider,getChunkedStream,getMessageUnmarshaller,getUnmarshalledStream,iterableToReadableStream,readableStreamToIterable,resolveEventStreamSerdeConfig,eventStreamSerdeProvider as universalEventStreamSerdeProvider};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
|
|
2
|
-
import{dist_exports as dist_exports3}from"./chunk-
|
|
2
|
+
import{dist_exports as dist_exports3}from"./chunk-IUZLRXBD.js";import{dist_exports as dist_exports2}from"./chunk-FHLF33QE.js";import"./chunk-3ZI2TEVB.js";import"./chunk-H5CZL7M5.js";import"./chunk-Q5TQLAOM.js";import"./chunk-2KKLZK2N.js";import{all_exports,compat_exports}from"./chunk-H6YXYISM.js";import"./chunk-VZV7GLZT.js";import"./chunk-JQZ7BIAI.js";import"./chunk-OXJXKCLB.js";import"./chunk-E7WGCXWK.js";import{dist_exports}from"./chunk-ICLZNV4V.js";
|
|
3
3
|
import"./chunk-SCIGZFN5.js";import"./chunk-KQM7ZGL6.js";import"./chunk-CIA6V3BP.js";import"./chunk-XQZG5HPT.js";import"./chunk-FACBDLFU.js";import"./chunk-T45HXZW7.js";import"./chunk-DUZY4PDA.js";import"./chunk-BRXQUQSC.js";import"./chunk-PEZZKT73.js";import"./chunk-DBL35X7L.js";import"./chunk-4X774RBJ.js";import"./chunk-RTFCP3VQ.js";import"./chunk-YURQPD6Y.js";import"./chunk-AKA7HNO3.js";import{compile_exports,value_exports2 as value_exports}from"./chunk-QMUIATLD.js";
|
|
4
4
|
import{build_exports}from"./chunk-BHM75BJJ.js";import"./chunk-JXWJOIH4.js";var oauth_exports={};var VIRTUAL_MODULES={typebox:build_exports,"typebox/compile":compile_exports,"typebox/value":value_exports,"@sinclair/typebox":build_exports,"@sinclair/typebox/compile":compile_exports,"@sinclair/typebox/value":value_exports,"@earendil-works/pi-agent-core":dist_exports2,"@earendil-works/pi-tui":dist_exports,"@earendil-works/pi-ai":compat_exports,"@earendil-works/pi-ai/compat":compat_exports,"@earendil-works/pi-ai/oauth":oauth_exports,"@earendil-works/pi-ai/providers/all":all_exports,"@earendil-w\
|
|
5
5
|
orks/pi-coding-agent":dist_exports3,"@mariozechner/pi-agent-core":dist_exports2,"@mariozechner/pi-tui":dist_exports,"@mariozechner/pi-ai":compat_exports,"@mariozechner/pi-ai/compat":compat_exports,"@mariozechner/pi-ai/oauth":oauth_exports,"@mariozechner/pi-ai/providers/all":all_exports,"@mariozechner/pi-coding-agent":dist_exports3};export{VIRTUAL_MODULES};
|
|
@@ -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,warnIfDeprecatedCommand}from"./chunks/chunk-
|
|
3
|
+
import{configureHttpDispatcher,main,warnIfDeprecatedCommand}from"./chunks/chunk-FHLF33QE.js";import"./chunks/chunk-3ZI2TEVB.js";import"./chunks/chunk-H5CZL7M5.js";import"./chunks/chunk-Q5TQLAOM.js";import"./chunks/chunk-2KKLZK2N.js";import"./chunks/chunk-H6YXYISM.js";import"./chunks/chunk-VZV7GLZT.js";import"./chunks/chunk-JQZ7BIAI.js";import"./chunks/chunk-OXJXKCLB.js";import"./chunks/chunk-E7WGCXWK.js";import"./chunks/chunk-ICLZNV4V.js";import"./chunks/chunk-SCIGZFN5.js";import"./chunks/chunk-KQM7ZGL6.js";
|
|
4
4
|
import"./chunks/chunk-CIA6V3BP.js";import"./chunks/chunk-XQZG5HPT.js";import"./chunks/chunk-FACBDLFU.js";import"./chunks/chunk-T45HXZW7.js";import{APP_COMMAND,ENV_PREFIX}from"./chunks/chunk-DUZY4PDA.js";import"./chunks/chunk-BRXQUQSC.js";import"./chunks/chunk-PEZZKT73.js";import"./chunks/chunk-DBL35X7L.js";import"./chunks/chunk-4X774RBJ.js";import"./chunks/chunk-RTFCP3VQ.js";import"./chunks/chunk-YURQPD6Y.js";import"./chunks/chunk-AKA7HNO3.js";import"./chunks/chunk-QMUIATLD.js";import"./chunks/chunk-BHM75BJJ.js";
|
|
5
5
|
import"./chunks/chunk-JXWJOIH4.js";function setupCli(){process.title=APP_COMMAND,process.env.PI_CODING_AGENT="true",process.env[`${ENV_PREFIX}_CODING_AGENT`]="true",process.env.AI_AGENT="pi",process.emitWarning=(()=>{}),configureHttpDispatcher()}setupCli();warnIfDeprecatedCommand(process.argv.slice(2));main(process.argv.slice(2));
|
package/dist/bundle/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createRequire as __piCreateRequire } from "node:module"; const require = __piCreateRequire(import.meta.url);
|
|
2
|
-
import{ShowImagesSelectorComponent,ThemeSelectorComponent}from"./chunks/chunk-
|
|
2
|
+
import{ShowImagesSelectorComponent,ThemeSelectorComponent}from"./chunks/chunk-IUZLRXBD.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,FooterComponent,InteractiveMode,LoginDialogComponent,ModelRegistry,ModelRuntime,ModelSelectorComponent,OAuthAccountPool,OAuthSelectorComponent,RpcClient,SessionSelectorComponent,SettingsManager,SettingsSelectorComponent,SkillInvocationMessageComponent,ThinkingSelectorComponent,ToolExecutionComponent,TreeSelectorComponent,UserMessageComponent,UserMessageSelectorComponent,VIRTUAL_MODEL_STATE_ENTRY,calculateContextTokens,collectEntriesForBranchSummary,
|
|
4
4
|
compact,convertToPng,copyToClipboard,createAgentSession,createAgentSessionFromServices,createAgentSessionRuntime,createAgentSessionServices,createBashTool,createBashToolDefinition,createCodemodeExtension,createCodingTools,createEditTool,createEditToolDefinition,createEventBus,createExtensionRuntime,createFindTool,createFindToolDefinition,createGrepTool,createGrepToolDefinition,createLocalBashOperations,createLocalPowerShellOperations,createLsTool,createLsToolDefinition,createMcpExtension,createPiAgentExecutionHost,
|
|
5
5
|
createPowerShellTool,createPowerShellToolDefinition,createReadOnlyTools,createReadTool,createReadToolDefinition,createSubagentTool,createSyntheticSourceInfo,createToolSearchExtension,createWriteTool,createWriteToolDefinition,defineTool,detectSupportedImageMimeTypeFromFile,discoverAgents,discoverAndLoadExtensions,estimateTokens,executeHumainAgentRequest,findCutPoint,findTurnStartIndex,formatSkillsForPrompt,generateBranchSummary,generateDiffString,generateSummary,generateSummaryWithUsage,generateUnifiedPatch,
|
|
6
6
|
getFlowChildLaunchHost,getFlowControlHost,getFlowTraceProducer,getLastAssistantUsage,isBashToolResult,isEditToolResult,isFindToolResult,isGrepToolResult,isLsToolResult,isPowerShellToolResult,isReadToolResult,isToolCallEventType,isWriteToolResult,loadProjectContextFiles,loadSkills,loadSkillsFromDir,main,parseArgs,parseFrontmatter,parseSkillBlock,prepareBranchEntries,prepareChildLaunch,renderDiff,renderTaskWithContext,resolveCliModel,resolveModelScopeWithDiagnostics,runAgentExecMode,runPrintMode,runRpcMode,
|
|
7
|
-
serializeConversation,shouldCompact,stripFrontmatter,withFileMutationQueue,wrapRegisteredTool,wrapRegisteredTools}from"./chunks/chunk-
|
|
8
|
-
resizeImage,sessionEntryToContextMessages}from"./chunks/chunk-2KKLZK2N.js";import"./chunks/chunk-
|
|
7
|
+
serializeConversation,shouldCompact,stripFrontmatter,withFileMutationQueue,wrapRegisteredTool,wrapRegisteredTools}from"./chunks/chunk-FHLF33QE.js";import"./chunks/chunk-3ZI2TEVB.js";import{ProjectTrustStore,hasTrustRequiringProjectResources}from"./chunks/chunk-H5CZL7M5.js";import"./chunks/chunk-Q5TQLAOM.js";import{CURRENT_SESSION_VERSION,SessionManager,buildContextEntries,buildSessionContext,buildSessionProjection,convertToLlm,formatDimensionNote,getLatestCompactionEntry,migrateSessionEntries,parseSessionEntries,
|
|
8
|
+
resizeImage,sessionEntryToContextMessages}from"./chunks/chunk-2KKLZK2N.js";import"./chunks/chunk-H6YXYISM.js";import"./chunks/chunk-VZV7GLZT.js";import{readStoredCredential}from"./chunks/chunk-JQZ7BIAI.js";import{DEFAULT_MAX_BYTES,DEFAULT_MAX_LINES,formatSize,getPowerShellConfig,getShellConfig,truncateHead,truncateLine,truncateTail,truncateToVisualLines}from"./chunks/chunk-OXJXKCLB.js";import{ArminComponent}from"./chunks/chunk-E7WGCXWK.js";import{Theme,getLanguageFromPath,getMarkdownTheme,getSelectListTheme,
|
|
9
9
|
getSettingsListTheme,highlightCode,initTheme,keyHint,keyText,rawKeyHint}from"./chunks/chunk-ICLZNV4V.js";import"./chunks/chunk-SCIGZFN5.js";import"./chunks/chunk-KQM7ZGL6.js";import"./chunks/chunk-CIA6V3BP.js";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,
|
|
10
10
|
HumainAgentExecutionResponseSchema,HumainAgentRouteRefSchema,HumainAgentUsageSchema,parseHumainAgentExecutionRequest,parseHumainAgentExecutionResponse}from"./chunks/chunk-T45HXZW7.js";import{CONFIG_DIR_NAME,UPSTREAM_PI_VERSION,VERSION,getAgentDir,getDocsPath,getExamplesPath,getPackageDir,getReadmePath}from"./chunks/chunk-DUZY4PDA.js";import"./chunks/chunk-BRXQUQSC.js";import"./chunks/chunk-PEZZKT73.js";import"./chunks/chunk-DBL35X7L.js";import"./chunks/chunk-4X774RBJ.js";import"./chunks/chunk-RTFCP3VQ.js";
|
|
11
11
|
import"./chunks/chunk-YURQPD6Y.js";import"./chunks/chunk-AKA7HNO3.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,
|
package/dist/bundle/rpc-entry.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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-
|
|
3
|
+
import{configureHttpDispatcher,main}from"./chunks/chunk-FHLF33QE.js";import"./chunks/chunk-3ZI2TEVB.js";import"./chunks/chunk-H5CZL7M5.js";import"./chunks/chunk-Q5TQLAOM.js";import"./chunks/chunk-2KKLZK2N.js";import"./chunks/chunk-H6YXYISM.js";import"./chunks/chunk-VZV7GLZT.js";import"./chunks/chunk-JQZ7BIAI.js";import"./chunks/chunk-OXJXKCLB.js";import"./chunks/chunk-E7WGCXWK.js";import"./chunks/chunk-ICLZNV4V.js";import"./chunks/chunk-SCIGZFN5.js";import"./chunks/chunk-KQM7ZGL6.js";import"./chunks/chunk-CIA6V3BP.js";
|
|
4
4
|
import"./chunks/chunk-XQZG5HPT.js";import"./chunks/chunk-FACBDLFU.js";import"./chunks/chunk-T45HXZW7.js";import{APP_COMMAND}from"./chunks/chunk-DUZY4PDA.js";import"./chunks/chunk-BRXQUQSC.js";import"./chunks/chunk-PEZZKT73.js";import"./chunks/chunk-DBL35X7L.js";import"./chunks/chunk-4X774RBJ.js";import"./chunks/chunk-RTFCP3VQ.js";import"./chunks/chunk-YURQPD6Y.js";import"./chunks/chunk-AKA7HNO3.js";import"./chunks/chunk-QMUIATLD.js";import"./chunks/chunk-BHM75BJJ.js";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)]);
|
package/docs/flow.md
CHANGED
|
@@ -40,6 +40,12 @@ Flow has four workflow levels: `direct`, `checked`, `led`, `full`.
|
|
|
40
40
|
|
|
41
41
|
A `checked` run in a repository with no discovered deterministic checks passes when the independent review passes. It reports `evidence_status: unverified_checks_unavailable` as a warning in the run summary, `run.log`, and the ledger, and starts no repair. A review FAIL still fails. `direct` runs and continuations or recovery runs still require deterministic checks.
|
|
42
42
|
|
|
43
|
+
A `led` or `full` run (medium or large) with no discoverable deterministic checks settles the same way when the mandatory independent review passes and QA passes: `succeeded` with `evidence_status: unverified_checks_unavailable` as a warning, one QA dispatch, and no repair. A QA FAIL or review FAIL still fails the run. If checks appear during the run (at the run root, git root, verify root, or a changed file's package directories), the exception no longer applies. When no round was attested, the report's verification target shows the last observed candidate identity with `, not attested`, and prints `HEAD unborn` for a tree without commits.
|
|
44
|
+
|
|
45
|
+
The candidate identity normally comes from git. When git is missing (`ENOENT`) or refuses the repository for dubious ownership (`safe.directory`) and the root has a `.git` entry, it falls back to a git-free filesystem walk (basis `filesystem`). Unborn repositories (no commits) keep the git-based identity.
|
|
46
|
+
|
|
47
|
+
Each run writes its diagnostics under `<STATE_ROOT>/runs/<runId>/`. A repeated dispatch with the same task id (for example a QA re-dispatch) writes its stderr log as `<taskId>.attempt-N.stderr.log` (N = 2, 3, ...); the first attempt keeps `<taskId>.stderr.log`. `<taskId>.events.jsonl` and `<taskId>.prompt.md` are shared across attempts.
|
|
48
|
+
|
|
43
49
|
The mapping is implemented as a pure function (`sizeToWorkflow`), and a rules-then-triage size decision exists (`decideSize`: rule classifier first, triage only when rules say medium or large). **Neither is called by the `/flow` run path yet.** Wiring size-based auto mode into `/flow` is `(planned)` (plan section 3 A3, deliverable 3; A2).
|
|
44
50
|
|
|
45
51
|
What `/flow` does today to pick a level:
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@humain/humain-code",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@humain/humain-code",
|
|
9
|
-
"version": "0.4.
|
|
9
|
+
"version": "0.4.3",
|
|
10
10
|
"license": "MIT",
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@humain/humain-code-contracts": "0.4.
|
|
12
|
+
"@humain/humain-code-contracts": "0.4.3",
|
|
13
13
|
"@aws-sdk/client-bedrock-runtime": "3.1146.0",
|
|
14
14
|
"@earendil-works/pi-agent-core": "1.1.0",
|
|
15
15
|
"@earendil-works/pi-ai": "1.1.0",
|
|
@@ -1024,9 +1024,9 @@
|
|
|
1024
1024
|
"hasInstallScript": true
|
|
1025
1025
|
},
|
|
1026
1026
|
"node_modules/@humain/humain-code-contracts": {
|
|
1027
|
-
"version": "0.4.
|
|
1028
|
-
"resolved": "https://registry.npmjs.org/@humain/humain-code-contracts/-/humain-code-contracts-0.4.
|
|
1029
|
-
"integrity": "sha512
|
|
1027
|
+
"version": "0.4.3",
|
|
1028
|
+
"resolved": "https://registry.npmjs.org/@humain/humain-code-contracts/-/humain-code-contracts-0.4.3.tgz",
|
|
1029
|
+
"integrity": "sha512-VJSnuajBJOaHQR8BZbzXZhCKXMxCOz1/+JWtrWuX4o0FEN5HH+LqWb0uV8nsuHyOZepL+yKRvhAGyy/h7i8mAQ==",
|
|
1030
1030
|
"license": "MIT",
|
|
1031
1031
|
"dependencies": {
|
|
1032
1032
|
"typebox": "1.3.35"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@humain/humain-code",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
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.
|
|
89
|
+
"@humain/humain-code-contracts": "0.4.3",
|
|
90
90
|
"@aws-sdk/client-bedrock-runtime": "3.1146.0",
|
|
91
91
|
"@earendil-works/pi-agent-core": "1.1.0",
|
|
92
92
|
"@earendil-works/pi-ai": "1.1.0",
|