protara 0.0.0-stage → 0.3.6
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 +102 -2
- package/bin/protara.mjs +34 -0
- package/dist/cli/index.cjs +90338 -0
- package/package.json +40 -3
package/package.json
CHANGED
|
@@ -1,6 +1,43 @@
|
|
|
1
1
|
{
|
|
2
|
+
"//name": "⭐ 裸包名(2026-11-12 查过 registry.npmjs.org 上未被占用)。⚠️ npm 包名必须**全小写** —— 上级目录那个 `Protara`(大写 P)在 npm 上是**非法**的,`npm publish` 会直接 400。这也是必须拆独立包的原因之一。",
|
|
2
3
|
"name": "protara",
|
|
3
|
-
"version": "0.0.
|
|
4
|
-
"
|
|
5
|
-
"description": "
|
|
4
|
+
"//version": "⚠️ **由 `scripts/publish-cli.mjs` 在打包时写入**(取 `desktop-app/package.json` 的版本),⛔ 不要手改:两处版本漂移的症状是「npm 上是 0.3.6、包里 `--version` 打印 0.3.5」,而两个都看起来正常。",
|
|
5
|
+
"version": "0.3.6",
|
|
6
|
+
"description": "Protara 的终端客户端:在终端里与 Agent 对话、跑本机工具、审批权限变更。无 GUI、可管道、退出码规范。",
|
|
7
|
+
"//type": "CLI 产物是 CJS(`dist/cli/index.cjs`),而 bin 垫片是 ESM(`.mjs`)。`type: module` 让 `.mjs` 名正言顺,同时 `.cjs` 扩展名保证 CJS 解析。",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"//bin": "命令名 `protara`,指向仓库里的**同一份**垫片(`desktop-app/bin/protara.mjs` 被复制到本包的 `bin/`)。⛔ 不要在这里另写一套启动逻辑 —— 两份垫片的漂移形态是「仓库里能跑、npm 装完不能跑」。",
|
|
10
|
+
"bin": {
|
|
11
|
+
"protara": "bin/protara.mjs"
|
|
12
|
+
},
|
|
13
|
+
"//files": "⭐ **白名单**(不是黑名单):本目录只有 bin/ 与 dist/ 该发出去。⚠️ 千万别省掉这一格 —— 默认会把整个目录都打包,而本目录的父级是那个 2.4 万文件的 desktop-app。",
|
|
14
|
+
"files": [
|
|
15
|
+
"bin/",
|
|
16
|
+
"dist/",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"//engines": "与 desktop-app/package.json 同值(CLI 产物 target 是 node20,但开发态单测路径要 ≥22.6 —— 取较严的那条)。⚠️ 两个包必须同值:npm 只按这个包的 engines 警告用户,写宽了用户装完才在运行期炸。",
|
|
20
|
+
"engines": {
|
|
21
|
+
"node": ">=22.6"
|
|
22
|
+
},
|
|
23
|
+
"//os/cpu": "⛔ 刻意**不限制**:产物是纯 JS(3.2MB 单文件,零原生依赖),macOS / Linux / Windows 都能跑。⚠️ 验证过:把产物拷到一个只有 Node、没有 node_modules 的目录,`--version` / `--help` / `status` 全部正常。",
|
|
24
|
+
"//dependencies": "⭐ **空**。CLI 产物由 esbuild 把 SDK 与 srt 全部内联,第三方依赖只剩 ajv 的几条**字符串字面量**(ajv 生成校验函数时嵌进去的标识,不是真的 require)。⚠️ 加任何依赖之前先跑 `npm run verify:cli-deps`(它会列出产物里真正的外部 require)。",
|
|
25
|
+
"dependencies": {},
|
|
26
|
+
"//license": "UNLICENSED:**内部工具,不授权外部分发**。⚠️ 这与「发到公开 npm」并不矛盾(npm 允许发 UNLICENSED),但意味着任何人都能 `npm i -g protara` ⇒ 如果这不可接受,改用私有 scope(`@yl/protara`)或私有 registry。见 README 的「发布前须知」。",
|
|
27
|
+
"license": "UNLICENSED",
|
|
28
|
+
"//private": "⚠️ **不能是 true** —— 那会让 `npm publish` 直接拒绝。这与 desktop-app 那份不同(那份是 private 的应用壳)。",
|
|
29
|
+
"private": false,
|
|
30
|
+
"//publishConfig": "⭐ 显式钉官方源:本机默认 registry 是 npmmirror(淘宝镜像,**只读**,`npm publish` 会 403)。⚠️ 不改全局 `.npmrc` —— 只让这一个包发到官方源,日常安装仍走镜像(快)。",
|
|
31
|
+
"publishConfig": {
|
|
32
|
+
"registry": "https://registry.npmjs.org",
|
|
33
|
+
"access": "public"
|
|
34
|
+
},
|
|
35
|
+
"//repository": "⚠️ 内部仓库地址(可选)。发公开 npm 时这一格会显示在包页面上,填之前确认不泄露内网路径 —— 所以这里先留空对象形态。",
|
|
36
|
+
"keywords": [
|
|
37
|
+
"protara",
|
|
38
|
+
"cli",
|
|
39
|
+
"agent",
|
|
40
|
+
"terminal",
|
|
41
|
+
"desktop-agents"
|
|
42
|
+
]
|
|
6
43
|
}
|