@bastani/atomic 0.9.57-alpha.1 → 0.9.58-alpha.1

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 (117) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/dist/builtin/intercom/package.json +1 -1
  3. package/dist/builtin/mcp/package.json +1 -1
  4. package/dist/builtin/subagents/CHANGELOG.md +12 -0
  5. package/dist/builtin/subagents/package.json +1 -1
  6. package/dist/builtin/subagents/src/extension/index.bundle.mjs +39 -5
  7. package/dist/builtin/web-access/CHANGELOG.md +12 -0
  8. package/dist/builtin/web-access/index.bundle.mjs +2 -2
  9. package/dist/builtin/web-access/package.json +1 -1
  10. package/dist/builtin/workflows/CHANGELOG.md +42 -0
  11. package/dist/builtin/workflows/package.json +1 -1
  12. package/dist/builtin/workflows/src/extension/index.bundle.mjs +885 -228
  13. package/dist/builtin/workflows/src/extension/local-worker-entry.mjs +933 -175
  14. package/dist/builtin/workflows/src/index.js +630 -162
  15. package/dist/builtin/workflows/src/local-worker-entry.mjs +933 -175
  16. package/dist/builtin/workflows/src/shared/authoring-contract-ui.d.ts +1 -1
  17. package/dist/builtin/workflows/src/shared/workflow-infrastructure-error.d.ts +13 -0
  18. package/dist/builtin/workflows/src/workers/public-options.d.ts +10 -0
  19. package/dist/core/agent-session-persistent-custom-messages.d.ts +5 -0
  20. package/dist/core/agent-session-persistent-custom-messages.d.ts.map +1 -1
  21. package/dist/core/agent-session-persistent-custom-messages.js +16 -0
  22. package/dist/core/agent-session-persistent-custom-messages.js.map +1 -1
  23. package/dist/core/agent-session-tasks.d.ts.map +1 -1
  24. package/dist/core/agent-session-tasks.js +20 -0
  25. package/dist/core/agent-session-tasks.js.map +1 -1
  26. package/dist/core/settings-defaults.d.ts +4 -0
  27. package/dist/core/settings-defaults.d.ts.map +1 -1
  28. package/dist/core/settings-defaults.js +4 -0
  29. package/dist/core/settings-defaults.js.map +1 -1
  30. package/dist/core/settings-manager-resource-accessors.d.ts +2 -0
  31. package/dist/core/settings-manager-resource-accessors.d.ts.map +1 -1
  32. package/dist/core/settings-manager-resource-accessors.js +6 -0
  33. package/dist/core/settings-manager-resource-accessors.js.map +1 -1
  34. package/dist/core/settings-schema.d.ts +9 -0
  35. package/dist/core/settings-schema.d.ts.map +1 -1
  36. package/dist/core/settings-schema.js +11 -0
  37. package/dist/core/settings-schema.js.map +1 -1
  38. package/dist/core/settings-types.d.ts +1 -1
  39. package/dist/core/settings-types.d.ts.map +1 -1
  40. package/dist/core/settings-types.js.map +1 -1
  41. package/dist/core/tasks/agent-adapter.d.ts +10 -1
  42. package/dist/core/tasks/agent-adapter.d.ts.map +1 -1
  43. package/dist/core/tasks/agent-adapter.js +20 -0
  44. package/dist/core/tasks/agent-adapter.js.map +1 -1
  45. package/dist/core/tasks/contracts.d.ts +6 -0
  46. package/dist/core/tasks/contracts.d.ts.map +1 -1
  47. package/dist/core/tasks/contracts.js.map +1 -1
  48. package/dist/core/tasks/heartbeat-notice.d.ts +64 -0
  49. package/dist/core/tasks/heartbeat-notice.d.ts.map +1 -0
  50. package/dist/core/tasks/heartbeat-notice.js +98 -0
  51. package/dist/core/tasks/heartbeat-notice.js.map +1 -0
  52. package/dist/core/tasks/heartbeat.d.ts +75 -0
  53. package/dist/core/tasks/heartbeat.d.ts.map +1 -0
  54. package/dist/core/tasks/heartbeat.js +440 -0
  55. package/dist/core/tasks/heartbeat.js.map +1 -0
  56. package/dist/core/tasks/supervisor.d.ts +2 -0
  57. package/dist/core/tasks/supervisor.d.ts.map +1 -1
  58. package/dist/core/tasks/supervisor.js +32 -4
  59. package/dist/core/tasks/supervisor.js.map +1 -1
  60. package/dist/core/tasks/task-view-source.d.ts +72 -0
  61. package/dist/core/tasks/task-view-source.d.ts.map +1 -0
  62. package/dist/core/tasks/task-view-source.js +155 -0
  63. package/dist/core/tasks/task-view-source.js.map +1 -0
  64. package/dist/core/tools/bash-pty-native.d.ts +2 -0
  65. package/dist/core/tools/bash-pty-native.d.ts.map +1 -1
  66. package/dist/core/tools/bash-pty-native.js +1 -0
  67. package/dist/core/tools/bash-pty-native.js.map +1 -1
  68. package/dist/core/tools/bash.d.ts +3 -0
  69. package/dist/core/tools/bash.d.ts.map +1 -1
  70. package/dist/core/tools/bash.js +20 -2
  71. package/dist/core/tools/bash.js.map +1 -1
  72. package/dist/core/tools/powershell.d.ts +16 -8
  73. package/dist/core/tools/powershell.d.ts.map +1 -1
  74. package/dist/index.d.ts +5 -3
  75. package/dist/index.d.ts.map +1 -1
  76. package/dist/index.js +4 -2
  77. package/dist/index.js.map +1 -1
  78. package/dist/modes/interactive/components/chat-session-host-events.d.ts.map +1 -1
  79. package/dist/modes/interactive/components/chat-session-host-events.js +7 -0
  80. package/dist/modes/interactive/components/chat-session-host-events.js.map +1 -1
  81. package/dist/modes/interactive/components/chat-session-host-state.d.ts +3 -0
  82. package/dist/modes/interactive/components/chat-session-host-state.d.ts.map +1 -1
  83. package/dist/modes/interactive/components/chat-session-host-state.js +4 -0
  84. package/dist/modes/interactive/components/chat-session-host-state.js.map +1 -1
  85. package/dist/modes/interactive/components/chat-session-host-types.d.ts +11 -0
  86. package/dist/modes/interactive/components/chat-session-host-types.d.ts.map +1 -1
  87. package/dist/modes/interactive/components/chat-session-host-types.js.map +1 -1
  88. package/dist/modes/interactive/components/chat-session-host.d.ts +2 -0
  89. package/dist/modes/interactive/components/chat-session-host.d.ts.map +1 -1
  90. package/dist/modes/interactive/components/chat-session-host.js +15 -8
  91. package/dist/modes/interactive/components/chat-session-host.js.map +1 -1
  92. package/dist/modes/interactive/components/custom-message.d.ts.map +1 -1
  93. package/dist/modes/interactive/components/custom-message.js +12 -0
  94. package/dist/modes/interactive/components/custom-message.js.map +1 -1
  95. package/dist/modes/interactive/components/task-detail.d.ts.map +1 -1
  96. package/dist/modes/interactive/components/task-detail.js +5 -0
  97. package/dist/modes/interactive/components/task-detail.js.map +1 -1
  98. package/dist/modes/interactive/components/task-heartbeat-message.d.ts +14 -0
  99. package/dist/modes/interactive/components/task-heartbeat-message.d.ts.map +1 -0
  100. package/dist/modes/interactive/components/task-heartbeat-message.js +76 -0
  101. package/dist/modes/interactive/components/task-heartbeat-message.js.map +1 -0
  102. package/dist/modes/interactive/components/task-inspector.d.ts +6 -3
  103. package/dist/modes/interactive/components/task-inspector.d.ts.map +1 -1
  104. package/dist/modes/interactive/components/task-inspector.js +53 -100
  105. package/dist/modes/interactive/components/task-inspector.js.map +1 -1
  106. package/dist/modes/interactive/skill-command-autocomplete.d.ts +22 -2
  107. package/dist/modes/interactive/skill-command-autocomplete.d.ts.map +1 -1
  108. package/dist/modes/interactive/skill-command-autocomplete.js +28 -9
  109. package/dist/modes/interactive/skill-command-autocomplete.js.map +1 -1
  110. package/docs/background-tasks.md +65 -1
  111. package/docs/settings.md +12 -0
  112. package/docs/subagents.md +2 -0
  113. package/docs/tools.md +2 -1
  114. package/docs/workflows/operations.md +5 -3
  115. package/npm-shrinkwrap.json +32 -32
  116. package/package.json +3 -3
  117. package/schemas/settings.schema.json +24 -0
