-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Add Airweave app #18779
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add Airweave app #18779
Conversation
…nagement. - Search Collection: semantic + keyword search across data sources - List/Create/Get/Delete Collections - List Available Sources - Trigger Source Connection Sync Includes full @airweave/sdk integration, dynamic dropdowns, and comprehensive documentation.
The latest updates on your projects. Learn more about Vercel for GitHub. 1 Skipped Deployment
|
Thank you so much for submitting this! We've added it to our backlog to review, and our team has been notified. |
Thanks for submitting this PR! When we review PRs, we follow the Pipedream component guidelines. If you're not familiar, here's a quick checklist:
|
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the WalkthroughAdds an Airweave integration: new app module wiring the Airweave SDK, seven action modules for collections and sources, README documentation, and package metadata with new dependencies. All changes are additive under Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Action as Action Module
participant App as Airweave App
participant SDK as Airweave SDK/API
rect rgba(232,246,255,0.9)
User->>Action: Invoke action (Create/Search/List/Get/Delete/Trigger Sync)
end
Action->>App: call corresponding method (e.g., createCollection, searchCollection, runSourceConnection)
App->>SDK: instantiate client & call SDK endpoint (collections / sourceConnections / sources)
SDK-->>App: return API response
App-->>Action: return response
Action-->>User: export summary and return response
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
🧹 Nitpick comments (1)
components/airweave/package.json (1)
16-16
: Update to the latest Airweave SDK version (0.6.46).The dependency is currently pinned at
@airweave/sdk@^0.1.50
—upgrade to^0.6.46
to gain recent bug fixes, improved runtime support, enhanced TypeScript types, retry behavior, and new helpers.- "@airweave/sdk": "^0.1.50", + "@airweave/sdk": "^0.6.46",After upgrading, verify that all imports of
AirweaveSDKClient
and its method signatures still align with the new SDK.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
components/airweave/README.md
(1 hunks)components/airweave/actions/create-collection/create-collection.mjs
(1 hunks)components/airweave/actions/delete-collection/delete-collection.mjs
(1 hunks)components/airweave/actions/get-collection/get-collection.mjs
(1 hunks)components/airweave/actions/list-collections/list-collections.mjs
(1 hunks)components/airweave/actions/list-sources/list-sources.mjs
(1 hunks)components/airweave/actions/search-collection/search-collection.mjs
(1 hunks)components/airweave/actions/trigger-sync/trigger-sync.mjs
(1 hunks)components/airweave/airweave.app.mjs
(1 hunks)components/airweave/package.json
(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (8)
components/airweave/actions/trigger-sync/trigger-sync.mjs (6)
components/airweave/actions/create-collection/create-collection.mjs (1)
response
(29-33)components/airweave/actions/delete-collection/delete-collection.mjs (1)
response
(28-28)components/airweave/actions/get-collection/get-collection.mjs (1)
response
(19-19)components/airweave/actions/list-collections/list-collections.mjs (1)
response
(30-33)components/airweave/actions/list-sources/list-sources.mjs (1)
response
(13-13)components/airweave/actions/search-collection/search-collection.mjs (1)
response
(65-68)
components/airweave/actions/list-collections/list-collections.mjs (1)
components/airweave/actions/list-sources/list-sources.mjs (2)
response
(13-13)count
(15-15)
components/airweave/airweave.app.mjs (1)
components/airweave/actions/search-collection/search-collection.mjs (1)
params
(51-55)
components/airweave/actions/search-collection/search-collection.mjs (2)
components/airweave/airweave.app.mjs (2)
params
(12-15)params
(35-38)components/airweave/actions/list-collections/list-collections.mjs (1)
response
(30-33)
components/airweave/actions/list-sources/list-sources.mjs (1)
components/airweave/actions/list-collections/list-collections.mjs (2)
response
(30-33)count
(35-35)
components/airweave/actions/create-collection/create-collection.mjs (3)
components/airweave/actions/delete-collection/delete-collection.mjs (1)
response
(28-28)components/airweave/actions/get-collection/get-collection.mjs (1)
response
(19-19)components/airweave/actions/list-collections/list-collections.mjs (1)
response
(30-33)
components/airweave/actions/delete-collection/delete-collection.mjs (2)
components/airweave/actions/create-collection/create-collection.mjs (1)
response
(29-33)components/airweave/actions/get-collection/get-collection.mjs (1)
response
(19-19)
components/airweave/actions/get-collection/get-collection.mjs (3)
components/airweave/actions/delete-collection/delete-collection.mjs (1)
response
(28-28)components/airweave/actions/list-collections/list-collections.mjs (1)
response
(30-33)components/airweave/actions/search-collection/search-collection.mjs (1)
response
(65-68)
🪛 LanguageTool
components/airweave/README.md
[grammar] ~9-~9: There might be a mistake here.
Context: ...ocess data from: - API endpoints (REST) - Productivity and collaboration tools - R...
(QB_NEW_EN)
[grammar] ~10-~10: There might be a mistake here.
Context: ...) - Productivity and collaboration tools - Relational databases - Document stores -...
(QB_NEW_EN)
[grammar] ~11-~11: There might be a mistake here.
Context: ...llaboration tools - Relational databases - Document stores - File systems and stora...
(QB_NEW_EN)
[grammar] ~12-~12: There might be a mistake here.
Context: ...- Relational databases - Document stores - File systems and storage services ## Av...
(QB_NEW_EN)
[grammar] ~17-~17: There might be a mistake here.
Context: ...s ## Available Actions ### Collections - Search Collection - Search across all ...
(QB_NEW_EN)
[grammar] ~24-~24: There might be a mistake here.
Context: ...ion and all associated data ### Sources - List Sources - Get all available data ...
(QB_NEW_EN)
[grammar] ~36-~36: There might be a mistake here.
Context: ... ## Example Workflows ### Slack Q&A Bot Slash command → Search Airweave collecti...
(QB_NEW_EN)
[grammar] ~39-~39: There might be a mistake here.
Context: ...vant information ### Support Automation Form submission → Search documentation →...
(QB_NEW_EN)
[grammar] ~42-~42: There might be a mistake here.
Context: ...rt ticket with context ### Daily Digest Cron schedule → Search recent updates → ...
(QB_NEW_EN)
[grammar] ~45-~45: There might be a mistake here.
Context: ...nd email summary ### GitHub Integration New issue → Search codebase → Auto-comme...
(QB_NEW_EN)
[grammar] ~56-~56: There might be a mistake here.
Context: ...ce. ## Links - Airweave Documentation - [Airweave GitHub](https://github.com/airw...
(QB_NEW_EN)
[grammar] ~57-~57: There might be a mistake here.
Context: ...s://docs.airweave.ai) - Airweave GitHub - [API Reference](https://docs.airweave.ai/...
(QB_NEW_EN)
[grammar] ~58-~58: There might be a mistake here.
Context: ...m/airweave-ai/airweave) - API Reference - [Airweave TypeScript SDK](https://github....
(QB_NEW_EN)
[grammar] ~63-~63: There might be a mistake here.
Context: ...k) ## Support For issues or questions: - Airweave Community: [GitHub Discussions]...
(QB_NEW_EN)
🔇 Additional comments (8)
components/airweave/README.md (1)
1-66
: LGTM! Well-structured documentation.The README provides clear, comprehensive documentation for the Airweave integration with good setup instructions, example workflows, and helpful links. The static analysis grammar warnings are false positives—the tool is incorrectly flagging Markdown list items.
components/airweave/actions/list-sources/list-sources.mjs (1)
3-20
: LGTM! Clean action implementation.The action follows Pipedream conventions correctly with proper metadata, props, and a clear run method. The summary export provides useful feedback to users.
components/airweave/actions/get-collection/get-collection.mjs (1)
3-25
: LGTM! Proper action structure.The action correctly uses propDefinition for the collectionId and provides a clear summary with the collection name and readable_id.
components/airweave/actions/create-collection/create-collection.mjs (1)
3-39
: LGTM! Well-documented action.The action provides clear prop descriptions and appropriately warns users that the readableId cannot be changed after creation. The optional description field is properly handled.
components/airweave/actions/list-collections/list-collections.mjs (1)
3-40
: LGTM! Good pagination implementation.The action properly implements pagination with sensible defaults (skip: 0, limit: 50) and appropriate constraints (min/max values).
components/airweave/actions/trigger-sync/trigger-sync.mjs (1)
3-37
: LGTM! Well-designed prop dependencies.The action effectively uses the collectionId as context for the sourceConnectionId prop definition, which will appropriately filter the available source connections. The description clearly explains the asynchronous nature of the sync job.
components/airweave/actions/delete-collection/delete-collection.mjs (2)
23-26
: LGTM! Appropriate safety mechanism.The confirmation check is essential for this destructive operation. The validation logic correctly ensures users type "DELETE" before proceeding, and the error message is clear.
3-34
: Well-implemented destructive action.The action appropriately protects users from accidental deletion with multiple warnings (in the description and prop description) and a confirmation requirement. The implementation is clean and follows best practices for destructive operations.
const params = { | ||
skip: prevContext?.skip || 0, | ||
limit: 50, | ||
}; | ||
if (collectionId) { | ||
params.collection = collectionId; | ||
} | ||
const connections = await this.listSourceConnections(params); | ||
return { | ||
options: connections.map((conn) => ({ | ||
label: conn.name || conn.id, | ||
value: conn.id, | ||
})), | ||
context: { | ||
skip: params.skip + connections.length, | ||
}, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Terminate pagination for source connections when no rows remain.
Same pagination issue here: if connections.length
is zero, skip
never advances and the UI will keep fetching the empty page. Bail out by omitting context
(or returning null
) once there are no more records.
- return {
- options: connections.map((conn) => ({
- label: conn.name || conn.id,
- value: conn.id,
- })),
- context: {
- skip: params.skip + connections.length,
- },
- };
+ const options = connections.map((conn) => ({
+ label: conn.name || conn.id,
+ value: conn.id,
+ }));
+ return {
+ options,
+ context: options.length
+ ? { skip: params.skip + options.length }
+ : undefined,
+ };
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
const params = { | |
skip: prevContext?.skip || 0, | |
limit: 50, | |
}; | |
if (collectionId) { | |
params.collection = collectionId; | |
} | |
const connections = await this.listSourceConnections(params); | |
return { | |
options: connections.map((conn) => ({ | |
label: conn.name || conn.id, | |
value: conn.id, | |
})), | |
context: { | |
skip: params.skip + connections.length, | |
}, | |
}; | |
const params = { | |
skip: prevContext?.skip || 0, | |
limit: 50, | |
}; | |
if (collectionId) { | |
params.collection = collectionId; | |
} | |
const connections = await this.listSourceConnections(params); | |
const options = connections.map((conn) => ({ | |
label: conn.name || conn.id, | |
value: conn.id, | |
})); | |
return { | |
options, | |
context: options.length | |
? { skip: params.skip + options.length } | |
: undefined, | |
}; |
🤖 Prompt for AI Agents
In components/airweave/airweave.app.mjs around lines 35 to 51, the pagination
always returns a context even when connections.length === 0 which causes the UI
to repeatedly fetch the same empty page; change the return so that if
connections.length is 0 you omit the context (or return null for context) to
signal termination of pagination, otherwise return the existing context with
skip: params.skip + connections.length.
Hi @EwanTauran , We released the base integration for Airweave. For logo I used the one in Airweave's Github profile. Feel free to provide or point to a better one if you'd like to. Cheers, |
That's great to hear, could you use Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, thanks for the contribution @EwanTauran !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
components/airweave/actions/create-collection/create-collection.mjs (1)
14-32
: Props are well-defined. Consider adding format validation for readableId.The props follow best practices with clear descriptions. The
description
prop is appropriately optional. ThereadableId
description explains the expected format (lowercase, hyphens), but there's no programmatic enforcement.Optionally, you could add pattern validation to catch format issues early:
readableId: { type: "string", label: "Readable ID", description: "URL-friendly identifier for the collection (lowercase, hyphens allowed, e.g., 'customer-support-data'). This cannot be changed after creation.", + pattern: "^[a-z0-9-]+$", },
This would provide immediate feedback if the format is invalid, rather than letting the API reject it.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (7)
components/airweave/actions/create-collection/create-collection.mjs
(1 hunks)components/airweave/actions/delete-collection/delete-collection.mjs
(1 hunks)components/airweave/actions/get-collection/get-collection.mjs
(1 hunks)components/airweave/actions/list-collections/list-collections.mjs
(1 hunks)components/airweave/actions/list-sources/list-sources.mjs
(1 hunks)components/airweave/actions/search-collection/search-collection.mjs
(1 hunks)components/airweave/actions/trigger-sync/trigger-sync.mjs
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (5)
- components/airweave/actions/trigger-sync/trigger-sync.mjs
- components/airweave/actions/search-collection/search-collection.mjs
- components/airweave/actions/list-sources/list-sources.mjs
- components/airweave/actions/delete-collection/delete-collection.mjs
- components/airweave/actions/list-collections/list-collections.mjs
🧰 Additional context used
🧬 Code graph analysis (2)
components/airweave/actions/create-collection/create-collection.mjs (3)
components/airweave/actions/delete-collection/delete-collection.mjs (1)
response
(33-33)components/airweave/actions/get-collection/get-collection.mjs (1)
response
(24-24)components/airweave/actions/list-collections/list-collections.mjs (1)
response
(35-38)
components/airweave/actions/get-collection/get-collection.mjs (3)
components/airweave/actions/create-collection/create-collection.mjs (1)
response
(34-38)components/airweave/actions/delete-collection/delete-collection.mjs (1)
response
(33-33)components/airweave/actions/search-collection/search-collection.mjs (1)
response
(70-73)
🔇 Additional comments (5)
components/airweave/actions/create-collection/create-collection.mjs (2)
1-12
: LGTM! Metadata and annotations are well-configured.The component metadata follows Pipedream conventions with an appropriate key, clear description with documentation link, and correct annotation hints for a create operation.
33-43
: LGTM! The run method is correctly implemented.The method properly invokes the SDK, converts prop naming from camelCase to snake_case for the API, exports a clear summary message, and returns the response object for downstream use.
components/airweave/actions/get-collection/get-collection.mjs (3)
1-12
: LGTM! Metadata and annotations are correctly configured.The component metadata follows conventions with an appropriate key, clear description, and correct annotation hints. Notably,
readOnlyHint: true
accurately reflects this is a read-only GET operation.
14-22
: Excellent use of propDefinition for reusability.The action correctly uses
propDefinition
to reference the collectionId prop from the app module, which promotes code reuse and enables dynamic dropdown functionality across multiple actions.
23-29
: LGTM! Clean and correct implementation.The method correctly retrieves the collection, exports an informative summary, and returns the full response object. The implementation is consistent with other collection actions in this PR.
Hi everyone, all test cases are passed! Ready for release! Test report |
- Added frameworkName and frameworkVersion properties to the AirweaveSDKClient instantiation. - Imported package.json to dynamically set the framework version.
…an/pipedream into feat/component/airweave
Made another small change adding in some headers that we consume on our side to make sure we can identify any traffic originating from Pipedream. Rest seems ready to go. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
♻️ Duplicate comments (2)
components/airweave/airweave.app.mjs (2)
12-26
: Stop paginating when no more collections are returned.If
collections.length === 0
,skip
doesn’t advance and the UI keeps requesting the same empty page. Omitcontext
when no options remain.- return { - options: collections.map((collection) => ({ - label: collection.name || collection.readable_id, - value: collection.readable_id, - })), - context: { - skip: params.skip + collections.length, - }, - }; + const options = collections.map((collection) => ({ + label: collection.name || collection.readable_id, + value: collection.readable_id, + })); + return { + options, + context: options.length + ? { skip: params.skip + options.length } + : undefined, + };
33-52
: Terminate pagination for source connections when no rows remain.Same issue as above: return no
context
when the page is empty to stop infinite requests.- return { - options: connections.map((conn) => ({ - label: conn.name || conn.id, - value: conn.id, - })), - context: { - skip: params.skip + connections.length, - }, - }; + const options = connections.map((conn) => ({ + label: conn.name || conn.id, + value: conn.id, + })); + return { + options, + context: options.length + ? { skip: params.skip + options.length } + : undefined, + };
🧹 Nitpick comments (3)
components/airweave/airweave.app.mjs (3)
2-2
: Avoid JSON import assertions to satisfy Biome and maximize runtime compatibility.Static analysis flags a parse error on the JSON import. Replace it with
createRequire
and pass a guardedframeworkVersion
.-import packageJson from "./package.json" assert { type: "json" }; +import { createRequire } from "module"; +const require = createRequire(import.meta.url); +let frameworkVersion = "unknown"; +try { + frameworkVersion = require("./package.json")?.version || frameworkVersion; +} catch { + // package.json may be pruned at runtime; fall back gracefully +}And update the client construction below:
- frameworkVersion: packageJson.version, + frameworkVersion,
94-101
: Minor: memoize the SDK client to avoid rebuilding per call (optional).Tiny perf win and less object churn; rebuild only if auth/baseUrl changes.
- _client() { - return new AirweaveSDKClient({ + _client() { + if (this._cachedClient) return this._cachedClient; + this._cachedClient = new AirweaveSDKClient({ apiKey: this._apiKey(), baseUrl: this._baseUrl(), frameworkName: "pipedream", - frameworkVersion: packageJson.version, + frameworkVersion, }); + return this._cachedClient; },
103-176
: Style nit: drop redundantawait
inreturn await client.*
methods.
return await
adds no value here and slightly harms stack traces. Consider returning the promise directly across these methods.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
components/airweave/airweave.app.mjs
(1 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
components/airweave/airweave.app.mjs (1)
components/airweave/actions/search-collection/search-collection.mjs (1)
params
(56-60)
🪛 Biome (2.1.2)
components/airweave/airweave.app.mjs
[error] 2-2: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
[error] 2-2: Expected a semicolon or an implicit semicolon after a statement, but found none
An explicit or implicit semicolon is expected here...
...Which is required to end this statement
(parse)
🔇 Additional comments (1)
components/airweave/airweave.app.mjs (1)
55-68
: No action required –offset
prop is properly defined.The
offset
prop is defined in the search-collection action (lines 40–42) with type "integer" and label "Offset", and is correctly used viathis.offset
at line 59. The prop is appropriately defined within the action itself rather than the main app's shared propDefinitions, which is a valid pattern.
Overview
Adds integration for Airweave, an open-source platform that makes any app searchable for agents by syncing data from various sources with minimal configuration.
What's Added
App Configuration
Actions (7 total)
Collections
Search Collection - Semantic and keyword search across all data sources in a collection
List Collections - Get all collections with pagination
Create Collection - Create new collection with name and readable ID
Get Collection - Retrieve specific collection details
Delete Collection - Remove collection with confirmation safety check
Sources & Syncing
List Sources - View all available data source connectors
Trigger Sync - Manually trigger data synchronization for source connections
Authentication
Uses API key authentication:
https://api.airweave.ai
)Example Use Cases
Dependencies
@airweave/sdk@^0.1.50
- Official Airweave TypeScript SDK@pipedream/platform@^3.0.3
- Pipedream platform utilitiesTesting
Tested manually in Pipedream workflows:
Documentation
Links
Summary by CodeRabbit
New Features
Documentation