@agenticmail/claudecode 0.2.11 → 0.2.12

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.
@@ -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
+ if (meta && typeof meta.host === "string" && meta.host.trim().length > 0) {
56
+ if (meta.host.toLowerCase() !== ownHost) return false;
57
+ }
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 = {};
@@ -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-XRJIYEJ4.js";
10
10
  import {
11
11
  AgenticMailApiError
12
12
  } from "./chunk-UI556UPF.js";
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-XRJIYEJ4.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-Z7BJIB44.js";
4
4
  import "./chunk-XI7P3WSC.js";
5
5
  import "./chunk-GMYSDT2Y.js";
6
- import "./chunk-LKY2L2RR.js";
6
+ import "./chunk-XRJIYEJ4.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-Z7BJIB44.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-XRJIYEJ4.js";
22
22
  import "./chunk-LO5EQSQA.js";
23
23
  import "./chunk-US5FT2UB.js";
24
24
  import {
package/dist/install.d.ts CHANGED
@@ -35,6 +35,14 @@ import { R as ResolveConfigOptions, I as InstallResult, A as AgenticMailAccount,
35
35
  * is silly and would also create a duplicate-name collision in the
36
36
  * subagent_type namespace)
37
37
  * - any account with role="bridge" (reserved for hosts like this one)
38
+ * - any account flagged `metadata.bridge === true` (legacy marker from
39
+ * pre-0.9.3 installs where the 'bridge' role didn't exist yet)
40
+ * - any account owned by a DIFFERENT host (`metadata.host` set and not
41
+ * matching this host's bridge name) — prevents a Codex install from
42
+ * exposing Claude's bridge as a Claude Code subagent, and vice-versa
43
+ *
44
+ * Unclaimed accounts (no host stamp) stay visible to every host for
45
+ * backwards compatibility with legacy installs.
38
46
  */
39
47
  declare function selectExposableAgents(accounts: AgenticMailAccount[], cfg: ClaudeCodeIntegrationConfig): AgenticMailAccount[];
40
48
  /**
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-XRJIYEJ4.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.12",
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",