@nexiq/shared 1.0.2 → 1.1.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.
Files changed (77) hide show
  1. package/dist/component.d.ts +184 -27
  2. package/dist/component.d.ts.map +1 -1
  3. package/dist/db/sqlite.d.ts +9 -2
  4. package/dist/db/sqlite.d.ts.map +1 -1
  5. package/dist/db/sqlite.js +34 -3
  6. package/dist/db/sqlite.js.map +1 -1
  7. package/dist/index.d.ts +158 -17
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +1 -0
  10. package/dist/index.js.map +1 -1
  11. package/dist/nexiq/graph-view/graph-combo.d.ts +40 -0
  12. package/dist/nexiq/graph-view/graph-combo.d.ts.map +1 -0
  13. package/dist/nexiq/graph-view/graph-combo.js +111 -0
  14. package/dist/nexiq/graph-view/graph-combo.js.map +1 -0
  15. package/dist/nexiq/graph-view/graph-edge.d.ts +30 -0
  16. package/dist/nexiq/graph-view/graph-edge.d.ts.map +1 -0
  17. package/dist/nexiq/graph-view/graph-edge.js +78 -0
  18. package/dist/nexiq/graph-view/graph-edge.js.map +1 -0
  19. package/dist/nexiq/graph-view/graph-node-detail.d.ts +26 -0
  20. package/dist/nexiq/graph-view/graph-node-detail.d.ts.map +1 -0
  21. package/dist/nexiq/graph-view/graph-node-detail.js +62 -0
  22. package/dist/nexiq/graph-view/graph-node-detail.js.map +1 -0
  23. package/dist/nexiq/graph-view/graph-node.d.ts +38 -0
  24. package/dist/nexiq/graph-view/graph-node.d.ts.map +1 -0
  25. package/dist/nexiq/graph-view/graph-node.js +103 -0
  26. package/dist/nexiq/graph-view/graph-node.js.map +1 -0
  27. package/dist/nexiq/graph-view/graph-view.d.ts +39 -0
  28. package/dist/nexiq/graph-view/graph-view.d.ts.map +1 -0
  29. package/dist/nexiq/graph-view/graph-view.js +131 -0
  30. package/dist/nexiq/graph-view/graph-view.js.map +1 -0
  31. package/dist/nexiq/graph-view/item-type.d.ts +23 -0
  32. package/dist/nexiq/graph-view/item-type.d.ts.map +1 -0
  33. package/dist/nexiq/graph-view/item-type.js +110 -0
  34. package/dist/nexiq/graph-view/item-type.js.map +1 -0
  35. package/dist/nexiq/graph-view/loc.d.ts +16 -0
  36. package/dist/nexiq/graph-view/loc.d.ts.map +1 -0
  37. package/dist/nexiq/graph-view/loc.js +46 -0
  38. package/dist/nexiq/graph-view/loc.js.map +1 -0
  39. package/dist/nexiq/graph-view.d.ts +8 -0
  40. package/dist/nexiq/graph-view.d.ts.map +1 -0
  41. package/dist/nexiq/graph-view.js +9 -0
  42. package/dist/nexiq/graph-view.js.map +1 -0
  43. package/dist/types/backend.d.ts +36 -28
  44. package/dist/types/backend.d.ts.map +1 -1
  45. package/dist/types/config.d.ts +1 -29
  46. package/dist/types/config.d.ts.map +1 -1
  47. package/dist/types/index.d.ts +2 -31
  48. package/dist/types/index.d.ts.map +1 -1
  49. package/dist/types/index.js +1 -0
  50. package/dist/types/index.js.map +1 -1
  51. package/dist/types/primitive.d.ts +70 -4
  52. package/dist/types/primitive.d.ts.map +1 -1
  53. package/dist/types/routes.d.ts +60 -0
  54. package/dist/types/routes.d.ts.map +1 -0
  55. package/dist/types/routes.js +2 -0
  56. package/dist/types/routes.js.map +1 -0
  57. package/dist/utils.d.ts +1 -0
  58. package/dist/utils.d.ts.map +1 -1
  59. package/dist/utils.js.map +1 -1
  60. package/package.json +26 -6
  61. package/dist/types/function.d.ts +0 -20
  62. package/dist/types/function.d.ts.map +0 -1
  63. package/dist/types/function.js +0 -2
  64. package/dist/types/function.js.map +0 -1
  65. package/src/component.ts +0 -379
  66. package/src/db/index.ts +0 -1
  67. package/src/db/sqlite.ts +0 -73
  68. package/src/index.ts +0 -147
  69. package/src/types/backend.ts +0 -88
  70. package/src/types/config.ts +0 -48
  71. package/src/types/function.ts +0 -26
  72. package/src/types/git.ts +0 -48
  73. package/src/types/index.ts +0 -92
  74. package/src/types/object.ts +0 -37
  75. package/src/types/primitive.ts +0 -268
  76. package/src/utils.ts +0 -89
  77. package/tsconfig.json +0 -46
