@renseiai/agentfactory-linear 0.8.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.
- package/LICENSE +21 -0
- package/README.md +91 -0
- package/dist/src/agent-client-project-repo.test.d.ts +2 -0
- package/dist/src/agent-client-project-repo.test.d.ts.map +1 -0
- package/dist/src/agent-client-project-repo.test.js +153 -0
- package/dist/src/agent-client.d.ts +261 -0
- package/dist/src/agent-client.d.ts.map +1 -0
- package/dist/src/agent-client.js +902 -0
- package/dist/src/agent-session.d.ts +303 -0
- package/dist/src/agent-session.d.ts.map +1 -0
- package/dist/src/agent-session.js +969 -0
- package/dist/src/checkbox-utils.d.ts +88 -0
- package/dist/src/checkbox-utils.d.ts.map +1 -0
- package/dist/src/checkbox-utils.js +120 -0
- package/dist/src/circuit-breaker.d.ts +76 -0
- package/dist/src/circuit-breaker.d.ts.map +1 -0
- package/dist/src/circuit-breaker.js +229 -0
- package/dist/src/circuit-breaker.test.d.ts +2 -0
- package/dist/src/circuit-breaker.test.d.ts.map +1 -0
- package/dist/src/circuit-breaker.test.js +292 -0
- package/dist/src/constants.d.ts +87 -0
- package/dist/src/constants.d.ts.map +1 -0
- package/dist/src/constants.js +101 -0
- package/dist/src/defaults/auto-trigger.d.ts +35 -0
- package/dist/src/defaults/auto-trigger.d.ts.map +1 -0
- package/dist/src/defaults/auto-trigger.js +36 -0
- package/dist/src/defaults/index.d.ts +12 -0
- package/dist/src/defaults/index.d.ts.map +1 -0
- package/dist/src/defaults/index.js +11 -0
- package/dist/src/defaults/priority.d.ts +20 -0
- package/dist/src/defaults/priority.d.ts.map +1 -0
- package/dist/src/defaults/priority.js +37 -0
- package/dist/src/defaults/prompts.d.ts +42 -0
- package/dist/src/defaults/prompts.d.ts.map +1 -0
- package/dist/src/defaults/prompts.js +310 -0
- package/dist/src/defaults/prompts.test.d.ts +2 -0
- package/dist/src/defaults/prompts.test.d.ts.map +1 -0
- package/dist/src/defaults/prompts.test.js +263 -0
- package/dist/src/defaults/work-type-detection.d.ts +19 -0
- package/dist/src/defaults/work-type-detection.d.ts.map +1 -0
- package/dist/src/defaults/work-type-detection.js +93 -0
- package/dist/src/errors.d.ts +91 -0
- package/dist/src/errors.d.ts.map +1 -0
- package/dist/src/errors.js +173 -0
- package/dist/src/frontend-adapter.d.ts +168 -0
- package/dist/src/frontend-adapter.d.ts.map +1 -0
- package/dist/src/frontend-adapter.js +314 -0
- package/dist/src/frontend-adapter.test.d.ts +2 -0
- package/dist/src/frontend-adapter.test.d.ts.map +1 -0
- package/dist/src/frontend-adapter.test.js +545 -0
- package/dist/src/index.d.ts +28 -0
- package/dist/src/index.d.ts.map +1 -0
- package/dist/src/index.js +30 -0
- package/dist/src/issue-tracker-proxy.d.ts +140 -0
- package/dist/src/issue-tracker-proxy.d.ts.map +1 -0
- package/dist/src/issue-tracker-proxy.js +10 -0
- package/dist/src/platform-adapter.d.ts +132 -0
- package/dist/src/platform-adapter.d.ts.map +1 -0
- package/dist/src/platform-adapter.js +260 -0
- package/dist/src/platform-adapter.test.d.ts +2 -0
- package/dist/src/platform-adapter.test.d.ts.map +1 -0
- package/dist/src/platform-adapter.test.js +468 -0
- package/dist/src/proxy-client.d.ts +103 -0
- package/dist/src/proxy-client.d.ts.map +1 -0
- package/dist/src/proxy-client.js +191 -0
- package/dist/src/rate-limiter.d.ts +64 -0
- package/dist/src/rate-limiter.d.ts.map +1 -0
- package/dist/src/rate-limiter.js +163 -0
- package/dist/src/rate-limiter.test.d.ts +2 -0
- package/dist/src/rate-limiter.test.d.ts.map +1 -0
- package/dist/src/rate-limiter.test.js +217 -0
- package/dist/src/retry.d.ts +59 -0
- package/dist/src/retry.d.ts.map +1 -0
- package/dist/src/retry.js +82 -0
- package/dist/src/types.d.ts +492 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +143 -0
- package/dist/src/utils.d.ts +52 -0
- package/dist/src/utils.d.ts.map +1 -0
- package/dist/src/utils.js +277 -0
- package/dist/src/webhook-types.d.ts +308 -0
- package/dist/src/webhook-types.d.ts.map +1 -0
- package/dist/src/webhook-types.js +46 -0
- package/package.json +70 -0
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import type { RetryConfig } from './types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Default retry configuration
|
|
4
|
+
*/
|
|
5
|
+
export declare const DEFAULT_RETRY_CONFIG: Required<RetryConfig>;
|
|
6
|
+
/**
|
|
7
|
+
* Sleep utility for async delays
|
|
8
|
+
*/
|
|
9
|
+
export declare function sleep(ms: number): Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* Calculate delay for a given retry attempt with exponential backoff
|
|
12
|
+
*/
|
|
13
|
+
export declare function calculateDelay(attempt: number, config: Required<RetryConfig>): number;
|
|
14
|
+
/**
|
|
15
|
+
* Retry context passed to callbacks
|
|
16
|
+
*/
|
|
17
|
+
export interface RetryContext {
|
|
18
|
+
attempt: number;
|
|
19
|
+
maxRetries: number;
|
|
20
|
+
lastError?: Error;
|
|
21
|
+
delay: number;
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Callback for retry events
|
|
25
|
+
*/
|
|
26
|
+
export type RetryCallback = (context: RetryContext) => void;
|
|
27
|
+
/**
|
|
28
|
+
* Options for withRetry function
|
|
29
|
+
*/
|
|
30
|
+
export interface WithRetryOptions {
|
|
31
|
+
config?: RetryConfig;
|
|
32
|
+
onRetry?: RetryCallback;
|
|
33
|
+
shouldRetry?: (error: unknown) => boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Optional callback to extract a rate-limit delay (in ms) from an error.
|
|
36
|
+
* When provided and returns a positive number, that delay is used instead
|
|
37
|
+
* of the standard exponential backoff for that retry attempt.
|
|
38
|
+
*/
|
|
39
|
+
getRetryAfterMs?: (error: unknown) => number | null;
|
|
40
|
+
/**
|
|
41
|
+
* Optional callback invoked when a rate limit is detected (getRetryAfterMs
|
|
42
|
+
* returned a value). Use this to penalize a shared token bucket so other
|
|
43
|
+
* concurrent callers also back off.
|
|
44
|
+
*/
|
|
45
|
+
onRateLimited?: (retryAfterMs: number) => void;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Execute an async function with exponential backoff retry logic.
|
|
49
|
+
*
|
|
50
|
+
* When `getRetryAfterMs` is provided and returns a positive delay for an
|
|
51
|
+
* error, that delay is used instead of exponential backoff. This allows
|
|
52
|
+
* honoring HTTP 429 Retry-After headers from upstream APIs.
|
|
53
|
+
*/
|
|
54
|
+
export declare function withRetry<T>(fn: () => Promise<T>, options?: WithRetryOptions): Promise<T>;
|
|
55
|
+
/**
|
|
56
|
+
* Create a retry wrapper with pre-configured options
|
|
57
|
+
*/
|
|
58
|
+
export declare function createRetryWrapper(defaultOptions?: WithRetryOptions): <T>(fn: () => Promise<T>, options?: WithRetryOptions) => Promise<T>;
|
|
59
|
+
//# sourceMappingURL=retry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"retry.d.ts","sourceRoot":"","sources":["../../src/retry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAG7C;;GAEG;AACH,eAAO,MAAM,oBAAoB,EAAE,QAAQ,CAAC,WAAW,CAMtD,CAAA;AAED;;GAEG;AACH,wBAAgB,KAAK,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE/C;AAED;;GAEG;AACH,wBAAgB,cAAc,CAC5B,OAAO,EAAE,MAAM,EACf,MAAM,EAAE,QAAQ,CAAC,WAAW,CAAC,GAC5B,MAAM,CAIR;AAED;;GAEG;AACH,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,CAAC,EAAE,KAAK,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;CACd;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,EAAE,YAAY,KAAK,IAAI,CAAA;AAE3D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,MAAM,CAAC,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,aAAa,CAAA;IACvB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,OAAO,CAAA;IACzC;;;;OAIG;IACH,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,MAAM,GAAG,IAAI,CAAA;IACnD;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,YAAY,EAAE,MAAM,KAAK,IAAI,CAAA;CAC/C;AAED;;;;;;GAMG;AACH,wBAAsB,SAAS,CAAC,CAAC,EAC/B,EAAE,EAAE,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,OAAO,GAAE,gBAAqB,GAC7B,OAAO,CAAC,CAAC,CAAC,CA4CZ;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,cAAc,GAAE,gBAAqB,IACrD,CAAC,EAChB,IAAI,MAAM,OAAO,CAAC,CAAC,CAAC,EACpB,UAAU,gBAAgB,KACzB,OAAO,CAAC,CAAC,CAAC,CAUd"}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import { isRetryableError } from './errors.js';
|
|
2
|
+
/**
|
|
3
|
+
* Default retry configuration
|
|
4
|
+
*/
|
|
5
|
+
export const DEFAULT_RETRY_CONFIG = {
|
|
6
|
+
maxRetries: 3,
|
|
7
|
+
initialDelayMs: 1000,
|
|
8
|
+
backoffMultiplier: 2,
|
|
9
|
+
maxDelayMs: 10000,
|
|
10
|
+
retryableStatusCodes: [429, 500, 502, 503, 504],
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Sleep utility for async delays
|
|
14
|
+
*/
|
|
15
|
+
export function sleep(ms) {
|
|
16
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Calculate delay for a given retry attempt with exponential backoff
|
|
20
|
+
*/
|
|
21
|
+
export function calculateDelay(attempt, config) {
|
|
22
|
+
const delay = config.initialDelayMs * Math.pow(config.backoffMultiplier, attempt);
|
|
23
|
+
return Math.min(delay, config.maxDelayMs);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Execute an async function with exponential backoff retry logic.
|
|
27
|
+
*
|
|
28
|
+
* When `getRetryAfterMs` is provided and returns a positive delay for an
|
|
29
|
+
* error, that delay is used instead of exponential backoff. This allows
|
|
30
|
+
* honoring HTTP 429 Retry-After headers from upstream APIs.
|
|
31
|
+
*/
|
|
32
|
+
export async function withRetry(fn, options = {}) {
|
|
33
|
+
const config = {
|
|
34
|
+
...DEFAULT_RETRY_CONFIG,
|
|
35
|
+
...options.config,
|
|
36
|
+
};
|
|
37
|
+
const shouldRetry = options.shouldRetry ??
|
|
38
|
+
((error) => isRetryableError(error, config.retryableStatusCodes));
|
|
39
|
+
let lastError = new Error('Unknown error');
|
|
40
|
+
for (let attempt = 0; attempt <= config.maxRetries; attempt++) {
|
|
41
|
+
try {
|
|
42
|
+
return await fn();
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
lastError = error instanceof Error ? error : new Error(String(error));
|
|
46
|
+
if (attempt === config.maxRetries || !shouldRetry(error)) {
|
|
47
|
+
throw lastError;
|
|
48
|
+
}
|
|
49
|
+
// Check for rate-limit-specific delay (Retry-After)
|
|
50
|
+
const retryAfterMs = options.getRetryAfterMs?.(error) ?? null;
|
|
51
|
+
const delay = retryAfterMs ?? calculateDelay(attempt, config);
|
|
52
|
+
if (retryAfterMs !== null && options.onRateLimited) {
|
|
53
|
+
options.onRateLimited(retryAfterMs);
|
|
54
|
+
}
|
|
55
|
+
if (options.onRetry) {
|
|
56
|
+
options.onRetry({
|
|
57
|
+
attempt,
|
|
58
|
+
maxRetries: config.maxRetries,
|
|
59
|
+
lastError,
|
|
60
|
+
delay,
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
await sleep(delay);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
throw lastError;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Create a retry wrapper with pre-configured options
|
|
70
|
+
*/
|
|
71
|
+
export function createRetryWrapper(defaultOptions = {}) {
|
|
72
|
+
return function (fn, options) {
|
|
73
|
+
return withRetry(fn, {
|
|
74
|
+
...defaultOptions,
|
|
75
|
+
...options,
|
|
76
|
+
config: {
|
|
77
|
+
...defaultOptions.config,
|
|
78
|
+
...options?.config,
|
|
79
|
+
},
|
|
80
|
+
});
|
|
81
|
+
};
|
|
82
|
+
}
|
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
import type { LinearClient } from '@linear/sdk';
|
|
2
|
+
/**
|
|
3
|
+
* AgentSession states as defined by Linear Agent SDK
|
|
4
|
+
*/
|
|
5
|
+
export type AgentSessionState = 'pending' | 'active' | 'error' | 'awaitingInput' | 'complete';
|
|
6
|
+
/**
|
|
7
|
+
* AgentActivity types as defined by Linear Agent API
|
|
8
|
+
*/
|
|
9
|
+
export type AgentActivityType = 'thought' | 'action' | 'response' | 'elicitation' | 'error' | 'prompt';
|
|
10
|
+
/**
|
|
11
|
+
* AgentActivity signals - modifiers that provide additional instructions
|
|
12
|
+
* on how the activity should be interpreted
|
|
13
|
+
*/
|
|
14
|
+
export type AgentActivitySignal = 'auth' | 'continue' | 'select' | 'stop';
|
|
15
|
+
/**
|
|
16
|
+
* Content for a thought activity - reasoning steps
|
|
17
|
+
*/
|
|
18
|
+
export interface ThoughtActivityContent {
|
|
19
|
+
type: 'thought';
|
|
20
|
+
body: string;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Content for an action activity - tool calls
|
|
24
|
+
*/
|
|
25
|
+
export interface ActionActivityContent {
|
|
26
|
+
type: 'action';
|
|
27
|
+
action: string;
|
|
28
|
+
parameter: string;
|
|
29
|
+
result?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Content for a response activity - final responses
|
|
33
|
+
*/
|
|
34
|
+
export interface ResponseActivityContent {
|
|
35
|
+
type: 'response';
|
|
36
|
+
body: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Content for an elicitation activity - asking for clarification
|
|
40
|
+
*/
|
|
41
|
+
export interface ElicitationActivityContent {
|
|
42
|
+
type: 'elicitation';
|
|
43
|
+
body: string;
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Content for an error activity - error reporting
|
|
47
|
+
*/
|
|
48
|
+
export interface ErrorActivityContent {
|
|
49
|
+
type: 'error';
|
|
50
|
+
body: string;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Content for a prompt activity - prompts/instructions
|
|
54
|
+
*/
|
|
55
|
+
export interface PromptActivityContent {
|
|
56
|
+
type: 'prompt';
|
|
57
|
+
body: string;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Union type for all activity content types
|
|
61
|
+
*/
|
|
62
|
+
export type AgentActivityContentPayload = ThoughtActivityContent | ActionActivityContent | ResponseActivityContent | ElicitationActivityContent | ErrorActivityContent | PromptActivityContent;
|
|
63
|
+
/**
|
|
64
|
+
* Input for creating an agent activity via the native Linear API
|
|
65
|
+
*/
|
|
66
|
+
export interface AgentActivityCreateInput {
|
|
67
|
+
agentSessionId: string;
|
|
68
|
+
content: AgentActivityContentPayload;
|
|
69
|
+
ephemeral?: boolean;
|
|
70
|
+
id?: string;
|
|
71
|
+
signal?: AgentActivitySignal;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Result of creating an agent activity
|
|
75
|
+
*/
|
|
76
|
+
export interface AgentActivityResult {
|
|
77
|
+
success: boolean;
|
|
78
|
+
activityId?: string;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Legacy activity content for backward compatibility
|
|
82
|
+
* @deprecated Use AgentActivityContentPayload instead
|
|
83
|
+
*/
|
|
84
|
+
export interface AgentActivityContent {
|
|
85
|
+
text: string;
|
|
86
|
+
metadata?: Record<string, unknown>;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Configuration for creating an agent activity (internal use)
|
|
90
|
+
*/
|
|
91
|
+
export interface CreateActivityOptions {
|
|
92
|
+
type: AgentActivityType;
|
|
93
|
+
content: AgentActivityContent;
|
|
94
|
+
ephemeral?: boolean;
|
|
95
|
+
signals?: AgentSignals;
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* AgentPlan item states
|
|
99
|
+
*/
|
|
100
|
+
export type AgentPlanItemState = 'pending' | 'inProgress' | 'completed' | 'canceled';
|
|
101
|
+
/**
|
|
102
|
+
* Linear's native plan item status values
|
|
103
|
+
* @see https://linear.app/developers/agents
|
|
104
|
+
*/
|
|
105
|
+
export type LinearPlanStatus = 'pending' | 'inProgress' | 'completed' | 'canceled';
|
|
106
|
+
/**
|
|
107
|
+
* Linear's native plan item structure for agentSessionUpdate mutation
|
|
108
|
+
* @see https://linear.app/developers/agents
|
|
109
|
+
*/
|
|
110
|
+
export interface LinearPlanItem {
|
|
111
|
+
/** The task description */
|
|
112
|
+
content: string;
|
|
113
|
+
/** Current status of the task */
|
|
114
|
+
status: LinearPlanStatus;
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* A single item in the agent's plan (internal representation)
|
|
118
|
+
* Supports nested children for more detailed task tracking
|
|
119
|
+
*/
|
|
120
|
+
export interface AgentPlanItem {
|
|
121
|
+
id: string;
|
|
122
|
+
title: string;
|
|
123
|
+
state: AgentPlanItemState;
|
|
124
|
+
details?: string;
|
|
125
|
+
children?: AgentPlanItem[];
|
|
126
|
+
}
|
|
127
|
+
/**
|
|
128
|
+
* Full agent plan structure (internal representation)
|
|
129
|
+
*/
|
|
130
|
+
export interface AgentPlan {
|
|
131
|
+
items: AgentPlanItem[];
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Optional metadata for activity interpretation
|
|
135
|
+
*/
|
|
136
|
+
export interface AgentSignals {
|
|
137
|
+
toolName?: string;
|
|
138
|
+
toolInput?: Record<string, unknown>;
|
|
139
|
+
toolOutput?: unknown;
|
|
140
|
+
error?: {
|
|
141
|
+
message: string;
|
|
142
|
+
code?: string;
|
|
143
|
+
stack?: string;
|
|
144
|
+
};
|
|
145
|
+
progress?: number;
|
|
146
|
+
[key: string]: unknown;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Pluggable rate limiter strategy.
|
|
150
|
+
*
|
|
151
|
+
* The default in-memory TokenBucket implements this. Consumers can provide
|
|
152
|
+
* a Redis-backed implementation for shared rate limiting across processes.
|
|
153
|
+
*/
|
|
154
|
+
export interface RateLimiterStrategy {
|
|
155
|
+
acquire(): Promise<void>;
|
|
156
|
+
penalize(seconds: number): void | Promise<void>;
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Pluggable circuit breaker strategy.
|
|
160
|
+
*
|
|
161
|
+
* The default in-memory CircuitBreaker implements this. Consumers can provide
|
|
162
|
+
* a Redis-backed implementation for shared circuit state across processes.
|
|
163
|
+
*/
|
|
164
|
+
export interface CircuitBreakerStrategy {
|
|
165
|
+
canProceed(): boolean | Promise<boolean>;
|
|
166
|
+
recordSuccess(): void | Promise<void>;
|
|
167
|
+
recordAuthFailure(statusCode?: number): void | Promise<void>;
|
|
168
|
+
isAuthError(error: unknown): boolean;
|
|
169
|
+
reset(): void | Promise<void>;
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Configuration for the circuit breaker
|
|
173
|
+
*/
|
|
174
|
+
export interface CircuitBreakerConfig {
|
|
175
|
+
/** Consecutive auth failures before opening (default: 2) */
|
|
176
|
+
failureThreshold: number;
|
|
177
|
+
/** Milliseconds before half-open probe (default: 60_000) */
|
|
178
|
+
resetTimeoutMs: number;
|
|
179
|
+
/** Maximum reset timeout after exponential backoff (default: 300_000) */
|
|
180
|
+
maxResetTimeoutMs: number;
|
|
181
|
+
/** Backoff multiplier for reset timeout after probe failure (default: 2) */
|
|
182
|
+
backoffMultiplier: number;
|
|
183
|
+
/** HTTP status codes that count as auth failures (default: [400, 401, 403]) */
|
|
184
|
+
authErrorCodes: number[];
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Configuration for the Linear Agent Client
|
|
188
|
+
*/
|
|
189
|
+
/**
|
|
190
|
+
* Quota information extracted from Linear API response headers.
|
|
191
|
+
*/
|
|
192
|
+
export interface LinearApiQuota {
|
|
193
|
+
/** Remaining requests in the current window */
|
|
194
|
+
requestsRemaining?: number;
|
|
195
|
+
/** Total request limit for the current window */
|
|
196
|
+
requestsLimit?: number;
|
|
197
|
+
/** Remaining complexity points in the current window */
|
|
198
|
+
complexityRemaining?: number;
|
|
199
|
+
/** Total complexity limit for the current window */
|
|
200
|
+
complexityLimit?: number;
|
|
201
|
+
/** Seconds until the rate limit window resets */
|
|
202
|
+
resetSeconds?: number;
|
|
203
|
+
}
|
|
204
|
+
export interface LinearAgentClientConfig {
|
|
205
|
+
apiKey: string;
|
|
206
|
+
baseUrl?: string;
|
|
207
|
+
retry?: RetryConfig;
|
|
208
|
+
/** Token bucket rate limiter configuration. Applied to all API calls. */
|
|
209
|
+
rateLimit?: Partial<import('./rate-limiter.js').TokenBucketConfig>;
|
|
210
|
+
/** Circuit breaker configuration. */
|
|
211
|
+
circuitBreaker?: Partial<CircuitBreakerConfig>;
|
|
212
|
+
/**
|
|
213
|
+
* Injectable rate limiter strategy (e.g., Redis-backed).
|
|
214
|
+
* When provided, replaces the default in-memory TokenBucket.
|
|
215
|
+
*/
|
|
216
|
+
rateLimiterStrategy?: RateLimiterStrategy;
|
|
217
|
+
/**
|
|
218
|
+
* Injectable circuit breaker strategy (e.g., Redis-backed).
|
|
219
|
+
* When provided, replaces the default in-memory CircuitBreaker.
|
|
220
|
+
*/
|
|
221
|
+
circuitBreakerStrategy?: CircuitBreakerStrategy;
|
|
222
|
+
/**
|
|
223
|
+
* Optional callback invoked after each successful API response.
|
|
224
|
+
* Receives quota information extracted from response headers.
|
|
225
|
+
* Use this to track API consumption across scans.
|
|
226
|
+
*/
|
|
227
|
+
onApiResponse?: (quota: LinearApiQuota) => void;
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Retry configuration with exponential backoff
|
|
231
|
+
*/
|
|
232
|
+
export interface RetryConfig {
|
|
233
|
+
maxRetries?: number;
|
|
234
|
+
initialDelayMs?: number;
|
|
235
|
+
backoffMultiplier?: number;
|
|
236
|
+
maxDelayMs?: number;
|
|
237
|
+
retryableStatusCodes?: number[];
|
|
238
|
+
}
|
|
239
|
+
/**
|
|
240
|
+
* Standard Linear workflow states
|
|
241
|
+
*/
|
|
242
|
+
export type LinearWorkflowStatus = 'Backlog' | 'Started' | 'Finished' | 'Delivered' | 'Accepted' | 'Rejected' | 'Canceled';
|
|
243
|
+
/**
|
|
244
|
+
* Type of agent work being performed based on issue status
|
|
245
|
+
*
|
|
246
|
+
* | Issue Status | Work Type | Agent Role |
|
|
247
|
+
* |--------------|------------------------|-----------------------------------------------|
|
|
248
|
+
* | Icebox | research | Research/story-writer |
|
|
249
|
+
* | Icebox | backlog-creation | Create backlog issues from research |
|
|
250
|
+
* | Backlog | development | Developer agents |
|
|
251
|
+
* | Backlog | coordination | Coordinate sub-issue execution |
|
|
252
|
+
* | Started | inflight | Developer (resume/continue) |
|
|
253
|
+
* | Finished | qa | QA agents |
|
|
254
|
+
* | Finished | qa-coordination | Coordinate QA across sub-issues |
|
|
255
|
+
* | Delivered | acceptance | Acceptance testing |
|
|
256
|
+
* | Delivered | acceptance-coordination| Coordinate acceptance across sub-issues |
|
|
257
|
+
* | Rejected | refinement | Refine and return to Backlog |
|
|
258
|
+
* | Rejected | refinement-coordination| Coordinate refinement across sub-issues |
|
|
259
|
+
*/
|
|
260
|
+
export type AgentWorkType = 'research' | 'backlog-creation' | 'development' | 'inflight' | 'qa' | 'acceptance' | 'refinement' | 'refinement-coordination' | 'coordination' | 'qa-coordination' | 'acceptance-coordination';
|
|
261
|
+
/**
|
|
262
|
+
* Mapping from Linear issue status to agent work type
|
|
263
|
+
*/
|
|
264
|
+
export declare const STATUS_WORK_TYPE_MAP: Record<string, AgentWorkType>;
|
|
265
|
+
/**
|
|
266
|
+
* Terminal statuses where no agent work is needed
|
|
267
|
+
* Issues in these states are considered complete and should not be processed
|
|
268
|
+
*/
|
|
269
|
+
export declare const TERMINAL_STATUSES: readonly ["Accepted", "Canceled", "Duplicate"];
|
|
270
|
+
export type TerminalStatus = typeof TERMINAL_STATUSES[number];
|
|
271
|
+
/**
|
|
272
|
+
* Status to transition to when agent session STARTS
|
|
273
|
+
* null means no transition on start
|
|
274
|
+
*/
|
|
275
|
+
export declare const WORK_TYPE_START_STATUS: Record<AgentWorkType, LinearWorkflowStatus | null>;
|
|
276
|
+
/**
|
|
277
|
+
* Status to transition to when agent session COMPLETES successfully
|
|
278
|
+
* null means no auto-transition on completion
|
|
279
|
+
*/
|
|
280
|
+
export declare const WORK_TYPE_COMPLETE_STATUS: Record<AgentWorkType, LinearWorkflowStatus | null>;
|
|
281
|
+
/**
|
|
282
|
+
* Status to transition to when agent work FAILS (e.g., QA rejected)
|
|
283
|
+
* null means no auto-transition on failure (stays in current status)
|
|
284
|
+
*/
|
|
285
|
+
export declare const WORK_TYPE_FAIL_STATUS: Record<AgentWorkType, LinearWorkflowStatus | null>;
|
|
286
|
+
/**
|
|
287
|
+
* Work types that require an isolated git worktree.
|
|
288
|
+
* ALL work types now get worktrees to prevent agents from mutating the main
|
|
289
|
+
* checkout (e.g., running `git checkout` in the IDE's working tree).
|
|
290
|
+
*/
|
|
291
|
+
export declare const WORK_TYPES_REQUIRING_WORKTREE: ReadonlySet<AgentWorkType>;
|
|
292
|
+
/**
|
|
293
|
+
* Allowed statuses for each work type
|
|
294
|
+
* Used to validate that an agent isn't assigned to an issue in the wrong status
|
|
295
|
+
*/
|
|
296
|
+
export declare const WORK_TYPE_ALLOWED_STATUSES: Record<AgentWorkType, string[]>;
|
|
297
|
+
/**
|
|
298
|
+
* Valid work types for each status (reverse of WORK_TYPE_ALLOWED_STATUSES)
|
|
299
|
+
* Used to constrain keyword detection to only valid options for the current status
|
|
300
|
+
*
|
|
301
|
+
* For example:
|
|
302
|
+
* - Icebox issues can use keywords to choose between 'research' and 'backlog-creation'
|
|
303
|
+
* - Backlog issues only have 'development' as valid, so keywords won't change work type
|
|
304
|
+
* but could still provide agent specialization hints
|
|
305
|
+
*/
|
|
306
|
+
export declare const STATUS_VALID_WORK_TYPES: Record<string, AgentWorkType[]>;
|
|
307
|
+
/**
|
|
308
|
+
* Get valid work types for a given status
|
|
309
|
+
* Returns empty array if status is unknown
|
|
310
|
+
*/
|
|
311
|
+
export declare function getValidWorkTypesForStatus(status: string): AgentWorkType[];
|
|
312
|
+
/**
|
|
313
|
+
* Result of work type validation
|
|
314
|
+
*/
|
|
315
|
+
export interface WorkTypeValidationResult {
|
|
316
|
+
valid: boolean;
|
|
317
|
+
error?: string;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Validate that a work type is appropriate for an issue's current status
|
|
321
|
+
*
|
|
322
|
+
* @param workType - The work type being assigned
|
|
323
|
+
* @param issueStatus - The current status of the issue
|
|
324
|
+
* @returns Validation result with error message if invalid
|
|
325
|
+
*/
|
|
326
|
+
export declare function validateWorkTypeForStatus(workType: AgentWorkType, issueStatus: string): WorkTypeValidationResult;
|
|
327
|
+
/**
|
|
328
|
+
* Mapping of status names to their Linear state IDs
|
|
329
|
+
*/
|
|
330
|
+
export interface StatusMapping {
|
|
331
|
+
[statusName: string]: string;
|
|
332
|
+
}
|
|
333
|
+
/**
|
|
334
|
+
* Configuration for creating/managing an agent session
|
|
335
|
+
*/
|
|
336
|
+
export interface AgentSessionConfig {
|
|
337
|
+
client: LinearClient;
|
|
338
|
+
issueId: string;
|
|
339
|
+
sessionId?: string;
|
|
340
|
+
autoTransition?: boolean;
|
|
341
|
+
/**
|
|
342
|
+
* Type of work being performed.
|
|
343
|
+
* - 'development': Normal development work (transitions to Started on start)
|
|
344
|
+
* - 'qa': QA validation work (stays at Finished until QA passes, then Delivered)
|
|
345
|
+
* Defaults to 'development'.
|
|
346
|
+
*/
|
|
347
|
+
workType?: AgentWorkType;
|
|
348
|
+
}
|
|
349
|
+
/**
|
|
350
|
+
* Result of session operations
|
|
351
|
+
*/
|
|
352
|
+
export interface SessionOperationResult {
|
|
353
|
+
success: boolean;
|
|
354
|
+
sessionId?: string;
|
|
355
|
+
error?: Error;
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* External URL associated with an agent session
|
|
359
|
+
*/
|
|
360
|
+
export interface AgentSessionExternalUrl {
|
|
361
|
+
/** Label for the URL (e.g., "Dashboard", "Logs") */
|
|
362
|
+
label: string;
|
|
363
|
+
/** The URL of the external resource */
|
|
364
|
+
url: string;
|
|
365
|
+
}
|
|
366
|
+
/**
|
|
367
|
+
* Input for updating an agent session via the Linear API
|
|
368
|
+
*/
|
|
369
|
+
export interface AgentSessionUpdateInput {
|
|
370
|
+
/** The agent session ID to update */
|
|
371
|
+
sessionId: string;
|
|
372
|
+
/** External URLs linking to agent dashboard/logs */
|
|
373
|
+
externalUrls?: AgentSessionExternalUrl[];
|
|
374
|
+
/** External link URL (single, for backward compatibility) */
|
|
375
|
+
externalLink?: string;
|
|
376
|
+
/** Plan array showing agent execution strategy (Linear's native format) */
|
|
377
|
+
plan?: LinearPlanItem[];
|
|
378
|
+
}
|
|
379
|
+
/**
|
|
380
|
+
* Result of updating an agent session
|
|
381
|
+
*/
|
|
382
|
+
export interface AgentSessionUpdateResult {
|
|
383
|
+
success: boolean;
|
|
384
|
+
sessionId?: string;
|
|
385
|
+
}
|
|
386
|
+
/**
|
|
387
|
+
* Input for creating an agent session on an issue via the Linear API
|
|
388
|
+
* @see https://linear.app/developers/agents
|
|
389
|
+
*/
|
|
390
|
+
export interface AgentSessionCreateOnIssueInput {
|
|
391
|
+
/** The issue ID (UUID) or identifier (e.g., 'SUP-123') to create the session on */
|
|
392
|
+
issueId: string;
|
|
393
|
+
/** External URLs linking to agent dashboard/logs */
|
|
394
|
+
externalUrls?: AgentSessionExternalUrl[];
|
|
395
|
+
/** External link URL (single, for backward compatibility) */
|
|
396
|
+
externalLink?: string;
|
|
397
|
+
}
|
|
398
|
+
/**
|
|
399
|
+
* Result of creating an agent session on an issue
|
|
400
|
+
*/
|
|
401
|
+
export interface AgentSessionCreateResult {
|
|
402
|
+
success: boolean;
|
|
403
|
+
/** The ID of the created agent session */
|
|
404
|
+
sessionId?: string;
|
|
405
|
+
}
|
|
406
|
+
/**
|
|
407
|
+
* Linear issue relationship types
|
|
408
|
+
* @see https://linear.app/developers/sdk
|
|
409
|
+
*/
|
|
410
|
+
export type IssueRelationType = 'related' | 'blocks' | 'duplicate';
|
|
411
|
+
/**
|
|
412
|
+
* Input for creating an issue relation
|
|
413
|
+
*/
|
|
414
|
+
export interface IssueRelationCreateInput {
|
|
415
|
+
issueId: string;
|
|
416
|
+
relatedIssueId: string;
|
|
417
|
+
type: IssueRelationType;
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Result of creating/deleting an issue relation
|
|
421
|
+
*/
|
|
422
|
+
export interface IssueRelationResult {
|
|
423
|
+
success: boolean;
|
|
424
|
+
relationId?: string;
|
|
425
|
+
}
|
|
426
|
+
/**
|
|
427
|
+
* Batch result for creating multiple relations
|
|
428
|
+
*/
|
|
429
|
+
export interface IssueRelationBatchResult {
|
|
430
|
+
success: boolean;
|
|
431
|
+
relationIds: string[];
|
|
432
|
+
errors: Array<{
|
|
433
|
+
targetIssueId: string;
|
|
434
|
+
error: string;
|
|
435
|
+
}>;
|
|
436
|
+
}
|
|
437
|
+
/**
|
|
438
|
+
* Sub-issue with its blocking relations for dependency graph building
|
|
439
|
+
*/
|
|
440
|
+
export interface SubIssueGraphNode {
|
|
441
|
+
issue: {
|
|
442
|
+
id: string;
|
|
443
|
+
identifier: string;
|
|
444
|
+
title: string;
|
|
445
|
+
description?: string;
|
|
446
|
+
status?: string;
|
|
447
|
+
priority: number;
|
|
448
|
+
labels: string[];
|
|
449
|
+
url: string;
|
|
450
|
+
};
|
|
451
|
+
/** Identifiers of issues that block this sub-issue */
|
|
452
|
+
blockedBy: string[];
|
|
453
|
+
/** Identifiers of issues that this sub-issue blocks */
|
|
454
|
+
blocks: string[];
|
|
455
|
+
}
|
|
456
|
+
/**
|
|
457
|
+
* Result of getSubIssueGraph - the complete dependency graph for a parent issue
|
|
458
|
+
*/
|
|
459
|
+
export interface SubIssueGraph {
|
|
460
|
+
parentId: string;
|
|
461
|
+
parentIdentifier: string;
|
|
462
|
+
subIssues: SubIssueGraphNode[];
|
|
463
|
+
}
|
|
464
|
+
/**
|
|
465
|
+
* Lightweight sub-issue status info (no blocking relations)
|
|
466
|
+
* Used by QA and acceptance agents to validate sub-issue completion
|
|
467
|
+
*/
|
|
468
|
+
export interface SubIssueStatus {
|
|
469
|
+
identifier: string;
|
|
470
|
+
title: string;
|
|
471
|
+
status: string;
|
|
472
|
+
}
|
|
473
|
+
/**
|
|
474
|
+
* Representation of an issue relation
|
|
475
|
+
*/
|
|
476
|
+
export interface IssueRelationInfo {
|
|
477
|
+
id: string;
|
|
478
|
+
type: string;
|
|
479
|
+
issueId: string;
|
|
480
|
+
issueIdentifier?: string;
|
|
481
|
+
relatedIssueId: string;
|
|
482
|
+
relatedIssueIdentifier?: string;
|
|
483
|
+
createdAt: Date;
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
* Result of querying issue relations
|
|
487
|
+
*/
|
|
488
|
+
export interface IssueRelationsResult {
|
|
489
|
+
relations: IssueRelationInfo[];
|
|
490
|
+
inverseRelations: IssueRelationInfo[];
|
|
491
|
+
}
|
|
492
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C;;GAEG;AACH,MAAM,M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