cyrus-core 0.2.1 → 0.2.3

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 (33) hide show
  1. package/dist/CyrusAgentSession.d.ts +4 -4
  2. package/dist/CyrusAgentSession.d.ts.map +1 -1
  3. package/dist/config-types.d.ts +3 -0
  4. package/dist/config-types.d.ts.map +1 -1
  5. package/dist/index.d.ts +2 -2
  6. package/dist/index.d.ts.map +1 -1
  7. package/dist/index.js +4 -1
  8. package/dist/index.js.map +1 -1
  9. package/dist/issue-tracker/AgentEvent.d.ts +134 -0
  10. package/dist/issue-tracker/AgentEvent.d.ts.map +1 -0
  11. package/dist/issue-tracker/AgentEvent.js +109 -0
  12. package/dist/issue-tracker/AgentEvent.js.map +1 -0
  13. package/dist/issue-tracker/IAgentEventTransport.d.ts +146 -0
  14. package/dist/issue-tracker/IAgentEventTransport.d.ts.map +1 -0
  15. package/dist/issue-tracker/IAgentEventTransport.js +12 -0
  16. package/dist/issue-tracker/IAgentEventTransport.js.map +1 -0
  17. package/dist/issue-tracker/IIssueTrackerService.d.ts +692 -0
  18. package/dist/issue-tracker/IIssueTrackerService.d.ts.map +1 -0
  19. package/dist/issue-tracker/IIssueTrackerService.js +11 -0
  20. package/dist/issue-tracker/IIssueTrackerService.js.map +1 -0
  21. package/dist/issue-tracker/index.d.ts +59 -0
  22. package/dist/issue-tracker/index.d.ts.map +1 -0
  23. package/dist/issue-tracker/index.js +61 -0
  24. package/dist/issue-tracker/index.js.map +1 -0
  25. package/dist/issue-tracker/types.d.ts +499 -0
  26. package/dist/issue-tracker/types.d.ts.map +1 -0
  27. package/dist/issue-tracker/types.js +123 -0
  28. package/dist/issue-tracker/types.js.map +1 -0
  29. package/package.json +4 -3
  30. package/dist/webhook-types.d.ts +0 -259
  31. package/dist/webhook-types.d.ts.map +0 -1
  32. package/dist/webhook-types.js +0 -26
  33. package/dist/webhook-types.js.map +0 -1
