@n1creator/openacp-cli 2026.712.5 → 2026.712.7
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/dist/cli.js +36 -8
- package/dist/cli.js.map +1 -1
- package/dist/index.js +22 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -10266,15 +10266,23 @@ var init_agent_registry = __esm({
|
|
|
10266
10266
|
// src/plugins/api-server/routes/agents.ts
|
|
10267
10267
|
var agents_exports = {};
|
|
10268
10268
|
__export(agents_exports, {
|
|
10269
|
-
agentRoutes: () => agentRoutes
|
|
10269
|
+
agentRoutes: () => agentRoutes,
|
|
10270
|
+
redactAgentEnv: () => redactAgentEnv
|
|
10270
10271
|
});
|
|
10272
|
+
function redactAgentEnv(agent) {
|
|
10273
|
+
if (!agent.env) return agent;
|
|
10274
|
+
return {
|
|
10275
|
+
...agent,
|
|
10276
|
+
env: Object.fromEntries(Object.keys(agent.env).map((key) => [key, "***"]))
|
|
10277
|
+
};
|
|
10278
|
+
}
|
|
10271
10279
|
async function agentRoutes(app, deps) {
|
|
10272
10280
|
function loadAndListAgents() {
|
|
10273
10281
|
deps.core.agentCatalog.load();
|
|
10274
10282
|
const agents = deps.core.agentManager.getAvailableAgents();
|
|
10275
10283
|
const defaultAgent = deps.core.configManager.get().defaultAgent;
|
|
10276
10284
|
const agentsWithCaps = agents.map((a) => ({
|
|
10277
|
-
...a,
|
|
10285
|
+
...redactAgentEnv(a),
|
|
10278
10286
|
capabilities: getAgentCapabilities(a.name)
|
|
10279
10287
|
}));
|
|
10280
10288
|
return { agents: agentsWithCaps, default: defaultAgent };
|
|
@@ -10292,7 +10300,7 @@ async function agentRoutes(app, deps) {
|
|
|
10292
10300
|
throw new NotFoundError("AGENT_NOT_FOUND", `Agent "${name}" not found`);
|
|
10293
10301
|
}
|
|
10294
10302
|
return {
|
|
10295
|
-
...agent,
|
|
10303
|
+
...redactAgentEnv(agent),
|
|
10296
10304
|
key: name,
|
|
10297
10305
|
capabilities: getAgentCapabilities(name)
|
|
10298
10306
|
};
|
|
@@ -10829,8 +10837,7 @@ async function systemRoutes(app, deps) {
|
|
|
10829
10837
|
app.get("/health/details", {
|
|
10830
10838
|
preHandler: [...authPreHandler ? [authPreHandler] : [], requireScopes("system:health")]
|
|
10831
10839
|
}, async () => {
|
|
10832
|
-
const
|
|
10833
|
-
const allRecords = deps.core.sessionManager.listRecords();
|
|
10840
|
+
const sessions = deps.core.sessionManager.listAllSessions();
|
|
10834
10841
|
const mem = process.memoryUsage();
|
|
10835
10842
|
const tunnel = deps.core.tunnelService;
|
|
10836
10843
|
return {
|
|
@@ -10843,10 +10850,10 @@ async function systemRoutes(app, deps) {
|
|
|
10843
10850
|
heapTotal: mem.heapTotal
|
|
10844
10851
|
},
|
|
10845
10852
|
sessions: {
|
|
10846
|
-
active:
|
|
10853
|
+
active: sessions.filter(
|
|
10847
10854
|
(s) => s.status === "active" || s.status === "initializing"
|
|
10848
10855
|
).length,
|
|
10849
|
-
total:
|
|
10856
|
+
total: sessions.length
|
|
10850
10857
|
},
|
|
10851
10858
|
adapters: Array.from(deps.core.adapters.keys()),
|
|
10852
10859
|
tunnel: tunnel ? { enabled: true, url: tunnel.getPublicUrl() } : { enabled: false }
|
|
@@ -24238,7 +24245,7 @@ var init_session_manager = __esm({
|
|
|
24238
24245
|
if (this.store) {
|
|
24239
24246
|
let records = this.store.list().filter((r) => !r.isAssistant);
|
|
24240
24247
|
if (channelId) records = records.filter((r) => r.channelId === channelId);
|
|
24241
|
-
|
|
24248
|
+
const summaries = records.map((record) => {
|
|
24242
24249
|
const live2 = this.sessions.get(record.sessionId);
|
|
24243
24250
|
if (live2) {
|
|
24244
24251
|
return {
|
|
@@ -24275,6 +24282,27 @@ var init_session_manager = __esm({
|
|
|
24275
24282
|
isLive: false
|
|
24276
24283
|
};
|
|
24277
24284
|
});
|
|
24285
|
+
const storedIds = new Set(records.map((record) => record.sessionId));
|
|
24286
|
+
for (const live2 of this.listSessions(channelId)) {
|
|
24287
|
+
if (storedIds.has(live2.id)) continue;
|
|
24288
|
+
summaries.push({
|
|
24289
|
+
id: live2.id,
|
|
24290
|
+
agent: live2.agentName,
|
|
24291
|
+
status: live2.status,
|
|
24292
|
+
name: live2.name ?? null,
|
|
24293
|
+
workspace: live2.workingDirectory,
|
|
24294
|
+
channelId: live2.channelId,
|
|
24295
|
+
createdAt: live2.createdAt.toISOString(),
|
|
24296
|
+
lastActiveAt: null,
|
|
24297
|
+
dangerousMode: live2.clientOverrides.bypassPermissions ?? false,
|
|
24298
|
+
queueDepth: live2.queueDepth,
|
|
24299
|
+
promptRunning: live2.promptRunning,
|
|
24300
|
+
configOptions: live2.configOptions?.length ? live2.configOptions : void 0,
|
|
24301
|
+
capabilities: live2.agentCapabilities ?? null,
|
|
24302
|
+
isLive: true
|
|
24303
|
+
});
|
|
24304
|
+
}
|
|
24305
|
+
return summaries;
|
|
24278
24306
|
}
|
|
24279
24307
|
let live = Array.from(this.sessions.values()).filter((s) => !s.isAssistant);
|
|
24280
24308
|
if (channelId) live = live.filter((s) => s.channelId === channelId);
|