pi-advisor-flow 0.11.1 → 0.11.2-dev.1
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/dist/index.js +4 -1
- package/package.json +1 -1
- package/src/tools/register-lifecycle.ts +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes to this project are documented here.
|
|
|
4
4
|
|
|
5
5
|
The format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0/).
|
|
6
6
|
|
|
7
|
+
## Unreleased
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Avoided a startup crash when a host omits `systemPromptOptions` from `before_agent_start`.
|
|
12
|
+
|
|
7
13
|
## 0.11.1 - 2026-10-04
|
|
8
14
|
|
|
9
15
|
### Changed
|
package/dist/index.js
CHANGED
|
@@ -9058,7 +9058,10 @@ var registerToolLifecycle = ({
|
|
|
9058
9058
|
}
|
|
9059
9059
|
});
|
|
9060
9060
|
pi.on("before_agent_start", (event, ctx) => {
|
|
9061
|
-
const
|
|
9061
|
+
const sections = event.systemPromptOptions?.sections;
|
|
9062
|
+
if (!sections) {
|
|
9063
|
+
return;
|
|
9064
|
+
}
|
|
9062
9065
|
delete sections.advisor_invocation_settings;
|
|
9063
9066
|
if (!pi.getActiveTools().includes("ask_advisor")) {
|
|
9064
9067
|
return;
|
package/package.json
CHANGED
|
@@ -72,7 +72,11 @@ export const registerToolLifecycle = ({
|
|
|
72
72
|
});
|
|
73
73
|
|
|
74
74
|
pi.on("before_agent_start", (event, ctx) => {
|
|
75
|
-
|
|
75
|
+
// Hosts may omit systemPromptOptions; don't crash the extension on it.
|
|
76
|
+
const sections = event.systemPromptOptions?.sections;
|
|
77
|
+
if (!sections) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
76
80
|
delete sections.advisor_invocation_settings;
|
|
77
81
|
if (!pi.getActiveTools().includes("ask_advisor")) {
|
|
78
82
|
return;
|