Code mode: Prisma schema (code_runs, McpServerConfig.codeMode, Role.capabilities, KgSkillSuggestion.kind)

Đã đóng
#1,362 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
38/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
backend, databases

Hướng nghiên cứu

Read AGENTS.md and resolve the dependency on #1361 before editing schema.prisma. Add the four listed schema changes and a migration; clarify the code_runs retention story, and verify that existing installs retain current behavior after migration.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Summary

Schema changes required for code mode. Per AGENTS.md, opening this before touching schema.prisma; each ships with a migration. Depends on #1361.

Changes

  1. code_runs table — audit of every code run: id, organizationId, userId, mcpServerId, source (inline | code-tool id), status, durationMs, tool-call count, error, createdAt. Nested tool calls keep going through tool_invocations, correlated by a codeRunId carried in clientInfo. Needs a retention story (per-plan: 7/30/90 days / 1y+).
  2. McpServerConfig.codeMode — enum/string column off (default) | tools | inline. Governs whether a server exposes saved code tools and/or the inline code_execute tool.
  3. Role.capabilities — JSON column for per-role capability flags, first use inlineCode (may the role run inline code). Keeps capabilities off the tool-allowlist model, which stays per-tool.
  4. KgSkillSuggestion.kind — add a code kind so an agent-proposed code tool becomes a pending suggestion an ADMIN approves, reusing the existing skill approval flow.

Notes

  • McpTool needs no column: a saved code tool is endpointMapping.method = 'code' (JSON field), like static. Tracked in the execution-path issue.
  • Every org-scoped query stays filtered by organizationId.
  • All four default to the current behaviour so the migration is a no-op for existing installs.
Ngôn ngữ chính
TypeScript
Star
856
Fork
82
Merge trung bình
6 giờ 10 phút
Pull request đã merge (30 ngày)
448

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của HelpCode-ai/anythingmcp

Tất cả issue của HelpCode-ai/anythingmcp

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.