@deepseek-ai/dsh-web-search-perplexity 0.0.1-rc.2 → 0.1.0-rc.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.
- package/LICENSE +17 -24
- package/README.i18n.yaml +1 -1
- package/README.zh.md +1 -1
- package/lib/index.js +2 -2
- package/package.json +11 -11
package/LICENSE
CHANGED
|
@@ -1,28 +1,21 @@
|
|
|
1
|
-
|
|
1
|
+
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) 2026
|
|
3
|
+
Copyright (c) 2026 DeepSeek
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
7
11
|
|
|
8
|
-
|
|
9
|
-
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
10
14
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
|
20
|
-
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
21
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
22
|
-
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
|
23
|
-
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
24
|
-
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
|
25
|
-
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
|
26
|
-
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
|
27
|
-
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
28
|
-
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.i18n.yaml
CHANGED
|
@@ -3,4 +3,4 @@
|
|
|
3
3
|
# after editing either side, bring the other along and re-record with:
|
|
4
4
|
# pnpm run verify-translation-pairing --write packages/web/web-search-perplexity/README.md
|
|
5
5
|
README.md: 8800609a05e99d3fa8a61e12b2360e633f0fd330
|
|
6
|
-
README.zh.md:
|
|
6
|
+
README.zh.md: 488c1463d28b7d36c34625a3ddbab1aa3417d70c
|
package/README.zh.md
CHANGED
|
@@ -61,5 +61,5 @@
|
|
|
61
61
|
|
|
62
62
|
- **引用回退源只含 URL**:Perplexity 省略结构化 `search_results[]` 时,源不含 `title`/`snippet`/`publishedAt`,因此工具只渲染纯主机名标签。
|
|
63
63
|
- **超量返回的来源仍会增加 token 消耗和延迟**:协议没有结果数量控制,`maxResults` 只能由 seam 在事后截断。
|
|
64
|
-
- **只公开 `model`/`maxTokens`/`searchRecency`**:Perplexity 的其他搜索控制项(域名过滤条件、`web_search_options`
|
|
64
|
+
- **只公开 `model`/`maxTokens`/`searchRecency`**:Perplexity 的其他搜索控制项(域名过滤条件、`web_search_options` 上下文大小、图片)有待提供方无关的 Service Definition 字段支持(见 [seam Agent Note](../../../.agents/notes/implemented/architecture/2026-06-24-web-capability-seam.md))。
|
|
65
65
|
- **按错误形状分类中止**:只有 `DOMException` 且名为 `AbortError` 时才映射为 `WEB_ABORTED`;携带自定义原因的中止(例如 `dsh-timeout` 的 `TimeoutReason`)会呈现为 `WEB_PROVIDER_ERROR`。
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { launchEnvironmentOf } from "@deepseek-ai/dsh-launch-environment";
|
|
2
2
|
import z from "@deepseek-ai/schemastery";
|
|
3
3
|
import { WebError } from "@deepseek-ai/dsh-web";
|
|
4
4
|
//#region lib/types/provider.js
|
|
@@ -143,7 +143,7 @@ const Config = z.object({
|
|
|
143
143
|
/** Register the Perplexity search provider with `ctx.web`. */
|
|
144
144
|
function apply(ctx, config) {
|
|
145
145
|
ctx.web.registerSearchProvider(new PerplexitySearchProvider({
|
|
146
|
-
apiKey: config.apiKey ??
|
|
146
|
+
apiKey: config.apiKey ?? launchEnvironmentOf(ctx).get("PERPLEXITY_API_KEY")?.value ?? "",
|
|
147
147
|
baseURL: config.baseURL ?? "https://api.perplexity.ai",
|
|
148
148
|
model: config.model ?? "sonar",
|
|
149
149
|
maxTokens: config.maxTokens ?? 1024,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@deepseek-ai/dsh-web-search-perplexity",
|
|
3
3
|
"description": "Perplexity-backed search provider for the DeepSeek Harness web capability seam (ctx.web)",
|
|
4
|
-
"version": "0.0
|
|
4
|
+
"version": "0.1.0-rc.2",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "restricted"
|
|
7
7
|
},
|
|
@@ -30,20 +30,20 @@
|
|
|
30
30
|
"lib/invariant.js",
|
|
31
31
|
"lib/types/**/*.d.ts"
|
|
32
32
|
],
|
|
33
|
-
"license": "
|
|
33
|
+
"license": "MIT",
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@deepseek-ai/dsh-environment": "^0.0
|
|
36
|
-
"@deepseek-ai/
|
|
37
|
-
"@deepseek-ai/dsh-web": "^0.0
|
|
38
|
-
"@deepseek-ai/
|
|
35
|
+
"@deepseek-ai/dsh-launch-environment": "^0.1.0-rc.2",
|
|
36
|
+
"@deepseek-ai/cordis": "^4.0.1",
|
|
37
|
+
"@deepseek-ai/dsh-web": "^0.1.0-rc.2",
|
|
38
|
+
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.2"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@deepseek-ai/schemastery": "^3.18.1
|
|
41
|
+
"@deepseek-ai/schemastery": "^3.18.1"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
-
"@deepseek-ai/dsh-environment": "^0.0
|
|
45
|
-
"@deepseek-ai/dsh-invariants": "^0.0
|
|
46
|
-
"@deepseek-ai/dsh-web": "^0.0
|
|
47
|
-
"@deepseek-ai/cordis": "^4.0.1
|
|
44
|
+
"@deepseek-ai/dsh-launch-environment": "^0.1.0-rc.2",
|
|
45
|
+
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.2",
|
|
46
|
+
"@deepseek-ai/dsh-web": "^0.1.0-rc.2",
|
|
47
|
+
"@deepseek-ai/cordis": "^4.0.1"
|
|
48
48
|
}
|
|
49
49
|
}
|