@exaudeus/workrail 3.64.0 → 3.65.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.
- package/dist/console-ui/assets/{index-DGj8EsFR.css → index-DHrKiMCf.css} +1 -1
- package/dist/console-ui/assets/{index-DGM664Gr.js → index-DmFHE8v_.js} +9 -9
- package/dist/console-ui/index.html +2 -2
- package/dist/manifest.json +38 -30
- package/dist/mcp/handlers/v2-advance-core/outcome-success.js +65 -0
- package/dist/mcp/handlers/v2-advance-events.d.ts +11 -0
- package/dist/mcp/handlers/v2-advance-events.js +19 -0
- package/dist/mcp/output-schemas.d.ts +4 -4
- package/dist/v2/durable-core/constants.d.ts +1 -0
- package/dist/v2/durable-core/constants.js +1 -0
- package/dist/v2/durable-core/schemas/export-bundle/index.d.ts +294 -0
- package/dist/v2/durable-core/schemas/session/events.d.ts +90 -0
- package/dist/v2/durable-core/schemas/session/events.js +16 -0
- package/dist/v2/projections/session-metrics.d.ts +15 -0
- package/dist/v2/projections/session-metrics.js +102 -0
- package/dist/v2/usecases/console-routes.js +59 -0
- package/dist/v2/usecases/console-service.js +18 -4
- package/dist/v2/usecases/console-types.d.ts +5 -0
- package/package.json +1 -1
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
<meta charset="UTF-8" />
|
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
6
|
<title>WorkRail Console</title>
|
|
7
|
-
<script type="module" crossorigin src="/console/assets/index-
|
|
8
|
-
<link rel="stylesheet" crossorigin href="/console/assets/index-
|
|
7
|
+
<script type="module" crossorigin src="/console/assets/index-DmFHE8v_.js"></script>
|
|
8
|
+
<link rel="stylesheet" crossorigin href="/console/assets/index-DHrKiMCf.css">
|
|
9
9
|
</head>
|
|
10
10
|
<body>
|
|
11
11
|
<div id="root"></div>
|
package/dist/manifest.json
CHANGED
|
@@ -473,16 +473,16 @@
|
|
|
473
473
|
"sha256": "5fe866e54f796975dec5d8ba9983aefd86074db212d3fccd64eed04bc9f0b3da",
|
|
474
474
|
"bytes": 8011
|
|
475
475
|
},
|
|
476
|
-
"console-ui/assets/index-
|
|
477
|
-
"sha256": "
|
|
478
|
-
"bytes":
|
|
476
|
+
"console-ui/assets/index-DHrKiMCf.css": {
|
|
477
|
+
"sha256": "40290b50e21ee7e82433efe13b1aa31c1ea608bd057a5c4e324982f284bc928b",
|
|
478
|
+
"bytes": 60673
|
|
479
479
|
},
|
|
480
|
-
"console-ui/assets/index-
|
|
481
|
-
"sha256": "
|
|
482
|
-
"bytes":
|
|
480
|
+
"console-ui/assets/index-DmFHE8v_.js": {
|
|
481
|
+
"sha256": "c7ef94aea9b5ea532428c8883d25a73fa623bf90bc2d24e81ca401d442c029dd",
|
|
482
|
+
"bytes": 767983
|
|
483
483
|
},
|
|
484
484
|
"console-ui/index.html": {
|
|
485
|
-
"sha256": "
|
|
485
|
+
"sha256": "310cdfdf0c020a8b14aa86ec5d0126b2c412bbacfb042b678124b8a450155b26",
|
|
486
486
|
"bytes": 417
|
|
487
487
|
},
|
|
488
488
|
"console/standalone-console.d.ts": {
|
|
@@ -1082,16 +1082,16 @@
|
|
|
1082
1082
|
"bytes": 1055
|
|
1083
1083
|
},
|
|
1084
1084
|
"mcp/handlers/v2-advance-core/outcome-success.js": {
|
|
1085
|
-
"sha256": "
|
|
1086
|
-
"bytes":
|
|
1085
|
+
"sha256": "da571c46173d12cc689abcfbf6d7e3768ef04c958f073ff1b22347ae23a68fde",
|
|
1086
|
+
"bytes": 10703
|
|
1087
1087
|
},
|
|
1088
1088
|
"mcp/handlers/v2-advance-events.d.ts": {
|
|
1089
|
-
"sha256": "
|
|
1090
|
-
"bytes":
|
|
1089
|
+
"sha256": "318894df12e0dfc74cad9e81fcea44bc04ea972d6e887cd5b196de1f144e256b",
|
|
1090
|
+
"bytes": 3226
|
|
1091
1091
|
},
|
|
1092
1092
|
"mcp/handlers/v2-advance-events.js": {
|
|
1093
|
-
"sha256": "
|
|
1094
|
-
"bytes":
|
|
1093
|
+
"sha256": "b3278a63cebab6b54b72cef596c0c7dee31d04246a29339828f283386174e6ad",
|
|
1094
|
+
"bytes": 5919
|
|
1095
1095
|
},
|
|
1096
1096
|
"mcp/handlers/v2-checkpoint.d.ts": {
|
|
1097
1097
|
"sha256": "8f22b341bb0ffffb3b24a89067e2a6513ef004ca21c1a42ce48979c2c663b18c",
|
|
@@ -1262,7 +1262,7 @@
|
|
|
1262
1262
|
"bytes": 7991
|
|
1263
1263
|
},
|
|
1264
1264
|
"mcp/output-schemas.d.ts": {
|
|
1265
|
-
"sha256": "
|
|
1265
|
+
"sha256": "ecd9ff8b4a2e2514385d5f5031a4c99bb67884f6a96ea9dd42b62c31bf2687d1",
|
|
1266
1266
|
"bytes": 93176
|
|
1267
1267
|
},
|
|
1268
1268
|
"mcp/output-schemas.js": {
|
|
@@ -1894,12 +1894,12 @@
|
|
|
1894
1894
|
"bytes": 447
|
|
1895
1895
|
},
|
|
1896
1896
|
"v2/durable-core/constants.d.ts": {
|
|
1897
|
-
"sha256": "
|
|
1898
|
-
"bytes":
|
|
1897
|
+
"sha256": "763799ad89e664118c556e6d496809f12f3f946a3083641aa5b5c5c15a7692ba",
|
|
1898
|
+
"bytes": 3991
|
|
1899
1899
|
},
|
|
1900
1900
|
"v2/durable-core/constants.js": {
|
|
1901
|
-
"sha256": "
|
|
1902
|
-
"bytes":
|
|
1901
|
+
"sha256": "9bfd85c65d303953aefd4bad643a8bc51f8cbca741bfcc0a87c6f464f5cf73dc",
|
|
1902
|
+
"bytes": 3877
|
|
1903
1903
|
},
|
|
1904
1904
|
"v2/durable-core/domain/ack-advance-append-plan.d.ts": {
|
|
1905
1905
|
"sha256": "2b4a8ad0e1d9e9066f100f958e572f19af590ab70946c2396d2d5568875bdf00",
|
|
@@ -2342,8 +2342,8 @@
|
|
|
2342
2342
|
"bytes": 3397
|
|
2343
2343
|
},
|
|
2344
2344
|
"v2/durable-core/schemas/export-bundle/index.d.ts": {
|
|
2345
|
-
"sha256": "
|
|
2346
|
-
"bytes":
|
|
2345
|
+
"sha256": "ff1ecf2c94733299d79f0a448038bb1db3c3fc015184e7c90d5124264443a22f",
|
|
2346
|
+
"bytes": 551200
|
|
2347
2347
|
},
|
|
2348
2348
|
"v2/durable-core/schemas/export-bundle/index.js": {
|
|
2349
2349
|
"sha256": "6e3566b2d05ea6302bbf4d311b8ec3e94725a8523834efe7670a79e7bd7dc40d",
|
|
@@ -2398,12 +2398,12 @@
|
|
|
2398
2398
|
"bytes": 2138
|
|
2399
2399
|
},
|
|
2400
2400
|
"v2/durable-core/schemas/session/events.d.ts": {
|
|
2401
|
-
"sha256": "
|
|
2402
|
-
"bytes":
|
|
2401
|
+
"sha256": "c5117fba94923bbc61dfcf705c96bde3d1ee6f0e27dd558ad728cb851ed29a50",
|
|
2402
|
+
"bytes": 84590
|
|
2403
2403
|
},
|
|
2404
2404
|
"v2/durable-core/schemas/session/events.js": {
|
|
2405
|
-
"sha256": "
|
|
2406
|
-
"bytes":
|
|
2405
|
+
"sha256": "6b1f80f3d9d7329a59b4afd433e939c2c0e22da5b1e9b0cb1586e124522ed31f",
|
|
2406
|
+
"bytes": 13831
|
|
2407
2407
|
},
|
|
2408
2408
|
"v2/durable-core/schemas/session/gaps.d.ts": {
|
|
2409
2409
|
"sha256": "85d17b865a1ebe9deaa0c99d69039c514b217362715c6697b0bc5908cbf9fff0",
|
|
@@ -3061,6 +3061,14 @@
|
|
|
3061
3061
|
"sha256": "56d9fbed93ce1fa71ba8ab39f5fa49c4b221936dfec9339c15bd5aca2b4c878e",
|
|
3062
3062
|
"bytes": 550
|
|
3063
3063
|
},
|
|
3064
|
+
"v2/projections/session-metrics.d.ts": {
|
|
3065
|
+
"sha256": "f9ec2280053a9424f691246212522359263e526701cb4b3605e44870600c862c",
|
|
3066
|
+
"bytes": 741
|
|
3067
|
+
},
|
|
3068
|
+
"v2/projections/session-metrics.js": {
|
|
3069
|
+
"sha256": "932dde53bb03804546741a50516b9be78d7723b0fa7beb81ad4225f1f346f2b1",
|
|
3070
|
+
"bytes": 3890
|
|
3071
|
+
},
|
|
3064
3072
|
"v2/read-only/v1-to-v2-shim.d.ts": {
|
|
3065
3073
|
"sha256": "b122df1d4eb4119b65465baa00f157ca4466575d3bc6ac20054a361eaff48e02",
|
|
3066
3074
|
"bytes": 746
|
|
@@ -3074,20 +3082,20 @@
|
|
|
3074
3082
|
"bytes": 596
|
|
3075
3083
|
},
|
|
3076
3084
|
"v2/usecases/console-routes.js": {
|
|
3077
|
-
"sha256": "
|
|
3078
|
-
"bytes":
|
|
3085
|
+
"sha256": "cac41733df0270c8882c1ccc57e616862e422b7dd4aaf78783bb98a21c6edd81",
|
|
3086
|
+
"bytes": 31338
|
|
3079
3087
|
},
|
|
3080
3088
|
"v2/usecases/console-service.d.ts": {
|
|
3081
3089
|
"sha256": "fc8fe65427fa9f4f3535344b385b36f66ca06b7e3bfaea708931817a3edcad2b",
|
|
3082
3090
|
"bytes": 1701
|
|
3083
3091
|
},
|
|
3084
3092
|
"v2/usecases/console-service.js": {
|
|
3085
|
-
"sha256": "
|
|
3086
|
-
"bytes":
|
|
3093
|
+
"sha256": "0d0296877eeb561603d55d5e48e31e69a8e338995cebacdecff20f887012c4c8",
|
|
3094
|
+
"bytes": 39213
|
|
3087
3095
|
},
|
|
3088
3096
|
"v2/usecases/console-types.d.ts": {
|
|
3089
|
-
"sha256": "
|
|
3090
|
-
"bytes":
|
|
3097
|
+
"sha256": "a45892442f1581feb00e2ad9bbe172d34703d03855801288cf9269ad35eaa6aa",
|
|
3098
|
+
"bytes": 8002
|
|
3091
3099
|
},
|
|
3092
3100
|
"v2/usecases/console-types.js": {
|
|
3093
3101
|
"sha256": "d43aa81f5bc89faa359e0f97c814ba25155591ff078fbb9bfd40f8c7c9683230",
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.buildSuccessOutcome = buildSuccessOutcome;
|
|
4
|
+
const node_child_process_1 = require("node:child_process");
|
|
5
|
+
const node_util_1 = require("node:util");
|
|
4
6
|
const neverthrow_1 = require("neverthrow");
|
|
5
7
|
const workflow_compiler_js_1 = require("../../../application/services/workflow-compiler.js");
|
|
6
8
|
const workflow_interpreter_js_1 = require("../../../application/services/workflow-interpreter.js");
|
|
@@ -10,6 +12,28 @@ const v2_context_budget_js_1 = require("../v2-context-budget.js");
|
|
|
10
12
|
const v2_advance_events_js_1 = require("../v2-advance-events.js");
|
|
11
13
|
const event_builders_js_1 = require("./event-builders.js");
|
|
12
14
|
const assessment_recorded_event_builder_js_1 = require("../../../v2/durable-core/domain/assessment-recorded-event-builder.js");
|
|
15
|
+
const execFileAsync = (0, node_util_1.promisify)(node_child_process_1.execFile);
|
|
16
|
+
function readObservation(events, key) {
|
|
17
|
+
for (const e of events) {
|
|
18
|
+
if (e.kind !== 'observation_recorded')
|
|
19
|
+
continue;
|
|
20
|
+
if (e.data.key !== key)
|
|
21
|
+
continue;
|
|
22
|
+
return e.data.value.value;
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
async function resolveEndGitSha(repoRoot) {
|
|
27
|
+
if (!repoRoot)
|
|
28
|
+
return null;
|
|
29
|
+
try {
|
|
30
|
+
const { stdout } = await execFileAsync('git', ['rev-parse', 'HEAD'], { cwd: repoRoot, timeout: 2000 });
|
|
31
|
+
return stdout.trim() || null;
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return null;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
13
37
|
function successNodeKind(mode) {
|
|
14
38
|
switch (mode.kind) {
|
|
15
39
|
case 'fresh': return undefined;
|
|
@@ -152,6 +176,47 @@ function buildSuccessOutcome(args) {
|
|
|
152
176
|
extraEventsToAppend.push(assessmentEventRes.value);
|
|
153
177
|
}
|
|
154
178
|
const outputsToAppend = [...notesOutputs, ...artifactOutputsRes.value];
|
|
179
|
+
if (newEngineState.kind === 'complete') {
|
|
180
|
+
const repoRoot = readObservation(truth.events, 'repo_root');
|
|
181
|
+
const startGitSha = readObservation(truth.events, 'git_head_sha');
|
|
182
|
+
const gitBranch = readObservation(truth.events, 'git_branch');
|
|
183
|
+
let agentCommitShas = [];
|
|
184
|
+
for (const e of truth.events) {
|
|
185
|
+
if (e.kind !== 'context_set')
|
|
186
|
+
continue;
|
|
187
|
+
const ctx = e.data['context'];
|
|
188
|
+
if (ctx && typeof ctx === 'object' && !Array.isArray(ctx)) {
|
|
189
|
+
const shas = ctx['metrics_commit_shas'];
|
|
190
|
+
if (Array.isArray(shas) && shas.every(s => typeof s === 'string')) {
|
|
191
|
+
agentCommitShas = shas;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
const firstTs = truth.events[0]?.timestampMs;
|
|
196
|
+
const lastTs = truth.events[truth.events.length - 1]?.timestampMs;
|
|
197
|
+
const durationMs = (firstTs !== undefined && lastTs !== undefined) ? (lastTs - firstTs) : undefined;
|
|
198
|
+
return neverthrow_1.ResultAsync.fromPromise(resolveEndGitSha(repoRoot), (e) => ({ kind: 'advance_apply_failed', message: String(e) })).andThen((endGitSha) => {
|
|
199
|
+
const captureConfidence = agentCommitShas.length > 0 ? 'high' : 'none';
|
|
200
|
+
extraEventsToAppend.push((0, v2_advance_events_js_1.buildRunCompletedEvent)({
|
|
201
|
+
sessionId: String(sessionId),
|
|
202
|
+
runId: String(runId),
|
|
203
|
+
startGitSha,
|
|
204
|
+
endGitSha,
|
|
205
|
+
gitBranch,
|
|
206
|
+
agentCommitShas,
|
|
207
|
+
captureConfidence,
|
|
208
|
+
durationMs,
|
|
209
|
+
idFactory,
|
|
210
|
+
}));
|
|
211
|
+
return (0, event_builders_js_1.buildAndAppendPlan)({
|
|
212
|
+
kind: 'advanced',
|
|
213
|
+
truth, lockedIndex: args.lockedIndex, sessionId, runId, currentNodeId, attemptId, workflowHash,
|
|
214
|
+
extraEventsToAppend, toNodeKind: successNodeKind(mode),
|
|
215
|
+
snapshotRef: newSnapshotRef, outputsToAppend,
|
|
216
|
+
sessionStore, idFactory, lock,
|
|
217
|
+
});
|
|
218
|
+
});
|
|
219
|
+
}
|
|
155
220
|
return (0, event_builders_js_1.buildAndAppendPlan)({
|
|
156
221
|
kind: 'advanced',
|
|
157
222
|
truth, lockedIndex: args.lockedIndex, sessionId, runId, currentNodeId, attemptId, workflowHash,
|
|
@@ -58,4 +58,15 @@ export declare function buildDecisionTraceEvent(args: {
|
|
|
58
58
|
readonly nodeId: NodeId;
|
|
59
59
|
readonly idFactory: AdvanceCorePorts['idFactory'];
|
|
60
60
|
}): Result<PartialEvent | null, InternalError>;
|
|
61
|
+
export declare function buildRunCompletedEvent(args: {
|
|
62
|
+
readonly sessionId: string;
|
|
63
|
+
readonly runId: string;
|
|
64
|
+
readonly startGitSha: string | null;
|
|
65
|
+
readonly endGitSha: string | null;
|
|
66
|
+
readonly gitBranch: string | null;
|
|
67
|
+
readonly agentCommitShas: string[];
|
|
68
|
+
readonly captureConfidence: 'high' | 'none';
|
|
69
|
+
readonly durationMs: number | undefined;
|
|
70
|
+
readonly idFactory: AdvanceCorePorts['idFactory'];
|
|
71
|
+
}): PartialEvent;
|
|
61
72
|
export {};
|
|
@@ -5,6 +5,7 @@ exports.buildRecommendationWarningEvents = buildRecommendationWarningEvents;
|
|
|
5
5
|
exports.buildContextSetEvent = buildContextSetEvent;
|
|
6
6
|
exports.buildSuccessValidationEvent = buildSuccessValidationEvent;
|
|
7
7
|
exports.buildDecisionTraceEvent = buildDecisionTraceEvent;
|
|
8
|
+
exports.buildRunCompletedEvent = buildRunCompletedEvent;
|
|
8
9
|
const neverthrow_1 = require("neverthrow");
|
|
9
10
|
const reason_model_js_1 = require("../../v2/durable-core/domain/reason-model.js");
|
|
10
11
|
const validation_event_builder_js_1 = require("../../v2/durable-core/domain/validation-event-builder.js");
|
|
@@ -124,3 +125,21 @@ function buildDecisionTraceEvent(args) {
|
|
|
124
125
|
data: traceDataRes.value,
|
|
125
126
|
}));
|
|
126
127
|
}
|
|
128
|
+
function buildRunCompletedEvent(args) {
|
|
129
|
+
const { sessionId, runId, startGitSha, endGitSha, gitBranch, agentCommitShas, captureConfidence, durationMs, idFactory } = args;
|
|
130
|
+
return partialEvent({
|
|
131
|
+
v: 1,
|
|
132
|
+
eventId: idFactory.mintEventId(),
|
|
133
|
+
kind: constants_js_1.EVENT_KIND.RUN_COMPLETED,
|
|
134
|
+
dedupeKey: `run-completed:${sessionId}:${runId}`,
|
|
135
|
+
scope: { runId },
|
|
136
|
+
data: {
|
|
137
|
+
startGitSha,
|
|
138
|
+
endGitSha,
|
|
139
|
+
gitBranch,
|
|
140
|
+
agentCommitShas,
|
|
141
|
+
captureConfidence,
|
|
142
|
+
...(durationMs !== undefined ? { durationMs } : {}),
|
|
143
|
+
},
|
|
144
|
+
});
|
|
145
|
+
}
|
|
@@ -2261,11 +2261,11 @@ export declare const V2ResumeSessionOutputSchema: z.ZodObject<{
|
|
|
2261
2261
|
runId: string;
|
|
2262
2262
|
workflowId: string;
|
|
2263
2263
|
confidence: "strong" | "weak" | "medium";
|
|
2264
|
+
gitBranch: string | null;
|
|
2264
2265
|
isComplete: boolean;
|
|
2265
2266
|
pendingStepId: string | null;
|
|
2266
2267
|
sessionTitle: string | null;
|
|
2267
2268
|
lastModifiedMs: number | null;
|
|
2268
|
-
gitBranch: string | null;
|
|
2269
2269
|
nextCall: {
|
|
2270
2270
|
params: {
|
|
2271
2271
|
intent: "rehydrate";
|
|
@@ -2282,11 +2282,11 @@ export declare const V2ResumeSessionOutputSchema: z.ZodObject<{
|
|
|
2282
2282
|
runId: string;
|
|
2283
2283
|
workflowId: string;
|
|
2284
2284
|
confidence: "strong" | "weak" | "medium";
|
|
2285
|
+
gitBranch: string | null;
|
|
2285
2286
|
isComplete: boolean;
|
|
2286
2287
|
pendingStepId: string | null;
|
|
2287
2288
|
sessionTitle: string | null;
|
|
2288
2289
|
lastModifiedMs: number | null;
|
|
2289
|
-
gitBranch: string | null;
|
|
2290
2290
|
nextCall: {
|
|
2291
2291
|
params: {
|
|
2292
2292
|
intent: "rehydrate";
|
|
@@ -2306,11 +2306,11 @@ export declare const V2ResumeSessionOutputSchema: z.ZodObject<{
|
|
|
2306
2306
|
runId: string;
|
|
2307
2307
|
workflowId: string;
|
|
2308
2308
|
confidence: "strong" | "weak" | "medium";
|
|
2309
|
+
gitBranch: string | null;
|
|
2309
2310
|
isComplete: boolean;
|
|
2310
2311
|
pendingStepId: string | null;
|
|
2311
2312
|
sessionTitle: string | null;
|
|
2312
2313
|
lastModifiedMs: number | null;
|
|
2313
|
-
gitBranch: string | null;
|
|
2314
2314
|
nextCall: {
|
|
2315
2315
|
params: {
|
|
2316
2316
|
intent: "rehydrate";
|
|
@@ -2330,11 +2330,11 @@ export declare const V2ResumeSessionOutputSchema: z.ZodObject<{
|
|
|
2330
2330
|
runId: string;
|
|
2331
2331
|
workflowId: string;
|
|
2332
2332
|
confidence: "strong" | "weak" | "medium";
|
|
2333
|
+
gitBranch: string | null;
|
|
2333
2334
|
isComplete: boolean;
|
|
2334
2335
|
pendingStepId: string | null;
|
|
2335
2336
|
sessionTitle: string | null;
|
|
2336
2337
|
lastModifiedMs: number | null;
|
|
2337
|
-
gitBranch: string | null;
|
|
2338
2338
|
nextCall: {
|
|
2339
2339
|
params: {
|
|
2340
2340
|
intent: "rehydrate";
|
|
@@ -37,6 +37,7 @@ export declare const EVENT_KIND: {
|
|
|
37
37
|
readonly CONTEXT_SET: "context_set";
|
|
38
38
|
readonly DIVERGENCE_RECORDED: "divergence_recorded";
|
|
39
39
|
readonly DECISION_TRACE_APPENDED: "decision_trace_appended";
|
|
40
|
+
readonly RUN_COMPLETED: "run_completed";
|
|
40
41
|
};
|
|
41
42
|
export type EventKindV1 = typeof EVENT_KIND[keyof typeof EVENT_KIND];
|
|
42
43
|
export declare const OUTPUT_CHANNEL: {
|