search1api 0.1.3 adds Search1API to magpie's Settings as a web search API. A search goes out as the Search1API account magpie picked (OAuth or API key, renewed before each search). The option key or SEARCH1API_API_KEY is used only when the host gives no account. A refusal (401, 402, 429) keeps its status and Retry-After, so magpie rests that account for search only. Results map title, url, snippet and date. Thanks @fatwang2. Run at the reviewed head d4bcb9da (mote, HOME=$(mktemp -d)): - node --test tests/*.test.mjs: 27 pass. - bun test: 27 pass. - bun scripts/check.mjs search1api: ok. Broken by hand: b54f3636c's src/index.ts with this head's tests fails the account-over-option-key test (3 pass, 1 fail). An earlier round with the main code made websearch.test fail 4 of 4. Not run: tests/host.integration.mjs, or a real Search1API account.
28 lines
997 B
JSON
28 lines
997 B
JSON
{
|
|
"name": "@magpie-community/tools-search1api",
|
|
"version": "0.1.3",
|
|
"description": "Search1API web search, news, agentic search, pages, sitemaps and trends for Magpie, with OAuth or API key sign-in",
|
|
"type": "module",
|
|
"main": "./index.mjs",
|
|
"files": ["src/proc.mjs", "index.mjs", "src", "README.md", "LICENSE"],
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://github.com/magpie-community/plugins.git",
|
|
"directory": "packages/search1api"
|
|
},
|
|
"keywords": ["magpie", "magpie-tools", "opencode-plugin", "mcp", "search1api", "web-search", "oauth"],
|
|
"scripts": {
|
|
"lint": "node --check index.mjs && tsc -p tsconfig.json --noEmit",
|
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
"build": "tsc -p tsconfig.json",
|
|
"test": "node --test tests/*.test.mjs",
|
|
"test:magpie": "node --test tests/host.integration.mjs"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^22.0.0",
|
|
"typescript": "^5.9.0"
|
|
},
|
|
"engines": { "node": ">=24" }
|
|
}
|