@henryqw/pi-prompt-creator 1.0.4 → 1.0.6

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
@@ -11,11 +11,13 @@ pi install npm:@henryqw/pi-task-models
11
11
  pi install npm:@henryqw/pi-prompt-creator
12
12
  ```
13
13
 
14
- Run `/task-models` before analysis. Assign a model to `fast`, or override `pi-prompt-creator/draft`.
14
+ Run `/task-models` before analysis. Assign a model to `fast`, or override `pi-prompt-creator/draft`. Open `/task-models` again and verify the saved route or task assignment.
15
15
 
16
16
  ## Works with
17
17
 
18
- **Required.** [`@henryqw/pi-task-models`](https://pi.henry.wang/extensions/pi-task-models) provides the isolated draft model route.
18
+ | Package | Relationship | Purpose |
19
+ | --- | --- | --- |
20
+ | [`@henryqw/pi-task-models`](https://pi.henry.wang/extensions/pi-task-models) | Required | Provides the isolated draft model route. |
19
21
 
20
22
  ## Use
21
23
 
@@ -33,7 +35,7 @@ The menu adapts to the current state:
33
35
  | Item | Action |
34
36
  | --- | --- |
35
37
  | `Analyze now` or `Analyze again` | Start one visible background analysis. |
36
- | `Automatic On` or `Automatic Off` | Save the automatic setting. |
38
+ | `Automatic On` or `Automatic Off` | Turn automatic analysis on or off. |
37
39
  | `Show candidate` | Add the candidate to the conversation for review. |
38
40
  | `Dismiss candidate` | Forget the pending candidate. |
39
41
  | `Save latest Main draft` | Save Main's newest completed review reply after you show a candidate. |
@@ -54,6 +56,12 @@ Branch changes reset the input counter. Automatic analysis and candidate widgets
54
56
 
55
57
  Only one analysis can run at a time. A pending candidate blocks another analysis.
56
58
 
59
+ Automatic analysis sends the current conversation to the child model configured through `/task-models`.
60
+
61
+ Its payload includes the active compaction or branch summary, user text, successfully completed assistant text, and effective prompt names and descriptions.
62
+
63
+ Project context files and prompt templates are disabled for the child. Tool traffic, thinking, images, custom messages, and inactive branches are excluded.
64
+
57
65
  Analysis asks a tool-free child for one JSON response. It has no user extensions, Skills, or saved session. The extension does not retry failed analysis.
58
66
 
59
67
  New user input does not stop a running child. Branch navigation discards its old result without stopping the child.
@@ -88,12 +96,12 @@ Use `/task-models` to select the model and thinking level. The extension owns no
88
96
 
89
97
  ## Config
90
98
 
91
- `~/.pi/agent/config/pi-prompt-creator/config.json`
99
+ Package-owned: `~/.pi/agent/config/pi-prompt-creator/config.json`
92
100
 
93
- | Field | Required | Possible values | Default |
101
+ | Name | Description | Values | Default |
94
102
  | --- | --- | --- | --- |
95
- | `automatic` | No | `true` or `false` | `true` |
96
- | `inputThreshold` | No | Positive integer | `3` |
103
+ | `automatic` | Runs automatic analysis after enough user inputs. | Boolean. | `true` |
104
+ | `inputThreshold` | Sets the number of non-empty user inputs before automatic analysis. | Positive integer. | `3` |
97
105
 
98
106
  Edit either field, then run `/reload` to apply the change. Omitted fields use their defaults.
99
107
 
@@ -109,59 +117,7 @@ A pending candidate stays in memory only. Automatic mode persists, but counters
109
117
 
110
118
  Saved prompts live at `~/.pi/agent/prompts/<name>.md`. Saving never replaces an existing file.
111
119
 
112
- ## Data, cost, and privacy
113
-
114
- Automatic analysis is on by default. It sends the current conversation to the child model configured through `/task-models`.
115
-
116
- Disable automatic analysis through `/promptor`.
117
-
118
- The payload includes the active compaction or branch summary, user text, and successfully completed assistant text. It also includes effective prompt names and descriptions.
119
-
120
- Project context files and prompt templates are disabled for the child.
121
-
122
- Tool traffic, thinking, images, custom messages, and inactive branches are excluded.
123
-
124
- ## Automatic mode
125
-
126
- Automatic mode waits for the configured number of non-empty user inputs. The default is three.
127
-
128
- It starts at the next idle `agent_settled` event. It starts at most once per extension runtime.
129
-
130
- A manual analysis consumes that opportunity. Automatic mode persists, but counters and candidates do not.
131
-
132
- Branch changes reset the input counter. Automatic analysis and candidate widgets require the interactive TUI.
133
-
134
- ## Review and save
135
-
136
- A completed candidate stays in memory. The widget shows `Prompt ready — /promptor` until you show or dismiss it.
137
-
138
- The extension never injects a candidate automatically. `Show candidate` adds one visible message and marks its contents as untrusted.
139
-
140
- Refine the candidate with Main. Ask Main to return only the complete Final Prompt Draft before saving.
141
-
142
- The save item appears only after you show a candidate and Main then completes a valid Markdown review reply.
143
-
144
- Saving uses that latest retained Main reply as the entire file. Replies before the active compaction or branch summary cannot be saved.
145
-
146
- An interrupted, failed, empty, or tool-use reply cannot be saved. The extension never falls back to an older reply.
147
-
148
- A successful save ends that review. Show another candidate and complete another Main review reply before saving again.
149
-
150
- The menu asks for a lowercase kebab-case name. A candidate name appears only as a hint.
151
-
152
- Names start with a letter and contain at most 64 ASCII characters. Existing command names and prompt files are rejected.
153
-
154
- Prompts are created at `~/.pi/agent/prompts/<name>.md`. Creation never replaces a file.
155
-
156
- A successful save reloads Pi resources. If reload fails, the prompt remains saved and `/reload` can load it.
157
-
158
- ## Model routing
159
-
160
- The extension registers `pi-prompt-creator/draft`. Its default task profile is `fast`.
161
-
162
- Use `/task-models` to select the model and thinking level. The extension owns no model configuration.
163
-
164
- ## Limits and failures
120
+ ## Limits and recovery
165
121
 
166
122
  The child payload stays within 30,000 characters, including its JSON envelope and prompt metadata.
167
123
 
@@ -12,7 +12,6 @@ import {
12
12
  import { createConfigStore } from "@henryqw/pi-config-store";
13
13
  import {
14
14
  createEphemeralSubagentExecutor,
15
- MIN_MAX_TURNS,
16
15
  resolveRoleLaunch,
17
16
  type EphemeralSubagentExecutor,
18
17
  type Role,
@@ -309,7 +308,7 @@ export default function promptCreatorExtension(pi: ExtensionAPI, options: Prompt
309
308
  };
310
309
  const getExecutor = () => executor ??= createEphemeralSubagentExecutor({
311
310
  maxConcurrency: 1,
312
- maxTurns: MIN_MAX_TURNS,
311
+ maxTurns: 3,
313
312
  timeout: { idleMs: 2 * 60_000, maxMs: 5 * 60_000 },
314
313
  });
315
314
  const startAnalysis = (ctx: ExtensionContext, manual: boolean) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@henryqw/pi-prompt-creator",
3
- "version": "1.0.4",
3
+ "version": "1.0.6",
4
4
  "description": "Turn current Pi conversation signals into user-approved prompt templates.",
5
5
  "keywords": [
6
6
  "pi-package",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@henryqw/pi-config-store": "^1.0.0",
49
- "@henryqw/pi-subagent": "^14.0.0",
49
+ "@henryqw/pi-subagent": "^15.0.0",
50
50
  "@henryqw/pi-task-models": "^5.0.0"
51
51
  }
52
52
  }