@band-ai/sdk 0.1.2
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.
- package/dist/CodexAdapter-A1k_LMdZ.d.ts +1278 -0
- package/dist/CodexAdapter-BbZD-nBd.d.cts +1278 -0
- package/dist/adapters.cjs +10643 -0
- package/dist/adapters.d.cts +217 -0
- package/dist/adapters.d.ts +217 -0
- package/dist/adapters.js +92 -0
- package/dist/backends-BnOLsG7w.d.cts +20 -0
- package/dist/backends-C4n6cKOf.d.ts +20 -0
- package/dist/chunk-3BKAC4OZ.js +44 -0
- package/dist/chunk-5CXIMAH2.js +52 -0
- package/dist/chunk-6AJA2OPC.js +3682 -0
- package/dist/chunk-A3TDK6GP.js +6674 -0
- package/dist/chunk-AVVDPXP4.js +39 -0
- package/dist/chunk-EDPKUUJL.js +177 -0
- package/dist/chunk-FUODYQRE.js +2562 -0
- package/dist/chunk-GVEQ3RAH.js +373 -0
- package/dist/chunk-INA6YZTZ.js +88 -0
- package/dist/chunk-IZPV6QS6.js +115 -0
- package/dist/chunk-LY55KYVI.js +0 -0
- package/dist/chunk-NIAQBANR.js +577 -0
- package/dist/chunk-OD2G5LFQ.js +78 -0
- package/dist/chunk-SFVKOEQH.js +103 -0
- package/dist/chunk-SG4WLD2H.js +1093 -0
- package/dist/chunk-YR3BOQNW.js +39 -0
- package/dist/chunk-ZZJRRBPQ.js +82 -0
- package/dist/claude-CcnQ5OUC.d.ts +53 -0
- package/dist/claude-CwTAxhwI.d.cts +53 -0
- package/dist/config.cjs +164 -0
- package/dist/config.d.cts +19 -0
- package/dist/config.d.ts +19 -0
- package/dist/config.js +9 -0
- package/dist/converters.cjs +1086 -0
- package/dist/converters.d.cts +143 -0
- package/dist/converters.d.ts +143 -0
- package/dist/converters.js +468 -0
- package/dist/core.cjs +185 -0
- package/dist/core.d.cts +22 -0
- package/dist/core.d.ts +22 -0
- package/dist/core.js +24 -0
- package/dist/customTools-BzF0IISO.d.cts +10 -0
- package/dist/customTools-BzF0IISO.d.ts +10 -0
- package/dist/dtos-DUpbIu8k.d.cts +163 -0
- package/dist/dtos-DUpbIu8k.d.ts +163 -0
- package/dist/history-ByessXNq.d.ts +24 -0
- package/dist/history-i6yN7neC.d.cts +24 -0
- package/dist/index.cjs +13914 -0
- package/dist/index.d.cts +63 -0
- package/dist/index.d.ts +63 -0
- package/dist/index.js +198 -0
- package/dist/linear.cjs +2207 -0
- package/dist/linear.d.cts +167 -0
- package/dist/linear.d.ts +167 -0
- package/dist/linear.js +2139 -0
- package/dist/logger-CABQOnlR.d.cts +21 -0
- package/dist/logger-CABQOnlR.d.ts +21 -0
- package/dist/mcp-claude.cjs +584 -0
- package/dist/mcp-claude.d.cts +4 -0
- package/dist/mcp-claude.d.ts +4 -0
- package/dist/mcp-claude.js +11 -0
- package/dist/mcp.cjs +1247 -0
- package/dist/mcp.d.cts +97 -0
- package/dist/mcp.d.ts +97 -0
- package/dist/mcp.js +27 -0
- package/dist/opencode-BBcDchcN.d.cts +159 -0
- package/dist/opencode-DthQQUsZ.d.ts +159 -0
- package/dist/pagination-BPiys10t.d.cts +25 -0
- package/dist/pagination-CcDkVFxK.d.ts +25 -0
- package/dist/protocols-CInhtFpA.d.cts +116 -0
- package/dist/protocols-DrhzOH6K.d.ts +116 -0
- package/dist/rest.cjs +1159 -0
- package/dist/rest.d.cts +144 -0
- package/dist/rest.d.ts +144 -0
- package/dist/rest.js +18 -0
- package/dist/runtime.cjs +5353 -0
- package/dist/runtime.d.cts +276 -0
- package/dist/runtime.d.ts +276 -0
- package/dist/runtime.js +274 -0
- package/dist/schemas-BpEBkq5V.d.cts +592 -0
- package/dist/schemas-vos1AaBc.d.ts +592 -0
- package/dist/sdk-HJUVSSWA.js +10 -0
- package/dist/simpleAdapter-9OE_p6QW.d.ts +29 -0
- package/dist/simpleAdapter-DqhvjsGr.d.cts +29 -0
- package/dist/testing.cjs +217 -0
- package/dist/testing.d.cts +126 -0
- package/dist/testing.d.ts +126 -0
- package/dist/testing.js +186 -0
- package/dist/types-7jVzOeOP.d.ts +446 -0
- package/dist/types-CSHFipIc.d.cts +331 -0
- package/dist/types-CovcHpYf.d.cts +446 -0
- package/dist/types-CxII3XkA.d.ts +331 -0
- package/package.json +189 -0
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { LinearClient, LinearDocument } from '@linear/sdk';
|
|
2
|
+
import { R as RestApi } from './types-CSHFipIc.cjs';
|
|
3
|
+
import { AgentSessionEventWebhookPayload } from '@linear/sdk/webhooks';
|
|
4
|
+
import { L as Logger } from './logger-CABQOnlR.cjs';
|
|
5
|
+
import { C as CustomToolDef } from './customTools-BzF0IISO.cjs';
|
|
6
|
+
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
7
|
+
import './dtos-DUpbIu8k.cjs';
|
|
8
|
+
import 'zod';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Subset of `LinearClient` covering only the activity-reporting methods.
|
|
12
|
+
*/
|
|
13
|
+
interface LinearActivityClient {
|
|
14
|
+
createAgentActivity(input: {
|
|
15
|
+
agentSessionId: string;
|
|
16
|
+
content: Record<string, unknown>;
|
|
17
|
+
}): Promise<unknown>;
|
|
18
|
+
updateIssue?: (issueId: string, input: Record<string, unknown>) => Promise<unknown>;
|
|
19
|
+
createComment?: (input: {
|
|
20
|
+
issueId: string;
|
|
21
|
+
body: string;
|
|
22
|
+
}) => Promise<unknown>;
|
|
23
|
+
issue?: (issueId: string) => Promise<unknown>;
|
|
24
|
+
workflowStates?: (variables?: Record<string, unknown>) => Promise<unknown>;
|
|
25
|
+
}
|
|
26
|
+
interface PlanStep {
|
|
27
|
+
title: string;
|
|
28
|
+
status: "pending" | "in_progress" | "completed" | "failed";
|
|
29
|
+
}
|
|
30
|
+
declare function postThought(client: LinearActivityClient, sessionId: string, body: string): Promise<void>;
|
|
31
|
+
declare function postError(client: LinearActivityClient, sessionId: string, body: string): Promise<void>;
|
|
32
|
+
declare function postResponse(client: LinearActivityClient, sessionId: string, body: string): Promise<void>;
|
|
33
|
+
declare function postElicitation(client: LinearActivityClient, sessionId: string, body: string): Promise<void>;
|
|
34
|
+
declare function postAction(client: LinearActivityClient, sessionId: string, body: string): Promise<void>;
|
|
35
|
+
declare function updatePlan(client: LinearActivityClient, sessionId: string, steps: PlanStep[]): Promise<void>;
|
|
36
|
+
|
|
37
|
+
type RoomStrategy = "issue" | "session";
|
|
38
|
+
type WritebackMode = "final_only" | "activity_stream";
|
|
39
|
+
type SessionStatus = "active" | "waiting" | "completed" | "canceled" | "errored";
|
|
40
|
+
interface LinearThenvoiBridgeConfig {
|
|
41
|
+
linearAccessToken: string;
|
|
42
|
+
linearWebhookSecret: string;
|
|
43
|
+
roomStrategy?: RoomStrategy;
|
|
44
|
+
writebackMode?: WritebackMode;
|
|
45
|
+
hostAgentHandle?: string;
|
|
46
|
+
planningAgentHandles?: string[];
|
|
47
|
+
implementationAgentHandles?: string[];
|
|
48
|
+
recoveredRoomRetryBaseDelayMs?: number;
|
|
49
|
+
}
|
|
50
|
+
interface SessionRoomRecord {
|
|
51
|
+
linearSessionId: string;
|
|
52
|
+
linearIssueId: string | null;
|
|
53
|
+
thenvoiRoomId: string;
|
|
54
|
+
status: SessionStatus;
|
|
55
|
+
lastEventKey?: string | null;
|
|
56
|
+
createdAt: string;
|
|
57
|
+
updatedAt: string;
|
|
58
|
+
}
|
|
59
|
+
interface PendingBootstrapRequest {
|
|
60
|
+
eventKey: string;
|
|
61
|
+
linearSessionId: string;
|
|
62
|
+
thenvoiRoomId: string;
|
|
63
|
+
expectedContent: string;
|
|
64
|
+
messageType: string;
|
|
65
|
+
senderId?: string | null;
|
|
66
|
+
senderName?: string | null;
|
|
67
|
+
metadata?: Record<string, unknown>;
|
|
68
|
+
createdAt: string;
|
|
69
|
+
expiresAt: string;
|
|
70
|
+
}
|
|
71
|
+
interface SessionRoomStore {
|
|
72
|
+
getBySessionId(sessionId: string): Promise<SessionRoomRecord | null>;
|
|
73
|
+
getByIssueId(issueId: string): Promise<SessionRoomRecord | null>;
|
|
74
|
+
upsert(record: SessionRoomRecord): Promise<void>;
|
|
75
|
+
markCanceled(sessionId: string): Promise<void>;
|
|
76
|
+
enqueueBootstrapRequest(request: PendingBootstrapRequest): Promise<void>;
|
|
77
|
+
listPendingBootstrapRequests(limit?: number): Promise<PendingBootstrapRequest[]>;
|
|
78
|
+
markBootstrapRequestProcessed(eventKey: string): Promise<void>;
|
|
79
|
+
close?(): Promise<void>;
|
|
80
|
+
}
|
|
81
|
+
interface LinearThenvoiBridgeDeps {
|
|
82
|
+
thenvoiRest: RestApi;
|
|
83
|
+
linearClient: LinearClient;
|
|
84
|
+
store: SessionRoomStore;
|
|
85
|
+
logger?: Logger;
|
|
86
|
+
}
|
|
87
|
+
interface HandleAgentSessionEventInput {
|
|
88
|
+
payload: AgentSessionEventWebhookPayload;
|
|
89
|
+
config: LinearThenvoiBridgeConfig;
|
|
90
|
+
deps: LinearThenvoiBridgeDeps;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
type LinearSessionStatus = SessionStatus;
|
|
94
|
+
|
|
95
|
+
interface LinearBridgeRuntime {
|
|
96
|
+
roomResolutionLocks: Map<string, Promise<SessionRoomRecord>>;
|
|
97
|
+
resolvedHostHandleCache: WeakMap<RestApi, string>;
|
|
98
|
+
authenticatedHostHandleCache: WeakMap<RestApi, string>;
|
|
99
|
+
}
|
|
100
|
+
declare function createLinearBridgeRuntime(): LinearBridgeRuntime;
|
|
101
|
+
declare function handleAgentSessionEvent(input: HandleAgentSessionEventInput, options?: {
|
|
102
|
+
skipAcknowledgment?: boolean;
|
|
103
|
+
expectedEventKey?: string;
|
|
104
|
+
skipRoomWrite?: boolean;
|
|
105
|
+
runtime?: LinearBridgeRuntime;
|
|
106
|
+
}): Promise<void>;
|
|
107
|
+
declare function completeLinearSession(input: {
|
|
108
|
+
linearClient: {
|
|
109
|
+
createAgentActivity: (request: {
|
|
110
|
+
agentSessionId: string;
|
|
111
|
+
content: {
|
|
112
|
+
type: LinearDocument.AgentActivityType;
|
|
113
|
+
body: string;
|
|
114
|
+
};
|
|
115
|
+
}) => Promise<unknown>;
|
|
116
|
+
};
|
|
117
|
+
agentSessionId: string;
|
|
118
|
+
body: string;
|
|
119
|
+
store?: SessionRoomStore;
|
|
120
|
+
lastEventKey?: string | null;
|
|
121
|
+
}): Promise<void>;
|
|
122
|
+
|
|
123
|
+
declare function isLinearApiKey(token: string): boolean;
|
|
124
|
+
declare function createLinearClient(token: string): LinearClient;
|
|
125
|
+
declare function buildLinearAuthorizationHeader(token: string): string;
|
|
126
|
+
|
|
127
|
+
declare function stripHandlePrefix(handle: string): string;
|
|
128
|
+
declare function dedupeHandles(handles: Iterable<string>): string[];
|
|
129
|
+
|
|
130
|
+
declare function createSqliteSessionRoomStore(dbPath: string): SessionRoomStore;
|
|
131
|
+
|
|
132
|
+
interface CreateLinearToolsOptions {
|
|
133
|
+
client: LinearActivityClient;
|
|
134
|
+
store?: SessionRoomStore;
|
|
135
|
+
enableElicitation?: boolean;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Create Linear activity tools usable by any adapter via `customTools`.
|
|
139
|
+
*/
|
|
140
|
+
declare function createLinearTools(options: CreateLinearToolsOptions): CustomToolDef[];
|
|
141
|
+
|
|
142
|
+
interface LinearBridgeDispatchJob {
|
|
143
|
+
eventKey: string;
|
|
144
|
+
input: HandleAgentSessionEventInput;
|
|
145
|
+
runtime?: LinearBridgeRuntime;
|
|
146
|
+
}
|
|
147
|
+
interface LinearBridgeDispatcher {
|
|
148
|
+
dispatch(job: LinearBridgeDispatchJob): Promise<void> | void;
|
|
149
|
+
isQueued?(eventKey: string): boolean;
|
|
150
|
+
waitForIdle?(): Promise<void>;
|
|
151
|
+
}
|
|
152
|
+
interface CreateLinearWebhookHandlerOptions {
|
|
153
|
+
config: LinearThenvoiBridgeConfig;
|
|
154
|
+
deps: LinearThenvoiBridgeDeps;
|
|
155
|
+
dispatcher?: LinearBridgeDispatcher;
|
|
156
|
+
}
|
|
157
|
+
declare function createInlineLinearBridgeDispatcher(options?: {
|
|
158
|
+
logger?: Logger;
|
|
159
|
+
}): LinearBridgeDispatcher;
|
|
160
|
+
declare function createInProcessLinearBridgeDispatcher(options?: {
|
|
161
|
+
logger?: Logger;
|
|
162
|
+
}): LinearBridgeDispatcher;
|
|
163
|
+
declare function createLinearWebhookHandler(options: CreateLinearWebhookHandlerOptions): (request: IncomingMessage, response: ServerResponse) => Promise<void>;
|
|
164
|
+
|
|
165
|
+
declare const DEFAULT_STATUS_MAPPING: Record<SessionStatus, LinearSessionStatus>;
|
|
166
|
+
|
|
167
|
+
export { type CreateLinearWebhookHandlerOptions, DEFAULT_STATUS_MAPPING, type HandleAgentSessionEventInput, type LinearActivityClient, type LinearBridgeDispatchJob, type LinearBridgeDispatcher, type LinearBridgeRuntime, type LinearSessionStatus, type LinearThenvoiBridgeConfig, type LinearThenvoiBridgeDeps, type PendingBootstrapRequest, type PlanStep, type RoomStrategy, type SessionRoomRecord, type SessionRoomStore, type SessionStatus, type WritebackMode, buildLinearAuthorizationHeader, completeLinearSession, createInProcessLinearBridgeDispatcher, createInlineLinearBridgeDispatcher, createLinearBridgeRuntime, createLinearClient, createLinearTools, createLinearWebhookHandler, createSqliteSessionRoomStore, dedupeHandles, handleAgentSessionEvent, isLinearApiKey, postAction, postElicitation, postError, postResponse, postThought, stripHandlePrefix, updatePlan };
|
package/dist/linear.d.ts
ADDED
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
import { LinearClient, LinearDocument } from '@linear/sdk';
|
|
2
|
+
import { R as RestApi } from './types-CxII3XkA.js';
|
|
3
|
+
import { AgentSessionEventWebhookPayload } from '@linear/sdk/webhooks';
|
|
4
|
+
import { L as Logger } from './logger-CABQOnlR.js';
|
|
5
|
+
import { C as CustomToolDef } from './customTools-BzF0IISO.js';
|
|
6
|
+
import { IncomingMessage, ServerResponse } from 'node:http';
|
|
7
|
+
import './dtos-DUpbIu8k.js';
|
|
8
|
+
import 'zod';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Subset of `LinearClient` covering only the activity-reporting methods.
|
|
12
|
+
*/
|
|
13
|
+
interface LinearActivityClient {
|
|
14
|
+
createAgentActivity(input: {
|
|
15
|
+
agentSessionId: string;
|
|
16
|
+
content: Record<string, unknown>;
|
|
17
|
+
}): Promise<unknown>;
|
|
18
|
+
updateIssue?: (issueId: string, input: Record<string, unknown>) => Promise<unknown>;
|
|
19
|
+
createComment?: (input: {
|
|
20
|
+
issueId: string;
|
|
21
|
+
body: string;
|
|
22
|
+
}) => Promise<unknown>;
|
|
23
|
+
issue?: (issueId: string) => Promise<unknown>;
|
|
24
|
+
workflowStates?: (variables?: Record<string, unknown>) => Promise<unknown>;
|
|
25
|
+
}
|
|
26
|
+
interface PlanStep {
|
|
27
|
+
title: string;
|
|
28
|
+
status: "pending" | "in_progress" | "completed" | "failed";
|
|
29
|
+
}
|
|
30
|
+
declare function postThought(client: LinearActivityClient, sessionId: string, body: string): Promise<void>;
|
|
31
|
+
declare function postError(client: LinearActivityClient, sessionId: string, body: string): Promise<void>;
|
|
32
|
+
declare function postResponse(client: LinearActivityClient, sessionId: string, body: string): Promise<void>;
|
|
33
|
+
declare function postElicitation(client: LinearActivityClient, sessionId: string, body: string): Promise<void>;
|
|
34
|
+
declare function postAction(client: LinearActivityClient, sessionId: string, body: string): Promise<void>;
|
|
35
|
+
declare function updatePlan(client: LinearActivityClient, sessionId: string, steps: PlanStep[]): Promise<void>;
|
|
36
|
+
|
|
37
|
+
type RoomStrategy = "issue" | "session";
|
|
38
|
+
type WritebackMode = "final_only" | "activity_stream";
|
|
39
|
+
type SessionStatus = "active" | "waiting" | "completed" | "canceled" | "errored";
|
|
40
|
+
interface LinearThenvoiBridgeConfig {
|
|
41
|
+
linearAccessToken: string;
|
|
42
|
+
linearWebhookSecret: string;
|
|
43
|
+
roomStrategy?: RoomStrategy;
|
|
44
|
+
writebackMode?: WritebackMode;
|
|
45
|
+
hostAgentHandle?: string;
|
|
46
|
+
planningAgentHandles?: string[];
|
|
47
|
+
implementationAgentHandles?: string[];
|
|
48
|
+
recoveredRoomRetryBaseDelayMs?: number;
|
|
49
|
+
}
|
|
50
|
+
interface SessionRoomRecord {
|
|
51
|
+
linearSessionId: string;
|
|
52
|
+
linearIssueId: string | null;
|
|
53
|
+
thenvoiRoomId: string;
|
|
54
|
+
status: SessionStatus;
|
|
55
|
+
lastEventKey?: string | null;
|
|
56
|
+
createdAt: string;
|
|
57
|
+
updatedAt: string;
|
|
58
|
+
}
|
|
59
|
+
interface PendingBootstrapRequest {
|
|
60
|
+
eventKey: string;
|
|
61
|
+
linearSessionId: string;
|
|
62
|
+
thenvoiRoomId: string;
|
|
63
|
+
expectedContent: string;
|
|
64
|
+
messageType: string;
|
|
65
|
+
senderId?: string | null;
|
|
66
|
+
senderName?: string | null;
|
|
67
|
+
metadata?: Record<string, unknown>;
|
|
68
|
+
createdAt: string;
|
|
69
|
+
expiresAt: string;
|
|
70
|
+
}
|
|
71
|
+
interface SessionRoomStore {
|
|
72
|
+
getBySessionId(sessionId: string): Promise<SessionRoomRecord | null>;
|
|
73
|
+
getByIssueId(issueId: string): Promise<SessionRoomRecord | null>;
|
|
74
|
+
upsert(record: SessionRoomRecord): Promise<void>;
|
|
75
|
+
markCanceled(sessionId: string): Promise<void>;
|
|
76
|
+
enqueueBootstrapRequest(request: PendingBootstrapRequest): Promise<void>;
|
|
77
|
+
listPendingBootstrapRequests(limit?: number): Promise<PendingBootstrapRequest[]>;
|
|
78
|
+
markBootstrapRequestProcessed(eventKey: string): Promise<void>;
|
|
79
|
+
close?(): Promise<void>;
|
|
80
|
+
}
|
|
81
|
+
interface LinearThenvoiBridgeDeps {
|
|
82
|
+
thenvoiRest: RestApi;
|
|
83
|
+
linearClient: LinearClient;
|
|
84
|
+
store: SessionRoomStore;
|
|
85
|
+
logger?: Logger;
|
|
86
|
+
}
|
|
87
|
+
interface HandleAgentSessionEventInput {
|
|
88
|
+
payload: AgentSessionEventWebhookPayload;
|
|
89
|
+
config: LinearThenvoiBridgeConfig;
|
|
90
|
+
deps: LinearThenvoiBridgeDeps;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
type LinearSessionStatus = SessionStatus;
|
|
94
|
+
|
|
95
|
+
interface LinearBridgeRuntime {
|
|
96
|
+
roomResolutionLocks: Map<string, Promise<SessionRoomRecord>>;
|
|
97
|
+
resolvedHostHandleCache: WeakMap<RestApi, string>;
|
|
98
|
+
authenticatedHostHandleCache: WeakMap<RestApi, string>;
|
|
99
|
+
}
|
|
100
|
+
declare function createLinearBridgeRuntime(): LinearBridgeRuntime;
|
|
101
|
+
declare function handleAgentSessionEvent(input: HandleAgentSessionEventInput, options?: {
|
|
102
|
+
skipAcknowledgment?: boolean;
|
|
103
|
+
expectedEventKey?: string;
|
|
104
|
+
skipRoomWrite?: boolean;
|
|
105
|
+
runtime?: LinearBridgeRuntime;
|
|
106
|
+
}): Promise<void>;
|
|
107
|
+
declare function completeLinearSession(input: {
|
|
108
|
+
linearClient: {
|
|
109
|
+
createAgentActivity: (request: {
|
|
110
|
+
agentSessionId: string;
|
|
111
|
+
content: {
|
|
112
|
+
type: LinearDocument.AgentActivityType;
|
|
113
|
+
body: string;
|
|
114
|
+
};
|
|
115
|
+
}) => Promise<unknown>;
|
|
116
|
+
};
|
|
117
|
+
agentSessionId: string;
|
|
118
|
+
body: string;
|
|
119
|
+
store?: SessionRoomStore;
|
|
120
|
+
lastEventKey?: string | null;
|
|
121
|
+
}): Promise<void>;
|
|
122
|
+
|
|
123
|
+
declare function isLinearApiKey(token: string): boolean;
|
|
124
|
+
declare function createLinearClient(token: string): LinearClient;
|
|
125
|
+
declare function buildLinearAuthorizationHeader(token: string): string;
|
|
126
|
+
|
|
127
|
+
declare function stripHandlePrefix(handle: string): string;
|
|
128
|
+
declare function dedupeHandles(handles: Iterable<string>): string[];
|
|
129
|
+
|
|
130
|
+
declare function createSqliteSessionRoomStore(dbPath: string): SessionRoomStore;
|
|
131
|
+
|
|
132
|
+
interface CreateLinearToolsOptions {
|
|
133
|
+
client: LinearActivityClient;
|
|
134
|
+
store?: SessionRoomStore;
|
|
135
|
+
enableElicitation?: boolean;
|
|
136
|
+
}
|
|
137
|
+
/**
|
|
138
|
+
* Create Linear activity tools usable by any adapter via `customTools`.
|
|
139
|
+
*/
|
|
140
|
+
declare function createLinearTools(options: CreateLinearToolsOptions): CustomToolDef[];
|
|
141
|
+
|
|
142
|
+
interface LinearBridgeDispatchJob {
|
|
143
|
+
eventKey: string;
|
|
144
|
+
input: HandleAgentSessionEventInput;
|
|
145
|
+
runtime?: LinearBridgeRuntime;
|
|
146
|
+
}
|
|
147
|
+
interface LinearBridgeDispatcher {
|
|
148
|
+
dispatch(job: LinearBridgeDispatchJob): Promise<void> | void;
|
|
149
|
+
isQueued?(eventKey: string): boolean;
|
|
150
|
+
waitForIdle?(): Promise<void>;
|
|
151
|
+
}
|
|
152
|
+
interface CreateLinearWebhookHandlerOptions {
|
|
153
|
+
config: LinearThenvoiBridgeConfig;
|
|
154
|
+
deps: LinearThenvoiBridgeDeps;
|
|
155
|
+
dispatcher?: LinearBridgeDispatcher;
|
|
156
|
+
}
|
|
157
|
+
declare function createInlineLinearBridgeDispatcher(options?: {
|
|
158
|
+
logger?: Logger;
|
|
159
|
+
}): LinearBridgeDispatcher;
|
|
160
|
+
declare function createInProcessLinearBridgeDispatcher(options?: {
|
|
161
|
+
logger?: Logger;
|
|
162
|
+
}): LinearBridgeDispatcher;
|
|
163
|
+
declare function createLinearWebhookHandler(options: CreateLinearWebhookHandlerOptions): (request: IncomingMessage, response: ServerResponse) => Promise<void>;
|
|
164
|
+
|
|
165
|
+
declare const DEFAULT_STATUS_MAPPING: Record<SessionStatus, LinearSessionStatus>;
|
|
166
|
+
|
|
167
|
+
export { type CreateLinearWebhookHandlerOptions, DEFAULT_STATUS_MAPPING, type HandleAgentSessionEventInput, type LinearActivityClient, type LinearBridgeDispatchJob, type LinearBridgeDispatcher, type LinearBridgeRuntime, type LinearSessionStatus, type LinearThenvoiBridgeConfig, type LinearThenvoiBridgeDeps, type PendingBootstrapRequest, type PlanStep, type RoomStrategy, type SessionRoomRecord, type SessionRoomStore, type SessionStatus, type WritebackMode, buildLinearAuthorizationHeader, completeLinearSession, createInProcessLinearBridgeDispatcher, createInlineLinearBridgeDispatcher, createLinearBridgeRuntime, createLinearClient, createLinearTools, createLinearWebhookHandler, createSqliteSessionRoomStore, dedupeHandles, handleAgentSessionEvent, isLinearApiKey, postAction, postElicitation, postError, postResponse, postThought, stripHandlePrefix, updatePlan };
|