@band-ai/sdk 0.3.3 → 0.4.0

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 (97) hide show
  1. package/README.md +54 -1
  2. package/dist/{ClaudeSDKAdapter-CXud2DBE.d.ts → CopilotACPAdapter-BCpbHFB0.d.ts} +240 -19
  3. package/dist/{ClaudeSDKAdapter-Cx6zhSaG.d.cts → CopilotACPAdapter-D4VWg8lJ.d.cts} +240 -19
  4. package/dist/{opencode-2YdscIc1.d.cts → acp-client-D-I_5lK-.d.cts} +23 -4
  5. package/dist/{opencode-Bld62x5t.d.ts → acp-client-DUXyczlF.d.ts} +23 -4
  6. package/dist/acp-server-BlcYMxKt.d.ts +17 -0
  7. package/dist/acp-server-CJhclo6P.d.cts +17 -0
  8. package/dist/adapters.cjs +2217 -973
  9. package/dist/adapters.d.cts +21 -132
  10. package/dist/adapters.d.ts +21 -132
  11. package/dist/adapters.js +26 -1914
  12. package/dist/{backends-D-dBdDm-.d.ts → backends-CgsPQa9B.d.ts} +2 -2
  13. package/dist/{backends-ZLxmQrTZ.d.cts → backends-Dh2WXcHQ.d.cts} +2 -2
  14. package/dist/{chunk-JY75VSQK.js → chunk-4OVNFDD7.js} +14 -1
  15. package/dist/chunk-6BE2EG5P.js +128 -0
  16. package/dist/{chunk-U6AFCLYZ.js → chunk-6TGXV5TE.js} +1824 -514
  17. package/dist/{chunk-OH6VVVKT.js → chunk-CBCHTTUY.js} +10 -0
  18. package/dist/{chunk-K5KAEYPF.js → chunk-HNWZZXAE.js} +288 -120
  19. package/dist/chunk-I34SXMTJ.js +6 -0
  20. package/dist/{chunk-XWHWJP4I.js → chunk-JDW5WSGF.js} +2 -2
  21. package/dist/{chunk-KXJ74J73.js → chunk-JIZE4EC6.js} +4 -10
  22. package/dist/chunk-OGOXY43L.js +119 -0
  23. package/dist/{chunk-W5IAI6Z4.js → chunk-OVXVZUPO.js} +5 -5
  24. package/dist/{chunk-YJ42AZO4.js → chunk-RJNJUISR.js} +5 -2
  25. package/dist/{chunk-MQY74R7D.js → chunk-SHZBLLDQ.js} +21 -9
  26. package/dist/{chunk-JADCAMZY.js → chunk-TGDDFBYS.js} +45 -0
  27. package/dist/{chunk-US226AS4.js → chunk-UENIC5FJ.js} +14 -11
  28. package/dist/{chunk-WA7CHXUS.js → chunk-UL3Y5C4J.js} +2 -2
  29. package/dist/{chunk-WL2HNJZ6.js → chunk-VOMJRQOM.js} +3 -3
  30. package/dist/{chunk-MQBBWYRP.js → chunk-YF7K4UB3.js} +3352 -572
  31. package/dist/{chunk-OD2G5LFQ.js → chunk-ZYOXI4JL.js} +41 -2
  32. package/dist/config.cjs +2 -12
  33. package/dist/config.js +2 -2
  34. package/dist/converters.cjs +36 -11
  35. package/dist/converters.d.cts +7 -5
  36. package/dist/converters.d.ts +7 -5
  37. package/dist/converters.js +11 -13
  38. package/dist/core.cjs +239 -5
  39. package/dist/core.d.cts +71 -6
  40. package/dist/core.d.ts +71 -6
  41. package/dist/core.js +31 -6
  42. package/dist/{customTools-BzF0IISO.d.cts → customTools-Bfecd0mJ.d.cts} +1 -1
  43. package/dist/{customTools-BzF0IISO.d.ts → customTools-Bfecd0mJ.d.ts} +1 -1
  44. package/dist/{disconnectReason-IuADl6TH.d.ts → disconnectReason-Cctmg1SN.d.cts} +1 -1
  45. package/dist/{disconnectReason-IuADl6TH.d.cts → disconnectReason-Cctmg1SN.d.ts} +1 -1
  46. package/dist/{dtos-B8KU_q4d.d.ts → dtos-CjQsN1_h.d.cts} +5 -12
  47. package/dist/{dtos-B8KU_q4d.d.cts → dtos-CjQsN1_h.d.ts} +5 -12
  48. package/dist/index.cjs +5237 -1474
  49. package/dist/index.d.cts +61 -22
  50. package/dist/index.d.ts +61 -22
  51. package/dist/index.js +151 -43
  52. package/dist/linear.cjs +45 -7
  53. package/dist/linear.d.cts +4 -3
  54. package/dist/linear.d.ts +4 -3
  55. package/dist/linear.js +10 -10
  56. package/dist/mcp-claude.cjs +11 -6
  57. package/dist/mcp-claude.d.cts +4 -3
  58. package/dist/mcp-claude.d.ts +4 -3
  59. package/dist/mcp-claude.js +4 -5
  60. package/dist/mcp.cjs +13 -7
  61. package/dist/mcp.d.cts +6 -5
  62. package/dist/mcp.d.ts +6 -5
  63. package/dist/mcp.js +5 -6
  64. package/dist/{pagination-DqdkQArT.d.cts → pagination-BZDhB_nO.d.cts} +2 -2
  65. package/dist/{pagination-BgEx-HeL.d.ts → pagination-CPz0J_vQ.d.ts} +2 -2
  66. package/dist/{protocols-Bz1rxcUg.d.cts → protocols-CabgO52c.d.cts} +38 -3
  67. package/dist/{protocols-Bwwcql0h.d.ts → protocols-Dpci6uae.d.ts} +38 -3
  68. package/dist/rest.cjs +43 -1
  69. package/dist/rest.d.cts +6 -5
  70. package/dist/rest.d.ts +6 -5
  71. package/dist/rest.js +6 -5
  72. package/dist/runtime.cjs +2113 -597
  73. package/dist/runtime.d.cts +44 -25
  74. package/dist/runtime.d.ts +44 -25
  75. package/dist/runtime.js +11 -11
  76. package/dist/{schemas-BgJhlqqO.d.cts → schemas-BKnh4fKR.d.cts} +209 -24
  77. package/dist/{schemas-C4mK1WSs.d.ts → schemas-CDa3V_I5.d.ts} +209 -24
  78. package/dist/{sdk-BTciSLRQ.d.cts → sdk-CXNqzoY1.d.cts} +1 -1
  79. package/dist/{sdk-qKJtMma_.d.ts → sdk-Cin80BTC.d.ts} +1 -1
  80. package/dist/{simpleAdapter-BpT4XbZC.d.cts → simpleAdapter-D75rcz9n.d.cts} +3 -1
  81. package/dist/{simpleAdapter--wznuoOw.d.ts → simpleAdapter-eLvsAQNo.d.ts} +3 -1
  82. package/dist/testing.cjs +25 -7
  83. package/dist/testing.d.cts +5 -3
  84. package/dist/testing.d.ts +5 -3
  85. package/dist/testing.js +9 -6
  86. package/dist/{types-BivGO7I9.d.ts → types-42-HWeX8.d.cts} +10 -4
  87. package/dist/types-CKU1N0SK.d.ts +137 -0
  88. package/dist/{types-BgYFd_Yw.d.cts → types-CjxZekMH.d.ts} +10 -4
  89. package/dist/types-DtcOLALn.d.cts +137 -0
  90. package/package.json +25 -26
  91. package/dist/acp-server-CiUqN3G3.d.ts +0 -24
  92. package/dist/acp-server-Dlj7D563.d.cts +0 -24
  93. package/dist/chunk-AVVDPXP4.js +0 -39
  94. package/dist/chunk-F63TPOI3.js +0 -29
  95. package/dist/chunk-V5TSWS7P.js +0 -62
  96. package/dist/types-BNNtOXu3.d.cts +0 -446
  97. package/dist/types-DFUtpxah.d.ts +0 -446
