u-foo 2.3.32 → 2.4.0

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 (235) hide show
  1. package/README.md +157 -213
  2. package/README.zh-CN.md +151 -197
  3. package/SKILLS/ufoo/SKILL.md +8 -8
  4. package/bin/uagy.js +69 -0
  5. package/bin/uclaude.js +2 -2
  6. package/bin/ucode.js +4 -4
  7. package/bin/ucodex.js +2 -2
  8. package/bin/ufoo.js +5 -23
  9. package/modules/AGENTS.template.md +1 -1
  10. package/modules/bus/SKILLS/ubus/SKILL.md +35 -10
  11. package/package.json +5 -5
  12. package/scripts/chat-app-smoke.js +1 -1
  13. package/scripts/global-chat-switch-benchmark.js +5 -5
  14. package/scripts/ink-demo.js +1 -1
  15. package/scripts/ink-smoke.js +1 -1
  16. package/scripts/ucode-app-smoke.js +1 -1
  17. package/src/{agent → agents/activity}/activityDetector.js +39 -2
  18. package/src/{agent → agents/activity}/activityStatePublisher.js +1 -1
  19. package/src/{agent → agents/activity}/activityStateWriter.js +2 -2
  20. package/src/{agent → agents/activity}/activityTracker.js +1 -1
  21. package/src/agents/activity/index.js +8 -0
  22. package/src/{agent → agents/controller}/controllerToolExecutor.js +4 -4
  23. package/src/agents/controller/index.js +8 -0
  24. package/src/{agent → agents/controller}/loopObservability.js +2 -2
  25. package/src/{agent → agents/controller}/loopRuntime.js +1 -1
  26. package/src/{agent → agents/controller}/ufooAgent.js +9 -9
  27. package/src/agents/index.js +10 -0
  28. package/src/agents/internal/index.js +3 -0
  29. package/src/{agent → agents/internal}/internalRunner.js +45 -22
  30. package/src/agents/launch/agyConversation.js +159 -0
  31. package/src/agents/launch/index.js +12 -0
  32. package/src/{agent → agents/launch}/launchEnvironment.js +2 -3
  33. package/src/{agent → agents/launch}/launcher.js +64 -21
  34. package/src/{agent → agents/launch}/notifier.js +23 -12
  35. package/src/{agent → agents/launch}/ptyRunner.js +44 -12
  36. package/src/{agent → agents/launch}/ptyWrapper.js +2 -2
  37. package/src/{agent → agents/launch}/publisherRouting.js +1 -1
  38. package/src/{agent → agents/launch}/readyDetector.js +23 -0
  39. package/src/{agent → agents/prompts}/defaultBootstrap.js +63 -4
  40. package/src/{group/bootstrap.js → agents/prompts/groupBootstrap.js} +41 -6
  41. package/src/agents/prompts/index.js +8 -0
  42. package/src/{code/prompts → agents/prompts/native}/index.js +1 -1
  43. package/src/{agent → agents/providers}/claudeThreadProvider.js +1 -1
  44. package/src/{agent → agents/providers}/codexThreadProvider.js +1 -1
  45. package/src/{agent → agents/providers}/directAuthStatus.js +184 -1
  46. package/src/agents/providers/index.js +13 -0
  47. package/src/{agent → agents/providers}/upstreamTransport.js +2 -2
  48. package/src/{chat → app/chat}/agentSockets.js +1 -1
  49. package/src/{chat → app/chat}/commandExecutor.js +50 -26
  50. package/src/{chat → app/chat}/commands.js +119 -5
  51. package/src/{chat → app/chat}/daemonConnection.js +1 -1
  52. package/src/{chat → app/chat}/daemonMessageRouter.js +45 -3
  53. package/src/{chat → app/chat}/dashboardView.js +2 -1
  54. package/src/app/chat/index.js +6 -0
  55. package/src/{chat → app/chat}/inputSubmitHandler.js +4 -13
  56. package/src/{chat → app/chat}/internalAgentLogHistory.js +1 -1
  57. package/src/app/chat/multiWindow/index.js +268 -0
  58. package/src/app/chat/multiWindow/paneLayout.js +84 -0
  59. package/src/app/chat/multiWindow/paneManager.js +299 -0
  60. package/src/app/chat/multiWindow/renderer.js +384 -0
  61. package/src/app/chat/multiWindow/virtualTerminal.js +327 -0
  62. package/src/{chat → app/chat}/transport.js +1 -1
  63. package/src/{cli → app/cli}/ctxCoreCommands.js +3 -3
  64. package/src/{doctor/index.js → app/cli/features/doctor.js} +1 -1
  65. package/src/{init/index.js → app/cli/features/init.js} +14 -32
  66. package/src/{cli → app/cli}/groupCoreCommands.js +2 -2
  67. package/src/app/cli/index.js +9 -0
  68. package/src/{cli → app/cli}/onlineCoreCommands.js +5 -5
  69. package/src/{cli.js → app/cli/run.js} +59 -57
  70. package/src/app/index.js +6 -0
  71. package/src/code/agent.js +10 -9
  72. package/src/code/index.js +2 -0
  73. package/src/code/launcher/index.js +9 -0
  74. package/src/{agent → code/launcher}/ucode.js +7 -8
  75. package/src/{agent → code/launcher}/ucodeBootstrap.js +3 -3
  76. package/src/{agent → code/launcher}/ucodeBuild.js +2 -2
  77. package/src/{agent → code/launcher}/ucodeDoctor.js +2 -2
  78. package/src/{agent → code/launcher}/ucodeRuntimeConfig.js +1 -2
  79. package/src/code/nativeRunner.js +4 -4
  80. package/src/code/tui.js +3 -1454
  81. package/src/config.js +15 -2
  82. package/src/{bus → coordination/bus}/activate.js +2 -2
  83. package/src/{bus → coordination/bus}/daemon.js +15 -5
  84. package/src/coordination/bus/envelope.js +173 -0
  85. package/src/{bus → coordination/bus}/index.js +7 -3
  86. package/src/{bus → coordination/bus}/inject.js +11 -3
  87. package/src/{bus → coordination/bus}/message.js +1 -1
  88. package/src/coordination/bus/messageMeta.js +130 -0
  89. package/src/coordination/bus/promptEnvelope.js +65 -0
  90. package/src/{bus → coordination/bus}/shake.js +1 -1
  91. package/src/{bus → coordination/bus}/store.js +3 -3
  92. package/src/{bus → coordination/bus}/subscriber.js +2 -2
  93. package/src/{bus → coordination/bus}/utils.js +2 -2
  94. package/src/{history → coordination/history}/inputTimeline.js +5 -5
  95. package/src/coordination/index.js +10 -0
  96. package/src/{memory → coordination/memory}/historySearch.js +1 -1
  97. package/src/{memory → coordination/memory}/index.js +3 -3
  98. package/src/{report → coordination/report}/store.js +2 -2
  99. package/src/{status → coordination/status}/index.js +3 -3
  100. package/src/online/bridge.js +2 -2
  101. package/src/{controller → orchestration/controller}/flags.js +1 -1
  102. package/src/{controller → orchestration/controller}/gateRouter.js +1 -1
  103. package/src/orchestration/controller/index.js +10 -0
  104. package/src/{controller → orchestration/controller}/shadowGuard.js +1 -1
  105. package/src/orchestration/groups/bootstrap.js +3 -0
  106. package/src/orchestration/groups/index.js +10 -0
  107. package/src/orchestration/groups/promptProfiles.js +3 -0
  108. package/src/{group → orchestration/groups}/templates.js +1 -1
  109. package/src/{group → orchestration/groups}/validateTemplate.js +1 -1
  110. package/src/orchestration/index.js +7 -0
  111. package/src/orchestration/solo/index.js +3 -0
  112. package/src/{daemon → runtime/daemon}/agentProcessManager.js +1 -1
  113. package/src/{daemon → runtime/daemon}/cronOps.js +3 -2
  114. package/src/{daemon → runtime/daemon}/groupOrchestrator.js +26 -9
  115. package/src/{daemon → runtime/daemon}/index.js +105 -53
  116. package/src/{daemon → runtime/daemon}/ipcServer.js +1 -1
  117. package/src/{daemon → runtime/daemon}/nicknameScope.js +6 -3
  118. package/src/{daemon → runtime/daemon}/ops.js +48 -61
  119. package/src/{daemon → runtime/daemon}/promptLoop.js +1 -1
  120. package/src/{daemon → runtime/daemon}/promptRequest.js +7 -7
  121. package/src/runtime/daemon/providerSessions.js +230 -0
  122. package/src/{daemon → runtime/daemon}/reporting.js +4 -4
  123. package/src/{daemon → runtime/daemon}/run.js +4 -4
  124. package/src/{daemon → runtime/daemon}/soloBootstrap.js +7 -7
  125. package/src/{daemon → runtime/daemon}/status.js +5 -5
  126. package/src/runtime/index.js +10 -0
  127. package/src/{projects → runtime/projects}/registry.js +1 -1
  128. package/src/{terminal → runtime/terminal}/adapterRouter.js +0 -10
  129. package/src/{terminal → runtime/terminal}/adapters/internalAdapter.js +0 -4
  130. package/src/tools/handlers/common.js +1 -1
  131. package/src/tools/handlers/listAgents.js +1 -1
  132. package/src/tools/handlers/memory.js +3 -3
  133. package/src/tools/handlers/readBusSummary.js +1 -1
  134. package/src/tools/handlers/readOpenDecisions.js +1 -1
  135. package/src/tools/handlers/readProjectRegistry.js +1 -1
  136. package/src/tools/handlers/readPromptHistory.js +2 -2
  137. package/src/tools/schemaFixtures.js +1 -1
  138. package/src/ui/MIGRATION.md +42 -88
  139. package/src/ui/format/index.js +5 -28
  140. package/src/ui/index.js +1 -1
  141. package/src/ui/{components → ink}/ChatApp.js +812 -88
  142. package/src/ui/ink/DashboardBar.js +685 -0
  143. package/src/ui/{components → ink}/MultilineInput.js +230 -5
  144. package/src/ui/{components → ink}/UcodeApp.js +16 -7
  145. package/src/ui/{components → ink}/agentMirror.js +24 -19
  146. package/src/ui/{components → ink}/chatReducer.js +29 -7
  147. package/src/bus/messageMeta.js +0 -52
  148. package/src/chat/agentViewController.js +0 -1072
  149. package/src/chat/chatLogController.js +0 -138
  150. package/src/chat/completionController.js +0 -533
  151. package/src/chat/dashboardKeyController.js +0 -533
  152. package/src/chat/index.js +0 -2222
  153. package/src/chat/inputHistoryController.js +0 -135
  154. package/src/chat/inputListenerController.js +0 -470
  155. package/src/chat/layout.js +0 -186
  156. package/src/chat/pasteController.js +0 -81
  157. package/src/chat/statusLineController.js +0 -223
  158. package/src/chat/streamTracker.js +0 -156
  159. package/src/code/config +0 -0
  160. package/src/daemon/providerSessions.js +0 -488
  161. package/src/terminal/adapters/internalPtyAdapter.js +0 -42
  162. package/src/ui/components/DashboardBar.js +0 -417
  163. /package/src/{code/prompts → agents/prompts/native}/actions.js +0 -0
  164. /package/src/{code/prompts → agents/prompts/native}/efficiency.js +0 -0
  165. /package/src/{code/prompts → agents/prompts/native}/environment.js +0 -0
  166. /package/src/{code/prompts → agents/prompts/native}/identity.js +0 -0
  167. /package/src/{code/prompts → agents/prompts/native}/safety.js +0 -0
  168. /package/src/{code/prompts → agents/prompts/native}/sections.js +0 -0
  169. /package/src/{code/prompts → agents/prompts/native}/system.js +0 -0
  170. /package/src/{code/prompts → agents/prompts/native}/tasks.js +0 -0
  171. /package/src/{code/prompts → agents/prompts/native}/toolDescriptions/bash.js +0 -0
  172. /package/src/{code/prompts → agents/prompts/native}/toolDescriptions/edit.js +0 -0
  173. /package/src/{code/prompts → agents/prompts/native}/toolDescriptions/read.js +0 -0
  174. /package/src/{code/prompts → agents/prompts/native}/toolDescriptions/write.js +0 -0
  175. /package/src/{code/prompts → agents/prompts/native}/ufoo.js +0 -0
  176. /package/src/{group → agents/prompts}/promptProfiles.js +0 -0
  177. /package/src/{agent → agents/providers}/claudeEventTranslator.js +0 -0
  178. /package/src/{agent → agents/providers}/claudeOauthTokenReader.js +0 -0
  179. /package/src/{agent → agents/providers}/claudeSessionFiles.js +0 -0
  180. /package/src/{agent → agents/providers}/codexEventTranslator.js +0 -0
  181. /package/src/{agent → agents/providers}/credentials/claude.js +0 -0
  182. /package/src/{agent → agents/providers}/credentials/codex.js +0 -0
  183. /package/src/{agent → agents/providers}/credentials/index.js +0 -0
  184. /package/src/{chat → app/chat}/agentBar.js +0 -0
  185. /package/src/{chat → app/chat}/agentDirectory.js +0 -0
  186. /package/src/{chat → app/chat}/cronScheduler.js +0 -0
  187. /package/src/{chat → app/chat}/daemonCoordinator.js +0 -0
  188. /package/src/{chat → app/chat}/daemonReconnect.js +0 -0
  189. /package/src/{chat → app/chat}/daemonTransport.js +0 -0
  190. /package/src/{chat → app/chat}/daemonTransportDefaults.js +0 -0
  191. /package/src/{chat → app/chat}/inputMath.js +0 -0
  192. /package/src/{chat → app/chat}/projectCloseController.js +0 -0
  193. /package/src/{chat → app/chat}/rawKeyMap.js +0 -0
  194. /package/src/{chat → app/chat}/settingsController.js +0 -0
  195. /package/src/{chat → app/chat}/shellCommand.js +0 -0
  196. /package/src/{chat → app/chat}/text.js +0 -0
  197. /package/src/{chat → app/chat}/transientAgentState.js +0 -0
  198. /package/src/{cli → app/cli}/busCoreCommands.js +0 -0
  199. /package/src/{skills/index.js → app/cli/features/skills.js} +0 -0
  200. /package/src/{bus → coordination/bus}/nickname.js +0 -0
  201. /package/src/{bus → coordination/bus}/queue.js +0 -0
  202. /package/src/{context → coordination/context}/decisions.js +0 -0
  203. /package/src/{context → coordination/context}/doctor.js +0 -0
  204. /package/src/{context → coordination/context}/index.js +0 -0
  205. /package/src/{context → coordination/context}/sync.js +0 -0
  206. /package/src/{ufoo → coordination/state}/agentRegistryDiagnostics.js +0 -0
  207. /package/src/{ufoo → coordination/state}/agentsStore.js +0 -0
  208. /package/src/{ufoo → coordination/state}/paths.js +0 -0
  209. /package/src/{controller → orchestration/controller}/launchRouting.js +0 -0
  210. /package/src/{controller → orchestration/controller}/routerFastPath.js +0 -0
  211. /package/src/{controller → orchestration/controller}/routerFinalize.js +0 -0
  212. /package/src/{group → orchestration/groups}/diagram.js +0 -0
  213. /package/src/{group → orchestration/groups}/templateValidation.js +0 -0
  214. /package/src/{solo → orchestration/solo}/commands.js +0 -0
  215. /package/src/{shared → runtime/contracts}/eventContract.js +0 -0
  216. /package/src/{shared → runtime/contracts}/ptySocketContract.js +0 -0
  217. /package/src/{providerapi → runtime/privacy}/redactor.js +0 -0
  218. /package/src/{providerapi → runtime/privacy}/shadowDiff.js +0 -0
  219. /package/src/{utils → runtime/process}/nodeExecutable.js +0 -0
  220. /package/src/{projects → runtime/projects}/identity.js +0 -0
  221. /package/src/{projects → runtime/projects}/index.js +0 -0
  222. /package/src/{projects → runtime/projects}/projectId.js +0 -0
  223. /package/src/{projects → runtime/projects}/runtimes.js +0 -0
  224. /package/src/{terminal → runtime/terminal}/adapterContract.js +0 -0
  225. /package/src/{terminal → runtime/terminal}/adapters/externalAdapter.js +0 -0
  226. /package/src/{terminal → runtime/terminal}/adapters/hostAdapter.js +0 -0
  227. /package/src/{terminal → runtime/terminal}/adapters/internalQueueAdapter.js +0 -0
  228. /package/src/{terminal → runtime/terminal}/adapters/terminalAdapter.js +0 -0
  229. /package/src/{terminal → runtime/terminal}/adapters/tmuxAdapter.js +0 -0
  230. /package/src/{terminal → runtime/terminal}/detect.js +0 -0
  231. /package/src/{terminal → runtime/terminal}/index.js +0 -0
  232. /package/src/{terminal → runtime/terminal}/iterm2.js +0 -0
  233. /package/src/{utils → ui/format}/banner.js +0 -0
  234. /package/src/{shared → ui/format}/markdownRenderer.js +0 -0
  235. /package/src/ui/{components → ink}/InkDemo.js +0 -0
