sylas-edge-worker 0.2.21
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/README.md +293 -0
- package/dist/ActivityPoster.d.ts +15 -0
- package/dist/ActivityPoster.d.ts.map +1 -0
- package/dist/ActivityPoster.js +194 -0
- package/dist/ActivityPoster.js.map +1 -0
- package/dist/AgentSessionManager.d.ts +280 -0
- package/dist/AgentSessionManager.d.ts.map +1 -0
- package/dist/AgentSessionManager.js +1412 -0
- package/dist/AgentSessionManager.js.map +1 -0
- package/dist/AskUserQuestionHandler.d.ts +97 -0
- package/dist/AskUserQuestionHandler.d.ts.map +1 -0
- package/dist/AskUserQuestionHandler.js +206 -0
- package/dist/AskUserQuestionHandler.js.map +1 -0
- package/dist/AttachmentService.d.ts +69 -0
- package/dist/AttachmentService.d.ts.map +1 -0
- package/dist/AttachmentService.js +369 -0
- package/dist/AttachmentService.js.map +1 -0
- package/dist/ChatSessionHandler.d.ts +87 -0
- package/dist/ChatSessionHandler.d.ts.map +1 -0
- package/dist/ChatSessionHandler.js +231 -0
- package/dist/ChatSessionHandler.js.map +1 -0
- package/dist/ConfigManager.d.ts +91 -0
- package/dist/ConfigManager.d.ts.map +1 -0
- package/dist/ConfigManager.js +227 -0
- package/dist/ConfigManager.js.map +1 -0
- package/dist/EdgeWorker.d.ts +670 -0
- package/dist/EdgeWorker.d.ts.map +1 -0
- package/dist/EdgeWorker.js +3801 -0
- package/dist/EdgeWorker.js.map +1 -0
- package/dist/GitService.d.ts +39 -0
- package/dist/GitService.d.ts.map +1 -0
- package/dist/GitService.js +432 -0
- package/dist/GitService.js.map +1 -0
- package/dist/GlobalSessionRegistry.d.ts +142 -0
- package/dist/GlobalSessionRegistry.d.ts.map +1 -0
- package/dist/GlobalSessionRegistry.js +254 -0
- package/dist/GlobalSessionRegistry.js.map +1 -0
- package/dist/PromptBuilder.d.ts +175 -0
- package/dist/PromptBuilder.d.ts.map +1 -0
- package/dist/PromptBuilder.js +884 -0
- package/dist/PromptBuilder.js.map +1 -0
- package/dist/RepositoryRouter.d.ts +152 -0
- package/dist/RepositoryRouter.d.ts.map +1 -0
- package/dist/RepositoryRouter.js +480 -0
- package/dist/RepositoryRouter.js.map +1 -0
- package/dist/RunnerSelectionService.d.ts +62 -0
- package/dist/RunnerSelectionService.d.ts.map +1 -0
- package/dist/RunnerSelectionService.js +379 -0
- package/dist/RunnerSelectionService.js.map +1 -0
- package/dist/SharedApplicationServer.d.ts +107 -0
- package/dist/SharedApplicationServer.d.ts.map +1 -0
- package/dist/SharedApplicationServer.js +247 -0
- package/dist/SharedApplicationServer.js.map +1 -0
- package/dist/SharedWebhookServer.d.ts +39 -0
- package/dist/SharedWebhookServer.d.ts.map +1 -0
- package/dist/SharedWebhookServer.js +150 -0
- package/dist/SharedWebhookServer.js.map +1 -0
- package/dist/SlackChatAdapter.d.ts +25 -0
- package/dist/SlackChatAdapter.d.ts.map +1 -0
- package/dist/SlackChatAdapter.js +143 -0
- package/dist/SlackChatAdapter.js.map +1 -0
- package/dist/UserAccessControl.d.ts +69 -0
- package/dist/UserAccessControl.d.ts.map +1 -0
- package/dist/UserAccessControl.js +171 -0
- package/dist/UserAccessControl.js.map +1 -0
- package/dist/WorktreeIncludeService.d.ts +32 -0
- package/dist/WorktreeIncludeService.d.ts.map +1 -0
- package/dist/WorktreeIncludeService.js +123 -0
- package/dist/WorktreeIncludeService.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/label-prompt-template.md +27 -0
- package/dist/procedures/ProcedureAnalyzer.d.ts +69 -0
- package/dist/procedures/ProcedureAnalyzer.d.ts.map +1 -0
- package/dist/procedures/ProcedureAnalyzer.js +271 -0
- package/dist/procedures/ProcedureAnalyzer.js.map +1 -0
- package/dist/procedures/index.d.ts +7 -0
- package/dist/procedures/index.d.ts.map +1 -0
- package/dist/procedures/index.js +7 -0
- package/dist/procedures/index.js.map +1 -0
- package/dist/procedures/registry.d.ts +156 -0
- package/dist/procedures/registry.d.ts.map +1 -0
- package/dist/procedures/registry.js +240 -0
- package/dist/procedures/registry.js.map +1 -0
- package/dist/procedures/types.d.ts +103 -0
- package/dist/procedures/types.d.ts.map +1 -0
- package/dist/procedures/types.js +5 -0
- package/dist/procedures/types.js.map +1 -0
- package/dist/prompt-assembly/types.d.ts +80 -0
- package/dist/prompt-assembly/types.d.ts.map +1 -0
- package/dist/prompt-assembly/types.js +8 -0
- package/dist/prompt-assembly/types.js.map +1 -0
- package/dist/prompts/builder.md +191 -0
- package/dist/prompts/debugger.md +128 -0
- package/dist/prompts/graphite-orchestrator.md +362 -0
- package/dist/prompts/orchestrator.md +290 -0
- package/dist/prompts/scoper.md +95 -0
- package/dist/prompts/standard-issue-assigned-user-prompt.md +33 -0
- package/dist/prompts/subroutines/changelog-update.md +79 -0
- package/dist/prompts/subroutines/coding-activity.md +12 -0
- package/dist/prompts/subroutines/concise-summary.md +67 -0
- package/dist/prompts/subroutines/debugger-fix.md +92 -0
- package/dist/prompts/subroutines/debugger-reproduction.md +74 -0
- package/dist/prompts/subroutines/full-delegation.md +68 -0
- package/dist/prompts/subroutines/get-approval.md +175 -0
- package/dist/prompts/subroutines/gh-pr.md +80 -0
- package/dist/prompts/subroutines/git-commit.md +37 -0
- package/dist/prompts/subroutines/plan-summary.md +21 -0
- package/dist/prompts/subroutines/preparation.md +16 -0
- package/dist/prompts/subroutines/question-answer.md +8 -0
- package/dist/prompts/subroutines/question-investigation.md +8 -0
- package/dist/prompts/subroutines/release-execution.md +81 -0
- package/dist/prompts/subroutines/release-summary.md +60 -0
- package/dist/prompts/subroutines/user-testing-summary.md +87 -0
- package/dist/prompts/subroutines/user-testing.md +48 -0
- package/dist/prompts/subroutines/validation-fixer.md +56 -0
- package/dist/prompts/subroutines/verbose-summary.md +46 -0
- package/dist/prompts/subroutines/verifications.md +77 -0
- package/dist/prompts/todolist-system-prompt-extension.md +15 -0
- package/dist/sinks/IActivitySink.d.ts +60 -0
- package/dist/sinks/IActivitySink.d.ts.map +1 -0
- package/dist/sinks/IActivitySink.js +2 -0
- package/dist/sinks/IActivitySink.js.map +1 -0
- package/dist/sinks/LinearActivitySink.d.ts +69 -0
- package/dist/sinks/LinearActivitySink.d.ts.map +1 -0
- package/dist/sinks/LinearActivitySink.js +111 -0
- package/dist/sinks/LinearActivitySink.js.map +1 -0
- package/dist/sinks/NoopActivitySink.d.ts +13 -0
- package/dist/sinks/NoopActivitySink.d.ts.map +1 -0
- package/dist/sinks/NoopActivitySink.js +17 -0
- package/dist/sinks/NoopActivitySink.js.map +1 -0
- package/dist/sinks/index.d.ts +9 -0
- package/dist/sinks/index.d.ts.map +1 -0
- package/dist/sinks/index.js +8 -0
- package/dist/sinks/index.js.map +1 -0
- package/dist/types.d.ts +32 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/dist/validation/ValidationLoopController.d.ts +54 -0
- package/dist/validation/ValidationLoopController.d.ts.map +1 -0
- package/dist/validation/ValidationLoopController.js +242 -0
- package/dist/validation/ValidationLoopController.js.map +1 -0
- package/dist/validation/index.d.ts +7 -0
- package/dist/validation/index.d.ts.map +1 -0
- package/dist/validation/index.js +7 -0
- package/dist/validation/index.js.map +1 -0
- package/dist/validation/types.d.ts +82 -0
- package/dist/validation/types.d.ts.map +1 -0
- package/dist/validation/types.js +29 -0
- package/dist/validation/types.js.map +1 -0
- package/label-prompt-template.md +27 -0
- package/package.json +56 -0
- package/prompt-template.md +116 -0
- package/prompts/builder.md +191 -0
- package/prompts/debugger.md +128 -0
- package/prompts/graphite-orchestrator.md +362 -0
- package/prompts/orchestrator.md +290 -0
- package/prompts/scoper.md +95 -0
- package/prompts/standard-issue-assigned-user-prompt.md +33 -0
- package/prompts/todolist-system-prompt-extension.md +15 -0
|
@@ -0,0 +1,670 @@
|
|
|
1
|
+
import { EventEmitter } from "node:events";
|
|
2
|
+
import type { EdgeWorkerConfig, Issue, RepositoryConfig, SerializableEdgeWorkerState, SylasAgentSession } from "sylas-core";
|
|
3
|
+
import { AgentSessionManager } from "./AgentSessionManager.js";
|
|
4
|
+
import { RepositoryRouter } from "./RepositoryRouter.js";
|
|
5
|
+
import type { EdgeWorkerEvents } from "./types.js";
|
|
6
|
+
export declare interface EdgeWorker {
|
|
7
|
+
on<K extends keyof EdgeWorkerEvents>(event: K, listener: EdgeWorkerEvents[K]): this;
|
|
8
|
+
emit<K extends keyof EdgeWorkerEvents>(event: K, ...args: Parameters<EdgeWorkerEvents[K]>): boolean;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Unified edge worker that **orchestrates**
|
|
12
|
+
* capturing Linear webhooks,
|
|
13
|
+
* managing Claude Code processes, and
|
|
14
|
+
* processes results through to Linear Agent Activity Sessions
|
|
15
|
+
*/
|
|
16
|
+
export declare class EdgeWorker extends EventEmitter {
|
|
17
|
+
private config;
|
|
18
|
+
private repositories;
|
|
19
|
+
private agentSessionManagers;
|
|
20
|
+
private issueTrackers;
|
|
21
|
+
private linearEventTransport;
|
|
22
|
+
private gitHubEventTransport;
|
|
23
|
+
private slackEventTransport;
|
|
24
|
+
private chatSessionHandler;
|
|
25
|
+
private gitHubCommentService;
|
|
26
|
+
private cliRPCServer;
|
|
27
|
+
private configUpdater;
|
|
28
|
+
private persistenceManager;
|
|
29
|
+
private sharedApplicationServer;
|
|
30
|
+
private sylasHome;
|
|
31
|
+
private globalSessionRegistry;
|
|
32
|
+
private childToParentAgentSession;
|
|
33
|
+
private procedureAnalyzer;
|
|
34
|
+
private configPath?;
|
|
35
|
+
/** @internal - Exposed for testing only */
|
|
36
|
+
repositoryRouter: RepositoryRouter;
|
|
37
|
+
private gitService;
|
|
38
|
+
private activeWebhookCount;
|
|
39
|
+
/** Handler for AskUserQuestion tool invocations via Linear select signal */
|
|
40
|
+
private askUserQuestionHandler;
|
|
41
|
+
/** User access control for whitelisting/blacklisting Linear users */
|
|
42
|
+
private userAccessControl;
|
|
43
|
+
private logger;
|
|
44
|
+
private attachmentService;
|
|
45
|
+
private runnerSelectionService;
|
|
46
|
+
private activityPoster;
|
|
47
|
+
private configManager;
|
|
48
|
+
private promptBuilder;
|
|
49
|
+
private readonly sylasToolsMcpEndpoint;
|
|
50
|
+
private sylasToolsMcpRegistered;
|
|
51
|
+
private sylasToolsMcpContexts;
|
|
52
|
+
private sylasToolsMcpRequestContext;
|
|
53
|
+
private sylasToolsMcpSessions;
|
|
54
|
+
constructor(config: EdgeWorkerConfig);
|
|
55
|
+
/**
|
|
56
|
+
* Start the edge worker
|
|
57
|
+
*/
|
|
58
|
+
start(): Promise<void>;
|
|
59
|
+
/**
|
|
60
|
+
* Initialize and register components (routes) before server starts
|
|
61
|
+
*/
|
|
62
|
+
private initializeComponents;
|
|
63
|
+
/**
|
|
64
|
+
* Register the /status endpoint for checking if the process is busy or idle
|
|
65
|
+
* This endpoint is used to determine if the process can be safely restarted
|
|
66
|
+
*/
|
|
67
|
+
private registerStatusEndpoint;
|
|
68
|
+
/**
|
|
69
|
+
* Register the /version endpoint for CLI version information
|
|
70
|
+
* This endpoint is used by dashboards to display the installed CLI version
|
|
71
|
+
*/
|
|
72
|
+
private registerVersionEndpoint;
|
|
73
|
+
/**
|
|
74
|
+
* Register the GitHub event transport for receiving forwarded GitHub webhooks from CYHOST.
|
|
75
|
+
* This creates a /github-webhook endpoint that handles @sylasagent mentions on GitHub PRs.
|
|
76
|
+
*/
|
|
77
|
+
private registerGitHubEventTransport;
|
|
78
|
+
/**
|
|
79
|
+
* Register the Slack event transport for receiving forwarded Slack webhooks from CYHOST.
|
|
80
|
+
* This creates a /slack-webhook endpoint that handles @mention events from Slack.
|
|
81
|
+
*/
|
|
82
|
+
private registerSlackEventTransport;
|
|
83
|
+
/**
|
|
84
|
+
* Handle a GitHub webhook event (forwarded from CYHOST).
|
|
85
|
+
*
|
|
86
|
+
* This creates a new session for the GitHub PR comment, checks out the PR branch
|
|
87
|
+
* via git worktree, and processes the comment as a task prompt.
|
|
88
|
+
*/
|
|
89
|
+
private handleGitHubWebhook;
|
|
90
|
+
/**
|
|
91
|
+
* Find a repository configuration that matches a GitHub repository URL.
|
|
92
|
+
* Matches against the githubUrl field in repository config.
|
|
93
|
+
*/
|
|
94
|
+
private findRepositoryByGitHubUrl;
|
|
95
|
+
/**
|
|
96
|
+
* Fetch the PR branch ref for an issue_comment webhook.
|
|
97
|
+
* For issue_comment events, the branch ref is not in the payload
|
|
98
|
+
* and must be fetched from the GitHub API.
|
|
99
|
+
*/
|
|
100
|
+
private fetchPRBranchRef;
|
|
101
|
+
/**
|
|
102
|
+
* Create a git worktree for a GitHub PR branch.
|
|
103
|
+
* If the worktree already exists for this branch, reuse it.
|
|
104
|
+
*/
|
|
105
|
+
private createGitHubWorkspace;
|
|
106
|
+
/**
|
|
107
|
+
* Build a system prompt for a GitHub PR comment session.
|
|
108
|
+
*/
|
|
109
|
+
private buildGitHubSystemPrompt;
|
|
110
|
+
/**
|
|
111
|
+
* Post a reply back to the GitHub PR comment after the session completes.
|
|
112
|
+
*/
|
|
113
|
+
private postGitHubReply;
|
|
114
|
+
/**
|
|
115
|
+
* Compute the current status of the Sylas process
|
|
116
|
+
* @returns "idle" if the process can be safely restarted, "busy" if work is in progress
|
|
117
|
+
*/
|
|
118
|
+
private computeStatus;
|
|
119
|
+
/**
|
|
120
|
+
* Stop the edge worker
|
|
121
|
+
*/
|
|
122
|
+
stop(): Promise<void>;
|
|
123
|
+
/**
|
|
124
|
+
* Set the config file path for dynamic reloading
|
|
125
|
+
*/
|
|
126
|
+
setConfigPath(configPath: string): void;
|
|
127
|
+
/**
|
|
128
|
+
* Handle resuming a parent session when a child session completes
|
|
129
|
+
* This is the core logic used by the resume parent session callback
|
|
130
|
+
* Extracted to reduce duplication between constructor and addNewRepositories
|
|
131
|
+
*/
|
|
132
|
+
private handleResumeParentSession;
|
|
133
|
+
/**
|
|
134
|
+
* Handle subroutine transition when a subroutine completes
|
|
135
|
+
* This is triggered by the AgentSessionManager's 'subroutineComplete' event
|
|
136
|
+
*/
|
|
137
|
+
private handleSubroutineTransition;
|
|
138
|
+
/**
|
|
139
|
+
* Handle validation loop fixer - run the fixer prompt
|
|
140
|
+
*/
|
|
141
|
+
private handleValidationLoopFixer;
|
|
142
|
+
/**
|
|
143
|
+
* Handle validation loop rerun - re-run the verifications subroutine
|
|
144
|
+
*/
|
|
145
|
+
private handleValidationLoopRerun;
|
|
146
|
+
/**
|
|
147
|
+
* Add new repositories to the running EdgeWorker
|
|
148
|
+
*/
|
|
149
|
+
private addNewRepositories;
|
|
150
|
+
/**
|
|
151
|
+
* Update existing repositories
|
|
152
|
+
*/
|
|
153
|
+
private updateModifiedRepositories;
|
|
154
|
+
/**
|
|
155
|
+
* Remove deleted repositories
|
|
156
|
+
*/
|
|
157
|
+
private removeDeletedRepositories;
|
|
158
|
+
/**
|
|
159
|
+
* Handle errors
|
|
160
|
+
*/
|
|
161
|
+
private handleError;
|
|
162
|
+
/**
|
|
163
|
+
* Get cached repository for an issue (used by agentSessionPrompted Branch 3)
|
|
164
|
+
*/
|
|
165
|
+
private getCachedRepository;
|
|
166
|
+
/**
|
|
167
|
+
* Handle webhook events from proxy - main router for all webhooks
|
|
168
|
+
*/
|
|
169
|
+
private handleWebhook;
|
|
170
|
+
/**
|
|
171
|
+
* Handle unified internal messages from the message bus.
|
|
172
|
+
* This is the new entry point for processing events from all platforms.
|
|
173
|
+
*
|
|
174
|
+
* Note: For now, this runs in parallel with legacy webhook handlers.
|
|
175
|
+
* Once migration is complete, legacy handlers will be removed.
|
|
176
|
+
*/
|
|
177
|
+
private handleMessage;
|
|
178
|
+
/**
|
|
179
|
+
* Handle session start message (unified handler for session creation).
|
|
180
|
+
*
|
|
181
|
+
* This is a placeholder that logs the message for now.
|
|
182
|
+
* TODO: Migrate logic from handleAgentSessionCreatedWebhook and handleGitHubWebhook.
|
|
183
|
+
*/
|
|
184
|
+
private handleSessionStartMessage;
|
|
185
|
+
/**
|
|
186
|
+
* Handle user prompt message (unified handler for mid-session prompts).
|
|
187
|
+
*
|
|
188
|
+
* This is a placeholder that logs the message for now.
|
|
189
|
+
* TODO: Migrate logic from handleUserPromptedAgentActivity (branch 3).
|
|
190
|
+
*/
|
|
191
|
+
private handleUserPromptMessage;
|
|
192
|
+
/**
|
|
193
|
+
* Handle stop signal message (unified handler for session termination).
|
|
194
|
+
*
|
|
195
|
+
* This is a placeholder that logs the message for now.
|
|
196
|
+
* TODO: Migrate logic from handleUserPromptedAgentActivity (branch 1).
|
|
197
|
+
*/
|
|
198
|
+
private handleStopSignalMessage;
|
|
199
|
+
/**
|
|
200
|
+
* Handle content update message (unified handler for issue/PR content changes).
|
|
201
|
+
*
|
|
202
|
+
* This is a placeholder that logs the message for now.
|
|
203
|
+
* TODO: Migrate logic from handleIssueContentUpdate.
|
|
204
|
+
*/
|
|
205
|
+
private handleContentUpdateMessage;
|
|
206
|
+
/**
|
|
207
|
+
* Handle unassign message (unified handler for task unassignment).
|
|
208
|
+
*
|
|
209
|
+
* This is a placeholder that logs the message for now.
|
|
210
|
+
* TODO: Migrate logic from handleIssueUnassignedWebhook.
|
|
211
|
+
*/
|
|
212
|
+
private handleUnassignMessage;
|
|
213
|
+
/**
|
|
214
|
+
* Handle issue unassignment webhook
|
|
215
|
+
*/
|
|
216
|
+
private handleIssueUnassignedWebhook;
|
|
217
|
+
/**
|
|
218
|
+
* Handle issue content update webhook (title, description, or attachments).
|
|
219
|
+
*
|
|
220
|
+
* When the title, description, or attachments of an issue are updated, this handler feeds
|
|
221
|
+
* the changes into any active session for that issue, allowing the AI to
|
|
222
|
+
* compare old vs new values and decide whether to take action.
|
|
223
|
+
*
|
|
224
|
+
* The prompt uses XML-style formatting to clearly show what changed:
|
|
225
|
+
* - <issue_update> wrapper with timestamp and issue identifier
|
|
226
|
+
* - <title_change> with <old_title> and <new_title> if title changed
|
|
227
|
+
* - <description_change> with <old_description> and <new_description> if description changed
|
|
228
|
+
* - <attachments_change> with <old_attachments> and <new_attachments> if attachments changed
|
|
229
|
+
* - <guidance> section instructing the agent to evaluate whether changes affect its work
|
|
230
|
+
*
|
|
231
|
+
* @see https://studio.apollographql.com/public/Linear-Webhooks/variant/current/schema/reference/objects/EntityWebhookPayload
|
|
232
|
+
* @see https://studio.apollographql.com/public/Linear-Webhooks/variant/current/schema/reference/objects/IssueWebhookPayload
|
|
233
|
+
* @see https://studio.apollographql.com/public/Linear-Webhooks/variant/current/schema/reference/unions/DataWebhookPayload
|
|
234
|
+
*/
|
|
235
|
+
private handleIssueContentUpdate;
|
|
236
|
+
/**
|
|
237
|
+
* Build an XML-formatted prompt for issue content updates (title, description, attachments).
|
|
238
|
+
*
|
|
239
|
+
* The prompt clearly shows what fields changed by comparing old vs new values,
|
|
240
|
+
* and includes guidance for the agent to evaluate whether these changes affect
|
|
241
|
+
* its current implementation or action plan.
|
|
242
|
+
*/
|
|
243
|
+
private buildIssueUpdatePrompt;
|
|
244
|
+
/**
|
|
245
|
+
* Get issue tracker for a workspace by finding first repository with that workspace ID
|
|
246
|
+
*/
|
|
247
|
+
private getIssueTrackerForWorkspace;
|
|
248
|
+
/**
|
|
249
|
+
* Create a new Linear agent session with all necessary setup
|
|
250
|
+
* @param sessionId The Linear agent activity session ID
|
|
251
|
+
* @param issue Linear issue object
|
|
252
|
+
* @param repository Repository configuration
|
|
253
|
+
* @param agentSessionManager Agent session manager instance
|
|
254
|
+
* @returns Object containing session details and setup information
|
|
255
|
+
*/
|
|
256
|
+
private createLinearAgentSession;
|
|
257
|
+
/**
|
|
258
|
+
* Handle agent session created webhook
|
|
259
|
+
* Can happen due to being 'delegated' or @ mentioned in a new thread
|
|
260
|
+
* @param webhook The agent session created webhook
|
|
261
|
+
* @param repos All available repositories for routing
|
|
262
|
+
*/
|
|
263
|
+
private handleAgentSessionCreatedWebhook;
|
|
264
|
+
/**
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* Initialize and start agent runner for an agent session
|
|
268
|
+
* This method contains the shared logic for creating an agent runner that both
|
|
269
|
+
* handleAgentSessionCreatedWebhook and handleUserPromptedAgentActivity use.
|
|
270
|
+
*
|
|
271
|
+
* @param agentSession The Linear agent session
|
|
272
|
+
* @param repository The repository configuration
|
|
273
|
+
* @param guidance Optional guidance rules from Linear
|
|
274
|
+
* @param commentBody Optional comment body (for mentions)
|
|
275
|
+
*/
|
|
276
|
+
private initializeAgentRunner;
|
|
277
|
+
/**
|
|
278
|
+
* Handle stop signal from prompted webhook
|
|
279
|
+
* Branch 1 of agentSessionPrompted (see packages/CLAUDE.md)
|
|
280
|
+
*
|
|
281
|
+
* IMPORTANT: Stop signals do NOT require repository lookup.
|
|
282
|
+
* The session must already exist (per CLAUDE.md), so we search
|
|
283
|
+
* all agent session managers to find it.
|
|
284
|
+
*/
|
|
285
|
+
private handleStopSignal;
|
|
286
|
+
/**
|
|
287
|
+
* Handle repository selection response from prompted webhook
|
|
288
|
+
* Branch 2 of agentSessionPrompted (see packages/CLAUDE.md)
|
|
289
|
+
*
|
|
290
|
+
* This method extracts the user's repository selection from their response,
|
|
291
|
+
* or uses the fallback repository if their message doesn't match any option.
|
|
292
|
+
* In both cases, the selected repository is cached for future use.
|
|
293
|
+
*/
|
|
294
|
+
private handleRepositorySelectionResponse;
|
|
295
|
+
/**
|
|
296
|
+
* Handle AskUserQuestion response from prompted webhook
|
|
297
|
+
* Branch 2.5: User response to a question posed via AskUserQuestion tool
|
|
298
|
+
*
|
|
299
|
+
* @param webhook The prompted webhook containing user's response
|
|
300
|
+
*/
|
|
301
|
+
private handleAskUserQuestionResponse;
|
|
302
|
+
/**
|
|
303
|
+
* Handle normal prompted activity (existing session continuation)
|
|
304
|
+
* Branch 3 of agentSessionPrompted (see packages/CLAUDE.md)
|
|
305
|
+
*/
|
|
306
|
+
private handleNormalPromptedActivity;
|
|
307
|
+
/**
|
|
308
|
+
* Handle user-prompted agent activity webhook
|
|
309
|
+
* Implements three-branch architecture from packages/CLAUDE.md:
|
|
310
|
+
* 1. Stop signal - terminate existing runner
|
|
311
|
+
* 2. Repository selection response - initialize Claude runner for first time
|
|
312
|
+
* 3. Normal prompted activity - continue existing session or create new one
|
|
313
|
+
*
|
|
314
|
+
* @param webhook The prompted webhook containing user's message
|
|
315
|
+
*/
|
|
316
|
+
private handleUserPromptedAgentActivity;
|
|
317
|
+
/**
|
|
318
|
+
* Handle issue unassignment
|
|
319
|
+
* @param issue Linear issue object from webhook data
|
|
320
|
+
* @param repository Repository configuration
|
|
321
|
+
*/
|
|
322
|
+
private handleIssueUnassigned;
|
|
323
|
+
/**
|
|
324
|
+
* Handle Claude messages
|
|
325
|
+
*/
|
|
326
|
+
private handleClaudeMessage;
|
|
327
|
+
/**
|
|
328
|
+
* Handle Claude session error
|
|
329
|
+
* Silently ignores AbortError (user-initiated stop), logs other errors
|
|
330
|
+
*/
|
|
331
|
+
private handleClaudeError;
|
|
332
|
+
/**
|
|
333
|
+
* Fetch issue labels for a given issue
|
|
334
|
+
*/
|
|
335
|
+
private fetchIssueLabels;
|
|
336
|
+
/**
|
|
337
|
+
* Resolve default model for a given runner from config with sensible built-in defaults.
|
|
338
|
+
* Supports legacy config keys for backwards compatibility.
|
|
339
|
+
*/
|
|
340
|
+
private getDefaultModelForRunner;
|
|
341
|
+
/**
|
|
342
|
+
* Resolve default fallback model for a given runner from config with sensible built-in defaults.
|
|
343
|
+
* Supports legacy Claude fallback key for backwards compatibility.
|
|
344
|
+
*/
|
|
345
|
+
private getDefaultFallbackModelForRunner;
|
|
346
|
+
/**
|
|
347
|
+
* Determine runner type and model using labels + issue description tags.
|
|
348
|
+
*
|
|
349
|
+
* Supported description tags:
|
|
350
|
+
* - [agent=claude|gemini|codex|cursor]
|
|
351
|
+
* - [model=<model-name>]
|
|
352
|
+
*
|
|
353
|
+
* Precedence:
|
|
354
|
+
* - Description tags override labels.
|
|
355
|
+
* - Agent selection and model selection are independent.
|
|
356
|
+
* - If agent is not explicit, model can infer runner type.
|
|
357
|
+
*/
|
|
358
|
+
private determineRunnerSelection;
|
|
359
|
+
/**
|
|
360
|
+
* Determine system prompt based on issue labels and repository configuration
|
|
361
|
+
*/
|
|
362
|
+
private determineSystemPromptFromLabels;
|
|
363
|
+
/**
|
|
364
|
+
* Build simplified prompt for label-based workflows
|
|
365
|
+
* @param issue Full Linear issue
|
|
366
|
+
* @param repository Repository configuration
|
|
367
|
+
* @param attachmentManifest Optional attachment manifest
|
|
368
|
+
* @param guidance Optional agent guidance rules from Linear
|
|
369
|
+
* @returns Formatted prompt string
|
|
370
|
+
*/
|
|
371
|
+
private buildLabelBasedPrompt;
|
|
372
|
+
/**
|
|
373
|
+
* Build prompt for mention-triggered sessions
|
|
374
|
+
* @param issue Full Linear issue object
|
|
375
|
+
* @param repository Repository configuration
|
|
376
|
+
* @param agentSession The agent session containing the mention
|
|
377
|
+
* @param attachmentManifest Optional attachment manifest to append
|
|
378
|
+
* @param guidance Optional agent guidance rules from Linear
|
|
379
|
+
* @returns The constructed prompt and optional version tag
|
|
380
|
+
*/
|
|
381
|
+
private buildMentionPrompt;
|
|
382
|
+
/**
|
|
383
|
+
* Convert full Linear SDK issue to CoreIssue interface for Session creation
|
|
384
|
+
*/
|
|
385
|
+
private convertLinearIssueToCore;
|
|
386
|
+
/**
|
|
387
|
+
* Build a prompt for Claude using the improved XML-style template
|
|
388
|
+
* @param issue Full Linear issue
|
|
389
|
+
* @param repository Repository configuration
|
|
390
|
+
* @param newComment Optional new comment to focus on (for handleNewRootComment)
|
|
391
|
+
* @param attachmentManifest Optional attachment manifest
|
|
392
|
+
* @param guidance Optional agent guidance rules from Linear
|
|
393
|
+
* @returns Formatted prompt string
|
|
394
|
+
*/
|
|
395
|
+
private buildIssueContextPrompt;
|
|
396
|
+
/**
|
|
397
|
+
* Get connection status by repository ID
|
|
398
|
+
*/
|
|
399
|
+
getConnectionStatus(): Map<string, boolean>;
|
|
400
|
+
/**
|
|
401
|
+
* Get event transport (for testing purposes)
|
|
402
|
+
* @internal
|
|
403
|
+
*/
|
|
404
|
+
_getClientByToken(_token: string): any;
|
|
405
|
+
/**
|
|
406
|
+
* Start OAuth flow using the shared application server
|
|
407
|
+
*/
|
|
408
|
+
startOAuthFlow(proxyUrl?: string): Promise<{
|
|
409
|
+
linearToken: string;
|
|
410
|
+
linearWorkspaceId: string;
|
|
411
|
+
linearWorkspaceName: string;
|
|
412
|
+
}>;
|
|
413
|
+
/**
|
|
414
|
+
* Get the server port
|
|
415
|
+
*/
|
|
416
|
+
getServerPort(): number;
|
|
417
|
+
/**
|
|
418
|
+
* Get the OAuth callback URL
|
|
419
|
+
*/
|
|
420
|
+
getOAuthCallbackUrl(): string;
|
|
421
|
+
/**
|
|
422
|
+
* Move issue to started state when assigned
|
|
423
|
+
* @param issue Full Linear issue object from Linear SDK
|
|
424
|
+
* @param repositoryId Repository ID for issue tracker lookup
|
|
425
|
+
*/
|
|
426
|
+
private moveIssueToStartedState;
|
|
427
|
+
/**
|
|
428
|
+
* Post initial comment when assigned to issue
|
|
429
|
+
*/
|
|
430
|
+
/**
|
|
431
|
+
* Post a comment to Linear
|
|
432
|
+
*/
|
|
433
|
+
private postComment;
|
|
434
|
+
/**
|
|
435
|
+
* Format todos as Linear checklist markdown
|
|
436
|
+
*/
|
|
437
|
+
/**
|
|
438
|
+
* Download attachments from Linear issue
|
|
439
|
+
* @param issue Linear issue object from webhook data
|
|
440
|
+
* @param repository Repository configuration
|
|
441
|
+
* @param workspacePath Path to workspace directory
|
|
442
|
+
*/
|
|
443
|
+
private downloadIssueAttachments;
|
|
444
|
+
/**
|
|
445
|
+
* Download attachments from a specific comment
|
|
446
|
+
* @param commentBody The body text of the comment
|
|
447
|
+
* @param attachmentsDir Directory where attachments should be saved
|
|
448
|
+
* @param linearToken Linear API token
|
|
449
|
+
* @param existingAttachmentCount Current number of attachments already downloaded
|
|
450
|
+
*/
|
|
451
|
+
private downloadCommentAttachments;
|
|
452
|
+
/**
|
|
453
|
+
* Generate attachment manifest for new comment attachments
|
|
454
|
+
*/
|
|
455
|
+
private generateNewAttachmentManifest;
|
|
456
|
+
private registerSylasToolsMcpEndpoint;
|
|
457
|
+
private createSylasToolsOptions;
|
|
458
|
+
private handleChildSessionMapping;
|
|
459
|
+
private handleFeedbackDeliveryToChildSession;
|
|
460
|
+
private buildSylasToolsMcpContextId;
|
|
461
|
+
private getSylasToolsMcpUrl;
|
|
462
|
+
private pruneSylasToolsMcpContexts;
|
|
463
|
+
/**
|
|
464
|
+
* Build MCP configuration with automatic Linear server injection and sylas-tools over Fastify MCP.
|
|
465
|
+
*/
|
|
466
|
+
private buildMcpConfig;
|
|
467
|
+
private getSylasToolsMcpAuthorizationHeaderValue;
|
|
468
|
+
private isSylasToolsMcpAuthorizationValid;
|
|
469
|
+
/**
|
|
470
|
+
* Build the complete prompt for a session - shows full prompt assembly in one place
|
|
471
|
+
*
|
|
472
|
+
* New session prompt structure:
|
|
473
|
+
* 1. Issue context (from buildIssueContextPrompt)
|
|
474
|
+
* 2. Initial subroutine prompt (if procedure initialized)
|
|
475
|
+
* 3. User comment
|
|
476
|
+
*
|
|
477
|
+
* Existing session prompt structure:
|
|
478
|
+
* 1. User comment
|
|
479
|
+
* 2. Attachment manifest (if present)
|
|
480
|
+
*/
|
|
481
|
+
private buildSessionPrompt;
|
|
482
|
+
/**
|
|
483
|
+
* Assemble a complete prompt - unified entry point for all prompt building
|
|
484
|
+
* This method contains all prompt assembly logic in one place
|
|
485
|
+
*/
|
|
486
|
+
private assemblePrompt;
|
|
487
|
+
/**
|
|
488
|
+
* Build prompt for actively streaming session - pass through user comment as-is
|
|
489
|
+
*/
|
|
490
|
+
private buildStreamingPrompt;
|
|
491
|
+
/**
|
|
492
|
+
* Build prompt for new session - includes issue context, subroutine prompt, and user comment
|
|
493
|
+
*/
|
|
494
|
+
private buildNewSessionPrompt;
|
|
495
|
+
/**
|
|
496
|
+
* Build prompt for existing session continuation - user comment and attachments only
|
|
497
|
+
*/
|
|
498
|
+
private buildContinuationPrompt;
|
|
499
|
+
/**
|
|
500
|
+
* Determine the prompt type based on input flags and system prompt availability
|
|
501
|
+
*/
|
|
502
|
+
private determinePromptType;
|
|
503
|
+
/**
|
|
504
|
+
* Load a subroutine prompt file
|
|
505
|
+
* Extracted helper to make prompt assembly more readable
|
|
506
|
+
*/
|
|
507
|
+
private loadSubroutinePrompt;
|
|
508
|
+
/**
|
|
509
|
+
* Load shared instructions that get appended to all system prompts
|
|
510
|
+
*/
|
|
511
|
+
private loadSharedInstructions;
|
|
512
|
+
/**
|
|
513
|
+
* Adapter method for prompt assembly - extracts just the prompt string
|
|
514
|
+
*/
|
|
515
|
+
private determineSystemPromptForAssembly;
|
|
516
|
+
/**
|
|
517
|
+
* Adapter method for prompt assembly - routes to appropriate issue context builder
|
|
518
|
+
*/
|
|
519
|
+
private buildIssueContextForPromptAssembly;
|
|
520
|
+
/**
|
|
521
|
+
* Build agent runner configuration with common settings.
|
|
522
|
+
* Also determines which runner type to use based on labels.
|
|
523
|
+
* @returns Object containing the runner config and runner type to use
|
|
524
|
+
*/
|
|
525
|
+
private buildAgentRunnerConfig;
|
|
526
|
+
/**
|
|
527
|
+
* Create an onAskUserQuestion callback for the ClaudeRunner.
|
|
528
|
+
* This callback delegates to the AskUserQuestionHandler which posts
|
|
529
|
+
* elicitations to Linear and waits for user responses.
|
|
530
|
+
*
|
|
531
|
+
* @param linearAgentSessionId - Linear agent session ID for tracking
|
|
532
|
+
* @param organizationId - Linear organization/workspace ID
|
|
533
|
+
*/
|
|
534
|
+
private createAskUserQuestionCallback;
|
|
535
|
+
/**
|
|
536
|
+
* Build disallowed tools list following the same hierarchy as allowed tools
|
|
537
|
+
*/
|
|
538
|
+
private buildDisallowedTools;
|
|
539
|
+
/**
|
|
540
|
+
* Merge subroutine-level disallowedTools with base disallowedTools
|
|
541
|
+
* @param session Current agent session
|
|
542
|
+
* @param baseDisallowedTools Base disallowed tools from repository/global config
|
|
543
|
+
* @param logContext Context string for logging (e.g., "EdgeWorker", "resumeClaudeSession")
|
|
544
|
+
* @returns Merged disallowed tools list
|
|
545
|
+
*/
|
|
546
|
+
private mergeSubroutineDisallowedTools;
|
|
547
|
+
/**
|
|
548
|
+
* Build allowed tools list with Linear MCP tools automatically included
|
|
549
|
+
*/
|
|
550
|
+
private buildAllowedTools;
|
|
551
|
+
/**
|
|
552
|
+
* Get Agent Sessions for an issue
|
|
553
|
+
*/
|
|
554
|
+
getAgentSessionsForIssue(issueId: string, repositoryId: string): any[];
|
|
555
|
+
/**
|
|
556
|
+
* Check if the user who triggered the webhook is allowed to interact.
|
|
557
|
+
* @param webhook The webhook containing user information
|
|
558
|
+
* @param repository The repository configuration
|
|
559
|
+
* @returns Access check result with allowed status and user name
|
|
560
|
+
*/
|
|
561
|
+
private checkUserAccess;
|
|
562
|
+
/**
|
|
563
|
+
* Handle blocked user according to configured behavior.
|
|
564
|
+
* Posts a response activity to end the session.
|
|
565
|
+
* @param webhook The webhook that triggered the blocked access
|
|
566
|
+
* @param repository The repository configuration
|
|
567
|
+
* @param _reason The reason for blocking (for logging)
|
|
568
|
+
*/
|
|
569
|
+
private handleBlockedUser;
|
|
570
|
+
/**
|
|
571
|
+
* Load persisted EdgeWorker state for all repositories
|
|
572
|
+
*/
|
|
573
|
+
private loadPersistedState;
|
|
574
|
+
/**
|
|
575
|
+
* Save current EdgeWorker state for all repositories
|
|
576
|
+
*/
|
|
577
|
+
private savePersistedState;
|
|
578
|
+
/**
|
|
579
|
+
* Serialize EdgeWorker mappings to a serializable format
|
|
580
|
+
*/
|
|
581
|
+
serializeMappings(): SerializableEdgeWorkerState;
|
|
582
|
+
/**
|
|
583
|
+
* Restore EdgeWorker mappings from serialized state
|
|
584
|
+
*/
|
|
585
|
+
restoreMappings(state: SerializableEdgeWorkerState): void;
|
|
586
|
+
/**
|
|
587
|
+
* Post an activity directly via an issue tracker instance.
|
|
588
|
+
* Consolidates try/catch and success/error logging for EdgeWorker call sites
|
|
589
|
+
* that already have the issueTracker and agentSessionId resolved.
|
|
590
|
+
*
|
|
591
|
+
* @returns The activity ID when resolved, `null` otherwise.
|
|
592
|
+
*/
|
|
593
|
+
private postActivityDirect;
|
|
594
|
+
/**
|
|
595
|
+
* Post instant acknowledgment thought when agent session is created
|
|
596
|
+
*/
|
|
597
|
+
private postInstantAcknowledgment;
|
|
598
|
+
/**
|
|
599
|
+
* Post parent resume acknowledgment thought when parent session is resumed from child
|
|
600
|
+
*/
|
|
601
|
+
private postParentResumeAcknowledgment;
|
|
602
|
+
/**
|
|
603
|
+
* Post repository selection activity
|
|
604
|
+
* Shows which method was used to select the repository (auto-routing or user selection)
|
|
605
|
+
*/
|
|
606
|
+
private postRepositorySelectionActivity;
|
|
607
|
+
/**
|
|
608
|
+
* Re-route procedure for a session (used when resuming from child or give feedback)
|
|
609
|
+
* This ensures the currentSubroutine is reset to avoid suppression issues
|
|
610
|
+
*/
|
|
611
|
+
private rerouteProcedureForSession;
|
|
612
|
+
/**
|
|
613
|
+
* Handle prompt with streaming check - centralized logic for all input types
|
|
614
|
+
*
|
|
615
|
+
* This method implements the unified pattern for handling prompts:
|
|
616
|
+
* 1. Check if runner is actively streaming
|
|
617
|
+
* 2. Route procedure if NOT streaming (resets currentSubroutine)
|
|
618
|
+
* 3. Add to stream if streaming, OR resume session if not
|
|
619
|
+
*
|
|
620
|
+
* @param session The Sylas agent session
|
|
621
|
+
* @param repository Repository configuration
|
|
622
|
+
* @param sessionId Linear agent activity session ID
|
|
623
|
+
* @param agentSessionManager Agent session manager instance
|
|
624
|
+
* @param promptBody The prompt text to send
|
|
625
|
+
* @param attachmentManifest Optional attachment manifest to append
|
|
626
|
+
* @param isNewSession Whether this is a new session
|
|
627
|
+
* @param additionalAllowedDirs Additional directories to allow access to
|
|
628
|
+
* @param logContext Context string for logging (e.g., "prompted webhook", "parent resume")
|
|
629
|
+
* @returns true if message was added to stream, false if session was resumed
|
|
630
|
+
*/
|
|
631
|
+
private handlePromptWithStreamingCheck;
|
|
632
|
+
/**
|
|
633
|
+
* Post thought about system prompt selection based on labels
|
|
634
|
+
*/
|
|
635
|
+
private postSystemPromptSelectionThought;
|
|
636
|
+
/**
|
|
637
|
+
* Resume or create an Agent session with the given prompt
|
|
638
|
+
* This is the core logic for handling prompted agent activities
|
|
639
|
+
* @param session The Sylas agent session
|
|
640
|
+
* @param repository The repository configuration
|
|
641
|
+
* @param sessionId The Linear agent session ID
|
|
642
|
+
* @param agentSessionManager The agent session manager
|
|
643
|
+
* @param promptBody The prompt text to send
|
|
644
|
+
* @param attachmentManifest Optional attachment manifest
|
|
645
|
+
* @param isNewSession Whether this is a new session
|
|
646
|
+
*/
|
|
647
|
+
resumeAgentSession(session: SylasAgentSession, repository: RepositoryConfig, sessionId: string, agentSessionManager: AgentSessionManager, promptBody: string, attachmentManifest?: string, isNewSession?: boolean, additionalAllowedDirectories?: string[], maxTurns?: number, commentAuthor?: string, commentTimestamp?: string): Promise<void>;
|
|
648
|
+
/**
|
|
649
|
+
* Post instant acknowledgment thought when receiving prompted webhook
|
|
650
|
+
*/
|
|
651
|
+
private postInstantPromptedAcknowledgment;
|
|
652
|
+
/**
|
|
653
|
+
* Get the platform type for a repository's issue tracker.
|
|
654
|
+
*/
|
|
655
|
+
private getRepositoryPlatform;
|
|
656
|
+
/**
|
|
657
|
+
* Fetch complete issue details from Linear API
|
|
658
|
+
*/
|
|
659
|
+
fetchFullIssueDetails(issueId: string, repositoryId: string): Promise<Issue | null>;
|
|
660
|
+
/**
|
|
661
|
+
* Build OAuth config for LinearIssueTrackerService.
|
|
662
|
+
* Returns undefined if OAuth credentials are not available.
|
|
663
|
+
*/
|
|
664
|
+
private buildOAuthConfig;
|
|
665
|
+
/**
|
|
666
|
+
* Save OAuth tokens to config.json
|
|
667
|
+
*/
|
|
668
|
+
private saveOAuthTokens;
|
|
669
|
+
}
|
|
670
|
+
//# sourceMappingURL=EdgeWorker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EdgeWorker.d.ts","sourceRoot":"","sources":["../src/E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