u-foo 2.5.14 → 3.0.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 (59) hide show
  1. package/package.json +1 -1
  2. package/src/agents/prompts/native/environment.js +20 -8
  3. package/src/code/agent.js +517 -112
  4. package/src/code/commands.js +77 -0
  5. package/src/code/context/artifactGc.js +292 -0
  6. package/src/code/context/artifactIndex.js +161 -0
  7. package/src/code/context/artifacts.js +183 -0
  8. package/src/code/context/assembler.js +703 -0
  9. package/src/code/context/executionSegment.js +292 -0
  10. package/src/code/context/index.js +28 -0
  11. package/src/code/context/planGraph.js +1410 -0
  12. package/src/code/context/planGraphService.js +857 -0
  13. package/src/code/context/planMode.js +398 -0
  14. package/src/code/context/planProjection.js +432 -0
  15. package/src/code/context/projectSnapshot.js +201 -0
  16. package/src/code/context/promptLayers.js +175 -0
  17. package/src/code/context/reducers.js +328 -0
  18. package/src/code/context/stableJson.js +29 -0
  19. package/src/code/context/stateCommit.js +414 -0
  20. package/src/code/context/toolRuntime.js +172 -0
  21. package/src/code/context/transcript.js +182 -0
  22. package/src/code/context/transcriptSync.js +106 -0
  23. package/src/code/context/userInteraction.js +457 -0
  24. package/src/code/context/userNudge.js +116 -0
  25. package/src/code/context/workingSet.js +323 -0
  26. package/src/code/dispatch.js +20 -1
  27. package/src/code/index.js +8 -0
  28. package/src/code/modelCommand.js +87 -0
  29. package/src/code/nativeRunner.js +625 -34
  30. package/src/code/repl.js +196 -50
  31. package/src/code/runtime/agentWakeup.js +58 -0
  32. package/src/code/runtime/graphOwner.js +41 -0
  33. package/src/code/runtime/graphYieldRouter.js +42 -0
  34. package/src/code/runtime/index.js +15 -0
  35. package/src/code/runtime/loopMailbox.js +124 -0
  36. package/src/code/runtime/runtimeEvents.js +39 -0
  37. package/src/code/runtime/taskControl.js +565 -0
  38. package/src/code/runtime/taskFocus.js +165 -0
  39. package/src/code/runtime/taskLoop.js +383 -0
  40. package/src/code/runtime/taskRun.js +187 -0
  41. package/src/code/runtime/toolProvenance.js +70 -0
  42. package/src/code/runtime/workspaceLease.js +208 -0
  43. package/src/code/sessionStore.js +217 -15
  44. package/src/code/skills/index.js +10 -0
  45. package/src/code/skills/injection.js +66 -3
  46. package/src/code/skills/loader.js +21 -0
  47. package/src/code/skills/manifest.js +87 -0
  48. package/src/code/skills/render.js +15 -1
  49. package/src/code/taskDecomposer.js +56 -2
  50. package/src/code/tools/artifactRead.js +40 -0
  51. package/src/code/tools/askUser.js +11 -0
  52. package/src/code/tools/planGraph.js +29 -0
  53. package/src/code/tui.js +2 -0
  54. package/src/code/usageStore.js +15 -0
  55. package/src/ui/format/index.js +285 -45
  56. package/src/ui/format/markdownRenderer.js +436 -71
  57. package/src/ui/ink/ChatApp.js +39 -8
  58. package/src/ui/ink/UcodeApp.js +592 -43
  59. package/src/ui/ink/chatLogModel.js +102 -21
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "u-foo",
3
- "version": "2.5.14",
3
+ "version": "3.0.0",
4
4
  "description": "Multi-Agent Workspace Protocol. Just add u. claude → uclaude, codex → ucodex.",
5
5
  "license": "SEE LICENSE IN LICENSE",
6
6
  "homepage": "https://ufoo.dev",
@@ -24,13 +24,12 @@ function getShellName() {
24
24
  return shell || "unknown";
25
25
  }
26
26
 
27
- function getEnvironmentSection({ workspaceRoot = "", model = "", provider = "" } = {}) {
27
+ function getSessionStableEnvironmentSection({ workspaceRoot = "", model = "", provider = "" } = {}) {
28
28
  const cwd = workspaceRoot || process.cwd();
29
29
  const isGit = getIsGit(cwd);
30
30
  const platform = process.platform;
31
31
  const shell = getShellName();
32
32
  const osInfo = `${os.type()} ${os.release()}`;
33
- const date = new Date().toISOString().slice(0, 10);
34
33
 
35
34
  const lines = [
36
35
  `Working directory: ${cwd}`,
@@ -38,16 +37,11 @@ function getEnvironmentSection({ workspaceRoot = "", model = "", provider = "" }
38
37
  `Platform: ${platform}`,
39
38
  `Shell: ${shell}`,
40
39
  `OS: ${osInfo}`,
41
- `Date: ${date}`,
42
40
  ];
43
41
 
44
42
  if (provider) lines.push(`Provider: ${provider}`);
45
43
  if (model) lines.push(`Model: ${model}`);
46
44
 
47
- // Tell the model who it is on the bus. Without this, the only identities
48
- // it ever sees are other agents' records in shared context — and it
49
- // adopts them (observed in the wild: ucode-3 introducing itself as
50
- // claude-6, then accepting a wrong name from the user).
51
45
  const subscriberId = String(process.env.UFOO_SUBSCRIBER_ID || "").trim();
52
46
  const nickname = String(process.env.UFOO_NICKNAME || "").trim();
53
47
  if (subscriberId || nickname) {
@@ -58,4 +52,22 @@ function getEnvironmentSection({ workspaceRoot = "", model = "", provider = "" }
58
52
  return `# Environment\n${lines.map((l) => ` - ${l}`).join("\n")}`;
59
53
  }
60
54
 
61
- module.exports = { getEnvironmentSection, getIsGit };
55
+ function getTurnDynamicEnvironmentSection({ workspaceRoot = "" } = {}) {
56
+ const cwd = workspaceRoot || process.cwd();
57
+ const date = new Date().toISOString().slice(0, 10);
58
+ return `# Turn Environment\n - Date: ${date}\n - Working directory (current): ${cwd}`;
59
+ }
60
+
61
+ function getEnvironmentSection(options = {}) {
62
+ return [
63
+ getSessionStableEnvironmentSection(options),
64
+ getTurnDynamicEnvironmentSection(options),
65
+ ].join("\n\n");
66
+ }
67
+
68
+ module.exports = {
69
+ getEnvironmentSection,
70
+ getSessionStableEnvironmentSection,
71
+ getTurnDynamicEnvironmentSection,
72
+ getIsGit,
73
+ };