feat(strale): add Strale — 290+ quality-tested data capabilities#20584
feat(strale): add Strale — 290+ quality-tested data capabilities#20584petterlindstrom79 wants to merge 5 commits intoPipedreamHQ:masterfrom
Conversation
Adds Strale integration with 3 actions: - Search Capabilities: find matching capabilities via natural language - Execute Capability: run a specific capability by slug - Search and Execute: find + run in one step Strale provides 290+ quality-tested data capabilities for AI agents: company verification across 20 countries, sanctions screening, VAT validation, invoice extraction, and more. Every response includes a quality score (SQS) and audit trail. 5 free capabilities work without an API key. https://strale.dev
|
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:
|
📝 WalkthroughWalkthroughAdds a Strale integration: a new app module implementing API requests and three actions — Search Capabilities, Execute Capability, and Search and Execute — to suggest capabilities, and run executions with optional inputs, max price, and dry-run support. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Action as Search & Execute Action
participant StraleApp as Strale App
participant API as Strale API
User->>Action: run(task, inputs?, maxPriceCents?, dryRun?)
Action->>StraleApp: execute({ task, inputs?, max_price_cents?, dry_run? })
StraleApp->>API: POST /v1/do
API-->>StraleApp: execution response
StraleApp-->>Action: response
alt dry run
Action-->>User: summary (dry run completed, matched capability slug)
else executed
Action-->>User: summary (executed, transaction id or "n/a")
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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.
Actionable comments posted: 7
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@components/strale/actions/execute-capability/execute-capability.mjs`:
- Around line 42-44: The current truthy check on this.maxPriceCents drops valid
zero values; change the guard to an explicit undefined check (e.g., if
(this.maxPriceCents !== undefined) ) before assigning data.max_price_cents =
this.maxPriceCents so that 0 is preserved and only truly absent values are
omitted (axios will strip undefined). Locate the snippet using the
this.maxPriceCents reference and update the conditional accordingly.
- Around line 3-9: The exported action object (name "Execute Capability", key
"strale-execute-capability") is missing required annotations; add an annotations
property to the default export with openWorldHint: true, readOnlyHint: false,
and destructiveHint: false so the action correctly signals external execution
semantics; place the annotations object alongside
name/version/key/description/type/props in the exported object.
In `@components/strale/actions/search-and-execute/search-and-execute.mjs`:
- Around line 3-9: The action export default object is missing required
annotations; update the action definition (the exported default object in
search-and-execute.mjs) to include an annotations property with openWorldHint:
true, readOnlyHint: false, and destructiveHint: false so the action correctly
advertises it calls external APIs and can execute capabilities; add the
annotations key at the top-level of the exported object alongside
name/version/key/description/type/props.
- Around line 66-68: The current truthy check on this.maxPriceCents omits a
valid 0 value when building data.max_price_cents; change the condition to detect
undefined instead (e.g., check typeof this.maxPriceCents !== 'undefined' or
this.hasOwnProperty('maxPriceCents') ) and assign data.max_price_cents =
this.maxPriceCents so zero is preserved (rely on axios to strip undefined).
In `@components/strale/actions/search-capabilities/search-capabilities.mjs`:
- Around line 3-9: The exported action object (the default export) is missing
the required annotations block; add an annotations property to the exported
object containing openWorldHint: true, readOnlyHint: true, and destructiveHint:
false so the "Search Capabilities" action is correctly annotated for an external
search/read operation.
In `@components/strale/strale.app.mjs`:
- Around line 18-22: The inputs property lacks a concrete inline JSON example in
its description; update the inputs.description string inside the inputs object
to include a short, concrete JSON example showing expected field names and types
(for example a minimal payload with a "query" string and a numeric "limit" or
"max_results" option and any required nested fields) so callers know the exact
structure and types expected when invoking the capability.
- Around line 61-68: In _makeRequest, avoid allowing callers to overwrite auth
headers by destructuring incoming args to pull out any custom headers (e.g.
const { headers: customHeaders = {}, ...rest } = args) and then merge them with
the standard headers returned by this._headers() so the auth headers take
precedence (headers: { ...customHeaders, ...this._headers() }), then spread the
remaining rest into the axios call; update the axios call in _makeRequest to use
this merged headers object instead of spreading ...args after headers.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 66bc3b26-6f07-4db6-806b-64a535165a7a
📒 Files selected for processing (5)
components/strale/actions/execute-capability/execute-capability.mjscomponents/strale/actions/search-and-execute/search-and-execute.mjscomponents/strale/actions/search-capabilities/search-capabilities.mjscomponents/strale/package.jsoncomponents/strale/strale.app.mjs
|
Hi @petterlindstrom79, thank you for your contribution. Since Strale isn't yet integrated in Pipedream, could you submit an app request for it? Once that's done and it's integrated, I'll be able to review and test this PR. |
|
Hi @michelle0927 — thanks for the feedback. I've filed an app request issue: #20611. Happy to wait for integration approval before this PR can be reviewed, or to adjust the component scope based on your team's guidelines. Let me know how you'd like to proceed. |
|
Strale base integration is ready |
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
components/strale/strale.app.mjs (1)
60-67:⚠️ Potential issue | 🟠 MajorPreserve auth headers when callers pass custom headers.
Because
...argsis spread afterheaders, any caller-suppliedheadersobject replaces the defaultAuthorization/Content-Typeheaders instead of merging with them.Suggested fix
_makeRequest({ - $ = this, path, ...args + $ = this, path, headers = {}, ...args }) { return axios($, { url: `${this._baseUrl()}${path}`, - headers: this._headers(), ...args, + headers: { + ...headers, + ...this._headers(), + }, }); },As per coding guidelines, "Custom headers in
_makeRequest()should be destructured separately from other request options so callers can pass per-request headers that merge with standard auth headers without clobbering them."🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@components/strale/strale.app.mjs` around lines 60 - 67, The _makeRequest method currently spreads ...args after setting headers which allows caller-supplied headers to overwrite default auth headers; modify _makeRequest to destructure headers from the incoming args (e.g., _makeRequest({ $ = this, path, headers: customHeaders = {}, ...rest }) ) and then call axios with headers: { ...this._headers(), ...customHeaders } and spread the remaining rest options into the axios call so default Authorization/Content-Type are preserved while allowing per-request header overrides; update the axios invocation to use the merged headers and rest variables (keep references to _makeRequest, _headers(), and axios when making the change).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@components/strale/actions/search-and-execute/search-and-execute.mjs`:
- Line 7: Update the description string in the search-and-execute action to
follow the structured format: one clear primary-purpose sentence stating this
action both finds the best-matching capability and runs it in one step; a brief
"when to use" line explaining to choose this action when the user wants
automatic capability selection + immediate execution (vs using **Search
Capabilities** to just discover options or **Execute Capability** to run a known
capability); a short parameters note (e.g., what the main input prompt and
optional context/filters expect with an inline example), a one-line
common-gotchas note (e.g., potential ambiguous matches and how to provide more
context), and keep the existing documentation link; make these changes inside
the description field in search-and-execute.mjs so the tool text contrasts
clearly with the other Strale actions.
In `@components/strale/strale.app.mjs`:
- Around line 30-34: The shared prop definition maxPriceCents is currently
required but should be optional since it's reused by both execution actions;
update the maxPriceCents prop object (the property named "maxPriceCents") to
include optional: true so consumers can omit a price ceiling, keeping the
existing type/label/description intact; ensure any callers that assume presence
handle undefined or use a default where needed (e.g., in functions referencing
maxPriceCents).
---
Duplicate comments:
In `@components/strale/strale.app.mjs`:
- Around line 60-67: The _makeRequest method currently spreads ...args after
setting headers which allows caller-supplied headers to overwrite default auth
headers; modify _makeRequest to destructure headers from the incoming args
(e.g., _makeRequest({ $ = this, path, headers: customHeaders = {}, ...rest }) )
and then call axios with headers: { ...this._headers(), ...customHeaders } and
spread the remaining rest options into the axios call so default
Authorization/Content-Type are preserved while allowing per-request header
overrides; update the axios invocation to use the merged headers and rest
variables (keep references to _makeRequest, _headers(), and axios when making
the change).
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 35239aa3-8333-4a57-abce-a4a6fcff2db4
📒 Files selected for processing (4)
components/strale/actions/execute-capability/execute-capability.mjscomponents/strale/actions/search-and-execute/search-and-execute.mjscomponents/strale/actions/search-capabilities/search-capabilities.mjscomponents/strale/strale.app.mjs
There was a problem hiding this comment.
Actionable comments posted: 2
♻️ Duplicate comments (1)
components/strale/actions/search-and-execute/search-and-execute.mjs (1)
7-7: 🧹 Nitpick | 🔵 TrivialImprove action description for agent routing clarity.
Line 7 still reads as a generic endpoint summary. Please make it explicit when to use this action vs Search Capabilities and Execute Capability, include one concrete JSON input example, and end with a docs URL (
https://strale.dev/docs) instead of the homepage.As per coding guidelines, component descriptions should include purpose/when-to-use/cross-tool guidance, example formats, and end with
[See the documentation](https://...).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@components/strale/actions/search-and-execute/search-and-execute.mjs` at line 7, Update the description string for the Search-and-Execute action (the "description" field in search-and-execute.mjs) to explicitly state purpose and routing: when to use this combined action versus using the separate "Search Capabilities" and "Execute Capability" actions, include one concrete JSON input example showing the expected request payload (e.g., {"query":"...","context":{...},"executeOptions":{...}}) and finish the sentence with the documentation link https://strale.dev/docs; keep the wording concise and follow the component guideline to include purpose/when-to-use/cross-tool guidance, example format, and the docs URL.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@components/strale/actions/execute-capability/execute-capability.mjs`:
- Line 7: Update the description string in the execute-capability component so
the embedded documentation link points to the docs endpoint instead of the site
root: change the URL in the description value (the string containing "Execute a
specific Strale capability... [See the documentation](https://strale.dev)") to
use "https://strale.dev/docs" so the component's description links directly to
the documentation.
In `@components/strale/actions/search-and-execute/search-and-execute.mjs`:
- Around line 49-56: The dry-run branch sets data.dry_run and calls
this.strale.execute but the $.export("$summary", ...) only mentions the task and
omits the key result (transaction id) — update the dry-run path in run() to
extract the transaction id (or equivalent key) from the response returned by
this.strale.execute and include it in the one-line summary passed to
$.export("$summary", ...) so it matches the non-dry-run branch's behavior;
reference this.dryRun, data.dry_run, this.strale.execute, and
$.export("$summary", ...) when making the change.
---
Duplicate comments:
In `@components/strale/actions/search-and-execute/search-and-execute.mjs`:
- Line 7: Update the description string for the Search-and-Execute action (the
"description" field in search-and-execute.mjs) to explicitly state purpose and
routing: when to use this combined action versus using the separate "Search
Capabilities" and "Execute Capability" actions, include one concrete JSON input
example showing the expected request payload (e.g.,
{"query":"...","context":{...},"executeOptions":{...}}) and finish the sentence
with the documentation link https://strale.dev/docs; keep the wording concise
and follow the component guideline to include purpose/when-to-use/cross-tool
guidance, example format, and the docs URL.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: 803a23b3-03ee-4d6b-96bb-6cf208e2a02b
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (2)
components/strale/actions/execute-capability/execute-capability.mjscomponents/strale/actions/search-and-execute/search-and-execute.mjs
michelle0927
left a comment
There was a problem hiding this comment.
Hi @petterlindstrom79. I've made some updates and tested. I'm able to execute search-capabilities, and I'm able to successfully execute execute-capability and search-and-execute when the "Dry Run" prop is true. However, when "Dry Run" is set to false, I'm getting an internal server error.
Summary
Adds Strale integration with 3 actions for accessing 290+ quality-tested data capabilities: company verification across 20 countries, sanctions screening, VAT validation, invoice extraction, and more.
Actions:
Every response includes a quality score (SQS) and transaction ID for audit trails. 5 free capabilities work without an API key.
Files added
Links
Summary by CodeRabbit
New Features
Chores