@saadnvd1/agent-os 0.3.487 → 0.3.489
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/README.md +3 -0
- package/data/push/topics.test.ts +9 -0
- package/data/push/topics.ts +3 -14
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -358,6 +358,9 @@ and leave no transcript, so each run's tokens, model and duration are read
|
|
|
358
358
|
from its JSON result into `check_runs`, and the review's verdict says them
|
|
359
359
|
too. Every compaction is kept in `chat_compactions` (who ran it, whether it
|
|
360
360
|
fired `mid_turn` or `between_turns`, and the context before and after), so cost per task can be compared by date.
|
|
361
|
+
Rows from before the column existed, and any written by a chat worker still
|
|
362
|
+
running older code, have a NULL `phase`: read those as unknown
|
|
363
|
+
(`COALESCE(phase, 'unknown')`), not as either kind.
|
|
361
364
|
|
|
362
365
|
**Esc** stops a running turn, as it does in Claude Code's terminal, unless a
|
|
363
366
|
menu, dialog or the command list is open (those close first). On a phone the
|
package/data/push/topics.test.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { QueryClient } from "@tanstack/react-query";
|
|
|
2
2
|
import { describe, expect, it } from "vitest";
|
|
3
3
|
import { WATCHED_TABLES } from "@/lib/db/changes";
|
|
4
4
|
import { gitKeys } from "../git/keys";
|
|
5
|
+
import { taskKeys } from "../tasks/keys";
|
|
5
6
|
import { sessionKeys } from "../sessions/keys";
|
|
6
7
|
import { ALL_TOPICS, invalidateTopics, topicKeys } from "./topics";
|
|
7
8
|
|
|
@@ -16,6 +17,14 @@ describe("pushed topics", () => {
|
|
|
16
17
|
expect(topicKeys(topic), topic).not.toEqual([]);
|
|
17
18
|
});
|
|
18
19
|
|
|
20
|
+
it("a snapshot refetches the queue and every other watched table", () => {
|
|
21
|
+
for (const table of WATCHED_TABLES) expect(ALL_TOPICS).toContain(table);
|
|
22
|
+
const client = new QueryClient();
|
|
23
|
+
client.setQueryData(taskKeys.queue(), []);
|
|
24
|
+
invalidateTopics(client, ALL_TOPICS);
|
|
25
|
+
expect(client.getQueryState(taskKeys.queue())?.isInvalidated).toBe(true);
|
|
26
|
+
});
|
|
27
|
+
|
|
19
28
|
it("maps a git folder and a session's setup to their queries", () => {
|
|
20
29
|
expect(topicKeys("git:~/app")).toContainEqual(gitKeys.status("~/app"));
|
|
21
30
|
expect(topicKeys("git:~/app")).toContainEqual([
|
package/data/push/topics.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { QueryClient, QueryKey } from "@tanstack/react-query";
|
|
2
|
+
import { WATCHED_TABLES } from "@/lib/db/changes";
|
|
2
3
|
import { sessionKeys } from "../sessions/keys";
|
|
3
4
|
import { taskKeys } from "../tasks/keys";
|
|
4
5
|
import { projectKeys } from "../projects/keys";
|
|
@@ -88,19 +89,7 @@ export function invalidateTopics(
|
|
|
88
89
|
}
|
|
89
90
|
|
|
90
91
|
// Every pushed topic but git folders: after a gap the stream can't replay.
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"projects",
|
|
94
|
-
"workspaces",
|
|
95
|
-
"hosts",
|
|
96
|
-
"discovered",
|
|
97
|
-
"stacks",
|
|
98
|
-
"bus_messages",
|
|
99
|
-
"schedules",
|
|
100
|
-
"orchestrator_asks",
|
|
101
|
-
"orchestrator_rules",
|
|
102
|
-
"away_periods",
|
|
103
|
-
"dev_servers",
|
|
104
|
-
];
|
|
92
|
+
// Every table the triggers watch is in it, so a new one can't be left out.
|
|
93
|
+
export const ALL_TOPICS = [...new Set([...WATCHED_TABLES, "discovered"])];
|
|
105
94
|
|
|
106
95
|
export { keysFor as topicKeys };
|