cyrus-edge-worker 0.2.11 → 0.2.12
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/EdgeWorker.d.ts.map +1 -1
- package/dist/EdgeWorker.js +75 -8
- package/dist/EdgeWorker.js.map +1 -1
- package/dist/GitService.d.ts +1 -0
- package/dist/GitService.d.ts.map +1 -1
- package/dist/GitService.js +6 -0
- package/dist/GitService.js.map +1 -1
- package/dist/WorktreeIncludeService.d.ts +39 -0
- package/dist/WorktreeIncludeService.d.ts.map +1 -0
- package/dist/WorktreeIncludeService.js +129 -0
- package/dist/WorktreeIncludeService.js.map +1 -0
- package/dist/index.d.ts +2 -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 +14 -4
- package/dist/procedures/registry.d.ts.map +1 -1
- package/dist/procedures/registry.js +22 -7
- package/dist/procedures/registry.js.map +1 -1
- package/dist/prompts/subroutines/changelog-update.md +77 -0
- package/dist/prompts/subroutines/coding-activity.md +3 -1
- package/dist/prompts/subroutines/debugger-fix.md +2 -1
- package/dist/prompts/subroutines/debugger-reproduction.md +1 -0
- package/dist/prompts/subroutines/gh-pr.md +59 -0
- package/dist/prompts/subroutines/git-commit.md +37 -0
- package/dist/prompts/subroutines/verifications.md +1 -0
- package/dist/validation/types.d.ts +2 -10
- package/dist/validation/types.d.ts.map +1 -1
- package/dist/validation/types.js +2 -6
- package/dist/validation/types.js.map +1 -1
- package/package.json +12 -12
- package/dist/prompts/subroutines/git-gh.md +0 -55
package/dist/EdgeWorker.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EdgeWorker.d.ts","sourceRoot":"","sources":["../src/EdgeWorker.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAwB3C,OAAO,KAAK,EAMX,iBAAiB,EACjB,gBAAgB,EAI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E,MAAM,EAAO,EAC3C,QAAQ,CAAC,EAAE,MAAM,EACjB,aAAa,CAAC,EAAE,MAAM,EACtB,gBAAgB,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,IAAI,CAAC;IAuJhB;;OAEG;YACW,iCAAiC;IA6C/C;;OAEG;IACU,qBAAqB,CACjC,OAAO,EAAE,MAAM,EACf,YAAY,EAAE,MAAM,GAClB,OAAO,CAAC,KAAK,GAAG,IAAI,CAAC;IA0CxB;;;OAGG;IACH,OAAO,CAAC,gBAAgB;IAgDxB;;OAEG;YACW,eAAe;CAsC7B"}
|
package/dist/EdgeWorker.js
CHANGED
|
@@ -1083,21 +1083,23 @@ export class EdgeWorker extends EventEmitter {
|
|
|
1083
1083
|
await agentSessionManager.postAnalyzingThought(linearAgentActivitySessionId);
|
|
1084
1084
|
// Fetch labels early (needed for label override check)
|
|
1085
1085
|
const labels = await this.fetchIssueLabels(fullIssue);
|
|
1086
|
+
// Lowercase labels for case-insensitive comparison
|
|
1087
|
+
const lowercaseLabels = labels.map((label) => label.toLowerCase());
|
|
1086
1088
|
// Check for label overrides BEFORE AI routing
|
|
1087
1089
|
const debuggerConfig = repository.labelPrompts?.debugger;
|
|
1088
1090
|
const debuggerLabels = Array.isArray(debuggerConfig)
|
|
1089
1091
|
? debuggerConfig
|
|
1090
1092
|
: debuggerConfig?.labels;
|
|
1091
|
-
const hasDebuggerLabel = debuggerLabels?.some((label) =>
|
|
1093
|
+
const hasDebuggerLabel = debuggerLabels?.some((label) => lowercaseLabels.includes(label.toLowerCase()));
|
|
1092
1094
|
const orchestratorConfig = repository.labelPrompts?.orchestrator;
|
|
1093
1095
|
const orchestratorLabels = Array.isArray(orchestratorConfig)
|
|
1094
1096
|
? orchestratorConfig
|
|
1095
1097
|
: (orchestratorConfig?.labels ?? ["orchestrator"]);
|
|
1096
|
-
const hasOrchestratorLabel = orchestratorLabels?.some((label) =>
|
|
1098
|
+
const hasOrchestratorLabel = orchestratorLabels?.some((label) => lowercaseLabels.includes(label.toLowerCase()));
|
|
1097
1099
|
// Check for graphite label (for graphite-orchestrator combination)
|
|
1098
1100
|
const graphiteConfig = repository.labelPrompts?.graphite;
|
|
1099
1101
|
const graphiteLabels = graphiteConfig?.labels ?? ["graphite"];
|
|
1100
|
-
const hasGraphiteLabel = graphiteLabels?.some((label) =>
|
|
1102
|
+
const hasGraphiteLabel = graphiteLabels?.some((label) => lowercaseLabels.includes(label.toLowerCase()));
|
|
1101
1103
|
// Graphite-orchestrator requires BOTH graphite AND orchestrator labels
|
|
1102
1104
|
const hasGraphiteOrchestratorLabels = hasGraphiteLabel && hasOrchestratorLabel;
|
|
1103
1105
|
let finalProcedure;
|
|
@@ -1655,6 +1657,15 @@ export class EdgeWorker extends EventEmitter {
|
|
|
1655
1657
|
fallbackModelOverride: "haiku",
|
|
1656
1658
|
};
|
|
1657
1659
|
}
|
|
1660
|
+
if (lowercaseLabels.includes("haiku")) {
|
|
1661
|
+
// fallbackModelOverride must be different from modelOverride
|
|
1662
|
+
// (haiku falls back to sonnet for retry scenarios)
|
|
1663
|
+
return {
|
|
1664
|
+
runnerType: "claude",
|
|
1665
|
+
modelOverride: "haiku",
|
|
1666
|
+
fallbackModelOverride: "sonnet",
|
|
1667
|
+
};
|
|
1668
|
+
}
|
|
1658
1669
|
// Default to claude if no runner labels found
|
|
1659
1670
|
return {
|
|
1660
1671
|
runnerType: "claude",
|
|
@@ -1669,15 +1680,17 @@ export class EdgeWorker extends EventEmitter {
|
|
|
1669
1680
|
if (!repository.labelPrompts || labels.length === 0) {
|
|
1670
1681
|
return undefined;
|
|
1671
1682
|
}
|
|
1683
|
+
// Lowercase labels for case-insensitive comparison
|
|
1684
|
+
const lowercaseLabels = labels.map((label) => label.toLowerCase());
|
|
1672
1685
|
// Check for graphite-orchestrator first (requires BOTH graphite AND orchestrator labels)
|
|
1673
1686
|
const graphiteConfig = repository.labelPrompts.graphite;
|
|
1674
1687
|
const graphiteLabels = graphiteConfig?.labels ?? ["graphite"];
|
|
1675
|
-
const hasGraphiteLabel = graphiteLabels?.some((label) =>
|
|
1688
|
+
const hasGraphiteLabel = graphiteLabels?.some((label) => lowercaseLabels.includes(label.toLowerCase()));
|
|
1676
1689
|
const orchestratorConfig = repository.labelPrompts.orchestrator;
|
|
1677
1690
|
const orchestratorLabels = Array.isArray(orchestratorConfig)
|
|
1678
1691
|
? orchestratorConfig
|
|
1679
1692
|
: (orchestratorConfig?.labels ?? ["orchestrator"]);
|
|
1680
|
-
const hasOrchestratorLabel = orchestratorLabels?.some((label) =>
|
|
1693
|
+
const hasOrchestratorLabel = orchestratorLabels?.some((label) => lowercaseLabels.includes(label.toLowerCase()));
|
|
1681
1694
|
// If both graphite AND orchestrator labels are present, use graphite-orchestrator prompt
|
|
1682
1695
|
if (hasGraphiteLabel && hasOrchestratorLabel) {
|
|
1683
1696
|
try {
|
|
@@ -1714,7 +1727,7 @@ export class EdgeWorker extends EventEmitter {
|
|
|
1714
1727
|
const configuredLabels = Array.isArray(promptConfig)
|
|
1715
1728
|
? promptConfig
|
|
1716
1729
|
: promptConfig?.labels;
|
|
1717
|
-
if (configuredLabels?.some((label) =>
|
|
1730
|
+
if (configuredLabels?.some((label) => lowercaseLabels.includes(label.toLowerCase()))) {
|
|
1718
1731
|
try {
|
|
1719
1732
|
// Load the prompt template from file
|
|
1720
1733
|
const __filename = fileURLToPath(import.meta.url);
|
|
@@ -3207,7 +3220,8 @@ ${input.userComment}
|
|
|
3207
3220
|
* @returns Object containing the runner config and runner type to use
|
|
3208
3221
|
*/
|
|
3209
3222
|
buildAgentRunnerConfig(session, repository, linearAgentActivitySessionId, systemPrompt, allowedTools, allowedDirectories, disallowedTools, resumeSessionId, labels, maxTurns, singleTurn) {
|
|
3210
|
-
// Configure PostToolUse
|
|
3223
|
+
// Configure PostToolUse hooks for screenshot tools to guide Claude to use linear_upload_file
|
|
3224
|
+
// This ensures screenshots can be viewed in Linear comments instead of remaining as local files
|
|
3211
3225
|
const hooks = {
|
|
3212
3226
|
PostToolUse: [
|
|
3213
3227
|
{
|
|
@@ -3216,9 +3230,62 @@ ${input.userComment}
|
|
|
3216
3230
|
async (input, _toolUseID, { signal: _signal }) => {
|
|
3217
3231
|
const postToolUseInput = input;
|
|
3218
3232
|
console.log(`Tool ${postToolUseInput.tool_name} completed with response:`, postToolUseInput.tool_response);
|
|
3233
|
+
const response = postToolUseInput.tool_response;
|
|
3234
|
+
const filePath = response?.path || "the screenshot file";
|
|
3235
|
+
return {
|
|
3236
|
+
continue: true,
|
|
3237
|
+
additionalContext: `Screenshot taken successfully. To share this screenshot in Linear comments, use the linear_upload_file tool to upload ${filePath}. This will return an asset URL that can be embedded in markdown. You can also use the Read tool to view the screenshot file to analyze the visual content.`,
|
|
3238
|
+
};
|
|
3239
|
+
},
|
|
3240
|
+
],
|
|
3241
|
+
},
|
|
3242
|
+
{
|
|
3243
|
+
matcher: "mcp__claude-in-chrome__computer",
|
|
3244
|
+
hooks: [
|
|
3245
|
+
async (input, _toolUseID, { signal: _signal }) => {
|
|
3246
|
+
const postToolUseInput = input;
|
|
3247
|
+
const response = postToolUseInput.tool_response;
|
|
3248
|
+
// Only provide upload guidance for screenshot actions
|
|
3249
|
+
if (response?.action === "screenshot") {
|
|
3250
|
+
const filePath = response?.path || "the screenshot file";
|
|
3251
|
+
return {
|
|
3252
|
+
continue: true,
|
|
3253
|
+
additionalContext: `Screenshot captured. To share this screenshot in Linear comments, use the linear_upload_file tool to upload ${filePath}. This will return an asset URL that can be embedded in markdown.`,
|
|
3254
|
+
};
|
|
3255
|
+
}
|
|
3256
|
+
return { continue: true };
|
|
3257
|
+
},
|
|
3258
|
+
],
|
|
3259
|
+
},
|
|
3260
|
+
{
|
|
3261
|
+
matcher: "mcp__claude-in-chrome__gif_creator",
|
|
3262
|
+
hooks: [
|
|
3263
|
+
async (input, _toolUseID, { signal: _signal }) => {
|
|
3264
|
+
const postToolUseInput = input;
|
|
3265
|
+
const response = postToolUseInput.tool_response;
|
|
3266
|
+
// Only provide upload guidance for export actions
|
|
3267
|
+
if (response?.action === "export") {
|
|
3268
|
+
const filePath = response?.path || "the exported GIF";
|
|
3269
|
+
return {
|
|
3270
|
+
continue: true,
|
|
3271
|
+
additionalContext: `GIF exported successfully. To share this GIF in Linear comments, use the linear_upload_file tool to upload ${filePath}. This will return an asset URL that can be embedded in markdown.`,
|
|
3272
|
+
};
|
|
3273
|
+
}
|
|
3274
|
+
return { continue: true };
|
|
3275
|
+
},
|
|
3276
|
+
],
|
|
3277
|
+
},
|
|
3278
|
+
{
|
|
3279
|
+
matcher: "mcp__chrome-devtools__take_screenshot",
|
|
3280
|
+
hooks: [
|
|
3281
|
+
async (input, _toolUseID, { signal: _signal }) => {
|
|
3282
|
+
const postToolUseInput = input;
|
|
3283
|
+
// Extract file path from input (the tool saves to filePath parameter)
|
|
3284
|
+
const toolInput = postToolUseInput.tool_input;
|
|
3285
|
+
const filePath = toolInput?.filePath || "the screenshot file";
|
|
3219
3286
|
return {
|
|
3220
3287
|
continue: true,
|
|
3221
|
-
additionalContext:
|
|
3288
|
+
additionalContext: `Screenshot saved. To share this screenshot in Linear comments, use the linear_upload_file tool to upload ${filePath}. This will return an asset URL that can be embedded in markdown.`,
|
|
3222
3289
|
};
|
|
3223
3290
|
},
|
|
3224
3291
|
],
|