@@ -1 +1 @@
1
- {"version":3,"file":"bash.js","sourceRoot":"","sources":["../../../src/core/tools/bash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAe,IAAI,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAA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,UAAU,GAAG,MAAM,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC;YAC7F,MAAM,SAAS,GAAG,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;YACxE,MAAM,SAAS,GAAI,OAAO,CAAC,aAAuC,IAAI,IAAI,SAAS,EAAE,CAAC;YACtF,MAAM,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,MAAM;gBAC9B,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE;oBAClD,UAAU,EAAE,OAAO,CAAC,UAAU;oBAC9B,OAAO,EAAE,OAAO,CAAC,OAAO;oBACxB,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE;oBACvB,SAAS;oBACT,GAAG,EAAE,OAAO,CAAC,GAAG;iBAChB,CAAC,CAAC;YACJ,IAAI,CAAC,MAAM,EAAE,CAAC;gBACb,gCAAgC,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,UAAU,EAAE,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;YAC1G,CAAC;YACD,SAAS,CAAC,UAAU,EAAE,CAAC;YACvB,OAAO,SAAS,CAAC;QAClB,CAAC;KACD,CAAC;AACH,CAAC;AACD,MAAM,UAAU,cAAc,CAAC,GAAW,EAAE,OAAyB;IACpE,OAAO,kBAAkB,CAAC,wBAAwB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;AACnE,CAAC","sourcesContent":["import { constants } from \"node:fs\";\nimport { access as fsAccess, stat as fsStat } from \"node:fs/promises\";\nimport { constants as osConstants } from \"node:os\";\nimport { resolve as resolvePath } from \"node:path\";\nimport type { AgentTool } from \"@earendil-works/pi-agent-core\";\nimport { Container, Text } from \"@earendil-works/pi-tui\";\nimport { spawn } from \"child_process\";\nimport { type Static, Type } from \"typebox\";\nimport { APP_NAME } from \"../../config.js\";\nimport { theme } from \"../../modes/interactive/theme/theme.js\";\nimport { createChildProcessEnvironment, waitForChildProcess } from \"../../utils/child-process.ts\";\nimport {\n\tgetShellConfig,\n\tgetShellEnv,\n\tkillProcessTree,\n\ttrackDetachedChildPid,\n\tuntrackDetachedChildPid,\n} from \"../../utils/shell.ts\";\nimport type { BashResult } from \"../bash-executor.ts\";\nimport type { ExtensionContext, ToolDefinition, ToolRenderResultOptions } from \"../extensions/types.ts\";\nimport type { WaitPolicy } from \"../tasks/contracts.js\";\nimport {\n\ttype BashInterceptorRule,\n\tcheckBashInterceptionCandidates,\n\tDEFAULT_BASH_INTERCEPTOR_RULES,\n} from \"./bash-interceptor.ts\";\nimport { stripLeadingCdCommand } from \"./bash-leading-cd.ts\";\nimport {\n\texecuteNativePty,\n\texecuteSupervisedCommand,\n\ttype SupervisedCommandOwner,\n\ttype SupervisedCommandResult,\n\tvalidateBashWait,\n\twaitForSupervisedCommand,\n} from \"./bash-pty-native.js\";\nimport { applyBashSessionEnvironment, snapshotBashSessionEnvironment } from \"./bash-session-environment.ts\";\nimport { OutputAccumulator } from \"./output-accumulator.ts\";\nimport {\n\tgetTextOutput,\n\tinvalidArgText,\n\tlinkPath,\n\tstartToolTimer,\n\tstr,\n\ttype ToolTimerState,\n\ttoolTimerText,\n} from \"./render-utils.ts\";\nimport { expandShellInternalUrls, type InternalResourceContext } from \"./resource-selectors.ts\";\nimport { invalidateNativeSearchCache } from \"./search-native.ts\";\nimport { addShellOutputPreview, formatTruncationNotice, rebuildShellWaitResult } from \"./shell-task-render.ts\";\nimport { wrapToolDefinition } from \"./tool-definition-wrapper.ts\";\nimport { DEFAULT_MAX_BYTES, formatSize, type TruncationResult } from \"./truncate.ts\";\n\nconst STRUCTURED_OUTPUT_MAX_BYTES = 1024 * 1024;\nconst bashOutputSchema = Type.Object({\n\toutput: Type.String({\n\t\tdescription: \"Combined stdout and stderr, up to 1 MiB, keeping the first and last 512 KiB when longer.\",\n\t}),\n\ttruncated: Type.Boolean(),\n\tfull_output_path: Type.Optional(Type.String()),\n\texit_code: Type.Number(),\n\twall_time_seconds: Type.Number(),\n});\n\nconst envSchema = Type.Unsafe<Record<string, string>>({\n\ttype: \"object\",\n\tdescription: \"Environment variables to add or override.\",\n\tadditionalProperties: { type: \"string\" },\n\tpropertyNames: { pattern: \"^[A-Za-z_][A-Za-z0-9_]*$\" },\n});\nconst bashBaseSchema = Type.Object(\n\t{\n\t\tcommand: Type.String({ description: \"Shell command to execute.\" }),\n\t\tenv: Type.Optional(envSchema),\n\t\ttimeout: Type.Optional(Type.Number({ description: \"Timeout in seconds.\" })),\n\t\twait: Type.Optional(\n\t\t\tType.Unsafe<WaitPolicy>({\n\t\t\t\ttype: \"object\",\n\t\t\t\tproperties: {\n\t\t\t\t\tkind: { type: \"string\", enum: [\"background\", \"foreground\"] },\n\t\t\t\t\tbudgetMs: {\n\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\tminimum: 0,\n\t\t\t\t\t\tdescription: \"Foreground observation budget in milliseconds; only valid with foreground.\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\trequired: [\"kind\"],\n\t\t\t\tadditionalProperties: false,\n\t\t\t\tdescription:\n\t\t\t\t\t\"Observation policy, independent of execution timeout. Omit for owner-configured automatic yield (default 10s).\",\n\t\t\t}),\n\t\t),\n\t\tcwd: Type.Optional(Type.String({ description: \"Working directory for the command.\" })),\n\t\tpty: Type.Optional(Type.Boolean({ description: \"Run with PTY handling.\" })),\n\t},\n\t{ additionalProperties: false },\n);\ntype ShellCommandInput = Static<typeof bashBaseSchema> & { action?: never; id?: never; budgetMs?: never };\ntype ShellWaitInput = { action: \"wait\"; id: string; budgetMs?: number } & Partial<\n\tRecord<keyof Static<typeof bashBaseSchema>, never>\n>;\nconst bashSchema = Type.Unsafe<ShellCommandInput | ShellWaitInput>({\n\t...bashBaseSchema,\n\tproperties: {\n\t\t...bashBaseSchema.properties,\n\t\taction: {\n\t\t\ttype: \"string\",\n\t\t\tenum: [\"wait\"],\n\t\t\tdescription: \"Observe an existing asynchronous task without executing a command.\",\n\t\t},\n\t\tid: { type: \"string\", description: \"Existing task ID owned by this session.\" },\n\t\tbudgetMs: {\n\t\t\ttype: \"number\",\n\t\t\tminimum: 0,\n\t\t\tdescription: \"Observation budget in milliseconds; omitted uses owner policy.\",\n\t\t},\n\t},\n\trequired: [],\n});\nconst shellCommandKeys = Object.keys(bashBaseSchema.properties);\n\nfunction prepareShellInput(args: unknown): BashToolInput {\n\tif (typeof args !== \"object\" || args === null || Array.isArray(args)) return args as BashToolInput;\n\tconst has = (key: string) => Object.hasOwn(args, key);\n\tif (has(\"action\")) {\n\t\tif (!has(\"id\") || shellCommandKeys.some(has))\n\t\t\tthrow new Error(\"Invalid shell wait: expected action wait, id, and optional finite non-negative budgetMs\");\n\t} else if (!has(\"command\") || has(\"id\") || has(\"budgetMs\")) {\n\t\tthrow new Error(\"Invalid shell command: command is required; id and budgetMs require action wait\");\n\t}\n\treturn args as BashToolInput;\n}\nexport const bashToolSystemPromptContribution = Object.freeze({\n\tsnippet: \"Execute a shell command.\",\n\tguidelines: Object.freeze([\n\t\t\"You can inspect ATOMIC_* or PI_* environment variables for current model and session details.\",\n\t\t'Use { action: \"wait\", id: taskId } to observe an existing shell task with the owner policy. Avoid repeated short polls; await completion notifications when no dependent work is blocked. Never relaunch a yielded command. Waiting does not extend execution timeout or owner lifetime.',\n\t\t\"For ordinary commands, omit wait to use the owner's observation policy (normally 10s). Do not routinely request one-second waits: premature yields add tool calls without making the command faster. Use a short budget only for a concrete responsiveness need, or explicit background observation when you have independent work to do. Explicit budgets, including zero for polling, remain available.\",\n\t\t\"Choose foreground or background shell observation as needed without asking the user each time. Background yields after admission; foreground waits for its optional budget then the same command continues in background. Omitted wait uses owner-configured automatic background yield (default 10s). Observation never changes the execution timeout, which stops the command. Background requires a supported task owner; unbound foreground waits until completion regardless of budget.\",\n\t] as const),\n} as const);\nexport type BashToolInput = Static<typeof bashSchema>;\nexport interface BashToolDetails {\n\ttruncation?: TruncationResult;\n\tfullOutputPath?: string;\n\texitCode?: number | null;\n\tobservation?: import(\"../tasks/contracts.js\").WaitOutcome;\n\ttimeoutSeconds?: number;\n\trequestedTimeoutSeconds?: number;\n\twallTimeMs?: number;\n}\nconst DEFAULT_TIMEOUT_SECONDS = 300,\n\tMAX_TIMEOUT_SECONDS = 3600;\nexport function validateExplicitTimeoutSeconds(timeout: number): void {\n\tif (!Number.isFinite(timeout) || timeout <= 0 || timeout > MAX_TIMEOUT_SECONDS)\n\t\tthrow new Error(\n\t\t\t`Invalid timeout ${String(timeout)}: timeout must be a finite number greater than 0 and no more than ${MAX_TIMEOUT_SECONDS} seconds`,\n\t\t);\n}\nfunction normalizeTimeoutSeconds(timeout: number | undefined): number {\n\tif (timeout === undefined) return DEFAULT_TIMEOUT_SECONDS;\n\tvalidateExplicitTimeoutSeconds(timeout);\n\treturn Math.max(1, Math.floor(timeout));\n}\nexport type BashOutputChannel = \"stdout\" | \"stderr\";\nexport interface BashOperations {\n\texec: (\n\t\tcommand: string,\n\t\tcwd: string,\n\t\toptions: {\n\t\t\tonData: (data: Buffer, channel?: BashOutputChannel) => void;\n\t\t\tsignal?: AbortSignal;\n\t\t\ttimeout?: number;\n\t\t\twait?: WaitPolicy;\n\t\t\tenv?: NodeJS.ProcessEnv;\n\t\t\tpty?: boolean;\n\t\t},\n\t) => Promise<SupervisedCommandResult>;\n}\nexport function createLocalBashOperations(options?: {\n\tshellPath?: string;\n\ttaskOwner?: SupervisedCommandOwner;\n}): BashOperations {\n\treturn {\n\t\texec: async (command, cwd, { onData, signal, timeout, wait, env, pty }) => {\n\t\t\tvalidateBashWait(wait, !!options?.taskOwner);\n\t\t\tif (timeout !== undefined) validateExplicitTimeoutSeconds(timeout);\n\t\t\tif (pty && process.env.PI_NO_PTY !== \"1\" && process.env.ATOMIC_NO_PTY !== \"1\") {\n\t\t\t\ttry {\n\t\t\t\t\treturn await executeNativePty(command, cwd, {\n\t\t\t\t\t\tonData: (data) => onData(data, \"stdout\"),\n\t\t\t\t\t\tsignal,\n\t\t\t\t\t\ttimeout,\n\t\t\t\t\t\twait,\n\t\t\t\t\t\tenv,\n\t\t\t\t\t\tshellPath: options?.shellPath,\n\t\t\t\t\t\ttaskOwner: options?.taskOwner,\n\t\t\t\t\t});\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (options?.taskOwner) throw error;\n\t\t\t\t\tconst message = String(error instanceof Error ? error.message : error);\n\t\t\t\t\tif (!message.includes(\"Native PTY\") && !message.includes(\"PtySession\")) throw error;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst shellConfig = getShellConfig(options?.shellPath);\n\t\t\ttry {\n\t\t\t\tconst cwdStat = await fsStat(cwd);\n\t\t\t\tif (!cwdStat.isDirectory()) throw new Error(`Working directory is not a directory: ${cwd}`);\n\t\t\t\tawait fsAccess(cwd, constants.F_OK);\n\t\t\t} catch (error) {\n\t\t\t\tif (error instanceof Error && error.message.startsWith(\"Working directory is not a directory\")) throw error;\n\t\t\t\tthrow new Error(`Working directory does not exist: ${cwd}\\nCannot execute bash commands.`);\n\t\t\t}\n\t\t\tif (signal?.aborted) throw new Error(\"aborted\");\n\t\t\tif (options?.taskOwner)\n\t\t\t\treturn executeSupervisedCommand(\n\t\t\t\t\tcommand,\n\t\t\t\t\tcwd,\n\t\t\t\t\t{ onData, signal, timeout, wait, env, shellPath: options.shellPath, taskOwner: options.taskOwner },\n\t\t\t\t\tfalse,\n\t\t\t\t);\n\t\t\tconst commandFromStdin = shellConfig.commandTransport === \"stdin\";\n\t\t\tconst child = spawn(shellConfig.shell, commandFromStdin ? shellConfig.args : [...shellConfig.args, command], {\n\t\t\t\tcwd,\n\t\t\t\tdetached: process.platform !== \"win32\",\n\t\t\t\tenv: createChildProcessEnvironment(undefined, env ?? getShellEnv()),\n\t\t\t\tstdio: [commandFromStdin ? \"pipe\" : \"ignore\", \"pipe\", \"pipe\"],\n\t\t\t\twindowsHide: true,\n\t\t\t});\n\t\t\tif (commandFromStdin) {\n\t\t\t\tchild.stdin?.on(\"error\", () => {});\n\t\t\t\tchild.stdin?.end(command);\n\t\t\t}\n\t\t\tif (child.pid) trackDetachedChildPid(child.pid);\n\t\t\tlet timedOut = false;\n\t\t\tlet timeoutHandle: NodeJS.Timeout | undefined;\n\t\t\tconst onAbort = () => {\n\t\t\t\tif (child.pid) killProcessTree(child.pid);\n\t\t\t};\n\t\t\ttry {\n\t\t\t\tif (timeout !== undefined && timeout > 0) {\n\t\t\t\t\ttimeoutHandle = setTimeout(() => {\n\t\t\t\t\t\ttimedOut = true;\n\t\t\t\t\t\tif (child.pid) killProcessTree(child.pid);\n\t\t\t\t\t}, timeout * 1000);\n\t\t\t\t}\n\t\t\t\tchild.stdout?.on(\"data\", (data: Buffer) => onData(data, \"stdout\"));\n\t\t\t\tchild.stderr?.on(\"data\", (data: Buffer) => onData(data, \"stderr\"));\n\t\t\t\tif (signal) {\n\t\t\t\t\tif (signal.aborted) onAbort();\n\t\t\t\t\telse signal.addEventListener(\"abort\", onAbort, { once: true });\n\t\t\t\t}\n\t\t\t\tconst exitCode = await waitForChildProcess(child);\n\t\t\t\tif (signal?.aborted) throw new Error(\"aborted\");\n\t\t\t\tif (timedOut) {\n\t\t\t\t\tthrow new Error(`timeout:${timeout}`);\n\t\t\t\t}\n\t\t\t\tconst signalCode = child.signalCode;\n\t\t\t\treturn { exitCode: exitCode ?? (signalCode ? 128 + (osConstants.signals[signalCode] ?? 0) : 1) };\n\t\t\t} finally {\n\t\t\t\tif (child.pid) untrackDetachedChildPid(child.pid);\n\t\t\t\tif (timeoutHandle) clearTimeout(timeoutHandle);\n\t\t\t\tif (signal) signal.removeEventListener(\"abort\", onAbort);\n\t\t\t}\n\t\t},\n\t};\n}\nexport interface BashSpawnContext {\n\tcommand: string;\n\tcwd: string;\n\tenv: NodeJS.ProcessEnv;\n}\nexport type BashSpawnHook = (context: BashSpawnContext) => BashSpawnContext;\nfunction resolveSpawnContext(\n\tcommand: string,\n\tcwd: string,\n\tsessionEnvironment: NodeJS.ProcessEnv,\n\tspawnHook?: BashSpawnHook,\n): BashSpawnContext {\n\tconst baseContext: BashSpawnContext = { command, cwd, env: { ...getShellEnv() } };\n\tapplyBashSessionEnvironment(baseContext.env, sessionEnvironment);\n\treturn spawnHook ? spawnHook(baseContext) : baseContext;\n}\nexport interface BashInterceptorResult {\n\toperations?: BashOperations;\n\tresult?: BashResult;\n}\nexport type BashInterceptor = (\n\tcontext: BashSpawnContext,\n) => Promise<BashInterceptorResult | undefined> | BashInterceptorResult | undefined;\nexport interface BashToolOptions {\n\toperations?: BashOperations;\n\t/** Trusted host ownership; never supplied by model arguments. */\n\ttaskOwner?: SupervisedCommandOwner;\n\t/** Expose the execution-time Atomic session snapshot and PI compatibility aliases. Default: true. */\n\texposeSessionEnvironment?: boolean;\n\t/** Prefix prepended to every shell command before execution. */\n\tcommandPrefix?: string;\n\t/** Override shell executable resolution for local bash operations. */\n\tshellPath?: string;\n\t/** Dialect for generated internal-URL path literals. Defaults to POSIX; does not select the executable. */\n\tshellDialect?: \"posix\" | \"powershell\";\n\t/** Last-mile hook for rewriting the command/cwd/env spawn context. */\n\tspawnHook?: BashSpawnHook;\n\t/** Optional command interceptor used by extensions and parity tests. */\n\tinterceptor?: BashInterceptor;\n\tinterceptorEnabled?: boolean | (() => boolean);\n\tavailableTools?: string[];\n\tinterceptorRules?: BashInterceptorRule[];\n\t/**\n\t * Session-scoped directory for overflow logs, resolved per execution so a\n\t * session switch (fork, branch, resume) follows the live transcript session.\n\t */\n\tsessionTempDir?: string | (() => string | undefined);\n}\n/**\n * Presentation identity for a shell-backed built-in tool. Atomic runs PowerShell\n * through the same execution pipeline as bash, so the transcript prompt and the\n * overflow temp-file prefix are the only shell-specific display values.\n */\nexport interface ShellToolPresentation {\n\t/** Transcript prompt prefix: `$` for bash, `PS>` for PowerShell. */\n\tprompt: string;\n\t/** Prefix for the temp file that holds truncated output. */\n\ttempFilePrefix: string;\n}\nexport const BASH_SHELL_PRESENTATION: ShellToolPresentation = {\n\tprompt: \"$\",\n\ttempFilePrefix: `${APP_NAME}-bash`,\n};\nconst BASH_UPDATE_THROTTLE_MS = 100;\nfunction bashResultToToolResult(result: BashResult): {\n\tcontent: Array<{ type: \"text\"; text: string }>;\n\tdetails: BashToolDetails | undefined;\n} {\n\tconst details: BashToolDetails | undefined = result.truncated\n\t\t? { fullOutputPath: result.fullOutputPath }\n\t\t: undefined;\n\tconst status = result.cancelled\n\t\t? \"Command aborted\"\n\t\t: result.exitCode && result.exitCode !== 0\n\t\t\t? `Command exited with code ${result.exitCode}`\n\t\t\t: undefined;\n\tconst text = `${result.output || \"(no output)\"}${status ? `\\n\\n${status}` : \"\"}`;\n\treturn { content: [{ type: \"text\", text }], details };\n}\nfunction formatBashCall(\n\targs: { command?: string; timeout?: number; action?: string; id?: string } | undefined,\n\tprompt: string,\n): string {\n\tif (args?.action === \"wait\") return theme.fg(\"toolTitle\", theme.bold(`${prompt} wait ${str(args.id) ?? \"...\"}`));\n\tconst command = str(args?.command);\n\tconst timeout = args?.timeout as number | undefined;\n\tconst timeoutSuffix = timeout ? theme.fg(\"muted\", ` (timeout ${timeout}s)`) : \"\";\n\tconst commandDisplay = command === null ? invalidArgText(theme) : command ? command : theme.fg(\"toolOutput\", \"...\");\n\treturn theme.fg(\"toolTitle\", theme.bold(`${prompt} ${commandDisplay}`)) + timeoutSuffix;\n}\nfunction rebuildBashResultRenderComponent(\n\tcomponent: Container,\n\tresult: {\n\t\tcontent: Array<{ type: string; text?: string; data?: string; mimeType?: string }>;\n\t\tdetails?: BashToolDetails;\n\t},\n\toptions: ToolRenderResultOptions,\n\tshowImages: boolean,\n\ttimerText: string | undefined,\n\tcwd: string,\n): void {\n\tcomponent.clear();\n\tlet output = getTextOutput(result, showImages).trim();\n\tconst observation = result.details?.observation;\n\tif (observation?.kind === \"yielded\") {\n\t\tconst receipt = `Command is still running (task ${observation.taskId}).`;\n\t\tif (output.endsWith(receipt)) output = output.slice(0, -receipt.length).trimEnd();\n\t\tcomponent.addChild(new Text(theme.fg(\"accent\", \"∀ Continued in background\"), 0, 0));\n\t\tcomponent.addChild(\n\t\t\tnew Text(\n\t\t\t\ttheme.fg(\"dim\", `/tasks to inspect output or stop${options.expanded ? ` · ${observation.taskId}` : \"\"}`),\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t),\n\t\t);\n\t}\n\tconst truncation = result.details?.truncation;\n\tconst fullOutputPath = result.details?.fullOutputPath;\n\tif (!options.isPartial && truncation?.truncated && fullOutputPath && output.endsWith(\"]\")) {\n\t\tconst footerStart = output.lastIndexOf(\"\\n\\n[\");\n\t\tif (footerStart !== -1 && output.slice(footerStart).includes(fullOutputPath)) {\n\t\t\toutput = output.slice(0, footerStart).trimEnd();\n\t\t}\n\t}\n\tif (output) addShellOutputPreview(component, output, options.expanded);\n\tif (truncation?.truncated || fullOutputPath) {\n\t\tconst warnings: string[] = [];\n\t\tif (truncation?.truncated) warnings.push(formatTruncationNotice(truncation));\n\t\tif (fullOutputPath) warnings.push(\"Full output:\");\n\t\tcomponent.addChild(new Text(`\\n${theme.fg(\"warning\", `[${warnings.join(\". \")}]`)}`, 0, 0));\n\t\t// The path gets a line of its own so word wrap never splits it at a space beside its label, and a link so a\n\t\t// path wider than the terminal still opens (and copies) whole.\n\t\tif (fullOutputPath) {\n\t\t\tcomponent.addChild(new Text(theme.fg(\"warning\", linkPath(fullOutputPath, fullOutputPath, cwd)), 0, 0));\n\t\t}\n\t}\n\tif (timerText) component.addChild(new Text(`\\n${theme.fg(\"muted\", timerText)}`, 0, 0));\n}\nexport function createBashToolDefinition(\n\tcwd: string,\n\toptions?: BashToolOptions,\n\tpresentation: ShellToolPresentation = BASH_SHELL_PRESENTATION,\n): ToolDefinition<typeof bashSchema, BashToolDetails | undefined, ToolTimerState> {\n\tconst defaultOps =\n\t\toptions?.operations ??\n\t\tcreateLocalBashOperations({ shellPath: options?.shellPath, taskOwner: options?.taskOwner });\n\tconst commandPrefix = options?.commandPrefix,\n\t\texposeSessionEnvironment = options?.exposeSessionEnvironment ?? true;\n\tconst spawnHook = options?.spawnHook;\n\tconst interceptor = options?.interceptor;\n\tconst isInterceptorEnabled = (): boolean =>\n\t\ttypeof options?.interceptorEnabled === \"function\"\n\t\t\t? options.interceptorEnabled()\n\t\t\t: (options?.interceptorEnabled ?? !!interceptor);\n\tconst availableTools = options?.availableTools ?? [\"read\", \"search\", \"find\", \"edit\", \"write\"];\n\tconst interceptorRules = options?.interceptorRules ?? DEFAULT_BASH_INTERCEPTOR_RULES;\n\tconst sessionTempDirOption = options?.sessionTempDir;\n\tconst resolveSessionTempDir = (): string | undefined =>\n\t\ttypeof sessionTempDirOption === \"function\" ? sessionTempDirOption() : sessionTempDirOption;\n\treturn {\n\t\tname: \"bash\",\n\t\tconcurrency: (args) => (args.pty === true ? \"exclusive\" : \"shared\"),\n\t\tlabel: \"bash\",\n\t\tdescription:\n\t\t\t'Execute a shell command with optional PTY handling and foreground/background observation, or observe an existing task with action: \"wait\", id, and optional budgetMs. Omitted command wait uses owner policy (default 10s). Observation never changes execution timeout. Background and existing-task waits require a supported task owner; unbound foreground execution waits until completion.',\n\t\tpromptSnippet: bashToolSystemPromptContribution.snippet,\n\t\tconstrainedSampling: { type: \"json_schema\", strict: \"prefer\" },\n\t\tpromptGuidelines: exposeSessionEnvironment ? [...bashToolSystemPromptContribution.guidelines] : undefined,\n\t\tprepareArguments: prepareShellInput,\n\t\tparameters: bashSchema,\n\t\toutputSchema: bashOutputSchema,\n\t\tmaxResultSizeChars: Infinity,\n\t\tasync execute(_toolCallId, bashCommand: BashToolInput, signal?: AbortSignal, onUpdate?, ctx?: ExtensionContext) {\n\t\t\tif (bashCommand.action !== undefined) {\n\t\t\t\tif (\n\t\t\t\t\tbashCommand.action !== \"wait\" ||\n\t\t\t\t\ttypeof bashCommand.id !== \"string\" ||\n\t\t\t\t\tObject.keys(bashCommand).some((key) => ![\"action\", \"id\", \"budgetMs\"].includes(key)) ||\n\t\t\t\t\t(bashCommand.budgetMs !== undefined &&\n\t\t\t\t\t\t(typeof bashCommand.budgetMs !== \"number\" ||\n\t\t\t\t\t\t\t!Number.isFinite(bashCommand.budgetMs) ||\n\t\t\t\t\t\t\tbashCommand.budgetMs < 0))\n\t\t\t\t)\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\"Invalid shell wait: expected action wait, id, and optional finite non-negative budgetMs\",\n\t\t\t\t\t);\n\t\t\t\treturn waitForSupervisedCommand(options?.taskOwner, bashCommand.id, bashCommand.budgetMs, signal, {\n\t\t\t\t\ttempFilePrefix: presentation.tempFilePrefix,\n\t\t\t\t\ttempDir: resolveSessionTempDir(),\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (\n\t\t\t\tbashCommand.id !== undefined ||\n\t\t\t\tbashCommand.budgetMs !== undefined ||\n\t\t\t\ttypeof bashCommand.command !== \"string\"\n\t\t\t)\n\t\t\t\tthrow new Error(\"Invalid shell command: command is required; id and budgetMs require action wait\");\n\t\t\tconst { command } = bashCommand;\n\t\t\tconst timeout = normalizeTimeoutSeconds(bashCommand.timeout);\n\t\t\tvalidateBashWait(bashCommand.wait, !!options?.operations || !!options?.taskOwner);\n\t\t\tconst sessionEnvironment = snapshotBashSessionEnvironment(ctx, exposeSessionEnvironment);\n\t\t\tconst resourceCtx = ctx as InternalResourceContext | undefined;\n\t\t\tconst executionCwd = ctx?.cwd || cwd;\n\t\t\tconst hasExplicitCwd = typeof bashCommand.cwd === \"string\";\n\t\t\tconst rawStrippedContext = hasExplicitCwd ? undefined : stripLeadingCdCommand(command, executionCwd);\n\t\t\tconst interceptorEnabled = isInterceptorEnabled();\n\t\t\tif (interceptorEnabled)\n\t\t\t\tcheckBashInterceptionCandidates([command, rawStrippedContext?.command], availableTools, interceptorRules);\n\t\t\tconst cwdInput = hasExplicitCwd\n\t\t\t\t\t? await expandShellInternalUrls(bashCommand.cwd!, executionCwd, resourceCtx)\n\t\t\t\t\t: executionCwd,\n\t\t\t\trequestedCwd = resolvePath(executionCwd, cwdInput);\n\t\t\tconst expandedCommand = await expandShellInternalUrls(\n\t\t\t\tcommand,\n\t\t\t\texecutionCwd,\n\t\t\t\tresourceCtx,\n\t\t\t\ttrue,\n\t\t\t\toptions?.shellDialect,\n\t\t\t);\n\t\t\tconst strippedExpandedContext = hasExplicitCwd\n\t\t\t\t? undefined\n\t\t\t\t: stripLeadingCdCommand(expandedCommand, requestedCwd);\n\t\t\tconst resolvedCommand = commandPrefix ? `${commandPrefix}\\n${expandedCommand}` : expandedCommand;\n\t\t\tconst spawnContext = resolveSpawnContext(resolvedCommand, requestedCwd, sessionEnvironment, spawnHook);\n\t\t\tconst strippedCdContext = strippedExpandedContext\n\t\t\t\t? resolveSpawnContext(\n\t\t\t\t\t\tcommandPrefix\n\t\t\t\t\t\t\t? `${commandPrefix}\\n${strippedExpandedContext.command}`\n\t\t\t\t\t\t\t: strippedExpandedContext.command,\n\t\t\t\t\t\tstrippedExpandedContext.cwd,\n\t\t\t\t\t\tsessionEnvironment,\n\t\t\t\t\t\tspawnHook,\n\t\t\t\t\t)\n\t\t\t\t: undefined;\n\t\t\tif (interceptorEnabled)\n\t\t\t\tcheckBashInterceptionCandidates(\n\t\t\t\t\t[\n\t\t\t\t\t\texpandedCommand,\n\t\t\t\t\t\tstrippedExpandedContext?.command,\n\t\t\t\t\t\tresolvedCommand,\n\t\t\t\t\t\tspawnContext.command,\n\t\t\t\t\t\tstrippedCdContext?.command,\n\t\t\t\t\t],\n\t\t\t\t\tavailableTools,\n\t\t\t\t\tinterceptorRules,\n\t\t\t\t);\n\t\t\tlet expandedEnv: NodeJS.ProcessEnv | undefined;\n\t\t\tif (bashCommand.env) {\n\t\t\t\texpandedEnv = {};\n\t\t\t\tfor (const [key, value] of Object.entries(bashCommand.env)) {\n\t\t\t\t\tif (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(key)) throw new Error(`Invalid bash env name: ${key}`);\n\t\t\t\t\texpandedEnv[key] = await expandShellInternalUrls(value, executionCwd, resourceCtx);\n\t\t\t\t}\n\t\t\t\tspawnContext.env = { ...spawnContext.env, ...expandedEnv };\n\t\t\t}\n\t\t\tif (strippedCdContext && expandedEnv) strippedCdContext.env = { ...strippedCdContext.env, ...expandedEnv };\n\t\t\tapplyBashSessionEnvironment(spawnContext.env, sessionEnvironment);\n\t\t\tif (strippedCdContext) applyBashSessionEnvironment(strippedCdContext.env, sessionEnvironment);\n\t\t\tconst primaryInterception = interceptorEnabled && interceptor ? await interceptor(spawnContext) : undefined;\n\t\t\tconst fallbackInterception =\n\t\t\t\t!primaryInterception && strippedCdContext && interceptorEnabled && interceptor\n\t\t\t\t\t? await interceptor(strippedCdContext)\n\t\t\t\t\t: undefined;\n\t\t\tconst intercepted = primaryInterception ?? fallbackInterception;\n\t\t\tif (intercepted?.result) return bashResultToToolResult(intercepted.result);\n\t\t\tconst ops = intercepted?.operations ?? defaultOps;\n\t\t\tconst executionContext = primaryInterception ? spawnContext : (strippedCdContext ?? spawnContext);\n\t\t\tconst output = new OutputAccumulator({\n\t\t\t\ttempFilePrefix: presentation.tempFilePrefix,\n\t\t\t\ttempDir: resolveSessionTempDir(),\n\t\t\t});\n\t\t\tlet acceptingOutput = true;\n\t\t\tlet updateTimer: NodeJS.Timeout | undefined;\n\t\t\tlet updateDirty = false;\n\t\t\tlet lastUpdateAt = 0;\n\t\t\tconst emitOutputUpdate = () => {\n\t\t\t\tif (!onUpdate || !updateDirty) return;\n\t\t\t\tupdateDirty = false;\n\t\t\t\tlastUpdateAt = Date.now();\n\t\t\t\tconst snapshot = output.snapshot({ persistIfTruncated: true });\n\t\t\t\tonUpdate({\n\t\t\t\t\tcontent: [{ type: \"text\", text: snapshot.content || \"\" }],\n\t\t\t\t\tdetails: {\n\t\t\t\t\t\ttruncation: snapshot.truncation.truncated ? snapshot.truncation : undefined,\n\t\t\t\t\t\tfullOutputPath: snapshot.fullOutputPath,\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t};\n\t\t\tconst clearUpdateTimer = () => {\n\t\t\t\tif (updateTimer) {\n\t\t\t\t\tclearTimeout(updateTimer);\n\t\t\t\t\tupdateTimer = undefined;\n\t\t\t\t}\n\t\t\t};\n\t\t\tconst scheduleOutputUpdate = () => {\n\t\t\t\tif (!onUpdate) return;\n\t\t\t\tupdateDirty = true;\n\t\t\t\tconst delay = BASH_UPDATE_THROTTLE_MS - (Date.now() - lastUpdateAt);\n\t\t\t\tif (delay <= 0) {\n\t\t\t\t\tclearUpdateTimer();\n\t\t\t\t\temitOutputUpdate();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tupdateTimer ??= setTimeout(() => {\n\t\t\t\t\tupdateTimer = undefined;\n\t\t\t\t\temitOutputUpdate();\n\t\t\t\t}, delay);\n\t\t\t};\n\t\t\tif (onUpdate) {\n\t\t\t\tonUpdate({ content: [], details: undefined });\n\t\t\t}\n\t\t\tconst handleData = (data: Buffer) => {\n\t\t\t\tif (!acceptingOutput) return;\n\t\t\t\toutput.append(data);\n\t\t\t\tscheduleOutputUpdate();\n\t\t\t};\n\t\t\tconst finishOutput = async () => {\n\t\t\t\tacceptingOutput = false;\n\t\t\t\toutput.finish();\n\t\t\t\tclearUpdateTimer();\n\t\t\t\temitOutputUpdate();\n\t\t\t\tconst snapshot = output.snapshot({ persistIfTruncated: true });\n\t\t\t\ttry {\n\t\t\t\t\tawait output.closeTempFile();\n\t\t\t\t} catch {\n\t\t\t\t\t// The spill file could not be flushed. Keep the truncated result, but\n\t\t\t\t\t// re-read the snapshot so the now-cleared path is not advertised.\n\t\t\t\t\treturn output.snapshot();\n\t\t\t\t}\n\t\t\t\treturn snapshot;\n\t\t\t};\n\t\t\tconst formatOutput = (snapshot: Awaited<ReturnType<typeof finishOutput>>, emptyText = \"(no output)\") => {\n\t\t\t\tconst truncation = snapshot.truncation;\n\t\t\t\tlet text = snapshot.content || emptyText;\n\t\t\t\tlet details: BashToolDetails | undefined;\n\t\t\t\tif (truncation.truncated) {\n\t\t\t\t\tdetails = { truncation, fullOutputPath: snapshot.fullOutputPath };\n\t\t\t\t\tconst startLine = truncation.totalLines - truncation.outputLines + 1;\n\t\t\t\t\tconst endLine = truncation.totalLines;\n\t\t\t\t\t// Persistence can be refused (a temp directory we will not write\n\t\t\t\t\t// through, a full or read-only disk), and then there is no path to\n\t\t\t\t\t// name. Every other renderer already omits the clause; this one must\n\t\t\t\t\t// too, rather than handing the model the string \"undefined\".\n\t\t\t\t\tconst fullOutputNote = snapshot.fullOutputPath ? ` Full output: ${snapshot.fullOutputPath}` : \"\";\n\t\t\t\t\tif (truncation.lastLinePartial) {\n\t\t\t\t\t\tconst lastLineSize = formatSize(output.getLastLineBytes());\n\t\t\t\t\t\ttext += `\\n\\n[Showing last ${formatSize(truncation.outputBytes)} of line ${endLine} (line is ${lastLineSize}).${fullOutputNote}]`;\n\t\t\t\t\t} else if (truncation.truncatedBy === \"lines\") {\n\t\t\t\t\t\ttext += `\\n\\n[Showing lines ${startLine}-${endLine} of ${truncation.totalLines}.${fullOutputNote}]`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttext += `\\n\\n[Showing lines ${startLine}-${endLine} of ${truncation.totalLines} (${formatSize(DEFAULT_MAX_BYTES)} limit).${fullOutputNote}]`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn { text, details };\n\t\t\t};\n\t\t\tconst startedAt = Date.now();\n\t\t\tconst withTiming = (details: BashToolDetails | undefined): BashToolDetails => ({\n\t\t\t\t...details,\n\t\t\t\ttimeoutSeconds: timeout,\n\t\t\t\t...(bashCommand.timeout !== undefined && bashCommand.timeout !== timeout\n\t\t\t\t\t? { requestedTimeoutSeconds: bashCommand.timeout }\n\t\t\t\t\t: {}),\n\t\t\t\twallTimeMs: Date.now() - startedAt,\n\t\t\t});\n\t\t\tconst appendStatus = (text: string, status: string) => `${text ? `${text}\\n\\n` : \"\"}${status}`;\n\t\t\ttry {\n\t\t\t\tlet exitCode: number | null;\n\t\t\t\tlet observation: SupervisedCommandResult[\"observation\"];\n\t\t\t\ttry {\n\t\t\t\t\tconst result = await ops.exec(executionContext.command, executionContext.cwd, {\n\t\t\t\t\t\tonData: handleData,\n\t\t\t\t\t\tsignal,\n\t\t\t\t\t\ttimeout,\n\t\t\t\t\t\twait: bashCommand.wait,\n\t\t\t\t\t\tenv: executionContext.env,\n\t\t\t\t\t\tpty: bashCommand.pty,\n\t\t\t\t\t});\n\t\t\t\t\texitCode = result.exitCode;\n\t\t\t\t\tobservation = result.observation;\n\t\t\t\t} catch (err) {\n\t\t\t\t\tconst snapshot = await finishOutput();\n\t\t\t\t\tconst { text } = formatOutput(snapshot, \"\");\n\t\t\t\t\tif (err instanceof Error && err.message === \"aborted\") {\n\t\t\t\t\t\tthrow new Error(appendStatus(text, \"Command aborted\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (err instanceof Error && err.message.startsWith(\"timeout:\")) {\n\t\t\t\t\t\tconst timeoutSecs = err.message.split(\":\")[1];\n\t\t\t\t\t\tthrow new Error(appendStatus(text, `Command timed out after ${timeoutSecs} seconds`));\n\t\t\t\t\t}\n\t\t\t\t\tthrow err;\n\t\t\t\t}\n\t\t\t\tconst snapshot = await finishOutput();\n\t\t\t\tconst { text: outputText, details } = formatOutput(snapshot);\n\t\t\t\tif (observation?.kind === \"yielded\")\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcontent: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\t\ttext: appendStatus(outputText, `Command is still running (task ${observation.taskId}).`),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tdetails: { ...withTiming(details), observation },\n\t\t\t\t\t};\n\t\t\t\tif (exitCode === null) {\n\t\t\t\t\tthrow new Error(appendStatus(outputText, \"Command terminated without an exit code\"));\n\t\t\t\t}\n\t\t\t\tconst fullOutput = await output.readFullOutput(STRUCTURED_OUTPUT_MAX_BYTES);\n\t\t\t\tconst structuredContent = {\n\t\t\t\t\toutput: fullOutput.content,\n\t\t\t\t\ttruncated: fullOutput.truncated,\n\t\t\t\t\t...(fullOutput.truncated && snapshot.fullOutputPath\n\t\t\t\t\t\t? { full_output_path: snapshot.fullOutputPath }\n\t\t\t\t\t\t: {}),\n\t\t\t\t\texit_code: exitCode,\n\t\t\t\t\twall_time_seconds: Math.round((Date.now() - startedAt) / 100) / 10,\n\t\t\t\t};\n\t\t\t\tif (exitCode !== 0) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcontent: [{ type: \"text\", text: appendStatus(outputText, `Command exited with code ${exitCode}`) }],\n\t\t\t\t\t\tdetails: { ...withTiming(details), exitCode },\n\t\t\t\t\t\tisError: true,\n\t\t\t\t\t\tstructuredContent,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn { content: [{ type: \"text\", text: outputText }], details: withTiming(details), structuredContent };\n\t\t\t} finally {\n\t\t\t\tinvalidateNativeSearchCache();\n\t\t\t\tclearUpdateTimer();\n\t\t\t}\n\t\t},\n\t\trenderCall(args, _theme, context) {\n\t\t\tstartToolTimer(context);\n\t\t\tconst text = (context.lastComponent as Text | undefined) ?? new Text(\"\", 0, 0);\n\t\t\ttext.setText(formatBashCall(args, presentation.prompt));\n\t\t\treturn text;\n\t\t},\n\t\trenderResult(result, options, _theme, context) {\n\t\t\t// A command yielded to the background is still running, so its row reports how long it was observed.\n\t\t\tconst finalLabel = result.details?.observation?.kind === \"yielded\" ? \"Observed for\" : \"Took\";\n\t\t\tconst timerText = toolTimerText(context, options.isPartial, finalLabel);\n\t\t\tconst component = (context.lastComponent as Container | undefined) ?? new Container();\n\t\t\tconst waited =\n\t\t\t\tcontext.args.action === \"wait\" &&\n\t\t\t\trebuildShellWaitResult(component, result, options, {\n\t\t\t\t\tshowImages: context.showImages,\n\t\t\t\t\tisError: context.isError,\n\t\t\t\t\ttaskId: context.args.id,\n\t\t\t\t\ttimerText,\n\t\t\t\t\tcwd: context.cwd,\n\t\t\t\t});\n\t\t\tif (!waited) {\n\t\t\t\trebuildBashResultRenderComponent(component, result, options, context.showImages, timerText, context.cwd);\n\t\t\t}\n\t\t\tcomponent.invalidate();\n\t\t\treturn component;\n\t\t},\n\t};\n}\nexport function createBashTool(cwd: string, options?: BashToolOptions): AgentTool<typeof bashSchema> {\n\treturn wrapToolDefinition(createBashToolDefinition(cwd, options));\n}\n"]}
1
+ {"version":3,"file":"bash.js","sourceRoot":"","sources":["../../../src/core/tools/bash.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,MAAM,IAAI,QAAQ,EAAE,IAAI,IAAI,MAAM,EAAE,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAE,SAAS,IAAI,WAAW,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAe,IAAI,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAE,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,MAAM,wCAAwC,CAAC;AAC/D,OAAO,EAAE,6BAA6B,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAClG,OAAO,EACN,cAAc,EACd,WAAW,EACX,eAAe,EACf,qBAAqB,EACrB,uBAAuB,GACvB,MAAM,sBAAsB,CAAC;AAI9B,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,OAAO,EAEN,+BAA+B,EAC/B,8BAA8B,GAC9B,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EACN,gBAAgB,EAChB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AAE,OAAO,EAAE,MAAM,EAAE,OAAO;YAC5C,qGAAqG;YACrG,MAAM,UAAU,GAAG,MAAM,CAAC,OAAO,EAAE,WAAW,EAAE,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,MAAM,CAAC;YAC7F,MAAM,SAAS,GAAG,aAAa,CAAC,OAAO,EAAE,OAAO,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC;YACxE,MAAM,SAAS,GAAI,OAAO,CAAC,aAAuC,IAAI,IAAI,SAAS,EAAE,CAAC;YACtF,MAAM,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,MAAM,KAAK,MAAM;gBAC9B,sBAAsB,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE;oBAClD,UAAU,EAAE,OAAO,CAAC,UAAU;oBAC9B,OAAO,EAAE,OAAO,CAAC,OAAO;oBACxB,MAAM,EAAE,OAAO,CAAC,IAAI,CAAC,EAAE;oBACvB,SAAS;oBACT,GAAG,EAAE,OAAO,CAAC,GAAG;iBAChB,CAAC,CAAC;YACJ,IAAI,CAAC,MAAM,EAAE,CAAC;gBACb,gCAAgC,CAAC,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,CAAC,UAAU,EAAE,SAAS,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC;YAC1G,CAAC;YACD,SAAS,CAAC,UAAU,EAAE,CAAC;YACvB,OAAO,SAAS,CAAC;QAClB,CAAC;KACD,CAAC;AACH,CAAC;AACD,MAAM,UAAU,cAAc,CAAC,GAAW,EAAE,OAAyB;IACpE,OAAO,kBAAkB,CAAC,wBAAwB,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC;AACnE,CAAC","sourcesContent":["import { constants } from \"node:fs\";\nimport { access as fsAccess, stat as fsStat } from \"node:fs/promises\";\nimport { constants as osConstants } from \"node:os\";\nimport { resolve as resolvePath } from \"node:path\";\nimport type { AgentTool } from \"@earendil-works/pi-agent-core\";\nimport { Container, Text } from \"@earendil-works/pi-tui\";\nimport { spawn } from \"child_process\";\nimport { type Static, Type } from \"typebox\";\nimport { APP_NAME } from \"../../config.js\";\nimport { theme } from \"../../modes/interactive/theme/theme.js\";\nimport { createChildProcessEnvironment, waitForChildProcess } from \"../../utils/child-process.ts\";\nimport {\n\tgetShellConfig,\n\tgetShellEnv,\n\tkillProcessTree,\n\ttrackDetachedChildPid,\n\tuntrackDetachedChildPid,\n} from \"../../utils/shell.ts\";\nimport type { BashResult } from \"../bash-executor.ts\";\nimport type { ExtensionContext, ToolDefinition, ToolRenderResultOptions } from \"../extensions/types.ts\";\nimport type { WaitPolicy } from \"../tasks/contracts.js\";\nimport { validateTaskHeartbeatMs } from \"../tasks/heartbeat-notice.js\";\nimport {\n\ttype BashInterceptorRule,\n\tcheckBashInterceptionCandidates,\n\tDEFAULT_BASH_INTERCEPTOR_RULES,\n} from \"./bash-interceptor.ts\";\nimport { stripLeadingCdCommand } from \"./bash-leading-cd.ts\";\nimport {\n\texecuteNativePty,\n\texecuteSupervisedCommand,\n\ttype SupervisedCommandOwner,\n\ttype SupervisedCommandResult,\n\tvalidateBashWait,\n\twaitForSupervisedCommand,\n} from \"./bash-pty-native.js\";\nimport { applyBashSessionEnvironment, snapshotBashSessionEnvironment } from \"./bash-session-environment.ts\";\nimport { OutputAccumulator } from \"./output-accumulator.ts\";\nimport {\n\tgetTextOutput,\n\tinvalidArgText,\n\tlinkPath,\n\tstartToolTimer,\n\tstr,\n\ttype ToolTimerState,\n\ttoolTimerText,\n} from \"./render-utils.ts\";\nimport { expandShellInternalUrls, type InternalResourceContext } from \"./resource-selectors.ts\";\nimport { invalidateNativeSearchCache } from \"./search-native.ts\";\nimport { addShellOutputPreview, formatTruncationNotice, rebuildShellWaitResult } from \"./shell-task-render.ts\";\nimport { wrapToolDefinition } from \"./tool-definition-wrapper.ts\";\nimport { DEFAULT_MAX_BYTES, formatSize, type TruncationResult } from \"./truncate.ts\";\n\nconst STRUCTURED_OUTPUT_MAX_BYTES = 1024 * 1024;\nconst bashOutputSchema = Type.Object({\n\toutput: Type.String({\n\t\tdescription: \"Combined stdout and stderr, up to 1 MiB, keeping the first and last 512 KiB when longer.\",\n\t}),\n\ttruncated: Type.Boolean(),\n\tfull_output_path: Type.Optional(Type.String()),\n\texit_code: Type.Number(),\n\twall_time_seconds: Type.Number(),\n});\n\nconst envSchema = Type.Unsafe<Record<string, string>>({\n\ttype: \"object\",\n\tdescription: \"Environment variables to add or override.\",\n\tadditionalProperties: { type: \"string\" },\n\tpropertyNames: { pattern: \"^[A-Za-z_][A-Za-z0-9_]*$\" },\n});\nconst bashBaseSchema = Type.Object(\n\t{\n\t\tcommand: Type.String({ description: \"Shell command to execute.\" }),\n\t\tenv: Type.Optional(envSchema),\n\t\ttimeout: Type.Optional(Type.Number({ description: \"Timeout in seconds.\" })),\n\t\twait: Type.Optional(\n\t\t\tType.Unsafe<WaitPolicy>({\n\t\t\t\ttype: \"object\",\n\t\t\t\tproperties: {\n\t\t\t\t\tkind: { type: \"string\", enum: [\"background\", \"foreground\"] },\n\t\t\t\t\tbudgetMs: {\n\t\t\t\t\t\ttype: \"number\",\n\t\t\t\t\t\tminimum: 0,\n\t\t\t\t\t\tdescription: \"Foreground observation budget in milliseconds; only valid with foreground.\",\n\t\t\t\t\t},\n\t\t\t\t},\n\t\t\t\trequired: [\"kind\"],\n\t\t\t\tadditionalProperties: false,\n\t\t\t\tdescription:\n\t\t\t\t\t\"Observation policy, independent of execution timeout. Omit for owner-configured automatic yield (default 10s).\",\n\t\t\t}),\n\t\t),\n\t\tcwd: Type.Optional(Type.String({ description: \"Working directory for the command.\" })),\n\t\tpty: Type.Optional(Type.Boolean({ description: \"Run with PTY handling.\" })),\n\t\theartbeatMs: Type.Optional(\n\t\t\tType.Number({\n\t\t\t\tminimum: 0,\n\t\t\t\tdescription: \"Heartbeat cadence in ms while this runs as a task (default 15 min; 0 disables; min 60000).\",\n\t\t\t}),\n\t\t),\n\t},\n\t{ additionalProperties: false },\n);\ntype ShellCommandInput = Static<typeof bashBaseSchema> & { action?: never; id?: never; budgetMs?: never };\ntype ShellWaitInput = { action: \"wait\"; id: string; budgetMs?: number } & Partial<\n\tRecord<keyof Static<typeof bashBaseSchema>, never>\n>;\nconst bashSchema = Type.Unsafe<ShellCommandInput | ShellWaitInput>({\n\t...bashBaseSchema,\n\tproperties: {\n\t\t...bashBaseSchema.properties,\n\t\taction: {\n\t\t\ttype: \"string\",\n\t\t\tenum: [\"wait\"],\n\t\t\tdescription: \"Observe an existing asynchronous task without executing a command.\",\n\t\t},\n\t\tid: { type: \"string\", description: \"Existing task ID owned by this session.\" },\n\t\tbudgetMs: {\n\t\t\ttype: \"number\",\n\t\t\tminimum: 0,\n\t\t\tdescription: \"Observation budget in milliseconds; omitted uses owner policy.\",\n\t\t},\n\t},\n\trequired: [],\n});\nconst shellCommandKeys = Object.keys(bashBaseSchema.properties);\n\nfunction prepareShellInput(args: unknown): BashToolInput {\n\tif (typeof args !== \"object\" || args === null || Array.isArray(args)) return args as BashToolInput;\n\tconst has = (key: string) => Object.hasOwn(args, key);\n\tif (has(\"action\")) {\n\t\tif (!has(\"id\") || shellCommandKeys.some(has))\n\t\t\tthrow new Error(\"Invalid shell wait: expected action wait, id, and optional finite non-negative budgetMs\");\n\t} else if (!has(\"command\") || has(\"id\") || has(\"budgetMs\")) {\n\t\tthrow new Error(\"Invalid shell command: command is required; id and budgetMs require action wait\");\n\t}\n\treturn args as BashToolInput;\n}\nexport const bashToolSystemPromptContribution = Object.freeze({\n\tsnippet: \"Execute a shell command.\",\n\tguidelines: Object.freeze([\n\t\t\"You can inspect ATOMIC_* or PI_* environment variables for current model and session details.\",\n\t\t'Use { action: \"wait\", id: taskId } to observe an existing shell task with the owner policy. Avoid repeated short polls; await completion notifications when no dependent work is blocked. Never relaunch a yielded command. Waiting does not extend execution timeout or owner lifetime.',\n\t\t\"For ordinary commands, omit wait to use the owner's observation policy (normally 10s). Do not routinely request one-second waits: premature yields add tool calls without making the command faster. Use a short budget only for a concrete responsiveness need, or explicit background observation when you have independent work to do. Explicit budgets, including zero for polling, remain available.\",\n\t\t\"Choose foreground or background shell observation as needed without asking the user each time. Background yields after admission; foreground waits for its optional budget then the same command continues in background. Omitted wait uses owner-configured automatic background yield (default 10s). Observation never changes the execution timeout, which stops the command. Background requires a supported task owner; unbound foreground waits until completion regardless of budget.\",\n\t] as const),\n} as const);\nexport type BashToolInput = Static<typeof bashSchema>;\nexport interface BashToolDetails {\n\ttruncation?: TruncationResult;\n\tfullOutputPath?: string;\n\texitCode?: number | null;\n\tobservation?: import(\"../tasks/contracts.js\").WaitOutcome;\n\ttimeoutSeconds?: number;\n\trequestedTimeoutSeconds?: number;\n\twallTimeMs?: number;\n}\nconst DEFAULT_TIMEOUT_SECONDS = 300,\n\tMAX_TIMEOUT_SECONDS = 3600;\nexport function validateExplicitTimeoutSeconds(timeout: number): void {\n\tif (!Number.isFinite(timeout) || timeout <= 0 || timeout > MAX_TIMEOUT_SECONDS)\n\t\tthrow new Error(\n\t\t\t`Invalid timeout ${String(timeout)}: timeout must be a finite number greater than 0 and no more than ${MAX_TIMEOUT_SECONDS} seconds`,\n\t\t);\n}\nfunction normalizeTimeoutSeconds(timeout: number | undefined): number {\n\tif (timeout === undefined) return DEFAULT_TIMEOUT_SECONDS;\n\tvalidateExplicitTimeoutSeconds(timeout);\n\treturn Math.max(1, Math.floor(timeout));\n}\nexport type BashOutputChannel = \"stdout\" | \"stderr\";\nexport interface BashOperations {\n\texec: (\n\t\tcommand: string,\n\t\tcwd: string,\n\t\toptions: {\n\t\t\tonData: (data: Buffer, channel?: BashOutputChannel) => void;\n\t\t\tsignal?: AbortSignal;\n\t\t\ttimeout?: number;\n\t\t\twait?: WaitPolicy;\n\t\t\tenv?: NodeJS.ProcessEnv;\n\t\t\tpty?: boolean;\n\t\t\t/** Task heartbeat cadence for a supervised command; `0` disables. Omitted uses the owner default. */\n\t\t\theartbeatMs?: number;\n\t\t},\n\t) => Promise<SupervisedCommandResult>;\n}\nexport function createLocalBashOperations(options?: {\n\tshellPath?: string;\n\ttaskOwner?: SupervisedCommandOwner;\n}): BashOperations {\n\treturn {\n\t\texec: async (command, cwd, { onData, signal, timeout, wait, env, pty, heartbeatMs }) => {\n\t\t\tvalidateBashWait(wait, !!options?.taskOwner);\n\t\t\tif (timeout !== undefined) validateExplicitTimeoutSeconds(timeout);\n\t\t\tif (pty && process.env.PI_NO_PTY !== \"1\" && process.env.ATOMIC_NO_PTY !== \"1\") {\n\t\t\t\ttry {\n\t\t\t\t\treturn await executeNativePty(command, cwd, {\n\t\t\t\t\t\tonData: (data) => onData(data, \"stdout\"),\n\t\t\t\t\t\tsignal,\n\t\t\t\t\t\ttimeout,\n\t\t\t\t\t\twait,\n\t\t\t\t\t\tenv,\n\t\t\t\t\t\theartbeatMs,\n\t\t\t\t\t\tshellPath: options?.shellPath,\n\t\t\t\t\t\ttaskOwner: options?.taskOwner,\n\t\t\t\t\t});\n\t\t\t\t} catch (error) {\n\t\t\t\t\tif (options?.taskOwner) throw error;\n\t\t\t\t\tconst message = String(error instanceof Error ? error.message : error);\n\t\t\t\t\tif (!message.includes(\"Native PTY\") && !message.includes(\"PtySession\")) throw error;\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst shellConfig = getShellConfig(options?.shellPath);\n\t\t\ttry {\n\t\t\t\tconst cwdStat = await fsStat(cwd);\n\t\t\t\tif (!cwdStat.isDirectory()) throw new Error(`Working directory is not a directory: ${cwd}`);\n\t\t\t\tawait fsAccess(cwd, constants.F_OK);\n\t\t\t} catch (error) {\n\t\t\t\tif (error instanceof Error && error.message.startsWith(\"Working directory is not a directory\")) throw error;\n\t\t\t\tthrow new Error(`Working directory does not exist: ${cwd}\\nCannot execute bash commands.`);\n\t\t\t}\n\t\t\tif (signal?.aborted) throw new Error(\"aborted\");\n\t\t\tif (options?.taskOwner)\n\t\t\t\treturn executeSupervisedCommand(\n\t\t\t\t\tcommand,\n\t\t\t\t\tcwd,\n\t\t\t\t\t{\n\t\t\t\t\t\tonData,\n\t\t\t\t\t\tsignal,\n\t\t\t\t\t\ttimeout,\n\t\t\t\t\t\twait,\n\t\t\t\t\t\tenv,\n\t\t\t\t\t\theartbeatMs,\n\t\t\t\t\t\tshellPath: options.shellPath,\n\t\t\t\t\t\ttaskOwner: options.taskOwner,\n\t\t\t\t\t},\n\t\t\t\t\tfalse,\n\t\t\t\t);\n\t\t\tconst commandFromStdin = shellConfig.commandTransport === \"stdin\";\n\t\t\tconst child = spawn(shellConfig.shell, commandFromStdin ? shellConfig.args : [...shellConfig.args, command], {\n\t\t\t\tcwd,\n\t\t\t\tdetached: process.platform !== \"win32\",\n\t\t\t\tenv: createChildProcessEnvironment(undefined, env ?? getShellEnv()),\n\t\t\t\tstdio: [commandFromStdin ? \"pipe\" : \"ignore\", \"pipe\", \"pipe\"],\n\t\t\t\twindowsHide: true,\n\t\t\t});\n\t\t\tif (commandFromStdin) {\n\t\t\t\tchild.stdin?.on(\"error\", () => {});\n\t\t\t\tchild.stdin?.end(command);\n\t\t\t}\n\t\t\tif (child.pid) trackDetachedChildPid(child.pid);\n\t\t\tlet timedOut = false;\n\t\t\tlet timeoutHandle: NodeJS.Timeout | undefined;\n\t\t\tconst onAbort = () => {\n\t\t\t\tif (child.pid) killProcessTree(child.pid);\n\t\t\t};\n\t\t\ttry {\n\t\t\t\tif (timeout !== undefined && timeout > 0) {\n\t\t\t\t\ttimeoutHandle = setTimeout(() => {\n\t\t\t\t\t\ttimedOut = true;\n\t\t\t\t\t\tif (child.pid) killProcessTree(child.pid);\n\t\t\t\t\t}, timeout * 1000);\n\t\t\t\t}\n\t\t\t\tchild.stdout?.on(\"data\", (data: Buffer) => onData(data, \"stdout\"));\n\t\t\t\tchild.stderr?.on(\"data\", (data: Buffer) => onData(data, \"stderr\"));\n\t\t\t\tif (signal) {\n\t\t\t\t\tif (signal.aborted) onAbort();\n\t\t\t\t\telse signal.addEventListener(\"abort\", onAbort, { once: true });\n\t\t\t\t}\n\t\t\t\tconst exitCode = await waitForChildProcess(child);\n\t\t\t\tif (signal?.aborted) throw new Error(\"aborted\");\n\t\t\t\tif (timedOut) {\n\t\t\t\t\tthrow new Error(`timeout:${timeout}`);\n\t\t\t\t}\n\t\t\t\tconst signalCode = child.signalCode;\n\t\t\t\treturn { exitCode: exitCode ?? (signalCode ? 128 + (osConstants.signals[signalCode] ?? 0) : 1) };\n\t\t\t} finally {\n\t\t\t\tif (child.pid) untrackDetachedChildPid(child.pid);\n\t\t\t\tif (timeoutHandle) clearTimeout(timeoutHandle);\n\t\t\t\tif (signal) signal.removeEventListener(\"abort\", onAbort);\n\t\t\t}\n\t\t},\n\t};\n}\nexport interface BashSpawnContext {\n\tcommand: string;\n\tcwd: string;\n\tenv: NodeJS.ProcessEnv;\n}\nexport type BashSpawnHook = (context: BashSpawnContext) => BashSpawnContext;\nfunction resolveSpawnContext(\n\tcommand: string,\n\tcwd: string,\n\tsessionEnvironment: NodeJS.ProcessEnv,\n\tspawnHook?: BashSpawnHook,\n): BashSpawnContext {\n\tconst baseContext: BashSpawnContext = { command, cwd, env: { ...getShellEnv() } };\n\tapplyBashSessionEnvironment(baseContext.env, sessionEnvironment);\n\treturn spawnHook ? spawnHook(baseContext) : baseContext;\n}\nexport interface BashInterceptorResult {\n\toperations?: BashOperations;\n\tresult?: BashResult;\n}\nexport type BashInterceptor = (\n\tcontext: BashSpawnContext,\n) => Promise<BashInterceptorResult | undefined> | BashInterceptorResult | undefined;\nexport interface BashToolOptions {\n\toperations?: BashOperations;\n\t/** Trusted host ownership; never supplied by model arguments. */\n\ttaskOwner?: SupervisedCommandOwner;\n\t/** Expose the execution-time Atomic session snapshot and PI compatibility aliases. Default: true. */\n\texposeSessionEnvironment?: boolean;\n\t/** Prefix prepended to every shell command before execution. */\n\tcommandPrefix?: string;\n\t/** Override shell executable resolution for local bash operations. */\n\tshellPath?: string;\n\t/** Dialect for generated internal-URL path literals. Defaults to POSIX; does not select the executable. */\n\tshellDialect?: \"posix\" | \"powershell\";\n\t/** Last-mile hook for rewriting the command/cwd/env spawn context. */\n\tspawnHook?: BashSpawnHook;\n\t/** Optional command interceptor used by extensions and parity tests. */\n\tinterceptor?: BashInterceptor;\n\tinterceptorEnabled?: boolean | (() => boolean);\n\tavailableTools?: string[];\n\tinterceptorRules?: BashInterceptorRule[];\n\t/**\n\t * Session-scoped directory for overflow logs, resolved per execution so a\n\t * session switch (fork, branch, resume) follows the live transcript session.\n\t */\n\tsessionTempDir?: string | (() => string | undefined);\n}\n/**\n * Presentation identity for a shell-backed built-in tool. Atomic runs PowerShell\n * through the same execution pipeline as bash, so the transcript prompt and the\n * overflow temp-file prefix are the only shell-specific display values.\n */\nexport interface ShellToolPresentation {\n\t/** Transcript prompt prefix: `$` for bash, `PS>` for PowerShell. */\n\tprompt: string;\n\t/** Prefix for the temp file that holds truncated output. */\n\ttempFilePrefix: string;\n}\nexport const BASH_SHELL_PRESENTATION: ShellToolPresentation = {\n\tprompt: \"$\",\n\ttempFilePrefix: `${APP_NAME}-bash`,\n};\nconst BASH_UPDATE_THROTTLE_MS = 100;\nfunction bashResultToToolResult(result: BashResult): {\n\tcontent: Array<{ type: \"text\"; text: string }>;\n\tdetails: BashToolDetails | undefined;\n} {\n\tconst details: BashToolDetails | undefined = result.truncated\n\t\t? { fullOutputPath: result.fullOutputPath }\n\t\t: undefined;\n\tconst status = result.cancelled\n\t\t? \"Command aborted\"\n\t\t: result.exitCode && result.exitCode !== 0\n\t\t\t? `Command exited with code ${result.exitCode}`\n\t\t\t: undefined;\n\tconst text = `${result.output || \"(no output)\"}${status ? `\\n\\n${status}` : \"\"}`;\n\treturn { content: [{ type: \"text\", text }], details };\n}\nfunction formatBashCall(\n\targs: { command?: string; timeout?: number; action?: string; id?: string } | undefined,\n\tprompt: string,\n): string {\n\tif (args?.action === \"wait\") return theme.fg(\"toolTitle\", theme.bold(`${prompt} wait ${str(args.id) ?? \"...\"}`));\n\tconst command = str(args?.command);\n\tconst timeout = args?.timeout as number | undefined;\n\tconst timeoutSuffix = timeout ? theme.fg(\"muted\", ` (timeout ${timeout}s)`) : \"\";\n\tconst commandDisplay = command === null ? invalidArgText(theme) : command ? command : theme.fg(\"toolOutput\", \"...\");\n\treturn theme.fg(\"toolTitle\", theme.bold(`${prompt} ${commandDisplay}`)) + timeoutSuffix;\n}\nfunction rebuildBashResultRenderComponent(\n\tcomponent: Container,\n\tresult: {\n\t\tcontent: Array<{ type: string; text?: string; data?: string; mimeType?: string }>;\n\t\tdetails?: BashToolDetails;\n\t},\n\toptions: ToolRenderResultOptions,\n\tshowImages: boolean,\n\ttimerText: string | undefined,\n\tcwd: string,\n): void {\n\tcomponent.clear();\n\tlet output = getTextOutput(result, showImages).trim();\n\tconst observation = result.details?.observation;\n\tif (observation?.kind === \"yielded\") {\n\t\tconst receipt = `Command is still running (task ${observation.taskId}).`;\n\t\tif (output.endsWith(receipt)) output = output.slice(0, -receipt.length).trimEnd();\n\t\tcomponent.addChild(new Text(theme.fg(\"accent\", \"∀ Continued in background\"), 0, 0));\n\t\tcomponent.addChild(\n\t\t\tnew Text(\n\t\t\t\ttheme.fg(\"dim\", `/tasks to inspect output or stop${options.expanded ? ` · ${observation.taskId}` : \"\"}`),\n\t\t\t\t0,\n\t\t\t\t0,\n\t\t\t),\n\t\t);\n\t}\n\tconst truncation = result.details?.truncation;\n\tconst fullOutputPath = result.details?.fullOutputPath;\n\tif (!options.isPartial && truncation?.truncated && fullOutputPath && output.endsWith(\"]\")) {\n\t\tconst footerStart = output.lastIndexOf(\"\\n\\n[\");\n\t\tif (footerStart !== -1 && output.slice(footerStart).includes(fullOutputPath)) {\n\t\t\toutput = output.slice(0, footerStart).trimEnd();\n\t\t}\n\t}\n\tif (output) addShellOutputPreview(component, output, options.expanded);\n\tif (truncation?.truncated || fullOutputPath) {\n\t\tconst warnings: string[] = [];\n\t\tif (truncation?.truncated) warnings.push(formatTruncationNotice(truncation));\n\t\tif (fullOutputPath) warnings.push(\"Full output:\");\n\t\tcomponent.addChild(new Text(`\\n${theme.fg(\"warning\", `[${warnings.join(\". \")}]`)}`, 0, 0));\n\t\t// The path gets a line of its own so word wrap never splits it at a space beside its label, and a link so a\n\t\t// path wider than the terminal still opens (and copies) whole.\n\t\tif (fullOutputPath) {\n\t\t\tcomponent.addChild(new Text(theme.fg(\"warning\", linkPath(fullOutputPath, fullOutputPath, cwd)), 0, 0));\n\t\t}\n\t}\n\tif (timerText) component.addChild(new Text(`\\n${theme.fg(\"muted\", timerText)}`, 0, 0));\n}\nexport function createBashToolDefinition(\n\tcwd: string,\n\toptions?: BashToolOptions,\n\tpresentation: ShellToolPresentation = BASH_SHELL_PRESENTATION,\n): ToolDefinition<typeof bashSchema, BashToolDetails | undefined, ToolTimerState> {\n\tconst defaultOps =\n\t\toptions?.operations ??\n\t\tcreateLocalBashOperations({ shellPath: options?.shellPath, taskOwner: options?.taskOwner });\n\tconst commandPrefix = options?.commandPrefix,\n\t\texposeSessionEnvironment = options?.exposeSessionEnvironment ?? true;\n\tconst spawnHook = options?.spawnHook;\n\tconst interceptor = options?.interceptor;\n\tconst isInterceptorEnabled = (): boolean =>\n\t\ttypeof options?.interceptorEnabled === \"function\"\n\t\t\t? options.interceptorEnabled()\n\t\t\t: (options?.interceptorEnabled ?? !!interceptor);\n\tconst availableTools = options?.availableTools ?? [\"read\", \"search\", \"find\", \"edit\", \"write\"];\n\tconst interceptorRules = options?.interceptorRules ?? DEFAULT_BASH_INTERCEPTOR_RULES;\n\tconst sessionTempDirOption = options?.sessionTempDir;\n\tconst resolveSessionTempDir = (): string | undefined =>\n\t\ttypeof sessionTempDirOption === \"function\" ? sessionTempDirOption() : sessionTempDirOption;\n\treturn {\n\t\tname: \"bash\",\n\t\tconcurrency: (args) => (args.pty === true ? \"exclusive\" : \"shared\"),\n\t\tlabel: \"bash\",\n\t\tdescription:\n\t\t\t'Execute a shell command with optional PTY handling and foreground/background observation, or observe an existing task with action: \"wait\", id, and optional budgetMs. Omitted command wait uses owner policy (default 10s). Observation never changes execution timeout. Background and existing-task waits require a supported task owner; unbound foreground execution waits until completion.',\n\t\tpromptSnippet: bashToolSystemPromptContribution.snippet,\n\t\tconstrainedSampling: { type: \"json_schema\", strict: \"prefer\" },\n\t\tpromptGuidelines: exposeSessionEnvironment ? [...bashToolSystemPromptContribution.guidelines] : undefined,\n\t\tprepareArguments: prepareShellInput,\n\t\tparameters: bashSchema,\n\t\toutputSchema: bashOutputSchema,\n\t\tmaxResultSizeChars: Infinity,\n\t\tasync execute(_toolCallId, bashCommand: BashToolInput, signal?: AbortSignal, onUpdate?, ctx?: ExtensionContext) {\n\t\t\tif (bashCommand.action !== undefined) {\n\t\t\t\tif (\n\t\t\t\t\tbashCommand.action !== \"wait\" ||\n\t\t\t\t\ttypeof bashCommand.id !== \"string\" ||\n\t\t\t\t\tObject.keys(bashCommand).some((key) => ![\"action\", \"id\", \"budgetMs\"].includes(key)) ||\n\t\t\t\t\t(bashCommand.budgetMs !== undefined &&\n\t\t\t\t\t\t(typeof bashCommand.budgetMs !== \"number\" ||\n\t\t\t\t\t\t\t!Number.isFinite(bashCommand.budgetMs) ||\n\t\t\t\t\t\t\tbashCommand.budgetMs < 0))\n\t\t\t\t)\n\t\t\t\t\tthrow new Error(\n\t\t\t\t\t\t\"Invalid shell wait: expected action wait, id, and optional finite non-negative budgetMs\",\n\t\t\t\t\t);\n\t\t\t\treturn waitForSupervisedCommand(options?.taskOwner, bashCommand.id, bashCommand.budgetMs, signal, {\n\t\t\t\t\ttempFilePrefix: presentation.tempFilePrefix,\n\t\t\t\t\ttempDir: resolveSessionTempDir(),\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (\n\t\t\t\tbashCommand.id !== undefined ||\n\t\t\t\tbashCommand.budgetMs !== undefined ||\n\t\t\t\ttypeof bashCommand.command !== \"string\"\n\t\t\t)\n\t\t\t\tthrow new Error(\"Invalid shell command: command is required; id and budgetMs require action wait\");\n\t\t\tconst { command } = bashCommand;\n\t\t\tconst timeout = normalizeTimeoutSeconds(bashCommand.timeout);\n\t\t\tvalidateBashWait(bashCommand.wait, !!options?.operations || !!options?.taskOwner);\n\t\t\tif (bashCommand.heartbeatMs !== undefined) validateTaskHeartbeatMs(bashCommand.heartbeatMs);\n\t\t\tconst sessionEnvironment = snapshotBashSessionEnvironment(ctx, exposeSessionEnvironment);\n\t\t\tconst resourceCtx = ctx as InternalResourceContext | undefined;\n\t\t\tconst executionCwd = ctx?.cwd || cwd;\n\t\t\tconst hasExplicitCwd = typeof bashCommand.cwd === \"string\";\n\t\t\tconst rawStrippedContext = hasExplicitCwd ? undefined : stripLeadingCdCommand(command, executionCwd);\n\t\t\tconst interceptorEnabled = isInterceptorEnabled();\n\t\t\tif (interceptorEnabled)\n\t\t\t\tcheckBashInterceptionCandidates([command, rawStrippedContext?.command], availableTools, interceptorRules);\n\t\t\tconst cwdInput = hasExplicitCwd\n\t\t\t\t\t? await expandShellInternalUrls(bashCommand.cwd!, executionCwd, resourceCtx)\n\t\t\t\t\t: executionCwd,\n\t\t\t\trequestedCwd = resolvePath(executionCwd, cwdInput);\n\t\t\tconst expandedCommand = await expandShellInternalUrls(\n\t\t\t\tcommand,\n\t\t\t\texecutionCwd,\n\t\t\t\tresourceCtx,\n\t\t\t\ttrue,\n\t\t\t\toptions?.shellDialect,\n\t\t\t);\n\t\t\tconst strippedExpandedContext = hasExplicitCwd\n\t\t\t\t? undefined\n\t\t\t\t: stripLeadingCdCommand(expandedCommand, requestedCwd);\n\t\t\tconst resolvedCommand = commandPrefix ? `${commandPrefix}\\n${expandedCommand}` : expandedCommand;\n\t\t\tconst spawnContext = resolveSpawnContext(resolvedCommand, requestedCwd, sessionEnvironment, spawnHook);\n\t\t\tconst strippedCdContext = strippedExpandedContext\n\t\t\t\t? resolveSpawnContext(\n\t\t\t\t\t\tcommandPrefix\n\t\t\t\t\t\t\t? `${commandPrefix}\\n${strippedExpandedContext.command}`\n\t\t\t\t\t\t\t: strippedExpandedContext.command,\n\t\t\t\t\t\tstrippedExpandedContext.cwd,\n\t\t\t\t\t\tsessionEnvironment,\n\t\t\t\t\t\tspawnHook,\n\t\t\t\t\t)\n\t\t\t\t: undefined;\n\t\t\tif (interceptorEnabled)\n\t\t\t\tcheckBashInterceptionCandidates(\n\t\t\t\t\t[\n\t\t\t\t\t\texpandedCommand,\n\t\t\t\t\t\tstrippedExpandedContext?.command,\n\t\t\t\t\t\tresolvedCommand,\n\t\t\t\t\t\tspawnContext.command,\n\t\t\t\t\t\tstrippedCdContext?.command,\n\t\t\t\t\t],\n\t\t\t\t\tavailableTools,\n\t\t\t\t\tinterceptorRules,\n\t\t\t\t);\n\t\t\tlet expandedEnv: NodeJS.ProcessEnv | undefined;\n\t\t\tif (bashCommand.env) {\n\t\t\t\texpandedEnv = {};\n\t\t\t\tfor (const [key, value] of Object.entries(bashCommand.env)) {\n\t\t\t\t\tif (!/^[A-Za-z_][A-Za-z0-9_]*$/.test(key)) throw new Error(`Invalid bash env name: ${key}`);\n\t\t\t\t\texpandedEnv[key] = await expandShellInternalUrls(value, executionCwd, resourceCtx);\n\t\t\t\t}\n\t\t\t\tspawnContext.env = { ...spawnContext.env, ...expandedEnv };\n\t\t\t}\n\t\t\tif (strippedCdContext && expandedEnv) strippedCdContext.env = { ...strippedCdContext.env, ...expandedEnv };\n\t\t\tapplyBashSessionEnvironment(spawnContext.env, sessionEnvironment);\n\t\t\tif (strippedCdContext) applyBashSessionEnvironment(strippedCdContext.env, sessionEnvironment);\n\t\t\tconst primaryInterception = interceptorEnabled && interceptor ? await interceptor(spawnContext) : undefined;\n\t\t\tconst fallbackInterception =\n\t\t\t\t!primaryInterception && strippedCdContext && interceptorEnabled && interceptor\n\t\t\t\t\t? await interceptor(strippedCdContext)\n\t\t\t\t\t: undefined;\n\t\t\tconst intercepted = primaryInterception ?? fallbackInterception;\n\t\t\tif (intercepted?.result) return bashResultToToolResult(intercepted.result);\n\t\t\tconst ops = intercepted?.operations ?? defaultOps;\n\t\t\tconst executionContext = primaryInterception ? spawnContext : (strippedCdContext ?? spawnContext);\n\t\t\tconst output = new OutputAccumulator({\n\t\t\t\ttempFilePrefix: presentation.tempFilePrefix,\n\t\t\t\ttempDir: resolveSessionTempDir(),\n\t\t\t});\n\t\t\tlet acceptingOutput = true;\n\t\t\tlet updateTimer: NodeJS.Timeout | undefined;\n\t\t\tlet updateDirty = false;\n\t\t\tlet lastUpdateAt = 0;\n\t\t\tconst emitOutputUpdate = () => {\n\t\t\t\tif (!onUpdate || !updateDirty) return;\n\t\t\t\tupdateDirty = false;\n\t\t\t\tlastUpdateAt = Date.now();\n\t\t\t\tconst snapshot = output.snapshot({ persistIfTruncated: true });\n\t\t\t\tonUpdate({\n\t\t\t\t\tcontent: [{ type: \"text\", text: snapshot.content || \"\" }],\n\t\t\t\t\tdetails: {\n\t\t\t\t\t\ttruncation: snapshot.truncation.truncated ? snapshot.truncation : undefined,\n\t\t\t\t\t\tfullOutputPath: snapshot.fullOutputPath,\n\t\t\t\t\t},\n\t\t\t\t});\n\t\t\t};\n\t\t\tconst clearUpdateTimer = () => {\n\t\t\t\tif (updateTimer) {\n\t\t\t\t\tclearTimeout(updateTimer);\n\t\t\t\t\tupdateTimer = undefined;\n\t\t\t\t}\n\t\t\t};\n\t\t\tconst scheduleOutputUpdate = () => {\n\t\t\t\tif (!onUpdate) return;\n\t\t\t\tupdateDirty = true;\n\t\t\t\tconst delay = BASH_UPDATE_THROTTLE_MS - (Date.now() - lastUpdateAt);\n\t\t\t\tif (delay <= 0) {\n\t\t\t\t\tclearUpdateTimer();\n\t\t\t\t\temitOutputUpdate();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tupdateTimer ??= setTimeout(() => {\n\t\t\t\t\tupdateTimer = undefined;\n\t\t\t\t\temitOutputUpdate();\n\t\t\t\t}, delay);\n\t\t\t};\n\t\t\tif (onUpdate) {\n\t\t\t\tonUpdate({ content: [], details: undefined });\n\t\t\t}\n\t\t\tconst handleData = (data: Buffer) => {\n\t\t\t\tif (!acceptingOutput) return;\n\t\t\t\toutput.append(data);\n\t\t\t\tscheduleOutputUpdate();\n\t\t\t};\n\t\t\tconst finishOutput = async () => {\n\t\t\t\tacceptingOutput = false;\n\t\t\t\toutput.finish();\n\t\t\t\tclearUpdateTimer();\n\t\t\t\temitOutputUpdate();\n\t\t\t\tconst snapshot = output.snapshot({ persistIfTruncated: true });\n\t\t\t\ttry {\n\t\t\t\t\tawait output.closeTempFile();\n\t\t\t\t} catch {\n\t\t\t\t\t// The spill file could not be flushed. Keep the truncated result, but\n\t\t\t\t\t// re-read the snapshot so the now-cleared path is not advertised.\n\t\t\t\t\treturn output.snapshot();\n\t\t\t\t}\n\t\t\t\treturn snapshot;\n\t\t\t};\n\t\t\tconst formatOutput = (snapshot: Awaited<ReturnType<typeof finishOutput>>, emptyText = \"(no output)\") => {\n\t\t\t\tconst truncation = snapshot.truncation;\n\t\t\t\tlet text = snapshot.content || emptyText;\n\t\t\t\tlet details: BashToolDetails | undefined;\n\t\t\t\tif (truncation.truncated) {\n\t\t\t\t\tdetails = { truncation, fullOutputPath: snapshot.fullOutputPath };\n\t\t\t\t\tconst startLine = truncation.totalLines - truncation.outputLines + 1;\n\t\t\t\t\tconst endLine = truncation.totalLines;\n\t\t\t\t\t// Persistence can be refused (a temp directory we will not write\n\t\t\t\t\t// through, a full or read-only disk), and then there is no path to\n\t\t\t\t\t// name. Every other renderer already omits the clause; this one must\n\t\t\t\t\t// too, rather than handing the model the string \"undefined\".\n\t\t\t\t\tconst fullOutputNote = snapshot.fullOutputPath ? ` Full output: ${snapshot.fullOutputPath}` : \"\";\n\t\t\t\t\tif (truncation.lastLinePartial) {\n\t\t\t\t\t\tconst lastLineSize = formatSize(output.getLastLineBytes());\n\t\t\t\t\t\ttext += `\\n\\n[Showing last ${formatSize(truncation.outputBytes)} of line ${endLine} (line is ${lastLineSize}).${fullOutputNote}]`;\n\t\t\t\t\t} else if (truncation.truncatedBy === \"lines\") {\n\t\t\t\t\t\ttext += `\\n\\n[Showing lines ${startLine}-${endLine} of ${truncation.totalLines}.${fullOutputNote}]`;\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttext += `\\n\\n[Showing lines ${startLine}-${endLine} of ${truncation.totalLines} (${formatSize(DEFAULT_MAX_BYTES)} limit).${fullOutputNote}]`;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn { text, details };\n\t\t\t};\n\t\t\tconst startedAt = Date.now();\n\t\t\tconst withTiming = (details: BashToolDetails | undefined): BashToolDetails => ({\n\t\t\t\t...details,\n\t\t\t\ttimeoutSeconds: timeout,\n\t\t\t\t...(bashCommand.timeout !== undefined && bashCommand.timeout !== timeout\n\t\t\t\t\t? { requestedTimeoutSeconds: bashCommand.timeout }\n\t\t\t\t\t: {}),\n\t\t\t\twallTimeMs: Date.now() - startedAt,\n\t\t\t});\n\t\t\tconst appendStatus = (text: string, status: string) => `${text ? `${text}\\n\\n` : \"\"}${status}`;\n\t\t\ttry {\n\t\t\t\tlet exitCode: number | null;\n\t\t\t\tlet observation: SupervisedCommandResult[\"observation\"];\n\t\t\t\ttry {\n\t\t\t\t\tconst result = await ops.exec(executionContext.command, executionContext.cwd, {\n\t\t\t\t\t\tonData: handleData,\n\t\t\t\t\t\tsignal,\n\t\t\t\t\t\ttimeout,\n\t\t\t\t\t\twait: bashCommand.wait,\n\t\t\t\t\t\tenv: executionContext.env,\n\t\t\t\t\t\tpty: bashCommand.pty,\n\t\t\t\t\t\t...(bashCommand.heartbeatMs === undefined ? {} : { heartbeatMs: bashCommand.heartbeatMs }),\n\t\t\t\t\t});\n\t\t\t\t\texitCode = result.exitCode;\n\t\t\t\t\tobservation = result.observation;\n\t\t\t\t} catch (err) {\n\t\t\t\t\tconst snapshot = await finishOutput();\n\t\t\t\t\tconst { text } = formatOutput(snapshot, \"\");\n\t\t\t\t\tif (err instanceof Error && err.message === \"aborted\") {\n\t\t\t\t\t\tthrow new Error(appendStatus(text, \"Command aborted\"));\n\t\t\t\t\t}\n\t\t\t\t\tif (err instanceof Error && err.message.startsWith(\"timeout:\")) {\n\t\t\t\t\t\tconst timeoutSecs = err.message.split(\":\")[1];\n\t\t\t\t\t\tthrow new Error(appendStatus(text, `Command timed out after ${timeoutSecs} seconds`));\n\t\t\t\t\t}\n\t\t\t\t\tthrow err;\n\t\t\t\t}\n\t\t\t\tconst snapshot = await finishOutput();\n\t\t\t\tconst { text: outputText, details } = formatOutput(snapshot);\n\t\t\t\tif (observation?.kind === \"yielded\")\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcontent: [\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\ttype: \"text\",\n\t\t\t\t\t\t\t\ttext: appendStatus(outputText, `Command is still running (task ${observation.taskId}).`),\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t],\n\t\t\t\t\t\tdetails: { ...withTiming(details), observation },\n\t\t\t\t\t};\n\t\t\t\tif (exitCode === null) {\n\t\t\t\t\tthrow new Error(appendStatus(outputText, \"Command terminated without an exit code\"));\n\t\t\t\t}\n\t\t\t\tconst fullOutput = await output.readFullOutput(STRUCTURED_OUTPUT_MAX_BYTES);\n\t\t\t\tconst structuredContent = {\n\t\t\t\t\toutput: fullOutput.content,\n\t\t\t\t\ttruncated: fullOutput.truncated,\n\t\t\t\t\t...(fullOutput.truncated && snapshot.fullOutputPath\n\t\t\t\t\t\t? { full_output_path: snapshot.fullOutputPath }\n\t\t\t\t\t\t: {}),\n\t\t\t\t\texit_code: exitCode,\n\t\t\t\t\twall_time_seconds: Math.round((Date.now() - startedAt) / 100) / 10,\n\t\t\t\t};\n\t\t\t\tif (exitCode !== 0) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tcontent: [{ type: \"text\", text: appendStatus(outputText, `Command exited with code ${exitCode}`) }],\n\t\t\t\t\t\tdetails: { ...withTiming(details), exitCode },\n\t\t\t\t\t\tisError: true,\n\t\t\t\t\t\tstructuredContent,\n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn { content: [{ type: \"text\", text: outputText }], details: withTiming(details), structuredContent };\n\t\t\t} finally {\n\t\t\t\tinvalidateNativeSearchCache();\n\t\t\t\tclearUpdateTimer();\n\t\t\t}\n\t\t},\n\t\trenderCall(args, _theme, context) {\n\t\t\tstartToolTimer(context);\n\t\t\tconst text = (context.lastComponent as Text | undefined) ?? new Text(\"\", 0, 0);\n\t\t\ttext.setText(formatBashCall(args, presentation.prompt));\n\t\t\treturn text;\n\t\t},\n\t\trenderResult(result, options, _theme, context) {\n\t\t\t// A command yielded to the background is still running, so its row reports how long it was observed.\n\t\t\tconst finalLabel = result.details?.observation?.kind === \"yielded\" ? \"Observed for\" : \"Took\";\n\t\t\tconst timerText = toolTimerText(context, options.isPartial, finalLabel);\n\t\t\tconst component = (context.lastComponent as Container | undefined) ?? new Container();\n\t\t\tconst waited =\n\t\t\t\tcontext.args.action === \"wait\" &&\n\t\t\t\trebuildShellWaitResult(component, result, options, {\n\t\t\t\t\tshowImages: context.showImages,\n\t\t\t\t\tisError: context.isError,\n\t\t\t\t\ttaskId: context.args.id,\n\t\t\t\t\ttimerText,\n\t\t\t\t\tcwd: context.cwd,\n\t\t\t\t});\n\t\t\tif (!waited) {\n\t\t\t\trebuildBashResultRenderComponent(component, result, options, context.showImages, timerText, context.cwd);\n\t\t\t}\n\t\t\tcomponent.invalidate();\n\t\t\treturn component;\n\t\t},\n\t};\n}\nexport function createBashTool(cwd: string, options?: BashToolOptions): AgentTool<typeof bashSchema> {\n\treturn wrapToolDefinition(createBashToolDefinition(cwd, options));\n}\n"]}
@@ -23,6 +23,7 @@ export declare function createPowerShellToolDefinition(cwd: string, options?: Po
23
23
  wait?: import("../tasks/contracts.ts").WaitPolicy | undefined;
24
24
  cwd?: string | undefined;
25
25
  pty?: boolean | undefined;
26
+ heartbeatMs?: number | undefined;
26
27
  } & {
27
28
  action?: never;
28
29
  id?: never;
@@ -31,7 +32,7 @@ export declare function createPowerShellToolDefinition(cwd: string, options?: Po
31
32
  action: "wait";
32
33
  id: string;
33
34
  budgetMs?: number;
34
- } & Partial<Record<"command" | "cwd" | "env" | "pty" | "timeout" | "wait", never>>), signal: AbortSignal | undefined, onUpdate: import("@earendil-works/pi-agent-core").AgentToolUpdateCallback<BashToolDetails | undefined> | undefined, ctx: import("../extensions/context-types.ts").ExtensionToolContext): Promise<import("@earendil-works/pi-agent-core").AgentToolResult<BashToolDetails | undefined>>;
35
+ } & Partial<Record<"command" | "cwd" | "env" | "heartbeatMs" | "pty" | "timeout" | "wait", never>>), signal: AbortSignal | undefined, onUpdate: import("@earendil-works/pi-agent-core").AgentToolUpdateCallback<BashToolDetails | undefined> | undefined, ctx: import("../extensions/context-types.ts").ExtensionToolContext): Promise<import("@earendil-works/pi-agent-core").AgentToolResult<BashToolDetails | undefined>>;
35
36
  description: string;
