@saadnvd1/agent-os 0.3.507 → 0.3.508

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.
@@ -1,4 +1,4 @@
1
- import type { CallUsage } from "../usage/calls";
1
+ import type { CallUsage } from "../usage/types";
2
2
  import type { SearchResult } from "./find";
3
3
 
4
4
  /**
@@ -8,46 +8,9 @@
8
8
  import { db } from "../db";
9
9
  import { ANTHROPIC, sessionRole } from "../models/roles";
10
10
  import { ctxOf, weighted, type TokenRow } from "./weights";
11
+ import type { CallKind, CallRow, CallSource, CallUsage } from "./types";
11
12
 
12
- export type CallKind = "main" | "sub" | "review" | "gate" | "helper";
13
- export type CallSource = "live" | "transcript" | "check_run" | "helper";
14
-
15
- export interface CallRow {
16
- callKey: string;
17
- at: number;
18
- sessionId: string | null;
19
- taskId: string | null;
20
- workspaceId: string | null;
21
- projectId: string | null;
22
- sessionName: string | null;
23
- role: string | null;
24
- kind: CallKind;
25
- agentType: string | null;
26
- model: string | null;
27
- provider: string;
28
- input: number;
29
- cacheRead: number;
30
- cacheWrite5m: number;
31
- cacheWrite1h: number;
32
- output: number;
33
- ctx: number | null;
34
- source: CallSource;
35
- }
36
-
37
- // What a driver reports for one response, before it's tied to a session.
38
- export type CallUsage = Pick<
39
- CallRow,
40
- | "callKey"
41
- | "at"
42
- | "kind"
43
- | "agentType"
44
- | "model"
45
- | "input"
46
- | "cacheRead"
47
- | "cacheWrite5m"
48
- | "cacheWrite1h"
49
- | "output"
50
- >;
13
+ export type { CallKind, CallRow, CallSource, CallUsage };
51
14
 
52
15
  interface RawUsage {
53
16
  input_tokens?: number;
@@ -0,0 +1,41 @@
1
+ /** Pure usage-ledger types, shared with the mobile app: no imports, nothing server-only. */
2
+
3
+ export type CallKind = "main" | "sub" | "review" | "gate" | "helper";
4
+ export type CallSource = "live" | "transcript" | "check_run" | "helper";
5
+
6
+ export interface CallRow {
7
+ callKey: string;
8
+ at: number;
9
+ sessionId: string | null;
10
+ taskId: string | null;
11
+ workspaceId: string | null;
12
+ projectId: string | null;
13
+ sessionName: string | null;
14
+ role: string | null;
15
+ kind: CallKind;
16
+ agentType: string | null;
17
+ model: string | null;
18
+ provider: string;
19
+ input: number;
20
+ cacheRead: number;
21
+ cacheWrite5m: number;
22
+ cacheWrite1h: number;
23
+ output: number;
24
+ ctx: number | null;
25
+ source: CallSource;
26
+ }
27
+
28
+ // What a driver reports for one response, before it's tied to a session.
29
+ export type CallUsage = Pick<
30
+ CallRow,
31
+ | "callKey"
32
+ | "at"
33
+ | "kind"
34
+ | "agentType"
35
+ | "model"
36
+ | "input"
37
+ | "cacheRead"
38
+ | "cacheWrite5m"
39
+ | "cacheWrite1h"
40
+ | "output"
41
+ >;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saadnvd1/agent-os",
3
- "version": "0.3.507",
3
+ "version": "0.3.508",
4
4
  "description": "Self-hosted web UI for managing Claude Code sessions",
5
5
  "bin": {
6
6
  "agent-os": "scripts/agent-os"