@activepieces/piece-brave-search 0.0.3 → 0.0.4
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/package.json +11 -22
- package/src/index.d.ts +1 -1
- package/src/index.d.ts.map +1 -0
- package/src/index.js +4 -8
- package/src/index.js.map +1 -1
- package/src/lib/actions/web-search.d.ts +1 -0
- package/src/lib/actions/web-search.d.ts.map +1 -0
- package/src/lib/actions/web-search.js +7 -2
- package/src/lib/actions/web-search.js.map +1 -1
- package/src/lib/auth.d.ts +2 -0
- package/src/lib/auth.d.ts.map +1 -0
- package/src/lib/auth.js +10 -0
- package/src/lib/auth.js.map +1 -0
- package/README.md +0 -28
package/package.json
CHANGED
|
@@ -1,27 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-brave-search",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
|
+
"main": "./src/index.js",
|
|
5
|
+
"types": "./src/index.d.ts",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"build": "tsc -p tsconfig.lib.json && cp package.json dist/",
|
|
8
|
+
"lint": "eslint 'src/**/*.ts'"
|
|
9
|
+
},
|
|
4
10
|
"dependencies": {
|
|
5
|
-
"@
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"axios-retry": "4.4.1",
|
|
9
|
-
"deepmerge-ts": "7.1.0",
|
|
10
|
-
"form-data": "4.0.4",
|
|
11
|
-
"mime-types": "2.1.35",
|
|
12
|
-
"nanoid": "3.3.8",
|
|
13
|
-
"semver": "7.6.0",
|
|
14
|
-
"socket.io-client": "4.8.1",
|
|
15
|
-
"zod": "4.1.13",
|
|
16
|
-
"@activepieces/pieces-common": "0.11.6",
|
|
17
|
-
"@activepieces/pieces-framework": "0.25.4",
|
|
18
|
-
"@activepieces/shared": "0.37.0",
|
|
11
|
+
"@activepieces/pieces-common": "0.12.3",
|
|
12
|
+
"@activepieces/pieces-framework": "0.30.0",
|
|
13
|
+
"@activepieces/shared": "0.87.1",
|
|
19
14
|
"tslib": "2.6.2"
|
|
20
|
-
}
|
|
21
|
-
"resolutions": {
|
|
22
|
-
"rollup": "npm:@rollup/wasm-node"
|
|
23
|
-
},
|
|
24
|
-
"types": "./src/index.d.ts",
|
|
25
|
-
"main": "./src/index.js",
|
|
26
|
-
"type": "commonjs"
|
|
15
|
+
}
|
|
27
16
|
}
|
package/src/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const braveSearchAuth: import("@activepieces/pieces-framework").SecretTextProperty<true>;
|
|
2
1
|
export declare const braveSearch: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").SecretTextProperty<true>>;
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,WAAW,mHAoBtB,CAAC"}
|
package/src/index.js
CHANGED
|
@@ -1,26 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.braveSearch =
|
|
3
|
+
exports.braveSearch = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
6
|
const web_search_1 = require("./lib/actions/web-search");
|
|
7
7
|
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
8
|
-
|
|
9
|
-
displayName: 'API Key',
|
|
10
|
-
required: true,
|
|
11
|
-
description: 'Your Brave Search API Key (get it from https://brave.com/search/api/)',
|
|
12
|
-
});
|
|
8
|
+
const auth_1 = require("./lib/auth");
|
|
13
9
|
exports.braveSearch = (0, pieces_framework_1.createPiece)({
|
|
14
10
|
displayName: 'Brave Search',
|
|
15
11
|
description: 'Privacy-preserving search engine',
|
|
16
|
-
auth:
|
|
12
|
+
auth: auth_1.braveSearchAuth,
|
|
17
13
|
minimumSupportedRelease: '0.30.0',
|
|
18
14
|
logoUrl: 'https://cdn.activepieces.com/pieces/brave-search.png',
|
|
19
15
|
authors: ['ErisMorn', 'sanket-a11y'],
|
|
20
16
|
actions: [
|
|
21
17
|
web_search_1.braveWebSearchAction,
|
|
22
18
|
(0, pieces_common_1.createCustomApiCallAction)({
|
|
23
|
-
auth:
|
|
19
|
+
auth: auth_1.braveSearchAuth,
|
|
24
20
|
baseUrl: () => 'https://api.search.brave.com/res/v1',
|
|
25
21
|
authMapping: (auth) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
|
|
26
22
|
return {
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,yDAAgE;AAChE,+DAAwE;AACxE,qCAA6C;AAEhC,QAAA,WAAW,GAAG,IAAA,8BAAW,EAAC;IACrC,WAAW,EAAE,cAAc;IAC3B,WAAW,EAAE,kCAAkC;IAC/C,IAAI,EAAE,sBAAe;IACrB,uBAAuB,EAAE,QAAQ;IACjC,OAAO,EAAE,sDAAsD;IAC/D,OAAO,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC;IACpC,OAAO,EAAE;QACP,iCAAoB;QACpB,IAAA,yCAAyB,EAAC;YACxB,IAAI,EAAE,sBAAe;YACrB,OAAO,EAAE,GAAG,EAAE,CAAC,qCAAqC;YACpD,WAAW,EAAE,CAAO,IAAI,EAAE,EAAE;gBAC1B,OAAO;oBACL,sBAAsB,EAAE,IAAI,CAAC,WAAW;iBACzC,CAAC;YACJ,CAAC,CAAA;SACF,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -2,3 +2,4 @@ export declare const braveWebSearchAction: import("@activepieces/pieces-framewor
|
|
|
2
2
|
query: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
3
|
count: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
4
4
|
}>;
|
|
5
|
+
//# sourceMappingURL=web-search.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web-search.d.ts","sourceRoot":"","sources":["../../../../src/lib/actions/web-search.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,oBAAoB;;;EA2C/B,CAAC"}
|
|
@@ -4,12 +4,17 @@ exports.braveWebSearchAction = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
6
|
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
|
-
const
|
|
7
|
+
const auth_1 = require("../auth");
|
|
8
8
|
exports.braveWebSearchAction = (0, pieces_framework_1.createAction)({
|
|
9
|
-
auth:
|
|
9
|
+
auth: auth_1.braveSearchAuth,
|
|
10
10
|
name: 'web_search',
|
|
11
11
|
displayName: 'Web Search',
|
|
12
12
|
description: 'Search the web using Brave Search',
|
|
13
|
+
audience: 'both',
|
|
14
|
+
aiMetadata: {
|
|
15
|
+
description: 'Runs a web search query against the Brave Search API and returns the matching web results. Use it to retrieve current information from the public web for a given text query; set the optional count (1-20) to control how many results come back. Read-only lookup that returns the same results for the same query.',
|
|
16
|
+
idempotent: true,
|
|
17
|
+
},
|
|
13
18
|
props: {
|
|
14
19
|
query: pieces_framework_1.Property.ShortText({
|
|
15
20
|
displayName: 'Query',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-search.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"web-search.js","sourceRoot":"","sources":["../../../../src/lib/actions/web-search.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAAqE;AACrE,kCAA0C;AAE7B,QAAA,oBAAoB,GAAG,IAAA,+BAAY,EAAC;IAC/C,IAAI,EAAE,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use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.braveSearchAuth = void 0;
|
|
4
|
+
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
5
|
+
exports.braveSearchAuth = pieces_framework_1.PieceAuth.SecretText({
|
|
6
|
+
displayName: 'API Key',
|
|
7
|
+
required: true,
|
|
8
|
+
description: 'Your Brave Search API Key (get it from https://brave.com/search/api/)',
|
|
9
|
+
});
|
|
10
|
+
//# sourceMappingURL=auth.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../../src/lib/auth.ts"],"names":[],"mappings":";;;AAAA,qEAA2D;AAE9C,QAAA,eAAe,GAAG,4BAAS,CAAC,UAAU,CAAC;IAClD,WAAW,EAAE,SAAS;IACtB,QAAQ,EAAE,IAAI;IACd,WAAW,EACT,uEAAuE;CAC1E,CAAC,CAAC"}
|
package/README.md
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# Activepieces Brave Search Piece (MCP)
|
|
2
|
-
|
|
3
|
-
This project contains the source code for the **Brave Search** integration for Activepieces.
|
|
4
|
-
Activepieces automatically exposes this integration as an MCP (Model Context Protocol) server, allowing agents to use Brave Search.
|
|
5
|
-
|
|
6
|
-
## Integration Details
|
|
7
|
-
|
|
8
|
-
- **Name**: Brave Search
|
|
9
|
-
- **Description**: Privacy-focused web search engine.
|
|
10
|
-
- **Auth**: API Key (Brave Search API)
|
|
11
|
-
- **Actions**:
|
|
12
|
-
- `web_search`: Perform a web search query.
|
|
13
|
-
|
|
14
|
-
## Development Status
|
|
15
|
-
|
|
16
|
-
- [x] Scaffolding
|
|
17
|
-
- [ ] Implementation of `web_search` action
|
|
18
|
-
- [ ] Testing
|
|
19
|
-
|
|
20
|
-
## How to use
|
|
21
|
-
|
|
22
|
-
This code is designed to be dropped into the `packages/pieces/community/brave-search` directory of the Activepieces repository.
|
|
23
|
-
|
|
24
|
-
1. Clone Activepieces: `git clone https://github.com/activepieces/activepieces.git`
|
|
25
|
-
2. Copy this folder to `packages/pieces/community/brave-search`
|
|
26
|
-
3. Run `npm install` in the root.
|
|
27
|
-
4. Build the piece: `nx build piece-brave-search`
|
|
28
|
-
5. Run Activepieces locally to test.
|