36
37
  promptSnippet: "Execute PowerShell commands.";
37
38
  promptGuidelines: ("Choose foreground or background shell observation as needed without asking the user each time. Background yields after admission; foreground waits for its optional budget then the same command continues in background. Omitted wait uses owner-configured automatic background yield (default 10s). Observation never changes the execution timeout, which stops the command. Background requires a supported task owner; unbound foreground waits until completion regardless of budget." | "For ordinary commands, omit wait to use the owner's observation policy (normally 10s). Do not routinely request one-second waits: premature yields add tool calls without making the command faster. Use a short budget only for a concrete responsiveness need, or explicit background observation when you have independent work to do. Explicit budgets, including zero for polling, remain available." | "Use { action: \"wait\", id: taskId } to observe an existing shell task with the owner policy. Avoid repeated short polls; await completion notifications when no dependent work is blocked. Never relaunch a yielded command. Waiting does not extend execution timeout or owner lifetime." | "You can inspect ATOMIC_* or PI_* environment variables for current model and session details.")[] | undefined;
@@ -42,6 +43,7 @@ export declare function createPowerShellToolDefinition(cwd: string, options?: Po
42
43
  wait?: import("../tasks/contracts.ts").WaitPolicy | undefined;
43
44
  cwd?: string | undefined;
44
45
  pty?: boolean | undefined;
46
+ heartbeatMs?: number | undefined;
45
47
  } & {
46
48
  action?: never;
47
49
  id?: never;
@@ -50,7 +52,7 @@ export declare function createPowerShellToolDefinition(cwd: string, options?: Po
50
52
  action: "wait";
51
53
  id: string;
52
54
  budgetMs?: number;
53
- } & Partial<Record<"command" | "cwd" | "env" | "pty" | "timeout" | "wait", never>>)>;
55
+ } & Partial<Record<"command" | "cwd" | "env" | "heartbeatMs" | "pty" | "timeout" | "wait", never>>)>;
54
56
  constrainedSampling?: false | import("@bastani/pi-ai").ConstrainedSamplingConfig;
