Command Line Interface for LLM interaction with tool orchestration, plugin support, and Kubernetes operator
ChatCLI exposes 13 internal agent orchestration functions as tools, not user-facing operations. Tool names lack action verbs (PartitionToolCalls, RunBatch, WrapLegacyOutput, etc.) and describe implementation details rather than user intent. Descriptions are highly technical and assume deep knowledge of the agent framework. Input schemas are present but use abstract types ('object', 'function') without concrete field definitions. No output schemas documented. Parameters lack type constraints and validation guidance. This is a framework introspection API, not a production tool suite for agents to call.
Runs each ContextMutation callback serially in the order given. The orchestrator calls this after a batch of concurrent tools completes — the serial application is what makes it safe for tools to mutate the shared context from within a parallel batch.
Returns the value at key in ToolContext.Extra, plus an ok flag distinguishing 'stored as nil' from 'missing entirely'.
Returns the active concurrency budget, reading the CHATCLI_AGENT_MAX_TOOL_CONCURRENCY environment variable on every call so a /config security mutation takes effect immediately. Values <=0 fall back to the default (10); the upper bound is intentionally not enforced.
Copies every recorded entry from other ToolContext into the current one, deduping. Used by the orchestrator when reconciling per-turn context into the session-scoped state.
Reports whether the orchestrator should partition the batch and run concurrency-safe tools in parallel. Opt-in via CHATCLI_AGENT_PARALLEL_TOOLS=true while the feature bakes in production usage. When false, every tool runs sequentially regardless of its capability flags — preserving the legacy behavior bit-for-bit.
Splits a turn's tool calls into a sequence of batches where each batch is either fully concurrent-safe or fully serial. Consecutive concurrent-safe calls are coalesced into one batch (up to MaxToolConcurrency() — larger groups are split into multiple back-to-back concurrent batches to keep memory bounded). A serial call always opens a fresh batch and any following calls stay in their own batches until the next concurrency-safe run.
Tool names lack action verbs and describe framework internals, not user intent. Names like 'PartitionToolCalls', 'WrapLegacyOutput', 'ApplyMutations' are implementation-focused, not user-facing. LLMs cannot infer when to call these tools.
Input schemas use abstract types ('object', 'function') without concrete field definitions. Parameters like 'policy', 'batch', 'exec', 'sr' lack type constraints, making validation impossible and LLM invocation unreliable.
No output schemas documented for any tool. LLMs cannot plan downstream calls or extract required fields. Descriptions mention return types (e.g., 'returned slice', 'ok flag') but no formal schema.
Inferred effective spec: <=2025-11-25.
| Scored | Grade | Overall | Spec posture | Rubric |
|---|---|---|---|---|
| 2026-09-23 | F | 30 | <=2025-11-25 | v2 |
Stores a value in the Extra bag of ToolContext, allocating the map on first use.
Appends a path to FilesRead in ToolContext, deduping. Called by tools that want to surface a read to the orchestrator's tracking layer (file-staleness, undo, audit) without owning a reference to it.
Appends a path to FilesWritten in ToolContext, deduping.
Appends a host to HostsContacted in ToolContext, deduping.
Executes the calls in batch with the given policy. The returned slice is index-aligned with batch.Calls — entry i corresponds to call i, preserving order even when the batch ran in parallel. An error is returned only for infrastructure failures that aborted the batch; per-tool business errors live inside ToolResult.IsError. Supports both concurrent (with semaphore-bounded fan-out) and serial execution modes.
Builds a ToolResult from the legacy (string, error) shape used by every plugin that hasn't migrated to ExecuteStructured. The error is mapped through ClassifyErrorCode to fill ErrorCode. This is the bridge that lets the orchestrator drive every plugin — legacy or new — through the same ToolResult-shaped pipeline.
Elevates a plugins.StructuredResult into the agent-level ToolResult shape, filling ErrorCode from the infrastructure error when the plugin didn't set it itself. The Duration field is set by the orchestrator after this call; callers do not need to fill it.
Descriptions are highly technical and assume deep framework knowledge (e.g., 'semaphore-bounded fan-out', 'ContextMutation callbacks'). No guidance on when or why an LLM should call these tools.
These are internal orchestration APIs, not user-facing tools. Exposing framework internals (tool batching, context mutation, result wrapping) violates the single-responsibility principle and creates a confusing tool surface for agents.