23 Commits

Author SHA1 Message Date
NCBM a677e06af4 core/tools: add ask_into_pty for human-local PTY input
Prompt the human (optional no-echo secret) and write only to the PTY.
Tool results never include the answer so secrets stay off external APIs.
Empty/Ctrl-C cancel without writing; submit defaults to trailing newline.
2026-07-20 02:47:19 +08:00
NCBM 58ff646034 core/cli: config open via VISUAL/EDITOR or system default
Prefer $VISUAL then $EDITOR (blocking). Without either, fall back to
xdg-open / open / startfile (non-blocking) for config paths only.
/edit stays blocking-only so the temp buffer can be re-read.
2026-07-19 22: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 edd54a427c core/tools/process: drop host TTY restore; rely on CSI sanitize only 2026-07-18 16:26:23 +08:00
NCBM 29230af911 core/tools/process: split write_pty (literal) vs write_pty_keys 2026-07-18 15:46:11 +08:00
NCBM 4ff03d8135 core/tools/process: host TTY restore, sanitize read_pty CSI, write_pty key escapes 2026-07-18 15:20:36 +08:00
NCBM 9b38a3b333 ci/lint: prek commit gateway (ruff check/format + basedpyright)
Add prek.toml so git commit runs ruff-pre-commit (fix then format) and
pdm-based basedpyright. Document install/install-hook; clear type warnings
that made basedpyright exit non-zero under recommended mode.
2026-07-18 14:10:04 +08:00
NCBM fb5b9f187b core/cli: /history last and --full with Rich markdown 2026-07-18 13:02:46 +08:00
NCBM 596af1ea1b core/agent+tools: session todo/task stack with review nag
Sub-task stack stored on session.todo_stack; model tools todo_*; slash
/todos for human ops; agent loop injects a review user message when open
todos exist and no todo_* tool ran this turn. Stack carries across /compact.
2026-07-18 01:59:13 +08:00
NCBM 57236937eb docs: model --persist and tree skip_dirs filtering 2026-07-18 01:32:06 +08:00
NCBM a282231082 docs+ci: document ruff format --check; format app.py 2026-07-17 17:57:00 +08:00
NCBM 39acd5967e tools/chat: rename tools to ask_user_line, ask_user_choice, ask_user_form
Model-facing names via @tool(name=…); Python symbols unchanged.
2026-07-17 15:36:29 +08:00
NCBM 18008de7f1 docs: document /yolo and --yes soft-confirm overrides 2026-07-17 14:55:34 +08:00
NCBM 6a1160f1e3 docs: user install guide (uvx, uv tool, pipx, pip) and basic usage 2026-07-15 22:41:02 +08:00
NCBM 5d2f0c5539 core/cli: Rich markdown for assistant text at end of turn
Stream plain tokens; on TTY re-render with Rich. /markdown and PLYNGENT_PLAIN.
2026-07-15 22:21:18 +08:00
NCBM 84a83e0485 core/config: default OpenAI preset and model catalog
Missing preset becomes openai; omitted models seed gpt-5.4 / mini / nano.
2026-07-15 21:40:43 +08:00
NCBM c466d09173 core/process: cross-platform PTY via backend and pywinpty
POSIX openpty/fork and Windows ConPTY; win32 marker dep plus typings stub.
2026-07-15 20:01:43 +08:00
NCBM 6bd80cb915 core/cli: /models and remote catalog for model selection
Cache GET /models, merge with config ids for Tab and choose; free-form model ids allowed.
2026-07-15 17:32:04 +08:00
NCBM 54712b541a core/cli: /config opens plyngent.toml and reloads
Add slash /config to edit the active config path in $EDITOR, then reload
providers/agent settings while keeping a valid provider/model selection.
2026-07-15 14:52:19 +08:00
NCBM 64d288a9b1 core/memory+cli: remember session LLM; readline prompts
Store provider_name/model on sessions (SQLite migrate); restore on
resume and persist on create//model//provider. Startup prefers session
selection over re-asking. ask/choose and provider/model pick use
readline with Tab completion when available.
2026-07-15 14:12:10 +08:00
NCBM 2052967824 core/config: default DeepSeek models v4-flash and v4-pro
When preset deepseek omits models, seed deepseek-v4-flash and
deepseek-v4-pro as text-capable entries for selection and docs.
2026-07-15 13:57:29 +08:00
NCBM fb61f6bc32 docs: README, example config, and Phase G completion notes
Document install, config, chat/one-shot, slash commands, workspace and
safety model. Add doc/plyngent.example.toml; refresh CLAUDE and architecture.
2026-07-15 13:51:11 +08:00
NCBM 21aa7dd143 project: init 2026-06-25 23:22:45 +08:00