@exaudeus/workrail 3.72.4 → 3.73.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-BuJ0Md-A.js → index-HnM-KywY.js} +1 -1
- package/dist/console-ui/index.html +1 -1
- package/dist/daemon/agent-loop.d.ts +3 -0
- package/dist/daemon/agent-loop.js +20 -1
- package/dist/daemon/daemon-events.d.ts +1 -1
- package/dist/daemon/tools/spawn-agent.js +1 -1
- package/dist/daemon/workflow-runner.d.ts +6 -3
- package/dist/daemon/workflow-runner.js +23 -5
- package/dist/manifest.json +43 -43
- package/dist/mcp/handlers/v2-execution/index.js +1 -1
- package/dist/mcp/handlers/v2-execution/start.js +3 -0
- package/dist/trigger/coordinator-deps.js +1 -1
- package/dist/trigger/polling-scheduler.d.ts +1 -0
- package/dist/trigger/polling-scheduler.js +25 -6
- package/dist/trigger/trigger-store.js +16 -1
- package/dist/trigger/types.d.ts +1 -0
- package/dist/v2/durable-core/schemas/export-bundle/index.d.ts +16 -0
- package/dist/v2/durable-core/schemas/session/events.d.ts +5 -0
- package/dist/v2/durable-core/schemas/session/events.js +1 -0
- package/dist/v2/usecases/console-routes.js +1 -1
- package/dist/v2/usecases/console-service.js +26 -2
- package/dist/v2/usecases/console-types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -44,6 +44,7 @@ const RunStartedDataV1Schema = zod_1.z.object({
|
|
|
44
44
|
workflowHash: workflowHashSchema,
|
|
45
45
|
workflowSourceKind: WorkflowSourceKindSchema,
|
|
46
46
|
workflowSourceRef: zod_1.z.string().min(1),
|
|
47
|
+
triggerSource: zod_1.z.enum(['daemon', 'mcp']).optional(),
|
|
47
48
|
});
|
|
48
49
|
const AdvanceRecordedOutcomeV1Schema = zod_1.z.discriminatedUnion('kind', [
|
|
49
50
|
zod_1.z.object({ kind: zod_1.z.literal('blocked'), blockers: blockers_js_1.BlockerReportV1Schema }),
|
|
@@ -625,7 +625,7 @@ function mountConsoleRoutes(app, consoleService, workflowService, timingRingBuff
|
|
|
625
625
|
res.status(503).json({ success: false, error: 'No LLM credentials available. Set ANTHROPIC_API_KEY or AWS_PROFILE.' });
|
|
626
626
|
return;
|
|
627
627
|
}
|
|
628
|
-
const startResult = await (0, start_js_1.executeStartWorkflow)({ workflowId, workspacePath, goal }, v2ToolContext, { is_autonomous: 'true', workspacePath });
|
|
628
|
+
const startResult = await (0, start_js_1.executeStartWorkflow)({ workflowId, workspacePath, goal }, v2ToolContext, { is_autonomous: 'true', workspacePath, triggerSource: 'daemon' });
|
|
629
629
|
if (startResult.isErr()) {
|
|
630
630
|
const errDetail = `${startResult.error.kind}${'message' in startResult.error ? `: ${startResult.error.message}` : ''}`;
|
|
631
631
|
res.status(400).json({ success: false, error: `Session creation failed: ${errDetail}` });
|
|
@@ -643,6 +643,16 @@ function projectSessionSummary(sessionId, truth, completionByRunId, workflowName
|
|
|
643
643
|
return false;
|
|
644
644
|
return Object.values(contextRes.value.byRunId).some((runCtx) => runCtx.context['is_autonomous'] === 'true');
|
|
645
645
|
})();
|
|
646
|
+
const triggerSource = (() => {
|
|
647
|
+
if (sortedEventsRes.isOk()) {
|
|
648
|
+
for (const e of sortedEventsRes.value) {
|
|
649
|
+
if (e.kind === 'run_started' && e.data.triggerSource !== undefined) {
|
|
650
|
+
return e.data.triggerSource;
|
|
651
|
+
}
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
return isAutonomous ? 'daemon' : 'mcp';
|
|
655
|
+
})();
|
|
646
656
|
const metrics = (0, session_metrics_js_1.projectSessionMetricsV2)(events);
|
|
647
657
|
const runs = Object.values(dag.runsById);
|
|
648
658
|
const run = runs[0];
|
|
@@ -666,6 +676,7 @@ function projectSessionSummary(sessionId, truth, completionByRunId, workflowName
|
|
|
666
676
|
repoRoot,
|
|
667
677
|
lastModifiedMs,
|
|
668
678
|
isAutonomous,
|
|
679
|
+
triggerSource,
|
|
669
680
|
isLive,
|
|
670
681
|
parentSessionId,
|
|
671
682
|
metrics,
|
|
@@ -713,6 +724,7 @@ function projectSessionSummary(sessionId, truth, completionByRunId, workflowName
|
|
|
713
724
|
repoRoot,
|
|
714
725
|
lastModifiedMs,
|
|
715
726
|
isAutonomous,
|
|
727
|
+
triggerSource,
|
|
716
728
|
isLive,
|
|
717
729
|
parentSessionId,
|
|
718
730
|
metrics,
|
|
@@ -724,9 +736,21 @@ function projectSessionDetail(sessionId, truth, completionByRunId, stepLabels, w
|
|
|
724
736
|
const sessionHealth = health.isOk() && health.value.kind === 'healthy' ? 'healthy' : 'corrupt';
|
|
725
737
|
const sortedEventsRes = (0, sorted_event_log_js_1.asSortedEventLog)(events);
|
|
726
738
|
const sessionTitle = sortedEventsRes.isOk() ? deriveSessionTitle(sortedEventsRes.value) : null;
|
|
739
|
+
const detailTriggerSource = (() => {
|
|
740
|
+
if (sortedEventsRes.isOk()) {
|
|
741
|
+
for (const e of sortedEventsRes.value) {
|
|
742
|
+
if (e.kind === 'run_started' && e.data.triggerSource !== undefined) {
|
|
743
|
+
return e.data.triggerSource;
|
|
744
|
+
}
|
|
745
|
+
}
|
|
746
|
+
}
|
|
747
|
+
const contextRes = sortedEventsRes.isOk() ? (0, run_context_js_1.projectRunContextV2)(sortedEventsRes.value) : (0, neverthrow_2.err)(sortedEventsRes.error);
|
|
748
|
+
const isAutonomous = contextRes.isOk() && Object.values(contextRes.value.byRunId).some((runCtx) => runCtx.context['is_autonomous'] === 'true');
|
|
749
|
+
return isAutonomous ? 'daemon' : 'mcp';
|
|
750
|
+
})();
|
|
727
751
|
const dagRes = (0, run_dag_js_1.projectRunDagV2)(events);
|
|
728
752
|
if (dagRes.isErr()) {
|
|
729
|
-
return { sessionId, sessionTitle, health: sessionHealth, runs: [], metrics: null, repoRoot: null };
|
|
753
|
+
return { sessionId, sessionTitle, health: sessionHealth, runs: [], metrics: null, repoRoot: null, triggerSource: detailTriggerSource };
|
|
730
754
|
}
|
|
731
755
|
const statusRes = sortedEventsRes.isOk() ? (0, run_status_signals_js_1.projectRunStatusSignalsV2)(sortedEventsRes.value) : (0, neverthrow_2.err)(sortedEventsRes.error);
|
|
732
756
|
const gapsRes = sortedEventsRes.isOk() ? (0, gaps_js_1.projectGapsV2)(sortedEventsRes.value) : (0, neverthrow_2.err)(sortedEventsRes.error);
|
|
@@ -795,7 +819,7 @@ function projectSessionDetail(sessionId, truth, completionByRunId, stepLabels, w
|
|
|
795
819
|
skippedSteps: skippedStepsMap[run.runId] ?? [],
|
|
796
820
|
};
|
|
797
821
|
});
|
|
798
|
-
return { sessionId, sessionTitle, health: sessionHealth, runs, metrics: null, repoRoot: null };
|
|
822
|
+
return { sessionId, sessionTitle, health: sessionHealth, runs, metrics: null, repoRoot: null, triggerSource: detailTriggerSource };
|
|
799
823
|
}
|
|
800
824
|
function deriveRunStatus(isBlocked, hasUnresolvedCriticalGaps, isComplete) {
|
|
801
825
|
if (isBlocked)
|
|
@@ -21,6 +21,7 @@ export interface ConsoleSessionSummary {
|
|
|
21
21
|
readonly repoRoot: string | null;
|
|
22
22
|
readonly lastModifiedMs: number;
|
|
23
23
|
readonly isAutonomous: boolean;
|
|
24
|
+
readonly triggerSource: 'daemon' | 'mcp';
|
|
24
25
|
readonly isLive: boolean;
|
|
25
26
|
readonly parentSessionId: string | null;
|
|
26
27
|
readonly metrics: SessionMetricsV2 | null;
|
|
@@ -95,6 +96,7 @@ export interface ConsoleSessionDetail {
|
|
|
95
96
|
readonly liveActivity?: readonly ConsoleToolActivity[] | null;
|
|
96
97
|
readonly metrics: SessionMetricsV2 | null;
|
|
97
98
|
readonly repoRoot: string | null;
|
|
99
|
+
readonly triggerSource: 'daemon' | 'mcp';
|
|
98
100
|
}
|
|
99
101
|
export type ConsoleValidationOutcome = 'pass' | 'fail';
|
|
100
102
|
export interface ConsoleValidationResult {
|