@superatomai/sdk-node 0.0.85-dsp → 0.0.86-dsp

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.js CHANGED
@@ -2694,16 +2694,18 @@ function exceptionsFromConfig(raw) {
2694
2694
  const s = spec;
2695
2695
  const link = str(s.link);
2696
2696
  const own = str(s.own);
2697
+ const visibleWhere = str(s.visibleWhere);
2697
2698
  const columns = Array.isArray(s.columns) ? s.columns.filter((c) => typeof c === "string" && !!c) : [];
2698
2699
  let bad = null;
2699
2700
  if (!own && !link) bad = 'it has neither "link" nor "own"';
2700
2701
  else if (!own && columns.length === 0) bad = 'it lists no "columns"';
2701
- else if (!own && !visibleKeys) bad = 'the exception has no "visibleKeys"';
2702
+ else if (own && visibleWhere && columns.length === 0) bad = 'it has "visibleWhere" with "own" but lists no "columns"';
2703
+ else if (!own && !visibleKeys && !visibleWhere) bad = 'the exception has no "visibleKeys" and the table no "visibleWhere"';
2702
2704
  if (bad) {
2703
2705
  logger.warn(`[RequestIdentity] Exception "${name ?? "?"}": table "${table}" dropped because ${bad}.`);
2704
2706
  continue;
2705
2707
  }
2706
- tables[table] = own ? { own } : { link, columns };
2708
+ tables[table] = own ? visibleWhere ? { own, columns, visibleWhere } : { own } : { link, columns, ...visibleWhere ? { visibleWhere } : {} };
2707
2709
  }
2708
2710
  if (Object.keys(tables).length === 0) continue;
2709
2711
  out.push({ name, visibleKeys, tables });
