@hasna/recordings 0.1.11 → 0.1.13
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/README.md +2 -0
- package/dist/cli/index.js +395 -37
- package/dist/db/database.d.ts.map +1 -1
- package/dist/db/recordings.d.ts.map +1 -1
- package/dist/index.js +78 -11
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/enhancer.d.ts.map +1 -1
- package/dist/lib/recorder.d.ts.map +1 -1
- package/dist/lib/transcriber.d.ts +8 -2
- package/dist/lib/transcriber.d.ts.map +1 -1
- package/dist/mcp/index.js +147 -30
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/version.d.ts +2 -0
- package/dist/version.d.ts.map +1 -0
- package/package.json +20 -3
- package/scripts/install_macos_app.sh +76 -0
- package/src/native/Recordings/{Recordings → App}/RecordingsApp.swift +5 -1
- package/src/native/Recordings/Package.resolved +21 -3
- package/src/native/Recordings/Package.swift +16 -5
- package/src/native/Recordings/{Recordings → RecordingsLib}/Info.plist +6 -0
- package/src/native/Recordings/{Recordings → RecordingsLib}/MenuBarPopover.swift +55 -11
- package/src/native/Recordings/RecordingsLib/NativeAppDiagnostics.swift +36 -0
- package/src/native/Recordings/RecordingsLib/NativePCMRecorder.swift +164 -0
- package/src/native/Recordings/RecordingsLib/OpenAIAPIKeyStore.swift +113 -0
- package/src/native/Recordings/{Recordings → RecordingsLib}/ProjectStore.swift +11 -11
- package/src/native/Recordings/RecordingsLib/RealtimeTranscriptionClient.swift +383 -0
- package/src/native/Recordings/RecordingsLib/RecordingEngine.swift +835 -0
- package/src/native/Recordings/{Recordings → RecordingsLib}/SettingsView.swift +19 -5
- package/src/native/Recordings/{Recordings → RecordingsLib}/VoiceShortcuts.swift +12 -8
- package/src/native/Recordings/RecordingsTests/CLIRunnerTests.swift +63 -0
- package/src/native/Recordings/RecordingsTests/NativeAppDiagnosticsTests.swift +23 -0
- package/src/native/Recordings/RecordingsTests/NativePCMRecorderTests.swift +33 -0
- package/src/native/Recordings/RecordingsTests/OpenAIAPIKeyStoreTests.swift +92 -0
- package/src/native/Recordings/RecordingsTests/ProjectStoreTests.swift +58 -0
- package/src/native/Recordings/RecordingsTests/RealtimeTranscriptionTests.swift +113 -0
- package/src/native/Recordings/build.sh +6 -6
- package/.takumi/settings.local.json +0 -7
- package/bun.lock +0 -250
- package/bunfig.toml +0 -2
- package/src/__tests__/agents.test.ts +0 -136
- package/src/__tests__/config.test.ts +0 -252
- package/src/__tests__/database.test.ts +0 -167
- package/src/__tests__/enhancer.test.ts +0 -639
- package/src/__tests__/preload.ts +0 -4
- package/src/__tests__/projects.test.ts +0 -109
- package/src/__tests__/recorder.test.ts +0 -278
- package/src/__tests__/recordings.test.ts +0 -353
- package/src/__tests__/transcriber.test.ts +0 -322
- package/src/__tests__/types.test.ts +0 -75
- package/src/cli/index.ts +0 -988
- package/src/db/agents.ts +0 -104
- package/src/db/database.ts +0 -163
- package/src/db/pg-migrations.ts +0 -82
- package/src/db/projects.ts +0 -71
- package/src/db/recordings.ts +0 -225
- package/src/index.ts +0 -81
- package/src/lib/config.ts +0 -223
- package/src/lib/enhancer.ts +0 -173
- package/src/lib/recorder.ts +0 -198
- package/src/lib/transcriber.ts +0 -105
- package/src/mcp/index.ts +0 -464
- package/src/native/Recordings/Recordings/RecordingEngine.swift +0 -455
- package/src/native/Recordings/test_fn.swift +0 -79
- package/src/native/Recordings/test_fn2.swift +0 -33
- package/src/types/index.ts +0 -144
- package/tsconfig.json +0 -21
- /package/src/native/Recordings/{Recordings → RecordingsLib}/FnKeyMonitor.swift +0 -0
- /package/src/native/Recordings/{Recordings → RecordingsLib}/Recordings.entitlements +0 -0
package/src/types/index.ts
DELETED
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
// ── Recording Types ──────────────────────────────────────────────────────────
|
|
2
|
-
|
|
3
|
-
export interface Recording {
|
|
4
|
-
id: string;
|
|
5
|
-
audio_path: string | null;
|
|
6
|
-
raw_text: string;
|
|
7
|
-
processed_text: string | null;
|
|
8
|
-
processing_mode: ProcessingMode;
|
|
9
|
-
model_used: string;
|
|
10
|
-
enhancement_model: string | null;
|
|
11
|
-
duration_ms: number;
|
|
12
|
-
language: string | null;
|
|
13
|
-
tags: string[];
|
|
14
|
-
agent_id: string | null;
|
|
15
|
-
project_id: string | null;
|
|
16
|
-
session_id: string | null;
|
|
17
|
-
goal: string | null;
|
|
18
|
-
role: string | null;
|
|
19
|
-
task_list_id: string | null;
|
|
20
|
-
metadata: Record<string, unknown>;
|
|
21
|
-
created_at: string;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
export type ProcessingMode = "raw" | "enhanced";
|
|
25
|
-
|
|
26
|
-
export interface CreateRecordingInput {
|
|
27
|
-
audio_path?: string;
|
|
28
|
-
raw_text: string;
|
|
29
|
-
processed_text?: string;
|
|
30
|
-
processing_mode?: ProcessingMode;
|
|
31
|
-
model_used?: string;
|
|
32
|
-
enhancement_model?: string;
|
|
33
|
-
duration_ms?: number;
|
|
34
|
-
language?: string;
|
|
35
|
-
tags?: string[];
|
|
36
|
-
agent_id?: string;
|
|
37
|
-
project_id?: string;
|
|
38
|
-
session_id?: string;
|
|
39
|
-
goal?: string;
|
|
40
|
-
role?: string;
|
|
41
|
-
task_list_id?: string;
|
|
42
|
-
metadata?: Record<string, unknown>;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
export interface RecordingFilter {
|
|
46
|
-
agent_id?: string;
|
|
47
|
-
project_id?: string;
|
|
48
|
-
session_id?: string;
|
|
49
|
-
processing_mode?: ProcessingMode;
|
|
50
|
-
tags?: string[];
|
|
51
|
-
search?: string;
|
|
52
|
-
since?: string;
|
|
53
|
-
until?: string;
|
|
54
|
-
limit?: number;
|
|
55
|
-
offset?: number;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
// ── Agent Types ─────────────────────────────────────────────────────────────
|
|
59
|
-
|
|
60
|
-
export interface Agent {
|
|
61
|
-
id: string;
|
|
62
|
-
name: string;
|
|
63
|
-
description: string | null;
|
|
64
|
-
role: string;
|
|
65
|
-
metadata: Record<string, unknown>;
|
|
66
|
-
created_at: string;
|
|
67
|
-
last_seen_at: string;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
// ── Project Types ───────────────────────────────────────────────────────────
|
|
71
|
-
|
|
72
|
-
export interface Project {
|
|
73
|
-
id: string;
|
|
74
|
-
name: string;
|
|
75
|
-
path: string;
|
|
76
|
-
description: string | null;
|
|
77
|
-
created_at: string;
|
|
78
|
-
updated_at: string;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
// ── Config Types ────────────────────────────────────────────────────────────
|
|
82
|
-
|
|
83
|
-
export interface RecordingsConfig {
|
|
84
|
-
openai_api_key: string;
|
|
85
|
-
enhancement_api_key: string;
|
|
86
|
-
transcription_model: string;
|
|
87
|
-
enhancement_model: string;
|
|
88
|
-
language: string;
|
|
89
|
-
audio_format: "wav" | "mp3" | "m4a" | "webm";
|
|
90
|
-
sample_rate: number;
|
|
91
|
-
record_command: string;
|
|
92
|
-
hotkey: string;
|
|
93
|
-
auto_enhance: boolean;
|
|
94
|
-
enhance_triggers: string[];
|
|
95
|
-
db_path: string;
|
|
96
|
-
audio_dir: string;
|
|
97
|
-
max_recording_seconds: number;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// ── Transcription Types ─────────────────────────────────────────────────────
|
|
101
|
-
|
|
102
|
-
export interface TranscriptionResult {
|
|
103
|
-
text: string;
|
|
104
|
-
duration_ms: number;
|
|
105
|
-
model: string;
|
|
106
|
-
language: string | null;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
export interface EnhancementResult {
|
|
110
|
-
original: string;
|
|
111
|
-
enhanced: string;
|
|
112
|
-
model: string;
|
|
113
|
-
reasoning: string | null;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
// ── Errors ──────────────────────────────────────────────────────────────────
|
|
117
|
-
|
|
118
|
-
export class RecordingNotFoundError extends Error {
|
|
119
|
-
constructor(id: string) {
|
|
120
|
-
super(`Recording not found: ${id}`);
|
|
121
|
-
this.name = "RecordingNotFoundError";
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
export class RecordingError extends Error {
|
|
126
|
-
constructor(message: string) {
|
|
127
|
-
super(message);
|
|
128
|
-
this.name = "RecordingError";
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export class TranscriptionError extends Error {
|
|
133
|
-
constructor(message: string) {
|
|
134
|
-
super(message);
|
|
135
|
-
this.name = "TranscriptionError";
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
export class EnhancementError extends Error {
|
|
140
|
-
constructor(message: string) {
|
|
141
|
-
super(message);
|
|
142
|
-
this.name = "EnhancementError";
|
|
143
|
-
}
|
|
144
|
-
}
|
package/tsconfig.json
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"compilerOptions": {
|
|
3
|
-
"target": "ESNext",
|
|
4
|
-
"module": "ESNext",
|
|
5
|
-
"moduleResolution": "bundler",
|
|
6
|
-
"declaration": true,
|
|
7
|
-
"declarationMap": true,
|
|
8
|
-
"sourceMap": true,
|
|
9
|
-
"outDir": "dist",
|
|
10
|
-
"rootDir": "src",
|
|
11
|
-
"strict": true,
|
|
12
|
-
"esModuleInterop": true,
|
|
13
|
-
"skipLibCheck": true,
|
|
14
|
-
"forceConsistentCasingInFileNames": true,
|
|
15
|
-
"resolveJsonModule": true,
|
|
16
|
-
"isolatedModules": true,
|
|
17
|
-
"types": ["bun"]
|
|
18
|
-
},
|
|
19
|
-
"include": ["src/**/*.ts"],
|
|
20
|
-
"exclude": ["node_modules", "dist", "**/*.test.ts"]
|
|
21
|
-
}
|
|
File without changes
|
|
File without changes
|