@fangyb/ahchat-bridge 0.1.9 → 0.1.10

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 });
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 });
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.10",
4
4
  "files": [
5
5
  "dist"
6
6
  ],