agent-afk 4.6.1 → 4.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +40 -1
- package/dist/cli.mjs +419 -419
- package/dist/index.mjs +141 -141
- package/dist/telegram.mjs +176 -176
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ afk chat "hello"
|
|
|
46
46
|
- **Built-in orchestrators** — `/mint`, `/diagnose`, `/spec`, `/research`, `/ship`, `/review` dispatch subagent waves. `/mint` takes a feature idea and runs spec → research → plan → parallelize → build → verify → ship. `/diagnose` forks parallel root-cause hypotheses for failing tests and bugs.
|
|
47
47
|
|
|
48
48
|
> **Agent AFK Pro:** Autonomous skill-generation (`/forge`) and the calibrated skill-qualification rubric (`/qualify`) are reserved for Agent AFK Pro and are not part of the open-source build.
|
|
49
|
-
- **Cross-session memory** — Claude remembers preferences, decisions, and procedures across runs.
|
|
49
|
+
- **Cross-session memory** — Claude remembers preferences, decisions, and procedures across runs. See [Memory](#memory) below.
|
|
50
50
|
- **Background subagent jobs** — dispatch a subagent with `mode:'background'`; `/bgsub` lists running and completed jobs, `/bgsub:join <id>` retrieves the result.
|
|
51
51
|
|
|
52
52
|
## Four surfaces, one session manager
|
|
@@ -82,6 +82,34 @@ AFK_MAX_BUDGET_USD=5.00
|
|
|
82
82
|
|
|
83
83
|
**Check what resolved.** `afk config` dumps the live configuration. `afk doctor` validates keys, paths, and provider connectivity.
|
|
84
84
|
|
|
85
|
+
## Memory
|
|
86
|
+
|
|
87
|
+
Claude remembers things across sessions — preferences, decisions, conventions, and reusable procedures — without any manual setup. Memory is local-only and stored under `~/.afk/state/memory/`.
|
|
88
|
+
|
|
89
|
+
**Two storage tiers:**
|
|
90
|
+
|
|
91
|
+
- **Hot memory** (`~/.afk/state/memory/HOT.md`) — a small markdown file (≤ ~1,500 tokens) injected into every future session's system prompt automatically. Use it for the facts you want Claude to always carry: your name, working style, standing instructions. Capped at 5,250 characters; overflow is truncated with a sentinel comment.
|
|
92
|
+
- **Fact archive** (`~/.afk/state/memory/memory.db`) — an unbounded SQLite store, full-text-searchable via FTS5. Facts are queried on demand with the `memory_search` tool; they don't bloat every prompt.
|
|
93
|
+
|
|
94
|
+
**Fact categories** (set when writing to the archive):
|
|
95
|
+
|
|
96
|
+
| Category | What to put here |
|
|
97
|
+
|---|---|
|
|
98
|
+
| `preference` | Working style, formatting, tool choices |
|
|
99
|
+
| `convention` | Naming rules, file layout, team norms |
|
|
100
|
+
| `decision` | Architecture choices and the reasoning behind them |
|
|
101
|
+
| `learning` | Bugs found, lessons from past runs |
|
|
102
|
+
|
|
103
|
+
**Tools available inside a session:**
|
|
104
|
+
|
|
105
|
+
- `memory_search` — full-text search across facts and procedures (supports FTS5: `AND`, `OR`, `NOT`, `"exact phrase"`, `prefix*`).
|
|
106
|
+
- `memory_update` — write or supersede a fact in the archive (`target: "fact"`) or overwrite hot memory (`target: "hot"`).
|
|
107
|
+
- `procedure_write` — save a reusable step-by-step workflow as a named markdown file under `~/.afk/state/memory/procedures/`. Procedures are searchable via `memory_search`.
|
|
108
|
+
|
|
109
|
+
Hot memory is injected at session start; `memory_search` is called explicitly during a run. The session-end hook logs each completed top-level session to the archive automatically — subagent sessions are excluded.
|
|
110
|
+
|
|
111
|
+
All four surfaces (REPL, chat, daemon, Telegram) share the same store — memory written in one surface is available everywhere.
|
|
112
|
+
|
|
85
113
|
## Models
|
|
86
114
|
|
|
87
115
|
Default is `sonnet`. Override per-call with `--model`:
|
|
@@ -99,6 +127,17 @@ afk chat "refactor this" --model gpt-5.5
|
|
|
99
127
|
| `sonnet` | Day-to-day default — balanced speed and capability |
|
|
100
128
|
| `haiku` | Fast, cheap, meh... |
|
|
101
129
|
|
|
130
|
+
**Model slots** — rebind any capability tier to any model:
|
|
131
|
+
|
|
132
|
+
| Slot | Default | Notes |
|
|
133
|
+
|---|---|---|
|
|
134
|
+
| `local` | *(empty — you configure)* | Point at Ollama, LM Studio, or any OpenAI-compatible shim via `AFK_MODEL_LOCAL` + `AFK_MODEL_LOCAL_BASE_URL` |
|
|
135
|
+
| `small` | `claude-haiku-4-5-20251001` | Cheapest/fastest Anthropic tier; `haiku` alias |
|
|
136
|
+
| `medium` | `claude-sonnet-4-6` | General-use default; `sonnet` alias |
|
|
137
|
+
| `large` | `claude-opus-4-8` | Most capable; `opus` alias |
|
|
138
|
+
|
|
139
|
+
See [`docs/model-slots.md`](docs/model-slots.md) for the full configuration reference.
|
|
140
|
+
|
|
102
141
|
## Useful commands
|
|
103
142
|
|
|
104
143
|
```bash
|