55
57
  maxResultSizeChars?: number;
56
58
  structuredOutput?: true;
@@ -62,6 +64,7 @@ export declare function createPowerShellToolDefinition(cwd: string, options?: Po
62
64
  wait?: import("../tasks/contracts.ts").WaitPolicy | undefined;
63
65
  cwd?: string | undefined;
64
66
  pty?: boolean | undefined;
67
+ heartbeatMs?: number | undefined;
65
68
  } & {
66
69
  action?: never;
67
70
  id?: never;
@@ -70,7 +73,7 @@ export declare function createPowerShellToolDefinition(cwd: string, options?: Po
70
73
  action: "wait";
71
74
  id: string;
72
75
  budgetMs?: number;
73
- } & Partial<Record<"command" | "cwd" | "env" | "pty" | "timeout" | "wait", never>>)) | undefined;
76
+ } & Partial<Record<"command" | "cwd" | "env" | "heartbeatMs" | "pty" | "timeout" | "wait", never>>)) | undefined;
74
77
  outputSchema?: import("typebox").TSchema;
75
78
  exposure?: import("../extensions/tool-types.ts").ToolExposure;
76
79
  namespace?: import("../extensions/tool-types.ts").ToolNamespace;
@@ -85,6 +88,7 @@ export declare function createPowerShellToolDefinition(cwd: string, options?: Po
85
88
  wait?: import("../tasks/contracts.ts").WaitPolicy | undefined;
86
89
  cwd?: string | undefined;
87
90
  pty?: boolean | undefined;
91
+ heartbeatMs?: number | undefined;
88
92
  } & {
89
93
  action?: never;
90
94
  id?: never;
@@ -93,7 +97,7 @@ export declare function createPowerShellToolDefinition(cwd: string, options?: Po
93
97
  action: "wait";
94
98
  id: string;
95
99
  budgetMs?: number;
96
- } & Partial<Record<"command" | "cwd" | "env" | "pty" | "timeout" | "wait", never>>)> | undefined;
100
+ } & Partial<Record<"command" | "cwd" | "env" | "heartbeatMs" | "pty" | "timeout" | "wait", never>>)> | undefined;
97
101
  renderCall?: ((args: ({
98
102
  command: string;
99
103
  env?: Record<string, string> | undefined;
@@ -101,6 +105,7 @@ export declare function createPowerShellToolDefinition(cwd: string, options?: Po
101
105
  wait?: import("../tasks/contracts.ts").WaitPolicy | undefined;
102
106
  cwd?: string | undefined;
103
107
  pty?: boolean | undefined;
108
+ heartbeatMs?: number | undefined;
104
109
  } & {
105
110
  action?: never;
106
111
  id?: never;
@@ -109,13 +114,14 @@ export declare function createPowerShellToolDefinition(cwd: string, options?: Po
109
114
  action: "wait";
110
115
  id: string;
111
116
  budgetMs?: number;
112
- } & Partial<Record<"command" | "cwd" | "env" | "pty" | "timeout" | "wait", never>>), theme: import("../../index.ts").Theme, context: import("../extensions/tool-types.ts").ToolRenderContext<import("./render-utils.ts").ToolTimerState, ({
117
+ } & Partial<Record<"command" | "cwd" | "env" | "heartbeatMs" | "pty" | "timeout" | "wait", never>>), theme: import("../../index.ts").Theme, context: import("../extensions/tool-types.ts").ToolRenderContext<import("./render-utils.ts").ToolTimerState, ({
113
118
  command: string;
114
119
  env?: Record<string, string> | undefined;
115
120
  timeout?: number | undefined;
116
121
  wait?: import("../tasks/contracts.ts").WaitPolicy | undefined;
117
122
  cwd?: string | undefined;
118
123
  pty?: boolean | undefined;
124
+ heartbeatMs?: number | undefined;
119
125
  } & {
120
126
  action?: never;
121
127
  id?: never;
@@ -124,7 +130,7 @@ export declare function createPowerShellToolDefinition(cwd: string, options?: Po
124
130
  action: "wait";
125
131
  id: string;
126
132
  budgetMs?: number;
127
- } & Partial<Record<"command" | "cwd" | "env" | "pty" | "timeout" | "wait", never>>)>) => import("@earendil-works/pi-tui").Component) | undefined;
133
+ } & Partial<Record<"command" | "cwd" | "env" | "heartbeatMs" | "pty" | "timeout" | "wait", never>>)>) => import("@earendil-works/pi-tui").Component) | undefined;
128
134
  renderResult?: ((result: import("@earendil-works/pi-agent-core").AgentToolResult<BashToolDetails | undefined>, options: import("../index.ts").ToolRenderResultOptions, theme: import("../../index.ts").Theme, context: import("../extensions/tool-types.ts").ToolRenderContext<import("./render-utils.ts").ToolTimerState, ({
129
135
  command: string;
130
136
  env?: Record<string, string> | undefined;
@@ -132,6 +138,7 @@ export declare function createPowerShellToolDefinition(cwd: string, options?: Po
132
138
  wait?: import("../tasks/contracts.ts").WaitPolicy | undefined;
133
139
  cwd?: string | undefined;
134
140
  pty?: boolean | undefined;
141
+ heartbeatMs?: number | undefined;
135
142
  } & {
136
143
  action?: never;
137
144
  id?: never;
@@ -140,7 +147,7 @@ export declare function createPowerShellToolDefinition(cwd: string, options?: Po
140
147
  action: "wait";
141
148
  id: string;
142
149
  budgetMs?: number;
143
- } & Partial<Record<"command" | "cwd" | "env" | "pty" | "timeout" | "wait", never>>)>) => import("@earendil-works/pi-tui").Component) | undefined;
150
+ } & Partial<Record<"command" | "cwd" | "env" | "heartbeatMs" | "pty" | "timeout" | "wait", never>>)>) => import("@earendil-works/pi-tui").Component) | undefined;
144
151
  };
