cyrus-edge-worker 0.2.39 → 0.2.41

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (101) hide show
  1. package/cyrus-skills-plugin/.claude-plugin/plugin.json +4 -0
  2. package/dist/AgentSessionManager.d.ts +4 -58
  3. package/dist/AgentSessionManager.d.ts.map +1 -1
  4. package/dist/AgentSessionManager.js +11 -304
  5. package/dist/AgentSessionManager.js.map +1 -1
  6. package/dist/ChatSessionHandler.d.ts +2 -2
  7. package/dist/ChatSessionHandler.d.ts.map +1 -1
  8. package/dist/ChatSessionHandler.js +2 -4
  9. package/dist/ChatSessionHandler.js.map +1 -1
  10. package/dist/DefaultSkillsDeployer.d.ts +32 -0
  11. package/dist/DefaultSkillsDeployer.d.ts.map +1 -0
  12. package/dist/DefaultSkillsDeployer.js +82 -0
  13. package/dist/DefaultSkillsDeployer.js.map +1 -0
  14. package/dist/EdgeWorker.d.ts +20 -46
  15. package/dist/EdgeWorker.d.ts.map +1 -1
  16. package/dist/EdgeWorker.js +98 -450
  17. package/dist/EdgeWorker.js.map +1 -1
  18. package/dist/PromptBuilder.d.ts +1 -7
  19. package/dist/PromptBuilder.d.ts.map +1 -1
  20. package/dist/PromptBuilder.js +2 -33
  21. package/dist/PromptBuilder.js.map +1 -1
  22. package/dist/RunnerConfigBuilder.d.ts +13 -6
  23. package/dist/RunnerConfigBuilder.d.ts.map +1 -1
  24. package/dist/RunnerConfigBuilder.js +50 -27
  25. package/dist/RunnerConfigBuilder.js.map +1 -1
  26. package/dist/SkillsPluginResolver.d.ts +66 -0
  27. package/dist/SkillsPluginResolver.d.ts.map +1 -0
  28. package/dist/SkillsPluginResolver.js +180 -0
  29. package/dist/SkillsPluginResolver.js.map +1 -0
  30. package/dist/ToolPermissionResolver.d.ts +1 -12
  31. package/dist/ToolPermissionResolver.d.ts.map +1 -1
  32. package/dist/ToolPermissionResolver.js +0 -23
  33. package/dist/ToolPermissionResolver.js.map +1 -1
  34. package/dist/cyrus-skills-plugin/.claude-plugin/plugin.json +4 -0
  35. package/dist/cyrus-skills-plugin/cyrus-skills-plugin/.claude-plugin/plugin.json +4 -0
  36. package/dist/cyrus-skills-plugin/cyrus-skills-plugin/skills/debug/SKILL.md +29 -0
  37. package/dist/cyrus-skills-plugin/cyrus-skills-plugin/skills/implementation/SKILL.md +17 -0
  38. package/dist/cyrus-skills-plugin/cyrus-skills-plugin/skills/investigate/SKILL.md +23 -0
  39. package/dist/cyrus-skills-plugin/cyrus-skills-plugin/skills/summarize/SKILL.md +47 -0
  40. package/dist/cyrus-skills-plugin/cyrus-skills-plugin/skills/verify-and-ship/SKILL.md +74 -0
  41. package/dist/cyrus-skills-plugin/skills/debug/SKILL.md +29 -0
  42. package/dist/cyrus-skills-plugin/skills/implementation/SKILL.md +17 -0
  43. package/dist/cyrus-skills-plugin/skills/investigate/SKILL.md +23 -0
  44. package/dist/cyrus-skills-plugin/skills/summarize/SKILL.md +47 -0
  45. package/dist/cyrus-skills-plugin/skills/verify-and-ship/SKILL.md +74 -0
  46. package/dist/index.d.ts +2 -1
  47. package/dist/index.d.ts.map +1 -1
  48. package/dist/index.js +2 -2
  49. package/dist/index.js.map +1 -1
  50. package/dist/prompt-assembly/types.d.ts +1 -3
  51. package/dist/prompt-assembly/types.d.ts.map +1 -1
  52. package/package.json +17 -16
  53. package/dist/procedures/ProcedureAnalyzer.d.ts +0 -69
  54. package/dist/procedures/ProcedureAnalyzer.d.ts.map +0 -1
  55. package/dist/procedures/ProcedureAnalyzer.js +0 -274
  56. package/dist/procedures/ProcedureAnalyzer.js.map +0 -1
  57. package/dist/procedures/index.d.ts +0 -7
  58. package/dist/procedures/index.d.ts.map +0 -1
  59. package/dist/procedures/index.js +0 -7
  60. package/dist/procedures/index.js.map +0 -1
  61. package/dist/procedures/registry.d.ts +0 -173
  62. package/dist/procedures/registry.d.ts.map +0 -1
  63. package/dist/procedures/registry.js +0 -264
  64. package/dist/procedures/registry.js.map +0 -1
  65. package/dist/procedures/types.d.ts +0 -101
  66. package/dist/procedures/types.d.ts.map +0 -1
  67. package/dist/procedures/types.js +0 -5
  68. package/dist/procedures/types.js.map +0 -1
  69. package/dist/prompts/subroutines/changelog-update-gitlab.md +0 -79
  70. package/dist/prompts/subroutines/changelog-update.md +0 -79
  71. package/dist/prompts/subroutines/coding-activity.md +0 -12
  72. package/dist/prompts/subroutines/concise-summary.md +0 -67
  73. package/dist/prompts/subroutines/debugger-fix.md +0 -92
  74. package/dist/prompts/subroutines/debugger-reproduction.md +0 -74
  75. package/dist/prompts/subroutines/get-approval.md +0 -175
  76. package/dist/prompts/subroutines/gh-pr.md +0 -110
  77. package/dist/prompts/subroutines/git-commit.md +0 -37
  78. package/dist/prompts/subroutines/glab-mr.md +0 -106
  79. package/dist/prompts/subroutines/plan-summary.md +0 -21
  80. package/dist/prompts/subroutines/preparation.md +0 -16
  81. package/dist/prompts/subroutines/question-answer.md +0 -8
  82. package/dist/prompts/subroutines/question-investigation.md +0 -8
  83. package/dist/prompts/subroutines/release-execution.md +0 -81
  84. package/dist/prompts/subroutines/release-summary.md +0 -60
  85. package/dist/prompts/subroutines/user-testing-summary.md +0 -87
  86. package/dist/prompts/subroutines/user-testing.md +0 -48
  87. package/dist/prompts/subroutines/validation-fixer.md +0 -56
  88. package/dist/prompts/subroutines/verbose-summary.md +0 -46
  89. package/dist/prompts/subroutines/verifications.md +0 -77
  90. package/dist/validation/ValidationLoopController.d.ts +0 -54
  91. package/dist/validation/ValidationLoopController.d.ts.map +0 -1
  92. package/dist/validation/ValidationLoopController.js +0 -242
  93. package/dist/validation/ValidationLoopController.js.map +0 -1
  94. package/dist/validation/index.d.ts +0 -7
  95. package/dist/validation/index.d.ts.map +0 -1
  96. package/dist/validation/index.js +0 -7
  97. package/dist/validation/index.js.map +0 -1
  98. package/dist/validation/types.d.ts +0 -82
  99. package/dist/validation/types.d.ts.map +0 -1
  100. package/dist/validation/types.js +0 -29
  101. package/dist/validation/types.js.map +0 -1
