pi-ketch 0.1.1 → 0.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/index.ts +11 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-ketch",
3
- "version": "0.1.1",
3
+ "version": "0.1.2",
4
4
  "description": "Agent-native web research tools for Pi: multi-backend search, public code search, library docs, scraping, crawling, and browser rendering, powered by Ketch.",
5
5
  "type": "module",
6
6
  "license": "MIT",
package/src/index.ts CHANGED
@@ -6,6 +6,8 @@ import { registerDocsTool } from "./tools/docs.js";
6
6
  import { registerScrapeTool } from "./tools/scrape.js";
7
7
  import { registerSearchTool } from "./tools/search.js";
8
8
 
9
+ const STATUS_ID = "pi-ketch";
10
+
9
11
  export default function ketchExtension(pi: ExtensionAPI): void {
10
12
  registerSearchTool(pi);
11
13
  registerScrapeTool(pi);
@@ -13,4 +15,13 @@ export default function ketchExtension(pi: ExtensionAPI): void {
13
15
  registerDocsTool(pi);
14
16
  registerCrawlTool(pi);
15
17
  registerDiagnostics(pi);
18
+
19
+ pi.on("session_start", (_event, ctx) => {
20
+ const theme = ctx.ui.theme;
21
+ ctx.ui.setStatus(STATUS_ID, `${theme.fg("accent", "🌐 ketch:")} ${theme.fg("success", "active")}`);
22
+ });
23
+
24
+ pi.on("session_shutdown", (_event, ctx) => {
25
+ ctx.ui.setStatus(STATUS_ID, undefined);
26
+ });
16
27
  }