Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(issue): 补强公开反馈隐私确认 (#2901)
Dashd8c6f42d9101
diff --git a/apps/desktop/src/renderer/features/cc-agent/IssueConfirmCard.tsx b/apps/desktop/src/renderer/features/cc-agent/IssueConfirmCard.tsxindex a305946263..43d5cea656 100644--- a/apps/desktop/src/renderer/features/cc-agent/IssueConfirmCard.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/IssueConfirmCard.tsx@@ -55,6 +55,7 @@ export function IssueConfirmCard({ sessionId, pending, onRespond }: IssueConfirmconst titleInputId = useId();const bodyInputId = useId();const publicNameInputId = useId();+ const [privacyConfirmed, setPrivacyConfirmed] = useState(false);const legacyFixedGithubIdentity =pending.submissionIdentity.kind === 'github-user' ? pending.submissionIdentity : null;const [draft, setDraft] = useState<IssueConfirmDraft>(() => {@@ -84,6 +85,7 @@ export function IssueConfirmCard({ sessionId, pending, onRespond }: IssueConfirmconst confirmedPublicName =selectedIdentity.kind === 'platform' ? normalizeIssuePublicName(publicName) : null;const canSubmit =+ privacyConfirmed &&title.trim().length > 0 &&body.trim().length > 0 &&(selectedIdentity.kind !== 'platform' || confirmedPublicName !== null);@@ -104,6 +106,9 @@ export function IssueConfirmCard({ sessionId, pending, onRespond }: IssueConfirm// cannot unmount the card before its latest edit reaches the draft slot.saveIssueConfirmDraft(sessionId, pending.requestId, next);setDraft(next);+ // The checkbox approves the previous public payload. Any content,+ // identity, attribution, or type change requires a fresh review.+ setPrivacyConfirmed(false);},[draft, pending.requestId, sessionId],);@@ -360,6 +365,16 @@ export function IssueConfirmCard({ sessionId, pending, onRespond }: IssueConfirm})}</p>+ <label className="mt-3 flex cursor-pointer items-start gap-2 text-12 leading-snug text-[var(--chat-input-text)]">+ <input+ type="checkbox"+ checked={privacyConfirmed}+ onChange={(event) => setPrivacyConfirmed(event.target.checked)}+ className="mt-0.5 size-3.5 shrink-0 accent-[var(--accent-cta-bg)]"+ />+ <span>{t('issueAgent.confirm.privacyConfirm')}</span>+ </label>+{/* Action buttons */}<div className="mt-4 flex items-center justify-end gap-2"><buttondiff --git a/apps/desktop/src/renderer/features/cc-agent/__tests__/IssueConfirmCard.test.tsx b/apps/desktop/src/renderer/features/cc-agent/__tests__/IssueConfirmCard.test.tsxindex 57215ce259..cd218e4ab7 100644--- a/apps/desktop/src/renderer/features/cc-agent/__tests__/IssueConfirmCard.test.tsx+++ b/apps/desktop/src/renderer/features/cc-agent/__tests__/IssueConfirmCard.test.tsx@@ -64,6 +64,10 @@ function Harness() {);}+function confirmPublicContent() {+ fireEvent.click(screen.getByRole('checkbox', { name: 'issueAgent.confirm.privacyConfirm' }));+}+afterEach(() => {cleanup();clearIssueConfirmDraftsForSession('session-a');@@ -197,6 +201,7 @@ describe('IssueConfirmCard submission identity', () => {fireEvent.click(screen.getByRole('button', { name: 'issueAgent.confirm.identityGithubUser' }));expect(screen.getByText('issueAgent.confirm.identityGithubUserHint')).not.toBeNull();expect(screen.queryByLabelText('issueAgent.confirm.publicNameLabel')).toBeNull();+ confirmPublicContent();fireEvent.click(screen.getByRole('button', { name: /issueAgent\.confirm\.submit/ }));expect(onRespond).toHaveBeenCalledWith(expect.objectContaining({@@ -239,6 +244,7 @@ describe('IssueConfirmCard submission identity', () => {expect(screen.getByText('issueAgent.confirm.identityGithubUserHint')).not.toBeNull();expect(screen.queryByLabelText('issueAgent.confirm.publicNameLabel')).toBeNull();+ confirmPublicContent();fireEvent.click(screen.getByRole('button', { name: /issueAgent\.confirm\.submit/ }));expect(onRespond).toHaveBeenCalledWith({confirmed: true,@@ -258,6 +264,7 @@ describe('IssueConfirmCard submission identity', () => {const input = screen.getByLabelText('issueAgent.confirm.publicNameLabel') as HTMLInputElement;expect(input.value).toBe('当前昵称');fireEvent.change(input, { target: { value: ' 公开昵称 ' } });+ confirmPublicContent();fireEvent.click(screen.getByRole('button', { name: /issueAgent\.confirm\.submit/ }));expect(onRespond).toHaveBeenCalledWith(expect.objectContaining({@@ -281,6 +288,7 @@ describe('IssueConfirmCard submission identity', () => {expect((screen.getByLabelText('issueAgent.confirm.publicNameLabel') as HTMLInputElement).value,).toBe('issueAgent.confirm.anonymous');+ confirmPublicContent();fireEvent.click(screen.getByRole('button', { name: /issueAgent\.confirm\.submit/ }));expect(onRespond).toHaveBeenCalledWith(expect.objectContaining({@@ -306,4 +314,31 @@ describe('IssueConfirmCard submission identity', () => {expect((input as HTMLInputElement).type).toBe('text');expect((input as HTMLInputElement).maxLength).toBe(100);});++ it('requires explicit public-content confirmation and resets it after edits', () => {+ const onRespond = vi.fn();+ render(+ <IssueConfirmCard sessionId="session-a" pending={platformPending} onRespond={onRespond} />,+ );++ const submit = screen.getByRole('button', { name: /issueAgent\.confirm\.submit/ });+ const confirmation = screen.getByRole('checkbox', {+ name: 'issueAgent.confirm.privacyConfirm',+ });+ expect((submit as HTMLButtonElement).disabled).toBe(true);+ expect((confirmation as HTMLInputElement).checked).toBe(false);++ confirmPublicContent();+ expect((submit as HTMLButtonElement).disabled).toBe(false);++ fireEvent.change(screen.getByLabelText('issueAgent.confirm.bodyLabel'), {+ target: { value: '重新编辑后的正文' },+ });+ expect((confirmation as HTMLInputElement).checked).toBe(false);+ expect((submit as HTMLButtonElement).disabled).toBe(true);++ confirmPublicContent();+ fireEvent.click(submit);+ expect(onRespond).toHaveBeenCalledWith(expect.objectContaining({ body: '重新编辑后的正文' }));+ });});diff --git a/apps/desktop/src/renderer/i18n/locales/en/common.json b/apps/desktop/src/renderer/i18n/locales/en/common.jsonindex cb9c76dea1..a13c57a57d 100644--- a/apps/desktop/src/renderer/i18n/locales/en/common.json+++ b/apps/desktop/src/renderer/i18n/locales/en/common.json@@ -8396,7 +8396,7 @@},"issueAgent": {"command": {- "instruction": "I'd like to file feedback for {{appName}}. Help me turn it into a complete, clear GitHub issue: confirm whether it is a bug or feature request, and ask only for missing or ambiguous details. For bugs, collect the symptoms, reproduction steps, expected and actual behavior, frequency, attempted fixes, and—only with my consent—redacted diagnostic summaries; never include passwords, tokens, email addresses, personal paths, or unrelated files. For feature requests, clarify the use case, current pain point, and desired outcome. Once the information is sufficient, submit it with the submit_github_issue tool via cindy_helper call_tool (category=feedback; you can run list_tools first to check the parameters; a confirmation card will be shown to me before submitting). No GitHub plugin or account setup is required: Cindy's official bot is the default, and a working GitHub account appears only as an optional identity in the confirmation card. After creation, tell me the issue number and link, explain that Cindy is open source, and offer to help me reproduce, fix, test, or extend it from source. If the submission fails, tell me the reason honestly.{{details}}",+ "instruction": "I'd like to file feedback for {{appName}}. Help me turn it into a complete, clear GitHub issue: confirm whether it is a bug or feature request, and ask only for missing or ambiguous details. Summarize or generalize user-provided quotes and examples by default instead of copying information that could identify a person, conversation, or business context. For bugs, collect the symptoms, reproduction steps, expected and actual behavior, frequency, attempted fixes, and—only with my consent—redacted diagnostic summaries; never include passwords, tokens, email addresses, personal paths, or unrelated files. For feature requests, clarify the use case, current pain point, and desired outcome. Once the information is sufficient, submit it with the submit_github_issue tool via cindy_helper call_tool (category=feedback; you can run list_tools first to check the parameters; a confirmation card will be shown to me before submitting). No GitHub plugin or account setup is required: Cindy's official bot is the default, and a working GitHub account appears only as an optional identity in the confirmation card. After creation, tell me the issue number and link, explain that Cindy is open source, and offer to help me reproduce, fix, test, or extend it from source. If the submission fails, tell me the reason honestly.{{details}}","detailsPrefix": "\nMy initial description: {{details}}"},"confirm": {@@ -8405,7 +8405,8 @@"typeFeature": "Feature","titleLabel": "Title","bodyLabel": "Body (Markdown)",- "privacyHint": "Common secrets, personal paths, and email addresses are redacted when detected. Review the public content before submitting.",+ "privacyHint": "The Issue title and body will be public and may be searchable or cached. Automatic redaction only covers some common patterns and cannot detect all sensitive context.",+ "privacyConfirm": "I reviewed the public content above and it contains no personal, conversation, or business information that should remain private","submissionMethodLabel": "Submission Identity","identityGithubUser": "My GitHub account @{{login}}","identityGithubUserHint": "You will be the GitHub author and can edit or close this Issue on GitHub",diff --git a/apps/desktop/src/renderer/i18n/locales/ja/common.json b/apps/desktop/src/renderer/i18n/locales/ja/common.jsonindex 5b50fb0270..f7b1593417 100644--- a/apps/desktop/src/renderer/i18n/locales/ja/common.json+++ b/apps/desktop/src/renderer/i18n/locales/ja/common.json@@ -8383,7 +8383,7 @@},"issueAgent": {"command": {- "instruction": "{{appName}} にフィードバックを送りたいです。情報が揃った明確な GitHub issue にまとめるのを手伝ってください:バグか機能要望かを確認し、不足または曖昧な点だけを質問してください。バグでは現象、再現手順、期待する動作と実際の動作、再現頻度、試した対処をできるだけ確認し、ユーザーの同意がある場合だけ個人情報を除いた診断の要約を含めてください。パスワード、トークン、メールアドレス、個人パス、無関係なファイル内容は含めないでください。機能要望では利用シーン、現在の困りごと、期待する結果を確認してください。情報が揃ったら cindy_helper の call_tool で submit_github_issue ツールを呼び出して提出してください(category=feedback。先に list_tools でパラメータを確認できます。提出前に確認カードが表示されます)。GitHub プラグインやアカウントの設定は不要です。既定では Cindy 公式 Bot が送信し、利用可能な GitHub アカウントがある場合のみ確認カードに追加の送信元として表示されます。作成後は issue 番号とリンクを伝え、Cindy がオープンソースであること、ソースから再現・修正・テスト・機能開発を一緒に進められることを案内してください。提出に失敗した場合は、理由をそのまま教えてください。{{details}}",+ "instruction": "{{appName}} にフィードバックを送りたいです。情報が揃った明確な GitHub issue にまとめるのを手伝ってください:バグか機能要望かを確認し、不足または曖昧な点だけを質問してください。ユーザーが示した発言や例は既定で要約・一般化し、個人、会話、業務を特定できる情報をそのまま転載しないでください。バグでは現象、再現手順、期待する動作と実際の動作、再現頻度、試した対処をできるだけ確認し、ユーザーの同意がある場合だけ個人情報を除いた診断の要約を含めてください。パスワード、トークン、メールアドレス、個人パス、無関係なファイル内容は含めないでください。機能要望では利用シーン、現在の困りごと、期待する結果を確認してください。情報が揃ったら cindy_helper の call_tool で submit_github_issue ツールを呼び出して提出してください(category=feedback。先に list_tools でパラメータを確認できます。提出前に確認カードが表示されます)。GitHub プラグインやアカウントの設定は不要です。既定では Cindy 公式 Bot が送信し、利用可能な GitHub アカウントがある場合のみ確認カードに追加の送信元として表示されます。作成後は issue 番号とリンクを伝え、Cindy がオープンソースであること、ソースから再現・修正・テスト・機能開発を一緒に進められることを案内してください。提出に失敗した場合は、理由をそのまま教えてください。{{details}}","detailsPrefix": "\n最初の説明:{{details}}"},"confirm": {@@ -8392,7 +8392,8 @@"typeFeature": "機能要望","titleLabel": "タイトル","bodyLabel": "本文(Markdown)",- "privacyHint": "検出された一般的な秘密情報、個人パス、メールアドレスはできるだけ自動で隠します。送信前に公開内容を確認してください。",+ "privacyHint": "Issue のタイトルと本文は公開され、検索やキャッシュの対象になる場合があります。自動マスキングで検出できるのは一部の一般的な形式だけで、文脈上の機密情報をすべて判別することはできません。",+ "privacyConfirm": "上記の公開内容を確認し、非公開にすべき個人情報、会話内容、業務情報が含まれていないことを確認しました","submissionMethodLabel": "送信元","identityGithubUser": "自分の GitHub アカウント @{{login}}","identityGithubUserHint": "GitHub 上の Issue 作成者となり、自分で編集またはクローズできます",diff --git a/apps/desktop/src/renderer/i18n/locales/ko/common.json b/apps/desktop/src/renderer/i18n/locales/ko/common.jsonindex 74e17d5f47..62a42fbaa2 100644--- a/apps/desktop/src/renderer/i18n/locales/ko/common.json+++ b/apps/desktop/src/renderer/i18n/locales/ko/common.json@@ -8383,7 +8383,7 @@},"issueAgent": {"command": {- "instruction": "{{appName}}에 피드백을 제출하고 싶습니다. 정보가 충분하고 명확한 GitHub issue로 정리하도록 도와주세요: 버그인지 기능 제안인지 확인하고, 빠진 정보나 모호한 부분만 질문해 주세요. 버그라면 증상, 재현 단계, 기대 동작과 실제 동작, 재현 빈도, 시도한 해결 방법을 최대한 확인하고, 사용자가 동의한 경우에만 민감 정보를 제거한 진단 요약을 포함해 주세요. 비밀번호, 토큰, 이메일 주소, 개인 경로, 관련 없는 파일 내용은 포함하지 마세요. 기능 제안이라면 사용 시나리오, 현재 문제와 원하는 결과를 확인해 주세요. 정보가 충분해지면 cindy_helper의 call_tool로 submit_github_issue 도구를 호출해 제출해 주세요(category=feedback, 먼저 list_tools로 매개변수를 확인할 수 있습니다. 제출 전에 확인 카드가 표시됩니다). GitHub 플러그인이나 계정 설정은 필요하지 않습니다. 기본적으로 Cindy 공식 봇이 제출하며, 사용 가능한 GitHub 계정이 있을 때만 확인 카드에 추가 제출 계정으로 표시됩니다. 생성 후 issue 번호와 링크를 알려 주고, Cindy가 오픈 소스이며 소스에서 재현·수정·테스트·기능 개발을 함께 진행할 수 있다고 안내해 주세요. 제출에 실패하면 이유를 그대로 알려주세요.{{details}}",+ "instruction": "{{appName}}에 피드백을 제출하고 싶습니다. 정보가 충분하고 명확한 GitHub issue로 정리하도록 도와주세요: 버그인지 기능 제안인지 확인하고, 빠진 정보나 모호한 부분만 질문해 주세요. 사용자가 제공한 인용문과 예시는 기본적으로 요약하거나 일반화하고 개인, 대화 또는 업무 맥락을 식별할 수 있는 정보를 그대로 복사하지 마세요. 버그라면 증상, 재현 단계, 기대 동작과 실제 동작, 재현 빈도, 시도한 해결 방법을 최대한 확인하고, 사용자가 동의한 경우에만 민감 정보를 제거한 진단 요약을 포함해 주세요. 비밀번호, 토큰, 이메일 주소, 개인 경로, 관련 없는 파일 내용은 포함하지 마세요. 기능 제안이라면 사용 시나리오, 현재 문제와 원하는 결과를 확인해 주세요. 정보가 충분해지면 cindy_helper의 call_tool로 submit_github_issue 도구를 호출해 제출해 주세요(category=feedback, 먼저 list_tools로 매개변수를 확인할 수 있습니다. 제출 전에 확인 카드가 표시됩니다). GitHub 플러그인이나 계정 설정은 필요하지 않습니다. 기본적으로 Cindy 공식 봇이 제출하며, 사용 가능한 GitHub 계정이 있을 때만 확인 카드에 추가 제출 계정으로 표시됩니다. 생성 후 issue 번호와 링크를 알려 주고, Cindy가 오픈 소스이며 소스에서 재현·수정·테스트·기능 개발을 함께 진행할 수 있다고 안내해 주세요. 제출에 실패하면 이유를 그대로 알려주세요.{{details}}","detailsPrefix": "\n초기 설명: {{details}}"},"confirm": {@@ -8392,7 +8392,8 @@"typeFeature": "기능 제안","titleLabel": "제목","bodyLabel": "본문(Markdown)",- "privacyHint": "감지된 일반적인 비밀 정보, 개인 경로, 이메일 주소는 가능한 범위에서 자동으로 가립니다. 제출 전에 공개 내용을 확인하세요.",+ "privacyHint": "Issue 제목과 본문은 공개되며 검색되거나 캐시될 수 있습니다. 자동 가림은 일부 일반적인 형식만 처리하며 문맥상 민감한 정보를 모두 감지할 수는 없습니다.",+ "privacyConfirm": "위 공개 내용을 검토했으며 비공개로 유지해야 할 개인, 대화 또는 업무 정보가 포함되지 않았음을 확인했습니다","submissionMethodLabel": "제출 계정","identityGithubUser": "내 GitHub 계정 @{{login}}","identityGithubUserHint": "GitHub의 Issue 작성자가 되며 직접 수정하거나 닫을 수 있습니다",diff --git a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.jsonindex 681bea1951..383be4000e 100644--- a/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json+++ b/apps/desktop/src/renderer/i18n/locales/zh-CN/common.json@@ -8383,7 +8383,7 @@},"issueAgent": {"command": {- "instruction": "我想给 {{appName}} 提交一条反馈。请协助我整理成一个高质量、信息完整的 GitHub issue:先确认反馈类型(bug 还是功能建议),只针对缺失或含糊的信息追问;Bug 尽量补齐现象、复现步骤、期望与实际行为、复现频率、已尝试的方法,并在用户同意后纳入经过脱敏的诊断摘要,禁止提交密码、令牌、邮箱、个人路径或无关文件内容;功能建议补齐使用场景、当前痛点和期望结果。信息足够后用 cindy_helper 的 call_tool 调用 submit_github_issue 工具提交(category=feedback,可先 list_tools 查看参数要求;提交前系统会弹确认卡片给我看)。这不需要安装或配置 GitHub 插件:默认由 Cindy 官方 Bot 提交;若当前有可用的 GitHub 账号,确认卡会额外提供本人账号选项。创建成功后告诉我 issue 编号和链接,并说明 Cindy 是开源软件,询问我是否希望通过源码一起复现、修复 Bug、开发功能或准备 PR。如果提交失败,如实告诉我原因。{{details}}",+ "instruction": "我想给 {{appName}} 提交一条反馈。请协助我整理成一个高质量、信息完整的 GitHub issue:先确认反馈类型(bug 还是功能建议),只针对缺失或含糊的信息追问;整理时默认概括或泛化用户提供的原话和示例,不要直接复制可识别个人、对话或业务的信息;Bug 尽量补齐现象、复现步骤、期望与实际行为、复现频率、已尝试的方法,并在用户同意后纳入经过脱敏的诊断摘要,禁止提交密码、令牌、邮箱、个人路径或无关文件内容;功能建议补齐使用场景、当前痛点和期望结果。信息足够后用 cindy_helper 的 call_tool 调用 submit_github_issue 工具提交(category=feedback,可先 list_tools 查看参数要求;提交前系统会弹确认卡片给我看)。这不需要安装或配置 GitHub 插件:默认由 Cindy 官方 Bot 提交;若当前有可用的 GitHub 账号,确认卡会额外提供本人账号选项。创建成功后告诉我 issue 编号和链接,并说明 Cindy 是开源软件,询问我是否希望通过源码一起复现、修复 Bug、开发功能或准备 PR。如果提交失败,如实告诉我原因。{{details}}","detailsPrefix": "\n我的初始描述:{{details}}"},"confirm": {@@ -8392,7 +8392,8 @@"typeFeature": "功能建议","titleLabel": "标题","bodyLabel": "正文(Markdown)",- "privacyHint": "系统会尽量隐藏常见密钥、个人路径和邮箱;提交前请确认公开内容不包含其他隐私。",+ "privacyHint": "Issue 的标题和正文将公开显示,并可能被搜索或缓存。系统只能隐藏部分常见敏感信息,无法识别所有语义隐私。",+ "privacyConfirm": "我已检查以上公开内容,不包含不应公开的个人、对话或业务信息","submissionMethodLabel": "提交身份","identityGithubUser": "我的 GitHub 账号 @{{login}}","identityGithubUserHint": "你将成为该 Issue 的 GitHub 作者,可以在 GitHub 编辑或关闭",diff --git a/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json b/apps/desktop/src/renderer/i18n/locales/zh-TW/common.jsonindex 360ae33ff2..57436b35ba 100644--- a/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json+++ b/apps/desktop/src/renderer/i18n/locales/zh-TW/common.json@@ -8383,7 +8383,7 @@},"issueAgent": {"command": {- "instruction": "我想給 {{appName}} 提交一條反饋。請協助我整理成一個高品質的 GitHub issue:先和我確認反饋型別(bug 還是功能建議),並追問必要細節(現象、復現步驟或使用場景、期望行為);資訊足夠後用 cindy_helper 的 call_tool 呼叫 submit_github_issue 工具提交(category=feedback,可先 list_tools 檢視引數要求;提交前系統會彈確認卡片給我看)。如果提交失敗,如實告訴我原因。{{details}}",+ "instruction": "我想給 {{appName}} 提交一條反饋。請協助我整理成一個高品質的 GitHub issue:先和我確認反饋型別(bug 還是功能建議),並追問必要細節(現象、復現步驟或使用場景、期望行為);整理時預設概括或泛化使用者提供的原話與範例,不要直接複製可識別個人、對話或業務的資訊;資訊足夠後用 cindy_helper 的 call_tool 呼叫 submit_github_issue 工具提交(category=feedback,可先 list_tools 檢視引數要求;提交前系統會彈確認卡片給我看)。如果提交失敗,如實告訴我原因。{{details}}","detailsPrefix": "\n我的初始描述:{{details}}"},"confirm": {@@ -8392,7 +8392,8 @@"typeFeature": "功能建議","titleLabel": "標題","bodyLabel": "正文(Markdown)",- "privacyHint": "偵測到常見金鑰、個人路徑及電子郵件地址時,系統會自動遮蔽。提交前請檢查公開內容。",+ "privacyHint": "Issue 的標題與正文將公開顯示,且可能被搜尋或快取。系統只能遮蔽部分常見敏感資訊,無法辨識所有語意隱私。",+ "privacyConfirm": "我已檢查以上公開內容,不包含不應公開的個人、對話或業務資訊","submissionMethodLabel": "釋出方式","identityGithubUser": "GitHub 帳號 @{{login}} 直接釋出","identityGithubUserHint": "你將成為該 Issue 的 GitHub 作者,可以在 GitHub 編輯或關閉",diff --git a/packages/lizi-mcps/src/__tests__/submitGithubIssueTool.test.ts b/packages/lizi-mcps/src/__tests__/submitGithubIssueTool.test.tsindex 5465cc4518..fd31c9a6dc 100644--- a/packages/lizi-mcps/src/__tests__/submitGithubIssueTool.test.ts+++ b/packages/lizi-mcps/src/__tests__/submitGithubIssueTool.test.ts@@ -55,6 +55,14 @@ function parse(result: XdtHelperToolResult) {}describe('submit_github_issue tool', () => {+ it('要求按最小公开原则泛化用户原话与示例', () => {+ const { registry } = setup();+ const tool = registry.get('submit_github_issue');+ expect(tool?.description).toContain('Bug 和功能建议都遵循最小公开原则');+ expect(tool?.description).toContain('不要逐字复制用户消息');+ expect(tool?.description).toContain('不能识别所有语义隐私');+ });+it('缺参数 → INVALID_ARGS, host 不被调', async () => {const { registry, submit } = setup();const res = await registry.call('submit_github_issue', {});diff --git a/packages/lizi-mcps/src/xdt-helper/submit_github_issue.ts b/packages/lizi-mcps/src/xdt-helper/submit_github_issue.tsindex 6c78375388..a519ac199c 100644--- a/packages/lizi-mcps/src/xdt-helper/submit_github_issue.ts+++ b/packages/lizi-mcps/src/xdt-helper/submit_github_issue.ts@@ -70,7 +70,7 @@ const DESCRIPTION = [`把整理好的用户反馈提交为 ${BRAND_NAME} 官方仓库的 GitHub issue。`,'【流程硬约束】','1) 调用前必须先与用户对话澄清,只针对缺失或含糊的信息提问,不要重复已回答的问题,也不要急着调用。bug 至少确认:现象、复现步骤、期望行为、实际行为、复现频率、已尝试的解决办法;feature 至少确认:使用场景、当前痛点或替代方案、期望结果和建议范围。用户不知道的内容标记为未知,不要猜。',- '2) Bug 可以主动收集用户提供的错误摘要、经过脱敏的日志片段和必要截图说明,但先解释会公开到 GitHub,取得用户同意后再纳入正文。优先摘要而不是整段原始日志;不要提交令牌、密码、邮箱、个人路径、内部域名、私有代码或与问题无关的文件内容。系统会在确认卡前自动隐藏常见密钥、个人路径和邮箱,但仍要让用户检查最终正文。',+ '2) Bug 和功能建议都遵循最小公开原则:默认概括、泛化用户提供的场景与示例,不要逐字复制用户消息、会话标题、真实姓名、账号、业务内容或其它可识别信息。只有复现问题确实需要且用户明确同意公开时,才保留最小必要片段。Bug 可以主动收集用户提供的错误摘要、经过脱敏的日志片段和必要截图说明,但先解释会公开到 GitHub,取得用户同意后再纳入正文。优先摘要而不是整段原始日志;不要提交令牌、密码、邮箱、个人路径、内部域名、私有代码或与问题无关的文件内容。系统会在确认卡前自动隐藏部分常见敏感信息,但不能识别所有语义隐私,仍要让用户检查最终正文。','3) 本工具被调用后会在 App 内弹出系统确认卡片,用户可以编辑标题/正文并确认或取消;最终提交内容以用户确认的版本为准(返回的 final_title 可能与你传入的不同)。确认前不得创建 issue。','4) Cindy 官方 Bot 是默认且始终可用的提交身份,不要求用户安装插件或配置 GitHub。仅当系统实时验证到可用的 Cindy GitHub 账号时,确认卡才额外提供“用本人账号提交”的选项(受其 token 仓库权限约束)。用户确认身份后,提交失败不会静默切换身份。','5) errorCode 语义: USER_CANCELLED = 用户主动取消了本次提交,如实告知即可,不要换参数自动重试; CONFIRM_TIMEOUT = 确认卡片超时无人响应(用户可能不在电脑前),告知用户可以再说一声重新发起; AUTH_NOT_READY / NETWORK_ERROR / SERVER_ERROR / HOST_NOT_READY = 提交失败,如实转告原因,不存在任何绕过确认、权限或失败的提交途径。',@@ -85,7 +85,7 @@ const D_TITLE =const D_BODY ='Markdown 正文。bug 优先用「## 现象 / ## 复现步骤 / ## 期望行为 / ## 实际行为 / ## 复现频率 / ## 已尝试」结构;' +'feature 优先用「## 使用场景 / ## 当前痛点 / ## 诉求 / ## 建议方案」结构,信息来自与用户的对话。' +- '诊断信息只放用户同意公开的、经过脱敏的摘要;缺失信息写“用户未知”或省略,不要编造。' ++ '默认概括并泛化用户原话、真实场景和示例,不要逐字复制可识别的私人或业务内容。诊断信息只放用户同意公开的、经过脱敏的摘要;缺失信息写“用户未知”或省略,不要编造。' +'不要写环境信息(客户端版本 / 版本区域 / OS / 界面语言)和提交人——系统会自动附加。';const D_TYPE = 'bug=缺陷, feature=功能建议。决定 GitHub label。';