@n8n/instance-ai 1.10.0 → 1.11.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/README.md +128 -0
- package/dist/agent/instance-agent.js +8 -0
- package/dist/agent/instance-agent.js.map +1 -1
- package/dist/agent/shared-prompts.d.ts +1 -0
- package/dist/agent/shared-prompts.js +25 -0
- package/dist/agent/shared-prompts.js.map +1 -1
- package/dist/agent/sub-agent-debriefing.d.ts +8 -8
- package/dist/agent/system-prompt.d.ts +2 -0
- package/dist/agent/system-prompt.js +52 -93
- package/dist/agent/system-prompt.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/constants/max-steps.d.ts +0 -1
- package/dist/constants/max-steps.js +0 -1
- package/dist/constants/max-steps.js.map +1 -1
- package/dist/index.d.ts +123 -33
- package/dist/index.js +103 -96
- package/dist/index.js.map +1 -1
- package/dist/knowledge-base/build-templates-index.d.ts +12 -0
- package/dist/knowledge-base/build-templates-index.js +113 -0
- package/dist/knowledge-base/build-templates-index.js.map +1 -0
- package/dist/knowledge-base/extract-builder-templates-archive.d.ts +2 -0
- package/dist/knowledge-base/extract-builder-templates-archive.js +89 -0
- package/dist/knowledge-base/extract-builder-templates-archive.js.map +1 -0
- package/dist/knowledge-base/materialize-knowledge-base.d.ts +67 -0
- package/dist/knowledge-base/materialize-knowledge-base.js +186 -0
- package/dist/knowledge-base/materialize-knowledge-base.js.map +1 -0
- package/dist/mcp/mcp-client-manager.js +6 -1
- package/dist/mcp/mcp-client-manager.js.map +1 -1
- package/dist/parsers/pdf-parser.js +4 -0
- package/dist/parsers/pdf-parser.js.map +1 -1
- package/dist/planned-tasks/planned-task-service.d.ts +5 -1
- package/dist/planned-tasks/planned-task-service.js +29 -1
- package/dist/planned-tasks/planned-task-service.js.map +1 -1
- package/dist/runtime/run-state-registry.d.ts +8 -0
- package/dist/runtime/run-state-registry.js.map +1 -1
- package/dist/runtime/terminal-response-guard.d.ts +2 -1
- package/dist/runtime/terminal-response-guard.js +20 -0
- package/dist/runtime/terminal-response-guard.js.map +1 -1
- package/dist/skills/materialize-runtime-skills.d.ts +1 -7
- package/dist/skills/materialize-runtime-skills.js +96 -176
- package/dist/skills/materialize-runtime-skills.js.map +1 -1
- package/dist/storage/index.d.ts +1 -1
- package/dist/storage/planned-task-storage.js +1 -0
- package/dist/storage/planned-task-storage.js.map +1 -1
- package/dist/storage/terminal-outcome-storage.d.ts +2 -2
- package/dist/storage/workflow-loop-storage.d.ts +199 -70
- package/dist/storage/workflow-loop-storage.js +107 -0
- package/dist/storage/workflow-loop-storage.js.map +1 -1
- package/dist/stream/work-summary-accumulator.d.ts +6 -6
- package/dist/tools/attachments/parse-file.tool.d.ts +18 -18
- package/dist/tools/credentials.tool.d.ts +2 -5
- package/dist/tools/credentials.tool.js +2 -6
- package/dist/tools/credentials.tool.js.map +1 -1
- package/dist/tools/executions.tool.js +53 -7
- package/dist/tools/executions.tool.js.map +1 -1
- package/dist/tools/index.js +3 -9
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/nodes/node-search-engine.d.ts +2 -0
- package/dist/tools/nodes/node-search-engine.js +66 -7
- package/dist/tools/nodes/node-search-engine.js.map +1 -1
- package/dist/tools/nodes.tool.js +10 -3
- package/dist/tools/nodes.tool.js.map +1 -1
- package/dist/tools/orchestration/complete-checkpoint.tool.js +69 -0
- package/dist/tools/orchestration/complete-checkpoint.tool.js.map +1 -1
- package/dist/tools/orchestration/delegate.schemas.d.ts +5 -5
- package/dist/tools/orchestration/delegate.tool.js +1 -1
- package/dist/tools/orchestration/delegate.tool.js.map +1 -1
- package/dist/tools/orchestration/plan.tool.js +96 -60
- package/dist/tools/orchestration/plan.tool.js.map +1 -1
- package/dist/tools/orchestration/report-verification-verdict.tool.d.ts +9 -6
- package/dist/tools/orchestration/report-verification-verdict.tool.js +6 -1
- package/dist/tools/orchestration/report-verification-verdict.tool.js.map +1 -1
- package/dist/tools/orchestration/verify-built-workflow.tool.js +3 -2
- package/dist/tools/orchestration/verify-built-workflow.tool.js.map +1 -1
- package/dist/tools/tool-ids.d.ts +0 -5
- package/dist/tools/tool-ids.js +3 -7
- package/dist/tools/tool-ids.js.map +1 -1
- package/dist/tools/workflows/build-workflow.tool.d.ts +8 -2
- package/dist/tools/workflows/build-workflow.tool.js +371 -17
- package/dist/tools/workflows/build-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/materialize-node-type.tool.d.ts +4 -4
- package/dist/tools/workflows/materialize-node-type.tool.js +2 -2
- package/dist/tools/workflows/materialize-node-type.tool.js.map +1 -1
- package/dist/tools/workflows/setup-workflow.schema.d.ts +32 -32
- package/dist/tools/workflows/submit-workflow.tool.d.ts +16 -12
- package/dist/tools/workflows/submit-workflow.tool.js +9 -2
- package/dist/tools/workflows/submit-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/write-sandbox-file.tool.js +2 -2
- package/dist/tools/workflows/write-sandbox-file.tool.js.map +1 -1
- package/dist/tools/workflows.tool.js +5 -0
- package/dist/tools/workflows.tool.js.map +1 -1
- package/dist/tracing/langsmith-tracing.js +6 -1
- package/dist/tracing/langsmith-tracing.js.map +1 -1
- package/dist/tracing/trace-payloads.js +2 -6
- package/dist/tracing/trace-payloads.js.map +1 -1
- package/dist/types.d.ts +48 -9
- package/dist/types.js.map +1 -1
- package/dist/workflow-builder/build-failure-tracker.d.ts +10 -0
- package/dist/workflow-builder/build-failure-tracker.js +36 -0
- package/dist/workflow-builder/build-failure-tracker.js.map +1 -0
- package/dist/workflow-builder/index.d.ts +1 -0
- package/dist/workflow-builder/index.js +4 -1
- package/dist/workflow-builder/index.js.map +1 -1
- package/dist/workflow-loop/guidance.js +10 -6
- package/dist/workflow-loop/guidance.js.map +1 -1
- package/dist/workflow-loop/index.d.ts +3 -2
- package/dist/workflow-loop/index.js +14 -1
- package/dist/workflow-loop/index.js.map +1 -1
- package/dist/workflow-loop/runtime.js +3 -1
- package/dist/workflow-loop/runtime.js.map +1 -1
- package/dist/workflow-loop/verification-obligation.d.ts +15 -0
- package/dist/workflow-loop/verification-obligation.js +140 -0
- package/dist/workflow-loop/verification-obligation.js.map +1 -0
- package/dist/workflow-loop/workflow-loop-controller.js +26 -1
- package/dist/workflow-loop/workflow-loop-controller.js.map +1 -1
- package/dist/workflow-loop/workflow-loop-state.d.ts +416 -62
- package/dist/workflow-loop/workflow-loop-state.js +66 -1
- package/dist/workflow-loop/workflow-loop-state.js.map +1 -1
- package/dist/workspace/builder-templates-service.js.map +1 -1
- package/dist/workspace/compute-workspace-content-hash.d.ts +1 -0
- package/dist/workspace/compute-workspace-content-hash.js +15 -0
- package/dist/workspace/compute-workspace-content-hash.js.map +1 -0
- package/dist/workspace/create-workspace.d.ts +9 -43
- package/dist/workspace/create-workspace.js +45 -56
- package/dist/workspace/create-workspace.js.map +1 -1
- package/dist/workspace/lazy-runtime-workspace.js +1 -1
- package/dist/workspace/lazy-runtime-workspace.js.map +1 -1
- package/dist/workspace/prebaked-workspace-bundle.d.ts +39 -0
- package/dist/workspace/prebaked-workspace-bundle.js +75 -0
- package/dist/workspace/prebaked-workspace-bundle.js.map +1 -0
- package/dist/workspace/sandbox-fs.d.ts +9 -24
- package/dist/workspace/sandbox-fs.js +2 -16
- package/dist/workspace/sandbox-fs.js.map +1 -1
- package/dist/workspace/sandbox-setup.d.ts +1 -7
- package/dist/workspace/sandbox-setup.js +28 -170
- package/dist/workspace/sandbox-setup.js.map +1 -1
- package/dist/workspace/snapshot-image-context.d.ts +5 -0
- package/dist/workspace/snapshot-image-context.js +36 -0
- package/dist/workspace/snapshot-image-context.js.map +1 -0
- package/dist/workspace/snapshot-manager.d.ts +9 -9
- package/dist/workspace/snapshot-manager.js +57 -67
- package/dist/workspace/snapshot-manager.js.map +1 -1
- package/dist/workspace/template-telemetry.js +4 -4
- package/dist/workspace/template-telemetry.js.map +1 -1
- package/dist/workspace/workspace-file-content.d.ts +2 -0
- package/dist/workspace/workspace-file-content.js +11 -0
- package/dist/workspace/workspace-file-content.js.map +1 -0
- package/dist/workspace/workspace-files.d.ts +20 -0
- package/dist/workspace/workspace-files.js +74 -0
- package/dist/workspace/workspace-files.js.map +1 -0
- package/dist/workspace/workspace-manifest.d.ts +12 -0
- package/dist/workspace/workspace-manifest.js +28 -0
- package/dist/workspace/workspace-manifest.js.map +1 -0
- package/package.json +19 -13
- package/skills/data-table-manager/SKILL.md +6 -6
- package/skills/debugging-executions/SKILL.md +44 -0
- package/skills/planned-task-runtime/SKILL.md +163 -0
- package/skills/planning/SKILL.md +137 -0
- package/skills/post-build-flow/SKILL.md +119 -0
- package/skills/post-build-flow/references/trigger-input-data-shapes.md +38 -0
- package/skills/workflow-builder/SKILL.md +608 -0
- package/dist/tools/best-practices/index.d.ts +0 -2
- package/dist/tools/best-practices/index.js +0 -10
- package/dist/tools/best-practices/index.js.map +0 -1
- package/dist/tools/best-practices/techniques.d.ts +0 -1
- package/dist/tools/best-practices/techniques.js +0 -7
- package/dist/tools/best-practices/techniques.js.map +0 -1
- package/dist/tools/orchestration/add-plan-item.tool.d.ts +0 -5
- package/dist/tools/orchestration/add-plan-item.tool.js +0 -89
- package/dist/tools/orchestration/add-plan-item.tool.js.map +0 -1
- package/dist/tools/orchestration/blueprint-accumulator.d.ts +0 -49
- package/dist/tools/orchestration/blueprint-accumulator.js +0 -176
- package/dist/tools/orchestration/blueprint-accumulator.js.map +0 -1
- package/dist/tools/orchestration/blueprint.schema.d.ts +0 -182
- package/dist/tools/orchestration/blueprint.schema.js +0 -56
- package/dist/tools/orchestration/blueprint.schema.js.map +0 -1
- package/dist/tools/orchestration/build-workflow-agent.prompt.d.ts +0 -8
- package/dist/tools/orchestration/build-workflow-agent.prompt.js +0 -466
- package/dist/tools/orchestration/build-workflow-agent.prompt.js.map +0 -1
- package/dist/tools/orchestration/build-workflow-agent.tool.d.ts +0 -148
- package/dist/tools/orchestration/build-workflow-agent.tool.js +0 -1498
- package/dist/tools/orchestration/build-workflow-agent.tool.js.map +0 -1
- package/dist/tools/orchestration/builder-memory-compaction.d.ts +0 -42
- package/dist/tools/orchestration/builder-memory-compaction.js +0 -132
- package/dist/tools/orchestration/builder-memory-compaction.js.map +0 -1
- package/dist/tools/orchestration/plan-agent-prompt.d.ts +0 -1
- package/dist/tools/orchestration/plan-agent-prompt.js +0 -83
- package/dist/tools/orchestration/plan-agent-prompt.js.map +0 -1
- package/dist/tools/orchestration/plan-with-agent.tool.d.ts +0 -27
- package/dist/tools/orchestration/plan-with-agent.tool.js +0 -710
- package/dist/tools/orchestration/plan-with-agent.tool.js.map +0 -1
- package/dist/tools/orchestration/submit-plan.tool.d.ts +0 -3
- package/dist/tools/orchestration/submit-plan.tool.js +0 -98
- package/dist/tools/orchestration/submit-plan.tool.js.map +0 -1
- package/dist/tools/templates.tool.d.ts +0 -1
- package/dist/tools/templates.tool.js +0 -58
- package/dist/tools/templates.tool.js.map +0 -1
- package/dist/workspace/daytona-auth-manager.d.ts +0 -26
- package/dist/workspace/daytona-auth-manager.js +0 -90
- package/dist/workspace/daytona-auth-manager.js.map +0 -1
- package/dist/workspace/daytona-filesystem.d.ts +0 -26
- package/dist/workspace/daytona-filesystem.js +0 -133
- package/dist/workspace/daytona-filesystem.js.map +0 -1
- package/dist/workspace/daytona-sandbox.d.ts +0 -65
- package/dist/workspace/daytona-sandbox.js +0 -314
- package/dist/workspace/daytona-sandbox.js.map +0 -1
- package/dist/workspace/lazy-daytona.d.ts +0 -2
- package/dist/workspace/lazy-daytona.js +0 -12
- package/dist/workspace/lazy-daytona.js.map +0 -1
- package/dist/workspace/local-filesystem.d.ts +0 -48
- package/dist/workspace/local-filesystem.js +0 -250
- package/dist/workspace/local-filesystem.js.map +0 -1
- package/dist/workspace/local-sandbox.d.ts +0 -28
- package/dist/workspace/local-sandbox.js +0 -121
- package/dist/workspace/local-sandbox.js.map +0 -1
- package/dist/workspace/n8n-sandbox-filesystem.d.ts +0 -25
- package/dist/workspace/n8n-sandbox-filesystem.js +0 -128
- package/dist/workspace/n8n-sandbox-filesystem.js.map +0 -1
- package/dist/workspace/n8n-sandbox-sandbox.d.ts +0 -35
- package/dist/workspace/n8n-sandbox-sandbox.js +0 -143
- package/dist/workspace/n8n-sandbox-sandbox.js.map +0 -1
|
@@ -10,9 +10,27 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
10
10
|
phase: z.ZodEnum<["building", "verifying", "repairing", "done", "blocked"]>;
|
|
11
11
|
status: z.ZodEnum<["active", "completed", "blocked"]>;
|
|
12
12
|
source: z.ZodEnum<["create", "modify"]>;
|
|
13
|
+
owner: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
14
|
+
type: z.ZodLiteral<"direct">;
|
|
15
|
+
}, "strip", z.ZodTypeAny, {
|
|
16
|
+
type: "direct";
|
|
17
|
+
}, {
|
|
18
|
+
type: "direct";
|
|
19
|
+
}>, z.ZodObject<{
|
|
20
|
+
type: z.ZodLiteral<"planned">;
|
|
21
|
+
taskId: z.ZodString;
|
|
22
|
+
}, "strip", z.ZodTypeAny, {
|
|
23
|
+
type: "planned";
|
|
24
|
+
taskId: string;
|
|
25
|
+
}, {
|
|
26
|
+
type: "planned";
|
|
27
|
+
taskId: string;
|
|
28
|
+
}>]>>;
|
|
29
|
+
plannedTaskId: z.ZodOptional<z.ZodString>;
|
|
13
30
|
lastTaskId: z.ZodOptional<z.ZodString>;
|
|
14
31
|
lastExecutionId: z.ZodOptional<z.ZodString>;
|
|
15
32
|
lastFailureSignature: z.ZodOptional<z.ZodString>;
|
|
33
|
+
lastWorkflowInspection: z.ZodOptional<z.ZodString>;
|
|
16
34
|
rebuildAttempts: z.ZodNumber;
|
|
17
35
|
mockedCredentialTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
18
36
|
hasUnresolvedPlaceholders: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -27,70 +45,98 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
27
45
|
remainingSubmitFixes: z.ZodOptional<z.ZodNumber>;
|
|
28
46
|
attemptCount: z.ZodOptional<z.ZodNumber>;
|
|
29
47
|
}, "strip", z.ZodTypeAny, {
|
|
30
|
-
category: "
|
|
48
|
+
category: "code_fixable" | "needs_setup" | "blocked";
|
|
31
49
|
shouldEdit: boolean;
|
|
32
50
|
guidance: string;
|
|
33
51
|
reason?: string | undefined;
|
|
34
52
|
remainingSubmitFixes?: number | undefined;
|
|
35
53
|
attemptCount?: number | undefined;
|
|
36
54
|
}, {
|
|
37
|
-
category: "
|
|
55
|
+
category: "code_fixable" | "needs_setup" | "blocked";
|
|
38
56
|
shouldEdit: boolean;
|
|
39
57
|
guidance: string;
|
|
40
58
|
reason?: string | undefined;
|
|
41
59
|
remainingSubmitFixes?: number | undefined;
|
|
42
60
|
attemptCount?: number | undefined;
|
|
43
61
|
}>>;
|
|
62
|
+
setupRoutedAt: z.ZodOptional<z.ZodString>;
|
|
63
|
+
setupRoutingClaimId: z.ZodOptional<z.ZodString>;
|
|
64
|
+
setupRoutingClaimedAt: z.ZodOptional<z.ZodString>;
|
|
65
|
+
setupRoutingClaimExpiresAt: z.ZodOptional<z.ZodString>;
|
|
44
66
|
}, "strip", z.ZodTypeAny, {
|
|
45
67
|
status: "blocked" | "active" | "completed";
|
|
46
|
-
source: "create" | "modify";
|
|
47
68
|
workItemId: string;
|
|
48
69
|
threadId: string;
|
|
49
|
-
phase: "
|
|
70
|
+
phase: "blocked" | "building" | "verifying" | "repairing" | "done";
|
|
71
|
+
source: "create" | "modify";
|
|
50
72
|
rebuildAttempts: number;
|
|
73
|
+
owner?: {
|
|
74
|
+
type: "direct";
|
|
75
|
+
} | {
|
|
76
|
+
type: "planned";
|
|
77
|
+
taskId: string;
|
|
78
|
+
} | undefined;
|
|
79
|
+
plannedTaskId?: string | undefined;
|
|
51
80
|
runId?: string | undefined;
|
|
52
81
|
workflowId?: string | undefined;
|
|
53
82
|
lastTaskId?: string | undefined;
|
|
54
83
|
lastExecutionId?: string | undefined;
|
|
55
84
|
lastFailureSignature?: string | undefined;
|
|
85
|
+
lastWorkflowInspection?: string | undefined;
|
|
56
86
|
mockedCredentialTypes?: string[] | undefined;
|
|
57
87
|
hasUnresolvedPlaceholders?: boolean | undefined;
|
|
58
88
|
successfulSubmitSeen?: boolean | undefined;
|
|
59
89
|
preSaveSubmitFailures?: number | undefined;
|
|
60
90
|
postSubmitRemediationSubmitsUsed?: number | undefined;
|
|
61
91
|
lastRemediation?: {
|
|
62
|
-
category: "
|
|
92
|
+
category: "code_fixable" | "needs_setup" | "blocked";
|
|
63
93
|
shouldEdit: boolean;
|
|
64
94
|
guidance: string;
|
|
65
95
|
reason?: string | undefined;
|
|
66
96
|
remainingSubmitFixes?: number | undefined;
|
|
67
97
|
attemptCount?: number | undefined;
|
|
68
98
|
} | undefined;
|
|
99
|
+
setupRoutedAt?: string | undefined;
|
|
100
|
+
setupRoutingClaimId?: string | undefined;
|
|
101
|
+
setupRoutingClaimedAt?: string | undefined;
|
|
102
|
+
setupRoutingClaimExpiresAt?: string | undefined;
|
|
69
103
|
}, {
|
|
70
104
|
status: "blocked" | "active" | "completed";
|
|
71
|
-
source: "create" | "modify";
|
|
72
105
|
workItemId: string;
|
|
73
106
|
threadId: string;
|
|
74
|
-
phase: "
|
|
107
|
+
phase: "blocked" | "building" | "verifying" | "repairing" | "done";
|
|
108
|
+
source: "create" | "modify";
|
|
75
109
|
rebuildAttempts: number;
|
|
110
|
+
owner?: {
|
|
111
|
+
type: "direct";
|
|
112
|
+
} | {
|
|
113
|
+
type: "planned";
|
|
114
|
+
taskId: string;
|
|
115
|
+
} | undefined;
|
|
116
|
+
plannedTaskId?: string | undefined;
|
|
76
117
|
runId?: string | undefined;
|
|
77
118
|
workflowId?: string | undefined;
|
|
78
119
|
lastTaskId?: string | undefined;
|
|
79
120
|
lastExecutionId?: string | undefined;
|
|
80
121
|
lastFailureSignature?: string | undefined;
|
|
122
|
+
lastWorkflowInspection?: string | undefined;
|
|
81
123
|
mockedCredentialTypes?: string[] | undefined;
|
|
82
124
|
hasUnresolvedPlaceholders?: boolean | undefined;
|
|
83
125
|
successfulSubmitSeen?: boolean | undefined;
|
|
84
126
|
preSaveSubmitFailures?: number | undefined;
|
|
85
127
|
postSubmitRemediationSubmitsUsed?: number | undefined;
|
|
86
128
|
lastRemediation?: {
|
|
87
|
-
category: "
|
|
129
|
+
category: "code_fixable" | "needs_setup" | "blocked";
|
|
88
130
|
shouldEdit: boolean;
|
|
89
131
|
guidance: string;
|
|
90
132
|
reason?: string | undefined;
|
|
91
133
|
remainingSubmitFixes?: number | undefined;
|
|
92
134
|
attemptCount?: number | undefined;
|
|
93
135
|
} | undefined;
|
|
136
|
+
setupRoutedAt?: string | undefined;
|
|
137
|
+
setupRoutingClaimId?: string | undefined;
|
|
138
|
+
setupRoutingClaimedAt?: string | undefined;
|
|
139
|
+
setupRoutingClaimExpiresAt?: string | undefined;
|
|
94
140
|
}>;
|
|
95
141
|
attempts: z.ZodArray<z.ZodObject<{
|
|
96
142
|
workItemId: z.ZodString;
|
|
@@ -101,6 +147,7 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
101
147
|
workflowId: z.ZodOptional<z.ZodString>;
|
|
102
148
|
executionId: z.ZodOptional<z.ZodString>;
|
|
103
149
|
failureSignature: z.ZodOptional<z.ZodString>;
|
|
150
|
+
workflowInspection: z.ZodOptional<z.ZodString>;
|
|
104
151
|
diagnosis: z.ZodOptional<z.ZodString>;
|
|
105
152
|
fixApplied: z.ZodOptional<z.ZodString>;
|
|
106
153
|
remediationCategory: z.ZodOptional<z.ZodEnum<["code_fixable", "needs_setup", "blocked"]>>;
|
|
@@ -112,14 +159,15 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
112
159
|
action: "build" | "verify" | "rebuild" | "patch";
|
|
113
160
|
result: "blocked" | "success" | "failure";
|
|
114
161
|
workItemId: string;
|
|
115
|
-
phase: "
|
|
162
|
+
phase: "blocked" | "building" | "verifying" | "repairing" | "done";
|
|
116
163
|
createdAt: string;
|
|
117
164
|
diagnosis?: string | undefined;
|
|
118
165
|
fixApplied?: string | undefined;
|
|
119
|
-
workflowId?: string | undefined;
|
|
120
166
|
executionId?: string | undefined;
|
|
121
167
|
failureSignature?: string | undefined;
|
|
122
|
-
|
|
168
|
+
workflowId?: string | undefined;
|
|
169
|
+
workflowInspection?: string | undefined;
|
|
170
|
+
remediationCategory?: "code_fixable" | "needs_setup" | "blocked" | undefined;
|
|
123
171
|
remediationShouldEdit?: boolean | undefined;
|
|
124
172
|
remediationGuidance?: string | undefined;
|
|
125
173
|
}, {
|
|
@@ -127,14 +175,15 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
127
175
|
action: "build" | "verify" | "rebuild" | "patch";
|
|
128
176
|
result: "blocked" | "success" | "failure";
|
|
129
177
|
workItemId: string;
|
|
130
|
-
phase: "
|
|
178
|
+
phase: "blocked" | "building" | "verifying" | "repairing" | "done";
|
|
131
179
|
createdAt: string;
|
|
132
180
|
diagnosis?: string | undefined;
|
|
133
181
|
fixApplied?: string | undefined;
|
|
134
|
-
workflowId?: string | undefined;
|
|
135
182
|
executionId?: string | undefined;
|
|
136
183
|
failureSignature?: string | undefined;
|
|
137
|
-
|
|
184
|
+
workflowId?: string | undefined;
|
|
185
|
+
workflowInspection?: string | undefined;
|
|
186
|
+
remediationCategory?: "code_fixable" | "needs_setup" | "blocked" | undefined;
|
|
138
187
|
remediationShouldEdit?: boolean | undefined;
|
|
139
188
|
remediationGuidance?: string | undefined;
|
|
140
189
|
}>, "many">;
|
|
@@ -142,6 +191,23 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
142
191
|
workItemId: z.ZodString;
|
|
143
192
|
runId: z.ZodOptional<z.ZodString>;
|
|
144
193
|
taskId: z.ZodString;
|
|
194
|
+
owner: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
195
|
+
type: z.ZodLiteral<"direct">;
|
|
196
|
+
}, "strip", z.ZodTypeAny, {
|
|
197
|
+
type: "direct";
|
|
198
|
+
}, {
|
|
199
|
+
type: "direct";
|
|
200
|
+
}>, z.ZodObject<{
|
|
201
|
+
type: z.ZodLiteral<"planned">;
|
|
202
|
+
taskId: z.ZodString;
|
|
203
|
+
}, "strip", z.ZodTypeAny, {
|
|
204
|
+
type: "planned";
|
|
205
|
+
taskId: string;
|
|
206
|
+
}, {
|
|
207
|
+
type: "planned";
|
|
208
|
+
taskId: string;
|
|
209
|
+
}>]>>;
|
|
210
|
+
plannedTaskId: z.ZodOptional<z.ZodString>;
|
|
145
211
|
workflowId: z.ZodOptional<z.ZodString>;
|
|
146
212
|
submitted: z.ZodBoolean;
|
|
147
213
|
triggerType: z.ZodEnum<["manual_or_testable", "trigger_only"]>;
|
|
@@ -183,24 +249,24 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
183
249
|
guidance: z.ZodString;
|
|
184
250
|
}, "strip", z.ZodTypeAny, {
|
|
185
251
|
status: "needs_setup";
|
|
186
|
-
reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
|
|
187
252
|
guidance: string;
|
|
253
|
+
reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
|
|
188
254
|
}, {
|
|
189
255
|
status: "needs_setup";
|
|
190
|
-
reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
|
|
191
256
|
guidance: string;
|
|
257
|
+
reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
|
|
192
258
|
}>, z.ZodObject<{
|
|
193
259
|
status: z.ZodLiteral<"not_verifiable">;
|
|
194
260
|
reason: z.ZodEnum<["not-submitted", "missing-workflow-id", "non-mockable-trigger"]>;
|
|
195
261
|
guidance: z.ZodString;
|
|
196
262
|
}, "strip", z.ZodTypeAny, {
|
|
197
263
|
status: "not_verifiable";
|
|
198
|
-
reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
|
|
199
264
|
guidance: string;
|
|
265
|
+
reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
|
|
200
266
|
}, {
|
|
201
267
|
status: "not_verifiable";
|
|
202
|
-
reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
|
|
203
268
|
guidance: string;
|
|
269
|
+
reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
|
|
204
270
|
}>]>>;
|
|
205
271
|
setupRequirement: z.ZodOptional<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
|
|
206
272
|
status: z.ZodLiteral<"not_required">;
|
|
@@ -214,12 +280,12 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
214
280
|
guidance: z.ZodString;
|
|
215
281
|
}, "strip", z.ZodTypeAny, {
|
|
216
282
|
status: "required";
|
|
217
|
-
reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
|
|
218
283
|
guidance: string;
|
|
284
|
+
reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
|
|
219
285
|
}, {
|
|
220
286
|
status: "required";
|
|
221
|
-
reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
|
|
222
287
|
guidance: string;
|
|
288
|
+
reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
|
|
223
289
|
}>]>>;
|
|
224
290
|
remediation: z.ZodOptional<z.ZodObject<{
|
|
225
291
|
category: z.ZodEnum<["code_fixable", "needs_setup", "blocked"]>;
|
|
@@ -229,14 +295,14 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
229
295
|
remainingSubmitFixes: z.ZodOptional<z.ZodNumber>;
|
|
230
296
|
attemptCount: z.ZodOptional<z.ZodNumber>;
|
|
231
297
|
}, "strip", z.ZodTypeAny, {
|
|
232
|
-
category: "
|
|
298
|
+
category: "code_fixable" | "needs_setup" | "blocked";
|
|
233
299
|
shouldEdit: boolean;
|
|
234
300
|
guidance: string;
|
|
235
301
|
reason?: string | undefined;
|
|
236
302
|
remainingSubmitFixes?: number | undefined;
|
|
237
303
|
attemptCount?: number | undefined;
|
|
238
304
|
}, {
|
|
239
|
-
category: "
|
|
305
|
+
category: "code_fixable" | "needs_setup" | "blocked";
|
|
240
306
|
shouldEdit: boolean;
|
|
241
307
|
guidance: string;
|
|
242
308
|
reason?: string | undefined;
|
|
@@ -267,9 +333,9 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
267
333
|
}>>;
|
|
268
334
|
verifiedAt: z.ZodOptional<z.ZodString>;
|
|
269
335
|
}, "strip", z.ZodTypeAny, {
|
|
270
|
-
success: boolean;
|
|
271
336
|
attempted: boolean;
|
|
272
|
-
|
|
337
|
+
success: boolean;
|
|
338
|
+
status?: "error" | "unknown" | "success" | "waiting" | "running" | undefined;
|
|
273
339
|
executionId?: string | undefined;
|
|
274
340
|
failureSignature?: string | undefined;
|
|
275
341
|
evidence?: {
|
|
@@ -280,9 +346,9 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
280
346
|
} | undefined;
|
|
281
347
|
verifiedAt?: string | undefined;
|
|
282
348
|
}, {
|
|
283
|
-
success: boolean;
|
|
284
349
|
attempted: boolean;
|
|
285
|
-
|
|
350
|
+
success: boolean;
|
|
351
|
+
status?: "error" | "unknown" | "success" | "waiting" | "running" | undefined;
|
|
286
352
|
executionId?: string | undefined;
|
|
287
353
|
failureSignature?: string | undefined;
|
|
288
354
|
evidence?: {
|
|
@@ -295,17 +361,24 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
295
361
|
}>>;
|
|
296
362
|
summary: z.ZodString;
|
|
297
363
|
}, "strip", z.ZodTypeAny, {
|
|
298
|
-
workItemId: string;
|
|
299
364
|
taskId: string;
|
|
365
|
+
workItemId: string;
|
|
300
366
|
submitted: boolean;
|
|
301
367
|
triggerType: "manual_or_testable" | "trigger_only";
|
|
302
368
|
needsUserInput: boolean;
|
|
303
369
|
summary: string;
|
|
370
|
+
owner?: {
|
|
371
|
+
type: "direct";
|
|
372
|
+
} | {
|
|
373
|
+
type: "planned";
|
|
374
|
+
taskId: string;
|
|
375
|
+
} | undefined;
|
|
376
|
+
plannedTaskId?: string | undefined;
|
|
377
|
+
failureSignature?: string | undefined;
|
|
304
378
|
runId?: string | undefined;
|
|
305
379
|
workflowId?: string | undefined;
|
|
306
380
|
mockedCredentialTypes?: string[] | undefined;
|
|
307
381
|
hasUnresolvedPlaceholders?: boolean | undefined;
|
|
308
|
-
failureSignature?: string | undefined;
|
|
309
382
|
triggerNodes?: {
|
|
310
383
|
nodeName: string;
|
|
311
384
|
nodeType: string;
|
|
@@ -322,22 +395,22 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
322
395
|
status: "already_verified";
|
|
323
396
|
} | {
|
|
324
397
|
status: "needs_setup";
|
|
325
|
-
reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
|
|
326
398
|
guidance: string;
|
|
399
|
+
reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
|
|
327
400
|
} | {
|
|
328
401
|
status: "not_verifiable";
|
|
329
|
-
reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
|
|
330
402
|
guidance: string;
|
|
403
|
+
reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
|
|
331
404
|
} | undefined;
|
|
332
405
|
setupRequirement?: {
|
|
333
406
|
status: "not_required";
|
|
334
407
|
} | {
|
|
335
408
|
status: "required";
|
|
336
|
-
reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
|
|
337
409
|
guidance: string;
|
|
410
|
+
reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
|
|
338
411
|
} | undefined;
|
|
339
412
|
remediation?: {
|
|
340
|
-
category: "
|
|
413
|
+
category: "code_fixable" | "needs_setup" | "blocked";
|
|
341
414
|
shouldEdit: boolean;
|
|
342
415
|
guidance: string;
|
|
343
416
|
reason?: string | undefined;
|
|
@@ -345,9 +418,9 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
345
418
|
attemptCount?: number | undefined;
|
|
346
419
|
} | undefined;
|
|
347
420
|
verification?: {
|
|
348
|
-
success: boolean;
|
|
349
421
|
attempted: boolean;
|
|
350
|
-
|
|
422
|
+
success: boolean;
|
|
423
|
+
status?: "error" | "unknown" | "success" | "waiting" | "running" | undefined;
|
|
351
424
|
executionId?: string | undefined;
|
|
352
425
|
failureSignature?: string | undefined;
|
|
353
426
|
evidence?: {
|
|
@@ -359,17 +432,24 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
359
432
|
verifiedAt?: string | undefined;
|
|
360
433
|
} | undefined;
|
|
361
434
|
}, {
|
|
362
|
-
workItemId: string;
|
|
363
435
|
taskId: string;
|
|
436
|
+
workItemId: string;
|
|
364
437
|
submitted: boolean;
|
|
365
438
|
triggerType: "manual_or_testable" | "trigger_only";
|
|
366
439
|
needsUserInput: boolean;
|
|
367
440
|
summary: string;
|
|
441
|
+
owner?: {
|
|
442
|
+
type: "direct";
|
|
443
|
+
} | {
|
|
444
|
+
type: "planned";
|
|
445
|
+
taskId: string;
|
|
446
|
+
} | undefined;
|
|
447
|
+
plannedTaskId?: string | undefined;
|
|
448
|
+
failureSignature?: string | undefined;
|
|
368
449
|
runId?: string | undefined;
|
|
369
450
|
workflowId?: string | undefined;
|
|
370
451
|
mockedCredentialTypes?: string[] | undefined;
|
|
371
452
|
hasUnresolvedPlaceholders?: boolean | undefined;
|
|
372
|
-
failureSignature?: string | undefined;
|
|
373
453
|
triggerNodes?: {
|
|
374
454
|
nodeName: string;
|
|
375
455
|
nodeType: string;
|
|
@@ -386,22 +466,22 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
386
466
|
status: "already_verified";
|
|
387
467
|
} | {
|
|
388
468
|
status: "needs_setup";
|
|
389
|
-
reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
|
|
390
469
|
guidance: string;
|
|
470
|
+
reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
|
|
391
471
|
} | {
|
|
392
472
|
status: "not_verifiable";
|
|
393
|
-
reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
|
|
394
473
|
guidance: string;
|
|
474
|
+
reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
|
|
395
475
|
} | undefined;
|
|
396
476
|
setupRequirement?: {
|
|
397
477
|
status: "not_required";
|
|
398
478
|
} | {
|
|
399
479
|
status: "required";
|
|
400
|
-
reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
|
|
401
480
|
guidance: string;
|
|
481
|
+
reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
|
|
402
482
|
} | undefined;
|
|
403
483
|
remediation?: {
|
|
404
|
-
category: "
|
|
484
|
+
category: "code_fixable" | "needs_setup" | "blocked";
|
|
405
485
|
shouldEdit: boolean;
|
|
406
486
|
guidance: string;
|
|
407
487
|
reason?: string | undefined;
|
|
@@ -409,9 +489,9 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
409
489
|
attemptCount?: number | undefined;
|
|
410
490
|
} | undefined;
|
|
411
491
|
verification?: {
|
|
412
|
-
success: boolean;
|
|
413
492
|
attempted: boolean;
|
|
414
|
-
|
|
493
|
+
success: boolean;
|
|
494
|
+
status?: "error" | "unknown" | "success" | "waiting" | "running" | undefined;
|
|
415
495
|
executionId?: string | undefined;
|
|
416
496
|
failureSignature?: string | undefined;
|
|
417
497
|
evidence?: {
|
|
@@ -426,58 +506,78 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
426
506
|
}, "strip", z.ZodTypeAny, {
|
|
427
507
|
state: {
|
|
428
508
|
status: "blocked" | "active" | "completed";
|
|
429
|
-
source: "create" | "modify";
|
|
430
509
|
workItemId: string;
|
|
431
510
|
threadId: string;
|
|
432
|
-
phase: "
|
|
511
|
+
phase: "blocked" | "building" | "verifying" | "repairing" | "done";
|
|
512
|
+
source: "create" | "modify";
|
|
433
513
|
rebuildAttempts: number;
|
|
514
|
+
owner?: {
|
|
515
|
+
type: "direct";
|
|
516
|
+
} | {
|
|
517
|
+
type: "planned";
|
|
518
|
+
taskId: string;
|
|
519
|
+
} | undefined;
|
|
520
|
+
plannedTaskId?: string | undefined;
|
|
434
521
|
runId?: string | undefined;
|
|
435
522
|
workflowId?: string | undefined;
|
|
436
523
|
lastTaskId?: string | undefined;
|
|
437
524
|
lastExecutionId?: string | undefined;
|
|
438
525
|
lastFailureSignature?: string | undefined;
|
|
526
|
+
lastWorkflowInspection?: string | undefined;
|
|
439
527
|
mockedCredentialTypes?: string[] | undefined;
|
|
440
528
|
hasUnresolvedPlaceholders?: boolean | undefined;
|
|
441
529
|
successfulSubmitSeen?: boolean | undefined;
|
|
442
530
|
preSaveSubmitFailures?: number | undefined;
|
|
443
531
|
postSubmitRemediationSubmitsUsed?: number | undefined;
|
|
444
532
|
lastRemediation?: {
|
|
445
|
-
category: "
|
|
533
|
+
category: "code_fixable" | "needs_setup" | "blocked";
|
|
446
534
|
shouldEdit: boolean;
|
|
447
535
|
guidance: string;
|
|
448
536
|
reason?: string | undefined;
|
|
449
537
|
remainingSubmitFixes?: number | undefined;
|
|
450
538
|
attemptCount?: number | undefined;
|
|
451
539
|
} | undefined;
|
|
540
|
+
setupRoutedAt?: string | undefined;
|
|
541
|
+
setupRoutingClaimId?: string | undefined;
|
|
542
|
+
setupRoutingClaimedAt?: string | undefined;
|
|
543
|
+
setupRoutingClaimExpiresAt?: string | undefined;
|
|
452
544
|
};
|
|
453
545
|
attempts: {
|
|
454
546
|
attempt: number;
|
|
455
547
|
action: "build" | "verify" | "rebuild" | "patch";
|
|
456
548
|
result: "blocked" | "success" | "failure";
|
|
457
549
|
workItemId: string;
|
|
458
|
-
phase: "
|
|
550
|
+
phase: "blocked" | "building" | "verifying" | "repairing" | "done";
|
|
459
551
|
createdAt: string;
|
|
460
552
|
diagnosis?: string | undefined;
|
|
461
553
|
fixApplied?: string | undefined;
|
|
462
|
-
workflowId?: string | undefined;
|
|
463
554
|
executionId?: string | undefined;
|
|
464
555
|
failureSignature?: string | undefined;
|
|
465
|
-
|
|
556
|
+
workflowId?: string | undefined;
|
|
557
|
+
workflowInspection?: string | undefined;
|
|
558
|
+
remediationCategory?: "code_fixable" | "needs_setup" | "blocked" | undefined;
|
|
466
559
|
remediationShouldEdit?: boolean | undefined;
|
|
467
560
|
remediationGuidance?: string | undefined;
|
|
468
561
|
}[];
|
|
469
562
|
lastBuildOutcome?: {
|
|
470
|
-
workItemId: string;
|
|
471
563
|
taskId: string;
|
|
564
|
+
workItemId: string;
|
|
472
565
|
submitted: boolean;
|
|
473
566
|
triggerType: "manual_or_testable" | "trigger_only";
|
|
474
567
|
needsUserInput: boolean;
|
|
475
568
|
summary: string;
|
|
569
|
+
owner?: {
|
|
570
|
+
type: "direct";
|
|
571
|
+
} | {
|
|
572
|
+
type: "planned";
|
|
573
|
+
taskId: string;
|
|
574
|
+
} | undefined;
|
|
575
|
+
plannedTaskId?: string | undefined;
|
|
576
|
+
failureSignature?: string | undefined;
|
|
476
577
|
runId?: string | undefined;
|
|
477
578
|
workflowId?: string | undefined;
|
|
478
579
|
mockedCredentialTypes?: string[] | undefined;
|
|
479
580
|
hasUnresolvedPlaceholders?: boolean | undefined;
|
|
480
|
-
failureSignature?: string | undefined;
|
|
481
581
|
triggerNodes?: {
|
|
482
582
|
nodeName: string;
|
|
483
583
|
nodeType: string;
|
|
@@ -494,22 +594,22 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
494
594
|
status: "already_verified";
|
|
495
595
|
} | {
|
|
496
596
|
status: "needs_setup";
|
|
497
|
-
reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
|
|
498
597
|
guidance: string;
|
|
598
|
+
reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
|
|
499
599
|
} | {
|
|
500
600
|
status: "not_verifiable";
|
|
501
|
-
reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
|
|
502
601
|
guidance: string;
|
|
602
|
+
reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
|
|
503
603
|
} | undefined;
|
|
504
604
|
setupRequirement?: {
|
|
505
605
|
status: "not_required";
|
|
506
606
|
} | {
|
|
507
607
|
status: "required";
|
|
508
|
-
reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
|
|
509
608
|
guidance: string;
|
|
609
|
+
reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
|
|
510
610
|
} | undefined;
|
|
511
611
|
remediation?: {
|
|
512
|
-
category: "
|
|
612
|
+
category: "code_fixable" | "needs_setup" | "blocked";
|
|
513
613
|
shouldEdit: boolean;
|
|
514
614
|
guidance: string;
|
|
515
615
|
reason?: string | undefined;
|
|
@@ -517,9 +617,9 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
517
617
|
attemptCount?: number | undefined;
|
|
518
618
|
} | undefined;
|
|
519
619
|
verification?: {
|
|
520
|
-
success: boolean;
|
|
521
620
|
attempted: boolean;
|
|
522
|
-
|
|
621
|
+
success: boolean;
|
|
622
|
+
status?: "error" | "unknown" | "success" | "waiting" | "running" | undefined;
|
|
523
623
|
executionId?: string | undefined;
|
|
524
624
|
failureSignature?: string | undefined;
|
|
525
625
|
evidence?: {
|
|
@@ -534,58 +634,78 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
534
634
|
}, {
|
|
535
635
|
state: {
|
|
536
636
|
status: "blocked" | "active" | "completed";
|
|
537
|
-
source: "create" | "modify";
|
|
538
637
|
workItemId: string;
|
|
539
638
|
threadId: string;
|
|
540
|
-
phase: "
|
|
639
|
+
phase: "blocked" | "building" | "verifying" | "repairing" | "done";
|
|
640
|
+
source: "create" | "modify";
|
|
541
641
|
rebuildAttempts: number;
|
|
642
|
+
owner?: {
|
|
643
|
+
type: "direct";
|
|
644
|
+
} | {
|
|
645
|
+
type: "planned";
|
|
646
|
+
taskId: string;
|
|
647
|
+
} | undefined;
|
|
648
|
+
plannedTaskId?: string | undefined;
|
|
542
649
|
runId?: string | undefined;
|
|
543
650
|
workflowId?: string | undefined;
|
|
544
651
|
lastTaskId?: string | undefined;
|
|
545
652
|
lastExecutionId?: string | undefined;
|
|
546
653
|
lastFailureSignature?: string | undefined;
|
|
654
|
+
lastWorkflowInspection?: string | undefined;
|
|
547
655
|
mockedCredentialTypes?: string[] | undefined;
|
|
548
656
|
hasUnresolvedPlaceholders?: boolean | undefined;
|
|
549
657
|
successfulSubmitSeen?: boolean | undefined;
|
|
550
658
|
preSaveSubmitFailures?: number | undefined;
|
|
551
659
|
postSubmitRemediationSubmitsUsed?: number | undefined;
|
|
552
660
|
lastRemediation?: {
|
|
553
|
-
category: "
|
|
661
|
+
category: "code_fixable" | "needs_setup" | "blocked";
|
|
554
662
|
shouldEdit: boolean;
|
|
555
663
|
guidance: string;
|
|
556
664
|
reason?: string | undefined;
|
|
557
665
|
remainingSubmitFixes?: number | undefined;
|
|
558
666
|
attemptCount?: number | undefined;
|
|
559
667
|
} | undefined;
|
|
668
|
+
setupRoutedAt?: string | undefined;
|
|
669
|
+
setupRoutingClaimId?: string | undefined;
|
|
670
|
+
setupRoutingClaimedAt?: string | undefined;
|
|
671
|
+
setupRoutingClaimExpiresAt?: string | undefined;
|
|
560
672
|
};
|
|
561
673
|
attempts: {
|
|
562
674
|
attempt: number;
|
|
563
675
|
action: "build" | "verify" | "rebuild" | "patch";
|
|
564
676
|
result: "blocked" | "success" | "failure";
|
|
565
677
|
workItemId: string;
|
|
566
|
-
phase: "
|
|
678
|
+
phase: "blocked" | "building" | "verifying" | "repairing" | "done";
|
|
567
679
|
createdAt: string;
|
|
568
680
|
diagnosis?: string | undefined;
|
|
569
681
|
fixApplied?: string | undefined;
|
|
570
|
-
workflowId?: string | undefined;
|
|
571
682
|
executionId?: string | undefined;
|
|
572
683
|
failureSignature?: string | undefined;
|
|
573
|
-
|
|
684
|
+
workflowId?: string | undefined;
|
|
685
|
+
workflowInspection?: string | undefined;
|
|
686
|
+
remediationCategory?: "code_fixable" | "needs_setup" | "blocked" | undefined;
|
|
574
687
|
remediationShouldEdit?: boolean | undefined;
|
|
575
688
|
remediationGuidance?: string | undefined;
|
|
576
689
|
}[];
|
|
577
690
|
lastBuildOutcome?: {
|
|
578
|
-
workItemId: string;
|
|
579
691
|
taskId: string;
|
|
692
|
+
workItemId: string;
|
|
580
693
|
submitted: boolean;
|
|
581
694
|
triggerType: "manual_or_testable" | "trigger_only";
|
|
582
695
|
needsUserInput: boolean;
|
|
583
696
|
summary: string;
|
|
697
|
+
owner?: {
|
|
698
|
+
type: "direct";
|
|
699
|
+
} | {
|
|
700
|
+
type: "planned";
|
|
701
|
+
taskId: string;
|
|
702
|
+
} | undefined;
|
|
703
|
+
plannedTaskId?: string | undefined;
|
|
704
|
+
failureSignature?: string | undefined;
|
|
584
705
|
runId?: string | undefined;
|
|
585
706
|
workflowId?: string | undefined;
|
|
586
707
|
mockedCredentialTypes?: string[] | undefined;
|
|
587
708
|
hasUnresolvedPlaceholders?: boolean | undefined;
|
|
588
|
-
failureSignature?: string | undefined;
|
|
589
709
|
triggerNodes?: {
|
|
590
710
|
nodeName: string;
|
|
591
711
|
nodeType: string;
|
|
@@ -602,22 +722,22 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
602
722
|
status: "already_verified";
|
|
603
723
|
} | {
|
|
604
724
|
status: "needs_setup";
|
|
605
|
-
reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
|
|
606
725
|
guidance: string;
|
|
726
|
+
reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
|
|
607
727
|
} | {
|
|
608
728
|
status: "not_verifiable";
|
|
609
|
-
reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
|
|
610
729
|
guidance: string;
|
|
730
|
+
reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
|
|
611
731
|
} | undefined;
|
|
612
732
|
setupRequirement?: {
|
|
613
733
|
status: "not_required";
|
|
614
734
|
} | {
|
|
615
735
|
status: "required";
|
|
616
|
-
reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
|
|
617
736
|
guidance: string;
|
|
737
|
+
reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
|
|
618
738
|
} | undefined;
|
|
619
739
|
remediation?: {
|
|
620
|
-
category: "
|
|
740
|
+
category: "code_fixable" | "needs_setup" | "blocked";
|
|
621
741
|
shouldEdit: boolean;
|
|
622
742
|
guidance: string;
|
|
623
743
|
reason?: string | undefined;
|
|
@@ -625,9 +745,9 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
625
745
|
attemptCount?: number | undefined;
|
|
626
746
|
} | undefined;
|
|
627
747
|
verification?: {
|
|
628
|
-
success: boolean;
|
|
629
748
|
attempted: boolean;
|
|
630
|
-
|
|
749
|
+
success: boolean;
|
|
750
|
+
status?: "error" | "unknown" | "success" | "waiting" | "running" | undefined;
|
|
631
751
|
executionId?: string | undefined;
|
|
632
752
|
failureSignature?: string | undefined;
|
|
633
753
|
evidence?: {
|
|
@@ -641,12 +761,21 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
641
761
|
} | undefined;
|
|
642
762
|
}>;
|
|
643
763
|
export type WorkflowLoopWorkItemRecord = z.infer<typeof workItemRecordSchema>;
|
|
764
|
+
export interface WorkflowSetupRoutingClaim {
|
|
765
|
+
claimId: string;
|
|
766
|
+
claimedAt: string;
|
|
767
|
+
expiresAt: string;
|
|
768
|
+
}
|
|
644
769
|
export declare class WorkflowLoopStorage {
|
|
645
770
|
private readonly memory;
|
|
646
771
|
constructor(memory: PatchableThreadMemory);
|
|
647
772
|
getWorkItem(threadId: string, workItemId: string): Promise<WorkflowLoopWorkItemRecord | null>;
|
|
648
773
|
saveWorkItem(threadId: string, state: WorkflowLoopState, attempts: AttemptRecord[], lastBuildOutcome?: WorkflowBuildOutcome): Promise<void>;
|
|
649
774
|
getActiveWorkItem(threadId: string): Promise<WorkflowLoopWorkItemRecord | null>;
|
|
775
|
+
listWorkItems(threadId: string): Promise<WorkflowLoopWorkItemRecord[]>;
|
|
776
|
+
claimSetupRouting(threadId: string, workItemId: string, claim: WorkflowSetupRoutingClaim): Promise<WorkflowLoopWorkItemRecord | null>;
|
|
777
|
+
markSetupRouted(threadId: string, workItemId: string, claimId: string, routedAt: string): Promise<boolean>;
|
|
778
|
+
releaseSetupRoutingClaim(threadId: string, workItemId: string, claimId: string): Promise<void>;
|
|
650
779
|
private loadAll;
|
|
651
780
|
private parse;
|
|
652
781
|
}
|