@@ -0,0 +1,123 @@
1
+ /**
2
+ * Platform-agnostic types for issue tracking platforms.
3
+ *
4
+ * These types provide simplified interfaces that match Linear SDK GraphQL types structure.
5
+ * Linear SDK is the source of truth - these types are designed to be compatible subsets
6
+ * of Linear's types, omitting implementation-specific fields while maintaining core
7
+ * data structure compatibility.
8
+ *
9
+ * Following the pattern from AgentEvent.ts, we reference Linear SDK types via JSDoc
10
+ * and re-export Linear enums where they exist. This makes Linear the "source of truth"
11
+ * while keeping interfaces manageable.
12
+ *
13
+ * @module issue-tracker/types
14
+ * @see {@link https://linear.app/docs/graphql/api|Linear GraphQL API Documentation}
15
+ */
16
+ /**
17
+ * Standard workflow state types across platforms.
18
+ */
19
+ export var WorkflowStateType;
20
+ (function (WorkflowStateType) {
21
+ WorkflowStateType["Triage"] = "triage";
22
+ WorkflowStateType["Backlog"] = "backlog";
23
+ WorkflowStateType["Unstarted"] = "unstarted";
24
+ WorkflowStateType["Started"] = "started";
25
+ WorkflowStateType["Completed"] = "completed";
26
+ WorkflowStateType["Canceled"] = "canceled";
27
+ })(WorkflowStateType || (WorkflowStateType = {}));
28
+ /**
29
+ * Issue priority levels (0 = no priority, 1 = urgent, 2 = high, 3 = normal, 4 = low).
30
+ */
31
+ export var IssuePriority;
32
+ (function (IssuePriority) {
33
+ IssuePriority[IssuePriority["NoPriority"] = 0] = "NoPriority";
34
+ IssuePriority[IssuePriority["Urgent"] = 1] = "Urgent";
35
+ IssuePriority[IssuePriority["High"] = 2] = "High";
36
+ IssuePriority[IssuePriority["Normal"] = 3] = "Normal";
37
+ IssuePriority[IssuePriority["Low"] = 4] = "Low";
38
+ })(IssuePriority || (IssuePriority = {}));
39
+ /**
40
+ * Agent session status enumeration.
41
+ *
42
+ * Re-exported from Linear SDK. Linear SDK is the source of truth.
43
+ * Note: Linear uses "awaitingInput" while we historically used "awaiting-input".
44
+ * We now use Linear's enum directly for consistency.
45
+ *
46
+ * @see {@link LinearSDK.AgentSessionStatus} - Linear's AgentSessionStatus enum
47
+ */
48
+ import { AgentSessionStatus } from "@linear/sdk";
49
+ export { AgentSessionStatus };
50
+ /**
51
+ * Agent session type/context enumeration.
52
+ *
53
+ * Re-exported from Linear SDK. Linear SDK is the source of truth.
54
+ *
55
+ * @see {@link LinearSDK.AgentSessionType} - Linear's AgentSessionType enum
56
+ */
57
+ import { AgentSessionType } from "@linear/sdk";
58
+ export { AgentSessionType };
59
+ /**
60
+ * Agent activity type enumeration.
61
+ *
62
+ * Re-exported from Linear SDK. Linear SDK is the source of truth.
63
+ * This is aliased as AgentActivityContentType for backward compatibility.
64
+ *
65
+ * @see {@link LinearSDK.AgentActivityType} - Linear's AgentActivityType enum
66
+ */
67
+ import { AgentActivityType } from "@linear/sdk";
68
+ export { AgentActivityType };
69
+ /**
70
+ * Legacy alias for AgentActivityType.
71
+ * @deprecated Use AgentActivityType instead
72
+ */
73
+ export const AgentActivityContentType = AgentActivityType;
74
+ /**
75
+ * Agent activity signal enumeration.
76
+ *
77
+ * Re-exported from Linear SDK. Linear SDK is the source of truth.
78
+ *
79
+ * @see {@link LinearSDK.AgentActivitySignal} - Linear's AgentActivitySignal enum
80
+ */
81
+ import { AgentActivitySignal } from "@linear/sdk";
82
+ export { AgentActivitySignal };
83
+ /**
84
+ * Type guard to check if webhook is an agent session created event.
85
+ */
86
+ export function isAgentSessionCreatedWebhook(webhook) {
87
+ return webhook.type === "AgentSessionEvent" && webhook.action === "created";
88
+ }
89
+ /**
90
+ * Type guard to check if webhook is an agent session prompted event.
91
+ */
92
+ export function isAgentSessionPromptedWebhook(webhook) {
93
+ return webhook.type === "AgentSessionEvent" && webhook.action === "prompted";
94
+ }
95
+ /**
96
+ * Type guard to check if webhook is an issue assigned notification.
97
+ */
98
+ export function isIssueAssignedWebhook(webhook) {
99
+ return (webhook.type === "AppUserNotification" &&
100
+ webhook.action === "issueAssignedToYou");
101
+ }
102
+ /**
103
+ * Type guard to check if webhook is an issue comment mention notification.
104
+ */
105
+ export function isIssueCommentMentionWebhook(webhook) {
106
+ return (webhook.type === "AppUserNotification" &&
107
+ webhook.action === "issueCommentMention");
108
+ }
109
+ /**
110
+ * Type guard to check if webhook is an issue new comment notification.
111
+ */
112
+ export function isIssueNewCommentWebhook(webhook) {
113
+ return (webhook.type === "AppUserNotification" &&
114
+ webhook.action === "issueNewComment");
115
+ }
116
+ /**
117
+ * Type guard to check if webhook is an issue unassigned notification.
118
+ */
119
+ export function isIssueUnassignedWebhook(webhook) {
120
+ return (webhook.type === "AppUserNotification" &&
121
+ webhook.action === "issueUnassignedFromYou");
122
+ }
123
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/issue-tracker/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AA0FH;;GAEG;AACH,MAAM,CAAN,IAAY,iBAOX;AAPD,WAAY,iBAAiB;IAC5B,sCAAiB,CAAA;IACjB,wCAAmB,CAAA;IACnB,4CAAuB,CAAA;IACvB,wCAAmB,CAAA;IACnB,4CAAuB,CAAA;IACvB,0CAAqB,CAAA;AACtB,CAAC,EAPW,iBAAiB,KAAjB,iBAAiB,QAO5B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,aAMX;AAND,WAAY,aAAa;IACxB,6DAAc,CAAA;IACd,qDAAU,CAAA;IACV,iDAAQ,CAAA;IACR,qDAAU,CAAA;IACV,+CAAO,CAAA;AACR,CAAC,EANW,aAAa,KAAb,aAAa,QAMxB;AAyCD;;;;;;;;GAQG;AACH,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,kBAAkB,EAAE,CAAC;AAG9B;;;;;;GAMG;AACH,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAC/C,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAmB5B;;;;;;;GAOG;AACH,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,iBAAiB,EAAE,CAAC;AAG7B;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  "description": "Core business logic for Cyrus",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -9,11 +9,12 @@
9
9
  "dist"
