@fangyb/ahchat-bridge 0.1.14 → 0.1.15
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.cjs +9 -6
- package/dist/index.js +3 -0
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -51140,6 +51140,7 @@ async function syncClaudeCredentialsToNodeAccessibleDir(agentConfigDir) {
|
|
|
51140
51140
|
await fs15.copyFile(src, dest);
|
|
51141
51141
|
logger28.info("Synced credential file", { file: file2, from: src, to: dest });
|
|
51142
51142
|
} catch {
|
|
51143
|
+
logger28.debug("Credential file not present, skipping", { file: file2, src });
|
|
51143
51144
|
}
|
|
51144
51145
|
}
|
|
51145
51146
|
}
|
|
@@ -51148,6 +51149,7 @@ async function chownRecursive(dirPath, uid, gid) {
|
|
|
51148
51149
|
try {
|
|
51149
51150
|
await fs15.chown(dirPath, uid, gid);
|
|
51150
51151
|
} catch {
|
|
51152
|
+
logger28.debug("chown skipped", { dirPath, uid, gid });
|
|
51151
51153
|
}
|
|
51152
51154
|
let entries;
|
|
51153
51155
|
try {
|
|
@@ -51163,6 +51165,7 @@ async function chownRecursive(dirPath, uid, gid) {
|
|
|
51163
51165
|
try {
|
|
51164
51166
|
await fs15.chown(fullPath, uid, gid);
|
|
51165
51167
|
} catch {
|
|
51168
|
+
logger28.debug("chown skipped", { fullPath, uid, gid });
|
|
51166
51169
|
}
|
|
51167
51170
|
}
|
|
51168
51171
|
}
|
|
@@ -51845,7 +51848,7 @@ cli.command("run", "Start the bridge and connect to server").option("--server-ur
|
|
|
51845
51848
|
cli.command("launch", "Launch bridge from ahchat:// URL (called by OS)").option("--url <url>", "ahchat:// URL with server and token params").action((args) => {
|
|
51846
51849
|
const parsed = parseAhchatUrl(args.url);
|
|
51847
51850
|
if (!parsed) {
|
|
51848
|
-
|
|
51851
|
+
logger30.error("Invalid ahchat:// URL received; cannot launch bridge");
|
|
51849
51852
|
process.exit(1);
|
|
51850
51853
|
}
|
|
51851
51854
|
void run({ serverUrl: parsed.serverUrl, token: parsed.token }).catch((e7) => {
|
|
@@ -51855,17 +51858,17 @@ cli.command("launch", "Launch bridge from ahchat:// URL (called by OS)").option(
|
|
|
51855
51858
|
});
|
|
51856
51859
|
cli.command("install", "Register ahchat:// protocol handler (one-time setup)").action(() => {
|
|
51857
51860
|
registerProtocolHandler();
|
|
51858
|
-
|
|
51859
|
-
|
|
51861
|
+
process.stdout.write("ahchat:// protocol handler registered successfully.\n");
|
|
51862
|
+
process.stdout.write("You can now launch the bridge from your browser with one click.\n");
|
|
51860
51863
|
});
|
|
51861
51864
|
cli.command("uninstall", "Remove ahchat:// protocol handler").action(() => {
|
|
51862
51865
|
unregisterProtocolHandler();
|
|
51863
|
-
|
|
51866
|
+
process.stdout.write("ahchat:// protocol handler removed.\n");
|
|
51864
51867
|
});
|
|
51865
51868
|
cli.command("status", "Check if protocol handler is registered").action(() => {
|
|
51866
51869
|
const registered = isProtocolRegistered();
|
|
51867
|
-
|
|
51868
|
-
if (!registered)
|
|
51870
|
+
process.stdout.write(registered ? "ahchat:// protocol is registered.\n" : "ahchat:// protocol is NOT registered.\n");
|
|
51871
|
+
if (!registered) process.stdout.write('Run "npx @fangyb/ahchat-bridge install" to register it.\n');
|
|
51869
51872
|
});
|
|
51870
51873
|
cli.help();
|
|
51871
51874
|
cli.version("0.1.0");
|
package/dist/index.js
CHANGED
|
@@ -50316,6 +50316,7 @@ async function syncClaudeCredentialsToNodeAccessibleDir(agentConfigDir) {
|
|
|
50316
50316
|
await fs14.copyFile(src, dest);
|
|
50317
50317
|
logger28.info("Synced credential file", { file: file2, from: src, to: dest });
|
|
50318
50318
|
} catch {
|
|
50319
|
+
logger28.debug("Credential file not present, skipping", { file: file2, src });
|
|
50319
50320
|
}
|
|
50320
50321
|
}
|
|
50321
50322
|
}
|
|
@@ -50324,6 +50325,7 @@ async function chownRecursive(dirPath, uid, gid) {
|
|
|
50324
50325
|
try {
|
|
50325
50326
|
await fs14.chown(dirPath, uid, gid);
|
|
50326
50327
|
} catch {
|
|
50328
|
+
logger28.debug("chown skipped", { dirPath, uid, gid });
|
|
50327
50329
|
}
|
|
50328
50330
|
let entries;
|
|
50329
50331
|
try {
|
|
@@ -50339,6 +50341,7 @@ async function chownRecursive(dirPath, uid, gid) {
|
|
|
50339
50341
|
try {
|
|
50340
50342
|
await fs14.chown(fullPath, uid, gid);
|
|
50341
50343
|
} catch {
|
|
50344
|
+
logger28.debug("chown skipped", { fullPath, uid, gid });
|
|
50342
50345
|
}
|
|
50343
50346
|
}
|
|
50344
50347
|
}
|