@adhdev/daemon-core 0.9.77-rc.60 → 0.9.77-rc.61
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.mjs
CHANGED
|
@@ -9786,7 +9786,7 @@ function classifyChatMessageVisibility(message) {
|
|
|
9786
9786
|
const transcriptVisibility = readTranscriptVisibilityField(message, meta);
|
|
9787
9787
|
const audience = readStringField(readRecordField(message, meta, "audience"));
|
|
9788
9788
|
const source = readStringField(readRecordField(message, meta, "source"));
|
|
9789
|
-
const explicitHidden = EXPLICIT_HIDDEN_VISIBILITIES.has(visibility) || EXPLICIT_HIDDEN_VISIBILITIES.has(transcriptVisibility) || HIDDEN_AUDIENCES.has(audience) || hasBooleanMarker(message, meta, ["internal", "isInternal", "debug", "statusOnly", "controlOnly"]);
|
|
9789
|
+
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"]);
|
|
9790
9790
|
const explicitUserFacing = EXPLICIT_VISIBLE_VISIBILITIES.has(visibility) || EXPLICIT_VISIBLE_VISIBILITIES.has(transcriptVisibility) || audience === "chat" || hasBooleanMarker(message, meta, ["userFacing"]);
|
|
9791
9791
|
if (explicitHidden) {
|
|
9792
9792
|
const activityLike = isActivityKind(kind) || ACTIVITY_SOURCE_SET.has(source);
|
|
@@ -25749,31 +25749,75 @@ ${block}`);
|
|
|
25749
25749
|
for (const node of mesh.nodes || []) {
|
|
25750
25750
|
const status = {
|
|
25751
25751
|
nodeId: node.id || node.nodeId,
|
|
25752
|
+
machineLabel: node.machineLabel || node.id || node.nodeId,
|
|
25752
25753
|
workspace: node.workspace,
|
|
25753
25754
|
repoRoot: node.repoRoot,
|
|
25754
25755
|
isLocalWorktree: node.isLocalWorktree,
|
|
25755
25756
|
worktreeBranch: node.worktreeBranch,
|
|
25756
25757
|
daemonId: node.daemonId,
|
|
25757
25758
|
machineId: node.machineId,
|
|
25758
|
-
health: "unknown"
|
|
25759
|
+
health: "unknown",
|
|
25760
|
+
providers: node.providers || [],
|
|
25761
|
+
activeSessions: []
|
|
25759
25762
|
};
|
|
25760
25763
|
if (node.workspace && typeof node.workspace === "string") {
|
|
25761
25764
|
try {
|
|
25762
25765
|
const { execFile: execFile3 } = await import("child_process");
|
|
25763
25766
|
const { promisify: promisify3 } = await import("util");
|
|
25764
25767
|
const execFileAsync3 = promisify3(execFile3);
|
|
25765
|
-
const
|
|
25766
|
-
|
|
25767
|
-
|
|
25768
|
-
|
|
25769
|
-
|
|
25770
|
-
|
|
25771
|
-
|
|
25772
|
-
|
|
25768
|
+
const runGit2 = async (args2) => {
|
|
25769
|
+
const result = await execFileAsync3("git", ["-C", node.workspace, ...args2], {
|
|
25770
|
+
encoding: "utf8",
|
|
25771
|
+
timeout: 1e4
|
|
25772
|
+
});
|
|
25773
|
+
return result.stdout.trim();
|
|
25774
|
+
};
|
|
25775
|
+
const branch = await runGit2(["branch", "--show-current"]).catch(() => "");
|
|
25776
|
+
const porc = await runGit2(["status", "--porcelain"]).catch(() => "");
|
|
25777
|
+
const headCommit = await runGit2(["rev-parse", "--short", "HEAD"]).catch(() => null);
|
|
25778
|
+
const headMessage = await runGit2(["log", "-1", "--format=%s"]).catch(() => null);
|
|
25779
|
+
const upstream = await runGit2(["rev-parse", "--abbrev-ref", "@{upstream}"]).catch(() => null);
|
|
25780
|
+
const aheadBehind = await runGit2(["rev-list", "--left-right", "--count", "@{upstream}...HEAD"]).catch(() => "");
|
|
25781
|
+
const stashCount = await runGit2(["stash", "list"]).catch(() => "");
|
|
25782
|
+
let ahead = 0, behind = 0;
|
|
25783
|
+
if (aheadBehind) {
|
|
25784
|
+
const parts = aheadBehind.split(/\s+/);
|
|
25785
|
+
if (parts.length >= 2) {
|
|
25786
|
+
behind = parseInt(parts[0], 10) || 0;
|
|
25787
|
+
ahead = parseInt(parts[1], 10) || 0;
|
|
25788
|
+
}
|
|
25789
|
+
}
|
|
25773
25790
|
const dirty = porc.length > 0;
|
|
25774
|
-
|
|
25775
|
-
|
|
25776
|
-
|
|
25791
|
+
const lines = porc ? porc.split("\n").filter(Boolean) : [];
|
|
25792
|
+
let staged = 0, modified = 0, untracked = 0, deleted = 0, renamed = 0;
|
|
25793
|
+
for (const line of lines) {
|
|
25794
|
+
const xy = line.slice(0, 2);
|
|
25795
|
+
if (xy[0] !== " " && xy[0] !== "?") staged++;
|
|
25796
|
+
if (xy[1] === "M") modified++;
|
|
25797
|
+
if (xy[1] === "D") deleted++;
|
|
25798
|
+
if (xy[0] === "R" || xy[1] === "R") renamed++;
|
|
25799
|
+
if (xy === "??") untracked++;
|
|
25800
|
+
}
|
|
25801
|
+
status.git = {
|
|
25802
|
+
workspace: node.workspace,
|
|
25803
|
+
repoRoot: node.workspace,
|
|
25804
|
+
isGitRepo: true,
|
|
25805
|
+
branch: branch || null,
|
|
25806
|
+
headCommit,
|
|
25807
|
+
headMessage,
|
|
25808
|
+
upstream,
|
|
25809
|
+
ahead,
|
|
25810
|
+
behind,
|
|
25811
|
+
staged,
|
|
25812
|
+
modified,
|
|
25813
|
+
untracked,
|
|
25814
|
+
deleted,
|
|
25815
|
+
renamed,
|
|
25816
|
+
hasConflicts: false,
|
|
25817
|
+
conflictFiles: [],
|
|
25818
|
+
stashCount: stashCount ? stashCount.split("\n").filter(Boolean).length : 0,
|
|
25819
|
+
lastCheckedAt: Date.now()
|
|
25820
|
+
};
|
|
25777
25821
|
status.health = branch ? dirty ? "dirty" : "online" : "degraded";
|
|
25778
25822
|
} catch {
|
|
25779
25823
|
status.health = "degraded";
|