Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions apps/web/src/app/config.json/extras.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,27 @@ export const kiloExtras = {
description: 'Hide Kilo Gateway models that may train on your prompts from model listings',
type: 'boolean',
},
sandbox: {
type: 'object',
properties: {
enabled: {
type: 'boolean',
description: 'Enable sandbox confinement for new sessions (default: false)',
},
network: {
type: 'string',
enum: ['allow', 'deny'],
description: 'Control outbound network access from sandboxed tools (default: deny)',
},
writable_paths: {
type: 'array',
items: { type: 'string' },
description: 'Additional filesystem paths that sandboxed tools may write to',
},
},
additionalProperties: false,
description: 'Sandbox configuration for agent tools',
},
commit_message: {
description: 'Configuration for AI-generated commit messages',
type: 'object',
Expand Down
17 changes: 17 additions & 0 deletions apps/web/src/tests/cli-config-schema.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ describe('kilo config.json schema merge', () => {
expect(props.terminal_command_display).toBeDefined();
expect(props.code_edit_display).toBeDefined();
expect(props.hide_prompt_training_models).toBeDefined();
expect(props.sandbox).toBeDefined();
});

test('auto_collapse_reasoning is a boolean', () => {
Expand All @@ -77,6 +78,22 @@ describe('kilo config.json schema merge', () => {
expect(cm.properties.prompt).toEqual(expect.objectContaining({ type: 'string' }));
});

test('sandbox is a first-class config object', () => {
const sandbox = props.sandbox as {
properties: Record<string, { type: string; enum?: string[] }>;
additionalProperties: boolean;
};
expect(sandbox.properties.enabled.type).toBe('boolean');
expect(sandbox.properties.network.enum).toEqual(['allow', 'deny']);
expect(sandbox.properties.writable_paths.type).toBe('array');
expect(sandbox.additionalProperties).toBe(false);

const experimental = props.experimental as { properties: Record<string, unknown> };
expect(experimental.properties.sandbox).toBeUndefined();
expect(experimental.properties.sandbox_restrict_network).toBeUndefined();
expect(experimental.properties.sandbox_writable_paths).toBeUndefined();
});

test('allows null on model and small_model', () => {
const model = props.model as { anyOf: Array<{ type?: string }> };
expect(model.anyOf.some(m => m.type === 'null')).toBe(true);
Expand Down