chivgent 1.0.1 → 1.1.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.
Files changed (136) hide show
  1. package/README.md +102 -131
  2. package/README.zh-CN.md +97 -824
  3. package/dist/agent.d.ts +16 -1
  4. package/dist/agent.d.ts.map +1 -1
  5. package/dist/agent.js +95 -43
  6. package/dist/agent.js.map +1 -1
  7. package/dist/auth/oauth.d.ts +51 -0
  8. package/dist/auth/oauth.d.ts.map +1 -0
  9. package/dist/auth/oauth.js +444 -0
  10. package/dist/auth/oauth.js.map +1 -0
  11. package/dist/cli-options.d.ts +8 -5
  12. package/dist/cli-options.d.ts.map +1 -1
  13. package/dist/cli-options.js +36 -3
  14. package/dist/cli-options.js.map +1 -1
  15. package/dist/cli-runtime.d.ts +9 -0
  16. package/dist/cli-runtime.d.ts.map +1 -1
  17. package/dist/cli-runtime.js +32 -6
  18. package/dist/cli-runtime.js.map +1 -1
  19. package/dist/cli.js +57 -10
  20. package/dist/cli.js.map +1 -1
  21. package/dist/context/context-manager.d.ts +21 -0
  22. package/dist/context/context-manager.d.ts.map +1 -1
  23. package/dist/context/context-manager.js +199 -35
  24. package/dist/context/context-manager.js.map +1 -1
  25. package/dist/evals/tools.d.ts.map +1 -1
  26. package/dist/evals/tools.js +4 -2
  27. package/dist/evals/tools.js.map +1 -1
  28. package/dist/events.d.ts +5 -0
  29. package/dist/events.d.ts.map +1 -1
  30. package/dist/events.js.map +1 -1
  31. package/dist/permissions.d.ts +35 -0
  32. package/dist/permissions.d.ts.map +1 -0
  33. package/dist/permissions.js +89 -0
  34. package/dist/permissions.js.map +1 -0
  35. package/dist/prompts.d.ts +1 -1
  36. package/dist/prompts.d.ts.map +1 -1
  37. package/dist/prompts.js +1 -0
  38. package/dist/prompts.js.map +1 -1
  39. package/dist/providers/client.d.ts +1 -1
  40. package/dist/providers/client.d.ts.map +1 -1
  41. package/dist/providers/client.js +19 -1
  42. package/dist/providers/client.js.map +1 -1
  43. package/dist/providers/definitions.d.ts +2 -0
  44. package/dist/providers/definitions.d.ts.map +1 -1
  45. package/dist/providers/definitions.js +3 -1
  46. package/dist/providers/definitions.js.map +1 -1
  47. package/dist/providers/interactive.d.ts +4 -0
  48. package/dist/providers/interactive.d.ts.map +1 -1
  49. package/dist/providers/interactive.js +86 -2
  50. package/dist/providers/interactive.js.map +1 -1
  51. package/dist/providers/oauth-client.d.ts +14 -0
  52. package/dist/providers/oauth-client.d.ts.map +1 -0
  53. package/dist/providers/oauth-client.js +52 -0
  54. package/dist/providers/oauth-client.js.map +1 -0
  55. package/dist/providers/openai-compatible-chat.d.ts +1 -0
  56. package/dist/providers/openai-compatible-chat.d.ts.map +1 -1
  57. package/dist/providers/openai-compatible-chat.js +1 -0
  58. package/dist/providers/openai-compatible-chat.js.map +1 -1
  59. package/dist/providers/openai.d.ts +3 -0
  60. package/dist/providers/openai.d.ts.map +1 -1
  61. package/dist/providers/openai.js +72 -10
  62. package/dist/providers/openai.js.map +1 -1
  63. package/dist/remote/repl.d.ts.map +1 -1
  64. package/dist/remote/repl.js +9 -0
  65. package/dist/remote/repl.js.map +1 -1
  66. package/dist/repl.d.ts +42 -1
  67. package/dist/repl.d.ts.map +1 -1
  68. package/dist/repl.js +255 -12
  69. package/dist/repl.js.map +1 -1
  70. package/dist/session-store.d.ts +22 -1
  71. package/dist/session-store.d.ts.map +1 -1
  72. package/dist/session-store.js +80 -1
  73. package/dist/session-store.js.map +1 -1
  74. package/dist/session.d.ts +19 -0
  75. package/dist/session.d.ts.map +1 -1
  76. package/dist/session.js +106 -4
  77. package/dist/session.js.map +1 -1
  78. package/dist/shell/approval.d.ts +2 -2
  79. package/dist/shell/approval.d.ts.map +1 -1
  80. package/dist/shell/approval.js +2 -2
  81. package/dist/shell/approval.js.map +1 -1
  82. package/dist/shell/docker.d.ts +2 -0
  83. package/dist/shell/docker.d.ts.map +1 -1
  84. package/dist/shell/docker.js +17 -3
  85. package/dist/shell/docker.js.map +1 -1
  86. package/dist/shell/factory.d.ts +9 -0
  87. package/dist/shell/factory.d.ts.map +1 -0
  88. package/dist/shell/factory.js +13 -0
  89. package/dist/shell/factory.js.map +1 -0
  90. package/dist/shell/local.d.ts +4 -0
  91. package/dist/shell/local.d.ts.map +1 -1
  92. package/dist/shell/local.js +16 -1
  93. package/dist/shell/local.js.map +1 -1
  94. package/dist/shell/native.d.ts +15 -0
  95. package/dist/shell/native.d.ts.map +1 -0
  96. package/dist/shell/native.js +99 -0
  97. package/dist/shell/native.js.map +1 -0
  98. package/dist/shell/types.d.ts +1 -0
  99. package/dist/shell/types.d.ts.map +1 -1
  100. package/dist/tools/bash.d.ts +19 -0
  101. package/dist/tools/bash.d.ts.map +1 -1
  102. package/dist/tools/bash.js +30 -11
  103. package/dist/tools/bash.js.map +1 -1
  104. package/dist/tools/edit-file.d.ts.map +1 -1
  105. package/dist/tools/edit-file.js +1 -1
  106. package/dist/tools/edit-file.js.map +1 -1
  107. package/dist/tools/parallel.d.ts +2 -0
  108. package/dist/tools/parallel.d.ts.map +1 -1
  109. package/dist/tools/parallel.js +8 -0
  110. package/dist/tools/parallel.js.map +1 -1
  111. package/dist/tools/write-file.d.ts.map +1 -1
  112. package/dist/tools/write-file.js +1 -1
  113. package/dist/tools/write-file.js.map +1 -1
  114. package/dist/transcript-hash.d.ts +4 -0
  115. package/dist/transcript-hash.d.ts.map +1 -0
  116. package/dist/transcript-hash.js +6 -0
  117. package/dist/transcript-hash.js.map +1 -0
  118. package/dist/tui/activity.d.ts +1 -1
  119. package/dist/tui/activity.d.ts.map +1 -1
  120. package/dist/tui/activity.js +2 -2
  121. package/dist/tui/activity.js.map +1 -1
  122. package/dist/tui/live.d.ts +2 -0
  123. package/dist/tui/live.d.ts.map +1 -1
  124. package/dist/tui/live.js +5 -0
  125. package/dist/tui/live.js.map +1 -1
  126. package/dist/workspace/paths.d.ts.map +1 -1
  127. package/dist/workspace/paths.js +4 -0
  128. package/dist/workspace/paths.js.map +1 -1
  129. package/dist/workspace/types.d.ts +2 -2
  130. package/dist/workspace/types.d.ts.map +1 -1
  131. package/dist/workspace/types.js.map +1 -1
  132. package/dist/workspace.d.ts +2 -2
  133. package/dist/workspace.d.ts.map +1 -1
  134. package/dist/workspace.js +2 -2
  135. package/dist/workspace.js.map +1 -1
  136. package/package.json +6 -2
