@agenticmail/claudecode 0.2.11 → 0.2.13

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.
@@ -6,7 +6,7 @@ import {
6
6
  } from "./chunk-GMYSDT2Y.js";
7
7
  import {
8
8
  install
9
- } from "./chunk-LKY2L2RR.js";
9
+ } from "./chunk-F33EJZII.js";
10
10
  import {
11
11
  AgenticMailApiError
12
12
  } from "./chunk-UI556UPF.js";
@@ -12,6 +12,7 @@ import {
12
12
  listAccounts,
13
13
  renderSubagentMarkdown,
14
14
  resolveConfig,
15
+ setAccountHost,
15
16
  setAccountRole
16
17
  } from "./chunk-UI556UPF.js";
17
18
 
@@ -45,9 +46,17 @@ function buildMcpEntry(cfg, bridgeKey, accountKeys) {
45
46
  };
46
47
  }
47
48
  function selectExposableAgents(accounts, cfg) {
48
- return accounts.filter(
49
- (a) => a.name.toLowerCase() !== cfg.bridgeAgentName.toLowerCase() && a.role !== "bridge"
50
- );
49
+ const ownHost = cfg.bridgeAgentName.toLowerCase();
50
+ return accounts.filter((a) => {
51
+ if (a.name.toLowerCase() === ownHost) return false;
52
+ if (a.role === "bridge") return false;
53
+ const meta = a.metadata;
54
+ if (meta && meta.bridge === true) return false;
55
+ const host = meta && typeof meta.host === "string" ? meta.host.trim() : "";
56
+ if (!host) return false;
57
+ if (host.toLowerCase() !== ownHost) return false;
58
+ return true;
59
+ });
51
60
  }
52
61
  function isOwnedSubagent(filepath) {
53
62
  try {
@@ -113,6 +122,17 @@ async function install(opts = {}) {
113
122
  } catch {
114
123
  }
115
124
  }
125
+ const bridgeHost = bridge.metadata?.host;
126
+ if (typeof bridgeHost !== "string" || bridgeHost.toLowerCase() !== cfg.bridgeAgentName.toLowerCase()) {
127
+ try {
128
+ await setAccountHost(cfg.apiUrl, cfg.masterKey, bridge.id, cfg.bridgeAgentName);
129
+ bridge = {
130
+ ...bridge,
131
+ metadata: { ...bridge.metadata ?? {}, host: cfg.bridgeAgentName }
132
+ };
133
+ } catch {
134
+ }
135
+ }
116
136
  const everyAccount = await listAccounts(cfg.apiUrl, cfg.masterKey);
117
137
  const exposable = selectExposableAgents(everyAccount, cfg);
118
138
  const accountKeys = {};
package/dist/cli.js CHANGED
@@ -12,7 +12,7 @@ import {
12
12
  } from "./chunk-GMYSDT2Y.js";
13
13
  import {
14
14
  install
15
- } from "./chunk-LKY2L2RR.js";
15
+ } from "./chunk-F33EJZII.js";
16
16
  import "./chunk-LO5EQSQA.js";
17
17
  import "./chunk-US5FT2UB.js";
18
18
  import {
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  createIntegrationRoutes
3
- } from "./chunk-LD3W7MUC.js";
3
+ } from "./chunk-AXZGWR4M.js";
4
4
  import "./chunk-XI7P3WSC.js";
5
5
  import "./chunk-GMYSDT2Y.js";
6
- import "./chunk-LKY2L2RR.js";
6
+ import "./chunk-F33EJZII.js";
7
7
  import "./chunk-LO5EQSQA.js";
8
8
  import "./chunk-US5FT2UB.js";
9
9
  import "./chunk-UI556UPF.js";
package/dist/index.js CHANGED
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-VAEQFJDW.js";
10
10
  import {
11
11
  createIntegrationRoutes
12
- } from "./chunk-LD3W7MUC.js";
12
+ } from "./chunk-AXZGWR4M.js";
13
13
  import {
14
14
  status
15
15
  } from "./chunk-XI7P3WSC.js";
@@ -18,7 +18,7 @@ import {
18
18
  } from "./chunk-GMYSDT2Y.js";
19
19
  import {
20
20
  install
21
- } from "./chunk-LKY2L2RR.js";
21
+ } from "./chunk-F33EJZII.js";
22
22
  import "./chunk-LO5EQSQA.js";
23
23
  import "./chunk-US5FT2UB.js";
24
24
  import {
package/dist/install.d.ts CHANGED
@@ -30,11 +30,23 @@ import { R as ResolveConfigOptions, I as InstallResult, A as AgenticMailAccount,
30
30
  /**
31
31
  * Decide which AgenticMail agents to surface as Claude Code subagents.
32
32
  *
33
+ * Strict ownership: an account is exposed ONLY if `metadata.host` equals
34
+ * this host's bridge name. The host's roster is its own — never inherited.
35
+ *
33
36
  * Filters out:
34
37
  * - the bridge agent itself (Claude Code's own identity — calling yourself
35
38
  * is silly and would also create a duplicate-name collision in the
36
39
  * subagent_type namespace)
37
40
  * - any account with role="bridge" (reserved for hosts like this one)
41
+ * - any account flagged `metadata.bridge === true` (legacy marker from
42
+ * pre-0.9.3 installs where the 'bridge' role didn't exist yet)
43
+ * - any account owned by a DIFFERENT host (`metadata.host` set and not
44
+ * matching this host's bridge name)
45
+ * - any UNCLAIMED account (no `metadata.host` value at all). Pre-0.9.20
46
+ * accounts that predate auto-tagging are unclaimed by default; the
47
+ * user must run `agenticmail-<host> claim <name>` (or `claim --all`)
48
+ * to transfer them. This keeps a fresh `agenticmail-codex install`
49
+ * from inheriting an already-running Claude Code roster.
38
50
  */
39
51
  declare function selectExposableAgents(accounts: AgenticMailAccount[], cfg: ClaudeCodeIntegrationConfig): AgenticMailAccount[];
40
52
  /**
package/dist/install.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  install,
3
3
  selectExposableAgents
4
- } from "./chunk-LKY2L2RR.js";
4
+ } from "./chunk-F33EJZII.js";
5
5
  import "./chunk-LO5EQSQA.js";
6
6
  import "./chunk-US5FT2UB.js";
7
7
  import "./chunk-UI556UPF.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/claudecode",
3
- "version": "0.2.11",
3
+ "version": "0.2.13",
4
4
  "description": "Claude Code integration for AgenticMail — surfaces every AgenticMail agent as a native Claude Code subagent so any Claude Code session can delegate to them with the Agent tool",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",