nao-core 0.0.30__tar.gz → 0.0.32__tar.gz
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.
- {nao_core-0.0.30 → nao_core-0.0.32}/PKG-INFO +6 -2
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/__init__.py +1 -1
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/fastapi/main.py +6 -0
- nao_core-0.0.32/nao_core/bin/migrations-postgres/0005_add_project_tables.sql +39 -0
- nao_core-0.0.32/nao_core/bin/migrations-postgres/meta/0005_snapshot.json +1129 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-postgres/meta/_journal.json +7 -0
- nao_core-0.0.32/nao_core/bin/migrations-sqlite/0005_add_project_tables.sql +38 -0
- nao_core-0.0.32/nao_core/bin/migrations-sqlite/meta/0005_snapshot.json +1086 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-sqlite/meta/_journal.json +7 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/nao-chat-server +0 -0
- nao_core-0.0.30/nao_core/bin/public/assets/code-block-F6WJLWQG-z4zcca7w.js → nao_core-0.0.32/nao_core/bin/public/assets/code-block-F6WJLWQG-TAi8koem.js +1 -1
- nao_core-0.0.32/nao_core/bin/public/assets/index-BfHcd9Xz.css +1 -0
- nao_core-0.0.30/nao_core/bin/public/assets/index-DhhS7iVA.js → nao_core-0.0.32/nao_core/bin/public/assets/index-Mzo9bkag.js +256 -172
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/public/index.html +2 -2
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/commands/chat.py +11 -10
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/commands/init.py +27 -4
- nao_core-0.0.32/nao_core/commands/sync/__init__.py +78 -0
- nao_core-0.0.32/nao_core/commands/sync/accessors.py +290 -0
- nao_core-0.0.32/nao_core/commands/sync/cleanup.py +133 -0
- nao_core-0.0.32/nao_core/commands/sync/providers/__init__.py +30 -0
- nao_core-0.0.32/nao_core/commands/sync/providers/base.py +87 -0
- nao_core-0.0.32/nao_core/commands/sync/providers/databases/__init__.py +17 -0
- nao_core-0.0.32/nao_core/commands/sync/providers/databases/bigquery.py +78 -0
- nao_core-0.0.32/nao_core/commands/sync/providers/databases/databricks.py +79 -0
- nao_core-0.0.32/nao_core/commands/sync/providers/databases/duckdb.py +83 -0
- nao_core-0.0.32/nao_core/commands/sync/providers/databases/postgres.py +78 -0
- nao_core-0.0.32/nao_core/commands/sync/providers/databases/provider.py +123 -0
- nao_core-0.0.32/nao_core/commands/sync/providers/databases/snowflake.py +78 -0
- nao_core-0.0.32/nao_core/commands/sync/providers/repositories/__init__.py +5 -0
- nao_core-0.0.30/nao_core/commands/sync/repositories.py → nao_core-0.0.32/nao_core/commands/sync/providers/repositories/provider.py +43 -20
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/config/__init__.py +2 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/config/base.py +23 -4
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/config/databases/__init__.py +5 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/config/databases/base.py +1 -0
- nao_core-0.0.32/nao_core/config/databases/postgres.py +78 -0
- nao_core-0.0.32/nao_core/templates/__init__.py +12 -0
- nao_core-0.0.32/nao_core/templates/defaults/databases/columns.md.j2 +23 -0
- nao_core-0.0.32/nao_core/templates/defaults/databases/description.md.j2 +32 -0
- nao_core-0.0.32/nao_core/templates/defaults/databases/preview.md.j2 +22 -0
- nao_core-0.0.32/nao_core/templates/defaults/databases/profiling.md.j2 +34 -0
- nao_core-0.0.32/nao_core/templates/engine.py +133 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/pyproject.toml +12 -2
- nao_core-0.0.30/nao_core/bin/public/assets/index-ClduEZSo.css +0 -1
- nao_core-0.0.30/nao_core/commands/sync/__init__.py +0 -59
- nao_core-0.0.30/nao_core/commands/sync/accessors.py +0 -211
- nao_core-0.0.30/nao_core/commands/sync/databases.py +0 -374
- {nao_core-0.0.30 → nao_core-0.0.32}/.gitignore +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/LICENSE +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/README.md +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/.nao-secret +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/fastapi/test_main.py +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-postgres/0000_user_auth_and_chat_tables.sql +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-postgres/0001_message_feedback.sql +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-postgres/0002_chat_message_stop_reason_and_error_message.sql +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-postgres/0003_handle_slack_with_thread.sql +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-postgres/0004_input_and_output_tokens.sql +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-postgres/meta/0000_snapshot.json +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-postgres/meta/0001_snapshot.json +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-postgres/meta/0002_snapshot.json +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-postgres/meta/0003_snapshot.json +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-postgres/meta/0004_snapshot.json +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-sqlite/0000_user_auth_and_chat_tables.sql +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-sqlite/0001_message_feedback.sql +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-sqlite/0002_chat_message_stop_reason_and_error_message.sql +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-sqlite/0003_handle_slack_with_thread.sql +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-sqlite/0004_input_and_output_tokens.sql +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-sqlite/meta/0000_snapshot.json +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-sqlite/meta/0001_snapshot.json +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-sqlite/meta/0002_snapshot.json +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-sqlite/meta/0003_snapshot.json +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/migrations-sqlite/meta/0004_snapshot.json +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/public/favicon.ico +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/public/github-icon.svg +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/public/google-icon.svg +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/public/nao-logo-greyscale.svg +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/public/nao-square-logo.png +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/bin/rg +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/commands/__init__.py +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/commands/debug.py +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/commands/sync/registry.py +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/config/databases/bigquery.py +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/config/databases/databricks.py +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/config/databases/duckdb.py +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/config/databases/snowflake.py +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/config/exceptions.py +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/config/llm/__init__.py +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/config/repos/__init__.py +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/config/repos/base.py +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/config/slack/__init__.py +0 -0
- {nao_core-0.0.30 → nao_core-0.0.32}/nao_core/main.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: nao-core
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.32
|
|
4
4
|
Summary: nao Core is your analytics context builder with the best chat interface.
|
|
5
5
|
Project-URL: Homepage, https://getnao.io
|
|
6
6
|
Project-URL: Repository, https://github.com/naolabs/chat
|
|
@@ -21,10 +21,14 @@ Classifier: Programming Language :: Python :: 3.13
|
|
|
21
21
|
Requires-Python: >=3.10
|
|
22
22
|
Requires-Dist: cryptography>=46.0.3
|
|
23
23
|
Requires-Dist: cyclopts>=4.4.4
|
|
24
|
+
Requires-Dist: dotenv>=0.9.9
|
|
24
25
|
Requires-Dist: fastapi>=0.128.0
|
|
25
|
-
Requires-Dist: ibis-framework[bigquery,databricks,duckdb,snowflake]>=9.0.0
|
|
26
|
+
Requires-Dist: ibis-framework[bigquery,databricks,duckdb,postgres,snowflake]>=9.0.0
|
|
27
|
+
Requires-Dist: jinja2>=3.1.0
|
|
26
28
|
Requires-Dist: openai>=1.0.0
|
|
27
29
|
Requires-Dist: pydantic>=2.10.0
|
|
30
|
+
Requires-Dist: pytest>=9.0.2
|
|
31
|
+
Requires-Dist: python-dotenv>=1.2.1
|
|
28
32
|
Requires-Dist: pyyaml>=6.0.0
|
|
29
33
|
Requires-Dist: rich>=14.0.0
|
|
30
34
|
Requires-Dist: uvicorn>=0.40.0
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
# nao Core CLI package
|
|
2
|
-
__version__ = "0.0.
|
|
2
|
+
__version__ = "0.0.32"
|
|
@@ -7,6 +7,9 @@ import os
|
|
|
7
7
|
import sys
|
|
8
8
|
import numpy as np
|
|
9
9
|
from pathlib import Path
|
|
10
|
+
from dotenv import load_dotenv
|
|
11
|
+
|
|
12
|
+
load_dotenv()
|
|
10
13
|
|
|
11
14
|
cli_path = Path(__file__).parent.parent.parent / "cli"
|
|
12
15
|
sys.path.insert(0, str(cli_path))
|
|
@@ -126,4 +129,7 @@ async def execute_sql(request: ExecuteSQLRequest):
|
|
|
126
129
|
raise HTTPException(status_code=500, detail=str(e))
|
|
127
130
|
|
|
128
131
|
if __name__ == "__main__":
|
|
132
|
+
nao_project_folder = os.getenv('NAO_PROJECT_FOLDER')
|
|
133
|
+
if nao_project_folder:
|
|
134
|
+
os.chdir(nao_project_folder)
|
|
129
135
|
uvicorn.run("main:app", host="0.0.0.0", port=port, reload=True)
|
|
@@ -0,0 +1,39 @@
|
|
|
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" timestamp DEFAULT now() NOT NULL,
|
|
9
|
+
"updated_at" timestamp DEFAULT now() 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" timestamp DEFAULT now() NOT NULL,
|
|
19
|
+
"updated_at" timestamp DEFAULT now() NOT NULL,
|
|
20
|
+
CONSTRAINT "project_llm_config_unique" UNIQUE("id","project_id","provider")
|
|
21
|
+
);
|
|
22
|
+
--> statement-breakpoint
|
|
23
|
+
CREATE TABLE "project_member" (
|
|
24
|
+
"project_id" text NOT NULL,
|
|
25
|
+
"user_id" text NOT NULL,
|
|
26
|
+
"role" text NOT NULL,
|
|
27
|
+
"created_at" timestamp DEFAULT now() NOT NULL,
|
|
28
|
+
CONSTRAINT "project_member_project_id_user_id_pk" PRIMARY KEY("project_id","user_id")
|
|
29
|
+
);
|
|
30
|
+
--> statement-breakpoint
|
|
31
|
+
ALTER TABLE "chat" ADD COLUMN "project_id" text NOT NULL;--> statement-breakpoint
|
|
32
|
+
ALTER TABLE "project_llm_config" ADD CONSTRAINT "project_llm_config_project_id_project_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."project"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
33
|
+
ALTER TABLE "project_member" ADD CONSTRAINT "project_member_project_id_project_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."project"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
34
|
+
ALTER TABLE "project_member" ADD CONSTRAINT "project_member_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
35
|
+
CREATE INDEX "project_llm_config_projectId_idx" ON "project_llm_config" USING btree ("project_id");--> statement-breakpoint
|
|
36
|
+
CREATE INDEX "project_member_userId_idx" ON "project_member" USING btree ("user_id");--> statement-breakpoint
|
|
37
|
+
DELETE FROM "chat";--> statement-breakpoint
|
|
38
|
+
ALTER TABLE "chat" ADD CONSTRAINT "chat_project_id_project_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."project"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
|
|
39
|
+
CREATE INDEX "chat_projectId_idx" ON "chat" USING btree ("project_id");
|