feat: add Adanos market sentiment integration#5766
Conversation
|
@alexander-schneider is attempting to deploy a commit to the Sim Team on Vercel. A member of the Team first needs to authorize it. |
PR SummaryLow Risk Overview Four read-only tools call The Adanos block uses a per-workflow API key ( Reviewed by Cursor Bugbot for commit a779887. Bugbot is set up for automated code reviews on this repo. Configure here. |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit ba05df8. Configure here.
Greptile SummaryThis PR adds a native Adanos integration for read-only stock and crypto market sentiment data, following the existing block and tool patterns closely. The API key is correctly scoped as
Confidence Score: 4/5Safe to merge; all four operations work correctly end-to-end and the single comment is a UX cosmetic issue in the block's source dropdown. The integration is self-contained and additive. All normalization logic is well-tested, the API key is handled correctly, and no existing paths are modified. The only rough edge is that the "Stock Source" dropdown remains visible and selectable when a user chooses a crypto-based operation in the Trending or Market Sentiment modes, but the selection is silently overridden to Reddit — the output is still correct, just potentially confusing in the UI. apps/sim/blocks/blocks/adanos.ts — the source sub-block condition should account for the selected assetType to avoid showing stock-specific options to crypto users. Important Files Changed
Sequence Diagram%%{init: {'theme': 'neutral'}}%%
sequenceDiagram
participant User as User / Block UI
participant Block as AdanosBlock (adanos.ts)
participant Registry as Tool Registry
participant Utils as utils.ts
participant API as api.adanos.org
User->>Block: set operation, apiKey, params
Block->>Registry: "config.tool(params) → adanos_{operation}"
Block->>Registry: config.params(params) → normalized params
Registry->>Utils: getAdanosBasePath(assetType, source)
Utils-->>Registry: /reddit/crypto/v1 or /source/stocks/v1
Registry->>Utils: buildAdanosUrl(path, dateRange, limit?)
Utils-->>Registry: validated URL string
Registry->>API: GET url + X-API-Key header
API-->>Registry: JSON response
Registry->>Utils: readAdanosResponse(response)
Utils-->>Registry: parsed data or throws on error
Registry->>Utils: normalizeAsset / normalizeDriver / getActivityCount
Utils-->>Registry: normalized output object
Registry-->>Block: "{ success: true, output: {...} }"
Block-->>User: typed outputs (activityCount, sentimentScore, etc.)
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
sequenceDiagram
participant User as User / Block UI
participant Block as AdanosBlock (adanos.ts)
participant Registry as Tool Registry
participant Utils as utils.ts
participant API as api.adanos.org
User->>Block: set operation, apiKey, params
Block->>Registry: "config.tool(params) → adanos_{operation}"
Block->>Registry: config.params(params) → normalized params
Registry->>Utils: getAdanosBasePath(assetType, source)
Utils-->>Registry: /reddit/crypto/v1 or /source/stocks/v1
Registry->>Utils: buildAdanosUrl(path, dateRange, limit?)
Utils-->>Registry: validated URL string
Registry->>API: GET url + X-API-Key header
API-->>Registry: JSON response
Registry->>Utils: readAdanosResponse(response)
Utils-->>Registry: parsed data or throws on error
Registry->>Utils: normalizeAsset / normalizeDriver / getActivityCount
Utils-->>Registry: normalized output object
Registry-->>Block: "{ success: true, output: {...} }"
Block-->>User: typed outputs (activityCount, sentimentScore, etc.)
Reviews (1): Last reviewed commit: "feat: add Adanos market sentiment integr..." | Re-trigger Greptile |
|
Addressed the review findings in
Verification:
|

Summary
Adds a native, optional Adanos integration for source-specific stock and crypto market sentiment.
user-onlyparameter so account plan and usage limits remain isolatedactivityCountwhile retaining the source in every responseI maintain Adanos. The integration is optional and does not configure a hosted/shared credential.
Fixes #5765
Type of Change
Testing
NEXT_PUBLIC_APP_URL=http://localhost:3000 bun run test(1,039 files, 13,331 tests passed)bun test apps/sim/tools/adanos/adanos.test.ts(9 passed)bun run lint:checkbun run check:api-validationbun run check:bare-iconscd apps/sim && bun run type-checkbun run scripts/generate-docs.tsThe root type-check reaches the docs package and reports an existing AI SDK/Zod mismatch in
apps/docs/app/api/chat/route.ts; the Sim app type-check passes and this PR does not modify that route.Reviewer focus: endpoint routing by source/asset type, the per-user API-key flow, and the normalized output contract.
Checklist
Screenshots/Videos
Not included; this adds a standard integration block using the existing Sim block UI.