@@ -1,173 +0,0 @@
1
- /**
2
- * Registry of predefined procedures and analysis rules
3
- */
4
- import type { ProcedureDefinition, RequestClassification } from "./types.js";
5
- /**
6
- * Predefined subroutine definitions
7
- */
8
- export declare const SUBROUTINES: {
9
- readonly primary: {
10
- readonly name: "primary";
11
- readonly promptPath: "primary";
12
- readonly description: "Main work execution phase";
13
- };
14
- readonly debuggerReproduction: {
15
- readonly name: "debugger-reproduction";
16
- readonly promptPath: "subroutines/debugger-reproduction.md";
17
- readonly description: "Reproducing bug and analyzing root cause";
18
- };
19
- readonly getApproval: {
20
- readonly name: "get-approval";
21
- readonly promptPath: "subroutines/get-approval.md";
22
- readonly description: "Requesting user approval before proceeding";
23
- readonly singleTurn: true;
24
- readonly requiresApproval: true;
25
- };
26
- readonly debuggerFix: {
27
- readonly name: "debugger-fix";
28
- readonly promptPath: "subroutines/debugger-fix.md";
29
- readonly description: "Implementing fix based on root cause analysis";
30
- };
31
- readonly verifications: {
32
- readonly name: "verifications";
33
- readonly promptPath: "subroutines/verifications.md";
34
- readonly description: "Running tests, linting, and type checking";
35
- readonly usesValidationLoop: true;
36
- };
37
- readonly validationFixer: {
38
- readonly name: "validation-fixer";
39
- readonly promptPath: "subroutines/validation-fixer.md";
40
- readonly description: "Fixing validation failures";
41
- };
42
- readonly gitCommit: {
43
- readonly name: "git-commit";
44
- readonly promptPath: "subroutines/git-commit.md";
45
- readonly description: "Committing and pushing changes";
46
- };
47
- readonly ghPr: {
48
- readonly name: "gh-pr";
49
- readonly promptPath: "subroutines/gh-pr.md";
50
- readonly description: "Creating or updating pull request";
51
- };
52
- readonly changelogUpdate: {
53
- readonly name: "changelog-update";
54
- readonly promptPath: "subroutines/changelog-update.md";
55
- readonly description: "Updating changelog";
56
- };
57
- readonly glabMr: {
58
- readonly name: "glab-mr";
59
- readonly promptPath: "subroutines/glab-mr.md";
60
- readonly description: "Creating or updating merge request (GitLab)";
61
- };
62
- readonly changelogUpdateGitlab: {
63
- readonly name: "changelog-update-gitlab";
64
- readonly promptPath: "subroutines/changelog-update-gitlab.md";
65
- readonly description: "Updating changelog (GitLab)";
66
- };
67
- readonly conciseSummary: {
68
- readonly name: "concise-summary";
69
- readonly promptPath: "subroutines/concise-summary.md";
70
- readonly singleTurn: true;
71
- readonly description: "Creating summary";
72
- readonly suppressThoughtPosting: true;
73
- readonly disallowAllTools: true;
74
- };
75
- readonly verboseSummary: {
76
- readonly name: "verbose-summary";
77
- readonly promptPath: "subroutines/verbose-summary.md";
78
- readonly singleTurn: true;
79
- readonly description: "Creating detailed summary";
80
- readonly suppressThoughtPosting: true;
81
- readonly disallowAllTools: true;
82
- };
83
- readonly questionInvestigation: {
84
- readonly name: "question-investigation";
85
- readonly promptPath: "subroutines/question-investigation.md";
86
- readonly description: "Investigating question";
87
- };
88
- readonly questionAnswer: {
89
- readonly name: "question-answer";
90
- readonly promptPath: "subroutines/question-answer.md";
91
- readonly singleTurn: true;
92
- readonly description: "Formatting answer";
93
- readonly suppressThoughtPosting: true;
94
- readonly disallowAllTools: true;
95
- };
96
- readonly codingActivity: {
97
- readonly name: "coding-activity";
98
- readonly promptPath: "subroutines/coding-activity.md";
99
- readonly description: "Implementing code changes";
100
- };
101
- readonly preparation: {
102
- readonly name: "preparation";
103
- readonly promptPath: "subroutines/preparation.md";
104
- readonly description: "Analyzing request and planning approach";
105
- };
106
- readonly planSummary: {
107
- readonly name: "plan-summary";
108
- readonly promptPath: "subroutines/plan-summary.md";
109
- readonly singleTurn: true;
110
- readonly description: "Presenting implementation plan";
111
- readonly suppressThoughtPosting: true;
112
- readonly disallowAllTools: true;
113
- };
114
- readonly userTesting: {
115
- readonly name: "user-testing";
116
- readonly promptPath: "subroutines/user-testing.md";
117
- readonly description: "Performing user-requested testing";
118
- };
119
- readonly userTestingSummary: {
120
- readonly name: "user-testing-summary";
121
- readonly promptPath: "subroutines/user-testing-summary.md";
122
- readonly singleTurn: true;
123
- readonly description: "Creating test results summary";
124
- readonly suppressThoughtPosting: true;
125
- readonly disallowAllTools: true;
126
- };
127
- readonly releaseExecution: {
128
- readonly name: "release-execution";
129
- readonly promptPath: "subroutines/release-execution.md";
130
- readonly description: "Executing release process";
131
- };
132
- readonly releaseSummary: {
133
- readonly name: "release-summary";
134
- readonly promptPath: "subroutines/release-summary.md";
135
- readonly singleTurn: true;
136
- readonly description: "Creating release summary";
137
- readonly suppressThoughtPosting: true;
138
- readonly disallowAllTools: true;
139
- };
140
- };
141
- /**
142
- * Predefined procedure definitions
143
- */
144
- export declare const PROCEDURES: Record<string, ProcedureDefinition>;
145
- /**
146
- * Mapping from request classification to procedure name
147
- */
148
- export declare const CLASSIFICATION_TO_PROCEDURE: Record<RequestClassification, string>;
149
- /**
150
- * Get a procedure definition by name
151
- */
152
- export declare function getProcedure(name: string): ProcedureDefinition | undefined;
153
- /**
154
- * Get procedure name for a given classification
155
- */
156
- export declare function getProcedureForClassification(classification: RequestClassification): string;
157
- /**
158
- * Get all available procedure names
159
- */
160
- export declare function getAllProcedureNames(): string[];
161
- /**
162
- * Hosting platform type for platform-aware subroutine selection.
163
- */
164
- export type HostingPlatform = "github" | "gitlab";
165
- /**
166
- * Substitute platform-specific subroutines in a procedure definition.
167
- * When the hosting platform is GitLab, replaces GitHub-specific subroutines
168
- * (gh-pr, changelog-update) with their GitLab equivalents (glab-mr, changelog-update-gitlab).
169
- *
170
- * Returns the original procedure if no substitution is needed.
171
- */
172
- export declare function applyPlatformSubroutines(procedure: ProcedureDefinition, platform: HostingPlatform | undefined): ProcedureDefinition;
173
- //# sourceMappingURL=registry.d.ts.map
@@ -1 +0,0 @@
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoId,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,mBAAmB,CA4E1D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,MAAM,CAC/C,qBAAqB,EACrB,MAAM,CAWN,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;AAED;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAElD;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CACvC,SAAS,EAAE,mBAAmB,EAC9B,QAAQ,EAAE,eAAe,GAAG,SAAS,GACnC,mBAAmB,CAyBrB"}
@@ -1,264 +0,0 @@
1
- /**
2
- * Registry of predefined procedures and analysis rules
3
- */
4
- /**
5
- * Predefined subroutine definitions
6
- */
7
- export const SUBROUTINES = {
8
- primary: {
9
- name: "primary",
10
- promptPath: "primary", // Special: resolved via label (debugger/builder/scoper/orchestrator) or direct user input
11
- description: "Main work execution phase",
12
- },
13
- debuggerReproduction: {
14
- name: "debugger-reproduction",
15
- promptPath: "subroutines/debugger-reproduction.md",
16
- description: "Reproducing bug and analyzing root cause",
17
- },
18
- getApproval: {
19
- name: "get-approval",
20
- promptPath: "subroutines/get-approval.md",
21
- description: "Requesting user approval before proceeding",
22
- singleTurn: true,
23
- requiresApproval: true, // Flag to trigger approval workflow
24
- },
25
- debuggerFix: {
26
- name: "debugger-fix",
27
- promptPath: "subroutines/debugger-fix.md",
28
- description: "Implementing fix based on root cause analysis",
29
- },
30
- verifications: {
31
- name: "verifications",
32
- promptPath: "subroutines/verifications.md",
33
- description: "Running tests, linting, and type checking",
34
- usesValidationLoop: true, // Enable validation loop with retry logic
35
- },
36
- validationFixer: {
37
- name: "validation-fixer",
38
- promptPath: "subroutines/validation-fixer.md",
39
- description: "Fixing validation failures",
40
- },
41
- gitCommit: {
42
- name: "git-commit",
43
- promptPath: "subroutines/git-commit.md",
44
- description: "Committing and pushing changes",
45
- },
46
- ghPr: {
47
- name: "gh-pr",
48
- promptPath: "subroutines/gh-pr.md",
49
- description: "Creating or updating pull request",
50
- },
51
- changelogUpdate: {
52
- name: "changelog-update",
53
- promptPath: "subroutines/changelog-update.md",
54
- description: "Updating changelog",
55
- },
56
- glabMr: {
57
- name: "glab-mr",
58
- promptPath: "subroutines/glab-mr.md",
59
- description: "Creating or updating merge request (GitLab)",
60
- },
61
- changelogUpdateGitlab: {
62
- name: "changelog-update-gitlab",
63
- promptPath: "subroutines/changelog-update-gitlab.md",
64
- description: "Updating changelog (GitLab)",
65
- },
66
- conciseSummary: {
67
- name: "concise-summary",
68
- promptPath: "subroutines/concise-summary.md",
69
- singleTurn: true,
70
- description: "Creating summary",
71
- suppressThoughtPosting: true,
72
- disallowAllTools: true,
73
- },
74
- verboseSummary: {
75
- name: "verbose-summary",
76
- promptPath: "subroutines/verbose-summary.md",
77
- singleTurn: true,
78
- description: "Creating detailed summary",
79
- suppressThoughtPosting: true,
80
- disallowAllTools: true,
81
- },
82
- questionInvestigation: {
83
- name: "question-investigation",
84
- promptPath: "subroutines/question-investigation.md",
85
- description: "Investigating question",
86
- },
87
- questionAnswer: {
88
- name: "question-answer",
89
- promptPath: "subroutines/question-answer.md",
90
- singleTurn: true,
91
- description: "Formatting answer",
92
- suppressThoughtPosting: true,
93
- disallowAllTools: true,
94
- },
95
- codingActivity: {
96
- name: "coding-activity",
97
- promptPath: "subroutines/coding-activity.md",
98
- description: "Implementing code changes",
99
- },
100
- preparation: {
101
- name: "preparation",
102
- promptPath: "subroutines/preparation.md",
103
- description: "Analyzing request and planning approach",
104
- },
105
- planSummary: {
106
- name: "plan-summary",
107
- promptPath: "subroutines/plan-summary.md",
108
- singleTurn: true,
109
- description: "Presenting implementation plan",
110
- suppressThoughtPosting: true,
111
- disallowAllTools: true,
112
- },
113
- userTesting: {
114
- name: "user-testing",
115
- promptPath: "subroutines/user-testing.md",
116
- description: "Performing user-requested testing",
117
- },
118
- userTestingSummary: {
119
- name: "user-testing-summary",
120
- promptPath: "subroutines/user-testing-summary.md",
121
- singleTurn: true,
122
- description: "Creating test results summary",
123
- suppressThoughtPosting: true,
124
- disallowAllTools: true,
125
- },
126
- releaseExecution: {
127
- name: "release-execution",
128
- promptPath: "subroutines/release-execution.md",
129
- description: "Executing release process",
130
- },
131
- releaseSummary: {
132
- name: "release-summary",
133
- promptPath: "subroutines/release-summary.md",
134
- singleTurn: true,
135
- description: "Creating release summary",
136
- suppressThoughtPosting: true,
137
- disallowAllTools: true,
138
- },
139
- };
140
- /**
141
- * Predefined procedure definitions
142
- */
143
- export const PROCEDURES = {
144
- "simple-question": {
145
- name: "simple-question",
146
- description: "For questions or requests that don't modify the codebase",
147
- subroutines: [
148
- SUBROUTINES.questionInvestigation,
149
- SUBROUTINES.questionAnswer,
150
- ],
151
- },
152
- "documentation-edit": {
153
- name: "documentation-edit",
154
- description: "For documentation/markdown edits that don't require verification",
155
- subroutines: [
156
- SUBROUTINES.primary,
157
- SUBROUTINES.gitCommit,
158
- SUBROUTINES.ghPr,
159
- SUBROUTINES.conciseSummary,
160
- ],
161
- },
162
- "full-development": {
163
- name: "full-development",
164
- description: "For code changes requiring full verification and PR creation",
165
- subroutines: [
166
- SUBROUTINES.codingActivity,
167
- SUBROUTINES.verifications,
168
- SUBROUTINES.changelogUpdate,
169
- SUBROUTINES.gitCommit,
170
- SUBROUTINES.ghPr,
171
- SUBROUTINES.conciseSummary,
172
- ],
173
- },
174
- "debugger-full": {
175
- name: "debugger-full",
176
- description: "Full debugging workflow with reproduction, fix, and verification",
177
- subroutines: [
178
- SUBROUTINES.debuggerReproduction,
179
- SUBROUTINES.debuggerFix,
180
- SUBROUTINES.verifications,
181
- SUBROUTINES.changelogUpdate,
182
- SUBROUTINES.gitCommit,
183
- SUBROUTINES.ghPr,
184
- SUBROUTINES.conciseSummary,
185
- ],
186
- },
187
- "orchestrator-full": {
188
- name: "orchestrator-full",
189
- description: "Full orchestration workflow with decomposition and delegation to sub-agents",
190
- subroutines: [SUBROUTINES.primary, SUBROUTINES.conciseSummary],
191
- },
192
- "plan-mode": {
193
- name: "plan-mode",
194
- description: "Planning mode for requests needing clarification or implementation planning",
195
- subroutines: [SUBROUTINES.preparation, SUBROUTINES.planSummary],
196
- },
197
- "user-testing": {
198
- name: "user-testing",
199
- description: "User-driven testing workflow for manual testing sessions",
200
- subroutines: [SUBROUTINES.userTesting, SUBROUTINES.userTestingSummary],
201
- },
202
- release: {
203
- name: "release",
204
- description: "Release workflow that invokes project release skill or asks user for release info",
205
- subroutines: [SUBROUTINES.releaseExecution, SUBROUTINES.releaseSummary],
206
- },
207
- };
208
- /**
209
- * Mapping from request classification to procedure name
210
- */
211
- export const CLASSIFICATION_TO_PROCEDURE = {
212
- question: "simple-question",
213
- documentation: "documentation-edit",
214
- transient: "simple-question",
215
- planning: "plan-mode",
216
- code: "full-development",
217
- debugger: "debugger-full",
218
- orchestrator: "orchestrator-full",
219
- "user-testing": "user-testing",
220
- release: "release",
221
- };
222
- /**
223
- * Get a procedure definition by name
224
- */
225
- export function getProcedure(name) {
226
- return PROCEDURES[name];
227
- }
228
- /**
229
- * Get procedure name for a given classification
230
- */
231
- export function getProcedureForClassification(classification) {
232
- return CLASSIFICATION_TO_PROCEDURE[classification];
233
- }
234
- /**
235
- * Get all available procedure names
236
- */
237
- export function getAllProcedureNames() {
238
- return Object.keys(PROCEDURES);
239
- }
240
- /**
241
- * Substitute platform-specific subroutines in a procedure definition.
242
- * When the hosting platform is GitLab, replaces GitHub-specific subroutines
243
- * (gh-pr, changelog-update) with their GitLab equivalents (glab-mr, changelog-update-gitlab).
244
- *
245
- * Returns the original procedure if no substitution is needed.
246
- */
247
- export function applyPlatformSubroutines(procedure, platform) {
248
- if (!platform || platform === "github") {
249
- return procedure;
250
- }
251
- const substitutions = {
252
- "gh-pr": SUBROUTINES.glabMr,
253
- "changelog-update": SUBROUTINES.changelogUpdateGitlab,
254
- };
255
- const hasSubstitution = procedure.subroutines.some((s) => s.name in substitutions);
256
- if (!hasSubstitution) {
257
- return procedure;
258
- }
259
- return {
260
- ...procedure,
261
- subroutines: procedure.subroutines.map((s) => substitutions[s.name] ?? s),
262
- };
263
- }
264
- //# sourceMappingURL=registry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/procedures/registry.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IAC1B,OAAO,EAAE;QACR,IAAI,EAAE,SAAS;QACf,UAAU,EAAE,SAAS,EAAE,0FAA0F;QACjH,WAAW,EAAE,2BAA2B;KACxC;IACD,oBAAoB,EAAE;QACrB,IAAI,EAAE,uBAAuB;QAC7B,UAAU,EAAE,sCAAsC;QAClD,WAAW,EAAE,0CAA0C;KACvD;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,cAAc;QACpB,UAAU,EAAE,6BAA6B;QACzC,WAAW,EAAE,4CAA4C;QACzD,UAAU,EAAE,IAAI;QAChB,gBAAgB,EAAE,IAAI,EAAE,oCAAoC;KAC5D;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,cAAc;QACpB,UAAU,EAAE,6BAA6B;QACzC,WAAW,EAAE,+CAA+C;KAC5D;IACD,aAAa,EAAE;QACd,IAAI,EAAE,eAAe;QACrB,UAAU,EAAE,8BAA8B;QAC1C,WAAW,EAAE,2CAA2C;QACxD,kBAAkB,EAAE,IAAI,EAAE,0CAA0C;KACpE;IACD,eAAe,EAAE;QAChB,IA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AAC,aAAa,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;KACzE,CAAC;AACH,CAAC"}
@@ -1,101 +0,0 @@
1
- /**
2
- * Type definitions for the procedure analysis system
3
- */
4
- /**
5
- * Definition of a single subroutine in a procedure
6
- */
7
- export interface SubroutineDefinition {
8
- /** Unique identifier for the subroutine */
9
- name: string;
10
- /** Path to the prompt file (relative to edge-worker/src/prompts/) */
11
- promptPath: string;
12
- /** Whether this subroutine should run in single-turn mode (maxTurns: 1) */
13
- singleTurn?: boolean;
14
- /** Human-readable description of what this subroutine does */
15
- description: string;
16
- /** Whether this subroutine should skip posting to Linear activity stream */
17
- skipLinearPost?: boolean;
18
- /** Whether to suppress posting thoughts/actions (still posts final summary) */
19
- suppressThoughtPosting?: boolean;
20
- /** Whether this subroutine requires user approval before advancing to next step */
21
- requiresApproval?: boolean;
22
- /** Tools that should be explicitly disallowed during this subroutine */
23
- disallowedTools?: readonly string[];
24
- /**
25
- * Whether to disallow ALL tool usage during this subroutine.
26
- * When true, the agent will only produce text output without any tool calls.
27
- * This is useful for summary subroutines where tool usage would cause
28
- * the session to appear "hanging" to users in Linear.
29
- */
30
- disallowAllTools?: boolean;
31
- /**
32
- * Whether this subroutine uses the validation loop with retry logic.
33
- * When true, the subroutine output is parsed as ValidationResult and
34
- * the validation-fixer subroutine is run on failures (up to maxIterations).
35
- */
36
- usesValidationLoop?: boolean;
37
- }
38
- /**
39
- * Complete definition of a procedure (sequence of subroutines)
40
- */
41
- export interface ProcedureDefinition {
42
- /** Unique identifier for the procedure */
43
- name: string;
44
- /** Human-readable description of when to use this procedure */
45
- description: string;
46
- /** Ordered list of subroutines to execute */
47
- subroutines: SubroutineDefinition[];
48
- }
49
- /**
50
- * Validation loop state for subroutines that use retry logic
51
- */
52
- export interface ValidationLoopMetadata {
53
- /** Current iteration (1-based) */
54
- iteration: number;
55
- /** Whether the loop is in fixer mode (running validation-fixer) */
56
- inFixerMode: boolean;
57
- /** Results from each validation attempt */
58
- attempts: Array<{
59
- iteration: number;
60
- pass: boolean;
61
- reason: string;
62
- timestamp: number;
63
- }>;
64
- }
65
- /**
66
- * Procedure metadata stored in session.metadata.procedure
67
- */
68
- export interface ProcedureMetadata {
69
- /** Name of the active procedure */
70
- procedureName: string;
71
- /** Current position in the subroutine sequence (0-indexed) */
72
- currentSubroutineIndex: number;
73
- /** History of completed subroutines */
74
- subroutineHistory: Array<{
75
- subroutine: string;
76
- completedAt: number;
77
- claudeSessionId: string | null;
78
- geminiSessionId: string | null;
79
- codexSessionId?: string | null;
80
- /** The result text from the completed subroutine (if available) */
81
- result?: string;
82
- }>;
83
- /** State for validation loop (when current subroutine uses usesValidationLoop) */
84
- validationLoop?: ValidationLoopMetadata;
85
- }
86
- /**
87
- * Request classification types for analysis decisions
88
- */
89
- export type RequestClassification = "question" | "documentation" | "transient" | "planning" | "code" | "debugger" | "orchestrator" | "user-testing" | "release";
90
- /**
91
- * Result of procedure analysis decision
92
- */
93
- export interface ProcedureAnalysisDecision {
94
- /** Classification of the request */
95
- classification: RequestClassification;
96
- /** Selected procedure to execute */
97
- procedure: ProcedureDefinition;
98
- /** Reasoning for the classification (for debugging) */
99
- reasoning?: string;
100
- }
101
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
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,IAAI,EAAE,MAAM,CAAC;IAEb,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC;IAEnB,2EAA2E;IAC3E,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB,8DAA8D;IAC9D,WAAW,EAAE,MAAM,CAAC;IAEpB,4EAA4E;IAC5E,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,+EAA+E;IAC/E,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC,mFAAmF;I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EG;AACH,MAAM,MAAM,qBAAqB,GAC9B,UAAU,GACV,eAAe,GACf,WAAW,GACX,UAAU,GACV,MAAM,GACN,UAAU,GACV,cAAc,GACd,cAAc,GACd,SAAS,CAAC;AAEb;;GAEG;AACH,MAAM,WAAW,yBAAyB;IACzC,oCAAoC;IACpC,cAAc,EAAE,qBAAqB,CAAC;IAEtC,oCAAoC;IACpC,SAAS,EAAE,mBAAmB,CAAC;IAE/B,uDAAuD;IACvD,SAAS,CAAC,EAAE,MAAM,CAAC;CACnB"}
@@ -1,5 +0,0 @@
1
- /**
2
- * Type definitions for the procedure analysis system
3
- */
4
- export {};
5
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/procedures/types.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -1,79 +0,0 @@
1
- # Changelog Update (GitLab) - Document Changes
2
-
3
- All verification checks have passed. Now update the changelog if the project uses one.
4
-
5
- ## Your Tasks
6
-
7
- ### 1. Push Current Branch and Create Draft MR
8
- First, push the current branch (even if there are no new commits) and create a draft MR to get an MR number:
9
-
10
- ```bash
11
- # Push the branch to remote
12
- git push -u origin HEAD
13
-
14
- # Check if MR already exists, if not create a draft MR
15
- # IMPORTANT: The --target-branch flag MUST match the base_branch from the issue context
16
- glab mr view --output json 2>/dev/null || glab mr create --draft --target-branch [base_branch from context] --title "WIP: [brief description]" --description "Work in progress for [ISSUE-ID]. Full description to follow."
17
- ```
18
-
19
- Record the MR URL and number for use in the changelog entry.
20
-
21
- ### 2. Check for Changelog Files
22
- Check if the project has changelog files:
23
- ```bash
24
- ls -la CHANGELOG.md CHANGELOG.internal.md 2>/dev/null || echo "NO_CHANGELOG"
25
- ```
26
-
27
- **If no changelog files exist, complete with:** `Draft MR created at [MR URL]. No changelog files found.`
28
-
29
- ### 3. Check for Existing Changelog Entry
30
- If changelog files exist, check if there's already a changelog entry for this issue:
31
- - Look in the `## [Unreleased]` section for entries mentioning the current Linear issue identifier
32
- - If an entry already exists for this issue, you may update it to add the MR link, but do NOT add duplicate entries
33
-
34
- ### 4. Update Changelog with MR Link
35
- If changelog files exist and no entry exists (or entry needs MR link):
36
-
37
- **For user-facing changes (CHANGELOG.md):**
38
- - Add entry under `## [Unreleased]` in the appropriate subsection (`### Added`, `### Changed`, `### Fixed`, `### Removed`)
39
- - Focus on end-user impact from the perspective of users running the CLI
40
- - Be concise but descriptive about what users will experience differently
41
- - Include both the Linear issue identifier AND the MR link
42
- - Format: `- **Feature name** - Description. ([ISSUE-ID](https://linear.app/...), [!NUMBER](MR_URL))`
43
-
44
- **For internal/technical changes (CHANGELOG.internal.md):**
45
- - Add entry if the changes are internal development, refactors, or tooling updates
46
- - Follow the same format as CHANGELOG.md
47
-
48
- ## Important Notes
49
-
50
- - **Create draft MR first** - this gives you the MR number to include in the changelog
51
- - **Always specify `--target-branch`** - use the target branch from the `<base_branch>` tag in the issue context. Do NOT rely on the repository's default branch setting.
52
- - **Only update changelogs if they exist** - not all projects use changelogs
53
- - **Avoid duplicate entries** - check if an entry already exists for this issue before adding
54
- - **Follow Keep a Changelog format** - https://keepachangelog.com/
55
- - **Group related changes** - consolidate multiple commits into a single meaningful entry
56
- - **Do NOT commit or push the changelog changes** - that happens in the next subroutine
57
- - Take as many turns as needed to complete these tasks
58
-
59
- ## Expected Output
60
-
61
- **IMPORTANT: Do NOT post Linear comments.** Your output is for internal workflow only.
62
-
63
- Provide a brief completion message (1 sentence max):
64
-
65
- ```
66
- Draft MR created at [MR URL]. Changelog updated for [ISSUE-ID].
67
- ```
68
-
69
- Or if no changelog exists:
70
-
71
- ```
72
- Draft MR created at [MR URL]. No changelog files found.
73
- ```
74
-
75
- Or if entry already existed:
76
-
77
- ```
78
- Draft MR created at [MR URL]. Changelog entry already exists for this issue.
79
- ```