-
Notifications
You must be signed in to change notification settings - Fork 143
first nao MCP version #708
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
socallmebertille
wants to merge
9
commits into
main
Choose a base branch
from
feat/648_nao_MCP
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
3f54632
first nao mcp version
socallmebertille 1e75780
add the hook permission to handle the MCP settings
socallmebertille cc1b6bb
adapt new permissions hook to the PR
socallmebertille cabcb05
handle fixes from cubic review and real-time update MCP settings on M…
socallmebertille e05c499
fix(mcp): expose closeProjectSessions and add projectId to McpSession
socallmebertille 7262c34
update some issues and improve the tools
socallmebertille 8e26801
improve description of tools
socallmebertille fc54531
fix from review done for first nao mcp version
socallmebertille 41fe6ee
transitive deps de better-auth on 1.6.3 to match the oauth-provider v…
socallmebertille File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,127 @@ | ||
| CREATE TABLE "jwks" ( | ||
| "id" text PRIMARY KEY NOT NULL, | ||
| "public_key" text NOT NULL, | ||
| "private_key" text NOT NULL, | ||
| "created_at" timestamp DEFAULT now() NOT NULL, | ||
| "expires_at" timestamp | ||
| ); | ||
| --> statement-breakpoint | ||
| CREATE TABLE "mcp_call_log" ( | ||
| "id" text PRIMARY KEY NOT NULL, | ||
| "project_id" text NOT NULL, | ||
| "user_id" text NOT NULL, | ||
| "tool_name" text NOT NULL, | ||
| "duration_ms" integer, | ||
| "success" boolean NOT NULL, | ||
| "tool_input" jsonb, | ||
| "tool_output" jsonb, | ||
| "called_at" timestamp DEFAULT now() NOT NULL | ||
| ); | ||
| --> statement-breakpoint | ||
| CREATE TABLE "oauth_access_token" ( | ||
| "id" text PRIMARY KEY NOT NULL, | ||
| "token" text NOT NULL, | ||
| "client_id" text NOT NULL, | ||
| "session_id" text, | ||
| "user_id" text, | ||
| "reference_id" text, | ||
| "refresh_id" text, | ||
| "expires_at" timestamp NOT NULL, | ||
| "created_at" timestamp DEFAULT now() NOT NULL, | ||
| "scopes" jsonb NOT NULL, | ||
| CONSTRAINT "oauth_access_token_token_unique" UNIQUE("token") | ||
| ); | ||
| --> statement-breakpoint | ||
| CREATE TABLE "oauth_client" ( | ||
| "id" text PRIMARY KEY NOT NULL, | ||
| "client_id" text NOT NULL, | ||
| "client_secret" text, | ||
| "disabled" boolean DEFAULT false, | ||
| "skip_consent" boolean, | ||
| "enable_end_session" boolean, | ||
| "subject_type" text, | ||
| "scopes" jsonb, | ||
| "user_id" text, | ||
| "name" text, | ||
| "uri" text, | ||
| "icon" text, | ||
| "contacts" jsonb, | ||
| "tos" text, | ||
| "policy" text, | ||
| "software_id" text, | ||
| "software_version" text, | ||
| "software_statement" text, | ||
| "redirect_uris" jsonb NOT NULL, | ||
| "post_logout_redirect_uris" jsonb, | ||
| "token_endpoint_auth_method" text, | ||
| "grant_types" jsonb, | ||
| "response_types" jsonb, | ||
| "public" boolean, | ||
| "type" text, | ||
| "require_pkce" boolean, | ||
| "reference_id" text, | ||
| "metadata" jsonb, | ||
| "created_at" timestamp DEFAULT now() NOT NULL, | ||
| "updated_at" timestamp DEFAULT now() NOT NULL, | ||
| CONSTRAINT "oauth_client_client_id_unique" UNIQUE("client_id") | ||
| ); | ||
| --> statement-breakpoint | ||
| CREATE TABLE "oauth_consent" ( | ||
| "id" text PRIMARY KEY NOT NULL, | ||
| "client_id" text NOT NULL, | ||
| "user_id" text, | ||
| "reference_id" text, | ||
| "scopes" jsonb NOT NULL, | ||
| "created_at" timestamp DEFAULT now() NOT NULL, | ||
| "updated_at" timestamp DEFAULT now() NOT NULL | ||
| ); | ||
| --> statement-breakpoint | ||
| CREATE TABLE "oauth_refresh_token" ( | ||
| "id" text PRIMARY KEY NOT NULL, | ||
| "token" text NOT NULL, | ||
| "client_id" text NOT NULL, | ||
| "session_id" text, | ||
| "user_id" text NOT NULL, | ||
| "reference_id" text, | ||
| "expires_at" timestamp NOT NULL, | ||
| "created_at" timestamp DEFAULT now() NOT NULL, | ||
| "revoked" timestamp, | ||
| "auth_time" timestamp, | ||
| "scopes" jsonb NOT NULL, | ||
| CONSTRAINT "oauth_refresh_token_token_unique" UNIQUE("token") | ||
| ); | ||
| --> statement-breakpoint | ||
| ALTER TABLE "story" ALTER COLUMN "chat_id" DROP NOT NULL;--> statement-breakpoint | ||
| ALTER TABLE "project" ADD COLUMN "mcp_endpoint_settings" jsonb;--> statement-breakpoint | ||
| ALTER TABLE "story" ADD COLUMN "project_id" text;--> statement-breakpoint | ||
| ALTER TABLE "story" ADD COLUMN "user_id" text;--> statement-breakpoint | ||
| ALTER TABLE "mcp_call_log" ADD CONSTRAINT "mcp_call_log_project_id_project_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."project"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint | ||
| ALTER TABLE "mcp_call_log" ADD CONSTRAINT "mcp_call_log_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint | ||
| ALTER TABLE "oauth_access_token" ADD CONSTRAINT "oauth_access_token_client_id_oauth_client_client_id_fk" FOREIGN KEY ("client_id") REFERENCES "public"."oauth_client"("client_id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint | ||
| ALTER TABLE "oauth_access_token" ADD CONSTRAINT "oauth_access_token_session_id_session_id_fk" FOREIGN KEY ("session_id") REFERENCES "public"."session"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint | ||
| ALTER TABLE "oauth_access_token" ADD CONSTRAINT "oauth_access_token_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint | ||
| ALTER TABLE "oauth_access_token" ADD CONSTRAINT "oauth_access_token_refresh_id_oauth_refresh_token_id_fk" FOREIGN KEY ("refresh_id") REFERENCES "public"."oauth_refresh_token"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint | ||
| ALTER TABLE "oauth_client" ADD CONSTRAINT "oauth_client_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint | ||
| ALTER TABLE "oauth_consent" ADD CONSTRAINT "oauth_consent_client_id_oauth_client_client_id_fk" FOREIGN KEY ("client_id") REFERENCES "public"."oauth_client"("client_id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint | ||
| ALTER TABLE "oauth_consent" ADD CONSTRAINT "oauth_consent_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint | ||
| ALTER TABLE "oauth_refresh_token" ADD CONSTRAINT "oauth_refresh_token_client_id_oauth_client_client_id_fk" FOREIGN KEY ("client_id") REFERENCES "public"."oauth_client"("client_id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint | ||
| ALTER TABLE "oauth_refresh_token" ADD CONSTRAINT "oauth_refresh_token_session_id_session_id_fk" FOREIGN KEY ("session_id") REFERENCES "public"."session"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint | ||
| ALTER TABLE "oauth_refresh_token" ADD CONSTRAINT "oauth_refresh_token_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint | ||
| CREATE INDEX "mcp_call_log_projectId_idx" ON "mcp_call_log" USING btree ("project_id");--> statement-breakpoint | ||
| CREATE INDEX "mcp_call_log_userId_idx" ON "mcp_call_log" USING btree ("user_id");--> statement-breakpoint | ||
| CREATE INDEX "mcp_call_log_calledAt_idx" ON "mcp_call_log" USING btree ("called_at");--> statement-breakpoint | ||
| CREATE INDEX "oauth_access_token_clientId_idx" ON "oauth_access_token" USING btree ("client_id");--> statement-breakpoint | ||
| CREATE INDEX "oauth_access_token_userId_idx" ON "oauth_access_token" USING btree ("user_id");--> statement-breakpoint | ||
| CREATE INDEX "oauth_access_token_refreshId_idx" ON "oauth_access_token" USING btree ("refresh_id");--> statement-breakpoint | ||
| CREATE INDEX "oauth_client_userId_idx" ON "oauth_client" USING btree ("user_id");--> statement-breakpoint | ||
| CREATE INDEX "oauth_consent_clientId_idx" ON "oauth_consent" USING btree ("client_id");--> statement-breakpoint | ||
| CREATE INDEX "oauth_consent_userId_idx" ON "oauth_consent" USING btree ("user_id");--> statement-breakpoint | ||
| CREATE INDEX "oauth_refresh_token_clientId_idx" ON "oauth_refresh_token" USING btree ("client_id");--> statement-breakpoint | ||
| CREATE INDEX "oauth_refresh_token_userId_idx" ON "oauth_refresh_token" USING btree ("user_id");--> statement-breakpoint | ||
| CREATE INDEX "oauth_refresh_token_sessionId_idx" ON "oauth_refresh_token" USING btree ("session_id");--> statement-breakpoint | ||
| ALTER TABLE "story" ADD CONSTRAINT "story_project_id_project_id_fk" FOREIGN KEY ("project_id") REFERENCES "public"."project"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint | ||
| ALTER TABLE "story" ADD CONSTRAINT "story_user_id_user_id_fk" FOREIGN KEY ("user_id") REFERENCES "public"."user"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint | ||
| CREATE UNIQUE INDEX "story_standalone_slug_unique" ON "story" USING btree ("project_id","user_id","slug") WHERE "story"."chat_id" IS NULL;--> statement-breakpoint | ||
| CREATE INDEX "story_projectId_idx" ON "story" USING btree ("project_id");--> statement-breakpoint | ||
| CREATE INDEX "story_userId_idx" ON "story" USING btree ("user_id");--> statement-breakpoint | ||
| ALTER TABLE "story" ADD CONSTRAINT "story_owner_required" CHECK ("story"."chat_id" IS NOT NULL OR ("story"."project_id" IS NOT NULL AND "story"."user_id" IS NOT NULL)); | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.