145
152
  export declare function createPowerShellTool(cwd: string, options?: PowerShellToolOptions): import("@earendil-works/pi-agent-core").AgentTool<import("typebox").TUnsafe<({
146
153
  command: string;
@@ -149,6 +156,7 @@ export declare function createPowerShellTool(cwd: string, options?: PowerShellTo
149
156
  wait?: import("../tasks/contracts.ts").WaitPolicy | undefined;
150
157
  cwd?: string | undefined;
151
158
  pty?: boolean | undefined;
159
+ heartbeatMs?: number | undefined;
152
160
  } & {
153
161
  action?: never;
154
162
  id?: never;
@@ -157,7 +165,7 @@ export declare function createPowerShellTool(cwd: string, options?: PowerShellTo
157
165
  action: "wait";
158
166
  id: string;
159
167
  budgetMs?: number;
160
- } & Partial<Record<"command" | "cwd" | "env" | "pty" | "timeout" | "wait", never>>)>, BashToolDetails | undefined>;
168
+ } & Partial<Record<"command" | "cwd" | "env" | "heartbeatMs" | "pty" | "timeout" | "wait", never>>)>, BashToolDetails | undefined>;
161
169
  export type PowerShellSpawnContext = BashSpawnContext;
162
170
  export type PowerShellSpawnHook = BashSpawnHook;
