@difflab/pi 0.1.0 → 0.2.0

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,4 @@
1
+ import { type ToolDefinition } from '@earendil-works/pi-coding-agent';
2
+ import type { ModeController } from '../modes';
3
+ export declare function createModeTools(controller: ModeController): readonly ToolDefinition[];
4
+ //# sourceMappingURL=modes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"modes.d.ts","sourceRoot":"","sources":["../../src/tools/modes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAElF,OAAO,KAAK,EAAe,cAAc,EAAE,MAAM,UAAU,CAAC;AAiB5D,wBAAgB,eAAe,CAAC,UAAU,EAAE,cAAc,GAAG,SAAS,cAAc,EAAE,CAiErF"}
@@ -1 +1 @@
1
- {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/tools/setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAgBlF,eAAO,MAAM,eAAe,EAAE,cA0B5B,CAAC;AAEH,eAAO,MAAM,kBAAkB,EAAE,cAsB/B,CAAC"}
1
+ {"version":3,"file":"setup.d.ts","sourceRoot":"","sources":["../../src/tools/setup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAgBlF,eAAO,MAAM,eAAe,EAAE,cA2B5B,CAAC;AAEH,eAAO,MAAM,kBAAkB,EAAE,cAuB/B,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@difflab/pi",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "Tools and skills for the pi coding agent",
5
5
  "repository": {
6
6
  "type": "git",
@@ -28,6 +28,7 @@
28
28
  }
29
29
  },
30
30
  "files": [
31
+ "agents/",
31
32
  "dist/",
32
33
  "skills/"
33
34
  ],
@@ -44,3 +44,5 @@ ask_user_question({
44
44
  ```
45
45
 
46
46
  Map `None`, `Linear`, and `Jira` to `none`, `linear`, and `jira`. If the user selects `Skip` or declines the questionnaire, stop without calling `diffpi_setup`. After successful setup, call `diffpi_reload` when the setup result says pi must restart.
47
+
48
+ Setup installs Diffpi's bundled agent Markdown into Pi's standard global agent directory. Explain that each default can run through the subagent plugin or as the current inline prompt. `/skill:mode` opens the structured picker. It also accepts `--include-skills`, one agent id, a qualified `skill:agent` id, or `clear`.
@@ -0,0 +1,38 @@
1
+ ---
2
+ name: mode
3
+ description: List, select, or clear an inline agent profile. Use when the user invokes /skill:mode or asks to change the current Diffpi mode.
4
+ allowed-tools: ask_user_question diffpi_modes_list diffpi_modes_set diffpi_modes_unset
5
+ ---
6
+
7
+ # Mode
8
+
9
+ Pi appends `/skill:mode` arguments as `User: <arguments>`. Route those arguments without manual command parsing in the extension.
10
+
11
+ ## Direct requests
12
+
13
+ - If the argument is `help`, `-h`, or `--help`, print the usage and examples below. Do not call a tool.
14
+ - If the argument is `clear`, call `diffpi_modes_unset` and stop.
15
+ - If the argument is one agent id, call `diffpi_modes_set` with that exact id and stop.
16
+ - A qualified id such as `spec:planner` is one agent id. The tool enables skill-agent discovery for it.
17
+ - If the request contains multiple agent ids or an unsupported flag, print the usage and stop.
18
+
19
+ ```text
20
+ /skill:mode [--include-skills] [agent|clear]
21
+ /skill:mode
22
+ /skill:mode --include-skills
23
+ /skill:mode worker
24
+ /skill:mode spec:planner
25
+ /skill:mode clear
26
+ ```
27
+
28
+ ## Picker
29
+
30
+ Use the picker when there are no arguments or when the only argument is `--include-skills`.
31
+
32
+ 1. Call `diffpi_modes_list`. Set `includeSkills` to true only for `--include-skills`.
33
+ 2. Call `ask_user_question` with one single-select question. Do not ask as plain chat text.
34
+ 3. Put the complete list of valid ids in the question text. Offer Default plus at most three relevant agents as structured options. The custom-answer row lets the user enter any other valid id.
35
+ 4. If the user selects Default or enters `clear`, call `diffpi_modes_unset`.
36
+ 5. Otherwise, call `diffpi_modes_set` with the selected or entered id.
37
+
38
+ Do not perform unrelated work. Explain that the selected prompt, preferred available model, thinking level, and tool set start on the next turn. Mode selection is not a security boundary.