@fangyb/ahchat-bridge 0.1.9 → 0.1.11

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.js CHANGED
@@ -3404,7 +3404,19 @@ ${lines.join("\n")}`;
3404
3404
  break;
3405
3405
  }
3406
3406
  try {
3407
- const cwd = agent.workingDirectory || path7.join(this.workspacesDir, agent.id);
3407
+ let cwd = agent.workingDirectory || path7.join(this.workspacesDir, agent.id);
3408
+ if (agent.workingDirectory) {
3409
+ try {
3410
+ await fs3.mkdir(cwd, { recursive: true });
3411
+ } catch {
3412
+ cwd = path7.join(this.workspacesDir, agent.id);
3413
+ logger7.warn("Stored workingDirectory inaccessible, falling back", {
3414
+ agentId: agent.id,
3415
+ stored: agent.workingDirectory,
3416
+ fallback: cwd
3417
+ });
3418
+ }
3419
+ }
3408
3420
  await this.acquire(agent, { kind: "single" }, cwd);
3409
3421
  warmed++;
3410
3422
  logger7.info("Agent process pre-created for recovery", { agentId: agent.id });
@@ -4637,6 +4649,11 @@ async function startBridge(config) {
4637
4649
  serverApiUrl: config.serverApiUrl,
4638
4650
  claudeConfigDir: config.claudeConfigDir
4639
4651
  });
4652
+ process.stdout.write(`
4653
+ Bridge token (register this machine at Settings \u2192 \u5DF2\u8FDE\u63A5\u7684\u673A\u5668):
4654
+ ${config.bridgeToken}
4655
+
4656
+ `);
4640
4657
  wsMetrics.start(5e3);
4641
4658
  const sessionStore = new SessionStore(config.dataDir);
4642
4659
  const memoryRoot = path11.join(config.dataDir, "agent-memory");
package/dist/index.js CHANGED
@@ -3399,7 +3399,19 @@ ${lines.join("\n")}`;
3399
3399
  break;
3400
3400
  }
3401
3401
  try {
3402
- const cwd = agent.workingDirectory || path7.join(this.workspacesDir, agent.id);
3402
+ let cwd = agent.workingDirectory || path7.join(this.workspacesDir, agent.id);
3403
+ if (agent.workingDirectory) {
3404
+ try {
3405
+ await fs3.mkdir(cwd, { recursive: true });
3406
+ } catch {
3407
+ cwd = path7.join(this.workspacesDir, agent.id);
3408
+ logger7.warn("Stored workingDirectory inaccessible, falling back", {
3409
+ agentId: agent.id,
3410
+ stored: agent.workingDirectory,
3411
+ fallback: cwd
3412
+ });
3413
+ }
3414
+ }
3403
3415
  await this.acquire(agent, { kind: "single" }, cwd);
3404
3416
  warmed++;
3405
3417
  logger7.info("Agent process pre-created for recovery", { agentId: agent.id });
@@ -4632,6 +4644,11 @@ async function startBridge(config) {
4632
4644
  serverApiUrl: config.serverApiUrl,
4633
4645
  claudeConfigDir: config.claudeConfigDir
4634
4646
  });
4647
+ process.stdout.write(`
4648
+ Bridge token (register this machine at Settings \u2192 \u5DF2\u8FDE\u63A5\u7684\u673A\u5668):
4649
+ ${config.bridgeToken}
4650
+
4651
+ `);
4635
4652
  wsMetrics.start(5e3);
4636
4653
  const sessionStore = new SessionStore(config.dataDir);
4637
4654
  const memoryRoot = path11.join(config.dataDir, "agent-memory");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fangyb/ahchat-bridge",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "files": [
5
5
  "dist"
6
6
  ],