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

クローズ
#1,362 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript
領域
backend, databases

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.
主要言語
TypeScript
スター
856
フォーク
82
平均マージ
6時間 10分
マージ済み PR(30日)
448

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

HelpCode-ai/anythingmcp のほかの issue

HelpCode-ai/anythingmcp の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。