@annals/agent-mesh 0.13.0 → 0.13.1

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.
Files changed (2) hide show
  1. package/dist/index.js +27 -8
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -555,8 +555,14 @@ var AgentAdapter = class {
555
555
  };
556
556
 
557
557
  // src/utils/client-workspace.ts
558
- import { mkdirSync, readdirSync, symlinkSync, existsSync } from "fs";
558
+ import { mkdirSync, readdirSync, symlinkSync, existsSync, lstatSync } from "fs";
559
559
  import { join, relative } from "path";
560
+ var SYMLINK_ALLOW = /* @__PURE__ */ new Set([
561
+ "CLAUDE.md",
562
+ ".claude",
563
+ ".agents",
564
+ "src"
565
+ ]);
560
566
  var SYMLINK_EXCLUDE = /* @__PURE__ */ new Set([
561
567
  ".bridge-clients",
562
568
  ".git",
@@ -567,20 +573,31 @@ var SYMLINK_EXCLUDE = /* @__PURE__ */ new Set([
567
573
  "build",
568
574
  "coverage",
569
575
  ".turbo",
570
- ".env"
576
+ ".env",
577
+ "connect.log",
578
+ "skills",
579
+ "skills-lock.json"
571
580
  ]);
572
- function shouldExclude(name) {
573
- return SYMLINK_EXCLUDE.has(name) || name.startsWith(".env.");
581
+ function shouldInclude(name) {
582
+ if (SYMLINK_ALLOW.has(name)) return true;
583
+ if (SYMLINK_EXCLUDE.has(name) || name.startsWith(".env.")) return false;
584
+ if (!name.startsWith(".")) return true;
585
+ return false;
574
586
  }
575
587
  function createClientWorkspace(projectPath, clientId) {
576
588
  const wsDir = join(projectPath, ".bridge-clients", clientId);
577
- if (existsSync(wsDir)) return wsDir;
589
+ const isNew = !existsSync(wsDir);
578
590
  mkdirSync(wsDir, { recursive: true });
579
591
  const entries = readdirSync(projectPath, { withFileTypes: true });
580
592
  for (const entry of entries) {
581
- if (shouldExclude(entry.name)) continue;
582
- const target = join(projectPath, entry.name);
593
+ if (!shouldInclude(entry.name)) continue;
583
594
  const link = join(wsDir, entry.name);
595
+ try {
596
+ lstatSync(link);
597
+ continue;
598
+ } catch {
599
+ }
600
+ const target = join(projectPath, entry.name);
584
601
  const relTarget = relative(wsDir, target);
585
602
  try {
586
603
  symlinkSync(relTarget, link);
@@ -588,7 +605,9 @@ function createClientWorkspace(projectPath, clientId) {
588
605
  log.warn(`Failed to create symlink ${link} \u2192 ${relTarget}: ${err}`);
589
606
  }
590
607
  }
591
- log.info(`Client workspace created: ${wsDir}`);
608
+ if (isNew) {
609
+ log.info(`Client workspace created: ${wsDir}`);
610
+ }
592
611
  return wsDir;
593
612
  }
594
613
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@annals/agent-mesh",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "description": "CLI bridge connecting local AI agents to the Agents.Hot platform",
5
5
  "type": "module",
6
6
  "bin": {