@pithosai/pithosai 1.0.2 → 1.0.4
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/LICENSE +14 -0
- package/README.md +14 -27
- package/dist/156.mjs +2 -0
- package/dist/220.mjs +2 -0
- package/dist/236.mjs +2 -0
- package/dist/511.mjs +2 -0
- package/dist/613.mjs +2 -0
- package/dist/691.mjs +2 -0
- package/dist/935.mjs +3 -0
- package/dist/cosai.mjs +593 -0
- package/dist/heartbeat.mjs +593 -0
- package/dist/init-pithosai-db.mjs +2 -0
- package/dist/mktai.mjs +593 -0
- package/dist/pithosai.mjs +593 -0
- package/dist/pmsai.mjs +593 -0
- package/dist/qasai.mjs +593 -0
- package/dist/rdsai.mjs +593 -0
- package/dist/render-markdown.mjs +20 -0
- package/dist/wrsai.mjs +593 -0
- package/package.json +18 -19
- package/scripts/{npm-global-install.cjs → npm-global-install.js} +1 -5
- package/scripts/{postinstall-init-db.cjs → postinstall-init-db.js} +8 -7
- package/shims/package-root.cjs +1 -1
- package/dist/935.cjs +0 -3
- package/dist/cosai.cjs +0 -725
- package/dist/heartbeat.cjs +0 -725
- package/dist/init-pithosai-db.cjs +0 -2
- package/dist/mktai.cjs +0 -725
- package/dist/pithosai.cjs +0 -725
- package/dist/pmsai.cjs +0 -725
- package/dist/qasai.cjs +0 -725
- package/dist/rdsai.cjs +0 -725
- package/dist/render-markdown.cjs +0 -20
- package/dist/wrsai.cjs +0 -725
- package/patches/@mariozechner+pi-ai+0.52.7.patch +0 -28
- package/shims/chalk-cjs-shim.cjs +0 -45
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pithosai/pithosai",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
4
4
|
"description": "Pithos AI CLI — multi-role coding and product agents (bundled distribution).",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -9,36 +9,36 @@
|
|
|
9
9
|
"automation"
|
|
10
10
|
],
|
|
11
11
|
"author": "lidh04@gmail.com",
|
|
12
|
-
"license": "
|
|
12
|
+
"license": "UNLICENSED",
|
|
13
13
|
"type": "module",
|
|
14
|
-
"main": "./dist/pithosai.
|
|
14
|
+
"main": "./dist/pithosai.mjs",
|
|
15
15
|
"bin": {
|
|
16
|
-
"pithosai": "./dist/pithosai.
|
|
17
|
-
"pmsai": "./dist/pmsai.
|
|
18
|
-
"qasai": "./dist/qasai.
|
|
19
|
-
"rdsai": "./dist/rdsai.
|
|
20
|
-
"cosai": "./dist/cosai.
|
|
21
|
-
"mktai": "./dist/mktai.
|
|
22
|
-
"email-monitor": "./dist/heartbeat.
|
|
23
|
-
"wrsai": "./dist/wrsai.
|
|
24
|
-
"render-markdown": "./dist/render-markdown.
|
|
25
|
-
"pithosai-init-db": "./dist/init-pithosai-db.
|
|
16
|
+
"pithosai": "./dist/pithosai.mjs",
|
|
17
|
+
"pmsai": "./dist/pmsai.mjs",
|
|
18
|
+
"qasai": "./dist/qasai.mjs",
|
|
19
|
+
"rdsai": "./dist/rdsai.mjs",
|
|
20
|
+
"cosai": "./dist/cosai.mjs",
|
|
21
|
+
"mktai": "./dist/mktai.mjs",
|
|
22
|
+
"email-monitor": "./dist/heartbeat.mjs",
|
|
23
|
+
"wrsai": "./dist/wrsai.mjs",
|
|
24
|
+
"render-markdown": "./dist/render-markdown.mjs",
|
|
25
|
+
"pithosai-init-db": "./dist/init-pithosai-db.mjs"
|
|
26
26
|
},
|
|
27
27
|
"files": [
|
|
28
|
+
"LICENSE",
|
|
28
29
|
"dist",
|
|
29
|
-
"patches",
|
|
30
30
|
"shims",
|
|
31
31
|
"pithosai.sql",
|
|
32
|
-
"scripts/npm-global-install.
|
|
33
|
-
"scripts/postinstall-init-db.
|
|
32
|
+
"scripts/npm-global-install.js",
|
|
33
|
+
"scripts/postinstall-init-db.js"
|
|
34
34
|
],
|
|
35
35
|
"scripts": {
|
|
36
36
|
"build": "rm -rf dist && rspack build --config rspack.config.cjs && npm run finalize-dist",
|
|
37
|
-
"finalize-dist": "node scripts/prefix-bin-shebang.
|
|
37
|
+
"finalize-dist": "node scripts/prefix-bin-shebang.js",
|
|
38
38
|
"prepublishOnly": "npm run build",
|
|
39
39
|
"test": "vitest run",
|
|
40
40
|
"test:watch": "vitest",
|
|
41
|
-
"postinstall": "
|
|
41
|
+
"postinstall": "node scripts/postinstall-init-db.js",
|
|
42
42
|
"playwright:install": "playwright install chromium"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
@@ -58,7 +58,6 @@
|
|
|
58
58
|
"mailparser": "^3.7.1",
|
|
59
59
|
"marked": "^17.0.2",
|
|
60
60
|
"nodemailer": "^6.9.16",
|
|
61
|
-
"patch-package": "^8.0.0",
|
|
62
61
|
"pdf-parse": "^1.1.1",
|
|
63
62
|
"playwright": "^1.58.2",
|
|
64
63
|
"proper-lockfile": "^4.1.2",
|
|
@@ -1,12 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
1
|
/**
|
|
4
2
|
* Whether the current npm lifecycle is a global install (`npm install -g`).
|
|
5
3
|
* @returns {boolean}
|
|
6
4
|
*/
|
|
7
|
-
function isNpmGlobalInstall() {
|
|
5
|
+
export function isNpmGlobalInstall() {
|
|
8
6
|
const g = process.env.npm_config_global;
|
|
9
7
|
return g === "true" || g === "1";
|
|
10
8
|
}
|
|
11
|
-
|
|
12
|
-
module.exports = { isNpmGlobalInstall };
|
|
@@ -1,18 +1,19 @@
|
|
|
1
|
-
|
|
1
|
+
import { spawnSync } from "node:child_process";
|
|
2
|
+
import path from "node:path";
|
|
3
|
+
import fs from "node:fs";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
import { isNpmGlobalInstall } from "./npm-global-install.js";
|
|
6
|
+
|
|
7
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
2
8
|
|
|
3
9
|
/**
|
|
4
10
|
* After a global `npm install -g @pithosai/pithosai`, ensure `~/.pithosai/pithosai.db` exists.
|
|
5
11
|
* Local / non-global installs skip this (no-op).
|
|
6
12
|
*/
|
|
7
|
-
const { spawnSync } = require("node:child_process");
|
|
8
|
-
const path = require("node:path");
|
|
9
|
-
const fs = require("node:fs");
|
|
10
|
-
const { isNpmGlobalInstall } = require("./npm-global-install.cjs");
|
|
11
|
-
|
|
12
13
|
function main() {
|
|
13
14
|
if (!isNpmGlobalInstall()) return;
|
|
14
15
|
const root = path.join(__dirname, "..");
|
|
15
|
-
const initCli = path.join(root, "dist", "init-pithosai-db.
|
|
16
|
+
const initCli = path.join(root, "dist", "init-pithosai-db.mjs");
|
|
16
17
|
if (!fs.existsSync(initCli)) return;
|
|
17
18
|
const r = spawnSync(process.execPath, [initCli], { stdio: "inherit", cwd: root });
|
|
18
19
|
if (r.status !== 0) process.exit(r.status ?? 1);
|
package/shims/package-root.cjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Resolves the npm package install root (directory containing this package's package.json).
|
|
5
|
-
* Parent of shims/ —
|
|
5
|
+
* Parent of shims/ — lets bundled `dist/*.mjs` resolve the install root via `paths.js` (`createRequire` of this file).
|
|
6
6
|
*/
|
|
7
7
|
const path = require("node:path");
|
|
8
8
|
|
package/dist/935.cjs
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";exports.ids=["935"],exports.modules={117(t,e,i){i.d(e,{showMarkdownInPiTui:()=>a});var s=i(691),l=i(950),r=i(168);let h=!1;class n{constructor(t){const{terminal:e,tui:i,markdown:s,hintText:l,documentTitle:r,onClose:h}=t;this.terminal=e,this.tui=i,this._markdown=s,this.hintText=l,this.documentTitle=r?.trim()||"",this.onClose=h,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=Math.max(1,this.terminal.rows-!!this.documentTitle-1),s=Math.max(0,this._getFullLines(e).length-i);if((0,r.matchesKey)(t,"escape")||(0,r.matchesKey)(t,"esc")||(0,r.matchesKey)(t,"q")||(0,r.matchesKey)(t,"shift+q")||(0,r.matchesKey)(t,"ctrl+c")){this.clearGgPrefixState(),this.onClose();return}if((0,r.matchesKey)(t,"shift+g")){this.clearGgPrefixState(),this.scrollTop=s;return}if((0,r.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,r.matchesKey)(t,"up")||(0,r.matchesKey)(t,"k")){this.scrollTop=Math.max(0,this.scrollTop-1);return}if((0,r.matchesKey)(t,"down")||(0,r.matchesKey)(t,"j")){this.scrollTop=Math.min(s,this.scrollTop+1);return}if((0,r.matchesKey)(t,"pageUp")||(0,r.matchesKey)(t,"ctrl+u")){this.scrollTop=Math.max(0,this.scrollTop-i);return}if((0,r.matchesKey)(t,"pageDown")||(0,r.matchesKey)(t,"ctrl+d")){this.scrollTop=Math.min(s,this.scrollTop+i);return}if((0,r.matchesKey)(t,"home")){this.scrollTop=0;return}if((0,r.matchesKey)(t,"end")){this.scrollTop=s;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?[s.m.bold.cyan((0,r.truncateToWidth)(this.documentTitle,t))]:[],l=Math.max(1,e-i.length-1);null!=this._cachedWidth&&this._cachedWidth!==t&&this.invalidate();let h=this._getFullLines(t),n=Math.max(0,h.length-l);this.scrollTop=Math.min(this.scrollTop,n);let a=h.slice(this.scrollTop,this.scrollTop+l);for(;a.length<l;)a.push("");return[...i,...a,s.m.dim((0,r.truncateToWidth)(this.hintText,t))]}}async function a(t){let{markdown:e,t:i,documentTitle:s,tuiSession:a=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 o=a&&"function"==typeof a.suspendForReadline&&"function"==typeof a.resumeFromReadline;o&&a.suspendForReadline();try{h||((0,l.CK)("dark"),h=!0);let t=(0,l.pd)(),a=new r.Markdown(e,1,1,t),o=i("cli.resultPreviewTerminalHint"),c=new r.ProcessTerminal,m=new r.TUI(c);m.setClearOnShrink(!0),await new Promise(t=>{let e,i=new n({terminal:c,tui:m,markdown:a,hintText:o,documentTitle:s,onClose:()=>{e?.clearGgPrefixState(),m.stop(),t()}});e=i;let l=new r.Container;l.addChild(i),m.addChild(l),m.setFocus(i),m.start(),m.requestRender(!0)})}finally{o&&a.resumeFromReadline()}}}};
|