mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-12-02 00:59:32 +01:00
fix(cli-registry): address review on GitHub Copilot run mode
- Drop GH_TOKEN / GITHUB_TOKEN from env.allowedKeys. The allowlist is one global list with no mode context, so they were settable on every session. COPILOT_GITHUB_TOKEN is already admitted by the COPILOT_ prefix. - Declare capabilities.mcpConfig (copilot-json, COPILOT_HOME relocation) so Settings does not list Copilot as unsupported while the sync-only target also lists it. The sync-only row is skipped while the run mode is enabled. - Require a leading alphanumeric on the resume id (path-segment in the registry, matching regex in the schema): --resume's value is optional, so `--resume --yolo` made --yolo its own flag and bypassed the allowAll clamp. Golden cases added; "ids only" wording corrected. - Remove the unread overlays.credStore line and document signing in inside a Docker container. - Add the zh-CN "Run GitHub Copilot" string, pin the new declarations in tests and update the MCP registry expectations.
This commit is contained in:
1 parent
c5de8383e7
commit
dc87ef724c
11 files changed
+108
-42
No files matched your search
@@ -23,3 +23,24 @@ describe('GitHub Copilot custom endpoint (BYOK)', () => {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
describe('GitHub Copilot environment and sync declarations', () => {
|
||||
it('admits only its own COPILOT_ namespace, never the shared GitHub token names', () => {
|
||||
// The env allowlist is one global list with no mode context, so a foreign key here would be
|
||||
// settable on every session. COPILOT_GITHUB_TOKEN is already reachable through the prefix.
|
||||
expect(copilot.env.allowedPrefixes).toEqual(['COPILOT_']);
|
||||
expect(copilot.env.allowedKeys).toEqual([]);
|
||||
});
|
||||
|
||||
it('declares its own MCP config so Settings does not list it as unsupported', () => {
|
||||
expect(copilot.capabilities.mcpConfig).toEqual({
|
||||
path: '.copilot/mcp-config.json',
|
||||
format: 'copilot-json',
|
||||
relocation: { envVar: 'COPILOT_HOME', path: 'mcp-config.json' },
|
||||
});
|
||||
});
|
||||
|
||||
it('seeds no credentials into a Docker case', () => {
|
||||
expect(copilot.overlays?.credStore).toBeUndefined();
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user