package/dist/index.d.cts CHANGED
@@ -1,25 +1,27 @@
1
- import { F as FrameworkAdapter } from './protocols-Bz1rxcUg.cjs';
2
- export { A as AdapterToolsProtocol, a as AgentToolsProtocol, C as ContactTools, b as FrameworkAdapterInput, H as HistoryConverter, M as MemoryTools, c as MessagingTools, P as ParticipantTools, d as PeerLookupTools, e as Preprocessor, R as RoomParticipantTools, T as ToolExecutor, f as ToolSchemaProvider } from './protocols-Bz1rxcUg.cjs';
1
+ import { F as FrameworkAdapter } from './protocols-CabgO52c.cjs';
2
+ export { A as AdapterToolsProtocol, b as AgentToolsProtocol, C as ContactTools, c as FAILURE_EVENT_TYPE, d as FAILURE_METADATA_KEY, a as FrameworkAdapterInput, H as HistoryConverter, M as MemoryTools, e as MessagingTools, f as ParticipantTools, g as PeerLookupTools, h as Preprocessor, R as RoomParticipantTools, T as ToolExecutor, i as ToolSchemaProvider, t as toFailureEvent } from './protocols-CabgO52c.cjs';
3
3
  import { AgentCredentials } from './config.cjs';
4
4
  export { AgentConfigResult, LoadAgentConfigFromEnvOptions, loadAgentConfig, loadAgentConfigFromEnv } from './config.cjs';
5
- import { P as PlatformRuntime, a as PlatformRuntimeOptions } from './schemas-BgJhlqqO.cjs';
6
- export { A as AgentRuntime, B as BandLink, D as DefaultPreprocessor, E as ExecutionContextOptions, M as MCP_SERVER_NAME, b as MCP_TOOL_PREFIX, T as TOOL_MODELS, d as deriveDefaultRestUrl } from './schemas-BgJhlqqO.cjs';
7
- import { P as PlatformMessage } from './types-BNNtOXu3.cjs';
8
- export { A as AgentConfig, a as AgentInput, C as ContactEvent, b as ContactEventCallback, c as ContactEventConfig, d as ContactEventStrategy, e as ConversationContext, H as HistoryProvider, M as MessageHandler, f as PlatformEvent, S as SessionConfig } from './types-BNNtOXu3.cjs';
9
- export { W as WebSocketConflictPolicy, a as WebSocketDisconnectError, b as WebSocketDisconnectReason } from './disconnectReason-IuADl6TH.cjs';
10
- export { C as CustomToolDef } from './customTools-BzF0IISO.cjs';
11
- export { A as A2AAdapter, a as A2AAdapterOptions, b as A2AGatewayAdapter, c as AnthropicAdapter, d as AnthropicAdapterOptions, C as CODEX_REASONING_EFFORTS, e as CODEX_REASONING_SUMMARIES, f as CODEX_WEB_SEARCH_MODES, g as ClaudePermissionMode, h as ClaudeSDKAdapter, i as ClaudeSDKAdapterOptions, j as CodexAdapter, k as CodexAdapterConfig, l as CodexApprovalPolicy, m as CodexReasoningEffort, n as CodexReasoningSummary, o as CodexSandboxMode, p as CodexWebSearchMode, G as GeminiAdapter, q as GeminiAdapterOptions, r as GenericAdapter, s as GenericAdapterHandler, t as GoogleADKAdapter, u as GoogleADKAdapterOptions, L as LangGraphAdapter, v as LangGraphAdapterOptions, w as LangGraphGraph, x as LettaAdapter, y as LettaAdapterOptions, O as OpenAIAdapter, z as OpenAIAdapterOptions, B as OpencodeAdapter, D as OpencodeAdapterConfig, E as OpencodeApprovalMode, F as OpencodeApprovalReply, H as OpencodeQuestionMode, P as ParlantAdapter, I as ParlantAdapterOptions, T as ToolCallingModel, V as VercelAISDKAdapter, J as VercelAISDKAdapterOptions } from './ClaudeSDKAdapter-Cx6zhSaG.cjs';
12
- export { S as SimpleAdapter } from './simpleAdapter-BpT4XbZC.cjs';
13
- export { A as A2AAuth, a as A2AGatewayAdapterOptions } from './opencode-2YdscIc1.cjs';
14
- import './dtos-B8KU_q4d.cjs';
15
- import './logger-CABQOnlR.cjs';
16
- import './types-BgYFd_Yw.cjs';
17
- import './pagination-DqdkQArT.cjs';
18
- import '@band-ai/band-sdk-core';
5
+ import { L as Logger } from './logger-CABQOnlR.cjs';
6
+ import { P as PlatformRuntime, a as PlatformRuntimeOptions, R as RuntimeLifecycleState } from './schemas-BKnh4fKR.cjs';
7
+ export { A as AgentRuntime, B as BandLink, D as DefaultPreprocessor, E as ExecutionContextOptions, b as ExecutionLifecycleState, M as MCP_SERVER_NAME, c as MCP_TOOL_PREFIX, T as TOOL_MODELS, d as deriveDefaultRestUrl } from './schemas-BKnh4fKR.cjs';
8
+ import { P as PlatformMessage } from './types-DtcOLALn.cjs';
9
+ export { A as AgentConfig, a as AgentInput, C as ContactEvent, b as ContactEventCallback, c as ContactEventConfig, d as ContactEventStrategy, e as ConversationContext, H as HistoryProvider, M as MessageHandler, f as PlatformEvent, R as ReconnectedEvent, S as SessionConfig } from './types-DtcOLALn.cjs';
10
+ export { W as WebSocketConflictPolicy, a as WebSocketDisconnectError, b as WebSocketDisconnectReason } from './disconnectReason-Cctmg1SN.cjs';
11
+ export { C as CustomToolDef } from './customTools-Bfecd0mJ.cjs';
12
+ export { A as A2AAdapter, a as A2AAdapterOptions, b as A2AGatewayAdapter, c as ACPClientAdapter, d as ACPClientAdapterBaseOptions, e as ACPClientAdapterOptions, f as ACPClientStdioOptions, g as ACPClientTcpOptions, h as AnthropicAdapter, i as AnthropicAdapterOptions, C as CODEX_REASONING_EFFORTS, j as CODEX_REASONING_SUMMARIES, k as CODEX_WEB_SEARCH_MODES, l as ClaudePermissionMode, m as ClaudeSDKAdapter, n as ClaudeSDKAdapterOptions, o as CodexAdapter, p as CodexAdapterConfig, q as CodexApprovalPolicy, r as CodexReasoningEffort, s as CodexReasoningSummary, t as CodexSandboxMode, u as CodexWebSearchMode, v as CopilotACPAdapter, w as CopilotACPAdapterOptions, x as CopilotACPStdioOptions, y as CopilotACPTcpOptions, D as DEFAULT_COPILOT_ACP_COMMAND, z as DEFAULT_OMP_ACP_COMMAND, G as GeminiAdapter, B as GeminiAdapterOptions, E as GenericAdapter, F as GenericAdapterHandler, H as GoogleADKAdapter, I as GoogleADKAdapterOptions, L as LangGraphAdapter, J as LangGraphAdapterOptions, K as LangGraphGraph, M as LettaAdapter, N as LettaAdapterOptions, O as OmpACPAdapter, P as OmpACPAdapterOptions, Q as OpenAIAdapter, R as OpenAIAdapterOptions, S as OpencodeAdapter, T as OpencodeAdapterConfig, U as OpencodeApprovalMode, V as OpencodeApprovalReply, W as OpencodeQuestionMode, X as ParlantAdapter, Y as ParlantAdapterOptions, Z as ToolCallingModel, _ as VercelAISDKAdapter, $ as VercelAISDKAdapterOptions } from './CopilotACPAdapter-D4VWg8lJ.cjs';
13
+ export { S as SimpleAdapter } from './simpleAdapter-D75rcz9n.cjs';
14
+ export { A as A2AAuth, a as A2AGatewayAdapterOptions } from './acp-client-D-I_5lK-.cjs';
15
+ export { AgentFailure } from '@band-ai/band-sdk-core';
16
+ export { DeliveryFailedError, ProviderTurnFailedError, RecoverableTurnError, agentFailure, deliverReply, reportTurnFailure } from './core.cjs';
17
+ import './dtos-CjQsN1_h.cjs';
18
+ import './types-42-HWeX8.cjs';
19
+ import './pagination-BZDhB_nO.cjs';
19
20
  import 'zod';
