cyrus-core 0.2.21 → 0.2.22
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/CyrusAgentSession.d.ts +31 -3
- package/dist/CyrusAgentSession.d.ts.map +1 -1
- package/dist/PersistenceManager.d.ts +21 -1
- package/dist/PersistenceManager.d.ts.map +1 -1
- package/dist/PersistenceManager.js +93 -8
- package/dist/PersistenceManager.js.map +1 -1
- package/dist/agent-runner-types.d.ts +15 -0
- package/dist/agent-runner-types.d.ts.map +1 -1
- package/dist/config-schemas.d.ts +20 -8
- package/dist/config-schemas.d.ts.map +1 -1
- package/dist/config-schemas.js +21 -4
- package/dist/config-schemas.js.map +1 -1
- package/dist/index.d.ts +6 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/issue-tracker/IAgentEventTransport.d.ts +19 -1
- package/dist/issue-tracker/IAgentEventTransport.d.ts.map +1 -1
- package/dist/logging/ILogger.d.ts +23 -0
- package/dist/logging/ILogger.d.ts.map +1 -0
- package/dist/logging/ILogger.js +9 -0
- package/dist/logging/ILogger.js.map +1 -0
- package/dist/logging/Logger.d.ts +8 -0
- package/dist/logging/Logger.d.ts.map +1 -0
- package/dist/logging/Logger.js +94 -0
- package/dist/logging/Logger.js.map +1 -0
- package/dist/logging/index.d.ts +4 -0
- package/dist/logging/index.d.ts.map +1 -0
- package/dist/logging/index.js +3 -0
- package/dist/logging/index.js.map +1 -0
- package/dist/messages/IMessageTranslator.d.ts +71 -0
- package/dist/messages/IMessageTranslator.d.ts.map +1 -0
- package/dist/messages/IMessageTranslator.js +10 -0
- package/dist/messages/IMessageTranslator.js.map +1 -0
- package/dist/messages/index.d.ts +14 -0
- package/dist/messages/index.d.ts.map +1 -0
- package/dist/messages/index.js +12 -0
- package/dist/messages/index.js.map +1 -0
- package/dist/messages/platform-refs.d.ts +228 -0
- package/dist/messages/platform-refs.d.ts.map +1 -0
- package/dist/messages/platform-refs.js +11 -0
- package/dist/messages/platform-refs.js.map +1 -0
- package/dist/messages/type-guards.d.ts +78 -0
- package/dist/messages/type-guards.d.ts.map +1 -0
- package/dist/messages/type-guards.js +102 -0
- package/dist/messages/type-guards.js.map +1 -0
- package/dist/messages/types.d.ts +256 -0
- package/dist/messages/types.d.ts.map +1 -0
- package/dist/messages/types.js +11 -0
- package/dist/messages/types.js.map +1 -0
- package/package.json +3 -3
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type Guards for Internal Messages
|
|
3
|
+
*
|
|
4
|
+
* This module provides type guard functions for discriminating between
|
|
5
|
+
* different internal message types based on the `action` field.
|
|
6
|
+
*
|
|
7
|
+
* @module messages/type-guards
|
|
8
|
+
*/
|
|
9
|
+
// ============================================================================
|
|
10
|
+
// MESSAGE TYPE GUARDS
|
|
11
|
+
// ============================================================================
|
|
12
|
+
/**
|
|
13
|
+
* Type guard for SessionStartMessage.
|
|
14
|
+
*/
|
|
15
|
+
export function isSessionStartMessage(message) {
|
|
16
|
+
return message.action === "session_start";
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Type guard for UserPromptMessage.
|
|
20
|
+
*/
|
|
21
|
+
export function isUserPromptMessage(message) {
|
|
22
|
+
return message.action === "user_prompt";
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Type guard for StopSignalMessage.
|
|
26
|
+
*/
|
|
27
|
+
export function isStopSignalMessage(message) {
|
|
28
|
+
return message.action === "stop_signal";
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Type guard for ContentUpdateMessage.
|
|
32
|
+
*/
|
|
33
|
+
export function isContentUpdateMessage(message) {
|
|
34
|
+
return message.action === "content_update";
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Type guard for UnassignMessage.
|
|
38
|
+
*/
|
|
39
|
+
export function isUnassignMessage(message) {
|
|
40
|
+
return message.action === "unassign";
|
|
41
|
+
}
|
|
42
|
+
// ============================================================================
|
|
43
|
+
// SOURCE-SPECIFIC TYPE GUARDS
|
|
44
|
+
// ============================================================================
|
|
45
|
+
/**
|
|
46
|
+
* Type guard to check if message is from Linear.
|
|
47
|
+
*/
|
|
48
|
+
export function isLinearMessage(message) {
|
|
49
|
+
return message.source === "linear";
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Type guard to check if message is from GitHub.
|
|
53
|
+
*/
|
|
54
|
+
export function isGitHubMessage(message) {
|
|
55
|
+
return message.source === "github";
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Type guard to check if message is from Slack.
|
|
59
|
+
*/
|
|
60
|
+
export function isSlackMessage(message) {
|
|
61
|
+
return message.source === "slack";
|
|
62
|
+
}
|
|
63
|
+
// ============================================================================
|
|
64
|
+
// PLATFORM DATA TYPE GUARDS
|
|
65
|
+
// ============================================================================
|
|
66
|
+
/**
|
|
67
|
+
* Type guard for Linear platform data in SessionStartMessage.
|
|
68
|
+
*/
|
|
69
|
+
export function hasLinearSessionStartPlatformData(message) {
|
|
70
|
+
return message.source === "linear";
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Type guard for GitHub platform data in SessionStartMessage.
|
|
74
|
+
*/
|
|
75
|
+
export function hasGitHubSessionStartPlatformData(message) {
|
|
76
|
+
return message.source === "github";
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Type guard for Linear platform data in UserPromptMessage.
|
|
80
|
+
*/
|
|
81
|
+
export function hasLinearUserPromptPlatformData(message) {
|
|
82
|
+
return message.source === "linear";
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Type guard for GitHub platform data in UserPromptMessage.
|
|
86
|
+
*/
|
|
87
|
+
export function hasGitHubUserPromptPlatformData(message) {
|
|
88
|
+
return message.source === "github";
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Type guard for Slack platform data in SessionStartMessage.
|
|
92
|
+
*/
|
|
93
|
+
export function hasSlackSessionStartPlatformData(message) {
|
|
94
|
+
return message.source === "slack";
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Type guard for Slack platform data in UserPromptMessage.
|
|
98
|
+
*/
|
|
99
|
+
export function hasSlackUserPromptPlatformData(message) {
|
|
100
|
+
return message.source === "slack";
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=type-guards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"type-guards.js","sourceRoot":"","sources":["../../src/messages/type-guards.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAiBH,+EAA+E;AAC/E,sBAAsB;AACtB,+EAA+E;AAE/E;;GAEG;AACH,MAAM,UAAU,qBAAqB,CACpC,OAAwB;IAExB,OAAO,OAAO,CAAC,MAAM,KAAK,eAAe,CAAC;AAC3C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAClC,OAAwB;IAExB,OAAO,OAAO,CAAC,MAAM,KAAK,aAAa,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAClC,OAAwB;IAExB,OAAO,OAAO,CAAC,MAAM,KAAK,aAAa,CAAC;AACzC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,sBAAsB,CACrC,OAAwB;IAExB,OAAO,OAAO,CAAC,MAAM,KAAK,gBAAgB,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAChC,OAAwB;IAExB,OAAO,OAAO,CAAC,MAAM,KAAK,UAAU,CAAC;AACtC,CAAC;AAED,+EAA+E;AAC/E,8BAA8B;AAC9B,+EAA+E;AAE/E;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,OAAwB;IACvD,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,OAAwB;IACvD,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,OAAwB;IACtD,OAAO,OAAO,CAAC,MAAM,KAAK,OAAO,CAAC;AACnC,CAAC;AAED,+EAA+E;AAC/E,4BAA4B;AAC5B,+EAA+E;AAE/E;;GAEG;AACH,MAAM,UAAU,iCAAiC,CAChD,OAA4B;IAI5B,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,iCAAiC,CAChD,OAA4B;IAI5B,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,+BAA+B,CAC9C,OAA0B;IAI1B,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,+BAA+B,CAC9C,OAA0B;IAI1B,OAAO,OAAO,CAAC,MAAM,KAAK,QAAQ,CAAC;AACpC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gCAAgC,CAC/C,OAA4B;IAI5B,OAAO,OAAO,CAAC,MAAM,KAAK,OAAO,CAAC;AACnC,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,8BAA8B,CAC7C,OAA0B;IAI1B,OAAO,OAAO,CAAC,MAAM,KAAK,OAAO,CAAC;AACnC,CAAC"}
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal Message Bus Types
|
|
3
|
+
*
|
|
4
|
+
* This module defines the unified internal message types that all external
|
|
5
|
+
* webhook sources (Linear, GitHub, Slack, etc.) translate to. This enables
|
|
6
|
+
* the EdgeWorker to process events from any platform using a consistent interface.
|
|
7
|
+
*
|
|
8
|
+
* @module messages/types
|
|
9
|
+
*/
|
|
10
|
+
import type { GitHubPlatformRef, LinearPlatformRef, SlackPlatformRef } from "./platform-refs.js";
|
|
11
|
+
/**
|
|
12
|
+
* Message action discriminator.
|
|
13
|
+
* This is the primary discriminator for the internal message union type.
|
|
14
|
+
*/
|
|
15
|
+
export type MessageAction = "session_start" | "user_prompt" | "stop_signal" | "content_update" | "unassign";
|
|
16
|
+
/**
|
|
17
|
+
* Platform source identifier.
|
|
18
|
+
*/
|
|
19
|
+
export type MessageSource = "linear" | "github" | "slack";
|
|
20
|
+
/**
|
|
21
|
+
* Message author information.
|
|
22
|
+
*/
|
|
23
|
+
export interface MessageAuthor {
|
|
24
|
+
/** Platform user ID */
|
|
25
|
+
id: string;
|
|
26
|
+
/** Display name */
|
|
27
|
+
name: string;
|
|
28
|
+
/** Email address (if available) */
|
|
29
|
+
email?: string;
|
|
30
|
+
/** Avatar URL (if available) */
|
|
31
|
+
avatarUrl?: string;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Common fields shared by all internal messages.
|
|
35
|
+
*/
|
|
36
|
+
export interface InternalMessageBase {
|
|
37
|
+
/** Unique message ID (generated from webhook delivery ID or UUID) */
|
|
38
|
+
id: string;
|
|
39
|
+
/** Platform source identifier */
|
|
40
|
+
source: MessageSource;
|
|
41
|
+
/** ISO timestamp when the message was received */
|
|
42
|
+
receivedAt: string;
|
|
43
|
+
/** Workspace/organization identifier */
|
|
44
|
+
organizationId: string;
|
|
45
|
+
/**
|
|
46
|
+
* Session identifier for grouping related messages.
|
|
47
|
+
* - Linear: agentSession.id
|
|
48
|
+
* - GitHub: owner/repo#pr (e.g., "ceedaragents/cyrus#123")
|
|
49
|
+
* - Slack: channel:thread_ts
|
|
50
|
+
*/
|
|
51
|
+
sessionKey: string;
|
|
52
|
+
/** Work item ID (issue ID, PR ID, etc.) */
|
|
53
|
+
workItemId: string;
|
|
54
|
+
/** Human-readable work item identifier (e.g., "DEF-123", "owner/repo#456") */
|
|
55
|
+
workItemIdentifier: string;
|
|
56
|
+
/** Message author */
|
|
57
|
+
author?: MessageAuthor;
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Guidance rule attached to a session start.
|
|
61
|
+
*/
|
|
62
|
+
export interface GuidanceItem {
|
|
63
|
+
/** Guidance rule ID */
|
|
64
|
+
id: string;
|
|
65
|
+
/** Guidance prompt text */
|
|
66
|
+
prompt: string;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Linear-specific platform data for session start.
|
|
70
|
+
*/
|
|
71
|
+
export interface LinearSessionStartPlatformData {
|
|
72
|
+
/** Agent session from Linear */
|
|
73
|
+
agentSession: LinearPlatformRef["agentSession"];
|
|
74
|
+
/** Issue data */
|
|
75
|
+
issue: LinearPlatformRef["issue"];
|
|
76
|
+
/** Initiating comment (if any) */
|
|
77
|
+
comment?: LinearPlatformRef["comment"];
|
|
78
|
+
/** Guidance rules */
|
|
79
|
+
guidance?: GuidanceItem[];
|
|
80
|
+
/** Whether this was triggered by an @ mention */
|
|
81
|
+
isMentionTriggered: boolean;
|
|
82
|
+
/** Linear API token for MCP access */
|
|
83
|
+
linearApiToken?: string;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* GitHub-specific platform data for session start.
|
|
87
|
+
*/
|
|
88
|
+
export interface GitHubSessionStartPlatformData {
|
|
89
|
+
/** The event type that triggered this session */
|
|
90
|
+
eventType: "issue_comment" | "pull_request_review_comment";
|
|
91
|
+
/** Repository information */
|
|
92
|
+
repository: GitHubPlatformRef["repository"];
|
|
93
|
+
/** Pull request information (if available) */
|
|
94
|
+
pullRequest?: GitHubPlatformRef["pullRequest"];
|
|
95
|
+
/** Issue information (for issue comments) */
|
|
96
|
+
issue?: GitHubPlatformRef["issue"];
|
|
97
|
+
/** The comment that triggered this session */
|
|
98
|
+
comment: GitHubPlatformRef["comment"];
|
|
99
|
+
/** GitHub installation token for API access */
|
|
100
|
+
installationToken?: string;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Slack-specific platform data for session start.
|
|
104
|
+
*/
|
|
105
|
+
export interface SlackSessionStartPlatformData {
|
|
106
|
+
/** Channel where the mention occurred */
|
|
107
|
+
channel: SlackPlatformRef["channel"];
|
|
108
|
+
/** Thread information */
|
|
109
|
+
thread: SlackPlatformRef["thread"];
|
|
110
|
+
/** The message that triggered this session */
|
|
111
|
+
message: SlackPlatformRef["message"];
|
|
112
|
+
/** Slack Bot token for API access */
|
|
113
|
+
slackBotToken?: string;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Session start message - initiates a new agent session.
|
|
117
|
+
* Triggered by: Linear delegation, PR mention, thread start, etc.
|
|
118
|
+
*/
|
|
119
|
+
export interface SessionStartMessage extends InternalMessageBase {
|
|
120
|
+
action: "session_start";
|
|
121
|
+
/** Initial prompt/request content */
|
|
122
|
+
initialPrompt: string;
|
|
123
|
+
/** Issue/PR title */
|
|
124
|
+
title: string;
|
|
125
|
+
/** Issue/PR description/body (if any) */
|
|
126
|
+
description?: string;
|
|
127
|
+
/** Labels attached to the work item */
|
|
128
|
+
labels?: string[];
|
|
129
|
+
/** Platform-specific data preserved for handlers that need it */
|
|
130
|
+
platformData: LinearSessionStartPlatformData | GitHubSessionStartPlatformData | SlackSessionStartPlatformData;
|
|
131
|
+
}
|
|
132
|
+
/**
|
|
133
|
+
* Linear-specific platform data for user prompt.
|
|
134
|
+
*/
|
|
135
|
+
export interface LinearUserPromptPlatformData {
|
|
136
|
+
/** Agent activity that contains the prompt */
|
|
137
|
+
agentActivity: LinearPlatformRef["agentActivity"];
|
|
138
|
+
/** Agent session reference */
|
|
139
|
+
agentSession: LinearPlatformRef["agentSession"];
|
|
140
|
+
}
|
|
141
|
+
/**
|
|
142
|
+
* GitHub-specific platform data for user prompt.
|
|
143
|
+
*/
|
|
144
|
+
export interface GitHubUserPromptPlatformData {
|
|
145
|
+
/** The event type */
|
|
146
|
+
eventType: "issue_comment" | "pull_request_review_comment";
|
|
147
|
+
/** Repository information */
|
|
148
|
+
repository: GitHubPlatformRef["repository"];
|
|
149
|
+
/** The comment containing the prompt */
|
|
150
|
+
comment: GitHubPlatformRef["comment"];
|
|
151
|
+
/** GitHub installation token for API access */
|
|
152
|
+
installationToken?: string;
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Slack-specific platform data for user prompt.
|
|
156
|
+
*/
|
|
157
|
+
export interface SlackUserPromptPlatformData {
|
|
158
|
+
/** Channel where the message was sent */
|
|
159
|
+
channel: SlackPlatformRef["channel"];
|
|
160
|
+
/** Thread information */
|
|
161
|
+
thread: SlackPlatformRef["thread"];
|
|
162
|
+
/** The message containing the prompt */
|
|
163
|
+
message: SlackPlatformRef["message"];
|
|
164
|
+
/** Slack Bot token for API access */
|
|
165
|
+
slackBotToken?: string;
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* User prompt message - a user message during an active session.
|
|
169
|
+
* Triggered by: Mid-session comments, follow-up questions, etc.
|
|
170
|
+
*/
|
|
171
|
+
export interface UserPromptMessage extends InternalMessageBase {
|
|
172
|
+
action: "user_prompt";
|
|
173
|
+
/** The user's message content */
|
|
174
|
+
content: string;
|
|
175
|
+
/** Platform-specific data */
|
|
176
|
+
platformData: LinearUserPromptPlatformData | GitHubUserPromptPlatformData | SlackUserPromptPlatformData;
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Linear-specific platform data for stop signal.
|
|
180
|
+
*/
|
|
181
|
+
export interface LinearStopSignalPlatformData {
|
|
182
|
+
/** Agent activity with the stop signal */
|
|
183
|
+
agentActivity: LinearPlatformRef["agentActivity"];
|
|
184
|
+
/** Agent session reference */
|
|
185
|
+
agentSession: LinearPlatformRef["agentSession"];
|
|
186
|
+
}
|
|
187
|
+
/**
|
|
188
|
+
* Stop signal message - request to terminate the current session.
|
|
189
|
+
* Triggered by: User clicks "Stop" in Linear, explicit stop command, etc.
|
|
190
|
+
*/
|
|
191
|
+
export interface StopSignalMessage extends InternalMessageBase {
|
|
192
|
+
action: "stop_signal";
|
|
193
|
+
/** Reason for stopping (if provided) */
|
|
194
|
+
reason?: string;
|
|
195
|
+
/** Platform-specific data */
|
|
196
|
+
platformData: LinearStopSignalPlatformData;
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Changes detected in the content update.
|
|
200
|
+
*/
|
|
201
|
+
export interface ContentChanges {
|
|
202
|
+
/** Previous title (if changed) */
|
|
203
|
+
previousTitle?: string;
|
|
204
|
+
/** New title (if changed) */
|
|
205
|
+
newTitle?: string;
|
|
206
|
+
/** Previous description (if changed) */
|
|
207
|
+
previousDescription?: string;
|
|
208
|
+
/** New description (if changed) */
|
|
209
|
+
newDescription?: string;
|
|
210
|
+
/** Whether attachments changed */
|
|
211
|
+
attachmentsChanged?: boolean;
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Linear-specific platform data for content update.
|
|
215
|
+
*/
|
|
216
|
+
export interface LinearContentUpdatePlatformData {
|
|
217
|
+
/** Issue data */
|
|
218
|
+
issue: LinearPlatformRef["issue"];
|
|
219
|
+
/** The updatedFrom object from the webhook */
|
|
220
|
+
updatedFrom?: Record<string, unknown>;
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Content update message - work item content was modified.
|
|
224
|
+
* Triggered by: Issue title/description edit, PR body edit, etc.
|
|
225
|
+
*/
|
|
226
|
+
export interface ContentUpdateMessage extends InternalMessageBase {
|
|
227
|
+
action: "content_update";
|
|
228
|
+
/** What changed */
|
|
229
|
+
changes: ContentChanges;
|
|
230
|
+
/** Platform-specific data */
|
|
231
|
+
platformData: LinearContentUpdatePlatformData;
|
|
232
|
+
}
|
|
233
|
+
/**
|
|
234
|
+
* Linear-specific platform data for unassign.
|
|
235
|
+
*/
|
|
236
|
+
export interface LinearUnassignPlatformData {
|
|
237
|
+
/** Issue that was unassigned */
|
|
238
|
+
issue: LinearPlatformRef["issue"];
|
|
239
|
+
/** URL of the issue */
|
|
240
|
+
issueUrl?: string;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* Unassign message - work item was unassigned from the agent.
|
|
244
|
+
* Triggered by: User unassigns issue, removes agent from PR, etc.
|
|
245
|
+
*/
|
|
246
|
+
export interface UnassignMessage extends InternalMessageBase {
|
|
247
|
+
action: "unassign";
|
|
248
|
+
/** Platform-specific data */
|
|
249
|
+
platformData: LinearUnassignPlatformData;
|
|
250
|
+
}
|
|
251
|
+
/**
|
|
252
|
+
* Discriminated union of all internal message types.
|
|
253
|
+
* Use the `action` field as the discriminator.
|
|
254
|
+
*/
|
|
255
|
+
export type InternalMessage = SessionStartMessage | UserPromptMessage | StopSignalMessage | ContentUpdateMessage | UnassignMessage;
|
|
256
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/messages/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EACX,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,MAAM,oBAAoB,CAAC;AAM5B;;;GAGG;AACH,MAAM,MAAM,aAAa,GACtB,eAAe,GACf,aAAa,GACb,aAAa,GACb,gBAAgB,GAChB,UAAU,CAAC;AAEd;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,QAAQ,GAAG,QAAQ,GAAG,OAAO,CAAC;AAM1D;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B,uBAAuB;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,mBAAmB;IACnB,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,gCAAgC;IAChC,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB;AAMD;;GAEG;AACH,MAAM,WAAW,mBAAmB;IACnC,qEAAqE;IACrE,EAAE,EAAE,MAAM,CAAC;IACX,iCAAiC;IACjC,MAAM,EAAE,aAAa,CAAC;IACtB,kDAAkD;IAClD,UAAU,EAAE,MAAM,CAAC;IACnB,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,2CAA2C;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IACzB,mBAAmB;IACnB,OAAO,EAAE,cAAc,CAAC;IACxB,6BAA6B;IAC7B,YAAY,EAAE,+BAA+B,CAAC;CAC9C;AAMD;;GAEG;AACH,MAAM,WAAW,0BAA0B;IAC1C,gCAAgC;IAChC,KAAK,EAAE,iBAAiB,CAAC,OAAO,CAAC,CAAC;IAClC,uBAAuB;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,eAAgB,SAAQ,mBAAmB;IAC3D,MAAM,EAAE,UAAU,CAAC;IACnB,6BAA6B;IAC7B,YAAY,EAAE,0BAA0B,CAAC;CACzC;AAMD;;;GAGG;AACH,MAAM,MAAM,eAAe,GACxB,mBAAmB,GACnB,iBAAiB,GACjB,iBAAiB,GACjB,oBAAoB,GACpB,eAAe,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Internal Message Bus Types
|
|
3
|
+
*
|
|
4
|
+
* This module defines the unified internal message types that all external
|
|
5
|
+
* webhook sources (Linear, GitHub, Slack, etc.) translate to. This enables
|
|
6
|
+
* the EdgeWorker to process events from any platform using a consistent interface.
|
|
7
|
+
*
|
|
8
|
+
* @module messages/types
|
|
9
|
+
*/
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/messages/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cyrus-core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.22",
|
|
4
4
|
"description": "Core business logic for Cyrus",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@anthropic-ai/claude-agent-sdk": "^0.2.
|
|
12
|
+
"@anthropic-ai/claude-agent-sdk": "^0.2.47",
|
|
13
13
|
"@linear/sdk": "^64.0.0",
|
|
14
14
|
"zod": "^4.3.6"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@types/node": "^20.0.0",
|
|
18
|
-
"fastify": "^5.
|
|
18
|
+
"fastify": "^5.7.3",
|
|
19
19
|
"typescript": "^5.3.3",
|
|
20
20
|
"vitest": "^3.1.4"
|
|
21
21
|
},
|