@n8n/instance-ai 1.4.1 → 1.6.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/agent/computer-use-prompt.d.ts +5 -0
- package/dist/agent/computer-use-prompt.js +97 -0
- package/dist/agent/computer-use-prompt.js.map +1 -0
- package/dist/agent/instance-agent.js +48 -73
- package/dist/agent/instance-agent.js.map +1 -1
- package/dist/agent/mcp-tool-name-validation.d.ts +15 -0
- package/dist/agent/mcp-tool-name-validation.js +67 -0
- package/dist/agent/mcp-tool-name-validation.js.map +1 -0
- package/dist/agent/sanitize-mcp-schemas.d.ts +56 -2
- package/dist/agent/sanitize-mcp-schemas.js +226 -19
- package/dist/agent/sanitize-mcp-schemas.js.map +1 -1
- package/dist/agent/sub-agent-debriefing.d.ts +2 -2
- package/dist/agent/sub-agent-factory.d.ts +1 -0
- package/dist/agent/sub-agent-factory.js +1 -0
- package/dist/agent/sub-agent-factory.js.map +1 -1
- package/dist/agent/system-prompt.d.ts +1 -1
- package/dist/agent/system-prompt.js +46 -104
- package/dist/agent/system-prompt.js.map +1 -1
- package/dist/build.tsbuildinfo +1 -1
- package/dist/constants/model-settings.d.ts +3 -0
- package/dist/constants/model-settings.js +7 -0
- package/dist/constants/model-settings.js.map +1 -0
- package/dist/domain-access/domain-access-tracker.d.ts +3 -0
- package/dist/domain-access/domain-access-tracker.js +16 -0
- package/dist/domain-access/domain-access-tracker.js.map +1 -1
- package/dist/domain-access/domain-gating.d.ts +35 -6
- package/dist/domain-access/domain-gating.js +47 -1
- package/dist/domain-access/domain-gating.js.map +1 -1
- package/dist/domain-access/index.d.ts +1 -1
- package/dist/domain-access/index.js +3 -1
- package/dist/domain-access/index.js.map +1 -1
- package/dist/index.d.ts +14 -6
- package/dist/index.js +19 -2
- package/dist/index.js.map +1 -1
- package/dist/logger.d.ts +6 -0
- package/dist/mcp/mcp-client-manager.d.ts +18 -2
- package/dist/mcp/mcp-client-manager.js +124 -20
- package/dist/mcp/mcp-client-manager.js.map +1 -1
- package/dist/parsers/docx-parser.d.ts +6 -0
- package/dist/parsers/docx-parser.js +65 -0
- package/dist/parsers/docx-parser.js.map +1 -0
- package/dist/parsers/html-parser.d.ts +7 -0
- package/dist/parsers/html-parser.js +67 -0
- package/dist/parsers/html-parser.js.map +1 -0
- package/dist/parsers/index.d.ts +4 -0
- package/dist/parsers/index.js +16 -0
- package/dist/parsers/index.js.map +1 -0
- package/dist/parsers/pdf-parser.d.ts +7 -0
- package/dist/parsers/pdf-parser.js +72 -0
- package/dist/parsers/pdf-parser.js.map +1 -0
- package/dist/parsers/structured-file-parser.d.ts +8 -3
- package/dist/parsers/structured-file-parser.js +36 -4
- package/dist/parsers/structured-file-parser.js.map +1 -1
- package/dist/parsers/validate-attachments.d.ts +14 -0
- package/dist/parsers/validate-attachments.js +61 -0
- package/dist/parsers/validate-attachments.js.map +1 -0
- package/dist/parsers/xlsx-parser.d.ts +2 -0
- package/dist/parsers/xlsx-parser.js +75 -0
- package/dist/parsers/xlsx-parser.js.map +1 -0
- package/dist/planned-tasks/planned-task-permissions.d.ts +2 -0
- package/dist/planned-tasks/planned-task-permissions.js +8 -2
- package/dist/planned-tasks/planned-task-permissions.js.map +1 -1
- package/dist/planned-tasks/planned-task-service.d.ts +14 -1
- package/dist/planned-tasks/planned-task-service.js +138 -2
- package/dist/planned-tasks/planned-task-service.js.map +1 -1
- package/dist/runtime/background-task-manager.d.ts +32 -1
- package/dist/runtime/background-task-manager.js +134 -4
- package/dist/runtime/background-task-manager.js.map +1 -1
- package/dist/runtime/builder-sandbox-session-registry.d.ts +45 -0
- package/dist/runtime/builder-sandbox-session-registry.js +159 -0
- package/dist/runtime/builder-sandbox-session-registry.js.map +1 -0
- package/dist/runtime/liveness-policy.d.ts +40 -0
- package/dist/runtime/liveness-policy.js +74 -0
- package/dist/runtime/liveness-policy.js.map +1 -0
- package/dist/runtime/resumable-stream-executor.d.ts +1 -0
- package/dist/runtime/resumable-stream-executor.js +1 -0
- package/dist/runtime/resumable-stream-executor.js.map +1 -1
- package/dist/runtime/run-state-registry.d.ts +21 -5
- package/dist/runtime/run-state-registry.js +109 -7
- package/dist/runtime/run-state-registry.js.map +1 -1
- package/dist/runtime/stream-runner.d.ts +3 -0
- package/dist/runtime/stream-runner.js +3 -0
- package/dist/runtime/stream-runner.js.map +1 -1
- package/dist/runtime/terminal-response-guard.d.ts +30 -0
- package/dist/runtime/terminal-response-guard.js +149 -0
- package/dist/runtime/terminal-response-guard.js.map +1 -0
- package/dist/storage/agent-tree-snapshot.d.ts +2 -0
- package/dist/storage/index.d.ts +2 -0
- package/dist/storage/index.js +3 -1
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/planned-task-storage.js +2 -1
- package/dist/storage/planned-task-storage.js.map +1 -1
- package/dist/storage/terminal-outcome-storage.d.ts +48 -0
- package/dist/storage/terminal-outcome-storage.js +84 -0
- package/dist/storage/terminal-outcome-storage.js.map +1 -0
- package/dist/storage/workflow-loop-storage.d.ts +442 -16
- package/dist/stream/consume-with-hitl.d.ts +2 -0
- package/dist/stream/consume-with-hitl.js +2 -0
- package/dist/stream/consume-with-hitl.js.map +1 -1
- package/dist/stream/map-chunk.js +6 -0
- package/dist/stream/map-chunk.js.map +1 -1
- package/dist/tools/attachments/parse-file.tool.d.ts +46 -34
- package/dist/tools/attachments/parse-file.tool.js +115 -56
- package/dist/tools/attachments/parse-file.tool.js.map +1 -1
- package/dist/tools/credentials.tool.d.ts +120 -1
- package/dist/tools/credentials.tool.js +65 -12
- package/dist/tools/credentials.tool.js.map +1 -1
- package/dist/tools/data-tables.tool.d.ts +1 -0
- package/dist/tools/data-tables.tool.js +64 -24
- package/dist/tools/data-tables.tool.js.map +1 -1
- package/dist/tools/executions.tool.js +4 -1
- package/dist/tools/executions.tool.js.map +1 -1
- package/dist/tools/filesystem/create-tools-from-mcp-server.d.ts +2 -1
- package/dist/tools/filesystem/create-tools-from-mcp-server.js +74 -5
- package/dist/tools/filesystem/create-tools-from-mcp-server.js.map +1 -1
- package/dist/tools/index.d.ts +4 -24
- package/dist/tools/index.js +23 -7
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/nodes.tool.js +15 -15
- package/dist/tools/nodes.tool.js.map +1 -1
- package/dist/tools/orchestration/add-plan-item.tool.js +3 -1
- package/dist/tools/orchestration/add-plan-item.tool.js.map +1 -1
- package/dist/tools/orchestration/blueprint-accumulator.d.ts +4 -1
- package/dist/tools/orchestration/blueprint-accumulator.js +28 -0
- package/dist/tools/orchestration/blueprint-accumulator.js.map +1 -1
- package/dist/tools/orchestration/blueprint.schema.d.ts +61 -16
- package/dist/tools/orchestration/blueprint.schema.js +15 -1
- package/dist/tools/orchestration/blueprint.schema.js.map +1 -1
- package/dist/tools/orchestration/browser-credential-setup.nudge.d.ts +5 -0
- package/dist/tools/orchestration/browser-credential-setup.nudge.js +11 -0
- package/dist/tools/orchestration/browser-credential-setup.nudge.js.map +1 -0
- package/dist/tools/orchestration/browser-credential-setup.prompt.js +2 -1
- package/dist/tools/orchestration/browser-credential-setup.prompt.js.map +1 -1
- package/dist/tools/orchestration/browser-credential-setup.tool.js +55 -7
- package/dist/tools/orchestration/browser-credential-setup.tool.js.map +1 -1
- package/dist/tools/orchestration/build-workflow-agent.prompt.js +86 -60
- package/dist/tools/orchestration/build-workflow-agent.prompt.js.map +1 -1
- package/dist/tools/orchestration/build-workflow-agent.tool.d.ts +56 -3
- package/dist/tools/orchestration/build-workflow-agent.tool.js +1020 -300
- package/dist/tools/orchestration/build-workflow-agent.tool.js.map +1 -1
- package/dist/tools/orchestration/builder-memory-compaction.d.ts +38 -0
- package/dist/tools/orchestration/builder-memory-compaction.js +146 -0
- package/dist/tools/orchestration/builder-memory-compaction.js.map +1 -0
- package/dist/tools/orchestration/complete-checkpoint.tool.d.ts +2 -0
- package/dist/tools/orchestration/complete-checkpoint.tool.js +76 -0
- package/dist/tools/orchestration/complete-checkpoint.tool.js.map +1 -0
- package/dist/tools/orchestration/data-table-agent.tool.js +34 -17
- package/dist/tools/orchestration/data-table-agent.tool.js.map +1 -1
- package/dist/tools/orchestration/delegate.tool.js +34 -16
- package/dist/tools/orchestration/delegate.tool.js.map +1 -1
- package/dist/tools/orchestration/plan-agent-prompt.d.ts +1 -1
- package/dist/tools/orchestration/plan-agent-prompt.js +7 -0
- package/dist/tools/orchestration/plan-agent-prompt.js.map +1 -1
- package/dist/tools/orchestration/plan-with-agent.tool.d.ts +23 -0
- package/dist/tools/orchestration/plan-with-agent.tool.js +314 -13
- package/dist/tools/orchestration/plan-with-agent.tool.js.map +1 -1
- package/dist/tools/orchestration/plan.tool.js +17 -1
- package/dist/tools/orchestration/plan.tool.js.map +1 -1
- package/dist/tools/orchestration/report-verification-verdict.tool.d.ts +40 -2
- package/dist/tools/orchestration/report-verification-verdict.tool.js +85 -6
- package/dist/tools/orchestration/report-verification-verdict.tool.js.map +1 -1
- package/dist/tools/orchestration/research-with-agent.tool.js +33 -16
- package/dist/tools/orchestration/research-with-agent.tool.js.map +1 -1
- package/dist/tools/orchestration/tracing-utils.js +8 -0
- package/dist/tools/orchestration/tracing-utils.js.map +1 -1
- package/dist/tools/orchestration/verify-built-workflow.tool.d.ts +8 -2
- package/dist/tools/orchestration/verify-built-workflow.tool.js +476 -6
- package/dist/tools/orchestration/verify-built-workflow.tool.js.map +1 -1
- package/dist/tools/research.tool.js +56 -10
- package/dist/tools/research.tool.js.map +1 -1
- package/dist/tools/shared/ask-user.tool.d.ts +1 -0
- package/dist/tools/shared/ask-user.tool.js +3 -2
- package/dist/tools/shared/ask-user.tool.js.map +1 -1
- package/dist/tools/templates.tool.js +5 -90
- package/dist/tools/templates.tool.js.map +1 -1
- package/dist/tools/web-research/sanitize-web-content.d.ts +0 -1
- package/dist/tools/web-research/sanitize-web-content.js +0 -9
- package/dist/tools/web-research/sanitize-web-content.js.map +1 -1
- package/dist/tools/workflows/apply-workflow-credentials.tool.d.ts +2 -2
- package/dist/tools/workflows/build-workflow.tool.d.ts +2 -2
- package/dist/tools/workflows/build-workflow.tool.js +6 -4
- package/dist/tools/workflows/build-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/materialize-node-type.tool.d.ts +8 -8
- package/dist/tools/workflows/resolve-credentials.d.ts +9 -4
- package/dist/tools/workflows/resolve-credentials.js +59 -27
- package/dist/tools/workflows/resolve-credentials.js.map +1 -1
- package/dist/tools/workflows/setup-workflow.schema.d.ts +40 -0
- package/dist/tools/workflows/setup-workflow.service.d.ts +5 -1
- package/dist/tools/workflows/setup-workflow.service.js +71 -5
- package/dist/tools/workflows/setup-workflow.service.js.map +1 -1
- package/dist/tools/workflows/submit-workflow-identity.d.ts +25 -3
- package/dist/tools/workflows/submit-workflow-identity.js +92 -5
- package/dist/tools/workflows/submit-workflow-identity.js.map +1 -1
- package/dist/tools/workflows/submit-workflow.tool.d.ts +60 -6
- package/dist/tools/workflows/submit-workflow.tool.js +102 -19
- package/dist/tools/workflows/submit-workflow.tool.js.map +1 -1
- package/dist/tools/workflows/workflow-json-utils.d.ts +4 -0
- package/dist/tools/workflows/workflow-json-utils.js +54 -0
- package/dist/tools/workflows/workflow-json-utils.js.map +1 -0
- package/dist/tools/workflows.tool.d.ts +7 -1
- package/dist/tools/workflows.tool.js +283 -54
- package/dist/tools/workflows.tool.js.map +1 -1
- package/dist/tracing/langsmith-tracing.d.ts +2 -0
- package/dist/tracing/langsmith-tracing.js +12 -3
- package/dist/tracing/langsmith-tracing.js.map +1 -1
- package/dist/tracing/trace-replay.d.ts +3 -0
- package/dist/tracing/trace-replay.js +65 -0
- package/dist/tracing/trace-replay.js.map +1 -1
- package/dist/types.d.ts +92 -16
- package/dist/workflow-builder/parse-validate.d.ts +5 -1
- package/dist/workflow-builder/parse-validate.js +5 -4
- package/dist/workflow-builder/parse-validate.js.map +1 -1
- package/dist/workflow-loop/guidance.js +8 -2
- package/dist/workflow-loop/guidance.js.map +1 -1
- package/dist/workflow-loop/index.d.ts +3 -2
- package/dist/workflow-loop/index.js +11 -1
- package/dist/workflow-loop/index.js.map +1 -1
- package/dist/workflow-loop/remediation.d.ts +13 -0
- package/dist/workflow-loop/remediation.js +36 -0
- package/dist/workflow-loop/remediation.js.map +1 -0
- package/dist/workflow-loop/runtime.js +7 -0
- package/dist/workflow-loop/runtime.js.map +1 -1
- package/dist/workflow-loop/workflow-loop-controller.d.ts +1 -1
- package/dist/workflow-loop/workflow-loop-controller.js +196 -29
- package/dist/workflow-loop/workflow-loop-controller.js.map +1 -1
- package/dist/workflow-loop/workflow-loop-state.d.ts +500 -10
- package/dist/workflow-loop/workflow-loop-state.js +74 -1
- package/dist/workflow-loop/workflow-loop-state.js.map +1 -1
- package/dist/workflow-loop/workflow-task-service.d.ts +2 -1
- package/dist/workflow-loop/workflow-task-service.js +4 -0
- package/dist/workflow-loop/workflow-task-service.js.map +1 -1
- package/dist/workspace/builder-sandbox-factory.d.ts +3 -4
- package/dist/workspace/builder-sandbox-factory.js +74 -35
- package/dist/workspace/builder-sandbox-factory.js.map +1 -1
- package/dist/workspace/create-workspace.d.ts +2 -0
- package/dist/workspace/create-workspace.js.map +1 -1
- package/dist/workspace/n8n-sandbox-filesystem.js +2 -2
- package/dist/workspace/n8n-sandbox-filesystem.js.map +1 -1
- package/dist/workspace/n8n-sandbox-sandbox.d.ts +2 -3
- package/dist/workspace/n8n-sandbox-sandbox.js +3 -7
- package/dist/workspace/n8n-sandbox-sandbox.js.map +1 -1
- package/dist/workspace/sandbox-setup.d.ts +1 -1
- package/dist/workspace/sandbox-setup.js +41 -16
- package/dist/workspace/sandbox-setup.js.map +1 -1
- package/dist/workspace/snapshot-manager.d.ts +14 -2
- package/dist/workspace/snapshot-manager.js +57 -1
- package/dist/workspace/snapshot-manager.js.map +1 -1
- package/package.json +35 -10
- package/dist/tools/templates/template-api.d.ts +0 -21
- package/dist/tools/templates/template-api.js +0 -104
- package/dist/tools/templates/template-api.js.map +0 -1
- package/dist/tools/templates/types.d.ts +0 -52
- package/dist/tools/templates/types.js +0 -37
- package/dist/tools/templates/types.js.map +0 -1
- package/dist/tools/utils/mermaid.utils.d.ts +0 -15
- package/dist/tools/utils/mermaid.utils.js +0 -622
- package/dist/tools/utils/mermaid.utils.js.map +0 -1
- package/dist/tools/utils/node-configuration.utils.d.ts +0 -6
- package/dist/tools/utils/node-configuration.utils.js +0 -77
- package/dist/tools/utils/node-configuration.utils.js.map +0 -1
- package/dist/workspace/n8n-sandbox-client.d.ts +0 -105
- package/dist/workspace/n8n-sandbox-client.js +0 -335
- package/dist/workspace/n8n-sandbox-client.js.map +0 -1
- package/dist/workspace/n8n-sandbox-image-manager.d.ts +0 -5
- package/dist/workspace/n8n-sandbox-image-manager.js +0 -25
- package/dist/workspace/n8n-sandbox-image-manager.js.map +0 -1
|
@@ -5,6 +5,7 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
5
5
|
state: z.ZodObject<{
|
|
6
6
|
workItemId: z.ZodString;
|
|
7
7
|
threadId: z.ZodString;
|
|
8
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
8
9
|
workflowId: z.ZodOptional<z.ZodString>;
|
|
9
10
|
phase: z.ZodEnum<["building", "verifying", "repairing", "done", "blocked"]>;
|
|
10
11
|
status: z.ZodEnum<["active", "completed", "blocked"]>;
|
|
@@ -15,32 +16,81 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
15
16
|
rebuildAttempts: z.ZodNumber;
|
|
16
17
|
mockedCredentialTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
17
18
|
hasUnresolvedPlaceholders: z.ZodOptional<z.ZodBoolean>;
|
|
19
|
+
successfulSubmitSeen: z.ZodOptional<z.ZodBoolean>;
|
|
20
|
+
preSaveSubmitFailures: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
postSubmitRemediationSubmitsUsed: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
lastRemediation: z.ZodOptional<z.ZodObject<{
|
|
23
|
+
category: z.ZodEnum<["code_fixable", "needs_setup", "blocked"]>;
|
|
24
|
+
shouldEdit: z.ZodBoolean;
|
|
25
|
+
guidance: z.ZodString;
|
|
26
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
27
|
+
remainingSubmitFixes: z.ZodOptional<z.ZodNumber>;
|
|
28
|
+
attemptCount: z.ZodOptional<z.ZodNumber>;
|
|
29
|
+
}, "strip", z.ZodTypeAny, {
|
|
30
|
+
category: "blocked" | "code_fixable" | "needs_setup";
|
|
31
|
+
shouldEdit: boolean;
|
|
32
|
+
guidance: string;
|
|
33
|
+
reason?: string | undefined;
|
|
34
|
+
remainingSubmitFixes?: number | undefined;
|
|
35
|
+
attemptCount?: number | undefined;
|
|
36
|
+
}, {
|
|
37
|
+
category: "blocked" | "code_fixable" | "needs_setup";
|
|
38
|
+
shouldEdit: boolean;
|
|
39
|
+
guidance: string;
|
|
40
|
+
reason?: string | undefined;
|
|
41
|
+
remainingSubmitFixes?: number | undefined;
|
|
42
|
+
attemptCount?: number | undefined;
|
|
43
|
+
}>>;
|
|
18
44
|
}, "strip", z.ZodTypeAny, {
|
|
19
45
|
status: "blocked" | "active" | "completed";
|
|
46
|
+
source: "create" | "modify";
|
|
20
47
|
workItemId: string;
|
|
21
48
|
threadId: string;
|
|
22
49
|
phase: "building" | "verifying" | "repairing" | "done" | "blocked";
|
|
23
|
-
source: "create" | "modify";
|
|
24
50
|
rebuildAttempts: number;
|
|
25
51
|
workflowId?: string | undefined;
|
|
52
|
+
runId?: string | undefined;
|
|
26
53
|
lastTaskId?: string | undefined;
|
|
27
54
|
lastExecutionId?: string | undefined;
|
|
28
55
|
lastFailureSignature?: string | undefined;
|
|
29
56
|
mockedCredentialTypes?: string[] | undefined;
|
|
30
57
|
hasUnresolvedPlaceholders?: boolean | undefined;
|
|
58
|
+
successfulSubmitSeen?: boolean | undefined;
|
|
59
|
+
preSaveSubmitFailures?: number | undefined;
|
|
60
|
+
postSubmitRemediationSubmitsUsed?: number | undefined;
|
|
61
|
+
lastRemediation?: {
|
|
62
|
+
category: "blocked" | "code_fixable" | "needs_setup";
|
|
63
|
+
shouldEdit: boolean;
|
|
64
|
+
guidance: string;
|
|
65
|
+
reason?: string | undefined;
|
|
66
|
+
remainingSubmitFixes?: number | undefined;
|
|
67
|
+
attemptCount?: number | undefined;
|
|
68
|
+
} | undefined;
|
|
31
69
|
}, {
|
|
32
70
|
status: "blocked" | "active" | "completed";
|
|
71
|
+
source: "create" | "modify";
|
|
33
72
|
workItemId: string;
|
|
34
73
|
threadId: string;
|
|
35
74
|
phase: "building" | "verifying" | "repairing" | "done" | "blocked";
|
|
36
|
-
source: "create" | "modify";
|
|
37
75
|
rebuildAttempts: number;
|
|
38
76
|
workflowId?: string | undefined;
|
|
77
|
+
runId?: string | undefined;
|
|
39
78
|
lastTaskId?: string | undefined;
|
|
40
79
|
lastExecutionId?: string | undefined;
|
|
41
80
|
lastFailureSignature?: string | undefined;
|
|
42
81
|
mockedCredentialTypes?: string[] | undefined;
|
|
43
82
|
hasUnresolvedPlaceholders?: boolean | undefined;
|
|
83
|
+
successfulSubmitSeen?: boolean | undefined;
|
|
84
|
+
preSaveSubmitFailures?: number | undefined;
|
|
85
|
+
postSubmitRemediationSubmitsUsed?: number | undefined;
|
|
86
|
+
lastRemediation?: {
|
|
87
|
+
category: "blocked" | "code_fixable" | "needs_setup";
|
|
88
|
+
shouldEdit: boolean;
|
|
89
|
+
guidance: string;
|
|
90
|
+
reason?: string | undefined;
|
|
91
|
+
remainingSubmitFixes?: number | undefined;
|
|
92
|
+
attemptCount?: number | undefined;
|
|
93
|
+
} | undefined;
|
|
44
94
|
}>;
|
|
45
95
|
attempts: z.ZodArray<z.ZodObject<{
|
|
46
96
|
workItemId: z.ZodString;
|
|
@@ -53,38 +103,58 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
53
103
|
failureSignature: z.ZodOptional<z.ZodString>;
|
|
54
104
|
diagnosis: z.ZodOptional<z.ZodString>;
|
|
55
105
|
fixApplied: z.ZodOptional<z.ZodString>;
|
|
106
|
+
remediationCategory: z.ZodOptional<z.ZodEnum<["code_fixable", "needs_setup", "blocked"]>>;
|
|
107
|
+
remediationShouldEdit: z.ZodOptional<z.ZodBoolean>;
|
|
108
|
+
remediationGuidance: z.ZodOptional<z.ZodString>;
|
|
56
109
|
createdAt: z.ZodString;
|
|
57
110
|
}, "strip", z.ZodTypeAny, {
|
|
111
|
+
createdAt: string;
|
|
58
112
|
attempt: number;
|
|
59
113
|
action: "build" | "verify" | "rebuild" | "patch";
|
|
60
|
-
result: "
|
|
114
|
+
result: "success" | "blocked" | "failure";
|
|
61
115
|
workItemId: string;
|
|
62
116
|
phase: "building" | "verifying" | "repairing" | "done" | "blocked";
|
|
63
|
-
|
|
117
|
+
workflowId?: string | undefined;
|
|
64
118
|
diagnosis?: string | undefined;
|
|
65
119
|
fixApplied?: string | undefined;
|
|
66
|
-
workflowId?: string | undefined;
|
|
67
120
|
executionId?: string | undefined;
|
|
68
121
|
failureSignature?: string | undefined;
|
|
122
|
+
remediationCategory?: "blocked" | "code_fixable" | "needs_setup" | undefined;
|
|
123
|
+
remediationShouldEdit?: boolean | undefined;
|
|
124
|
+
remediationGuidance?: string | undefined;
|
|
69
125
|
}, {
|
|
126
|
+
createdAt: string;
|
|
70
127
|
attempt: number;
|
|
71
128
|
action: "build" | "verify" | "rebuild" | "patch";
|
|
72
|
-
result: "
|
|
129
|
+
result: "success" | "blocked" | "failure";
|
|
73
130
|
workItemId: string;
|
|
74
131
|
phase: "building" | "verifying" | "repairing" | "done" | "blocked";
|
|
75
|
-
|
|
132
|
+
workflowId?: string | undefined;
|
|
76
133
|
diagnosis?: string | undefined;
|
|
77
134
|
fixApplied?: string | undefined;
|
|
78
|
-
workflowId?: string | undefined;
|
|
79
135
|
executionId?: string | undefined;
|
|
80
136
|
failureSignature?: string | undefined;
|
|
137
|
+
remediationCategory?: "blocked" | "code_fixable" | "needs_setup" | undefined;
|
|
138
|
+
remediationShouldEdit?: boolean | undefined;
|
|
139
|
+
remediationGuidance?: string | undefined;
|
|
81
140
|
}>, "many">;
|
|
82
141
|
lastBuildOutcome: z.ZodOptional<z.ZodObject<{
|
|
83
142
|
workItemId: z.ZodString;
|
|
143
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
84
144
|
taskId: z.ZodString;
|
|
85
145
|
workflowId: z.ZodOptional<z.ZodString>;
|
|
86
146
|
submitted: z.ZodBoolean;
|
|
87
147
|
triggerType: z.ZodEnum<["manual_or_testable", "trigger_only"]>;
|
|
148
|
+
triggerNodes: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
149
|
+
nodeName: z.ZodString;
|
|
150
|
+
nodeType: z.ZodString;
|
|
151
|
+
}, "strip", z.ZodTypeAny, {
|
|
152
|
+
nodeName: string;
|
|
153
|
+
nodeType: string;
|
|
154
|
+
}, {
|
|
155
|
+
nodeName: string;
|
|
156
|
+
nodeType: string;
|
|
157
|
+
}>, "many">>;
|
|
88
158
|
needsUserInput: z.ZodBoolean;
|
|
89
159
|
blockingReason: z.ZodOptional<z.ZodString>;
|
|
90
160
|
failureSignature: z.ZodOptional<z.ZodString>;
|
|
@@ -92,7 +162,137 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
92
162
|
mockedCredentialTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
93
163
|
mockedCredentialsByNode: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
|
|
94
164
|
verificationPinData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodRecord<z.ZodString, z.ZodUnknown>, "many">>>;
|
|
165
|
+
usesWorkflowPinDataForVerification: z.ZodOptional<z.ZodBoolean>;
|
|
166
|
+
supportingWorkflowIds: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
95
167
|
hasUnresolvedPlaceholders: z.ZodOptional<z.ZodBoolean>;
|
|
168
|
+
verificationReadiness: z.ZodOptional<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
|
|
169
|
+
status: z.ZodLiteral<"ready">;
|
|
170
|
+
}, "strip", z.ZodTypeAny, {
|
|
171
|
+
status: "ready";
|
|
172
|
+
}, {
|
|
173
|
+
status: "ready";
|
|
174
|
+
}>, z.ZodObject<{
|
|
175
|
+
status: z.ZodLiteral<"already_verified">;
|
|
176
|
+
}, "strip", z.ZodTypeAny, {
|
|
177
|
+
status: "already_verified";
|
|
178
|
+
}, {
|
|
179
|
+
status: "already_verified";
|
|
180
|
+
}>, z.ZodObject<{
|
|
181
|
+
status: z.ZodLiteral<"needs_setup">;
|
|
182
|
+
reason: z.ZodEnum<["unresolved-placeholders", "missing-mocked-credential-pin-data", "workflow-needs-setup"]>;
|
|
183
|
+
guidance: z.ZodString;
|
|
184
|
+
}, "strip", z.ZodTypeAny, {
|
|
185
|
+
status: "needs_setup";
|
|
186
|
+
reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
|
|
187
|
+
guidance: string;
|
|
188
|
+
}, {
|
|
189
|
+
status: "needs_setup";
|
|
190
|
+
reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
|
|
191
|
+
guidance: string;
|
|
192
|
+
}>, z.ZodObject<{
|
|
193
|
+
status: z.ZodLiteral<"not_verifiable">;
|
|
194
|
+
reason: z.ZodEnum<["not-submitted", "missing-workflow-id", "non-mockable-trigger"]>;
|
|
195
|
+
guidance: z.ZodString;
|
|
196
|
+
}, "strip", z.ZodTypeAny, {
|
|
197
|
+
status: "not_verifiable";
|
|
198
|
+
reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
|
|
199
|
+
guidance: string;
|
|
200
|
+
}, {
|
|
201
|
+
status: "not_verifiable";
|
|
202
|
+
reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
|
|
203
|
+
guidance: string;
|
|
204
|
+
}>]>>;
|
|
205
|
+
setupRequirement: z.ZodOptional<z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
|
|
206
|
+
status: z.ZodLiteral<"not_required">;
|
|
207
|
+
}, "strip", z.ZodTypeAny, {
|
|
208
|
+
status: "not_required";
|
|
209
|
+
}, {
|
|
210
|
+
status: "not_required";
|
|
211
|
+
}>, z.ZodObject<{
|
|
212
|
+
status: z.ZodLiteral<"required">;
|
|
213
|
+
reason: z.ZodEnum<["mocked-credentials", "unresolved-placeholders", "workflow-needs-setup"]>;
|
|
214
|
+
guidance: z.ZodString;
|
|
215
|
+
}, "strip", z.ZodTypeAny, {
|
|
216
|
+
status: "required";
|
|
217
|
+
reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
|
|
218
|
+
guidance: string;
|
|
219
|
+
}, {
|
|
220
|
+
status: "required";
|
|
221
|
+
reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
|
|
222
|
+
guidance: string;
|
|
223
|
+
}>]>>;
|
|
224
|
+
remediation: z.ZodOptional<z.ZodObject<{
|
|
225
|
+
category: z.ZodEnum<["code_fixable", "needs_setup", "blocked"]>;
|
|
226
|
+
shouldEdit: z.ZodBoolean;
|
|
227
|
+
guidance: z.ZodString;
|
|
228
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
229
|
+
remainingSubmitFixes: z.ZodOptional<z.ZodNumber>;
|
|
230
|
+
attemptCount: z.ZodOptional<z.ZodNumber>;
|
|
231
|
+
}, "strip", z.ZodTypeAny, {
|
|
232
|
+
category: "blocked" | "code_fixable" | "needs_setup";
|
|
233
|
+
shouldEdit: boolean;
|
|
234
|
+
guidance: string;
|
|
235
|
+
reason?: string | undefined;
|
|
236
|
+
remainingSubmitFixes?: number | undefined;
|
|
237
|
+
attemptCount?: number | undefined;
|
|
238
|
+
}, {
|
|
239
|
+
category: "blocked" | "code_fixable" | "needs_setup";
|
|
240
|
+
shouldEdit: boolean;
|
|
241
|
+
guidance: string;
|
|
242
|
+
reason?: string | undefined;
|
|
243
|
+
remainingSubmitFixes?: number | undefined;
|
|
244
|
+
attemptCount?: number | undefined;
|
|
245
|
+
}>>;
|
|
246
|
+
verification: z.ZodOptional<z.ZodObject<{
|
|
247
|
+
attempted: z.ZodBoolean;
|
|
248
|
+
success: z.ZodBoolean;
|
|
249
|
+
executionId: z.ZodOptional<z.ZodString>;
|
|
250
|
+
status: z.ZodOptional<z.ZodEnum<["success", "error", "waiting", "running", "unknown"]>>;
|
|
251
|
+
failureSignature: z.ZodOptional<z.ZodString>;
|
|
252
|
+
evidence: z.ZodOptional<z.ZodObject<{
|
|
253
|
+
nodesExecuted: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
254
|
+
producedOutputRows: z.ZodOptional<z.ZodNumber>;
|
|
255
|
+
errorNodeName: z.ZodOptional<z.ZodString>;
|
|
256
|
+
errorMessage: z.ZodOptional<z.ZodString>;
|
|
257
|
+
}, "strip", z.ZodTypeAny, {
|
|
258
|
+
nodesExecuted?: string[] | undefined;
|
|
259
|
+
producedOutputRows?: number | undefined;
|
|
260
|
+
errorNodeName?: string | undefined;
|
|
261
|
+
errorMessage?: string | undefined;
|
|
262
|
+
}, {
|
|
263
|
+
nodesExecuted?: string[] | undefined;
|
|
264
|
+
producedOutputRows?: number | undefined;
|
|
265
|
+
errorNodeName?: string | undefined;
|
|
266
|
+
errorMessage?: string | undefined;
|
|
267
|
+
}>>;
|
|
268
|
+
verifiedAt: z.ZodOptional<z.ZodString>;
|
|
269
|
+
}, "strip", z.ZodTypeAny, {
|
|
270
|
+
success: boolean;
|
|
271
|
+
attempted: boolean;
|
|
272
|
+
status?: "unknown" | "running" | "error" | "success" | "waiting" | undefined;
|
|
273
|
+
executionId?: string | undefined;
|
|
274
|
+
failureSignature?: string | undefined;
|
|
275
|
+
evidence?: {
|
|
276
|
+
nodesExecuted?: string[] | undefined;
|
|
277
|
+
producedOutputRows?: number | undefined;
|
|
278
|
+
errorNodeName?: string | undefined;
|
|
279
|
+
errorMessage?: string | undefined;
|
|
280
|
+
} | undefined;
|
|
281
|
+
verifiedAt?: string | undefined;
|
|
282
|
+
}, {
|
|
283
|
+
success: boolean;
|
|
284
|
+
attempted: boolean;
|
|
285
|
+
status?: "unknown" | "running" | "error" | "success" | "waiting" | undefined;
|
|
286
|
+
executionId?: string | undefined;
|
|
287
|
+
failureSignature?: string | undefined;
|
|
288
|
+
evidence?: {
|
|
289
|
+
nodesExecuted?: string[] | undefined;
|
|
290
|
+
producedOutputRows?: number | undefined;
|
|
291
|
+
errorNodeName?: string | undefined;
|
|
292
|
+
errorMessage?: string | undefined;
|
|
293
|
+
} | undefined;
|
|
294
|
+
verifiedAt?: string | undefined;
|
|
295
|
+
}>>;
|
|
96
296
|
summary: z.ZodString;
|
|
97
297
|
}, "strip", z.ZodTypeAny, {
|
|
98
298
|
workItemId: string;
|
|
@@ -102,13 +302,62 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
102
302
|
needsUserInput: boolean;
|
|
103
303
|
summary: string;
|
|
104
304
|
workflowId?: string | undefined;
|
|
305
|
+
runId?: string | undefined;
|
|
105
306
|
mockedCredentialTypes?: string[] | undefined;
|
|
106
307
|
hasUnresolvedPlaceholders?: boolean | undefined;
|
|
107
308
|
failureSignature?: string | undefined;
|
|
309
|
+
triggerNodes?: {
|
|
310
|
+
nodeName: string;
|
|
311
|
+
nodeType: string;
|
|
312
|
+
}[] | undefined;
|
|
108
313
|
blockingReason?: string | undefined;
|
|
109
314
|
mockedNodeNames?: string[] | undefined;
|
|
110
315
|
mockedCredentialsByNode?: Record<string, string[]> | undefined;
|
|
111
316
|
verificationPinData?: Record<string, Record<string, unknown>[]> | undefined;
|
|
317
|
+
usesWorkflowPinDataForVerification?: boolean | undefined;
|
|
318
|
+
supportingWorkflowIds?: string[] | undefined;
|
|
319
|
+
verificationReadiness?: {
|
|
320
|
+
status: "ready";
|
|
321
|
+
} | {
|
|
322
|
+
status: "already_verified";
|
|
323
|
+
} | {
|
|
324
|
+
status: "needs_setup";
|
|
325
|
+
reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
|
|
326
|
+
guidance: string;
|
|
327
|
+
} | {
|
|
328
|
+
status: "not_verifiable";
|
|
329
|
+
reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
|
|
330
|
+
guidance: string;
|
|
331
|
+
} | undefined;
|
|
332
|
+
setupRequirement?: {
|
|
333
|
+
status: "not_required";
|
|
334
|
+
} | {
|
|
335
|
+
status: "required";
|
|
336
|
+
reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
|
|
337
|
+
guidance: string;
|
|
338
|
+
} | undefined;
|
|
339
|
+
remediation?: {
|
|
340
|
+
category: "blocked" | "code_fixable" | "needs_setup";
|
|
341
|
+
shouldEdit: boolean;
|
|
342
|
+
guidance: string;
|
|
343
|
+
reason?: string | undefined;
|
|
344
|
+
remainingSubmitFixes?: number | undefined;
|
|
345
|
+
attemptCount?: number | undefined;
|
|
346
|
+
} | undefined;
|
|
347
|
+
verification?: {
|
|
348
|
+
success: boolean;
|
|
349
|
+
attempted: boolean;
|
|
350
|
+
status?: "unknown" | "running" | "error" | "success" | "waiting" | undefined;
|
|
351
|
+
executionId?: string | undefined;
|
|
352
|
+
failureSignature?: string | undefined;
|
|
353
|
+
evidence?: {
|
|
354
|
+
nodesExecuted?: string[] | undefined;
|
|
355
|
+
producedOutputRows?: number | undefined;
|
|
356
|
+
errorNodeName?: string | undefined;
|
|
357
|
+
errorMessage?: string | undefined;
|
|
358
|
+
} | undefined;
|
|
359
|
+
verifiedAt?: string | undefined;
|
|
360
|
+
} | undefined;
|
|
112
361
|
}, {
|
|
113
362
|
workItemId: string;
|
|
114
363
|
taskId: string;
|
|
@@ -117,41 +366,105 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
117
366
|
needsUserInput: boolean;
|
|
118
367
|
summary: string;
|
|
119
368
|
workflowId?: string | undefined;
|
|
369
|
+
runId?: string | undefined;
|
|
120
370
|
mockedCredentialTypes?: string[] | undefined;
|
|
121
371
|
hasUnresolvedPlaceholders?: boolean | undefined;
|
|
122
372
|
failureSignature?: string | undefined;
|
|
373
|
+
triggerNodes?: {
|
|
374
|
+
nodeName: string;
|
|
375
|
+
nodeType: string;
|
|
376
|
+
}[] | undefined;
|
|
123
377
|
blockingReason?: string | undefined;
|
|
124
378
|
mockedNodeNames?: string[] | undefined;
|
|
125
379
|
mockedCredentialsByNode?: Record<string, string[]> | undefined;
|
|
126
380
|
verificationPinData?: Record<string, Record<string, unknown>[]> | undefined;
|
|
381
|
+
usesWorkflowPinDataForVerification?: boolean | undefined;
|
|
382
|
+
supportingWorkflowIds?: string[] | undefined;
|
|
383
|
+
verificationReadiness?: {
|
|
384
|
+
status: "ready";
|
|
385
|
+
} | {
|
|
386
|
+
status: "already_verified";
|
|
387
|
+
} | {
|
|
388
|
+
status: "needs_setup";
|
|
389
|
+
reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
|
|
390
|
+
guidance: string;
|
|
391
|
+
} | {
|
|
392
|
+
status: "not_verifiable";
|
|
393
|
+
reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
|
|
394
|
+
guidance: string;
|
|
395
|
+
} | undefined;
|
|
396
|
+
setupRequirement?: {
|
|
397
|
+
status: "not_required";
|
|
398
|
+
} | {
|
|
399
|
+
status: "required";
|
|
400
|
+
reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
|
|
401
|
+
guidance: string;
|
|
402
|
+
} | undefined;
|
|
403
|
+
remediation?: {
|
|
404
|
+
category: "blocked" | "code_fixable" | "needs_setup";
|
|
405
|
+
shouldEdit: boolean;
|
|
406
|
+
guidance: string;
|
|
407
|
+
reason?: string | undefined;
|
|
408
|
+
remainingSubmitFixes?: number | undefined;
|
|
409
|
+
attemptCount?: number | undefined;
|
|
410
|
+
} | undefined;
|
|
411
|
+
verification?: {
|
|
412
|
+
success: boolean;
|
|
413
|
+
attempted: boolean;
|
|
414
|
+
status?: "unknown" | "running" | "error" | "success" | "waiting" | undefined;
|
|
415
|
+
executionId?: string | undefined;
|
|
416
|
+
failureSignature?: string | undefined;
|
|
417
|
+
evidence?: {
|
|
418
|
+
nodesExecuted?: string[] | undefined;
|
|
419
|
+
producedOutputRows?: number | undefined;
|
|
420
|
+
errorNodeName?: string | undefined;
|
|
421
|
+
errorMessage?: string | undefined;
|
|
422
|
+
} | undefined;
|
|
423
|
+
verifiedAt?: string | undefined;
|
|
424
|
+
} | undefined;
|
|
127
425
|
}>>;
|
|
128
426
|
}, "strip", z.ZodTypeAny, {
|
|
129
427
|
state: {
|
|
130
428
|
status: "blocked" | "active" | "completed";
|
|
429
|
+
source: "create" | "modify";
|
|
131
430
|
workItemId: string;
|
|
132
431
|
threadId: string;
|
|
133
432
|
phase: "building" | "verifying" | "repairing" | "done" | "blocked";
|
|
134
|
-
source: "create" | "modify";
|
|
135
433
|
rebuildAttempts: number;
|
|
136
434
|
workflowId?: string | undefined;
|
|
435
|
+
runId?: string | undefined;
|
|
137
436
|
lastTaskId?: string | undefined;
|
|
138
437
|
lastExecutionId?: string | undefined;
|
|
139
438
|
lastFailureSignature?: string | undefined;
|
|
140
439
|
mockedCredentialTypes?: string[] | undefined;
|
|
141
440
|
hasUnresolvedPlaceholders?: boolean | undefined;
|
|
441
|
+
successfulSubmitSeen?: boolean | undefined;
|
|
442
|
+
preSaveSubmitFailures?: number | undefined;
|
|
443
|
+
postSubmitRemediationSubmitsUsed?: number | undefined;
|
|
444
|
+
lastRemediation?: {
|
|
445
|
+
category: "blocked" | "code_fixable" | "needs_setup";
|
|
446
|
+
shouldEdit: boolean;
|
|
447
|
+
guidance: string;
|
|
448
|
+
reason?: string | undefined;
|
|
449
|
+
remainingSubmitFixes?: number | undefined;
|
|
450
|
+
attemptCount?: number | undefined;
|
|
451
|
+
} | undefined;
|
|
142
452
|
};
|
|
143
453
|
attempts: {
|
|
454
|
+
createdAt: string;
|
|
144
455
|
attempt: number;
|
|
145
456
|
action: "build" | "verify" | "rebuild" | "patch";
|
|
146
|
-
result: "
|
|
457
|
+
result: "success" | "blocked" | "failure";
|
|
147
458
|
workItemId: string;
|
|
148
459
|
phase: "building" | "verifying" | "repairing" | "done" | "blocked";
|
|
149
|
-
|
|
460
|
+
workflowId?: string | undefined;
|
|
150
461
|
diagnosis?: string | undefined;
|
|
151
462
|
fixApplied?: string | undefined;
|
|
152
|
-
workflowId?: string | undefined;
|
|
153
463
|
executionId?: string | undefined;
|
|
154
464
|
failureSignature?: string | undefined;
|
|
465
|
+
remediationCategory?: "blocked" | "code_fixable" | "needs_setup" | undefined;
|
|
466
|
+
remediationShouldEdit?: boolean | undefined;
|
|
467
|
+
remediationGuidance?: string | undefined;
|
|
155
468
|
}[];
|
|
156
469
|
lastBuildOutcome?: {
|
|
157
470
|
workItemId: string;
|
|
@@ -161,41 +474,105 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
161
474
|
needsUserInput: boolean;
|
|
162
475
|
summary: string;
|
|
163
476
|
workflowId?: string | undefined;
|
|
477
|
+
runId?: string | undefined;
|
|
164
478
|
mockedCredentialTypes?: string[] | undefined;
|
|
165
479
|
hasUnresolvedPlaceholders?: boolean | undefined;
|
|
166
480
|
failureSignature?: string | undefined;
|
|
481
|
+
triggerNodes?: {
|
|
482
|
+
nodeName: string;
|
|
483
|
+
nodeType: string;
|
|
484
|
+
}[] | undefined;
|
|
167
485
|
blockingReason?: string | undefined;
|
|
168
486
|
mockedNodeNames?: string[] | undefined;
|
|
169
487
|
mockedCredentialsByNode?: Record<string, string[]> | undefined;
|
|
170
488
|
verificationPinData?: Record<string, Record<string, unknown>[]> | undefined;
|
|
489
|
+
usesWorkflowPinDataForVerification?: boolean | undefined;
|
|
490
|
+
supportingWorkflowIds?: string[] | undefined;
|
|
491
|
+
verificationReadiness?: {
|
|
492
|
+
status: "ready";
|
|
493
|
+
} | {
|
|
494
|
+
status: "already_verified";
|
|
495
|
+
} | {
|
|
496
|
+
status: "needs_setup";
|
|
497
|
+
reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
|
|
498
|
+
guidance: string;
|
|
499
|
+
} | {
|
|
500
|
+
status: "not_verifiable";
|
|
501
|
+
reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
|
|
502
|
+
guidance: string;
|
|
503
|
+
} | undefined;
|
|
504
|
+
setupRequirement?: {
|
|
505
|
+
status: "not_required";
|
|
506
|
+
} | {
|
|
507
|
+
status: "required";
|
|
508
|
+
reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
|
|
509
|
+
guidance: string;
|
|
510
|
+
} | undefined;
|
|
511
|
+
remediation?: {
|
|
512
|
+
category: "blocked" | "code_fixable" | "needs_setup";
|
|
513
|
+
shouldEdit: boolean;
|
|
514
|
+
guidance: string;
|
|
515
|
+
reason?: string | undefined;
|
|
516
|
+
remainingSubmitFixes?: number | undefined;
|
|
517
|
+
attemptCount?: number | undefined;
|
|
518
|
+
} | undefined;
|
|
519
|
+
verification?: {
|
|
520
|
+
success: boolean;
|
|
521
|
+
attempted: boolean;
|
|
522
|
+
status?: "unknown" | "running" | "error" | "success" | "waiting" | undefined;
|
|
523
|
+
executionId?: string | undefined;
|
|
524
|
+
failureSignature?: string | undefined;
|
|
525
|
+
evidence?: {
|
|
526
|
+
nodesExecuted?: string[] | undefined;
|
|
527
|
+
producedOutputRows?: number | undefined;
|
|
528
|
+
errorNodeName?: string | undefined;
|
|
529
|
+
errorMessage?: string | undefined;
|
|
530
|
+
} | undefined;
|
|
531
|
+
verifiedAt?: string | undefined;
|
|
532
|
+
} | undefined;
|
|
171
533
|
} | undefined;
|
|
172
534
|
}, {
|
|
173
535
|
state: {
|
|
174
536
|
status: "blocked" | "active" | "completed";
|
|
537
|
+
source: "create" | "modify";
|
|
175
538
|
workItemId: string;
|
|
176
539
|
threadId: string;
|
|
177
540
|
phase: "building" | "verifying" | "repairing" | "done" | "blocked";
|
|
178
|
-
source: "create" | "modify";
|
|
179
541
|
rebuildAttempts: number;
|
|
180
542
|
workflowId?: string | undefined;
|
|
543
|
+
runId?: string | undefined;
|
|
181
544
|
lastTaskId?: string | undefined;
|
|
182
545
|
lastExecutionId?: string | undefined;
|
|
183
546
|
lastFailureSignature?: string | undefined;
|
|
184
547
|
mockedCredentialTypes?: string[] | undefined;
|
|
185
548
|
hasUnresolvedPlaceholders?: boolean | undefined;
|
|
549
|
+
successfulSubmitSeen?: boolean | undefined;
|
|
550
|
+
preSaveSubmitFailures?: number | undefined;
|
|
551
|
+
postSubmitRemediationSubmitsUsed?: number | undefined;
|
|
552
|
+
lastRemediation?: {
|
|
553
|
+
category: "blocked" | "code_fixable" | "needs_setup";
|
|
554
|
+
shouldEdit: boolean;
|
|
555
|
+
guidance: string;
|
|
556
|
+
reason?: string | undefined;
|
|
557
|
+
remainingSubmitFixes?: number | undefined;
|
|
558
|
+
attemptCount?: number | undefined;
|
|
559
|
+
} | undefined;
|
|
186
560
|
};
|
|
187
561
|
attempts: {
|
|
562
|
+
createdAt: string;
|
|
188
563
|
attempt: number;
|
|
189
564
|
action: "build" | "verify" | "rebuild" | "patch";
|
|
190
|
-
result: "
|
|
565
|
+
result: "success" | "blocked" | "failure";
|
|
191
566
|
workItemId: string;
|
|
192
567
|
phase: "building" | "verifying" | "repairing" | "done" | "blocked";
|
|
193
|
-
|
|
568
|
+
workflowId?: string | undefined;
|
|
194
569
|
diagnosis?: string | undefined;
|
|
195
570
|
fixApplied?: string | undefined;
|
|
196
|
-
workflowId?: string | undefined;
|
|
197
571
|
executionId?: string | undefined;
|
|
198
572
|
failureSignature?: string | undefined;
|
|
573
|
+
remediationCategory?: "blocked" | "code_fixable" | "needs_setup" | undefined;
|
|
574
|
+
remediationShouldEdit?: boolean | undefined;
|
|
575
|
+
remediationGuidance?: string | undefined;
|
|
199
576
|
}[];
|
|
200
577
|
lastBuildOutcome?: {
|
|
201
578
|
workItemId: string;
|
|
@@ -205,13 +582,62 @@ declare const workItemRecordSchema: z.ZodObject<{
|
|
|
205
582
|
needsUserInput: boolean;
|
|
206
583
|
summary: string;
|
|
207
584
|
workflowId?: string | undefined;
|
|
585
|
+
runId?: string | undefined;
|
|
208
586
|
mockedCredentialTypes?: string[] | undefined;
|
|
209
587
|
hasUnresolvedPlaceholders?: boolean | undefined;
|
|
210
588
|
failureSignature?: string | undefined;
|
|
589
|
+
triggerNodes?: {
|
|
590
|
+
nodeName: string;
|
|
591
|
+
nodeType: string;
|
|
592
|
+
}[] | undefined;
|
|
211
593
|
blockingReason?: string | undefined;
|
|
212
594
|
mockedNodeNames?: string[] | undefined;
|
|
213
595
|
mockedCredentialsByNode?: Record<string, string[]> | undefined;
|
|
214
596
|
verificationPinData?: Record<string, Record<string, unknown>[]> | undefined;
|
|
597
|
+
usesWorkflowPinDataForVerification?: boolean | undefined;
|
|
598
|
+
supportingWorkflowIds?: string[] | undefined;
|
|
599
|
+
verificationReadiness?: {
|
|
600
|
+
status: "ready";
|
|
601
|
+
} | {
|
|
602
|
+
status: "already_verified";
|
|
603
|
+
} | {
|
|
604
|
+
status: "needs_setup";
|
|
605
|
+
reason: "unresolved-placeholders" | "missing-mocked-credential-pin-data" | "workflow-needs-setup";
|
|
606
|
+
guidance: string;
|
|
607
|
+
} | {
|
|
608
|
+
status: "not_verifiable";
|
|
609
|
+
reason: "not-submitted" | "missing-workflow-id" | "non-mockable-trigger";
|
|
610
|
+
guidance: string;
|
|
611
|
+
} | undefined;
|
|
612
|
+
setupRequirement?: {
|
|
613
|
+
status: "not_required";
|
|
614
|
+
} | {
|
|
615
|
+
status: "required";
|
|
616
|
+
reason: "unresolved-placeholders" | "workflow-needs-setup" | "mocked-credentials";
|
|
617
|
+
guidance: string;
|
|
618
|
+
} | undefined;
|
|
619
|
+
remediation?: {
|
|
620
|
+
category: "blocked" | "code_fixable" | "needs_setup";
|
|
621
|
+
shouldEdit: boolean;
|
|
622
|
+
guidance: string;
|
|
623
|
+
reason?: string | undefined;
|
|
624
|
+
remainingSubmitFixes?: number | undefined;
|
|
625
|
+
attemptCount?: number | undefined;
|
|
626
|
+
} | undefined;
|
|
627
|
+
verification?: {
|
|
628
|
+
success: boolean;
|
|
629
|
+
attempted: boolean;
|
|
630
|
+
status?: "unknown" | "running" | "error" | "success" | "waiting" | undefined;
|
|
631
|
+
executionId?: string | undefined;
|
|
632
|
+
failureSignature?: string | undefined;
|
|
633
|
+
evidence?: {
|
|
634
|
+
nodesExecuted?: string[] | undefined;
|
|
635
|
+
producedOutputRows?: number | undefined;
|
|
636
|
+
errorNodeName?: string | undefined;
|
|
637
|
+
errorMessage?: string | undefined;
|
|
638
|
+
} | undefined;
|
|
639
|
+
verifiedAt?: string | undefined;
|
|
640
|
+
} | undefined;
|
|
215
641
|
} | undefined;
|
|
216
642
|
}>;
|
|
217
643
|
export type WorkflowLoopWorkItemRecord = z.infer<typeof workItemRecordSchema>;
|
|
@@ -17,8 +17,10 @@ export interface ConsumeWithHitlOptions {
|
|
|
17
17
|
waitForConfirmation?: (requestId: string) => Promise<Record<string, unknown>>;
|
|
18
18
|
drainCorrections?: () => string[];
|
|
19
19
|
waitForCorrection?: () => Promise<void>;
|
|
20
|
+
onActivity?: () => void;
|
|
20
21
|
llmStepTraceHooks?: LlmStepTraceHooks;
|
|
21
22
|
maxSteps?: number;
|
|
23
|
+
resumeOptions?: Record<string, unknown>;
|
|
22
24
|
}
|
|
23
25
|
export interface ConsumeWithHitlResult {
|
|
24
26
|
text: Promise<string>;
|
|
@@ -16,6 +16,7 @@ async function consumeStreamWithHitl(options) {
|
|
|
16
16
|
eventBus: options.eventBus,
|
|
17
17
|
signal: options.abortSignal,
|
|
18
18
|
logger: options.logger,
|
|
19
|
+
onActivity: options.onActivity,
|
|
19
20
|
},
|
|
20
21
|
control: {
|
|
21
22
|
mode: 'auto',
|
|
@@ -28,6 +29,7 @@ async function consumeStreamWithHitl(options) {
|
|
|
28
29
|
runId: mastraRunId,
|
|
29
30
|
toolCallId: suspension.toolCallId,
|
|
30
31
|
maxSteps: options.maxSteps,
|
|
32
|
+
...(options.resumeOptions ?? {}),
|
|
31
33
|
}),
|
|
32
34
|
}
|
|
33
35
|
: {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consume-with-hitl.js","sourceRoot":"","sources":["../../src/stream/consume-with-hitl.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"consume-with-hitl.js","sourceRoot":"","sources":["../../src/stream/consume-with-hitl.ts"],"names":[],"mappings":";;AAiDA,sDAuCC;AApFD,oFAI8C;AAyCvC,KAAK,UAAU,qBAAqB,CAC1C,OAA+B;IAE/B,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,CAAC;QAClC,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;IAC1F,CAAC;IAED,MAAM,MAAM,GAAG,MAAM,IAAA,kDAAsB,EAAC;QAC3C,KAAK,EAAE,OAAO,CAAC,KAAK;QACpB,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,OAAO,EAAE;YACR,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,KAAK,EAAE,OAAO,CAAC,KAAK;YACpB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,QAAQ,EAAE,OAAO,CAAC,QAAQ;YAC1B,MAAM,EAAE,OAAO,CAAC,WAAW;YAC3B,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,UAAU,EAAE,OAAO,CAAC,UAAU;SAC9B;QACD,OAAO,EAAE;YACR,IAAI,EAAE,MAAM;YACZ,mBAAmB,EAAE,OAAO,CAAC,mBAAmB;YAChD,gBAAgB,EAAE,OAAO,CAAC,gBAAgB;YAC1C,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;YAC5C,GAAG,CAAC,OAAO,CAAC,QAAQ;gBACnB,CAAC,CAAC;oBACA,kBAAkB,EAAE,CAAC,EAAE,WAAW,EAAE,UAAU,EAAE,EAAE,EAAE,CAAC,CAAC;wBACrD,KAAK,EAAE,WAAW;wBAClB,UAAU,EAAE,UAAU,CAAC,UAAU;wBACjC,QAAQ,EAAE,OAAO,CAAC,QAAQ;wBAC1B,GAAG,CAAC,OAAO,CAAC,aAAa,IAAI,EAAE,CAAC;qBAChC,CAAC;iBACF;gBACF,CAAC,CAAC,EAAE,CAAC;SACN;QACD,iBAAiB,EAAE,OAAO,CAAC,iBAAiB;KAC5C,CAAC,CAAC;IAEH,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,CAAC,WAAW,EAAE,CAAC;AACtF,CAAC"}
|