@deepagents/text2sql 0.13.0 → 0.14.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.
Files changed (32) hide show
  1. package/dist/index.d.ts +1 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +1065 -219
  4. package/dist/index.js.map +4 -4
  5. package/dist/lib/adapters/groundings/index.js +166 -154
  6. package/dist/lib/adapters/groundings/index.js.map +4 -4
  7. package/dist/lib/adapters/mysql/index.js +166 -154
  8. package/dist/lib/adapters/mysql/index.js.map +4 -4
  9. package/dist/lib/adapters/postgres/index.js +168 -155
  10. package/dist/lib/adapters/postgres/index.js.map +4 -4
  11. package/dist/lib/adapters/postgres/info.postgres.grounding.d.ts.map +1 -1
  12. package/dist/lib/adapters/spreadsheet/index.js +22 -2
  13. package/dist/lib/adapters/spreadsheet/index.js.map +4 -4
  14. package/dist/lib/adapters/sqlite/index.js +166 -154
  15. package/dist/lib/adapters/sqlite/index.js.map +4 -4
  16. package/dist/lib/adapters/sqlserver/index.js +166 -154
  17. package/dist/lib/adapters/sqlserver/index.js.map +4 -4
  18. package/dist/lib/agents/result-tools.d.ts +20 -23
  19. package/dist/lib/agents/result-tools.d.ts.map +1 -1
  20. package/dist/lib/fs/index.d.ts +4 -0
  21. package/dist/lib/fs/index.d.ts.map +1 -0
  22. package/dist/lib/fs/scoped-fs.d.ts +53 -0
  23. package/dist/lib/fs/scoped-fs.d.ts.map +1 -0
  24. package/dist/lib/fs/sqlite-fs.d.ts +66 -0
  25. package/dist/lib/fs/sqlite-fs.d.ts.map +1 -0
  26. package/dist/lib/fs/tracked-fs.d.ts +40 -0
  27. package/dist/lib/fs/tracked-fs.d.ts.map +1 -0
  28. package/dist/lib/sql.d.ts +5 -5
  29. package/dist/lib/sql.d.ts.map +1 -1
  30. package/dist/lib/synthesis/index.js +181 -181
  31. package/dist/lib/synthesis/index.js.map +4 -4
  32. package/package.json +10 -7
@@ -1 +1 @@
1
- {"version":3,"file":"info.postgres.grounding.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/postgres/info.postgres.grounding.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EACL,aAAa,EACb,KAAK,mBAAmB,EACzB,MAAM,iCAAiC,CAAC;AAEzC;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,aAAa;;gBAG1C,OAAO,EAAE,OAAO,EAAE,MAAM,GAAE,mBAAwB;cAKrC,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC;CAiB7D"}
1
+ {"version":3,"file":"info.postgres.grounding.d.ts","sourceRoot":"","sources":["../../../../src/lib/adapters/postgres/info.postgres.grounding.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EACL,aAAa,EACb,KAAK,mBAAmB,EACzB,MAAM,iCAAiC,CAAC;AAEzC;;GAEG;AACH,qBAAa,qBAAsB,SAAQ,aAAa;;gBAG1C,OAAO,EAAE,OAAO,EAAE,MAAM,GAAE,mBAAwB;cAKrC,WAAW,IAAI,OAAO,CAAC,WAAW,CAAC;CAmB7D"}
@@ -510,7 +510,7 @@ var ColumnValuesGrounding = class extends AbstractGrounding {
510
510
  // packages/text2sql/src/lib/adapters/groundings/report.grounding.ts
511
511
  import { groq as groq2 } from "@ai-sdk/groq";
512
512
  import { tool } from "ai";
513
- import dedent from "dedent";
513
+ import dedent2 from "dedent";
514
514
  import z from "zod";
515
515
  import "@deepagents/agent";
516
516
 
@@ -528,6 +528,7 @@ import spawn2 from "nano-spawn";
528
528
  import {
529
529
  createBashTool
530
530
  } from "bash-tool";
531
+ import dedent from "dedent";
531
532
  import YAML from "yaml";
532
533
  import { DatabaseSync } from "node:sqlite";
533
534
  import { groq } from "@ai-sdk/groq";
@@ -545,7 +546,26 @@ import {
545
546
  import chalk2 from "chalk";
546
547
  import "zod";
547
548
  import "@deepagents/agent";
548
- var LAZY_ID = Symbol("lazy-id");
549
+ var LAZY_ID = Symbol.for("@deepagents/context:lazy-id");
550
+ var SKILLS_INSTRUCTIONS = dedent`A skill is a set of local instructions to follow that is stored in a \`SKILL.md\` file. Below is the list of skills that can be used. Each entry includes a name, description, and file path so you can open the source for full instructions when using a specific skill.
551
+
552
+ ### How to use skills
553
+ - Discovery: The list below shows the skills available in this session (name + description + file path). Skill bodies live on disk at the listed paths.
554
+ - Trigger rules: If the user names a skill (with \`$SkillName\` or plain text) OR the task clearly matches a skill's description shown below, you must use that skill for that turn before doing anything else. Multiple mentions mean use them all. Do not carry skills across turns unless re-mentioned.
555
+ - Missing/blocked: If a named skill isn't in the list or the path can't be read, say so briefly and continue with the best fallback.
556
+ - How to use a skill (progressive disclosure):
557
+ 1) After deciding to use a skill, open its \`SKILL.md\`. Read only enough to follow the workflow.
558
+ 2) If \`SKILL.md\` points to extra folders such as \`references/\`, load only the specific files needed for the request; don't bulk-load everything.
559
+ 3) If \`scripts/\` exist, prefer running or patching them instead of retyping large code blocks.
560
+ 4) If \`assets/\` or templates exist, reuse them instead of recreating from scratch.
561
+ - Coordination and sequencing:
562
+ - If multiple skills apply, choose the minimal set that covers the request and state the order you'll use them.
563
+ - Announce which skill(s) you're using and why (one short line). If you skip an obvious skill, say why.
564
+ - Context hygiene:
565
+ - Keep context small: summarize long sections instead of pasting them; only load extra files when needed.
566
+ - Avoid deep reference-chasing: prefer opening only files directly linked from \`SKILL.md\` unless you're blocked.
567
+ - When variants exist (frameworks, providers, domains), pick only the relevant reference file(s) and note that choice.
568
+ - Safety and fallback: If a skill can't be applied cleanly (missing files, unclear instructions), state the issue, pick the next-best approach, and continue.`;
549
569
 
550
570
  // packages/text2sql/src/lib/adapters/groundings/row-count.grounding.ts
551
571
  var RowCountGrounding = class extends AbstractGrounding {