20
- import './backends-ZLxmQrTZ.cjs';
21
- import './sdk-BTciSLRQ.cjs';
21
+ import './backends-Dh2WXcHQ.cjs';
22
+ import './sdk-CXNqzoY1.cjs';
22
23
  import '@anthropic-ai/claude-agent-sdk';
24
+ import '@agentclientprotocol/sdk';
23
25
 
24
26
  interface AgentCreateOptions extends Omit<PlatformRuntimeOptions, "agentId" | "apiKey" | "wsUrl" | "restUrl"> {
25
27
  adapter: FrameworkAdapter;
@@ -39,16 +41,53 @@ interface AgentCreateOptions extends Omit<PlatformRuntimeOptions, "agentId" | "a
39
41
  declare class Agent {
40
42
  private readonly platformRuntime;
41
43
  private readonly adapter;
42
- private started;
43
- private startPromise;
44
+ private readonly lifecycle;
45
+ private readonly logger;
46
+ private readonly startGate;
47
+ private readonly stopGate;
44
48
  private shutdownTimeoutMs;
45
- constructor(runtime: PlatformRuntime, adapter: FrameworkAdapter);
49
+ constructor(runtime: PlatformRuntime, adapter: FrameworkAdapter, logger?: Logger);
46
50
  /** Build an Agent from credentials and a framework adapter. */
47
51
  static create(options: AgentCreateOptions): Agent;
52
+ /**
53
+ * Whether the agent is currently started.
54
+ *
55
+ * `false` while a `start()` call is still in flight — it only turns `true`
56
+ * once that call has resolved — and `false` again once the agent is stopped.
57
+ *
58
+ * @deprecated Read {@link Agent.state} instead, which also distinguishes
59
+ * `"starting"`, `"stopping"` and `"failed"` from a plain `"not_started"`.
60
+ */
48
61
  get isRunning(): boolean;
62
+ /** Current lifecycle state of this agent. */
63
+ get state(): RuntimeLifecycleState;
64
+ /**
65
+ * The underlying `PlatformRuntime`, for reading its `link`/`getContext()`/etc.
66
+ *
67
+ * Do not call `runtime.start()`/`runtime.stop()` directly: `Agent` keeps its
68
+ * own lifecycle tracker, so driving `PlatformRuntime`'s independently leaves
69
+ * `agent.state` reporting stale information. Use {@link Agent.start}/
70
+ * {@link Agent.stop} instead.
71
+ */
49
72
  get runtime(): PlatformRuntime;
73
+ /**
74
+ * Start the agent.
75
+ *
76
+ * Repeated or concurrent calls join the in-flight start. Calling `start()`
77
+ * while a `stop()` is still in flight rejects with a `RuntimeStateError`.
78
+ */
50
79
  start(): Promise<void>;
80
+ private runStart;
81
+ /**
82
+ * Stop the agent.
83
+ *
84
+ * A concurrent second call joins the in-flight teardown and mirrors its
85
+ * outcome — including rejecting with the *same* `Error` instance. A rejected
86
+ * `stop()` is not treated as a completed one: the next `stop()` reports the
87
+ * same failure, and a `start()` re-arms teardown.
88
+ */
51
89
  stop(timeoutMs?: number | null): Promise<boolean>;
90
+ private runStop;
52
91
  runForever(): Promise<void>;
53
92
  bootstrapRoomMessage(roomId: string, message: PlatformMessage): Promise<void>;
54
93
  resetRoomSession(roomId: string, timeoutMs?: number): Promise<boolean>;
@@ -62,4 +101,4 @@ declare class Agent {
62
101
 
63
102
  declare function isDirectExecution(importMetaUrl: string): boolean;
64
103
 
65
- export { Agent, type AgentCreateOptions, AgentCredentials, FrameworkAdapter, PlatformMessage, PlatformRuntime, PlatformRuntimeOptions, isDirectExecution };
104
+ export { Agent, type AgentCreateOptions, AgentCredentials, FrameworkAdapter, PlatformMessage, PlatformRuntime, PlatformRuntimeOptions, RuntimeLifecycleState, isDirectExecution };
package/dist/index.d.ts CHANGED
@@ -1,25 +1,27 @@
1
- import { F as FrameworkAdapter } from './protocols-Bwwcql0h.js';
2
- export { A as AdapterToolsProtocol, a as AgentToolsProtocol, C as ContactTools, b as FrameworkAdapterInput, H as HistoryConverter, M as MemoryTools, c as MessagingTools, P as ParticipantTools, d as PeerLookupTools, e as Preprocessor, R as RoomParticipantTools, T as ToolExecutor, f as ToolSchemaProvider } from './protocols-Bwwcql0h.js';
1
+ import { F as FrameworkAdapter } from './protocols-Dpci6uae.js';
2
+ export { A as AdapterToolsProtocol, b as AgentToolsProtocol, C as ContactTools, c as FAILURE_EVENT_TYPE, d as FAILURE_METADATA_KEY, a as FrameworkAdapterInput, H as HistoryConverter, M as MemoryTools, e as MessagingTools, f as ParticipantTools, g as PeerLookupTools, h as Preprocessor, R as RoomParticipantTools, T as ToolExecutor, i as ToolSchemaProvider, t as toFailureEvent } from './protocols-Dpci6uae.js';
3
3
  import { AgentCredentials } from './config.js';
4
4
  export { AgentConfigResult, LoadAgentConfigFromEnvOptions, loadAgentConfig, loadAgentConfigFromEnv } from './config.js';
5
- import { P as PlatformRuntime, a as PlatformRuntimeOptions } from './schemas-C4mK1WSs.js';
6
- export { A as AgentRuntime, B as BandLink, D as DefaultPreprocessor, E as ExecutionContextOptions, M as MCP_SERVER_NAME, b as MCP_TOOL_PREFIX, T as TOOL_MODELS, d as deriveDefaultRestUrl } from './schemas-C4mK1WSs.js';
7
- import { P as PlatformMessage } from './types-DFUtpxah.js';
8
- export { A as AgentConfig, a as AgentInput, C as ContactEvent, b as ContactEventCallback, c as ContactEventConfig, d as ContactEventStrategy, e as ConversationContext, H as HistoryProvider, M as MessageHandler, f as PlatformEvent, S as SessionConfig } from './types-DFUtpxah.js';
9
- export { W as WebSocketConflictPolicy, a as WebSocketDisconnectError, b as WebSocketDisconnectReason } from './disconnectReason-IuADl6TH.js';
10
- export { C as CustomToolDef } from './customTools-BzF0IISO.js';
11
- export { A as A2AAdapter, a as A2AAdapterOptions, b as A2AGatewayAdapter, c as AnthropicAdapter, d as AnthropicAdapterOptions, C as CODEX_REASONING_EFFORTS, e as CODEX_REASONING_SUMMARIES, f as CODEX_WEB_SEARCH_MODES, g as ClaudePermissionMode, h as ClaudeSDKAdapter, i as ClaudeSDKAdapterOptions, j as CodexAdapter, k as CodexAdapterConfig, l as CodexApprovalPolicy, m as CodexReasoningEffort, n as CodexReasoningSummary, o as CodexSandboxMode, p as CodexWebSearchMode, G as GeminiAdapter, q as GeminiAdapterOptions, r as GenericAdapter, s as GenericAdapterHandler, t as GoogleADKAdapter, u as GoogleADKAdapterOptions, L as LangGraphAdapter, v as LangGraphAdapterOptions, w as LangGraphGraph, x as LettaAdapter, y as LettaAdapterOptions, O as OpenAIAdapter, z as OpenAIAdapterOptions, B as OpencodeAdapter, D as OpencodeAdapterConfig, E as OpencodeApprovalMode, F as OpencodeApprovalReply, H as OpencodeQuestionMode, P as ParlantAdapter, I as ParlantAdapterOptions, T as ToolCallingModel, V as VercelAISDKAdapter, J as VercelAISDKAdapterOptions } from './ClaudeSDKAdapter-CXud2DBE.js';
12
- export { S as SimpleAdapter } from './simpleAdapter--wznuoOw.js';
13
- export { A as A2AAuth, a as A2AGatewayAdapterOptions } from './opencode-Bld62x5t.js';
14
- import './dtos-B8KU_q4d.js';
15
- import './logger-CABQOnlR.js';
16
- import './types-BivGO7I9.js';
17
- import './pagination-BgEx-HeL.js';
18
- import '@band-ai/band-sdk-core';
5
+ import { L as Logger } from './logger-CABQOnlR.js';
6
+ import { P as PlatformRuntime, a as PlatformRuntimeOptions, R as RuntimeLifecycleState } from './schemas-CDa3V_I5.js';
7
+ export { A as AgentRuntime, B as BandLink, D as DefaultPreprocessor, E as ExecutionContextOptions, b as ExecutionLifecycleState, M as MCP_SERVER_NAME, c as MCP_TOOL_PREFIX, T as TOOL_MODELS, d as deriveDefaultRestUrl } from './schemas-CDa3V_I5.js';
8
+ import { P as PlatformMessage } from './types-CKU1N0SK.js';
9
+ export { A as AgentConfig, a as AgentInput, C as ContactEvent, b as ContactEventCallback, c as ContactEventConfig, d as ContactEventStrategy, e as ConversationContext, H as HistoryProvider, M as MessageHandler, f as PlatformEvent, R as ReconnectedEvent, S as SessionConfig } from './types-CKU1N0SK.js';
10
+ export { W as WebSocketConflictPolicy, a as WebSocketDisconnectError, b as WebSocketDisconnectReason } from './disconnectReason-Cctmg1SN.js';
11
+ export { C as CustomToolDef } from './customTools-Bfecd0mJ.js';
12
+ export { A as A2AAdapter, a as A2AAdapterOptions, b as A2AGatewayAdapter, c as ACPClientAdapter, d as ACPClientAdapterBaseOptions, e as ACPClientAdapterOptions, f as ACPClientStdioOptions, g as ACPClientTcpOptions, h as AnthropicAdapter, i as AnthropicAdapterOptions, C as CODEX_REASONING_EFFORTS, j as CODEX_REASONING_SUMMARIES, k as CODEX_WEB_SEARCH_MODES, l as ClaudePermissionMode, m as ClaudeSDKAdapter, n as ClaudeSDKAdapterOptions, o as CodexAdapter, p as CodexAdapterConfig, q as CodexApprovalPolicy, r as CodexReasoningEffort, s as CodexReasoningSummary, t as CodexSandboxMode, u as CodexWebSearchMode, v as CopilotACPAdapter, w as CopilotACPAdapterOptions, x as CopilotACPStdioOptions, y as CopilotACPTcpOptions, D as DEFAULT_COPILOT_ACP_COMMAND, z as DEFAULT_OMP_ACP_COMMAND, G as GeminiAdapter, B as GeminiAdapterOptions, E as GenericAdapter, F as GenericAdapterHandler, H as GoogleADKAdapter, I as GoogleADKAdapterOptions, L as LangGraphAdapter, J as LangGraphAdapterOptions, K as LangGraphGraph, M as LettaAdapter, N as LettaAdapterOptions, O as OmpACPAdapter, P as OmpACPAdapterOptions, Q as OpenAIAdapter, R as OpenAIAdapterOptions, S as OpencodeAdapter, T as OpencodeAdapterConfig, U as OpencodeApprovalMode, V as OpencodeApprovalReply, W as OpencodeQuestionMode, X as ParlantAdapter, Y as ParlantAdapterOptions, Z as ToolCallingModel, _ as VercelAISDKAdapter, $ as VercelAISDKAdapterOptions } from './CopilotACPAdapter-BCpbHFB0.js';
13
+ export { S as SimpleAdapter } from './simpleAdapter-eLvsAQNo.js';
14
+ export { A as A2AAuth, a as A2AGatewayAdapterOptions } from './acp-client-DUXyczlF.js';
15
+ export { AgentFailure } from '@band-ai/band-sdk-core';
16
+ export { DeliveryFailedError, ProviderTurnFailedError, RecoverableTurnError, agentFailure, deliverReply, reportTurnFailure } from './core.js';
17
+ import './dtos-CjQsN1_h.js';
18
+ import './types-CjxZekMH.js';
19
+ import './pagination-CPz0J_vQ.js';
19
20
  import 'zod';
20
- import './backends-D-dBdDm-.js';
21
- import './sdk-qKJtMma_.js';
21
+ import './backends-CgsPQa9B.js';
22
+ import './sdk-Cin80BTC.js';
22
23
  import '@anthropic-ai/claude-agent-sdk';
24
+ import '@agentclientprotocol/sdk';
23
25
 
24
26
  interface AgentCreateOptions extends Omit<PlatformRuntimeOptions, "agentId" | "apiKey" | "wsUrl" | "restUrl"> {
25
27
  adapter: FrameworkAdapter;
@@ -39,16 +41,53 @@ interface AgentCreateOptions extends Omit<PlatformRuntimeOptions, "agentId" | "a
39
41
  declare class Agent {
40
42
  private readonly platformRuntime;
41
43
  private readonly adapter;
42
- private started;
43
- private startPromise;
44
+ private readonly lifecycle;
45
+ private readonly logger;
46
+ private readonly startGate;
47
+ private readonly stopGate;
44
48
  private shutdownTimeoutMs;
45
- constructor(runtime: PlatformRuntime, adapter: FrameworkAdapter);
49
+ constructor(runtime: PlatformRuntime, adapter: FrameworkAdapter, logger?: Logger);
46
50
  /** Build an Agent from credentials and a framework adapter. */
47
51
  static create(options: AgentCreateOptions): Agent;
52
+ /**
53
+ * Whether the agent is currently started.
54
+ *
55
+ * `false` while a `start()` call is still in flight — it only turns `true`
56
+ * once that call has resolved — and `false` again once the agent is stopped.
57
+ *
58
+ * @deprecated Read {@link Agent.state} instead, which also distinguishes
59
+ * `"starting"`, `"stopping"` and `"failed"` from a plain `"not_started"`.
60
+ */
48
61
  get isRunning(): boolean;
62
+ /** Current lifecycle state of this agent. */
63
+ get state(): RuntimeLifecycleState;
64
+ /**
65
+ * The underlying `PlatformRuntime`, for reading its `link`/`getContext()`/etc.
66
+ *
67
+ * Do not call `runtime.start()`/`runtime.stop()` directly: `Agent` keeps its
68
+ * own lifecycle tracker, so driving `PlatformRuntime`'s independently leaves
69
+ * `agent.state` reporting stale information. Use {@link Agent.start}/
70
+ * {@link Agent.stop} instead.
71
+ */
49
72
  get runtime(): PlatformRuntime;
73
+ /**
74
+ * Start the agent.
75
+ *
76
+ * Repeated or concurrent calls join the in-flight start. Calling `start()`
77
+ * while a `stop()` is still in flight rejects with a `RuntimeStateError`.
78
+ */
50
79
  start(): Promise<void>;
80
+ private runStart;
81
+ /**
82
+ * Stop the agent.
83
+ *
84
+ * A concurrent second call joins the in-flight teardown and mirrors its
85
+ * outcome — including rejecting with the *same* `Error` instance. A rejected
86
+ * `stop()` is not treated as a completed one: the next `stop()` reports the
87
+ * same failure, and a `start()` re-arms teardown.
88
+ */
51
89
  stop(timeoutMs?: number | null): Promise<boolean>;
90
+ private runStop;
52
91
  runForever(): Promise<void>;
53
92
  bootstrapRoomMessage(roomId: string, message: PlatformMessage): Promise<void>;
54
93
  resetRoomSession(roomId: string, timeoutMs?: number): Promise<boolean>;
@@ -62,4 +101,4 @@ declare class Agent {
62
101
 
63
102
  declare function isDirectExecution(importMetaUrl: string): boolean;
64
103
 
65
- export { Agent, type AgentCreateOptions, AgentCredentials, FrameworkAdapter, PlatformMessage, PlatformRuntime, PlatformRuntimeOptions, isDirectExecution };
104
+ export { Agent, type AgentCreateOptions, AgentCredentials, FrameworkAdapter, PlatformMessage, PlatformRuntime, PlatformRuntimeOptions, RuntimeLifecycleState, isDirectExecution };
package/dist/index.js CHANGED
@@ -1,68 +1,102 @@
1
1
  import {
2
+ ACPClientAdapter,
2
3
  AnthropicAdapter,
3
4
  CODEX_REASONING_EFFORTS,
4
5
  CODEX_REASONING_SUMMARIES,
5
6
  CODEX_WEB_SEARCH_MODES,
6
7
  ClaudeSDKAdapter,
7
8
  CodexAdapter,
9
+ CopilotACPAdapter,
10
+ DEFAULT_COPILOT_ACP_COMMAND,
11
+ DEFAULT_OMP_ACP_COMMAND,
8
12
  GeminiAdapter,
9
13
  GenericAdapter,
10
14
  GoogleADKAdapter,
11
15
  LangGraphAdapter,
12
16
  LettaAdapter,
17
+ OmpACPAdapter,
13
18
  OpenAIAdapter,
14
19
  OpencodeAdapter,
15
20
  VercelAISDKAdapter
16
- } from "./chunk-MQBBWYRP.js";
17
- import "./chunk-WA7CHXUS.js";
18
- import "./chunk-XWHWJP4I.js";
21
+ } from "./chunk-YF7K4UB3.js";
22
+ import "./chunk-UL3Y5C4J.js";
23
+ import "./chunk-JDW5WSGF.js";
19
24
  import {
20
25
  loadAgentConfig,
21
26
  loadAgentConfigFromEnv
22
- } from "./chunk-WL2HNJZ6.js";
27
+ } from "./chunk-VOMJRQOM.js";
23
28
  import {
24
29
  A2AAdapter,
25
30
  A2AGatewayAdapter,
26
31
  ParlantAdapter
27
- } from "./chunk-K5KAEYPF.js";
32
+ } from "./chunk-HNWZZXAE.js";
28
33
  import {
29
- SimpleAdapter
30
- } from "./chunk-AVVDPXP4.js";
34
+ AgentFailure
35
+ } from "./chunk-I34SXMTJ.js";
36
+ import {
37
+ DeliveryFailedError,
38
+ ProviderTurnFailedError,
39
+ SimpleAdapter,
40
+ agentFailure,
41
+ deliverReply,
42
+ reportTurnFailure
43
+ } from "./chunk-OGOXY43L.js";
31
44
  import {
32
45
  AgentRuntime,
33
46
  BandLink,
34
47
  DefaultPreprocessor,
48
+ LifecycleTracker,
35
49
  PlatformRuntime,
50
+ SingleFlight,
36
51
  deriveDefaultRestUrl,
37
- runWithGracefulShutdown
38
- } from "./chunk-U6AFCLYZ.js";
39
- import "./chunk-OH6VVVKT.js";
40
- import "./chunk-YJ42AZO4.js";
52
+ isLegalRuntimeTransition,
53
+ runWithGracefulShutdown,
54
+ startWithGate
55
+ } from "./chunk-6TGXV5TE.js";
56
+ import "./chunk-CBCHTTUY.js";
57
+ import "./chunk-RJNJUISR.js";
41
58
  import {
42
59
  MCP_SERVER_NAME,
43
60
  MCP_TOOL_PREFIX,
44
61
  TOOL_MODELS
45
- } from "./chunk-MQY74R7D.js";
46
- import "./chunk-F63TPOI3.js";
62
+ } from "./chunk-SHZBLLDQ.js";
47
63
  import {
48
64
  WebSocketDisconnectError
49
- } from "./chunk-US226AS4.js";
50
- import "./chunk-W5IAI6Z4.js";
51
- import "./chunk-KXJ74J73.js";
52
- import "./chunk-JADCAMZY.js";
53
- import "./chunk-OD2G5LFQ.js";
54
- import "./chunk-JY75VSQK.js";
65
+ } from "./chunk-UENIC5FJ.js";
66
+ import "./chunk-OVXVZUPO.js";
67
+ import "./chunk-JIZE4EC6.js";
68
+ import "./chunk-6BE2EG5P.js";
69
+ import {
70
+ FAILURE_EVENT_TYPE,
71
+ FAILURE_METADATA_KEY,
72
+ toFailureEvent
73
+ } from "./chunk-TGDDFBYS.js";
74
+ import {
75
+ resolveLogger
76
+ } from "./chunk-ZYOXI4JL.js";
77
+ import {
78
+ RecoverableTurnError
79
+ } from "./chunk-4OVNFDD7.js";
55
80
 
