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.
- package/package.json +1 -1
- package/src/agents/prompts/native/environment.js +20 -8
- package/src/code/agent.js +517 -112
- package/src/code/commands.js +77 -0
- package/src/code/context/artifactGc.js +292 -0
- package/src/code/context/artifactIndex.js +161 -0
- package/src/code/context/artifacts.js +183 -0
- package/src/code/context/assembler.js +703 -0
- package/src/code/context/executionSegment.js +292 -0
- package/src/code/context/index.js +28 -0
- package/src/code/context/planGraph.js +1410 -0
- package/src/code/context/planGraphService.js +857 -0
- package/src/code/context/planMode.js +398 -0
- package/src/code/context/planProjection.js +432 -0
- package/src/code/context/projectSnapshot.js +201 -0
- package/src/code/context/promptLayers.js +175 -0
- package/src/code/context/reducers.js +328 -0
- package/src/code/context/stableJson.js +29 -0
- package/src/code/context/stateCommit.js +414 -0
- package/src/code/context/toolRuntime.js +172 -0
- package/src/code/context/transcript.js +182 -0
- package/src/code/context/transcriptSync.js +106 -0
- package/src/code/context/userInteraction.js +457 -0
- package/src/code/context/userNudge.js +116 -0
- package/src/code/context/workingSet.js +323 -0
- package/src/code/dispatch.js +20 -1
- package/src/code/index.js +8 -0
- package/src/code/modelCommand.js +87 -0
- package/src/code/nativeRunner.js +625 -34
- package/src/code/repl.js +196 -50
- package/src/code/runtime/agentWakeup.js +58 -0
- package/src/code/runtime/graphOwner.js +41 -0
- package/src/code/runtime/graphYieldRouter.js +42 -0
- package/src/code/runtime/index.js +15 -0
- package/src/code/runtime/loopMailbox.js +124 -0
- package/src/code/runtime/runtimeEvents.js +39 -0
- package/src/code/runtime/taskControl.js +565 -0
- package/src/code/runtime/taskFocus.js +165 -0
- package/src/code/runtime/taskLoop.js +383 -0
- package/src/code/runtime/taskRun.js +187 -0
- package/src/code/runtime/toolProvenance.js +70 -0
- package/src/code/runtime/workspaceLease.js +208 -0
- package/src/code/sessionStore.js +217 -15
- package/src/code/skills/index.js +10 -0
- package/src/code/skills/injection.js +66 -3
- package/src/code/skills/loader.js +21 -0
- package/src/code/skills/manifest.js +87 -0
- package/src/code/skills/render.js +15 -1
- package/src/code/taskDecomposer.js +56 -2
- package/src/code/tools/artifactRead.js +40 -0
- package/src/code/tools/askUser.js +11 -0
- package/src/code/tools/planGraph.js +29 -0
- package/src/code/tui.js +2 -0
- package/src/code/usageStore.js +15 -0
- package/src/ui/format/index.js +285 -45
- package/src/ui/format/markdownRenderer.js +436 -71
- package/src/ui/ink/ChatApp.js +39 -8
- package/src/ui/ink/UcodeApp.js +592 -43
- package/src/ui/ink/chatLogModel.js +102 -21
package/package.json
CHANGED
|
@@ -24,13 +24,12 @@ function getShellName() {
|
|
|
24
24
|
return shell || "unknown";
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
-
function
|
|
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
|
-
|
|
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
|
+
};
|