Compare commits

...

21 Commits

Author SHA1 Message Date
Waleed
e157ce5fbc v0.5.16: MCP fixes, code refactors, jira fixes, new mistral models 2025-12-02 22:02:11 -08:00
Vikhyath Mondreti
7de721e090 fix(logs): logging with error issues for model costs (#2169)
* fix(async-execution): restore async executions

* fix schedules trace span collection'

* fix execution trace spans for schedules + cost tracking when workflow errors
2025-12-02 20:54:17 -08:00
Waleed
3e83fb398c fix(trace-spans): fix input/output token count in trace spans (#2168) 2025-12-02 20:36:16 -08:00
Waleed
a6e3c92c10 fix(jira): fixed incorrect dependsOn for jira project/issue subblcks (#2167) 2025-12-02 20:18:01 -08:00
Vikhyath Mondreti
9670d96eca fix(templates-page): loading issue due to loading extensive workflow block in preview for all listings (#2166)
* fix(templates-page): loading issue due to loading extensive workflow block in preview for all listings

* add more properties
2025-12-02 19:47:48 -08:00
Waleed
eb0d4cbd57 fix(templates): fixed verified creator status displaying & tooltip on templates (#2165) 2025-12-02 19:23:35 -08:00
Waleed
ffd12e1da4 fix(subblocks): update guardrails pii selector component to use emcn (#2164) 2025-12-02 18:36:34 -08:00
Waleed
84c2335a37 feat(i18n): update translations (#2163)
Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-02 16:37:30 -08:00
Waleed
2ab8cec8c3 fix(icons): fix mailgun, restore tts and smtp blocks (#2162)
* fix(icons): fix mailgun

* register smtp block that was missing
2025-12-02 16:21:43 -08:00
Waleed
bf54c88ae4 feat(models): added xai models and updated gemini pricing (#2161) 2025-12-02 14:31:23 -08:00
Waleed
41c068c023 improvement(lib): refactored lib/ to be more aligned with queries and api directory (#2160)
* fix(lib): consolidate into core dir in lib/

* refactored lib/
2025-12-02 14:17:41 -08:00
Waleed
6fda9bd72e feat(models): added latest mistral models (#2159) 2025-12-02 13:46:00 -08:00
Waleed
3b4f227e43 fix(mcp): reuse sessionID for consecutive MCP tool calls, fix dynamic args clearing, fix refreshing tools on save (#2158)
* fix(mcp): reuse sessionID for consecutive MCP tool calls, fix dynamic args clearing, fix refreshing tools on save

* prevent defaults

* fix subblock text area

* added placeholders in tool-inp for mcp dynamic args

* ack PR comments
2025-12-02 12:37:59 -08:00
Siddharth Ganesan
0ae7eb197a improvement(agent): switch default model to claude 4.5 sonnet (#2156)
* Switch default model to claude 4.5 sonnet

* Fix defaults

* Switch back to medium
2025-12-01 18:34:46 -08:00
Waleed
304b5d9c7e feat(i18n): update translations (#2153)
* feat(i18n): update translations

* fix build

---------

Co-authored-by: waleedlatif1 <waleedlatif1@users.noreply.github.com>
2025-12-01 15:15:13 -08:00
Waleed
ee3e1e8cf9 fix(docs): update docs to background instead of backgroundColor (#2154) 2025-12-01 14:16:23 -08:00
Vikhyath Mondreti
774e5d585c v0.5.15: add tools, revert subblock prop change 2025-12-01 13:52:12 -08:00
Vikhyath Mondreti
ede41af674 fix(selector): remove subblock state prop for subblock component (#2151) 2025-12-01 13:46:32 -08:00
Waleed
cb0c55c6f6 feat(tools): added rds, dynamodb, background color gradient (#2150)
* feat(tools): added rds tools/block

* feat(tools): added rds, dynamodb, background color gradient

* changed conditions for WHERE condition to be json conditions instead of raw string
2025-12-01 13:42:05 -08:00
Vikhyath Mondreti
54cc93743f v0.5.14: fix issue with teams, google selectors + cleanup code 2025-12-01 12:39:39 -08:00
Vikhyath Mondreti
d22b21c8d1 improvement(selectors): make serviceId sole source of truth (#2128)
* improvement(serviceId): make serviceId sole source of truth

* incorrect gmail service id

* fix teams selectors

* fix linkedin
2025-12-01 12:33:26 -08:00
838 changed files with 8757 additions and 2669 deletions

File diff suppressed because one or more lines are too long

View File

@@ -24,7 +24,7 @@ export function BlockInfoCard({
<div className='flex items-center justify-center p-6'>
<div
className='flex h-20 w-20 items-center justify-center rounded-lg'
style={{ backgroundColor: color }}
style={{ background: color }}
>
{ResolvedIcon ? (
<ResolvedIcon className='h-10 w-10 text-white' />

View File

@@ -16,6 +16,7 @@ import {
ConfluenceIcon,
DiscordIcon,
DocumentIcon,
DynamoDBIcon,
ElevenLabsIcon,
ExaAIIcon,
EyeIcon,
@@ -64,6 +65,7 @@ import {
PosthogIcon,
PylonIcon,
QdrantIcon,
RDSIcon,
RedditIcon,
ResendIcon,
S3Icon,
@@ -134,6 +136,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
s3: S3Icon,
resend: ResendIcon,
reddit: RedditIcon,
rds: RDSIcon,
qdrant: QdrantIcon,
pylon: PylonIcon,
posthog: PosthogIcon,
@@ -182,6 +185,7 @@ export const blockTypeToIconMap: Record<string, IconComponent> = {
file: DocumentIcon,
exa: ExaAIIcon,
elevenlabs: ElevenLabsIcon,
dynamodb: DynamoDBIcon,
discord: DiscordIcon,
confluence: ConfluenceIcon,
clay: ClayIcon,

View File

@@ -0,0 +1,188 @@
---
title: Amazon DynamoDB
description: Verbindung zu Amazon DynamoDB
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="dynamodb"
color="linear-gradient(45deg, #2E27AD 0%, #527FFF 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}
[Amazon DynamoDB](https://aws.amazon.com/dynamodb/) ist ein vollständig verwalteter NoSQL-Datenbankdienst von AWS, der schnelle und vorhersehbare Leistung mit nahtloser Skalierbarkeit bietet. Mit DynamoDB können Sie beliebige Datenmengen speichern und abrufen und jede Art von Anforderungsverkehr bedienen, ohne dass Sie Hardware oder Infrastruktur verwalten müssen.
Mit DynamoDB können Sie:
- **Elemente abrufen**: Elemente in Ihren Tabellen mithilfe von Primärschlüsseln nachschlagen
- **Elemente einfügen**: Elemente in Ihren Tabellen hinzufügen oder ersetzen
- **Elemente abfragen**: Mehrere Elemente mithilfe von Abfragen über Indizes abrufen
- **Tabellen scannen**: Alle oder einen Teil der Daten in einer Tabelle lesen
- **Elemente aktualisieren**: Bestimmte Attribute vorhandener Elemente ändern
- **Elemente löschen**: Datensätze aus Ihren Tabellen entfernen
In Sim ermöglicht die DynamoDB-Integration Ihren Agenten den sicheren Zugriff auf DynamoDB-Tabellen und deren Manipulation mithilfe von AWS-Anmeldeinformationen. Zu den unterstützten Operationen gehören:
- **Get**: Ein Element anhand seines Schlüssels abrufen
- **Put**: Elemente einfügen oder überschreiben
- **Query**: Abfragen mit Schlüsselbedingungen und Filtern ausführen
- **Scan**: Mehrere Elemente durch Scannen der Tabelle oder des Index lesen
- **Update**: Bestimmte Attribute eines oder mehrerer Elemente ändern
- **Delete**: Ein Element aus einer Tabelle entfernen
Diese Integration ermöglicht es Sim-Agenten, Datenverwaltungsaufgaben innerhalb Ihrer DynamoDB-Tabellen programmatisch zu automatisieren, sodass Sie Workflows erstellen können, die skalierbare NoSQL-Daten ohne manuellen Aufwand oder Serververwaltung verwalten, ändern und abrufen.
{/* MANUAL-CONTENT-END */}
## Nutzungsanweisungen
Integrieren Sie Amazon DynamoDB in Workflows. Unterstützt Get-, Put-, Query-, Scan-, Update- und Delete-Operationen auf DynamoDB-Tabellen.
## Tools
### `dynamodb_get`
Ein Element aus einer DynamoDB-Tabelle anhand des Primärschlüssels abrufen
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `region` | string | Ja | AWS-Region (z.B. us-east-1) |
| `accessKeyId` | string | Ja | AWS-Zugriffsschlüssel-ID |
| `secretAccessKey` | string | Ja | AWS-Geheimzugriffsschlüssel |
| `tableName` | string | Ja | DynamoDB-Tabellenname |
| `key` | object | Ja | Primärschlüssel des abzurufenden Elements |
| `consistentRead` | boolean | Nein | Stark konsistentes Lesen verwenden |
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `message` | string | Statusmeldung der Operation |
| `item` | object | Abgerufenes Element |
### `dynamodb_put`
Ein Element in eine DynamoDB-Tabelle einfügen
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `region` | string | Ja | AWS-Region (z.B. us-east-1) |
| `accessKeyId` | string | Ja | AWS-Zugriffsschlüssel-ID |
| `secretAccessKey` | string | Ja | AWS-Geheimzugriffsschlüssel |
| `tableName` | string | Ja | DynamoDB-Tabellenname |
| `item` | object | Ja | Element, das in die Tabelle eingefügt werden soll |
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `message` | string | Statusmeldung der Operation |
| `item` | object | Erstelltes Element |
### `dynamodb_query`
Abfrage von Elementen aus einer DynamoDB-Tabelle mit Schlüsselbedingungen
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `region` | string | Ja | AWS-Region (z.B. us-east-1) |
| `accessKeyId` | string | Ja | AWS-Zugriffsschlüssel-ID |
| `secretAccessKey` | string | Ja | AWS-Geheimzugriffsschlüssel |
| `tableName` | string | Ja | DynamoDB-Tabellenname |
| `keyConditionExpression` | string | Ja | Schlüsselbedingungsausdruck (z.B. "pk = :pk") |
| `filterExpression` | string | Nein | Filterausdruck für Ergebnisse |
| `expressionAttributeNames` | object | Nein | Attributnamenzuordnungen für reservierte Wörter |
| `expressionAttributeValues` | object | Nein | Ausdrucksattributwerte |
| `indexName` | string | Nein | Name des sekundären Index für die Abfrage |
| `limit` | number | Nein | Maximale Anzahl der zurückzugebenden Elemente |
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `message` | string | Statusmeldung der Operation |
| `items` | array | Array der zurückgegebenen Elemente |
| `count` | number | Anzahl der zurückgegebenen Elemente |
### `dynamodb_scan`
Alle Elemente in einer DynamoDB-Tabelle scannen
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `region` | string | Ja | AWS-Region (z.B. us-east-1) |
| `accessKeyId` | string | Ja | AWS-Zugriffsschlüssel-ID |
| `secretAccessKey` | string | Ja | AWS-Geheimzugriffsschlüssel |
| `tableName` | string | Ja | DynamoDB-Tabellenname |
| `filterExpression` | string | Nein | Filterausdruck für Ergebnisse |
| `projectionExpression` | string | Nein | Abzurufende Attribute |
| `expressionAttributeNames` | object | Nein | Attributnamenzuordnungen für reservierte Wörter |
| `expressionAttributeValues` | object | Nein | Ausdrucksattributwerte |
| `limit` | number | Nein | Maximale Anzahl der zurückzugebenden Elemente |
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `message` | string | Statusmeldung der Operation |
| `items` | array | Array der zurückgegebenen Elemente |
| `count` | number | Anzahl der zurückgegebenen Elemente |
### `dynamodb_update`
Ein Element in einer DynamoDB-Tabelle aktualisieren
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `region` | string | Ja | AWS-Region (z.B. us-east-1) |
| `accessKeyId` | string | Ja | AWS-Zugriffsschlüssel-ID |
| `secretAccessKey` | string | Ja | AWS-Geheimzugriffsschlüssel |
| `tableName` | string | Ja | Name der DynamoDB-Tabelle |
| `key` | object | Ja | Primärschlüssel des zu aktualisierenden Elements |
| `updateExpression` | string | Ja | Aktualisierungsausdruck (z.B. "SET #name = :name") |
| `expressionAttributeNames` | object | Nein | Attributnamenzuordnungen für reservierte Wörter |
| `expressionAttributeValues` | object | Nein | Ausdrucksattributwerte |
| `conditionExpression` | string | Nein | Bedingung, die erfüllt sein muss, damit die Aktualisierung erfolgreich ist |
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `message` | string | Statusmeldung der Operation |
| `item` | object | Aktualisiertes Element |
### `dynamodb_delete`
Ein Element aus einer DynamoDB-Tabelle löschen
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `region` | string | Ja | AWS-Region (z.B. us-east-1) |
| `accessKeyId` | string | Ja | AWS-Zugriffsschlüssel-ID |
| `secretAccessKey` | string | Ja | AWS-Geheimzugriffsschlüssel |
| `tableName` | string | Ja | Name der DynamoDB-Tabelle |
| `key` | object | Ja | Primärschlüssel des zu löschenden Elements |
| `conditionExpression` | string | Nein | Bedingung, die erfüllt sein muss, damit das Löschen erfolgreich ist |
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `message` | string | Statusmeldung der Operation |
## Hinweise
- Kategorie: `tools`
- Typ: `dynamodb`

View File

@@ -7,7 +7,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="mailgun"
color="#F06248"
color="#E0E0E0"
/>
{/* MANUAL-CONTENT-START:intro */}

View File

@@ -0,0 +1,168 @@
---
title: Amazon RDS
description: Verbindung zu Amazon RDS über Data API
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="rds"
color="linear-gradient(45deg, #2E27AD 0%, #527FFF 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}
[Amazon RDS Aurora Serverless](https://aws.amazon.com/rds/aurora/serverless/) ist eine vollständig verwaltete relationale Datenbank, die automatisch startet, herunterfährt und ihre Kapazität basierend auf den Anforderungen Ihrer Anwendung skaliert. Sie ermöglicht es Ihnen, SQL-Datenbanken in der Cloud zu betreiben, ohne Datenbankserver verwalten zu müssen.
Mit RDS Aurora Serverless können Sie:
- **Daten abfragen**: Flexible SQL-Abfragen über Ihre Tabellen ausführen
- **Neue Datensätze einfügen**: Automatisch Daten zu Ihrer Datenbank hinzufügen
- **Bestehende Datensätze aktualisieren**: Daten in Ihren Tabellen mit benutzerdefinierten Filtern ändern
- **Datensätze löschen**: Unerwünschte Daten mit präzisen Kriterien entfernen
- **Raw-SQL ausführen**: Jeden gültigen SQL-Befehl ausführen, der von Aurora unterstützt wird
In Sim ermöglicht die RDS-Integration Ihren Agenten, sicher und programmatisch mit Amazon Aurora Serverless-Datenbanken zu arbeiten. Zu den unterstützten Operationen gehören:
- **Abfrage**: SELECT und andere SQL-Abfragen ausführen, um Zeilen aus Ihrer Datenbank abzurufen
- **Einfügen**: Neue Datensätze mit strukturierten Daten in Tabellen einfügen
- **Aktualisieren**: Daten in Zeilen ändern, die Ihren angegebenen Bedingungen entsprechen
- **Löschen**: Datensätze aus einer Tabelle nach benutzerdefinierten Filtern oder Kriterien entfernen
- **Ausführen**: Raw-SQL für fortgeschrittene Szenarien ausführen
Diese Integration ermöglicht es Ihren Agenten, eine breite Palette von Datenbankoperationen ohne manuelle Eingriffe zu automatisieren. Durch die Verbindung von Sim mit Amazon RDS können Sie Agenten erstellen, die relationale Daten innerhalb Ihrer Workflows verwalten, aktualisieren und abrufen alles ohne Datenbankinfrastruktur oder -verbindungen zu verwalten.
{/* MANUAL-CONTENT-END */}
## Nutzungsanweisungen
Integrieren Sie Amazon RDS Aurora Serverless in den Workflow mit der Data API. Kann Daten abfragen, einfügen, aktualisieren, löschen und Raw-SQL ausführen, ohne Datenbankverbindungen verwalten zu müssen.
## Tools
### `rds_query`
Führen Sie eine SELECT-Abfrage auf Amazon RDS mit der Data API aus
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `region` | string | Ja | AWS-Region (z.B. us-east-1) |
| `accessKeyId` | string | Ja | AWS-Zugriffsschlüssel-ID |
| `secretAccessKey` | string | Ja | AWS-Geheimzugriffsschlüssel |
| `resourceArn` | string | Ja | ARN des Aurora-DB-Clusters |
| `secretArn` | string | Ja | ARN des Secrets Manager-Geheimnisses mit DB-Anmeldedaten |
| `database` | string | Nein | Datenbankname (optional) |
| `query` | string | Ja | SQL-SELECT-Abfrage zur Ausführung |
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `message` | string | Statusmeldung der Operation |
| `rows` | array | Array der zurückgegebenen Zeilen aus der Abfrage |
| `rowCount` | number | Anzahl der zurückgegebenen Zeilen |
### `rds_insert`
Daten in eine Amazon RDS-Tabelle mit der Data API einfügen
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `region` | string | Ja | AWS-Region (z.B. us-east-1) |
| `accessKeyId` | string | Ja | AWS-Zugriffsschlüssel-ID |
| `secretAccessKey` | string | Ja | AWS-Geheimzugriffsschlüssel |
| `resourceArn` | string | Ja | ARN des Aurora-DB-Clusters |
| `secretArn` | string | Ja | ARN des Secrets Manager-Geheimnisses mit DB-Anmeldedaten |
| `database` | string | Nein | Datenbankname (optional) |
| `table` | string | Ja | Tabellenname zum Einfügen |
| `data` | object | Ja | Einzufügende Daten als Schlüssel-Wert-Paare |
#### Output
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `message` | string | Statusmeldung der Operation |
| `rows` | array | Array der eingefügten Zeilen |
| `rowCount` | number | Anzahl der eingefügten Zeilen |
### `rds_update`
Daten in einer Amazon RDS-Tabelle über die Data API aktualisieren
#### Input
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `region` | string | Ja | AWS-Region (z.B. us-east-1) |
| `accessKeyId` | string | Ja | AWS-Zugriffsschlüssel-ID |
| `secretAccessKey` | string | Ja | AWS-Geheimzugriffsschlüssel |
| `resourceArn` | string | Ja | ARN des Aurora-DB-Clusters |
| `secretArn` | string | Ja | ARN des Secrets Manager-Geheimnisses mit DB-Anmeldedaten |
| `database` | string | Nein | Datenbankname (optional) |
| `table` | string | Ja | Name der zu aktualisierenden Tabelle |
| `data` | object | Ja | Zu aktualisierende Daten als Schlüssel-Wert-Paare |
| `conditions` | object | Ja | Bedingungen für die Aktualisierung (z.B. `{"id": 1}`) |
#### Output
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `message` | string | Statusmeldung der Operation |
| `rows` | array | Array der aktualisierten Zeilen |
| `rowCount` | number | Anzahl der aktualisierten Zeilen |
### `rds_delete`
Daten aus einer Amazon RDS-Tabelle über die Data API löschen
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `region` | string | Ja | AWS-Region (z.B. us-east-1) |
| `accessKeyId` | string | Ja | AWS-Zugriffsschlüssel-ID |
| `secretAccessKey` | string | Ja | AWS geheimer Zugriffsschlüssel |
| `resourceArn` | string | Ja | ARN des Aurora-DB-Clusters |
| `secretArn` | string | Ja | ARN des Secrets Manager-Geheimnisses mit DB-Anmeldedaten |
| `database` | string | Nein | Datenbankname (optional) |
| `table` | string | Ja | Tabellenname, aus dem gelöscht werden soll |
| `conditions` | object | Ja | Bedingungen für das Löschen (z.B. `{"id": 1}`) |
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `message` | string | Statusmeldung der Operation |
| `rows` | array | Array der gelöschten Zeilen |
| `rowCount` | number | Anzahl der gelöschten Zeilen |
### `rds_execute`
Rohes SQL auf Amazon RDS über die Data API ausführen
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `region` | string | Ja | AWS-Region (z.B. us-east-1) |
| `accessKeyId` | string | Ja | AWS-Zugriffsschlüssel-ID |
| `secretAccessKey` | string | Ja | AWS geheimer Zugriffsschlüssel |
| `resourceArn` | string | Ja | ARN des Aurora-DB-Clusters |
| `secretArn` | string | Ja | ARN des Secrets Manager-Geheimnisses mit DB-Anmeldedaten |
| `database` | string | Nein | Datenbankname (optional) |
| `query` | string | Ja | Rohe SQL-Abfrage zur Ausführung |
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `message` | string | Statusmeldung der Operation |
| `rows` | array | Array der zurückgegebenen oder betroffenen Zeilen |
| `rowCount` | number | Anzahl der betroffenen Zeilen |
## Hinweise
- Kategorie: `tools`
- Typ: `rds`

View File

@@ -7,7 +7,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="s3"
color="#E0E0E0"
color="linear-gradient(45deg, #1B660F 0%, #6CAE3E 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}

View File

@@ -0,0 +1,193 @@
---
title: Amazon DynamoDB
description: Connect to Amazon DynamoDB
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="dynamodb"
color="linear-gradient(45deg, #2E27AD 0%, #527FFF 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}
[Amazon DynamoDB](https://aws.amazon.com/dynamodb/) is a fully managed NoSQL database service offered by AWS that provides fast and predictable performance with seamless scalability. DynamoDB lets you store and retrieve any amount of data and serves any level of request traffic, without the need for you to manage hardware or infrastructure.
With DynamoDB, you can:
- **Get items**: Look up items in your tables using primary keys
- **Put items**: Add or replace items in your tables
- **Query items**: Retrieve multiple items using queries across indexes
- **Scan tables**: Read all or part of the data in a table
- **Update items**: Modify specific attributes of existing items
- **Delete items**: Remove records from your tables
In Sim, the DynamoDB integration enables your agents to securely access and manipulate DynamoDB tables using AWS credentials. Supported operations include:
- **Get**: Retrieve an item by its key
- **Put**: Insert or overwrite items
- **Query**: Run queries using key conditions and filters
- **Scan**: Read multiple items by scanning the table or index
- **Update**: Change specific attributes of one or more items
- **Delete**: Remove an item from a table
This integration empowers Sim agents to automate data management tasks within your DynamoDB tables programmatically, so you can build workflows that manage, modify, and retrieve scalable NoSQL data without manual effort or server management.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Integrate Amazon DynamoDB into workflows. Supports Get, Put, Query, Scan, Update, and Delete operations on DynamoDB tables.
## Tools
### `dynamodb_get`
Get an item from a DynamoDB table by primary key
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `region` | string | Yes | AWS region \(e.g., us-east-1\) |
| `accessKeyId` | string | Yes | AWS access key ID |
| `secretAccessKey` | string | Yes | AWS secret access key |
| `tableName` | string | Yes | DynamoDB table name |
| `key` | object | Yes | Primary key of the item to retrieve |
| `consistentRead` | boolean | No | Use strongly consistent read |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `item` | object | Retrieved item |
### `dynamodb_put`
Put an item into a DynamoDB table
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `region` | string | Yes | AWS region \(e.g., us-east-1\) |
| `accessKeyId` | string | Yes | AWS access key ID |
| `secretAccessKey` | string | Yes | AWS secret access key |
| `tableName` | string | Yes | DynamoDB table name |
| `item` | object | Yes | Item to put into the table |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `item` | object | Created item |
### `dynamodb_query`
Query items from a DynamoDB table using key conditions
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `region` | string | Yes | AWS region \(e.g., us-east-1\) |
| `accessKeyId` | string | Yes | AWS access key ID |
| `secretAccessKey` | string | Yes | AWS secret access key |
| `tableName` | string | Yes | DynamoDB table name |
| `keyConditionExpression` | string | Yes | Key condition expression \(e.g., "pk = :pk"\) |
| `filterExpression` | string | No | Filter expression for results |
| `expressionAttributeNames` | object | No | Attribute name mappings for reserved words |
| `expressionAttributeValues` | object | No | Expression attribute values |
| `indexName` | string | No | Secondary index name to query |
| `limit` | number | No | Maximum number of items to return |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `items` | array | Array of items returned |
| `count` | number | Number of items returned |
### `dynamodb_scan`
Scan all items in a DynamoDB table
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `region` | string | Yes | AWS region \(e.g., us-east-1\) |
| `accessKeyId` | string | Yes | AWS access key ID |
| `secretAccessKey` | string | Yes | AWS secret access key |
| `tableName` | string | Yes | DynamoDB table name |
| `filterExpression` | string | No | Filter expression for results |
| `projectionExpression` | string | No | Attributes to retrieve |
| `expressionAttributeNames` | object | No | Attribute name mappings for reserved words |
| `expressionAttributeValues` | object | No | Expression attribute values |
| `limit` | number | No | Maximum number of items to return |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `items` | array | Array of items returned |
| `count` | number | Number of items returned |
### `dynamodb_update`
Update an item in a DynamoDB table
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `region` | string | Yes | AWS region \(e.g., us-east-1\) |
| `accessKeyId` | string | Yes | AWS access key ID |
| `secretAccessKey` | string | Yes | AWS secret access key |
| `tableName` | string | Yes | DynamoDB table name |
| `key` | object | Yes | Primary key of the item to update |
| `updateExpression` | string | Yes | Update expression \(e.g., "SET #name = :name"\) |
| `expressionAttributeNames` | object | No | Attribute name mappings for reserved words |
| `expressionAttributeValues` | object | No | Expression attribute values |
| `conditionExpression` | string | No | Condition that must be met for the update to succeed |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `item` | object | Updated item |
### `dynamodb_delete`
Delete an item from a DynamoDB table
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `region` | string | Yes | AWS region \(e.g., us-east-1\) |
| `accessKeyId` | string | Yes | AWS access key ID |
| `secretAccessKey` | string | Yes | AWS secret access key |
| `tableName` | string | Yes | DynamoDB table name |
| `key` | object | Yes | Primary key of the item to delete |
| `conditionExpression` | string | No | Condition that must be met for the delete to succeed |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
## Notes
- Category: `tools`
- Type: `dynamodb`

View File

@@ -7,7 +7,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="mailgun"
color="#F06248"
color="#E0E0E0"
/>
{/* MANUAL-CONTENT-START:intro */}

View File

@@ -11,6 +11,7 @@
"clay",
"confluence",
"discord",
"dynamodb",
"elevenlabs",
"exa",
"file",
@@ -59,6 +60,7 @@
"posthog",
"pylon",
"qdrant",
"rds",
"reddit",
"resend",
"s3",

View File

@@ -0,0 +1,173 @@
---
title: Amazon RDS
description: Connect to Amazon RDS via Data API
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="rds"
color="linear-gradient(45deg, #2E27AD 0%, #527FFF 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}
[Amazon RDS Aurora Serverless](https://aws.amazon.com/rds/aurora/serverless/) is a fully managed relational database that automatically starts up, shuts down, and scales capacity based on your application's needs. It allows you to run SQL databases in the cloud without managing database servers.
With RDS Aurora Serverless, you can:
- **Query data**: Run flexible SQL queries across your tables
- **Insert new records**: Add data to your database automatically
- **Update existing records**: Modify data in your tables using custom filters
- **Delete records**: Remove unwanted data using precise criteria
- **Execute raw SQL**: Run any valid SQL command supported by Aurora
In Sim, the RDS integration enables your agents to work with Amazon Aurora Serverless databases securely and programmatically. Supported operations include:
- **Query**: Run SELECT and other SQL queries to fetch rows from your database
- **Insert**: Insert new records into tables with structured data
- **Update**: Change data in rows that match your specified conditions
- **Delete**: Remove records from a table by custom filters or criteria
- **Execute**: Run raw SQL for advanced scenarios
This integration allows your agents to automate a wide range of database operations without manual intervention. By connecting Sim with Amazon RDS, you can build agents that manage, update, and retrieve relational data within your workflows—all without handling database infrastructure or connections.
{/* MANUAL-CONTENT-END */}
## Usage Instructions
Integrate Amazon RDS Aurora Serverless into the workflow using the Data API. Can query, insert, update, delete, and execute raw SQL without managing database connections.
## Tools
### `rds_query`
Execute a SELECT query on Amazon RDS using the Data API
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `region` | string | Yes | AWS region \(e.g., us-east-1\) |
| `accessKeyId` | string | Yes | AWS access key ID |
| `secretAccessKey` | string | Yes | AWS secret access key |
| `resourceArn` | string | Yes | ARN of the Aurora DB cluster |
| `secretArn` | string | Yes | ARN of the Secrets Manager secret containing DB credentials |
| `database` | string | No | Database name \(optional\) |
| `query` | string | Yes | SQL SELECT query to execute |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `rows` | array | Array of rows returned from the query |
| `rowCount` | number | Number of rows returned |
### `rds_insert`
Insert data into an Amazon RDS table using the Data API
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `region` | string | Yes | AWS region \(e.g., us-east-1\) |
| `accessKeyId` | string | Yes | AWS access key ID |
| `secretAccessKey` | string | Yes | AWS secret access key |
| `resourceArn` | string | Yes | ARN of the Aurora DB cluster |
| `secretArn` | string | Yes | ARN of the Secrets Manager secret containing DB credentials |
| `database` | string | No | Database name \(optional\) |
| `table` | string | Yes | Table name to insert into |
| `data` | object | Yes | Data to insert as key-value pairs |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `rows` | array | Array of inserted rows |
| `rowCount` | number | Number of rows inserted |
### `rds_update`
Update data in an Amazon RDS table using the Data API
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `region` | string | Yes | AWS region \(e.g., us-east-1\) |
| `accessKeyId` | string | Yes | AWS access key ID |
| `secretAccessKey` | string | Yes | AWS secret access key |
| `resourceArn` | string | Yes | ARN of the Aurora DB cluster |
| `secretArn` | string | Yes | ARN of the Secrets Manager secret containing DB credentials |
| `database` | string | No | Database name \(optional\) |
| `table` | string | Yes | Table name to update |
| `data` | object | Yes | Data to update as key-value pairs |
| `conditions` | object | Yes | Conditions for the update \(e.g., \{"id": 1\}\) |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `rows` | array | Array of updated rows |
| `rowCount` | number | Number of rows updated |
### `rds_delete`
Delete data from an Amazon RDS table using the Data API
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `region` | string | Yes | AWS region \(e.g., us-east-1\) |
| `accessKeyId` | string | Yes | AWS access key ID |
| `secretAccessKey` | string | Yes | AWS secret access key |
| `resourceArn` | string | Yes | ARN of the Aurora DB cluster |
| `secretArn` | string | Yes | ARN of the Secrets Manager secret containing DB credentials |
| `database` | string | No | Database name \(optional\) |
| `table` | string | Yes | Table name to delete from |
| `conditions` | object | Yes | Conditions for the delete \(e.g., \{"id": 1\}\) |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `rows` | array | Array of deleted rows |
| `rowCount` | number | Number of rows deleted |
### `rds_execute`
Execute raw SQL on Amazon RDS using the Data API
#### Input
| Parameter | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `region` | string | Yes | AWS region \(e.g., us-east-1\) |
| `accessKeyId` | string | Yes | AWS access key ID |
| `secretAccessKey` | string | Yes | AWS secret access key |
| `resourceArn` | string | Yes | ARN of the Aurora DB cluster |
| `secretArn` | string | Yes | ARN of the Secrets Manager secret containing DB credentials |
| `database` | string | No | Database name \(optional\) |
| `query` | string | Yes | Raw SQL query to execute |
#### Output
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Operation status message |
| `rows` | array | Array of rows returned or affected |
| `rowCount` | number | Number of rows affected |
## Notes
- Category: `tools`
- Type: `rds`

View File

@@ -7,7 +7,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="s3"
color="#E0E0E0"
color="linear-gradient(45deg, #1B660F 0%, #6CAE3E 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}

View File

@@ -0,0 +1,188 @@
---
title: Amazon DynamoDB
description: Conectar a Amazon DynamoDB
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="dynamodb"
color="linear-gradient(45deg, #2E27AD 0%, #527FFF 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}
[Amazon DynamoDB](https://aws.amazon.com/dynamodb/) es un servicio de base de datos NoSQL completamente administrado ofrecido por AWS que proporciona un rendimiento rápido y predecible con escalabilidad perfecta. DynamoDB te permite almacenar y recuperar cualquier cantidad de datos y atender cualquier nivel de tráfico de solicitudes, sin necesidad de administrar hardware o infraestructura.
Con DynamoDB, puedes:
- **Obtener elementos**: Buscar elementos en tus tablas usando claves primarias
- **Poner elementos**: Añadir o reemplazar elementos en tus tablas
- **Consultar elementos**: Recuperar múltiples elementos usando consultas a través de índices
- **Escanear tablas**: Leer todos o parte de los datos en una tabla
- **Actualizar elementos**: Modificar atributos específicos de elementos existentes
- **Eliminar elementos**: Eliminar registros de tus tablas
En Sim, la integración con DynamoDB permite a tus agentes acceder y manipular de forma segura las tablas de DynamoDB utilizando credenciales de AWS. Las operaciones compatibles incluyen:
- **Get**: Recuperar un elemento por su clave
- **Put**: Insertar o sobrescribir elementos
- **Query**: Ejecutar consultas utilizando condiciones de clave y filtros
- **Scan**: Leer múltiples elementos escaneando la tabla o índice
- **Update**: Cambiar atributos específicos de uno o más elementos
- **Delete**: Eliminar un elemento de una tabla
Esta integración permite a los agentes de Sim automatizar tareas de gestión de datos dentro de tus tablas de DynamoDB de forma programática, para que puedas crear flujos de trabajo que gestionen, modifiquen y recuperen datos NoSQL escalables sin esfuerzo manual ni gestión de servidores.
{/* MANUAL-CONTENT-END */}
## Instrucciones de uso
Integra Amazon DynamoDB en flujos de trabajo. Compatible con operaciones Get, Put, Query, Scan, Update y Delete en tablas de DynamoDB.
## Herramientas
### `dynamodb_get`
Obtener un elemento de una tabla DynamoDB mediante clave primaria
#### Entrada
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `region` | string | Sí | Región de AWS \(p. ej., us-east-1\) |
| `accessKeyId` | string | Sí | ID de clave de acceso de AWS |
| `secretAccessKey` | string | Sí | Clave de acceso secreta de AWS |
| `tableName` | string | Sí | Nombre de la tabla DynamoDB |
| `key` | object | Sí | Clave primaria del elemento a recuperar |
| `consistentRead` | boolean | No | Usar lectura fuertemente consistente |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `message` | string | Mensaje de estado de la operación |
| `item` | object | Elemento recuperado |
### `dynamodb_put`
Poner un elemento en una tabla DynamoDB
#### Entrada
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `region` | string | Sí | Región de AWS \(p. ej., us-east-1\) |
| `accessKeyId` | string | Sí | ID de clave de acceso de AWS |
| `secretAccessKey` | string | Sí | Clave de acceso secreta de AWS |
| `tableName` | string | Sí | Nombre de la tabla DynamoDB |
| `item` | object | Sí | Elemento a poner en la tabla |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `message` | string | Mensaje de estado de la operación |
| `item` | object | Elemento creado |
### `dynamodb_query`
Consultar elementos de una tabla DynamoDB usando condiciones de clave
#### Entrada
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `region` | string | Sí | Región de AWS \(p. ej., us-east-1\) |
| `accessKeyId` | string | Sí | ID de clave de acceso de AWS |
| `secretAccessKey` | string | Sí | Clave de acceso secreta de AWS |
| `tableName` | string | Sí | Nombre de la tabla DynamoDB |
| `keyConditionExpression` | string | Sí | Expresión de condición de clave \(p. ej., "pk = :pk"\) |
| `filterExpression` | string | No | Expresión de filtro para resultados |
| `expressionAttributeNames` | object | No | Mapeos de nombres de atributos para palabras reservadas |
| `expressionAttributeValues` | object | No | Valores de atributos de expresión |
| `indexName` | string | No | Nombre del índice secundario para consultar |
| `limit` | number | No | Número máximo de elementos a devolver |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `message` | string | Mensaje de estado de la operación |
| `items` | array | Array de elementos devueltos |
| `count` | number | Número de elementos devueltos |
### `dynamodb_scan`
Escanear todos los elementos en una tabla DynamoDB
#### Entrada
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `region` | string | Sí | Región de AWS \(p. ej., us-east-1\) |
| `accessKeyId` | string | Sí | ID de clave de acceso de AWS |
| `secretAccessKey` | string | Sí | Clave de acceso secreta de AWS |
| `tableName` | string | Sí | Nombre de la tabla DynamoDB |
| `filterExpression` | string | No | Expresión de filtro para resultados |
| `projectionExpression` | string | No | Atributos a recuperar |
| `expressionAttributeNames` | object | No | Mapeos de nombres de atributos para palabras reservadas |
| `expressionAttributeValues` | object | No | Valores de atributos de expresión |
| `limit` | number | No | Número máximo de elementos a devolver |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `message` | string | Mensaje de estado de la operación |
| `items` | array | Array de elementos devueltos |
| `count` | number | Número de elementos devueltos |
### `dynamodb_update`
Actualizar un elemento en una tabla de DynamoDB
#### Entrada
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `region` | string | Sí | Región de AWS \(p. ej., us-east-1\) |
| `accessKeyId` | string | Sí | ID de clave de acceso de AWS |
| `secretAccessKey` | string | Sí | Clave de acceso secreta de AWS |
| `tableName` | string | Sí | Nombre de la tabla de DynamoDB |
| `key` | object | Sí | Clave primaria del elemento a actualizar |
| `updateExpression` | string | Sí | Expresión de actualización \(p. ej., "SET #name = :name"\) |
| `expressionAttributeNames` | object | No | Mapeos de nombres de atributos para palabras reservadas |
| `expressionAttributeValues` | object | No | Valores de atributos de expresión |
| `conditionExpression` | string | No | Condición que debe cumplirse para que la actualización tenga éxito |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `message` | string | Mensaje de estado de la operación |
| `item` | object | Elemento actualizado |
### `dynamodb_delete`
Eliminar un elemento de una tabla de DynamoDB
#### Entrada
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `region` | string | Sí | Región de AWS \(p. ej., us-east-1\) |
| `accessKeyId` | string | Sí | ID de clave de acceso de AWS |
| `secretAccessKey` | string | Sí | Clave de acceso secreta de AWS |
| `tableName` | string | Sí | Nombre de la tabla de DynamoDB |
| `key` | object | Sí | Clave primaria del elemento a eliminar |
| `conditionExpression` | string | No | Condición que debe cumplirse para que la eliminación tenga éxito |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `message` | string | Mensaje de estado de la operación |
## Notas
- Categoría: `tools`
- Tipo: `dynamodb`

View File

@@ -7,7 +7,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="mailgun"
color="#F06248"
color="#E0E0E0"
/>
{/* MANUAL-CONTENT-START:intro */}

View File

@@ -0,0 +1,168 @@
---
title: Amazon RDS
description: Conéctate a Amazon RDS a través de Data API
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="rds"
color="linear-gradient(45deg, #2E27AD 0%, #527FFF 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}
[Amazon RDS Aurora Serverless](https://aws.amazon.com/rds/aurora/serverless/) es una base de datos relacional completamente administrada que se inicia, se apaga y escala automáticamente según las necesidades de tu aplicación. Te permite ejecutar bases de datos SQL en la nube sin tener que administrar servidores de bases de datos.
Con RDS Aurora Serverless, puedes:
- **Consultar datos**: Ejecutar consultas SQL flexibles en tus tablas
- **Insertar nuevos registros**: Añadir datos a tu base de datos automáticamente
- **Actualizar registros existentes**: Modificar datos en tus tablas usando filtros personalizados
- **Eliminar registros**: Quitar datos no deseados utilizando criterios precisos
- **Ejecutar SQL puro**: Ejecutar cualquier comando SQL válido compatible con Aurora
En Sim, la integración con RDS permite a tus agentes trabajar con bases de datos Amazon Aurora Serverless de forma segura y programática. Las operaciones compatibles incluyen:
- **Consulta**: Ejecutar SELECT y otras consultas SQL para obtener filas de tu base de datos
- **Inserción**: Insertar nuevos registros en tablas con datos estructurados
- **Actualización**: Cambiar datos en filas que coincidan con tus condiciones especificadas
- **Eliminación**: Eliminar registros de una tabla mediante filtros o criterios personalizados
- **Ejecución**: Ejecutar SQL puro para escenarios avanzados
Esta integración permite a tus agentes automatizar una amplia gama de operaciones de bases de datos sin intervención manual. Al conectar Sim con Amazon RDS, puedes crear agentes que gestionen, actualicen y recuperen datos relacionales dentro de tus flujos de trabajo, todo sin tener que manejar infraestructura o conexiones de bases de datos.
{/* MANUAL-CONTENT-END */}
## Instrucciones de uso
Integra Amazon RDS Aurora Serverless en el flujo de trabajo utilizando la Data API. Puede consultar, insertar, actualizar, eliminar y ejecutar SQL puro sin administrar conexiones de base de datos.
## Herramientas
### `rds_query`
Ejecutar una consulta SELECT en Amazon RDS utilizando la API de datos
#### Entrada
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `region` | string | Sí | Región de AWS (p. ej., us-east-1) |
| `accessKeyId` | string | Sí | ID de clave de acceso de AWS |
| `secretAccessKey` | string | Sí | Clave de acceso secreta de AWS |
| `resourceArn` | string | Sí | ARN del clúster de Aurora DB |
| `secretArn` | string | Sí | ARN del secreto de Secrets Manager que contiene las credenciales de la base de datos |
| `database` | string | No | Nombre de la base de datos (opcional) |
| `query` | string | Sí | Consulta SQL SELECT para ejecutar |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `message` | string | Mensaje de estado de la operación |
| `rows` | array | Array de filas devueltas por la consulta |
| `rowCount` | number | Número de filas devueltas |
### `rds_insert`
Insertar datos en una tabla de Amazon RDS utilizando la API de datos
#### Entrada
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `region` | string | Sí | Región de AWS (p. ej., us-east-1) |
| `accessKeyId` | string | Sí | ID de clave de acceso de AWS |
| `secretAccessKey` | string | Sí | Clave de acceso secreta de AWS |
| `resourceArn` | string | Sí | ARN del clúster de Aurora DB |
| `secretArn` | string | Sí | ARN del secreto de Secrets Manager que contiene las credenciales de la base de datos |
| `database` | string | No | Nombre de la base de datos (opcional) |
| `table` | string | Sí | Nombre de la tabla donde insertar |
| `data` | object | Sí | Datos a insertar como pares clave-valor |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `message` | string | Mensaje de estado de la operación |
| `rows` | array | Array de filas insertadas |
| `rowCount` | number | Número de filas insertadas |
### `rds_update`
Actualizar datos en una tabla de Amazon RDS utilizando la API de datos
#### Entrada
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `region` | string | Sí | Región de AWS (p. ej., us-east-1) |
| `accessKeyId` | string | Sí | ID de clave de acceso de AWS |
| `secretAccessKey` | string | Sí | Clave de acceso secreta de AWS |
| `resourceArn` | string | Sí | ARN del clúster de Aurora DB |
| `secretArn` | string | Sí | ARN del secreto de Secrets Manager que contiene las credenciales de la base de datos |
| `database` | string | No | Nombre de la base de datos (opcional) |
| `table` | string | Sí | Nombre de la tabla a actualizar |
| `data` | object | Sí | Datos a actualizar como pares clave-valor |
| `conditions` | object | Sí | Condiciones para la actualización (p. ej., `{"id": 1}`) |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `message` | string | Mensaje de estado de la operación |
| `rows` | array | Array de filas actualizadas |
| `rowCount` | number | Número de filas actualizadas |
### `rds_delete`
Eliminar datos de una tabla de Amazon RDS utilizando la API de datos
#### Entrada
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `region` | string | Sí | Región de AWS (p. ej., us-east-1) |
| `accessKeyId` | string | Sí | ID de clave de acceso de AWS |
| `secretAccessKey` | string | Sí | Clave de acceso secreta de AWS |
| `resourceArn` | string | Sí | ARN del clúster de Aurora DB |
| `secretArn` | string | Sí | ARN del secreto de Secrets Manager que contiene las credenciales de la base de datos |
| `database` | string | No | Nombre de la base de datos (opcional) |
| `table` | string | Sí | Nombre de la tabla de la que eliminar |
| `conditions` | object | Sí | Condiciones para la eliminación (p. ej., `{"id": 1}`) |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `message` | string | Mensaje de estado de la operación |
| `rows` | array | Array de filas eliminadas |
| `rowCount` | number | Número de filas eliminadas |
### `rds_execute`
Ejecutar SQL sin procesar en Amazon RDS usando la API de datos
#### Entrada
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `region` | string | Sí | Región de AWS (p. ej., us-east-1) |
| `accessKeyId` | string | Sí | ID de clave de acceso de AWS |
| `secretAccessKey` | string | Sí | Clave de acceso secreta de AWS |
| `resourceArn` | string | Sí | ARN del clúster de Aurora DB |
| `secretArn` | string | Sí | ARN del secreto de Secrets Manager que contiene las credenciales de la base de datos |
| `database` | string | No | Nombre de la base de datos (opcional) |
| `query` | string | Sí | Consulta SQL sin procesar para ejecutar |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `message` | string | Mensaje de estado de la operación |
| `rows` | array | Array de filas devueltas o afectadas |
| `rowCount` | number | Número de filas afectadas |
## Notas
- Categoría: `tools`
- Tipo: `rds`

View File

@@ -7,7 +7,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="s3"
color="#E0E0E0"
color="linear-gradient(45deg, #1B660F 0%, #6CAE3E 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}

View File

@@ -0,0 +1,188 @@
---
title: Amazon DynamoDB
description: Connexion à Amazon DynamoDB
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="dynamodb"
color="linear-gradient(45deg, #2E27AD 0%, #527FFF 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}
[Amazon DynamoDB](https://aws.amazon.com/dynamodb/) est un service de base de données NoSQL entièrement géré proposé par AWS qui offre des performances rapides et prévisibles avec une évolutivité transparente. DynamoDB vous permet de stocker et de récupérer n'importe quelle quantité de données et gère n'importe quel niveau de trafic de requêtes, sans que vous ayez à gérer le matériel ou l'infrastructure.
Avec DynamoDB, vous pouvez :
- **Obtenir des éléments** : rechercher des éléments dans vos tables à l'aide de clés primaires
- **Mettre des éléments** : ajouter ou remplacer des éléments dans vos tables
- **Interroger des éléments** : récupérer plusieurs éléments à l'aide de requêtes sur les index
- **Scanner des tables** : lire tout ou partie des données d'une table
- **Mettre à jour des éléments** : modifier des attributs spécifiques d'éléments existants
- **Supprimer des éléments** : supprimer des enregistrements de vos tables
Dans Sim, l'intégration DynamoDB permet à vos agents d'accéder en toute sécurité aux tables DynamoDB et de les manipuler à l'aide des identifiants AWS. Les opérations prises en charge comprennent :
- **Get** : récupérer un élément par sa clé
- **Put** : insérer ou écraser des éléments
- **Query** : exécuter des requêtes à l'aide de conditions de clé et de filtres
- **Scan** : lire plusieurs éléments en scannant la table ou l'index
- **Update** : modifier des attributs spécifiques d'un ou plusieurs éléments
- **Delete** : supprimer un élément d'une table
Cette intégration permet aux agents Sim d'automatiser les tâches de gestion de données au sein de vos tables DynamoDB de manière programmatique, afin que vous puissiez créer des flux de travail qui gèrent, modifient et récupèrent des données NoSQL évolutives sans effort manuel ni gestion de serveur.
{/* MANUAL-CONTENT-END */}
## Instructions d'utilisation
Intégrez Amazon DynamoDB dans les flux de travail. Prend en charge les opérations Get, Put, Query, Scan, Update et Delete sur les tables DynamoDB.
## Outils
### `dynamodb_get`
Récupérer un élément d'une table DynamoDB par clé primaire
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | -------- | ----------- |
| `region` | chaîne | Oui | Région AWS (par ex., us-east-1) |
| `accessKeyId` | chaîne | Oui | ID de clé d'accès AWS |
| `secretAccessKey` | chaîne | Oui | Clé d'accès secrète AWS |
| `tableName` | chaîne | Oui | Nom de la table DynamoDB |
| `key` | objet | Oui | Clé primaire de l'élément à récupérer |
| `consistentRead` | booléen | Non | Utiliser une lecture fortement cohérente |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `message` | chaîne | Message d'état de l'opération |
| `item` | objet | Élément récupéré |
### `dynamodb_put`
Mettre un élément dans une table DynamoDB
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | -------- | ----------- |
| `region` | chaîne | Oui | Région AWS (par ex., us-east-1) |
| `accessKeyId` | chaîne | Oui | ID de clé d'accès AWS |
| `secretAccessKey` | chaîne | Oui | Clé d'accès secrète AWS |
| `tableName` | chaîne | Oui | Nom de la table DynamoDB |
| `item` | objet | Oui | Élément à mettre dans la table |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `message` | chaîne | Message d'état de l'opération |
| `item` | objet | Élément créé |
### `dynamodb_query`
Interroger les éléments d'une table DynamoDB à l'aide de conditions de clé
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | -------- | ----------- |
| `region` | chaîne | Oui | Région AWS (par ex., us-east-1) |
| `accessKeyId` | chaîne | Oui | ID de clé d'accès AWS |
| `secretAccessKey` | chaîne | Oui | Clé d'accès secrète AWS |
| `tableName` | chaîne | Oui | Nom de la table DynamoDB |
| `keyConditionExpression` | chaîne | Oui | Expression de condition de clé (par ex., "pk = :pk") |
| `filterExpression` | chaîne | Non | Expression de filtre pour les résultats |
| `expressionAttributeNames` | objet | Non | Mappages de noms d'attributs pour les mots réservés |
| `expressionAttributeValues` | objet | Non | Valeurs d'attributs d'expression |
| `indexName` | chaîne | Non | Nom de l'index secondaire à interroger |
| `limit` | nombre | Non | Nombre maximum d'éléments à retourner |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `message` | chaîne | Message d'état de l'opération |
| `items` | tableau | Tableau des éléments retournés |
| `count` | nombre | Nombre d'éléments retournés |
### `dynamodb_scan`
Scanner tous les éléments d'une table DynamoDB
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | -------- | ----------- |
| `region` | chaîne | Oui | Région AWS (par ex., us-east-1) |
| `accessKeyId` | chaîne | Oui | ID de clé d'accès AWS |
| `secretAccessKey` | chaîne | Oui | Clé d'accès secrète AWS |
| `tableName` | chaîne | Oui | Nom de la table DynamoDB |
| `filterExpression` | chaîne | Non | Expression de filtre pour les résultats |
| `projectionExpression` | chaîne | Non | Attributs à récupérer |
| `expressionAttributeNames` | objet | Non | Mappages de noms d'attributs pour les mots réservés |
| `expressionAttributeValues` | objet | Non | Valeurs d'attributs d'expression |
| `limit` | nombre | Non | Nombre maximum d'éléments à retourner |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Message d'état de l'opération |
| `items` | array | Tableau des éléments retournés |
| `count` | number | Nombre d'éléments retournés |
### `dynamodb_update`
Mettre à jour un élément dans une table DynamoDB
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | -------- | ----------- |
| `region` | string | Oui | Région AWS (par ex., us-east-1) |
| `accessKeyId` | string | Oui | ID de clé d'accès AWS |
| `secretAccessKey` | string | Oui | Clé d'accès secrète AWS |
| `tableName` | string | Oui | Nom de la table DynamoDB |
| `key` | object | Oui | Clé primaire de l'élément à mettre à jour |
| `updateExpression` | string | Oui | Expression de mise à jour (par ex., "SET #name = :name") |
| `expressionAttributeNames` | object | Non | Mappages de noms d'attributs pour les mots réservés |
| `expressionAttributeValues` | object | Non | Valeurs d'attributs d'expression |
| `conditionExpression` | string | Non | Condition qui doit être remplie pour que la mise à jour réussisse |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Message d'état de l'opération |
| `item` | object | Élément mis à jour |
### `dynamodb_delete`
Supprimer un élément d'une table DynamoDB
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | -------- | ----------- |
| `region` | string | Oui | Région AWS (par ex., us-east-1) |
| `accessKeyId` | string | Oui | ID de clé d'accès AWS |
| `secretAccessKey` | string | Oui | Clé d'accès secrète AWS |
| `tableName` | string | Oui | Nom de la table DynamoDB |
| `key` | object | Oui | Clé primaire de l'élément à supprimer |
| `conditionExpression` | string | Non | Condition qui doit être remplie pour que la suppression réussisse |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Message d'état de l'opération |
## Notes
- Catégorie : `tools`
- Type : `dynamodb`

View File

@@ -7,7 +7,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="mailgun"
color="#F06248"
color="#E0E0E0"
/>
{/* MANUAL-CONTENT-START:intro */}

View File

@@ -0,0 +1,168 @@
---
title: Amazon RDS
description: Connexion à Amazon RDS via l'API Data
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="rds"
color="linear-gradient(45deg, #2E27AD 0%, #527FFF 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}
[Amazon RDS Aurora Serverless](https://aws.amazon.com/rds/aurora/serverless/) est une base de données relationnelle entièrement gérée qui démarre, s'arrête et adapte automatiquement sa capacité en fonction des besoins de votre application. Elle vous permet d'exécuter des bases de données SQL dans le cloud sans avoir à gérer des serveurs de base de données.
Avec RDS Aurora Serverless, vous pouvez :
- **Interroger des données** : exécuter des requêtes SQL flexibles sur vos tables
- **Insérer de nouveaux enregistrements** : ajouter automatiquement des données à votre base de données
- **Mettre à jour des enregistrements existants** : modifier des données dans vos tables à l'aide de filtres personnalisés
- **Supprimer des enregistrements** : éliminer les données indésirables en utilisant des critères précis
- **Exécuter du SQL brut** : lancer toute commande SQL valide prise en charge par Aurora
Dans Sim, l'intégration RDS permet à vos agents de travailler avec les bases de données Amazon Aurora Serverless de manière sécurisée et programmatique. Les opérations prises en charge comprennent :
- **Requête** : exécuter des requêtes SELECT et autres requêtes SQL pour récupérer des lignes de votre base de données
- **Insertion** : insérer de nouveaux enregistrements dans les tables avec des données structurées
- **Mise à jour** : modifier les données dans les lignes qui correspondent à vos conditions spécifiées
- **Suppression** : supprimer des enregistrements d'une table par filtres ou critères personnalisés
- **Exécution** : exécuter du SQL brut pour des scénarios avancés
Cette intégration permet à vos agents d'automatiser un large éventail d'opérations de base de données sans intervention manuelle. En connectant Sim avec Amazon RDS, vous pouvez créer des agents qui gèrent, mettent à jour et récupèrent des données relationnelles dans vos flux de travail, le tout sans avoir à gérer l'infrastructure ou les connexions de base de données.
{/* MANUAL-CONTENT-END */}
## Instructions d'utilisation
Intégrez Amazon RDS Aurora Serverless dans le flux de travail en utilisant l'API Data. Possibilité d'interroger, d'insérer, de mettre à jour, de supprimer et d'exécuter du SQL brut sans gérer les connexions à la base de données.
## Outils
### `rds_query`
Exécuter une requête SELECT sur Amazon RDS en utilisant l'API Data
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | -------- | ----------- |
| `region` | chaîne | Oui | Région AWS \(ex., us-east-1\) |
| `accessKeyId` | chaîne | Oui | ID de clé d'accès AWS |
| `secretAccessKey` | chaîne | Oui | Clé d'accès secrète AWS |
| `resourceArn` | chaîne | Oui | ARN du cluster Aurora DB |
| `secretArn` | chaîne | Oui | ARN du secret Secrets Manager contenant les identifiants de la base de données |
| `database` | chaîne | Non | Nom de la base de données \(facultatif\) |
| `query` | chaîne | Oui | Requête SQL SELECT à exécuter |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `message` | chaîne | Message d'état de l'opération |
| `rows` | tableau | Tableau des lignes retournées par la requête |
| `rowCount` | nombre | Nombre de lignes retournées |
### `rds_insert`
Insérer des données dans une table Amazon RDS en utilisant l'API Data
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | -------- | ----------- |
| `region` | chaîne | Oui | Région AWS \(ex., us-east-1\) |
| `accessKeyId` | chaîne | Oui | ID de clé d'accès AWS |
| `secretAccessKey` | chaîne | Oui | Clé d'accès secrète AWS |
| `resourceArn` | chaîne | Oui | ARN du cluster Aurora DB |
| `secretArn` | chaîne | Oui | ARN du secret Secrets Manager contenant les identifiants de la base de données |
| `database` | chaîne | Non | Nom de la base de données \(facultatif\) |
| `table` | chaîne | Oui | Nom de la table dans laquelle insérer |
| `data` | objet | Oui | Données à insérer sous forme de paires clé-valeur |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Message d'état de l'opération |
| `rows` | array | Tableau des lignes insérées |
| `rowCount` | number | Nombre de lignes insérées |
### `rds_update`
Mettre à jour des données dans une table Amazon RDS en utilisant l'API Data
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | -------- | ----------- |
| `region` | string | Oui | Région AWS (par ex., us-east-1) |
| `accessKeyId` | string | Oui | ID de clé d'accès AWS |
| `secretAccessKey` | string | Oui | Clé d'accès secrète AWS |
| `resourceArn` | string | Oui | ARN du cluster de base de données Aurora |
| `secretArn` | string | Oui | ARN du secret Secrets Manager contenant les identifiants de la base de données |
| `database` | string | Non | Nom de la base de données (facultatif) |
| `table` | string | Oui | Nom de la table à mettre à jour |
| `data` | object | Oui | Données à mettre à jour sous forme de paires clé-valeur |
| `conditions` | object | Oui | Conditions pour la mise à jour (par ex., `{"id": 1}`) |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Message d'état de l'opération |
| `rows` | array | Tableau des lignes mises à jour |
| `rowCount` | number | Nombre de lignes mises à jour |
### `rds_delete`
Supprimer des données d'une table Amazon RDS en utilisant l'API Data
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | -------- | ----------- |
| `region` | chaîne | Oui | Région AWS (par ex., us-east-1) |
| `accessKeyId` | chaîne | Oui | ID de clé d'accès AWS |
| `secretAccessKey` | chaîne | Oui | Clé d'accès secrète AWS |
| `resourceArn` | chaîne | Oui | ARN du cluster de base de données Aurora |
| `secretArn` | chaîne | Oui | ARN du secret Secrets Manager contenant les identifiants de la base de données |
| `database` | chaîne | Non | Nom de la base de données (facultatif) |
| `table` | chaîne | Oui | Nom de la table à supprimer |
| `conditions` | objet | Oui | Conditions pour la suppression (par ex., `{"id": 1}`) |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `message` | chaîne | Message d'état de l'opération |
| `rows` | tableau | Tableau des lignes supprimées |
| `rowCount` | nombre | Nombre de lignes supprimées |
### `rds_execute`
Exécuter du SQL brut sur Amazon RDS en utilisant l'API Data
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | -------- | ----------- |
| `region` | chaîne | Oui | Région AWS (par ex., us-east-1) |
| `accessKeyId` | chaîne | Oui | ID de clé d'accès AWS |
| `secretAccessKey` | chaîne | Oui | Clé d'accès secrète AWS |
| `resourceArn` | chaîne | Oui | ARN du cluster de base de données Aurora |
| `secretArn` | chaîne | Oui | ARN du secret Secrets Manager contenant les identifiants de la base de données |
| `database` | chaîne | Non | Nom de la base de données (facultatif) |
| `query` | chaîne | Oui | Requête SQL brute à exécuter |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `message` | string | Message d'état de l'opération |
| `rows` | array | Tableau des lignes retournées ou affectées |
| `rowCount` | number | Nombre de lignes affectées |
## Notes
- Catégorie : `tools`
- Type : `rds`

View File

@@ -7,7 +7,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="s3"
color="#E0E0E0"
color="linear-gradient(45deg, #1B660F 0%, #6CAE3E 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}

View File

@@ -0,0 +1,188 @@
---
title: Amazon DynamoDB
description: Amazon DynamoDBに接続する
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="dynamodb"
color="linear-gradient(45deg, #2E27AD 0%, #527FFF 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}
[Amazon DynamoDB](https://aws.amazon.com/dynamodb/)はAWSが提供する完全マネージド型のNoSQLデータベースサービスで、シームレスなスケーラビリティを備えた高速で予測可能なパフォーマンスを提供します。DynamoDBを使用すると、ハードウェアやインフラストラクチャを管理する必要なく、任意の量のデータを保存および取得し、あらゆるレベルのリクエストトラフィックに対応できます。
DynamoDBでは、以下のことが可能です
- **アイテムの取得**:プライマリキーを使用してテーブル内のアイテムを検索
- **アイテムの配置**:テーブルにアイテムを追加または置換
- **アイテムのクエリ**:インデックス全体でクエリを使用して複数のアイテムを取得
- **テーブルのスキャン**:テーブル内のデータの全部または一部を読み取り
- **アイテムの更新**:既存のアイテムの特定の属性を変更
- **アイテムの削除**:テーブルからレコードを削除
Simでは、DynamoDB統合により、エージェントがAWS認証情報を使用してDynamoDBテーブルに安全にアクセスし操作することができます。サポートされている操作には以下が含まれます
- **Get**:キーによるアイテムの取得
- **Put**:アイテムの挿入または上書き
- **Query**:キー条件とフィルターを使用したクエリの実行
- **Scan**:テーブルまたはインデックスをスキャンして複数のアイテムを読み取り
- **Update**1つ以上のアイテムの特定の属性を変更
- **Delete**:テーブルからアイテムを削除
この統合により、SimエージェントはプログラムによってDynamoDBテーブル内のデータ管理タスクを自動化できるようになり、手動の作業やサーバー管理なしでスケーラブルなNoSQLデータを管理、変更、取得するワークフローを構築できます。
{/* MANUAL-CONTENT-END */}
## 使用方法
Amazon DynamoDBをワークフローに統合します。DynamoDBテーブルに対するGet、Put、Query、Scan、Update、Delete操作をサポートしています。
## ツール
### `dynamodb_get`
プライマリキーを使用してDynamoDBテーブルからアイテムを取得する
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `region` | string | はい | AWSリージョンus-east-1 |
| `accessKeyId` | string | はい | AWSアクセスキーID |
| `secretAccessKey` | string | はい | AWSシークレットアクセスキー |
| `tableName` | string | はい | DynamoDBテーブル名 |
| `key` | object | はい | 取得するアイテムのプライマリキー |
| `consistentRead` | boolean | いいえ | 強力な整合性のある読み取りを使用する |
#### 出力
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `message` | string | 操作ステータスメッセージ |
| `item` | object | 取得したアイテム |
### `dynamodb_put`
DynamoDBテーブルにアイテムを追加する
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `region` | string | はい | AWSリージョンus-east-1 |
| `accessKeyId` | string | はい | AWSアクセスキーID |
| `secretAccessKey` | string | はい | AWSシークレットアクセスキー |
| `tableName` | string | はい | DynamoDBテーブル名 |
| `item` | object | はい | テーブルに追加するアイテム |
#### 出力
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `message` | string | 操作ステータスメッセージ |
| `item` | object | 作成されたアイテム |
### `dynamodb_query`
キー条件を使用してDynamoDBテーブルからアイテムをクエリする
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `region` | string | はい | AWSリージョンus-east-1 |
| `accessKeyId` | string | はい | AWSアクセスキーID |
| `secretAccessKey` | string | はい | AWSシークレットアクセスキー |
| `tableName` | string | はい | DynamoDBテーブル名 |
| `keyConditionExpression` | string | はい | キー条件式(例:"pk = :pk" |
| `filterExpression` | string | いいえ | 結果のフィルター式 |
| `expressionAttributeNames` | object | いいえ | 予約語の属性名マッピング |
| `expressionAttributeValues` | object | いいえ | 式の属性値 |
| `indexName` | string | いいえ | クエリするセカンダリインデックス名 |
| `limit` | number | いいえ | 返すアイテムの最大数 |
#### 出力
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `message` | string | 操作ステータスメッセージ |
| `items` | array | 返されたアイテムの配列 |
| `count` | number | 返されたアイテムの数 |
### `dynamodb_scan`
DynamoDBテーブル内のすべてのアイテムをスキャンする
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `region` | string | はい | AWSリージョンus-east-1 |
| `accessKeyId` | string | はい | AWSアクセスキーID |
| `secretAccessKey` | string | はい | AWSシークレットアクセスキー |
| `tableName` | string | はい | DynamoDBテーブル名 |
| `filterExpression` | string | いいえ | 結果のフィルター式 |
| `projectionExpression` | string | いいえ | 取得する属性 |
| `expressionAttributeNames` | object | いいえ | 予約語の属性名マッピング |
| `expressionAttributeValues` | object | いいえ | 式の属性値 |
| `limit` | number | いいえ | 返すアイテムの最大数 |
#### 出力
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `message` | string | 操作ステータスメッセージ |
| `items` | array | 返されたアイテムの配列 |
| `count` | number | 返されたアイテム数 |
### `dynamodb_update`
DynamoDBテーブル内のアイテムを更新する
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `region` | string | はい | AWSリージョンus-east-1 |
| `accessKeyId` | string | はい | AWSアクセスキーID |
| `secretAccessKey` | string | はい | AWSシークレットアクセスキー |
| `tableName` | string | はい | DynamoDBテーブル名 |
| `key` | object | はい | 更新するアイテムのプライマリキー |
| `updateExpression` | string | はい | 更新式(例:"SET #name = :name" |
| `expressionAttributeNames` | object | いいえ | 予約語の属性名マッピング |
| `expressionAttributeValues` | object | いいえ | 式の属性値 |
| `conditionExpression` | string | いいえ | 更新が成功するために満たす必要がある条件 |
#### 出力
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `message` | string | 操作ステータスメッセージ |
| `item` | object | 更新されたアイテム |
### `dynamodb_delete`
DynamoDBテーブルからアイテムを削除する
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `region` | string | はい | AWSリージョンus-east-1 |
| `accessKeyId` | string | はい | AWSアクセスキーID |
| `secretAccessKey` | string | はい | AWSシークレットアクセスキー |
| `tableName` | string | はい | DynamoDBテーブル名 |
| `key` | object | はい | 削除するアイテムのプライマリキー |
| `conditionExpression` | string | いいえ | 削除が成功するために満たす必要がある条件 |
#### 出力
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `message` | string | 操作ステータスメッセージ |
## 注意事項
- カテゴリー: `tools`
- タイプ: `dynamodb`

View File

@@ -7,7 +7,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="mailgun"
color="#F06248"
color="#E0E0E0"
/>
{/* MANUAL-CONTENT-START:intro */}

View File

@@ -0,0 +1,168 @@
---
title: Amazon RDS
description: Data APIを通じてAmazon RDSに接続
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="rds"
color="linear-gradient(45deg, #2E27AD 0%, #527FFF 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}
[Amazon RDS Aurora Serverless](https://aws.amazon.com/rds/aurora/serverless/)は、アプリケーションのニーズに基づいて自動的に起動、シャットダウン、容量のスケーリングを行う完全マネージド型のリレーショナルデータベースです。データベースサーバーを管理することなく、クラウドでSQLデータベースを実行できます。
RDS Aurora Serverlessでは、以下のことが可能です
- **データのクエリ**: テーブル間で柔軟なSQLクエリを実行
- **新しいレコードの挿入**: データベースに自動的にデータを追加
- **既存レコードの更新**: カスタムフィルターを使用してテーブル内のデータを変更
- **レコードの削除**: 正確な条件を使用して不要なデータを削除
- **生のSQLの実行**: Auroraでサポートされている有効なSQLコマンドを実行
Simでは、RDS統合により、エージェントがAmazon Aurora Serverlessデータベースを安全かつプログラム的に操作できるようになります。サポートされている操作には以下が含まれます
- **クエリ**: SELECTやその他のSQLクエリを実行してデータベースから行を取得
- **挿入**: 構造化データを使用してテーブルに新しいレコードを挿入
- **更新**: 指定した条件に一致する行のデータを変更
- **削除**: カスタムフィルターや条件によってテーブルからレコードを削除
- **実行**: 高度なシナリオ向けに生のSQLを実行
この統合により、エージェントは手動介入なしに幅広いデータベース操作を自動化できます。SimとAmazon RDSを接続することで、ワークフロー内でリレーショナルデータを管理、更新、取得するエージェントを構築できます—すべてデータベースインフラストラクチャや接続を扱うことなく実現できます。
{/* MANUAL-CONTENT-END */}
## 使用手順
Data APIを使用してAmazon RDS Aurora Serverlessをワークフローに統合します。データベース接続を管理することなく、クエリ、挿入、更新、削除、生のSQLの実行が可能です。
## ツール
### `rds_query`
Data APIを使用してAmazon RDSでSELECTクエリを実行する
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `region` | string | はい | AWSリージョンus-east-1 |
| `accessKeyId` | string | はい | AWSアクセスキーID |
| `secretAccessKey` | string | はい | AWSシークレットアクセスキー |
| `resourceArn` | string | はい | Aurora DBクラスターのARN |
| `secretArn` | string | はい | DB認証情報を含むSecrets ManagerシークレットのARN |
| `database` | string | いいえ | データベース名(オプション) |
| `query` | string | はい | 実行するSQL SELECTクエリ |
#### 出力
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `message` | string | 操作ステータスメッセージ |
| `rows` | array | クエリから返された行の配列 |
| `rowCount` | number | 返された行数 |
### `rds_insert`
Data APIを使用してAmazon RDSテーブルにデータを挿入する
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `region` | string | はい | AWSリージョンus-east-1 |
| `accessKeyId` | string | はい | AWSアクセスキーID |
| `secretAccessKey` | string | はい | AWSシークレットアクセスキー |
| `resourceArn` | string | はい | Aurora DBクラスターのARN |
| `secretArn` | string | はい | DB認証情報を含むSecrets ManagerシークレットのARN |
| `database` | string | いいえ | データベース名(オプション) |
| `table` | string | はい | 挿入先のテーブル名 |
| `data` | object | はい | キーと値のペアとして挿入するデータ |
#### 出力
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `message` | string | 操作ステータスメッセージ |
| `rows` | array | 挿入された行の配列 |
| `rowCount` | number | 挿入された行数 |
### `rds_update`
Data APIを使用してAmazon RDSテーブルのデータを更新する
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `region` | string | はい | AWSリージョンus-east-1 |
| `accessKeyId` | string | はい | AWSアクセスキーID |
| `secretAccessKey` | string | はい | AWSシークレットアクセスキー |
| `resourceArn` | string | はい | Aurora DBクラスターのARN |
| `secretArn` | string | はい | DB認証情報を含むSecrets ManagerシークレットのARN |
| `database` | string | いいえ | データベース名(オプション) |
| `table` | string | はい | 更新するテーブル名 |
| `data` | object | はい | キーと値のペアとして更新するデータ |
| `conditions` | object | はい | 更新の条件(例:`{"id": 1}`) |
#### 出力
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `message` | string | 操作ステータスメッセージ |
| `rows` | array | 更新された行の配列 |
| `rowCount` | number | 更新された行数 |
### `rds_delete`
Data APIを使用してAmazon RDSテーブルからデータを削除する
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `region` | string | はい | AWS リージョンus-east-1 |
| `accessKeyId` | string | はい | AWS アクセスキーID |
| `secretAccessKey` | string | はい | AWS シークレットアクセスキー |
| `resourceArn` | string | はい | Aurora DBクラスターのARN |
| `secretArn` | string | はい | DB認証情報を含むSecrets ManagerシークレットのARN |
| `database` | string | いいえ | データベース名(オプション) |
| `table` | string | はい | 削除対象のテーブル名 |
| `conditions` | object | はい | 削除条件(例:`{"id": 1}`) |
#### 出力
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `message` | string | 操作ステータスメッセージ |
| `rows` | array | 削除された行の配列 |
| `rowCount` | number | 削除された行数 |
### `rds_execute`
Data APIを使用してAmazon RDSで生のSQLを実行する
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `region` | string | はい | AWS リージョンus-east-1 |
| `accessKeyId` | string | はい | AWS アクセスキーID |
| `secretAccessKey` | string | はい | AWS シークレットアクセスキー |
| `resourceArn` | string | はい | Aurora DBクラスターのARN |
| `secretArn` | string | はい | DB認証情報を含むSecrets ManagerシークレットのARN |
| `database` | string | いいえ | データベース名(オプション) |
| `query` | string | はい | 実行する生のSQLクエリ |
#### 出力
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `message` | string | 操作ステータスメッセージ |
| `rows` | array | 返却または影響を受けた行の配列 |
| `rowCount` | number | 影響を受けた行数 |
## 注意事項
- カテゴリー: `tools`
- タイプ: `rds`

View File

@@ -7,7 +7,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="s3"
color="#E0E0E0"
color="linear-gradient(45deg, #1B660F 0%, #6CAE3E 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}

View File

@@ -0,0 +1,188 @@
---
title: Amazon DynamoDB
description: 连接到 Amazon DynamoDB
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="dynamodb"
color="linear-gradient(45deg, #2E27AD 0%, #527FFF 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}
[Amazon DynamoDB](https://aws.amazon.com/dynamodb/) 是 AWS 提供的一项完全托管的 NoSQL 数据库服务具有快速且可预测的性能并支持无缝扩展。DynamoDB 允许您存储和检索任意数量的数据,并处理任何级别的请求流量,而无需您管理硬件或基础设施。
使用 DynamoDB您可以
- **获取项目**:使用主键查找表中的项目
- **添加项目**:在表中添加或替换项目
- **查询项目**:通过索引查询检索多个项目
- **扫描表**:读取表中的全部或部分数据
- **更新项目**:修改现有项目的特定属性
- **删除项目**:从表中移除记录
在 Sim 中DynamoDB 集成使您的代理能够使用 AWS 凭证安全地访问和操作 DynamoDB 表。支持的操作包括:
- **获取**:通过键检索项目
- **添加**:插入或覆盖项目
- **查询**:使用键条件和过滤器运行查询
- **扫描**:通过扫描表或索引读取多个项目
- **更新**:更改一个或多个项目的特定属性
- **删除**:从表中移除项目
此集成使 Sim 代理能够以编程方式自动化管理 DynamoDB 表中的数据管理任务,从而构建无需手动操作或服务器管理的工作流,来管理、修改和检索可扩展的 NoSQL 数据。
{/* MANUAL-CONTENT-END */}
## 使用说明
将 Amazon DynamoDB 集成到工作流中。支持对 DynamoDB 表执行获取、添加、查询、扫描、更新和删除操作。
## 工具
### `dynamodb_get`
通过主键从 DynamoDB 表中获取一个项目
#### 输入
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `region` | string | 是 | AWS 区域 \(例如us-east-1\) |
| `accessKeyId` | string | 是 | AWS 访问密钥 ID |
| `secretAccessKey` | string | 是 | AWS 秘密访问密钥 |
| `tableName` | string | 是 | DynamoDB 表名 |
| `key` | object | 是 | 要检索的项目主键 |
| `consistentRead` | boolean | 否 | 使用强一致性读取 |
#### 输出
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `message` | string | 操作状态消息 |
| `item` | object | 检索到的项目 |
### `dynamodb_put`
将一个项目放入 DynamoDB 表中
#### 输入
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `region` | string | 是 | AWS 区域 \(例如us-east-1\) |
| `accessKeyId` | string | 是 | AWS 访问密钥 ID |
| `secretAccessKey` | string | 是 | AWS 秘密访问密钥 |
| `tableName` | string | 是 | DynamoDB 表名 |
| `item` | object | 是 | 要放入表中的项目 |
#### 输出
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `message` | string | 操作状态消息 |
| `item` | object | 创建的项目 |
### `dynamodb_query`
使用键条件从 DynamoDB 表中查询项目
#### 输入
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `region` | string | 是 | AWS 区域 \(例如us-east-1\) |
| `accessKeyId` | string | 是 | AWS 访问密钥 ID |
| `secretAccessKey` | string | 是 | AWS 秘密访问密钥 |
| `tableName` | string | 是 | DynamoDB 表名 |
| `keyConditionExpression` | string | 是 | 键条件表达式 \(例如,"pk = :pk"\) |
| `filterExpression` | string | 否 | 结果的过滤表达式 |
| `expressionAttributeNames` | object | 否 | 保留字的属性名称映射 |
| `expressionAttributeValues` | object | 否 | 表达式属性值 |
| `indexName` | string | 否 | 要查询的二级索引名称 |
| `limit` | number | 否 | 要返回的最大项目数 |
#### 输出
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `message` | string | 操作状态消息 |
| `items` | array | 返回的项目数组 |
| `count` | number | 返回的项目数量 |
### `dynamodb_scan`
扫描 DynamoDB 表中的所有项目
#### 输入
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `region` | string | 是 | AWS 区域 \(例如us-east-1\) |
| `accessKeyId` | string | 是 | AWS 访问密钥 ID |
| `secretAccessKey` | string | 是 | AWS 秘密访问密钥 |
| `tableName` | string | 是 | DynamoDB 表名 |
| `filterExpression` | string | 否 | 结果的过滤表达式 |
| `projectionExpression` | string | 否 | 要检索的属性 |
| `expressionAttributeNames` | object | 否 | 保留字的属性名称映射 |
| `expressionAttributeValues` | object | 否 | 表达式属性值 |
| `limit` | number | 否 | 要返回的最大项目数 |
#### 输出
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `message` | string | 操作状态消息 |
| `items` | array | 返回的项目数组 |
| `count` | number | 返回的项目数量 |
### `dynamodb_update`
更新 DynamoDB 表中的项目
#### 输入
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `region` | string | 是 | AWS 区域 \(例如us-east-1\) |
| `accessKeyId` | string | 是 | AWS 访问密钥 ID |
| `secretAccessKey` | string | 是 | AWS 秘密访问密钥 |
| `tableName` | string | 是 | DynamoDB 表名 |
| `key` | object | 是 | 要更新项目的主键 |
| `updateExpression` | string | 是 | 更新表达式 \(例如,"SET #name = :name"\) |
| `expressionAttributeNames` | object | 否 | 保留字的属性名称映射 |
| `expressionAttributeValues` | object | 否 | 表达式属性值 |
| `conditionExpression` | string | 否 | 更新成功所需满足的条件 |
#### 输出
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `message` | string | 操作状态消息 |
| `item` | object | 更新后的项目 |
### `dynamodb_delete`
从 DynamoDB 表中删除项目
#### 输入
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `region` | string | 是 | AWS 区域 \(例如us-east-1\) |
| `accessKeyId` | string | 是 | AWS 访问密钥 ID |
| `secretAccessKey` | string | 是 | AWS 秘密访问密钥 |
| `tableName` | string | 是 | DynamoDB 表名 |
| `key` | object | 是 | 要删除项目的主键 |
| `conditionExpression` | string | 否 | 删除成功所需满足的条件 |
#### 输出
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `message` | string | 操作状态消息 |
## 注意
- 类别: `tools`
- 类型: `dynamodb`

View File

@@ -7,7 +7,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="mailgun"
color="#F06248"
color="#E0E0E0"
/>
{/* MANUAL-CONTENT-START:intro */}

View File

@@ -0,0 +1,168 @@
---
title: Amazon RDS
description: 通过 Data API 连接到 Amazon RDS
---
import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="rds"
color="linear-gradient(45deg, #2E27AD 0%, #527FFF 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}
[Amazon RDS Aurora Serverless](https://aws.amazon.com/rds/aurora/serverless/) 是一种完全托管的关系型数据库,它会根据您的应用需求自动启动、关闭并调整容量。它允许您在云中运行 SQL 数据库,而无需管理数据库服务器。
使用 RDS Aurora Serverless您可以
- **查询数据**:在表中运行灵活的 SQL 查询
- **插入新记录**:自动向数据库添加数据
- **更新现有记录**:使用自定义筛选条件修改表中的数据
- **删除记录**:通过精确的条件删除不需要的数据
- **执行原始 SQL**:运行 Aurora 支持的任何有效 SQL 命令
在 Sim 中RDS 集成使您的代理能够以安全且编程的方式与 Amazon Aurora Serverless 数据库交互。支持的操作包括:
- **查询**:运行 SELECT 和其他 SQL 查询以从数据库中获取行
- **插入**:将新记录插入到具有结构化数据的表中
- **更新**:更改符合指定条件的行中的数据
- **删除**:通过自定义筛选条件从表中删除记录
- **执行**:运行原始 SQL 以应对高级场景
此集成允许您的代理在无需人工干预的情况下自动化各种数据库操作。通过将 Sim 与 Amazon RDS 连接,您可以构建能够在工作流中管理、更新和检索关系数据的代理——无需处理数据库基础设施或连接。
{/* MANUAL-CONTENT-END */}
## 使用说明
通过 Data API 将 Amazon RDS Aurora Serverless 集成到工作流中。可以查询、插入、更新、删除以及执行原始 SQL而无需管理数据库连接。
## 工具
### `rds_query`
使用数据 API 在 Amazon RDS 上执行 SELECT 查询
#### 输入
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `region` | string | 是 | AWS 区域 \(例如us-east-1\) |
| `accessKeyId` | string | 是 | AWS 访问密钥 ID |
| `secretAccessKey` | string | 是 | AWS 秘密访问密钥 |
| `resourceArn` | string | 是 | Aurora 数据库集群的 ARN |
| `secretArn` | string | 是 | 包含数据库凭据的 Secrets Manager 密钥的 ARN |
| `database` | string | 否 | 数据库名称 \(可选\) |
| `query` | string | 是 | 要执行的 SQL SELECT 查询 |
#### 输出
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `message` | string | 操作状态消息 |
| `rows` | array | 查询返回的行数组 |
| `rowCount` | number | 返回的行数 |
### `rds_insert`
使用数据 API 将数据插入 Amazon RDS 表
#### 输入
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `region` | string | 是 | AWS 区域 \(例如us-east-1\) |
| `accessKeyId` | string | 是 | AWS 访问密钥 ID |
| `secretAccessKey` | string | 是 | AWS 秘密访问密钥 |
| `resourceArn` | string | 是 | Aurora 数据库集群的 ARN |
| `secretArn` | string | 是 | 包含数据库凭据的 Secrets Manager 密钥的 ARN |
| `database` | string | 否 | 数据库名称 \(可选\) |
| `table` | string | 是 | 要插入的表名 |
| `data` | object | 是 | 要插入的数据,作为键值对 |
#### 输出
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `message` | string | 操作状态消息 |
| `rows` | array | 插入行的数组 |
| `rowCount` | number | 插入的行数 |
### `rds_update`
使用 Data API 更新 Amazon RDS 表中的数据
#### 输入
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `region` | string | 是 | AWS 区域 \(例如us-east-1\) |
| `accessKeyId` | string | 是 | AWS 访问密钥 ID |
| `secretAccessKey` | string | 是 | AWS 秘密访问密钥 |
| `resourceArn` | string | 是 | Aurora 数据库集群的 ARN |
| `secretArn` | string | 是 | 包含数据库凭据的 Secrets Manager 密钥的 ARN |
| `database` | string | 否 | 数据库名称 \(可选\) |
| `table` | string | 是 | 要更新的表名 |
| `data` | object | 是 | 要更新的数据,作为键值对 |
| `conditions` | object | 是 | 更新条件 \(例如,\{"id": 1\}\) |
#### 输出
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `message` | string | 操作状态消息 |
| `rows` | array | 更新行的数组 |
| `rowCount` | number | 更新的行数 |
### `rds_delete`
使用 Data API 从 Amazon RDS 表中删除数据
#### 输入
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `region` | string | 是 | AWS 区域 \(例如us-east-1\) |
| `accessKeyId` | string | 是 | AWS 访问密钥 ID |
| `secretAccessKey` | string | 是 | AWS 秘密访问密钥 |
| `resourceArn` | string | 是 | Aurora 数据库集群的 ARN |
| `secretArn` | string | 是 | 包含数据库凭据的 Secrets Manager 密钥的 ARN |
| `database` | string | 否 | 数据库名称 \(可选\) |
| `table` | string | 是 | 要删除的表名 |
| `conditions` | object | 是 | 删除条件 \(例如,\{"id": 1\}\) |
#### 输出
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `message` | string | 操作状态消息 |
| `rows` | array | 已删除行的数组 |
| `rowCount` | number | 已删除行的数量 |
### `rds_execute`
使用 Data API 在 Amazon RDS 上执行原始 SQL
#### 输入
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `region` | string | 是 | AWS 区域 \(例如us-east-1\) |
| `accessKeyId` | string | 是 | AWS 访问密钥 ID |
| `secretAccessKey` | string | 是 | AWS 秘密访问密钥 |
| `resourceArn` | string | 是 | Aurora 数据库集群的 ARN |
| `secretArn` | string | 是 | 包含数据库凭据的 Secrets Manager 密钥的 ARN |
| `database` | string | 否 | 数据库名称 \(可选\) |
| `query` | string | 是 | 要执行的原始 SQL 查询 |
#### 输出
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `message` | string | 操作状态消息 |
| `rows` | array | 返回或受影响的行数组 |
| `rowCount` | number | 受影响的行数 |
## 注意
- 类别: `tools`
- 类型: `rds`

View File

@@ -7,7 +7,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
<BlockInfoCard
type="s3"
color="#E0E0E0"
color="linear-gradient(45deg, #1B660F 0%, #6CAE3E 100%)"
/>
{/* MANUAL-CONTENT-START:intro */}

View File

@@ -1028,7 +1028,7 @@ checksums:
meta/title: cce1ae862f9851c02137f7be070e87bf
meta/description: 9c24136d13767cf42d598ecd2cd7895b
content/0: 1b031fb0c62c46b177aeed5c3d3f8f80
content/1: 5cc75c9b77c8b8ee90fd3727b3b3e71a
content/1: 4897888e9b93f43cfa08f08e01d63d45
content/2: bd6df7d7d47e2f5a3562df04bb4c2be5
content/3: a8184d3faf141c4c38d8a31b6374830d
content/4: b0425d5c200cae7c869529ea3b8f7214
@@ -47252,7 +47252,7 @@ checksums:
meta/title: b0301322c66fcbf604c6988c11a8a0b6
meta/description: 54233683a87a944c333d0a27a15f297e
content/0: 1b031fb0c62c46b177aeed5c3d3f8f80
content/1: 0aefa3b41a9d2ecaf2cfafe6818ed5d2
content/1: 64159072101de51ad1e456dc76936fd0
content/2: 3f99340b6a2b22d8f91d8cabd457f4f5
content/3: e64b467b3c7f0ade59c79c0a9a8da002
content/4: a639faec4ba8d6237dd700c4c986f8cd
@@ -47386,3 +47386,101 @@ checksums:
content/14: 387026e7559d9305d0c39edb833e5dcc
content/15: b3f310d5ef115bea5a8b75bf25d7ea9a
content/16: 448c1ded449bcd1a71f9b589990e1e63
0329dfb025ed7a18c4270a67b8e53e1d:
meta/title: 985458a8500ac43c5066b77c5b7172a7
meta/description: 3a9a5e355c6305088436e9e5295e5e74
content/0: 1b031fb0c62c46b177aeed5c3d3f8f80
content/1: 69eb63bb56f5c92f9a06a409fd06e127
content/2: ceb73025bb48cd3988b5b75eef739ff8
content/3: 155060ca67bead6a56e501f66d2a6f3e
content/4: 7b84fdc9aa957bab919fe8e445a00127
content/5: 35bef9915378b9fae2950c43b28d4c66
content/6: c037e5ef2321d91a39c29c68b423e7d0
content/7: 805694c6320ddd125301f4bd80948bc4
content/8: 821e6394b0a953e2b0842b04ae8f3105
content/9: 7b3b50d86217fa5327e2060db6dc79b1
content/10: 9c8aa3f09c9b2bd50ea4cdff3598ea4e
content/11: 4a83970297f02d066a140ace7a3ea574
content/12: 3d0fd2cbd2fd3e61f4dfb545c979cc96
content/13: 371d0e46b4bd2c23f559b8bc112f6955
content/14: c6324e539565645847c9b7dc307edbb7
content/15: bcadfc362b69078beee0088e5936c98b
content/16: d2ae8b29edb03c531de32ab61bdb8199
content/17: afae946bba1f0a5067cdeacb54f5ff31
content/18: 9a9d552a9a22b6bd6ee4817cf156548c
content/19: 371d0e46b4bd2c23f559b8bc112f6955
content/20: 26c5931909354e24571974ccfd8e18f8
content/21: bcadfc362b69078beee0088e5936c98b
content/22: a6062bdeb33b01cee6c6341254b4f2ad
content/23: 26f3623886a41211d0f929ea6877c370
content/24: b7e6e86ed0a93dda08569bf6151ee889
content/25: 371d0e46b4bd2c23f559b8bc112f6955
content/26: 00608072da9103c89fe5a185645516d0
content/27: bcadfc362b69078beee0088e5936c98b
content/28: 1afd7403b0fe00913c06e1d69761b7eb
content/29: acf650b1fbe371415a38e1740cba105d
content/30: 01f378c57892b72e3d2d275aca9eaadf
content/31: 371d0e46b4bd2c23f559b8bc112f6955
content/32: abedb3d9f6ed8f86b76d315d08a2e42b
content/33: bcadfc362b69078beee0088e5936c98b
content/34: 8000c9a9f17a94f6145ebf73becfe558
content/35: f4a9c229ff71084944a3a7684369a01f
content/36: 7adc475d3c445bd57a77aedb9616da9a
content/37: 371d0e46b4bd2c23f559b8bc112f6955
content/38: 48c59e09ee36b3d9af3313be2ae5c6d0
content/39: bcadfc362b69078beee0088e5936c98b
content/40: 59480e97be4e274ddfe5dd8d7f695f05
content/41: b3f310d5ef115bea5a8b75bf25d7ea9a
content/42: 901ec146345636911d3cc074b6ebfd74
451a43cd6440c2447809c9fdc08c7829:
meta/title: cf7ddc77722328e80e5c60d3f42d5577
meta/description: b6a942fcfafc8821473cacceb558b1f2
content/0: 1b031fb0c62c46b177aeed5c3d3f8f80
content/1: 4cf45dd008600c03d0c0549a05110d19
content/2: 1543a4668fafc72bbba8fe509d5dae57
content/3: aac6c43b00d999ae7b17b75ef4dc4fc0
content/4: d083836bb2cd4e5a2876b554e3cd4ae8
content/5: f1fad0adc2cd25d9a94d5e8d3d275a95
content/6: 228f96649fa48a0fd2d234d21670ce2f
content/7: 5c2e954b6ee98bea3f3fc6245549c362
content/8: 821e6394b0a953e2b0842b04ae8f3105
content/9: b57dad4eb1172e3b0f53009b7d1da96e
content/10: 9c8aa3f09c9b2bd50ea4cdff3598ea4e
content/11: 8562eed524a2e830528798b198c96561
content/12: 6d9d0007b39670c814a81d610501932e
content/13: 371d0e46b4bd2c23f559b8bc112f6955
content/14: 6bf3965f5e253d978b652829301399dc
content/15: bcadfc362b69078beee0088e5936c98b
content/16: b7d1fb5e3ccc4a184957e304704a403a
content/17: 808c733932b8cce795b7af43940d88fb
content/18: bd99763a4125a2964039ae6220cfa9b8
content/19: 371d0e46b4bd2c23f559b8bc112f6955
content/20: 058c6fe90a3d5d08068c818c6ab1bce1
content/21: bcadfc362b69078beee0088e5936c98b
content/22: 55600ea367d0b75b0d731dfafe3c4d03
content/23: af471c6ba3cf808dc02acc3aa174c6ac
content/24: 6cf95280ce4e38cbb1236063867bb681
content/25: 371d0e46b4bd2c23f559b8bc112f6955
content/26: e8e70139db1670b1cce1a481ee6a4fec
content/27: bcadfc362b69078beee0088e5936c98b
content/28: f368f6303c8e1cd9670addb972c40dc7
content/29: bc15e59ce2303dafb4f903468041ebfa
content/30: 59c94fb79703463b63635dc5adf9dea8
content/31: 371d0e46b4bd2c23f559b8bc112f6955
content/32: ff866c458970452e2d9d0b418ece0466
content/33: bcadfc362b69078beee0088e5936c98b
content/34: f368f6303c8e1cd9670addb972c40dc7
content/35: 32e29c637f05979f7609c5275ad8b4d6
content/36: 667d37e37c9f801b9aabe30ad900686d
content/37: 371d0e46b4bd2c23f559b8bc112f6955
content/38: 7c963e0dcecc7000e73fa5a47a138953
content/39: bcadfc362b69078beee0088e5936c98b
content/40: 26051148e989cb79677c897f49d4f226
content/41: 62cc98976187ecb6d598f16648eb4604
content/42: e095759a2cc2de3b86130dfc21e87ff9
content/43: 371d0e46b4bd2c23f559b8bc112f6955
content/44: f5084008138beb64b1321b1bff0b6ccd
content/45: bcadfc362b69078beee0088e5936c98b
content/46: 1696af7fda8206f857591de089cea25c
content/47: b3f310d5ef115bea5a8b75bf25d7ea9a
content/48: 076d05c494cf5c494ed98e011b27b289

View File

@@ -1,4 +1,4 @@
import { cn } from '@/lib/utils'
import { cn } from '@/lib/core/utils/cn'
import AuthBackgroundSVG from '@/app/(auth)/components/auth-background-svg'
type AuthBackgroundProps = {

View File

@@ -1,7 +1,7 @@
'use server'
import { env } from '@/lib/env'
import { isProd } from '@/lib/environment'
import { env } from '@/lib/core/config/env'
import { isProd } from '@/lib/core/config/environment'
export async function getOAuthProviderStatus() {
const githubAvailable = !!(env.GITHUB_CLIENT_ID && env.GITHUB_CLIENT_SECRET)

View File

@@ -3,7 +3,7 @@
import { type ReactNode, useEffect, useState } from 'react'
import { GithubIcon, GoogleIcon } from '@/components/icons'
import { Button } from '@/components/ui/button'
import { client } from '@/lib/auth-client'
import { client } from '@/lib/auth/auth-client'
import { inter } from '@/app/_styles/fonts/inter/inter'
interface SocialLoginButtonsProps {

View File

@@ -2,8 +2,8 @@
import { useRouter } from 'next/navigation'
import { Button } from '@/components/ui/button'
import { getEnv, isTruthy } from '@/lib/env'
import { cn } from '@/lib/utils'
import { getEnv, isTruthy } from '@/lib/core/config/env'
import { cn } from '@/lib/core/utils/cn'
interface SSOLoginButtonProps {
callbackURL?: string

View File

@@ -14,12 +14,12 @@ import {
} from '@/components/ui/dialog'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
import { client } from '@/lib/auth-client'
import { quickValidateEmail } from '@/lib/email/validation'
import { getEnv, isFalsy, isTruthy } from '@/lib/env'
import { client } from '@/lib/auth/auth-client'
import { getEnv, isFalsy, isTruthy } from '@/lib/core/config/env'
import { cn } from '@/lib/core/utils/cn'
import { getBaseUrl } from '@/lib/core/utils/urls'
import { createLogger } from '@/lib/logs/console/logger'
import { getBaseUrl } from '@/lib/urls/utils'
import { cn } from '@/lib/utils'
import { quickValidateEmail } from '@/lib/messaging/email/validation'
import { inter } from '@/app/_styles/fonts/inter/inter'
import { soehne } from '@/app/_styles/fonts/soehne/soehne'
import { SocialLoginButtons } from '@/app/(auth)/components/social-login-buttons'

View File

@@ -5,7 +5,7 @@ import { ArrowRight, ChevronRight, Eye, EyeOff } from 'lucide-react'
import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
import { cn } from '@/lib/utils'
import { cn } from '@/lib/core/utils/cn'
import { inter } from '@/app/_styles/fonts/inter/inter'
interface RequestResetFormProps {

View File

@@ -1,4 +1,4 @@
import { env, isTruthy } from '@/lib/env'
import { env, isTruthy } from '@/lib/core/config/env'
import { getOAuthProviderStatus } from '@/app/(auth)/components/oauth-provider-checker'
import SignupForm from '@/app/(auth)/signup/signup-form'

View File

@@ -7,11 +7,11 @@ import { useRouter, useSearchParams } from 'next/navigation'
import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
import { client, useSession } from '@/lib/auth-client'
import { quickValidateEmail } from '@/lib/email/validation'
import { getEnv, isFalsy, isTruthy } from '@/lib/env'
import { client, useSession } from '@/lib/auth/auth-client'
import { getEnv, isFalsy, isTruthy } from '@/lib/core/config/env'
import { cn } from '@/lib/core/utils/cn'
import { createLogger } from '@/lib/logs/console/logger'
import { cn } from '@/lib/utils'
import { quickValidateEmail } from '@/lib/messaging/email/validation'
import { inter } from '@/app/_styles/fonts/inter/inter'
import { soehne } from '@/app/_styles/fonts/soehne/soehne'
import { SocialLoginButtons } from '@/app/(auth)/components/social-login-buttons'

View File

@@ -1,5 +1,5 @@
import { redirect } from 'next/navigation'
import { getEnv, isTruthy } from '@/lib/env'
import { getEnv, isTruthy } from '@/lib/core/config/env'
import SSOForm from '@/app/(auth)/sso/sso-form'
export const dynamic = 'force-dynamic'

View File

@@ -6,11 +6,11 @@ import { useRouter, useSearchParams } from 'next/navigation'
import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input'
import { Label } from '@/components/ui/label'
import { client } from '@/lib/auth-client'
import { quickValidateEmail } from '@/lib/email/validation'
import { env, isFalsy } from '@/lib/env'
import { client } from '@/lib/auth/auth-client'
import { env, isFalsy } from '@/lib/core/config/env'
import { cn } from '@/lib/core/utils/cn'
import { createLogger } from '@/lib/logs/console/logger'
import { cn } from '@/lib/utils'
import { quickValidateEmail } from '@/lib/messaging/email/validation'
import { inter } from '@/app/_styles/fonts/inter/inter'
import { soehne } from '@/app/_styles/fonts/soehne/soehne'

View File

@@ -1,5 +1,5 @@
import { hasEmailService } from '@/lib/email/mailer'
import { isEmailVerificationEnabled, isProd } from '@/lib/environment'
import { isEmailVerificationEnabled, isProd } from '@/lib/core/config/environment'
import { hasEmailService } from '@/lib/messaging/email/mailer'
import { VerifyContent } from '@/app/(auth)/verify/verify-content'
export const dynamic = 'force-dynamic'

View File

@@ -2,7 +2,7 @@
import { useEffect, useState } from 'react'
import { useRouter, useSearchParams } from 'next/navigation'
import { client, useSession } from '@/lib/auth-client'
import { client, useSession } from '@/lib/auth/auth-client'
import { createLogger } from '@/lib/logs/console/logger'
const logger = createLogger('useVerification')

View File

@@ -4,7 +4,7 @@ import { Suspense, useEffect, useState } from 'react'
import { useRouter } from 'next/navigation'
import { Button } from '@/components/ui/button'
import { InputOTP, InputOTPGroup, InputOTPSlot } from '@/components/ui/input-otp'
import { cn } from '@/lib/utils'
import { cn } from '@/lib/core/utils/cn'
import { inter } from '@/app/_styles/fonts/inter/inter'
import { soehne } from '@/app/_styles/fonts/soehne/soehne'
import { useVerification } from '@/app/(auth)/verify/use-verification'

View File

@@ -13,10 +13,10 @@ import {
SelectValue,
} from '@/components/ui/select'
import { Textarea } from '@/components/ui/textarea'
import { quickValidateEmail } from '@/lib/email/validation'
import { isHosted } from '@/lib/environment'
import { isHosted } from '@/lib/core/config/environment'
import { cn } from '@/lib/core/utils/cn'
import { createLogger } from '@/lib/logs/console/logger'
import { cn } from '@/lib/utils'
import { quickValidateEmail } from '@/lib/messaging/email/validation'
import { soehne } from '@/app/_styles/fonts/soehne/soehne'
import Footer from '@/app/(landing)/components/footer/footer'
import Nav from '@/app/(landing)/components/nav/nav'

View File

@@ -1,5 +1,5 @@
import dynamic from 'next/dynamic'
import { cn } from '@/lib/utils'
import { cn } from '@/lib/core/utils/cn'
// Lazy load the SVG to reduce initial bundle size
const BackgroundSVG = dynamic(() => import('./background-svg'), {

View File

@@ -1,10 +1,39 @@
'use client'
import type { SVGProps } from 'react'
import Link from 'next/link'
import { StatusDotIcon } from '@/components/icons'
import type { StatusType } from '@/app/api/status/types'
import { useStatus } from '@/hooks/queries/status'
interface StatusDotIconProps extends SVGProps<SVGSVGElement> {
status: 'operational' | 'degraded' | 'outage' | 'maintenance' | 'loading' | 'error'
}
export function StatusDotIcon({ status, className, ...props }: StatusDotIconProps) {
const colors = {
operational: '#10B981',
degraded: '#F59E0B',
outage: '#EF4444',
maintenance: '#3B82F6',
loading: '#9CA3AF',
error: '#9CA3AF',
}
return (
<svg
xmlns='http://www.w3.org/2000/svg'
width={6}
height={6}
viewBox='0 0 6 6'
fill='none'
className={className}
{...props}
>
<circle cx={3} cy={3} r={3} fill={colors[status]} />
</svg>
)
}
const STATUS_COLORS: Record<StatusType, string> = {
operational: 'text-[#10B981] hover:text-[#059669]',
degraded: 'text-[#F59E0B] hover:text-[#D97706]',

View File

@@ -2,7 +2,7 @@
import type React from 'react'
import { useEffect, useId, useRef, useState } from 'react'
import { cn } from '@/lib/utils'
import { cn } from '@/lib/core/utils/cn'
/**
* DotPattern Component Props

View File

@@ -32,7 +32,7 @@ import {
StripeIcon,
SupabaseIcon,
} from '@/components/icons'
import { LandingPromptStorage } from '@/lib/browser-storage'
import { LandingPromptStorage } from '@/lib/core/utils/browser-storage'
import { soehne } from '@/app/_styles/fonts/soehne/soehne'
import {
CARD_WIDTH,

View File

@@ -12,8 +12,8 @@ import {
Workflow,
} from 'lucide-react'
import { useRouter } from 'next/navigation'
import { cn } from '@/lib/core/utils/cn'
import { createLogger } from '@/lib/logs/console/logger'
import { cn } from '@/lib/utils'
import { inter } from '@/app/_styles/fonts/inter/inter'
import {
ENTERPRISE_PLAN_FEATURES,

View File

@@ -1,6 +1,6 @@
'use client'
import { isHosted } from '@/lib/environment'
import { isHosted } from '@/lib/core/config/environment'
import { soehne } from '@/app/_styles/fonts/soehne/soehne'
import Footer from '@/app/(landing)/components/footer/footer'
import Nav from '@/app/(landing)/components/nav/nav'

View File

@@ -7,7 +7,7 @@ import Link from 'next/link'
import { useRouter } from 'next/navigation'
import { GithubIcon } from '@/components/icons'
import { useBrandConfig } from '@/lib/branding/branding'
import { isHosted } from '@/lib/environment'
import { isHosted } from '@/lib/core/config/environment'
import { createLogger } from '@/lib/logs/console/logger'
import { soehne } from '@/app/_styles/fonts/soehne/soehne'
import { getFormattedGitHubStars } from '@/app/(landing)/actions/github'

View File

@@ -2,7 +2,7 @@
import { useEffect } from 'react'
import Link from 'next/link'
import { getEnv } from '@/lib/env'
import { getEnv } from '@/lib/core/config/env'
import { LegalLayout } from '@/app/(landing)/components'
export default function PrivacyPolicy() {

View File

@@ -2,7 +2,7 @@
import { useEffect } from 'react'
import Link from 'next/link'
import { getEnv } from '@/lib/env'
import { getEnv } from '@/lib/core/config/env'
import { LegalLayout } from '@/app/(landing)/components'
export default function TermsOfService() {

View File

@@ -3,7 +3,7 @@
import { useEffect } from 'react'
import posthog from 'posthog-js'
import { PostHogProvider as PHProvider } from 'posthog-js/react'
import { getEnv, isTruthy } from '../../../lib/env'
import { getEnv, isTruthy } from '@/lib/core/config/env'
export function PostHogProvider({ children }: { children: React.ReactNode }) {
useEffect(() => {

View File

@@ -3,7 +3,7 @@
import type React from 'react'
import { createContext, useCallback, useEffect, useMemo, useState } from 'react'
import posthog from 'posthog-js'
import { client } from '@/lib/auth-client'
import { client } from '@/lib/auth/auth-client'
export type AppSession = {
user: {

View File

@@ -305,24 +305,20 @@ export function createMockRequest(
}
export function mockExecutionDependencies() {
vi.mock('@/lib/utils', async () => {
const actual = await vi.importActual('@/lib/utils')
return {
...(actual as any),
decryptSecret: vi.fn().mockImplementation((encrypted: string) => {
const entries = Object.entries(mockEnvironmentVars)
const found = entries.find(([_, val]) => val === encrypted)
const key = found ? found[0] : null
vi.mock('@/lib/core/security/encryption', () => ({
decryptSecret: vi.fn().mockImplementation((encrypted: string) => {
const entries = Object.entries(mockEnvironmentVars)
const found = entries.find(([_, val]) => val === encrypted)
const key = found ? found[0] : null
return Promise.resolve({
decrypted:
key && key in mockDecryptedEnvVars
? mockDecryptedEnvVars[key as keyof typeof mockDecryptedEnvVars]
: 'decrypted-value',
})
}),
}
})
return Promise.resolve({
decrypted:
key && key in mockDecryptedEnvVars
? mockDecryptedEnvVars[key as keyof typeof mockDecryptedEnvVars]
: 'decrypted-value',
})
}),
}))
vi.mock('@/lib/logs/execution/trace-spans/trace-spans', () => ({
buildTraceSpans: vi.fn().mockReturnValue({
@@ -455,7 +451,7 @@ export function mockWorkflowAccessValidation(shouldSucceed = true) {
}
export async function getMockedDependencies() {
const utilsModule = await import('@/lib/utils')
const encryptionModule = await import('@/lib/core/security/encryption')
const traceSpansModule = await import('@/lib/logs/execution/trace-spans/trace-spans')
const workflowUtilsModule = await import('@/lib/workflows/utils')
const executorModule = await import('@/executor')
@@ -463,7 +459,7 @@ export async function getMockedDependencies() {
const dbModule = await import('@sim/db')
return {
decryptSecret: utilsModule.decryptSecret,
decryptSecret: encryptionModule.decryptSecret,
buildTraceSpans: traceSpansModule.buildTraceSpans,
updateWorkflowRunCounts: workflowUtilsModule.updateWorkflowRunCounts,
Executor: executorModule.Executor,
@@ -801,7 +797,7 @@ export function mockFileSystem(
export function mockEncryption(options: { encryptedValue?: string; decryptedValue?: string } = {}) {
const { encryptedValue = 'encrypted-value', decryptedValue = 'decrypted-value' } = options
vi.doMock('@/lib/utils', () => ({
vi.doMock('@/lib/core/security/encryption', () => ({
encryptSecret: vi.fn().mockResolvedValue({ encrypted: encryptedValue }),
decryptSecret: vi.fn().mockResolvedValue({ decrypted: decryptedValue }),
}))

View File

@@ -3,10 +3,10 @@ import { eq } from 'drizzle-orm'
import { jwtDecode } from 'jwt-decode'
import { type NextRequest, NextResponse } from 'next/server'
import { getSession } from '@/lib/auth'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import type { OAuthProvider } from '@/lib/oauth/oauth'
import { evaluateScopeCoverage, parseProvider } from '@/lib/oauth/oauth'
import { generateRequestId } from '@/lib/utils'
const logger = createLogger('OAuthConnectionsAPI')

View File

@@ -5,10 +5,10 @@ import { jwtDecode } from 'jwt-decode'
import { type NextRequest, NextResponse } from 'next/server'
import { z } from 'zod'
import { checkHybridAuth } from '@/lib/auth/hybrid'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import { evaluateScopeCoverage, parseProvider } from '@/lib/oauth/oauth'
import { getUserEntityPermissions } from '@/lib/permissions/utils'
import { generateRequestId } from '@/lib/utils'
import { getUserEntityPermissions } from '@/lib/workspaces/permissions/utils'
export const dynamic = 'force-dynamic'

View File

@@ -4,8 +4,8 @@ import { and, eq, like, or } from 'drizzle-orm'
import { type NextRequest, NextResponse } from 'next/server'
import { z } from 'zod'
import { getSession } from '@/lib/auth'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import { generateRequestId } from '@/lib/utils'
export const dynamic = 'force-dynamic'

View File

@@ -1,8 +1,8 @@
import { type NextRequest, NextResponse } from 'next/server'
import { authorizeCredentialUse } from '@/lib/auth/credential-access'
import { validateMicrosoftGraphId } from '@/lib/core/security/input-validation'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import { validateMicrosoftGraphId } from '@/lib/security/input-validation'
import { generateRequestId } from '@/lib/utils'
import { getCredential, refreshAccessTokenIfNeeded } from '@/app/api/auth/oauth/utils'
export const dynamic = 'force-dynamic'

View File

@@ -1,7 +1,7 @@
import { type NextRequest, NextResponse } from 'next/server'
import { authorizeCredentialUse } from '@/lib/auth/credential-access'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import { generateRequestId } from '@/lib/utils'
import { getCredential, refreshAccessTokenIfNeeded } from '@/app/api/auth/oauth/utils'
export const dynamic = 'force-dynamic'

View File

@@ -2,8 +2,8 @@ import { type NextRequest, NextResponse } from 'next/server'
import { z } from 'zod'
import { authorizeCredentialUse } from '@/lib/auth/credential-access'
import { checkHybridAuth } from '@/lib/auth/hybrid'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import { generateRequestId } from '@/lib/utils'
import { getCredential, refreshTokenIfNeeded } from '@/app/api/auth/oauth/utils'
export const dynamic = 'force-dynamic'

View File

@@ -3,9 +3,9 @@ import { account } from '@sim/db/schema'
import { eq } from 'drizzle-orm'
import { type NextRequest, NextResponse } from 'next/server'
import { getSession } from '@/lib/auth'
import { validateEnum, validatePathSegment } from '@/lib/core/security/input-validation'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import { validateEnum, validatePathSegment } from '@/lib/security/input-validation'
import { generateRequestId } from '@/lib/utils'
import { refreshAccessTokenIfNeeded } from '@/app/api/auth/oauth/utils'
export const dynamic = 'force-dynamic'

View File

@@ -3,8 +3,8 @@ import { account } from '@sim/db/schema'
import { eq } from 'drizzle-orm'
import { type NextRequest, NextResponse } from 'next/server'
import { getSession } from '@/lib/auth'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import { generateRequestId } from '@/lib/utils'
import { refreshAccessTokenIfNeeded } from '@/app/api/auth/oauth/utils'
export const dynamic = 'force-dynamic'

View File

@@ -1,7 +1,7 @@
import { type NextRequest, NextResponse } from 'next/server'
import { z } from 'zod'
import { auth } from '@/lib/auth'
import { env } from '@/lib/env'
import { env } from '@/lib/core/config/env'
import { createLogger } from '@/lib/logs/console/logger'
const logger = createLogger('SSO-Register')

View File

@@ -1,8 +1,8 @@
import { type NextRequest, NextResponse } from 'next/server'
import { getSession } from '@/lib/auth'
import { env } from '@/lib/env'
import { env } from '@/lib/core/config/env'
import { getBaseUrl } from '@/lib/core/utils/urls'
import { createLogger } from '@/lib/logs/console/logger'
import { getBaseUrl } from '@/lib/urls/utils'
const logger = createLogger('TrelloAuthorize')

View File

@@ -1,5 +1,5 @@
import { type NextRequest, NextResponse } from 'next/server'
import { getBaseUrl } from '@/lib/urls/utils'
import { getBaseUrl } from '@/lib/core/utils/urls'
export const dynamic = 'force-dynamic'

View File

@@ -1,7 +1,7 @@
import { and, eq } from 'drizzle-orm'
import { type NextRequest, NextResponse } from 'next/server'
import { getSession } from '@/lib/auth'
import { env } from '@/lib/env'
import { env } from '@/lib/core/config/env'
import { createLogger } from '@/lib/logs/console/logger'
import { db } from '@/../../packages/db'
import { account } from '@/../../packages/db/schema'

View File

@@ -4,8 +4,8 @@ import { and, eq, or } from 'drizzle-orm'
import { type NextRequest, NextResponse } from 'next/server'
import { getSession } from '@/lib/auth'
import { requireStripeClient } from '@/lib/billing/stripe-client'
import { getBaseUrl } from '@/lib/core/utils/urls'
import { createLogger } from '@/lib/logs/console/logger'
import { getBaseUrl } from '@/lib/urls/utils'
const logger = createLogger('BillingPortal')

View File

@@ -5,9 +5,9 @@ import { type NextRequest, NextResponse } from 'next/server'
import { z } from 'zod'
import { checkAndBillOverageThreshold } from '@/lib/billing/threshold-billing'
import { checkInternalApiKey } from '@/lib/copilot/utils'
import { isBillingEnabled } from '@/lib/environment'
import { isBillingEnabled } from '@/lib/core/config/environment'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import { generateRequestId } from '@/lib/utils'
const logger = createLogger('BillingUpdateCostAPI')

View File

@@ -3,9 +3,9 @@ import { type NextRequest, NextResponse } from 'next/server'
import { z } from 'zod'
import CareersConfirmationEmail from '@/components/emails/careers/careers-confirmation-email'
import CareersSubmissionEmail from '@/components/emails/careers/careers-submission-email'
import { sendEmail } from '@/lib/email/mailer'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import { generateRequestId } from '@/lib/utils'
import { sendEmail } from '@/lib/messaging/email/mailer'
export const dynamic = 'force-dynamic'

View File

@@ -4,10 +4,10 @@ import { eq } from 'drizzle-orm'
import type { NextRequest } from 'next/server'
import { z } from 'zod'
import { renderOTPEmail } from '@/components/emails/render-email'
import { sendEmail } from '@/lib/email/mailer'
import { getRedisClient, markMessageAsProcessed, releaseLock } from '@/lib/core/config/redis'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import { getRedisClient, markMessageAsProcessed, releaseLock } from '@/lib/redis'
import { generateRequestId } from '@/lib/utils'
import { sendEmail } from '@/lib/messaging/email/mailer'
import { addCorsHeaders, setChatAuthCookie } from '@/app/api/chat/utils'
import { createErrorResponse, createSuccessResponse } from '@/app/api/workflows/utils'

View File

@@ -53,17 +53,20 @@ vi.mock('@/lib/logs/execution/logging-session', () => ({
})),
}))
vi.mock('@/lib/workflows/streaming', () => ({
vi.mock('@/lib/workflows/streaming/streaming', () => ({
createStreamingResponse: vi.fn().mockImplementation(async () => createMockStream()),
}))
vi.mock('@/lib/utils', () => ({
vi.mock('@/lib/core/utils/sse', () => ({
SSE_HEADERS: {
'Content-Type': 'text/event-stream',
'Cache-Control': 'no-cache',
Connection: 'keep-alive',
'X-Accel-Buffering': 'no',
},
}))
vi.mock('@/lib/core/utils/request', () => ({
generateRequestId: vi.fn().mockReturnValue('test-request-id'),
}))
@@ -388,7 +391,7 @@ describe('Chat Identifier API Route', () => {
const params = Promise.resolve({ identifier: 'test-chat' })
const { POST } = await import('@/app/api/chat/[identifier]/route')
const { createStreamingResponse } = await import('@/lib/workflows/streaming')
const { createStreamingResponse } = await import('@/lib/workflows/streaming/streaming')
const response = await POST(req, { params })
@@ -440,7 +443,7 @@ describe('Chat Identifier API Route', () => {
})
it('should handle workflow execution errors gracefully', async () => {
const { createStreamingResponse } = await import('@/lib/workflows/streaming')
const { createStreamingResponse } = await import('@/lib/workflows/streaming/streaming')
const originalStreamingResponse = vi.mocked(createStreamingResponse).getMockImplementation()
vi.mocked(createStreamingResponse).mockImplementationOnce(async () => {
throw new Error('Execution failed')
@@ -492,7 +495,7 @@ describe('Chat Identifier API Route', () => {
const params = Promise.resolve({ identifier: 'test-chat' })
const { POST } = await import('@/app/api/chat/[identifier]/route')
const { createStreamingResponse } = await import('@/lib/workflows/streaming')
const { createStreamingResponse } = await import('@/lib/workflows/streaming/streaming')
await POST(req, { params })
@@ -511,7 +514,7 @@ describe('Chat Identifier API Route', () => {
const params = Promise.resolve({ identifier: 'test-chat' })
const { POST } = await import('@/app/api/chat/[identifier]/route')
const { createStreamingResponse } = await import('@/lib/workflows/streaming')
const { createStreamingResponse } = await import('@/lib/workflows/streaming/streaming')
await POST(req, { params })

View File

@@ -4,11 +4,11 @@ import { chat } from '@sim/db/schema'
import { eq } from 'drizzle-orm'
import { type NextRequest, NextResponse } from 'next/server'
import { z } from 'zod'
import { generateRequestId } from '@/lib/core/utils/request'
import { preprocessExecution } from '@/lib/execution/preprocessing'
import { createLogger } from '@/lib/logs/console/logger'
import { LoggingSession } from '@/lib/logs/execution/logging-session'
import { ChatFiles } from '@/lib/uploads'
import { generateRequestId } from '@/lib/utils'
import {
addCorsHeaders,
setChatAuthCookie,
@@ -182,8 +182,8 @@ export async function POST(
}
}
const { createStreamingResponse } = await import('@/lib/workflows/streaming')
const { SSE_HEADERS } = await import('@/lib/utils')
const { createStreamingResponse } = await import('@/lib/workflows/streaming/streaming')
const { SSE_HEADERS } = await import('@/lib/core/utils/sse')
const { createFilteredResult } = await import('@/app/api/workflows/[id]/execute/route')
const workflowInput: any = { input, conversationId }

View File

@@ -69,15 +69,15 @@ describe('Chat Edit API Route', () => {
}),
}))
vi.doMock('@/lib/utils', () => ({
vi.doMock('@/lib/core/security/encryption', () => ({
encryptSecret: mockEncryptSecret.mockResolvedValue({ encrypted: 'encrypted-password' }),
}))
vi.doMock('@/lib/urls/utils', () => ({
vi.doMock('@/lib/core/utils/urls', () => ({
getEmailDomain: vi.fn().mockReturnValue('localhost:3000'),
}))
vi.doMock('@/lib/environment', () => ({
vi.doMock('@/lib/core/config/environment', () => ({
isDev: true,
}))
@@ -86,7 +86,7 @@ describe('Chat Edit API Route', () => {
}))
mockDeployWorkflow.mockResolvedValue({ success: true, version: 1 })
vi.doMock('@/lib/workflows/db-helpers', () => ({
vi.doMock('@/lib/workflows/persistence/utils', () => ({
deployWorkflow: mockDeployWorkflow,
}))

View File

@@ -4,11 +4,11 @@ import { eq } from 'drizzle-orm'
import type { NextRequest } from 'next/server'
import { z } from 'zod'
import { getSession } from '@/lib/auth'
import { isDev } from '@/lib/environment'
import { isDev } from '@/lib/core/config/environment'
import { encryptSecret } from '@/lib/core/security/encryption'
import { getEmailDomain } from '@/lib/core/utils/urls'
import { createLogger } from '@/lib/logs/console/logger'
import { getEmailDomain } from '@/lib/urls/utils'
import { encryptSecret } from '@/lib/utils'
import { deployWorkflow } from '@/lib/workflows/db-helpers'
import { deployWorkflow } from '@/lib/workflows/persistence/utils'
import { checkChatAccess } from '@/app/api/chat/utils'
import { createErrorResponse, createSuccessResponse } from '@/app/api/workflows/utils'

View File

@@ -66,7 +66,7 @@ describe('Chat API Route', () => {
}),
}))
vi.doMock('@/lib/utils', () => ({
vi.doMock('@/lib/core/security/encryption', () => ({
encryptSecret: mockEncryptSecret.mockResolvedValue({ encrypted: 'encrypted-password' }),
}))
@@ -78,7 +78,7 @@ describe('Chat API Route', () => {
checkWorkflowAccessForChatCreation: mockCheckWorkflowAccessForChatCreation,
}))
vi.doMock('@/lib/workflows/db-helpers', () => ({
vi.doMock('@/lib/workflows/persistence/utils', () => ({
deployWorkflow: mockDeployWorkflow.mockResolvedValue({
success: true,
version: 1,
@@ -249,7 +249,7 @@ describe('Chat API Route', () => {
}),
}))
vi.doMock('@/lib/env', () => ({
vi.doMock('@/lib/core/config/env', () => ({
env: {
NODE_ENV: 'development',
NEXT_PUBLIC_APP_URL: 'http://localhost:3000',
@@ -296,7 +296,7 @@ describe('Chat API Route', () => {
}),
}))
vi.doMock('@/lib/env', () => ({
vi.doMock('@/lib/core/config/env', () => ({
env: {
NODE_ENV: 'development',
NEXT_PUBLIC_APP_URL: 'http://localhost:3000',

View File

@@ -5,11 +5,11 @@ import type { NextRequest } from 'next/server'
import { v4 as uuidv4 } from 'uuid'
import { z } from 'zod'
import { getSession } from '@/lib/auth'
import { isDev } from '@/lib/environment'
import { isDev } from '@/lib/core/config/environment'
import { encryptSecret } from '@/lib/core/security/encryption'
import { getBaseUrl } from '@/lib/core/utils/urls'
import { createLogger } from '@/lib/logs/console/logger'
import { getBaseUrl } from '@/lib/urls/utils'
import { encryptSecret } from '@/lib/utils'
import { deployWorkflow } from '@/lib/workflows/db-helpers'
import { deployWorkflow } from '@/lib/workflows/persistence/utils'
import { checkWorkflowAccessForChatCreation } from '@/app/api/chat/utils'
import { createErrorResponse, createSuccessResponse } from '@/app/api/workflows/utils'

View File

@@ -5,7 +5,7 @@ import type { NextResponse } from 'next/server'
* @vitest-environment node
*/
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { env } from '@/lib/env'
import { env } from '@/lib/core/config/env'
vi.mock('@sim/db', () => ({
db: {
@@ -36,8 +36,11 @@ vi.mock('@/stores/workflows/server-utils', () => ({
const mockDecryptSecret = vi.fn()
vi.mock('@/lib/utils', () => ({
vi.mock('@/lib/core/security/encryption', () => ({
decryptSecret: mockDecryptSecret,
}))
vi.mock('@/lib/core/utils/request', () => ({
generateRequestId: vi.fn(),
}))
@@ -60,7 +63,7 @@ describe('Chat API Utils', () => {
},
})
vi.doMock('@/lib/environment', () => ({
vi.doMock('@/lib/core/config/environment', () => ({
isDev: true,
isHosted: false,
}))
@@ -229,7 +232,7 @@ describe('Chat API Utils', () => {
it('should validate password for POST requests', async () => {
const { validateChatAuth } = await import('@/app/api/chat/utils')
const { decryptSecret } = await import('@/lib/utils')
const { decryptSecret } = await import('@/lib/core/security/encryption')
const deployment = {
id: 'chat-id',

View File

@@ -2,10 +2,10 @@ import { db } from '@sim/db'
import { chat, workflow } from '@sim/db/schema'
import { eq } from 'drizzle-orm'
import type { NextRequest, NextResponse } from 'next/server'
import { isDev } from '@/lib/environment'
import { isDev } from '@/lib/core/config/environment'
import { decryptSecret } from '@/lib/core/security/encryption'
import { createLogger } from '@/lib/logs/console/logger'
import { hasAdminPermission } from '@/lib/permissions/utils'
import { decryptSecret } from '@/lib/utils'
import { hasAdminPermission } from '@/lib/workspaces/permissions/utils'
const logger = createLogger('ChatAuthUtils')

View File

@@ -1,8 +1,8 @@
import { type NextRequest, NextResponse } from 'next/server'
import { z } from 'zod'
import { getSession } from '@/lib/auth'
import { env } from '@/lib/env'
import { SIM_AGENT_API_URL_DEFAULT } from '@/lib/sim-agent/constants'
import { SIM_AGENT_API_URL_DEFAULT } from '@/lib/copilot/constants'
import { env } from '@/lib/core/config/env'
const GenerateApiKeySchema = z.object({}).optional()

View File

@@ -1,7 +1,7 @@
import { type NextRequest, NextResponse } from 'next/server'
import { getSession } from '@/lib/auth'
import { env } from '@/lib/env'
import { SIM_AGENT_API_URL_DEFAULT } from '@/lib/sim-agent/constants'
import { SIM_AGENT_API_URL_DEFAULT } from '@/lib/copilot/constants'
import { env } from '@/lib/core/config/env'
export async function GET(request: NextRequest) {
try {

View File

@@ -97,8 +97,11 @@ describe('Copilot Chat API Route', () => {
mockGetRotatingApiKey.mockReturnValue('test-api-key')
vi.doMock('@/lib/utils', () => ({
vi.doMock('@/lib/core/config/api-keys', () => ({
getRotatingApiKey: mockGetRotatingApiKey,
}))
vi.doMock('@/lib/core/utils/request', () => ({
generateRequestId: vi.fn(() => 'test-request-id'),
}))
@@ -110,7 +113,7 @@ describe('Copilot Chat API Route', () => {
NODE_ENV: 'test',
} as const
vi.doMock('@/lib/env', () => ({
vi.doMock('@/lib/core/config/env', () => ({
env: mockEnvValues,
getEnv: (variable: string) => mockEnvValues[variable as keyof typeof mockEnvValues],
isTruthy: (value: string | boolean | number | undefined) =>

View File

@@ -4,19 +4,19 @@ import { and, desc, eq } from 'drizzle-orm'
import { type NextRequest, NextResponse } from 'next/server'
import { z } from 'zod'
import { getSession } from '@/lib/auth'
import { generateChatTitle } from '@/lib/copilot/chat-title'
import { getCopilotModel } from '@/lib/copilot/config'
import { SIM_AGENT_API_URL_DEFAULT, SIM_AGENT_VERSION } from '@/lib/copilot/constants'
import {
authenticateCopilotRequestSessionOnly,
createBadRequestResponse,
createInternalServerErrorResponse,
createRequestTracker,
createUnauthorizedResponse,
} from '@/lib/copilot/auth'
import { getCopilotModel } from '@/lib/copilot/config'
} from '@/lib/copilot/request-helpers'
import type { CopilotProviderConfig } from '@/lib/copilot/types'
import { env } from '@/lib/env'
import { env } from '@/lib/core/config/env'
import { createLogger } from '@/lib/logs/console/logger'
import { SIM_AGENT_API_URL_DEFAULT, SIM_AGENT_VERSION } from '@/lib/sim-agent/constants'
import { generateChatTitle } from '@/lib/sim-agent/utils'
import { CopilotFiles } from '@/lib/uploads'
import { createFileContent } from '@/lib/uploads/utils/file-utils'

View File

@@ -9,7 +9,7 @@ import {
createNotFoundResponse,
createRequestTracker,
createUnauthorizedResponse,
} from '@/lib/copilot/auth'
} from '@/lib/copilot/request-helpers'
import { createLogger } from '@/lib/logs/console/logger'
const logger = createLogger('CopilotChatUpdateAPI')

View File

@@ -6,7 +6,7 @@ import {
authenticateCopilotRequestSessionOnly,
createInternalServerErrorResponse,
createUnauthorizedResponse,
} from '@/lib/copilot/auth'
} from '@/lib/copilot/request-helpers'
import { createLogger } from '@/lib/logs/console/logger'
const logger = createLogger('CopilotChatsListAPI')

View File

@@ -24,7 +24,7 @@ describe('Copilot Checkpoints Revert API Route', () => {
mockCryptoUuid()
// Mock getBaseUrl to return localhost for tests
vi.doMock('@/lib/urls/utils', () => ({
vi.doMock('@/lib/core/utils/urls', () => ({
getBaseUrl: vi.fn(() => 'http://localhost:3000'),
getBaseDomain: vi.fn(() => 'localhost:3000'),
getEmailDomain: vi.fn(() => 'localhost:3000'),

View File

@@ -9,10 +9,10 @@ import {
createNotFoundResponse,
createRequestTracker,
createUnauthorizedResponse,
} from '@/lib/copilot/auth'
} from '@/lib/copilot/request-helpers'
import { validateUUID } from '@/lib/core/security/input-validation'
import { getBaseUrl } from '@/lib/core/utils/urls'
import { createLogger } from '@/lib/logs/console/logger'
import { validateUUID } from '@/lib/security/input-validation'
import { getBaseUrl } from '@/lib/urls/utils'
const logger = createLogger('CheckpointRevertAPI')

View File

@@ -9,7 +9,7 @@ import {
createInternalServerErrorResponse,
createRequestTracker,
createUnauthorizedResponse,
} from '@/lib/copilot/auth'
} from '@/lib/copilot/request-helpers'
import { createLogger } from '@/lib/logs/console/logger'
const logger = createLogger('WorkflowCheckpointsAPI')

View File

@@ -28,27 +28,23 @@ describe('Copilot Confirm API Route', () => {
}
mockGetRedisClient.mockReturnValue(mockRedisClient)
mockRedisExists.mockResolvedValue(1) // Tool call exists by default
mockRedisExists.mockResolvedValue(1)
mockRedisSet.mockResolvedValue('OK')
vi.doMock('@/lib/redis', () => ({
vi.doMock('@/lib/core/config/redis', () => ({
getRedisClient: mockGetRedisClient,
}))
// Mock setTimeout to control polling behavior
vi.spyOn(global, 'setTimeout').mockImplementation((callback, _delay) => {
// Immediately call callback to avoid delays
if (typeof callback === 'function') {
setImmediate(callback)
}
return setTimeout(() => {}, 0) as any
})
// Mock Date.now to control timeout behavior
let mockTime = 1640995200000
vi.spyOn(Date, 'now').mockImplementation(() => {
// Increment time rapidly to trigger timeout for non-existent keys
mockTime += 10000 // Add 10 seconds each call
mockTime += 10000
return mockTime
})
})
@@ -82,7 +78,6 @@ describe('Copilot Confirm API Route', () => {
const req = createMockRequest('POST', {
status: 'success',
// Missing toolCallId
})
const { POST } = await import('@/app/api/copilot/confirm/route')
@@ -149,7 +144,6 @@ describe('Copilot Confirm API Route', () => {
status: 'success',
})
// Verify Redis operations were called
expect(mockRedisExists).toHaveBeenCalled()
expect(mockRedisSet).toHaveBeenCalled()
})
@@ -252,7 +246,6 @@ describe('Copilot Confirm API Route', () => {
const authMocks = mockAuth()
authMocks.setAuthenticated()
// Mock Redis client as unavailable
mockGetRedisClient.mockReturnValue(null)
const req = createMockRequest('POST', {
@@ -272,7 +265,6 @@ describe('Copilot Confirm API Route', () => {
const authMocks = mockAuth()
authMocks.setAuthenticated()
// Mock tool call as not existing in Redis
mockRedisExists.mockResolvedValue(0)
const req = createMockRequest('POST', {
@@ -292,7 +284,6 @@ describe('Copilot Confirm API Route', () => {
const authMocks = mockAuth()
authMocks.setAuthenticated()
// Mock Redis operations to throw an error
mockRedisExists.mockRejectedValue(new Error('Redis connection failed'))
const req = createMockRequest('POST', {
@@ -312,7 +303,6 @@ describe('Copilot Confirm API Route', () => {
const authMocks = mockAuth()
authMocks.setAuthenticated()
// Tool call exists but set operation fails
mockRedisExists.mockResolvedValue(1)
mockRedisSet.mockRejectedValue(new Error('Redis set failed'))
@@ -333,7 +323,6 @@ describe('Copilot Confirm API Route', () => {
const authMocks = mockAuth()
authMocks.setAuthenticated()
// Create a request with invalid JSON
const req = new NextRequest('http://localhost:3000/api/copilot/confirm', {
method: 'POST',
body: '{invalid-json',

View File

@@ -7,9 +7,9 @@ import {
createRequestTracker,
createUnauthorizedResponse,
type NotificationStatus,
} from '@/lib/copilot/auth'
} from '@/lib/copilot/request-helpers'
import { getRedisClient } from '@/lib/core/config/redis'
import { createLogger } from '@/lib/logs/console/logger'
import { getRedisClient } from '@/lib/redis'
const logger = createLogger('CopilotConfirmAPI')

View File

@@ -2,10 +2,10 @@ import { type NextRequest, NextResponse } from 'next/server'
import { z } from 'zod'
import { getSession } from '@/lib/auth'
import { getCopilotModel } from '@/lib/copilot/config'
import { SIM_AGENT_API_URL_DEFAULT } from '@/lib/copilot/constants'
import type { CopilotProviderConfig } from '@/lib/copilot/types'
import { env } from '@/lib/env'
import { env } from '@/lib/core/config/env'
import { createLogger } from '@/lib/logs/console/logger'
import { SIM_AGENT_API_URL_DEFAULT } from '@/lib/sim-agent/constants'
const logger = createLogger('ContextUsageAPI')

View File

@@ -6,7 +6,7 @@ import {
createInternalServerErrorResponse,
createRequestTracker,
createUnauthorizedResponse,
} from '@/lib/copilot/auth'
} from '@/lib/copilot/request-helpers'
import { routeExecution } from '@/lib/copilot/tools/server/router'
import { createLogger } from '@/lib/logs/console/logger'

View File

@@ -8,7 +8,7 @@ import {
createInternalServerErrorResponse,
createRequestTracker,
createUnauthorizedResponse,
} from '@/lib/copilot/auth'
} from '@/lib/copilot/request-helpers'
import { createLogger } from '@/lib/logs/console/logger'
const logger = createLogger('CopilotFeedbackAPI')

View File

@@ -1,14 +1,14 @@
import { type NextRequest, NextResponse } from 'next/server'
import { z } from 'zod'
import { SIM_AGENT_API_URL_DEFAULT } from '@/lib/copilot/constants'
import {
authenticateCopilotRequestSessionOnly,
createBadRequestResponse,
createInternalServerErrorResponse,
createRequestTracker,
createUnauthorizedResponse,
} from '@/lib/copilot/auth'
import { env } from '@/lib/env'
import { SIM_AGENT_API_URL_DEFAULT } from '@/lib/sim-agent/constants'
} from '@/lib/copilot/request-helpers'
import { env } from '@/lib/core/config/env'
const SIM_AGENT_API_URL = env.SIM_AGENT_API_URL || SIM_AGENT_API_URL_DEFAULT

View File

@@ -1,15 +1,15 @@
import { type NextRequest, NextResponse } from 'next/server'
import { z } from 'zod'
import { SIM_AGENT_API_URL_DEFAULT } from '@/lib/copilot/constants'
import {
authenticateCopilotRequestSessionOnly,
createBadRequestResponse,
createInternalServerErrorResponse,
createRequestTracker,
createUnauthorizedResponse,
} from '@/lib/copilot/auth'
import { env } from '@/lib/env'
} from '@/lib/copilot/request-helpers'
import { env } from '@/lib/core/config/env'
import { createLogger } from '@/lib/logs/console/logger'
import { SIM_AGENT_API_URL_DEFAULT } from '@/lib/sim-agent/constants'
const logger = createLogger('CopilotMarkToolCompleteAPI')

View File

@@ -1,6 +1,6 @@
import { type NextRequest, NextResponse } from 'next/server'
import { z } from 'zod'
import { env } from '@/lib/env'
import { env } from '@/lib/core/config/env'
import { createLogger } from '@/lib/logs/console/logger'
const logger = createLogger('CopilotTrainingExamplesAPI')

View File

@@ -1,6 +1,6 @@
import { type NextRequest, NextResponse } from 'next/server'
import { z } from 'zod'
import { env } from '@/lib/env'
import { env } from '@/lib/core/config/env'
import { createLogger } from '@/lib/logs/console/logger'
const logger = createLogger('CopilotTrainingAPI')

View File

@@ -4,8 +4,8 @@ import { and, eq, or } from 'drizzle-orm'
import { type NextRequest, NextResponse } from 'next/server'
import { z } from 'zod'
import { getSession } from '@/lib/auth'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import { generateRequestId } from '@/lib/utils'
const logger = createLogger('CreatorProfileByIdAPI')

View File

@@ -3,8 +3,8 @@ import { templateCreators, user } from '@sim/db/schema'
import { eq } from 'drizzle-orm'
import { type NextRequest, NextResponse } from 'next/server'
import { getSession } from '@/lib/auth'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import { generateRequestId } from '@/lib/utils'
const logger = createLogger('CreatorVerificationAPI')

View File

@@ -5,8 +5,8 @@ import { type NextRequest, NextResponse } from 'next/server'
import { v4 as uuidv4 } from 'uuid'
import { z } from 'zod'
import { getSession } from '@/lib/auth'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import { generateRequestId } from '@/lib/utils'
import type { CreatorProfileDetails } from '@/app/_types/creator-profile'
const logger = createLogger('CreatorProfilesAPI')

Some files were not shown because too many files have changed in this diff Show More