@exaudeus/workrail 3.17.0 → 3.18.1
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 +13 -0
- package/dist/application/services/validation-engine.js +7 -11
- package/dist/application/services/workflow-compiler.js +9 -11
- package/dist/console/assets/index-DMaX2-CW.js +28 -0
- package/dist/console/assets/index-ibLhWBmX.css +1 -0
- package/dist/console/index.html +2 -2
- package/dist/infrastructure/storage/workflow-resolution.js +6 -6
- package/dist/manifest.json +55 -55
- package/dist/mcp/handlers/v2-advance-core/assessment-consequences.d.ts +1 -1
- package/dist/mcp/handlers/v2-advance-core/assessment-consequences.js +14 -11
- package/dist/mcp/handlers/v2-advance-core/assessment-validation.d.ts +5 -3
- package/dist/mcp/handlers/v2-advance-core/assessment-validation.js +109 -87
- package/dist/mcp/handlers/v2-advance-core/input-validation.d.ts +0 -4
- package/dist/mcp/handlers/v2-advance-core/input-validation.js +1 -3
- package/dist/mcp/handlers/v2-advance-core/outcome-blocked.js +8 -3
- package/dist/mcp/handlers/v2-advance-core/outcome-success.js +8 -3
- package/dist/mcp/handlers/v2-execution/replay.js +4 -4
- package/dist/mcp/output-schemas.d.ts +12 -12
- package/dist/mcp/output-schemas.js +10 -11
- package/dist/mcp-server.js +0 -0
- package/dist/types/workflow-source.js +1 -1
- package/dist/v2/durable-core/domain/observation-builder.d.ts +0 -3
- package/dist/v2/durable-core/domain/observation-builder.js +1 -3
- package/dist/v2/durable-core/domain/prompt-renderer.js +9 -1
- package/dist/v2/infra/local/session-summary-provider/index.js +1 -2
- package/dist/v2/projections/resume-ranking.d.ts +0 -1
- package/dist/v2/usecases/console-routes.js +65 -17
- package/dist/v2/usecases/console-service.js +4 -14
- package/dist/v2/usecases/console-types.d.ts +15 -1
- package/dist/v2/usecases/worktree-service.d.ts +1 -0
- package/dist/v2/usecases/worktree-service.js +143 -15
- package/package.json +3 -2
- package/spec/authoring-spec.json +3 -3
- package/spec/workflow.schema.json +1 -2
- package/workflows/coding-task-workflow-agentic.lean.v2.json +132 -1
- package/workflows/mr-review-workflow.agentic.v2.json +24 -10
- package/workflows/workflow-for-workflows.json +558 -448
- package/dist/console/assets/index-BZNM03t1.css +0 -1
- package/dist/console/assets/index-BwJelCXK.js +0 -28
package/README.md
CHANGED
|
@@ -150,6 +150,19 @@ Then prompt your agent:
|
|
|
150
150
|
|
|
151
151
|
The agent will find the workflow, start at step 1, and proceed systematically.
|
|
152
152
|
|
|
153
|
+
### Troubleshooting: "Permission denied" on startup
|
|
154
|
+
|
|
155
|
+
Versions before 3.19.0 were published without the execute bit set on the binary.
|
|
156
|
+
If you see `Permission denied` when WorkRail starts, reinstall or fix it in place:
|
|
157
|
+
|
|
158
|
+
```sh
|
|
159
|
+
# Option A: reinstall (recommended)
|
|
160
|
+
npm install -g @exaudeus/workrail
|
|
161
|
+
|
|
162
|
+
# Option B: fix in place without reinstalling
|
|
163
|
+
chmod +x $(npm root -g)/@exaudeus/workrail/dist/mcp-server.js
|
|
164
|
+
```
|
|
165
|
+
|
|
153
166
|
---
|
|
154
167
|
|
|
155
168
|
## CI & Releases
|
|
@@ -685,24 +685,24 @@ let ValidationEngine = ValidationEngine_1 = class ValidationEngine {
|
|
|
685
685
|
issues.push(`${stepLabel}: assessmentConsequences must not be empty when declared`);
|
|
686
686
|
return;
|
|
687
687
|
}
|
|
688
|
-
if (!step.assessmentRefs || step.assessmentRefs.length
|
|
689
|
-
issues.push(`${stepLabel}: assessmentConsequences require
|
|
690
|
-
suggestions.push(`Add
|
|
688
|
+
if (!step.assessmentRefs || step.assessmentRefs.length === 0) {
|
|
689
|
+
issues.push(`${stepLabel}: assessmentConsequences require at least one assessmentRef on the same step`);
|
|
690
|
+
suggestions.push(`Add at least one assessmentRef to ${stepLabel} before declaring assessmentConsequences`);
|
|
691
691
|
return;
|
|
692
692
|
}
|
|
693
693
|
if (step.assessmentConsequences.length > 1) {
|
|
694
694
|
issues.push(`${stepLabel}: v1 assessment support allows exactly one assessment consequence per step`);
|
|
695
695
|
suggestions.push(`Reduce assessmentConsequences on ${stepLabel} to a single declaration`);
|
|
696
696
|
}
|
|
697
|
-
const
|
|
698
|
-
if (
|
|
697
|
+
const referencedDefinitions = assessments.filter(assessment => step.assessmentRefs.includes(assessment.id));
|
|
698
|
+
if (referencedDefinitions.length === 0)
|
|
699
699
|
return;
|
|
700
700
|
for (const consequence of step.assessmentConsequences) {
|
|
701
701
|
const trigger = consequence.when;
|
|
702
702
|
const effect = consequence.effect;
|
|
703
|
-
const allLevels =
|
|
703
|
+
const allLevels = referencedDefinitions.flatMap(def => def.dimensions.flatMap(d => d.levels));
|
|
704
704
|
if (!allLevels.includes(trigger.anyEqualsLevel)) {
|
|
705
|
-
issues.push(`${stepLabel}: assessment consequence anyEqualsLevel '${trigger.anyEqualsLevel}' is not declared in any dimension of assessment
|
|
705
|
+
issues.push(`${stepLabel}: assessment consequence anyEqualsLevel '${trigger.anyEqualsLevel}' is not declared in any dimension of any referenced assessment`);
|
|
706
706
|
suggestions.push(`Use a level declared in one of the dimensions: ${[...new Set(allLevels)].join(', ')}`);
|
|
707
707
|
}
|
|
708
708
|
if (effect.kind !== 'require_followup') {
|
|
@@ -776,10 +776,6 @@ let ValidationEngine = ValidationEngine_1 = class ValidationEngine {
|
|
|
776
776
|
}
|
|
777
777
|
}
|
|
778
778
|
validateAssessmentRefsForStep(typedStep, `Step '${step.id}'`);
|
|
779
|
-
if (typedStep.assessmentRefs !== undefined && typedStep.assessmentRefs.length > 1) {
|
|
780
|
-
issues.push(`Step '${step.id}': v1 assessment support allows exactly one assessmentRef per step`);
|
|
781
|
-
suggestions.push(`Reduce assessmentRefs on step '${step.id}' to a single assessment id`);
|
|
782
|
-
}
|
|
783
779
|
validateAssessmentConsequencesForStep(typedStep, `Step '${step.id}'`);
|
|
784
780
|
const callValidation = this.validateStepFunctionCalls(step, workflow.definition.functionDefinitions || []);
|
|
785
781
|
if (!callValidation.valid) {
|
|
@@ -140,21 +140,19 @@ let WorkflowCompiler = class WorkflowCompiler {
|
|
|
140
140
|
const assessmentConsequences = typedStep.assessmentConsequences;
|
|
141
141
|
if (!assessmentConsequences)
|
|
142
142
|
continue;
|
|
143
|
-
if (!typedStep.assessmentRefs || typedStep.assessmentRefs.length
|
|
144
|
-
return (0, neverthrow_1.err)(error_1.Err.invalidState(`Step '${step.id}' declares assessmentConsequences but
|
|
145
|
-
}
|
|
146
|
-
const assessment = (workflow.definition.assessments ?? []).find(candidate => candidate.id === typedStep.assessmentRefs?.[0]);
|
|
147
|
-
if (!assessment) {
|
|
148
|
-
return (0, neverthrow_1.err)(error_1.Err.invalidState(`Step '${step.id}' declares assessmentConsequences for unknown assessmentRef '${typedStep.assessmentRefs[0]}'`));
|
|
143
|
+
if (!typedStep.assessmentRefs || typedStep.assessmentRefs.length === 0) {
|
|
144
|
+
return (0, neverthrow_1.err)(error_1.Err.invalidState(`Step '${step.id}' declares assessmentConsequences but declares no assessmentRefs`));
|
|
149
145
|
}
|
|
150
146
|
if (assessmentConsequences.length > 1) {
|
|
151
147
|
return (0, neverthrow_1.err)(error_1.Err.invalidState(`Step '${step.id}' declares ${assessmentConsequences.length} assessment consequences. V1 supports exactly one assessment consequence per step.`));
|
|
152
148
|
}
|
|
149
|
+
const allLevelsAcrossRefs = (workflow.definition.assessments ?? [])
|
|
150
|
+
.filter(candidate => typedStep.assessmentRefs.includes(candidate.id))
|
|
151
|
+
.flatMap(assessment => assessment.dimensions.flatMap(d => d.levels));
|
|
153
152
|
for (const consequence of assessmentConsequences) {
|
|
154
153
|
const trigger = consequence.when;
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
return (0, neverthrow_1.err)(error_1.Err.invalidState(`Step '${step.id}' declares consequence with anyEqualsLevel '${trigger.anyEqualsLevel}' that is not declared in any dimension of assessment '${assessment.id}'`));
|
|
154
|
+
if (!allLevelsAcrossRefs.includes(trigger.anyEqualsLevel)) {
|
|
155
|
+
return (0, neverthrow_1.err)(error_1.Err.invalidState(`Step '${step.id}' declares consequence with anyEqualsLevel '${trigger.anyEqualsLevel}' that is not declared in any dimension of any referenced assessment`));
|
|
158
156
|
}
|
|
159
157
|
if (consequence.effect.kind !== 'require_followup') {
|
|
160
158
|
return (0, neverthrow_1.err)(error_1.Err.invalidState(`Step '${step.id}' declares unsupported assessment consequence effect '${String(consequence.effect.kind)}'`));
|
|
@@ -187,8 +185,8 @@ let WorkflowCompiler = class WorkflowCompiler {
|
|
|
187
185
|
}
|
|
188
186
|
}
|
|
189
187
|
if (bodyStep.assessmentConsequences) {
|
|
190
|
-
if (!bodyStep.assessmentRefs || bodyStep.assessmentRefs.length
|
|
191
|
-
return (0, neverthrow_1.err)(error_1.Err.invalidState(`Loop body step '${bodyStep.id}' in loop '${loop.id}' declares assessmentConsequences but
|
|
188
|
+
if (!bodyStep.assessmentRefs || bodyStep.assessmentRefs.length === 0) {
|
|
189
|
+
return (0, neverthrow_1.err)(error_1.Err.invalidState(`Loop body step '${bodyStep.id}' in loop '${loop.id}' declares assessmentConsequences but declares no assessmentRefs`));
|
|
192
190
|
}
|
|
193
191
|
}
|
|
194
192
|
}
|