163
171
  //# sourceMappingURL=powershell.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"powershell.d.ts","sourceRoot":"","sources":["../../../src/core/tools/powershell.ts"],"names":[],"mappings":"AASA,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EAKpB,MAAM,WAAW,CAAC;AACnB,OAAO,EAGN,KAAK,sBAAsB,EAE3B,MAAM,sBAAsB,CAAC;AAS9B,eAAO,MAAM,sCAAsC;sBACzC,8BAA8B;;EAE7B,CAAC;AACZ,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAClD,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC;AACpD,MAAM,MAAM,mBAAmB,GAAG,aAAa,CAAC;AAChD,MAAM,WAAW,qBAChB,SAAQ,IAAI,CAAC,eAAe,EAAE,0BAA0B,GAAG,WAAW,GAAG,WAAW,CAAC;IACrF,UAAU,CAAC,EAAE,cAAc,CAAC;CAC5B;AACD,wBAAgB,+BAA+B,CAAC,OAAO,CAAC,EAAE;IACzD,SAAS,CAAC,EAAE,sBAAsB,CAAC;CACnC,GAAG,oBAAoB,CA0DvB;AACD,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgC9F;AACD,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB;;;;;;;;;;;;;;;mHAEhF;AACD,MAAM,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AACtD,MAAM,MAAM,mBAAmB,GAAG,aAAa,CAAC"}