10
10
  ],
11
11
  "dependencies": {
12
- "@linear/sdk": "^60.0.0",
13
- "cyrus-claude-runner": "0.2.1"
12
+ "@linear/sdk": "^64.0.0",
13
+ "cyrus-claude-runner": "0.2.3"
14
14
  },
15
15
  "devDependencies": {
16
16
  "@types/node": "^20.0.0",
17
+ "fastify": "^5.6.1",
17
18
  "typescript": "^5.3.3",
18
19
  "vitest": "^1.1.0"
19
20
  },
@@ -1,259 +0,0 @@
1
- /**
2
- * Linear webhook types based on actual webhook payloads
3
- * These are the exact structures Linear sends in webhooks
4
- */
5
- import type { LinearDocument } from "@linear/sdk";
6
- /**
7
- * Linear team data from webhooks
8
- */
9
- export interface LinearWebhookTeam {
10
- id: string;
11
- key: string;
12
- name: string;
13
- }
14
- /**
15
- * Linear issue data from webhooks
16
- */
17
- export interface LinearWebhookIssue {
18
- id: string;
19
- title: string;
20
- teamId: string;
21
- team: LinearWebhookTeam;
22
- identifier: string;
23
- url: string;
24
- }
25
- /**
26
- * Linear comment data from webhooks
27
- */
28
- export interface LinearWebhookComment {
29
- id: string;
30
- body: string;
31
- userId: string;
32
- issueId: string;
33
- }
34
- /**
35
- * Linear actor (user) data from webhooks
36
- */
37
- export interface LinearWebhookActor {
38
- id: string;
39
- name: string;
40
- email: string;
41
- url: string;
42
- }
43
- /**
44
- * Base notification structure common to all webhook notifications
45
- */
46
- export interface LinearWebhookNotificationBase {
47
- id: string;
48
- createdAt: string;
49
- updatedAt: string;
50
- archivedAt: string | null;
51
- actorId: string;
52
- externalUserActorId: string | null;
53
- userId: string;
54
- issueId: string;
55
- issue: LinearWebhookIssue;
56
- actor: LinearWebhookActor;
57
- }
58
- /**
59
- * Issue assignment notification
60
- */
61
- export interface LinearIssueAssignedNotification extends LinearWebhookNotificationBase {
62
- type: "issueAssignedToYou";
63
- }
64
- /**
65
- * Issue comment mention notification
66
- */
67
- export interface LinearIssueCommentMentionNotification extends LinearWebhookNotificationBase {
68
- type: "issueCommentMention";
69
- commentId: string;
70
- comment: LinearWebhookComment;
71
- }
72
- /**
73
- * Issue new comment notification (can have parent comment for replies)
74
- */
75
- export interface LinearIssueNewCommentNotification extends LinearWebhookNotificationBase {
76
- type: "issueNewComment";
77
- commentId: string;
78
- comment: LinearWebhookComment;
79
- parentCommentId?: string;
80
- parentComment?: LinearWebhookComment;
81
- }
82
- /**
83
- * Issue unassignment notification
84
- */
85
- export interface LinearIssueUnassignedNotification extends LinearWebhookNotificationBase {
86
- type: "issueUnassignedFromYou";
87
- actorId: string;
88
- externalUserActorId: string | null;
89
- userId: string;
90
- issueId: string;
91
- issue: LinearWebhookIssue;
92
- actor: LinearWebhookActor;
93
- }
94
- /**
95
- * Union of all notification types
96
- */
97
- export type LinearWebhookNotification = LinearIssueAssignedNotification | LinearIssueCommentMentionNotification | LinearIssueNewCommentNotification | LinearIssueUnassignedNotification;
98
- /**
99
- * Issue assignment webhook payload
100
- */
101
- export interface LinearIssueAssignedWebhook {
102
- type: "AppUserNotification";
103
- action: "issueAssignedToYou";
104
- createdAt: string;
105
- organizationId: string;
106
- oauthClientId: string;
107
- appUserId: string;
108
- notification: LinearIssueAssignedNotification;
109
- webhookTimestamp: number;
110
- webhookId: string;
111
- }
112
- /**
113
- * Issue comment mention webhook payload
114
- */
115
- export interface LinearIssueCommentMentionWebhook {
116
- type: "AppUserNotification";
117
- action: "issueCommentMention";
118
- createdAt: string;
119
- organizationId: string;
120
- oauthClientId: string;
121
- appUserId: string;
122
- notification: LinearIssueCommentMentionNotification;
123
- webhookTimestamp: number;
124
- webhookId: string;
125
- }
126
- /**
127
- * Issue new comment webhook payload
128
- */
129
- export interface LinearIssueNewCommentWebhook {
130
- type: "AppUserNotification";
131
- action: "issueNewComment";
132
- createdAt: string;
133
- organizationId: string;
134
- oauthClientId: string;
135
- appUserId: string;
136
- notification: LinearIssueNewCommentNotification;
137
- webhookTimestamp: number;
138
- webhookId: string;
139
- }
140
- /**
141
- * Issue unassignment webhook payload
142
- */
143
- export interface LinearIssueUnassignedWebhook {
144
- type: "AppUserNotification";
145
- action: "issueUnassignedFromYou";
146
- createdAt: string;
147
- organizationId: string;
148
- oauthClientId: string;
149
- appUserId: string;
150
- notification: LinearIssueUnassignedNotification;
151
- webhookTimestamp: number;
152
- webhookId: string;
153
- }
154
- /**
155
- * Creator data in agent session webhooks
156
- */
157
- export interface LinearWebhookCreator {
158
- id: string;
159
- name: string;
160
- email: string;
161
- avatarUrl: string;
162
- url: string;
163
- }
164
- /**
165
- * Agent guidance types - re-exported from @linear/sdk for convenience
166
- */
167
- export type LinearWebhookGuidanceRule = LinearDocument.GuidanceRuleWebhookPayload;
168
- export type LinearWebhookOrganizationOrigin = LinearDocument.OrganizationOriginWebhookPayload;
169
- export type LinearWebhookTeamOrigin = LinearDocument.TeamOriginWebhookPayload;
170
- export type LinearWebhookTeamWithParent = LinearDocument.TeamWithParentWebhookPayload;
171
- /**
172
- * Agent Session data from webhooks
173
- */
174
- export interface LinearWebhookAgentSession {
175
- id: string;
176
- createdAt: string;
177
- updatedAt: string;
178
- archivedAt: string | null;
179
- creatorId: string;
180
- appUserId: string;
181
- commentId: string;
182
- issueId: string;
183
- status: "pending" | "active" | "error" | "awaiting-input" | "complete";
184
- startedAt: string | null;
185
- endedAt: string | null;
186
- type: "commentThread";
187
- summary: string | null;
188
- sourceMetadata: any | null;
189
- organizationId: string;
190
- creator: LinearWebhookCreator;
191
- comment: LinearWebhookComment;
192
- issue: LinearWebhookIssue;
193
- }
194
- /**
195
- * Agent Activity content types
196
- */
197
- export interface LinearWebhookAgentActivityContent {
198
- type: "prompt" | "observation" | "action" | "error" | "elicitation" | "response";
199
- body: string;
200
- }
201
- /**
202
- * Agent Activity data from webhooks
203
- */
204
- export interface LinearWebhookAgentActivity {
205
- id: string;
206
- createdAt: string;
207
- updatedAt: string;
208
- archivedAt: string | null;
209
- agentContextId: string | null;
210
- agentSessionId: string;
211
- sourceCommentId: string;
212
- content: LinearWebhookAgentActivityContent;
213
- signal?: "stop";
214
- }
215
- /**
216
- * Agent Session created webhook payload
217
- */
218
- export interface LinearAgentSessionCreatedWebhook {
219
- type: "AgentSessionEvent";
220
- action: "created";
221
- createdAt: string;
222
- organizationId: string;
223
- oauthClientId: string;
224
- appUserId: string;
225
- agentSession: LinearWebhookAgentSession;
226
- guidance?: LinearWebhookGuidanceRule[];
227
- webhookTimestamp: string;
228
- webhookId: string;
229
- }
230
- /**
231
- * Agent Session prompted webhook payload
232
- */
233
- export interface LinearAgentSessionPromptedWebhook {
234
- type: "AgentSessionEvent";
235
- action: "prompted";
236
- createdAt: string;
237
- organizationId: string;
238
- oauthClientId: string;
239
- appUserId: string;
240
- agentSession: LinearWebhookAgentSession;
241
- agentActivity: LinearWebhookAgentActivity;
242
- guidance?: LinearWebhookGuidanceRule[];
243
- webhookTimestamp: string;
244
- webhookId: string;
245
- }
246
- /**
247
- * Union of all webhook types we handle
248
- */
249
- export type LinearWebhook = LinearIssueAssignedWebhook | LinearIssueCommentMentionWebhook | LinearIssueNewCommentWebhook | LinearIssueUnassignedWebhook | LinearAgentSessionCreatedWebhook | LinearAgentSessionPromptedWebhook;
250
- /**
251
- * Type guards for webhook discrimination
252
- */
253
- export declare function isIssueAssignedWebhook(webhook: LinearWebhook): webhook is LinearIssueAssignedWebhook;
254
- export declare function isIssueCommentMentionWebhook(webhook: LinearWebhook): webhook is LinearIssueCommentMentionWebhook;
255
- export declare function isIssueNewCommentWebhook(webhook: LinearWebhook): webhook is LinearIssueNewCommentWebhook;
256
- export declare function isIssueUnassignedWebhook(webhook: LinearWebhook): webhook is LinearIssueUnassignedWebhook;
257
- export declare function isAgentSessionCreatedWebhook(webhook: LinearWebhook): webhook is LinearAgentSessionCreatedWebhook;
258
- export declare function isAgentSessionPromptedWebhook(webhook: LinearWebhook): webhook is LinearAgentSessionPromptedWebhook;
259
- //# sourceMappingURL=webhook-types.d.ts.map
@@ -1 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,GACpB,OAAO,IAAI,4BAA4B,CAEzC;AAED,wBAAgB,wBAAwB,CACvC,OAAO,EAAE,aAAa,GACpB,OAAO,IAAI,4BAA4B,CAEzC;AAED,wBAAgB,4BAA4B,CAC3C,OAAO,EAAE,aAAa,GACpB,OAAO,IAAI,gCAAgC,CAE7C;AAED,wBAAgB,6BAA6B,CAC5C,OAAO,EAAE,aAAa,GACpB,OAAO,IAAI,iCAAiC,CAE9C"}
@@ -1,26 +0,0 @@
1
- /**
2
- * Linear webhook types based on actual webhook payloads
3
- * These are the exact structures Linear sends in webhooks
4
- */
5
- /**
6
- * Type guards for webhook discrimination
7
- */
8
- export function isIssueAssignedWebhook(webhook) {
9
- return webhook.action === "issueAssignedToYou";
10
- }
11
- export function isIssueCommentMentionWebhook(webhook) {
12
- return webhook.action === "issueCommentMention";
13
- }
14
- export function isIssueNewCommentWebhook(webhook) {
15
- return webhook.action === "issueNewComment";
16
- }
17
- export function isIssueUnassignedWebhook(webhook) {
18
- return webhook.action === "issueUnassignedFromYou";
19
- }
20
- export function isAgentSessionCreatedWebhook(webhook) {
21
- return webhook.type === "AgentSessionEvent" && webhook.action === "created";
22
- }
23
- export function isAgentSessionPromptedWebhook(webhook) {
24
- return webhook.type === "AgentSessionEvent" && webhook.action === "prompted";
25
- }
26
- //# sourceMappingURL=webhook-types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"webhook-types.js","sourceRoot":"","sources":["../src/webhook-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAqSH;;GAEG;AACH,MAAM,UAAU,sBAAsB,CACrC,OAAsB;IAEtB,OAAO,OAAO,CAAC,MAAM,KAAK,oBAAoB,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC3C,OAAsB;IAEtB,OAAO,OAAO,CAAC,MAAM,KAAK,qBAAqB,CAAC;AACjD,CAAC;AAED,MAAM,UAAU,wBAAwB,CACvC,OAAsB;IAEtB,OAAO,OAAO,CAAC,MAAM,KAAK,iBAAiB,CAAC;AAC7C,CAAC;AAED,MAAM,UAAU,wBAAwB,CACvC,OAAsB;IAEtB,OAAO,OAAO,CAAC,MAAM,KAAK,wBAAwB,CAAC;AACpD,CAAC;AAED,MAAM,UAAU,4BAA4B,CAC3C,OAAsB;IAEtB,OAAO,OAAO,CAAC,IAAI,KAAK,mBAAmB,IAAI,OAAO,CAAC,MAAM,KAAK,SAAS,CAAC;AAC7E,CAAC;AAED,MAAM,UAAU,6BAA6B,CAC5C,OAAsB;IAEtB,OAAO,OAAO,CAAC,IAAI,KAAK,mBAAmB,IAAI,OAAO,CAAC,MAAM,KAAK,UAAU,CAAC;AAC9E,CAAC"}