@aexol/spectral 0.1.2 → 0.1.3
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/dist/server/pi-bridge.js +12 -0
- package/package.json +1 -1
package/dist/server/pi-bridge.js
CHANGED
|
@@ -229,6 +229,18 @@ export class PiBridge {
|
|
|
229
229
|
modelRegistry: this.modelRegistry,
|
|
230
230
|
});
|
|
231
231
|
this.session = result.session;
|
|
232
|
+
// Emit session_start so extensions can initialize (e.g. pi-mcp-adapter
|
|
233
|
+
// connects to MCP servers, loads configs from ~/.config/mcp/mcp.json etc.).
|
|
234
|
+
// bindExtensions also fires resources_discover for dynamic skill/prompt
|
|
235
|
+
// registration. No UI/command context needed in serve mode.
|
|
236
|
+
try {
|
|
237
|
+
await this.session.bindExtensions({});
|
|
238
|
+
console.info("[PiBridge] session_start emitted; extensions initialized.");
|
|
239
|
+
}
|
|
240
|
+
catch (err) {
|
|
241
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
242
|
+
console.warn(`[PiBridge] session_start failed (extension init error): ${msg}`);
|
|
243
|
+
}
|
|
232
244
|
// Subscribe BEFORE any prompt fires.
|
|
233
245
|
this.unsubscribe = this.session.subscribe((ev) => this.handleEvent(ev));
|
|
234
246
|
}
|