psyclaw 0.29.18 → 0.29.20

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.
@@ -0,0 +1,3 @@
1
+ # PsyClaw 使用白皮书
2
+
3
+ 当前使用说明、安装方式和命令接口请阅读 [PsyClaw使用白皮书_v0.29.15.md](PsyClaw使用白皮书_v0.29.15.md)。同步提供 Word 版:[PsyClaw使用白皮书_v0.29.15.docx](PsyClaw使用白皮书_v0.29.15.docx)。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "psyclaw",
3
- "version": "0.29.18",
3
+ "version": "0.29.20",
4
4
  "description": "A standalone, evidence-grounded social-science research agent with research contracts, evidence gates, and recoverable workflows",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -30,7 +30,9 @@
30
30
  "vendor/academic-paper-skills",
31
31
  "vendor/windows",
32
32
  "scripts/psyclaw.mjs",
33
- "scripts/rebrand-pi.mjs"
33
+ "scripts/rebrand-pi.mjs",
34
+ "docs/使用白皮书.md",
35
+ "docs/PsyClaw使用白皮书_v0.29.15.md"
34
36
  ],
35
37
  "engines": {
36
38
  "node": ">=22.19.0"
@@ -423,6 +423,74 @@ async function applySettingsPatches(settingsManagerPath) {
423
423
  return applied;
424
424
  }
425
425
 
426
+ export const FOOTER_PATCHES = [
427
+ {
428
+ old: ` else {
429
+ contextPercentStr = contextPercentDisplay;
430
+ }
431
+ statsParts.push(contextPercentStr);
432
+ if (areExperimentalFeaturesEnabled()) {`,
433
+ next: ` else {
434
+ contextPercentStr = contextPercentDisplay;
435
+ }
436
+ statsParts.push(contextPercentStr);
437
+ const modeStatus = this.footerData.getExtensionStatuses().get("mode");
438
+ if (modeStatus) {
439
+ statsParts.push(sanitizeStatusText(modeStatus));
440
+ }
441
+ if (areExperimentalFeaturesEnabled()) {`,
442
+ },
443
+ {
444
+ old: ` // Add extension statuses on a single line, sorted by key alphabetically
445
+ const extensionStatuses = this.footerData.getExtensionStatuses();
446
+ if (extensionStatuses.size > 0) {
447
+ const sortedStatuses = Array.from(extensionStatuses.entries())
448
+ .sort(([a], [b]) => a.localeCompare(b))
449
+ .map(([, text]) => sanitizeStatusText(text));
450
+ const statusLine = sortedStatuses.join(" ");
451
+ // Truncate to terminal width with dim ellipsis for consistency with footer style
452
+ lines.push(truncateToWidth(statusLine, width, theme.fg("dim", "...")));
453
+ }`,
454
+ next: ` // Add extension statuses on a single line, sorted by key alphabetically
455
+ const extensionStatuses = this.footerData.getExtensionStatuses();
456
+ if (extensionStatuses.size > 0) {
457
+ const sortedStatuses = Array.from(extensionStatuses.entries())
458
+ .filter(([key]) => key !== "mode")
459
+ .sort(([a], [b]) => a.localeCompare(b))
460
+ .map(([, text]) => sanitizeStatusText(text));
461
+ if (sortedStatuses.length > 0) {
462
+ const statusLine = sortedStatuses.join(" ");
463
+ // Truncate to terminal width with dim ellipsis for consistency with footer style
464
+ lines.push(truncateToWidth(statusLine, width, theme.fg("dim", "...")));
465
+ }
466
+ }`,
467
+ },
468
+ ];
469
+
470
+ export function applyFooterPatchesToContent(content) {
471
+ let patched = content;
472
+ let appliedCount = 0;
473
+ const isCrlf = content.includes("\r\n");
474
+ for (const { old, next } of FOOTER_PATCHES) {
475
+ const targetOld = isCrlf ? old.replace(/\r?\n/g, "\r\n") : old;
476
+ const targetNext = isCrlf ? next.replace(/\r?\n/g, "\r\n") : next;
477
+ if (patched.includes(targetOld)) {
478
+ patched = patched.replace(targetOld, targetNext);
479
+ appliedCount++;
480
+ }
481
+ }
482
+ return { content: patched, applied: appliedCount > 0, appliedCount };
483
+ }
484
+
485
+ async function applyFooterPatches(footerPath) {
486
+ const content = await readFile(footerPath, "utf8");
487
+ const result = applyFooterPatchesToContent(content);
488
+ if (result.applied) {
489
+ await atomicReplace(footerPath, result.content, true);
490
+ }
491
+ return result.appliedCount;
492
+ }
493
+
426
494
  const MANAGED_TOOL_DOWNLOAD_GUARD = ` // PsyClaw supplies Node-based find/grep fallbacks. Keep PATH tools when
427
495
  // present, but never fetch optional binaries from GitHub during startup.
428
496
  return undefined;`;
@@ -448,16 +516,18 @@ export async function rebrandPiRuntime(options = {}) {
448
516
  const settingsManagerPath = join(pkgDir, "dist", "core", "settings-manager.js");
449
517
  const slashCommandsPath = join(pkgDir, "dist", "core", "slash-commands.js");
450
518
  const toolsManagerPath = join(pkgDir, "dist", "utils", "tools-manager.js");
519
+ const footerPath = join(pkgDir, "dist", "modes", "interactive", "components", "footer.js");
451
520
 
452
521
  const pkgResult = await patchPackageJson(pkgPath);
453
522
  const applied = await applyModePatches(modePath);
454
523
  const settingsApplied = await applySettingsPatches(settingsManagerPath);
524
+ const footerApplied = await applyFooterPatches(footerPath);
455
525
  const commandApplied = await applySlashCommandPatches(slashCommandsPath);
456
526
  const managedToolsRestored = await restoreManagedToolManager(toolsManagerPath);
457
527
 
458
528
  if (!options.quiet) {
459
529
  process.stdout.write(
460
- `psyclaw rebrand: piConfig ${pkgResult.applied ? "applied" : "already set"} · ${applied.length > 0 ? `patched ${applied.length} display string(s)` : "display strings already patched"} · ${settingsApplied.length > 0 ? `patched ${settingsApplied.length} setting default(s)` : "settings already patched"} · ${commandApplied.length > 0 ? `hidden ${commandApplied.length} Pi command(s)` : "Pi commands already filtered"} · ${managedToolsRestored ? "restored managed-tool downloads" : "managed-tool downloads unchanged"} (${pkgDir})\n`,
530
+ `psyclaw rebrand: piConfig ${pkgResult.applied ? "applied" : "already set"} · ${applied.length > 0 ? `patched ${applied.length} display string(s)` : "display strings already patched"} · ${settingsApplied.length > 0 ? `patched ${settingsApplied.length} setting default(s)` : "settings already patched"} · ${footerApplied > 0 ? `patched ${footerApplied} footer component(s)` : "footer already patched"} · ${commandApplied.length > 0 ? `hidden ${commandApplied.length} Pi command(s)` : "Pi commands already filtered"} · ${managedToolsRestored ? "restored managed-tool downloads" : "managed-tool downloads unchanged"} (${pkgDir})\n`,
461
531
  );
462
532
  if (applied.length > 0) {
463
533
  for (const label of applied) {
@@ -469,6 +539,9 @@ export async function rebrandPiRuntime(options = {}) {
469
539
  process.stdout.write(` - ${label}…\n`);
470
540
  }
471
541
  }
542
+ if (footerApplied > 0) {
543
+ process.stdout.write(` - mode status inline with context auto indicator…\n`);
544
+ }
472
545
  if (commandApplied.length > 0) {
473
546
  for (const label of commandApplied) {
474
547
  process.stdout.write(` - ${label}…\n`);
@@ -103,8 +103,10 @@
103
103
  "name": "Journal Frontier Radar",
104
104
  "kind": "skill",
105
105
  "stage": "文献前沿",
106
- "description": "基于期刊文章清单开展可追溯的前沿追踪、主题映射、关键词分析和未解决问题发现。",
106
+ "description": "基于期刊文章清单开展可追溯的前沿追踪、主题映射、关键词分析和未解决问题发现。前置依赖:Kimi WebBridge(须先安装并 `kimi-webbridge status` 确认 extension_connected)。",
107
107
  "sourceRef": "https://github.com/kingfly51/journal-frontier-radar",
108
+ "prerequisites": ["kimi-webbridge"],
109
+ "requiresExternalTools": ["kimi-webbridge"],
108
110
  "installHint": "安装仓库中的 skills/journal-frontier-radar 完整目录,包含 SKILL.md 及其脚本。启用前须先安装推荐外部工具 Kimi WebBridge(官方 daemon + Chrome/Edge 扩展),并用 `kimi-webbridge status` 确认 extension_connected: true;不要把本机 Downloads 解压扩展当 PsyClaw Plugin 安装。"
109
111
  },
110
112
  {
@@ -204,7 +206,7 @@
204
206
  "kind": "external-tool",
205
207
  "installable": true,
206
208
  "stage": "浏览器桥接",
207
- "description": "月之暗面官方本机浏览器桥:daemon(127.0.0.1:10086)+ Chrome/Edge 扩展。让 Agent 操作用户真实浏览器与登录态,供 Journal Frontier Radar 等文献调研 Skill 联网检索;不是 PsyClaw Plugin,也不是可 clone 进 .psyclaw 的 Skill 包。",
209
+ "description": "月之暗面官方本机浏览器桥:daemon(127.0.0.1:10086)+ Chrome/Edge 扩展。让 Agent 操作用户真实浏览器与登录态;Journal Frontier Radar 的前置依赖。不是 PsyClaw Plugin,也不是可 clone 进 .psyclaw 的 Skill 包。",
208
210
  "sourceRef": "https://www.kimi.com/zh-cn/features/webbridge",
209
211
  "installHint": "按官网安装,不要把 Downloads 解压扩展当 PsyClaw Plugin。1) macOS/Linux 执行 `curl -fsSL https://cdn.kimi.com/webbridge/install.sh | bash`(Windows 按官网指引);2) 从 Chrome Web Store 或 Edge Add-ons 安装 Kimi WebBridge 扩展并保持浏览器运行;商店不可用时才从官网下载后手动「加载已解压的扩展程序」;3) 运行 `kimi-webbridge status`,确认 extension_connected: true;4) 安装脚本若写入宿主 Skill 目录(常见为 ~/.claude/skills/kimi-webbridge),保留即可,供 Agent 调用本机 daemon。完成后报告 daemon 路径、扩展连接状态与验证命令输出。"
210
212
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schemaVersion": "psyclaw/recommended-mcp/v1",
3
- "documentVersion": "0.3.2",
3
+ "documentVersion": "0.3.3",
4
4
  "sourceDocument": "学术AI_Skill分享资料.pdf + curated research MCP review",
5
5
  "sourceRef": "user-curated",
6
6
  "items": [
@@ -92,6 +92,17 @@
92
92
  "writeEffects": false,
93
93
  "status": "discover-only"
94
94
  },
95
+ {
96
+ "id": "drawio-mcp",
97
+ "name": "draw.io MCP",
98
+ "stage": "研究示意图",
99
+ "description": "官方 draw.io(diagrams.net)MCP:把 XML / CSV / Mermaid 打开到浏览器编辑器,便于研究框架图、流程图与概念图。stdio 包 @drawio/mcp;另有托管端点 https://mcp.draw.io/mcp(需 MCP Apps 宿主)。",
100
+ "sourceRef": "https://github.com/jgraph/drawio-mcp",
101
+ "transport": "stdio",
102
+ "risk": "browser-open",
103
+ "writeEffects": false,
104
+ "status": "discover-only"
105
+ },
95
106
  {
96
107
  "id": "playwright-mcp",
97
108
  "name": "Playwright MCP",
@@ -135,6 +146,7 @@
135
146
  {"id":"zotero-mcp","sourceKind":"github","ref":"d57892db395c38d7782f037bc9fc8222e6a429ae","license":"unknown","command":"git clone https://github.com/richardjlyon/zotero-mcp .psyclaw/mcp-src/zotero-mcp && git -C .psyclaw/mcp-src/zotero-mcp checkout d57892db395c38d7782f037bc9fc8222e6a429ae","target":".psyclaw/mcp/zotero-mcp.json","dependencies":["Git","Zotero local library","Zotero API/token only if explicitly configured"],"status":"blocked","requiresApproval":true,"blockedReason":"License is not verified and local-library write effects require a separate trust decision."},
136
147
  {"id":"academic-mcp","sourceKind":"github","ref":"main","license":"MIT","command":"git clone https://github.com/veale/academic-mcp .psyclaw/mcp-src/academic-mcp && git -C .psyclaw/mcp-src/academic-mcp checkout main","target":".psyclaw/mcp/academic-mcp.json","dependencies":["Git","Zotero/OpenAlex/Semantic Scholar configuration per repository metadata"],"status":"review-required","requiresApproval":true,"blockedReason":"Immutable commit and external API terms require preflight."},
137
148
  {"id":"scholar-mcp","sourceKind":"github","ref":"f94eac6a49c6d35a83f35148375eebfa08459e9b","license":"MIT","command":"git clone https://github.com/pvliesdonk/scholar-mcp .psyclaw/mcp-src/scholar-mcp && git -C .psyclaw/mcp-src/scholar-mcp checkout f94eac6a49c6d35a83f35148375eebfa08459e9b","target":".psyclaw/mcp/scholar-mcp.json","dependencies":["Git","provider/API configuration per repository metadata"],"status":"review-required","requiresApproval":true,"blockedReason":"Verify executable entrypoint and API terms before registration."},
149
+ {"id":"drawio-mcp","sourceKind":"npm","ref":"1.5.0","license":"Apache-2.0","command":"npx -y @drawio/mcp@1.5.0","target":".psyclaw/mcp/drawio-mcp.json","dependencies":["Node.js >=18","npm","browser to open app.diagrams.net (or DRAWIO_BASE_URL)"],"status":"review-required","requiresApproval":true,"blockedReason":"Confirm stdio config opens diagrams in the browser; optional DRAWIO_BASE_URL for self-hosted draw.io. Hosted MCP Apps endpoint https://mcp.draw.io/mcp is a separate path."},
138
150
  {"id":"playwright-mcp","sourceKind":"github","ref":"7e0457a7cbf88823bf0146d12c46ae12c6818247","license":"Apache-2.0","command":"npx -y @playwright/mcp@latest","target":".psyclaw/mcp/playwright-mcp.json","dependencies":["Node.js >=18","npm or pnpm","optional browser extension for existing login session"],"status":"review-required","requiresApproval":true,"blockedReason":"Pin npm package version before execution; browser navigation/download remains separately approved."},
139
151
  {"id":"mne-mcp","sourceKind":"github","ref":"627142cb5beebe1a210a8e0fb1e15afbec8b8010","license":"MIT","command":"uvx --from mne-mcp==0.3.0 mne-mcp","target":".psyclaw/mcp/mne-mcp.json","dependencies":["Python >=3.10","uv","MNE-Python data dependencies"],"status":"review-required","requiresApproval":true,"blockedReason":"Verify PyPI artifact hash and local-data write policy before registration."},
140
152
  {"id":"spss-mcp","sourceKind":"github","ref":"fb4f020189b28b8acfb23a710875a7f9ae4e1e62","license":"MIT","command":"git clone https://github.com/Exekiel179/SPSS-MCP .psyclaw/mcp-src/spss-mcp && git -C .psyclaw/mcp-src/spss-mcp checkout fb4f020189b28b8acfb23a710875a7f9ae4e1e62","target":".psyclaw/mcp/spss-mcp.json","dependencies":["Git","IBM SPSS Statistics","Python runtime per repository metadata"],"status":"review-required","requiresApproval":true,"blockedReason":"Verify repository entrypoint and SPSS license/runtime before registration."}