@gobi-starweaver/ws-cli 0.3.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.
Files changed (36) hide show
  1. package/LICENSE +53 -0
  2. package/README-en.md +52 -0
  3. package/README.md +52 -0
  4. package/assets/assembly-orders/README.md +29 -0
  5. package/assets/asset-catalog/index.json +11 -0
  6. package/assets/asset-catalog/snapshots/catalog-2026-08-15.json +3122 -0
  7. package/assets/card-templates/README.md +166 -0
  8. package/assets/card-templates/collator.card.json +117 -0
  9. package/assets/card-templates/deep-reader.card.json +108 -0
  10. package/assets/card-templates/grant-editor.card.json +107 -0
  11. package/assets/card-templates/grant-writer.card.json +111 -0
  12. package/assets/card-templates/paper-review-rechecker.card.json +108 -0
  13. package/assets/card-templates/paper-reviewer.card.json +106 -0
  14. package/assets/card-templates/translation-reviewer.card.json +149 -0
  15. package/assets/card-templates/translator.card.json +149 -0
  16. package/assets/card-templates/visual-general.card.json +130 -0
  17. package/assets/card-templates/writing-author.card.json +137 -0
  18. package/assets/card-templates/writing-editor.card.json +118 -0
  19. package/assets/card-templates//346/234/233/350/210/222/344/270/223/345/277/203/351/251/276/351/251/266/350/257/264/346/230/216_/345/206/231/344/275/234/347/273/204.md +93 -0
  20. package/assets/card-templates//346/234/233/350/210/222/344/270/223/345/277/203/351/251/276/351/251/266/350/257/264/346/230/216_/345/256/241/347/250/277/347/273/204.md +70 -0
  21. package/assets/card-templates//346/234/233/350/210/222/344/270/223/345/277/203/351/251/276/351/251/266/350/257/264/346/230/216_/347/224/263/346/212/245/347/273/204.md +92 -0
  22. package/assets/card-templates//346/234/233/350/210/222/344/270/223/345/277/203/351/251/276/351/251/266/350/257/264/346/230/216_/347/277/273/350/257/221/347/273/204.md +70 -0
  23. package/assets/card-templates//346/234/233/350/210/222/350/275/254/345/221/210/345/275/242/346/200/201/350/247/204/350/214/203.md +58 -0
  24. package/assets/expressions/ascii-art.json +152 -0
  25. package/assets/expressions/emoji-full.json +11558 -0
  26. package/assets/expressions/emoji.json +415 -0
  27. package/bundled/plan/SKILL.md +133 -0
  28. package/chunks/chunk-BUBNMVFA.js +77 -0
  29. package/chunks/chunk-O2SA6W2I.js +37899 -0
  30. package/chunks/chunk-S7EGXUII.js +49 -0
  31. package/chunks/devtools-V5WI5QLO.js +3882 -0
  32. package/cli.js +81427 -0
  33. package/mcp/servers/doc-toolchain-server.js +1516 -0
  34. package/mcp/servers/ws-vision-ocr-server.js +32 -0
  35. package/package.json +26 -0
  36. package/templates/prompts/init_command.md.ejs +44 -0