@@ -3,21 +3,21 @@ const os = require("os");
3
3
  const { spawnSync } = require("child_process");
4
4
  const net = require("net");
5
5
  const fs = require("fs");
6
- const { socketPath, isRunning } = require("./daemon");
7
- const { runBusCoreCommand } = require("./cli/busCoreCommands");
8
- const { runCtxCommand } = require("./cli/ctxCoreCommands");
9
- const { runOnlineCommand } = require("./cli/onlineCoreCommands");
10
- const { runGroupCoreCommand } = require("./cli/groupCoreCommands");
11
- const { loadConfig } = require("./config");
12
- const { loadPromptProfileRegistry } = require("./group/promptProfiles");
13
- const { resolveSoloAgentType } = require("./solo/commands");
14
- const { listProjectRuntimes, getCurrentProjectRuntime } = require("./projects/registry");
15
- const { canonicalProjectRoot, buildProjectId } = require("./projects/projectId");
16
- const { getUfooPaths } = require("./ufoo/paths");
17
- const { resolveNodeExecutable } = require("./utils/nodeExecutable");
6
+ const { socketPath, isRunning } = require("../../runtime/daemon");
7
+ const { runBusCoreCommand } = require("./busCoreCommands");
8
+ const { runCtxCommand } = require("./ctxCoreCommands");
9
+ const { runOnlineCommand } = require("./onlineCoreCommands");
10
+ const { runGroupCoreCommand } = require("./groupCoreCommands");
11
+ const { loadConfig } = require("../../config");
12
+ const { loadPromptProfileRegistry } = require("../../orchestration/groups/promptProfiles");
13
+ const { resolveSoloAgentType } = require("../../orchestration/solo/commands");
14
+ const { listProjectRuntimes, getCurrentProjectRuntime } = require("../../runtime/projects/registry");
15
+ const { canonicalProjectRoot, buildProjectId } = require("../../runtime/projects/projectId");
16
+ const { getUfooPaths } = require("../../coordination/state/paths");
17
+ const { resolveNodeExecutable } = require("../../runtime/process/nodeExecutable");
18
18
 
