Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions .env.local.example
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# Optional API base URL. Defaults to production when unset.
# Use staging when validating staging keys.
# KNOWHERE_BASE_URL=https://api-staging.knowhereto.ai
# Knowhere API origin. Unset also means production.
# Local recommendation: production. Staging is only for staging keys.
KNOWHERE_BASE_URL=https://api.knowhereto.ai

# Optional development override. When set, Notebook skips Dashboard session
# Local development override. When set, Notebook skips Dashboard session
# auth and Dashboard-issued JWT creation, then calls Knowhere directly with
# this key. Leave unset for production and Dashboard-authenticated staging.
# KNOWHERE_API_KEY=sk_your_development_key_here
# KNOWHERE_API_KEY=

# --- Local demo case only (观心). Not Notebook core. ---
# Put the real key in gitignored `.env.local`, copied from
# `观心2.0-RAG-v1.1-demo/_retrieval/.env`.
# Do not copy that file's KNOWHERE_BASE_URL — it is a retrieval endpoint
# path, not the SDK origin above.

# --- Chat provider (server-side only) ---
# Vercel AI Gateway key; AI SDK picks it up automatically
Expand Down Expand Up @@ -61,3 +67,8 @@ DATABASE_URL=postgres://user:password@host/db
# pg — postgres-js (use for local dev against a plain Postgres,
# or for AWS Aurora Postgres if/when we migrate off Neon)
DATABASE_DRIVER=pg

# --- Memento (fluid memory + retrieval activation) ---
# Standalone REST + MCP service. Notebook no longer owns these tables.
MEMENTO_BASE_URL=http://localhost:8787
MEMENTO_SERVICE_KEY=
Binary file added .pnpm-store/v11/index.db
Binary file not shown.
1 change: 1 addition & 0 deletions .repos/OpenViking
Submodule OpenViking added at f6d9de
17 changes: 17 additions & 0 deletions drizzle/0015_bumpy_vulcan.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
CREATE TABLE "fluid_observations" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"workspace_id" uuid NOT NULL,
"source_message_id" uuid,
"signal" text NOT NULL,
"evidence_quote" text NOT NULL,
"subject_hint" text,
"referenced_document_ids" jsonb DEFAULT '[]'::jsonb NOT NULL,
"confidence" double precision NOT NULL,
"status" text DEFAULT 'pending' NOT NULL,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"consumed_at" timestamp with time zone
);
--> statement-breakpoint
ALTER TABLE "fluid_observations" ADD CONSTRAINT "fluid_observations_workspace_id_workspaces_id_fk" FOREIGN KEY ("workspace_id") REFERENCES "public"."workspaces"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
ALTER TABLE "fluid_observations" ADD CONSTRAINT "fluid_observations_source_message_id_chat_messages_id_fk" FOREIGN KEY ("source_message_id") REFERENCES "public"."chat_messages"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint
CREATE INDEX "fluid_observations_workspace_status_created_idx" ON "fluid_observations" USING btree ("workspace_id","status","created_at");
13 changes: 13 additions & 0 deletions drizzle/0016_wealthy_matthew_murdock.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
CREATE TABLE "retrieval_activations" (
"id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
"workspace_id" uuid NOT NULL,
"unit_type" text NOT NULL,
"unit_ref" text NOT NULL,
"activation_count" integer DEFAULT 0 NOT NULL,
"last_activated_at" timestamp with time zone,
"created_at" timestamp with time zone DEFAULT now() NOT NULL
);
--> statement-breakpoint
ALTER TABLE "fluid_memory_items" ADD COLUMN "deactivation_reason" text;--> statement-breakpoint
ALTER TABLE "retrieval_activations" ADD CONSTRAINT "retrieval_activations_workspace_id_workspaces_id_fk" FOREIGN KEY ("workspace_id") REFERENCES "public"."workspaces"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint
CREATE UNIQUE INDEX "retrieval_activations_unit_idx" ON "retrieval_activations" USING btree ("workspace_id","unit_type","unit_ref");
5 changes: 5 additions & 0 deletions drizzle/0017_overjoyed_shooting_star.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DROP TABLE "fluid_memory_items" CASCADE;--> statement-breakpoint
DROP TABLE "fluid_memory_tokens" CASCADE;--> statement-breakpoint
DROP TABLE "fluid_observations" CASCADE;--> statement-breakpoint
DROP TABLE "memory_diffs" CASCADE;--> statement-breakpoint
DROP TABLE "retrieval_activations" CASCADE;
Loading
Loading