@hasna/recordings 0.1.36 → 0.2.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 (49) hide show
  1. package/README.md +43 -0
  2. package/dist/cli/index.js +707 -5708
  3. package/dist/db/feedback.d.ts +13 -0
  4. package/dist/db/feedback.d.ts.map +1 -0
  5. package/dist/http/client.d.ts +77 -0
  6. package/dist/http/client.d.ts.map +1 -0
  7. package/dist/index.d.ts +6 -8
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +633 -5356
  10. package/dist/mcp/index.d.ts.map +1 -1
  11. package/dist/mcp/index.js +528 -5470
  12. package/dist/sdk/index.d.ts +16 -0
  13. package/dist/sdk/index.d.ts.map +1 -0
  14. package/dist/sdk/index.js +140 -0
  15. package/dist/sdk/v1.generated.d.ts +150 -0
  16. package/dist/sdk/v1.generated.d.ts.map +1 -0
  17. package/dist/server/cloud.d.ts +49 -0
  18. package/dist/server/cloud.d.ts.map +1 -0
  19. package/dist/server/index.d.ts +3 -0
  20. package/dist/server/index.d.ts.map +1 -0
  21. package/dist/server/index.js +6931 -0
  22. package/dist/server/openapi.d.ts +614 -0
  23. package/dist/server/openapi.d.ts.map +1 -0
  24. package/dist/server/repo.d.ts +44 -0
  25. package/dist/server/repo.d.ts.map +1 -0
  26. package/dist/server/serve.d.ts +11 -0
  27. package/dist/server/serve.d.ts.map +1 -0
  28. package/dist/server/v1.d.ts +6 -0
  29. package/dist/server/v1.d.ts.map +1 -0
  30. package/dist/storage.d.ts +4 -6
  31. package/dist/storage.d.ts.map +1 -1
  32. package/dist/storage.js +706 -5286
  33. package/dist/store.d.ts +40 -0
  34. package/dist/store.d.ts.map +1 -0
  35. package/dist/version.d.ts +1 -1
  36. package/dist/version.d.ts.map +1 -1
  37. package/package.json +13 -4
  38. package/scripts/generate-sdk.ts +31 -0
  39. package/scripts/migrate.ts +37 -0
  40. package/dist/cli/storage.d.ts +0 -3
  41. package/dist/cli/storage.d.ts.map +0 -1
  42. package/dist/db/pg-migrate.d.ts +0 -8
  43. package/dist/db/pg-migrate.d.ts.map +0 -1
  44. package/dist/db/storage-config.d.ts +0 -28
  45. package/dist/db/storage-config.d.ts.map +0 -1
  46. package/dist/db/storage-sync.d.ts +0 -36
  47. package/dist/db/storage-sync.d.ts.map +0 -1
  48. package/dist/mcp/storage-tools.d.ts +0 -3
  49. package/dist/mcp/storage-tools.d.ts.map +0 -1