1
+ {"version":3,"file":"powershell.d.ts","sourceRoot":"","sources":["../../../src/core/tools/powershell.ts"],"names":[],"mappings":"AASA,OAAO,EACN,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,eAAe,EAKpB,MAAM,WAAW,CAAC;AACnB,OAAO,EAGN,KAAK,sBAAsB,EAE3B,MAAM,sBAAsB,CAAC;AAS9B,eAAO,MAAM,sCAAsC;sBACzC,8BAA8B;;EAE7B,CAAC;AACZ,MAAM,MAAM,oBAAoB,GAAG,cAAc,CAAC;AAClD,MAAM,MAAM,qBAAqB,GAAG,eAAe,CAAC;AACpD,MAAM,MAAM,mBAAmB,GAAG,aAAa,CAAC;AAChD,MAAM,WAAW,qBAChB,SAAQ,IAAI,CAAC,eAAe,EAAE,0BAA0B,GAAG,WAAW,GAAG,WAAW,CAAC;IACrF,UAAU,CAAC,EAAE,cAAc,CAAC;CAC5B;AACD,wBAAgB,+BAA+B,CAAC,OAAO,CAAC,EAAE;IACzD,SAAS,CAAC,EAAE,sBAAsB,CAAC;CACnC,GAAG,oBAAoB,CA0DvB;AACD,wBAAgB,8BAA8B,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,qBAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgC9F;AACD,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,qBAAqB;;;;;;;;;;;;;;;;mIAEhF;AACD,MAAM,MAAM,sBAAsB,GAAG,gBAAgB,CAAC;AACtD,MAAM,MAAM,mBAAmB,GAAG,aAAa,CAAC"}
package/dist/index.d.ts CHANGED
@@ -12,9 +12,11 @@ export * from "./core/storage/index.js";
12
12
  export { type ProcessStorageChoice, processSharedStorageSelection, type StorageDomain, selectProcessStorage, } from "./core/storage/process-selection.js";
