@hasna/recordings 0.0.3 → 0.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.
- package/LICENSE +191 -21
- package/README.md +145 -0
- package/dist/index.js +30815 -0
- package/dist/index.js.map +272 -0
- package/package.json +44 -35
- package/scripts/postinstall.ts +80 -0
- package/.claude/scheduled_tasks.lock +0 -1
- package/dist/cli/index.js +0 -1446
- package/dist/mcp/index.js +0 -4882
- 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 -574
- 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 -1078
- package/src/db/agents.ts +0 -81
- package/src/db/database.ts +0 -126
- package/src/db/projects.ts +0 -71
- package/src/db/recordings.ts +0 -219
- package/src/index.ts +0 -81
- package/src/lib/config.ts +0 -166
- package/src/lib/enhancer.ts +0 -167
- package/src/lib/recorder.ts +0 -198
- package/src/lib/transcriber.ts +0 -105
- package/src/mcp/index.ts +0 -405
- package/src/native/RecordingsHelper.swift +0 -352
- package/src/types/index.ts +0 -138
- package/tsconfig.json +0 -21
package/package.json
CHANGED
|
@@ -1,46 +1,55 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/recordings",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Local AI-powered voice recording & transcription — record, transcribe, polish, search",
|
|
4
5
|
"type": "module",
|
|
5
|
-
"description": "Speech-to-text recording tool with MCP and CLI — records, transcribes, and optionally enhances text using AI",
|
|
6
|
-
"main": "dist/index.js",
|
|
7
|
-
"types": "dist/index.d.ts",
|
|
8
6
|
"bin": {
|
|
9
|
-
"recordings": "dist/
|
|
10
|
-
"recordings-mcp": "dist/mcp/index.js"
|
|
11
|
-
},
|
|
12
|
-
"exports": {
|
|
13
|
-
".": {
|
|
14
|
-
"import": "./dist/index.js",
|
|
15
|
-
"types": "./dist/index.d.ts"
|
|
16
|
-
}
|
|
7
|
+
"recordings": "dist/index.js"
|
|
17
8
|
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"scripts",
|
|
12
|
+
"README.md",
|
|
13
|
+
"LICENSE"
|
|
14
|
+
],
|
|
18
15
|
"scripts": {
|
|
19
|
-
"
|
|
20
|
-
"
|
|
21
|
-
"
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"
|
|
26
|
-
"dev:cli": "bun run src/cli/index.ts",
|
|
27
|
-
"dev:mcp": "bun run src/mcp/index.ts"
|
|
28
|
-
},
|
|
29
|
-
"dependencies": {
|
|
30
|
-
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
31
|
-
"chalk": "^5.4.1",
|
|
32
|
-
"commander": "^13.1.0",
|
|
33
|
-
"openai": "^5.1.0",
|
|
34
|
-
"zod": "^3.24.2"
|
|
35
|
-
},
|
|
36
|
-
"devDependencies": {
|
|
37
|
-
"@types/bun": "^1.2.5",
|
|
38
|
-
"typescript": "^5.8.2"
|
|
16
|
+
"postinstall": "bun run scripts/postinstall.ts",
|
|
17
|
+
"dev": "bun run dev:api & bun run dev:web",
|
|
18
|
+
"dev:api": "bun run packages/api-server/src/index.ts",
|
|
19
|
+
"dev:web": "cd apps/web && bun run dev",
|
|
20
|
+
"mcp": "bun run packages/mcp-server/src/index.ts",
|
|
21
|
+
"build": "bun run build.ts",
|
|
22
|
+
"prepublishOnly": "bun run build"
|
|
39
23
|
},
|
|
40
24
|
"publishConfig": {
|
|
41
|
-
"access": "
|
|
25
|
+
"access": "public",
|
|
42
26
|
"registry": "https://registry.npmjs.org/"
|
|
43
27
|
},
|
|
44
|
-
"
|
|
45
|
-
|
|
28
|
+
"engines": {
|
|
29
|
+
"bun": ">=1.3.9"
|
|
30
|
+
},
|
|
31
|
+
"author": "Hasna",
|
|
32
|
+
"license": "Apache-2.0",
|
|
33
|
+
"keywords": [
|
|
34
|
+
"recordings",
|
|
35
|
+
"transcription",
|
|
36
|
+
"voice",
|
|
37
|
+
"openai",
|
|
38
|
+
"whisper",
|
|
39
|
+
"mcp",
|
|
40
|
+
"cli",
|
|
41
|
+
"bun"
|
|
42
|
+
],
|
|
43
|
+
"repository": {
|
|
44
|
+
"type": "git",
|
|
45
|
+
"url": "git+https://github.com/hasna/recordings.git"
|
|
46
|
+
},
|
|
47
|
+
"bugs": {
|
|
48
|
+
"url": "https://github.com/hasna/recordings/issues"
|
|
49
|
+
},
|
|
50
|
+
"homepage": "https://github.com/hasna/recordings#readme",
|
|
51
|
+
"workspaces": [
|
|
52
|
+
"apps/*",
|
|
53
|
+
"packages/*"
|
|
54
|
+
]
|
|
46
55
|
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
#!/usr/bin/env bun
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Post-install script: checks for and installs system dependencies.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { execSync } from "child_process";
|
|
8
|
+
|
|
9
|
+
const DEPS: { name: string; check: string; install: Record<string, string> }[] = [
|
|
10
|
+
{
|
|
11
|
+
name: "sox",
|
|
12
|
+
check: "sox --version",
|
|
13
|
+
install: {
|
|
14
|
+
darwin: "brew install sox",
|
|
15
|
+
linux_apt: "sudo apt-get install -y sox",
|
|
16
|
+
linux_dnf: "sudo dnf install -y sox",
|
|
17
|
+
linux_pacman: "sudo pacman -S --noconfirm sox",
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
];
|
|
21
|
+
|
|
22
|
+
function which(cmd: string): boolean {
|
|
23
|
+
try {
|
|
24
|
+
execSync(`which ${cmd}`, { stdio: "ignore" });
|
|
25
|
+
return true;
|
|
26
|
+
} catch {
|
|
27
|
+
return false;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function getPackageManager(): string | null {
|
|
32
|
+
if (process.platform === "darwin") {
|
|
33
|
+
if (which("brew")) return "darwin";
|
|
34
|
+
}
|
|
35
|
+
if (process.platform === "linux") {
|
|
36
|
+
if (which("apt-get")) return "linux_apt";
|
|
37
|
+
if (which("dnf")) return "linux_dnf";
|
|
38
|
+
if (which("pacman")) return "linux_pacman";
|
|
39
|
+
}
|
|
40
|
+
return null;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function run(cmd: string): boolean {
|
|
44
|
+
try {
|
|
45
|
+
execSync(cmd, { stdio: "inherit" });
|
|
46
|
+
return true;
|
|
47
|
+
} catch {
|
|
48
|
+
return false;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const pm = getPackageManager();
|
|
53
|
+
let allGood = true;
|
|
54
|
+
|
|
55
|
+
for (const dep of DEPS) {
|
|
56
|
+
if (which(dep.name)) {
|
|
57
|
+
console.log(` ✓ ${dep.name} already installed`);
|
|
58
|
+
continue;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
if (!pm || !dep.install[pm]) {
|
|
62
|
+
console.warn(` ✗ ${dep.name} is missing. Install it manually:`);
|
|
63
|
+
console.warn(` macOS: brew install ${dep.name}`);
|
|
64
|
+
console.warn(` Ubuntu: sudo apt-get install ${dep.name}`);
|
|
65
|
+
allGood = false;
|
|
66
|
+
continue;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
console.log(` → Installing ${dep.name}...`);
|
|
70
|
+
if (run(dep.install[pm])) {
|
|
71
|
+
console.log(` ✓ ${dep.name} installed`);
|
|
72
|
+
} else {
|
|
73
|
+
console.warn(` ✗ Failed to install ${dep.name}. Install manually: ${dep.install[pm]}`);
|
|
74
|
+
allGood = false;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (allGood) {
|
|
79
|
+
console.log(" All system dependencies are ready.");
|
|
80
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"sessionId":"26ed30ef-ff55-4957-91cc-40a82f829ca0","pid":85889,"acquiredAt":1773261929948}
|