feat(tools): add kubernetes homelab awareness tools
This commit is contained in:
@@ -20,6 +20,9 @@ const ALL_TOOL_NAMES = [
|
||||
'minio.share',
|
||||
'minio.ingest',
|
||||
'minio.sync',
|
||||
'k8s.pods',
|
||||
'k8s.deployments',
|
||||
'k8s.logs',
|
||||
'process.start',
|
||||
'process.status',
|
||||
'process.output',
|
||||
@@ -497,6 +500,19 @@ describe('ToolPolicy', () => {
|
||||
expect(names).not.toContain('shell.exec');
|
||||
});
|
||||
|
||||
it('expands group:k8s', () => {
|
||||
const policy = new ToolPolicy(defaultConfig({
|
||||
profile: 'minimal',
|
||||
allow: ['group:k8s'],
|
||||
}));
|
||||
const result = policy.filterTools(ALL_TOOLS);
|
||||
const names = result.map(t => t.name);
|
||||
expect(names).toContain('k8s.pods');
|
||||
expect(names).toContain('k8s.deployments');
|
||||
expect(names).toContain('k8s.logs');
|
||||
expect(names).not.toContain('shell.exec');
|
||||
});
|
||||
|
||||
it('unknown group name passes through as literal', () => {
|
||||
const policy = new ToolPolicy(defaultConfig({
|
||||
profile: 'minimal',
|
||||
|
||||
Reference in New Issue
Block a user