cyrus-edge-worker 0.2.0 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AgentSessionManager.d.ts +20 -0
- package/dist/AgentSessionManager.d.ts.map +1 -1
- package/dist/AgentSessionManager.js +384 -13
- package/dist/AgentSessionManager.js.map +1 -1
- package/dist/EdgeWorker.d.ts +70 -17
- package/dist/EdgeWorker.d.ts.map +1 -1
- package/dist/EdgeWorker.js +334 -179
- package/dist/EdgeWorker.js.map +1 -1
- package/dist/RepositoryRouter.d.ts +118 -0
- package/dist/RepositoryRouter.d.ts.map +1 -0
- package/dist/RepositoryRouter.js +372 -0
- package/dist/RepositoryRouter.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/procedures/registry.d.ts +4 -0
- package/dist/procedures/registry.d.ts.map +1 -1
- package/dist/procedures/registry.js +4 -0
- package/dist/procedures/registry.js.map +1 -1
- package/dist/procedures/types.d.ts +2 -0
- package/dist/procedures/types.d.ts.map +1 -1
- package/package.json +7 -7
|
@@ -0,0 +1,372 @@
|
|
|
1
|
+
import { AgentActivitySignal } from "@linear/sdk";
|
|
2
|
+
/**
|
|
3
|
+
* RepositoryRouter handles all repository routing logic including:
|
|
4
|
+
* - Multi-priority routing (labels, projects, teams)
|
|
5
|
+
* - Issue-to-repository caching
|
|
6
|
+
* - Repository selection UI via Linear elicitation
|
|
7
|
+
* - Selection response handling
|
|
8
|
+
*
|
|
9
|
+
* This class was extracted from EdgeWorker to improve modularity and testability.
|
|
10
|
+
*/
|
|
11
|
+
export class RepositoryRouter {
|
|
12
|
+
deps;
|
|
13
|
+
/** Cache mapping issue IDs to selected repository IDs */
|
|
14
|
+
issueRepositoryCache = new Map();
|
|
15
|
+
/** Pending repository selections awaiting user response */
|
|
16
|
+
pendingSelections = new Map();
|
|
17
|
+
constructor(deps) {
|
|
18
|
+
this.deps = deps;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Get cached repository for an issue
|
|
22
|
+
*
|
|
23
|
+
* This is a simple cache lookup used by agentSessionPrompted webhooks (Branch 3).
|
|
24
|
+
* Per CLAUDE.md: "The repository will be retrieved from the issue-to-repository
|
|
25
|
+
* cache - no new routing logic is performed."
|
|
26
|
+
*
|
|
27
|
+
* @param issueId The Linear issue ID
|
|
28
|
+
* @param repositoriesMap Map of repository IDs to configurations
|
|
29
|
+
* @returns The cached repository or null if not found
|
|
30
|
+
*/
|
|
31
|
+
getCachedRepository(issueId, repositoriesMap) {
|
|
32
|
+
const cachedRepositoryId = this.issueRepositoryCache.get(issueId);
|
|
33
|
+
if (!cachedRepositoryId) {
|
|
34
|
+
console.log(`[RepositoryRouter] No cached repository found for issue ${issueId}`);
|
|
35
|
+
return null;
|
|
36
|
+
}
|
|
37
|
+
const cachedRepository = repositoriesMap.get(cachedRepositoryId);
|
|
38
|
+
if (!cachedRepository) {
|
|
39
|
+
// Repository no longer exists, remove from cache
|
|
40
|
+
console.warn(`[RepositoryRouter] Cached repository ${cachedRepositoryId} no longer exists, removing from cache`);
|
|
41
|
+
this.issueRepositoryCache.delete(issueId);
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
console.log(`[RepositoryRouter] Using cached repository ${cachedRepository.name} for issue ${issueId}`);
|
|
45
|
+
return cachedRepository;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Determine repository for webhook using multi-priority routing:
|
|
49
|
+
* Priority 0: Existing active sessions
|
|
50
|
+
* Priority 1: Routing labels
|
|
51
|
+
* Priority 2: Project-based routing
|
|
52
|
+
* Priority 3: Team-based routing
|
|
53
|
+
* Priority 4: Catch-all repositories
|
|
54
|
+
*/
|
|
55
|
+
async determineRepositoryForWebhook(webhook, repos) {
|
|
56
|
+
const workspaceId = webhook.organizationId;
|
|
57
|
+
if (!workspaceId) {
|
|
58
|
+
return repos[0]
|
|
59
|
+
? {
|
|
60
|
+
type: "selected",
|
|
61
|
+
repository: repos[0],
|
|
62
|
+
routingMethod: "workspace-fallback",
|
|
63
|
+
}
|
|
64
|
+
: { type: "none" };
|
|
65
|
+
}
|
|
66
|
+
// Extract issue information
|
|
67
|
+
const { issueId, teamKey, issueIdentifier } = this.extractIssueInfo(webhook);
|
|
68
|
+
// Priority 0: Check for existing active sessions
|
|
69
|
+
// TODO: Remove this priority check - existing session detection should not be a routing method
|
|
70
|
+
if (issueId) {
|
|
71
|
+
for (const repo of repos) {
|
|
72
|
+
if (this.deps.hasActiveSession(issueId, repo.id)) {
|
|
73
|
+
console.log(`[RepositoryRouter] Repository selected: ${repo.name} (existing active session)`);
|
|
74
|
+
return {
|
|
75
|
+
type: "selected",
|
|
76
|
+
repository: repo,
|
|
77
|
+
routingMethod: "workspace-fallback",
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
// Filter repos by workspace
|
|
83
|
+
const workspaceRepos = repos.filter((repo) => repo.linearWorkspaceId === workspaceId);
|
|
84
|
+
if (workspaceRepos.length === 0)
|
|
85
|
+
return { type: "none" };
|
|
86
|
+
// Priority 1: Check routing labels
|
|
87
|
+
const labelMatchedRepo = await this.findRepositoryByLabels(issueId, workspaceRepos, workspaceId);
|
|
88
|
+
if (labelMatchedRepo) {
|
|
89
|
+
console.log(`[RepositoryRouter] Repository selected: ${labelMatchedRepo.name} (label-based routing)`);
|
|
90
|
+
return {
|
|
91
|
+
type: "selected",
|
|
92
|
+
repository: labelMatchedRepo,
|
|
93
|
+
routingMethod: "label-based",
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
// Priority 2: Check project-based routing
|
|
97
|
+
if (issueId) {
|
|
98
|
+
const projectMatchedRepo = await this.findRepositoryByProject(issueId, workspaceRepos, workspaceId);
|
|
99
|
+
if (projectMatchedRepo) {
|
|
100
|
+
console.log(`[RepositoryRouter] Repository selected: ${projectMatchedRepo.name} (project-based routing)`);
|
|
101
|
+
return {
|
|
102
|
+
type: "selected",
|
|
103
|
+
repository: projectMatchedRepo,
|
|
104
|
+
routingMethod: "project-based",
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
// Priority 3: Check team-based routing
|
|
109
|
+
if (teamKey) {
|
|
110
|
+
const teamMatchedRepo = this.findRepositoryByTeamKey(teamKey, workspaceRepos);
|
|
111
|
+
if (teamMatchedRepo) {
|
|
112
|
+
console.log(`[RepositoryRouter] Repository selected: ${teamMatchedRepo.name} (team-based routing)`);
|
|
113
|
+
return {
|
|
114
|
+
type: "selected",
|
|
115
|
+
repository: teamMatchedRepo,
|
|
116
|
+
routingMethod: "team-based",
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
// Try parsing issue identifier as fallback for team routing
|
|
121
|
+
// TODO: Remove team prefix routing - should rely on explicit team-based routing only
|
|
122
|
+
if (issueIdentifier?.includes("-")) {
|
|
123
|
+
const prefix = issueIdentifier.split("-")[0];
|
|
124
|
+
if (prefix) {
|
|
125
|
+
const repo = this.findRepositoryByTeamKey(prefix, workspaceRepos);
|
|
126
|
+
if (repo) {
|
|
127
|
+
console.log(`[RepositoryRouter] Repository selected: ${repo.name} (team prefix routing)`);
|
|
128
|
+
return {
|
|
129
|
+
type: "selected",
|
|
130
|
+
repository: repo,
|
|
131
|
+
routingMethod: "team-prefix",
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
// Priority 4: Find catch-all repository (no routing configuration)
|
|
137
|
+
// TODO: Remove catch-all routing - require explicit routing configuration for all repositories
|
|
138
|
+
const catchAllRepo = workspaceRepos.find((repo) => (!repo.teamKeys || repo.teamKeys.length === 0) &&
|
|
139
|
+
(!repo.routingLabels || repo.routingLabels.length === 0) &&
|
|
140
|
+
(!repo.projectKeys || repo.projectKeys.length === 0));
|
|
141
|
+
if (catchAllRepo) {
|
|
142
|
+
console.log(`[RepositoryRouter] Repository selected: ${catchAllRepo.name} (workspace catch-all)`);
|
|
143
|
+
return {
|
|
144
|
+
type: "selected",
|
|
145
|
+
repository: catchAllRepo,
|
|
146
|
+
routingMethod: "catch-all",
|
|
147
|
+
};
|
|
148
|
+
}
|
|
149
|
+
// Multiple repositories with no routing match - request user selection
|
|
150
|
+
if (workspaceRepos.length > 1) {
|
|
151
|
+
console.log(`[RepositoryRouter] Multiple repositories (${workspaceRepos.length}) found with no routing match - requesting user selection`);
|
|
152
|
+
return { type: "needs_selection", workspaceRepos };
|
|
153
|
+
}
|
|
154
|
+
// Final fallback to first workspace repo
|
|
155
|
+
const fallbackRepo = workspaceRepos[0];
|
|
156
|
+
if (fallbackRepo) {
|
|
157
|
+
console.log(`[RepositoryRouter] Repository selected: ${fallbackRepo.name} (workspace fallback)`);
|
|
158
|
+
return {
|
|
159
|
+
type: "selected",
|
|
160
|
+
repository: fallbackRepo,
|
|
161
|
+
routingMethod: "workspace-fallback",
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
return { type: "none" };
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Find repository by routing labels
|
|
168
|
+
*/
|
|
169
|
+
async findRepositoryByLabels(issueId, repos, workspaceId) {
|
|
170
|
+
if (!issueId)
|
|
171
|
+
return null;
|
|
172
|
+
const reposWithRoutingLabels = repos.filter((repo) => repo.routingLabels && repo.routingLabels.length > 0);
|
|
173
|
+
if (reposWithRoutingLabels.length === 0)
|
|
174
|
+
return null;
|
|
175
|
+
try {
|
|
176
|
+
const labels = await this.deps.fetchIssueLabels(issueId, workspaceId);
|
|
177
|
+
for (const repo of reposWithRoutingLabels) {
|
|
178
|
+
if (repo.routingLabels?.some((routingLabel) => labels.includes(routingLabel))) {
|
|
179
|
+
return repo;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
catch (error) {
|
|
184
|
+
console.error(`[RepositoryRouter] Failed to fetch labels for routing:`, error);
|
|
185
|
+
}
|
|
186
|
+
return null;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Find repository by team key
|
|
190
|
+
*/
|
|
191
|
+
findRepositoryByTeamKey(teamKey, repos) {
|
|
192
|
+
return repos.find((r) => r.teamKeys?.includes(teamKey));
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Find repository by project name
|
|
196
|
+
*/
|
|
197
|
+
async findRepositoryByProject(issueId, repos, workspaceId) {
|
|
198
|
+
// Try each repository that has projectKeys configured
|
|
199
|
+
for (const repo of repos) {
|
|
200
|
+
if (!repo.projectKeys || repo.projectKeys.length === 0)
|
|
201
|
+
continue;
|
|
202
|
+
try {
|
|
203
|
+
const linearClient = this.deps.getLinearClient(workspaceId);
|
|
204
|
+
if (!linearClient) {
|
|
205
|
+
console.warn(`[RepositoryRouter] No Linear client found for workspace ${workspaceId}`);
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
const fullIssue = await linearClient.issue(issueId);
|
|
209
|
+
const project = await fullIssue?.project;
|
|
210
|
+
if (!project || !project.name) {
|
|
211
|
+
console.warn(`[RepositoryRouter] No project name found for issue ${issueId} in repository ${repo.name}`);
|
|
212
|
+
continue;
|
|
213
|
+
}
|
|
214
|
+
const projectName = project.name;
|
|
215
|
+
if (repo.projectKeys.includes(projectName)) {
|
|
216
|
+
console.log(`[RepositoryRouter] Matched issue ${issueId} to repository ${repo.name} via project: ${projectName}`);
|
|
217
|
+
return repo;
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
catch (error) {
|
|
221
|
+
// Continue to next repository if this one fails
|
|
222
|
+
console.debug(`[RepositoryRouter] Failed to fetch project for issue ${issueId} from repository ${repo.name}:`, error);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
return null;
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Elicit user repository selection - post elicitation to Linear
|
|
229
|
+
*/
|
|
230
|
+
async elicitUserRepositorySelection(webhook, workspaceRepos) {
|
|
231
|
+
const { agentSession } = webhook;
|
|
232
|
+
const agentSessionId = agentSession.id;
|
|
233
|
+
const { issue } = agentSession;
|
|
234
|
+
console.log(`[RepositoryRouter] Posting repository selection elicitation for issue ${issue.identifier}`);
|
|
235
|
+
// Store pending selection
|
|
236
|
+
this.pendingSelections.set(agentSessionId, {
|
|
237
|
+
issueId: issue.id,
|
|
238
|
+
workspaceRepos,
|
|
239
|
+
});
|
|
240
|
+
// Validate we have repositories to offer
|
|
241
|
+
const firstRepo = workspaceRepos[0];
|
|
242
|
+
if (!firstRepo) {
|
|
243
|
+
console.error("[RepositoryRouter] No repositories available for selection elicitation");
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
// Get Linear client for the workspace
|
|
247
|
+
const linearClient = this.deps.getLinearClient(webhook.organizationId);
|
|
248
|
+
if (!linearClient) {
|
|
249
|
+
console.error(`[RepositoryRouter] No Linear client found for workspace ${webhook.organizationId}`);
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
// Create repository options
|
|
253
|
+
const options = workspaceRepos.map((repo) => ({
|
|
254
|
+
value: repo.githubUrl || repo.name,
|
|
255
|
+
}));
|
|
256
|
+
// Post elicitation activity
|
|
257
|
+
try {
|
|
258
|
+
await linearClient.createAgentActivity({
|
|
259
|
+
agentSessionId,
|
|
260
|
+
content: {
|
|
261
|
+
type: "elicitation",
|
|
262
|
+
body: "Which repository should I work in for this issue?",
|
|
263
|
+
},
|
|
264
|
+
signal: AgentActivitySignal.Select,
|
|
265
|
+
signalMetadata: { options },
|
|
266
|
+
});
|
|
267
|
+
console.log(`[RepositoryRouter] Posted repository selection elicitation with ${options.length} options`);
|
|
268
|
+
}
|
|
269
|
+
catch (error) {
|
|
270
|
+
console.error(`[RepositoryRouter] Failed to post repository selection elicitation:`, error);
|
|
271
|
+
await this.postRepositorySelectionError(agentSessionId, linearClient, error);
|
|
272
|
+
this.pendingSelections.delete(agentSessionId);
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
/**
|
|
276
|
+
* Post error activity when repository selection fails
|
|
277
|
+
*/
|
|
278
|
+
async postRepositorySelectionError(agentSessionId, linearClient, error) {
|
|
279
|
+
const errorObj = error;
|
|
280
|
+
const errorMessage = errorObj?.message || String(error);
|
|
281
|
+
try {
|
|
282
|
+
await linearClient.createAgentActivity({
|
|
283
|
+
agentSessionId,
|
|
284
|
+
content: {
|
|
285
|
+
type: "error",
|
|
286
|
+
body: `Failed to display repository selection: ${errorMessage}`,
|
|
287
|
+
},
|
|
288
|
+
});
|
|
289
|
+
console.log(`[RepositoryRouter] Posted error activity for repository selection failure`);
|
|
290
|
+
}
|
|
291
|
+
catch (postError) {
|
|
292
|
+
console.error(`[RepositoryRouter] Failed to post error activity (may be due to same underlying issue):`, postError);
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
/**
|
|
296
|
+
* Select repository from user response
|
|
297
|
+
* Returns the selected repository or null if webhook should not be processed further
|
|
298
|
+
*/
|
|
299
|
+
async selectRepositoryFromResponse(agentSessionId, selectedRepositoryName) {
|
|
300
|
+
const pendingData = this.pendingSelections.get(agentSessionId);
|
|
301
|
+
if (!pendingData) {
|
|
302
|
+
console.log(`[RepositoryRouter] No pending repository selection found for agent session ${agentSessionId}`);
|
|
303
|
+
return null;
|
|
304
|
+
}
|
|
305
|
+
// Remove from pending map
|
|
306
|
+
this.pendingSelections.delete(agentSessionId);
|
|
307
|
+
// Find selected repository by GitHub URL or name
|
|
308
|
+
const selectedRepo = pendingData.workspaceRepos.find((repo) => repo.githubUrl === selectedRepositoryName ||
|
|
309
|
+
repo.name === selectedRepositoryName);
|
|
310
|
+
// Fallback to first repository if not found
|
|
311
|
+
const repository = selectedRepo || pendingData.workspaceRepos[0];
|
|
312
|
+
if (!repository) {
|
|
313
|
+
console.error(`[RepositoryRouter] No repository found for selection: ${selectedRepositoryName}`);
|
|
314
|
+
return null;
|
|
315
|
+
}
|
|
316
|
+
if (!selectedRepo) {
|
|
317
|
+
console.log(`[RepositoryRouter] Repository "${selectedRepositoryName}" not found, falling back to ${repository.name}`);
|
|
318
|
+
}
|
|
319
|
+
else {
|
|
320
|
+
console.log(`[RepositoryRouter] User selected repository: ${repository.name}`);
|
|
321
|
+
}
|
|
322
|
+
return repository;
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Check if there's a pending repository selection for this agent session
|
|
326
|
+
*/
|
|
327
|
+
hasPendingSelection(agentSessionId) {
|
|
328
|
+
return this.pendingSelections.has(agentSessionId);
|
|
329
|
+
}
|
|
330
|
+
/**
|
|
331
|
+
* Extract issue information from webhook
|
|
332
|
+
*/
|
|
333
|
+
extractIssueInfo(webhook) {
|
|
334
|
+
// Handle agent session webhooks
|
|
335
|
+
if (this.isAgentSessionCreatedWebhook(webhook) ||
|
|
336
|
+
this.isAgentSessionPromptedWebhook(webhook)) {
|
|
337
|
+
return {
|
|
338
|
+
issueId: webhook.agentSession?.issue?.id,
|
|
339
|
+
teamKey: webhook.agentSession?.issue?.team?.key,
|
|
340
|
+
issueIdentifier: webhook.agentSession?.issue?.identifier,
|
|
341
|
+
};
|
|
342
|
+
}
|
|
343
|
+
// Handle notification webhooks
|
|
344
|
+
return {
|
|
345
|
+
issueId: webhook.notification?.issue?.id,
|
|
346
|
+
teamKey: webhook.notification?.issue?.team?.key,
|
|
347
|
+
issueIdentifier: webhook.notification?.issue?.identifier,
|
|
348
|
+
};
|
|
349
|
+
}
|
|
350
|
+
/**
|
|
351
|
+
* Type guards
|
|
352
|
+
*/
|
|
353
|
+
isAgentSessionCreatedWebhook(webhook) {
|
|
354
|
+
return webhook.action === "created";
|
|
355
|
+
}
|
|
356
|
+
isAgentSessionPromptedWebhook(webhook) {
|
|
357
|
+
return webhook.action === "prompted";
|
|
358
|
+
}
|
|
359
|
+
/**
|
|
360
|
+
* Get issue repository cache for serialization
|
|
361
|
+
*/
|
|
362
|
+
getIssueRepositoryCache() {
|
|
363
|
+
return this.issueRepositoryCache;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Restore issue repository cache from serialization
|
|
367
|
+
*/
|
|
368
|
+
restoreIssueRepositoryCache(cache) {
|
|
369
|
+
this.issueRepositoryCache = cache;
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
//# sourceMappingURL=RepositoryRouter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RepositoryRouter.js","sourceRoot":"","sources":["../src/RepositoryRouter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAqB,MAAM,aAAa,CAAC;AAgDrE;;;;;;;;GAQG;AACH,MAAM,OAAO,gBAAgB;IAOR;IANpB,yDAAyD;IACjD,oBAAoB,GAAG,IAAI,GAAG,EAAkB,CAAC;IAEzD,2DAA2D;IACnD,iBAAiB,GAAG,IAAI,GAAG,EAAsC,CAAC;IAE1E,YAAoB,IAA0B;QAA1B,SAAI,GAAJ,IAAI,CAAsB;IAAG,CAAC;IAElD;;;;;;;;;;OAUG;IACH,mBAAmB,CAClB,OAAe,EACf,eAA8C;QAE9C,MAAM,kBAAkB,GAAG,IAAI,CAAC,oBAAoB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QAClE,IAAI,CAAC,kBAAkB,EAAE,CAAC;YACzB,OAAO,CAAC,GAAG,CACV,2DAA2D,OAAO,EAAE,CACpE,CAAC;YACF,OAAO,IAAI,CAAC;QACb,CAAC;QAED,MAAM,gBAAgB,GAAG,eAAe,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC;QACjE,IAAI,CAAC,gBAAgB,EAAE,CAAC;YACvB,iDAAiD;YACjD,OAAO,CAAC,IAAI,CACX,wCAAwC,kBAAkB,wCAAwC,CAClG,CAAC;YACF,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;YAC1C,OAAO,IAAI,CAAC;QACb,CAAC;QAED,OAAO,CAAC,GAAG,CACV,8CAA8C,gBAAgB,CAAC,IAAI,cAAc,OA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,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG;gBAC/C,eAAe,EAAE,OAAO,CAAC,YAAY,EAAE,KAAK,EAAE,UAAU;aACxD,CAAC;QACH,CAAC;QAED,+BAA+B;QAC/B,OAAO;YACN,OAAO,EAAE,OAAO,CAAC,YAAY,EAAE,KAAK,EAAE,EAAE;YACxC,OAAO,EAAE,OAAO,CAAC,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG;YAC/C,eAAe,EAAE,OAAO,CAAC,YAAY,EAAE,KAAK,EAAE,UAAU;SACxD,CAAC;IACH,CAAC;IAED;;OAEG;IACK,4BAA4B,CACnC,OAAsB;QAEtB,OAAO,OAAO,CAAC,MAAM,KAAK,SAAS,CAAC;IACrC,CAAC;IAEO,6BAA6B,CACpC,OAAsB;QAEtB,OAAO,OAAO,CAAC,MAAM,KAAK,UAAU,CAAC;IACtC,CAAC;IAED;;OAEG;IACH,uBAAuB;QACtB,OAAO,IAAI,CAAC,oBAAoB,CAAC;IAClC,CAAC;IAED;;OAEG;IACH,2BAA2B,CAAC,KAA0B;QACrD,IAAI,CAAC,oBAAoB,GAAG,KAAK,CAAC;IACnC,CAAC;CACD"}
|
package/dist/index.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ export { getAllTools, readOnlyTools } from "cyrus-claude-runner";
|
|
|
3
3
|
export type { EdgeConfig, EdgeWorkerConfig, OAuthCallbackHandler, RepositoryConfig, Workspace, } from "cyrus-core";
|
|
4
4
|
export { AgentSessionManager } from "./AgentSessionManager.js";
|
|
5
5
|
export { EdgeWorker } from "./EdgeWorker.js";
|
|
6
|
+
export { RepositoryRouter } from "./RepositoryRouter.js";
|
|
6
7
|
export { SharedApplicationServer } from "./SharedApplicationServer.js";
|
|
7
8
|
export type { EdgeWorkerEvents } from "./types.js";
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACjE,YAAY,EACX,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,SAAS,GACT,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,YAAY,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACjE,YAAY,EACX,UAAU,EACV,gBAAgB,EAChB,oBAAoB,EACpB,gBAAgB,EAChB,SAAS,GACT,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC;AACvE,YAAY,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { getAllTools, readOnlyTools } from "cyrus-claude-runner";
|
|
2
2
|
export { AgentSessionManager } from "./AgentSessionManager.js";
|
|
3
3
|
export { EdgeWorker } from "./EdgeWorker.js";
|
|
4
|
+
export { RepositoryRouter } from "./RepositoryRouter.js";
|
|
4
5
|
export { SharedApplicationServer } from "./SharedApplicationServer.js";
|
|
5
6
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAQjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,uBAAuB,EAAE,MAAM,8BAA8B,CAAC"}
|
|
@@ -44,6 +44,7 @@ export declare const SUBROUTINES: {
|
|
|
44
44
|
readonly maxTurns: 1;
|
|
45
45
|
readonly description: "Brief summary for simple requests";
|
|
46
46
|
readonly suppressThoughtPosting: true;
|
|
47
|
+
readonly disallowedTools: readonly ["mcp__linear__create_comment"];
|
|
47
48
|
};
|
|
48
49
|
readonly verboseSummary: {
|
|
49
50
|
readonly name: "verbose-summary";
|
|
@@ -51,6 +52,7 @@ export declare const SUBROUTINES: {
|
|
|
51
52
|
readonly maxTurns: 1;
|
|
52
53
|
readonly description: "Detailed summary with implementation details";
|
|
53
54
|
readonly suppressThoughtPosting: true;
|
|
55
|
+
readonly disallowedTools: readonly ["mcp__linear__create_comment"];
|
|
54
56
|
};
|
|
55
57
|
readonly questionInvestigation: {
|
|
56
58
|
readonly name: "question-investigation";
|
|
@@ -63,6 +65,7 @@ export declare const SUBROUTINES: {
|
|
|
63
65
|
readonly maxTurns: 1;
|
|
64
66
|
readonly description: "Format final answer to user question";
|
|
65
67
|
readonly suppressThoughtPosting: true;
|
|
68
|
+
readonly disallowedTools: readonly ["mcp__linear__create_comment"];
|
|
66
69
|
};
|
|
67
70
|
readonly codingActivity: {
|
|
68
71
|
readonly name: "coding-activity";
|
|
@@ -80,6 +83,7 @@ export declare const SUBROUTINES: {
|
|
|
80
83
|
readonly maxTurns: 1;
|
|
81
84
|
readonly description: "Present clarifying questions or implementation plan";
|
|
82
85
|
readonly suppressThoughtPosting: true;
|
|
86
|
+
readonly disallowedTools: readonly ["mcp__linear__create_comment"];
|
|
83
87
|
};
|
|
84
88
|
};
|
|
85
89
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/procedures/registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,WAAW
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../src/procedures/registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiFd,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CA0D1D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAC/C,qBAAqB,EACrB,MAAM,CASN,CAAC;AAEF;;GAEG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,mBAAmB,GAAG,SAAS,CAE1E;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAC5C,cAAc,EAAE,qBAAqB,GACnC,MAAM,CAER;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,MAAM,EAAE,CAE/C"}
|
|
@@ -43,6 +43,7 @@ export const SUBROUTINES = {
|
|
|
43
43
|
maxTurns: 1,
|
|
44
44
|
description: "Brief summary for simple requests",
|
|
45
45
|
suppressThoughtPosting: true,
|
|
46
|
+
disallowedTools: ["mcp__linear__create_comment"],
|
|
46
47
|
},
|
|
47
48
|
verboseSummary: {
|
|
48
49
|
name: "verbose-summary",
|
|
@@ -50,6 +51,7 @@ export const SUBROUTINES = {
|
|
|
50
51
|
maxTurns: 1,
|
|
51
52
|
description: "Detailed summary with implementation details",
|
|
52
53
|
suppressThoughtPosting: true,
|
|
54
|
+
disallowedTools: ["mcp__linear__create_comment"],
|
|
53
55
|
},
|
|
54
56
|
questionInvestigation: {
|
|
55
57
|
name: "question-investigation",
|
|
@@ -62,6 +64,7 @@ export const SUBROUTINES = {
|
|
|
62
64
|
maxTurns: 1,
|
|
63
65
|
description: "Format final answer to user question",
|
|
64
66
|
suppressThoughtPosting: true,
|
|
67
|
+
disallowedTools: ["mcp__linear__create_comment"],
|
|
65
68
|
},
|
|
66
69
|
codingActivity: {
|
|
67
70
|
name: "coding-activity",
|
|
@@ -79,6 +82,7 @@ export const SUBROUTINES = {
|
|
|
79
82
|
maxTurns: 1,
|
|
80
83
|
description: "Present clarifying questions or implementation plan",
|
|
81
84
|
suppressThoughtPosting: true,
|
|
85
|
+
disallowedTools: ["mcp__linear__create_comment"],
|
|
82
86
|
},
|
|
83
87
|
};
|
|
84
88
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/procedures/registry.ts"],"names":[],"mappings":"AAAA;;GAE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AAC,OAAO,EAAE,WAAW,CAAC,cAAc,CAAC;KAC9D;IAED,WAAW,EAAE;QACZ,IAAI,EAAE,WAAW;QACjB,WAAW,EACV,6EAA6E;QAC9E,WAAW,EAAE,CAAC,WAAW,CAAC,WAAW,EAAE,WAAW,CAAC,WAAW,CAAC;KAC/D;CACD,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAGpC;IACH,QAAQ,EAAE,iBAAiB;IAC3B,aAAa,EAAE,oBAAoB;IACnC,SAAS,EAAE,iBAAiB;IAC5B,QAAQ,EAAE,WAAW;IACrB,IAAI,EAAE,kBAAkB;IACxB,QAAQ,EAAE,eAAe;IACzB,YAAY,EAAE,mBAAmB;CACjC,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,YAAY,CAAC,IAAY;IACxC,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;AACzB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,6BAA6B,CAC5C,cAAqC;IAErC,OAAO,2BAA2B,CAAC,cAAc,CAAC,CAAC;AACpD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,oBAAoB;IACnC,OAAO,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;AAChC,CAAC"}
|
|
@@ -19,6 +19,8 @@ export interface SubroutineDefinition {
|
|
|
19
19
|
suppressThoughtPosting?: boolean;
|
|
20
20
|
/** Whether this subroutine requires user approval before advancing to next step */
|
|
21
21
|
requiresApproval?: boolean;
|
|
22
|
+
/** Tools that should be explicitly disallowed during this subroutine */
|
|
23
|
+
disallowedTools?: readonly string[];
|
|
22
24
|
}
|
|
23
25
|
/**
|
|
24
26
|
* Complete definition of a procedure (sequence of subroutines)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/procedures/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACpC,2CAA2C;IAC3C,IAA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EAAE,KAAK,CAAC;QACxB,UAAU,EAAE,MAAM,CAAC;QACnB,WAAW,EAAE,MAAM,CAAC;QACpB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;KAC/B,CAAC,CAAC;CACH;AAED;;GAEG;AACH,MAAM,MAAM,qBAAqB,GAC9B,UAAU,GACV,eAAe,GACf,WAAW,GACX,UAAU,GACV,MAAM,GACN,UAAU,GACV,cAAc,CAAC;AAElB;;GAEG;AACH,MAAM,WAAW,eAAe;IAC/B,oCAAoC;IACpC,cAAc,EAAE,qBAAqB,CAAC;IAEtC,oCAAoC;IACpC,SAAS,EAAE,mBAAmB,CAAC;IAE/B,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cyrus-edge-worker",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "Unified edge worker for processing Linear issues with Claude",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
"chokidar": "^4.0.3",
|
|
19
19
|
"fastify": "^5.2.0",
|
|
20
20
|
"file-type": "^18.7.0",
|
|
21
|
-
"cyrus-
|
|
22
|
-
"cyrus-
|
|
23
|
-
"cyrus-
|
|
24
|
-
"cyrus-
|
|
25
|
-
"cyrus-
|
|
26
|
-
"cyrus-
|
|
21
|
+
"cyrus-cloudflare-tunnel-client": "0.2.2",
|
|
22
|
+
"cyrus-config-updater": "0.2.2",
|
|
23
|
+
"cyrus-linear-event-transport": "0.2.2",
|
|
24
|
+
"cyrus-simple-agent-runner": "0.2.2",
|
|
25
|
+
"cyrus-claude-runner": "0.2.2",
|
|
26
|
+
"cyrus-core": "0.2.2"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@types/node": "^20.0.0",
|