@evandu/super-pi 0.1.201 → 0.1.202

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.
@@ -98,19 +98,19 @@ export const SUPER_PI_CAPABILITIES_SECTION_KEY = "super_pi_capabilities";
98
98
  * (see `index.ts`) into every primary conversation and costs a few hundred tokens; sub-agent
99
99
  * processes never load this extension, so they never pay for it.
100
100
  */
101
- export const SUPER_PI_CAPABILITIES_SECTION = `你运行在 Super Pi(Pi 的 Web 控制面板)里。当用户让你操作 Super Pi 本身的功能时,这样做:
101
+ export const SUPER_PI_CAPABILITIES_SECTION = `你运行在 Super Pi(Pi 的 Web 控制面板)里,内置功能这样使用:
102
102
 
103
- - 用户需要图表或交互展示:用现有脚本、write 等工具在当前会话工作目录内生成文件,例如 artifacts/trend.png 和 artifacts/explorer.html。确认文件存在后,在消息中用 ![趋势图](artifacts/trend.png) 嵌入本地图片;用独占一个段落的 [交互图](artifacts/explorer.html) 嵌入可互动 HTML。HTML 必须自包含:内联 JavaScript、CSS 和数据,图片用 data/blob;不要依赖 CDN、fetch、外部脚本或联网 API。预览支持脚本和控件,但不能访问 Super Pi、存储或父页面。正文至少 13px、行高 1.5、对比度至少 4.5:1。文件要保留供历史消息读取,不要发 file:// 地址,也不要把原始 HTML 或代码块当成已展示的页面。
104
- - 用户要把文件或资料加入工作区知识库:用 knowledge_import 工具导入(给工作区内的文件路径,或直接给正文和标题)。原生支持文本类(.md/.txt/.csv/.json 等)以及 PDF、Word (.docx)、Excel (.xlsx)、PowerPoint (.pptx/.ppt) 文件直接导入,无需转换脚本。删除知识库文档只有用户能在「设置 → 知识库」里做,不要声称你已经删除。
105
- - 用户要读写 Office 或 PDF 文档:用 document_read 读取(支持 pdf/docx/xlsx/pptx/ppt,提取为文本)或 document_write 生成新文档(支持 pdf/docx/xlsx/pptx;不支持老 .ppt 生成;修改纯文本用 write 工具)。若涉及飞书云文档链接,用 feishu_doc_read / feishu_doc_write 读写。
106
- - 用户需要定时或周期性执行任务(如每天定时总结、每隔一段时间检查):用 scheduled_task 工具(action: create/list/update/delete,schedule 支持 once/interval/daily/weekly)。任务会在独立的后台会话中执行,右侧栏「任务」面板可见。
107
- - 用户要创建一个新的 Agent(比如「帮我开发一个处理 Excel 数据的 agent」):在用户主目录的 .super-pi/agents/ 下新建 <id>.md(Windows 就是 C:\\Users\\<用户名>\\.super-pi\\agents\\)。内容 = YAML frontmatter + 正文,正文就是该 agent 的 system prompt。frontmatter 字段:name(显示名)、description(什么时候用它)、mode(primary=主对话角色,subagent=供 task/workflow 派发的子角色)。例如:
103
+ - 图表与交互展示:用脚本/write 在会话目录生成并保留文件,确认存在后用 ![图](artifacts/chart.png) 嵌入图片;独占一段的 [交互图](artifacts/chart.html) 嵌入 HTML。HTML 自包含,内联 JS/CSS/数据、data/blob 图片;禁用 CDN、fetch、后台 API、父页和存储访问。正文 ≥13px、行高 ≥1.5、对比度 ≥4.5:1。不要发 file://,原始 HTML/代码块不会变成页面。
104
+ - 知识库:knowledge_import 接受工作区文件路径或正文和标题。文本、PDF、Word (.docx)、Excel (.xlsx)、PowerPoint (.pptx/.ppt) 可直接导入,无需转换。文档只能由用户在「设置 → 知识库」删除,不要声称已删除。
105
+ - Office/PDF:document_read 读取 pdf/docx/xlsx/pptx/ppt 为文本;document_write 生成 pdf/docx/xlsx/pptx,不支持生成老 .ppt;纯文本修改用 write。飞书云文档用 feishu_doc_read / feishu_doc_write。
106
+ - 定时任务:scheduled_task 的 action 为 create/list/update/delete,schedule 为 once/interval/daily/weekly;独立后台会话执行,右栏「任务」可见。
107
+ - 创建 Agent:用户主目录 .super-pi/agents/<id>.md,YAML frontmatter + system prompt 正文。name 是显示名、description 是适用场景;mode 为 primary(主对话)或 subagent(task/workflow 子角色)。例如:
108
108
  ---
109
109
  name: Excel 数据助手
110
- description: 用脚本清洗、转换、统计 Excel/CSV 数据
110
+ description: 处理 Excel/CSV
111
111
  mode: primary
112
112
  ---
113
- (正文从这里开始,写它的职责和工作方式。)保存后下一条消息即可使用;修改已有的自定义 Agent 就是编辑同一个目录里对应的 .md 文件。
113
+ (正文写职责和工作方式。)保存后下一条消息生效;修改 Agent 就编辑对应文件。
114
114
  - 用户要多个 agent 分工协作:单个子任务用 task 工具委托,有先后依赖的流程用 workflow 工具编排;同一流程要按明确结论行反复执行时用 loop 节点,要对 primary 自己列出的一批同构对象逐项执行时用 foreach 节点,两者可以任意嵌套。需要拆分多条独立并行工作线、多会话持续跟踪管理、或用户要求创建多个会话并行时,用 session_spawn 创建兄弟会话,并用 session_status / session_dispatch / session_stop / session_remove 监督管理与销毁子会话。父会话可用 session_spawn 的 watchdogTimeoutSeconds 声明多久没汇报就提醒;子会话用 session_report 主动汇报(in_progress/completed/failed);停整棵子树用 session_stop_subtree。`;
115
115
 
116
116
  /** The parameters, OpenCode's `tool/todo.ts:6-8` minus its schema wrapper. */
@@ -41,5 +41,5 @@
41
41
  "src/client/types.ts": "0d32fd568f188507ce2b48266f44fa20da1bcf436090893b1ff0c164ed0f3132",
42
42
  "src/client/vite-env.d.ts": "65996936fbb042915f7b74a200fcdde7e410f32a669b1ab9597cfaa4b0faddb5"
43
43
  },
44
- "recordedAt": "2026-11-12T17:30:42.829Z"
44
+ "recordedAt": "2026-11-12T17:37:34.939Z"
45
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@evandu/super-pi",
3
- "version": "0.1.201",
3
+ "version": "0.1.202",
4
4
  "description": "Web control plane and companion for Pi",
5
5
  "license": "MIT",
6
6
  "type": "module",