@superatomai/sdk-node 0.0.75 → 0.0.77
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/index.d.mts +5 -5
- package/dist/index.d.ts +5 -5
- package/dist/index.js +18 -7
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +18 -7
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -634,19 +634,19 @@ declare const ComponentSchema: z.ZodObject<{
|
|
|
634
634
|
type: z.ZodString;
|
|
635
635
|
description: z.ZodString;
|
|
636
636
|
props: z.ZodObject<{
|
|
637
|
-
query: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]
|
|
637
|
+
query: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
|
|
638
638
|
title: z.ZodOptional<z.ZodString>;
|
|
639
639
|
description: z.ZodOptional<z.ZodString>;
|
|
640
640
|
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
641
641
|
actions: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
642
642
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
643
|
-
query: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]
|
|
643
|
+
query: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
|
|
644
644
|
title: z.ZodOptional<z.ZodString>;
|
|
645
645
|
description: z.ZodOptional<z.ZodString>;
|
|
646
646
|
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
647
647
|
actions: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
648
648
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
649
|
-
query: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]
|
|
649
|
+
query: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
|
|
650
650
|
title: z.ZodOptional<z.ZodString>;
|
|
651
651
|
description: z.ZodOptional<z.ZodString>;
|
|
652
652
|
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -661,7 +661,7 @@ declare const ComponentSchema: z.ZodObject<{
|
|
|
661
661
|
description: string;
|
|
662
662
|
props: {
|
|
663
663
|
description?: string | undefined;
|
|
664
|
-
query?: string | {} | undefined;
|
|
664
|
+
query?: string | {} | null | undefined;
|
|
665
665
|
title?: string | undefined;
|
|
666
666
|
config?: Record<string, unknown> | undefined;
|
|
667
667
|
actions?: any[] | undefined;
|
|
@@ -679,7 +679,7 @@ declare const ComponentSchema: z.ZodObject<{
|
|
|
679
679
|
description: string;
|
|
680
680
|
props: {
|
|
681
681
|
description?: string | undefined;
|
|
682
|
-
query?: string | {} | undefined;
|
|
682
|
+
query?: string | {} | null | undefined;
|
|
683
683
|
title?: string | undefined;
|
|
684
684
|
config?: Record<string, unknown> | undefined;
|
|
685
685
|
actions?: any[] | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -634,19 +634,19 @@ declare const ComponentSchema: z.ZodObject<{
|
|
|
634
634
|
type: z.ZodString;
|
|
635
635
|
description: z.ZodString;
|
|
636
636
|
props: z.ZodObject<{
|
|
637
|
-
query: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]
|
|
637
|
+
query: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
|
|
638
638
|
title: z.ZodOptional<z.ZodString>;
|
|
639
639
|
description: z.ZodOptional<z.ZodString>;
|
|
640
640
|
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
641
641
|
actions: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
642
642
|
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
643
|
-
query: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]
|
|
643
|
+
query: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
|
|
644
644
|
title: z.ZodOptional<z.ZodString>;
|
|
645
645
|
description: z.ZodOptional<z.ZodString>;
|
|
646
646
|
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
647
647
|
actions: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
|
|
648
648
|
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
649
|
-
query: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]
|
|
649
|
+
query: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>]>>>;
|
|
650
650
|
title: z.ZodOptional<z.ZodString>;
|
|
651
651
|
description: z.ZodOptional<z.ZodString>;
|
|
652
652
|
config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
@@ -661,7 +661,7 @@ declare const ComponentSchema: z.ZodObject<{
|
|
|
661
661
|
description: string;
|
|
662
662
|
props: {
|
|
663
663
|
description?: string | undefined;
|
|
664
|
-
query?: string | {} | undefined;
|
|
664
|
+
query?: string | {} | null | undefined;
|
|
665
665
|
title?: string | undefined;
|
|
666
666
|
config?: Record<string, unknown> | undefined;
|
|
667
667
|
actions?: any[] | undefined;
|
|
@@ -679,7 +679,7 @@ declare const ComponentSchema: z.ZodObject<{
|
|
|
679
679
|
description: string;
|
|
680
680
|
props: {
|
|
681
681
|
description?: string | undefined;
|
|
682
|
-
query?: string | {} | undefined;
|
|
682
|
+
query?: string | {} | null | undefined;
|
|
683
683
|
title?: string | undefined;
|
|
684
684
|
config?: Record<string, unknown> | undefined;
|
|
685
685
|
actions?: any[] | undefined;
|
package/dist/index.js
CHANGED
|
@@ -349,7 +349,7 @@ var UserPromptSuggestionsMessageSchema = import_zod3.z.object({
|
|
|
349
349
|
payload: UserPromptSuggestionsPayloadSchema
|
|
350
350
|
});
|
|
351
351
|
var ComponentPropsSchema = import_zod3.z.object({
|
|
352
|
-
query: import_zod3.z.string().or(import_zod3.z.object({})).optional(),
|
|
352
|
+
query: import_zod3.z.string().or(import_zod3.z.object({})).nullable().optional(),
|
|
353
353
|
title: import_zod3.z.string().optional(),
|
|
354
354
|
description: import_zod3.z.string().optional(),
|
|
355
355
|
config: import_zod3.z.record(import_zod3.z.unknown()).optional(),
|
|
@@ -4297,13 +4297,13 @@ var PRICING = {
|
|
|
4297
4297
|
"gpt-4-turbo": { input: 10, output: 30 },
|
|
4298
4298
|
"gpt-4": { input: 30, output: 60 },
|
|
4299
4299
|
"gpt-3.5-turbo": { input: 0.5, output: 1.5 },
|
|
4300
|
-
// Google Gemini (
|
|
4300
|
+
// Google Gemini (January 2026)
|
|
4301
4301
|
"gemini-3-pro-preview": { input: 2, output: 12 },
|
|
4302
4302
|
// New Gemini 3
|
|
4303
4303
|
"gemini-3-flash-preview": { input: 0.5, output: 3 },
|
|
4304
4304
|
// For prompts ≤200K tokens, 2x for >200K
|
|
4305
|
-
"gemini-2.5-flash": { input: 0.
|
|
4306
|
-
//
|
|
4305
|
+
"gemini-2.5-flash": { input: 0.3, output: 2.5 },
|
|
4306
|
+
// Paid tier: $0.30 input (text/image/video), $2.50 output (includes thinking)
|
|
4307
4307
|
"gemini-2.5-flash-lite": { input: 0.1, output: 0.4 },
|
|
4308
4308
|
"gemini-2.0-flash": { input: 0.1, output: 0.4 },
|
|
4309
4309
|
"gemini-2.0-flash-lite": { input: 0.075, output: 0.3 },
|
|
@@ -7272,8 +7272,15 @@ Please try rephrasing your request or contact support.
|
|
|
7272
7272
|
}
|
|
7273
7273
|
await streamDelay();
|
|
7274
7274
|
}
|
|
7275
|
+
const cappedToolInput = { ...toolInput };
|
|
7276
|
+
if (cappedToolInput.limit !== void 0 && cappedToolInput.limit > MAX_COMPONENT_QUERY_LIMIT) {
|
|
7277
|
+
logger.info(`[${providerName}] Capping external tool limit from ${cappedToolInput.limit} to ${MAX_COMPONENT_QUERY_LIMIT}`);
|
|
7278
|
+
cappedToolInput.limit = MAX_COMPONENT_QUERY_LIMIT;
|
|
7279
|
+
} else if (cappedToolInput.limit === void 0) {
|
|
7280
|
+
cappedToolInput.limit = MAX_COMPONENT_QUERY_LIMIT;
|
|
7281
|
+
}
|
|
7275
7282
|
const result = await withProgressHeartbeat(
|
|
7276
|
-
() => externalTool.fn(
|
|
7283
|
+
() => externalTool.fn(cappedToolInput),
|
|
7277
7284
|
`Running ${externalTool.name}`,
|
|
7278
7285
|
streamBuffer
|
|
7279
7286
|
);
|
|
@@ -7287,7 +7294,7 @@ Please try rephrasing your request or contact support.
|
|
|
7287
7294
|
this.executedToolsList.push({
|
|
7288
7295
|
id: externalTool.id,
|
|
7289
7296
|
name: externalTool.name,
|
|
7290
|
-
params:
|
|
7297
|
+
params: cappedToolInput,
|
|
7291
7298
|
result: {
|
|
7292
7299
|
_totalRecords: formattedForTracking.summary.totalRecords,
|
|
7293
7300
|
_recordsShown: formattedForTracking.summary.recordsShown,
|
|
@@ -8162,8 +8169,12 @@ ${executedToolsText}`);
|
|
|
8162
8169
|
if (deferredTools.length > 0) {
|
|
8163
8170
|
logger.info(`[${this.getProviderName()}] Passing ${deferredTools.length} deferred tools for Form generation`);
|
|
8164
8171
|
}
|
|
8172
|
+
const sanitizedTextResponse = textResponse.replace(
|
|
8173
|
+
/<DataTable>[\s\S]*?<\/DataTable>/g,
|
|
8174
|
+
"<DataTable>[Data preview removed - for table components, REUSE the exact SQL query shown above (the one that returned these results). Do NOT write a new query or embed data in props.]</DataTable>"
|
|
8175
|
+
);
|
|
8165
8176
|
const matchResult = await this.matchComponentsFromAnalysis(
|
|
8166
|
-
|
|
8177
|
+
sanitizedTextResponse,
|
|
8167
8178
|
components,
|
|
8168
8179
|
userPrompt,
|
|
8169
8180
|
apiKey,
|