@pithosai/pithosai 1.0.4 → 1.0.7
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 +110 -26
- package/dist/336.mjs +2 -0
- package/dist/cosai.mjs +126 -123
- package/dist/heartbeat.mjs +126 -123
- package/dist/init.mjs +2 -0
- package/dist/mktai.mjs +126 -123
- package/dist/pithosai.mjs +126 -123
- package/dist/pmsai.mjs +126 -123
- package/dist/qasai.mjs +126 -123
- package/dist/rdsai.mjs +126 -123
- package/dist/render-markdown.mjs +10 -7
- package/dist/wrsai.mjs +126 -123
- package/package.json +5 -10
- package/scripts/{postinstall-init-db.js → postinstall-init.js} +1 -1
- package/dist/init-pithosai-db.mjs +0 -2
- package/pithosai.sql +0 -177
package/README.md
CHANGED
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
# Pithosai (`@pithosai/pithosai`)
|
|
2
2
|
|
|
3
|
-
**Multi-role AI CLI** for coding and product work: natural-language requests, pluggable models (Cursor, DeepSeek, OpenRouter), and role-based prompts stored in SQLite.
|
|
3
|
+
**Multi-role AI CLI** for coding and product work: natural-language requests, pluggable models (Cursor, DeepSeek, OpenRouter), and role-based prompts stored in SQLite.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## What's new in v1.0.7
|
|
8
|
+
|
|
9
|
+
**Models and cost**
|
|
10
|
+
|
|
11
|
+
- **Cost-first default:** with **`DEEPSEEK_API_KEY`**, regular runs use **`deepseek-v4-flash`**; **`--pro`** uses **`deepseek-v4-pro`**; **`--reasoner`** uses the pro model with reasoning enabled; **`--chat`** explicitly selects flash.
|
|
12
|
+
- **Interactive `/model`** lists and switches available model keys.
|
|
13
|
+
- **Aliases:** `deepSeekPro` → `deepSeekCoder`, `deepSeekFlash` → `deepSeekChat` (older keys still work).
|
|
14
|
+
- **Native DeepSeek chat/coder:** requests send **`thinking: { type: "disabled" }`** so the provider’s default [thinking mode](https://api-docs.deepseek.com/guides/thinking_mode) does not force **`reasoning_content`** replay on tool-heavy turns (avoids **400** API errors). **`deepSeekReasoner`** is unchanged (thinking stays on).
|
|
15
|
+
|
|
16
|
+
**CLI and install**
|
|
17
|
+
|
|
18
|
+
- **Optional startup auto-upgrade:** checks npm for a newer **`@pithosai/pithosai`** (at most **once per 24 hours**, state in **`~/.pithosai/auto-upgrade-check.json`**), can install **`@latest`** globally, uses the **same resolved CLI language** as help and prompts, and reminds you the **current process is still the old build** until you run `pithosai` again. In a **TTY** when the full-screen agent TUI will start, it **waits for Enter** so upgrade lines are not lost. Set **`PITHOSAI_AUTO_UPGRADE=0`** (or `false` / `no` / `off`) to disable checks entirely.
|
|
19
|
+
- **`render-markdown`:** the built **`dist/render-markdown.mjs`** entry is fixed so direct execution prints output correctly.
|
|
20
|
+
|
|
21
|
+
**Interactive REPL**
|
|
22
|
+
|
|
23
|
+
- Exit with **`/exit`** or **`/quit`** only; plain `exit` / `quit` are sent to the agent as normal messages.
|
|
24
|
+
|
|
25
|
+
**Earlier in v1.0.5:** Encrypted global DB migration, device-bound SQLCipher keys, safer default logging — see **CHANGELOG** `[1.0.5]` and the upgrade subsection below.
|
|
4
26
|
|
|
5
27
|
---
|
|
6
28
|
|
|
@@ -20,11 +42,11 @@ On a **global** install, the package runs a one-time step: if `~/.pithosai/pitho
|
|
|
20
42
|
|
|
21
43
|
| You run | Purpose |
|
|
22
44
|
|--------|---------|
|
|
23
|
-
| `pithosai` | Main CLI: `init`, interactive agent, `task`, `heartbeat`, `skills`, `memorize`, and more. |
|
|
24
|
-
| `rdsai`, `pmsai`, `qasai`, `cosai`, `mktai`, `wrsai` | Same CLI with a **default role** (e.g. RD, PM, QA). |
|
|
45
|
+
| `pithosai` | Main CLI: `init`, `migrate-db`, interactive agent, `task`, `heartbeat`, `skills`, `memorize`, and more. |
|
|
46
|
+
| `rdsai`, `pmsai`, `qasai`, `cosai`, `mktai`, `wrsai` | Same CLI with a **default role** (e.g. RD, PM, QA). See [Role entrypoints and models](#role-entrypoints-and-models) below. |
|
|
25
47
|
| `email-monitor` | Heartbeat / email-driven task loop (`heartbeat` bundle). |
|
|
26
48
|
| `render-markdown` | Render Markdown files in the terminal. |
|
|
27
|
-
| `
|
|
49
|
+
| `init` | Manually initialize `~/.pithosai/pithosai.db` if needed (usually automatic after global install). |
|
|
28
50
|
|
|
29
51
|
---
|
|
30
52
|
|
|
@@ -32,7 +54,21 @@ On a **global** install, the package runs a one-time step: if `~/.pithosai/pitho
|
|
|
32
54
|
|
|
33
55
|
Configure **at least one** of:
|
|
34
56
|
|
|
35
|
-
1. **
|
|
57
|
+
1. **DeepSeek** — `export DEEPSEEK_API_KEY=sk-...`
|
|
58
|
+
|
|
59
|
+
2. **OpenRouter** — `export OPENROUTER_API_KEY=sk-or-...`
|
|
60
|
+
|
|
61
|
+
3. **Ollama (local models)** — install Ollama on your machine, run a model, and set:
|
|
62
|
+
```bash
|
|
63
|
+
export OPENAI_LOCAL_API_BASE=http://localhost:11434/v1
|
|
64
|
+
```
|
|
65
|
+
Example local setup:
|
|
66
|
+
```bash
|
|
67
|
+
ollama run qwen2.5-coder:14b
|
|
68
|
+
export OPENAI_LOCAL_API_BASE=http://localhost:11434/v1
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
4. **Cursor CLI** (last resort)
|
|
36
72
|
```bash
|
|
37
73
|
curl https://cursor.com/install -fsS | bash
|
|
38
74
|
cursor-agent login
|
|
@@ -40,11 +76,28 @@ Configure **at least one** of:
|
|
|
40
76
|
```
|
|
41
77
|
Use **`pithosai "your request" --cursor`** or set `CURSOR_MODEL`.
|
|
42
78
|
|
|
43
|
-
|
|
79
|
+
**Precedence:** DeepSeek → Ollama (`OPENAI_LOCAL_API_BASE`) → OpenRouter → `CURSOR_MODEL` / `--cursor`.
|
|
80
|
+
|
|
81
|
+
### DeepSeek API (V4)
|
|
44
82
|
|
|
45
|
-
|
|
83
|
+
When using **`DEEPSEEK_API_KEY`** (native `https://api.deepseek.com`), the CLI maps runs to **DeepSeek-V4** model ids:
|
|
46
84
|
|
|
47
|
-
|
|
85
|
+
| Your choice | API model id | Typical use |
|
|
86
|
+
|-------------|----------------|-------------|
|
|
87
|
+
| Default (e.g. `pithosai`, `rdsai`, no `--pro` / `--reasoner`) | **`deepseek-v4-flash`** | Lower-cost daily coding and regular tasks |
|
|
88
|
+
| **`--pro`** | **`deepseek-v4-pro`** | Higher quality coding output for harder tasks |
|
|
89
|
+
| **`--chat`** | **`deepseek-v4-flash`** | Explicit chat-style low-cost path |
|
|
90
|
+
| **`--reasoner`** | **`deepseek-v4-pro`** with reasoning / thinking enabled | Longer chains-of-thought style replies |
|
|
91
|
+
|
|
92
|
+
Legacy ids **`deepseek-chat`** and **`deepseek-reasoner`** are being retired by the provider; see [DeepSeek API docs](https://api-docs.deepseek.com/) for current parameters (including thinking mode). For extended chain-of-thought on native DeepSeek, use **`--reasoner`** / **`deepSeekReasoner`**; the default flash/coder paths disable API thinking so agent tool loops stay reliable.
|
|
93
|
+
|
|
94
|
+
With **`OPENROUTER_API_KEY`** only, the same logical paths use OpenRouter slugs **`deepseek/deepseek-v4-flash`** (default) and **`deepseek/deepseek-v4-pro`** (`--pro` / `--reasoner`).
|
|
95
|
+
|
|
96
|
+
### Role entrypoints and models
|
|
97
|
+
|
|
98
|
+
- **`rdsai`** — default role **RD**, default model path (**`deepseek-v4-flash`** unless you pass `--pro` / `--reasoner`).
|
|
99
|
+
- **`pmsai`**, **`qasai`**, **`cosai`**, **`mktai`** — set role **PM** / **QA** / **CO** / **MKT** and pass **`--chat`**, so the **chat (flash)** model above is used for those binaries without extra flags.
|
|
100
|
+
- **`wrsai`** — runs the **`task`** command with role **WR** and default language **zh** (model follows normal `task` / env resolution for that run).
|
|
48
101
|
|
|
49
102
|
---
|
|
50
103
|
|
|
@@ -57,10 +110,49 @@ pithosai "Describe what you want done"
|
|
|
57
110
|
```
|
|
58
111
|
|
|
59
112
|
- **`pithosai -i`** — interactive session with no initial prompt.
|
|
113
|
+
- In that interactive loop, type **`/exit`** or **`/quit`** to leave the CLI (plain `exit` is treated as a normal message to the agent).
|
|
60
114
|
- **`pithosai --no-interactive "…"`** — one shot, then exit.
|
|
61
115
|
- **`pithosai -C ./other-dir "…"`** — use another project directory.
|
|
116
|
+
- Every CLI invocation prints a cyan ASCII `pithosai` slogan banner first.
|
|
117
|
+
- On startup, `pithosai` may check npm for the latest `@pithosai/pithosai` version (at most **once per 24 hours**, tracked in `~/.pithosai/auto-upgrade-check.json`) and auto-runs `npm install -g @pithosai/pithosai@latest` when a newer release is found. Upgrade notices use the **same resolved CLI language** as help and prompts (project settings, `--lang`, or terminal locale). After an upgrade, **this process still runs the old build** until you run `pithosai` again. In a **TTY** session (same conditions as the full-screen agent TUI), it asks you to **press Enter** so those lines are not lost when the TUI starts. Set **`PITHOSAI_AUTO_UPGRADE=0`** (or `false` / `no` / `off`) to skip checks entirely.
|
|
118
|
+
|
|
119
|
+
Prompts load from a local database (default `~/.pithosai/pithosai.db`). Optional role overrides live under `.pithosai/<role>/` in your project.
|
|
62
120
|
|
|
63
|
-
|
|
121
|
+
### Language selection
|
|
122
|
+
|
|
123
|
+
- Default language is **English (`en`)**.
|
|
124
|
+
- Set language per command with `--lang`.
|
|
125
|
+
- Or export `LANG` in your shell to set terminal locale preference.
|
|
126
|
+
|
|
127
|
+
Examples:
|
|
128
|
+
|
|
129
|
+
```bash
|
|
130
|
+
pithosai --lang zh "请解释这个错误"
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
```bash
|
|
134
|
+
export LANG=ja_JP.UTF-8
|
|
135
|
+
pithosai "今日のタスクを要約してください"
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Supported language codes:
|
|
139
|
+
- `en` (English)
|
|
140
|
+
- `ar` (Arabic)
|
|
141
|
+
- `de` (German)
|
|
142
|
+
- `es` (Spanish)
|
|
143
|
+
- `fr` (French)
|
|
144
|
+
- `it` (Italian)
|
|
145
|
+
- `ja` (Japanese)
|
|
146
|
+
- `ko` (Korean)
|
|
147
|
+
- `nl` (Dutch)
|
|
148
|
+
- `pt` (Portuguese)
|
|
149
|
+
- `zh` (Simplified Chinese)
|
|
150
|
+
- `zh-hant` (Traditional Chinese)
|
|
151
|
+
|
|
152
|
+
### Upgrading from v1.0.4 (plaintext `pithosai.db`)
|
|
153
|
+
|
|
154
|
+
- **Automatic:** After upgrading to **1.0.5+**, plaintext databases are migrated in place to encrypted storage on first open when encryption support is available.
|
|
155
|
+
- **Manual (optional):** You can run `pithosai migrate-db` if you want to trigger migration directly.
|
|
64
156
|
|
|
65
157
|
---
|
|
66
158
|
|
|
@@ -77,7 +169,7 @@ pithosai --mode dialog "Explain this error"
|
|
|
77
169
|
pithosai --mode plan "Outline the next sprint"
|
|
78
170
|
```
|
|
79
171
|
|
|
80
|
-
Result previews (terminal or optional Chrome via Playwright) can be tuned with `PITHOSAI_SKIP_RESULT_BROWSER`, `PITHOSAI_RESULT_BROWSER`, and `PITHOSAI_PLAYWRIGHT_CHANNEL`.
|
|
172
|
+
Result previews (terminal or optional Chrome via Playwright) can be tuned with `PITHOSAI_SKIP_RESULT_BROWSER`, `PITHOSAI_RESULT_BROWSER`, and `PITHOSAI_PLAYWRIGHT_CHANNEL`.
|
|
81
173
|
|
|
82
174
|
---
|
|
83
175
|
|
|
@@ -86,12 +178,12 @@ Result previews (terminal or optional Chrome via Playwright) can be tuned with `
|
|
|
86
178
|
| Command | What it does |
|
|
87
179
|
|---------|----------------|
|
|
88
180
|
| `pithosai init [dir]` | Scaffold project, `.pithosai/sessions/`, settings. |
|
|
181
|
+
| `pithosai migrate-db` | Convert a legacy plaintext global DB to SQLCipher (optional; usually automatic on first open). |
|
|
89
182
|
| `pithosai add-role <role>` | Add a role to the project. |
|
|
90
183
|
| `pithosai task --file <md>` | Watch a task file and run tasks sequentially. |
|
|
91
184
|
| `pithosai memorize --start … --end … -r <role>` | Build `.pithosai/<role>/memory.md` from stored tasks. |
|
|
92
185
|
| `pithosai heartbeat` / `heartbeat --once` | Email-driven task pipeline (needs IMAP/SMTP in settings). |
|
|
93
|
-
| `pithosai skills …` | Install / list / remove skills
|
|
94
|
-
| `pithosai show-prompt` | Print or preview the system prompt for debugging. |
|
|
186
|
+
| `pithosai skills …` | Install / list / remove skills. |
|
|
95
187
|
| `pithosai shell "cmd"` | Run a shell command via the CLI. |
|
|
96
188
|
|
|
97
189
|
Use **`pithosai --help`** and **`pithosai <command> --help`** for flags (`--timeout`, `--lang`, `--role`, `--log-path`, etc.).
|
|
@@ -100,37 +192,29 @@ Use **`pithosai --help`** and **`pithosai <command> --help`** for flags (`--time
|
|
|
100
192
|
|
|
101
193
|
## Interactive session (short)
|
|
102
194
|
|
|
103
|
-
In a normal terminal, the default UI uses a **full-screen TUI** (bottom input, scrolling transcript). **`Ctrl+S`** stops a run; **`Ctrl+P`** pauses. Slash commands include `/shell`, `/list`, `/show-task`, `/show-prompt`, and skill helpers. Set **`PITHOSAI_NO_TUI=1`** for a classic line-based prompt (e.g. scripts or minimal terminals).
|
|
195
|
+
In a normal terminal, the default UI uses a **full-screen TUI** (bottom input, scrolling transcript). **`Ctrl+S`** stops a run; **`Ctrl+P`** pauses. Slash commands include `/model`, `/shell`, `/list`, `/show-task`, `/show-prompt`, and skill helpers. Set **`PITHOSAI_NO_TUI=1`** for a classic line-based prompt (e.g. scripts or minimal terminals).
|
|
104
196
|
|
|
105
197
|
---
|
|
106
198
|
|
|
107
|
-
## Environment variables
|
|
199
|
+
## Environment variables
|
|
108
200
|
|
|
109
201
|
| Variable | Role |
|
|
110
202
|
|----------|------|
|
|
111
203
|
| `CURSOR_MODEL`, `CURSOR_AGENT_BIN` | Cursor CLI integration |
|
|
112
204
|
| `DEEPSEEK_API_KEY`, `OPENROUTER_API_KEY` | API providers |
|
|
205
|
+
| `OPENAI_LOCAL_API_BASE` | Local Ollama endpoint (requires local Ollama install) |
|
|
113
206
|
| `PITHOSAI_DB_PATH` | SQLite DB path (default `~/.pithosai/pithosai.db`) |
|
|
207
|
+
| `PITHOSAI_AUTO_UPGRADE` | Set to `0` / `false` / `no` / `off` to disable startup version check and global auto-install |
|
|
114
208
|
| `PITHOSAI_SKIP_RESULT_BROWSER` | Skip markdown preview (e.g. CI) |
|
|
115
209
|
| `PITHOSAI_RESULT_BROWSER` | `chrome` for Playwright browser preview |
|
|
116
210
|
| `PITHOSAI_TIMEOUT_MS` / `--timeout` | Run time limits |
|
|
117
211
|
| `SCRAPERAPI_API_KEY` | Used by skills / some tools |
|
|
118
212
|
|
|
119
|
-
A longer list (history limits, security hooks, debug) is documented in **`docs/Configuration.md`** in the project source tree.
|
|
120
|
-
|
|
121
213
|
---
|
|
122
214
|
|
|
123
|
-
##
|
|
124
|
-
|
|
125
|
-
The **npm package** contains the built CLI and runtime assets (not the full `docs/` tree). [CHANGELOG.md](CHANGELOG.md) ships with the package.
|
|
126
|
-
|
|
127
|
-
Extended Markdown guides live under **`docs/`** in a **full checkout** of the project (clone or archive), for example:
|
|
215
|
+
## Help and support
|
|
128
216
|
|
|
129
|
-
- `
|
|
130
|
-
- `docs/Configuration.md`
|
|
131
|
-
- `docs/TROUBLESHOOTING.md`
|
|
132
|
-
- `docs/SKILLS-CLI.md`
|
|
133
|
-
- `docs/SHELL-CLI.md`
|
|
217
|
+
Use `pithosai --help` for top-level options, and `pithosai <command> --help` for command-specific details.
|
|
134
218
|
|
|
135
219
|
---
|
|
136
220
|
|
package/dist/336.mjs
ADDED