chivgent 1.0.1 → 1.1.1
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 +115 -131
- package/README.zh-CN.md +103 -817
- package/dist/agent.d.ts +16 -1
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +95 -43
- package/dist/agent.js.map +1 -1
- package/dist/auth/oauth.d.ts +51 -0
- package/dist/auth/oauth.d.ts.map +1 -0
- package/dist/auth/oauth.js +444 -0
- package/dist/auth/oauth.js.map +1 -0
- package/dist/cli-options.d.ts +11 -6
- package/dist/cli-options.d.ts.map +1 -1
- package/dist/cli-options.js +46 -4
- package/dist/cli-options.js.map +1 -1
- package/dist/cli-runtime.d.ts +9 -0
- package/dist/cli-runtime.d.ts.map +1 -1
- package/dist/cli-runtime.js +32 -6
- package/dist/cli-runtime.js.map +1 -1
- package/dist/cli.d.ts +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +129 -34
- package/dist/cli.js.map +1 -1
- package/dist/context/context-manager.d.ts +21 -0
- package/dist/context/context-manager.d.ts.map +1 -1
- package/dist/context/context-manager.js +199 -35
- package/dist/context/context-manager.js.map +1 -1
- package/dist/evals/tools.d.ts.map +1 -1
- package/dist/evals/tools.js +4 -2
- package/dist/evals/tools.js.map +1 -1
- package/dist/events.d.ts +5 -0
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js.map +1 -1
- package/dist/permissions.d.ts +45 -0
- package/dist/permissions.d.ts.map +1 -0
- package/dist/permissions.js +97 -0
- package/dist/permissions.js.map +1 -0
- package/dist/prompts.d.ts +1 -1
- package/dist/prompts.d.ts.map +1 -1
- package/dist/prompts.js +1 -0
- package/dist/prompts.js.map +1 -1
- package/dist/providers/client.d.ts +1 -1
- package/dist/providers/client.d.ts.map +1 -1
- package/dist/providers/client.js +19 -1
- package/dist/providers/client.js.map +1 -1
- package/dist/providers/definitions.d.ts +2 -0
- package/dist/providers/definitions.d.ts.map +1 -1
- package/dist/providers/definitions.js +3 -1
- package/dist/providers/definitions.js.map +1 -1
- package/dist/providers/interactive.d.ts +4 -0
- package/dist/providers/interactive.d.ts.map +1 -1
- package/dist/providers/interactive.js +86 -2
- package/dist/providers/interactive.js.map +1 -1
- package/dist/providers/oauth-client.d.ts +14 -0
- package/dist/providers/oauth-client.d.ts.map +1 -0
- package/dist/providers/oauth-client.js +52 -0
- package/dist/providers/oauth-client.js.map +1 -0
- package/dist/providers/openai-compatible-chat.d.ts +1 -0
- package/dist/providers/openai-compatible-chat.d.ts.map +1 -1
- package/dist/providers/openai-compatible-chat.js +1 -0
- package/dist/providers/openai-compatible-chat.js.map +1 -1
- package/dist/providers/openai.d.ts +3 -0
- package/dist/providers/openai.d.ts.map +1 -1
- package/dist/providers/openai.js +72 -10
- package/dist/providers/openai.js.map +1 -1
- package/dist/remote/repl.d.ts.map +1 -1
- package/dist/remote/repl.js +9 -0
- package/dist/remote/repl.js.map +1 -1
- package/dist/repl.d.ts +43 -1
- package/dist/repl.d.ts.map +1 -1
- package/dist/repl.js +303 -21
- package/dist/repl.js.map +1 -1
- package/dist/runtime/desktop-runtime.d.ts +23 -0
- package/dist/runtime/desktop-runtime.d.ts.map +1 -0
- package/dist/runtime/desktop-runtime.js +63 -0
- package/dist/runtime/desktop-runtime.js.map +1 -0
- package/dist/session-store.d.ts +22 -1
- package/dist/session-store.d.ts.map +1 -1
- package/dist/session-store.js +80 -1
- package/dist/session-store.js.map +1 -1
- package/dist/session.d.ts +21 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +110 -4
- package/dist/session.js.map +1 -1
- package/dist/shell/approval.d.ts +2 -2
- package/dist/shell/approval.d.ts.map +1 -1
- package/dist/shell/approval.js +2 -2
- package/dist/shell/approval.js.map +1 -1
- package/dist/shell/docker.d.ts +2 -0
- package/dist/shell/docker.d.ts.map +1 -1
- package/dist/shell/docker.js +17 -3
- package/dist/shell/docker.js.map +1 -1
- package/dist/shell/factory.d.ts +9 -0
- package/dist/shell/factory.d.ts.map +1 -0
- package/dist/shell/factory.js +13 -0
- package/dist/shell/factory.js.map +1 -0
- package/dist/shell/local.d.ts +4 -0
- package/dist/shell/local.d.ts.map +1 -1
- package/dist/shell/local.js +16 -1
- package/dist/shell/local.js.map +1 -1
- package/dist/shell/native.d.ts +15 -0
- package/dist/shell/native.d.ts.map +1 -0
- package/dist/shell/native.js +99 -0
- package/dist/shell/native.js.map +1 -0
- package/dist/shell/types.d.ts +1 -0
- package/dist/shell/types.d.ts.map +1 -1
- package/dist/tools/bash.d.ts +19 -0
- package/dist/tools/bash.d.ts.map +1 -1
- package/dist/tools/bash.js +30 -11
- package/dist/tools/bash.js.map +1 -1
- package/dist/tools/edit-file.d.ts.map +1 -1
- package/dist/tools/edit-file.js +1 -1
- package/dist/tools/edit-file.js.map +1 -1
- package/dist/tools/parallel.d.ts +2 -0
- package/dist/tools/parallel.d.ts.map +1 -1
- package/dist/tools/parallel.js +8 -0
- package/dist/tools/parallel.js.map +1 -1
- package/dist/tools/write-file.d.ts.map +1 -1
- package/dist/tools/write-file.js +1 -1
- package/dist/tools/write-file.js.map +1 -1
- package/dist/transcript-hash.d.ts +4 -0
- package/dist/transcript-hash.d.ts.map +1 -0
- package/dist/transcript-hash.js +6 -0
- package/dist/transcript-hash.js.map +1 -0
- package/dist/tui/activity.d.ts +1 -1
- package/dist/tui/activity.d.ts.map +1 -1
- package/dist/tui/activity.js +2 -2
- package/dist/tui/activity.js.map +1 -1
- package/dist/tui/editor-input.d.ts +8 -0
- package/dist/tui/editor-input.d.ts.map +1 -1
- package/dist/tui/editor-input.js +122 -18
- package/dist/tui/editor-input.js.map +1 -1
- package/dist/tui/editor.d.ts +11 -1
- package/dist/tui/editor.d.ts.map +1 -1
- package/dist/tui/editor.js +77 -29
- package/dist/tui/editor.js.map +1 -1
- package/dist/tui/live.d.ts +2 -0
- package/dist/tui/live.d.ts.map +1 -1
- package/dist/tui/live.js +5 -0
- package/dist/tui/live.js.map +1 -1
- package/dist/tui/selection.d.ts +24 -0
- package/dist/tui/selection.d.ts.map +1 -0
- package/dist/tui/selection.js +19 -0
- package/dist/tui/selection.js.map +1 -0
- package/dist/tui/slash.js +1 -1
- package/dist/tui/slash.js.map +1 -1
- package/dist/tui/welcome.d.ts +2 -2
- package/dist/tui/welcome.d.ts.map +1 -1
- package/dist/tui/welcome.js +14 -23
- package/dist/tui/welcome.js.map +1 -1
- package/dist/workspace/paths.d.ts.map +1 -1
- package/dist/workspace/paths.js +4 -0
- package/dist/workspace/paths.js.map +1 -1
- package/dist/workspace/types.d.ts +2 -2
- package/dist/workspace/types.d.ts.map +1 -1
- package/dist/workspace/types.js.map +1 -1
- package/dist/workspace.d.ts +2 -2
- package/dist/workspace.d.ts.map +1 -1
- package/dist/workspace.js +2 -2
- package/dist/workspace.js.map +1 -1
- package/package.json +6 -2
package/README.md
CHANGED
|
@@ -1,170 +1,161 @@
|
|
|
1
1
|
<p align="center">
|
|
2
|
-
<
|
|
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
|
-
|
|
9
|
+
### A coding agent in your terminal.
|
|
10
|
+
|
|
11
|
+
The same category as Claude Code and Codex. You bring the model.
|
|
12
|
+
|
|
13
|
+
[](https://www.npmjs.com/package/chivgent)
|
|
14
|
+
[](https://github.com/chivopic/chivgent/actions/workflows/ci.yml)
|
|
15
|
+

|
|
16
|
+
[](LICENSE)
|
|
11
17
|
|
|
12
|
-
[
|
|
13
|
-
[](https://github.com/chivopic/chivgent/actions/workflows/ci.yml)
|
|
14
|
-

|
|
18
|
+
**[Website ↗](https://chivgent-web.vercel.app/)** · [Architecture](docs/architecture.md) · [Shell](docs/shell-sandbox.md) · [Sign in](docs/subscription-oauth.md) · **English** · [简体中文](README.zh-CN.md)
|
|
15
19
|
|
|
16
|
-
|
|
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.
|
|
20
|
+
</div>
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
the agent loop, Provider adapters, context compaction, and tool sandboxing are
|
|
24
|
-
each a few hundred lines you can study.
|
|
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.
|
|
25
23
|
|
|
26
|
-
|
|
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.
|
|
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. Local interactive rich-TUI sessions start in Ask for me unless a permission mode or legacy capability flag was selected; file changes and commands require approval. Shift+Tab cycles through Plan, Auto mode, and Ask for me. Headless, simple, and remote starts keep their existing defaults.
|
|
30
25
|
|
|
31
|
-
##
|
|
26
|
+
## Getting started
|
|
32
27
|
|
|
33
|
-
You need Node.js 22 or newer
|
|
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
|
-
|
|
41
|
-
about:
|
|
34
|
+
Or, on macOS/Linux, use the [official website installer](https://chivgent-web.vercel.app/install.sh). It still requires Node.js 22+ and npm; it installs the same npm package, without using `sudo` or changing your shell configuration.
|
|
42
35
|
|
|
43
36
|
```bash
|
|
44
|
-
|
|
45
|
-
chivgent "What does this project do, and where is its entry point?"
|
|
37
|
+
curl -fsSL https://chivgent-web.vercel.app/install.sh | bash
|
|
46
38
|
```
|
|
47
39
|
|
|
48
|
-
|
|
49
|
-
|
|
40
|
+
This runs a script from the Internet. To inspect it first, download it with `curl -fsSLo install.sh https://chivgent-web.vercel.app/install.sh`, read it, then run `bash install.sh`. If npm's global bin directory is missing from PATH, the installer shows the directory to add.
|
|
41
|
+
|
|
50
42
|
|
|
51
|
-
|
|
43
|
+
Already installed? `chivgent update --check`, then `chivgent update`.
|
|
44
|
+
|
|
45
|
+
Start it in the project.
|
|
52
46
|
|
|
53
47
|
```bash
|
|
54
|
-
|
|
55
|
-
chivgent
|
|
48
|
+
cd /path/to/project
|
|
49
|
+
chivgent
|
|
56
50
|
```
|
|
57
51
|
|
|
58
|
-
|
|
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`.
|
|
52
|
+
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`.
|
|
61
53
|
|
|
62
|
-
|
|
63
|
-
|
|
54
|
+
```bash
|
|
55
|
+
export OPENAI_API_KEY="your-api-key"
|
|
56
|
+
```
|
|
64
57
|
|
|
65
|
-
|
|
58
|
+
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).
|
|
66
59
|
|
|
67
|
-
|
|
60
|
+
```bash
|
|
61
|
+
chivgent "Where is the entry point?" # reads, then answers
|
|
62
|
+
chivgent --permission-mode workspace "Run tests and fix them"
|
|
63
|
+
chivgent --permission-mode ask-first "Review this project"
|
|
64
|
+
chivgent --allow-writes "Rename sayHi to greet" # older flag, not with a mode
|
|
65
|
+
chivgent --allow-shell "Run the tests" # asks, then Seatbelt or Docker
|
|
66
|
+
chivgent --provider deepseek "Explain src/"
|
|
67
|
+
chivgent # rich TUI in a local interactive terminal
|
|
68
|
+
chivgent --simple # append-only interface
|
|
69
|
+
chivgent --tui # explicitly request the rich TUI
|
|
70
|
+
chivgent --continue # last session in this directory
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Modes
|
|
74
|
+
|
|
75
|
+
| Mode | What proceeds | This build |
|
|
68
76
|
| --- | --- | --- |
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
77
|
+
| `workspace` | Workspace edits and sandboxed commands. Network stays off. A command that needs the host asks once, for that command only. | Auto mode in the TUI cycle, or `--permission-mode workspace`. |
|
|
78
|
+
| `ask-first` | Reads. Each file change and each command asks. No answer means no action. | Ordinary local rich-TUI start, or `--permission-mode ask-first`. |
|
|
79
|
+
| `unrestricted` | Shell commands run with broad host file access and network, inside the OS sandbox. File tools stay in the workspace. | Explicit opt-in. |
|
|
80
|
+
| none | Reads. Writes and shell wait for a flag. Commands need interactive approval or explicit approval-all. | `--simple`, headless, and remote starts unless a mode or legacy flag is selected. |
|
|
81
|
+
|
|
82
|
+
`--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.
|
|
83
|
+
|
|
84
|
+
`/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.
|
|
85
|
+
|
|
86
|
+
## How it fits together
|
|
87
|
+
|
|
88
|
+
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.
|
|
73
89
|
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
90
|
+
<picture>
|
|
91
|
+
<source media="(prefers-color-scheme: dark)" srcset="docs/assets/fit-dark.svg">
|
|
92
|
+
<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.">
|
|
93
|
+
</picture>
|
|
94
|
+
|
|
95
|
+
## What it can touch
|
|
96
|
+
|
|
97
|
+
This is the build, not the auto-style default above.
|
|
98
|
+
|
|
99
|
+
| | How | What it can reach |
|
|
100
|
+
| --- | --- | --- |
|
|
101
|
+
| Read the project | on | This directory. Ignored, generated, and credential paths are skipped. |
|
|
102
|
+
| Change files | `--allow-writes` | Files inside the workspace. An edit has to match exactly, and it is written atomically. |
|
|
103
|
+
| Run a command | `--allow-shell` | Seatbelt on macOS, Docker elsewhere. Network is off. Each command requires confirmation. |
|
|
104
|
+
| Pick a policy | `--permission-mode` | `ask-first`, `workspace`, or `unrestricted`. Replaces the flags for this process. |
|
|
105
|
+
|
|
106
|
+
You pay the provider you picked, at their prices. chivgent shows token counts; it does not convert them into costs.
|
|
77
107
|
|
|
78
108
|
## Providers
|
|
79
109
|
|
|
80
|
-
| Provider | `--provider` |
|
|
110
|
+
| Provider | `--provider` | Key | Model |
|
|
81
111
|
| --- | --- | --- | --- |
|
|
82
|
-
| OpenAI
|
|
112
|
+
| OpenAI, Responses API | `openai` (default) | `OPENAI_API_KEY` | `gpt-5.6` |
|
|
83
113
|
| DeepSeek | `deepseek` | `DEEPSEEK_API_KEY` | `deepseek-v4-flash` |
|
|
84
|
-
| Any
|
|
114
|
+
| Any compatible endpoint | `openai-compatible` | `OPENAI_API_KEY` and `OPENAI_BASE_URL` | set `OPENAI_MODEL` |
|
|
85
115
|
| OpenRouter | `openrouter` | `OPENROUTER_API_KEY` | set `OPENROUTER_MODEL` |
|
|
86
116
|
| Groq | `groq` | `GROQ_API_KEY` | set `GROQ_MODEL` |
|
|
87
117
|
| xAI | `xai` | `XAI_API_KEY` | set `XAI_MODEL` |
|
|
88
118
|
| Moonshot | `moonshot` | `MOONSHOT_API_KEY` | set `MOONSHOT_MODEL` |
|
|
89
119
|
|
|
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.
|
|
120
|
+
`--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
121
|
|
|
95
|
-
|
|
96
|
-
calling. Changing only the base URL does not guarantee full compatibility; see
|
|
97
|
-
[architecture](docs/architecture.md#openai-compatible-providers).
|
|
122
|
+
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
123
|
|
|
99
|
-
##
|
|
124
|
+
## A session you can come back to
|
|
100
125
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
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
|
-
```
|
|
126
|
+
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.
|
|
127
|
+
|
|
128
|
+
`/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.
|
|
108
129
|
|
|
109
|
-
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
-
|
|
120
|
-
|
|
121
|
-
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
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).
|
|
130
|
+
Local interactive terminals use the rich TUI by default. `--simple` selects the append-only interface; `--tui` remains available to request the rich TUI explicitly, including when stdout is redirected. Piped input or output, JSON, one-shot runs, `--serve`, and `--connect` keep their existing simple output. `TERM=dumb` selects the simple interface; `NO_COLOR` keeps the rich TUI and disables color. Without legacy capability flags or an explicit permission mode, rich TUI sessions start in Ask for me. Shift+Tab at the idle inline prompt cycles Plan → Auto mode → Ask for me; the footer shows the current mode. The compact welcome omits the session ID; use `/session` or `/status` for full session details. `/help` lists commands and keyboard controls. Explicit `--permission-mode` choices and legacy capability flags retain their behavior. [TUI](docs/tui.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).
|
|
131
|
+
|
|
132
|
+
In its inline editor, type `/` to browse registered commands or keep typing to filter them. Use ↑/↓ to choose a command, then Tab or Enter to fill it into the draft; submit it with Enter afterward. A mouse click fills a visible command, and the wheel browses the menu. Esc closes the menu and keeps the draft. Fully typed commands still run with one Enter.
|
|
133
|
+
|
|
134
|
+
## Boundaries
|
|
135
|
+
|
|
136
|
+
- Paths outside the workspace are rejected, including `..` and symlink escapes. Common credential paths are denied. Tool output is capped.
|
|
137
|
+
- Without a mode or legacy flag, `--simple`, headless, and remote starts retain the read-only default. A local rich-TUI start selects `ask-first` for that process unless a legacy capability flag was given. `--allow-shell` needs interactive approval; non-interactive commands are denied unless `--approve-all-shell` was set. A served session denies commands unless you also pass `--approve-all-shell`. If the sandbox cannot start, the command does not run unsandboxed.
|
|
138
|
+
- `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).
|
|
139
|
+
- The macOS sandbox can still read files your user can read. It restricts writes and network access. It is not confidentiality isolation.
|
|
140
|
+
- There is no per-command allowlist, and no native Windows shell. `workspace` is not the start mode of this build.
|
|
141
|
+
- 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.
|
|
142
|
+
- Keys, subscription credentials, and session logs are owner-only and stored in plain text. Logs contain prompts, answers, and file excerpts.
|
|
143
|
+
- `--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.
|
|
144
|
+
|
|
145
|
+
Work on committed code. Use a copy for a repository you do not trust.
|
|
146
|
+
|
|
147
|
+
This repository also has an Electron desktop app. It opens a project through the native folder picker and runs the same Agent with read-only project tools and a configured Provider. API keys are read from the environment or CLI `auth.json`; the desktop does not store them. Desktop does **not** read `oauth.json` or refresh subscription OAuth tokens. If you signed in using only `/login oauth`, configure an API key before using Desktop. When choosing an OpenAI-compatible Provider, verify the displayed endpoint before sending project content. Only one in-memory conversation is available, with no history or restart recovery. For the offline demo, set `CHIVGENT_DESKTOP_DEMO=1`. Build and run the app with `npm run desktop:dev`; offline real-adapter verification uses `npm run desktop:build && node apps/desktop/scripts/verify-readonly.mjs`. [Desktop behavior and limits](docs/desktop-architecture.md).
|
|
148
|
+
|
|
149
|
+
## Documentation
|
|
150
|
+
|
|
151
|
+
| | |
|
|
152
|
+
| --- | --- |
|
|
153
|
+
| [Architecture](docs/architecture.md) | The loop, providers, context, and where the source lives |
|
|
154
|
+
| [Shell safety](docs/shell-sandbox.md) | Seatbelt, Docker, and what a command can still read |
|
|
155
|
+
| [Subscription sign-in](docs/subscription-oauth.md) | ChatGPT and xAI: what is stored, and what a key still does |
|
|
156
|
+
| [TUI](docs/tui.md) | The live region, the editor, and diff review |
|
|
157
|
+
| [Evals](docs/evals.md) | Whether the agent finishes the task, separate from the unit tests |
|
|
158
|
+
| [Extensions and remote sessions](docs/extensions-and-remote.md) | Tools you add, and attaching another terminal |
|
|
168
159
|
|
|
169
160
|
## Development
|
|
170
161
|
|
|
@@ -172,17 +163,10 @@ trust.
|
|
|
172
163
|
git clone https://github.com/chivopic/chivgent.git
|
|
173
164
|
cd chivgent
|
|
174
165
|
npm install
|
|
175
|
-
npm run check
|
|
176
166
|
npm test
|
|
177
|
-
npm run build
|
|
178
167
|
```
|
|
179
168
|
|
|
180
|
-
Tests use scripted
|
|
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.
|
|
169
|
+
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
170
|
|
|
187
171
|
## License
|
|
188
172
|
|