@agenticmail/claudecode 0.2.9 → 0.2.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.
@@ -4,7 +4,7 @@ import {
4
4
  listPendingTasksForAgent,
5
5
  renderPersonaBody,
6
6
  resolveConfig
7
- } from "./chunk-4VQP57SO.js";
7
+ } from "./chunk-WTAITYZR.js";
8
8
 
9
9
  // src/persona-loader.ts
10
10
  import { existsSync, readFileSync } from "fs";
@@ -840,6 +840,9 @@ var Dispatcher = class {
840
840
  const bridgeName = this.cfg.bridgeAgentName.toLowerCase();
841
841
  if (account.name.toLowerCase() === bridgeName) return false;
842
842
  if (account.role === "bridge") return false;
843
+ const meta = account.metadata;
844
+ if (meta && meta.bridge === true) return false;
845
+ if (meta && typeof meta.host === "string" && meta.host.length > 0) return false;
843
846
  return true;
844
847
  }
845
848
  /** Re-fetch /accounts; open SSE for new ones, close for vanished ones. */
@@ -10,7 +10,7 @@ import {
10
10
  deleteAccount,
11
11
  getAccountByName,
12
12
  resolveConfig
13
- } from "./chunk-4VQP57SO.js";
13
+ } from "./chunk-WTAITYZR.js";
14
14
 
15
15
  // src/uninstall.ts
16
16
  import { existsSync, readdirSync, readFileSync, unlinkSync } from "fs";
@@ -7,7 +7,7 @@ import {
7
7
  MANAGED_BY_MARKER,
8
8
  getAccountByName,
9
9
  resolveConfig
10
- } from "./chunk-4VQP57SO.js";
10
+ } from "./chunk-WTAITYZR.js";
11
11
 
12
12
  // src/status.ts
13
13
  import { existsSync, readFileSync, readdirSync } from "fs";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  status
3
- } from "./chunk-Q5BA2J2C.js";
3
+ } from "./chunk-KB2EHQW7.js";
4
4
  import {
5
5
  uninstall
6
- } from "./chunk-2RVJ2Q3W.js";
6
+ } from "./chunk-BIP2TBJ5.js";
7
7
  import {
8
8
  install
9
- } from "./chunk-OUYPF4ER.js";
9
+ } from "./chunk-TSLDSGOD.js";
10
10
  import {
11
11
  AgenticMailApiError
12
- } from "./chunk-4VQP57SO.js";
12
+ } from "./chunk-WTAITYZR.js";
13
13
 
14
14
  // src/http-routes.ts
15
15
  import { Router } from "express";
@@ -11,8 +11,9 @@ import {
11
11
  ensureAccount,
12
12
  listAccounts,
13
13
  renderSubagentMarkdown,
14
- resolveConfig
15
- } from "./chunk-4VQP57SO.js";
14
+ resolveConfig,
15
+ setAccountRole
16
+ } from "./chunk-WTAITYZR.js";
16
17
 
17
18
  // src/install.ts
18
19
  import { existsSync, mkdirSync, readdirSync, writeFileSync, readFileSync, unlinkSync } from "fs";
@@ -98,7 +99,14 @@ async function install(opts = {}) {
98
99
  "AgenticMail master key not found. Run `agenticmail setup` first to generate one, or pass { masterKey } to install() explicitly."
99
100
  );
100
101
  }
101
- const bridge = await ensureAccount(cfg.apiUrl, cfg.masterKey, cfg.bridgeAgentName, "assistant");
102
+ let bridge = await ensureAccount(cfg.apiUrl, cfg.masterKey, cfg.bridgeAgentName, "bridge");
103
+ if (bridge.role && bridge.role !== "bridge") {
104
+ try {
105
+ await setAccountRole(cfg.apiUrl, cfg.masterKey, bridge.id, "bridge");
106
+ bridge = { ...bridge, role: "bridge" };
107
+ } catch {
108
+ }
109
+ }
102
110
  const everyAccount = await listAccounts(cfg.apiUrl, cfg.masterKey);
103
111
  const exposable = selectExposableAgents(everyAccount, cfg);
104
112
  const accountKeys = {};
@@ -82,6 +82,15 @@ async function ensureAccount(apiUrl, masterKey, name, role = "assistant") {
82
82
  async function deleteAccount(apiUrl, masterKey, id) {
83
83
  await request(apiUrl, masterKey, `/accounts/${encodeURIComponent(id)}`, { method: "DELETE" });
84
84
  }
85
+ async function setAccountRole(apiUrl, masterKey, id, role) {
86
+ const updated = await request(
87
+ apiUrl,
88
+ masterKey,
89
+ `/accounts/${encodeURIComponent(id)}/role`,
90
+ { method: "PATCH", body: { role } }
91
+ );
92
+ return updated ?? { role };
93
+ }
85
94
  async function listInboxForAgent(apiUrl, agentApiKey, opts = {}) {
86
95
  const limit = Math.max(1, Math.min(opts.limit ?? 50, 100));
87
96
  const url = `${apiUrl.replace(/\/$/, "")}/api/agenticmail/mail/inbox?limit=${limit}`;
@@ -282,6 +291,7 @@ export {
282
291
  getAccountByName,
283
292
  ensureAccount,
284
293
  deleteAccount,
294
+ setAccountRole,
285
295
  listInboxForAgent,
286
296
  listPendingTasksForAgent,
287
297
  resolveConfig,
package/dist/cli.js CHANGED
@@ -6,18 +6,18 @@ import {
6
6
  } from "./chunk-B5JDOV32.js";
7
7
  import {
8
8
  status
9
- } from "./chunk-Q5BA2J2C.js";
9
+ } from "./chunk-KB2EHQW7.js";
10
10
  import {
11
11
  uninstall
12
- } from "./chunk-2RVJ2Q3W.js";
12
+ } from "./chunk-BIP2TBJ5.js";
13
13
  import {
14
14
  install
15
- } from "./chunk-OUYPF4ER.js";
15
+ } from "./chunk-TSLDSGOD.js";
16
16
  import "./chunk-LO5EQSQA.js";
