@exaudeus/workrail 3.38.0 → 3.40.0

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 (38) hide show
  1. package/dist/cli-worktrain.js +231 -0
  2. package/dist/console-ui/assets/{index-BtOJj6Xy.js → index-CXWCAonr.js} +1 -1
  3. package/dist/console-ui/index.html +1 -1
  4. package/dist/coordinators/pr-review.d.ts +62 -0
  5. package/dist/coordinators/pr-review.js +575 -0
  6. package/dist/daemon/workflow-runner.d.ts +3 -2
  7. package/dist/daemon/workflow-runner.js +6 -3
  8. package/dist/manifest.json +58 -34
  9. package/dist/mcp/output-schemas.d.ts +10 -10
  10. package/dist/mcp/tools.d.ts +12 -12
  11. package/dist/trigger/trigger-router.js +9 -2
  12. package/dist/types/workflow-source.d.ts +0 -1
  13. package/dist/types/workflow-source.js +3 -6
  14. package/dist/types/workflow.d.ts +1 -1
  15. package/dist/types/workflow.js +1 -2
  16. package/dist/v2/durable-core/domain/artifact-contract-validator.js +66 -0
  17. package/dist/v2/durable-core/schemas/artifacts/coordinator-signal.d.ts +25 -0
  18. package/dist/v2/durable-core/schemas/artifacts/coordinator-signal.js +31 -0
  19. package/dist/v2/durable-core/schemas/artifacts/index.d.ts +3 -1
  20. package/dist/v2/durable-core/schemas/artifacts/index.js +14 -1
  21. package/dist/v2/durable-core/schemas/artifacts/review-verdict.d.ts +41 -0
  22. package/dist/v2/durable-core/schemas/artifacts/review-verdict.js +30 -0
  23. package/dist/v2/durable-core/schemas/export-bundle/index.d.ts +236 -236
  24. package/dist/v2/durable-core/schemas/session/events.d.ts +50 -50
  25. package/dist/v2/durable-core/schemas/session/gaps.d.ts +2 -2
  26. package/dist/v2/durable-core/schemas/session/manifest.d.ts +4 -4
  27. package/dist/v2/durable-core/schemas/session/outputs.d.ts +8 -8
  28. package/dist/v2/usecases/console-routes.js +178 -0
  29. package/docs/design/coordinator-artifact-protocol-design-candidates.md +155 -0
  30. package/docs/design/coordinator-artifact-protocol-design-review.md +103 -0
  31. package/docs/design/coordinator-artifact-protocol-implementation-plan.md +259 -0
  32. package/docs/discovery/coordinator-design-review.md +73 -0
  33. package/docs/discovery/coordinator-script-design.md +96 -679
  34. package/docs/discovery/hypothesis-challenge-report.md +44 -0
  35. package/docs/discovery/simulation-report.md +85 -0
  36. package/docs/ideas/backlog.md +158 -100
  37. package/package.json +1 -1
  38. package/workflows/mr-review-workflow.agentic.v2.json +5 -1
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ARTIFACT_CONTRACT_REFS = exports.findLoopControlArtifact = exports.parseLoopControlArtifact = exports.isLoopControlArtifact = exports.LoopControlArtifactV1Schema = exports.LoopControlMetadataV1Schema = exports.LoopControlDecisionSchema = exports.LOOP_CONTROL_CONTRACT_REF = exports.parseAssessmentArtifact = exports.isAssessmentArtifact = exports.AssessmentDimensionSubmissionSchema = exports.AssessmentArtifactV1Schema = exports.ASSESSMENT_CONTRACT_REF = void 0;
3
+ exports.ARTIFACT_CONTRACT_REFS = exports.parseReviewVerdictArtifact = exports.isReviewVerdictArtifact = exports.ReviewVerdictArtifactV1Schema = exports.REVIEW_VERDICT_CONTRACT_REF = exports.parseCoordinatorSignalArtifact = exports.isCoordinatorSignalArtifact = exports.CoordinatorSignalArtifactV1Schema = exports.CoordinatorSignalKindSchema = exports.COORDINATOR_SIGNAL_CONTRACT_REF = exports.findLoopControlArtifact = exports.parseLoopControlArtifact = exports.isLoopControlArtifact = exports.LoopControlArtifactV1Schema = exports.LoopControlMetadataV1Schema = exports.LoopControlDecisionSchema = exports.LOOP_CONTROL_CONTRACT_REF = exports.parseAssessmentArtifact = exports.isAssessmentArtifact = exports.AssessmentDimensionSubmissionSchema = exports.AssessmentArtifactV1Schema = exports.ASSESSMENT_CONTRACT_REF = void 0;
4
4
  exports.isValidContractRef = isValidContractRef;
