@zhushanwen/pi-rename-session 0.11.0 → 0.11.2

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 CHANGED
@@ -21,6 +21,16 @@ Pi rename-session 扩展 — 三种触发模式下自动/自主为会话生成 s
21
21
  pi install npm:@zhushanwen/pi-rename-session
22
22
  ```
23
23
 
24
+ ## 工具激活(deferred)
25
+
26
+ `rename_session` 工具(`agent-tool` 模式注册)为 `exposure: "deferred"`——不占常驻工具声明,由 pi 内置 `tool_search` 工具检索命中后按需激活。taiji 宿主内开箱即用(宿主启动时已激活 `tool_search`);独立 pi 使用需在 `<agentDir>/settings.json`(默认 `~/.pi/agent/settings.json`)开启:
27
+
28
+ ```json
29
+ { "defaultTools": ["+tool_search"] }
30
+ ```
31
+
32
+ `+` 前缀是增量修饰(保留 read/bash/edit/write 默认集)。未开启 `tool_search` 时该工具对模型不可见。
33
+
24
34
  ## 配置
25
35
 
26
36
  配置文件:`<agentDir>/config/rename-session-ext-config.json`(`<agentDir>` 默认 `~/.pi/agent`,`PI_CODING_AGENT_DIR` 可覆盖;taiji 隔离环境为 `~/.taiji/agent`)。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zhushanwen/pi-rename-session",
3
- "version": "0.11.0",
3
+ "version": "0.11.2",
4
4
  "type": "module",
5
5
  "main": "index.ts",
6
6
  "taiji": {
@@ -33,9 +33,9 @@
33
33
  "pi-package"
34
34
  ],
35
35
  "dependencies": {
36
- "@zhushanwen/pi-ext-guards": "0.4.3",
36
+ "@zhushanwen/pi-ext-guards": "0.4.4",
37
37
  "@zhushanwen/pi-extension-logger": "0.6.2",
38
- "@zhushanwen/pi-llm-shared": "0.11.1"
38
+ "@zhushanwen/pi-llm-shared": "0.11.2"
39
39
  },
40
40
  "devDependencies": {
41
41
  "@vitest/coverage-v8": "^4.1.9",
package/src/index.ts CHANGED
@@ -77,11 +77,15 @@ function registerRenameSessionTool(pi: ExtensionAPI): void {
77
77
  pi.registerTool({
78
78
  name: "rename_session",
79
79
  label: "Rename Session",
80
+ // deferred(tool-declaration-slimming D4):不常驻声明,tool_search 命中即激活;
81
+ // 迁移写入的 +tool_search 条目(runtime pi-codemode-settings)承载检索入口
82
+ exposure: "deferred",
80
83
  description:
81
- "Rename the current session with a short, descriptive title. Call this proactively once the session's purpose is clear (typically after the first exchange), or whenever the user asks to name or rename the session. The title is a slug-style phrase: noun or gerund phrase, 3-6 words, same language as the conversation, no trailing punctuation, no full sentences. Replaces any existing session name.",
84
+ "Rename the current session. Call this proactively once the session's purpose is clear (typically after the first exchange), or whenever the user asks to name or rename the session. Replaces any existing session name.",
82
85
  parameters: Type.Object({
83
86
  title: Type.String({
84
- description: "New session title. Slug-style phrase (e.g. '修复登录超时', 'refactor-config-loader'), 3-6 words, no trailing punctuation.",
87
+ description:
88
+ "New session title. A slug-style phrase — noun or gerund phrase, 3-6 words, same language as the conversation, no trailing punctuation, no full sentences (e.g. '修复登录超时', 'refactor-config-loader').",
85
89
  }),
86
90
  }),
87
91
  async execute(