@@ -0,0 +1,614 @@
1
+ export declare function buildV1OpenApiDocument(version?: string): {
2
+ openapi: string;
3
+ info: {
4
+ title: string;
5
+ version: string;
6
+ description: string;
7
+ };
8
+ servers: {
9
+ url: string;
10
+ }[];
11
+ components: {
12
+ securitySchemes: {
13
+ apiKey: {
14
+ type: string;
15
+ in: string;
16
+ name: string;
17
+ };
18
+ };
19
+ schemas: {
20
+ Recording: {
21
+ readonly type: "object";
22
+ readonly properties: {
23
+ readonly id: {
24
+ readonly type: "string";
25
+ };
26
+ readonly audio_path: {
27
+ readonly type: "string";
28
+ readonly nullable: true;
29
+ };
30
+ readonly raw_text: {
31
+ readonly type: "string";
32
+ };
33
+ readonly processed_text: {
34
+ readonly type: "string";
35
+ readonly nullable: true;
36
+ };
37
+ readonly processing_mode: {
38
+ readonly type: "string";
39
+ readonly enum: readonly ["raw", "enhanced"];
40
+ };
41
+ readonly model_used: {
42
+ readonly type: "string";
43
+ };
44
+ readonly enhancement_model: {
45
+ readonly type: "string";
46
+ readonly nullable: true;
47
+ };
48
+ readonly duration_ms: {
49
+ readonly type: "number";
50
+ };
51
+ readonly language: {
52
+ readonly type: "string";
53
+ readonly nullable: true;
54
+ };
55
+ readonly tags: {
56
+ readonly type: "array";
57
+ readonly items: {
58
+ readonly type: "string";
59
+ };
60
+ };
61
+ readonly agent_id: {
62
+ readonly type: "string";
63
+ readonly nullable: true;
64
+ };
65
+ readonly project_id: {
66
+ readonly type: "string";
67
+ readonly nullable: true;
68
+ };
69
+ readonly session_id: {
70
+ readonly type: "string";
71
+ readonly nullable: true;
72
+ };
73
+ readonly goal: {
74
+ readonly type: "string";
75
+ readonly nullable: true;
76
+ };
77
+ readonly role: {
78
+ readonly type: "string";
79
+ readonly nullable: true;
80
+ };
81
+ readonly task_list_id: {
82
+ readonly type: "string";
83
+ readonly nullable: true;
84
+ };
85
+ readonly machine_id: {
86
+ readonly type: "string";
87
+ readonly nullable: true;
88
+ };
89
+ readonly metadata: {
90
+ readonly type: "object";
91
+ readonly additionalProperties: true;
92
+ };
93
+ readonly created_at: {
94
+ readonly type: "string";
95
+ };
96
+ };
97
+ };
98
+ Agent: {
99
+ readonly type: "object";
100
+ readonly properties: {
101
+ readonly id: {
102
+ readonly type: "string";
103
+ };
104
+ readonly name: {
105
+ readonly type: "string";
106
+ };
107
+ readonly description: {
108
+ readonly type: "string";
109
+ readonly nullable: true;
110
+ };
111
+ readonly role: {
112
+ readonly type: "string";
113
+ };
114
+ readonly metadata: {
115
+ readonly type: "object";
116
+ readonly additionalProperties: true;
117
+ };
118
+ readonly created_at: {
119
+ readonly type: "string";
120
+ };
121
+ readonly last_seen_at: {
122
+ readonly type: "string";
123
+ };
124
+ };
125
+ };
126
+ Project: {
127
+ readonly type: "object";
128
+ readonly properties: {
129
+ readonly id: {
130
+ readonly type: "string";
131
+ };
132
+ readonly name: {
133
+ readonly type: "string";
134
+ };
135
+ readonly path: {
136
+ readonly type: "string";
137
+ };
138
+ readonly description: {
139
+ readonly type: "string";
140
+ readonly nullable: true;
141
+ };
142
+ readonly created_at: {
143
+ readonly type: "string";
144
+ };
145
+ readonly updated_at: {
146
+ readonly type: "string";
147
+ };
148
+ };
149
+ };
150
+ CreateRecordingInput: {
151
+ type: string;
152
+ required: string[];
153
+ properties: {
154
+ raw_text: {
155
+ type: string;
156
+ };
157
+ audio_path: {
158
+ type: string;
159
+ };
160
+ processed_text: {
161
+ type: string;
162
+ };
163
+ processing_mode: {
164
+ type: string;
165
+ enum: string[];
166
+ };
167
+ model_used: {
168
+ type: string;
169
+ };
170
+ enhancement_model: {
171
+ type: string;
172
+ };
173
+ duration_ms: {
174
+ type: string;
175
+ };
176
+ language: {
177
+ type: string;
178
+ };
179
+ tags: {
180
+ type: string;
181
+ items: {
182
+ type: string;
183
+ };
184
+ };
185
+ agent_id: {
186
+ type: string;
187
+ };
188
+ project_id: {
189
+ type: string;
190
+ };
191
+ session_id: {
192
+ type: string;
193
+ };
194
+ goal: {
195
+ type: string;
196
+ };
197
+ role: {
198
+ type: string;
199
+ };
200
+ task_list_id: {
201
+ type: string;
202
+ };
203
+ machine_id: {
204
+ type: string;
205
+ };
206
+ metadata: {
207
+ type: string;
208
+ additionalProperties: boolean;
209
+ };
210
+ };
211
+ };
212
+ RegisterAgentInput: {
213
+ type: string;
214
+ required: string[];
215
+ properties: {
216
+ name: {
217
+ type: string;
218
+ };
219
+ description: {
220
+ type: string;
221
+ };
222
+ role: {
223
+ type: string;
224
+ };
225
+ };
226
+ };
227
+ RegisterProjectInput: {
228
+ type: string;
229
+ required: string[];
230
+ properties: {
231
+ name: {
232
+ type: string;
233
+ };
234
+ path: {
235
+ type: string;
236
+ };
237
+ description: {
238
+ type: string;
239
+ };
240
+ };
241
+ };
242
+ };
243
+ };
244
+ security: {
245
+ apiKey: never[];
246
+ }[];
247
+ paths: {
248
+ "/v1/recordings": {
249
+ get: {
250
+ operationId: string;
251
+ summary: string;
252
+ parameters: ({
253
+ name: string;
254
+ in: string;
255
+ schema: {
256
+ type: string;
257
+ enum?: undefined;
258
+ };
259
+ } | {
260
+ name: string;
261
+ in: string;
262
+ schema: {
263
+ type: string;
264
+ enum: string[];
265
+ };
266
+ })[];
267
+ responses: {
268
+ "200": {
269
+ description: string;
270
+ content: {
271
+ "application/json": {
272
+ schema: {
273
+ type: string;
274
+ properties: {
275
+ recordings: {
276
+ type: string;
277
+ items: {
278
+ $ref: string;
279
+ };
280
+ };
281
+ count: {
282
+ type: string;
283
+ };
284
+ };
285
+ };
286
+ };
287
+ };
288
+ };
289
+ };
290
+ };
291
+ post: {
292
+ operationId: string;
293
+ summary: string;
294
+ requestBody: {
295
+ required: boolean;
296
+ content: {
297
+ "application/json": {
298
+ schema: {
299
+ $ref: string;
300
+ };
301
+ };
302
+ };
303
+ };
304
+ responses: {
305
+ "201": {
306
+ description: string;
307
+ content: {
308
+ "application/json": {
309
+ schema: {
310
+ type: string;
311
+ properties: {
312
+ recording: {
313
+ $ref: string;
314
+ };
315
+ };
316
+ };
317
+ };
318
+ };
319
+ };
320
+ };
321
+ };
322
+ };
323
+ "/v1/recordings/{id}": {
324
+ get: {
325
+ operationId: string;
326
+ summary: string;
327
+ parameters: {
328
+ name: string;
329
+ in: string;
330
+ required: boolean;
331
+ schema: {
332
+ type: string;
333
+ };
334
+ }[];
335
+ responses: {
336
+ "200": {
337
+ description: string;
338
+ content: {
339
+ "application/json": {
340
+ schema: {
341
+ type: string;
342
+ properties: {
343
+ recording: {
344
+ $ref: string;
345
+ };
346
+ };
347
+ };
348
+ };
349
+ };
350
+ };
351
+ "404": {
352
+ description: string;
353
+ };
354
+ };
355
+ };
356
+ delete: {
357
+ operationId: string;
358
+ summary: string;
359
+ parameters: {
360
+ name: string;
361
+ in: string;
362
+ required: boolean;
363
+ schema: {
364
+ type: string;
365
+ };
366
+ }[];
367
+ responses: {
368
+ "200": {
369
+ description: string;
370
+ content: {
371
+ "application/json": {
372
+ schema: {
373
+ type: string;
374
+ properties: {
375
+ deleted: {
376
+ type: string;
377
+ };
378
+ };
379
+ };
380
+ };
381
+ };
382
+ };
383
+ };
384
+ };
385
+ };
386
+ "/v1/stats": {
387
+ get: {
388
+ operationId: string;
389
+ summary: string;
390
+ responses: {
391
+ "200": {
392
+ description: string;
393
+ content: {
394
+ "application/json": {
395
+ schema: {
396
+ type: string;
397
+ properties: {
398
+ total: {
399
+ type: string;
400
+ };
401
+ raw: {
402
+ type: string;
403
+ };
404
+ enhanced: {
405
+ type: string;
406
+ };
407
+ total_duration_ms: {
408
+ type: string;
409
+ };
410
+ by_model: {
411
+ type: string;
412
+ additionalProperties: {
413
+ type: string;
414
+ };
415
+ };
416
+ };
417
+ };
418
+ };
419
+ };
420
+ };
421
+ };
422
+ };
423
+ };
424
+ "/v1/agents": {
425
+ get: {
426
+ operationId: string;
427
+ summary: string;
428
+ responses: {
429
+ "200": {
430
+ description: string;
431
+ content: {
432
+ "application/json": {
433
+ schema: {
434
+ type: string;
435
+ properties: {
436
+ agents: {
437
+ type: string;
438
+ items: {
439
+ $ref: string;
440
+ };
441
+ };
442
+ count: {
443
+ type: string;
444
+ };
445
+ };
446
+ };
447
+ };
448
+ };
449
+ };
450
+ };
451
+ };
452
+ post: {
453
+ operationId: string;
454
+ summary: string;
455
+ requestBody: {
456
+ required: boolean;
457
+ content: {
458
+ "application/json": {
459
+ schema: {
460
+ $ref: string;
461
+ };
462
+ };
463
+ };
464
+ };
465
+ responses: {
466
+ "201": {
467
+ description: string;
468
+ content: {
469
+ "application/json": {
470
+ schema: {
471
+ type: string;
472
+ properties: {
473
+ agent: {
474
+ $ref: string;
475
+ };
476
+ };
477
+ };
478
+ };
479
+ };
480
+ };
481
+ };
482
+ };
483
+ };
484
+ "/v1/agents/{id}": {
485
+ get: {
486
+ operationId: string;
487
+ summary: string;
488
+ parameters: {
489
+ name: string;
490
+ in: string;
491
+ required: boolean;
492
+ schema: {
493
+ type: string;
494
+ };
495
+ }[];
496
+ responses: {
497
+ "200": {
498
+ description: string;
499
+ content: {
500
+ "application/json": {
501
+ schema: {
502
+ type: string;
503
+ properties: {
504
+ agent: {
505
+ $ref: string;
506
+ };
507
+ };
508
+ };
509
+ };
510
+ };
511
+ };
512
+ "404": {
513
+ description: string;
514
+ };
515
+ };
516
+ };
517
+ };
518
+ "/v1/projects": {
519
+ get: {
520
+ operationId: string;
521
+ summary: string;
522
+ responses: {
523
+ "200": {
524
+ description: string;
525
+ content: {
526
+ "application/json": {
527
+ schema: {
528
+ type: string;
529
+ properties: {
530
+ projects: {
531
+ type: string;
532
+ items: {
533
+ $ref: string;
534
+ };
535
+ };
536
+ count: {
537
+ type: string;
538
+ };
539
+ };
540
+ };
541
+ };
542
+ };
543
+ };
544
+ };
545
+ };
546
+ post: {
547
+ operationId: string;
548
+ summary: string;
549
+ requestBody: {
550
+ required: boolean;
551
+ content: {
552
+ "application/json": {
553
+ schema: {
554
+ $ref: string;
555
+ };
556
+ };
557
+ };
558
+ };
559
+ responses: {
560
+ "201": {
561
+ description: string;
562
+ content: {
563
+ "application/json": {
564
+ schema: {
565
+ type: string;
566
+ properties: {
567
+ project: {
568
+ $ref: string;
569
+ };
570
+ };
571
+ };
572
+ };
573
+ };
574
+ };
575
+ };
576
+ };
577
+ };
578
+ "/v1/projects/{id}": {
579
+ get: {
580
+ operationId: string;
581
+ summary: string;
582
+ parameters: {
583
+ name: string;
584
+ in: string;
585
+ required: boolean;
586
+ schema: {
587
+ type: string;
588
+ };
589
+ }[];
590
+ responses: {
591
+ "200": {
592
+ description: string;
593
+ content: {
594
+ "application/json": {
595
+ schema: {
596
+ type: string;
597
+ properties: {
598
+ project: {
599
+ $ref: string;
600
+ };
601
+ };
602
+ };
603
+ };
604
+ };
605
+ };
606
+ "404": {
607
+ description: string;
608
+ };
609
+ };
610
+ };
611
+ };
612
+ };
613
+ };
614
+ //# sourceMappingURL=openapi.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"openapi.d.ts","sourceRoot":"","sources":["../../src/server/openapi.ts"],"names":[],"mappings":"AAyDA,wBAAgB,sBAAsB,CAAC,OAAO,SAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA4SvD"}
@@ -0,0 +1,44 @@
1
+ /**
2
+ * Postgres-native repository for `recordings-serve` (A1 pure-remote).
3
+ *
4
+ * These functions mirror the local SQLite CRUD in `src/db/*.ts` but run against
5
+ * the shared cloud Postgres DIRECTLY through the repo's own async adapter
6
+ * (`PgAdapterAsync`) — there is NO local sync/cache in the service. The SQL uses
7
+ * `?` placeholders (the adapter translates them to `$n`) and Postgres-native
8
+ * upsert (`ON CONFLICT`) instead of SQLite's `INSERT OR IGNORE`.
9
+ *
10
+ * This is a real wrapper over the same relational schema the core lib uses
11
+ * (`PG_MIGRATIONS`); it shares the domain types and the row-parsing shape. No
12
+ * stubs — every operation executes real SQL.
13
+ */
14
+ import type { PgAdapterAsync } from "../db/remote-storage.js";
15
+ import type { Recording, CreateRecordingInput, RecordingFilter, Agent, Project } from "../types/index.js";
16
+ export declare function createRecording(pg: PgAdapterAsync, input: CreateRecordingInput): Promise<Recording>;
17
+ export declare function getRecording(pg: PgAdapterAsync, id: string): Promise<Recording | null>;
18
+ export declare function listRecordings(pg: PgAdapterAsync, filter?: RecordingFilter): Promise<Recording[]>;
19
+ export declare function deleteRecording(pg: PgAdapterAsync, id: string): Promise<boolean>;
20
+ export declare function searchRecordings(pg: PgAdapterAsync, query: string, filter?: RecordingFilter): Promise<Recording[]>;
21
+ export declare function getRecordingStats(pg: PgAdapterAsync): Promise<{
22
+ total: number;
23
+ raw: number;
24
+ enhanced: number;
25
+ total_duration_ms: number;
26
+ by_model: Record<string, number>;
27
+ }>;
28
+ export declare function registerAgent(pg: PgAdapterAsync, name: string, description?: string | null, role?: string | null): Promise<Agent>;
29
+ export declare function getAgent(pg: PgAdapterAsync, idOrName: string): Promise<Agent | null>;
30
+ export declare function listAgents(pg: PgAdapterAsync): Promise<Agent[]>;
31
+ export declare function heartbeatAgent(pg: PgAdapterAsync, idOrName: string): Promise<Agent | null>;
32
+ export declare function setAgentFocus(pg: PgAdapterAsync, idOrName: string, projectId: string | null): Promise<Agent | null>;
33
+ export declare function registerProject(pg: PgAdapterAsync, name: string, path: string, description?: string | null): Promise<Project>;
34
+ export declare function getProject(pg: PgAdapterAsync, idOrPath: string): Promise<Project | null>;
35
+ export declare function listProjects(pg: PgAdapterAsync): Promise<Project[]>;
36
+ export declare function saveFeedback(pg: PgAdapterAsync, input: {
37
+ message: string;
38
+ email?: string | null;
39
+ category?: string | null;
40
+ version?: string | null;
41
+ }): Promise<{
42
+ saved: true;
43
+ }>;
44
+ //# sourceMappingURL=repo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repo.d.ts","sourceRoot":"","sources":["../../src/server/repo.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,11 @@
1
+ export declare const SECURITY_HEADERS: Record<string, string>;
2
+ export interface StartServerOptions {
3
+ host?: string;
4
+ }
5
+ export declare function buildFetch(): (req: Request, server: {
6
+ requestIP(req: Request): {
7
+ address: string;
8
+ } | null;
9
+ }) => Promise<Response>;
10
+ export declare function startServer(port: number, options?: StartServerOptions): Promise<ReturnType<typeof Bun.serve>>;
11
+ //# sourceMappingURL=serve.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"serve.d.ts","sourceRoot":"","sources":["../../src/server/serve.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,gBAAgB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAKnD,CAAC;AAyCF,MAAM,WAAW,kBAAkB;IACjC,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,wBAAgB,UAAU,KAEtB,KAAK,OAAO,EACZ,QAAQ;IAAE,SAAS,CAAC,GAAG,EAAE,OAAO,GAAG;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAA;CAAE,KAC9D,OAAO,CAAC,QAAQ,CAAC,CAmFrB;AAED,wBAAsB,WAAW,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC,CAqBnH"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Handle a `/v1/*` request. Returns `null` when the path is not a `/v1` route so
3
+ * the caller can fall through to other handlers.
4
+ */
5
+ export declare function handleV1Request(req: Request, url: URL): Promise<Response | null>;
6
+ //# sourceMappingURL=v1.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"v1.d.ts","sourceRoot":"","sources":["../../src/server/v1.ts"],"names":[],"mappings":"AAkCA;;;GAGG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,QAAQ,GAAG,IAAI,CAAC,CAuKtF"}