19
19
  function getPackageRoot() {
20
- return path.resolve(__dirname, "..");
20
+ return path.resolve(__dirname, "..", "..", "..");
21
21
  }
22
22
 
23
23
  function run(cmd, args, options = {}) {
@@ -286,7 +286,7 @@ function runMemoryCommand({
286
286
  write = (line) => console.log(line),
287
287
  writeError = (line) => console.error(line),
288
288
  } = {}) {
289
- const MemoryManager = require("./memory");
289
+ const MemoryManager = require("../../coordination/memory");
290
290
  const manager = new MemoryManager(cwd);
291
291
  const sub = String(subcommand || "list").trim().toLowerCase();
292
292
  const outputJson = opts.json === true;
@@ -475,7 +475,7 @@ function resolveOnlineAuthToken(opts) {
475
475
  let tokens = null;
476
476
  try {
477
477
  // eslint-disable-next-line global-require
478
- tokens = require("./online/tokens");
478
+ tokens = require("../../online/tokens");
479
479
  } catch {
480
480
  return "";
481
481
  }
@@ -513,7 +513,7 @@ async function runCli(argv) {
513
513
  .description("Run repo doctor checks")
514
514
  .action(() => {
515
515
  const repoRoot = getPackageRoot();
516
- const RepoDoctor = require("./doctor");
516
+ const RepoDoctor = require("./features/doctor");
517
517
  const doctor = new RepoDoctor(repoRoot);
518
518
  const ok = doctor.run();
519
519
  if (!ok) process.exitCode = 1;
@@ -522,7 +522,7 @@ async function runCli(argv) {
522
522
  .command("status")
523
523
  .description("Show project status (banner, unread bus, open decisions)")
524
524
  .action(async () => {
525
- const StatusDisplay = require("./status");
525
+ const StatusDisplay = require("../../coordination/status");
526
526
  const status = new StatusDisplay(process.cwd());
527
527
  await status.show();
528
528
  });
@@ -688,8 +688,8 @@ async function runCli(argv) {
688
688
 
689
689
  program
690
690
  .command("launch")
691
- .description("Launch an agent (ucode, uclaude, ucodex)")
692
- .argument("<agent>", "Agent type: ucode|uclaude|ucodex|claude|codex")
691
+ .description("Launch an agent (uclaude, ucodex, uagy, ucode)")
692
+ .argument("<agent>", "Agent type: uclaude|ucodex|uagy|ucode|claude|codex|agy")
693
693
  .argument("[nickname]", "Optional nickname for the agent")
694
694
  .option("--profile <id>", "Prompt profile to assign after launch")
695
695
  .action(async (agent, nickname, opts) => {
@@ -700,15 +700,17 @@ async function runCli(argv) {
700
700
  // Normalize agent type
701
701
  const agentLower = agent.toLowerCase();
702
702
  let normalizedAgent = "";
703
- if (agentLower === "ucode" || agentLower === "ufoo-code" || agentLower === "ufoo") {
704
- normalizedAgent = "ucode";
705
- } else if (agentLower === "uclaude" || agentLower === "claude-code" || agentLower === "claude") {
703
+ if (agentLower === "uclaude" || agentLower === "claude-code" || agentLower === "claude") {
706
704
  normalizedAgent = "claude";
707
705
  } else if (agentLower === "ucodex" || agentLower === "codex" || agentLower === "openai") {
708
706
  normalizedAgent = "codex";
707
+ } else if (agentLower === "uagy" || agentLower === "agy" || agentLower === "antigravity") {
708
+ normalizedAgent = "agy";
709
+ } else if (agentLower === "ucode" || agentLower === "ufoo-code" || agentLower === "ufoo") {
710
+ normalizedAgent = "ucode";
709
711
  } else {
710
712
  console.error(`Unknown agent type: ${agent}`);
711
- console.error("Valid types: ucode, uclaude, ucodex, claude, codex");
713
+ console.error("Valid types: uclaude, ucodex, uagy, ucode, claude, codex, agy");
712
714
  process.exitCode = 1;
713
715
  return;
714
716
  }
@@ -733,7 +735,7 @@ async function runCli(argv) {
733
735
  .description("Solo role agent operations")
734
736
  .argument("<action>", "run|list")
735
737
  .argument("[profile]", "Prompt profile id or alias")
736
- .option("--agent <type>", "Agent type: codex|claude|ucode")
738
+ .option("--agent <type>", "Agent type: codex|claude|ucode|agy")
737
739
  .option("--nickname <name>", "Optional nickname")
738
740
  .option("--scope <scope>", "Launch scope: inplace|window", "inplace")
739
741
  .option("--json", "Output role list as JSON")
@@ -915,7 +917,7 @@ async function runCli(argv) {
915
917
  const normalized = normalizeReportPhase(action);
916
918
  const text = Array.isArray(messageParts) ? messageParts.join(" ").trim() : String(messageParts || "").trim();
917
919
  const projectRoot = process.cwd();
918
- const { listReports } = require("./report/store");
920
+ const { listReports } = require("../../coordination/report/store");
919
921
 
920
922
  if ((action || "").toLowerCase() === "list") {
921
923
  try {
@@ -1002,8 +1004,8 @@ async function runCli(argv) {
1002
1004
  .argument("[action]", "doctor|prepare|build", "doctor")
1003
1005
  .option("--skip-install", "Skip npm install even if node_modules is missing")
1004
1006
  .action((action, opts) => {
1005
- const { inspectUcodeSetup, formatUcodeDoctor, prepareAndInspectUcode } = require("./agent/ucodeDoctor");
1006
- const { buildUcodeCore } = require("./agent/ucodeBuild");
1007
+ const { inspectUcodeSetup, formatUcodeDoctor, prepareAndInspectUcode } = require("../../code/launcher/ucodeDoctor");
1008
+ const { buildUcodeCore } = require("../../code/launcher/ucodeBuild");
1007
1009
  const normalized = String(action || "doctor").trim().toLowerCase();
1008
1010
  if (normalized !== "doctor" && normalized !== "prepare" && normalized !== "build") {
1009
1011
  console.error("ucode action must be doctor|prepare|build");
@@ -1044,7 +1046,7 @@ async function runCli(argv) {
1044
1046
  .option("--modules <list>", "Comma-separated modules (context,bus,resources)", "context")
1045
1047
  .option("--project <dir>", "Target project directory", process.cwd())
1046
1048
  .action(async (opts) => {
1047
- const UfooInit = require("./init");
1049
+ const UfooInit = require("./features/init");
1048
1050
  const repoRoot = getPackageRoot();
1049
1051
  const init = new UfooInit(repoRoot);
1050
1052
  try {
@@ -1060,7 +1062,7 @@ async function runCli(argv) {
1060
1062
  .command("list")
1061
1063
  .description("List available skills")
1062
1064
  .action(() => {
1063
- const SkillsManager = require("./skills");
1065
+ const SkillsManager = require("./features/skills");
1064
1066
  const repoRoot = getPackageRoot();
1065
1067
  const manager = new SkillsManager(repoRoot);
1066
1068
  const skillsList = manager.list();
@@ -1074,7 +1076,7 @@ async function runCli(argv) {
1074
1076
  .option("--codex", "Install into ~/.codex/skills")
1075
1077
  .option("--agents", "Install into ~/.agents/skills")
1076
1078
  .action(async (name, opts) => {
1077
- const SkillsManager = require("./skills");
1079
+ const SkillsManager = require("./features/skills");
1078
1080
  const repoRoot = getPackageRoot();
1079
1081
  const manager = new SkillsManager(repoRoot);
1080
1082
  try {
@@ -1446,7 +1448,7 @@ async function runCli(argv) {
1446
1448
  .option("--no-bell", "Disable terminal bell")
1447
1449
  .allowUnknownOption(true)
1448
1450
  .action((subscriber, interval, opts) => {
1449
- const EventBus = require("./bus");
1451
+ const EventBus = require("../../coordination/bus");
1450
1452
  const eventBus = new EventBus(process.cwd());
1451
1453
  const parsedInterval = parseInt(interval, 10);
1452
1454
  eventBus
@@ -1470,7 +1472,7 @@ async function runCli(argv) {
1470
1472
  .option("--reset", "Truncate pending queue before listening")
1471
1473
  .option("--auto-join", "Auto-join bus to get subscriber ID")
1472
1474
  .action((subscriber, opts) => {
1473
- const EventBus = require("./bus");
1475
+ const EventBus = require("../../coordination/bus");
1474
1476
  const eventBus = new EventBus(process.cwd());
1475
1477
  eventBus
1476
1478
  .listen(subscriber, {
@@ -1491,7 +1493,7 @@ async function runCli(argv) {
1491
1493
  .option("--stop", "Stop running daemon")
1492
1494
  .option("--status", "Check daemon status")
1493
1495
  .action((opts) => {
1494
- const EventBus = require("./bus");
1496
+ const EventBus = require("../../coordination/bus");
1495
1497
  const eventBus = new EventBus(process.cwd());
1496
1498
  (async () => {
1497
1499
  try {
@@ -1514,7 +1516,7 @@ async function runCli(argv) {
1514
1516
  .description("Inject /bus into a Terminal.app tab by subscriber ID")
1515
1517
  .argument("<subscriber>", "Subscriber ID to inject into")
1516
1518
  .action((subscriber) => {
1517
- const EventBus = require("./bus");
1519
+ const EventBus = require("../../coordination/bus");
1518
1520
  const eventBus = new EventBus(process.cwd());
1519
1521
  (async () => {
1520
1522
  try {
@@ -1532,7 +1534,7 @@ async function runCli(argv) {
1532
1534
  .option("--reason <reason>", "Wake reason")
1533
1535
  .option("--no-shake", "Disable window shake")
1534
1536
  .action((target, opts) => {
1535
- const EventBus = require("./bus");
1537
+ const EventBus = require("../../coordination/bus");
1536
1538
  const eventBus = new EventBus(process.cwd());
1537
1539
  (async () => {
1538
1540
  try {
@@ -1548,7 +1550,7 @@ async function runCli(argv) {
1548
1550
  .description("Activate (focus) the terminal/tmux window of an agent")
1549
1551
  .argument("<agent-id>", "Agent ID or nickname to activate")
1550
1552
  .action((agentId) => {
1551
- const AgentActivator = require("./bus/activate");
1553
+ const AgentActivator = require("../../coordination/bus/activate");
1552
1554
  const activator = new AgentActivator(process.cwd());
1553
1555
  (async () => {
1554
1556
  try {
@@ -1565,7 +1567,7 @@ async function runCli(argv) {
1565
1567
  .allowUnknownOption(true)
1566
1568
  .argument("<args...>", "Arguments passed to bus module")
1567
1569
  .action(async (args) => {
1568
- const EventBus = require("./bus");
1570
+ const EventBus = require("../../coordination/bus");
1569
1571
  const eventBus = new EventBus(process.cwd());
1570
1572
  const cmd = args[0];
1571
1573
  const cmdArgs = args.slice(1);
@@ -1610,7 +1612,7 @@ async function runCli(argv) {
1610
1612
  .description("Build unified input timeline (incremental by default)")
1611
1613
  .option("--force", "Full rebuild (ignore watermark)")
1612
1614
  .action((opts) => {
1613
- const { buildTimeline } = require("./history/inputTimeline");
1615
+ const { buildTimeline } = require("../../coordination/history/inputTimeline");
1614
1616
  const result = buildTimeline(process.cwd(), { force: opts.force === true });
1615
1617
  console.log(`Timeline: ${result.count} total, ${result.newCount} new → ${result.file}`);
1616
1618
  });
@@ -1619,7 +1621,7 @@ async function runCli(argv) {
1619
1621
  .description("Show recent timeline entries")
1620
1622
  .argument("[limit]", "Number of entries to show", "50")
1621
1623
  .action((limit) => {
1622
- const { showTimeline } = require("./history/inputTimeline");
1624
+ const { showTimeline } = require("../../coordination/history/inputTimeline");
1623
1625
  showTimeline(process.cwd(), parseInt(limit, 10) || 50);
1624
1626
  });
1625
1627
  history
@@ -1627,7 +1629,7 @@ async function runCli(argv) {
1627
1629
  .description("Render timeline as injectable prompt context")
1628
1630
  .argument("[limit]", "Number of entries to include", "30")
1629
1631
  .action((limit) => {
1630
- const { renderTimelineForPrompt } = require("./history/inputTimeline");
1632
+ const { renderTimelineForPrompt } = require("../../coordination/history/inputTimeline");
1631
1633
  const text = renderTimelineForPrompt(process.cwd(), parseInt(limit, 10) || 30);
1632
1634
  if (text) {
1633
1635
  console.log(text);
@@ -1647,7 +1649,7 @@ async function runCli(argv) {
1647
1649
 
1648
1650
  // 检查是否是 --version 或 -V 参数
1649
1651
  if (argv.includes("--version") || argv.includes("-V")) {
1650
- const { showUfooBanner } = require("./utils/banner");
1652
+ const { showUfooBanner } = require("../../ui/format/banner");
1651
1653
  showUfooBanner({ version: pkg.version });
1652
1654
  return;
1653
1655
  }
@@ -1687,7 +1689,7 @@ async function runCli(argv) {
1687
1689
  console.log(" ufoo group diagram <alias|groupId> [--ascii|--mermaid] [--json]");
1688
1690
  console.log(" ufoo group stop <groupId> [--json]");
1689
1691
  console.log(" ufoo solo list [--json]");
1690
- console.log(" ufoo solo run <profile> [--agent <codex|claude|ucode>] [--nickname <name>] [--scope <inplace|window>]");
1692
+ console.log(" ufoo solo run <profile> [--agent <codex|claude|ucode|agy>] [--nickname <name>] [--scope <inplace|window>]");
1691
1693
  console.log(" ufoo online server [--port 8787] [--host 127.0.0.1] [--token-file <path>]");
1692
1694
  console.log(" ufoo online token <subscriber> [--nickname <name>] [--server <url>] [--file <path>]");
1693
1695
  console.log(" ufoo online room create [--name <room>] --type public|private [--password <pwd>] [--created-by <name>] [--server <url>]");
@@ -1712,20 +1714,20 @@ async function runCli(argv) {
1712
1714
  }
1713
1715
 
1714
1716
  if (cmd === "--version" || cmd === "-V") {
1715
- const { showUfooBanner } = require("./utils/banner");
1717
+ const { showUfooBanner } = require("../../ui/format/banner");
1716
1718
  showUfooBanner({ version: pkg.version });
1717
1719
  return;
1718
1720
  }
1719
1721
 
1720
1722
  if (cmd === "doctor") {
1721
- const RepoDoctor = require("./doctor");
1723
+ const RepoDoctor = require("./features/doctor");
1722
1724
  const doctor = new RepoDoctor(repoRoot);
1723
1725
  const ok = doctor.run();
1724
1726
  if (!ok) process.exitCode = 1;
1725
1727
  return;
1726
1728
  }
1727
1729
  if (cmd === "status") {
1728
- const StatusDisplay = require("./status");
1730
+ const StatusDisplay = require("../../coordination/status");
1729
1731
  const status = new StatusDisplay(process.cwd());
1730
1732
  status.show().catch((err) => {
1731
1733
  console.error(err.message);
@@ -1832,7 +1834,7 @@ async function runCli(argv) {
1832
1834
  if (cmd === "report") {
1833
1835
  const action = String(rest[0] || "").toLowerCase();
1834
1836
  const normalized = normalizeReportPhase(action);
1835
- const { listReports } = require("./report/store");
1837
+ const { listReports } = require("../../coordination/report/store");
1836
1838
 
1837
1839
  if (action === "list") {
1838
1840
  const agentIdx = rest.indexOf("--agent");
@@ -1947,8 +1949,8 @@ async function runCli(argv) {
1947
1949
  }
1948
1950
  if (cmd === "ucode") {
1949
1951
  const action = String(rest[0] || "doctor").trim().toLowerCase();
1950
- const { inspectUcodeSetup, formatUcodeDoctor, prepareAndInspectUcode } = require("./agent/ucodeDoctor");
1951
- const { buildUcodeCore } = require("./agent/ucodeBuild");
1952
+ const { inspectUcodeSetup, formatUcodeDoctor, prepareAndInspectUcode } = require("../../code/launcher/ucodeDoctor");
1953
+ const { buildUcodeCore } = require("../../code/launcher/ucodeBuild");
1952
1954
  const skipInstall = rest.includes("--skip-install");
1953
1955
  if (action !== "doctor" && action !== "prepare" && action !== "build") {
1954
1956
  console.error("ucode action must be doctor|prepare|build");
@@ -2016,7 +2018,7 @@ async function runCli(argv) {
2016
2018
  return;
2017
2019
  }
2018
2020
  if (cmd === "init") {
2019
- const UfooInit = require("./init");
2021
+ const UfooInit = require("./features/init");
2020
2022
  const init = new UfooInit(repoRoot);
2021
2023
 
2022
2024
  const getOpt = (name, def) => {
@@ -2038,7 +2040,7 @@ async function runCli(argv) {
2038
2040
  return;
2039
2041
  }
2040
2042
  if (cmd === "skills") {
2041
- const SkillsManager = require("./skills");
2043
+ const SkillsManager = require("./features/skills");
2042
2044
  const manager = new SkillsManager(repoRoot);
2043
2045
  const sub = rest[0] || "";
2044
2046
 
@@ -2298,7 +2300,7 @@ async function runCli(argv) {
2298
2300
  if (cmd === "bus") {
2299
2301
  const sub = rest[0] || "";
2300
2302
  if (sub === "alert") {
2301
- const EventBus = require("./bus");
2303
+ const EventBus = require("../../coordination/bus");
2302
2304
  const eventBus = new EventBus(process.cwd());
2303
2305
  const args = rest.slice(1);
2304
2306
  const subscriber = args[0];
@@ -2324,7 +2326,7 @@ async function runCli(argv) {
2324
2326
  return;
2325
2327
  }
2326
2328
  if (sub === "listen") {
2327
- const EventBus = require("./bus");
2329
+ const EventBus = require("../../coordination/bus");
2328
2330
  const eventBus = new EventBus(process.cwd());
2329
2331
  const args = rest.slice(1);
2330
2332
  const subscriber = args.find((arg) => !arg.startsWith("--"));
@@ -2343,7 +2345,7 @@ async function runCli(argv) {
2343
2345
  }
2344
2346
  if (sub === "daemon") {
2345
2347
  // 使用 JavaScript daemon
2346
- const EventBus = require("./bus");
2348
+ const EventBus = require("../../coordination/bus");
2347
2349
  const eventBus = new EventBus(process.cwd());
2348
2350
 
2349
2351
  (async () => {
@@ -2370,7 +2372,7 @@ async function runCli(argv) {
2370
2372
  }
2371
2373
  if (sub === "inject") {
2372
2374
  // 使用 JavaScript inject
2373
- const EventBus = require("./bus");
2375
+ const EventBus = require("../../coordination/bus");
2374
2376
  const eventBus = new EventBus(process.cwd());
2375
2377
 
2376
2378
  (async () => {
@@ -2388,7 +2390,7 @@ async function runCli(argv) {
2388
2390
  return;
2389
2391
  }
2390
2392
  if (sub === "wake") {
2391
- const EventBus = require("./bus");
2393
+ const EventBus = require("../../coordination/bus");
2392
2394
  const eventBus = new EventBus(process.cwd());
2393
2395
  (async () => {
2394
2396
  try {
@@ -2407,7 +2409,7 @@ async function runCli(argv) {
2407
2409
  }
2408
2410
 
2409
2411
  // Use JavaScript EventBus module for core commands
2410
- const EventBus = require("./bus");
2412
+ const EventBus = require("../../coordination/bus");
2411
2413
  const eventBus = new EventBus(process.cwd());
2412
2414
 
2413
2415
  (async () => {
@@ -2445,7 +2447,7 @@ async function runCli(argv) {
2445
2447
  if (cmd === "history") {
2446
2448
  const sub = rest[0] || "show";
2447
2449
  const cwd = process.cwd();
2448
- const { buildTimeline, showTimeline, renderTimelineForPrompt } = require("./history/inputTimeline");
2450
+ const { buildTimeline, showTimeline, renderTimelineForPrompt } = require("../../coordination/history/inputTimeline");
2449
2451
 
2450
2452
  if (sub === "build") {
2451
2453
  const force = rest.includes("--force");
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ module.exports = {
4
+ chat: require("./chat"),
5
+ cli: require("./cli"),
6
+ };
package/src/code/agent.js CHANGED
@@ -16,7 +16,7 @@ const {
16
16
  createEscapeTagStripper,
17
17
  stripLeakedEscapeTags,
18
18
  } = require("./tui");
19
- const { stripBlessedTags } = require("../chat/text");
19
+ const { stripBlessedTags } = require("../app/chat/text");
20
20
  const { loadConfig, defaultAgentModelForProvider, sameModelProvider } = require("../config");
21
21
  const {
22
22
  resolveSessionId,
@@ -24,7 +24,7 @@ const {
24
24
  saveSessionSnapshot,
25
25
  loadSessionSnapshot,
26
26
  } = require("./sessionStore");
27
- const { buildPromptContext } = require("./prompts");
27
+ const { buildPromptContext } = require("../agents/prompts/native");
28
28
  const {
29
29
  buildSkillInjections,
30
30
  formatSkillsList,
@@ -50,10 +50,11 @@ function normalizeLine(input = "") {
50
50
  return String(input || "").trim();
51
51
  }
52
52
 
53
- function parseProbeMarkerCommand(input = "") {
53
+ function parseLegacyUfooMarkerCommand(input = "") {
54
54
  const text = String(input || "").trim();
55
55
  if (!text) return "";
56
- // Accept only strict probe markers: "<prefix> <single-marker-token>".
56
+ // Old daemons injected strict "<prefix> <single-token>" commands for
57
+ // session discovery. Keep ignoring those inputs after removing injection.
57
58
  const match = text.match(/^(?:\$ufoo|\/ufoo|ufoo)\s+([A-Za-z0-9][A-Za-z0-9._:-]{0,63})$/);
58
59
  return match ? String(match[1] || "").trim() : "";
59
60
  }
@@ -1321,11 +1322,11 @@ function runSingleCommand(line = "", workspaceRoot = process.cwd()) {
1321
1322
  ].join("\n"),
1322
1323
  };
1323
1324
  }
1324
- const probeMarker = parseProbeMarkerCommand(text);
1325
- if (probeMarker) {
1325
+ const legacyUfooMarker = parseLegacyUfooMarkerCommand(text);
1326
+ if (legacyUfooMarker) {
1326
1327
  return {
1327
- kind: "probe",
1328
- marker: probeMarker,
1328
+ kind: "legacy_ufoo_marker",
1329
+ marker: legacyUfooMarker,
1329
1330
  };
1330
1331
  }
1331
1332
  if (text === "ubus" || text === "/ubus") {
@@ -1613,7 +1614,7 @@ async function runUcodeCoreAgent({
1613
1614
  rl.close();
1614
1615
  return;
1615
1616
  }
1616
- if (result.kind === "probe") {
1617
+ if (result.kind === "legacy_ufoo_marker") {
1617
1618
  return;
1618
1619
  }
1619
1620
  if (result.kind === "help" || result.kind === "tool" || result.kind === "skills" || result.kind === "error") {
package/src/code/index.js CHANGED
@@ -32,6 +32,7 @@ const {
32
32
  saveSessionSnapshot,
33
33
  loadSessionSnapshot,
34
34
  } = require("./sessionStore");
35
+ const launcher = require("./launcher");
35
36
 
36
37
  module.exports = {
37
38
  TOOL_NAMES,
@@ -67,4 +68,5 @@ module.exports = {
67
68
  getSessionFilePath,
68
69
  saveSessionSnapshot,
69
70
  loadSessionSnapshot,
71
+ ...launcher,
70
72
  };
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ module.exports = {
4
+ ...require("./ucode"),
5
+ ...require("./ucodeBootstrap"),
6
+ ...require("./ucodeBuild"),
7
+ ...require("./ucodeDoctor"),
8
+ ...require("./ucodeRuntimeConfig"),
9
+ };
@@ -1,11 +1,10 @@
1
- const { loadConfig } = require("../config");
1
+ const { loadConfig } = require("../../config");
2
2
  const path = require("path");
3
3
  const fs = require("fs");
4
4
 
5
5
  function bundledModuleRoots() {
6
- const repoRoot = path.join(__dirname, "..", "..");
7
6
  return [
8
- path.join(repoRoot, "src", "code"),
7
+ path.join(__dirname, ".."),
9
8
  ];
10
9
  }
11
10
 
@@ -22,7 +21,7 @@ function resolveFirstExisting(paths = []) {
22
21
  }
23
22
 
24
23
  function defaultBundledCoreRoot() {
25
- const root = path.join(__dirname, "..", "code");
24
+ const root = path.join(__dirname, "..");
26
25
  const agentEntry = path.join(root, "agent.js");
27
26
  if (resolveFirstExisting([agentEntry])) return root;
28
27
  return root;
@@ -289,8 +288,8 @@ function resolveCandidateCoreRoot({
289
288
 
290
289
  function resolveNativeFallbackCommand({ env = process.env } = {}) {
291
290
  const candidates = [
292
- path.resolve(__dirname, "..", "code", "agent.js"),
293
- path.resolve(__dirname, "..", "..", "bin", "ucode-core.js"),
291
+ path.resolve(__dirname, "..", "agent.js"),
292
+ path.resolve(__dirname, "..", "..", "..", "bin", "ucode-core.js"),
294
293
  ];
295
294
  for (const entry of candidates) {
296
295
  try {
@@ -299,7 +298,7 @@ function resolveNativeFallbackCommand({ env = process.env } = {}) {
299
298
  return {
300
299
  command: process.execPath,
301
300
  args: [entry],
302
- root: path.resolve(__dirname, "..", "code"),
301
+ root: path.resolve(__dirname, ".."),
303
302
  kind: "native",
304
303
  available: true,
305
304
  resolvedPath: entry,
@@ -308,7 +307,7 @@ function resolveNativeFallbackCommand({ env = process.env } = {}) {
308
307
  return {
309
308
  command: process.execPath,
310
309
  args: [entry, "agent"],
311
- root: path.resolve(__dirname, "..", "code"),
310
+ root: path.resolve(__dirname, ".."),
312
311
  kind: "native",
313
312
  available: true,
314
313
  resolvedPath: entry,
@@ -1,7 +1,7 @@
1
1
  const fs = require("fs");
2
2
  const path = require("path");
3
- const { getUfooPaths } = require("../ufoo/paths");
4
- const { buildDefaultStartupBootstrapPrompt } = require("./defaultBootstrap");
3
+ const { getUfooPaths } = require("../../coordination/state/paths");
4
+ const { buildDefaultStartupBootstrapPrompt } = require("../../agents/prompts/defaultBootstrap");
5
5
 
6
6
  function readFileSafe(filePath = "") {
7
7
  if (!filePath) return "";
@@ -77,7 +77,7 @@ function buildBootstrapContent({
77
77
 
78
78
  function hasUfooProtocolPrompt(promptText = "") {
79
79
  const text = String(promptText || "");
80
- return text.includes("ufoo protocol:") && text.includes("ufoo ctx decisions -l");
80
+ return text.includes("Session harness: ufoo") && text.includes("ufoo ctx decisions -l");
81
81
  }
82
82
 
83
83
  function mergeDefaultUfooProtocolPrompt(projectRoot = "", promptText = "") {
@@ -1,6 +1,6 @@
1
1
  const fs = require("fs");
2
2
  const path = require("path");
3
- const { loadConfig } = require("../config");
3
+ const { loadConfig } = require("../../config");
4
4
  const {
5
5
  resolveNativeFallbackCommand,
6
6
  } = require("./ucode");
@@ -12,7 +12,7 @@ function resolveCoreRoot({
12
12
  void env;
13
13
  void config;
14
14
  const native = resolveNativeFallbackCommand();
15
- return native.root || path.resolve(__dirname, "..", "code");
15
+ return native.root || path.resolve(__dirname, "..");
16
16
  }
17
17
 
18
18
  function inspectUcodeBuildSetup({
@@ -1,6 +1,6 @@
1
1
  const fs = require("fs");
2
2
  const path = require("path");
3
- const { loadConfig } = require("../config");
3
+ const { loadConfig } = require("../../config");
4
4
  const {
5
5
  resolveNativeFallbackCommand,
6
6
  defaultBundledPromptFile,
@@ -20,7 +20,7 @@ function inspectUcodeSetup({
20
20
  const native = resolveNativeImpl({ env, config, cwd: root });
21
21
  const coreAvailable = Boolean(native && native.available !== false && native.command);
22
22
  const core = native ? {
23
- root: native.root || path.resolve(__dirname, "..", "code"),
23
+ root: native.root || path.resolve(__dirname, ".."),
24
24
  command: native.command,
25
25
  args: native.args || [],
26
26
  available: coreAvailable,
@@ -1,6 +1,6 @@
1
1
  const fs = require("fs");
2
2
  const path = require("path");
3
- const { loadGlobalUcodeConfig } = require("../config");
3
+ const { loadGlobalUcodeConfig } = require("../../config");
4
4
 
5
5
  function readJson(filePath = "", fallback = {}) {
6
6
  if (!filePath) return fallback;
@@ -134,4 +134,3 @@ module.exports = {
134
134
  inspectUcodeRuntimeConfig,
135
135
  prepareUcodeRuntimeConfig,
136
136
  };
137
-
@@ -1,10 +1,10 @@
1
1
  const { randomUUID } = require("crypto");
2
2
  const { loadConfig, defaultAgentModelForProvider, sameModelProvider } = require("../config");
3
3
  const { runToolCall } = require("./dispatch");
4
- const { getReadToolDescription } = require("./prompts/toolDescriptions/read");
5
- const { getWriteToolDescription } = require("./prompts/toolDescriptions/write");
6
- const { getEditToolDescription } = require("./prompts/toolDescriptions/edit");
7
- const { getBashToolDescription } = require("./prompts/toolDescriptions/bash");
4
+ const { getReadToolDescription } = require("../agents/prompts/native/toolDescriptions/read");
5
+ const { getWriteToolDescription } = require("../agents/prompts/native/toolDescriptions/write");
6
+ const { getEditToolDescription } = require("../agents/prompts/native/toolDescriptions/edit");
7
+ const { getBashToolDescription } = require("../agents/prompts/native/toolDescriptions/bash");
8
8
 
9
9
  const CORE_TOOL_NAMES = new Set(["read", "write", "edit", "bash"]);
10
10
  const DEFAULT_OPENAI_BASE_URL = "https://api.openai.com/v1";