package/src/component.ts DELETED
@@ -1,379 +0,0 @@
1
- import type { TypeDataDeclare, UIItemState } from "./types/index.js";
2
- import type { PropDataType, TypeData } from "./types/primitive.js";
3
-
4
- export type ComponentFileImport = {
5
- localName: string;
6
- importedName: string | null;
7
- source: string;
8
- type: "default" | "named" | "namespace" | "type";
9
- importKind: "value" | "type";
10
- };
11
-
12
- export type ComponentFileExport = {
13
- id: string;
14
- name: string;
15
- type: "default" | "named" | "namespace" | "type";
16
- exportKind: "value" | "type" | "component" | "function" | "class";
17
- };
18
-
19
- export interface State extends ComponentLoc {
20
- id: string;
21
- setter?: string | undefined;
22
- parentId?: string | undefined;
23
- }
24
-
25
- export interface RefData extends ComponentLoc {
26
- id: string;
27
- defaultData: PropDataType;
28
- parentId?: string | undefined;
29
- }
30
-
31
- export interface Memo extends ComponentLoc, ReactDependencies {
32
- id: string;
33
- scope: VariableScope;
34
- async?: boolean | undefined;
35
- parentId?: string | undefined;
36
- }
37
-
38
- export type ComponentInfoRenderDependency = {
39
- id: string;
40
- name: string;
41
- value: PropDataType;
42
- valueId?: string;
43
- };
44
-
45
- export interface ComponentInfoRender extends ComponentLoc {
46
- id: string;
47
- tag: string;
48
- instanceId: string;
49
- parentId?: string | undefined;
50
- dependencies: ComponentInfoRenderDependency[];
51
- isDependency?: boolean | undefined;
52
- renderIndex: number;
53
- kind: "jsx" | "ternary" | "loop" | "expression" | "hook" | "call";
54
- children: Record<string, ComponentInfoRender>;
55
- }
56
-
57
- export interface EffectInfo extends ComponentLoc, ReactDependencies {
58
- id: string;
59
- scope?: VariableScope;
60
- file?: string;
61
- kind?: "effect";
62
- }
63
-
64
- export interface PropData {
65
- id: string;
66
- name: string;
67
- type: string;
68
- kind: "prop" | "spread";
69
- props?: PropData[];
70
- hash?: string;
71
- gitStatus?: "added" | "modified" | "deleted";
72
- file?: string;
73
- loc?: VariableLoc;
74
- defaultValue?: PropDataType | undefined;
75
- }
76
-
77
- export interface ReactFunctionInfoBase {
78
- states: string[];
79
- hooks: string[];
80
- props: PropData[];
81
- propName?: string | undefined;
82
- propType?: TypeData;
83
- effects: Record<string, EffectInfo>;
84
- }
85
-
86
- export interface ReactFunctionInfo extends ReactFunctionInfoBase {
87
- id: string;
88
- name: string;
89
- file: string;
90
- }
91
-
92
- export interface HookInfo extends ReactFunctionInfoBase {}
93
-
94
- export interface ComponentInfo extends ReactFunctionInfoBase {
95
- componentType: "Function" | "Class";
96
- contexts: string[];
97
- forwardRef?: boolean;
98
- }
99
-
100
- export interface ComponentFileVarDependency {
101
- id: string;
102
- name: string;
103
- }
104
-
105
- export interface VariableLoc {
106
- line: number;
107
- column: number;
108
- }
109
-
110
- export interface ComponentLoc {
111
- loc: VariableLoc;
112
- }
113
-
114
- export interface VariableScope {
115
- start: VariableLoc;
116
- end: VariableLoc;
117
- }
118
-
119
- export type VarType = "function" | "data" | "jsx" | "class";
120
-
121
- export type ReactFunctionVar = "component" | "hook";
122
- export type ReactStateVar = "state" | "ref";
123
- export type ReactWithCallbackVar = "memo" | "callback";
124
- export type ReactVarKind =
125
- | ReactFunctionVar
126
- | ReactStateVar
127
- | ReactWithCallbackVar;
128
- export type VarKind = "normal" | ReactVarKind;
129
-
130
- export type VariableNamePattern =
131
- | { type: "identifier"; name: string; loc: VariableLoc; id: string }
132
- | {
133
- type: "object";
134
- properties: VariableObjectProperty[];
135
- raw: string;
136
- loc: VariableLoc;
137
- id: string;
138
- }
139
- | {
140
- type: "array";
141
- elements: VariableArrayElement[];
142
- raw: string;
143
- loc: VariableLoc;
144
- id: string;
145
- }
146
- | {
147
- type: "rest";
148
- argument: VariableNamePattern;
149
- loc: VariableLoc;
150
- id: string;
151
- }
152
- | {
153
- type: "void";
154
- loc: VariableLoc;
155
- id: string;
156
- };
157
-
158
- export type VariableObjectProperty = {
159
- key: string;
160
- value: VariableNamePattern;
161
- loc: VariableLoc;
162
- };
163
-
164
- export type VariableArrayElement =
165
- | { type: "element"; value: VariableNamePattern; loc: VariableLoc }
166
- | { type: "rest"; value: VariableNamePattern; loc: VariableLoc }
167
- | null;
168
-
169
- export type VariableName = VariableNamePattern;
170
-
171
- interface ComponentFileVarBaseType<TType extends VarType> {
172
- id: string;
173
- name: VariableName;
174
- type: TType;
175
- file: string;
176
- hash?: string | undefined;
177
- parentId?: string | undefined;
178
- declarationKind?:
179
- | "const"
180
- | "let"
181
- | "var"
182
- | "using"
183
- | "await using"
184
- | undefined;
185
- dependencies: Record<string, ComponentFileVarDependency>;
186
- ui?:
187
- | (UIItemState & {
188
- children?: Record<string, UIItemState>;
189
- vars?: Record<string, UIItemState>;
190
- })
191
- | undefined;
192
- }
193
-
194
- export interface ComponentFileVarBase<
195
- TType extends VarType,
196
- TKind extends VarKind,
197
- >
198
- extends ComponentLoc, ComponentFileVarBaseType<TType> {
199
- kind: TKind;
200
- }
201
-
202
- export type FunctionReturn = PropDataType | ComponentFileVarJSX | string;
203
-
204
- export interface ComponentFileVarBaseTypeFunction<
205
- TKind extends VarKind,
206
- TType extends VarType = "function",
207
- > extends ComponentFileVarBase<TType, TKind> {
208
- type: TType;
209
- scope: VariableScope;
210
- async?: boolean | undefined;
211
- var: Record<string, ComponentFileVar>;
212
- return?: FunctionReturn | undefined;
213
- children: Record<string, ComponentInfoRender>;
214
- }
215
-
216
- export interface ComponentFileVarBaseTypeData<
217
- TKind extends VarKind,
218
- TType extends VarType = "data",
219
- > extends ComponentFileVarBase<TType, TKind> {
220
- type: TType;
221
- children?: Record<string, ComponentInfoRender>;
222
- }
223
-
224
- export type ComponentFileVarDependencyType<TKind extends VarKind> =
225
- | ComponentFileVarBaseTypeFunction<TKind>
226
- | ComponentFileVarBaseTypeData<TKind>;
227
-
228
- export type ComponentFileVarReact<
229
- TType extends VarType,
230
- TKind extends ReactVarKind,
231
- > = ComponentFileVarBase<TType, TKind>;
232
-
233
- export type ComponentFileVarReactFunction<
234
- TKind extends ReactVarKind,
235
- TType extends VarType = "function",
236
- > = ComponentFileVarBaseTypeFunction<TKind, TType> & ReactFunctionInfoBase;
237
-
238
- export type ReactDependency = {
239
- id: string;
240
- name: string;
241
- };
242
-
243
- export type ReactDependencies = {
244
- reactDeps: ReactDependency[];
245
- };
246
-
247
- export type ComponentFileVarReactWithCallback<
248
- TKind extends ReactVarKind,
249
- TType extends VarType = "function",
250
- > = ComponentFileVarBaseTypeFunction<TKind, TType> & ReactDependencies;
251
-
252
- export type ComponentFileVarComponent =
253
- ComponentFileVarReactFunction<"component", "function" | "class"> &
254
- ComponentInfo & {
255
- kind: "component";
256
- };
257
-
258
- export type ComponentFileVarState = ComponentFileVarReact<"data", "state"> & {
259
- setter?: string | undefined;
260
- };
261
-
262
- export type ComponentFileVarCallHook = ComponentFileVarReact<"data", "hook"> & {
263
- call: { id: string; name: string };
264
- };
265
-
266
- export type ComponentFileVarRef = ComponentFileVarReact<"data", "ref"> & {
267
- defaultData: PropDataType;
268
- };
269
-
270
- export type ComponentFileVarHook = ComponentFileVarReactFunction<"hook", "function"> &
271
- HookInfo & {
272
- kind: "hook";
273
- };
274
-
275
- export type ComponentFileVarCallback =
276
- ComponentFileVarReactWithCallback<"callback"> & ReactDependencies;
277
-
278
- export type MemoFileVarHook = ComponentFileVarReactWithCallback<"memo"> &
279
- ReactDependencies;
280
-
281
- export type ComponentFileVarNormalBase<TType extends VarType> = ComponentLoc &
282
- ComponentFileVarBase<TType, "normal"> & {
283
- kind: "normal";
284
- };
285
-
286
- export type ComponentFileVarNormalFunction =
287
- ComponentFileVarNormalBase<"function" | "class"> &
288
- ComponentFileVarBaseTypeFunction<"normal">;
289
- export type ComponentFileVarNormalData = ComponentFileVarNormalBase<"data"> &
290
- ComponentFileVarBaseTypeData<"normal">;
291
-
292
- export type ComponentFileVarNormal =
293
- | ComponentFileVarNormalFunction
294
- | ComponentFileVarNormalData;
295
-
296
- export interface ComponentFileVarJSX extends ComponentFileVarBase<
297
- "jsx",
298
- "normal"
299
- > {
300
- type: "jsx";
301
- tag: string;
302
- props: ComponentInfoRenderDependency[];
303
- children: Record<string, ComponentInfoRender>;
304
- srcId?: string | undefined;
305
- }
306
-
307
- export type ComponentFileVarFunction =
308
- ComponentFileVarBaseTypeFunction<"normal"> & {
309
- kind: "normal";
310
- };
311
-
312
- export type ComponentFileVar =
313
- | ComponentFileVarComponent
314
- | ComponentFileVarState
315
- | ComponentFileVarCallHook
316
- | ComponentFileVarRef
317
- | ComponentFileVarNormal
318
- | ComponentFileVarHook
319
- | ComponentFileVarCallback
320
- | MemoFileVarHook
321
- | ComponentFileVarFunction
322
- | ComponentFileVarJSX;
323
-
324
- export type IResolveAddRender = {
325
- type: "comAddRender";
326
- fileName: string;
327
- tag: string;
328
- dependency: ComponentInfoRenderDependency[];
329
- loc: VariableLoc;
330
- kind?: ComponentInfoRender["kind"] | undefined;
331
- parentId?: string | undefined;
332
- };
333
-
334
- export type IResolveAddHook = {
335
- type: "comAddHook";
336
- name: string;
337
- fileName: string;
338
- hook: string;
339
- loc: VariableLoc;
340
- };
341
-
342
- export type IResolveCallHook = {
343
- type: "comResolveCallHook";
344
- fileName: string;
345
- loc: VariableLoc;
346
- id: string;
347
- hook: string;
348
- };
349
-
350
- export type IResolveTsType = {
351
- type: "tsType";
352
- fileName: string;
353
- id: string;
354
- };
355
-
356
- export type IResolveComPropsTsType = {
357
- type: "comPropsTsType";
358
- fileName: string;
359
- id: string;
360
- };
361
-
362
- export type ComponentDBResolve =
363
- | IResolveAddRender
364
- | IResolveAddHook
365
- | IResolveCallHook
366
- | IResolveTsType
367
- | IResolveComPropsTsType;
368
-
369
- export type ComponentFile = {
370
- path: string;
371
- fingerPrint: string;
372
- hash: string;
373
- import: Record<string, ComponentFileImport>;
374
- export: Record<string, ComponentFileExport>;
375
- starExports: string[];
376
- defaultExport: string | null;
377
- tsTypes: Record<string, TypeDataDeclare>;
378
- var: Record<string, ComponentFileVar>;
379
- };
package/src/db/index.ts DELETED
@@ -1 +0,0 @@
1
- export * from "./sqlite.js";
package/src/db/sqlite.ts DELETED
@@ -1,73 +0,0 @@
1
- import type { Database } from "better-sqlite3";
2
- import type {
3
- FileRow,
4
- EntityRow,
5
- RelationRow,
6
- ScopeRow,
7
- SymbolRow,
8
- RenderRow,
9
- ExportRow,
10
- } from "../index.js";
11
-
12
- export class SqliteDB {
13
- public db: Database;
14
-
15
- constructor(db: Database) {
16
- this.db = db;
17
- this.db.pragma("journal_mode = WAL");
18
- this.db.pragma("foreign_keys = ON");
19
- }
20
-
21
- public getFileByPath(filePath: string): FileRow | undefined {
22
- return this.db
23
- .prepare("SELECT * FROM files WHERE path = ?")
24
- .get(filePath) as FileRow | undefined;
25
- }
26
-
27
- public getEdges(): { from: string; to: string; label: string }[] {
28
- const rows = this.db
29
- .prepare(
30
- `
31
- SELECT from_id as 'from', to_id as 'to', kind as label
32
- FROM relations
33
- WHERE kind NOT IN ('parent-child', 'renders', 'calls')
34
- `,
35
- )
36
- .all() as { from: string; to: string; label: string }[];
37
- return rows;
38
- }
39
-
40
- public getAllData() {
41
- const files = this.db.prepare("SELECT * FROM files").all() as FileRow[];
42
- const entities = this.db
43
- .prepare("SELECT * FROM entities")
44
- .all() as EntityRow[];
45
- const scopes = this.db.prepare("SELECT * FROM scopes").all() as ScopeRow[];
46
- const symbols = this.db
47
- .prepare("SELECT * FROM symbols")
48
- .all() as SymbolRow[];
49
- const renders = this.db
50
- .prepare("SELECT * FROM renders")
51
- .all() as RenderRow[];
52
- const exports = this.db
53
- .prepare("SELECT * FROM exports")
54
- .all() as ExportRow[];
55
- const relations = this.db
56
- .prepare("SELECT * FROM relations")
57
- .all() as RelationRow[];
58
-
59
- return {
60
- files,
61
- entities,
62
- scopes,
63
- symbols,
64
- renders,
65
- exports,
66
- relations,
67
- };
68
- }
69
-
70
- public close() {
71
- this.db.close();
72
- }
73
- }
package/src/index.ts DELETED
@@ -1,147 +0,0 @@
1
- import type {
2
- ComponentFile,
3
- ComponentFileVar,
4
- PropData,
5
- EffectInfo,
6
- ComponentDBResolve,
7
- } from "./component.js";
8
-
9
- export type DataEdge = {
10
- from: string;
11
- to: string;
12
- label: string;
13
- };
14
-
15
- export interface EntityRow {
16
- id: string;
17
- scope_id: string;
18
- kind: string; // 'component', 'hook', 'function', 'class', 'variable', 'import', 'jsx', etc.
19
- name: string | null;
20
- type: string | null;
21
- line: number | null;
22
- column: number | null;
23
- end_line: number | null;
24
- end_column: number | null;
25
- declaration_kind: string | null;
26
- data_json: string | null;
27
- }
28
-
29
- export interface ScopeRow {
30
- id: string;
31
- file_id: number;
32
- parent_id: string | null;
33
- kind: string; // 'module', 'block'
34
- entity_id: string | null;
35
- data_json: string | null;
36
- }
37
-
38
- export interface SymbolRow {
39
- id: string;
40
- entity_id: string;
41
- scope_id: string;
42
- name: string;
43
- path: string | null;
44
- is_alias: number;
45
- has_default: number;
46
- data_json: string | null;
47
- }
48
-
49
- export interface RenderRow {
50
- id: string;
51
- file_id: number;
52
- parent_entity_id: string;
53
- parent_render_id: string | null;
54
- render_index: number;
55
- tag: string;
56
- symbol_id: string | null;
57
- line: number | null;
58
- column: number | null;
59
- kind: string;
60
- data_json: string | null;
61
- }
62
-
63
- export interface RelationRow {
64
- from_id: string;
65
- to_id: string;
66
- kind: string;
67
- line: number | null;
68
- column: number | null;
69
- data_json: string | null;
70
- }
71
-
72
- export interface FileRow {
73
- id: number;
74
- path: string;
75
- hash: string;
76
- fingerprint: string;
77
- default_export: string | null;
78
- star_exports_json: string | null;
79
- }
80
-
81
- export interface ExportRow {
82
- id: string;
83
- scope_id: string;
84
- symbol_id: string | null;
85
- entity_id: string | null;
86
- name: string | null;
87
- is_default: number;
88
- }
89
-
90
- export type DatabaseData = {
91
- files: FileRow[];
92
- entities: EntityRow[];
93
- scopes: ScopeRow[];
94
- symbols: SymbolRow[];
95
- renders: RenderRow[];
96
- exports: ExportRow[];
97
- relations: RelationRow[];
98
- diff?: AnalyzedDiff;
99
- };
100
-
101
- export type AnalyzedDiff = {
102
- added: string[];
103
- modified: string[];
104
- deleted: string[];
105
- deletedObjects?: Record<string, ComponentFileVar | PropData | EffectInfo>;
106
- };
107
-
108
- export type JsonData = {
109
- src: string;
110
- edges: DataEdge[];
111
- files: Record<string, ComponentFile>;
112
- labels?: Record<string, string[]>;
113
- diff?: AnalyzedDiff;
114
- resolve: ComponentDBResolve[];
115
- };
116
-
117
- export interface BenchmarkToolCall {
118
- id: string;
119
- name: string;
120
- arguments: Record<string, unknown>;
121
- }
122
-
123
- export interface BenchmarkStep {
124
- role: "user" | "assistant" | "tool" | "system";
125
- content?: string;
126
- toolCalls?: BenchmarkToolCall[];
127
- toolCallId?: string;
128
- toolName?: string;
129
- tokens: number;
130
- }
131
-
132
- export interface BenchmarkResult {
133
- scenarioId: string;
134
- projectName: string;
135
- approach: "baseline" | "nexiq-cold" | "nexiq-warm";
136
- testType: "single-prompt" | "planning";
137
- model: string;
138
- success: boolean;
139
- totalTokens: number;
140
- toolCallsCount: number;
141
- latencyMs: number;
142
- steps: BenchmarkStep[];
143
- }
144
-
145
- export * from "./types/index.js";
146
- export * from "./component.js";
147
- export * from "./utils.js";
@@ -1,88 +0,0 @@
1
- import type { DatabaseData, JsonData } from "../index.js";
2
- import type {
3
- ProjectStatus,
4
- GitStatus,
5
- GitCommit,
6
- GitFileDiff,
7
- NexiqConfig,
8
- AppStateData,
9
- UIStateMap,
10
- } from "./index.js";
11
-
12
- export interface BackendRequestMap {
13
- check_project_status: {
14
- payload: { projectPath: string };
15
- response: ProjectStatus;
16
- };
17
- save_project_config: {
18
- payload: { projectPath: string; config: NexiqConfig };
19
- response: { success: boolean };
20
- };
21
- get_project_icon: {
22
- payload: { projectPath: string };
23
- response: string | null;
24
- };
25
- git_status: {
26
- payload: { projectPath: string };
27
- response: GitStatus;
28
- };
29
- git_log: {
30
- payload: {
31
- projectPath: string;
32
- options: number | { limit?: number; path?: string };
33
- };
34
- response: GitCommit[];
35
- };
36
- git_diff: {
37
- payload: {
38
- projectPath: string;
39
- options: {
40
- file?: string;
41
- commit?: string;
42
- baseCommit?: string;
43
- staged?: boolean;
44
- };
45
- };
46
- response: GitFileDiff[];
47
- };
48
- git_analyze_commit: {
49
- payload: { projectPath: string; commitHash: string; subPath?: string };
50
- response: DatabaseData;
51
- };
52
- open_project: {
53
- payload: { projectPath: string; subProject?: string };
54
- response: { sqlitePath: string };
55
- };
56
- read_state: {
57
- payload: { projectPath: string };
58
- response: unknown;
59
- };
60
- save_state: {
61
- payload: { projectPath: string; state: AppStateData };
62
- response: boolean;
63
- };
64
- update_graph_position: {
65
- payload: {
66
- projectPath: string;
67
- subProject?: string;
68
- positions: UIStateMap;
69
- contextId?: string;
70
- };
71
- response: boolean;
72
- };
73
- call_tool: {
74
- payload: { name: string; arguments: Record<string, unknown> };
75
- response: unknown;
76
- };
77
- chunked_response: {
78
- payload: {
79
- chunk: string;
80
- index: number;
81
- total: number;
82
- originalType: string;
83
- };
84
- response: void;
85
- };
86
- }
87
-
88
- export type BackendMessageType = keyof BackendRequestMap;