psyclaw 0.30.9 → 0.30.12

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 CHANGED
@@ -1,21 +1,16 @@
1
- MIT License
1
+ Creative Commons Attribution-NonCommercial 4.0 International
2
2
 
3
- Copyright (c) 2026 Exekiel179 and PsyClaw contributors
3
+ Copyright (c) 2026 Exekiel179
4
4
 
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
5
+ PsyClaw is licensed under the Creative Commons Attribution-NonCommercial 4.0
6
+ International License (CC BY-NC 4.0).
11
7
 
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
8
+ You may share and adapt the material for non-commercial purposes, provided you
9
+ give appropriate credit and indicate if changes were made. Commercial use is not
10
+ permitted under this license.
14
11
 
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
12
+ Full legal code:
13
+ https://creativecommons.org/licenses/by-nc/4.0/legalcode
14
+
15
+ Human-readable summary:
16
+ https://creativecommons.org/licenses/by-nc/4.0/
package/README.md CHANGED
@@ -2,21 +2,20 @@
2
2
 
3
3
  面向社会科学研究的智能体工作台:把研究项目、证据账本、完整性门禁、可恢复工作流和本地面板接到内置运行时上。它不替代统计软件,也不会把未经核验的引用、结果或审稿意见写成事实。
4
4
 
5
- 当前版本:`0.30.9` · 命令与用户目录:`psyclaw` / `~/.psyclaw` · 许可证:MIT
6
- 内置 Academic Research Skills(`vendor/ars`)遵循上游 CC BY-NC 4.0,仅限非商业用途。
5
+ 许可证:CC BY-NC 4.0
7
6
 
8
7
  ## 安装
9
8
 
10
9
  需要 Node.js `>=22.19.0`。
11
10
 
12
11
  ```bash
13
- npm install -g psyclaw@0.30.9
12
+ npm install -g psyclaw@latest
14
13
  ```
15
14
 
16
15
  中国大陆可用镜像或安装脚本:
17
16
 
18
17
  ```bash
19
- npm install -g psyclaw@0.30.9 --registry=https://registry.npmmirror.com
18
+ npm install -g psyclaw@latest --registry=https://registry.npmmirror.com
20
19
  # 或
21
20
  PSYCLAW_CN=1 curl -fsSL https://exekiel179.github.io/psyclaw/install.sh | sh
22
21
  ```
@@ -79,13 +78,6 @@ psyclaw evidence add notes/source.md --level user
79
78
  - [技能与生态准入清单](docs/技能与生态准入清单.md) · [威胁模型](docs/威胁模型.md)
80
79
  - [AGENTS.md](AGENTS.md)
81
80
 
82
- ## 边界
83
-
84
- - 复用官方 Pi runtime,不维护 fork。
85
- - 统计计算委托 Python/R、SPSS/Stata/Mplus 或受信任 MCP;须保存脚本、输入指纹与环境信息。
86
- - Skill / Plugin / MCP 默认只发现、不执行;启用前核对来源与信任状态。
87
- - 无证据的事实性 Claim 须标为 `uncertain` 或阻断;无 receipt / 审批的副作用不算完成。
88
-
89
81
  ## 从源码开发
90
82
 
91
83
  ```bash
@@ -109,7 +101,7 @@ RELEASE_MESSAGE="release: describe the change" pnpm release:push
109
101
 
110
102
  ```bash
111
103
  npm uninstall -g psyclaw
112
- npm install -g psyclaw@0.30.9
104
+ npm install -g psyclaw@latest
113
105
  ```
114
106
 
115
107
  仅卸载程序:`npm uninstall -g psyclaw`
@@ -15,6 +15,7 @@ import { PROVIDER_PRESETS, providerCredentialSource, saveProviderConfig } from "
15
15
  import { dirname } from "node:path";
16
16
  import { fileURLToPath } from "node:url";
17
17
  import { coreSkillNames, enabledRecommendedSkillPaths, normalizeRecommendedSkillId, readRecommendationState, readRecommendedCatalog, recommendedSkillTarget, saveRecommendationState, validateModelInstalledRecommendedSkill, } from "../../skills/recommended.js";
18
+ import { buildRecommendedSkillInstallTask } from "../../skills/install-guidance.js";
18
19
  import { SkillManagerComponent } from "../../tui/skill-manager.js";
19
20
  import { BiosignalWizardComponent } from "../../tui/biosignal-wizard.js";
20
21
  import { readBiosignalPackCatalog, resolveBiosignalInstallPlan, } from "../../skills/biosignal-pack.js";
@@ -784,20 +785,15 @@ async function showMcpManager(pi, ctx, runtime) {
784
785
  }
785
786
  }
786
787
  function modelSkillInstallTask(root, row, scope) {
787
- const target = recommendedSkillTarget(root, row.id, scope);
788
- return [
789
- `安装推荐 Skill:${row.name} (${row.id})。`,
790
- `来源网址:${row.sourceRef}`,
791
- ...(row.installHint ? [`仓库入口提示:${row.installHint}`] : []),
792
- `安装位置:${skillScopeLabel(scope)}。`,
793
- `唯一允许的最终目标目录:${target}`,
794
- "用户已通过 Skill 管理页授权本次安装。请使用当前会话的联网、文件和命令工具读取来源仓库,并直接下载、安装所需依赖和完成 Skill 安装;不要再次要求安装权限。不要写入其他 Skill 目录,不要修改 .psyclaw/data/raw、data/raw、.git 或研究产物。",
795
- row.collection
796
- ? "这是多 Skill 套件:目标目录自身无需 SKILL.md,但其子目录必须包含一个或多个有效 SKILL.md。保留套件内共享目录和相对路径,不得包含 .git、符号链接或凭据。"
797
- : "目标目录最终必须直接包含有效 SKILL.md(YAML frontmatter 至少包含 name 和 description),不得包含 .git、符号链接、凭据或二进制大文件。",
798
- "如果仓库包含多个 Skill,只安装与此推荐项相符的部分;如果它不是 Skill 或无法合理适配,停止并说明原因,不要伪造 SKILL.md。",
799
- "安装完成后检查目标目录结构。该项已在推荐状态中默认启用;完成后执行 /reload 即可加载,无需再手动启用。",
800
- ].join("\n");
788
+ return buildRecommendedSkillInstallTask({
789
+ name: row.name,
790
+ id: row.id,
791
+ sourceRef: row.sourceRef ?? "",
792
+ target: recommendedSkillTarget(root, row.id, scope),
793
+ scopeLabel: skillScopeLabel(scope),
794
+ ...(row.installHint ? { installHint: row.installHint } : {}),
795
+ collection: Boolean(row.collection),
796
+ });
801
797
  }
802
798
  async function chooseSkillScope(ctx) {
803
799
  const projectLabel = skillScopeLabel("project");