nao-core 0.0.30__py3-none-any.whl → 0.0.31__py3-none-any.whl

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 (48) hide show
  1. nao_core/__init__.py +1 -1
  2. nao_core/bin/fastapi/main.py +6 -0
  3. nao_core/bin/migrations-postgres/0005_add_project_tables.sql +39 -0
  4. nao_core/bin/migrations-postgres/meta/0005_snapshot.json +1129 -0
  5. nao_core/bin/migrations-postgres/meta/_journal.json +7 -0
  6. nao_core/bin/migrations-sqlite/0005_add_project_tables.sql +38 -0
  7. nao_core/bin/migrations-sqlite/meta/0005_snapshot.json +1086 -0
  8. nao_core/bin/migrations-sqlite/meta/_journal.json +7 -0
  9. nao_core/bin/nao-chat-server +0 -0
  10. nao_core/bin/public/assets/{code-block-F6WJLWQG-z4zcca7w.js → code-block-F6WJLWQG-TAi8koem.js} +1 -1
  11. nao_core/bin/public/assets/index-BfHcd9Xz.css +1 -0
  12. nao_core/bin/public/assets/{index-DhhS7iVA.js → index-Mzo9bkag.js} +256 -172
  13. nao_core/bin/public/index.html +2 -2
  14. nao_core/commands/chat.py +11 -10
  15. nao_core/commands/init.py +27 -4
  16. nao_core/commands/sync/__init__.py +40 -21
  17. nao_core/commands/sync/accessors.py +218 -139
  18. nao_core/commands/sync/cleanup.py +133 -0
  19. nao_core/commands/sync/providers/__init__.py +30 -0
  20. nao_core/commands/sync/providers/base.py +87 -0
  21. nao_core/commands/sync/providers/databases/__init__.py +17 -0
  22. nao_core/commands/sync/providers/databases/bigquery.py +78 -0
  23. nao_core/commands/sync/providers/databases/databricks.py +79 -0
  24. nao_core/commands/sync/providers/databases/duckdb.py +83 -0
  25. nao_core/commands/sync/providers/databases/postgres.py +78 -0
  26. nao_core/commands/sync/providers/databases/provider.py +123 -0
  27. nao_core/commands/sync/providers/databases/snowflake.py +78 -0
  28. nao_core/commands/sync/providers/repositories/__init__.py +5 -0
  29. nao_core/commands/sync/{repositories.py → providers/repositories/provider.py} +43 -20
  30. nao_core/config/__init__.py +2 -0
  31. nao_core/config/base.py +23 -4
  32. nao_core/config/databases/__init__.py +5 -0
  33. nao_core/config/databases/base.py +1 -0
  34. nao_core/config/databases/postgres.py +78 -0
  35. nao_core/templates/__init__.py +12 -0
  36. nao_core/templates/defaults/databases/columns.md.j2 +23 -0
  37. nao_core/templates/defaults/databases/description.md.j2 +32 -0
  38. nao_core/templates/defaults/databases/preview.md.j2 +22 -0
  39. nao_core/templates/defaults/databases/profiling.md.j2 +34 -0
  40. nao_core/templates/engine.py +133 -0
  41. {nao_core-0.0.30.dist-info → nao_core-0.0.31.dist-info}/METADATA +6 -2
  42. nao_core-0.0.31.dist-info/RECORD +86 -0
  43. nao_core/bin/public/assets/index-ClduEZSo.css +0 -1
  44. nao_core/commands/sync/databases.py +0 -374
  45. nao_core-0.0.30.dist-info/RECORD +0 -65
  46. {nao_core-0.0.30.dist-info → nao_core-0.0.31.dist-info}/WHEEL +0 -0
  47. {nao_core-0.0.30.dist-info → nao_core-0.0.31.dist-info}/entry_points.txt +0 -0
  48. {nao_core-0.0.30.dist-info → nao_core-0.0.31.dist-info}/licenses/LICENSE +0 -0
@@ -36,6 +36,13 @@
36
36
  "when": 1768817988521,
37
37
  "tag": "0004_input_and_output_tokens",
38
38
  "breakpoints": true
39
+ },
40
+ {
41
+ "idx": 5,
42
+ "version": "7",
43
+ "when": 1769164031408,
44
+ "tag": "0005_add_project_tables",
45
+ "breakpoints": true
39
46
  }
40
47
  ]
41
48
  }
@@ -0,0 +1,38 @@
1
+ CREATE TABLE `project` (
2
+ `id` text PRIMARY KEY NOT NULL,
3
+ `name` text NOT NULL,
4
+ `type` text NOT NULL,
5
+ `path` text,
6
+ `slack_bot_token` text,
7
+ `slack_signing_secret` text,
8
+ `created_at` integer DEFAULT (cast(unixepoch('subsecond') * 1000 as integer)) NOT NULL,
9
+ `updated_at` integer DEFAULT (cast(unixepoch('subsecond') * 1000 as integer)) NOT NULL,
10
+ CONSTRAINT "local_project_path_required" CHECK(CASE WHEN "project"."type" = 'local' THEN "project"."path" IS NOT NULL ELSE TRUE END)
11
+ );
12
+ --> statement-breakpoint
13
+ CREATE TABLE `project_llm_config` (
14
+ `id` text PRIMARY KEY NOT NULL,
15
+ `project_id` text NOT NULL,
16
+ `provider` text NOT NULL,
17
+ `api_key` text NOT NULL,
18
+ `created_at` integer DEFAULT (cast(unixepoch('subsecond') * 1000 as integer)) NOT NULL,
19
+ `updated_at` integer DEFAULT (cast(unixepoch('subsecond') * 1000 as integer)) NOT NULL,
20
+ FOREIGN KEY (`project_id`) REFERENCES `project`(`id`) ON UPDATE no action ON DELETE cascade
21
+ );
22
+ --> statement-breakpoint
23
+ CREATE INDEX `project_llm_config_projectId_idx` ON `project_llm_config` (`project_id`);--> statement-breakpoint
24
+ CREATE UNIQUE INDEX `project_llm_config_unique` ON `project_llm_config` (`id`,`project_id`,`provider`);--> statement-breakpoint
25
+ CREATE TABLE `project_member` (
26
+ `project_id` text NOT NULL,
27
+ `user_id` text NOT NULL,
28
+ `role` text NOT NULL,
29
+ `created_at` integer DEFAULT (cast(unixepoch('subsecond') * 1000 as integer)) NOT NULL,
30
+ PRIMARY KEY(`project_id`, `user_id`),
31
+ FOREIGN KEY (`project_id`) REFERENCES `project`(`id`) ON UPDATE no action ON DELETE cascade,
32
+ FOREIGN KEY (`user_id`) REFERENCES `user`(`id`) ON UPDATE no action ON DELETE cascade
33
+ );
34
+ --> statement-breakpoint
35
+ CREATE INDEX `project_member_userId_idx` ON `project_member` (`user_id`);--> statement-breakpoint
36
+ DELETE FROM `chat`;--> statement-breakpoint
37
+ ALTER TABLE `chat` ADD `project_id` text NOT NULL REFERENCES project(id);--> statement-breakpoint
38
+ CREATE INDEX `chat_projectId_idx` ON `chat` (`project_id`);