package/LICENSE ADDED
@@ -0,0 +1,53 @@
1
+ 望舒 CLI(WS CLI)· 北辰计划·望舒 Polaris·WS
2
+ ==================================================
3
+
4
+ 一、瀚海织星 GSH 部分(专有软件)
5
+
6
+ 本软件中由瀚海织星 GSH(Gobi StarWeaver Digital History Lab)创作、新增
7
+ 与修改的全部内容(包括但不限于界面与交互、文案、技能与人格资产、史学
8
+ 与人文功能、以及全部衍生工程):
9
+
10
+ Copyright (c) 2026 瀚海织星 GSH(Gobi StarWeaver Digital History Lab)
11
+ 保留一切权利(All Rights Reserved)。
12
+
13
+ 您可为个人学术研究之目的,经官方分发渠道下载、安装并运行本软件。未经
14
+ 瀚海织星 GSH 事先书面许可,任何人不得对本部分进行复制、修改、改编、
15
+ 合并、出版、分发、再许可、销售,或将其用于商业目的。
16
+
17
+ The portions of the Software authored by Gobi StarWeaver Digital History
18
+ Lab (GSH) are proprietary. You may download, install and run the Software
19
+ via official distribution channels for personal academic research. Any other
20
+ copying, modification, adaptation, merging, publication, distribution,
21
+ sublicensing, sale, or commercial use of these portions requires the prior
22
+ written permission of GSH.
23
+
24
+ 二、DeepCode 上游部分(MIT License · 义务保留)
25
+
26
+ 本软件 fork 自 DeepCode(https://github.com/lessweb/deepcode-cli)。其中
27
+ 源自 DeepCode 的上游部分依 MIT License 发布,其版权声明与许可声明依
28
+ MIT 义务全文保留如下:
29
+
30
+ MIT License
31
+
32
+ Copyright (c) 2026 lessweb
33
+
34
+ Permission is hereby granted, free of charge, to any person obtaining a copy
35
+ of this software and associated documentation files (the "Software"), to deal
36
+ in the Software without restriction, including without limitation the rights
37
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
38
+ copies of the Software, and to permit persons to whom the Software is
39
+ furnished to do so, subject to the following conditions:
40
+
41
+ The above copyright notice and this permission notice shall be included in all
42
+ copies or substantial portions of the Software.
43
+
44
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
45
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
46
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
47
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
48
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
49
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
50
+ SOFTWARE.
51
+
52
+ ==================================================
53
+ 《史学智能生态系统》魏柯帆团队原创,知识产权受保护。
package/README-en.md ADDED
@@ -0,0 +1,52 @@
1
+ <div align="center">
2
+
3
+ <h1>北辰计划·望舒 Polaris·WS</h1>
4
+
5
+ **A soft lamp for all who sail the sea of learning by night.**
6
+
7
+ [中文](README.md) · English
8
+
9
+ </div>
10
+
11
+ 望舒 (WS) is a terminal agent from the Beichen Project (北辰计划), built for historical and humanistic research: in your command line, it inquires, reads, writes and revises with you through conversation — like a colleague sitting across your desk.
12
+
13
+ The Beichen Project is the humanities-agent series of Gobi StarWeaver (GSH), and holds that an agent for the humanities should carry both human warmth and scholarly rigor.
14
+
15
+ ## Installation
16
+
17
+ One command installs everything (auto-detects your OS and architecture, installs all dependencies, and talks to exactly one domain — our official site):
18
+
19
+ **Windows** (paste in PowerShell, press Enter):
20
+
21
+ ```powershell
22
+ irm https://gobi-starweaver.cn/dist/install.ps1 | iex
23
+ ```
24
+
25
+ **macOS / Linux** (paste in a terminal, press Enter):
26
+
27
+ ```bash
28
+ curl -fsSL https://gobi-starweaver.cn/dist/install.sh | bash
29
+ ```
30
+
31
+ Then **close and reopen your terminal**, and run `ws` in any project directory. On first launch, sign in with your Beichen Project account to get started (subscription verification happens automatically with login).
32
+
33
+ ## What it does
34
+
35
+ - **Conversation is the work**: state your topic and materials; 望舒 searches, reads, writes and revises with you, step by step.
36
+ - **Historical sources at hand**: built-in Hanji corpus retrieval — dynastic histories, veritable records and collected works, with citations traceable to juan and page.
37
+ - **Thinking with a breath**: while waiting, you can see footprints like "consulting the Zizhi Tongjian…"; the moment the answer arrives, all is calm again.
38
+ - **Skills that grow**: the Skills and MCP plugin system lets 望舒 grow with your research habits.
39
+ - **Sign in and rest easy**: once logged in and your subscription verified, every request is relayed securely through Beichen servers — no keys ever live on your machine.
40
+
41
+ ## Versioning
42
+
43
+ 望舒 carries two version numbers, each governing its own domain:
44
+
45
+ - **Mind version v0.9**: the settled version of 望舒's persona, mind and writing style — how it thinks and how it writes.
46
+ - **Release version 0.3.0**: the semantic version of the CLI software itself — installation, upgrades and issue reports refer to this one.
47
+
48
+ ## License and origin
49
+
50
+ This software is **proprietary** — copyright Gobi StarWeaver Digital History Lab (GSH), all rights reserved; the portions originating from [DeepCode](https://github.com/lessweb/deepcode-cli) remain under the MIT License as required — see [LICENSE](LICENSE). 望舒 CLI is continuously developed by GSH.
51
+
52
+ 《史学智能生态系统》魏柯帆团队原创,知识产权受保护。
package/README.md ADDED
@@ -0,0 +1,52 @@
1
+ <div align="center">
2
+
3
+ <h1>北辰计划 · 望舒(Polaris·WS)</h1>
4
+
5
+ **为学海夜行的大家,掌一盏柔光。**
6
+
7
+ 中文 · [English](README-en.md)
8
+
9
+ </div>
10
+
11
+ 望舒(WS)是北辰计划出品的终端智能体,面向史学与人文研究:在命令行里以对话完成查考、翻检、写作与修订——像一位坐在你书桌对面的同行者。
12
+
13
+ 北辰计划是瀚海织星(GSH)的人文智能体系列,相信人文研究智能体当有人的温度与学的严谨。
14
+
15
+ ## 安装
16
+
17
+ 一行命令装好(自动识别系统与架构·装齐全部环境依赖·全程只访问官网一个域名):
18
+
19
+ **Windows**(PowerShell 里粘贴·回车):
20
+
21
+ ```powershell
22
+ irm https://gobi-starweaver.cn/dist/install.ps1 | iex
23
+ ```
24
+
25
+ **macOS / Linux**(终端里粘贴·回车):
26
+
27
+ ```bash
28
+ curl -fsSL https://gobi-starweaver.cn/dist/install.sh | bash
29
+ ```
30
+
31
+ 装完**关掉重开一个终端**,在任意项目目录下运行 `ws` 即可启动。首次启动按提示登录北辰计划账号即可开始使用(订阅验证随登录自动完成)。
32
+
33
+ ## 它能做什么
34
+
35
+ - **对话即工作**:直接说出你的题目与材料,望舒在终端里陪你查、读、写、改,一步步推进。
36
+ - **史籍触手可及**:内置汉籍文献检索,正史、实录、文集随问随查,出处卷叶可回溯。
37
+ - **思考有呼吸**:等待时可见它「正在查考《资治通鉴》…」般的思索足迹;正文一出即归于沉静。
38
+ - **技能可生长**:技能(Skills)与插件(MCP)体系让望舒随你的研究习惯生长。
39
+ - **登录即安心**:登录并验证订阅后,一切请求都经北辰服务器安全转发——你的机器上不放任何密钥。
40
+
41
+ ## 版本说明
42
+
43
+ 望舒有两个版本号,各管一段:
44
+
45
+ - **心智版本 v0.9**:望舒的人格、心智与写作风格的定型版本——它怎样思考、怎样落笔。
46
+ - **发行版本 0.3.0**:CLI 软件本身的语义化版本号——安装、升级、问题反馈以此为准。
47
+
48
+ ## 许可与出身
49
+
50
+ 本软件为**专有软件**,版权归瀚海织星 GSH 所有(保留一切权利);其中源自 [DeepCode](https://github.com/lessweb/deepcode-cli) 的上游部分依 MIT License 义务保留——详见 [LICENSE](LICENSE)。望舒 CLI 由瀚海织星 GSH 持续研发。
51
+
52
+ 《史学智能生态系统》魏柯帆团队原创,知识产权受保护。
@@ -0,0 +1,29 @@
1
+ # 常任官组装单目录(Assembly Orders Registry)
2
+
3
+ 随包单源(packaged permanent-only)。每个文件是一个 `ws.assembly/v0.1` AssemblyOrder JSON,
4
+ 运行时由 `list-orders`/`run-order` 实时扫描,不做缓存。
5
+
6
+ ## 文件格式
7
+
8
+ - 文件名:`<instanceId>.assembly.json`(`instanceId` 限 `[A-Za-z0-9][A-Za-z0-9_-]{0,127}`)
9
+ - 内容:单个完整 AssemblyOrder JSON,UTF-8 无 BOM
10
+ - 单文件上限:262,144 bytes
11
+ - `order.agent.tenure` 必须为 `permanent`
12
+
13
+ ## 扫描规则
14
+
15
+ 1. 只收匹配 `^[A-Za-z0-9][A-Za-z0-9_-]{0,127}\.assembly\.json$` 的 regular file
16
+ 2. 不跟随 symlink/reparse point
17
+ 3. 单文件不超过 262,144 bytes
18
+ 4. `parseAssemblyOrder` 必过
19
+ 5. 文件 stem 必须等于 `order.agent.instanceId`
20
+ 6. `order.agent.tenure` 必须为 `permanent`
21
+ 7. `orderId` 在目录内唯一;`instanceId` 在目录内唯一
22
+ 8. `run-order` 按扫描结果中的 `orderId` 精确匹配,不拿用户输入直接拼文件路径
23
+
24
+ ## 只读 / R2 纪律
25
+
26
+ - 本目录只读:无 create/update/promote API
27
+ - R2 晋升由望舒提议、魏柯帆决定、人工把成功单纳入下一 revision
28
+ - 不得用 orderId 直接构造文件路径(orderId 未被 schema 限为安全文件名)
29
+ - 与硬编码 REGISTRY(旧 `list/run`)并存不合并;同名 instanceId 记 `crossRegistryIdCollision` warning
@@ -0,0 +1,11 @@
1
+ {
2
+ "currentRevision": "catalog-2026-08-15",
3
+ "schemaVersion": "ws.asset-catalog-index/v1",
4
+ "snapshots": [
5
+ {
6
+ "file": "snapshots/catalog-2026-08-15.json",
7
+ "revision": "catalog-2026-08-15",
8
+ "sha256": "0d6c2be9190979c3d5839be54323e87a984fc4f02489a8d18e70f92323644e68"
9
+ }
10
+ ]
11
+ }