5
5
  var assessment_js_1 = require("./assessment.js");
6
6
  Object.defineProperty(exports, "ASSESSMENT_CONTRACT_REF", { enumerable: true, get: function () { return assessment_js_1.ASSESSMENT_CONTRACT_REF; } });
@@ -16,9 +16,22 @@ Object.defineProperty(exports, "LoopControlArtifactV1Schema", { enumerable: true
16
16
  Object.defineProperty(exports, "isLoopControlArtifact", { enumerable: true, get: function () { return loop_control_js_1.isLoopControlArtifact; } });
17
17
  Object.defineProperty(exports, "parseLoopControlArtifact", { enumerable: true, get: function () { return loop_control_js_1.parseLoopControlArtifact; } });
18
18
  Object.defineProperty(exports, "findLoopControlArtifact", { enumerable: true, get: function () { return loop_control_js_1.findLoopControlArtifact; } });
19
+ var coordinator_signal_js_1 = require("./coordinator-signal.js");
20
+ Object.defineProperty(exports, "COORDINATOR_SIGNAL_CONTRACT_REF", { enumerable: true, get: function () { return coordinator_signal_js_1.COORDINATOR_SIGNAL_CONTRACT_REF; } });
21
+ Object.defineProperty(exports, "CoordinatorSignalKindSchema", { enumerable: true, get: function () { return coordinator_signal_js_1.CoordinatorSignalKindSchema; } });
22
+ Object.defineProperty(exports, "CoordinatorSignalArtifactV1Schema", { enumerable: true, get: function () { return coordinator_signal_js_1.CoordinatorSignalArtifactV1Schema; } });
23
+ Object.defineProperty(exports, "isCoordinatorSignalArtifact", { enumerable: true, get: function () { return coordinator_signal_js_1.isCoordinatorSignalArtifact; } });
24
+ Object.defineProperty(exports, "parseCoordinatorSignalArtifact", { enumerable: true, get: function () { return coordinator_signal_js_1.parseCoordinatorSignalArtifact; } });
25
+ var review_verdict_js_1 = require("./review-verdict.js");
26
+ Object.defineProperty(exports, "REVIEW_VERDICT_CONTRACT_REF", { enumerable: true, get: function () { return review_verdict_js_1.REVIEW_VERDICT_CONTRACT_REF; } });
27
+ Object.defineProperty(exports, "ReviewVerdictArtifactV1Schema", { enumerable: true, get: function () { return review_verdict_js_1.ReviewVerdictArtifactV1Schema; } });
28
+ Object.defineProperty(exports, "isReviewVerdictArtifact", { enumerable: true, get: function () { return review_verdict_js_1.isReviewVerdictArtifact; } });
29
+ Object.defineProperty(exports, "parseReviewVerdictArtifact", { enumerable: true, get: function () { return review_verdict_js_1.parseReviewVerdictArtifact; } });
19
30
  exports.ARTIFACT_CONTRACT_REFS = [
20
31
  'wr.contracts.assessment',
21
32
  'wr.contracts.loop_control',
33
+ 'wr.contracts.coordinator_signal',
34
+ 'wr.contracts.review_verdict',
22
35
  ];
23
36
  function isValidContractRef(ref) {
24
37
  return exports.ARTIFACT_CONTRACT_REFS.includes(ref);
@@ -0,0 +1,41 @@
1
+ import { z } from 'zod';
2
+ export declare const REVIEW_VERDICT_CONTRACT_REF: "wr.contracts.review_verdict";
3
+ export declare const ReviewVerdictArtifactV1Schema: z.ZodObject<{
4
+ kind: z.ZodLiteral<"wr.review_verdict">;
5
+ verdict: z.ZodEnum<["clean", "minor", "blocking"]>;
6
+ confidence: z.ZodEnum<["high", "medium", "low"]>;
7
+ findings: z.ZodArray<z.ZodObject<{
8
+ severity: z.ZodEnum<["critical", "major", "minor", "nit"]>;
9
+ summary: z.ZodString;
10
+ }, "strict", z.ZodTypeAny, {
11
+ summary: string;
12
+ severity: "minor" | "critical" | "major" | "nit";
13
+ }, {
14
+ summary: string;
15
+ severity: "minor" | "critical" | "major" | "nit";
16
+ }>, "many">;
17
+ summary: z.ZodString;
18
+ }, "strict", z.ZodTypeAny, {
19
+ kind: "wr.review_verdict";
20
+ summary: string;
21
+ confidence: "high" | "medium" | "low";
22
+ verdict: "clean" | "minor" | "blocking";
23
+ findings: {
24
+ summary: string;
25
+ severity: "minor" | "critical" | "major" | "nit";
26
+ }[];
27
+ }, {
28
+ kind: "wr.review_verdict";
29
+ summary: string;
30
+ confidence: "high" | "medium" | "low";
31
+ verdict: "clean" | "minor" | "blocking";
32
+ findings: {
33
+ summary: string;
34
+ severity: "minor" | "critical" | "major" | "nit";
35
+ }[];
36
+ }>;
37
+ export type ReviewVerdictArtifactV1 = z.infer<typeof ReviewVerdictArtifactV1Schema>;
38
+ export declare function isReviewVerdictArtifact(artifact: unknown): artifact is {
39
+ readonly kind: 'wr.review_verdict';
40
+ };
41
+ export declare function parseReviewVerdictArtifact(artifact: unknown): ReviewVerdictArtifactV1 | null;
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ReviewVerdictArtifactV1Schema = exports.REVIEW_VERDICT_CONTRACT_REF = void 0;
4
+ exports.isReviewVerdictArtifact = isReviewVerdictArtifact;
5
+ exports.parseReviewVerdictArtifact = parseReviewVerdictArtifact;
6
+ const zod_1 = require("zod");
7
+ exports.REVIEW_VERDICT_CONTRACT_REF = 'wr.contracts.review_verdict';
8
+ exports.ReviewVerdictArtifactV1Schema = zod_1.z
9
+ .object({
10
+ kind: zod_1.z.literal('wr.review_verdict'),
11
+ verdict: zod_1.z.enum(['clean', 'minor', 'blocking']),
12
+ confidence: zod_1.z.enum(['high', 'medium', 'low']),
13
+ findings: zod_1.z.array(zod_1.z
14
+ .object({
15
+ severity: zod_1.z.enum(['critical', 'major', 'minor', 'nit']),
16
+ summary: zod_1.z.string().min(1),
17
+ })
18
+ .strict()),
19
+ summary: zod_1.z.string().min(1),
20
+ })
21
+ .strict();
22
+ function isReviewVerdictArtifact(artifact) {
23
+ return (typeof artifact === 'object' &&
24
+ artifact !== null &&
25
+ artifact.kind === 'wr.review_verdict');
26
+ }
27
+ function parseReviewVerdictArtifact(artifact) {
28
+ const result = exports.ReviewVerdictArtifactV1Schema.safeParse(artifact);
29
+ return result.success ? result.data : null;
30
+ }