@hasna/recordings 0.1.21 → 0.1.23
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/LICENSE +170 -191
- package/README.md +9 -12
- package/dist/cli/cloud.d.ts +3 -0
- package/dist/cli/cloud.d.ts.map +1 -0
- package/dist/cli/index.js +5311 -9386
- package/dist/db/cloud-config.d.ts +14 -0
- package/dist/db/cloud-config.d.ts.map +1 -0
- package/dist/db/cloud-sync.d.ts +29 -0
- package/dist/db/cloud-sync.d.ts.map +1 -0
- package/dist/db/database.d.ts +1 -1
- package/dist/db/database.d.ts.map +1 -1
- package/dist/db/pg-migrate.d.ts +8 -0
- package/dist/db/pg-migrate.d.ts.map +1 -0
- package/dist/db/pg-migrations.d.ts.map +1 -1
- package/dist/db/remote-storage.d.ts +12 -0
- package/dist/db/remote-storage.d.ts.map +1 -0
- package/dist/db/sqlite-adapter.d.ts +14 -0
- package/dist/db/sqlite-adapter.d.ts.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +621 -4854
- package/dist/mcp/cloud-tools.d.ts +3 -0
- package/dist/mcp/cloud-tools.d.ts.map +1 -0
- package/dist/mcp/index.d.ts +1 -2
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +2273 -7203
- package/dist/version.d.ts +1 -1
- package/package.json +3 -2
- package/dist/mcp/http.d.ts +0 -12
- package/dist/mcp/http.d.ts.map +0 -1
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type CloudMode = "local" | "hybrid" | "cloud";
|
|
2
|
+
export interface CloudConfig {
|
|
3
|
+
mode: CloudMode;
|
|
4
|
+
rds: {
|
|
5
|
+
host: string;
|
|
6
|
+
port: number;
|
|
7
|
+
username: string;
|
|
8
|
+
password_env: string;
|
|
9
|
+
ssl: boolean;
|
|
10
|
+
};
|
|
11
|
+
}
|
|
12
|
+
export declare function getCloudConfig(): CloudConfig;
|
|
13
|
+
export declare function getConnectionString(dbName?: string): string;
|
|
14
|
+
//# sourceMappingURL=cloud-config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloud-config.d.ts","sourceRoot":"","sources":["../../src/db/cloud-config.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,QAAQ,GAAG,OAAO,CAAC;AAErD,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,SAAS,CAAC;IAChB,GAAG,EAAE;QACH,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,QAAQ,EAAE,MAAM,CAAC;QACjB,YAAY,EAAE,MAAM,CAAC;QACrB,GAAG,EAAE,OAAO,CAAC;KACd,CAAC;CACH;AAgBD,wBAAgB,cAAc,IAAI,WAAW,CAiC5C;AAED,wBAAgB,mBAAmB,CAAC,MAAM,SAAe,GAAG,MAAM,CAiBjE"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { type Database } from "bun:sqlite";
|
|
2
|
+
import { PgAdapterAsync } from "./remote-storage.js";
|
|
3
|
+
export interface SyncResult {
|
|
4
|
+
table: string;
|
|
5
|
+
direction: "push" | "pull";
|
|
6
|
+
rows_read: number;
|
|
7
|
+
rows_written: number;
|
|
8
|
+
errors: string[];
|
|
9
|
+
}
|
|
10
|
+
export interface CloudStatus {
|
|
11
|
+
mode: string;
|
|
12
|
+
enabled: boolean;
|
|
13
|
+
db_path: string;
|
|
14
|
+
tables: Array<{
|
|
15
|
+
table: string;
|
|
16
|
+
rows: number;
|
|
17
|
+
}>;
|
|
18
|
+
}
|
|
19
|
+
export declare function getCloudPg(): Promise<PgAdapterAsync>;
|
|
20
|
+
export declare function runCloudMigrations(remote: PgAdapterAsync): Promise<void>;
|
|
21
|
+
export declare function getCloudStatus(db?: Database): CloudStatus;
|
|
22
|
+
export declare function pushCloudChanges(tables?: string[]): Promise<SyncResult[]>;
|
|
23
|
+
export declare function pullCloudChanges(tables?: string[]): Promise<SyncResult[]>;
|
|
24
|
+
export declare function syncCloudChanges(tables?: string[]): Promise<{
|
|
25
|
+
push: SyncResult[];
|
|
26
|
+
pull: SyncResult[];
|
|
27
|
+
}>;
|
|
28
|
+
export declare function parseCloudTables(raw?: string): string[];
|
|
29
|
+
//# sourceMappingURL=cloud-sync.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cloud-sync.d.ts","sourceRoot":"","sources":["../../src/db/cloud-sync.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,CAAC;AAG3C,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAKrD,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,GAAG,MAAM,CAAC;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,MAAM,EAAE,CAAC;CAClB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChD;AAqFD,wBAAsB,UAAU,IAAI,OAAO,CAAC,cAAc,CAAC,CAE1D;AAED,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAI9E;AAED,wBAAgB,cAAc,CAAC,EAAE,GAAE,QAAwB,GAAG,WAAW,CAexE;AAED,wBAAsB,gBAAgB,CAAC,MAAM,GAAE,MAAM,EAAsB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAuBlG;AAED,wBAAsB,gBAAgB,CAAC,MAAM,GAAE,MAAM,EAAsB,GAAG,OAAO,CAAC,UAAU,EAAE,CAAC,CAuBlG;AAED,wBAAsB,gBAAgB,CAAC,MAAM,GAAE,MAAM,EAAsB,GAAG,OAAO,CAAC;IAAE,IAAI,EAAE,UAAU,EAAE,CAAC;IAAC,IAAI,EAAE,UAAU,EAAE,CAAA;CAAE,CAAC,CAKhI;AAED,wBAAgB,gBAAgB,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAIvD"}
|
package/dist/db/database.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Database } from "bun:sqlite";
|
|
2
|
-
import { SqliteAdapter } from "
|
|
2
|
+
import { SqliteAdapter } from "./sqlite-adapter.js";
|
|
3
3
|
export declare function getDatabase(dbPath?: string): Database;
|
|
4
4
|
export declare function closeDatabase(): void;
|
|
5
5
|
export declare function resetDatabase(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../src/db/database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"database.d.ts","sourceRoot":"","sources":["../../src/db/database.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AA+FpD,wBAAgB,WAAW,CAAC,MAAM,CAAC,EAAE,MAAM,GAAG,QAAQ,CAiBrD;AAsED,wBAAgB,aAAa,IAAI,IAAI,CAMpC;AAED,wBAAgB,aAAa,IAAI,IAAI,CAGpC;AAED,oEAAoE;AACpE,wBAAgB,UAAU,IAAI,aAAa,CAK1C;AAED,wBAAgB,SAAS,IAAI,MAAM,CAElC;AAED,wBAAgB,SAAS,IAAI,MAAM,CAElC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface PgMigrationResult {
|
|
2
|
+
applied: number[];
|
|
3
|
+
alreadyApplied: number[];
|
|
4
|
+
errors: string[];
|
|
5
|
+
totalMigrations: number;
|
|
6
|
+
}
|
|
7
|
+
export declare function applyPgMigrations(connectionString: string): Promise<PgMigrationResult>;
|
|
8
|
+
//# sourceMappingURL=pg-migrate.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pg-migrate.d.ts","sourceRoot":"","sources":["../../src/db/pg-migrate.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED,wBAAsB,iBAAiB,CAAC,gBAAgB,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAyC5F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pg-migrations.d.ts","sourceRoot":"","sources":["../../src/db/pg-migrations.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,aAAa,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"pg-migrations.d.ts","sourceRoot":"","sources":["../../src/db/pg-migrations.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,eAAO,MAAM,aAAa,EAAE,MAAM,EA6EjC,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare class PgAdapterAsync {
|
|
2
|
+
private readonly pool;
|
|
3
|
+
constructor(connectionString: string);
|
|
4
|
+
run(sql: string, ...params: unknown[]): Promise<{
|
|
5
|
+
changes: number;
|
|
6
|
+
}>;
|
|
7
|
+
get(sql: string, ...params: unknown[]): Promise<unknown>;
|
|
8
|
+
all(sql: string, ...params: unknown[]): Promise<unknown[]>;
|
|
9
|
+
exec(sql: string): Promise<void>;
|
|
10
|
+
close(): Promise<void>;
|
|
11
|
+
}
|
|
12
|
+
//# sourceMappingURL=remote-storage.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"remote-storage.d.ts","sourceRoot":"","sources":["../../src/db/remote-storage.ts"],"names":[],"mappings":"AAmBA,qBAAa,cAAc;IACzB,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAO;gBAEhB,gBAAgB,EAAE,MAAM;IAI9B,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAKpE,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC;IAKxD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,OAAO,EAAE,CAAC;IAK1D,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAIhC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;CAG7B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Database } from "bun:sqlite";
|
|
2
|
+
export declare class SqliteAdapter {
|
|
3
|
+
readonly raw: Database;
|
|
4
|
+
constructor(path: string);
|
|
5
|
+
run(sql: string, ...params: unknown[]): {
|
|
6
|
+
changes: number;
|
|
7
|
+
lastInsertRowid: number | bigint;
|
|
8
|
+
};
|
|
9
|
+
get(sql: string, ...params: unknown[]): unknown;
|
|
10
|
+
all(sql: string, ...params: unknown[]): unknown[];
|
|
11
|
+
exec(sql: string): void;
|
|
12
|
+
close(): void;
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=sqlite-adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqlite-adapter.d.ts","sourceRoot":"","sources":["../../src/db/sqlite-adapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC,qBAAa,aAAa;IACxB,QAAQ,CAAC,GAAG,EAAE,QAAQ,CAAC;gBAEX,IAAI,EAAE,MAAM;IAMxB,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,eAAe,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE;IAM7F,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO;IAK/C,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,EAAE;IAKjD,IAAI,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI;IAIvB,KAAK,IAAI,IAAI;CAGd"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
export type { Recording, CreateRecordingInput, RecordingFilter, ProcessingMode, Agent, Project, RecordingsConfig, TranscriptionResult, EnhancementResult, } from "./types/index.js";
|
|
2
2
|
export { RecordingNotFoundError, RecordingError, TranscriptionError, EnhancementError, } from "./types/index.js";
|
|
3
3
|
export { getDatabase, closeDatabase, resetDatabase, getDbPath, shortUuid, } from "./db/database.js";
|
|
4
|
+
export { PgAdapterAsync } from "./db/remote-storage.js";
|
|
5
|
+
export { getCloudConfig, getConnectionString } from "./db/cloud-config.js";
|
|
6
|
+
export { getCloudStatus, pushCloudChanges, pullCloudChanges, syncCloudChanges, parseCloudTables, type CloudStatus, type SyncResult, } from "./db/cloud-sync.js";
|
|
7
|
+
export { applyPgMigrations, type PgMigrationResult } from "./db/pg-migrate.js";
|
|
4
8
|
export { createRecording, getRecording, listRecordings, deleteRecording, searchRecordings, getRecordingStats, } from "./db/recordings.js";
|
|
5
9
|
export { registerAgent, getAgent, listAgents } from "./db/agents.js";
|
|
6
10
|
export { registerProject, getProject, listProjects, } from "./db/projects.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,SAAS,EACT,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,KAAK,EACL,OAAO,EACP,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,WAAW,EACX,aAAa,EACb,aAAa,EACb,SAAS,EACT,SAAS,GACV,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EACV,SAAS,EACT,oBAAoB,EACpB,eAAe,EACf,cAAc,EACd,KAAK,EACL,OAAO,EACP,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,kBAAkB,EAClB,gBAAgB,GACjB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,WAAW,EACX,aAAa,EACb,aAAa,EACb,SAAS,EACT,SAAS,GACV,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAC3E,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,WAAW,EAChB,KAAK,UAAU,GAChB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAG/E,OAAO,EACL,eAAe,EACf,YAAY,EACZ,cAAc,EACd,eAAe,EACf,gBAAgB,EAChB,iBAAiB,GAClB,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,aAAa,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAGrE,OAAO,EACL,eAAe,EACf,UAAU,EACV,YAAY,GACb,MAAM,kBAAkB,CAAC;AAG1B,OAAO,EACL,UAAU,EACV,UAAU,EACV,aAAa,EACb,cAAc,GACf,MAAM,iBAAiB,CAAC;AAGzB,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,WAAW,GACZ,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,gBAAgB,EAChB,WAAW,EACX,WAAW,EACX,sBAAsB,GACvB,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,cAAc,EACd,aAAa,EACb,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,cAAc,GACf,MAAM,mBAAmB,CAAC"}
|