@crossworks/client-types 0.600.0 → 0.600.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossworks/client-types",
3
- "version": "0.600.0",
3
+ "version": "0.600.2",
4
4
  "type": "module",
5
5
  "main": "./src/index.ts",
6
6
  "types": "./src/index.ts",
@@ -0,0 +1,57 @@
1
+ /**
2
+ * A file's read-only database, as the Data view in Files reads it
3
+ * (docs/file-ingestion.md, "File databases"). The same answer as the
4
+ * `file_sql` tool, with a `kind`:
5
+ *
6
+ * - POST /api/files/files/:id/database with no `sql`: `describe`;
7
+ * - with `sql`: `rows`;
8
+ * - a file with no database: `none`, and `reason` says why in words.
9
+ *
10
+ * GET /api/files/files?data=1 lists every file the caller may read that has,
11
+ * or will have, a database, with its state.
12
+ */
13
+
14
+ export type FileDatabaseTab = {
15
+ name: string;
16
+ /** The view to query, double-quoted, e.g. SELECT * FROM "Layers". */
17
+ view: string;
18
+ fts_table?: string;
19
+ row_count: number;
20
+ columns: { name: string; type: string }[];
21
+ };
22
+
23
+ export type FileDatabaseResponse =
24
+ | {
25
+ kind: 'describe';
26
+ file_id: string;
27
+ title: string;
28
+ description?: string;
29
+ tabs: FileDatabaseTab[];
30
+ hint: string;
31
+ }
32
+ | {
33
+ kind: 'rows';
34
+ file_id: string;
35
+ columns: string[];
36
+ rows: unknown[][];
37
+ row_count: number;
38
+ duration_ms: number;
39
+ truncated?: true;
40
+ hint?: string;
41
+ }
42
+ | { kind: 'none'; file_id: string; reason: string };
43
+
44
+ /** Built; a word for why there are no rows; or not built yet. */
45
+ export type DataFileState = 'ready' | 'too-large' | 'no-rows' | 'unreadable' | 'not-built';
46
+
47
+ export type DataFileRow = {
48
+ id: string;
49
+ parentPath: string;
50
+ filename: string;
51
+ extension: string;
52
+ sizeBytes: number;
53
+ updatedAt: string;
54
+ database: { state: DataFileState; bytes: number | null };
55
+ };
56
+
57
+ export type DataFilesResponse = { files: DataFileRow[]; truncated: boolean };
package/src/index.ts CHANGED
@@ -156,6 +156,13 @@ export type {
156
156
  FileDeleteRefusalReason,
157
157
  FileDerivedCounts,
158
158
  } from './dto/file-deletes';
159
+ export type {
160
+ DataFileRow,
161
+ DataFileState,
162
+ DataFilesResponse,
163
+ FileDatabaseResponse,
164
+ FileDatabaseTab,
165
+ } from './dto/file-databases';
159
166
 
160
167
  export type { MemberItemKind, ClientItemKind, ClientItemFilter } from './member-kinds';
161
168
  export type {
@@ -168,6 +168,10 @@ export function deriveAction(t: {
168
168
  };
169
169
  case 'heartbeat_fire':
170
170
  return { label: 'Scheduled automation fired', category: 'automation', iconKey: 'automation' };
171
+ case 'tool_call':
172
+ // A model call an app or an MCP client made through a tool
173
+ // (dispatch.ts withSpendTrace).
174
+ return { label: 'Model call by a tool', category: 'automation', iconKey: 'automation' };
171
175
  default:
172
176
  // extractor_run / content_ingest / photo_ingest / manual → content pipeline
173
177
  return {