Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Hide write-oriented prompts and instructions when write tools are filtered

未关闭
#2,228 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
50/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
停滞
技术栈
github, go
领域
api, backend, tooling

调研方向

先阅读 pkg/inventory/instructions.go 和 pkg/inventory/prompts.go,然后跟踪过滤过程进入 pkg/github/toolset_instructions.go。复现一个只读或 exclude-tool inventory,并比较 AvailableTools、AvailablePrompts 和生成的 instructions。当过滤后的 inventory 不再暴露暗示不可用写入操作的 prompts 或 instruction 文本时,即表示完成;有关已文档化的行为,请参阅 docs/toolsets-and-icons.md。

由索引模型根据 Issue 内容生成。

描述

Problem

Tool filtering can remove write capabilities while prompts and server instructions continue to advertise those same actions. In read-only or explicitly filtered configurations, the server can still expose prompts that instruct the client to create issues, assign Copilot, or open pull requests.

Why now

This server builds instructions and prompts dynamically as part of its safety surface. If filtered capabilities remain documented as available, clients receive contradictory guidance and can plan actions the server has already hidden.

Version under test

  • Commit: b1575edfefde09e3cf7c805aea79a92131271659 (origin/main on 2026-03-17)
  • Runtime: Go 1.25.7, macOS darwin/arm64

Minimal repro

  1. Build an inventory in read-only mode or with write tools excluded.
  2. Inspect AvailableTools, AvailablePrompts, and generated server instructions.
  3. Compare the filtered tool set with the exposed prompts/instruction text.

Expected behavior

If a write tool is hidden by policy, related prompts and write-oriented instructions should disappear or clearly mark the capability as unavailable.

Actual behavior

Prompt availability is filtered only by toolset/feature flags, and instruction generation does not verify that the referenced write tools survived read-only or exclude-tool filtering.

Code paths

  • pkg/inventory/instructions.go
  • pkg/inventory/prompts.go
  • pkg/github/toolset_instructions.go
  • docs/toolsets-and-icons.md

Validation target

Read-only and explicitly filtered inventories should not expose prompts or instruction text that imply unavailable write actions.

主要语言
Go
星标
33.1k
派生
5k
平均合并
2 天 1 小时
30 天内合并 PR
25

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

github/github-mcp-server 的其他 Issue

查看 github/github-mcp-server 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。