@bastani/atomic 0.9.19-alpha.3 → 0.9.19-alpha.5

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 (164) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/builtin/intercom/CHANGELOG.md +8 -0
  3. package/dist/builtin/intercom/index.bundle.mjs +117 -26
  4. package/dist/builtin/intercom/package.json +1 -1
  5. package/dist/builtin/mcp/package.json +1 -1
  6. package/dist/builtin/subagents/CHANGELOG.md +18 -0
  7. package/dist/builtin/subagents/README.md +15 -15
  8. package/dist/builtin/subagents/agents/debugger.md +2 -2
  9. package/dist/builtin/subagents/package.json +1 -1
  10. package/dist/builtin/subagents/skills/subagent/SKILL.md +26 -26
  11. package/dist/builtin/subagents/src/extension/index.bundle.mjs +140 -58
  12. package/dist/builtin/web-access/package.json +1 -1
  13. package/dist/builtin/workflows/CHANGELOG.md +27 -0
  14. package/dist/builtin/workflows/README.md +14 -15
  15. package/dist/builtin/workflows/builtin/{chunk-mygmtz6e.js → chunk-1nbq96fh.js} +19 -19
  16. package/dist/builtin/workflows/builtin/{chunk-zggjyg5z.js → chunk-n8zysf1t.js} +1 -1
  17. package/dist/builtin/workflows/builtin/{chunk-r9qq7xfj.js → chunk-vhmnzdj9.js} +37 -37
  18. package/dist/builtin/workflows/builtin/{chunk-62v3gg9f.js → chunk-yeee2jrc.js} +11 -11
  19. package/dist/builtin/workflows/builtin/goal.js +2 -2
  20. package/dist/builtin/workflows/builtin/index.js +4 -4
  21. package/dist/builtin/workflows/builtin/open-claude-design.js +1 -1
  22. package/dist/builtin/workflows/builtin/ralph.js +2 -2
  23. package/dist/builtin/workflows/package.json +5 -5
  24. package/dist/builtin/workflows/src/extension/index.bundle.mjs +180 -239
  25. package/dist/builtin/workflows/src/index.js +19 -2
  26. package/dist/builtin/workflows/src/shared/authoring-contract-stage.d.ts +2 -1
  27. package/dist/builtin/workflows/src/shared/authoring-contract-ui.d.ts +1 -1
  28. package/dist/core/agent-session-auto-compaction.js +1 -1
  29. package/dist/core/agent-session-auto-compaction.js.map +1 -1
  30. package/dist/core/agent-session-compaction.js +1 -1
  31. package/dist/core/agent-session-compaction.js.map +1 -1
  32. package/dist/core/agent-session-custom-message-commit.d.ts.map +1 -1
  33. package/dist/core/agent-session-custom-message-commit.js +33 -2
  34. package/dist/core/agent-session-custom-message-commit.js.map +1 -1
  35. package/dist/core/agent-session-message-queue.d.ts +1 -1
  36. package/dist/core/agent-session-message-queue.d.ts.map +1 -1
  37. package/dist/core/agent-session-message-queue.js +20 -6
  38. package/dist/core/agent-session-message-queue.js.map +1 -1
  39. package/dist/core/agent-session-methods.d.ts +4 -1
  40. package/dist/core/agent-session-methods.d.ts.map +1 -1
  41. package/dist/core/agent-session-methods.js.map +1 -1
  42. package/dist/core/agent-session-persistent-custom-messages.d.ts +1 -1
  43. package/dist/core/agent-session-persistent-custom-messages.d.ts.map +1 -1
  44. package/dist/core/agent-session-persistent-custom-messages.js +13 -3
  45. package/dist/core/agent-session-persistent-custom-messages.js.map +1 -1
  46. package/dist/core/agent-session-post-tool-compaction.js +1 -1
  47. package/dist/core/agent-session-post-tool-compaction.js.map +1 -1
  48. package/dist/core/agent-session-prompt.d.ts.map +1 -1
  49. package/dist/core/agent-session-prompt.js +83 -0
  50. package/dist/core/agent-session-prompt.js.map +1 -1
  51. package/dist/core/agent-session-queue-pause.d.ts.map +1 -1
  52. package/dist/core/agent-session-queue-pause.js +11 -0
  53. package/dist/core/agent-session-queue-pause.js.map +1 -1
  54. package/dist/core/agent-session-tool-hooks.d.ts.map +1 -1
  55. package/dist/core/agent-session-tool-hooks.js +2 -0
  56. package/dist/core/agent-session-tool-hooks.js.map +1 -1
  57. package/dist/core/agent-session-tool-registry.d.ts.map +1 -1
  58. package/dist/core/agent-session-tool-registry.js +12 -0
  59. package/dist/core/agent-session-tool-registry.js.map +1 -1
  60. package/dist/core/agent-session-transfer.d.ts.map +1 -1
  61. package/dist/core/agent-session-transfer.js +7 -0
  62. package/dist/core/agent-session-transfer.js.map +1 -1
  63. package/dist/core/agent-session-types.d.ts +2 -0
  64. package/dist/core/agent-session-types.d.ts.map +1 -1
  65. package/dist/core/agent-session-types.js +2 -0
  66. package/dist/core/agent-session-types.js.map +1 -1
  67. package/dist/core/agent-session.d.ts +4 -0
  68. package/dist/core/agent-session.d.ts.map +1 -1
  69. package/dist/core/agent-session.js +22 -0
  70. package/dist/core/agent-session.js.map +1 -1
  71. package/dist/core/extensions/context-types.d.ts +6 -0
  72. package/dist/core/extensions/context-types.d.ts.map +1 -1
  73. package/dist/core/extensions/context-types.js.map +1 -1
  74. package/dist/core/extensions/loader-virtual-modules.js +3 -3
  75. package/dist/core/extensions/loader-virtual-modules.js.map +1 -1
  76. package/dist/core/extensions/runner-context.d.ts +1 -1
  77. package/dist/core/extensions/runner-context.d.ts.map +1 -1
  78. package/dist/core/extensions/runner-context.js +9 -3
  79. package/dist/core/extensions/runner-context.js.map +1 -1
  80. package/dist/core/extensions/runner.js +1 -1
  81. package/dist/core/extensions/runner.js.map +1 -1
  82. package/dist/core/extensions/workflow-events.d.ts +1 -1
  83. package/dist/core/extensions/workflow-events.d.ts.map +1 -1
  84. package/dist/core/extensions/workflow-events.js.map +1 -1
  85. package/dist/core/sdk-exports.d.ts +1 -1
  86. package/dist/core/sdk-exports.d.ts.map +1 -1
  87. package/dist/core/sdk-exports.js +1 -1
  88. package/dist/core/sdk-exports.js.map +1 -1
  89. package/dist/core/settings-manager-basic-accessors.d.ts +5 -3
  90. package/dist/core/settings-manager-basic-accessors.d.ts.map +1 -1
  91. package/dist/core/settings-manager-basic-accessors.js +23 -8
  92. package/dist/core/settings-manager-basic-accessors.js.map +1 -1
  93. package/dist/core/settings-manager.d.ts +1 -1
  94. package/dist/core/settings-manager.d.ts.map +1 -1
  95. package/dist/core/settings-manager.js.map +1 -1
  96. package/dist/core/settings-types.d.ts +5 -0
  97. package/dist/core/settings-types.d.ts.map +1 -1
  98. package/dist/core/settings-types.js.map +1 -1
  99. package/dist/core/slash-commands.d.ts.map +1 -1
  100. package/dist/core/slash-commands.js +4 -5
  101. package/dist/core/slash-commands.js.map +1 -1
  102. package/dist/core/tasks/agent-adapter.d.ts +5 -2
  103. package/dist/core/tasks/agent-adapter.d.ts.map +1 -1
  104. package/dist/core/tasks/agent-adapter.js +10 -3
  105. package/dist/core/tasks/agent-adapter.js.map +1 -1
  106. package/dist/core/tasks/completion.d.ts.map +1 -1
  107. package/dist/core/tasks/completion.js +5 -1
  108. package/dist/core/tasks/completion.js.map +1 -1
  109. package/dist/core/tools/bash-pty-native.d.ts +16 -2
  110. package/dist/core/tools/bash-pty-native.d.ts.map +1 -1
  111. package/dist/core/tools/bash-pty-native.js +82 -0
  112. package/dist/core/tools/bash-pty-native.js.map +1 -1
  113. package/dist/core/tools/bash.d.ts +13 -2
  114. package/dist/core/tools/bash.d.ts.map +1 -1
  115. package/dist/core/tools/bash.js +48 -3
  116. package/dist/core/tools/bash.js.map +1 -1
  117. package/dist/core/tools/index.d.ts +4 -1
  118. package/dist/core/tools/index.d.ts.map +1 -1
  119. package/dist/core/tools/index.js +12 -0
  120. package/dist/core/tools/index.js.map +1 -1
  121. package/dist/core/tools/kill.d.ts +17 -0
  122. package/dist/core/tools/kill.d.ts.map +1 -0
  123. package/dist/core/tools/kill.js +49 -0
  124. package/dist/core/tools/kill.js.map +1 -0
  125. package/dist/core/tools/powershell.d.ts +84 -28
  126. package/dist/core/tools/powershell.d.ts.map +1 -1
  127. package/dist/core/tools/powershell.js +10 -3
  128. package/dist/core/tools/powershell.js.map +1 -1
  129. package/dist/core/workflow-stage-admission.d.ts +14 -0
  130. package/dist/core/workflow-stage-admission.d.ts.map +1 -1
  131. package/dist/core/workflow-stage-admission.js +63 -3
  132. package/dist/core/workflow-stage-admission.js.map +1 -1
  133. package/dist/index.d.ts +2 -2
  134. package/dist/index.d.ts.map +1 -1
  135. package/dist/index.js +1 -1
  136. package/dist/index.js.map +1 -1
  137. package/dist/modes/interactive/components/task-row.d.ts.map +1 -1
  138. package/dist/modes/interactive/components/task-row.js +8 -1
  139. package/dist/modes/interactive/components/task-row.js.map +1 -1
  140. package/docs/background-tasks.md +24 -1
  141. package/docs/compaction.md +20 -0
  142. package/docs/computer-use.md +390 -0
  143. package/docs/docs.json +1 -0
  144. package/docs/extensions.md +11 -1
  145. package/docs/herdr.md +2 -0
  146. package/docs/index.md +1 -0
  147. package/docs/intercom.md +10 -2
  148. package/docs/providers.md +1 -1
  149. package/docs/quickstart.md +1 -1
  150. package/docs/sdk.md +11 -1
  151. package/docs/settings.md +20 -0
  152. package/docs/subagents.md +8 -6
  153. package/docs/tmux.md +2 -0
  154. package/docs/tools.md +7 -1
  155. package/docs/usage.md +1 -1
  156. package/docs/workflows/api-reference.md +4 -3
  157. package/docs/workflows/authoring.md +3 -3
  158. package/docs/workflows/builtins.md +9 -6
  159. package/docs/workflows/operations.md +36 -30
  160. package/docs/workflows/reliable-design.md +3 -3
  161. package/docs/workflows/verification.md +99 -40
  162. package/docs/workflows.md +4 -2
  163. package/npm-shrinkwrap.json +32 -32
  164. package/package.json +3 -3
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,gEAAgE;AAChE,OAAO,EAAE,aAAa,EAA0D,MAAM,+BAA+B,CAAC;AAEtH,OAAO,EAA0B,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AACpG,OAAO,EAAE,gBAAgB,EAAE,QAAQ,EAAE,gBAAgB,EAAE,MAAM,6CAA6C,CAAC;AAC3G,OAAO,EAAE,OAAO,EAAE,MAAM,4CAA4C,CAAC;AACrE,OAAO,EACN,0BAA0B,EAC1B,8BAA8B,GAC9B,MAAM,oDAAoD,CAAC;AAC5D,0BAA0B;AAE1B,OAAO,EAAa,S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AAM,0BAA0B,CAAC;AACzE,sBAAsB;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EACN,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,qCAAqC,EACrC,uCAAuC,EAGvC,qBAAqB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAqB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC3G,OAAO,EAAE,oCAAoC,EAAE,MAAM,iBAAiB,CAAC;AACvE,kBAAkB;AAClB,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["// Internal trusted-host task integration (not model authority).\nexport { AgentTaskHost, type AgentTaskHostBinding, type AgentTaskRunnerFactory } from \"./core/tasks/agent-adapter.js\";\nexport type { AgentIntent, OperationId, TaskId, TaskResult, WaitPolicy } from \"./core/tasks/contracts.js\";\nexport { type AdmittedAgentTask, collectAgentTasks } from \"./core/tasks/execution-scope.js\";\nexport { bindOwnerTaskStore, getOwnerTaskStore, OwnerTaskStore } from \"./core/tasks/owner-store.js\";\nexport { renderTaskFooter, TaskList, taskListSections } from \"./modes/interactive/components/task-list.js\";\nexport { TaskRow } from \"./modes/interactive/components/task-row.js\";\nexport {\n\tapplyAssistantMessageDelta,\n\tbeginStreamingAssistantMessage,\n} from \"./modes/interactive/streaming-assistant-message.ts\";\n// Core session management\n\nexport { type Args, parseArgs } from \"./cli/args.ts\";\n// Config paths\nexport {\n\tAPP_NAME,\n\tAPP_TITLE,\n\tCONFIG_DIR_NAME,\n\tCONFIG_DIR_NAMES,\n\tgetAgentConfigPaths,\n\tgetAgentDir,\n\tgetAgentDirs,\n\tgetBundledInteractiveAssetPath,\n\tgetChangelogPath,\n\tgetDocsPath,\n\tgetEnvNames,\n\tgetEnvValue,\n\tgetExamplesPath,\n\tgetExportTemplateDir,\n\tgetInteractiveAssetsDir,\n\tgetLegacyAgentDir,\n\tgetPackageDir,\n\tgetPackageJsonPath,\n\tgetProjectConfigDirs,\n\tgetProjectConfigPaths,\n\tgetReadmePath,\n\tgetThemesDir,\n\tgetUserConfigDirs,\n\tgetUserConfigPaths,\n\thasEnvValue,\n\tisBunBinary,\n\tLEGACY_CONFIG_DIR_NAME,\n\tLEGACY_ENV_PREFIX,\n\tPACKAGE_NAME,\n\tsetEnvValue,\n\tVERSION,\n\tWORKFLOW_STAGE_SUBAGENT_GUARD_ENV,\n} from \"./config.js\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype CompactionReason,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionStats,\n} from \"./core/agent-session.js\";\n// Auth and model runtime\nexport { AuthStorage, readStoredCredential } from \"./core/auth-storage.ts\";\nexport {\n\ttype AuthStorageBackend,\n\tFileAuthStorageBackend,\n\tInMemoryAuthStorageBackend,\n} from \"./core/auth-storage-backends.ts\";\nexport { type BashResult, executeBashWithOperations } from \"./core/bash-executor.ts\";\nexport { getBuiltinPackagePaths } from \"./core/builtin-packages.ts\";\nexport {\n\ttype CallbackActivityDescriptor,\n\ttype CallbackActivityKind,\n\trunCallback,\n\trunSynchronousCallback,\n} from \"./core/callback-activity.ts\";\n// Cloudflare AI Gateway over the Workers AI binding (no API token; see docs/providers.md)\nexport {\n\ttype AiGatewayBinding,\n\ttype AiGatewayBindingGateway,\n\ttype AiGatewayUniversalRequestLike,\n\tCLOUDFLARE_GATEWAY_BINDING_AUTH_SENTINEL,\n\tcreateGatewayBindingFetch,\n\ttype GatewayBindingFetchOptions,\n} from \"./core/cloudflare-gateway-binding.ts\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactedTranscript,\n\ttype CompactionPlannerModel,\n\ttype CompactionPlanOptions,\n\ttype CompactionRung,\n\ttype CompactionRungResult,\n\ttype CompactionRunRequest,\n\ttype CompactionUrgency,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tDEFAULT_COMPACTION_SETTINGS,\n\testimateTokens,\n\ttype FileOperations,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgetLastAssistantUsage,\n\ttype LineRange,\n\ttype PlannerAuth,\n\ttype PlannerBudget,\n\ttype PlannerLimitClass,\n\ttype PlannerOutcome,\n\tprepareBranchEntries,\n\tprepareCompactionBoundary,\n\trunVerbatimCompaction,\n\tserializeConversation,\n\tserializeConversationForCompaction,\n\tshouldCompact,\n\tstartNewContextWindow,\n\ttype VerbatimCompactionDetails,\n\ttype VerbatimCompactionParameters,\n\ttype VerbatimCompactionPreparation,\n\ttype VerbatimCompactionResult,\n} from \"./core/compaction/index.ts\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.js\";\nexport { areExperimentalFeaturesEnabled } from \"./core/experimental.ts\";\nexport { sessionScopedExtensionState } from \"./core/extension-session-state.ts\";\nexport {\n\tgetModelFastRoute,\n\tresolveUpstreamModelId,\n\tusesChatGptCodexTransport,\n\tusesFirstPartyCodexRouting,\n\twithCodexFastRouteHeaders,\n\twithFastRouteStreamOptions,\n} from \"./core/fast-model-routing.ts\";\nexport {\n\tCODEX_FAST_ROUTE_HEADER,\n\tCODEX_FAST_ROUTE_ORIGINATOR,\n} from \"./core/fast-model-routing-transport.ts\";\nexport {\n\tcopilotAdvertisedFastModelIds,\n\tderiveFastModelVariants,\n\tFAST_MODEL_ID_SUFFIX,\n\tFAST_MODEL_SERVICE_TIER,\n\ttype FastModelVariantDerivation,\n\ttype FastModelVariantDiagnostic,\n\ttype FastModelVariantsOptions,\n\tfastModelId,\n\tisNativeFastRouteApi,\n\tusesOpenAIFastServiceTier,\n\twithFastModelVariants,\n} from \"./core/fast-model-variants.ts\";\nexport {\n\tparseFlattenedKeyPath,\n\treconstructFlattenedKeys,\n\tunflattenArgumentsWithSchema,\n} from \"./core/flattened-tool-arguments.ts\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.ts\";\nexport {\n\tRUNTIME_INTERCOM_GROUP_ENV,\n\treadRuntimeIntercomGroup,\n\truntimeIntercomGroupEnvKey,\n} from \"./core/intercom-runtime-group.ts\";\nexport { convertToLlm } from \"./core/messages.ts\";\nexport type {\n\tModelFallbackFailureKind,\n\tModelFallbackFailureSignal,\n\tModelFallbackFailureSource,\n} from \"./core/model-fallback-failures.ts\";\nexport {\n\terrorMessage,\n\tisRetryableModelFailure,\n\tisRetryableSameModelFailure,\n\tmodelFailureMessage,\n\tnormalizeModelFailureSignal,\n} from \"./core/model-fallback-failures.ts\";\nexport { ModelRegistry } from \"./core/model-registry.ts\";\nexport {\n\ttype CreateModelRuntimeOptions,\n\tCredentialSynchronizationError,\n\ttype CredentialSynchronizationOperation,\n\tModelRuntime,\n\ttype ModelRuntimeAuthOverrides,\n} from \"./core/model-runtime.js\";\nexport type {\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.ts\";\nexport { DefaultPackageManager } from \"./core/package-manager.ts\";\nexport type {\n\tDefaultResourceLoaderInheritanceSnapshot,\n\tResourceCollision,\n\tResourceDiagnostic,\n\tResourceLoader,\n\tSkillCandidate,\n\tSkillCatalog,\n\tSkillCatalogCommand,\n\tSkillResolution,\n} from \"./core/resource-loader.ts\";\nexport {\n\tbuildSkillCatalog,\n\tDefaultResourceLoader,\n\tgetSkillCatalog,\n\tloadProjectContextFiles,\n} from \"./core/resource-loader.ts\";\nexport { nextRetryDecision, type RetryDecision, type RetryPolicySettings } from \"./core/retry-policy.ts\";\n// SDK for programmatic usage\nexport {\n\tAgentSessionRuntime,\n\ttype AgentSessionRuntimeDiagnostic,\n\ttype AgentSessionServices,\n\ttype CreateAgentSessionFromServicesOptions,\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\ttype CreateAgentSessionRuntimeFactory,\n\ttype CreateAgentSessionRuntimeResult,\n\ttype CreateAgentSessionServicesOptions,\n\t// Factory\n\tcreateAgentSession,\n\tcreateAgentSessionFromServices,\n\tcreateAgentSessionRuntime,\n\tcreateAgentSessionServices,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateLsTool,\n\tcreatePowerShellTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateSearchTool,\n\tcreateStructuredOutputCapture,\n\tcreateStructuredOutputTool,\n\tcreateWriteTool,\n\ttype JsonObject,\n\ttype JsonPrimitive,\n\ttype JsonValue,\n\ttype MessageEndEvent,\n\ttype MessageStartEvent,\n\ttype MessageUpdateEvent,\n\ttype PromptTemplate,\n\tSTRUCTURED_OUTPUT_TOOL_NAME,\n\ttype StructuredOutputCapture,\n\ttype StructuredOutputFileCapture,\n\ttype StructuredOutputToolOptions,\n\ttype ToolExecutionEndEvent,\n\ttype ToolExecutionStartEvent,\n\ttype ToolExecutionUpdateEvent,\n} from \"./core/sdk.ts\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildContextEntries,\n\tbuildSessionContext,\n\ttype CompactionEntry,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetLatestCompactionBoundaryEntry,\n\ttype ModelChangeEntry,\n\tmigrateSessionEntries,\n\ttype NewSessionOptions,\n\tparseSessionEntries,\n\ttype SessionContext,\n\ttype SessionEntry,\n\ttype SessionEntryBase,\n\ttype SessionHeader,\n\ttype SessionInfo,\n\ttype SessionInfoEntry,\n\tSessionManager,\n\ttype SessionMessageEntry,\n\ttype SessionNameState,\n\ttype SessionTreeNode,\n\ttype SessionWorkflowMetadata,\n\tsessionEntryToContextMessages,\n\ttype ThinkingLevelChangeEntry,\n} from \"./core/session-manager.ts\";\nexport {\n\tWORKFLOW_SESSION_METADATA_ENV,\n\tworkflowSessionMetadataFromEnv,\n} from \"./core/session-manager-classification.ts\";\nexport type { DefaultProjectTrust } from \"./core/settings-manager.ts\";\nexport {\n\ttype CompactionSettings,\n\ttype ImageSettings,\n\ttype PackageSource,\n\ttype RetrySettings,\n\tSettingsManager,\n\ttype SettingsManagerCreateOptions,\n} from \"./core/settings-manager.ts\";\n// Skills\nexport {\n\tformatSkillsForPrompt,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.ts\";\nexport { createSyntheticSourceInfo } from \"./core/source-info.ts\";\nexport { type EditDiffResult, generateDiffString, generateUnifiedPatch } from \"./core/tools/edit-diff.ts\";\n// Builtin tool definitions reusable by first-party extensions (e.g. workflows\n// invoking the structured ask_user_question UI deterministically).\n// Tools\nexport {\n\tBASH_SHELL_PRESENTATION,\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tbashToolSystemPromptContribution,\n\tcreateAskUserQuestionToolDefinition,\n\tcreateBashToolDefinition,\n\tcreateEditToolDefinition,\n\tcreateFindToolDefinition,\n\tcreateLocalBashOperations,\n\tcreateLocalPowerShellOperations,\n\tcreateLsToolDefinition,\n\tcreatePowerShellToolDefinition,\n\tcreateReadToolDefinition,\n\tcreateSearchToolDefinition,\n\tcreateWriteToolDefinition,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\teditToolSystemPromptContribution,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tfindToolSystemPromptContribution,\n\tformatSize,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\tlsToolSystemPromptContribution,\n\ttype PowerShellOperations,\n\ttype PowerShellSpawnContext,\n\ttype PowerShellSpawnHook,\n\ttype PowerShellToolDetails,\n\ttype PowerShellToolInput,\n\ttype PowerShellToolOptions,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\treadToolSystemPromptContribution,\n\ttype SearchToolDetails,\n\ttype SearchToolInput,\n\ttype SearchToolOptions,\n\ttype ShellToolPresentation,\n\tsearchToolSystemPromptContribution,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twithFileMutationQueue,\n\twriteToolSystemPromptContribution,\n} from \"./core/tools/index.ts\";\nexport {\n\thasProjectTrustInputs,\n\thasTrustRequiringProjectResources,\n\ttype ProjectTrustDecision,\n\tProjectTrustStore,\n\ttype ProjectTrustStoreEntry,\n\ttype ProjectTrustUpdate,\n\tTRUST_REQUIRING_PROJECT_CONFIG_RESOURCES,\n} from \"./core/trust-manager.ts\";\nexport { StringEnum, type StringEnumOptions } from \"./core/typebox-compat.ts\";\nexport * from \"./index-extensions.js\";\n// Main entry point\nexport { type MainOptions, main } from \"./main.ts\";\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype ModelInfo,\n\ttype PrintModeOptions,\n\tRpcClient,\n\ttype RpcClientOptions,\n\ttype RpcCommand,\n\ttype RpcEvent,\n\ttype RpcEventListener,\n\ttype RpcExtensionUIRequest,\n\ttype RpcExtensionUIResponse,\n\ttype RpcResponse,\n\ttype RpcSessionState,\n\trunPrintMode,\n\trunRpcMode,\n} from \"./modes/index.ts\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\ttype ChatMessageEntry,\n\ttype ChatMessageRenderOptions,\n\t// Internal host seam for bundled workflow stage chat; not yet a stable extension API.\n\tChatSessionHost,\n\ttype ChatSessionHostBashRequest,\n\ttype ChatSessionHostCommands,\n\ttype ChatSessionHostEntry,\n\ttype ChatSessionHostOpts,\n\ttype ChatSessionHostStyle,\n\ttype ChatSessionSubmitMode,\n\tChatTranscriptComponent,\n\ttype ChatTranscriptEntryLike,\n\ttype ChatTranscriptRenderer,\n\ttype ChatTranscriptRole,\n\tCustomEditor,\n\ttype CustomEditorOptions,\n\tCustomEntryComponent,\n\tCustomMessageComponent,\n\tchatEntriesFromAgentMessages,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\tFooterComponent,\n\tkeyHint,\n\tkeyHintIfBound,\n\tkeyText,\n\tLiveChatEntriesController,\n\tLoginDialogComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderChatMessageEntry,\n\trenderDiff,\n\tScrollableChatTranscriptComponent,\n\tScrollableComponentViewport,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTRANSCRIPT_JUMP_TO_END_URL,\n\tTranscriptFollowIndicator,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUsageMeterComponent,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n\tWorkingStatusComponent,\n\ttype WorkingStatusComponentOptions,\n} from \"./modes/interactive/components/index.ts\";\nexport {\n\tclassifyChatCommand,\n\tcreateSessionSkillAutocompleteProvider,\n\tgetSessionSkillCommands,\n} from \"./modes/interactive/skill-command-autocomplete.ts\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeColor,\n} from \"./modes/interactive/theme/theme.js\";\n// Run modes for programmatic SDK usage\nexport { pickWhimsicalWorkingMessage } from \"./modes/interactive/whimsical-messages.ts\";\nexport { createChildProcessEnvironment } from \"./utils/child-process.ts\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.ts\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.ts\";\nexport {\n\tisSafeFsWatchPathError,\n\tisUnsafeWindowsShortPath,\n\tresolveNativeWatchPath,\n\tSAFE_FS_WATCH_CANONICALIZATION_FAILED,\n\tSAFE_FS_WATCH_UNSAFE_WINDOWS_SHORT_PATH,\n\ttype SafeFsWatchErrorCode,\n\ttype SafeFsWatchPathError,\n\twatchWithErrorHandler,\n} from \"./utils/fs-watch.ts\";\nexport { createGitEnvironment, GIT_LOCAL_ENV_VARS } from \"./utils/git-env.ts\";\nexport { convertToPng } from \"./utils/image-convert.ts\";\nexport { formatDimensionNote, type ResizedImage, resizeImage } from \"./utils/image-resize.ts\";\nexport { INTERACTIVE_ENGINE_ENV_VARS, scrubInteractiveEngineEnv } from \"./utils/interactive-engine-env.ts\";\nexport { detectSupportedImageMimeTypeFromFile } from \"./utils/mime.ts\";\n// Shell utilities\nexport { getPowerShellConfig, getShellConfig } from \"./utils/shell.ts\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot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yBAAyB,EACzB,sBAAsB,EAEtB,0BAA0B,EAC1B,yBAAyB,EACzB,qBAAqB,EACrB,qBAAqB,EACrB,mBAAmB,EACnB,oBAAoB,EACpB,4BAA4B,EAE5B,sBAAsB,GAEtB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACN,mBAAmB,EACnB,sCAAsC,EACtC,uBAAuB,GACvB,MAAM,mDAAmD,CAAC;AAC3D,kDAAkD;AAClD,OAAO,EACN,mBAAmB,EACnB,gBAAgB,EAChB,kBAAkB,EAClB,oBAAoB,EACpB,aAAa,EACb,SAAS,EACT,KAAK,GAEL,MAAM,oCAAoC,CAAC;AAC5C,uCAAuC;AACvC,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EAAE,6BAA6B,EAAE,MAAM,0BAA0B,CAAC;AACzE,sBAAsB;AACtB,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EACN,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,qCAAqC,EACrC,uCAAuC,EAGvC,qBAAqB,GACrB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,oBAAoB,CAAC;AAC9E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAqB,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC3G,OAAO,EAAE,oCAAoC,EAAE,MAAM,iBAAiB,CAAC;AACvE,kBAAkB;AAClB,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC","sourcesContent":["// Internal trusted-host task integration (not model authority).\nexport { AgentTaskHost, type AgentTaskHostBinding, type AgentTaskRunnerFactory } from \"./core/tasks/agent-adapter.js\";\nexport type { AgentIntent, OperationId, TaskId, TaskResult, WaitPolicy } from \"./core/tasks/contracts.js\";\nexport { type AdmittedAgentTask, collectAgentTasks } from \"./core/tasks/execution-scope.js\";\nexport { bindOwnerTaskStore, getOwnerTaskStore, OwnerTaskStore } from \"./core/tasks/owner-store.js\";\nexport { renderTaskFooter, TaskList, taskListSections } from \"./modes/interactive/components/task-list.js\";\nexport { TaskRow } from \"./modes/interactive/components/task-row.js\";\nexport {\n\tapplyAssistantMessageDelta,\n\tbeginStreamingAssistantMessage,\n} from \"./modes/interactive/streaming-assistant-message.ts\";\n// Core session management\n\nexport { type Args, parseArgs } from \"./cli/args.ts\";\n// Config paths\nexport {\n\tAPP_NAME,\n\tAPP_TITLE,\n\tCONFIG_DIR_NAME,\n\tCONFIG_DIR_NAMES,\n\tgetAgentConfigPaths,\n\tgetAgentDir,\n\tgetAgentDirs,\n\tgetBundledInteractiveAssetPath,\n\tgetChangelogPath,\n\tgetDocsPath,\n\tgetEnvNames,\n\tgetEnvValue,\n\tgetExamplesPath,\n\tgetExportTemplateDir,\n\tgetInteractiveAssetsDir,\n\tgetLegacyAgentDir,\n\tgetPackageDir,\n\tgetPackageJsonPath,\n\tgetProjectConfigDirs,\n\tgetProjectConfigPaths,\n\tgetReadmePath,\n\tgetThemesDir,\n\tgetUserConfigDirs,\n\tgetUserConfigPaths,\n\thasEnvValue,\n\tisBunBinary,\n\tLEGACY_CONFIG_DIR_NAME,\n\tLEGACY_ENV_PREFIX,\n\tPACKAGE_NAME,\n\tsetEnvValue,\n\tVERSION,\n\tWORKFLOW_STAGE_SUBAGENT_GUARD_ENV,\n} from \"./config.js\";\nexport {\n\tAgentSession,\n\ttype AgentSessionConfig,\n\ttype AgentSessionEvent,\n\ttype AgentSessionEventListener,\n\ttype CompactionReason,\n\ttype ModelCycleResult,\n\ttype ParsedSkillBlock,\n\ttype PromptOptions,\n\tparseSkillBlock,\n\ttype SessionStats,\n} from \"./core/agent-session.js\";\n// Auth and model runtime\nexport { AuthStorage, readStoredCredential } from \"./core/auth-storage.ts\";\nexport {\n\ttype AuthStorageBackend,\n\tFileAuthStorageBackend,\n\tInMemoryAuthStorageBackend,\n} from \"./core/auth-storage-backends.ts\";\nexport { type BashResult, executeBashWithOperations } from \"./core/bash-executor.ts\";\nexport { getBuiltinPackagePaths } from \"./core/builtin-packages.ts\";\nexport {\n\ttype CallbackActivityDescriptor,\n\ttype CallbackActivityKind,\n\trunCallback,\n\trunSynchronousCallback,\n} from \"./core/callback-activity.ts\";\n// Cloudflare AI Gateway over the Workers AI binding (no API token; see docs/providers.md)\nexport {\n\ttype AiGatewayBinding,\n\ttype AiGatewayBindingGateway,\n\ttype AiGatewayUniversalRequestLike,\n\tCLOUDFLARE_GATEWAY_BINDING_AUTH_SENTINEL,\n\tcreateGatewayBindingFetch,\n\ttype GatewayBindingFetchOptions,\n} from \"./core/cloudflare-gateway-binding.ts\";\n// Compaction\nexport {\n\ttype BranchPreparation,\n\ttype BranchSummaryResult,\n\ttype CollectEntriesResult,\n\ttype CompactedTranscript,\n\ttype CompactionPlannerModel,\n\ttype CompactionPlanOptions,\n\ttype CompactionRung,\n\ttype CompactionRungResult,\n\ttype CompactionRunRequest,\n\ttype CompactionUrgency,\n\tcalculateContextTokens,\n\tcollectEntriesForBranchSummary,\n\tDEFAULT_COMPACTION_SETTINGS,\n\testimateTokens,\n\ttype FileOperations,\n\ttype GenerateBranchSummaryOptions,\n\tgenerateBranchSummary,\n\tgetLastAssistantUsage,\n\ttype LineRange,\n\ttype PlannerAuth,\n\ttype PlannerBudget,\n\ttype PlannerLimitClass,\n\ttype PlannerOutcome,\n\tprepareBranchEntries,\n\tprepareCompactionBoundary,\n\trunVerbatimCompaction,\n\tserializeConversation,\n\tserializeConversationForCompaction,\n\tshouldCompact,\n\tstartNewContextWindow,\n\ttype VerbatimCompactionDetails,\n\ttype VerbatimCompactionParameters,\n\ttype VerbatimCompactionPreparation,\n\ttype VerbatimCompactionResult,\n} from \"./core/compaction/index.ts\";\nexport { createEventBus, type EventBus, type EventBusController } from \"./core/event-bus.js\";\nexport { areExperimentalFeaturesEnabled } from \"./core/experimental.ts\";\nexport { sessionScopedExtensionState } from \"./core/extension-session-state.ts\";\nexport {\n\tgetModelFastRoute,\n\tresolveUpstreamModelId,\n\tusesChatGptCodexTransport,\n\tusesFirstPartyCodexRouting,\n\twithCodexFastRouteHeaders,\n\twithFastRouteStreamOptions,\n} from \"./core/fast-model-routing.ts\";\nexport {\n\tCODEX_FAST_ROUTE_HEADER,\n\tCODEX_FAST_ROUTE_ORIGINATOR,\n} from \"./core/fast-model-routing-transport.ts\";\nexport {\n\tcopilotAdvertisedFastModelIds,\n\tderiveFastModelVariants,\n\tFAST_MODEL_ID_SUFFIX,\n\tFAST_MODEL_SERVICE_TIER,\n\ttype FastModelVariantDerivation,\n\ttype FastModelVariantDiagnostic,\n\ttype FastModelVariantsOptions,\n\tfastModelId,\n\tisNativeFastRouteApi,\n\tusesOpenAIFastServiceTier,\n\twithFastModelVariants,\n} from \"./core/fast-model-variants.ts\";\nexport {\n\tparseFlattenedKeyPath,\n\treconstructFlattenedKeys,\n\tunflattenArgumentsWithSchema,\n} from \"./core/flattened-tool-arguments.ts\";\n// Footer data provider (git branch + extension statuses - data not otherwise available to extensions)\nexport type { ReadonlyFooterDataProvider } from \"./core/footer-data-provider.ts\";\nexport {\n\tRUNTIME_INTERCOM_GROUP_ENV,\n\treadRuntimeIntercomGroup,\n\truntimeIntercomGroupEnvKey,\n} from \"./core/intercom-runtime-group.ts\";\nexport { convertToLlm } from \"./core/messages.ts\";\nexport type {\n\tModelFallbackFailureKind,\n\tModelFallbackFailureSignal,\n\tModelFallbackFailureSource,\n} from \"./core/model-fallback-failures.ts\";\nexport {\n\terrorMessage,\n\tisRetryableModelFailure,\n\tisRetryableSameModelFailure,\n\tmodelFailureMessage,\n\tnormalizeModelFailureSignal,\n} from \"./core/model-fallback-failures.ts\";\nexport { ModelRegistry } from \"./core/model-registry.ts\";\nexport {\n\ttype CreateModelRuntimeOptions,\n\tCredentialSynchronizationError,\n\ttype CredentialSynchronizationOperation,\n\tModelRuntime,\n\ttype ModelRuntimeAuthOverrides,\n} from \"./core/model-runtime.js\";\nexport type {\n\tPackageManager,\n\tPathMetadata,\n\tProgressCallback,\n\tProgressEvent,\n\tResolvedPaths,\n\tResolvedResource,\n} from \"./core/package-manager.ts\";\nexport { DefaultPackageManager } from \"./core/package-manager.ts\";\nexport type {\n\tDefaultResourceLoaderInheritanceSnapshot,\n\tResourceCollision,\n\tResourceDiagnostic,\n\tResourceLoader,\n\tSkillCandidate,\n\tSkillCatalog,\n\tSkillCatalogCommand,\n\tSkillResolution,\n} from \"./core/resource-loader.ts\";\nexport {\n\tbuildSkillCatalog,\n\tDefaultResourceLoader,\n\tgetSkillCatalog,\n\tloadProjectContextFiles,\n} from \"./core/resource-loader.ts\";\nexport { nextRetryDecision, type RetryDecision, type RetryPolicySettings } from \"./core/retry-policy.ts\";\n// SDK for programmatic usage\nexport {\n\tAgentSessionRuntime,\n\ttype AgentSessionRuntimeDiagnostic,\n\ttype AgentSessionServices,\n\ttype CreateAgentSessionFromServicesOptions,\n\ttype CreateAgentSessionOptions,\n\ttype CreateAgentSessionResult,\n\ttype CreateAgentSessionRuntimeFactory,\n\ttype CreateAgentSessionRuntimeResult,\n\ttype CreateAgentSessionServicesOptions,\n\t// Factory\n\tcreateAgentSession,\n\tcreateAgentSessionFromServices,\n\tcreateAgentSessionRuntime,\n\tcreateAgentSessionServices,\n\tcreateBashTool,\n\t// Tool factories (for custom cwd)\n\tcreateCodingTools,\n\tcreateEditTool,\n\tcreateFindTool,\n\tcreateLsTool,\n\tcreatePowerShellTool,\n\tcreateReadOnlyTools,\n\tcreateReadTool,\n\tcreateSearchTool,\n\tcreateStructuredOutputCapture,\n\tcreateStructuredOutputTool,\n\tcreateWriteTool,\n\ttype JsonObject,\n\ttype JsonPrimitive,\n\ttype JsonValue,\n\ttype MessageEndEvent,\n\ttype MessageStartEvent,\n\ttype MessageUpdateEvent,\n\ttype PromptTemplate,\n\tSTRUCTURED_OUTPUT_TOOL_NAME,\n\ttype StructuredOutputCapture,\n\ttype StructuredOutputFileCapture,\n\ttype StructuredOutputToolOptions,\n\ttype ToolExecutionEndEvent,\n\ttype ToolExecutionStartEvent,\n\ttype ToolExecutionUpdateEvent,\n} from \"./core/sdk.ts\";\nexport {\n\ttype BranchSummaryEntry,\n\tbuildContextEntries,\n\tbuildSessionContext,\n\ttype CompactionEntry,\n\tCURRENT_SESSION_VERSION,\n\ttype CustomEntry,\n\ttype CustomMessageEntry,\n\ttype FileEntry,\n\tgetLatestCompactionBoundaryEntry,\n\ttype ModelChangeEntry,\n\tmigrateSessionEntries,\n\ttype NewSessionOptions,\n\tparseSessionEntries,\n\ttype SessionContext,\n\ttype SessionEntry,\n\ttype SessionEntryBase,\n\ttype SessionHeader,\n\ttype SessionInfo,\n\ttype SessionInfoEntry,\n\tSessionManager,\n\ttype SessionMessageEntry,\n\ttype SessionNameState,\n\ttype SessionTreeNode,\n\ttype SessionWorkflowMetadata,\n\tsessionEntryToContextMessages,\n\ttype ThinkingLevelChangeEntry,\n} from \"./core/session-manager.ts\";\nexport {\n\tWORKFLOW_SESSION_METADATA_ENV,\n\tworkflowSessionMetadataFromEnv,\n} from \"./core/session-manager-classification.ts\";\nexport type { DefaultProjectTrust } from \"./core/settings-manager.ts\";\nexport {\n\ttype CompactionModelOverride,\n\ttype CompactionSettings,\n\ttype ImageSettings,\n\ttype PackageSource,\n\ttype RetrySettings,\n\tSettingsManager,\n\ttype SettingsManagerCreateOptions,\n} from \"./core/settings-manager.ts\";\n// Skills\nexport {\n\tformatSkillsForPrompt,\n\ttype LoadSkillsFromDirOptions,\n\ttype LoadSkillsResult,\n\tloadSkills,\n\tloadSkillsFromDir,\n\ttype Skill,\n\ttype SkillFrontmatter,\n} from \"./core/skills.ts\";\nexport { createSyntheticSourceInfo } from \"./core/source-info.ts\";\nexport { type EditDiffResult, generateDiffString, generateUnifiedPatch } from \"./core/tools/edit-diff.ts\";\n// Builtin tool definitions reusable by first-party extensions (e.g. workflows\n// invoking the structured ask_user_question UI deterministically).\n// Tools\nexport {\n\tBASH_SHELL_PRESENTATION,\n\ttype BashOperations,\n\ttype BashSpawnContext,\n\ttype BashSpawnHook,\n\ttype BashToolDetails,\n\ttype BashToolInput,\n\ttype BashToolOptions,\n\tbashToolSystemPromptContribution,\n\tcreateAskUserQuestionToolDefinition,\n\tcreateBashToolDefinition,\n\tcreateEditToolDefinition,\n\tcreateFindToolDefinition,\n\tcreateKillTool,\n\tcreateKillToolDefinition,\n\tcreateLocalBashOperations,\n\tcreateLocalPowerShellOperations,\n\tcreateLsToolDefinition,\n\tcreatePowerShellToolDefinition,\n\tcreateReadToolDefinition,\n\tcreateSearchToolDefinition,\n\tcreateWriteToolDefinition,\n\tDEFAULT_MAX_BYTES,\n\tDEFAULT_MAX_LINES,\n\ttype EditOperations,\n\ttype EditToolDetails,\n\ttype EditToolInput,\n\ttype EditToolOptions,\n\teditToolSystemPromptContribution,\n\ttype FindOperations,\n\ttype FindToolDetails,\n\ttype FindToolInput,\n\ttype FindToolOptions,\n\tfindToolSystemPromptContribution,\n\tformatSize,\n\ttype KillToolOptions,\n\ttype LsOperations,\n\ttype LsToolDetails,\n\ttype LsToolInput,\n\ttype LsToolOptions,\n\tlsToolSystemPromptContribution,\n\ttype PowerShellOperations,\n\ttype PowerShellSpawnContext,\n\ttype PowerShellSpawnHook,\n\ttype PowerShellToolDetails,\n\ttype PowerShellToolInput,\n\ttype PowerShellToolOptions,\n\ttype ReadOperations,\n\ttype ReadToolDetails,\n\ttype ReadToolInput,\n\ttype ReadToolOptions,\n\treadToolSystemPromptContribution,\n\ttype SearchToolDetails,\n\ttype SearchToolInput,\n\ttype SearchToolOptions,\n\ttype ShellToolPresentation,\n\tsearchToolSystemPromptContribution,\n\ttype ToolsOptions,\n\ttype TruncationOptions,\n\ttype TruncationResult,\n\ttruncateHead,\n\ttruncateLine,\n\ttruncateTail,\n\ttype WriteOperations,\n\ttype WriteToolInput,\n\ttype WriteToolOptions,\n\twithFileMutationQueue,\n\twriteToolSystemPromptContribution,\n} from \"./core/tools/index.ts\";\nexport {\n\thasProjectTrustInputs,\n\thasTrustRequiringProjectResources,\n\ttype ProjectTrustDecision,\n\tProjectTrustStore,\n\ttype ProjectTrustStoreEntry,\n\ttype ProjectTrustUpdate,\n\tTRUST_REQUIRING_PROJECT_CONFIG_RESOURCES,\n} from \"./core/trust-manager.ts\";\nexport { StringEnum, type StringEnumOptions } from \"./core/typebox-compat.ts\";\nexport * from \"./index-extensions.js\";\n// Main entry point\nexport { type MainOptions, main } from \"./main.ts\";\nexport {\n\tInteractiveMode,\n\ttype InteractiveModeOptions,\n\ttype ModelInfo,\n\ttype PrintModeOptions,\n\tRpcClient,\n\ttype RpcClientOptions,\n\ttype RpcCommand,\n\ttype RpcEvent,\n\ttype RpcEventListener,\n\ttype RpcExtensionUIRequest,\n\ttype RpcExtensionUIResponse,\n\ttype RpcResponse,\n\ttype RpcSessionState,\n\trunPrintMode,\n\trunRpcMode,\n} from \"./modes/index.ts\";\n// UI components for extensions\nexport {\n\tArminComponent,\n\tAssistantMessageComponent,\n\tBashExecutionComponent,\n\tBorderedLoader,\n\tBranchSummaryMessageComponent,\n\ttype ChatMessageEntry,\n\ttype ChatMessageRenderOptions,\n\t// Internal host seam for bundled workflow stage chat; not yet a stable extension API.\n\tChatSessionHost,\n\ttype ChatSessionHostBashRequest,\n\ttype ChatSessionHostCommands,\n\ttype ChatSessionHostEntry,\n\ttype ChatSessionHostOpts,\n\ttype ChatSessionHostStyle,\n\ttype ChatSessionSubmitMode,\n\tChatTranscriptComponent,\n\ttype ChatTranscriptEntryLike,\n\ttype ChatTranscriptRenderer,\n\ttype ChatTranscriptRole,\n\tCustomEditor,\n\ttype CustomEditorOptions,\n\tCustomEntryComponent,\n\tCustomMessageComponent,\n\tchatEntriesFromAgentMessages,\n\tDynamicBorder,\n\tExtensionEditorComponent,\n\tExtensionInputComponent,\n\tExtensionSelectorComponent,\n\tFooterComponent,\n\tkeyHint,\n\tkeyHintIfBound,\n\tkeyText,\n\tLiveChatEntriesController,\n\tLoginDialogComponent,\n\tModelSelectorComponent,\n\tOAuthSelectorComponent,\n\ttype RenderDiffOptions,\n\trawKeyHint,\n\trenderChatMessageEntry,\n\trenderDiff,\n\tScrollableChatTranscriptComponent,\n\tScrollableComponentViewport,\n\tSessionSelectorComponent,\n\ttype SettingsCallbacks,\n\ttype SettingsConfig,\n\tSettingsSelectorComponent,\n\tShowImagesSelectorComponent,\n\tSkillInvocationMessageComponent,\n\tThemeSelectorComponent,\n\tThinkingSelectorComponent,\n\tToolExecutionComponent,\n\ttype ToolExecutionOptions,\n\tTRANSCRIPT_JUMP_TO_END_URL,\n\tTranscriptFollowIndicator,\n\tTreeSelectorComponent,\n\ttruncateToVisualLines,\n\tUsageMeterComponent,\n\tUserMessageComponent,\n\tUserMessageSelectorComponent,\n\ttype VisualTruncateResult,\n\tWorkingStatusComponent,\n\ttype WorkingStatusComponentOptions,\n} from \"./modes/interactive/components/index.ts\";\nexport {\n\tclassifyChatCommand,\n\tcreateSessionSkillAutocompleteProvider,\n\tgetSessionSkillCommands,\n} from \"./modes/interactive/skill-command-autocomplete.ts\";\n// Theme utilities for custom tools and extensions\nexport {\n\tgetLanguageFromPath,\n\tgetMarkdownTheme,\n\tgetSelectListTheme,\n\tgetSettingsListTheme,\n\thighlightCode,\n\tinitTheme,\n\tTheme,\n\ttype ThemeColor,\n} from \"./modes/interactive/theme/theme.js\";\n// Run modes for programmatic SDK usage\nexport { pickWhimsicalWorkingMessage } from \"./modes/interactive/whimsical-messages.ts\";\nexport { createChildProcessEnvironment } from \"./utils/child-process.ts\";\n// Clipboard utilities\nexport { copyToClipboard } from \"./utils/clipboard.ts\";\nexport { parseFrontmatter, stripFrontmatter } from \"./utils/frontmatter.ts\";\nexport {\n\tisSafeFsWatchPathError,\n\tisUnsafeWindowsShortPath,\n\tresolveNativeWatchPath,\n\tSAFE_FS_WATCH_CANONICALIZATION_FAILED,\n\tSAFE_FS_WATCH_UNSAFE_WINDOWS_SHORT_PATH,\n\ttype SafeFsWatchErrorCode,\n\ttype SafeFsWatchPathError,\n\twatchWithErrorHandler,\n} from \"./utils/fs-watch.ts\";\nexport { createGitEnvironment, GIT_LOCAL_ENV_VARS } from \"./utils/git-env.ts\";\nexport { convertToPng } from \"./utils/image-convert.ts\";\nexport { formatDimensionNote, type ResizedImage, resizeImage } from \"./utils/image-resize.ts\";\nexport { INTERACTIVE_ENGINE_ENV_VARS, scrubInteractiveEngineEnv } from \"./utils/interactive-engine-env.ts\";\nexport { detectSupportedImageMimeTypeFromFile } from \"./utils/mime.ts\";\n// Shell utilities\nexport { getPowerShellConfig, getShellConfig } from \"./utils/shell.ts\";\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"task-row.d.ts","sourceRoot":"","sources":["../../../../src/modes/interactive/components/task-row.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,wBAAwB,CAAC;AAEzE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACnE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAIvE,0FAA0F;AAC1F,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEpD;AACD,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAKlD;AACD,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAElD;AACD,wBAAgB,SAAS,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,CAElD;AACD,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,GAAG,UAAU,CAAC,GAAG,MAAM,CAO3F;AACD,wBAAgB,WAAW,CAAC,IAAI,EAAE,UAAU,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AAG;IACrB,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,CAmF9B;CACD"}
@@ -8,6 +8,11 @@ export function taskDisplayText(text) {
8
8
  return text.replace(/\x1b\[[0-?]*[ -/]*[@-~]/g, "").replace(/[\x00-\x1f\x7f-\x9f]/g, " ");
9
9
  }
10
10
  export function taskState(task) {
11
+ if (task.kind === "agent" &&
12
+ task.execution.kind === "settled" &&
13
+ task.execution.result.kind === "cancelled" &&
14
+ task.execution.result.cause === "user")
15
+ return "killed";
11
16
  if (task.execution.kind === "settled")
12
17
  return taskOutcomeStatus(task.execution.result, task.kind);
13
18
  if (task.execution.kind === "cancelling")
@@ -41,6 +46,8 @@ export function taskStatusAppearance(task) {
41
46
  return { label: "Completed", icon: "✓", color: "success" };
42
47
  case "failed":
43
48
  return { label: "Failed", icon: "✗", color: "error" };
49
+ case "killed":
50
+ return { label: "Killed (non-resumable)", icon: "■", color: "warning" };
44
51
  case "cancelled":
45
52
  return { label: "Stopped", icon: "✗", color: "warning" };
46
53
  case "cancelling":
@@ -77,7 +84,7 @@ export class TaskRow {
77
84
  const index = group?.findIndex((item) => item.ref.taskId === task.ref.taskId) ?? -1;
78
85
  const grouped = group !== undefined && index >= 0;
79
86
  const rowWidth = Math.max(1, width - (grouped ? 2 : 0));
80
- const state = taskState(task);
87
+ const state = taskState(task) === "killed" ? "killed (non-resumable)" : taskState(task);
81
88
  const live = task.execution.kind === "running" || task.execution.kind === "queued";
82
89
  const badge = live && task.observation.kind !== "none" ? ` · ${task.observation.kind}` : "";
83
90
  const { icon: glyph, color } = taskStatusAppearance(task);
@@ -1 +1 @@
1
- {"version":3,"file":"task-row.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/task-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAkB,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uC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I;QAAE,KAAK,CAAC,IAAI,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC;IACjD,OAAO,KAAK,CAAC;AACd,CAAC","sourcesContent":["import { createHash } from \"node:crypto\";\nimport { type Component, truncateToWidth } from \"@earendil-works/pi-tui\";\nimport { taskOutcomeStatus } from \"../../../core/tasks/command-output.js\";\nimport type { TaskRecord } from \"../../../core/tasks/contracts.js\";\nimport type { TaskActivity } from \"../../../core/tasks/owner-store.js\";\nimport { theme } from \"../theme/theme.js\";\nimport { keyHintIfBound as keyHint } from \"./keybinding-hints.js\";\n\n/** Control removal and truncation apply only to terminal display, never task identity. */\nexport function taskDisplayText(text: string): string {\n\treturn text.replace(/\\x1b\\[[0-?]*[ -/]*[@-~]/g, \"\").replace(/[\\x00-\\x1f\\x7f-\\x9f]/g, \" \");\n}\nexport function taskState(task: TaskRecord): string {\n\tif (task.execution.kind === \"settled\") return taskOutcomeStatus(task.execution.result, task.kind);\n\tif (task.execution.kind === \"cancelling\") return \"cancelling\";\n\tif (task.attention.kind === \"input-needed\") return \"input-needed\";\n\treturn task.execution.kind;\n}\nexport function taskLabel(task: TaskRecord): string {\n\treturn task.kind === \"command\" ? \"bash\" : (task.agentName ?? \"agent\");\n}\nexport function taskTitle(task: TaskRecord): string {\n\treturn task.title || taskLabel(task);\n}\nexport function taskModelText(task: Pick<TaskRecord, \"kind\" | \"model\" | \"thinking\">): string {\n\tif (task.kind !== \"agent\") return \"\";\n\treturn taskDisplayText(\n\t\t[task.model ?? \"model unavailable\", task.thinking ? `thinking ${task.thinking}` : \"thinking unavailable\"].join(\n\t\t\t\" · \",\n\t\t),\n\t);\n}\nexport function taskShortId(task: TaskRecord): string {\n\treturn createHash(\"sha256\").update(task.ref.taskId).digest(\"hex\").slice(0, 6);\n}\nexport function taskDuration(milliseconds: number): string {\n\tconst seconds = Math.max(0, Math.floor(milliseconds / 1000));\n\treturn seconds < 60 ? `${seconds}s` : `${Math.floor(seconds / 60)}m ${seconds % 60}s`;\n}\n\n/** One semantic status palette for inline rows, lists and detail headers. */\nexport function taskStatusAppearance(task: TaskRecord): {\n\tlabel: string;\n\ticon: string;\n\tcolor: \"accent\" | \"success\" | \"error\" | \"warning\" | \"muted\";\n} {\n\tswitch (taskState(task)) {\n\t\tcase \"completed\":\n\t\t\treturn { label: \"Completed\", icon: \"✓\", color: \"success\" };\n\t\tcase \"failed\":\n\t\t\treturn { label: \"Failed\", icon: \"✗\", color: \"error\" };\n\t\tcase \"cancelled\":\n\t\t\treturn { label: \"Stopped\", icon: \"✗\", color: \"warning\" };\n\t\tcase \"cancelling\":\n\t\t\treturn { label: \"Stopping\", icon: \"!\", color: \"warning\" };\n\t\tcase \"input-needed\":\n\t\t\treturn { label: \"Input needed\", icon: \"?\", color: \"warning\" };\n\t\tcase \"queued\":\n\t\t\treturn { label: \"Queued\", icon: \"○\", color: \"muted\" };\n\t\tdefault:\n\t\t\treturn { label: \"Running\", icon: \"∀\", color: \"accent\" };\n\t}\n}\n\nexport function taskMetricsText(task: TaskRecord): string {\n\tconst metrics = task.metrics;\n\treturn [\n\t\tmetrics?.elapsedMs === undefined ? \"\" : taskDuration(metrics.elapsedMs),\n\t\tmetrics?.tokenCount === undefined ? \"\" : `${metrics.tokenCount.toLocaleString(\"en-US\")} tokens`,\n\t\tmetrics?.toolCount === undefined ? \"\" : `${metrics.toolCount} ${metrics.toolCount === 1 ? \"tool\" : \"tools\"}`,\n\t]\n\t\t.filter(Boolean)\n\t\t.join(\" · \");\n}\nexport type TaskRowOptions = {\n\texpanded?: boolean;\n\tduplicate?: boolean;\n\thint?: boolean;\n\tsiblings?: readonly TaskRecord[];\n\tactivity?: readonly TaskActivity[];\n\tactivityOmitted?: boolean;\n};\nexport class TaskRow implements Component {\n\tprivate readonly task: TaskRecord;\n\tprivate readonly options: TaskRowOptions;\n\tconstructor(task: TaskRecord, options: TaskRowOptions = {}) {\n\t\tthis.task = task;\n\t\tthis.options = options;\n\t}\n\tinvalidate(): void {}\n\trender(width: number): string[] {\n\t\tconst task = this.task;\n\t\tconst group = task.launchGroupId\n\t\t\t? this.options.siblings?.filter((item) => item.launchGroupId === task.launchGroupId)\n\t\t\t: undefined;\n\t\tconst index = group?.findIndex((item) => item.ref.taskId === task.ref.taskId) ?? -1;\n\t\tconst grouped = group !== undefined && index >= 0;\n\t\tconst rowWidth = Math.max(1, width - (grouped ? 2 : 0));\n\t\tconst state = taskState(task);\n\t\tconst live = task.execution.kind === \"running\" || task.execution.kind === \"queued\";\n\t\tconst badge = live && task.observation.kind !== \"none\" ? ` · ${task.observation.kind}` : \"\";\n\t\tconst { icon: glyph, color } = taskStatusAppearance(task);\n\t\tconst displayLabel = (item: TaskRecord) =>\n\t\t\ttruncateToWidth(\n\t\t\t\t`${taskDisplayText(taskLabel(item))}: ${taskDisplayText(taskTitle(item))}`,\n\t\t\t\tMath.max(1, rowWidth - 2),\n\t\t\t);\n\t\tconst duplicate =\n\t\t\tthis.options.duplicate ||\n\t\t\tthis.options.siblings?.some(\n\t\t\t\t(item) => item.ref.taskId !== task.ref.taskId && displayLabel(item) === displayLabel(task),\n\t\t\t);\n\t\tconst suffix = duplicate ? ` [${taskShortId(task)}]` : \"\";\n\t\tconst title =\n\t\t\ttheme.fg(color, glyph) +\n\t\t\t\" \" +\n\t\t\ttheme.bold(taskDisplayText(taskLabel(task))) +\n\t\t\ttheme.fg(\"muted\", `: ${taskDisplayText(taskTitle(task))}`);\n\t\tconst lines = [truncateToWidth(title, Math.max(1, rowWidth - suffix.length)) + theme.fg(\"dim\", suffix)];\n\t\tif (task.kind === \"agent\") lines.push(theme.fg(\"dim\", truncateToWidth(` ${taskModelText(task)}`, rowWidth)));\n\t\tconst action =\n\t\t\tlive && task.currentAction\n\t\t\t\t? ` · ${taskDisplayText(task.currentAction.tool)} ${taskDisplayText(task.currentAction.text)}`\n\t\t\t\t: \"\";\n\t\tconst tools = task.metrics?.toolCount === undefined ? \"\" : ` · ${task.metrics.toolCount} tool uses`;\n\t\tconst duration = task.metrics?.elapsedMs === undefined ? \"\" : ` · ${taskDuration(task.metrics.elapsedMs)}`;\n\t\tlines.push(theme.fg(\"dim\", truncateToWidth(` ${state}${badge}${tools}${duration}${action}`, width)));\n\t\tif (this.options.expanded) {\n\t\t\tlines.push(theme.fg(\"dim\", truncateToWidth(` ${task.ref.taskId} · owner ${task.ref.ownerId}`, width)));\n\t\t\tif (task.metrics?.tokenCount !== undefined) lines.push(theme.fg(\"dim\", ` ${task.metrics.tokenCount} tokens`));\n\t\t\tlines.push(\" Activity\");\n\t\t\tif (this.options.activityOmitted) lines.push(theme.fg(\"dim\", \" Earlier activity omitted\"));\n\t\t\tconst retained = retainedActivityLines(this.options.activity ?? []);\n\t\t\tif (retained.length) lines.push(...retained.map((text) => theme.fg(\"dim\", ` ${taskDisplayText(text)}`)));\n\t\t\telse\n\t\t\t\tlines.push(\n\t\t\t\t\ttheme.fg(\n\t\t\t\t\t\t\"dim\",\n\t\t\t\t\t\ttask.currentAction\n\t\t\t\t\t\t\t? ` ${taskDisplayText(task.currentAction.tool)} ${taskDisplayText(task.currentAction.text)}`\n\t\t\t\t\t\t\t: \" No retained activity\",\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\tlines.push(theme.fg(\"dim\", \" /tasks to inspect transcript and task details\"));\n\t\t\tif (task.execution.kind === \"settled\" && task.execution.result.kind === \"failed\")\n\t\t\t\tlines.push(truncateToWidth(` ${taskDisplayText(task.execution.result.message)}`, width));\n\t\t}\n\t\tconst rendered = lines.map(\n\t\t\t(line, row) =>\n\t\t\t\t(grouped ? theme.fg(\"dim\", row === 0 ? (index === group.length - 1 ? \"└─\" : \"├─\") : \" \") : \"\") +\n\t\t\t\ttruncateToWidth(line, rowWidth),\n\t\t);\n\t\tif (grouped && index === 0) {\n\t\t\tconst labels = new Set(group.map(taskLabel));\n\t\t\tconst counts = new Map<string, number>();\n\t\t\tfor (const sibling of group) {\n\t\t\t\tconst state = taskState(sibling);\n\t\t\t\tcounts.set(state, (counts.get(state) ?? 0) + 1);\n\t\t\t}\n\t\t\trendered.unshift(\n\t\t\t\ttheme.bold(\n\t\t\t\t\ttruncateToWidth(\n\t\t\t\t\t\t`${labels.size === 1 ? taskDisplayText(taskLabel(task)) : \"Tasks\"} · ${[...counts].map(([state, count]) => `${count} ${state}`).join(\" · \")}`,\n\t\t\t\t\t\twidth,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\tif (this.options.hint !== false && (!grouped || index === group.length - 1)) {\n\t\t\tconst hint = keyHint(\"app.tools.expand\", this.options.expanded ? \"collapse\" : \"expand\");\n\t\t\tif (hint) rendered.push(theme.fg(\"dim\", hint));\n\t\t}\n\t\treturn rendered.map((line) => truncateToWidth(line, width));\n\t}\n}\n\nfunction retainedActivityLines(activity: readonly TaskActivity[]): string[] {\n\tconst lines: string[] = [];\n\tconst decoder = new TextDecoder();\n\tfor (const { report } of activity) {\n\t\tconst change = report.change;\n\t\tif (change.kind === \"action\") lines.push(`${change.tool} ${change.text}`);\n\t\telse if (change.kind === \"output\") {\n\t\t\tconst text = decoder.decode(Buffer.from(change.bytesBase64, \"base64\"), { stream: true });\n\t\t\tif (text) lines.push(`Retained output: ${text}`);\n\t\t} else if (change.kind === \"attention-set\" && change.attention.kind === \"input-needed\")\n\t\t\tlines.push(`Input needed: ${change.attention.prompt}`);\n\t}\n\tconst tail = decoder.decode();\n\tif (tail) lines.push(`Retained output: ${tail}`);\n\treturn lines;\n}\n"]}
1
+ {"version":3,"file":"task-row.js","sourceRoot":"","sources":["../../../../src/modes/interactive/components/task-row.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAkB,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAG1E,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,cAAc,IAAI,OAAO,EAAE,M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KAAK,CAAC,IAAI,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC;QAClD,CAAC;aAAM,IAAI,MAAM,CAAC,IAAI,KAAK,eAAe,IAAI,MAAM,CAAC,SAAS,CAAC,IAAI,KAAK,cAAc;YACrF,KAAK,CAAC,IAAI,CAAC,iBAAiB,MAAM,CAAC,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC;IACzD,CAAC;IACD,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IAC9B,IAAI,IAAI;QAAE,KAAK,CAAC,IAAI,CAAC,oBAAoB,IAAI,EAAE,CAAC,CAAC;IACjD,OAAO,KAAK,CAAC;AACd,CAAC","sourcesContent":["import { createHash } from \"node:crypto\";\nimport { type Component, truncateToWidth } from \"@earendil-works/pi-tui\";\nimport { taskOutcomeStatus } from \"../../../core/tasks/command-output.js\";\nimport type { TaskRecord } from \"../../../core/tasks/contracts.js\";\nimport type { TaskActivity } from \"../../../core/tasks/owner-store.js\";\nimport { theme } from \"../theme/theme.js\";\nimport { keyHintIfBound as keyHint } from \"./keybinding-hints.js\";\n\n/** Control removal and truncation apply only to terminal display, never task identity. */\nexport function taskDisplayText(text: string): string {\n\treturn text.replace(/\\x1b\\[[0-?]*[ -/]*[@-~]/g, \"\").replace(/[\\x00-\\x1f\\x7f-\\x9f]/g, \" \");\n}\nexport function taskState(task: TaskRecord): string {\n\tif (\n\t\ttask.kind === \"agent\" &&\n\t\ttask.execution.kind === \"settled\" &&\n\t\ttask.execution.result.kind === \"cancelled\" &&\n\t\ttask.execution.result.cause === \"user\"\n\t)\n\t\treturn \"killed\";\n\tif (task.execution.kind === \"settled\") return taskOutcomeStatus(task.execution.result, task.kind);\n\tif (task.execution.kind === \"cancelling\") return \"cancelling\";\n\tif (task.attention.kind === \"input-needed\") return \"input-needed\";\n\treturn task.execution.kind;\n}\nexport function taskLabel(task: TaskRecord): string {\n\treturn task.kind === \"command\" ? \"bash\" : (task.agentName ?? \"agent\");\n}\nexport function taskTitle(task: TaskRecord): string {\n\treturn task.title || taskLabel(task);\n}\nexport function taskModelText(task: Pick<TaskRecord, \"kind\" | \"model\" | \"thinking\">): string {\n\tif (task.kind !== \"agent\") return \"\";\n\treturn taskDisplayText(\n\t\t[task.model ?? \"model unavailable\", task.thinking ? `thinking ${task.thinking}` : \"thinking unavailable\"].join(\n\t\t\t\" · \",\n\t\t),\n\t);\n}\nexport function taskShortId(task: TaskRecord): string {\n\treturn createHash(\"sha256\").update(task.ref.taskId).digest(\"hex\").slice(0, 6);\n}\nexport function taskDuration(milliseconds: number): string {\n\tconst seconds = Math.max(0, Math.floor(milliseconds / 1000));\n\treturn seconds < 60 ? `${seconds}s` : `${Math.floor(seconds / 60)}m ${seconds % 60}s`;\n}\n\n/** One semantic status palette for inline rows, lists and detail headers. */\nexport function taskStatusAppearance(task: TaskRecord): {\n\tlabel: string;\n\ticon: string;\n\tcolor: \"accent\" | \"success\" | \"error\" | \"warning\" | \"muted\";\n} {\n\tswitch (taskState(task)) {\n\t\tcase \"completed\":\n\t\t\treturn { label: \"Completed\", icon: \"✓\", color: \"success\" };\n\t\tcase \"failed\":\n\t\t\treturn { label: \"Failed\", icon: \"✗\", color: \"error\" };\n\t\tcase \"killed\":\n\t\t\treturn { label: \"Killed (non-resumable)\", icon: \"■\", color: \"warning\" };\n\t\tcase \"cancelled\":\n\t\t\treturn { label: \"Stopped\", icon: \"✗\", color: \"warning\" };\n\t\tcase \"cancelling\":\n\t\t\treturn { label: \"Stopping\", icon: \"!\", color: \"warning\" };\n\t\tcase \"input-needed\":\n\t\t\treturn { label: \"Input needed\", icon: \"?\", color: \"warning\" };\n\t\tcase \"queued\":\n\t\t\treturn { label: \"Queued\", icon: \"○\", color: \"muted\" };\n\t\tdefault:\n\t\t\treturn { label: \"Running\", icon: \"∀\", color: \"accent\" };\n\t}\n}\n\nexport function taskMetricsText(task: TaskRecord): string {\n\tconst metrics = task.metrics;\n\treturn [\n\t\tmetrics?.elapsedMs === undefined ? \"\" : taskDuration(metrics.elapsedMs),\n\t\tmetrics?.tokenCount === undefined ? \"\" : `${metrics.tokenCount.toLocaleString(\"en-US\")} tokens`,\n\t\tmetrics?.toolCount === undefined ? \"\" : `${metrics.toolCount} ${metrics.toolCount === 1 ? \"tool\" : \"tools\"}`,\n\t]\n\t\t.filter(Boolean)\n\t\t.join(\" · \");\n}\nexport type TaskRowOptions = {\n\texpanded?: boolean;\n\tduplicate?: boolean;\n\thint?: boolean;\n\tsiblings?: readonly TaskRecord[];\n\tactivity?: readonly TaskActivity[];\n\tactivityOmitted?: boolean;\n};\nexport class TaskRow implements Component {\n\tprivate readonly task: TaskRecord;\n\tprivate readonly options: TaskRowOptions;\n\tconstructor(task: TaskRecord, options: TaskRowOptions = {}) {\n\t\tthis.task = task;\n\t\tthis.options = options;\n\t}\n\tinvalidate(): void {}\n\trender(width: number): string[] {\n\t\tconst task = this.task;\n\t\tconst group = task.launchGroupId\n\t\t\t? this.options.siblings?.filter((item) => item.launchGroupId === task.launchGroupId)\n\t\t\t: undefined;\n\t\tconst index = group?.findIndex((item) => item.ref.taskId === task.ref.taskId) ?? -1;\n\t\tconst grouped = group !== undefined && index >= 0;\n\t\tconst rowWidth = Math.max(1, width - (grouped ? 2 : 0));\n\t\tconst state = taskState(task) === \"killed\" ? \"killed (non-resumable)\" : taskState(task);\n\t\tconst live = task.execution.kind === \"running\" || task.execution.kind === \"queued\";\n\t\tconst badge = live && task.observation.kind !== \"none\" ? ` · ${task.observation.kind}` : \"\";\n\t\tconst { icon: glyph, color } = taskStatusAppearance(task);\n\t\tconst displayLabel = (item: TaskRecord) =>\n\t\t\ttruncateToWidth(\n\t\t\t\t`${taskDisplayText(taskLabel(item))}: ${taskDisplayText(taskTitle(item))}`,\n\t\t\t\tMath.max(1, rowWidth - 2),\n\t\t\t);\n\t\tconst duplicate =\n\t\t\tthis.options.duplicate ||\n\t\t\tthis.options.siblings?.some(\n\t\t\t\t(item) => item.ref.taskId !== task.ref.taskId && displayLabel(item) === displayLabel(task),\n\t\t\t);\n\t\tconst suffix = duplicate ? ` [${taskShortId(task)}]` : \"\";\n\t\tconst title =\n\t\t\ttheme.fg(color, glyph) +\n\t\t\t\" \" +\n\t\t\ttheme.bold(taskDisplayText(taskLabel(task))) +\n\t\t\ttheme.fg(\"muted\", `: ${taskDisplayText(taskTitle(task))}`);\n\t\tconst lines = [truncateToWidth(title, Math.max(1, rowWidth - suffix.length)) + theme.fg(\"dim\", suffix)];\n\t\tif (task.kind === \"agent\") lines.push(theme.fg(\"dim\", truncateToWidth(` ${taskModelText(task)}`, rowWidth)));\n\t\tconst action =\n\t\t\tlive && task.currentAction\n\t\t\t\t? ` · ${taskDisplayText(task.currentAction.tool)} ${taskDisplayText(task.currentAction.text)}`\n\t\t\t\t: \"\";\n\t\tconst tools = task.metrics?.toolCount === undefined ? \"\" : ` · ${task.metrics.toolCount} tool uses`;\n\t\tconst duration = task.metrics?.elapsedMs === undefined ? \"\" : ` · ${taskDuration(task.metrics.elapsedMs)}`;\n\t\tlines.push(theme.fg(\"dim\", truncateToWidth(` ${state}${badge}${tools}${duration}${action}`, width)));\n\t\tif (this.options.expanded) {\n\t\t\tlines.push(theme.fg(\"dim\", truncateToWidth(` ${task.ref.taskId} · owner ${task.ref.ownerId}`, width)));\n\t\t\tif (task.metrics?.tokenCount !== undefined) lines.push(theme.fg(\"dim\", ` ${task.metrics.tokenCount} tokens`));\n\t\t\tlines.push(\" Activity\");\n\t\t\tif (this.options.activityOmitted) lines.push(theme.fg(\"dim\", \" Earlier activity omitted\"));\n\t\t\tconst retained = retainedActivityLines(this.options.activity ?? []);\n\t\t\tif (retained.length) lines.push(...retained.map((text) => theme.fg(\"dim\", ` ${taskDisplayText(text)}`)));\n\t\t\telse\n\t\t\t\tlines.push(\n\t\t\t\t\ttheme.fg(\n\t\t\t\t\t\t\"dim\",\n\t\t\t\t\t\ttask.currentAction\n\t\t\t\t\t\t\t? ` ${taskDisplayText(task.currentAction.tool)} ${taskDisplayText(task.currentAction.text)}`\n\t\t\t\t\t\t\t: \" No retained activity\",\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\tlines.push(theme.fg(\"dim\", \" /tasks to inspect transcript and task details\"));\n\t\t\tif (task.execution.kind === \"settled\" && task.execution.result.kind === \"failed\")\n\t\t\t\tlines.push(truncateToWidth(` ${taskDisplayText(task.execution.result.message)}`, width));\n\t\t}\n\t\tconst rendered = lines.map(\n\t\t\t(line, row) =>\n\t\t\t\t(grouped ? theme.fg(\"dim\", row === 0 ? (index === group.length - 1 ? \"└─\" : \"├─\") : \" \") : \"\") +\n\t\t\t\ttruncateToWidth(line, rowWidth),\n\t\t);\n\t\tif (grouped && index === 0) {\n\t\t\tconst labels = new Set(group.map(taskLabel));\n\t\t\tconst counts = new Map<string, number>();\n\t\t\tfor (const sibling of group) {\n\t\t\t\tconst state = taskState(sibling);\n\t\t\t\tcounts.set(state, (counts.get(state) ?? 0) + 1);\n\t\t\t}\n\t\t\trendered.unshift(\n\t\t\t\ttheme.bold(\n\t\t\t\t\ttruncateToWidth(\n\t\t\t\t\t\t`${labels.size === 1 ? taskDisplayText(taskLabel(task)) : \"Tasks\"} · ${[...counts].map(([state, count]) => `${count} ${state}`).join(\" · \")}`,\n\t\t\t\t\t\twidth,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\tif (this.options.hint !== false && (!grouped || index === group.length - 1)) {\n\t\t\tconst hint = keyHint(\"app.tools.expand\", this.options.expanded ? \"collapse\" : \"expand\");\n\t\t\tif (hint) rendered.push(theme.fg(\"dim\", hint));\n\t\t}\n\t\treturn rendered.map((line) => truncateToWidth(line, width));\n\t}\n}\n\nfunction retainedActivityLines(activity: readonly TaskActivity[]): string[] {\n\tconst lines: string[] = [];\n\tconst decoder = new TextDecoder();\n\tfor (const { report } of activity) {\n\t\tconst change = report.change;\n\t\tif (change.kind === \"action\") lines.push(`${change.tool} ${change.text}`);\n\t\telse if (change.kind === \"output\") {\n\t\t\tconst text = decoder.decode(Buffer.from(change.bytesBase64, \"base64\"), { stream: true });\n\t\t\tif (text) lines.push(`Retained output: ${text}`);\n\t\t} else if (change.kind === \"attention-set\" && change.attention.kind === \"input-needed\")\n\t\t\tlines.push(`Input needed: ${change.attention.prompt}`);\n\t}\n\tconst tail = decoder.decode();\n\tif (tail) lines.push(`Retained output: ${tail}`);\n\treturn lines;\n}\n"]}
@@ -35,7 +35,7 @@ The agent can choose foreground-first or background observation for each authori
35
35
 
36
36
  If the task finishes during observation, the call returns its terminal result instead. Automatic backgrounding is **observation expiry**, not a slow-task failure, a restart, or a second execution. Use foreground-first observation for a dependency and background observation for independent work. If a dependency yields, wait for its actual completion before using the result.
37
37
 
38
- Shell `budgetMs` accepts finite non-negative milliseconds; zero means no observation delay. It is only valid for foreground observation. A trusted SDK host can override the usual budgets or select `tasks.wait.kind: "until-settled"`; omitted foreground budgets then wait until settlement. Explicit per-call budgets still take precedence.
38
+ Shell `budgetMs` accepts finite non-negative milliseconds; zero means no observation delay. On command launches it belongs inside a foreground `wait`; existing-task `action: "wait"` calls take it at the top level. A trusted SDK host can override the usual budgets or select `tasks.wait.kind: "until-settled"`; omitted foreground budgets then wait until settlement. Explicit per-call budgets still take precedence.
39
39
 
40
40
  Native observation timers run independently of JavaScript. A zero-budget wait can already be backgrounded by the time a caller reads the next task snapshot, even before JavaScript awaits the result. Synchronous wait registration does not guarantee a visible foreground interval. The elapsed result still identifies the same wait and task; execution continues.
41
41
 
@@ -168,6 +168,29 @@ bash({ command: "npm run check" })
168
168
 
169
169
  The shell execution timeout is separate: `timeout` is seconds and defaults to 300, with a maximum of 3600. It continues counting after backgrounding. Choose a timeout appropriate for the command; reducing `budgetMs` does not shorten or extend it. Use the returned task ID to inspect or stop the existing task through `/tasks`. Background completion notifies the parent automatically, so there is no need to launch the command again to collect its result.
170
170
 
171
+ Observe an existing task without running its command again:
172
+
173
+ ```ts
174
+ bash({ action: "wait", id: taskId, budgetMs: 1000 })
175
+ powershell({ action: "wait", id: taskId, budgetMs: 1000 })
176
+ ```
177
+
178
+ Use the original task ID from the same owning session or workflow stage. Omit `budgetMs` to use the owner's command observation policy, or pass `0` to poll. A wait returns retained output and a yielded or settled observation; settled results include available exit and failure details. While running, successive yielded waits advance through retained output in bounded pages, including after a session reload. A caught-up wait returns no output until more arrives. Settled waits return all retained output again, subject to labelled gaps and truncation, so they may repeat output you have already seen.
179
+
180
+ Do not combine `action: "wait"` with `command`, `timeout`, `wait`, `env`, `cwd`, or `pty`. Existing-task waits require a supported task owner, even with custom execution adapters. Unknown or foreign IDs are rejected. Cancelling a wait or admitting user/Intercom messages releases observation only, not the command. Waiting never extends the original execution timeout or the owner's lifetime.
181
+
182
+ ### Stop a shell task from a tool call
183
+
184
+ Use the `kill` tool with the exact task ID returned by `bash` or `powershell`, whether it launched explicitly in the background or automatically yielded:
185
+
186
+ ```ts
187
+ kill({ id: taskId })
188
+ ```
189
+
190
+ The same command works in main and workflow-stage chat. It selects the existing owned shell task; do not supply a process ID, shell name, or another owner's task ID. Unknown, malformed, foreign-owner, and subagent IDs are rejected. `/tasks` stop controls remain available.
191
+
192
+ The response includes `taskId`, `decision`, `execution`, and `cleanup`. `cancellation-requested` means cancellation was requested, not that termination or cleanup has finished. A repeated call preserves that decision while reporting current state. `already-settled` means the task finished before cancellation and keeps its original outcome. Confirm `execution.kind: "settled"` and `cleanup.kind: "reaped"` before treating termination and cleanup as complete. Cleanup failures remain errors, not successful stops. Output and completion notifications remain available; killing a task does not erase its history.
193
+
171
194
  Shell completions use the same shaded card as subagents, with a retained output preview and available exit code. Nonzero shell exits are shown as failures even though the process itself reached a terminal state. Cancellation shows Stopped. The card and below-prompt count update in the owning main or workflow-stage chat.
172
195
 
173
196
  Native Windows owned shells use supervised pipes or ConPTY, with Job Object containment before execution resumes and confirmed cleanup. If containment cannot be established, launch is refused rather than falling back to unsupervised execution. The legacy Windows WSL `bash.exe` stdin transport remains unsupported for owned launch because Windows jobs cannot supervise Linux guest processes. Running Atomic inside WSL uses the normal POSIX/Bash path.
@@ -108,6 +108,26 @@ Configure defaults in `~/.atomic/agent/settings.json` or `.atomic/settings.json`
108
108
 
109
109
  `reserveTokens` controls the automatic threshold that decides when compaction runs; it is not converted into a classifier line ratio. Manual calls can pass parameter overrides through the SDK.
110
110
 
111
+ ### Per-model budgets
112
+
113
+ Use `compaction.modelOverrides` to set `reserveTokens` and/or `preserve_recent` for an exact `"provider/modelId"` key. For example:
114
+
115
+ ```json
116
+ {
117
+ "compaction": {
118
+ "reserveTokens": 16384,
119
+ "preserve_recent": 2,
120
+ "modelOverrides": {
121
+ "anthropic/claude-sonnet-4-5": { "reserveTokens": 32768, "preserve_recent": 4 }
122
+ }
123
+ }
124
+ }
125
+ ```
126
+
127
+ Each field falls back independently to the ordinary setting, then its built-in default. Keys are case-sensitive and do not support wildcards or reasoning suffixes. Both fields require non-negative safe integers. The active session model selects the budgets for manual, automatic, overflow, and post-tool compaction; switching models changes the next resolution, while borrowing a fallback planner does not. Explicit manual parameters take precedence over resolved defaults.
128
+
129
+ Atomic intentionally differs from upstream pi: the recent-history override is an exact message count (`preserve_recent`), not a token budget (`keepRecentTokens`). Verbatim line reconstruction, `compression_ratio`, and `query` are unchanged; the latter two and `enabled` remain ordinary settings. See [Settings](/settings#compaction) for merge and validation details.
130
+
111
131
  ## When compaction runs
112
132
 
113
133
  - **Manual:** `/compact`, `ctx.compact()`, `session.compact()`, or RPC `{ "type": "compact" }`.