@narumitw/pi-firecrawl 0.50.2 โ†’ 0.50.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.
Files changed (2) hide show
  1. package/README.md +43 -47
  2. package/package.json +5 -8
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/@narumitw/pi-firecrawl)](https://www.npmjs.com/package/@narumitw/pi-firecrawl) [![Pi extension](https://img.shields.io/badge/Pi-extension-blue)](https://pi.dev) [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](./LICENSE)
4
4
 
5
- Give Pi on-demand [Firecrawl](https://www.firecrawl.dev/) tools for web search, scraping, crawling, URL discovery, and retrieval-friendly content extraction.
5
+ Add on-demand [Firecrawl](https://www.firecrawl.dev/) tools to Pi for web search, scraping, crawling, URL discovery, and content extraction.
6
6
 
7
7
  ## โœจ Features
8
8
 
@@ -10,35 +10,40 @@ Give Pi on-demand [Firecrawl](https://www.firecrawl.dev/) tools for web search,
10
10
  - Starts crawl jobs, checks their status, and retrieves completed crawl data.
11
11
  - Discovers site URLs and searches the web with optional result-page scraping.
12
12
  - Loads only the Firecrawl capabilities needed for the task and manages availability through `/firecrawl`.
13
- - Supports custom Firecrawl endpoints and shows activity only while a tool is running.
13
+ - Supports custom Firecrawl endpoints and shows status only while a tool is running.
14
14
  - Bounds model-visible output while preserving oversized responses in private temporary files.
15
15
  - Reads the API key from the environment and never logs, displays, or stores it.
16
16
 
17
17
  ## ๐Ÿ“ฆ Install
18
18
 
19
+ Install persistently:
20
+
19
21
  ```bash
20
22
  pi install npm:@narumitw/pi-firecrawl
21
23
  ```
22
24
 
23
- Try without installing permanently:
25
+ Run once from npm:
24
26
 
25
27
  ```bash
26
28
  FIRECRAWL_API_KEY=fc-... pi -e npm:@narumitw/pi-firecrawl
27
29
  ```
28
30
 
29
- Build and try this package locally from the repository root:
31
+ Build and run a local checkout from the repository root:
30
32
 
31
33
  ```bash
32
34
  npm --workspace @narumitw/pi-firecrawl run build
33
35
  FIRECRAWL_API_KEY=fc-... pi -e ./packages/pi-firecrawl
34
36
  ```
35
37
 
36
- The package declares `dist/index.ts`, so an unbuilt local checkout must run the build before Pi loads the package directory.
38
+ The package declares `dist/index.ts`, so build a local checkout before loading its package directory.
39
+
40
+ Pi extensions run with your user permissions.
41
+ Review third-party extension source before installing it.
37
42
 
38
43
  ## ๐Ÿš€ Quick start
39
44
 
40
45
  Set `FIRECRAWL_API_KEY`, start Pi with the extension, and ask the agent to load the Firecrawl capability needed for the task.
41
- Use `/firecrawl` to review configuration and control which capability tools may be loaded.
46
+ Run `/firecrawl` to review configuration and choose which capabilities the loader may expose.
42
47
 
43
48
  ## โš™๏ธ Settings
44
49
 
@@ -55,7 +60,28 @@ export FIRECRAWL_API_URL=https://api.firecrawl.dev/v1
55
60
  ```
56
61
 
57
62
  `FIRECRAWL_BASE_URL` is also accepted for compatibility.
58
- The extension never logs or displays the API key.
63
+ The API key remains in the environment and is sent only as a bearer credential to the configured Firecrawl endpoint.
64
+
65
+ Available capability names are saved to:
66
+
67
+ ```text
68
+ ${PI_CODING_AGENT_DIR:-~/.pi/agent}/pi-firecrawl.json
69
+ ```
70
+
71
+ A missing or invalid file leaves the current Firecrawl availability policy unchanged.
72
+ An unsaved catalog remains stable across runtime reloads.
73
+ A valid catalog is restored on startup and `/reload`, with native deferred or eager exposure chosen from model and provider support.
74
+ The first successful availability change creates a missing file.
75
+ Within one Pi process, saves run in invocation order, reread the latest valid document, and preserve unknown fields.
76
+ Malformed JSON or invalid recognized fields block saves without replacing the file.
77
+ A failed save restores the previous availability and loaded capabilities while preserving other extensions' active tools.
78
+ The file stores only tool names and a timestamp, never `FIRECRAWL_API_KEY`, request headers, or other secrets.
79
+
80
+ Older versions used `pi-firecrawl-settings.json`.
81
+ A legacy-only file remains readable with a warning and is never modified automatically; rename it to `pi-firecrawl.json`.
82
+ The next settings save writes the canonical file.
83
+ If both files exist, `pi-firecrawl.json` wins and the legacy file is ignored.
84
+ The legacy filename is deprecated and will be removed in a future major release.
59
85
 
60
86
  ## ๐Ÿ› ๏ธ Tools
61
87
 
@@ -68,43 +94,29 @@ The extension never logs or displays the API key.
68
94
 
69
95
  ### Tool exposure
70
96
 
71
- All six tools are registered.
72
-
73
- On a model/provider with native deferred-tool support, only `firecrawl_load` starts active for this extension.
74
-
97
+ The extension registers six tools: one loader and five API capabilities.
98
+ With native deferred-tool support, only `firecrawl_load` starts active.
75
99
  The loader accepts a task-oriented `query`, filters to capabilities allowed by settings, and adds up to three matching tools by default without removing any active Pi tool.
76
-
77
100
  Set `limit` from 1 to 5 to change the maximum number loaded by one call.
78
-
79
101
  A general website-crawl query can load both `firecrawl_crawl` and `firecrawl_crawl_status`, while a status-specific query loads the status capability.
80
-
81
- Loaded capability tools remain active for the session unless the user makes them unavailable through `/firecrawl`.
82
-
102
+ Loaded capability tools remain active for the current session until you make them unavailable through `/firecrawl`.
83
103
  On reload, resume, or fork, capabilities recorded by `firecrawl_load` on the active branch are restored when the current catalog still allows them.
84
104
 
85
105
  Pi uses native deferred tool references on compatible Anthropic models, native additional-tools or tool-search loading on compatible OpenAI and Codex Responses models, and native Kimi loading on compatible OpenAI Chat Completions models.
86
-
87
106
  Kimi-compatible models declare `compat.deferredToolsMode: "kimi"` in Pi's model metadata.
88
-
89
107
  `azure-openai-responses` remains eager because Pi's Azure adapter does not implement native deferred tool-search serialization.
90
-
91
108
  When the selected model/provider lacks native deferred support, the extension activates every capability allowed by settings before the next model request instead of using Pi's cache-invalidating lazy-loading fallback.
92
-
93
109
  After a session enters eager exposure, it stays eager across later model switches to avoid removing tool definitions within that session.
94
-
95
110
  The capability tools omit active-only prompt metadata so native deferred loading does not rebuild the system-prompt prefix.
96
111
 
97
112
  The saved `tools` array controls which capabilities the extension may expose.
98
-
99
113
  An empty array leaves the loader active but makes every Firecrawl API capability unavailable.
100
114
 
101
115
  `firecrawl_load` performs no network request and does not create response artifacts.
102
-
103
116
  Every API capability fails with a clear configuration error when `FIRECRAWL_API_KEY` is missing, and the always-active loader guidance tells the agent not to retry repeatedly.
104
117
 
105
118
  Tool output is limited to 50 KB or 2,000 lines, whichever is reached first.
106
119
  When a response is truncated, the result reports the original and displayed sizes and the path to a complete temporary JSON file.
107
- These files use private permissions, remain available for the current session, and are removed during session shutdown or reload.
108
120
  Tool-result metadata contains only size and artifact information rather than a duplicate of the raw Firecrawl response.
109
121
  Oversized Firecrawl error bodies are bounded in the same way.
110
122
 
@@ -139,35 +151,20 @@ Direct subcommands are also available:
139
151
  - `disable` makes all five API capabilities unavailable and unloads affected active definitions.
140
152
  The slash command and `firecrawl_load` remain available.
141
153
 
142
- The menu, `tools`, `help`, `config`, `quickstart`, and `status` routes require TUI or RPC mode so their results are observable.
143
-
144
- Print and JSON modes reject those routes and unknown commands explicitly instead of entering unavailable UI or silently notifying a no-op channel.
145
-
154
+ The menu, `tools`, `help`, `config`, `quickstart`, and `status` routes require TUI or RPC mode.
155
+ Print and JSON modes reject those routes and unknown commands before entering interactive UI.
146
156
  The deterministic `enable` and `disable` routes remain available in every mode.
147
157
 
148
158
  Tool-selector toggles save immediately in user action order.
149
-
150
159
  Done, Escape, or cancellation closes the selector without undoing changes that were already saved.
151
160
 
152
- The available capability names are saved to:
161
+ ## ๐Ÿ”’ Security and privacy
153
162
 
154
- ```text
155
- ${PI_CODING_AGENT_DIR:-~/.pi/agent}/pi-firecrawl.json
156
- ```
163
+ Firecrawl API tools send requested URLs, options, and related data to the configured API endpoint.
164
+ Review the endpoint's privacy policy before sending private or authenticated URLs.
157
165
 
158
- When the file is missing or invalid, the extension preserves Pi's current Firecrawl availability policy instead of replacing it.
159
- An unsaved catalog remains stable across runtime reloads.
160
- A valid saved catalog is restored on Pi startup and `/reload`, with capability definitions exposed natively deferred or eagerly according to model/provider support.
161
- A missing file is created by the first successful availability change.
162
- Within one Pi process, catalog saves run in invocation order, reread the latest valid document, and preserve unknown fields.
163
- Malformed JSON or invalid recognized fields block the save without replacement; a failed save restores both the prior availability and loaded capability state while preserving other extensions' active tools.
164
- The settings file stores only tool names and a timestamp; it never stores `FIRECRAWL_API_KEY`, request headers, or other secrets.
165
-
166
- Compatibility: older versions used `pi-firecrawl-settings.json`.
167
- A legacy-only file remains readable with a warning and is never modified automatically; rename it to `pi-firecrawl.json`.
168
- The first subsequent settings save writes the canonical file.
169
- If both files exist, `pi-firecrawl.json` wins and the legacy file is ignored.
170
- The legacy filename is deprecated and will be removed in a future major release.
166
+ `FIRECRAWL_API_KEY` is sent as a bearer credential but is never logged, displayed, or stored by the extension.
167
+ Truncated response artifacts use private temporary files, remain available only for the current session, and are removed on shutdown or reload.
171
168
 
172
169
  ## ๐Ÿงช Examples
173
170
 
@@ -228,7 +225,6 @@ packages/pi-firecrawl/
228
225
  ```
229
226
 
230
227
  `index.ts` is the Pi entrypoint and forwards to `firecrawl.ts`; the other source modules are internal.
231
-
232
228
  The generated runtime is built from the authoritative `src/index.ts` graph and does not import back into `src`.
233
229
 
234
230
  ## ๐Ÿ”Ž Keywords
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@narumitw/pi-firecrawl",
3
- "version": "0.50.2",
3
+ "version": "0.50.3",
4
4
  "description": "Pi extension that exposes Firecrawl web scraping and crawling tools.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -24,9 +24,6 @@
24
24
  "./dist/index.ts"
25
25
  ]
26
26
  },
27
- "piExtension": {
28
- "lifecycle": "stable"
29
- },
30
27
  "scripts": {
31
28
  "build": "node scripts/build-runtime.mjs",
32
29
  "check": "npm run build && biome check . && npm run typecheck",
@@ -39,14 +36,14 @@
39
36
  "typebox": "*"
40
37
  },
41
38
  "devDependencies": {
42
- "@biomejs/biome": "2.5.10",
43
- "@earendil-works/pi-coding-agent": "0.84.3",
39
+ "@biomejs/biome": "2.5.11",
40
+ "@earendil-works/pi-coding-agent": "0.84.4",
44
41
  "esbuild": "0.28.2",
45
- "typebox": "1.3.18",
42
+ "typebox": "1.3.20",
46
43
  "typescript": "7.0.2"
47
44
  },
48
45
  "dependencies": {
49
- "@narumitw/pi-tui-kit": "^0.49.1"
46
+ "@narumitw/pi-tui-kit": "^0.59.0"
50
47
  },
51
48
  "repository": {
52
49
  "type": "git",