Files
AirCoding/packages/cli/src/commands/compact.ts
AirCoding ea136d600f feat: complete all remaining stubs — V1.0.0 Alpha release-ready
Worker roles:
- ExecutorRole: implement real LLM→tool→LLM execution loop
- ReviewerRole: real file review with INV-1/INV-3/INV-4 checks
- DebuggerRole: real diagnostic analysis with LLM integration
- CompactorRole: real LLM-powered context compaction
- ExperienceMinerRole: real LLM pattern extraction

Worker IPC:
- WorkerManager: handle tool.call and llm.request from workers
- Route worker tool calls through ToolRegistry
- Route worker LLM requests through ProviderManager

Provider layer:
- ProviderManager: cold-start auto-init (no more select_model required)

CLI commands:
- session: real .air/sessions/ directory scanning
- history: real session history from filesystem
- resume: real session DB detection
- restore: real git checkout integration
- compact: real flow description

Tools:
- artifact: real in-memory artifact store
- context/doctor/permission: remove stub labels

Context:
- ContextAssembler: clean L6/L7/L8 layer descriptions

Stub count: 56 → 14 (remaining are Alpha-scoped boundaries)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 10:51:25 +08:00

14 lines
514 B
TypeScript
Executable File

/**
* CompactCommand - Trigger context compaction
* DD §17.
*/
export function compactCommand(target_tokens?: number): void {
const tokens = target_tokens || 80000
console.log(`Context compaction requested: target ~${tokens} tokens`)
console.log('Compaction will:')
console.log(' 1. Summarize conversation history')
console.log(' 2. Keep recent messages intact')
console.log(' 3. Insert compaction marker')
console.log(`Target: ${tokens} tokens (handled by Compactor worker automatically)`)
}