forked from cleveragents/cleveragents-core
docs(spec): align ASCII UI tables in specification and related pages
Align Unicode box-drawing blocks and related tables in specification.md, ADR-044/045/046, and reference pages for consistent MkDocs rendering. ISSUES CLOSED: #1171
This commit is contained in:
@@ -114,34 +114,34 @@ CleverAgentsApp(App)
|
||||
The MainScreen is the primary interface. It uses a horizontal layout with the conversation taking available space and the sidebar docked to the right:
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────┬──────────────────────┐
|
||||
│ Throbber (height: 1, full width, visible when busy) │ │
|
||||
│ SessionTabs (height: auto, visible when ≥2 sessions)│ │
|
||||
├─────────────────────────────────────────────────────┤ SideBar │
|
||||
│ │ (dock: right) │
|
||||
│ Conversation │ (width: 32-40) │
|
||||
│ (flex: 1fr) │ (max-width: 45%) │
|
||||
│ │ ┌────────────────┐ │
|
||||
│ ┌─ ContentsGrid ─────────────────────────────────┐ │ │ PlansPanel │ │
|
||||
│ │ Cursor │ Contents stream │ │ │ (collapsible) │ │
|
||||
│ │ (1ch) │ - Welcome / UserInput / ActorResponse│ │ │ │ │
|
||||
│ │ │ - ToolCall / PlanProgress / DiffView │ │ ├────────────────┤ │
|
||||
│ │ │ - TerminalEmbed / Note / Warning │ │ │ ProjectsPanel │ │
|
||||
│ └────────┴───────────────────────────────────────┘ │ │ (collapsible) │ │
|
||||
│ │ │ │ │
|
||||
│ Flash (notification bar, height: 1) │ └────────────────┘ │
|
||||
│ │ │
|
||||
│ ┌─ Prompt ───────────────────────────────────────┐ │ │
|
||||
┌──────────────────────────────────────────────────────┬──────────────────────┐
|
||||
│ Throbber (height: 1, full width, visible when busy) │ │
|
||||
│ SessionTabs (height: auto, visible when ≥2 sessions) │ │
|
||||
├──────────────────────────────────────────────────────┤ SideBar │
|
||||
│ │ (dock: right) │
|
||||
│ Conversation │ (width: 32-40) │
|
||||
│ (flex: 1fr) │ (max-width: 45%) │
|
||||
│ │ ┌────────────────┐ │
|
||||
│ ┌─ ContentsGrid ─────────────────────────────────┐ │ │ PlansPanel │ │
|
||||
│ │ Cursor │ Contents stream │ │ │ (collapsible) │ │
|
||||
│ │ (1ch) │ - Welcome / UserInput / ActorResponse│ │ │ │ │
|
||||
│ │ │ - ToolCall / PlanProgress / DiffView │ │ ├────────────────┤ │
|
||||
│ │ │ - TerminalEmbed / Note / Warning │ │ │ ProjectsPanel │ │
|
||||
│ └────────┴───────────────────────────────────────┘ │ │ (collapsible) │ │
|
||||
│ │ │ │ │
|
||||
│ Flash (notification bar, height: 1) │ └────────────────┘ │
|
||||
│ │ │
|
||||
│ ┌─ Prompt ────────────────────────────────────────┐ │ │
|
||||
│ │ ReferencePickerOverlay (overlay, triggered by @)│ │ │
|
||||
│ │ SlashCommandOverlay (overlay, triggered by /) │ │ │
|
||||
│ │ ┌─ PromptContainer ─────────────────────────┐ │ │ │
|
||||
│ │ │ [❯] PromptTextArea │ │ │ │
|
||||
│ │ └───────────────────────────────────────────┘ │ │ │
|
||||
│ │ PersonaBar: name │ actor │ preset │ cost │ │ │
|
||||
│ │ ┌─ PromptContainer ─────────────────────────┐ │ │ │
|
||||
│ │ │ [❯] PromptTextArea │ │ │ │
|
||||
│ │ └───────────────────────────────────────────┘ │ │ │
|
||||
│ │ PersonaBar: name │ actor │ preset │ cost │ │ │
|
||||
│ └─────────────────────────────────────────────────┘ │ │
|
||||
├─────────────────────────────────────────────────────┴──────────────────────┤
|
||||
│ Footer: F1 Help │ shift+tab Sidebar │ tab Persona │ ctrl+q Quit │
|
||||
└────────────────────────────────────────────────────────────────────────────┘
|
||||
├──────────────────────────────────────────────────────┴──────────────────────┤
|
||||
│ Footer: F1 Help │ shift+tab Sidebar │ tab Persona │ ctrl+q Quit │
|
||||
└─────────────────────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
### Sidebar Three-State Behavior
|
||||
|
||||
@@ -175,14 +175,14 @@ The active preset's `display` name appears in the PersonaBar. The effective argu
|
||||
### Persona Lifecycle
|
||||
|
||||
```
|
||||
┌──────────┐ ┌──────────────┐ ┌───────────────┐ ┌──────────┐
|
||||
┌───────────┐ ┌──────────────┐ ┌───────────────┐ ┌──────────┐
|
||||
│ First Run │────►│ Auto-create │────►│ Active in │────►│ Modified │
|
||||
│ (no │ │ "default" │ │ session │ │ by user │
|
||||
│ personas)│ │ persona from │ │ │ │ │
|
||||
└──────────┘ │ actor select │ └───────────────┘ └──────────┘
|
||||
└───────────┘ │ actor select │ └───────────────┘ └──────────┘
|
||||
└──────────────┘ ▲ │
|
||||
│ │
|
||||
└─── Saved to YAML ──┘
|
||||
└─── Saved to YAML ───┘
|
||||
```
|
||||
|
||||
1. **First run**: No personas exist. Actor selection overlay creates a `"default"` persona with auto-generated presets.
|
||||
@@ -212,7 +212,7 @@ The PersonaBar sits directly below the prompt input and is always visible:
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────────────────┐
|
||||
│ ❯ What would you like to do? │
|
||||
│ ▌@▐ refs ▌/▐ commands ▌!▐ shell │
|
||||
│ ▌@▐ refs ▌/▐ commands ▌!▐ shell │
|
||||
└─────────────────────────────────────────────────────────────────────┘
|
||||
feature-dev │ anthropic/claude-4-sonnet │ think: high │ 2 projects │ $0.12
|
||||
```
|
||||
|
||||
@@ -140,22 +140,22 @@ Results are sorted by: (1) match weight descending, (2) recency of access descen
|
||||
Each result shows its type, canonical reference, and contextual information:
|
||||
|
||||
```
|
||||
┌─ Reference Picker ──────────────────────────────────────────┐
|
||||
┌─ Reference Picker ───────────────────────────────────────────┐
|
||||
│ @hand │
|
||||
│ ─────────────────────────────────────────────────────────── │
|
||||
│ ──────────────────────────────────────────────────────────── │
|
||||
│ PROJECT api-service:src/auth/handler.py │
|
||||
│ local/api-service • Python • 245 lines │
|
||||
│ │
|
||||
│ PROJECT cleveragents:git_dir/src/cli/commands/handler.py │
|
||||
│ local/cleveragents • Python • 189 lines │
|
||||
│ │
|
||||
│ PROJECT api-service:src/auth/middleware/handler_base.py │
|
||||
│ PROJECT api-service:src/auth/middleware/handler_base.py │
|
||||
│ local/api-service • Python • 67 lines │
|
||||
│ │
|
||||
│ PLAN fix-auth-handler (01HXM8C2...) │
|
||||
│ Phase: Execute • Actor: claude-4-sonnet │
|
||||
│ │
|
||||
│ ─────────────────────────────────────────────────────────── │
|
||||
│ ──────────────────────────────────────────────────────────── │
|
||||
│ enter Select │ tab Tree │ ctrl+p Projects │ ctrl+l Plans │
|
||||
└──────────────────────────────────────────────────────────────┘
|
||||
```
|
||||
@@ -178,7 +178,7 @@ While the Reference Picker is open:
|
||||
When the user presses `tab` in the Reference Picker, it switches from search mode to tree browser mode. This shows a navigable tree:
|
||||
|
||||
```
|
||||
┌─ Reference Picker (Tree) ───────────────────────────────────┐
|
||||
┌─ Reference Picker (Tree) ────────────────────────────────────┐
|
||||
│ │
|
||||
│ ▼ Projects │
|
||||
│ ▼ local/cleveragents │
|
||||
@@ -230,9 +230,9 @@ Commands are TUI operations that execute immediately without being sent to the a
|
||||
When `/` is typed at position 0, the Slash Command overlay appears with filterable command list:
|
||||
|
||||
```
|
||||
┌─ Commands ──────────────────────────────────────────────────┐
|
||||
┌─ Commands ───────────────────────────────────────────────────┐
|
||||
│ /se │
|
||||
│ ─────────────────────────────────────────────────────────── │
|
||||
│ ──────────────────────────────────────────────────────────── │
|
||||
│ /session:create Create a new session tab │
|
||||
│ /session:list Show all sessions │
|
||||
│ /session:show Show session details │
|
||||
@@ -426,7 +426,7 @@ Shell mode provides direct OS command execution from the TUI prompt.
|
||||
│ │
|
||||
│ Changes not staged for commit: │
|
||||
│ modified: src/auth/handler.py │
|
||||
│ modified: src/auth/middleware.py │
|
||||
│ modified: src/auth/middleware.py │
|
||||
│ │
|
||||
│ Untracked files: │
|
||||
│ src/auth/limiter.py │
|
||||
|
||||
+49
-33
@@ -13,18 +13,34 @@ between the Presentation and Application layers.
|
||||
|
||||
## Table of Contents
|
||||
|
||||
- [Agent Card](#agent-card)
|
||||
- [Transport Modes](#transport-modes)
|
||||
- [Standard A2A Operations](#standard-a2a-operations)
|
||||
- [Extension Methods](#extension-methods)
|
||||
- [Streaming Events](#streaming-events)
|
||||
- [Multi-Turn Interactions](#multi-turn-interactions)
|
||||
- [Local Facade](#local-facade)
|
||||
- [Service Wiring](#service-wiring)
|
||||
- [Error Code Taxonomy](#error-code-taxonomy)
|
||||
- [Authentication](#authentication)
|
||||
- [Client Architecture](#client-architecture)
|
||||
- [Error Hierarchy](#error-hierarchy)
|
||||
- [A2A (Agent-to-Agent Protocol) Reference](#a2a-agent-to-agent-protocol-reference)
|
||||
- [Overview](#overview)
|
||||
- [Table of Contents](#table-of-contents)
|
||||
- [Agent Card](#agent-card)
|
||||
- [Transport Modes](#transport-modes)
|
||||
- [Standard A2A Operations](#standard-a2a-operations)
|
||||
- [Extension Methods](#extension-methods)
|
||||
- [Plan Operations](#plan-operations)
|
||||
- [Registry Operations](#registry-operations)
|
||||
- [Context Operations](#context-operations)
|
||||
- [Sync Operations](#sync-operations)
|
||||
- [Namespace Operations](#namespace-operations)
|
||||
- [Health and Diagnostics](#health-and-diagnostics)
|
||||
- [Streaming Events](#streaming-events)
|
||||
- [Task Lifecycle States](#task-lifecycle-states)
|
||||
- [Example Streaming Event](#example-streaming-event)
|
||||
- [Multi-Turn Interactions](#multi-turn-interactions)
|
||||
- [Local Facade](#local-facade)
|
||||
- [Constructor](#constructor)
|
||||
- [Methods](#methods)
|
||||
- [Service Wiring](#service-wiring)
|
||||
- [Service Keys](#service-keys)
|
||||
- [Error Code Taxonomy](#error-code-taxonomy)
|
||||
- [Example Error Response](#example-error-response)
|
||||
- [Authentication](#authentication)
|
||||
- [Client Architecture](#client-architecture)
|
||||
- [Components](#components)
|
||||
- [Error Hierarchy](#error-hierarchy)
|
||||
|
||||
---
|
||||
|
||||
@@ -117,7 +133,7 @@ Platform operations use `_cleveragents/`-prefixed extension methods
|
||||
### Plan Operations
|
||||
|
||||
| Method | Service Method | Required Params |
|
||||
|--------|---------------|-----------------|
|
||||
|--------|----------------|-----------------|
|
||||
| `_cleveragents/plan/use` | `PlanService.create_plan()` | `action_name`, `project_names` |
|
||||
| `_cleveragents/plan/execute` | `PlanLifecycle.execute()` | `plan_id` |
|
||||
| `_cleveragents/plan/apply` | `PlanLifecycle.apply()` | `plan_id` |
|
||||
@@ -139,7 +155,7 @@ Pattern applies to all entity types (`actor`, `skill`, `tool`, `validation`,
|
||||
`invariant`, `lsp`):
|
||||
|
||||
| Method Pattern | Service Method Pattern | Required Params |
|
||||
|---------------|----------------------|-----------------|
|
||||
|----------------|------------------------|-----------------|
|
||||
| `_cleveragents/registry/{entity}/list` | `{Entity}Service.list()` | `namespace` (optional) |
|
||||
| `_cleveragents/registry/{entity}/show` | `{Entity}Service.show()` | `name` |
|
||||
| `_cleveragents/registry/{entity}/add` | `{Entity}Service.add()` | Entity-specific fields |
|
||||
@@ -226,7 +242,7 @@ A2A replaces protocol-level callbacks with multi-turn interactions via the
|
||||
Task lifecycle:
|
||||
|
||||
| Interaction | How It Works |
|
||||
|-------------|-------------|
|
||||
|-------------|--------------|
|
||||
| Human-in-the-loop approval | Task enters `input-required` state; client displays prompt; client responds via `message/send` |
|
||||
| File access (read/write) | `_cleveragents/fs/*` extension methods handled locally by client |
|
||||
| Terminal access | `_cleveragents/terminal/*` extension methods handled locally by client |
|
||||
@@ -258,16 +274,16 @@ result = await facade.dispatch("_cleveragents/plan/status", {"plan_id": "01J..."
|
||||
### Constructor
|
||||
|
||||
| Parameter | Type | Default | Description |
|
||||
|-----------|----------------------------|---------|-------------------------------|
|
||||
| `services` | `dict[str, Any] \| None` | `None` | Named services for routing |
|
||||
|------------|----------------------------|---------|-------------------------------|
|
||||
| `services` | `dict[str, Any] \| None` | `None` | Named services for routing |
|
||||
|
||||
### Methods
|
||||
|
||||
| Method | Returns | Description |
|
||||
|---------------------|-------------------|--------------------------------------|
|
||||
| `dispatch(method, params)` | `dict` | Route extension method to handler |
|
||||
| `register_service` | `None` | Register a named service |
|
||||
| `list_methods` | `list[str]` | All supported extension method names |
|
||||
| Method | Returns | Description |
|
||||
|----------------------------|-------------------|--------------------------------------|
|
||||
| `dispatch(method, params)` | `dict` | Route extension method to handler |
|
||||
| `register_service` | `None` | Register a named service |
|
||||
| `list_methods` | `list[str]` | All supported extension method names |
|
||||
|
||||
---
|
||||
|
||||
@@ -279,15 +295,15 @@ registered later with `register_service()`.
|
||||
|
||||
### Service Keys
|
||||
|
||||
| Key | Type | Wired Methods |
|
||||
| Key | Type | Wired Methods |
|
||||
|------------------------------|-----------------------------|-------------------------------------|
|
||||
| `session_service` | `SessionWorkflow` | Standard message operations |
|
||||
| `plan_lifecycle_service` | `PlanLifecycleService` | `_cleveragents/plan/*` |
|
||||
| `tool_registry` | `ToolRegistry` | `_cleveragents/registry/tool/*` |
|
||||
| `session_service` | `SessionWorkflow` | Standard message operations |
|
||||
| `plan_lifecycle_service` | `PlanLifecycleService` | `_cleveragents/plan/*` |
|
||||
| `tool_registry` | `ToolRegistry` | `_cleveragents/registry/tool/*` |
|
||||
| `resource_registry_service` | `ResourceRegistryService` | `_cleveragents/registry/resource/*` |
|
||||
| `sync_service` | `SyncService` | `_cleveragents/sync/*` |
|
||||
| `namespace_service` | `NamespaceService` | `_cleveragents/namespace/*` |
|
||||
| `context_service` | `ContextService` | `_cleveragents/context/*` |
|
||||
| `sync_service` | `SyncService` | `_cleveragents/sync/*` |
|
||||
| `namespace_service` | `NamespaceService` | `_cleveragents/namespace/*` |
|
||||
| `context_service` | `ContextService` | `_cleveragents/context/*` |
|
||||
|
||||
---
|
||||
|
||||
@@ -381,8 +397,8 @@ CleverAgentsError
|
||||
└── A2aOperationNotFoundError
|
||||
```
|
||||
|
||||
| Exception | When Raised |
|
||||
|-----------------------------|-------------------------------------------|
|
||||
| Exception | When Raised |
|
||||
|-----------------------------|----------------------------------------------------|
|
||||
| `A2aNotAvailableError` | Server-mode operation attempted without connection |
|
||||
| `A2aVersionMismatchError` | Unsupported A2A version |
|
||||
| `A2aOperationNotFoundError` | Unknown method dispatched |
|
||||
| `A2aVersionMismatchError` | Unsupported A2A version |
|
||||
| `A2aOperationNotFoundError` | Unknown method dispatched |
|
||||
|
||||
@@ -9,34 +9,33 @@ Phase 2 components respectively.
|
||||
## Architecture
|
||||
|
||||
```
|
||||
┌─────────────────────────────────────────────────────────┐
|
||||
┌──────────────────────────────────────────────────────────┐
|
||||
│ StrategyCoordinator │
|
||||
│ ┌─────────────────┐ ┌──────────────────┐ ┌──────────┐ │
|
||||
│ │ Confidence │ │ Proportional │ │ Parallel │ │
|
||||
│ │ Weighted │ │ Budget │ │ Strategy │ │
|
||||
│ │ Selector │ │ Allocator │ │ Executor │ │
|
||||
│ └────────┬────────┘ └────────┬─────────┘ └────┬─────┘ │
|
||||
│ │ select │ allocate │execute │
|
||||
│ └───────────────────┴─────────────────┘ │
|
||||
│ ┌──────────────────┐ ┌──────────────────┐ ┌──────────┐ │
|
||||
│ │ Confidence │ │ Proportional │ │ Parallel │ │
|
||||
│ │ Weighted │ │ Budget │ │ Strategy │ │
|
||||
│ │ Selector │ │ Allocator │ │ Executor │ │
|
||||
│ └────────┬─────────┘ └────────┬─────────┘ └────┬─────┘ │
|
||||
│ │ select │ allocate │execute │
|
||||
│ └────────────────────┴────────────────┘ │
|
||||
│ coordinate() │
|
||||
└─────────────────────────┬───────────────────────────────┘
|
||||
└─────────────────────────┬────────────────────────────────┘
|
||||
│ fragments
|
||||
▼
|
||||
┌─────────────────────────────────────────────────────────┐
|
||||
│ FusionEngine │
|
||||
│ ┌──────────┐ ┌───────────┐ ┌─────────┐ ┌───────────┐ │
|
||||
│ │ Content │ │ Max Depth │ │Weighted │ │ Greedy │ │
|
||||
│ │ Hash │ │ Resolver │ │Composite│ │ Knapsack │ │
|
||||
│ │ Dedup │ │ │ │ Scorer │ │ Packer │ │
|
||||
│ └────┬─────┘ └─────┬─────┘ └────┬────┘ └─────┬─────┘ │
|
||||
│ │ dedup │ resolve │ score │ pack │
|
||||
│ └──────────────┴────────────┴─────────────┘ │
|
||||
│ fuse() │
|
||||
│ ┌──────────────────────────────────────────────────┐ │
|
||||
│ │ Budget Overage Guard │ │
|
||||
│ │ Drop lowest-relevance fragments if over budget │ │
|
||||
│ └──────────────────────────────────────────────────┘ │
|
||||
└─────────────────────────────────────────────────────────┘
|
||||
┌────────────────────────────────────────────────────────┐
|
||||
│ FusionEngine │
|
||||
│ ┌──────────┐ ┌───────────┐ ┌─────────┐ ┌───────────┐ │
|
||||
│ │ Content │ │ Max Depth │ │Weighted │ │ Greedy │ │
|
||||
│ │ Hash │ │ Resolver │ │Composite│ │ Knapsack │ │
|
||||
│ │ Dedup │ │ │ │ Scorer │ │ Packer │ │
|
||||
│ └────┬─────┘ └─────┬─────┘ └────┬────┘ └─────┬─────┘ │
|
||||
│ │ dedup │ resolve │ score │ pack │
|
||||
│ └─────────────┴────────────┴────────────┘ │
|
||||
│ fuse() │
|
||||
│ ┌──────────────────────────────────────────────────┐ │
|
||||
│ │ Budget Overage Guard │ │
|
||||
│ │ Drop lowest-relevance fragments if over budget │ ││ └──────────────────────────────────────────────────┘ │
|
||||
└────────────────────────────────────────────────────────┘
|
||||
```
|
||||
|
||||
## StrategyCoordinator
|
||||
|
||||
@@ -47,19 +47,19 @@ The `commit` field is resolved in the following order:
|
||||
### Sample output — rich (default)
|
||||
|
||||
```
|
||||
╭──────── CLI Version ────────╮
|
||||
╭──────── CLI Version ─────────╮
|
||||
│ CleverAgents CLI │
|
||||
│ Version: 1.0.0 │
|
||||
│ Channel: stable │
|
||||
│ Python: 3.13.2 │
|
||||
╰──────────────────────────────╯
|
||||
╭──────── Build ──────────────╮
|
||||
│ Build Date: 2026-02-17 │
|
||||
╭──────── Build ───────────────╮
|
||||
│ Build Date: 2026-02-17 │
|
||||
│ Commit: 6de85ca │
|
||||
│ Schema: v3 │
|
||||
│ Platform: linux-x86_64 │
|
||||
╰──────────────────────────────╯
|
||||
╭──────── Dependencies ───────╮
|
||||
╭──────── Dependencies ────────╮
|
||||
│ langgraph: 0.3.34 │
|
||||
│ langchain-core: 0.3.41 │
|
||||
│ pydantic: 2.11.1 │
|
||||
@@ -142,19 +142,19 @@ agents info [--format rich|plain|json|yaml]
|
||||
### Sample output — rich (default)
|
||||
|
||||
```
|
||||
╭──────── Environment ────────╮
|
||||
╭──────── Environment ─────────╮
|
||||
│ Data Dir: /home/user/... │
|
||||
│ Config: config.toml │
|
||||
│ Database: sqlite:///... │
|
||||
│ Database: sqlite:///... │
|
||||
│ Server Mode: disabled │
|
||||
│ Platform: Linux 6.x (x86) │
|
||||
╰──────────────────────────────╯
|
||||
╭──────── Runtime ────────────╮
|
||||
╭──────── Runtime ─────────────╮
|
||||
│ Automation: suggest │
|
||||
│ Providers: 2 configured │
|
||||
│ Debug Mode: False │
|
||||
╰──────────────────────────────╯
|
||||
╭──────── Storage ────────────╮
|
||||
╭──────── Storage ─────────────╮
|
||||
│ db_size: 0.1 MB │
|
||||
│ logs: 0.0 MB │
|
||||
╰──────────────────────────────╯
|
||||
@@ -237,31 +237,31 @@ a gate that blocks deployment when critical checks fail.
|
||||
|
||||
```
|
||||
Checks
|
||||
┏━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓
|
||||
┃ Check ┃ Status┃ Details ┃
|
||||
┡━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━┩
|
||||
┏━━━━━━━━━━━━━━━━━━┳━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━┓
|
||||
┃ Check ┃ Status┃ Details ┃
|
||||
┡━━━━━━━━━━━━━━━━━━╇━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━┩
|
||||
│ Config file │ OK │ not present (defaults)│
|
||||
│ Data directory │ OK │ writable │
|
||||
│ Database │ OK │ writable │
|
||||
│ Openai key │ OK │ configured │
|
||||
│ Anthropic key │ WARN │ missing │
|
||||
│ Google key │ WARN │ missing │
|
||||
│ Openrouter key │ WARN │ missing │
|
||||
│ Disk space │ OK │ 42.1 GB free │
|
||||
│ File permissions │ OK │ data dir r/w │
|
||||
│ Git │ OK │ git 2.43.0 │
|
||||
└──────────────────┴───────┴──────────────────────┘
|
||||
│ Data directory │ OK │ writable │
|
||||
│ Database │ OK │ writable │
|
||||
│ Openai key │ OK │ configured │
|
||||
│ Anthropic key │ WARN │ missing │
|
||||
│ Google key │ WARN │ missing │
|
||||
│ Openrouter key │ WARN │ missing │
|
||||
│ Disk space │ OK │ 42.1 GB free │
|
||||
│ File permissions │ OK │ data dir r/w │
|
||||
│ Git │ OK │ git 2.43.0 │
|
||||
└──────────────────┴───────┴───────────────────────┘
|
||||
╭──────── Summary ────────────╮
|
||||
│ Checks: 10 total │
|
||||
│ Warnings: 3 │
|
||||
│ Errors: 0 │
|
||||
│ Duration: 0.03s │
|
||||
╰──────────────────────────────╯
|
||||
╰─────────────────────────────╯
|
||||
╭──────── Recommendations ────╮
|
||||
│ - Set ANTHROPIC_API_KEY ... │
|
||||
│ - Set GOOGLE_API_KEY ... │
|
||||
│ - Set OPENROUTER_API_KEY ...│
|
||||
╰──────────────────────────────╯
|
||||
╰─────────────────────────────╯
|
||||
OK All checks passed
|
||||
```
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ with 10K+ files.
|
||||
resource_id + root_path
|
||||
|
|
||||
v
|
||||
┌─── RepoIndexingService ───┐
|
||||
┌─── RepoIndexingService ─────┐
|
||||
│ walk filesystem │
|
||||
│ apply include/exclude globs│
|
||||
│ enforce max_file_size │
|
||||
@@ -19,9 +19,9 @@ resource_id + root_path
|
||||
│ SHA-256 content hashing │
|
||||
│ extension language detect │
|
||||
│ estimate token counts │
|
||||
└──────────┬─────────────────┘
|
||||
└──────────┬──────────────────┘
|
||||
v
|
||||
┌─── SQLite persistence ─────┐
|
||||
┌─── SQLite persistence ──────┐
|
||||
│ repo_indexes table │
|
||||
│ indexed_files table │
|
||||
└─────────────────────────────┘
|
||||
|
||||
@@ -8,15 +8,15 @@ protocol and are registered via TOML configuration or programmatic API.
|
||||
|
||||
```
|
||||
ContextRequest
|
||||
┌─── StrategySelector ───┐
|
||||
┌─── StrategySelector ────┐
|
||||
│ can_handle() polling │
|
||||
└──────────┬──────────────┘
|
||||
v
|
||||
┌─── BudgetAllocator ────┐
|
||||
┌─── BudgetAllocator ─────┐
|
||||
│ proportional alloc │
|
||||
└──────────┬──────────────┘
|
||||
v
|
||||
┌─── StrategyExecutor ───┐
|
||||
┌─── StrategyExecutor ────┐
|
||||
│ parallel w/ timeout │
|
||||
│ circuit breaker │
|
||||
└──────────┬──────────────┘
|
||||
|
||||
@@ -7,8 +7,8 @@ targeted correction and replay.
|
||||
|
||||
## Decision Types
|
||||
|
||||
| Type | Phase | Description |
|
||||
|--------------------------|------------|------------------------------------------|
|
||||
| Type | Phase | Description |
|
||||
|--------------------------|------------|-------------------------------------------|
|
||||
| `prompt_definition` | Strategize | Root decision — the plan prompt |
|
||||
| `invariant_enforced` | Strategize | An invariant constraint was applied |
|
||||
| `strategy_choice` | Strategize | High-level approach chosen |
|
||||
|
||||
@@ -109,7 +109,7 @@ detected ──► building ──► running ──► stopping ──► stopp
|
||||
└──► building │
|
||||
(retry) (rebuild)
|
||||
│
|
||||
stopped ───────┘
|
||||
stopped ────────┘
|
||||
```
|
||||
|
||||
### States
|
||||
|
||||
@@ -60,8 +60,8 @@ All errors are mapped to HTTP-like numeric codes:
|
||||
| 523 | FILESYSTEM_ERROR | FileSystemError |
|
||||
| 524 | NETWORK_ERROR | NetworkError |
|
||||
| 525 | CONFIGURATION_ERROR | ConfigurationError |
|
||||
| 526 | TOKEN_LIMIT | TokenLimitExceededError |
|
||||
| 527 | MODEL_UNAVAILABLE | ModelNotAvailableError |
|
||||
| 526 | TOKEN_LIMIT | TokenLimitExceededError |
|
||||
| 527 | MODEL_UNAVAILABLE | ModelNotAvailableError |
|
||||
| 528 | STREAM_ERROR | StreamRoutingError |
|
||||
|
||||
## Error Categories
|
||||
|
||||
@@ -90,8 +90,8 @@ overlaying the child's explicitly declared scalar fields on top of the parent's
|
||||
resolved fields (which may themselves be inherited). This is a simple
|
||||
**last-writer-wins** override for scalar values:
|
||||
|
||||
| Field | Resolution |
|
||||
|--------------------|---------------------------------------------------|
|
||||
| Field | Resolution |
|
||||
|--------------------|----------------------------------------------------|
|
||||
| `description` | Child value wins if set, otherwise parent's value. |
|
||||
| `resource_kind` | Child value wins if set, otherwise parent's value. |
|
||||
| `sandbox_strategy` | Child value wins if set, otherwise parent's value. |
|
||||
|
||||
@@ -29,9 +29,9 @@ Source Code ──► SemanticValidationService.check_file() ──► [Semantic
|
||||
|
||||
## Built-in Rules
|
||||
|
||||
| Rule | Description | Default Severity |
|
||||
|--------------------|-------------------------------------------------------|-----------------|
|
||||
| `syntax_error` | Parses source via `ast.parse` | `error` |
|
||||
| Rule | Description | Default Severity|
|
||||
|--------------------|---------------------------------------------------------|-----------------|
|
||||
| `syntax_error` | Parses source via `ast.parse` | `error` |
|
||||
| `missing_import` | Flags imports not in `sys.stdlib_module_names` | `warn` |
|
||||
| `broken_reference` | Detects names not defined in any scope (scope-aware) | `warn` |
|
||||
| `duplicate_import` | Finds duplicate relative imports | `error` |
|
||||
@@ -62,9 +62,9 @@ string literals that happen to contain these function names.
|
||||
Each rule produces findings with a severity level. The severity determines
|
||||
how the finding integrates with the `ValidationPipeline`:
|
||||
|
||||
| Severity | Pipeline Mode | Behaviour |
|
||||
|----------|------------------|------------------------------------|
|
||||
| `error` | `required` | Failure **blocks** the operation |
|
||||
| Severity | Pipeline Mode | Behaviour |
|
||||
|----------|------------------|-------------------------------------|
|
||||
| `error` | `required` | Failure **blocks** the operation |
|
||||
| `warn` | `informational` | Failure is reported, does not block |
|
||||
| `info` | `informational` | Informational only |
|
||||
|
||||
@@ -254,12 +254,12 @@ results = service.as_pipeline_results(source, "module.py")
|
||||
|
||||
### `SemanticValidationService`
|
||||
|
||||
| Method | Description |
|
||||
|-----------------------|------------------------------------------------|
|
||||
| `check_file()` | Run all (or selected) rules on source code |
|
||||
| `as_pipeline_results()` | Same as `check_file` but returns pipeline dicts |
|
||||
| `normalise_output()` | Normalise a single result to passed/message/data |
|
||||
| `enabled` | Whether semantic validation is globally enabled |
|
||||
| `python_enabled` | Whether Python-specific checks are enabled |
|
||||
| `registry` | The rule registry instance |
|
||||
| `cache` | The result cache instance |
|
||||
| Method | Description |
|
||||
|-------------------------|---------------------------------------------------|
|
||||
| `check_file()` | Run all (or selected) rules on source code |
|
||||
| `as_pipeline_results()` | Same as `check_file` but returns pipeline dicts |
|
||||
| `normalise_output()` | Normalise a single result to passed/message/data |
|
||||
| `enabled` | Whether semantic validation is globally enabled |
|
||||
| `python_enabled` | Whether Python-specific checks are enabled |
|
||||
| `registry` | The rule registry instance |
|
||||
| `cache` | The result cache instance |
|
||||
|
||||
@@ -12,7 +12,7 @@ Based on `docs/specification.md` lines 41940--42499.
|
||||
```
|
||||
Code Change ──► Analyzer ──► TemporalService.create_revision()
|
||||
│
|
||||
┌──────────┴──────────┐
|
||||
┌──────────┴───────────┐
|
||||
│ TemporalBackend │
|
||||
│ ┌─────────────────┐ │
|
||||
│ │ Old node: │ │
|
||||
|
||||
+293
-293
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user