@adhdev/daemon-core 0.9.77-rc.60 → 0.9.77-rc.62
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/index.d.ts +1 -0
- package/dist/index.js +57 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +57 -13
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/commands/router.ts +60 -11
- package/src/index.ts +1 -0
- package/src/providers/chat-message-normalization.ts +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export type RuntimeWriteOwner = _RuntimeWriteOwner;
|
|
|
16
16
|
export type RuntimeAttachedClient = _RuntimeAttachedClient;
|
|
17
17
|
export type RecentLaunchEntry = _RecentLaunchEntry;
|
|
18
18
|
export type TerminalBackendStatus = _TerminalBackendStatus;
|
|
19
|
+
export type { SessionHostEndpoint } from '@adhdev/session-host-core';
|
|
19
20
|
export type SessionStatus = 'idle' | 'generating' | 'waiting_approval' | 'error' | 'stopped' | 'starting' | 'panel_hidden' | 'not_monitored' | 'disconnected';
|
|
20
21
|
export type RecentSessionBucket = 'needs_attention' | 'working' | 'task_complete' | 'idle';
|
|
21
22
|
export type { IDaemonCore, DaemonCoreOptions } from './daemon-core.js';
|
package/dist/index.js
CHANGED
|
@@ -10023,7 +10023,7 @@ function classifyChatMessageVisibility(message) {
|
|
|
10023
10023
|
const transcriptVisibility = readTranscriptVisibilityField(message, meta);
|
|
10024
10024
|
const audience = readStringField(readRecordField(message, meta, "audience"));
|
|
10025
10025
|
const source = readStringField(readRecordField(message, meta, "source"));
|
|
10026
|
-
const explicitHidden = EXPLICIT_HIDDEN_VISIBILITIES.has(visibility) || EXPLICIT_HIDDEN_VISIBILITIES.has(transcriptVisibility) || HIDDEN_AUDIENCES.has(audience) || hasBooleanMarker(message, meta, ["internal", "isInternal", "debug", "statusOnly", "controlOnly"]);
|
|
10026
|
+
const explicitHidden = EXPLICIT_HIDDEN_VISIBILITIES.has(visibility) || EXPLICIT_HIDDEN_VISIBILITIES.has(transcriptVisibility) || HIDDEN_AUDIENCES.has(audience) || hasBooleanMarker(message, meta, ["hidden", "internal", "isInternal", "debug", "statusOnly", "controlOnly"]);
|
|
10027
10027
|
const explicitUserFacing = EXPLICIT_VISIBLE_VISIBILITIES.has(visibility) || EXPLICIT_VISIBLE_VISIBILITIES.has(transcriptVisibility) || audience === "chat" || hasBooleanMarker(message, meta, ["userFacing"]);
|
|
10028
10028
|
if (explicitHidden) {
|
|
10029
10029
|
const activityLike = isActivityKind(kind) || ACTIVITY_SOURCE_SET.has(source);
|
|
@@ -25981,31 +25981,75 @@ ${block}`);
|
|
|
25981
25981
|
for (const node of mesh.nodes || []) {
|
|
25982
25982
|
const status = {
|
|
25983
25983
|
nodeId: node.id || node.nodeId,
|
|
25984
|
+
machineLabel: node.machineLabel || node.id || node.nodeId,
|
|
25984
25985
|
workspace: node.workspace,
|
|
25985
25986
|
repoRoot: node.repoRoot,
|
|
25986
25987
|
isLocalWorktree: node.isLocalWorktree,
|
|
25987
25988
|
worktreeBranch: node.worktreeBranch,
|
|
25988
25989
|
daemonId: node.daemonId,
|
|
25989
25990
|
machineId: node.machineId,
|
|
25990
|
-
health: "unknown"
|
|
25991
|
+
health: "unknown",
|
|
25992
|
+
providers: node.providers || [],
|
|
25993
|
+
activeSessions: []
|
|
25991
25994
|
};
|
|
25992
25995
|
if (node.workspace && typeof node.workspace === "string") {
|
|
25993
25996
|
try {
|
|
25994
25997
|
const { execFile: execFile3 } = await import("child_process");
|
|
25995
25998
|
const { promisify: promisify3 } = await import("util");
|
|
25996
25999
|
const execFileAsync3 = promisify3(execFile3);
|
|
25997
|
-
const
|
|
25998
|
-
|
|
25999
|
-
|
|
26000
|
-
|
|
26001
|
-
|
|
26002
|
-
|
|
26003
|
-
|
|
26004
|
-
|
|
26000
|
+
const runGit2 = async (args2) => {
|
|
26001
|
+
const result = await execFileAsync3("git", ["-C", node.workspace, ...args2], {
|
|
26002
|
+
encoding: "utf8",
|
|
26003
|
+
timeout: 1e4
|
|
26004
|
+
});
|
|
26005
|
+
return result.stdout.trim();
|
|
26006
|
+
};
|
|
26007
|
+
const branch = await runGit2(["branch", "--show-current"]).catch(() => "");
|
|
26008
|
+
const porc = await runGit2(["status", "--porcelain"]).catch(() => "");
|
|
26009
|
+
const headCommit = await runGit2(["rev-parse", "--short", "HEAD"]).catch(() => null);
|
|
26010
|
+
const headMessage = await runGit2(["log", "-1", "--format=%s"]).catch(() => null);
|
|
26011
|
+
const upstream = await runGit2(["rev-parse", "--abbrev-ref", "@{upstream}"]).catch(() => null);
|
|
26012
|
+
const aheadBehind = await runGit2(["rev-list", "--left-right", "--count", "@{upstream}...HEAD"]).catch(() => "");
|
|
26013
|
+
const stashCount = await runGit2(["stash", "list"]).catch(() => "");
|
|
26014
|
+
let ahead = 0, behind = 0;
|
|
26015
|
+
if (aheadBehind) {
|
|
26016
|
+
const parts = aheadBehind.split(/\s+/);
|
|
26017
|
+
if (parts.length >= 2) {
|
|
26018
|
+
behind = parseInt(parts[0], 10) || 0;
|
|
26019
|
+
ahead = parseInt(parts[1], 10) || 0;
|
|
26020
|
+
}
|
|
26021
|
+
}
|
|
26005
26022
|
const dirty = porc.length > 0;
|
|
26006
|
-
|
|
26007
|
-
|
|
26008
|
-
|
|
26023
|
+
const lines = porc ? porc.split("\n").filter(Boolean) : [];
|
|
26024
|
+
let staged = 0, modified = 0, untracked = 0, deleted = 0, renamed = 0;
|
|
26025
|
+
for (const line of lines) {
|
|
26026
|
+
const xy = line.slice(0, 2);
|
|
26027
|
+
if (xy[0] !== " " && xy[0] !== "?") staged++;
|
|
26028
|
+
if (xy[1] === "M") modified++;
|
|
26029
|
+
if (xy[1] === "D") deleted++;
|
|
26030
|
+
if (xy[0] === "R" || xy[1] === "R") renamed++;
|
|
26031
|
+
if (xy === "??") untracked++;
|
|
26032
|
+
}
|
|
26033
|
+
status.git = {
|
|
26034
|
+
workspace: node.workspace,
|
|
26035
|
+
repoRoot: node.workspace,
|
|
26036
|
+
isGitRepo: true,
|
|
26037
|
+
branch: branch || null,
|
|
26038
|
+
headCommit,
|
|
26039
|
+
headMessage,
|
|
26040
|
+
upstream,
|
|
26041
|
+
ahead,
|
|
26042
|
+
behind,
|
|
26043
|
+
staged,
|
|
26044
|
+
modified,
|
|
26045
|
+
untracked,
|
|
26046
|
+
deleted,
|
|
26047
|
+
renamed,
|
|
26048
|
+
hasConflicts: false,
|
|
26049
|
+
conflictFiles: [],
|
|
26050
|
+
stashCount: stashCount ? stashCount.split("\n").filter(Boolean).length : 0,
|
|
26051
|
+
lastCheckedAt: Date.now()
|
|
26052
|
+
};
|
|
26009
26053
|
status.health = branch ? dirty ? "dirty" : "online" : "degraded";
|
|
26010
26054
|
} catch {
|
|
26011
26055
|
status.health = "degraded";
|