@@ -9839,6 +9841,8 @@ var PromptLoader = class {
9839
9841
  // Excel sources use DuckDB engine
9840
9842
  "csv": "duckdb",
9841
9843
  // CSV sources use DuckDB engine
9844
+ "s3": "duckdb",
9845
+ // S3 Parquet sources use DuckDB engine
9842
9846
  "dynamodb": "dynamodb",
9843
9847
  // DynamoDB uses its own PartiQL rules (no JOIN/GROUP BY/aggregates)
9844
9848
  "redis": "redis",
@@ -11007,6 +11011,7 @@ Analyze the error and try again with a corrected query.`;
11007
11011
  "mysql": `Add LIMIT ${this.config.maxRowsFetched} at the end of every query`,
11008
11012
  "excel": `Add LIMIT ${this.config.maxRowsFetched} at the end of every query`,
11009
11013
  "csv": `Add LIMIT ${this.config.maxRowsFetched} at the end of every query`,
11014
+ "s3": `Add LIMIT ${this.config.maxRowsFetched} at the end of every query`,
11010
11015
  "dynamodb": `Add LIMIT ${this.config.maxRowsFetched} at the end (this tool applies it \u2014 DynamoDB has no LIMIT clause) and always filter by the partition key`,
11011
11016
  "redis": `Provide ONE Redis read command in the query field (e.g. HGETALL key, or SCAN 0 MATCH pattern:* COUNT ${this.config.maxRowsFetched}). Look up by exact key when known; never use KEYS`,
11012
11017
  "netsuite": `Add LIMIT ${this.config.maxRowsFetched} at the end of every query (this tool converts it internally \u2014 SuiteQL itself has no LIMIT keyword, so never write FETCH FIRST/OFFSET/TOP yourself)`
@@ -11055,7 +11060,7 @@ Even if a table appears in the detailed schema above, search_schema returns samp
11055
11060
  } catch (traceErr) {
11056
11061
  logger.warn(`[SourceAgent:${this.tool.name}] Trace capture failed for schemaSearchInstructionsText (non-blocking): ${traceErr}`);
11057
11062
  }
11058
- const displaySourceType = sourceType === "excel" || sourceType === "csv" ? `${sourceType} \u2014 uses DuckDB SQL engine` : sourceType;
11063
+ const displaySourceType = sourceType === "excel" || sourceType === "csv" || sourceType === "s3" ? `${sourceType} \u2014 uses DuckDB SQL engine` : sourceType;
11059
11064
  const userAccessContextText = buildAccessSection(this.config.userAccessContext ?? "", "source");
11060
11065
  try {
11061
11066
  if (this.traceSchemaEntry) this.traceSchemaEntry.userAccessContextText = userAccessContextText;
package/dist/index.mjs CHANGED
@@ -2582,16 +2582,18 @@ function exceptionsFromConfig(raw) {
2582
2582
  const s = spec;
2583
2583
  const link = str(s.link);
2584
2584
  const own = str(s.own);
2585
+ const visibleWhere = str(s.visibleWhere);
2585
2586
  const columns = Array.isArray(s.columns) ? s.columns.filter((c) => typeof c === "string" && !!c) : [];
2586
2587
  let bad = null;
2587
2588
  if (!own && !link) bad = 'it has neither "link" nor "own"';
2588
2589
  else if (!own && columns.length === 0) bad = 'it lists no "columns"';
2589
- else if (!own && !visibleKeys) bad = 'the exception has no "visibleKeys"';
2590
+ else if (own && visibleWhere && columns.length === 0) bad = 'it has "visibleWhere" with "own" but lists no "columns"';
2591
+ else if (!own && !visibleKeys && !visibleWhere) bad = 'the exception has no "visibleKeys" and the table no "visibleWhere"';
2590
2592
  if (bad) {
2591
2593
  logger.warn(`[RequestIdentity] Exception "${name ?? "?"}": table "${table}" dropped because ${bad}.`);
2592
2594
  continue;
2593
2595
  }
2594
- tables[table] = own ? { own } : { link, columns };
2596
+ tables[table] = own ? visibleWhere ? { own, columns, visibleWhere } : { own } : { link, columns, ...visibleWhere ? { visibleWhere } : {} };
2595
2597
  }
2596
2598
  if (Object.keys(tables).length === 0) continue;
2597
2599
  out.push({ name, visibleKeys, tables });
@@ -9727,6 +9729,8 @@ var PromptLoader = class {
9727
9729
  // Excel sources use DuckDB engine
9728
9730
  "csv": "duckdb",
9729
9731
  // CSV sources use DuckDB engine
9732
+ "s3": "duckdb",
9733
+ // S3 Parquet sources use DuckDB engine
9730
9734
  "dynamodb": "dynamodb",
9731
9735
  // DynamoDB uses its own PartiQL rules (no JOIN/GROUP BY/aggregates)
9732
9736
  "redis": "redis",
@@ -10895,6 +10899,7 @@ Analyze the error and try again with a corrected query.`;
10895
10899
  "mysql": `Add LIMIT ${this.config.maxRowsFetched} at the end of every query`,
10896
10900
  "excel": `Add LIMIT ${this.config.maxRowsFetched} at the end of every query`,
10897
10901
  "csv": `Add LIMIT ${this.config.maxRowsFetched} at the end of every query`,
10902
+ "s3": `Add LIMIT ${this.config.maxRowsFetched} at the end of every query`,
10898
10903
  "dynamodb": `Add LIMIT ${this.config.maxRowsFetched} at the end (this tool applies it \u2014 DynamoDB has no LIMIT clause) and always filter by the partition key`,
10899
10904
  "redis": `Provide ONE Redis read command in the query field (e.g. HGETALL key, or SCAN 0 MATCH pattern:* COUNT ${this.config.maxRowsFetched}). Look up by exact key when known; never use KEYS`,
10900
10905
  "netsuite": `Add LIMIT ${this.config.maxRowsFetched} at the end of every query (this tool converts it internally \u2014 SuiteQL itself has no LIMIT keyword, so never write FETCH FIRST/OFFSET/TOP yourself)`
@@ -10943,7 +10948,7 @@ Even if a table appears in the detailed schema above, search_schema returns samp
10943
10948
  } catch (traceErr) {
10944
10949
  logger.warn(`[SourceAgent:${this.tool.name}] Trace capture failed for schemaSearchInstructionsText (non-blocking): ${traceErr}`);
10945
10950
  }
10946
- const displaySourceType = sourceType === "excel" || sourceType === "csv" ? `${sourceType} \u2014 uses DuckDB SQL engine` : sourceType;
10951
+ const displaySourceType = sourceType === "excel" || sourceType === "csv" || sourceType === "s3" ? `${sourceType} \u2014 uses DuckDB SQL engine` : sourceType;
10947
10952
  const userAccessContextText = buildAccessSection(this.config.userAccessContext ?? "", "source");
10948
10953
  try {
10949
10954
  if (this.traceSchemaEntry) this.traceSchemaEntry.userAccessContextText = userAccessContextText;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@superatomai/sdk-node",
3
- "version": "0.0.85-dsp",
3
+ "version": "0.0.86-dsp",
4
4
  "description": "Node.js TypeScript SDK for Superatom",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",