57 Commits

Author SHA1 Message Date
NCBM 1c2587db82 docs: say what the storage ceiling leaves readable
The comments claimed a result above the ceiling has no document, which is not
what the code does: it has one, and the dropped tail is what that document
cannot serve.
2026-10-29 15:17:33 +08:00
NCBM 63109ef9f2 core/agent: cap tool results in the request-prep pass
A tool result now stays whole in its message (up to a storage ceiling) and
is trimmed on the request copy by the request-prep pass, where soft compact
already runs. The trimmed copy names the document that holds the rest, so
every surface (chat-completions, Responses, Messages) shares one rule.

New [agent] hard_max_tool_result_chars bounds the stored body; the wire cap
stays [agent] max_tool_result_chars.

Co-authored-by: CommandCodeBot <noreply@commandcode.ai>
2026-10-29 10:04:32 +08:00
NCBM 865d314234 docs: say the terminal keeps its own prompt line
A prompt answered from the notification reads both surfaces; the terminal still
shows the keys it takes, which a button cannot say.
2026-10-26 00:53:08 +08:00
NCBM 19707c3bd6 docs: drop "Go to terminal" and explain the bell
The answer tables lose the third button (two answers, or the prompt's own),
the popup's close and a body click both withdraw it, and the desktop section
says why every popup rings the terminal: the human is at another window by
construction — the announcement waits out the grace period — and no desktop
lets a program raise one.
2026-10-24 04:41:01 +08:00
NCBM 7452224793 docs: name the workspace line, the popup deadline and the bell
The body table gains the workspace (last line, `~` for home, following a
rebind), the desktop section says which popups expire and why, and "Go to
terminal" is described as what it does: withdraw, ring, leave the prompt
waiting — no window is raised, because no desktop allows it.
2026-10-24 04:35:26 +08:00
NCBM 39258b2670 docs: say what a notification now carries and when silence answers
The body is no longer "the reason or nothing": it is the question, the
reason behind `include_reason`, the object of the prompt and the deadline,
with the desktop keeping the lines apart and the terminal flattening them.
The tables gain the answers a question offers (a reply field and the way
back), the channels' click-to-terminal behaviour, and the secret prompt that
is announced nowhere at all.
2026-10-24 04:22:42 +08:00
NCBM 8cede4cbb3 docs: say what a notification body carries
The page explained what stays out of the announcement but not what is left in
it, so a reader could not tell whether the same line appears twice.
2026-10-24 01:54:05 +08:00
NCBM abd8c4d805 docs: describe the notification that stays and the answers it offers
The table of what a notification answers was out of date: the limit prompt and
the batch confirm now offer their own answers, and a skill write distinguishes
"once" from "this chat". The desktop section now says what actually keeps the
notification up (no expiry, urgency at the default) instead of naming `critical`,
and the follow-up rule — announced at once, past the grace period — is written
where a reader looks for why a prompt appeared without waiting.
2026-10-24 01:50:12 +08:00
NCBM d5c3f712ff docs: describe when a prompt listens for the answer
The page said a notification answer is treated like a typed one, without saying
that the prompt has to be listening before the notification exists — the grace
period is why. One paragraph says it, together with the price: a question that
offers a reply field reads in polling mode, so no Tab completion for that
prompt.
2026-10-23 10:25:40 +08:00
NCBM b2d6acae26 docs: record the Files API shapes
Uploading a picture and referencing it by id is the one image path the API
offers that we do not use, and the vendor shapes do not line up: the upload is
the same multipart `POST …/files` with a `file` part everywhere, but the object
that comes back is `object`/`bytes`/unix time on OpenAI, `type`/`size_bytes`/
RFC 3339 on Anthropic, and DeepSeek serves both dialects under two base URLs;
the reference block differs a third time per surface, and OpenAI's chat
completions cannot name an image by id at all.

Recorded next to the inline-path limits, with the three constraints that decide
any future wiring: an id belongs to the provider that minted it (like
`provider_blocks`), the OpenAI path implies the Responses convention, and the
token bill is unchanged — uploading only buys the inline size cap, a smaller
request body, and not re-sending the same bytes every round. The Anthropic
per-file limit is marked unverified: its API reference is unreachable from this
host's region.
2026-10-21 21:44:03 +08:00
NCBM 8926980a02 docs: describe the image gate
`image_in` is not just the mention switch any more: the table names where each
image-carrying path is gated, and says why the gate exists — a text-only model
answers `[Unsupported Image]`, and a gateway that cannot read image blocks feeds
the model raw base64, which is easy to mistake for a delivered picture.
2026-10-21 21:39:41 +08:00
NCBM 0e8b0f8bd4 docs: describe deletes that go to the trash
A new page, `doc/trash.md`, covers what a delete does now: where a path lands on
each platform, what is still deleted outright (an explicit `permanent=true`, a
host that cleared `[trash]`, scratch paths under the OS temp dir, the
`copy_path` / `move_path` overwrite, the temporary-workspace cleanup), what
happens when a trashing is refused — the file stays and the error says how to
delete it on purpose — and the two things the trash cannot help with: a shell
`rm` and anything a plugin or MCP server does on its own.

`[trash]` joins the example config and the README snippet, the README gains the
one-paragraph version, `AGENTS.md` the tool/config notes (including the confirm
wording a delete now uses), and the default tool playbook tells the model that
`delete_path` is undoable and what `permanent=true` costs.
2026-10-21 20:25:27 +08:00
NCBM b197c98ce9 docs: describe prompt notifications
A prompt that waits on the human is announced after a grace period, and the
notification can carry the answer: allow / deny / review buttons for a
confirmation, a reply field for an `ask_user_line`. `doc/notifications.md` lays
out the two channels (the optional `desktop-notifier` extra, and OSC 777 / OSC 9
written to `/dev/tty` with no dependency), what each prompt kind offers, why the
reason line stays out by default, and the platform limits — no buttons where a
server does not render them, a reply field only under KDE, kitty left with the
bell.

The example config and the README config block gain the `[notify]` section, and
AGENTS.md documents the three prompt hooks and the rule that only the outermost
prompt of a nested read is announced.
2026-10-21 20:03:36 +08:00
NCBM 4c597274e7 docs: describe YOLO skipping YOLO-tagged confirms
Session YOLO skips the soft confirms of `YOLO`-tagged tools — interpreter runs included — while untagged tools keep prompting and a command that escalates privileges keeps its own confirm through `DangerReason(yolo_skip=False)`. A plugin now also sees that answer shape where the danger classifier is documented, and the round's aggregated prompt leaves the covered calls out.
2026-10-21 19:10:56 +08:00
NCBM 029ac47350 docs: describe image input across the three surfaces
`doc/images.md` holds the message shape, how `@path` attaches a file, the
per-surface mapping, the provider limits, what a live probe against DeepSeek
confirmed (`tool_result` and `function_call_output` images work, `detail: low`
is 3.4x cheaper, an assistant-message image is a 400), and why the Files API is
not used.

AGENTS.md gets the invariants and the mention/config keys; `doc/architecture.md`
and the example TOML point at it.
2026-10-21 18:53:47 +08:00
NCBM 729627eee9 docs: spell out the turn and round model
doc/turns-and-rounds.md defines the two nested units the loop is built on: a round is one request→response plus the tool batch it asked for, a turn is one user message through the explicit stop (0..N rounds), and a session is a stored sequence of turns. It records what bounds each unit (max_rounds, truncation continues, retries), which work is round-scoped (request assembly, context reduction, the aggregated soft confirm) and which state resets per turn (read-before-edit, yyy auto-continue, /yolo once, the todo touched flag, usage totals) versus what outlives it (rows, todo stack, grants, reminder bands).

Linked from the architecture doc, with the short version in AGENTS.md.
2026-10-17 17:37:22 +08:00
NCBM eef1d3cd29 docs: describe fetch/fetch_local and the DeepSeek search default 2026-10-17 17:08:11 +08:00
NCBM 37e130a7dc docs: describe the DeepSeek Search API backend 2026-10-17 16:52:40 +08:00
NCBM 3c555278d5 docs: describe the disabled-thinking fallback 2026-10-16 22:16:35 +08:00
NCBM 06a5bafab7 docs: describe the adaptive-thinking retry 2026-10-16 22:12:09 +08:00
NCBM 8729330120 core/skills: announce the skill tools in a notice, not a catalog 2026-10-09 21:40:45 +08:00
NCBM 287b838db9 docs: drop the multi-tenant router plan 2026-10-09 21:15:07 +08:00
NCBM 66b771f87d docs: use the current DeepSeek flash id in the samples
The default catalog and the sample config still named `deepseek-v4-flash`,
which DeepSeek keeps only as a compatibility alias. Spell out the mapping
Claude-* ids get server-side (`deepseek-v4-pro` / `deepseek-flash`) instead
of the `deepseek-v4-*` glob the flash rename made stale.
2026-10-06 21:22:55 +08:00
NCBM 35dbd30328 docs: describe the thinking-strength settings 2026-10-06 21:11:28 +08:00
NCBM 2cc5222dd3 docs: use regex_files tool name in docs 2026-09-22 23:23:11 +08:00
NCBM b967a000dc docs: document skills
README and the example config cover the [skills] section, the five tools, and
the read/write split; AGENTS.md gains the skills/ package, the tool family, the
config fields, and the /skills + /status surface; architecture.md lists the
package. doc/skills.md is the author guide: layout, the frontmatter subset and
how a broken one degrades, roots and shadowing, what the agent sees, the
grant story for reads and writes, and the warning that a skill is data —
third-party skill directories are untrusted input.
2026-09-22 22:58:09 +08:00
NCBM 3fa05a86c6 docs: document limit auto-continue (yyy) 2026-09-09 22:48:16 +08:00
NCBM af1e4a4770 docs: document directory access grants 2026-09-09 22:24:44 +08:00
NCBM a1455989f2 docs: document MCP initialize instructions folding 2026-09-08 13:09:41 +08:00
NCBM dd70d02491 config: [mcp] section with server definitions and disable gate 2026-09-08 11:53:19 +08:00
NCBM ae93128e02 docs: document READ_ONLY attribute and /btw --tools modes 2026-08-15 16:53:06 +08:00
NCBM 010173cfc7 docs: use run_argv tool names in docs 2026-08-04 21:41:39 +08:00
NCBM 8954d855d5 docs: document DeepSeek Anthropic convention support 2026-08-01 02:32:45 +08:00
NCBM 6932937f87 docs: document DeepSeek Responses via convention field 2026-08-01 02:05:53 +08:00
NCBM 556eca66db docs: document openai responses and anthropic messages wiring 2026-08-01 00:34:48 +08:00
NCBM c7ee9b0063 test/config: cover model-level preset routing 2026-07-28 21:45:59 +08:00
NCBM 0ca92dfd7e core/config: networking ssrf_assume_public_cidrs for fetch Fake-IP 2026-07-24 20:20:30 +08:00
NCBM 6b8874b26d core/cli: wire directive reminder config and status 2026-07-24 19:41:06 +08:00
NCBM 6cf8902c57 docs: document fetch network tool 2026-07-24 19:09:07 +08:00
NCBM 03e04f9a38 core/cli: plugins list/enable/disable commands and /plugins slash 2026-07-24 16:44:44 +08:00
NCBM 4215a8cea0 core/config: top-level [plugins] enable/disable allowlist 2026-07-24 16:19:50 +08:00
NCBM 278c930fae docs: tool plugins guide and config cross-links 2026-07-24 16:05:10 +08:00
NCBM 30beec6600 core/config: split agent system_prompt and tool_directives 2026-07-21 22:55:51 +08:00
NCBM 6d74d31cea core/config: default system prompt for coding agent tools 2026-07-20 18:21:27 +08:00
NCBM 767578723e core/runtime: configurable provider HTTP request timeouts 2026-07-20 18:08:27 +08:00
NCBM 2e6cb3834a core/agent: drop system todo nag; emit events for synthetic_tool
Remove system strategy (legacy maps to developer). synthetic_tool still
forges the call but uses real stack text as the tool result, and now
yields ToolCall/Result events so the CLI flushes and does not glue nag
text to the next assistant stream.
2026-07-20 03:55:50 +08:00
NCBM f6d14ed549 core/agent: configurable todo nag strategies
Add [agent] todo_nag_strategy: developer (default), system, user,
synthetic_tool (forged todo_list pair), or none. Shared inject helper
used for turn-start and end-of-turn nags; CLI wires agent config.
2026-07-20 03:33:02 +08:00
NCBM 0ec0d542e8 core/cli: keep database url :memory:; default url None
Unset/empty url still maps to durable user-data chat.db.
Explicit :memory: is not rewritten; CLI warns when not quiet.
DatabaseConfig.url default is None; engine treats None as memory.
2026-07-19 21:38:21 +08:00
NCBM a282231082 docs+ci: document ruff format --check; format app.py 2026-07-17 17:57:00 +08:00
NCBM 074a3313ce core/config: default OpenAI provider_tools to web_search
Omitted provider_tools enables web_search; use [] to disable hosted tools.
2026-07-15 21:43:39 +08:00