56
81
  // src/agent/Agent.ts
57
82
  var Agent = class _Agent {
58
83
  platformRuntime;
59
84
  adapter;
60
- started = false;
61
- startPromise = null;
85
+ lifecycle;
86
+ logger;
87
+ startGate = new SingleFlight();
88
+ stopGate = new SingleFlight();
62
89
  shutdownTimeoutMs = 3e4;
63
- constructor(runtime, adapter) {
90
+ constructor(runtime, adapter, logger) {
64
91
  this.platformRuntime = runtime;
65
92
  this.adapter = adapter;
93
+ this.logger = resolveLogger(logger);
94
+ this.lifecycle = new LifecycleTracker({ status: "not_started" }, {
95
+ owner: "Agent",
96
+ logContext: { agentId: runtime.agentId },
97
+ logger: this.logger,
98
+ isLegalTransition: isLegalRuntimeTransition
99
+ });
66
100
  }
67
101
  /** Build an Agent from credentials and a framework adapter. */
68
102
  static create(options) {
@@ -83,44 +117,103 @@ var Agent = class _Agent {
83
117
  ...wsUrl !== void 0 || config?.wsUrl !== void 0 ? { wsUrl: wsUrl ?? config?.wsUrl } : {},
84
118
  ...restUrl !== void 0 || config?.restUrl !== void 0 ? { restUrl: restUrl ?? config?.restUrl } : {}
85
119
  });
86
- const agent = new _Agent(runtime, adapter);
120
+ const agent = new _Agent(runtime, adapter, runtimeOptions.logger);
87
121
  agent.shutdownTimeoutMs = shutdownTimeoutMs === void 0 ? 3e4 : shutdownTimeoutMs;
88
122
  return agent;
89
123
  }
124
+ /**
125
+ * Whether the agent is currently started.
126
+ *
127
+ * `false` while a `start()` call is still in flight — it only turns `true`
128
+ * once that call has resolved — and `false` again once the agent is stopped.
129
+ *
130
+ * @deprecated Read {@link Agent.state} instead, which also distinguishes
131
+ * `"starting"`, `"stopping"` and `"failed"` from a plain `"not_started"`.
132
+ */
90
133
  get isRunning() {
91
- return this.started;
134
+ return this.lifecycle.is("running");
135
+ }
136
+ /** Current lifecycle state of this agent. */
137
+ get state() {
138
+ return this.lifecycle.state;
92
139
  }
140
+ /**
141
+ * The underlying `PlatformRuntime`, for reading its `link`/`getContext()`/etc.
142
+ *
143
+ * Do not call `runtime.start()`/`runtime.stop()` directly: `Agent` keeps its
144
+ * own lifecycle tracker, so driving `PlatformRuntime`'s independently leaves
145
+ * `agent.state` reporting stale information. Use {@link Agent.start}/
146
+ * {@link Agent.stop} instead.
147
+ */
93
148
  get runtime() {
94
149
  return this.platformRuntime;
95
150
  }
151
+ /**
152
+ * Start the agent.
153
+ *
154
+ * Repeated or concurrent calls join the in-flight start. Calling `start()`
155
+ * while a `stop()` is still in flight rejects with a `RuntimeStateError`.
156
+ */
96
157
  async start() {
97
- if (this.startPromise) {
98
- return this.startPromise;
99
- }
100
- this.startPromise = this.platformRuntime.start(this.adapter).then(() => {
101
- this.started = true;
102
- }).catch((error) => {
103
- this.startPromise = null;
104
- throw error;
158
+ await startWithGate({
159
+ lifecycle: this.lifecycle,
160
+ startGate: this.startGate,
161
+ stopGate: this.stopGate,
162
+ ownerName: "Agent",
163
+ runStart: () => this.runStart()
105
164
  });
106
- return this.startPromise;
107
165
  }
166
+ async runStart() {
167
+ const startState = this.lifecycle.state;
168
+ try {
169
+ await this.platformRuntime.start(this.adapter);
170
+ } catch (error) {
171
+ if (this.lifecycle.isCurrent(startState)) {
172
+ this.lifecycle.fail(error, "start-failed");
173
+ }
174
+ throw error;
175
+ }
176
+ if (this.lifecycle.isCurrent(startState)) {
177
+ this.lifecycle.transition({ status: "running" }, "started");
178
+ }
179
+ }
180
+ /**
181
+ * Stop the agent.
182
+ *
183
+ * A concurrent second call joins the in-flight teardown and mirrors its
184
+ * outcome — including rejecting with the *same* `Error` instance. A rejected
185
+ * `stop()` is not treated as a completed one: the next `stop()` reports the
186
+ * same failure, and a `start()` re-arms teardown.
187
+ */
108
188
  async stop(timeoutMs) {
109
- if (!this.started && !this.startPromise) {
189
+ return await this.stopGate.run(() => this.runStop(timeoutMs));
190
+ }
191
+ async runStop(timeoutMs) {
192
+ if (this.lifecycle.is("failed")) {
193
+ this.logger.debug("Agent stop is resurfacing the recorded start failure", { error: this.lifecycle.state.error });
194
+ throw this.lifecycle.state.error;
195
+ }
196
+ if (!this.lifecycle.is("starting") && !this.lifecycle.is("running")) {
110
197
  return true;
111
198
  }
112
- if (!this.started && this.startPromise) {
199
+ const pendingStart = this.lifecycle.is("starting") ? this.startGate.pending : null;
200
+ this.startGate.reset();
201
+ this.lifecycle.transition({ status: "stopping" }, "stop");
202
+ const stopping = this.platformRuntime.stop(timeoutMs ?? void 0);
203
+ if (pendingStart) {
113
204
  try {
114
- await this.startPromise;
115
- } catch {
116
- return true;
205
+ await pendingStart;
206
+ } catch (error) {
207
+ this.logger.debug("Agent stop superseded the in-flight start", { error });
117
208
  }
118
209
  }
119
210
  try {
120
- return await this.platformRuntime.stop(timeoutMs ?? void 0);
121
- } finally {
122
- this.started = false;
123
- this.startPromise = null;
211
+ const graceful = await stopping;
212
+ this.lifecycle.transition({ status: "stopped" }, "stopped");
213
+ return graceful;
214
+ } catch (error) {
215
+ this.lifecycle.fail(error, "stop-failed");
216
+ throw error;
124
217
  }
125
218
  }
126
219
  async runForever() {
@@ -173,7 +266,9 @@ function isDirectExecution(importMetaUrl) {
173
266
  export {
174
267
  A2AAdapter,
175
268
  A2AGatewayAdapter,
269
+ ACPClientAdapter,
176
270
  Agent,
271
+ AgentFailure,
177
272
  AgentRuntime,
178
273
  AnthropicAdapter,
179
274
  BandLink,
@@ -182,7 +277,13 @@ export {
182
277
  CODEX_WEB_SEARCH_MODES,
183
278
  ClaudeSDKAdapter,
184
279
  CodexAdapter,
280
+ CopilotACPAdapter,
281
+ DEFAULT_COPILOT_ACP_COMMAND,
282
+ DEFAULT_OMP_ACP_COMMAND,
185
283
  DefaultPreprocessor,
284
+ DeliveryFailedError,
285
+ FAILURE_EVENT_TYPE,
286
+ FAILURE_METADATA_KEY,
186
287
  GeminiAdapter,
187
288
  GenericAdapter,
188
289
  GoogleADKAdapter,
@@ -190,16 +291,23 @@ export {
190
291
  LettaAdapter,
191
292
  MCP_SERVER_NAME,
192
293
  MCP_TOOL_PREFIX,
294
+ OmpACPAdapter,
193
295
  OpenAIAdapter,
194
296
  OpencodeAdapter,
195
297
  ParlantAdapter,
196
298
  PlatformRuntime,
299
+ ProviderTurnFailedError,
300
+ RecoverableTurnError,
197
301
  SimpleAdapter,
198
302
  TOOL_MODELS,
199
303
  VercelAISDKAdapter,
200
304
  WebSocketDisconnectError,
305
+ agentFailure,
306
+ deliverReply,
201
307
  deriveDefaultRestUrl,
202
308
  isDirectExecution,
203
309
  loadAgentConfig,
204
- loadAgentConfigFromEnv
310
+ loadAgentConfigFromEnv,
311
+ reportTurnFailure,
312
+ toFailureEvent
205
313
  };
package/dist/linear.cjs CHANGED
@@ -81,14 +81,52 @@ var UnsupportedFeatureError = class extends BandSdkError {
81
81
  }
82
82
  };
83
83
 
84
+ // src/core/sensitiveTerms.ts
85
+ var SENSITIVE_KEY_TERMS = "authorization|api[-_ ]?key|token|secret|password|cookie";
86
+ var GATEWAY_FREE_TEXT_SENSITIVE_KEY_TERMS = `${SENSITIVE_KEY_TERMS}|session`;
87
+
84
88
  // src/core/logger.ts
85
89
  var noop = () => void 0;
90
+ var SENSITIVE_KEY_PATTERN = new RegExp(`(${SENSITIVE_KEY_TERMS})`, "i");
86
91
  var NoopLogger = class {
87
92
  debug = noop;
88
93
  info = noop;
89
94
  warn = noop;
90
95
  error = noop;
91
96
  };
97
+ function resolveLogger(logger) {
98
+ if (!logger) {
99
+ return new NoopLogger();
100
+ }
101
+ return logger instanceof GuardedLogger ? logger : new GuardedLogger(logger);
102
+ }
103
+ var GuardedLogger = class {
104
+ constructor(inner) {
105
+ this.inner = inner;
106
+ }
107
+ debug(message, context) {
108
+ return this.emit("debug", message, context);
109
+ }
110
+ info(message, context) {
111
+ return this.emit("info", message, context);
112
+ }
113
+ warn(message, context) {
114
+ return this.emit("warn", message, context);
115
+ }
116
+ error(message, context) {
117
+ return this.emit("error", message, context);
118
+ }
119
+ emit(level, message, context) {
120
+ try {
121
+ const result = this.inner[level](message, context);
122
+ if (result instanceof Promise) {
123
+ result.catch(noop);
124
+ }
125
+ return result;
126
+ } catch {
127
+ }
128
+ }
129
+ };
92
130
 
93
131
  // src/integrations/linear/handles.ts
94
132
  function stripHandlePrefix(handle) {
@@ -210,7 +248,7 @@ var StaleSessionGuard = class {
210
248
  constructor(options) {
211
249
  this.store = options.store;
212
250
  this.linearClient = options.linearClient;
213
- this.logger = options.logger ?? new NoopLogger();
251
+ this.logger = resolveLogger(options.logger);
214
252
  this.checkIntervalMs = options.checkIntervalMs ?? STALE_SESSION_CHECK_INTERVAL_MS;
215
253
  this.staleThresholdMs = options.staleThresholdMs ?? STALE_SESSION_THRESHOLD_MS;
216
254
  this.keepAliveMessage = options.keepAliveMessage ?? DEFAULT_KEEPALIVE_MESSAGE;
@@ -521,7 +559,7 @@ function getAgentSessionEventKey(payload) {
521
559
  ].join(":");
522
560
  }
523
561
  async function handleAgentSessionEvent(input, options) {
524
- const logger = input.deps.logger ?? new NoopLogger();
562
+ const logger = resolveLogger(input.deps.logger);
525
563
  const config = normalizeConfig(input.config);
526
564
  const action = normalizeAction(input.payload.action);
527
565
  const runtime = options?.runtime ?? createLinearBridgeRuntime();
@@ -1912,9 +1950,9 @@ function createLinearTools(options) {
1912
1950
  session_id: import_zod.z.string().describe("The Linear agent session ID"),
1913
1951
  body: import_zod.z.string().describe("The message body in Markdown format")
1914
1952
  });
1915
- const issueIdInputSchema = import_zod.z.object({
1953
+ const issueIdInputSchema = import_zod.z.looseObject({
1916
1954
  issue_id: import_zod.z.string().optional().describe("The Linear issue ID (UUID) from the session context")
1917
- }).passthrough();
1955
+ });
1918
1956
  const issueCommentLimitSchema = import_zod.z.number().int().min(1).max(50).optional().describe("Maximum number of recent comments to return");
1919
1957
  const requiredIssueIdSchema = issueIdInputSchema;
1920
1958
  const optionalIssueIdSchema = issueIdInputSchema;
@@ -2604,7 +2642,7 @@ var import_webhooks = require("@linear/sdk/webhooks");
2604
2642
  var DISPATCH_RETRY_LIMIT = 2;
2605
2643
  var DISPATCH_RETRY_BASE_DELAY_MS = 1e3;
2606
2644
  function createInlineLinearBridgeDispatcher(options) {
2607
- const logger = options?.logger ?? new NoopLogger();
2645
+ const logger = resolveLogger(options?.logger);
2608
2646
  const runtime = createLinearBridgeRuntime();
2609
2647
  return {
2610
2648
  dispatch: async (job) => {
@@ -2646,7 +2684,7 @@ function createInlineLinearBridgeDispatcher(options) {
2646
2684
  };
2647
2685
  }
2648
2686
  function createInProcessLinearBridgeDispatcher(options) {
2649
- const logger = options?.logger ?? new NoopLogger();
2687
+ const logger = resolveLogger(options?.logger);
2650
2688
  const runtime = createLinearBridgeRuntime();
2651
2689
  const queued = /* @__PURE__ */ new Set();
2652
2690
  const inFlight = /* @__PURE__ */ new Set();
@@ -2728,7 +2766,7 @@ function createInProcessLinearBridgeDispatcher(options) {
2728
2766
  };
2729
2767
  }
2730
2768
  function createLinearWebhookHandler(options) {
2731
- const logger = options.deps.logger ?? new NoopLogger();
2769
+ const logger = resolveLogger(options.deps.logger);
2732
2770
  const runtime = createLinearBridgeRuntime();
2733
2771
  const dispatcher = options.dispatcher ?? createInlineLinearBridgeDispatcher({ logger });
2734
2772
  const webhookClient = new import_webhooks.LinearWebhookClient(options.config.linearWebhookSecret);
package/dist/linear.d.cts CHANGED
@@ -1,10 +1,11 @@
1
1
  import { LinearClient, LinearDocument } from '@linear/sdk';
2
- import { R as RestApi } from './types-BgYFd_Yw.cjs';
2
+ import { R as RestApi } from './types-42-HWeX8.cjs';
3
3
  import { AppUserNotificationWebhookPayloadWithNotification, AgentSessionEventWebhookPayload, AppUserTeamAccessChangedWebhookPayload, OAuthAppWebhookPayload } from '@linear/sdk/webhooks';
4
4
  import { L as Logger } from './logger-CABQOnlR.cjs';
5
- import { C as CustomToolDef } from './customTools-BzF0IISO.cjs';
5
+ import { C as CustomToolDef } from './customTools-Bfecd0mJ.cjs';
6
6
  import { IncomingMessage, ServerResponse } from 'node:http';
7
- import './dtos-B8KU_q4d.cjs';
7
+ import './dtos-CjQsN1_h.cjs';
8
+ import '@band-ai/band-sdk-core';
8
9
  import 'zod';
9
10
 
10
11
  interface CandidateRepositoryInput {