ai-whisper 0.3.0 → 0.4.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/dist/bin/broker-daemon.js +5 -2
- package/dist/bin/companion-agent.js +5 -2
- package/dist/bin/relay-monitor.js +13 -5
- package/dist/bin/whisper.js +7595 -6547
- package/package.json +3 -3
|
@@ -1814,7 +1814,8 @@ function cleanupOrchestrationOnShutdownTxn(db, input) {
|
|
|
1814
1814
|
import { basename } from "node:path";
|
|
1815
1815
|
function listActiveCollabSummaries(db, input) {
|
|
1816
1816
|
const nowMs = Date.parse(input.now ?? (/* @__PURE__ */ new Date()).toISOString());
|
|
1817
|
-
const
|
|
1817
|
+
const base = Number.isFinite(nowMs) ? nowMs : Date.now();
|
|
1818
|
+
const cutoff = new Date(Math.max(0, base - input.sinceMs)).toISOString();
|
|
1818
1819
|
const eligible = db.prepare(`SELECT c.collab_id AS collabId,
|
|
1819
1820
|
COALESCE(MAX(h.last_activity_at), '') AS lastAct
|
|
1820
1821
|
FROM collab c
|
|
@@ -1853,7 +1854,8 @@ function buildCollabSummary(db, collabId2) {
|
|
|
1853
1854
|
const collab2 = db.prepare(`SELECT display_name AS displayName, workspace_root AS workspaceRoot
|
|
1854
1855
|
FROM collab WHERE collab_id = ?`).get(e.collabId);
|
|
1855
1856
|
const wf = db.prepare(`SELECT workflow_id AS workflowId, workflow_type AS workflowType,
|
|
1856
|
-
name, status, current_phase_index AS currentPhaseIndex
|
|
1857
|
+
name, status, current_phase_index AS currentPhaseIndex,
|
|
1858
|
+
created_at AS createdAt
|
|
1857
1859
|
FROM workflows WHERE collab_id = ?
|
|
1858
1860
|
ORDER BY (status = 'running') DESC, created_at DESC
|
|
1859
1861
|
LIMIT 1`).get(e.collabId);
|
|
@@ -1921,6 +1923,7 @@ function buildCollabSummary(db, collabId2) {
|
|
|
1921
1923
|
handoffState: turn?.handoffState ?? "idle"
|
|
1922
1924
|
},
|
|
1923
1925
|
sessions,
|
|
1926
|
+
workflowCreatedAt: wf?.createdAt ?? null,
|
|
1924
1927
|
lastActivityAt: runLastAct
|
|
1925
1928
|
};
|
|
1926
1929
|
}
|
|
@@ -1847,7 +1847,8 @@ function cleanupOrchestrationOnShutdownTxn(db, input) {
|
|
|
1847
1847
|
import { basename } from "node:path";
|
|
1848
1848
|
function listActiveCollabSummaries(db, input) {
|
|
1849
1849
|
const nowMs = Date.parse(input.now ?? (/* @__PURE__ */ new Date()).toISOString());
|
|
1850
|
-
const
|
|
1850
|
+
const base = Number.isFinite(nowMs) ? nowMs : Date.now();
|
|
1851
|
+
const cutoff = new Date(Math.max(0, base - input.sinceMs)).toISOString();
|
|
1851
1852
|
const eligible = db.prepare(`SELECT c.collab_id AS collabId,
|
|
1852
1853
|
COALESCE(MAX(h.last_activity_at), '') AS lastAct
|
|
1853
1854
|
FROM collab c
|
|
@@ -1886,7 +1887,8 @@ function buildCollabSummary(db, collabId) {
|
|
|
1886
1887
|
const collab = db.prepare(`SELECT display_name AS displayName, workspace_root AS workspaceRoot
|
|
1887
1888
|
FROM collab WHERE collab_id = ?`).get(e.collabId);
|
|
1888
1889
|
const wf = db.prepare(`SELECT workflow_id AS workflowId, workflow_type AS workflowType,
|
|
1889
|
-
name, status, current_phase_index AS currentPhaseIndex
|
|
1890
|
+
name, status, current_phase_index AS currentPhaseIndex,
|
|
1891
|
+
created_at AS createdAt
|
|
1890
1892
|
FROM workflows WHERE collab_id = ?
|
|
1891
1893
|
ORDER BY (status = 'running') DESC, created_at DESC
|
|
1892
1894
|
LIMIT 1`).get(e.collabId);
|
|
@@ -1954,6 +1956,7 @@ function buildCollabSummary(db, collabId) {
|
|
|
1954
1956
|
handoffState: turn?.handoffState ?? "idle"
|
|
1955
1957
|
},
|
|
1956
1958
|
sessions,
|
|
1959
|
+
workflowCreatedAt: wf?.createdAt ?? null,
|
|
1957
1960
|
lastActivityAt: runLastAct
|
|
1958
1961
|
};
|
|
1959
1962
|
}
|
|
@@ -1817,7 +1817,8 @@ function cleanupOrchestrationOnShutdownTxn(db, input) {
|
|
|
1817
1817
|
import { basename } from "node:path";
|
|
1818
1818
|
function listActiveCollabSummaries(db, input) {
|
|
1819
1819
|
const nowMs = Date.parse(input.now ?? (/* @__PURE__ */ new Date()).toISOString());
|
|
1820
|
-
const
|
|
1820
|
+
const base = Number.isFinite(nowMs) ? nowMs : Date.now();
|
|
1821
|
+
const cutoff = new Date(Math.max(0, base - input.sinceMs)).toISOString();
|
|
1821
1822
|
const eligible = db.prepare(`SELECT c.collab_id AS collabId,
|
|
1822
1823
|
COALESCE(MAX(h.last_activity_at), '') AS lastAct
|
|
1823
1824
|
FROM collab c
|
|
@@ -1856,7 +1857,8 @@ function buildCollabSummary(db, collabId2) {
|
|
|
1856
1857
|
const collab = db.prepare(`SELECT display_name AS displayName, workspace_root AS workspaceRoot
|
|
1857
1858
|
FROM collab WHERE collab_id = ?`).get(e.collabId);
|
|
1858
1859
|
const wf = db.prepare(`SELECT workflow_id AS workflowId, workflow_type AS workflowType,
|
|
1859
|
-
name, status, current_phase_index AS currentPhaseIndex
|
|
1860
|
+
name, status, current_phase_index AS currentPhaseIndex,
|
|
1861
|
+
created_at AS createdAt
|
|
1860
1862
|
FROM workflows WHERE collab_id = ?
|
|
1861
1863
|
ORDER BY (status = 'running') DESC, created_at DESC
|
|
1862
1864
|
LIMIT 1`).get(e.collabId);
|
|
@@ -1924,6 +1926,7 @@ function buildCollabSummary(db, collabId2) {
|
|
|
1924
1926
|
handoffState: turn?.handoffState ?? "idle"
|
|
1925
1927
|
},
|
|
1926
1928
|
sessions,
|
|
1929
|
+
workflowCreatedAt: wf?.createdAt ?? null,
|
|
1927
1930
|
lastActivityAt: runLastAct
|
|
1928
1931
|
};
|
|
1929
1932
|
}
|
|
@@ -5693,10 +5696,14 @@ function buildRelayViewState(snap) {
|
|
|
5693
5696
|
const phaseEl = elapsedSince(cur?.startedAt, snap.now);
|
|
5694
5697
|
const elapsed = `total ${totalEl} \xB7 phase ${phaseEl}`;
|
|
5695
5698
|
const turn = `${snap.turn.turnOwner} \xB7 waiting ${snap.turn.waitingAgent ?? "none"} \xB7 handoff ${snap.turn.handoffState}`;
|
|
5696
|
-
const
|
|
5699
|
+
const agentHealth = RELAY_AGENTS.map((a) => {
|
|
5697
5700
|
const sess = snap.sessions.find((x) => x.agentType === a);
|
|
5698
|
-
const
|
|
5699
|
-
return
|
|
5701
|
+
const health2 = sess?.healthState === "healthy" ? "healthy" : sess?.healthState === "degraded" ? "degraded" : "dead";
|
|
5702
|
+
return { agent: a, health: health2 };
|
|
5703
|
+
});
|
|
5704
|
+
const dots = agentHealth.map(({ agent, health: health2 }) => {
|
|
5705
|
+
const glyph = health2 === "healthy" ? "\u25CF" : health2 === "degraded" ? "\u25D0(degraded)" : "\u25CF(dead)";
|
|
5706
|
+
return `${glyph} ${agent}`;
|
|
5700
5707
|
}).join(" ");
|
|
5701
5708
|
const { stuck, why, liveText } = computeLiveness(snap);
|
|
5702
5709
|
const terminal = snap.workflow && snap.workflow.status !== "running" ? snap.workflow.status : null;
|
|
@@ -5723,6 +5730,7 @@ function buildRelayViewState(snap) {
|
|
|
5723
5730
|
elapsed,
|
|
5724
5731
|
turn,
|
|
5725
5732
|
health,
|
|
5733
|
+
agentHealth,
|
|
5726
5734
|
live: liveText,
|
|
5727
5735
|
why,
|
|
5728
5736
|
last,
|