package/README.md CHANGED
@@ -1,170 +1,148 @@
1
1
  <p align="center">
2
- <picture>
3
- <source media="(prefers-color-scheme: dark)" srcset="docs/assets/chivgent-banner-dark.svg">
4
- <img src="docs/assets/chivgent-banner-light.svg" alt="chivgent: terminal coding agent. Read-only by default, Docker shell, OpenAI-compatible." width="100%">
5
- </picture>
2
+ <img src="docs/assets/chivgent-leaf-mark.png" width="88" alt="">
6
3
  </p>
7
4
 
5
+ <div align="center">
6
+
8
7
  # chivgent
9
8
 
10
- [English](README.md) | [简体中文](README.zh-CN.md)
9
+ ### A coding agent in your terminal.
10
+
11
+ The same category as Claude Code and Codex. You bring the model.
11
12
 
12
- [![npm](https://img.shields.io/npm/v/chivgent)](https://www.npmjs.com/package/chivgent)
13
- [![CI](https://github.com/chivopic/chivgent/actions/workflows/ci.yml/badge.svg)](https://github.com/chivopic/chivgent/actions/workflows/ci.yml)
14
- ![Node.js >=22](https://img.shields.io/badge/Node.js-%3E%3D22-339933?logo=nodedotjs&logoColor=white)
13
+ [![npm](https://img.shields.io/npm/v/chivgent?color=111111)](https://www.npmjs.com/package/chivgent)
14
+ [![CI](https://img.shields.io/github/actions/workflow/status/chivopic/chivgent/ci.yml?label=CI&color=111111)](https://github.com/chivopic/chivgent/actions/workflows/ci.yml)
15
+ ![Node.js >=22](https://img.shields.io/badge/Node.js-%3E%3D22-111111)
16
+ [![License](https://img.shields.io/badge/license-MIT-111111)](LICENSE)
15
17
 
16
- chivgent is a terminal coding agent you can read end to end. It asks an LLM
17
- (OpenAI, DeepSeek, or any OpenAI-compatible endpoint) about the project in your
18
- current directory, using read-only file tools by default. Writes and shell
19
- commands are separate opt-in flags, and shell commands run in an offline Docker
20
- container with per-command approval.
18
+ [Architecture](docs/architecture.md) · [Shell](docs/shell-sandbox.md) · [Sign in](docs/subscription-oauth.md) · **English** · [简体中文](README.zh-CN.md)
21
19
 
22
- It is small on purpose: a TypeScript CLI with four runtime dependencies, where
23
- the agent loop, Provider adapters, context compaction, and tool sandboxing are
24
- each a few hundred lines you can study.
20
+ </div>
25
21
 
26
- **Use it if** you want a coding agent whose every mechanism you can inspect and
27
- change, or a reference implementation for building your own.
28
- **Look elsewhere if** you want the most capable agent for daily work, a hosted
29
- product, a fine-grained permission system, or native Windows shell support.
22
+ chivgent is a local agent for the directory you have open. The category is the one [Claude Code](https://code.claude.com) and [Codex](https://github.com/openai/codex) occupy: read the project, change it, run it, and come back to the session. The model is yours. An API key, or a ChatGPT or xAI subscription.
30
23
 
31
- ## Quick start
24
+ The default that category expects is auto mode. Ordinary reads, workspace edits, and sandboxed commands proceed. The agent stops when an action leaves the workspace, or when a command needs the host. Here that policy is `workspace`. It is not a second model reviewing each action, and it is not a bypass. This build does not start there. A session still opens read-only. Pass `--permission-mode workspace`, or the older flags.
32
25
 
33
- You need Node.js 22 or newer and an API key for one Provider.
26
+ ## Getting started
27
+
28
+ You need Node.js 22 or newer.
34
29
 
35
30
  ```bash
36
31
  npm install -g chivgent
37
- chivgent --version
38
32
  ```
39
33
 
40
- This prints the installed version, such as `1.0.0`. Then, from the project you want to ask
41
- about:
34
+ Already installed? `chivgent update --check`, then `chivgent update`.
35
+
36
+ Start it in the project.
42
37
 
43
38
  ```bash
44
- export OPENAI_API_KEY="your-api-key"
45
- chivgent "What does this project do, and where is its entry point?"
39
+ cd /path/to/project
40
+ chivgent
46
41
  ```
47
42
 
48
- The answer streams to stdout. Tool activity (`list_files`, `search_text`,
49
- `read_file`) is shown on stderr. Nothing in the project is changed.
43
+ No key is required to open the session. Type `/provider` and enter one when asked, or export one first. Keys are saved for your user only, in `~/.chivgent/auth.json`.
50
44
 
51
- Prefer DeepSeek or another Provider? Swap the key and add `--provider`:
45
+ ```bash
46
+ export OPENAI_API_KEY="your-api-key"
47
+ ```
48
+
49
+ In a session, `/login oauth openai` or `/login oauth xai` signs in with a subscription. On a normal start, a key still takes precedence. [Subscription sign-in](docs/subscription-oauth.md).
52
50
 
53
51
  ```bash
54
- export DEEPSEEK_API_KEY="your-api-key"
55
- chivgent --provider deepseek "Explain the architecture in src/"
52
+ chivgent "Where is the entry point?" # reads, then answers
53
+ chivgent --permission-mode workspace "Run tests and fix them"
54
+ chivgent --permission-mode ask-first "Review this project"
55
+ chivgent --allow-writes "Rename sayHi to greet" # older flag, not with a mode
56
+ chivgent --allow-shell "Run the tests" # asks, then Seatbelt or Docker
57
+ chivgent --provider deepseek "Explain src/"
58
+ chivgent --tui # live region, multi-line editor
59
+ chivgent --continue # last session in this directory
56
60
  ```
57
61
 
58
- Run `chivgent` with no question for an interactive session. If no key is set,
59
- the session still starts: type `/provider`, pick one, and enter its key when
60
- asked. Keys are saved owner-only in `~/.chivgent/auth.json`.
62
+ ## Modes
63
+
64
+ | Mode | What proceeds | This build |
65
+ | --- | --- | --- |
66
+ | `workspace` | Workspace edits and sandboxed commands. Network stays off. A command that needs the host asks once, for that command only. | The auto-style default we want. Opt in with `--permission-mode workspace`. |
67
+ | `ask-first` | Reads. Each file change and each command asks. No answer means no action. | `--permission-mode ask-first` |
68
+ | `unrestricted` | Shell commands run with broad host file access and network, inside the OS sandbox. File tools stay in the workspace. | Explicit opt-in. |
69
+ | none | Reads. Writes and shell wait for a flag. Each command asks. | What `chivgent` does now. |
70
+
71
+ `--permission-mode` replaces the flags for this process. It cannot be combined with `--allow-writes`, `--allow-shell`, `--approve-all-shell`, or `--shell-network`, and it cannot be used with `--serve` or `--connect`. `/permissions` inspects or changes the mode, only in a session that started with one. The choice is not saved in the transcript. Resuming a session uses the mode you selected at startup, not a broader one from last time.
72
+
73
+ `/plan` is separate. It keeps the agent on read tools and a plan. Writes, shell, and extension tools stay blocked even if the model asks for them.
61
74
 
62
- **Try it without a key or network:** from a source checkout, `npm run demo:tui`
63
- runs the TUI against a stub Provider and does not touch the workspace.
75
+ ## How it fits together
64
76
 
65
- ## What it can do, and what it needs from you
77
+ You type in the terminal. chivgent calls the provider you picked. File tools stay inside the current directory. The shell runs in a sandbox and does not receive your provider keys. On the default start, the shell is off until you turn it on.
66
78
 
67
- | Capability | Flag | What it can touch |
79
+ <picture>
80
+ <source media="(prefers-color-scheme: dark)" srcset="docs/assets/fit-dark.svg">
81
+ <img src="docs/assets/fit-light.svg" width="920" alt="The default start: you, chivgent, the provider you picked, this directory, and a sandbox only if shell is on.">
82
+ </picture>
83
+
84
+ ## What it can touch
85
+
86
+ This is the build, not the auto-style default above.
87
+
88
+ | | How | What it can reach |
68
89
  | --- | --- | --- |
69
- | Discover, search, and read files | default | The current directory only. `.gitignore`d, generated, and credential paths (such as `.env`, `id_rsa`) are skipped. |
70
- | Create and edit files (`write_file`, `edit_file`, `apply_patch`) | `--allow-writes` | Files inside the workspace. Edits are exact-match and atomic. |
71
- | Run shell commands (`bash`) | `--allow-shell` | A fresh `node:22-alpine` Docker container with no network, the workspace mounted at `/workspace`, and no API keys. Each command needs a `y` to run. Docker is required; there is no fallback to the host. |
72
- | Load project extensions | trust prompt on first run | Anything you can: extensions are in-process JavaScript. |
90
+ | Read the project | on | This directory. Ignored, generated, and credential paths are skipped. |
91
+ | Change files | `--allow-writes` | Files inside the workspace. An edit has to match exactly, and it is written atomically. |
92
+ | Run a command | `--allow-shell` | Seatbelt on macOS, Docker elsewhere. Network is off. Each command requires confirmation. |
93
+ | Pick a policy | `--permission-mode` | `ask-first`, `workspace`, or `unrestricted`. Replaces the flags for this process. |
73
94
 
74
- Costs: chivgent calls the Provider you choose with your key, so you pay that
75
- Provider's normal token prices. It reports token counts per turn and per
76
- session (`/session`) but never converts them to money.
95
+ You pay the provider you picked, at their prices. chivgent shows token counts; it does not convert them into costs.
77
96
 
78
97
  ## Providers
79
98
 
80
- | Provider | `--provider` | API key variable | Default model |
99
+ | Provider | `--provider` | Key | Model |
81
100
  | --- | --- | --- | --- |
82
- | OpenAI (Responses API) | `openai` (default) | `OPENAI_API_KEY` | `gpt-5.6` |
101
+ | OpenAI, Responses API | `openai` (default) | `OPENAI_API_KEY` | `gpt-5.6` |
83
102
  | DeepSeek | `deepseek` | `DEEPSEEK_API_KEY` | `deepseek-v4-flash` |
84
- | Any OpenAI-compatible endpoint | `openai-compatible` | `OPENAI_API_KEY` + `OPENAI_BASE_URL` | set `OPENAI_MODEL` |
103
+ | Any compatible endpoint | `openai-compatible` | `OPENAI_API_KEY` and `OPENAI_BASE_URL` | set `OPENAI_MODEL` |
85
104
  | OpenRouter | `openrouter` | `OPENROUTER_API_KEY` | set `OPENROUTER_MODEL` |
86
105
  | Groq | `groq` | `GROQ_API_KEY` | set `GROQ_MODEL` |
87
106
  | xAI | `xai` | `XAI_API_KEY` | set `XAI_MODEL` |
88
107
  | Moonshot | `moonshot` | `MOONSHOT_API_KEY` | set `MOONSHOT_MODEL` |
89
108
 
90
- `--model` overrides the model variable. Keys resolve in this order: `--api-key`,
91
- then the environment variable, then `~/.chivgent/auth.json` (literal keys only;
92
- no `$VAR` expansion or command substitution). A custom `OPENAI_BASE_URL`
93
- receives your key and prompts, so point it only at endpoints you trust.
109
+ `--model` overrides the model variable. Keys resolve in this order: `--api-key`, then the environment variable, then `~/.chivgent/auth.json`. A custom base URL receives your key and your prompts. Point it only at an endpoint you trust.
94
110
 
95
- Compatible endpoints must implement `POST /chat/completions` with function tool
96
- calling. Changing only the base URL does not guarantee full compatibility; see
97
- [architecture](docs/architecture.md#openai-compatible-providers).
111
+ A compatible endpoint must implement `POST /chat/completions` with tool calling. Changing the base URL does not guarantee full compatibility. [Architecture](docs/architecture.md#openai-compatible-providers).
98
112
 
99
- ## Everyday use
113
+ ## A session you can come back to
100
114
 
101
- ```bash
102
- chivgent # interactive session
103
- chivgent --continue # resume the latest session here
104
- chivgent --allow-writes "Rename sayHi to greet everywhere"
105
- chivgent --allow-shell "Run the tests and explain the failure"
106
- chivgent --json "List the CLI flags" > run.jsonl # machine-readable events
107
- ```
115
+ Run `chivgent` with no question for an interactive session. It is saved under `~/.chivgent/sessions`. `--continue` resumes the latest one in this directory. `/resume` lists the others, and only opens sessions from here.
116
+
117
+ `/compact` summarizes older turns and keeps the full transcript to resume later. `/status` shows the model, the permissions, and token usage. `/help` lists the rest.
118
+
119
+ `--tui` adds a live status region and a multi-line editor. [TUI](docs/tui-v5.md). A long session stays within the context window by summarizing older turns and keeping the list of files read and changed. [Context](docs/architecture.md#context-management).
108
120
 
109
- - **Interactive sessions** keep history across prompts and are saved as JSON
110
- lines under `~/.chivgent/sessions` (`--no-session` to skip). `/help` lists
111
- slash commands such as `/provider`, `/model`, `/login`, `/session`, `/diff`,
112
- and `/exit`. Ctrl+C stops a running answer; at an idle prompt it exits.
113
- - **`--tui`** adds a live status region and a multi-line editor with history,
114
- an inline `/` command menu, and `/gitdiff` review. See the
115
- [TUI guide](docs/tui-v5.md).
116
- - **Long sessions** stay inside the context window: older turns are summarised,
117
- while the list of files read and changed is kept from the tool calls
118
- themselves. See [architecture](docs/architecture.md#context-management).
119
- - **Exit codes:** `0` answered, `1` configuration or Provider failure, `2` turn
120
- limit reached, `130` interrupted.
121
- - **Updating:** `chivgent update --check`, then `chivgent update`. See
122
- [updating](docs/updating.md).
123
-
124
- `chivgent --help` prints every flag.
125
-
126
- ## Security model
127
-
128
- chivgent states its boundaries rather than pretending to enforce fine-grained
129
- ones. Capabilities are coarse, session-level switches.
130
-
131
- - File tools reject paths outside the workspace, including `..` traversal and
132
- symlink escapes, and deny common credential and private-key paths. Tool output
133
- is capped at 64 KiB.
134
- - `--allow-shell` runs each command in a new offline container (dropped
135
- capabilities, read-only root, non-root user, resource limits) and asks before
136
- each one. Headless and served sessions deny commands unless you also pass
137
- `--approve-all-shell`. Inside the container, commands can still change or
138
- delete anything in the mounted project, and Docker is not proof against
139
- kernel or VM escapes. Details: [shell sandbox](docs/shell-sandbox.md).
140
- - Writes and trusted extensions are **not** inside the container. Trusting a
141
- project's extensions means letting its authors run code as you, so chivgent
142
- asks once per directory and never loads them when there is no terminal to ask.
143
- - `auth.json`, session logs, and `trust.json` are written owner-only but in
144
- plain text. Session logs contain prompts, answers, and file excerpts.
145
- - `--serve` exposes a session on a Unix socket in an owner-only directory.
146
- Anyone who can open the socket gets every capability the server started with.
147
- There is no TCP listener; use SSH forwarding for another machine.
148
-
149
- Work on committed code, and use a disposable copy for repositories you don't
150
- trust.
151
-
152
- ## Going deeper
153
-
154
- - [Architecture](docs/architecture.md): agent loop, runtime events, context
155
- compaction, Provider adapters, the TUI live region, and the source layout.
156
- - [Evals and token usage](docs/evals.md): ten deterministic task suites that
157
- measure pass rates over repeated attempts, separate from the free, offline
158
- unit tests.
159
- - [Extensions and remote sessions](docs/extensions-and-remote.md): adding
160
- tools and slash commands, project trust, and attaching several terminals to
161
- one session.
162
- - [Patch format](docs/apply-patch.md), [scoped `AGENTS.md`](docs/scoped-agents-md.md),
163
- [parallel read tools](docs/parallel-read-tools.md),
164
- [plan tracking](docs/agent-plan-progress.md).
165
- - Design notes for each build stage, from
166
- [stage 1](docs/stage-1-minimal-agent.md) to [stage 14](docs/stage-14-tui.md),
167
- and the [release process](docs/releasing.md).
121
+ ## Boundaries
122
+
123
+ - Paths outside the workspace are rejected, including `..` and symlink escapes. Common credential paths are denied. Tool output is capped.
124
+ - With no mode selected, `--allow-shell` asks before each command. A headless or served session denies commands unless you also pass `--approve-all-shell`. If the sandbox cannot start, the command does not run unsandboxed.
125
+ - `workspace` runs workspace edits and sandboxed commands on its own, and asks once when a command wants host file and network access. `unrestricted` is the explicit opt-in for broad host access and network. Neither is saved with the session. [Shell safety](docs/shell-sandbox.md).
126
+ - The macOS sandbox can still read files your user can read. It restricts writes and network access. It is not confidentiality isolation.
127
+ - There is no per-command allowlist, and no native Windows shell. `workspace` is not the start mode of this build.
128
+ - Extensions are JavaScript in the chivgent process. Trusting a project means letting its authors run code as you. chivgent prompts once per directory, and does not load extensions when there is no terminal to prompt.
129
+ - Keys, subscription credentials, and session logs are owner-only and stored in plain text. Logs contain prompts, answers, and file excerpts.
130
+ - `--serve` puts the session on a Unix socket in an owner-only directory. Anyone who can open the socket gets every capability the server started with. There is no TCP listener.
131
+
132
+ Work on committed code. Use a copy for a repository you do not trust.
133
+
134
+ This repository also has an Electron app, aimed at a local workbench on the same agent. The current build is a prototype. It is not how you use chivgent today. [Desktop plan](docs/desktop-architecture.md).
135
+
136
+ ## Documentation
137
+
138
+ | | |
139
+ | --- | --- |
140
+ | [Architecture](docs/architecture.md) | The loop, providers, context, and where the source lives |
141
+ | [Shell safety](docs/shell-sandbox.md) | Seatbelt, Docker, and what a command can still read |
142
+ | [Subscription sign-in](docs/subscription-oauth.md) | ChatGPT and xAI: what is stored, and what a key still does |
143
+ | [TUI](docs/tui-v5.md) | The live region, the editor, and diff review |
144
+ | [Evals](docs/evals.md) | Whether the agent finishes the task, separate from the unit tests |
145
+ | [Extensions and remote sessions](docs/extensions-and-remote.md) | Tools you add, and attaching another terminal |
168
146
 
169
147
  ## Development
170
148
 
@@ -172,17 +150,10 @@ trust.
172
150
  git clone https://github.com/chivopic/chivgent.git
173
151
  cd chivgent
174
152
  npm install
175
- npm run check
176
153
  npm test
177
- npm run build
178
154
  ```
179
155
 
180
- Tests use scripted LLM clients and never spend API credits.
181
- `npm run release:check` runs the full gate, including an `npm pack` dry run.
182
- To try the checkout as a global command: `npm install -g .`
183
-
184
- Issues and focused pull requests are welcome. Keep Provider-specific types in
185
- `src/providers/` so the agent runtime stays independent of vendor SDKs.
156
+ Tests use scripted model clients and do not spend API credits. Issues and focused pull requests are welcome. Keep provider-specific types in `src/providers/`, so the agent does not depend on a vendor SDK.
186
157
 
187
158
  ## License
188
159