13
13
  export { JsonlSessionStore } from "./core/storage/session/jsonl-session-store.js";
14
14
  export { AgentTaskHost, type AgentTaskHostBinding, type AgentTaskRunnerFactory } from "./core/tasks/agent-adapter.js";
15
- export type { AgentIntent, OperationId, TaskId, TaskResult, WaitPolicy } from "./core/tasks/contracts.js";
15
+ export type { AgentIntent, OperationId, TaskId, TaskRecord, TaskResult, WaitPolicy } from "./core/tasks/contracts.js";
16
16
  export { type AdmittedAgentTask, collectAgentTasks } from "./core/tasks/execution-scope.js";
17
- export { bindOwnerTaskStore, getOwnerTaskStore, OwnerTaskStore } from "./core/tasks/owner-store.js";
17
+ export { DEFAULT_TASK_HEARTBEAT_MS, MIN_TASK_HEARTBEAT_MS, TASK_HEARTBEAT_MESSAGE_TYPE, type TaskHeartbeatDetails, validateTaskHeartbeatMs, } from "./core/tasks/heartbeat-notice.js";
18
+ export { bindOwnerTaskStore, getOwnerTaskStore, OwnerTaskStore, type TaskActivity, watchOwnerTaskStoreBinding, } from "./core/tasks/owner-store.js";
19
+ export { ownerTaskViewSource, type TaskDetailText, type TaskOutputView, type TaskTranscriptFollow, type TaskTranscriptView, type TaskViewResult, type TaskViewSource, } from "./core/tasks/task-view-source.js";
18
20
  export { formatReadLineRange, formatToolCallWithArgs } from "./core/tools/render-utils.ts";
19
21
  export { createTranscript, type Transcript, type TranscriptOptions, type TranscriptPart, type TranscriptTextPart, type TranscriptThinkingPart, type TranscriptToolCallPart, type TranscriptToolResult, type TranscriptToolResultFormat, } from "./core/transcript.js";
20
22
  export { type CodemodeExtensionOptions, createCodemodeExtension } from "./extensions/codemode/index.js";
@@ -84,7 +86,7 @@ export * from "./index-extensions.js";
84
86
  export { type MainOptions, main } from "./main.ts";
85
87
  export { InteractiveMode, type InteractiveModeOptions, type ModelInfo, type PrintModeOptions, RpcClient, type RpcClientOptions, type RpcCommand, type RpcEvent, type RpcEventListener, type RpcExtensionUIRequest, type RpcExtensionUIResponse, type RpcResponse, type RpcSessionState, runPrintMode, runRpcMode, } from "./modes/index.ts";
86
88
  export { ArminComponent, AssistantMessageComponent, BashExecutionComponent, BorderedLoader, BranchSummaryMessageComponent, type ChatMessageEntry, type ChatMessageRenderOptions, ChatSessionHost, type ChatSessionHostBashRequest, type ChatSessionHostCommands, type ChatSessionHostEntry, type ChatSessionHostOpts, type ChatSessionHostStyle, type ChatSessionSubmitMode, ChatTranscriptComponent, type ChatTranscriptEntryLike, type ChatTranscriptRenderer, type ChatTranscriptRole, CustomEditor, type CustomEditorOptions, CustomEntryComponent, CustomMessageComponent, chatEntriesFromAgentMessages, DynamicBorder, ExtensionEditorComponent, ExtensionInputComponent, ExtensionSelectorComponent, FooterComponent, keyHint, keyHintIfBound, keyText, LiveChatEntriesController, LoginDialogComponent, ModelSelectorComponent, OAuthSelectorComponent, type RenderDiffOptions, rawKeyHint, renderChatMessageEntry, renderDiff, ScrollableChatTranscriptComponent, ScrollableComponentViewport, SessionSelectorComponent, type SettingsCallbacks, type SettingsConfig, SettingsSelectorComponent, ShowImagesSelectorComponent, SkillInvocationMessageComponent, ThemeSelectorComponent, ThinkingSelectorComponent, ToolExecutionComponent, type ToolExecutionOptions, TRANSCRIPT_JUMP_TO_END_URL, TranscriptFollowIndicator, TreeSelectorComponent, truncateToVisualLines, UsageMeterComponent, UserMessageComponent, UserMessageSelectorComponent, type VisualTruncateResult, WorkingStatusComponent, type WorkingStatusComponentOptions, } from "./modes/interactive/components/index.ts";
87
- export { classifyChatCommand, createSessionSkillAutocompleteProvider, getSessionSkillCommands, } from "./modes/interactive/skill-command-autocomplete.ts";
89
+ export { classifyChatCommand, createSessionSkillAutocompleteProvider, getSessionCommandCatalog, getSessionSkillCommands, type PendingSessionCommandCatalog, type SessionCommandCatalog, } from "./modes/interactive/skill-command-autocomplete.ts";
88
90
  export { getLanguageFromPath, getMarkdownTheme, getSelectListTheme, getSettingsListTheme, highlightCode, initTheme, Theme, type ThemeColor, } from "./modes/interactive/theme/theme.js";
89
91
  export { pickWhimsicalWorkingMessage } from "./modes/interactive/whimsical-messages.ts";
90
92
  export { createChildProcessEnvironment, spawnProcess } from "./utils/child-process.ts";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AACvE,OAAO,EACN,WAAW,EACX,KAAK,yBAAyB,EAC9B,KAAK,+BAA+B,EACpC,KAAK,kBAAkB,GACvB,MAAM,wBAAwB,CAAC;AAChC,YAAY,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AACnG,YAAY,EACX,cAAc,EACd,SAAS,EACT,gBAAgB,EAChB,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,cAAc,GACd,MAAM,iCAAiC,CAAC;AACzC,OAAO,EACN,KAAK,2BAA2B,EAChC,6BAA6B,EAC7B,wCAAwC,GACxC,MAAM,qCAAqC,CAAC;AAC7C,YAAY,EACX,eAAe,EACf,YAAY,EACZ,WAAW,EACX,kBAAkB,EAClB,aAAa,EACb,oBAAoB,EACpB,aAAa,GACb,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,6BAA6B,EAAE,MAAM,kCAAkC,CAAC;AACjF,YAAY,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AACxF,cAAc,yBAAyB,CAAC;AAExC,OAAO,EACN,KAAK,oBAAoB,EACzB,6BAA6B,EAC7B,KAAK,aAAa,EAClB,oBAAoB,GACpB,MAAM,qCAAqC,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,+CAA+C,CAAC;AAElF,OAAO,EAAE,aAAa,EAAE,KAAK,oBAAoB,EAAE,KAAK,s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AACxF,OAAO,EAAE,6BAA6B,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAEvF,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,EACvC,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,EACzB,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,EAAE,KAAK,YAAY,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC9F,OAAO,EAAE,2BAA2B,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAC3G,OAAO,EAAE,oCAAoC,EAAE,MAAM,iBAAiB,CAAC;AAEvE,OAAO,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC"}
package/dist/index.js CHANGED
@@ -10,7 +10,9 @@ export { JsonlSessionStore } from "./core/storage/session/jsonl-session-store.js
10
10
  // Internal trusted-host task integration (not model authority).
11
11
  export { AgentTaskHost } from "./core/tasks/agent-adapter.js";
12
12
  export { collectAgentTasks } from "./core/tasks/execution-scope.js";
13
- export { bindOwnerTaskStore, getOwnerTaskStore, OwnerTaskStore } from "./core/tasks/owner-store.js";
13
+ export { DEFAULT_TASK_HEARTBEAT_MS, MIN_TASK_HEARTBEAT_MS, TASK_HEARTBEAT_MESSAGE_TYPE, validateTaskHeartbeatMs, } from "./core/tasks/heartbeat-notice.js";
14
+ export { bindOwnerTaskStore, getOwnerTaskStore, OwnerTaskStore, watchOwnerTaskStoreBinding, } from "./core/tasks/owner-store.js";
15
+ export { ownerTaskViewSource, } from "./core/tasks/task-view-source.js";
14
16
  export { formatReadLineRange, formatToolCallWithArgs } from "./core/tools/render-utils.js";
15
17
  export { createTranscript, } from "./core/transcript.js";
16
18
  export { createCodemodeExtension } from "./extensions/codemode/index.js";
@@ -93,7 +95,7 @@ export { InteractiveMode, RpcClient, runPrintMode, runRpcMode, } from "./modes/i
93
95
  export { ArminComponent, AssistantMessageComponent, BashExecutionComponent, BorderedLoader, BranchSummaryMessageComponent,
94
96
  // Internal host seam for bundled workflow stage chat; not yet a stable extension API.
95
97
  ChatSessionHost, ChatTranscriptComponent, CustomEditor, CustomEntryComponent, CustomMessageComponent, chatEntriesFromAgentMessages, DynamicBorder, ExtensionEditorComponent, ExtensionInputComponent, ExtensionSelectorComponent, FooterComponent, keyHint, keyHintIfBound, keyText, LiveChatEntriesController, LoginDialogComponent, ModelSelectorComponent, OAuthSelectorComponent, rawKeyHint, renderChatMessageEntry, renderDiff, ScrollableChatTranscriptComponent, ScrollableComponentViewport, SessionSelectorComponent, SettingsSelectorComponent, ShowImagesSelectorComponent, SkillInvocationMessageComponent, ThemeSelectorComponent, ThinkingSelectorComponent, ToolExecutionComponent, TRANSCRIPT_JUMP_TO_END_URL, TranscriptFollowIndicator, TreeSelectorComponent, truncateToVisualLines, UsageMeterComponent, UserMessageComponent, UserMessageSelectorComponent, WorkingStatusComponent, } from "./modes/interactive/components/index.js";
96
- export { classifyChatCommand, createSessionSkillAutocompleteProvider, getSessionSkillCommands, } from "./modes/interactive/skill-command-autocomplete.js";
98
+ export { classifyChatCommand, createSessionSkillAutocompleteProvider, getSessionCommandCatalog, getSessionSkillCommands, } from "./modes/interactive/skill-command-autocomplete.js";
97
99
  // Theme utilities for custom tools and extensions
98
100
  export { getLanguageFromPath, getMarkdownTheme, getSelectListTheme, getSettingsListTheme, highlightCode, initTheme, Theme, } from "./modes/interactive/theme/theme.js";
99
101
  export { pickWhimsicalWorkingMessage } from "./modes/interactive/whimsical-messages.js";