@dumbmice/pi-deepseek-websearch 0.1.5 → 0.1.7

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/AGENTS.md CHANGED
@@ -10,6 +10,7 @@ Instructions for anyone — human or coding agent — changing
10
10
  src/index.ts the extension: two tool registrations, transport, formatting, guards
11
11
  test/index.test.ts node:test suite; global fetch is stubbed, nothing touches the network
12
12
  docs/docs-alignment.md every client-side deviation from DeepSeek's published API contract
13
+ docs/pi-api-alignment.md which pi release this package is verified against
13
14
  README.md user-facing documentation
14
15
  AGENTS.md this file
15
16
  CONTRIBUTING.md four-line pointer to this file (GitHub convention)
@@ -21,8 +22,8 @@ tsconfig.json the strict / noEmit settings used by typecheck
21
22
 
22
23
  ## Requirements and commands
23
24
 
24
- Node >= 22.6 (`engines`; the entry point is TypeScript and the test runner uses
25
- `--experimental-strip-types`). devDependencies stay limited to `typescript` and `@types/node`; the
25
+ Node >= 22.19 (`engines`, the floor pi 1.5.1 itself requires; the entry point is TypeScript and
26
+ the test runner uses `--experimental-strip-types`). devDependencies stay limited to `typescript` and `@types/node`; the
26
27
  publish workflow installs with `npm ci`, the test matrix with `npm install`.
27
28
 
