summaryrefslogtreecommitdiffstats
path: root/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'README.md')
-rwxr-xr-xREADME.md26
1 files changed, 26 insertions, 0 deletions
diff --git a/README.md b/README.md
index bb62aa4..b2d4bd7 100755
--- a/README.md
+++ b/README.md
@@ -38,14 +38,34 @@ This is a naive library, and as such, does not provide input validation. If data
A dynamically resizing buffer with embedded metadata. Stores capacity, element count, and element size preceding the data pointer. Automatically doubles capacity when usage exceeds 80%, and halves when below 20% (minimum capacity of 32).
+## clio.h - Pseudo-TUI Layout
+
+A minimal layout layer over escape.h: escape.h owns styling (SGR, cursor motion, clear, color), clio.h owns layout — where text goes, how it wraps and clips, and how a composed frame reaches the terminal. Apps compose frames into an in-memory cell grid (canvas); `clio_flush` diffs the canvas against the last flushed frame and blits only changed rows through escape.h. Non-tty output (pipes, CI) falls back to plain text lines so piped output stays clean. Also provides a pure chunk-fed key decoder (testable without a tty), raw-mode key reading with a bounded queue, and a single-line editor (`clio_readline`) that renders into the canvas. No global state; each `clio_term` is independent.
+
+**Dependencies:** escape.h (styling layer — the `esc_*` functions need one defining TU with `ESCAPE_IMPLEMENTATION`) and type.h.
+
## direct.h - Computation Graph
A computation graph library with topological update ordering. Nodes are connected via edges and evaluated in dependency order using DFS. Uses a generation counter to avoid re-evaluating unchanged nodes. Provides basic arithmetic node functions (add, subtract) as examples.
+## dotagents.h - .agents Protocol (read-only)
+
+Parses and resolves the two-layer `.agents/` directory convention (global `~/.agents/` plus workspace `./.agents/`, workspace winning on conflicts): AGENTS.md guidelines, system prompt, `mcp.json`, `models.json` presets, `speakmcp-settings.json`, `layouts/ui.json`, skills, sub-agent profiles, repeat tasks, and persistent memories. Read-only — it never writes. Load never fails: missing layers and malformed files become warnings, never hard errors. Output is id-sorted for stable diffs.
+
+**Dependencies:** frontmatter.h and libc.
+
## escape.h - ANSI Escape Codes
This library provides utility functions and macros for an assortment of ANSI escape codes, including cursor movement, screen clearing, text formatting, and color output. Each operation is available as both a macro (string literal) and a function (writes to stdout or a given FILE*).
+## frontmatter.h - Markdown Frontmatter Parser
+
+Parses a markdown document with an optional `---` fenced frontmatter block into typed values: `key: value` lines yielding strings (quotes stripped), booleans, integers, and lists (CSV or JSON array). Includes a small embedded JSON value type — parse, serialize, lookup, and shallow merge with ownership transfer (`fm_json_merge_owned`). An unterminated fence means the whole text is body.
+
+**Operations:** `parse_frontmatter`, `doc_get`, `doc_free`, `fm_list_items`, `fm_json_parse` / `fm_json_serialize` / `fm_json_get` / `fm_json_merge_owned`.
+
+**Dependencies:** libc only. Header-only: all functions are `static inline`, safe to include in any number of translation units.
+
## flat.h - Directory Traversal
This library provides a simple wrapper for traversing POSIX file systems. The intention for this library is to be used alongside bin.h, for the purpose of traversing hierarchical directory structures. Provides both POSIX (dirent.h) and Windows (FindFirstFileA) implementations.
@@ -73,6 +93,12 @@ An implementation of a genetic algorithm. The library exposes a single function
A collection of interpolation and easing macros inspired by "Math for Game Programmers: Fast and Funky 1D Nonlinear Transformations". Provides namespaced `INTERP_*` macros for collision safety, legacy unprefixed aliases guarded by `#ifndef`, and function wrappers for debuggability.
+## llm.h - LLM Provider Protocol Layer
+
+Header-only protocol layer for LLM chat endpoints: OpenAI-compatible (`/chat/completions`), Anthropic (`/v1/messages`), and Ollama (`/api/chat`). Request assembly (messages, tools, per-provider shaping), HTTP POST with stop-cancellation, SSE and NDJSON streaming with live delta emission, response and error-body parsing, and `Retry-After` handling. Pure protocol — no application state: messages arrive as borrowed `llm_message` arrays, tools as a pre-built `"tools":[...]` fragment, and tool execution, session access, and emit formatting are supplied by the caller.
+
+**Dependencies:** curl, cJSON, libc only. Header-only: all functions are `static inline`, safe to include in any number of translation units.
+
## pool.h - Memory Pool
A free-list based memory pool. The pool has a fixed size after allocation.