@pithosai/pithosai 1.0.3 → 1.0.5
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 +64 -26
- package/dist/336.mjs +2 -0
- package/dist/935.mjs +2 -2
- package/dist/cosai.mjs +134 -264
- package/dist/heartbeat.mjs +134 -264
- package/dist/init.mjs +2 -0
- package/dist/mktai.mjs +134 -264
- package/dist/pithosai.mjs +134 -264
- package/dist/pmsai.mjs +134 -264
- package/dist/qasai.mjs +134 -264
- package/dist/rdsai.mjs +134 -264
- package/dist/render-markdown.mjs +10 -7
- package/dist/wrsai.mjs +134 -264
- package/package.json +5 -10
- package/scripts/{postinstall-init-db.js → postinstall-init.js} +1 -1
- package/shims/package-root.cjs +1 -1
- package/dist/475.mjs +0 -2
- package/dist/init-pithosai-db.mjs +0 -2
- package/pithosai.sql +0 -177
- package/shims/chalk-cjs-shim.cjs +0 -45
package/README.md
CHANGED
|
@@ -1,6 +1,17 @@
|
|
|
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.5 (Customer Security View)
|
|
8
|
+
|
|
9
|
+
- **Encrypted storage upgrade for existing users:** Legacy plaintext `pithosai.db` data is upgraded to encrypted storage on first open when encryption support is available.
|
|
10
|
+
- **Device-tied protection:** Database protection is tied to your machine, reducing the risk of copied files being opened elsewhere.
|
|
11
|
+
- **Safer release logging defaults:** Packaged releases now default to `INFO` logging to reduce unnecessary verbose output in normal usage.
|
|
12
|
+
- **Controlled Markdown terminal output:** `render-markdown` now supports pager-based scrolling by default, with explicit `--show-all` when full direct terminal output is desired.
|
|
13
|
+
|
|
14
|
+
See the database notes below for migration behavior and security details.
|
|
4
15
|
|
|
5
16
|
---
|
|
6
17
|
|
|
@@ -20,11 +31,11 @@ On a **global** install, the package runs a one-time step: if `~/.pithosai/pitho
|
|
|
20
31
|
|
|
21
32
|
| You run | Purpose |
|
|
22
33
|
|--------|---------|
|
|
23
|
-
| `pithosai` | Main CLI: `init`, interactive agent, `task`, `heartbeat`, `skills`, `memorize`, and more. |
|
|
34
|
+
| `pithosai` | Main CLI: `init`, `migrate-db`, interactive agent, `task`, `heartbeat`, `skills`, `memorize`, and more. |
|
|
24
35
|
| `rdsai`, `pmsai`, `qasai`, `cosai`, `mktai`, `wrsai` | Same CLI with a **default role** (e.g. RD, PM, QA). |
|
|
25
36
|
| `email-monitor` | Heartbeat / email-driven task loop (`heartbeat` bundle). |
|
|
26
37
|
| `render-markdown` | Render Markdown files in the terminal. |
|
|
27
|
-
| `
|
|
38
|
+
| `init` | Manually initialize `~/.pithosai/pithosai.db` if needed (usually automatic after global install). |
|
|
28
39
|
|
|
29
40
|
---
|
|
30
41
|
|
|
@@ -32,7 +43,11 @@ On a **global** install, the package runs a one-time step: if `~/.pithosai/pitho
|
|
|
32
43
|
|
|
33
44
|
Configure **at least one** of:
|
|
34
45
|
|
|
35
|
-
1. **
|
|
46
|
+
1. **DeepSeek** — `export DEEPSEEK_API_KEY=sk-...`
|
|
47
|
+
|
|
48
|
+
2. **OpenRouter** — `export OPENROUTER_API_KEY=sk-or-...`
|
|
49
|
+
|
|
50
|
+
3. **Cursor CLI** (last resort)
|
|
36
51
|
```bash
|
|
37
52
|
curl https://cursor.com/install -fsS | bash
|
|
38
53
|
cursor-agent login
|
|
@@ -40,11 +55,7 @@ Configure **at least one** of:
|
|
|
40
55
|
```
|
|
41
56
|
Use **`pithosai "your request" --cursor`** or set `CURSOR_MODEL`.
|
|
42
57
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
3. **OpenRouter** — `export OPENROUTER_API_KEY=sk-or-...`
|
|
46
|
-
|
|
47
|
-
**Precedence:** `CURSOR_MODEL` / `--cursor` → DeepSeek → OpenRouter.
|
|
58
|
+
**Precedence:** DeepSeek → OpenRouter → `CURSOR_MODEL` / `--cursor`.
|
|
48
59
|
|
|
49
60
|
---
|
|
50
61
|
|
|
@@ -59,8 +70,45 @@ pithosai "Describe what you want done"
|
|
|
59
70
|
- **`pithosai -i`** — interactive session with no initial prompt.
|
|
60
71
|
- **`pithosai --no-interactive "…"`** — one shot, then exit.
|
|
61
72
|
- **`pithosai -C ./other-dir "…"`** — use another project directory.
|
|
73
|
+
- Every CLI invocation prints a cyan ASCII `pithosai` slogan banner first.
|
|
74
|
+
|
|
75
|
+
Prompts load from a local database (default `~/.pithosai/pithosai.db`). Optional role overrides live under `.pithosai/<role>/` in your project.
|
|
76
|
+
|
|
77
|
+
### Language selection
|
|
62
78
|
|
|
63
|
-
|
|
79
|
+
- Default language is **English (`en`)**.
|
|
80
|
+
- Set language per command with `--lang`.
|
|
81
|
+
- Or export `LANG` in your shell to set terminal locale preference.
|
|
82
|
+
|
|
83
|
+
Examples:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pithosai --lang zh "请解释这个错误"
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
```bash
|
|
90
|
+
export LANG=ja_JP.UTF-8
|
|
91
|
+
pithosai "今日のタスクを要約してください"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Supported language codes:
|
|
95
|
+
- `en` (English)
|
|
96
|
+
- `ar` (Arabic)
|
|
97
|
+
- `de` (German)
|
|
98
|
+
- `es` (Spanish)
|
|
99
|
+
- `fr` (French)
|
|
100
|
+
- `it` (Italian)
|
|
101
|
+
- `ja` (Japanese)
|
|
102
|
+
- `ko` (Korean)
|
|
103
|
+
- `nl` (Dutch)
|
|
104
|
+
- `pt` (Portuguese)
|
|
105
|
+
- `zh` (Simplified Chinese)
|
|
106
|
+
- `zh-hant` (Traditional Chinese)
|
|
107
|
+
|
|
108
|
+
### Upgrading from v1.0.4 (plaintext `pithosai.db`)
|
|
109
|
+
|
|
110
|
+
- **Automatic:** After upgrading to **1.0.5+**, plaintext databases are migrated in place to encrypted storage on first open when encryption support is available.
|
|
111
|
+
- **Manual (optional):** You can run `pithosai migrate-db` if you want to trigger migration directly.
|
|
64
112
|
|
|
65
113
|
---
|
|
66
114
|
|
|
@@ -77,7 +125,7 @@ pithosai --mode dialog "Explain this error"
|
|
|
77
125
|
pithosai --mode plan "Outline the next sprint"
|
|
78
126
|
```
|
|
79
127
|
|
|
80
|
-
Result previews (terminal or optional Chrome via Playwright) can be tuned with `PITHOSAI_SKIP_RESULT_BROWSER`, `PITHOSAI_RESULT_BROWSER`, and `PITHOSAI_PLAYWRIGHT_CHANNEL`.
|
|
128
|
+
Result previews (terminal or optional Chrome via Playwright) can be tuned with `PITHOSAI_SKIP_RESULT_BROWSER`, `PITHOSAI_RESULT_BROWSER`, and `PITHOSAI_PLAYWRIGHT_CHANNEL`.
|
|
81
129
|
|
|
82
130
|
---
|
|
83
131
|
|
|
@@ -86,12 +134,12 @@ Result previews (terminal or optional Chrome via Playwright) can be tuned with `
|
|
|
86
134
|
| Command | What it does |
|
|
87
135
|
|---------|----------------|
|
|
88
136
|
| `pithosai init [dir]` | Scaffold project, `.pithosai/sessions/`, settings. |
|
|
137
|
+
| `pithosai migrate-db` | Convert a legacy plaintext global DB to SQLCipher (optional; usually automatic on first open). |
|
|
89
138
|
| `pithosai add-role <role>` | Add a role to the project. |
|
|
90
139
|
| `pithosai task --file <md>` | Watch a task file and run tasks sequentially. |
|
|
91
140
|
| `pithosai memorize --start … --end … -r <role>` | Build `.pithosai/<role>/memory.md` from stored tasks. |
|
|
92
141
|
| `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. |
|
|
142
|
+
| `pithosai skills …` | Install / list / remove skills. |
|
|
95
143
|
| `pithosai shell "cmd"` | Run a shell command via the CLI. |
|
|
96
144
|
|
|
97
145
|
Use **`pithosai --help`** and **`pithosai <command> --help`** for flags (`--timeout`, `--lang`, `--role`, `--log-path`, etc.).
|
|
@@ -104,7 +152,7 @@ In a normal terminal, the default UI uses a **full-screen TUI** (bottom input, s
|
|
|
104
152
|
|
|
105
153
|
---
|
|
106
154
|
|
|
107
|
-
## Environment variables
|
|
155
|
+
## Environment variables
|
|
108
156
|
|
|
109
157
|
| Variable | Role |
|
|
110
158
|
|----------|------|
|
|
@@ -116,21 +164,11 @@ In a normal terminal, the default UI uses a **full-screen TUI** (bottom input, s
|
|
|
116
164
|
| `PITHOSAI_TIMEOUT_MS` / `--timeout` | Run time limits |
|
|
117
165
|
| `SCRAPERAPI_API_KEY` | Used by skills / some tools |
|
|
118
166
|
|
|
119
|
-
A longer list (history limits, security hooks, debug) is documented in **`docs/Configuration.md`** in the project source tree.
|
|
120
|
-
|
|
121
167
|
---
|
|
122
168
|
|
|
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:
|
|
169
|
+
## Help and support
|
|
128
170
|
|
|
129
|
-
- `
|
|
130
|
-
- `docs/Configuration.md`
|
|
131
|
-
- `docs/TROUBLESHOOTING.md`
|
|
132
|
-
- `docs/SKILLS-CLI.md`
|
|
133
|
-
- `docs/SHELL-CLI.md`
|
|
171
|
+
Use `pithosai --help` for top-level options, and `pithosai <command> --help` for command-specific details.
|
|
134
172
|
|
|
135
173
|
---
|
|
136
174
|
|
package/dist/336.mjs
ADDED
package/dist/935.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
export const __rspack_esm_id="935";export const __rspack_esm_ids=["935"];export const __webpack_modules__={8498(t,e,i){i.a(t,async function(t,s){try{i.d(e,{showMarkdownInPiTui:()=>a});var l=i(8691),r=i(
|
|
3
|
-
`);let h=l&&"function"==typeof l.suspendForReadline&&"function"==typeof l.resumeFromReadline;h&&l.suspendForReadline();try{o||((0,r.
|
|
2
|
+
export const __rspack_esm_id="935";export const __rspack_esm_ids=["935"];export const __webpack_modules__={8498(t,e,i){i.a(t,async function(t,s){try{i.d(e,{showMarkdownInPiTui:()=>a});var l=i(8691),r=i(2421),n=i(4127),h=t([l,r,n]);[l,r,n]=h.then?(await h)():h;let o=!1;class c{constructor(t){let{terminal:e,tui:i,markdown:s,hintText:l,documentTitle:r,onClose:n}=t;this.terminal=e,this.tui=i,this._markdown=s,this.hintText=l,this.documentTitle=r?.trim()||"",this.onClose=n,this.scrollTop=0,this._fullLines=null,this._cachedWidth=null,this._ggAwaitingSecondG=!1,this._ggTimer=null}clearGgPrefixState(){null!=this._ggTimer&&(clearTimeout(this._ggTimer),this._ggTimer=null),this._ggAwaitingSecondG=!1}invalidate(){this._markdown.invalidate(),this._fullLines=null,this._cachedWidth=null}handleInput(t){let e=this.terminal.columns,i=this.terminal.rows,s=+!!this.documentTitle,l=Math.max(1,i-s-1),r=this._getFullLines(e).length,h=Math.max(0,r-l);if((0,n.matchesKey)(t,"escape")||(0,n.matchesKey)(t,"esc")||(0,n.matchesKey)(t,"q")||(0,n.matchesKey)(t,"shift+q")||(0,n.matchesKey)(t,"ctrl+c")){this.clearGgPrefixState(),this.onClose();return}if((0,n.matchesKey)(t,"shift+g")){this.clearGgPrefixState(),this.scrollTop=h;return}if((0,n.matchesKey)(t,"g")){if(this._ggAwaitingSecondG){this.clearGgPrefixState(),this.scrollTop=0;return}this._ggAwaitingSecondG=!0,null!=this._ggTimer&&clearTimeout(this._ggTimer),this._ggTimer=setTimeout(()=>{this._ggTimer=null,this._ggAwaitingSecondG=!1},500);return}if(this.clearGgPrefixState(),(0,n.matchesKey)(t,"up")||(0,n.matchesKey)(t,"k")){this.scrollTop=Math.max(0,this.scrollTop-1);return}if((0,n.matchesKey)(t,"down")||(0,n.matchesKey)(t,"j")){this.scrollTop=Math.min(h,this.scrollTop+1);return}if((0,n.matchesKey)(t,"pageUp")||(0,n.matchesKey)(t,"ctrl+u")){this.scrollTop=Math.max(0,this.scrollTop-l);return}if((0,n.matchesKey)(t,"pageDown")||(0,n.matchesKey)(t,"ctrl+d")){this.scrollTop=Math.min(h,this.scrollTop+l);return}if((0,n.matchesKey)(t,"home")){this.scrollTop=0;return}if((0,n.matchesKey)(t,"end")){this.scrollTop=h;return}}_getFullLines(t){return this._fullLines&&this._cachedWidth===t||(this._cachedWidth=t,this._fullLines=this._markdown.render(t)),this._fullLines}render(t){let e=this.terminal.rows,i=this.documentTitle?[l.m.bold.cyan((0,n.truncateToWidth)(this.documentTitle,t))]:[],s=i.length,r=Math.max(1,e-s-1);null!=this._cachedWidth&&this._cachedWidth!==t&&this.invalidate();let h=this._getFullLines(t),a=Math.max(0,h.length-r);this.scrollTop=Math.min(this.scrollTop,a);let o=h.slice(this.scrollTop,this.scrollTop+r);for(;o.length<r;)o.push("");let c=l.m.dim((0,n.truncateToWidth)(this.hintText,t));return[...i,...o,c]}}async function a(t){let{markdown:e,t:i,documentTitle:s,tuiSession:l=null}=t;if(!e||"string"!=typeof e||!e.trim())return;if(!(process.stdout.isTTY&&process.stdin.isTTY))return void process.stdout.write(`${e}
|
|
3
|
+
`);let h=l&&"function"==typeof l.suspendForReadline&&"function"==typeof l.resumeFromReadline;h&&l.suspendForReadline();try{o||((0,r.initTheme)("dark"),o=!0);let t=(0,r.getMarkdownTheme)(),l=new n.Markdown(e,1,1,t),h=i("cli.resultPreviewTerminalHint"),a=new n.ProcessTerminal,m=new n.TUI(a);m.setClearOnShrink(!0),await new Promise(t=>{let e,i=new c({terminal:a,tui:m,markdown:l,hintText:h,documentTitle:s,onClose:()=>{e?.clearGgPrefixState(),m.stop(),t()}});e=i;let r=new n.Container;r.addChild(i),m.addChild(r),m.setFocus(i),m.start(),m.requestRender(!0)})}finally{h&&l.resumeFromReadline()}}s()}catch(t){s(t)}})}};
|