@aeondave/pi-skill-optimizer 3.1.1 → 3.1.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/CHANGELOG.md +6 -0
- package/README.md +1 -1
- package/docs/ARCHITECTURE.md +8 -0
- package/package.json +2 -2
- package/src/index.ts +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes are documented here.
|
|
|
4
4
|
|
|
5
5
|
## Unreleased
|
|
6
6
|
|
|
7
|
+
## 3.1.2 - 2026-10-13
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Handle Pi 1.2 custom-triggered runs as no-intent starts: fail open for permitted tools, ignore custom message text even if a stray prompt field is present, and preserve the previous human request for output extraction.
|
|
12
|
+
|
|
7
13
|
## 3.1.1 - 2026-10-08
|
|
8
14
|
|
|
9
15
|
### Fixed
|
package/README.md
CHANGED
|
@@ -37,7 +37,7 @@ That's enough to start. Optionally run `/skill-optimizer init` to generate routi
|
|
|
37
37
|
| Need | Command |
|
|
38
38
|
| --- | --- |
|
|
39
39
|
| Install only in this project | `pi install -l npm:@aeondave/pi-skill-optimizer` |
|
|
40
|
-
| Pin the current release | `pi install npm:@aeondave/pi-skill-optimizer@3.1.
|
|
40
|
+
| Pin the current release | `pi install npm:@aeondave/pi-skill-optimizer@3.1.2` |
|
|
41
41
|
| Update an unpinned install | `pi update npm:@aeondave/pi-skill-optimizer` |
|
|
42
42
|
|
|
43
43
|
Restart after updating. Pinned installs stay pinned until you explicitly install another version.
|
package/docs/ARCHITECTURE.md
CHANGED
|
@@ -26,6 +26,14 @@ before provider conversion erases custom-message provenance. Native `custom`, `b
|
|
|
26
26
|
the query or overlay target. Structured system sections and tool declarations are preserved;
|
|
27
27
|
request-local clones do not modify persisted conversation entries.
|
|
28
28
|
|
|
29
|
+
Pi 1.2's `before_agent_start` event distinguishes user starts (`messageType: "user"` with `prompt`)
|
|
30
|
+
from custom-triggered starts (`messageType: "custom"` with `message`). Only a user prompt updates the
|
|
31
|
+
last human request and drives tool activation. A custom start has no routing signal, so optimizer
|
|
32
|
+
activation fails open across permitted named tools while retaining protected, used, and searched
|
|
33
|
+
tools; custom message text is ignored even if the event also carries a `prompt` property. The
|
|
34
|
+
previous human request remains available to output extraction. On Pi 1.0, the supported event has no
|
|
35
|
+
`messageType` discriminator, so its string `prompt` continues to identify user intent.
|
|
36
|
+
|
|
29
37
|
Ranking uses exact matching, BM25F, bounded name and alias typo recovery, reciprocal-rank fusion, diversity, profile evidence, and decayed usage evidence. It scores full source descriptions, then appends a bounded set of verbatim skill names and descriptions (not the full `SKILL.md` instructions) to the latest human block. The overlay is separate from the stable prefix, fingerprinted, idempotent, and omitted when there is no valid target.
|
|
30
38
|
|
|
31
39
|
The resolver labels prefetch as discovery metadata, not loaded instructions or usage evidence.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aeondave/pi-skill-optimizer",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.2",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"description": "Less repeated context for Pi: local skill routing, on-demand tools, and recoverable output reduction.",
|
|
@@ -81,6 +81,6 @@
|
|
|
81
81
|
"extensions": [
|
|
82
82
|
"./src/index.ts"
|
|
83
83
|
],
|
|
84
|
-
"image": "https://raw.githubusercontent.com/AeonDave/pi-skill-optimizer/v3.1.
|
|
84
|
+
"image": "https://raw.githubusercontent.com/AeonDave/pi-skill-optimizer/v3.1.2/assets/banner.png"
|
|
85
85
|
}
|
|
86
86
|
}
|
package/src/index.ts
CHANGED
|
@@ -1059,7 +1059,13 @@ export default function skillOptimizer(pi: ExtensionAPI) {
|
|
|
1059
1059
|
});
|
|
1060
1060
|
|
|
1061
1061
|
pi.on("before_agent_start", (event, ctx) => {
|
|
1062
|
-
|
|
1062
|
+
// Pi 1.2 also starts runs from custom messages, which have no human prompt.
|
|
1063
|
+
// Keep their content out of routing and preserve the last real request for extraction.
|
|
1064
|
+
const customStart = "messageType" in event && event.messageType === "custom";
|
|
1065
|
+
const prompt = !customStart && "prompt" in event && typeof event.prompt === "string"
|
|
1066
|
+
? event.prompt
|
|
1067
|
+
: undefined;
|
|
1068
|
+
if (prompt !== undefined) latestPrompt = prompt;
|
|
1063
1069
|
if (isDisabled(ctx.cwd)) {
|
|
1064
1070
|
restorePermittedTools();
|
|
1065
1071
|
return;
|
|
@@ -1074,7 +1080,7 @@ export default function skillOptimizer(pi: ExtensionAPI) {
|
|
|
1074
1080
|
try {
|
|
1075
1081
|
const skills = skillInputs(event.systemPromptOptions.skills ?? []);
|
|
1076
1082
|
registry = makeSkillRegistry(skills);
|
|
1077
|
-
initializeToolSelection(state,
|
|
1083
|
+
initializeToolSelection(state, prompt ?? "");
|
|
1078
1084
|
maybeShowInitNotice(ctx, state, skills);
|
|
1079
1085
|
updateStatus(ctx);
|
|
1080
1086
|
return;
|