17
17
  import "./chunk-US5FT2UB.js";
18
18
  import {
19
19
  AgenticMailApiError
20
- } from "./chunk-4VQP57SO.js";
20
+ } from "./chunk-WTAITYZR.js";
21
21
 
22
22
  // src/cli.ts
23
23
  var GREEN = (s) => `\x1B[32m${s}\x1B[0m`;
@@ -4,8 +4,8 @@ import {
4
4
  } from "./chunk-B5JDOV32.js";
5
5
  import {
6
6
  Dispatcher
7
- } from "./chunk-LVYWYEFG.js";
8
- import "./chunk-4VQP57SO.js";
7
+ } from "./chunk-APRMWXZB.js";
8
+ import "./chunk-WTAITYZR.js";
9
9
 
10
10
  // src/dispatcher-bin.ts
11
11
  async function main() {
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  Dispatcher
3
- } from "./chunk-LVYWYEFG.js";
4
- import "./chunk-4VQP57SO.js";
3
+ } from "./chunk-APRMWXZB.js";
4
+ import "./chunk-WTAITYZR.js";
5
5
  export {
6
6
  Dispatcher
7
7
  };
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  createIntegrationRoutes
3
- } from "./chunk-UARFA4NI.js";
4
- import "./chunk-Q5BA2J2C.js";
5
- import "./chunk-2RVJ2Q3W.js";
6
- import "./chunk-OUYPF4ER.js";
3
+ } from "./chunk-THUNXHMQ.js";
4
+ import "./chunk-KB2EHQW7.js";
5
+ import "./chunk-BIP2TBJ5.js";
6
+ import "./chunk-TSLDSGOD.js";
7
7
  import "./chunk-LO5EQSQA.js";
8
8
  import "./chunk-US5FT2UB.js";
9
- import "./chunk-4VQP57SO.js";
9
+ import "./chunk-WTAITYZR.js";
10
10
  export {
11
11
  createIntegrationRoutes
12
12
  };
package/dist/index.js CHANGED
@@ -6,19 +6,19 @@ import {
6
6
  import {
7
7
  Dispatcher,
8
8
  loadPersonaForAgent
9
- } from "./chunk-LVYWYEFG.js";
9
+ } from "./chunk-APRMWXZB.js";
10
10
  import {
11
11
  createIntegrationRoutes
12
- } from "./chunk-UARFA4NI.js";
12
+ } from "./chunk-THUNXHMQ.js";
13
13
  import {
14
14
  status
15
- } from "./chunk-Q5BA2J2C.js";
15
+ } from "./chunk-KB2EHQW7.js";
16
16
  import {
17
17
  uninstall
18
- } from "./chunk-2RVJ2Q3W.js";
18
+ } from "./chunk-BIP2TBJ5.js";
19
19
  import {
20
20
  install
21
- } from "./chunk-OUYPF4ER.js";
21
+ } from "./chunk-TSLDSGOD.js";
22
22
  import "./chunk-LO5EQSQA.js";
23
23
  import "./chunk-US5FT2UB.js";
24
24
  import {
@@ -32,7 +32,7 @@ import {
32
32
  renderPersonaBody,
33
33
  renderSubagentMarkdown,
34
34
  resolveConfig
35
- } from "./chunk-4VQP57SO.js";
35
+ } from "./chunk-WTAITYZR.js";
36
36
  export {
37
37
  AgenticMailApiError,
38
38
  Dispatcher,
package/dist/install.js CHANGED
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  install,
3
3
  selectExposableAgents
4
- } from "./chunk-OUYPF4ER.js";
4
+ } from "./chunk-TSLDSGOD.js";
5
5
  import "./chunk-LO5EQSQA.js";
6
6
  import "./chunk-US5FT2UB.js";
7
- import "./chunk-4VQP57SO.js";
7
+ import "./chunk-WTAITYZR.js";
8
8
  export {
9
9
  install,
10
10
  selectExposableAgents
package/dist/status.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  status
3
- } from "./chunk-Q5BA2J2C.js";
3
+ } from "./chunk-KB2EHQW7.js";
4
4
  import "./chunk-US5FT2UB.js";
5
- import "./chunk-4VQP57SO.js";
5
+ import "./chunk-WTAITYZR.js";
6
6
  export {
7
7
  status
8
8
  };
package/dist/uninstall.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  uninstall
3
- } from "./chunk-2RVJ2Q3W.js";
3
+ } from "./chunk-BIP2TBJ5.js";
4
4
  import "./chunk-LO5EQSQA.js";
5
5
  import "./chunk-US5FT2UB.js";
6
- import "./chunk-4VQP57SO.js";
6
+ import "./chunk-WTAITYZR.js";
7
7
  export {
8
8
  uninstall
9
9
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agenticmail/claudecode",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
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",
@@ -47,7 +47,7 @@
47
47
  "prepublishOnly": "npm run build"
48
48
  },
49
49
  "dependencies": {
50
- "@agenticmail/core": "^0.9.2",
50
+ "@agenticmail/core": "^0.9.3",
51
51
  "@agenticmail/mcp": "^0.9.2",
52
52
  "@anthropic-ai/claude-agent-sdk": "^0.2.140"
53
53
  },