28
29
  ```bash
@@ -118,6 +119,9 @@ is enough to check rendering. `npm test` needs neither key nor network.
118
119
  and constant and at the top of the register — keep them in step.
119
120
  - `CHANGELOG.md` follows Keep a Changelog. Put unreleased work under `[Unreleased]` with
120
121
  Added/Changed/Fixed headings; add the version heading when the release is tagged.
122
+ - `docs/pi-api-alignment.md` records the pi release and Node version this package is verified
123
+ against. `PI_API_SNAPSHOT` in `src/index.ts`, that file and the README *Install* line move together;
124
+ `test/docs.test.ts` fails when they drift.
121
125
  - `AGENTS.md` (this file) holds contributor, architecture and release material.
122
126
 
123
127
  ## Release process
package/CHANGELOG.md CHANGED
@@ -6,6 +6,27 @@ All notable changes to this extension are documented in this file. The format fo
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.1.7] - 2026-11-12
10
+
11
+ ### Changed
12
+
13
+ - Re-verified against pi **1.5.2** (was 1.5.1). `PI_API_SNAPSHOT`, the register row and the README
14
+ requirement move to it; 1.5.2's breaking changes (grep context lines, empty `tools` arrays,
15
+ markdown-transformer options) do not touch any surface this package uses. No runtime change.
16
+
17
+ ## [0.1.6] - 2026-11-06
18
+
19
+ ### Added
20
+
21
+ - `docs/pi-api-alignment.md`: a tested-version table recording the pi release (`1.5.1`) and Node
22
+ version this package is verified against, pinned by `PI_API_SNAPSHOT` and a docs test so the claim
23
+ cannot drift from the code.
24
+
25
+ ### Changed
26
+
27
+ - `engines.node` raised to `>=22.19`, matching pi 1.5.1's own floor. The README now states the pi
28
+ version it was tested with.
29
+
9
30
  ## [0.1.5] - 2026-11-06
10
31
 
11
32
  ### Fixed
@@ -80,7 +101,9 @@ results are not billed. Validated against the DeepSeek API documentation as of 2
80
101
  - `deepseek_fetch` rejects local and private targets and never unescapes inside code.
81
102
 
82
103
 
83
- [Unreleased]: https://github.com/DumbMice/pi-deepseek-websearch/compare/v0.1.5...HEAD
104
+ [Unreleased]: https://github.com/DumbMice/pi-deepseek-websearch/compare/v0.1.7...HEAD
105
+ [0.1.7]: https://github.com/DumbMice/pi-deepseek-websearch/compare/v0.1.6...v0.1.7
106
+ [0.1.6]: https://github.com/DumbMice/pi-deepseek-websearch/compare/v0.1.5...v0.1.6
84
107
  [0.1.5]: https://github.com/DumbMice/pi-deepseek-websearch/compare/v0.1.4...v0.1.5
85
108
  [0.1.4]: https://github.com/DumbMice/pi-deepseek-websearch/compare/v0.1.3...v0.1.4
86
109
  [0.1.3]: https://github.com/DumbMice/pi-deepseek-websearch/compare/v0.1.2...v0.1.3
package/README.md CHANGED
@@ -46,13 +46,17 @@ pi install git:github.com/DumbMice/pi-deepseek-websearch
46
46
 
47
47
  Requirements:
48
48
 
49
- - Node >= 22.6.
49
+ - **pi 1.5.2** (tested).
50
+ - Node >= 22.19, the floor pi itself requires.
50
51
  - A DeepSeek key, from pi's `deepseek` provider (`/login`) or the `DEEPSEEK_API_KEY` variable. Create
51
52
  one at <https://platform.deepseek.com/api_keys>.
52
53
  - Optional, for a compatible gateway: set `PI_DEEPSEEK_BASE_URL` or `DEEPSEEK_SEARCH_BASE_URL`. A
53
54
  trailing slash or `/v1` suffix is stripped. The bare `DEEPSEEK_BASE_URL` is ignored on purpose,
54
55
  because other tools point it at an OpenAI-compatible `/v1` root.
55
56
 
57
+ Last verified 2026-11-12; the table and what was checked is in
58
+ [docs/pi-api-alignment.md](https://github.com/DumbMice/pi-deepseek-websearch/blob/main/docs/pi-api-alignment.md).
59
+
56
60
  Confirm registration by starting `pi` and asking *"use deepseek_search to look up the DeepSeek API
57
61
  pricing"*; the reply begins with a `DeepSeek search · N result(s)` header.
58
62
 
@@ -0,0 +1,46 @@
1
+ # pi extension API alignment
2
+
3
+ How this extension's use of pi's extension API relates to the documented contract, and which exact
4
+ versions that was established against.
5
+
6
+ | Component | Tested version | Recorded in |
7
+ |---|---|---|
8
+ | `@earendil-works/pi-coding-agent` | **1.5.2** | `PI_API_SNAPSHOT` in `src/index.ts` |
9
+ | `@earendil-works/pi-schema` (tool validation) | ships with pi 1.5.2 | this file (notes below) |
10
+ | Node | 22.23.2 (tested); floor 22.19, the floor pi itself requires | `package.json` `engines`, README *Install* |
11
+ | DeepSeek Search & Fetch API | docs snapshot 2026-10-30 | `DOCS_SNAPSHOT`; see `docs/docs-alignment.md` |
12
+
13
+ Last verified **2026-11-12**. Bump a row here, its constant where one exists, and the README
14
+ *Install* line in the same commit as the change that depends on it.
15
+
16
+ ## What this extension actually uses
17
+
18
+ The contract is followed where it is documented, and nothing here calls pi internals:
19
+
20
+ - `pi.registerTool()` with a hand-written JSON Schema `parameters` object. pi validates any JSON
21
+ Schema; the `typebox` import in the docs is a convenience, and avoiding it keeps the package
22
+ dependency-free.
23
+ - `execute(toolCallId, params, signal, onUpdate, ctx)` — the five-argument form.
24
+ - `ctx.modelRegistry.getApiKeyForProvider("deepseek")` for credentials, falling back to
25
+ `DEEPSEEK_API_KEY`.
26
+ - The `pi.extensions` manifest entry in `package.json`.
27
+
28
+ It registers no commands, hooks, renderers or UI, so a release that only changes those surfaces
29
+ cannot affect this package.
30
+
31
+ ## Notes on the 1.5.x line
32
+
33
+ 1. **Tool validation moved to `@earendil-works/pi-schema` in 1.5.0.** TypeBox features outside JSON
34
+ Schema no longer apply; plain JSON Schema tools now get the same coercion as TypeBox tools
35
+ (numeric strings to numbers, `"true"` to `true`, a single value to a one-item array, `null` in an
36
+ optional property dropped). This package uses only JSON Schema keywords, so nothing was lost, and
37
+ the coercion is a net improvement: `allowed_domains: "example.com"` now arrives as
38
+ `["example.com"]` instead of being rejected.
39
+ 2. **1.5.2's breaking changes do not touch this package.** They cover `GrepOperations.readFile`
40
+ context lines, the omission of an empty `"tools": []` array for OpenAI-compatible models, and new
41
+ `pi.registerMarkdownTransformer()` options. This package registers no renderers and does not
42
+ implement grep.
43
+ 3. **Package changelogs are read from the package root by 1.5.x.** `CHANGELOG.md` uses the required
44
+ `## [x.y.z]` headings, so extension updates surface our notes without a `pi.changelogPath` entry.
45
+ 4. **Node floor.** pi 1.5.1 declares `>=22.19.0`; this package declares the same floor, because it
46
+ only runs inside pi.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dumbmice/pi-deepseek-websearch",
3
- "version": "0.1.5",
3
+ "version": "0.1.7",
4
4
  "description": "DeepSeek web search and page fetch tools for the pi coding agent: publication dates, authority, rerank scores, ori_question, count 1-50.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -41,12 +41,12 @@
41
41
  ]
42
42
  },
43
43
  "scripts": {
44
- "test": "node --experimental-strip-types --no-warnings --test test/index.test.ts",
44
+ "test": "node --experimental-strip-types --no-warnings --test test/index.test.ts test/docs.test.ts",
45
45
  "typecheck": "tsc -p tsconfig.json",
46
46
  "pack:check": "npm pack --dry-run"
47
47
  },
48
48
  "engines": {
49
- "node": ">=22.6"
49
+ "node": ">=22.19"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/node": "^22.20.5",
package/src/index.ts CHANGED
@@ -21,6 +21,7 @@
21
21
  import { isIP } from "node:net";
22
22
 
23
23
  export const DOCS_SNAPSHOT = "2026-10-30";
24
+ export const PI_API_SNAPSHOT = "2026-11-12";
24
25
  export const PRICE_PER_SUCCESSFUL_REQUEST_USD = 0.00075;
25
26
  export const MAX_QUERY_CHARS = 128;
26
27