@exaudeus/workrail 3.66.0 → 3.68.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/application/services/compiler/template-registry.js +10 -1
- package/dist/application/validation.js +1 -1
- package/dist/cli/commands/worktrain-init.js +1 -1
- package/dist/console/standalone-console.js +4 -1
- package/dist/console-ui/assets/{index-BynU38Vu.js → index-CyzltI6D.js} +1 -1
- package/dist/console-ui/index.html +1 -1
- package/dist/coordinators/modes/full-pipeline.js +4 -4
- package/dist/coordinators/modes/implement-shared.js +5 -5
- package/dist/coordinators/modes/implement.js +4 -4
- package/dist/coordinators/pr-review.js +4 -4
- package/dist/daemon/workflow-runner.d.ts +1 -0
- package/dist/daemon/workflow-runner.js +1 -0
- package/dist/infrastructure/storage/schema-validating-workflow-storage.d.ts +21 -2
- package/dist/infrastructure/storage/schema-validating-workflow-storage.js +48 -0
- package/dist/manifest.json +41 -41
- package/dist/mcp/handlers/v2-workflow.js +24 -7
- package/dist/mcp/output-schemas.d.ts +36 -0
- package/dist/mcp/output-schemas.js +11 -1
- package/dist/mcp/workflow-protocol-contracts.js +2 -2
- package/dist/v2/projections/session-metrics.d.ts +1 -1
- package/dist/v2/projections/session-metrics.js +16 -35
- package/dist/v2/usecases/console-routes.d.ts +2 -2
- package/docs/authoring-v2.md +4 -4
- package/docs/changelog-recent.md +3 -3
- package/docs/configuration.md +1 -1
- package/docs/design/adaptive-coordinator-context-candidates.md +1 -1
- package/docs/design/adaptive-coordinator-context.md +1 -1
- package/docs/design/adaptive-coordinator-routing-candidates.md +18 -18
- package/docs/design/adaptive-coordinator-routing-review.md +1 -1
- package/docs/design/adaptive-coordinator-routing.md +34 -34
- package/docs/design/agent-cascade-protocol.md +2 -2
- package/docs/design/console-daemon-separation-discovery.md +323 -0
- package/docs/design/context-assembly-design-candidates.md +1 -1
- package/docs/design/context-assembly-implementation-plan.md +1 -1
- package/docs/design/context-assembly-layer.md +2 -2
- package/docs/design/context-assembly-review-findings.md +1 -1
- package/docs/design/coordinator-access-audit.md +293 -0
- package/docs/design/coordinator-architecture-audit.md +62 -0
- package/docs/design/coordinator-error-handling-audit.md +240 -0
- package/docs/design/coordinator-testability-audit.md +426 -0
- package/docs/design/daemon-architecture-discovery.md +1 -1
- package/docs/design/daemon-console-separation-discovery.md +242 -0
- package/docs/design/daemon-memory-audit.md +203 -0
- package/docs/design/design-candidates-console-daemon-separation.md +256 -0
- package/docs/design/design-candidates-discovery-loop-fix.md +141 -0
- package/docs/design/design-review-findings-console-daemon-separation.md +106 -0
- package/docs/design/design-review-findings-discovery-loop-fix.md +81 -0
- package/docs/design/discovery-loop-fix-candidates.md +161 -0
- package/docs/design/discovery-loop-fix-design-review.md +106 -0
- package/docs/design/discovery-loop-fix-validation.md +258 -0
- package/docs/design/discovery-loop-investigation-A.md +188 -0
- package/docs/design/discovery-loop-investigation-B.md +287 -0
- package/docs/design/exploration-workflow-candidates.md +205 -0
- package/docs/design/exploration-workflow-design-review.md +166 -0
- package/docs/design/exploration-workflow-discovery.md +443 -0
- package/docs/design/ide-context-files-candidates.md +231 -0
- package/docs/design/ide-context-files-design-review.md +85 -0
- package/docs/design/ide-context-files.md +615 -0
- package/docs/design/implementation-plan-discovery-loop-fix.md +199 -0
- package/docs/design/implementation-plan-queue-poll-rotation.md +102 -0
- package/docs/design/in-process-http-audit.md +190 -0
- package/docs/design/layer3b-ghost-nodes-design-candidates.md +2 -2
- package/docs/design/loadSessionNotes-candidates.md +108 -0
- package/docs/design/loadSessionNotes-test-coverage-discovery.md +297 -0
- package/docs/design/loadSessionNotes-test-coverage-session4.md +209 -0
- package/docs/design/loadSessionNotes-test-coverage-v3.md +321 -0
- package/docs/design/probe-session-design-candidates.md +261 -0
- package/docs/design/probe-session-phase0.md +490 -0
- package/docs/design/routines-guide.md +7 -7
- package/docs/design/session-metrics-attribution-candidates.md +250 -0
- package/docs/design/session-metrics-attribution-design-review.md +115 -0
- package/docs/design/session-metrics-attribution-discovery.md +319 -0
- package/docs/design/session-metrics-candidates.md +227 -0
- package/docs/design/session-metrics-design-review.md +104 -0
- package/docs/design/session-metrics-discovery.md +454 -0
- package/docs/design/spawn-session-debug.md +202 -0
- package/docs/design/trigger-validator-candidates.md +214 -0
- package/docs/design/trigger-validator-review.md +109 -0
- package/docs/design/trigger-validator-shaping-phase0.md +239 -0
- package/docs/design/trigger-validator.md +454 -0
- package/docs/design/v2-core-design-locks.md +2 -2
- package/docs/design/workflow-extension-points.md +15 -15
- package/docs/design/workflow-id-validation-at-startup.md +1 -1
- package/docs/design/workflow-id-validation-implementation-plan.md +2 -2
- package/docs/design/workflow-trigger-lifecycle-audit.md +175 -0
- package/docs/design/worktrain-task-queue-candidates.md +5 -5
- package/docs/design/worktrain-task-queue.md +4 -4
- package/docs/discovery/coordinator-script-design.md +1 -1
- package/docs/discovery/coordinator-ux-discovery.md +3 -3
- package/docs/discovery/simulation-report.md +1 -1
- package/docs/discovery/workflow-modernization-discovery.md +326 -0
- package/docs/discovery/workflow-selection-for-discovery-tasks.md +33 -33
- package/docs/discovery/worktrain-status-briefing.md +1 -1
- package/docs/discovery/wr-discovery-goal-reframing.md +1 -1
- package/docs/docker.md +1 -1
- package/docs/ideas/backlog.md +227 -0
- package/docs/ideas/third-party-workflow-setup-design-thinking.md +1 -1
- package/docs/integrations/claude-code.md +5 -5
- package/docs/integrations/firebender.md +1 -1
- package/docs/plans/agentic-orchestration-roadmap.md +2 -2
- package/docs/plans/mr-review-workflow-redesign.md +9 -9
- package/docs/plans/ui-ux-workflow-design-candidates.md +4 -4
- package/docs/plans/ui-ux-workflow-discovery.md +2 -2
- package/docs/plans/workflow-categories-candidates.md +8 -8
- package/docs/plans/workflow-categories-discovery.md +4 -4
- package/docs/plans/workflow-modernization-design.md +430 -0
- package/docs/plans/workflow-staleness-detection-candidates.md +11 -11
- package/docs/plans/workflow-staleness-detection-review.md +4 -4
- package/docs/plans/workflow-staleness-detection.md +9 -9
- package/docs/plans/workrail-platform-vision.md +3 -3
- package/docs/reference/agent-context-cleaner-snippet.md +1 -1
- package/docs/reference/agent-context-guidance.md +4 -4
- package/docs/reference/context-optimization.md +2 -2
- package/docs/roadmap/now-next-later.md +2 -2
- package/docs/roadmap/open-work-inventory.md +16 -16
- package/docs/workflows.md +31 -31
- package/package.json +1 -1
- package/spec/workflow-tags.json +47 -47
- package/workflows/adaptive-ticket-creation.json +16 -16
- package/workflows/architecture-scalability-audit.json +22 -22
- package/workflows/bug-investigation.agentic.v2.json +3 -3
- package/workflows/classify-task-workflow.json +1 -1
- package/workflows/coding-task-workflow-agentic.json +6 -6
- package/workflows/cross-platform-code-conversion.v2.json +8 -8
- package/workflows/document-creation-workflow.json +8 -8
- package/workflows/documentation-update-workflow.json +8 -8
- package/workflows/intelligent-test-case-generation.json +2 -2
- package/workflows/learner-centered-course-workflow.json +2 -2
- package/workflows/mr-review-workflow.agentic.v2.json +4 -4
- package/workflows/personal-learning-materials-creation-branched.json +8 -8
- package/workflows/presentation-creation.json +5 -5
- package/workflows/production-readiness-audit.json +1 -1
- package/workflows/relocation-workflow-us.json +31 -31
- package/workflows/routines/context-gathering.json +1 -1
- package/workflows/routines/design-review.json +1 -1
- package/workflows/routines/execution-simulation.json +1 -1
- package/workflows/routines/feature-implementation.json +3 -3
- package/workflows/routines/final-verification.json +1 -1
- package/workflows/routines/hypothesis-challenge.json +1 -1
- package/workflows/routines/ideation.json +1 -1
- package/workflows/routines/parallel-work-partitioning.json +3 -3
- package/workflows/routines/philosophy-alignment.json +2 -2
- package/workflows/routines/plan-analysis.json +1 -1
- package/workflows/routines/plan-generation.json +1 -1
- package/workflows/routines/tension-driven-design.json +6 -6
- package/workflows/scoped-documentation-workflow.json +26 -26
- package/workflows/ui-ux-design-workflow.json +14 -14
- package/workflows/workflow-diagnose-environment.json +1 -1
- package/workflows/workflow-for-workflows.json +32 -77
- package/workflows/workflow-for-workflows.v2.json +0 -788
|
@@ -164,11 +164,11 @@ async function runFullPipelineCore(deps, opts, coordinatorStartMs) {
|
|
|
164
164
|
}
|
|
165
165
|
deps.stderr(`[full-pipeline] Shaping session completed`);
|
|
166
166
|
if ((0, implement_js_1.touchesUI)(opts.goal)) {
|
|
167
|
-
deps.stderr(`[full-pipeline] UX signals detected -- dispatching ui-ux-design
|
|
167
|
+
deps.stderr(`[full-pipeline] UX signals detected -- dispatching wr.ui-ux-design`);
|
|
168
168
|
const uxCutoff = (0, adaptive_pipeline_js_1.checkSpawnCutoff)(coordinatorStartMs, deps.now(), 'ux-gate');
|
|
169
169
|
if (uxCutoff)
|
|
170
170
|
return uxCutoff;
|
|
171
|
-
const uxSpawnResult = await deps.spawnSession('ui-ux-design
|
|
171
|
+
const uxSpawnResult = await deps.spawnSession('wr.ui-ux-design', opts.goal, opts.workspace, { shapingComplete: true }, { maxSessionMinutes: Math.ceil(adaptive_pipeline_js_1.REVIEW_TIMEOUT_MS / 60000) });
|
|
172
172
|
if (uxSpawnResult.kind === 'err') {
|
|
173
173
|
return {
|
|
174
174
|
kind: 'escalated',
|
|
@@ -230,8 +230,8 @@ async function runFullPipelineCore(deps, opts, coordinatorStartMs) {
|
|
|
230
230
|
const codingCutoff = (0, adaptive_pipeline_js_1.checkSpawnCutoff)(coordinatorStartMs, deps.now(), 'coding');
|
|
231
231
|
if (codingCutoff)
|
|
232
232
|
return codingCutoff;
|
|
233
|
-
deps.stderr(`[full-pipeline] Spawning coding-task
|
|
234
|
-
const codingSpawnResult = await deps.spawnSession('coding-task
|
|
233
|
+
deps.stderr(`[full-pipeline] Spawning wr.coding-task`);
|
|
234
|
+
const codingSpawnResult = await deps.spawnSession('wr.coding-task', opts.goal, opts.workspace, {
|
|
235
235
|
pitchPath: opts.workspace + '/.workrail/current-pitch.md',
|
|
236
236
|
}, { maxSessionMinutes: Math.ceil(adaptive_pipeline_js_1.CODING_TIMEOUT_MS / 60000) });
|
|
237
237
|
if (codingSpawnResult.kind === 'err') {
|
|
@@ -15,7 +15,7 @@ async function runReviewAndVerdictCycle(deps, opts, prUrl, coordinatorStartMs, i
|
|
|
15
15
|
? `Review PR for merge: ${prUrl}`
|
|
16
16
|
: `Re-review PR after fixes (iteration ${iteration}): ${prUrl}`;
|
|
17
17
|
deps.stderr(`[review-cycle] Spawning review session (iteration=${iteration}): ${reviewGoal.slice(0, 80)}`);
|
|
18
|
-
const reviewSpawnResult = await deps.spawnSession('mr-review
|
|
18
|
+
const reviewSpawnResult = await deps.spawnSession('wr.mr-review', reviewGoal, opts.workspace, { prUrl });
|
|
19
19
|
if (reviewSpawnResult.kind === 'err') {
|
|
20
20
|
return {
|
|
21
21
|
kind: 'escalated',
|
|
@@ -86,7 +86,7 @@ async function runReviewAndVerdictCycle(deps, opts, prUrl, coordinatorStartMs, i
|
|
|
86
86
|
if (fixCutoff)
|
|
87
87
|
return fixCutoff;
|
|
88
88
|
const fixGoal = `Fix review findings: ${findings.findingSummaries.slice(0, 3).join('; ')}`;
|
|
89
|
-
const fixSpawnResult = await deps.spawnSession('coding-task
|
|
89
|
+
const fixSpawnResult = await deps.spawnSession('wr.coding-task', fixGoal, opts.workspace, { prUrl, findings: findings.findingSummaries });
|
|
90
90
|
if (fixSpawnResult.kind === 'err') {
|
|
91
91
|
return {
|
|
92
92
|
kind: 'escalated',
|
|
@@ -124,8 +124,8 @@ async function runAuditChain(deps, opts, prUrl, coordinatorStartMs, severity, fi
|
|
|
124
124
|
if (auditCutoff)
|
|
125
125
|
return auditCutoff;
|
|
126
126
|
const auditWorkflow = findings?.some((f) => f.findingCategory === 'architecture')
|
|
127
|
-
? 'architecture-scalability-audit'
|
|
128
|
-
: 'production-readiness-audit';
|
|
127
|
+
? 'wr.architecture-scalability-audit'
|
|
128
|
+
: 'wr.production-readiness-audit';
|
|
129
129
|
const auditSpawnResult = await deps.spawnSession(auditWorkflow, `Audit PR before merge: ${prUrl}`, opts.workspace, { prUrl, severity });
|
|
130
130
|
if (auditSpawnResult.kind === 'err') {
|
|
131
131
|
try {
|
|
@@ -171,7 +171,7 @@ async function runAuditChain(deps, opts, prUrl, coordinatorStartMs, severity, fi
|
|
|
171
171
|
const reReviewCutoff = (0, adaptive_pipeline_js_1.checkSpawnCutoff)(coordinatorStartMs, deps.now(), 're-review-after-audit');
|
|
172
172
|
if (reReviewCutoff)
|
|
173
173
|
return reReviewCutoff;
|
|
174
|
-
const reReviewSpawnResult = await deps.spawnSession('mr-review
|
|
174
|
+
const reReviewSpawnResult = await deps.spawnSession('wr.mr-review', `Re-review after audit: ${prUrl}`, opts.workspace, { prUrl, auditComplete: true });
|
|
175
175
|
if (reReviewSpawnResult.kind === 'err') {
|
|
176
176
|
try {
|
|
177
177
|
await deps.postToOutbox(`Adaptive pipeline escalated: re-review after audit failed to spawn`, { prUrl, phase: 're-review-after-audit', reason: reReviewSpawnResult.error });
|
|
@@ -35,11 +35,11 @@ async function runImplementPipeline(deps, opts, pitchPath, coordinatorStartMs) {
|
|
|
35
35
|
}
|
|
36
36
|
async function runImplementCore(deps, opts, pitchPath, coordinatorStartMs) {
|
|
37
37
|
if (touchesUI(opts.goal)) {
|
|
38
|
-
deps.stderr(`[implement] UX signals detected in goal, dispatching ui-ux-design
|
|
38
|
+
deps.stderr(`[implement] UX signals detected in goal, dispatching wr.ui-ux-design`);
|
|
39
39
|
const cutoffCheck = (0, adaptive_pipeline_js_1.checkSpawnCutoff)(coordinatorStartMs, deps.now(), 'ux-gate');
|
|
40
40
|
if (cutoffCheck)
|
|
41
41
|
return cutoffCheck;
|
|
42
|
-
const uxSpawnResult = await deps.spawnSession('ui-ux-design
|
|
42
|
+
const uxSpawnResult = await deps.spawnSession('wr.ui-ux-design', opts.goal, opts.workspace, {
|
|
43
43
|
pitchPath,
|
|
44
44
|
});
|
|
45
45
|
if (uxSpawnResult.kind === 'err') {
|
|
@@ -70,8 +70,8 @@ async function runImplementCore(deps, opts, pitchPath, coordinatorStartMs) {
|
|
|
70
70
|
const cutoffCheck = (0, adaptive_pipeline_js_1.checkSpawnCutoff)(coordinatorStartMs, deps.now(), 'coding');
|
|
71
71
|
if (cutoffCheck)
|
|
72
72
|
return cutoffCheck;
|
|
73
|
-
deps.stderr(`[implement] Spawning coding-task
|
|
74
|
-
const codingSpawnResult = await deps.spawnSession('coding-task
|
|
73
|
+
deps.stderr(`[implement] Spawning wr.coding-task`);
|
|
74
|
+
const codingSpawnResult = await deps.spawnSession('wr.coding-task', opts.goal, opts.workspace, {
|
|
75
75
|
pitchPath,
|
|
76
76
|
});
|
|
77
77
|
if (codingSpawnResult.kind === 'err') {
|
|
@@ -383,7 +383,7 @@ async function runPrReviewCoordinator(deps, opts) {
|
|
|
383
383
|
for (const pr of prs) {
|
|
384
384
|
const goal = `Review PR #${pr.number} "${pr.title}" before merge`;
|
|
385
385
|
if (opts.dryRun) {
|
|
386
|
-
log(` PR #${pr.number} [dry-run] would spawn mr-review
|
|
386
|
+
log(` PR #${pr.number} [dry-run] would spawn wr.mr-review`);
|
|
387
387
|
continue;
|
|
388
388
|
}
|
|
389
389
|
let spawnContext;
|
|
@@ -405,7 +405,7 @@ async function runPrReviewCoordinator(deps, opts) {
|
|
|
405
405
|
deps.stderr(`[WARN coord:context prNumber=${pr.number}] priorSessionNotes failed: ${bundle.priorSessionNotes.error}`);
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
|
-
const spawnResult = await deps.spawnSession('mr-review
|
|
408
|
+
const spawnResult = await deps.spawnSession('wr.mr-review', goal, opts.workspace, spawnContext);
|
|
409
409
|
if (spawnResult.kind === 'err') {
|
|
410
410
|
spawnErrors.set(pr.number, spawnResult.error);
|
|
411
411
|
log(` PR #${pr.number} spawn failed: ${spawnResult.error}`);
|
|
@@ -589,7 +589,7 @@ async function runFixAgentLoop(deps, opts, pr, initialFindings, initialOutcome,
|
|
|
589
589
|
};
|
|
590
590
|
}
|
|
591
591
|
log(` PR #${pr.number} -> spawning fix agent (pass ${passCount})...`);
|
|
592
|
-
const fixSpawnResult = await deps.spawnSession('coding-task
|
|
592
|
+
const fixSpawnResult = await deps.spawnSession('wr.coding-task', fixGoal, opts.workspace);
|
|
593
593
|
if (fixSpawnResult.kind === 'err') {
|
|
594
594
|
log(` PR #${pr.number} -> fix agent spawn failed: ${fixSpawnResult.error}`);
|
|
595
595
|
return {
|
|
@@ -636,7 +636,7 @@ async function runFixAgentLoop(deps, opts, pr, initialFindings, initialOutcome,
|
|
|
636
636
|
};
|
|
637
637
|
}
|
|
638
638
|
const reReviewGoal = `Re-review PR #${pr.number} after fixes (pass ${passCount})`;
|
|
639
|
-
const reReviewSpawnResult = await deps.spawnSession('mr-review
|
|
639
|
+
const reReviewSpawnResult = await deps.spawnSession('wr.mr-review', reReviewGoal, opts.workspace, reviewSpawnContext);
|
|
640
640
|
if (reReviewSpawnResult.kind === 'err') {
|
|
641
641
|
log(` PR #${pr.number} -> re-review spawn failed: ${reReviewSpawnResult.error}`);
|
|
642
642
|
return {
|
|
@@ -107,6 +107,7 @@ export declare function countOrphanStepAdvances(continueToken: string, ctx: V2To
|
|
|
107
107
|
export declare function clearQueueIssueSidecars(sessionsDir: string): Promise<void>;
|
|
108
108
|
export declare function stripFrontmatter(content: string): string;
|
|
109
109
|
export declare function loadWorkspaceContext(workspacePath: string): Promise<string | null>;
|
|
110
|
+
export declare function loadSessionNotes(continueToken: string, ctx: V2ToolContext): Promise<readonly string[]>;
|
|
110
111
|
export declare function makeContinueWorkflowTool(sessionId: string, ctx: V2ToolContext, onAdvance: (nextStepText: string, continueToken: string) => void, onComplete: (notes: string | undefined, artifacts?: readonly unknown[]) => void, schemas: Record<string, any>, _executeContinueWorkflowFn?: typeof executeContinueWorkflow, emitter?: DaemonEventEmitter, workrailSessionId?: string | null): AgentTool;
|
|
111
112
|
export declare function makeCompleteStepTool(sessionId: string, ctx: V2ToolContext, getCurrentToken: () => string, onAdvance: (nextStepText: string, continueToken: string) => void, onComplete: (notes: string | undefined, artifacts?: readonly unknown[]) => void, onTokenUpdate: (t: string) => void, schemas: Record<string, any>, _executeContinueWorkflowFn?: typeof executeContinueWorkflow, emitter?: DaemonEventEmitter, workrailSessionId?: string | null): AgentTool;
|
|
112
113
|
export declare function makeBashTool(workspacePath: string, schemas: Record<string, any>, sessionId?: string, emitter?: DaemonEventEmitter, workrailSessionId?: string | null): AgentTool;
|
|
@@ -44,6 +44,7 @@ exports.countOrphanStepAdvances = countOrphanStepAdvances;
|
|
|
44
44
|
exports.clearQueueIssueSidecars = clearQueueIssueSidecars;
|
|
45
45
|
exports.stripFrontmatter = stripFrontmatter;
|
|
46
46
|
exports.loadWorkspaceContext = loadWorkspaceContext;
|
|
47
|
+
exports.loadSessionNotes = loadSessionNotes;
|
|
47
48
|
exports.makeContinueWorkflowTool = makeContinueWorkflowTool;
|
|
48
49
|
exports.makeCompleteStepTool = makeCompleteStepTool;
|
|
49
50
|
exports.makeBashTool = makeBashTool;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { IWorkflowStorage, ICompositeWorkflowStorage } from '../../types/storage';
|
|
2
2
|
import { Workflow, WorkflowSummary, WorkflowDefinition, WorkflowSource } from '../../types/workflow';
|
|
3
|
-
export
|
|
3
|
+
export interface ValidationWarning {
|
|
4
|
+
readonly workflowId: string;
|
|
5
|
+
readonly sourceKind: string;
|
|
6
|
+
readonly errors: string[];
|
|
7
|
+
}
|
|
8
|
+
export interface HasValidationWarnings {
|
|
9
|
+
loadAllWorkflowsWithWarnings(): Promise<{
|
|
10
|
+
readonly workflows: readonly Workflow[];
|
|
11
|
+
readonly warnings: readonly ValidationWarning[];
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
export declare class SchemaValidatingWorkflowStorage implements IWorkflowStorage, HasValidationWarnings {
|
|
4
15
|
private readonly inner;
|
|
5
16
|
readonly kind: "single";
|
|
6
17
|
private readonly validator;
|
|
@@ -8,11 +19,15 @@ export declare class SchemaValidatingWorkflowStorage implements IWorkflowStorage
|
|
|
8
19
|
get source(): WorkflowSource;
|
|
9
20
|
private validateDefinition;
|
|
10
21
|
loadAllWorkflows(): Promise<readonly Workflow[]>;
|
|
22
|
+
loadAllWorkflowsWithWarnings(): Promise<{
|
|
23
|
+
readonly workflows: readonly Workflow[];
|
|
24
|
+
readonly warnings: readonly ValidationWarning[];
|
|
25
|
+
}>;
|
|
11
26
|
getWorkflowById(id: string): Promise<Workflow | null>;
|
|
12
27
|
listWorkflowSummaries(): Promise<readonly WorkflowSummary[]>;
|
|
13
28
|
save(definition: WorkflowDefinition): Promise<void>;
|
|
14
29
|
}
|
|
15
|
-
export declare class SchemaValidatingCompositeWorkflowStorage implements ICompositeWorkflowStorage {
|
|
30
|
+
export declare class SchemaValidatingCompositeWorkflowStorage implements ICompositeWorkflowStorage, HasValidationWarnings {
|
|
16
31
|
private readonly inner;
|
|
17
32
|
readonly kind: "composite";
|
|
18
33
|
private readonly validator;
|
|
@@ -21,6 +36,10 @@ export declare class SchemaValidatingCompositeWorkflowStorage implements ICompos
|
|
|
21
36
|
getSources(): readonly WorkflowSource[];
|
|
22
37
|
getStorageInstances(): readonly IWorkflowStorage[];
|
|
23
38
|
loadAllWorkflows(): Promise<readonly Workflow[]>;
|
|
39
|
+
loadAllWorkflowsWithWarnings(): Promise<{
|
|
40
|
+
readonly workflows: readonly Workflow[];
|
|
41
|
+
readonly warnings: readonly ValidationWarning[];
|
|
42
|
+
}>;
|
|
24
43
|
getWorkflowById(id: string): Promise<Workflow | null>;
|
|
25
44
|
listWorkflowSummaries(): Promise<readonly WorkflowSummary[]>;
|
|
26
45
|
save(definition: WorkflowDefinition): Promise<void>;
|
|
@@ -54,6 +54,30 @@ class SchemaValidatingWorkflowStorage {
|
|
|
54
54
|
}
|
|
55
55
|
return validWorkflows;
|
|
56
56
|
}
|
|
57
|
+
async loadAllWorkflowsWithWarnings() {
|
|
58
|
+
const workflows = await this.inner.loadAllWorkflows();
|
|
59
|
+
const validWorkflows = [];
|
|
60
|
+
const warnings = [];
|
|
61
|
+
for (const workflow of workflows) {
|
|
62
|
+
try {
|
|
63
|
+
if (this.validateDefinition(workflow.definition, workflow.source.kind)) {
|
|
64
|
+
validWorkflows.push(workflow);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
69
|
+
reportValidationFailure(workflow.definition.id, workflow.source.kind, errorMessage);
|
|
70
|
+
if (workflow.source.kind !== 'bundled') {
|
|
71
|
+
warnings.push({
|
|
72
|
+
workflowId: workflow.definition.id,
|
|
73
|
+
sourceKind: workflow.source.kind,
|
|
74
|
+
errors: [errorMessage],
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return { workflows: validWorkflows, warnings };
|
|
80
|
+
}
|
|
57
81
|
async getWorkflowById(id) {
|
|
58
82
|
const workflow = await this.inner.getWorkflowById(id);
|
|
59
83
|
if (!workflow) {
|
|
@@ -117,6 +141,30 @@ class SchemaValidatingCompositeWorkflowStorage {
|
|
|
117
141
|
}
|
|
118
142
|
return validWorkflows;
|
|
119
143
|
}
|
|
144
|
+
async loadAllWorkflowsWithWarnings() {
|
|
145
|
+
const workflows = await this.inner.loadAllWorkflows();
|
|
146
|
+
const validWorkflows = [];
|
|
147
|
+
const warnings = [];
|
|
148
|
+
for (const workflow of workflows) {
|
|
149
|
+
try {
|
|
150
|
+
if (this.validateDefinition(workflow.definition, workflow.source.kind)) {
|
|
151
|
+
validWorkflows.push(workflow);
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
catch (err) {
|
|
155
|
+
const errorMessage = err instanceof Error ? err.message : String(err);
|
|
156
|
+
reportValidationFailure(workflow.definition.id, workflow.source.kind, errorMessage);
|
|
157
|
+
if (workflow.source.kind !== 'bundled') {
|
|
158
|
+
warnings.push({
|
|
159
|
+
workflowId: workflow.definition.id,
|
|
160
|
+
sourceKind: workflow.source.kind,
|
|
161
|
+
errors: [errorMessage],
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
return { workflows: validWorkflows, warnings };
|
|
167
|
+
}
|
|
120
168
|
async getWorkflowById(id) {
|
|
121
169
|
const workflow = await this.inner.getWorkflowById(id);
|
|
122
170
|
if (!workflow)
|
package/dist/manifest.json
CHANGED
|
@@ -86,8 +86,8 @@
|
|
|
86
86
|
"bytes": 1168
|
|
87
87
|
},
|
|
88
88
|
"application/services/compiler/template-registry.js": {
|
|
89
|
-
"sha256": "
|
|
90
|
-
"bytes":
|
|
89
|
+
"sha256": "6df7c3b29f7eb62459e86bbafc7d279e19e95d363e820ca46ddb3e4daba6951b",
|
|
90
|
+
"bytes": 5453
|
|
91
91
|
},
|
|
92
92
|
"application/services/enhanced-error-service.d.ts": {
|
|
93
93
|
"sha256": "b6fe8fad92717f0962f87aa9c0f88277bf28fe2b5e3cfd7875612ee57eb8c684",
|
|
@@ -230,8 +230,8 @@
|
|
|
230
230
|
"bytes": 460
|
|
231
231
|
},
|
|
232
232
|
"application/validation.js": {
|
|
233
|
-
"sha256": "
|
|
234
|
-
"bytes":
|
|
233
|
+
"sha256": "12e4d064d5500259b62df0ab594a5fd9e5e0c59e7d7766b19ef80a7ada46a795",
|
|
234
|
+
"bytes": 1512
|
|
235
235
|
},
|
|
236
236
|
"cli-worktrain.d.ts": {
|
|
237
237
|
"sha256": "43e818adf60173644896298637f47b01d5819b17eda46eaa32d0c7d64724d012",
|
|
@@ -358,8 +358,8 @@
|
|
|
358
358
|
"bytes": 1041
|
|
359
359
|
},
|
|
360
360
|
"cli/commands/worktrain-init.js": {
|
|
361
|
-
"sha256": "
|
|
362
|
-
"bytes":
|
|
361
|
+
"sha256": "726d5b3a6252bf25d99fa53445ec543ea7e8c3d020a845c0b13c08182876fdb9",
|
|
362
|
+
"bytes": 12514
|
|
363
363
|
},
|
|
364
364
|
"cli/commands/worktrain-overview.d.ts": {
|
|
365
365
|
"sha256": "d9cb907b57aaa19ee5654c1726a33cdc6b7a54e3bd24dd8f2900d18491dd94a3",
|
|
@@ -473,8 +473,8 @@
|
|
|
473
473
|
"sha256": "5fe866e54f796975dec5d8ba9983aefd86074db212d3fccd64eed04bc9f0b3da",
|
|
474
474
|
"bytes": 8011
|
|
475
475
|
},
|
|
476
|
-
"console-ui/assets/index-
|
|
477
|
-
"sha256": "
|
|
476
|
+
"console-ui/assets/index-CyzltI6D.js": {
|
|
477
|
+
"sha256": "60f6fa50afe089e618ba79494803e91f8883df16f8cf817216f2e0c4402bb240",
|
|
478
478
|
"bytes": 767983
|
|
479
479
|
},
|
|
480
480
|
"console-ui/assets/index-DHrKiMCf.css": {
|
|
@@ -482,7 +482,7 @@
|
|
|
482
482
|
"bytes": 60673
|
|
483
483
|
},
|
|
484
484
|
"console-ui/index.html": {
|
|
485
|
-
"sha256": "
|
|
485
|
+
"sha256": "5b50465cccd6ee0c07de0981cfbf2ef2c417d681360d91c85565f38d3dd8b12c",
|
|
486
486
|
"bytes": 417
|
|
487
487
|
},
|
|
488
488
|
"console/standalone-console.d.ts": {
|
|
@@ -490,8 +490,8 @@
|
|
|
490
490
|
"bytes": 788
|
|
491
491
|
},
|
|
492
492
|
"console/standalone-console.js": {
|
|
493
|
-
"sha256": "
|
|
494
|
-
"bytes":
|
|
493
|
+
"sha256": "4847b32ce53ad1934e6f18dde435bcf7f0fc4374125eb58360d9cdeada616fe7",
|
|
494
|
+
"bytes": 6689
|
|
495
495
|
},
|
|
496
496
|
"context-assembly/deps.d.ts": {
|
|
497
497
|
"sha256": "d699ae8f8f081d92708eba5969e35cf24a45d3f86de72d308ffc4a542b954bc3",
|
|
@@ -538,24 +538,24 @@
|
|
|
538
538
|
"bytes": 462
|
|
539
539
|
},
|
|
540
540
|
"coordinators/modes/full-pipeline.js": {
|
|
541
|
-
"sha256": "
|
|
542
|
-
"bytes":
|
|
541
|
+
"sha256": "040b412e33ecb46dcc27c9968c9c0cc5d416880a03dab6f93ed09b8f447c21aa",
|
|
542
|
+
"bytes": 13161
|
|
543
543
|
},
|
|
544
544
|
"coordinators/modes/implement-shared.d.ts": {
|
|
545
545
|
"sha256": "fbad9d91d84d2112b273175618686489a7f106385e0e62d6cab80804d6d0f2d7",
|
|
546
546
|
"bytes": 708
|
|
547
547
|
},
|
|
548
548
|
"coordinators/modes/implement-shared.js": {
|
|
549
|
-
"sha256": "
|
|
550
|
-
"bytes":
|
|
549
|
+
"sha256": "96f95d9fca1c511eb1b12247148d0e0de3dd3add5aacd72e2a8bba4b36f5995b",
|
|
550
|
+
"bytes": 13636
|
|
551
551
|
},
|
|
552
552
|
"coordinators/modes/implement.d.ts": {
|
|
553
553
|
"sha256": "23919c24d62a0bf15296a52fbc594cca8b1b34e6f8d98dcf7dede8d97ad4cabb",
|
|
554
554
|
"bytes": 347
|
|
555
555
|
},
|
|
556
556
|
"coordinators/modes/implement.js": {
|
|
557
|
-
"sha256": "
|
|
558
|
-
"bytes":
|
|
557
|
+
"sha256": "59b0dddf00587db1d565c1e460cdad1f75b4ca32687e3649452b0f4de90a3061",
|
|
558
|
+
"bytes": 5482
|
|
559
559
|
},
|
|
560
560
|
"coordinators/modes/quick-review.d.ts": {
|
|
561
561
|
"sha256": "03a4f29a07047b0bf788d84f8e0ebab63d64c8eb98aa57087943a8fb84563998",
|
|
@@ -578,8 +578,8 @@
|
|
|
578
578
|
"bytes": 3947
|
|
579
579
|
},
|
|
580
580
|
"coordinators/pr-review.js": {
|
|
581
|
-
"sha256": "
|
|
582
|
-
"bytes":
|
|
581
|
+
"sha256": "385baa9e6252dbd84060bb423ce219884d519752f4a6e9f8f04e5f503fa38b67",
|
|
582
|
+
"bytes": 32419
|
|
583
583
|
},
|
|
584
584
|
"coordinators/routing/route-task.d.ts": {
|
|
585
585
|
"sha256": "6661d21e5cfbc9dffbfd8c2f9aaaf0e30a3251997a2c69c6a1b09929343e30e3",
|
|
@@ -654,12 +654,12 @@
|
|
|
654
654
|
"bytes": 5921
|
|
655
655
|
},
|
|
656
656
|
"daemon/workflow-runner.d.ts": {
|
|
657
|
-
"sha256": "
|
|
658
|
-
"bytes":
|
|
657
|
+
"sha256": "eba5089ec9210f27a06dc1c3fc89804de4d77208fad7678df2ad824c4511636f",
|
|
658
|
+
"bytes": 8227
|
|
659
659
|
},
|
|
660
660
|
"daemon/workflow-runner.js": {
|
|
661
|
-
"sha256": "
|
|
662
|
-
"bytes":
|
|
661
|
+
"sha256": "b11fb90d06e7d2f45b76e05640475615295de4eadb89c0c3d1c18ed48d6d0cb4",
|
|
662
|
+
"bytes": 101462
|
|
663
663
|
},
|
|
664
664
|
"di/container.d.ts": {
|
|
665
665
|
"sha256": "003bb7fb7478d627524b9b1e76bd0a963a243794a687ff233b96dc0e33a06d9f",
|
|
@@ -902,12 +902,12 @@
|
|
|
902
902
|
"bytes": 7902
|
|
903
903
|
},
|
|
904
904
|
"infrastructure/storage/schema-validating-workflow-storage.d.ts": {
|
|
905
|
-
"sha256": "
|
|
906
|
-
"bytes":
|
|
905
|
+
"sha256": "f22a2e7e65407478d86aa5d5a7546ca35947dc448425309e5be5ba4f8efa5ce6",
|
|
906
|
+
"bytes": 2023
|
|
907
907
|
},
|
|
908
908
|
"infrastructure/storage/schema-validating-workflow-storage.js": {
|
|
909
|
-
"sha256": "
|
|
910
|
-
"bytes":
|
|
909
|
+
"sha256": "4004fac4f8cb1b5cadbe060a389fe6a97377eedc6d4209b92da0d82d36a5e1b0",
|
|
910
|
+
"bytes": 7801
|
|
911
911
|
},
|
|
912
912
|
"infrastructure/storage/storage.d.ts": {
|
|
913
913
|
"sha256": "481c5c0ef797baa7f18cff6a468a1de6d1ef34dd4b35f53e318e30b825b31e63",
|
|
@@ -1234,8 +1234,8 @@
|
|
|
1234
1234
|
"bytes": 4343
|
|
1235
1235
|
},
|
|
1236
1236
|
"mcp/handlers/v2-workflow.js": {
|
|
1237
|
-
"sha256": "
|
|
1238
|
-
"bytes":
|
|
1237
|
+
"sha256": "4b12fcb52c80bf2b141c99921d2ddae92da2f543ae65abc5035c0b794bd777b6",
|
|
1238
|
+
"bytes": 28078
|
|
1239
1239
|
},
|
|
1240
1240
|
"mcp/handlers/v2-workspace-resolution.d.ts": {
|
|
1241
1241
|
"sha256": "dd4de57b4918ebe749cf8c1df70c02bf1effc50932634bae60db53c9a157e872",
|
|
@@ -1262,12 +1262,12 @@
|
|
|
1262
1262
|
"bytes": 7991
|
|
1263
1263
|
},
|
|
1264
1264
|
"mcp/output-schemas.d.ts": {
|
|
1265
|
-
"sha256": "
|
|
1266
|
-
"bytes":
|
|
1265
|
+
"sha256": "03207cb284fb77d0859cb089b0717ac38d9a1f2a997f101324d8efb90c540b5c",
|
|
1266
|
+
"bytes": 94179
|
|
1267
1267
|
},
|
|
1268
1268
|
"mcp/output-schemas.js": {
|
|
1269
|
-
"sha256": "
|
|
1270
|
-
"bytes":
|
|
1269
|
+
"sha256": "73547ff9f84f0f91c0d541a846d917eb1595d7feaec0684afe2271658b774402",
|
|
1270
|
+
"bytes": 23062
|
|
1271
1271
|
},
|
|
1272
1272
|
"mcp/render-envelope.d.ts": {
|
|
1273
1273
|
"sha256": "22e83e1aba52968a7136cf289125a217b5f462a5a66a1eebe4669006e3326fdb",
|
|
@@ -1514,8 +1514,8 @@
|
|
|
1514
1514
|
"bytes": 1863
|
|
1515
1515
|
},
|
|
1516
1516
|
"mcp/workflow-protocol-contracts.js": {
|
|
1517
|
-
"sha256": "
|
|
1518
|
-
"bytes":
|
|
1517
|
+
"sha256": "bcd0a058385ab23d2ff550267bfc88ac06b5d89ed2d773086a3cf83431a86c4f",
|
|
1518
|
+
"bytes": 14344
|
|
1519
1519
|
},
|
|
1520
1520
|
"mcp/workflow-tool-edition-selector.d.ts": {
|
|
1521
1521
|
"sha256": "75194908a89aaf7dc48fb661aea099827e7032ec76daf8f2de91bd59d46764ef",
|
|
@@ -3062,12 +3062,12 @@
|
|
|
3062
3062
|
"bytes": 550
|
|
3063
3063
|
},
|
|
3064
3064
|
"v2/projections/session-metrics.d.ts": {
|
|
3065
|
-
"sha256": "
|
|
3066
|
-
"bytes":
|
|
3065
|
+
"sha256": "e145784946e29a7a6473c130cc7e11032f62ecd98274796b181136821e4c2aa0",
|
|
3066
|
+
"bytes": 730
|
|
3067
3067
|
},
|
|
3068
3068
|
"v2/projections/session-metrics.js": {
|
|
3069
|
-
"sha256": "
|
|
3070
|
-
"bytes":
|
|
3069
|
+
"sha256": "89a1ee5aae79a19c7fc60840e62741a7dd93028562e72cd26a15e4988953c6c4",
|
|
3070
|
+
"bytes": 3421
|
|
3071
3071
|
},
|
|
3072
3072
|
"v2/read-only/v1-to-v2-shim.d.ts": {
|
|
3073
3073
|
"sha256": "b122df1d4eb4119b65465baa00f157ca4466575d3bc6ac20054a361eaff48e02",
|
|
@@ -3078,8 +3078,8 @@
|
|
|
3078
3078
|
"bytes": 4795
|
|
3079
3079
|
},
|
|
3080
3080
|
"v2/usecases/console-routes.d.ts": {
|
|
3081
|
-
"sha256": "
|
|
3082
|
-
"bytes":
|
|
3081
|
+
"sha256": "9acde26458a0cb2dabcafa9daa2ea1ba72e261422b77491e9d086ecc54c19234",
|
|
3082
|
+
"bytes": 572
|
|
3083
3083
|
},
|
|
3084
3084
|
"v2/usecases/console-routes.js": {
|
|
3085
3085
|
"sha256": "cac41733df0270c8882c1ccc57e616862e422b7dd4aaf78783bb98a21c6edd81",
|
|
@@ -136,7 +136,7 @@ function computeWorkflowStaleness(stamp, currentVersion) {
|
|
|
136
136
|
if (stamp === undefined) {
|
|
137
137
|
return {
|
|
138
138
|
level: 'possible',
|
|
139
|
-
reason: 'This workflow has not been validated against the authoring spec via workflow-for-workflows.',
|
|
139
|
+
reason: 'This workflow has not been validated against the authoring spec via wr.workflow-for-workflows.',
|
|
140
140
|
};
|
|
141
141
|
}
|
|
142
142
|
if (stamp === currentVersion) {
|
|
@@ -192,7 +192,14 @@ async function handleV2ListWorkflows(input, ctx) {
|
|
|
192
192
|
const warnings = managedStoreError
|
|
193
193
|
? [`Managed workflow source store was temporarily unavailable (${managedStoreError}). Managed sources were not loaded.`]
|
|
194
194
|
: undefined;
|
|
195
|
-
|
|
195
|
+
const hasValidationWarnings = (r) => typeof r.loadAllWorkflowsWithWarnings === 'function';
|
|
196
|
+
let capturedValidationWarnings;
|
|
197
|
+
return neverthrow_1.ResultAsync.fromPromise(hasValidationWarnings(workflowReader)
|
|
198
|
+
? (0, with_timeout_js_1.withTimeout)(workflowReader.loadAllWorkflowsWithWarnings(), TIMEOUT_MS, 'list_workflows').then(({ workflows, warnings }) => {
|
|
199
|
+
capturedValidationWarnings = warnings.length > 0 ? warnings : undefined;
|
|
200
|
+
return workflows;
|
|
201
|
+
})
|
|
202
|
+
: (0, with_timeout_js_1.withTimeout)(workflowReader.loadAllWorkflows(), TIMEOUT_MS, 'list_workflows'), (err) => (0, error_mapper_js_1.mapUnknownErrorToToolError)(err))
|
|
196
203
|
.andThen((allWorkflows) => {
|
|
197
204
|
const workflowMap = new Map(allWorkflows.map((w) => [w.definition.id, w]));
|
|
198
205
|
const summaries = allWorkflows.map((w) => ({
|
|
@@ -233,11 +240,18 @@ async function handleV2ListWorkflows(input, ctx) {
|
|
|
233
240
|
return undefined;
|
|
234
241
|
return buildTagSummary(WORKFLOW_TAGS, sortedIds);
|
|
235
242
|
})();
|
|
236
|
-
const nextStepHint =
|
|
237
|
-
|
|
238
|
-
'
|
|
239
|
-
|
|
240
|
-
|
|
243
|
+
const nextStepHint = (() => {
|
|
244
|
+
if (tagSummaryEntry) {
|
|
245
|
+
return 'Pick a tag from tagSummary that fits the user\'s goal, then call list_workflows with tags=["<tagId>"]. ' +
|
|
246
|
+
'If a workflow ID in examples[] already matches, call start_workflow directly — no second list call needed. ' +
|
|
247
|
+
'If multiple tags could apply, pick the most specific one.';
|
|
248
|
+
}
|
|
249
|
+
if (capturedValidationWarnings) {
|
|
250
|
+
return 'One or more workflow files failed validation and were excluded from the workflows list. ' +
|
|
251
|
+
'Fix the errors listed in validationWarnings in the workflow file(s) and retry list_workflows to confirm.';
|
|
252
|
+
}
|
|
253
|
+
return undefined;
|
|
254
|
+
})();
|
|
241
255
|
if (!input.includeSources) {
|
|
242
256
|
const includeStaleRoots = !tagSummaryEntry && stalePaths.length > 0;
|
|
243
257
|
const payload = {
|
|
@@ -246,6 +260,7 @@ async function handleV2ListWorkflows(input, ctx) {
|
|
|
246
260
|
...(nextStepHint ? { _nextStep: nextStepHint } : {}),
|
|
247
261
|
...(includeStaleRoots ? { staleRoots: [...stalePaths] } : {}),
|
|
248
262
|
...(warnings ? { warnings } : {}),
|
|
263
|
+
...(capturedValidationWarnings ? { validationWarnings: [...capturedValidationWarnings] } : {}),
|
|
249
264
|
};
|
|
250
265
|
return (0, neverthrow_1.okAsync)((0, types_js_1.success)(payload));
|
|
251
266
|
}
|
|
@@ -256,6 +271,7 @@ async function handleV2ListWorkflows(input, ctx) {
|
|
|
256
271
|
...(nextStepHint ? { _nextStep: nextStepHint } : {}),
|
|
257
272
|
...(stalePaths.length > 0 ? { staleRoots: [...stalePaths] } : {}),
|
|
258
273
|
...(warnings ? { warnings } : {}),
|
|
274
|
+
...(capturedValidationWarnings ? { validationWarnings: [...capturedValidationWarnings] } : {}),
|
|
259
275
|
sources: [],
|
|
260
276
|
};
|
|
261
277
|
return (0, neverthrow_1.okAsync)((0, types_js_1.success)(payload));
|
|
@@ -267,6 +283,7 @@ async function handleV2ListWorkflows(input, ctx) {
|
|
|
267
283
|
...(nextStepHint ? { _nextStep: nextStepHint } : {}),
|
|
268
284
|
...(stalePaths.length > 0 ? { staleRoots: [...stalePaths] } : {}),
|
|
269
285
|
...(warnings ? { warnings } : {}),
|
|
286
|
+
...(capturedValidationWarnings ? { validationWarnings: [...capturedValidationWarnings] } : {}),
|
|
270
287
|
sources: [...sources],
|
|
271
288
|
};
|
|
272
289
|
return (0, types_js_1.success)(payload);
|
|
@@ -437,6 +437,19 @@ export declare const TagSummaryItemSchema: z.ZodObject<{
|
|
|
437
437
|
displayName: string;
|
|
438
438
|
count: number;
|
|
439
439
|
}>;
|
|
440
|
+
export declare const V2ValidationWarningSchema: z.ZodObject<{
|
|
441
|
+
workflowId: z.ZodString;
|
|
442
|
+
sourceKind: z.ZodString;
|
|
443
|
+
errors: z.ZodArray<z.ZodString, "many">;
|
|
444
|
+
}, "strip", z.ZodTypeAny, {
|
|
445
|
+
workflowId: string;
|
|
446
|
+
sourceKind: string;
|
|
447
|
+
errors: string[];
|
|
448
|
+
}, {
|
|
449
|
+
workflowId: string;
|
|
450
|
+
sourceKind: string;
|
|
451
|
+
errors: string[];
|
|
452
|
+
}>;
|
|
440
453
|
export declare const V2WorkflowListOutputSchema: z.ZodObject<{
|
|
441
454
|
workflows: z.ZodArray<z.ZodObject<{
|
|
442
455
|
workflowId: z.ZodString;
|
|
@@ -727,6 +740,19 @@ export declare const V2WorkflowListOutputSchema: z.ZodObject<{
|
|
|
727
740
|
} | undefined;
|
|
728
741
|
stale?: true | undefined;
|
|
729
742
|
}>, "many">>;
|
|
743
|
+
validationWarnings: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
744
|
+
workflowId: z.ZodString;
|
|
745
|
+
sourceKind: z.ZodString;
|
|
746
|
+
errors: z.ZodArray<z.ZodString, "many">;
|
|
747
|
+
}, "strip", z.ZodTypeAny, {
|
|
748
|
+
workflowId: string;
|
|
749
|
+
sourceKind: string;
|
|
750
|
+
errors: string[];
|
|
751
|
+
}, {
|
|
752
|
+
workflowId: string;
|
|
753
|
+
sourceKind: string;
|
|
754
|
+
errors: string[];
|
|
755
|
+
}>, "many">>;
|
|
730
756
|
}, "strip", z.ZodTypeAny, {
|
|
731
757
|
workflows: {
|
|
732
758
|
kind: "workflow";
|
|
@@ -797,6 +823,11 @@ export declare const V2WorkflowListOutputSchema: z.ZodObject<{
|
|
|
797
823
|
}[] | undefined;
|
|
798
824
|
_nextStep?: string | undefined;
|
|
799
825
|
staleRoots?: string[] | undefined;
|
|
826
|
+
validationWarnings?: {
|
|
827
|
+
workflowId: string;
|
|
828
|
+
sourceKind: string;
|
|
829
|
+
errors: string[];
|
|
830
|
+
}[] | undefined;
|
|
800
831
|
}, {
|
|
801
832
|
workflows: {
|
|
802
833
|
kind: "workflow";
|
|
@@ -867,6 +898,11 @@ export declare const V2WorkflowListOutputSchema: z.ZodObject<{
|
|
|
867
898
|
}[] | undefined;
|
|
868
899
|
_nextStep?: string | undefined;
|
|
869
900
|
staleRoots?: string[] | undefined;
|
|
901
|
+
validationWarnings?: {
|
|
902
|
+
workflowId: string;
|
|
903
|
+
sourceKind: string;
|
|
904
|
+
errors: string[];
|
|
905
|
+
}[] | undefined;
|
|
870
906
|
}>;
|
|
871
907
|
export declare const V2WorkflowInspectOutputSchema: z.ZodObject<{
|
|
872
908
|
workflowId: z.ZodString;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OpenDashboardOutputSchema = exports.ReadSessionSchemaOutputSchema = exports.ReadSessionOutputSchema = exports.UpdateSessionOutputSchema = exports.CreateSessionOutputSchema = exports.V2StartWorkflowOutputSchema = exports.V2CheckpointWorkflowOutputSchema = exports.V2ResumeSessionOutputSchema = exports.V2ContinueWorkflowOutputSchema = exports.V2StepContextSchema = exports.V2BindingDriftWarningSchema = exports.V2BlockerReportSchema = exports.V2ResumeNextCallSchema = exports.V2NextCallSchema = exports.V2NextIntentSchema = exports.V2PreferencesSchema = exports.V2PendingStepSchema = exports.V2WorkflowInspectOutputSchema = exports.V2WorkflowListOutputSchema = exports.TagSummaryItemSchema = exports.V2WorkflowSourceCatalogEntrySchema = exports.V2WorkflowListItemSchema = exports.StalenessSummarySchema = exports.WorkflowGetSchemaOutputSchema = exports.WorkflowValidateJsonOutputSchema = exports.WorkflowNextOutputSchema = exports.WorkflowGetOutputSchema = exports.WorkflowListOutputSchema = exports.WorkflowSummarySchema = exports.JsonValueSchema = void 0;
|
|
3
|
+
exports.OpenDashboardOutputSchema = exports.ReadSessionSchemaOutputSchema = exports.ReadSessionOutputSchema = exports.UpdateSessionOutputSchema = exports.CreateSessionOutputSchema = exports.V2StartWorkflowOutputSchema = exports.V2CheckpointWorkflowOutputSchema = exports.V2ResumeSessionOutputSchema = exports.V2ContinueWorkflowOutputSchema = exports.V2StepContextSchema = exports.V2BindingDriftWarningSchema = exports.V2BlockerReportSchema = exports.V2ResumeNextCallSchema = exports.V2NextCallSchema = exports.V2NextIntentSchema = exports.V2PreferencesSchema = exports.V2PendingStepSchema = exports.V2WorkflowInspectOutputSchema = exports.V2WorkflowListOutputSchema = exports.V2ValidationWarningSchema = exports.TagSummaryItemSchema = exports.V2WorkflowSourceCatalogEntrySchema = exports.V2WorkflowListItemSchema = exports.StalenessSummarySchema = exports.WorkflowGetSchemaOutputSchema = exports.WorkflowValidateJsonOutputSchema = exports.WorkflowNextOutputSchema = exports.WorkflowGetOutputSchema = exports.WorkflowListOutputSchema = exports.WorkflowSummarySchema = exports.JsonValueSchema = void 0;
|
|
4
4
|
exports.toPendingStep = toPendingStep;
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
const state_js_1 = require("../domain/execution/state.js");
|
|
@@ -113,6 +113,11 @@ exports.TagSummaryItemSchema = zod_1.z.object({
|
|
|
113
113
|
when: zod_1.z.array(zod_1.z.string()).describe('Intent phrases describing when to use workflows in this tag.'),
|
|
114
114
|
examples: zod_1.z.array(zod_1.z.string()).describe('Representative workflow IDs for this tag.'),
|
|
115
115
|
});
|
|
116
|
+
exports.V2ValidationWarningSchema = zod_1.z.object({
|
|
117
|
+
workflowId: zod_1.z.string().min(1),
|
|
118
|
+
sourceKind: zod_1.z.string().min(1),
|
|
119
|
+
errors: zod_1.z.array(zod_1.z.string().min(1)).min(1),
|
|
120
|
+
});
|
|
116
121
|
exports.V2WorkflowListOutputSchema = zod_1.z.object({
|
|
117
122
|
workflows: zod_1.z.array(exports.V2WorkflowListItemSchema),
|
|
118
123
|
tagSummary: zod_1.z.array(exports.TagSummaryItemSchema).optional().describe('Tag summary for the workflow catalog. Present when no tags filter was applied. ' +
|
|
@@ -126,6 +131,11 @@ exports.V2WorkflowListOutputSchema = zod_1.z.object({
|
|
|
126
131
|
'Example: the managed source store was temporarily unavailable and managed sources were not loaded.'),
|
|
127
132
|
sources: zod_1.z.array(exports.V2WorkflowSourceCatalogEntrySchema).optional().describe('Source catalog for this workspace. Only present when includeSources was true in the request. ' +
|
|
128
133
|
'Shows where workflows come from with effective and shadowed counts per source.'),
|
|
134
|
+
validationWarnings: zod_1.z.array(exports.V2ValidationWarningSchema).optional().describe('Structured validation errors for non-bundled workflow files that failed JSON schema validation ' +
|
|
135
|
+
'and were excluded from the workflows list. Each entry identifies which workflow failed ' +
|
|
136
|
+
'(workflowId), which source it came from (sourceKind), and the specific validation errors (errors[]). ' +
|
|
137
|
+
'Absent when all workflows pass validation. Fix the listed errors in the workflow file and retry ' +
|
|
138
|
+
'list_workflows to confirm. Bundled (built-in) workflow failures are never included here.'),
|
|
129
139
|
});
|
|
130
140
|
exports.V2WorkflowInspectOutputSchema = zod_1.z.object({
|
|
131
141
|
workflowId: zod_1.z.string().min(1),
|
|
@@ -61,7 +61,7 @@ exports.START_WORKFLOW_PROTOCOL = {
|
|
|
61
61
|
'Only pass context on later continue_workflow calls if facts changed.',
|
|
62
62
|
],
|
|
63
63
|
examplePayload: {
|
|
64
|
-
workflowId: 'coding-task
|
|
64
|
+
workflowId: 'wr.coding-task',
|
|
65
65
|
workspacePath: '/Users/you/git/my-project',
|
|
66
66
|
goal: 'implement OAuth refresh token rotation',
|
|
67
67
|
},
|
|
@@ -77,7 +77,7 @@ exports.START_WORKFLOW_PROTOCOL = {
|
|
|
77
77
|
'Pass goal on every call. A short sentence describing what you are trying to accomplish.',
|
|
78
78
|
],
|
|
79
79
|
examplePayload: {
|
|
80
|
-
workflowId: 'coding-task
|
|
80
|
+
workflowId: 'wr.coding-task',
|
|
81
81
|
workspacePath: '/Users/you/git/my-project',
|
|
82
82
|
goal: 'implement OAuth refresh token rotation',
|
|
83
83
|
},
|