-
Notifications
You must be signed in to change notification settings - Fork 142
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
7
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
7 commits
Select commit
Hold shift + click to select a range
1754e25
first nao mcp version
socallmebertille 8dd9705
add the hook permission to handle the MCP settings
socallmebertille 006fa83
adapt new permissions hook to the PR
socallmebertille eb7d796
handle fixes from cubic review and real-time update MCP settings on M…
socallmebertille 7002e87
fix(mcp): expose closeProjectSessions and add projectId to McpSession
socallmebertille 24f2c8d
update some issues and improve the tools
socallmebertille e2d0e44
improve description of tools
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,79 @@ | ||
| 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, | ||
| "access_token" text NOT NULL, | ||
| "refresh_token" text NOT NULL, | ||
| "access_token_expires_at" timestamp NOT NULL, | ||
| "refresh_token_expires_at" timestamp NOT NULL, | ||
| "client_id" text NOT NULL, | ||
| "user_id" text, | ||
| "scopes" text NOT NULL, | ||
| "created_at" timestamp DEFAULT now() NOT NULL, | ||
| "updated_at" timestamp DEFAULT now() NOT NULL, | ||
| CONSTRAINT "oauth_access_token_access_token_unique" UNIQUE("access_token"), | ||
| CONSTRAINT "oauth_access_token_refresh_token_unique" UNIQUE("refresh_token") | ||
| ); | ||
| --> statement-breakpoint | ||
| CREATE TABLE "oauth_application" ( | ||
| "id" text PRIMARY KEY NOT NULL, | ||
| "name" text, | ||
| "icon" text, | ||
| "metadata" text, | ||
| "client_id" text NOT NULL, | ||
| "client_secret" text, | ||
| "redirect_urls" text NOT NULL, | ||
| "type" text NOT NULL, | ||
| "authentication_scheme" text, | ||
| "disabled" boolean DEFAULT false, | ||
| "user_id" text, | ||
| "created_at" timestamp DEFAULT now() NOT NULL, | ||
| "updated_at" timestamp DEFAULT now() NOT NULL, | ||
| CONSTRAINT "oauth_application_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 NOT NULL, | ||
| "scopes" text NOT NULL, | ||
| "consent_given" boolean NOT NULL, | ||
| "created_at" timestamp DEFAULT now() NOT NULL, | ||
| "updated_at" timestamp DEFAULT now() NOT NULL | ||
| ); | ||
| --> 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_application_client_id_fk" FOREIGN KEY ("client_id") REFERENCES "public"."oauth_application"("client_id") ON DELETE cascade 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_application" ADD CONSTRAINT "oauth_application_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_application_client_id_fk" FOREIGN KEY ("client_id") REFERENCES "public"."oauth_application"("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 | ||
| 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_application_userId_idx" ON "oauth_application" 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 | ||
| 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.