@trim21/personal-pi-extensions 0.0.234 → 0.0.237

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trim21/personal-pi-extensions",
3
- "version": "0.0.234",
3
+ "version": "0.0.237",
4
4
  "type": "module",
5
5
  "description": "Custom pi coding-agent extensions: bwrap sandbox, workspace guard, opencode edit, and more",
6
6
  "keywords": [
@@ -173,7 +173,7 @@ export function registerFileTools(pi: ExtensionAPI, state: ClaudeCodeState): voi
173
173
  "This tool reads files, not directories.",
174
174
  ].join("\n"),
175
175
  promptSnippet: "Read files from the local filesystem with line numbers",
176
- promptGuidelines: [`--\n${READ_PROMPT}`],
176
+ promptGuidelines: [`- -\n${READ_PROMPT}`],
177
177
  parameters: Type.Object(
178
178
  {
179
179
  file_path: Type.String({ description: "The absolute path to the file to read" }),
@@ -243,7 +243,7 @@ export function registerFileTools(pi: ExtensionAPI, state: ClaudeCodeState): voi
243
243
  "This tool does not use regular expressions or fuzzy matching.",
244
244
  ].join("\n"),
245
245
  promptSnippet: "Make exact string replacements in files",
246
- promptGuidelines: [`--\n${EDIT_PROMPT}`],
246
+ promptGuidelines: [`- -\n${EDIT_PROMPT}`],
247
247
  parameters: Type.Object(
248
248
  {
249
249
  file_path: Type.String({ description: "The absolute path to the file to modify" }),
@@ -302,7 +302,7 @@ export function registerFileTools(pi: ExtensionAPI, state: ClaudeCodeState): voi
302
302
  "If the file exists, you must use Read first. Prefer Edit for partial changes.",
303
303
  ].join("\n"),
304
304
  promptSnippet: "Create or overwrite files",
305
- promptGuidelines: [`--\n${WRITE_PROMPT}`],
305
+ promptGuidelines: [`- -\n${WRITE_PROMPT}`],
306
306
  parameters: Type.Object(
307
307
  {
308
308
  file_path: Type.String({
@@ -53,7 +53,7 @@ export function registerGlobTool(pi: ExtensionAPI): void {
53
53
  "Returns matching file paths sorted by modification time.",
54
54
  ].join("\n"),
55
55
  promptSnippet: "Find files by name patterns",
56
- promptGuidelines: [`--\n${GLOB_PROMPT}`],
56
+ promptGuidelines: [`- -\n${GLOB_PROMPT}`],
57
57
  parameters: Type.Object(
58
58
  {
59
59
  pattern: Type.String({ description: "The glob pattern to match files against" }),
@@ -151,7 +151,7 @@ export function registerGrepTool(pi: ExtensionAPI): void {
151
151
  'output_mode defaults to "files_with_matches"; use "content" for matching lines or "count" for match counts.',
152
152
  ].join("\n"),
153
153
  promptSnippet: "Search file contents with regular expressions",
154
- promptGuidelines: [`--\n${GREP_PROMPT}`],
154
+ promptGuidelines: [`- -\n${GREP_PROMPT}`],
155
155
  parameters: Type.Object(
156
156
  {
157
157
  pattern: Type.String({ description: "The regular expression pattern to search for" }),
@@ -183,7 +183,7 @@ export function registerSessionTools(pi: ExtensionAPI): void {
183
183
  'If you recommend an option, put it first and append "(Recommended)" to its label.',
184
184
  ].join("\n"),
185
185
  promptSnippet: "Ask the user questions during execution",
186
- promptGuidelines: [`--\n${ASK_PROMPT}`],
186
+ promptGuidelines: [`- -\n${ASK_PROMPT}`],
187
187
  parameters: Type.Object(
188
188
  {
189
189
  questions: Type.Array(questionSchema, {
@@ -18,7 +18,7 @@ export function registerShellTools(pi: ExtensionAPI): void {
18
18
  pi.registerTool({
19
19
  name: "Bash",
20
20
  promptSnippet: "execute command",
21
- promptGuidelines: [`--\n${BASH_PROMPT}`],
21
+ promptGuidelines: [`- -\n${BASH_PROMPT}`],
22
22
  label: "Bash",
23
23
  description: [
24
24
  "Executes a given bash command synchronously and returns its output.",
@@ -18,6 +18,7 @@ export default function opencodeBash(pi: ExtensionAPI): void {
18
18
  "timeout is in milliseconds, defaults to 120000, and may not exceed 600000.",
19
19
  "Every command runs in the foreground. Background command execution is not supported; shell jobs are waited for before the tool returns.",
20
20
  ].join("\n"),
21
+ promptSnippet: "execute bash command",
21
22
  parameters: Type.Object(
22
23
  {
23
24
  command: Type.String({ description: "The command to execute" }),
@@ -189,7 +189,7 @@ export function buildPendantMarkdown(params: {
189
189
  "### 识别结果",
190
190
  "",
191
191
  body || params.description,
192
- footer ? `\n---\n${footer}` : "",
192
+ footer ? `\n- -\n${footer}` : "",
193
193
  ]
194
194
  .join("\n")
195
195
  .trim();