-
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
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:
|
WalkthroughAdds an Airweave integration comprising a new app module (Airweave SDK client, propDefinitions, and API methods), 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 (client.collections / client.sourceConnections / client.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 Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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.
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: 2
♻️ Duplicate comments (2)
components/airweave/airweave.app.mjs (2)
17-25
: End pagination when no more collections are returned.Empty pages currently repeat forever because
context.skip
doesn’t advance whencollections.length === 0
. Return no context when there are no options.- 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, + };
43-51
: Terminate pagination for source connections on empty page.Same issue: empty results loop indefinitely. Omit
context
when there are no options.- 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)
86-176
: Add concise JSDoc for public methods.Document params and returns for app methods to align with Pipedream component guidelines.
As per coding guidelines.
93-100
: Optional: avoid version drift.Define a single
const FRAMEWORK_VERSION = "0.1.0"
(or read from package.json) and reuse it in_client()
.
11-53
: Optional: DRY pagination return logic.Extract a tiny helper to build
{ options, context }
to reuse across option builders.+ methods: { + _optionsPage(options, skip, pageSize) { + return { + options, + context: options.length ? { skip: skip + options.length } : undefined, + }; + }, - async options({ prevContext }) { + async options({ prevContext }) { const params = { skip: prevContext?.skip || 0, limit: 50, }; const collections = await this.listCollections(params); - 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((c) => ({ + label: c.name || c.readable_id, + value: c.readable_id, + })); + return this._optionsPage(options, params.skip, params.limit); },
📜 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 (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)
🔇 Additional comments (2)
components/airweave/airweave.app.mjs (2)
39-41
: Code is correct;params.collection
is the verified parameter name.The query parameter named "collection" filters by the collection's readable ID, which matches the implementation in the code.
12-15
: Code is correct—no changes needed.The Airweave SDK methods
collections.list
andsourceConnections.list
both acceptskip
andlimit
parameters. The pagination implementation in the code matches the SDK contract exactly.
_client() { | ||
return new AirweaveSDKClient({ | ||
apiKey: this._apiKey(), | ||
baseUrl: this._baseUrl(), | ||
frameworkName: "pipedream", | ||
frameworkVersion: "0.1.0", | ||
}); | ||
}, |
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.
🧩 Analysis chain
Confirm telemetry/headers are actually set via SDK options.
Check that frameworkName
/frameworkVersion
propagate to request headers for partner identification. If not, add explicit custom headers if supported.
🌐 Web query:
Does `AirweaveSDKClient` accept `frameworkName` and `frameworkVersion` and forward them as HTTP headers? If not, what option enables setting custom headers?
💡 Result:
I can't find authoritative docs for an "AirweaveSDKClient". Can you share a link (repo or docs) or paste the code/signature you mean? Once I have that I’ll check whether it sends frameworkName/frameworkVersion as headers and — if not — which option lets you add custom headers.
---
🏁 Script executed:
```shell
#!/bin/bash
# Find where AirweaveSDKClient is imported from
echo "=== Searching for AirweaveSDKClient import ==="
rg -n "AirweaveSDKClient" --type=mjs --type=js -B2 -A2
echo ""
echo "=== Checking package.json for airweave dependencies ==="
fd "package.json" | xargs grep -l -i "airweave" 2>/dev/null || echo "No airweave in package.json"
echo ""
echo "=== Full package.json to see all dependencies ==="
find . -maxdepth 2 -name "package.json" -type f | head -1 | xargs cat
Length of output: 1051
---
🏁 Script executed:
```shell
#!/bin/bash
# Search for AirweaveSDKClient without type restriction
echo "=== Searching for AirweaveSDKClient ==="
rg -n "AirweaveSDKClient" -B3 -A3
echo ""
echo "=== Check components/airweave/package.json ==="
cat components/airweave/package.json
echo ""
echo "=== Check imports at top of airweave.app.mjs ==="
head -30 components/airweave/airweave.app.mjs
Length of output: 2348
🌐 Web query:
@airweave/sdk npm frameworkName frameworkVersion headers
💡 Result:
Use the request-level headers
option on SDK calls. Example (TS):
await client.collections.create(
{ name: "Example" },
{
headers: {
"X-Framework-Name": "my-framework",
"X-Framework-Version": "1.2.3",
// any other headers
"X-Custom-Header": "value"
}
}
);
The SDK docs show the headers
request option for adding extra headers, and the API docs list standard headers (e.g., X-API-Key / X-Organization-ID) the backend accepts. [1][2]
Sources:
- @airweave/sdk README (Additional Headers). [1]
- Airweave API reference (headers). [2]
---
🏁 Script executed:
```shell
#!/bin/bash
# Find all SDK method calls to see how client is being used
echo "=== SDK method calls in airweave.app.mjs ==="
rg -n "this\._client\(\)" components/airweave/airweave.app.mjs -A5 -B1
echo ""
echo "=== Check for any 'headers' usage in the component ==="
rg -n "headers" components/airweave/airweave.app.mjs
echo ""
echo "=== List all methods that use this._client() ==="
rg -n "this\._client\(\)\." components/airweave/airweave.app.mjs
Length of output: 3343
Add framework telemetry headers to SDK method calls.
The frameworkName
and frameworkVersion
passed to the constructor are not forwarded as HTTP headers by the SDK. Custom headers must be passed via a request-level headers
option on individual SDK calls. Modify each SDK method (lines 104–174) to include framework headers, e.g.:
return await client.collections.list(params, {
headers: {
"X-Framework-Name": "pipedream",
"X-Framework-Version": "0.1.0",
}
});
🤖 Prompt for AI Agents
In components/airweave/airweave.app.mjs around lines 93–174, the SDK
constructor's frameworkName and frameworkVersion are not automatically sent as
HTTP headers; update each SDK call in the methods between ~104–174 to pass a
request-level headers option that includes "X-Framework-Name": "pipedream" and
"X-Framework-Version": "0.1.0". For every client.* call, add the third-argument
(or second if no params) options object with the headers map, preserving
existing params and options, e.g., call client.method(params, { headers: {
"X-Framework-Name": "pipedream", "X-Framework-Version": "0.1.0" } }) so the
telemetry is forwarded on each request.
async getSource(shortName) { | ||
const client = this._client(); | ||
return await client.sources.read(shortName); |
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.
🧩 Analysis chain
Confirm method name sources.read
.
Validate that the SDK exposes client.sources.read(shortName)
(not get
or retrieve
).
🌐 Web query:
Airweave TS SDK Sources API: is the method to fetch a source by short name called `read`, `get`, or something else?
💡 Result:
Use client.sources.get(short_name) for the simple GET /sources/:short_name endpoint. There's also a separate detailed endpoint exposed as read/read_source for GET /sources/detail/:short_name. [1][2]
Sources:
- GET /sources/:short_name — example: client.sources.get(...). [1]
- GET /sources/detail/:short_name — example: client.sources.read_source(...). [2]
Change client.sources.read(shortName)
to client.sources.get(shortName)
.
The SDK uses client.sources.get(short_name)
for the GET /sources/:short_name
endpoint. The method read_source
is for a different endpoint.
🤖 Prompt for AI Agents
In components/airweave/airweave.app.mjs around lines 172 to 174, the code calls
client.sources.read(shortName) which is the wrong SDK method for the GET
/sources/:short_name endpoint; change the call to client.sources.get(shortName)
so the correct SDK method is used and return that result (preserve async/await
behavior).
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
Chores