@ekairos/dataset 1.22.85-beta.development.0 → 1.22.87-beta.development.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/builder/context.d.ts +8 -0
- package/dist/builder/context.js +68 -9
- package/dist/builder/instructions.js +3 -2
- package/dist/builder/materialize.js +11 -25
- package/dist/builder/types.d.ts +2 -1
- package/dist/completeDataset.steps.d.ts +29 -0
- package/dist/completeDataset.steps.js +32 -1
- package/dist/completeDataset.tool.d.ts +41 -0
- package/dist/completeDataset.tool.js +6 -3
- package/dist/contextResources.d.ts +31 -0
- package/dist/contextResources.js +151 -0
- package/dist/contextWorkspace.d.ts +7 -0
- package/dist/contextWorkspace.js +17 -1
- package/dist/dataset/steps.js +12 -0
- package/dist/dataset.js +1 -0
- package/dist/executeCommand.tool.d.ts +1 -4
- package/dist/executeCommand.tool.js +113 -31
- package/dist/sandbox/steps.js +4 -2
- package/dist/service.d.ts +4 -0
- package/dist/service.js +59 -2
- package/dist/transform/prompts.js +37 -21
- package/dist/transform/transform-dataset.agent.d.ts +1 -0
- package/dist/transform/transform-dataset.agent.js +25 -25
- package/dist/transform/transform-dataset.types.d.ts +4 -1
- package/dist/writeDatasetRows.tool.d.ts +188 -0
- package/dist/writeDatasetRows.tool.js +258 -0
- package/package.json +4 -4
|
@@ -2,14 +2,14 @@ import { create } from "xmlbuilder2";
|
|
|
2
2
|
function buildRole() {
|
|
3
3
|
let xml = create()
|
|
4
4
|
.ele("Role")
|
|
5
|
-
.txt("You are a dataset transformer. Your goal is to read one or more
|
|
5
|
+
.txt("You are a dataset transformer. Your goal is to read one or more input datasets/resources and produce a NEW dataset whose records conform exactly to the provided output schema.")
|
|
6
6
|
.up();
|
|
7
7
|
return xml.end({ prettyPrint: true, headless: true });
|
|
8
8
|
}
|
|
9
9
|
function buildGoal() {
|
|
10
10
|
let xml = create()
|
|
11
11
|
.ele("Goal")
|
|
12
|
-
.txt("Transform the input dataset(s)
|
|
12
|
+
.txt("Transform the input dataset(s) into a new dataset strictly matching the output schema. Use the lowest-cost direct completion tool that can produce the correct output. Use sandbox command execution only when commands are necessary to inspect, parse, aggregate, join, or compute over files/resources that cannot be handled directly from the visible context and previews.")
|
|
13
13
|
.up();
|
|
14
14
|
return xml.end({ prettyPrint: true, headless: true });
|
|
15
15
|
}
|
|
@@ -17,19 +17,25 @@ function buildContextSection(context) {
|
|
|
17
17
|
let xml = create()
|
|
18
18
|
.ele("Context")
|
|
19
19
|
.ele("DatasetId").txt(context.datasetId).up();
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
20
|
+
if (context.contextResources && context.contextResources.length > 0) {
|
|
21
|
+
let resourcesXml = create().ele("ContextResources");
|
|
22
|
+
for (const resource of context.contextResources) {
|
|
23
|
+
resourcesXml = resourcesXml
|
|
24
|
+
.ele("Resource")
|
|
25
|
+
.ele("Key").txt(String(resource.key)).up()
|
|
26
|
+
.ele("Type").txt(String(resource.type)).up()
|
|
27
|
+
.ele("Name").txt(String(resource.name)).up()
|
|
28
|
+
.ele("Description").txt(String(resource.description)).up()
|
|
29
|
+
.ele("DescriptorJson").txt(JSON.stringify(resource, null, 2)).up()
|
|
30
|
+
.up();
|
|
31
|
+
}
|
|
32
|
+
xml = xml.import(resourcesXml.first());
|
|
23
33
|
}
|
|
24
|
-
xml = xml.import(inputsXml.first());
|
|
25
34
|
let sandboxXml = create().ele("Sandbox");
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
.ele("DatasetId").txt(inputPathInfo.datasetId).up()
|
|
29
|
-
.ele("Path").txt(inputPathInfo.path).up()
|
|
30
|
-
.up();
|
|
31
|
-
}
|
|
35
|
+
sandboxXml = sandboxXml.ele("ContextResourcesPath").txt("/tmp/ekairos/contexts/{contextId}/resources").up();
|
|
36
|
+
sandboxXml = sandboxXml.ele("ResourcesManifest").txt("/tmp/ekairos/contexts/{contextId}/resources/manifest.json").up();
|
|
32
37
|
sandboxXml = sandboxXml.ele("OutputPath").txt(context.sandboxConfig.outputPath).up();
|
|
38
|
+
sandboxXml = sandboxXml.ele("Note").txt("Context resources are materialized lazily only when executeCommand is called. Do not assume resource files exist unless you are using executeCommand. If executeCommand is used, read the manifest path from os.environ['EKAIROS_CONTEXT_RESOURCES_MANIFEST'] inside Python.").up();
|
|
33
39
|
xml = xml.import(sandboxXml.first());
|
|
34
40
|
if (context.inputPreviews && context.inputPreviews.length > 0) {
|
|
35
41
|
let previewsXml = create().ele("InputPreviews");
|
|
@@ -86,38 +92,48 @@ function buildOutputSchemaSection(context) {
|
|
|
86
92
|
}
|
|
87
93
|
function buildInstructions(context) {
|
|
88
94
|
const outputPath = context.sandboxConfig.outputPath;
|
|
89
|
-
const multipleInputsNote = context.inputDatasetIds.length > 1
|
|
90
|
-
? "You have multiple
|
|
95
|
+
const multipleInputsNote = (context.contextResources?.length ?? context.inputDatasetIds.length) > 1
|
|
96
|
+
? "You have multiple context resources available. You may need to read, join, filter, or combine data from them to produce the output."
|
|
91
97
|
: "";
|
|
92
98
|
let xml = create()
|
|
93
99
|
.ele("Instructions")
|
|
94
100
|
.ele("Workflow")
|
|
95
101
|
.ele("Step", { number: "1", name: "Inspect Inputs" })
|
|
96
|
-
.ele("Action").txt(`Review InputPreviews to understand current record structures
|
|
102
|
+
.ele("Action").txt(`Review ContextResources and any InputPreviews to understand current record structures, evidence, fields, shapes and edge cases. ${multipleInputsNote}`).up()
|
|
103
|
+
.ele("Note").txt("ContextResources DescriptorJson may include inline text, metadata, previewRows, or other visible evidence. Treat that visible content as already available context. Do not use executeCommand only to reread it.").up()
|
|
97
104
|
.up()
|
|
98
105
|
.ele("Step", { number: "2", name: "Plan Mapping" })
|
|
99
106
|
.ele("Action").txt("Plan a deterministic mapping from input data fields to the output schema fields (normalize names, types, and formats).").up()
|
|
100
107
|
.ele("Note").txt("If fields are missing, set defaults; if types differ, coerce consistently. When working with multiple inputs, decide how to combine or relate them. Output field names must remain exactly as declared by the output schema.").up()
|
|
101
108
|
.up()
|
|
102
109
|
.ele("Step", { number: "3", name: "Transform" })
|
|
103
|
-
.ele("Action").txt("
|
|
104
|
-
.ele("Requirement").txt(
|
|
110
|
+
.ele("Action").txt("For single-object output, use completeObject with the final object. For row output, use replaceRows with the final rows. Use executeCommand only when command execution is necessary, not merely convenient.").up()
|
|
111
|
+
.ele("Requirement").txt("Do not call completeObject until you have constructed the complete data object. completeObject requires data; a summary-only call is invalid and wastes a model iteration.").up()
|
|
112
|
+
.ele("Requirement").txt("Command execution is necessary only when the final output cannot be produced directly from the provided context, resource descriptors, or previews, and requires running code to inspect, parse, aggregate, join, or compute over files/resources.").up()
|
|
113
|
+
.ele("Requirement").txt("If the final output can be written directly from context already visible to you, do not use executeCommand. Do not use executeCommand just to format JSON, build an object, write output.jsonl, or make completion easier.").up()
|
|
114
|
+
.ele("Requirement").txt("Before using executeCommand, verify that direct completion is insufficient: you need file/resource contents not already visible in DescriptorJson or previews, deterministic computation over many rows, parsing/aggregation that is unreliable to do directly, or output too large/repetitive for direct completion. If none apply, command execution is not needed.").up()
|
|
115
|
+
.ele("Requirement").txt("When using executeCommand, provide commandDescription before the script runs. It must describe the inputs/resources used, operation performed, expected output, and why a command is the right tool.").up()
|
|
116
|
+
.ele("Requirement").txt("When executeCommand is used, context resources are materialized before the script runs at /tmp/ekairos/contexts/{contextId}/resources. The Python process receives EKAIROS_CONTEXT_RESOURCES_DIR and EKAIROS_CONTEXT_RESOURCES_MANIFEST environment variables. Read os.environ['EKAIROS_CONTEXT_RESOURCES_MANIFEST'] inside the script to discover exact files and metadata. Manifest entries expose files as resource['files'][index]['path'].").up()
|
|
117
|
+
.ele("Requirement").txt("If only some resources are needed for a command, pass resourceKeys with the specific ContextResources keys. Omit resourceKeys only when the script truly needs all resources.").up()
|
|
118
|
+
.ele("Requirement").txt(`If executeCommand is used, write file to: ${outputPath}`).up()
|
|
105
119
|
.ele("Requirement").txt("Every data object MUST use the exact property names from OutputSchema required/properties keys. Do not translate, localize, rename, or infer alternative field names.").up()
|
|
106
120
|
.ele("Requirement").txt("Do not print large data to stdout; only progress and summaries.").up()
|
|
121
|
+
.ele("Requirement").txt("Do not install packages, download dependencies, or access the network from executeCommand. Use only the available runtime and standard library unless a dependency is already present.").up()
|
|
107
122
|
.up()
|
|
108
123
|
.ele("Step", { number: "4", name: "Validate and Complete" })
|
|
109
|
-
.ele("Action").txt("
|
|
110
|
-
.ele("Behavior").txt("If
|
|
124
|
+
.ele("Action").txt("When using completeObject or replaceRows, no separate completeDataset call is needed. When using executeCommand, call completeDataset to validate against the output schema and mark as completed.").up()
|
|
125
|
+
.ele("Behavior").txt("If any completion tool returns success:false, inspect validation details, repair the output, and call the appropriate completion tool again. Do not stop until a completion tool returns success:true.").up()
|
|
111
126
|
.up()
|
|
112
127
|
.up()
|
|
113
128
|
.ele("Rules")
|
|
114
129
|
.ele("Rule").txt("Output must strictly match the output schema for each record in data.").up()
|
|
115
130
|
.ele("Rule").txt("OutputSchema property names are authoritative. Field names are a technical contract; only field values may preserve input language.").up()
|
|
116
|
-
.ele("Rule").txt("
|
|
131
|
+
.ele("Rule").txt("Use the cheapest correct tool. completeObject and replaceRows are low-cost completion tools. executeCommand is a high-cost computation tool and requires an explicit commandDescription.").up()
|
|
132
|
+
.ele("Rule").txt("If using output.jsonl, each line must be a standalone JSON object with {type:'row', data:{...}}.").up()
|
|
117
133
|
.ele("Rule").txt("Do not include headers, summaries, or metadata as records.").up()
|
|
118
134
|
.ele("Rule").txt("Be robust to malformed lines in input: skip or sanitize, but do not crash.").up()
|
|
119
135
|
.up()
|
|
120
|
-
.ele("CurrentTask").txt("Transform input dataset(s) to match OutputSchema and
|
|
136
|
+
.ele("CurrentTask").txt("Transform input dataset(s) to match OutputSchema and complete the dataset with the appropriate available tool.").up()
|
|
121
137
|
.up();
|
|
122
138
|
return xml.end({ prettyPrint: true, headless: true });
|
|
123
139
|
}
|
|
@@ -4,7 +4,8 @@ import { createCompleteDatasetTool, didCompleteDatasetSucceed, getDatasetFatalFa
|
|
|
4
4
|
import { datasetUpdateSchemaStep } from "../dataset/steps.js";
|
|
5
5
|
import { getDatasetOutputPath } from "../datasetFiles.js";
|
|
6
6
|
import { createExecuteCommandTool } from "../executeCommand.tool.js";
|
|
7
|
-
import {
|
|
7
|
+
import { createCompleteObjectTool, createReplaceRowsTool, } from "../writeDatasetRows.tool.js";
|
|
8
|
+
import { buildTransformDatasetPromptStep, } from "./transform-dataset.steps.js";
|
|
8
9
|
import { createDatasetId } from "../id.js";
|
|
9
10
|
async function awaitContextRun(run) {
|
|
10
11
|
if (!run)
|
|
@@ -45,27 +46,9 @@ function createTransformDatasetContextDefinition(params) {
|
|
|
45
46
|
throw new Error("dataset_sandbox_required");
|
|
46
47
|
}
|
|
47
48
|
const initialized = sandboxState.initialized && Array.isArray(sandboxState.inputPaths)
|
|
48
|
-
?
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
state: sandboxState,
|
|
52
|
-
}
|
|
53
|
-
: await ensureTransformInputsInSandboxStep({
|
|
54
|
-
runtime,
|
|
55
|
-
sandboxId,
|
|
56
|
-
datasetId,
|
|
57
|
-
inputDatasetIds,
|
|
58
|
-
state: sandboxState,
|
|
59
|
-
});
|
|
60
|
-
let inputPreviews = previous?.inputPreviews ?? params.inputPreviews ?? undefined;
|
|
61
|
-
if (!inputPreviews) {
|
|
62
|
-
inputPreviews = await generateTransformInputPreviewsStep({
|
|
63
|
-
runtime,
|
|
64
|
-
sandboxId,
|
|
65
|
-
datasetId,
|
|
66
|
-
inputPaths: initialized.inputPaths,
|
|
67
|
-
});
|
|
68
|
-
}
|
|
49
|
+
? sandboxState
|
|
50
|
+
: { initialized: false, inputPaths: [] };
|
|
51
|
+
const inputPreviews = previous?.inputPreviews ?? params.inputPreviews ?? [];
|
|
69
52
|
await datasetUpdateSchemaStep({
|
|
70
53
|
runtime,
|
|
71
54
|
datasetId,
|
|
@@ -78,9 +61,10 @@ function createTransformDatasetContextDefinition(params) {
|
|
|
78
61
|
outputSchema,
|
|
79
62
|
sandboxConfig: {
|
|
80
63
|
inputPaths: initialized.inputPaths,
|
|
81
|
-
outputPath:
|
|
64
|
+
outputPath: previous?.sandboxConfig?.outputPath ?? getDatasetOutputPath(datasetId),
|
|
82
65
|
},
|
|
83
66
|
inputPreviews: inputPreviews.length > 0 ? inputPreviews : undefined,
|
|
67
|
+
contextResources: previous?.contextResources ?? params.contextResources ?? [],
|
|
84
68
|
errors: [],
|
|
85
69
|
};
|
|
86
70
|
const basePrompt = await buildTransformDatasetPromptStep({
|
|
@@ -104,14 +88,16 @@ function createTransformDatasetContextDefinition(params) {
|
|
|
104
88
|
outputSchema,
|
|
105
89
|
instructions,
|
|
106
90
|
sandboxId,
|
|
107
|
-
sandboxState: initialized
|
|
91
|
+
sandboxState: initialized,
|
|
92
|
+
contextResources: previous?.contextResources ?? params.contextResources ?? [],
|
|
108
93
|
system,
|
|
109
94
|
sandboxConfig: {
|
|
110
95
|
inputPaths: initialized.inputPaths,
|
|
111
|
-
outputPath:
|
|
96
|
+
outputPath: previous?.sandboxConfig?.outputPath ?? getDatasetOutputPath(datasetId),
|
|
112
97
|
},
|
|
113
98
|
};
|
|
114
99
|
})
|
|
100
|
+
.resources(({ content }) => Array.isArray(content?.contextResources) ? content.contextResources : [])
|
|
115
101
|
.narrative(async (stored) => {
|
|
116
102
|
return String(stored?.content?.system ?? "");
|
|
117
103
|
})
|
|
@@ -123,6 +109,18 @@ function createTransformDatasetContextDefinition(params) {
|
|
|
123
109
|
if (!sandboxId)
|
|
124
110
|
throw new Error("dataset_sandbox_required");
|
|
125
111
|
return {
|
|
112
|
+
completeObject: createCompleteObjectTool({
|
|
113
|
+
datasetId,
|
|
114
|
+
sandboxId,
|
|
115
|
+
runtime,
|
|
116
|
+
schema: stored?.content?.outputSchema,
|
|
117
|
+
}),
|
|
118
|
+
replaceRows: createReplaceRowsTool({
|
|
119
|
+
datasetId,
|
|
120
|
+
sandboxId,
|
|
121
|
+
runtime,
|
|
122
|
+
schema: stored?.content?.outputSchema,
|
|
123
|
+
}),
|
|
126
124
|
executeCommand: createExecuteCommandTool({
|
|
127
125
|
datasetId,
|
|
128
126
|
sandboxId,
|
|
@@ -168,6 +166,7 @@ export function createTransformDatasetContext(params) {
|
|
|
168
166
|
reactor: params.reactor,
|
|
169
167
|
sandboxState: params.sandboxState,
|
|
170
168
|
inputPreviews: params.inputPreviews,
|
|
169
|
+
contextResources: params.contextResources,
|
|
171
170
|
});
|
|
172
171
|
return {
|
|
173
172
|
datasetId,
|
|
@@ -209,6 +208,7 @@ export function createTransformDatasetContext(params) {
|
|
|
209
208
|
sandboxId: params.sandboxId ?? "",
|
|
210
209
|
sandboxState: params.sandboxState ?? { initialized: false, inputPaths: [] },
|
|
211
210
|
inputPreviews: params.inputPreviews,
|
|
211
|
+
contextResources: params.contextResources ?? [],
|
|
212
212
|
},
|
|
213
213
|
});
|
|
214
214
|
await awaitContextRun(shell.run);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ContextReactor } from "@ekairos/events";
|
|
1
|
+
import type { ContextReactor, StoredContextResource } from "@ekairos/events";
|
|
2
2
|
import type { TransformInputPreviewContext } from "./filepreview.js";
|
|
3
3
|
export type { TransformInputPreviewContext } from "./filepreview.js";
|
|
4
4
|
export type TransformSandboxState = {
|
|
@@ -23,6 +23,7 @@ export type TransformDatasetContext = {
|
|
|
23
23
|
datasetId: string;
|
|
24
24
|
preview: TransformInputPreviewContext;
|
|
25
25
|
}>;
|
|
26
|
+
contextResources?: StoredContextResource[];
|
|
26
27
|
errors: string[];
|
|
27
28
|
iterationCount: number;
|
|
28
29
|
instructions?: string;
|
|
@@ -40,6 +41,7 @@ export type TransformDatasetAgentParams = {
|
|
|
40
41
|
datasetId: string;
|
|
41
42
|
preview: TransformInputPreviewContext;
|
|
42
43
|
}>;
|
|
44
|
+
contextResources?: StoredContextResource[];
|
|
43
45
|
};
|
|
44
46
|
export type TransformDatasetRunOptions = {
|
|
45
47
|
prompt?: string;
|
|
@@ -88,5 +90,6 @@ export type TransformPromptContext = {
|
|
|
88
90
|
};
|
|
89
91
|
};
|
|
90
92
|
}>;
|
|
93
|
+
contextResources?: StoredContextResource[];
|
|
91
94
|
errors: string[];
|
|
92
95
|
};
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import type { DatasetSchemaInput } from "./builder/types.js";
|
|
2
|
+
type WriteRowsToolParams = {
|
|
3
|
+
datasetId: string;
|
|
4
|
+
sandboxId: string;
|
|
5
|
+
runtime: any;
|
|
6
|
+
schema?: DatasetSchemaInput | any;
|
|
7
|
+
};
|
|
8
|
+
export declare function persistDatasetRowsStep(params: WriteRowsToolParams & {
|
|
9
|
+
rows: Array<Record<string, unknown>>;
|
|
10
|
+
summary?: string;
|
|
11
|
+
}): Promise<{
|
|
12
|
+
success: boolean;
|
|
13
|
+
status: string;
|
|
14
|
+
rowSource: string;
|
|
15
|
+
outputPath: null;
|
|
16
|
+
storagePath: null;
|
|
17
|
+
error: string;
|
|
18
|
+
message: string;
|
|
19
|
+
validRows?: undefined;
|
|
20
|
+
rowRecordCount?: undefined;
|
|
21
|
+
repairInstructions?: undefined;
|
|
22
|
+
savedRecords?: undefined;
|
|
23
|
+
records?: undefined;
|
|
24
|
+
summary?: undefined;
|
|
25
|
+
} | {
|
|
26
|
+
success: boolean;
|
|
27
|
+
status: string;
|
|
28
|
+
rowSource: string;
|
|
29
|
+
outputPath: null;
|
|
30
|
+
storagePath: null;
|
|
31
|
+
validRows: number;
|
|
32
|
+
rowRecordCount: number;
|
|
33
|
+
error: string;
|
|
34
|
+
message: string;
|
|
35
|
+
repairInstructions: string[];
|
|
36
|
+
savedRecords?: undefined;
|
|
37
|
+
records?: undefined;
|
|
38
|
+
summary?: undefined;
|
|
39
|
+
} | {
|
|
40
|
+
success: boolean;
|
|
41
|
+
status: string;
|
|
42
|
+
rowSource: string;
|
|
43
|
+
outputPath: null;
|
|
44
|
+
storagePath: null;
|
|
45
|
+
validRows: number;
|
|
46
|
+
rowRecordCount: number;
|
|
47
|
+
savedRecords: number;
|
|
48
|
+
error: string;
|
|
49
|
+
message: string;
|
|
50
|
+
repairInstructions?: undefined;
|
|
51
|
+
records?: undefined;
|
|
52
|
+
summary?: undefined;
|
|
53
|
+
} | {
|
|
54
|
+
success: boolean;
|
|
55
|
+
status: string;
|
|
56
|
+
rowSource: string;
|
|
57
|
+
outputPath: null;
|
|
58
|
+
storagePath: null;
|
|
59
|
+
records: number;
|
|
60
|
+
savedRecords: number;
|
|
61
|
+
summary: string | undefined;
|
|
62
|
+
error?: undefined;
|
|
63
|
+
message?: undefined;
|
|
64
|
+
validRows?: undefined;
|
|
65
|
+
rowRecordCount?: undefined;
|
|
66
|
+
repairInstructions?: undefined;
|
|
67
|
+
}>;
|
|
68
|
+
export declare function createReplaceRowsTool(params: WriteRowsToolParams): import("ai").Tool<{
|
|
69
|
+
rows: Array<Record<string, unknown>>;
|
|
70
|
+
summary?: string;
|
|
71
|
+
}, {
|
|
72
|
+
success: boolean;
|
|
73
|
+
status: string;
|
|
74
|
+
rowSource: string;
|
|
75
|
+
outputPath: null;
|
|
76
|
+
storagePath: null;
|
|
77
|
+
error: string;
|
|
78
|
+
message: string;
|
|
79
|
+
validRows?: undefined;
|
|
80
|
+
rowRecordCount?: undefined;
|
|
81
|
+
repairInstructions?: undefined;
|
|
82
|
+
savedRecords?: undefined;
|
|
83
|
+
records?: undefined;
|
|
84
|
+
summary?: undefined;
|
|
85
|
+
} | {
|
|
86
|
+
success: boolean;
|
|
87
|
+
status: string;
|
|
88
|
+
rowSource: string;
|
|
89
|
+
outputPath: null;
|
|
90
|
+
storagePath: null;
|
|
91
|
+
validRows: number;
|
|
92
|
+
rowRecordCount: number;
|
|
93
|
+
error: string;
|
|
94
|
+
message: string;
|
|
95
|
+
repairInstructions: string[];
|
|
96
|
+
savedRecords?: undefined;
|
|
97
|
+
records?: undefined;
|
|
98
|
+
summary?: undefined;
|
|
99
|
+
} | {
|
|
100
|
+
success: boolean;
|
|
101
|
+
status: string;
|
|
102
|
+
rowSource: string;
|
|
103
|
+
outputPath: null;
|
|
104
|
+
storagePath: null;
|
|
105
|
+
validRows: number;
|
|
106
|
+
rowRecordCount: number;
|
|
107
|
+
savedRecords: number;
|
|
108
|
+
error: string;
|
|
109
|
+
message: string;
|
|
110
|
+
repairInstructions?: undefined;
|
|
111
|
+
records?: undefined;
|
|
112
|
+
summary?: undefined;
|
|
113
|
+
} | {
|
|
114
|
+
success: boolean;
|
|
115
|
+
status: string;
|
|
116
|
+
rowSource: string;
|
|
117
|
+
outputPath: null;
|
|
118
|
+
storagePath: null;
|
|
119
|
+
records: number;
|
|
120
|
+
savedRecords: number;
|
|
121
|
+
summary: string | undefined;
|
|
122
|
+
error?: undefined;
|
|
123
|
+
message?: undefined;
|
|
124
|
+
validRows?: undefined;
|
|
125
|
+
rowRecordCount?: undefined;
|
|
126
|
+
repairInstructions?: undefined;
|
|
127
|
+
}>;
|
|
128
|
+
export declare function createCompleteObjectTool(params: WriteRowsToolParams): import("ai").Tool<{
|
|
129
|
+
data: Record<string, unknown>;
|
|
130
|
+
summary?: string;
|
|
131
|
+
}, {
|
|
132
|
+
success: boolean;
|
|
133
|
+
status: string;
|
|
134
|
+
rowSource: string;
|
|
135
|
+
outputPath: null;
|
|
136
|
+
storagePath: null;
|
|
137
|
+
error: string;
|
|
138
|
+
message: string;
|
|
139
|
+
validRows?: undefined;
|
|
140
|
+
rowRecordCount?: undefined;
|
|
141
|
+
repairInstructions?: undefined;
|
|
142
|
+
savedRecords?: undefined;
|
|
143
|
+
records?: undefined;
|
|
144
|
+
summary?: undefined;
|
|
145
|
+
} | {
|
|
146
|
+
success: boolean;
|
|
147
|
+
status: string;
|
|
148
|
+
rowSource: string;
|
|
149
|
+
outputPath: null;
|
|
150
|
+
storagePath: null;
|
|
151
|
+
validRows: number;
|
|
152
|
+
rowRecordCount: number;
|
|
153
|
+
error: string;
|
|
154
|
+
message: string;
|
|
155
|
+
repairInstructions: string[];
|
|
156
|
+
savedRecords?: undefined;
|
|
157
|
+
records?: undefined;
|
|
158
|
+
summary?: undefined;
|
|
159
|
+
} | {
|
|
160
|
+
success: boolean;
|
|
161
|
+
status: string;
|
|
162
|
+
rowSource: string;
|
|
163
|
+
outputPath: null;
|
|
164
|
+
storagePath: null;
|
|
165
|
+
validRows: number;
|
|
166
|
+
rowRecordCount: number;
|
|
167
|
+
savedRecords: number;
|
|
168
|
+
error: string;
|
|
169
|
+
message: string;
|
|
170
|
+
repairInstructions?: undefined;
|
|
171
|
+
records?: undefined;
|
|
172
|
+
summary?: undefined;
|
|
173
|
+
} | {
|
|
174
|
+
success: boolean;
|
|
175
|
+
status: string;
|
|
176
|
+
rowSource: string;
|
|
177
|
+
outputPath: null;
|
|
178
|
+
storagePath: null;
|
|
179
|
+
records: number;
|
|
180
|
+
savedRecords: number;
|
|
181
|
+
summary: string | undefined;
|
|
182
|
+
error?: undefined;
|
|
183
|
+
message?: undefined;
|
|
184
|
+
validRows?: undefined;
|
|
185
|
+
rowRecordCount?: undefined;
|
|
186
|
+
repairInstructions?: undefined;
|
|
187
|
+
}>;
|
|
188
|
+
export {};
|