u-foo 4.0.0 → 4.0.2
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/OBSERVABILITY.md +65 -0
- package/README.md +90 -30
- package/README.zh-CN.md +76 -26
- package/SKILLS/ufoo/SKILL.md +25 -1
- package/SKILLS/ufoo-bus/SKILL.md +25 -2
- package/bin/ucode.js +4 -0
- package/bin/ufoo.js +3 -3
- package/dist/tui/darwin-arm64/ufoo-tui +0 -0
- package/dist/tui/darwin-x64/ufoo-tui +0 -0
- package/dist/tui/linux-arm64/ufoo-tui +0 -0
- package/dist/tui/linux-x64/ufoo-tui +0 -0
- package/package.json +6 -6
- package/src/agents/activity/activityDetector.js +1 -1
- package/src/agents/capabilities/agentManagement/service.js +40 -13
- package/src/agents/capabilities/coordination/index.js +1 -1
- package/src/agents/capabilities/taskReports/index.js +1 -1
- package/src/agents/controller/controllerToolExecutor.js +36 -20
- package/src/agents/controller/index.js +1 -6
- package/src/agents/internal/internalRunner.js +90 -56
- package/src/agents/launch/index.js +0 -1
- package/src/agents/launch/launcher.js +38 -29
- package/src/agents/launch/launcherReadiness.js +35 -0
- package/src/agents/launch/notifier.js +2 -2
- package/src/agents/launch/ptyWrapper.js +5 -2
- package/src/agents/launch/readyDetector.js +2 -2
- package/src/agents/profiles/main.js +1 -1
- package/src/agents/prompts/cooperation.js +14 -0
- package/src/agents/prompts/defaultBootstrap.js +1 -1
- package/src/agents/prompts/groupBootstrap.js +23 -7
- package/src/agents/prompts/mainAgent.js +11 -2
- package/src/agents/prompts/native/system.js +4 -1
- package/src/agents/prompts/native/ufoo.js +11 -3
- package/src/agents/prompts/promptProfiles.js +2 -0
- package/src/agents/prompts/reporting.js +16 -0
- package/src/agents/providers/claudeEventTranslator.js +3 -0
- package/src/agents/providers/claudeThreadProvider.js +3 -2
- package/src/agents/providers/clientIdentity.js +75 -0
- package/src/agents/providers/codexEventTranslator.js +23 -2
- package/src/agents/providers/codexThreadProvider.js +15 -6
- package/src/agents/providers/credentials/index.js +2 -0
- package/src/agents/providers/directAuthStatus.js +1 -1
- package/src/agents/providers/index.js +1 -1
- package/src/agents/providers/modelSettings.js +34 -0
- package/src/agents/providers/modelsCatalog.js +379 -0
- package/src/agents/providers/nativeTransport.js +58 -40
- package/src/agents/providers/runtimeConfig.js +10 -8
- package/src/agents/providers/thinkingLevels.js +10 -36
- package/src/agents/providers/transports/responsesProtocol.js +11 -6
- package/src/agents/providers/upstreamRuntime.js +135 -0
- package/src/agents/runtime/context/checkpointStore.js +38 -0
- package/src/agents/runtime/context/compaction.js +151 -0
- package/src/agents/runtime/context/contextBudget.js +93 -0
- package/src/agents/runtime/context/replayHistory.js +28 -0
- package/src/agents/runtime/context/runtimeStore.js +2 -1
- package/src/agents/runtime/core/agentLoop.js +99 -18
- package/src/agents/runtime/core/executionBudget.js +36 -0
- package/src/agents/runtime/createAgentRuntime.js +16 -4
- package/src/agents/runtime/prompts/responseLanguage.js +12 -0
- package/src/agents/runtime/protocol/runObservation.js +24 -0
- package/src/agents/runtime/protocol/traceContext.js +9 -0
- package/src/app/chat/ChatController.js +26 -53
- package/src/app/chat/agentDirectory.js +1 -16
- package/src/app/chat/bootstrap.js +1 -2
- package/src/app/chat/commandExecutor.js +93 -285
- package/src/app/chat/commands.js +32 -45
- package/src/app/chat/daemonMessageRouter.js +0 -45
- package/src/app/chat/historyStore.js +12 -48
- package/src/app/chat/inputSubmitHandler.js +7 -33
- package/src/app/chat/internalAgentLogHistory.js +19 -60
- package/src/app/chat/multiWindow/paneManager.js +10 -3
- package/src/app/chat/streamState.js +0 -4
- package/src/app/cli/features/init.js +5 -5
- package/src/app/cli/metricsCommands.js +68 -0
- package/src/app/cli/run.js +42 -3
- package/src/app/cli/traceCommands.js +36 -0
- package/src/code/agent.js +18 -13
- package/src/code/busConsumer.js +1 -3
- package/src/code/commands.js +1 -1
- package/src/code/context/assembler.js +7 -8
- package/src/code/context/stateCommit.js +2 -1
- package/src/code/internalThread.js +10 -3
- package/src/code/launcher/ucode.js +1 -1
- package/src/code/launcher/ucodeBootstrap.js +1 -1
- package/src/code/modelCommand.js +11 -35
- package/src/code/nativeRunner.js +55 -17
- package/src/code/providers/modelsCatalog.js +1 -317
- package/src/code/repl.js +4 -11
- package/src/code/sessionStore.js +3 -3
- package/src/code/taskDecomposer.js +18 -0
- package/src/code/toolBudget.js +1 -17
- package/src/config.js +22 -72
- package/src/coordination/bus/index.js +12 -3
- package/src/coordination/bus/inject.js +2 -2
- package/src/coordination/bus/message.js +15 -1
- package/src/coordination/bus/nickname.js +1 -1
- package/src/coordination/bus/subscriber.js +3 -2
- package/src/coordination/bus/utils.js +1 -1
- package/src/coordination/history/agentPerformance.js +279 -0
- package/src/coordination/history/agentTrace.js +249 -0
- package/src/coordination/state/workspaceAccess.js +1 -1
- package/src/orchestration/controller/index.js +1 -8
- package/src/orchestration/controller/launchRouting.js +1 -1
- package/src/orchestration/solo/commands.js +3 -1
- package/src/runtime/contracts/agentMode.js +11 -2
- package/src/runtime/contracts/uiProtocol.js +18 -19
- package/src/runtime/daemon/agentHost.js +57 -25
- package/src/runtime/daemon/agentRecoveryGroups.js +70 -0
- package/src/runtime/daemon/busBridge.js +1 -1
- package/src/runtime/daemon/controlPlaneService.js +1 -1
- package/src/runtime/daemon/groupOrchestrator.js +20 -5
- package/src/runtime/daemon/groupStatus.js +20 -0
- package/src/runtime/daemon/index.js +19 -44
- package/src/runtime/daemon/mcpHttpServer.js +39 -10
- package/src/runtime/daemon/mcpServer.js +1 -1
- package/src/runtime/daemon/nicknameScope.js +1 -1
- package/src/runtime/daemon/ops.js +46 -23
- package/src/runtime/daemon/projectRuntimeGateway.js +2 -0
- package/src/runtime/daemon/promptRequest.js +92 -589
- package/src/runtime/daemon/status.js +5 -6
- package/src/tools/controllerSchemas.js +6 -2
- package/src/tools/handlers/tier2.js +4 -2
- package/src/tools/registry.js +4 -0
- package/src/tools/schemaFixtures.js +26 -2
- package/src/tools/tier0/readAgentMetrics.js +14 -0
- package/src/tools/tier0/readAgentTrace.js +12 -0
- package/src/ui/agentSettingsController.js +107 -0
- package/src/ui/agentSurface.js +1 -1
- package/src/ui/dashboardBridge.js +1 -1
- package/src/ui/format/banner.js +1 -4
- package/src/ui/format/index.js +14 -10
- package/src/ui/format/loopSummary.js +50 -0
- package/src/ui/format/markdownRenderer.js +3 -4
- package/src/ui/rustChatHost.js +191 -206
- package/src/ui/rustMultiSession.js +77 -36
- package/src/ui/rustUcodeHost.js +6 -1
- package/src/ui/settingsBridge.js +33 -16
- package/src/ui/toolMergeBridge.js +0 -4
- package/src/ui/uiHostServer.js +5 -8
- package/src/agents/controller/loopObservability.js +0 -200
- package/src/agents/controller/loopRuntime.js +0 -336
- package/src/agents/controller/ufooAgent.js +0 -830
- package/src/agents/launch/ptyRunner.js +0 -1135
- package/src/agents/providers/controllerJsonTransport.js +0 -28
- package/src/agents/providers/upstreamTransport.js +0 -698
- package/src/app/chat/agentBar.js +0 -135
- package/src/app/chat/agentSockets.js +0 -225
- package/src/app/chat/dashboardView.js +0 -405
- package/src/app/chat/rawKeyMap.js +0 -42
- package/src/app/chat/settingsController.js +0 -111
- package/src/coordination/history/controllerSummary.js +0 -23
- package/src/orchestration/controller/flags.js +0 -167
- package/src/orchestration/controller/gateRouter.js +0 -211
- package/src/orchestration/controller/routerFastPath.js +0 -22
- package/src/orchestration/controller/routerFinalize.js +0 -222
- package/src/orchestration/controller/shadowGuard.js +0 -280
- package/src/runtime/daemon/executionPaths.js +0 -30
- package/src/runtime/daemon/promptLoop.js +0 -136
- package/src/runtime/privacy/shadowDiff.js +0 -174
|
@@ -16,6 +16,8 @@ const {
|
|
|
16
16
|
} = require("../terminal/adapters/hostAdapter");
|
|
17
17
|
const { resolveDefaultManualBootstrap } = require("../../agents/prompts/defaultBootstrap");
|
|
18
18
|
const { detectLaunchEnvironment } = require("../../agents/launch/launchEnvironment");
|
|
19
|
+
const { isInternalAgentMeta, normalizeInternalAgentType } = require("../contracts/agentMode");
|
|
20
|
+
const { loadRecoveryGroups, resolveRecoveryGroup, associateAgentWithGroup, recordGroupMemberResume } = require("./agentRecoveryGroups");
|
|
19
21
|
|
|
20
22
|
function normalizeLaunchAgent(agent = "") {
|
|
21
23
|
const value = String(agent || "").trim().toLowerCase();
|
|
@@ -24,7 +26,7 @@ function normalizeLaunchAgent(agent = "") {
|
|
|
24
26
|
if (value === "agy" || value === "antigravity") return "agy";
|
|
25
27
|
if (value === "grok" || value === "ugrok" || value === "grok-build" || value === "xai") return "grok";
|
|
26
28
|
if (value === "kimi" || value === "kimi-cli" || value === "kimi-code") return "kimi";
|
|
27
|
-
if (value === "
|
|
29
|
+
if (value === "ucode") return "ucode";
|
|
28
30
|
return "";
|
|
29
31
|
}
|
|
30
32
|
|
|
@@ -34,7 +36,7 @@ function toBusAgentType(agent = "") {
|
|
|
34
36
|
if (agent === "agy") return "agy";
|
|
35
37
|
if (agent === "grok") return "grok";
|
|
36
38
|
if (agent === "kimi") return "kimi";
|
|
37
|
-
if (agent === "
|
|
39
|
+
if (agent === "ucode") return "ucode";
|
|
38
40
|
return "";
|
|
39
41
|
}
|
|
40
42
|
|
|
@@ -44,7 +46,7 @@ function toTerminalBinary(agent = "") {
|
|
|
44
46
|
if (agent === "agy") return "uagy";
|
|
45
47
|
if (agent === "grok") return "ugrok";
|
|
46
48
|
if (agent === "kimi") return "ukimi";
|
|
47
|
-
if (agent === "
|
|
49
|
+
if (agent === "ucode") return "ucode";
|
|
48
50
|
return "";
|
|
49
51
|
}
|
|
50
52
|
|
|
@@ -54,13 +56,13 @@ function toTmuxBinary(agent = "") {
|
|
|
54
56
|
if (agent === "agy") return "uagy";
|
|
55
57
|
if (agent === "grok") return "ugrok";
|
|
56
58
|
if (agent === "kimi") return "ukimi";
|
|
57
|
-
if (agent === "
|
|
59
|
+
if (agent === "ucode") return "ucode";
|
|
58
60
|
return "";
|
|
59
61
|
}
|
|
60
62
|
|
|
61
63
|
function applyDefaultManagedBootstrap(projectRoot, normalizedAgent, args = [], extraEnv = {}) {
|
|
62
64
|
const agentType = toBusAgentType(normalizedAgent);
|
|
63
|
-
if (!agentType || agentType === "
|
|
65
|
+
if (!agentType || agentType === "ucode") {
|
|
64
66
|
return {
|
|
65
67
|
args: Array.isArray(args) ? args.slice() : [],
|
|
66
68
|
extraEnv: extraEnv && typeof extraEnv === "object" ? { ...extraEnv } : {},
|
|
@@ -606,7 +608,7 @@ async function spawnManagedHostAgent(
|
|
|
606
608
|
if (bus.subscriberManager) {
|
|
607
609
|
const sessionToken = crypto.randomBytes(4).toString("hex");
|
|
608
610
|
subscriberId = `${agentType}:${sessionToken}`;
|
|
609
|
-
const defaultNickname =
|
|
611
|
+
const defaultNickname = normalizedAgent;
|
|
610
612
|
const finalNickname = nickname || defaultNickname;
|
|
611
613
|
const registration = await require("./controlPlaneService").registerAgentFull(projectRoot, {
|
|
612
614
|
sessionId: sessionToken, agentType, nickname: finalNickname, launchMode: "host",
|
|
@@ -686,6 +688,7 @@ async function spawnInternalAgent(
|
|
|
686
688
|
extraArgs = [],
|
|
687
689
|
options = {}
|
|
688
690
|
) {
|
|
691
|
+
if (!normalizeInternalAgentType(agent)) throw new Error(`unsupported internal agent type: ${agent}; use codex, claude or ucode`);
|
|
689
692
|
const runner = resolveUfooRunnerPath();
|
|
690
693
|
const logDir = getUfooPaths(projectRoot).runDir;
|
|
691
694
|
fs.mkdirSync(logDir, { recursive: true });
|
|
@@ -989,6 +992,7 @@ async function launchAgent(projectRoot, agent, count = 1, nickname = "", process
|
|
|
989
992
|
}
|
|
990
993
|
|
|
991
994
|
if (mode === "internal") {
|
|
995
|
+
if (!normalizeInternalAgentType(normalizedAgent)) throw new Error(`unsupported internal agent type: ${agent}; use codex, claude or ucode`);
|
|
992
996
|
const result = await spawnInternalAgent(
|
|
993
997
|
projectRoot,
|
|
994
998
|
normalizedAgent,
|
|
@@ -1038,8 +1042,7 @@ async function launchAgent(projectRoot, agent, count = 1, nickname = "", process
|
|
|
1038
1042
|
&& tmuxLayoutContext
|
|
1039
1043
|
&& tmuxLayoutContext.mode === "group-right-column";
|
|
1040
1044
|
for (let i = 0; i < count; i += 1) {
|
|
1041
|
-
|
|
1042
|
-
const defaultNick = normalizedAgent === "ufoo" ? "ucode" : normalizedAgent;
|
|
1045
|
+
const defaultNick = normalizedAgent;
|
|
1043
1046
|
const nick = count > 1 ? `${nickname || defaultNick}-${i + 1}` : (nickname || "");
|
|
1044
1047
|
if (useSeparateWindow) {
|
|
1045
1048
|
// eslint-disable-next-line no-await-in-loop
|
|
@@ -1086,7 +1089,7 @@ async function launchAgent(projectRoot, agent, count = 1, nickname = "", process
|
|
|
1086
1089
|
const subscriberIds = [];
|
|
1087
1090
|
const hostContext = resolveHostLaunchContext(options);
|
|
1088
1091
|
for (let i = 0; i < count; i += 1) {
|
|
1089
|
-
const defaultNick = normalizedAgent
|
|
1092
|
+
const defaultNick = normalizedAgent;
|
|
1090
1093
|
const nick = count > 1 ? `${nickname || defaultNick}-${i + 1}` : (nickname || "");
|
|
1091
1094
|
// eslint-disable-next-line no-await-in-loop
|
|
1092
1095
|
const result = await spawnManagedHostAgent(
|
|
@@ -1109,8 +1112,7 @@ async function launchAgent(projectRoot, agent, count = 1, nickname = "", process
|
|
|
1109
1112
|
|
|
1110
1113
|
const subscriberIds = [];
|
|
1111
1114
|
for (let i = 0; i < count; i += 1) {
|
|
1112
|
-
|
|
1113
|
-
const defaultNick = normalizedAgent === "ufoo" ? "ucode" : normalizedAgent;
|
|
1115
|
+
const defaultNick = normalizedAgent;
|
|
1114
1116
|
const nick = count > 1 ? `${nickname || defaultNick}-${i + 1}` : (nickname || "");
|
|
1115
1117
|
// eslint-disable-next-line no-await-in-loop
|
|
1116
1118
|
const result = await spawnManagedTerminalAgent(
|
|
@@ -1133,7 +1135,7 @@ function normalizeAgentType(agentType) {
|
|
|
1133
1135
|
if (agentType === "claude-code") return "claude";
|
|
1134
1136
|
if (agentType === "codex") return "codex";
|
|
1135
1137
|
if (agentType === "grok") return "grok";
|
|
1136
|
-
if (agentType === "
|
|
1138
|
+
if (agentType === "ucode") return "ucode";
|
|
1137
1139
|
return agentType;
|
|
1138
1140
|
}
|
|
1139
1141
|
|
|
@@ -1147,6 +1149,7 @@ function buildResumeArgs(agent, sessionId) {
|
|
|
1147
1149
|
if (agent === "grok") return ["--resume", sessionId];
|
|
1148
1150
|
// kimi resumes a session by id via `-S, --session <id>`.
|
|
1149
1151
|
if (agent === "kimi") return ["--session", sessionId];
|
|
1152
|
+
if (agent === "ucode") return ["--session-id", sessionId];
|
|
1150
1153
|
return [];
|
|
1151
1154
|
}
|
|
1152
1155
|
|
|
@@ -1156,17 +1159,23 @@ function isActiveAgent(meta) {
|
|
|
1156
1159
|
return true;
|
|
1157
1160
|
}
|
|
1158
1161
|
|
|
1159
|
-
function collectRecoverableAgents(projectRoot, target = "") {
|
|
1162
|
+
function collectRecoverableAgents(projectRoot, target = "", options = {}) {
|
|
1160
1163
|
const config = loadConfig(projectRoot);
|
|
1161
1164
|
const mode = config.launchMode || "terminal";
|
|
1162
1165
|
const filePath = getUfooPaths(projectRoot).agentsFile;
|
|
1163
1166
|
const data = loadAgentsData(filePath);
|
|
1164
1167
|
const entries = Object.entries(data.agents || {});
|
|
1168
|
+
const groups = loadRecoveryGroups(projectRoot);
|
|
1169
|
+
const associations = new Map(entries.map(([id, meta]) => [id, resolveRecoveryGroup(groups, id, meta)]));
|
|
1165
1170
|
|
|
1166
1171
|
let targets = entries;
|
|
1167
1172
|
if (target) {
|
|
1168
1173
|
const scopedTarget = applyProjectNicknamePrefix(projectRoot, target);
|
|
1169
|
-
if (target.
|
|
1174
|
+
if (target.startsWith("group:")) {
|
|
1175
|
+
targets = entries.filter(([id]) => associations.get(id).group_id === target.slice(6));
|
|
1176
|
+
const group = groups.find((item) => item.group_id === target.slice(6));
|
|
1177
|
+
if (group) targets.sort(([a], [b]) => group.members.findIndex((item) => item?.subscriber_id === a) - group.members.findIndex((item) => item?.subscriber_id === b));
|
|
1178
|
+
} else if (target.includes(":")) {
|
|
1170
1179
|
targets = entries.filter(([id]) => id === target);
|
|
1171
1180
|
} else {
|
|
1172
1181
|
targets = entries.filter(([id, meta]) =>
|
|
@@ -1190,6 +1199,10 @@ function collectRecoverableAgents(projectRoot, target = "") {
|
|
|
1190
1199
|
}
|
|
1191
1200
|
|
|
1192
1201
|
for (const [id, meta] of targets) {
|
|
1202
|
+
if (options.internalOnly && !isInternalAgentMeta(meta)) {
|
|
1203
|
+
if (target) skipped.push({ id, reason: "non-internal agent" });
|
|
1204
|
+
continue;
|
|
1205
|
+
}
|
|
1193
1206
|
if (!meta || !meta.provider_session_id) {
|
|
1194
1207
|
skipped.push({ id, reason: "no provider session" });
|
|
1195
1208
|
continue;
|
|
@@ -1199,12 +1212,12 @@ function collectRecoverableAgents(projectRoot, target = "") {
|
|
|
1199
1212
|
continue;
|
|
1200
1213
|
}
|
|
1201
1214
|
const agent = normalizeAgentType(meta.agent_type);
|
|
1202
|
-
if (agent !== "codex" && agent !== "claude" && agent !== "agy" && agent !== "grok" && agent !== "kimi") {
|
|
1215
|
+
if (agent !== "codex" && agent !== "claude" && agent !== "agy" && agent !== "grok" && agent !== "kimi" && agent !== "ucode") {
|
|
1203
1216
|
skipped.push({ id, reason: "unsupported agent type" });
|
|
1204
1217
|
continue;
|
|
1205
1218
|
}
|
|
1206
1219
|
|
|
1207
|
-
recoverableEntries.push({ id, meta, agent });
|
|
1220
|
+
recoverableEntries.push({ id, meta, agent, association: associations.get(id) });
|
|
1208
1221
|
}
|
|
1209
1222
|
|
|
1210
1223
|
return {
|
|
@@ -1215,8 +1228,8 @@ function collectRecoverableAgents(projectRoot, target = "") {
|
|
|
1215
1228
|
};
|
|
1216
1229
|
}
|
|
1217
1230
|
|
|
1218
|
-
function getRecoverableAgents(projectRoot, target = "") {
|
|
1219
|
-
const { mode, recoverableEntries, skipped } = collectRecoverableAgents(projectRoot, target);
|
|
1231
|
+
function getRecoverableAgents(projectRoot, target = "", options = {}) {
|
|
1232
|
+
const { mode, recoverableEntries, skipped } = collectRecoverableAgents(projectRoot, target, options);
|
|
1220
1233
|
const recoverable = recoverableEntries.map((item) => ({
|
|
1221
1234
|
id: item.id,
|
|
1222
1235
|
nickname: resolveDisplayNickname(projectRoot, item.meta),
|
|
@@ -1225,12 +1238,19 @@ function getRecoverableAgents(projectRoot, target = "") {
|
|
|
1225
1238
|
sessionId: item.meta.provider_session_id || "",
|
|
1226
1239
|
launchMode: item.meta.launch_mode || "",
|
|
1227
1240
|
lastSeen: item.meta.last_seen || "",
|
|
1241
|
+
...item.association,
|
|
1228
1242
|
}));
|
|
1229
|
-
|
|
1243
|
+
const groups = new Map();
|
|
1244
|
+
for (const item of recoverable) {
|
|
1245
|
+
if (!item.group_id) continue;
|
|
1246
|
+
if (!groups.has(item.group_id)) groups.set(item.group_id, { group_id: item.group_id, template_alias: item.group_template_alias, members: [] });
|
|
1247
|
+
groups.get(item.group_id).members.push(item);
|
|
1248
|
+
}
|
|
1249
|
+
return { ok: true, mode, recoverable, groups: [...groups.values()], skipped };
|
|
1230
1250
|
}
|
|
1231
1251
|
|
|
1232
|
-
async function resumeAgents(projectRoot, target = "", processManager = null) {
|
|
1233
|
-
const { mode,
|
|
1252
|
+
async function resumeAgents(projectRoot, target = "", processManager = null, options = {}) {
|
|
1253
|
+
const { mode, recoverableEntries, skipped } = collectRecoverableAgents(projectRoot, target, options);
|
|
1234
1254
|
|
|
1235
1255
|
if (recoverableEntries.length === 0) {
|
|
1236
1256
|
return { ok: true, resumed: [], skipped };
|
|
@@ -1243,7 +1263,7 @@ async function resumeAgents(projectRoot, target = "", processManager = null) {
|
|
|
1243
1263
|
const args = buildResumeArgs(item.agent, sessionId);
|
|
1244
1264
|
let reused = false;
|
|
1245
1265
|
let resumedId = item.id;
|
|
1246
|
-
if (mode === "internal") {
|
|
1266
|
+
if (options.internalOnly || isInternalAgentMeta(item.meta) || mode === "internal") {
|
|
1247
1267
|
// Internal agents have no terminal/pane to reattach. Start a fresh
|
|
1248
1268
|
// daemon-managed runner and replace the old recoverable registration.
|
|
1249
1269
|
// The provider session is still reused via the normal provider args.
|
|
@@ -1254,13 +1274,15 @@ async function resumeAgents(projectRoot, target = "", processManager = null) {
|
|
|
1254
1274
|
1,
|
|
1255
1275
|
nickname,
|
|
1256
1276
|
processManager,
|
|
1257
|
-
{ UFOO_SKIP_SESSION_RESOLVE: "1" },
|
|
1277
|
+
{ UFOO_SKIP_SESSION_RESOLVE: "1", UFOO_SCOPED_NICKNAME: item.meta.scoped_nickname || "" },
|
|
1258
1278
|
args,
|
|
1259
1279
|
{ replaceAgentId: item.id, providerSessionId: sessionId }
|
|
1260
1280
|
);
|
|
1261
1281
|
resumedId = launchResult.subscriberIds && launchResult.subscriberIds[0]
|
|
1262
1282
|
? launchResult.subscriberIds[0]
|
|
1263
1283
|
: item.id;
|
|
1284
|
+
associateAgentWithGroup(projectRoot, resumedId, item.association);
|
|
1285
|
+
recordGroupMemberResume(projectRoot, item.association, item.id, resumedId);
|
|
1264
1286
|
} else {
|
|
1265
1287
|
reused = await tryReuseTerminal(projectRoot, item.id, item.meta, item.agent, sessionId);
|
|
1266
1288
|
if (!reused) {
|
|
@@ -1281,6 +1303,7 @@ async function resumeAgents(projectRoot, target = "", processManager = null) {
|
|
|
1281
1303
|
agent: item.agent,
|
|
1282
1304
|
sessionId,
|
|
1283
1305
|
reused,
|
|
1306
|
+
...item.association,
|
|
1284
1307
|
});
|
|
1285
1308
|
}
|
|
1286
1309
|
|
|
@@ -17,6 +17,8 @@ const { CALLER_TIERS } = require("../../tools/types");
|
|
|
17
17
|
const { ProjectRuntimeManager } = require("./projectRuntimeManager");
|
|
18
18
|
|
|
19
19
|
const MCP_EXPOSED_SHARED_TOOLS = Object.freeze([
|
|
20
|
+
"read_agent_metrics",
|
|
21
|
+
"read_agent_trace",
|
|
20
22
|
"read_project_registry",
|
|
21
23
|
"read_bus_summary",
|
|
22
24
|
"read_prompt_history",
|