@hasna/recordings 0.1.28 → 0.1.29
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/dist/cli/index.js
CHANGED
|
@@ -5098,7 +5098,7 @@ var init_pg_migrate = __esm(() => {
|
|
|
5098
5098
|
var require_package = __commonJS((exports, module) => {
|
|
5099
5099
|
module.exports = {
|
|
5100
5100
|
name: "@hasna/recordings",
|
|
5101
|
-
version: "0.1.
|
|
5101
|
+
version: "0.1.29",
|
|
5102
5102
|
type: "module",
|
|
5103
5103
|
description: "Speech-to-text recording tool with MCP and CLI \u2014 records, transcribes, and optionally enhances text using AI",
|
|
5104
5104
|
repository: {
|
|
@@ -6081,7 +6081,7 @@ async function processText(rawText, config, systemPrompt) {
|
|
|
6081
6081
|
}
|
|
6082
6082
|
|
|
6083
6083
|
// src/version.ts
|
|
6084
|
-
var VERSION = "0.1.
|
|
6084
|
+
var VERSION = "0.1.29";
|
|
6085
6085
|
|
|
6086
6086
|
// src/cli/storage.ts
|
|
6087
6087
|
import chalk from "chalk";
|
|
@@ -6804,16 +6804,33 @@ appCommand.command("reset-permissions").description("Reset macOS Microphone and
|
|
|
6804
6804
|
console.error(chalk2.red("Permission reset is only available on macOS"));
|
|
6805
6805
|
process.exit(1);
|
|
6806
6806
|
}
|
|
6807
|
-
|
|
6808
|
-
|
|
6809
|
-
|
|
6810
|
-
|
|
6811
|
-
|
|
6812
|
-
|
|
6813
|
-
|
|
6814
|
-
|
|
6815
|
-
|
|
6807
|
+
resetMacOSPermissions();
|
|
6808
|
+
});
|
|
6809
|
+
appCommand.command("request-permissions").description("Open Recordings.app and trigger macOS Microphone and Accessibility permission prompts").option("--reset", "Reset existing Microphone and Accessibility decisions before requesting").action((opts) => {
|
|
6810
|
+
if (process.platform !== "darwin") {
|
|
6811
|
+
console.error(chalk2.red("Permission prompts are only available on macOS"));
|
|
6812
|
+
process.exit(1);
|
|
6813
|
+
}
|
|
6814
|
+
const status = getMacOSAppStatus();
|
|
6815
|
+
if (!status.installed) {
|
|
6816
|
+
console.error(chalk2.red("Recordings.app is not installed. Run: recordings app install"));
|
|
6817
|
+
process.exit(1);
|
|
6816
6818
|
}
|
|
6819
|
+
if (opts.reset) {
|
|
6820
|
+
resetMacOSPermissions();
|
|
6821
|
+
}
|
|
6822
|
+
const result = spawnSync("open", [
|
|
6823
|
+
"-n",
|
|
6824
|
+
status.installed_app_path,
|
|
6825
|
+
"--args",
|
|
6826
|
+
"--request-permissions",
|
|
6827
|
+
"--open-permission-settings"
|
|
6828
|
+
], { stdio: "inherit" });
|
|
6829
|
+
if (result.error) {
|
|
6830
|
+
console.error(chalk2.red(result.error.message));
|
|
6831
|
+
process.exit(1);
|
|
6832
|
+
}
|
|
6833
|
+
process.exit(result.status ?? 1);
|
|
6817
6834
|
});
|
|
6818
6835
|
appCommand.command("log").description("Show the Recordings.app diagnostic log").option("-n, --lines <lines>", "Number of lines to print", "120").action((opts) => {
|
|
6819
6836
|
const status = getMacOSAppStatus();
|
|
@@ -7319,6 +7336,18 @@ function getMacOSAppStatus() {
|
|
|
7319
7336
|
log_path: logPath
|
|
7320
7337
|
};
|
|
7321
7338
|
}
|
|
7339
|
+
function resetMacOSPermissions() {
|
|
7340
|
+
const services = ["Microphone", "Accessibility"];
|
|
7341
|
+
for (const service of services) {
|
|
7342
|
+
const result = spawnSync("tccutil", ["reset", service, "com.hasna.recordings"], {
|
|
7343
|
+
stdio: "inherit"
|
|
7344
|
+
});
|
|
7345
|
+
if (result.error) {
|
|
7346
|
+
console.error(chalk2.red(result.error.message));
|
|
7347
|
+
process.exit(1);
|
|
7348
|
+
}
|
|
7349
|
+
}
|
|
7350
|
+
}
|
|
7322
7351
|
function getCodeSigningInfo(appPath) {
|
|
7323
7352
|
if (process.platform !== "darwin" || !existsSync4(appPath)) {
|
|
7324
7353
|
return { cdHash: null, adHoc: false };
|
package/dist/mcp/index.js
CHANGED
|
@@ -4920,7 +4920,7 @@ var require_lib2 = __commonJS((exports, module) => {
|
|
|
4920
4920
|
var require_package = __commonJS((exports, module) => {
|
|
4921
4921
|
module.exports = {
|
|
4922
4922
|
name: "@hasna/recordings",
|
|
4923
|
-
version: "0.1.
|
|
4923
|
+
version: "0.1.29",
|
|
4924
4924
|
type: "module",
|
|
4925
4925
|
description: "Speech-to-text recording tool with MCP and CLI \u2014 records, transcribes, and optionally enhances text using AI",
|
|
4926
4926
|
repository: {
|
|
@@ -9797,7 +9797,7 @@ async function processText(rawText, config, systemPrompt) {
|
|
|
9797
9797
|
}
|
|
9798
9798
|
|
|
9799
9799
|
// src/version.ts
|
|
9800
|
-
var VERSION = "0.1.
|
|
9800
|
+
var VERSION = "0.1.29";
|
|
9801
9801
|
|
|
9802
9802
|
// src/db/storage-config.ts
|
|
9803
9803
|
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "fs";
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.
|
|
1
|
+
export declare const VERSION = "0.1.29";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
@preconcurrency import Cocoa
|
|
2
|
+
import AVFoundation
|
|
2
3
|
import SwiftUI
|
|
3
4
|
import KeyboardShortcuts
|
|
4
5
|
import RecordingsLib
|
|
@@ -14,6 +15,7 @@ struct RecordingsApp: App {
|
|
|
14
15
|
AXIsProcessTrustedWithOptions(
|
|
15
16
|
[kAXTrustedCheckOptionPrompt.takeUnretainedValue(): true] as CFDictionary
|
|
16
17
|
)
|
|
18
|
+
Self.handlePermissionRequestArguments()
|
|
17
19
|
}
|
|
18
20
|
|
|
19
21
|
var body: some Scene {
|
|
@@ -49,4 +51,29 @@ struct RecordingsApp: App {
|
|
|
49
51
|
app.terminate()
|
|
50
52
|
}
|
|
51
53
|
}
|
|
54
|
+
|
|
55
|
+
private static func handlePermissionRequestArguments() {
|
|
56
|
+
let arguments = CommandLine.arguments
|
|
57
|
+
guard arguments.contains("--request-permissions") else { return }
|
|
58
|
+
|
|
59
|
+
NativeAppLog.write("request-permissions argument received")
|
|
60
|
+
AVCaptureDevice.requestAccess(for: .audio) { granted in
|
|
61
|
+
NativeAppLog.write("request-permissions microphone granted=\(granted)")
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
let trusted = AXIsProcessTrustedWithOptions(
|
|
65
|
+
[kAXTrustedCheckOptionPrompt.takeUnretainedValue(): true] as CFDictionary
|
|
66
|
+
)
|
|
67
|
+
NativeAppLog.write("request-permissions accessibility trusted=\(trusted)")
|
|
68
|
+
|
|
69
|
+
guard arguments.contains("--open-permission-settings") else { return }
|
|
70
|
+
DispatchQueue.main.asyncAfter(deadline: .now() + 0.8) {
|
|
71
|
+
if let microphone = URL(string: "x-apple.systempreferences:com.apple.preference.security?Privacy_Microphone") {
|
|
72
|
+
NSWorkspace.shared.open(microphone)
|
|
73
|
+
}
|
|
74
|
+
if let accessibility = URL(string: "x-apple.systempreferences:com.apple.preference.security?Privacy_Accessibility") {
|
|
75
|
+
NSWorkspace.shared.open(accessibility)
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
52
79
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import Foundation
|
|
2
2
|
|
|
3
|
-
enum NativeAppLog {
|
|
3
|
+
public enum NativeAppLog {
|
|
4
4
|
private static let lock = NSLock()
|
|
5
5
|
|
|
6
|
-
static func write(_ message: String, homePath: String = FileManager.default.homeDirectoryForCurrentUser.path) {
|
|
6
|
+
public static func write(_ message: String, homePath: String = FileManager.default.homeDirectoryForCurrentUser.path) {
|
|
7
7
|
lock.lock()
|
|
8
8
|
defer { lock.unlock() }
|
|
9
9
|
|