mirror of
https://github.com/ruvnet/ruflo.git
synced 2026-11-24 22:28:10 +09:00
Checkpoint: File edits
Automatic checkpoint created by Claude Code - Branch: feature/codex-integration - Timestamp: 2026-02-07T16:36:22Z - Changes: 1 file(s) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e3d04c2318
commit
1639936325
1 file changed
+71
-5
@@ -6,10 +6,56 @@
|
||||
|
||||
import type { ConfigTomlOptions, McpServerConfig, SkillConfig, ConfigProfile } from '../types.js';
|
||||
|
||||
/**
|
||||
* Security configuration options
|
||||
*/
|
||||
interface SecurityConfig {
|
||||
inputValidation?: boolean;
|
||||
pathTraversal?: boolean;
|
||||
secretScanning?: boolean;
|
||||
cveScanning?: boolean;
|
||||
maxFileSize?: number;
|
||||
allowedExtensions?: string[];
|
||||
blockedPatterns?: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
* Performance configuration options
|
||||
*/
|
||||
interface PerformanceConfig {
|
||||
maxAgents?: number;
|
||||
taskTimeout?: number;
|
||||
memoryLimit?: string;
|
||||
cacheEnabled?: boolean;
|
||||
cacheTtl?: number;
|
||||
parallelExecution?: boolean;
|
||||
}
|
||||
|
||||
/**
|
||||
* Logging configuration options
|
||||
*/
|
||||
interface LoggingConfig {
|
||||
level?: 'debug' | 'info' | 'warn' | 'error';
|
||||
format?: 'json' | 'text' | 'pretty';
|
||||
destination?: 'stdout' | 'file' | 'both';
|
||||
filePath?: string;
|
||||
maxFiles?: number;
|
||||
maxSize?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extended configuration options
|
||||
*/
|
||||
interface ExtendedConfigTomlOptions extends ConfigTomlOptions {
|
||||
security?: SecurityConfig;
|
||||
performance?: PerformanceConfig;
|
||||
logging?: LoggingConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* Generate a config.toml file based on the provided options
|
||||
*/
|
||||
export async function generateConfigToml(options: ConfigTomlOptions = {}): Promise<string> {
|
||||
export async function generateConfigToml(options: ExtendedConfigTomlOptions = {}): Promise<string> {
|
||||
const {
|
||||
model = 'gpt-5.3-codex',
|
||||
approvalPolicy = 'on-request',
|
||||
@@ -21,29 +67,49 @@ export async function generateConfigToml(options: ConfigTomlOptions = {}): Promi
|
||||
skills = [],
|
||||
profiles = {},
|
||||
historyPersistence = 'save-all',
|
||||
security = {},
|
||||
performance = {},
|
||||
logging = {},
|
||||
} = options;
|
||||
|
||||
const lines: string[] = [];
|
||||
|
||||
// Header
|
||||
lines.push('# =============================================================================');
|
||||
lines.push('# Claude Flow V3 - Codex Configuration');
|
||||
lines.push('# =============================================================================');
|
||||
lines.push('# Generated by: @claude-flow/codex');
|
||||
lines.push('# Documentation: https://github.com/ruvnet/claude-flow');
|
||||
lines.push('# ');
|
||||
lines.push('# This file configures the Codex CLI for Claude Flow integration.');
|
||||
lines.push('# Place in .agents/config.toml (project) or .codex/config.toml (user).');
|
||||
lines.push('# =============================================================================');
|
||||
lines.push('');
|
||||
lines.push('# =============================================================================');
|
||||
lines.push('# Core Settings');
|
||||
lines.push('# =============================================================================');
|
||||
lines.push('');
|
||||
lines.push('# Model selection');
|
||||
lines.push('# Model selection - the AI model to use for code generation');
|
||||
lines.push('# Options: gpt-5.3-codex, gpt-4o, claude-sonnet, claude-opus');
|
||||
lines.push(`model = "${model}"`);
|
||||
lines.push('');
|
||||
lines.push('# Approval policy: untrusted | on-failure | on-request | never');
|
||||
lines.push('# Approval policy determines when human approval is required');
|
||||
lines.push('# - untrusted: Always require approval');
|
||||
lines.push('# - on-failure: Require approval only after failures');
|
||||
lines.push('# - on-request: Require approval for significant changes');
|
||||
lines.push('# - never: Auto-approve all actions (use with caution)');
|
||||
lines.push(`approval_policy = "${approvalPolicy}"`);
|
||||
lines.push('');
|
||||
lines.push('# Sandbox mode: read-only | workspace-write | danger-full-access');
|
||||
lines.push('# Sandbox mode controls file system access');
|
||||
lines.push('# - read-only: Can only read files, no modifications');
|
||||
lines.push('# - workspace-write: Can write within workspace directory');
|
||||
lines.push('# - danger-full-access: Full file system access (dangerous)');
|
||||
lines.push(`sandbox_mode = "${sandboxMode}"`);
|
||||
lines.push('');
|
||||
lines.push('# Web search: disabled | cached | live');
|
||||
lines.push('# Web search enables internet access for research');
|
||||
lines.push('# - disabled: No web access');
|
||||
lines.push('# - cached: Use cached results when available');
|
||||
lines.push('# - live: Always fetch fresh results');
|
||||
lines.push(`web_search = "${webSearch}"`);
|
||||
lines.push('');
|
||||
|
||||
|
||||
Reference in new issue
Block a user