v0.5.30: vllm fixes, permissions fixes, isolated vms for code execution, tool fixes

This commit is contained in:
Waleed
2025-12-15 19:38:01 -08:00
committed by GitHub
116 changed files with 4218 additions and 2679 deletions

View File

@@ -130,6 +130,7 @@ When running with Docker, use `host.docker.internal` if vLLM is on your host mac
**Requirements:**
- [Bun](https://bun.sh/) runtime
- [Node.js](https://nodejs.org/) v20+ (required for sandboxed code execution)
- PostgreSQL 12+ with [pgvector extension](https://github.com/pgvector/pgvector) (required for AI embeddings)
**Note:** Sim uses vector embeddings for AI features like knowledge bases and semantic search, which requires the `pgvector` PostgreSQL extension.

View File

@@ -1,3 +1,4 @@
import type React from 'react'
import { findNeighbour } from 'fumadocs-core/page-tree'
import defaultMdxComponents from 'fumadocs-ui/mdx'
import { DocsBody, DocsDescription, DocsPage, DocsTitle } from 'fumadocs-ui/page'
@@ -10,14 +11,15 @@ import { LLMCopyButton } from '@/components/page-actions'
import { StructuredData } from '@/components/structured-data'
import { CodeBlock } from '@/components/ui/code-block'
import { Heading } from '@/components/ui/heading'
import { source } from '@/lib/source'
import { type PageData, source } from '@/lib/source'
export default async function Page(props: { params: Promise<{ slug?: string[]; lang: string }> }) {
const params = await props.params
const page = source.getPage(params.slug, params.lang)
if (!page) notFound()
const MDX = page.data.body
const data = page.data as PageData
const MDX = data.body
const baseUrl = 'https://docs.sim.ai'
const pageTreeRecord = source.pageTree as Record<string, any>
@@ -51,7 +53,7 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l
if (index === urlParts.length - 1) {
breadcrumbs.push({
name: page.data.title,
name: data.title,
url: `${baseUrl}${page.url}`,
})
} else {
@@ -168,15 +170,15 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l
return (
<>
<StructuredData
title={page.data.title}
description={page.data.description || ''}
title={data.title}
description={data.description || ''}
url={`${baseUrl}${page.url}`}
lang={params.lang}
breadcrumb={breadcrumbs}
/>
<DocsPage
toc={page.data.toc}
full={page.data.full}
toc={data.toc}
full={data.full}
breadcrumb={{
enabled: false,
}}
@@ -207,20 +209,32 @@ export default async function Page(props: { params: Promise<{ slug?: string[]; l
</div>
<PageNavigationArrows previous={neighbours?.previous} next={neighbours?.next} />
</div>
<DocsTitle>{page.data.title}</DocsTitle>
<DocsDescription>{page.data.description}</DocsDescription>
<DocsTitle>{data.title}</DocsTitle>
<DocsDescription>{data.description}</DocsDescription>
</div>
<DocsBody>
<MDX
components={{
...defaultMdxComponents,
CodeBlock,
h1: (props) => <Heading as='h1' {...props} />,
h2: (props) => <Heading as='h2' {...props} />,
h3: (props) => <Heading as='h3' {...props} />,
h4: (props) => <Heading as='h4' {...props} />,
h5: (props) => <Heading as='h5' {...props} />,
h6: (props) => <Heading as='h6' {...props} />,
h1: (props: React.HTMLAttributes<HTMLHeadingElement>) => (
<Heading as='h1' {...props} />
),
h2: (props: React.HTMLAttributes<HTMLHeadingElement>) => (
<Heading as='h2' {...props} />
),
h3: (props: React.HTMLAttributes<HTMLHeadingElement>) => (
<Heading as='h3' {...props} />
),
h4: (props: React.HTMLAttributes<HTMLHeadingElement>) => (
<Heading as='h4' {...props} />
),
h5: (props: React.HTMLAttributes<HTMLHeadingElement>) => (
<Heading as='h5' {...props} />
),
h6: (props: React.HTMLAttributes<HTMLHeadingElement>) => (
<Heading as='h6' {...props} />
),
}}
/>
</DocsBody>
@@ -240,16 +254,17 @@ export async function generateMetadata(props: {
const page = source.getPage(params.slug, params.lang)
if (!page) notFound()
const data = page.data as PageData
const baseUrl = 'https://docs.sim.ai'
const fullUrl = `${baseUrl}${page.url}`
const description = page.data.description || ''
const ogImageUrl = `${baseUrl}/api/og?title=${encodeURIComponent(page.data.title)}&category=DOCUMENTATION${description ? `&description=${encodeURIComponent(description)}` : ''}`
const description = data.description || ''
const ogImageUrl = `${baseUrl}/api/og?title=${encodeURIComponent(data.title)}&category=DOCUMENTATION${description ? `&description=${encodeURIComponent(description)}` : ''}`
return {
title: page.data.title,
title: data.title,
description:
page.data.description || 'Sim visual workflow builder for AI applications documentation',
data.description || 'Sim visual workflow builder for AI applications documentation',
keywords: [
'AI workflow builder',
'visual workflow editor',
@@ -258,16 +273,16 @@ export async function generateMetadata(props: {
'AI agents',
'no-code AI',
'drag and drop workflows',
page.data.title?.toLowerCase().split(' '),
data.title?.toLowerCase().split(' '),
]
.flat()
.filter(Boolean),
authors: [{ name: 'Sim Team' }],
category: 'Developer Tools',
openGraph: {
title: page.data.title,
title: data.title,
description:
page.data.description || 'Sim visual workflow builder for AI applications documentation',
data.description || 'Sim visual workflow builder for AI applications documentation',
url: fullUrl,
siteName: 'Sim Documentation',
type: 'article',
@@ -280,15 +295,15 @@ export async function generateMetadata(props: {
url: ogImageUrl,
width: 1200,
height: 630,
alt: page.data.title,
alt: data.title,
},
],
},
twitter: {
card: 'summary_large_image',
title: page.data.title,
title: data.title,
description:
page.data.description || 'Sim visual workflow builder for AI applications documentation',
data.description || 'Sim visual workflow builder for AI applications documentation',
images: [ogImageUrl],
creator: '@simdotai',
site: '@simdotai',

View File

@@ -43,7 +43,6 @@ export async function GET(request: NextRequest) {
const description = searchParams.get('description') || ''
const baseUrl = new URL(request.url).origin
const backgroundImageUrl = `${baseUrl}/static/og-background.png`
const allText = `${title}${category}${description}docs.sim.ai`
const fontData = await loadGoogleFont('Geist', '400;500;600', allText)
@@ -55,36 +54,49 @@ export async function GET(request: NextRequest) {
width: '100%',
display: 'flex',
flexDirection: 'column',
background: 'linear-gradient(315deg, #1e1e3f 0%, #1a1a2e 40%, #0f0f0f 100%)',
background: '#0c0c0c',
position: 'relative',
fontFamily: 'Geist',
}}
>
{/* Background texture */}
<img
src={backgroundImageUrl}
alt=''
{/* Base gradient layer - very subtle purple tint across the entire image */}
<div
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
objectFit: 'cover',
opacity: 0.04,
background:
'radial-gradient(ellipse 150% 100% at 50% 100%, rgba(88, 28, 135, 0.15) 0%, rgba(88, 28, 135, 0.08) 25%, rgba(88, 28, 135, 0.03) 50%, transparent 80%)',
display: 'flex',
}}
/>
{/* Subtle purple glow from bottom right */}
{/* Secondary glow - adds depth without harsh edges */}
<div
style={{
position: 'absolute',
bottom: 0,
right: 0,
width: '50%',
top: 0,
left: 0,
width: '100%',
height: '100%',
background:
'radial-gradient(ellipse at bottom right, rgba(112, 31, 252, 0.1) 0%, transparent 50%)',
'radial-gradient(ellipse 100% 80% at 80% 90%, rgba(112, 31, 252, 0.12) 0%, rgba(112, 31, 252, 0.04) 40%, transparent 70%)',
display: 'flex',
}}
/>
{/* Top darkening - creates natural vignette */}
<div
style={{
position: 'absolute',
top: 0,
left: 0,
width: '100%',
height: '100%',
background:
'linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, transparent 40%, transparent 100%)',
display: 'flex',
}}
/>

View File

@@ -119,116 +119,116 @@ import {
type IconComponent = ComponentType<SVGProps<SVGSVGElement>>
export const blockTypeToIconMap: Record<string, IconComponent> = {
zoom: ZoomIcon,
zep: ZepIcon,
calendly: CalendlyIcon,
mailchimp: MailchimpIcon,
postgresql: PostgresIcon,
twilio_voice: TwilioIcon,
elasticsearch: ElasticsearchIcon,
rds: RDSIcon,
translate: TranslateIcon,
dynamodb: DynamoDBIcon,
wordpress: WordpressIcon,
tavily: TavilyIcon,
zendesk: ZendeskIcon,
youtube: YouTubeIcon,
x: xIcon,
wordpress: WordpressIcon,
wikipedia: WikipediaIcon,
whatsapp: WhatsAppIcon,
webflow: WebflowIcon,
wealthbox: WealthboxIcon,
vision: EyeIcon,
video_generator: VideoIcon,
typeform: TypeformIcon,
twilio_voice: TwilioIcon,
twilio_sms: TwilioIcon,
tts: TTSIcon,
trello: TrelloIcon,
translate: TranslateIcon,
thinking: BrainIcon,
telegram: TelegramIcon,
tavily: TavilyIcon,
supabase: SupabaseIcon,
stt: STTIcon,
stripe: StripeIcon,
stagehand: StagehandIcon,
ssh: SshIcon,
sqs: SQSIcon,
spotify: SpotifyIcon,
smtp: SmtpIcon,
slack: SlackIcon,
shopify: ShopifyIcon,
sharepoint: MicrosoftSharepointIcon,
sftp: SftpIcon,
serper: SerperIcon,
sentry: SentryIcon,
sendgrid: SendgridIcon,
search: SearchIcon,
salesforce: SalesforceIcon,
s3: S3Icon,
resend: ResendIcon,
reddit: RedditIcon,
rds: RDSIcon,
qdrant: QdrantIcon,
posthog: PosthogIcon,
postgresql: PostgresIcon,
polymarket: PolymarketIcon,
pipedrive: PipedriveIcon,
pinecone: PineconeIcon,
perplexity: PerplexityIcon,
parallel_ai: ParallelIcon,
outlook: OutlookIcon,
openai: OpenAIIcon,
onedrive: MicrosoftOneDriveIcon,
notion: NotionIcon,
neo4j: Neo4jIcon,
mysql: MySQLIcon,
mongodb: MongoDBIcon,
mistral_parse: MistralIcon,
microsoft_teams: MicrosoftTeamsIcon,
microsoft_planner: MicrosoftPlannerIcon,
microsoft_excel: MicrosoftExcelIcon,
memory: BrainIcon,
mem0: Mem0Icon,
mailgun: MailgunIcon,
mailchimp: MailchimpIcon,
linkup: LinkupIcon,
linkedin: LinkedInIcon,
linear: LinearIcon,
knowledge: PackageSearchIcon,
kalshi: KalshiIcon,
jira: JiraIcon,
jina: JinaAIIcon,
intercom: IntercomIcon,
incidentio: IncidentioIcon,
image_generator: ImageIcon,
hunter: HunterIOIcon,
huggingface: HuggingFaceIcon,
hubspot: HubspotIcon,
grafana: GrafanaIcon,
google_vault: GoogleVaultIcon,
google_slides: GoogleSlidesIcon,
google_sheets: GoogleSheetsIcon,
google_groups: GoogleGroupsIcon,
google_forms: GoogleFormsIcon,
google_drive: GoogleDriveIcon,
google_docs: GoogleDocsIcon,
google_calendar: GoogleCalendarIcon,
google_search: GoogleIcon,
gmail: GmailIcon,
gitlab: GitLabIcon,
github: GithubIcon,
firecrawl: FirecrawlIcon,
file: DocumentIcon,
exa: ExaAIIcon,
elevenlabs: ElevenLabsIcon,
elasticsearch: ElasticsearchIcon,
dynamodb: DynamoDBIcon,
duckduckgo: DuckDuckGoIcon,
dropbox: DropboxIcon,
discord: DiscordIcon,
datadog: DatadogIcon,
cursor: CursorIcon,
vision: EyeIcon,
zoom: ZoomIcon,
confluence: ConfluenceIcon,
clay: ClayIcon,
calendly: CalendlyIcon,
browser_use: BrowserUseIcon,
asana: AsanaIcon,
arxiv: ArxivIcon,
webflow: WebflowIcon,
pinecone: PineconeIcon,
apollo: ApolloIcon,
whatsapp: WhatsAppIcon,
typeform: TypeformIcon,
qdrant: QdrantIcon,
shopify: ShopifyIcon,
asana: AsanaIcon,
sqs: SQSIcon,
apify: ApifyIcon,
memory: BrainIcon,
gitlab: GitLabIcon,
polymarket: PolymarketIcon,
serper: SerperIcon,
linear: LinearIcon,
exa: ExaAIIcon,
telegram: TelegramIcon,
salesforce: SalesforceIcon,
hubspot: HubspotIcon,
hunter: HunterIOIcon,
linkup: LinkupIcon,
mongodb: MongoDBIcon,
airtable: AirtableIcon,
discord: DiscordIcon,
ahrefs: AhrefsIcon,
neo4j: Neo4jIcon,
tts: TTSIcon,
jina: JinaAIIcon,
google_docs: GoogleDocsIcon,
perplexity: PerplexityIcon,
google_search: GoogleIcon,
x: xIcon,
kalshi: KalshiIcon,
google_calendar: GoogleCalendarIcon,
zep: ZepIcon,
posthog: PosthogIcon,
grafana: GrafanaIcon,
google_slides: GoogleSlidesIcon,
microsoft_planner: MicrosoftPlannerIcon,
thinking: BrainIcon,
pipedrive: PipedriveIcon,
dropbox: DropboxIcon,
stagehand: StagehandIcon,
google_forms: GoogleFormsIcon,
file: DocumentIcon,
mistral_parse: MistralIcon,
gmail: GmailIcon,
openai: OpenAIIcon,
outlook: OutlookIcon,
incidentio: IncidentioIcon,
onedrive: MicrosoftOneDriveIcon,
resend: ResendIcon,
google_vault: GoogleVaultIcon,
sharepoint: MicrosoftSharepointIcon,
huggingface: HuggingFaceIcon,
sendgrid: SendgridIcon,
video_generator: VideoIcon,
smtp: SmtpIcon,
google_groups: GoogleGroupsIcon,
mailgun: MailgunIcon,
clay: ClayIcon,
jira: JiraIcon,
search: SearchIcon,
linkedin: LinkedInIcon,
wealthbox: WealthboxIcon,
notion: NotionIcon,
elevenlabs: ElevenLabsIcon,
microsoft_teams: MicrosoftTeamsIcon,
github: GithubIcon,
sftp: SftpIcon,
ssh: SshIcon,
google_drive: GoogleDriveIcon,
sentry: SentryIcon,
reddit: RedditIcon,
parallel_ai: ParallelIcon,
spotify: SpotifyIcon,
stripe: StripeIcon,
s3: S3Icon,
trello: TrelloIcon,
mem0: Mem0Icon,
knowledge: PackageSearchIcon,
intercom: IntercomIcon,
twilio_sms: TwilioIcon,
duckduckgo: DuckDuckGoIcon,
slack: SlackIcon,
datadog: DatadogIcon,
microsoft_excel: MicrosoftExcelIcon,
image_generator: ImageIcon,
google_sheets: GoogleSheetsIcon,
wikipedia: WikipediaIcon,
cursor: CursorIcon,
firecrawl: FirecrawlIcon,
mysql: MySQLIcon,
browser_use: BrowserUseIcon,
stt: STTIcon,
}

View File

@@ -48,8 +48,13 @@ Ruft detaillierte Informationen zu einem bestimmten Jira-Issue ab
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Status des Operationserfolgs |
| `output` | object | Jira-Issue-Details mit Issue-Key, Zusammenfassung, Beschreibung, Erstellungs- und Aktualisierungszeitstempeln |
| `ts` | string | Zeitstempel der Operation |
| `issueKey` | string | Issue-Key \(z.B. PROJ-123\) |
| `summary` | string | Issue-Zusammenfassung |
| `description` | json | Inhalt der Issue-Beschreibung |
| `created` | string | Zeitstempel der Issue-Erstellung |
| `updated` | string | Zeitstempel der letzten Issue-Aktualisierung |
| `issue` | json | Vollständiges Issue-Objekt mit allen Feldern |
### `jira_update`
@@ -73,8 +78,9 @@ Ein Jira-Issue aktualisieren
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Erfolgsstatus der Operation |
| `output` | object | Aktualisierte Jira-Issue-Details mit Zeitstempel, Issue-Key, Zusammenfassung und Erfolgsstatus |
| `ts` | string | Zeitstempel der Operation |
| `issueKey` | string | Aktualisierter Issue-Key \(z.B. PROJ-123\) |
| `summary` | string | Issue-Zusammenfassung nach der Aktualisierung |
### `jira_write`
@@ -97,8 +103,10 @@ Ein Jira-Issue erstellen
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Erfolgsstatus der Operation |
| `output` | object | Erstellte Jira-Issue-Details mit Zeitstempel, Issue-Key, Zusammenfassung, Erfolgsstatus und URL |
| `ts` | string | Zeitstempel der Operation |
| `issueKey` | string | Erstellter Issue-Key \(z.B. PROJ-123\) |
| `summary` | string | Issue-Zusammenfassung |
| `url` | string | URL zum erstellten Issue |
### `jira_bulk_read`
@@ -116,8 +124,7 @@ Mehrere Jira-Issues in Masse abrufen
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Erfolgsstatus der Operation |
| `output` | array | Array von Jira-Issues mit Zusammenfassung, Beschreibung, Erstellungs- und Aktualisierungszeitstempeln |
| `issues` | array | Array von Jira-Issues mit Zeitstempel, Zusammenfassung, Beschreibung, Erstellungs- und Aktualisierungszeitstempeln |
### `jira_delete_issue`
@@ -136,8 +143,8 @@ Ein Jira-Issue löschen
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Erfolgsstatus der Operation |
| `output` | object | Details zum gelöschten Issue mit Zeitstempel, Issue-Key und Erfolgsstatus |
| `ts` | string | Zeitstempel der Operation |
| `issueKey` | string | Gelöschter Issue-Key |
### `jira_assign_issue`
@@ -156,8 +163,9 @@ Ein Jira-Issue einem Benutzer zuweisen
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Erfolgsstatus der Operation |
| `output` | object | Zuweisungsdetails mit Zeitstempel, Issue-Key, Bearbeiter-ID und Erfolgsstatus |
| `ts` | string | Zeitstempel der Operation |
| `issueKey` | string | Issue-Key, der zugewiesen wurde |
| `assigneeId` | string | Konto-ID des Bearbeiters |
### `jira_transition_issue`
@@ -177,8 +185,9 @@ Ein Jira-Issue zwischen Workflow-Status verschieben (z.B. To Do -> In Progress)
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Erfolgsstatus der Operation |
| `output` | object | Übergangsdetails mit Zeitstempel, Issue-Key, Übergangs-ID und Erfolgsstatus |
| `ts` | string | Zeitstempel der Operation |
| `issueKey` | string | Issue-Key, der übergangen wurde |
| `transitionId` | string | Angewendete Übergangs-ID |
### `jira_search_issues`
@@ -199,8 +208,11 @@ Nach Jira-Issues mit JQL (Jira Query Language) suchen
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Erfolgsstatus der Operation |
| `output` | object | Suchergebnisse mit Zeitstempel, Gesamtanzahl, Paginierungsdetails und Array der übereinstimmenden Issues |
| `ts` | string | Zeitstempel der Operation |
| `total` | number | Gesamtanzahl der übereinstimmenden Issues |
| `startAt` | number | Paginierungsstartindex |
| `maxResults` | number | Maximale Ergebnisse pro Seite |
| `issues` | array | Array übereinstimmender Issues mit Key, Zusammenfassung, Status, Bearbeiter, Erstellungs- und Aktualisierungsdatum |
### `jira_add_comment`
@@ -219,8 +231,10 @@ Einen Kommentar zu einem Jira-Issue hinzufügen
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Erfolgsstatus der Operation |
| `output` | object | Kommentardetails mit Zeitstempel, Issue-Key, Kommentar-ID, Inhalt und Erfolgsstatus |
| `ts` | string | Zeitstempel der Operation |
| `issueKey` | string | Issue-Key, zu dem der Kommentar hinzugefügt wurde |
| `commentId` | string | Erstellte Kommentar-ID |
| `body` | string | Kommentartextinhalt |
### `jira_get_comments`
@@ -240,8 +254,10 @@ Alle Kommentare eines Jira-Issues abrufen
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Erfolgsstatus der Operation |
| `output` | object | Kommentardaten mit Zeitstempel, Issue-Key, Gesamtanzahl und Array von Kommentaren |
| `ts` | string | Zeitstempel der Operation |
| `issueKey` | string | Issue-Key |
| `total` | number | Gesamtanzahl der Kommentare |
| `comments` | array | Array von Kommentaren mit ID, Autor, Inhalt, Erstellungs- und Aktualisierungsdatum |
### `jira_update_comment`
@@ -261,8 +277,10 @@ Einen bestehenden Kommentar zu einem Jira-Issue aktualisieren
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Erfolgsstatus der Operation |
| `output` | object | Aktualisierte Kommentardetails mit Zeitstempel, Issue-Key, Kommentar-ID, Textinhalt und Erfolgsstatus |
| `ts` | string | Zeitstempel der Operation |
| `issueKey` | string | Issue-Key |
| `commentId` | string | Aktualisierte Kommentar-ID |
| `body` | string | Aktualisierter Kommentartext |
### `jira_delete_comment`
@@ -281,8 +299,9 @@ Einen Kommentar aus einem Jira-Issue löschen
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Erfolgsstatus der Operation |
| `output` | object | Löschdetails mit Zeitstempel, Issue-Key, Kommentar-ID und Erfolgsstatus |
| `ts` | string | Zeitstempel der Operation |
| `issueKey` | string | Issue-Key |
| `commentId` | string | ID des gelöschten Kommentars |
### `jira_get_attachments`
@@ -300,8 +319,9 @@ Alle Anhänge eines Jira-Issues abrufen
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Erfolgsstatus der Operation |
| `output` | object | Anhangsdaten mit Zeitstempel, Issue-Key und Array von Anhängen |
| `ts` | string | Zeitstempel der Operation |
| `issueKey` | string | Issue-Key |
| `attachments` | array | Array von Anhängen mit ID, Dateiname, Größe, MIME-Typ, Erstellungsdatum und Autor |
### `jira_delete_attachment`
@@ -319,8 +339,8 @@ Einen Anhang von einem Jira-Issue löschen
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Erfolgsstatus der Operation |
| `output` | object | Löschdetails mit Zeitstempel, Anhangs-ID und Erfolgsstatus |
| `ts` | string | Zeitstempel der Operation |
| `attachmentId` | string | ID des gelöschten Anhangs |
### `jira_add_worklog`
@@ -341,8 +361,10 @@ Einen Zeiterfassungseintrag zu einem Jira-Issue hinzufügen
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Erfolgsstatus der Operation |
| `output` | object | Worklog-Details mit Zeitstempel, Issue-Key, Worklog-ID, aufgewendeter Zeit in Sekunden und Erfolgsstatus |
| `ts` | string | Zeitstempel der Operation |
| `issueKey` | string | Issue-Key, zu dem der Worklog hinzugefügt wurde |
| `worklogId` | string | ID des erstellten Worklogs |
| `timeSpentSeconds` | number | Aufgewendete Zeit in Sekunden |
### `jira_get_worklogs`
@@ -362,8 +384,10 @@ Alle Worklog-Einträge eines Jira-Issues abrufen
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Erfolgsstatus der Operation |
| `output` | object | Worklog-Daten mit Zeitstempel, Issue-Key, Gesamtanzahl und Array von Worklogs |
| `ts` | string | Zeitstempel der Operation |
| `issueKey` | string | Issue-Key |
| `total` | number | Gesamtanzahl der Worklogs |
| `worklogs` | array | Array von Worklogs mit ID, Autor, aufgewendeter Zeit in Sekunden, aufgewendeter Zeit, Kommentar, Erstellungs-, Aktualisierungs- und Startdatum |
### `jira_update_worklog`
@@ -385,8 +409,9 @@ Aktualisieren eines vorhandenen Worklog-Eintrags in einem Jira-Issue
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Erfolgsstatus der Operation |
| `output` | object | Worklog-Aktualisierungsdetails mit Zeitstempel, Issue-Key, Worklog-ID und Erfolgsstatus |
| `ts` | string | Zeitstempel der Operation |
| `issueKey` | string | Issue-Key |
| `worklogId` | string | ID des aktualisierten Worklogs |
### `jira_delete_worklog`
@@ -405,8 +430,9 @@ Löschen eines Worklog-Eintrags aus einem Jira-Issue
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Erfolgsstatus der Operation |
| `output` | object | Löschdetails mit Zeitstempel, Issue-Key, Worklog-ID und Erfolgsstatus |
| `ts` | string | Zeitstempel der Operation |
| `issueKey` | string | Issue-Key |
| `worklogId` | string | ID des gelöschten Worklogs |
### `jira_create_issue_link`
@@ -427,8 +453,11 @@ Eine Verknüpfungsbeziehung zwischen zwei Jira-Issues erstellen
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Erfolgsstatus der Operation |
| `output` | object | Issue-Verknüpfungsdetails mit Zeitstempel, eingehendem Issue-Key, ausgehendem Issue-Key, Verknüpfungstyp und Erfolgsstatus |
| `ts` | string | Zeitstempel der Operation |
| `inwardIssue` | string | Key des eingehenden Issues |
| `outwardIssue` | string | Key des ausgehenden Issues |
| `linkType` | string | Art der Issue-Verknüpfung |
| `linkId` | string | ID der erstellten Verknüpfung |
### `jira_delete_issue_link`
@@ -446,8 +475,8 @@ Eine Verknüpfung zwischen zwei Jira-Issues löschen
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Erfolgsstatus der Operation |
| `output` | object | Löschdetails mit Zeitstempel, Link-ID und Erfolgsstatus |
| `ts` | string | Zeitstempel der Operation |
| `linkId` | string | ID der gelöschten Verknüpfung |
### `jira_add_watcher`
@@ -466,8 +495,9 @@ Einen Beobachter zu einem Jira-Issue hinzufügen, um Benachrichtigungen über Ak
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Erfolgsstatus der Operation |
| `output` | object | Beobachterdetails mit Zeitstempel, Issue-Key, Beobachter-Account-ID und Erfolgsstatus |
| `ts` | string | Zeitstempel der Operation |
| `issueKey` | string | Issue-Key |
| `watcherAccountId` | string | Account-ID des hinzugefügten Beobachters |
### `jira_remove_watcher`
@@ -486,8 +516,9 @@ Einen Beobachter von einem Jira-Issue entfernen
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `success` | boolean | Erfolgsstatus der Operation |
| `output` | object | Entfernungsdetails mit Zeitstempel, Issue-Key, Beobachter-Konto-ID und Erfolgsstatus |
| `ts` | string | Zeitstempel der Operation |
| `issueKey` | string | Issue-Key |
| `watcherAccountId` | string | Account-ID des entfernten Beobachters |
## Hinweise

View File

@@ -54,7 +54,7 @@ Integriert Slack in den Workflow. Kann Nachrichten senden, aktualisieren und lö
### `slack_message`
Senden Sie Nachrichten an Slack-Kanäle oder Benutzer über die Slack-API. Unterstützt Slack mrkdwn-Formatierung.
Sende Nachrichten an Slack-Kanäle oder Direktnachrichten. Unterstützt Slack mrkdwn-Formatierung.
#### Eingabe
@@ -62,8 +62,9 @@ Senden Sie Nachrichten an Slack-Kanäle oder Benutzer über die Slack-API. Unter
| --------- | ---- | -------- | ----------- |
| `authMethod` | string | Nein | Authentifizierungsmethode: oauth oder bot_token |
| `botToken` | string | Nein | Bot-Token für benutzerdefinierten Bot |
| `channel` | string | Ja | Ziel-Slack-Kanal \(z.B. #general\) |
| `text` | string | Ja | Nachrichtentext zum Senden \(unterstützt Slack mrkdwn-Formatierung\) |
| `channel` | string | Nein | Ziel-Slack-Kanal \(z.B. #general\) |
| `userId` | string | Nein | Ziel-Slack-Benutzer-ID für Direktnachrichten \(z.B. U1234567890\) |
| `text` | string | Ja | Zu sendender Nachrichtentext \(unterstützt Slack mrkdwn-Formatierung\) |
| `thread_ts` | string | Nein | Thread-Zeitstempel für Antworten \(erstellt Thread-Antwort\) |
| `files` | file[] | Nein | Dateien, die an die Nachricht angehängt werden sollen |
@@ -109,10 +110,11 @@ Lesen Sie die neuesten Nachrichten aus Slack-Kanälen. Rufen Sie den Konversatio
| --------- | ---- | -------- | ----------- |
| `authMethod` | string | Nein | Authentifizierungsmethode: oauth oder bot_token |
| `botToken` | string | Nein | Bot-Token für benutzerdefinierten Bot |
| `channel` | string | Ja | Slack-Kanal, aus dem Nachrichten gelesen werden sollen (z.B. #general) |
| `limit` | number | Nein | Anzahl der abzurufenden Nachrichten (Standard: 10, max: 100) |
| `oldest` | string | Nein | Beginn des Zeitraums (Zeitstempel) |
| `latest` | string | Nein | Ende des Zeitraums (Zeitstempel) |
| `channel` | string | Nein | Slack-Kanal, aus dem Nachrichten gelesen werden sollen \(z.B. #general\) |
| `userId` | string | Nein | Benutzer-ID für DM-Konversation \(z.B. U1234567890\) |
| `limit` | number | Nein | Anzahl der abzurufenden Nachrichten \(Standard: 10, max: 100\) |
| `oldest` | string | Nein | Beginn des Zeitraums \(Zeitstempel\) |
| `latest` | string | Nein | Ende des Zeitraums \(Zeitstempel\) |
#### Ausgabe

View File

@@ -27,12 +27,14 @@ In Sim ermöglicht die Zoom-Integration Ihren Agenten die Automatisierung der Pl
- Details oder Einladungen für jedes Meeting abzurufen
- Bestehende Meetings direkt aus Ihren Automatisierungen zu aktualisieren oder zu löschen
Diese Funktionen ermöglichen es Ihnen, die Remote-Zusammenarbeit zu optimieren, wiederkehrende Videositzungen zu automatisieren und die Zoom-Umgebung Ihrer Organisation als Teil Ihrer Workflows zu verwalten.
Um eine Verbindung zu Zoom herzustellen, fügen Sie den Zoom-Block ein und klicken Sie auf `Connect`, um sich mit Ihrem Zoom-Konto zu authentifizieren. Nach der Verbindung können Sie die Zoom-Tools verwenden, um Zoom-Meetings zu erstellen, aufzulisten, zu aktualisieren und zu löschen. Sie können Ihr Zoom-Konto jederzeit trennen, indem Sie unter Einstellungen > Integrationen auf `Disconnect` klicken, und der Zugriff auf Ihr Zoom-Konto wird sofort widerrufen.
Diese Funktionen ermöglichen es Ihnen, die Zusammenarbeit aus der Ferne zu optimieren, wiederkehrende Videositzungen zu automatisieren und die Zoom-Umgebung Ihrer Organisation als Teil Ihrer Workflows zu verwalten.
{/* MANUAL-CONTENT-END */}
## Nutzungsanleitung
## Gebrauchsanweisung
Integrieren Sie Zoom in Workflows. Erstellen, listen, aktualisieren und löschen Sie Zoom-Meetings. Rufen Sie Meeting-Details, Einladungen, Aufzeichnungen und Teilnehmer ab. Verwalten Sie Cloud-Aufzeichnungen programmgesteuert.
Integrieren Sie Zoom in Workflows. Erstellen, listen, aktualisieren und löschen Sie Zoom-Meetings. Erhalten Sie Meeting-Details, Einladungen, Aufzeichnungen und Teilnehmerinformationen. Verwalten Sie Cloud-Aufzeichnungen programmatisch.
## Tools
@@ -49,7 +51,7 @@ Ein neues Zoom-Meeting erstellen
| `type` | number | Nein | Meeting-Typ: 1=sofort, 2=geplant, 3=wiederkehrend ohne feste Zeit, 8=wiederkehrend mit fester Zeit |
| `startTime` | string | Nein | Meeting-Startzeit im ISO 8601-Format \(z.B. 2025-06-03T10:00:00Z\) |
| `duration` | number | Nein | Meeting-Dauer in Minuten |
| `timezone` | string | Nein | Zeitzone für das Meeting \(z.B. Europe/Berlin\) |
| `timezone` | string | Nein | Zeitzone für das Meeting \(z.B. America/Los_Angeles\) |
| `password` | string | Nein | Meeting-Passwort |
| `agenda` | string | Nein | Meeting-Agenda |
| `hostVideo` | boolean | Nein | Mit eingeschaltetem Host-Video starten |
@@ -59,7 +61,7 @@ Ein neues Zoom-Meeting erstellen
| `waitingRoom` | boolean | Nein | Warteraum aktivieren |
| `autoRecording` | string | Nein | Automatische Aufzeichnungseinstellung: local, cloud oder none |
#### Output
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
@@ -67,18 +69,18 @@ Ein neues Zoom-Meeting erstellen
### `zoom_list_meetings`
Alle Meetings eines Zoom-Benutzers auflisten
Alle Meetings für einen Zoom-Benutzer auflisten
#### Input
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `userId` | string | Ja | Die Benutzer-ID oder E-Mail-Adresse. Verwenden Sie "me" für den authentifizierten Benutzer. |
| `type` | string | Nein | Meeting-Typ-Filter: scheduled, live, upcoming, upcoming_meetings oder previous_meetings |
| `pageSize` | number | Nein | Anzahl der Datensätze pro Seite (max. 300) |
| `pageSize` | number | Nein | Anzahl der Datensätze pro Seite \(max. 300\) |
| `nextPageToken` | string | Nein | Token für Paginierung, um die nächste Ergebnisseite zu erhalten |
#### Output
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
@@ -89,7 +91,7 @@ Alle Meetings eines Zoom-Benutzers auflisten
Details eines bestimmten Zoom-Meetings abrufen
#### Input
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
@@ -97,13 +99,13 @@ Details eines bestimmten Zoom-Meetings abrufen
| `occurrenceId` | string | Nein | Vorkommnis-ID für wiederkehrende Meetings |
| `showPreviousOccurrences` | boolean | Nein | Frühere Vorkommnisse für wiederkehrende Meetings anzeigen |
#### Output
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `meeting` | object | Die Meeting-Details |
### `zoom_update_meeting`
Details eines bestimmten Zoom-Meetings abrufen
Ein bestehendes Zoom-Meeting aktualisieren
@@ -116,11 +118,11 @@ Ein bestehendes Zoom-Meeting aktualisieren
| `type` | number | Nein | Meeting-Typ: 1=sofort, 2=geplant, 3=wiederkehrend ohne feste Zeit, 8=wiederkehrend mit fester Zeit |
| `startTime` | string | Nein | Meeting-Startzeit im ISO 8601-Format \(z.B. 2025-06-03T10:00:00Z\) |
| `duration` | number | Nein | Meeting-Dauer in Minuten |
| `timezone` | string | Nein | Zeitzone für das Meeting \(z.B. America/Los_Angeles\) |
| `timezone` | string | Nein | Zeitzone für das Meeting \(z.B. Europe/Berlin\) |
| `password` | string | Nein | Meeting-Passwort |
| `agenda` | string | Nein | Meeting-Agenda |
| `hostVideo` | boolean | Nein | Mit eingeschalteter Host-Kamera starten |
| `participantVideo` | boolean | Nein | Mit eingeschalteter Teilnehmer-Kamera starten |
| `hostVideo` | boolean | Nein | Mit eingeschaltetem Host-Video starten |
| `participantVideo` | boolean | Nein | Mit eingeschaltetem Teilnehmer-Video starten |
| `joinBeforeHost` | boolean | Nein | Teilnehmern erlauben, vor dem Host beizutreten |
| `muteUponEntry` | boolean | Nein | Teilnehmer beim Betreten stummschalten |
| `waitingRoom` | boolean | Nein | Warteraum aktivieren |
@@ -132,7 +134,7 @@ Ein bestehendes Zoom-Meeting aktualisieren
| --------- | ---- | ----------- |
| `success` | boolean | Ob das Meeting erfolgreich aktualisiert wurde |
### `zoom_delete_meeting`
Ein Zoom-Meeting löschen
Ein Zoom-Meeting löschen oder abbrechen
@@ -141,9 +143,9 @@ Ein Zoom-Meeting löschen oder abbrechen
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `meetingId` | string | Ja | Die zu löschende Meeting-ID |
| `occurrenceId` | string | Nein | Vorkommnis-ID zum Löschen eines bestimmten Vorkommnisses eines wiederkehrenden Meetings |
| `occurrenceId` | string | Nein | Occurrence-ID zum Löschen eines bestimmten Termins eines wiederkehrenden Meetings |
| `scheduleForReminder` | boolean | Nein | Erinnerungs-E-Mail zur Stornierung an Teilnehmer senden |
| `cancelMeetingReminder` | boolean | Nein | Stornierungsmail an Teilnehmer und alternative Hosts senden |
| `cancelMeetingReminder` | boolean | Nein | Stornierungs-E-Mail an Teilnehmer und alternative Hosts senden |
#### Ausgabe
@@ -153,7 +155,7 @@ Ein Zoom-Meeting löschen oder abbrechen
### `zoom_get_meeting_invitation`
Abrufen des Einladungstextes für ein Zoom-Meeting
Den Einladungstext für ein Zoom-Meeting abrufen
#### Eingabe
@@ -165,20 +167,20 @@ Abrufen des Einladungstextes für ein Zoom-Meeting
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `invitation` | string | Der Einladungstext für das Meeting |
| `invitation` | string | Der Meeting-Einladungstext |
### `zoom_list_recordings`
Alle Cloud-Aufzeichnungen für einen Zoom-Benutzer auflisten
Alle Cloud-Aufzeichnungen eines Zoom-Benutzers auflisten
#### Eingabe
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `userId` | string | Ja | Die Benutzer-ID oder E-Mail-Adresse. Verwenden Sie "me" für den authentifizierten Benutzer. |
| `from` | string | Nein | Startdatum im Format jjjj-mm-tt \(innerhalb der letzten 6 Monate\) |
| `to` | string | Nein | Enddatum im Format jjjj-mm-tt |
| `pageSize` | number | Nein | Anzahl der Datensätze pro Seite \(max. 300\) |
| `from` | string | Nein | Startdatum im Format yyyy-mm-dd (innerhalb der letzten 6 Monate) |
| `to` | string | Nein | Enddatum im Format yyyy-mm-dd |
| `pageSize` | number | Nein | Anzahl der Datensätze pro Seite (max. 300) |
| `nextPageToken` | string | Nein | Token für die Paginierung, um die nächste Ergebnisseite zu erhalten |
| `trash` | boolean | Nein | Auf true setzen, um Aufzeichnungen aus dem Papierkorb aufzulisten |
@@ -189,7 +191,7 @@ Alle Cloud-Aufzeichnungen für einen Zoom-Benutzer auflisten
| `recordings` | array | Liste der Aufzeichnungen |
| `pageInfo` | object | Paginierungsinformationen |
### `zoom_get_meeting_recordings`
Alle Aufzeichnungen für ein bestimmtes Zoom-Meeting abrufen
Alle Aufzeichnungen für ein bestimmtes Zoom-Meeting abrufen
@@ -198,8 +200,8 @@ Alle Aufzeichnungen für ein bestimmtes Zoom-Meeting abrufen
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `meetingId` | string | Ja | Die Meeting-ID oder Meeting-UUID |
| `includeFolderItems` | boolean | Nein | Elemente innerhalb eines Ordners einschließen |
| `ttl` | number | Nein | Gültigkeitsdauer für Download-URLs in Sekunden \(max 604800\) |
| `includeFolderItems` | boolean | Nein | Elemente innerhalb eines Ordners einbeziehen |
| `ttl` | number | Nein | Gültigkeitsdauer für Download-URLs in Sekunden \(max. 604800\) |
#### Ausgabe
@@ -207,7 +209,7 @@ Alle Aufzeichnungen für ein bestimmtes Zoom-Meeting abrufen
| --------- | ---- | ----------- |
| `recording` | object | Die Meeting-Aufzeichnung mit allen Dateien |
### `zoom_delete_recording`
Cloud-Aufzeichnungen für ein Zoom-Meeting löschen
Cloud-Aufzeichnungen für ein Zoom-Meeting löschen
@@ -225,7 +227,7 @@ Cloud-Aufzeichnungen für ein Zoom-Meeting löschen
| --------- | ---- | ----------- |
| `success` | boolean | Ob die Aufzeichnung erfolgreich gelöscht wurde |
### `zoom_list_past_participants`
Teilnehmer eines vergangenen Zoom-Meetings auflisten
Teilnehmer eines vergangenen Zoom-Meetings auflisten
@@ -234,14 +236,14 @@ Teilnehmer eines vergangenen Zoom-Meetings auflisten
| Parameter | Typ | Erforderlich | Beschreibung |
| --------- | ---- | -------- | ----------- |
| `meetingId` | string | Ja | Die vergangene Meeting-ID oder UUID |
| `pageSize` | number | Nein | Anzahl der Datensätze pro Seite \(max 300\) |
| `pageSize` | number | Nein | Anzahl der Datensätze pro Seite \(max. 300\) |
| `nextPageToken` | string | Nein | Token für Paginierung, um die nächste Ergebnisseite zu erhalten |
#### Ausgabe
| Parameter | Typ | Beschreibung |
| --------- | ---- | ----------- |
| `participants` | array | Liste der Besprechungsteilnehmer |
| `participants` | array | Liste der Meeting-Teilnehmer |
| `pageInfo` | object | Paginierungsinformationen |
## Hinweise

View File

@@ -51,8 +51,13 @@ Retrieve detailed information about a specific Jira issue
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Jira issue details with issue key, summary, description, created and updated timestamps |
| `ts` | string | Timestamp of the operation |
| `issueKey` | string | Issue key \(e.g., PROJ-123\) |
| `summary` | string | Issue summary |
| `description` | json | Issue description content |
| `created` | string | Issue creation timestamp |
| `updated` | string | Issue last updated timestamp |
| `issue` | json | Complete issue object with all fields |
### `jira_update`
@@ -76,8 +81,9 @@ Update a Jira issue
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Updated Jira issue details with timestamp, issue key, summary, and success status |
| `ts` | string | Timestamp of the operation |
| `issueKey` | string | Updated issue key \(e.g., PROJ-123\) |
| `summary` | string | Issue summary after update |
### `jira_write`
@@ -100,8 +106,10 @@ Write a Jira issue
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Created Jira issue details with timestamp, issue key, summary, success status, and URL |
| `ts` | string | Timestamp of the operation |
| `issueKey` | string | Created issue key \(e.g., PROJ-123\) |
| `summary` | string | Issue summary |
| `url` | string | URL to the created issue |
### `jira_bulk_read`
@@ -119,8 +127,7 @@ Retrieve multiple Jira issues in bulk
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | array | Array of Jira issues with summary, description, created and updated timestamps |
| `issues` | array | Array of Jira issues with ts, summary, description, created, and updated timestamps |
### `jira_delete_issue`
@@ -139,8 +146,8 @@ Delete a Jira issue
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Deleted issue details with timestamp, issue key, and success status |
| `ts` | string | Timestamp of the operation |
| `issueKey` | string | Deleted issue key |
### `jira_assign_issue`
@@ -159,8 +166,9 @@ Assign a Jira issue to a user
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Assignment details with timestamp, issue key, assignee ID, and success status |
| `ts` | string | Timestamp of the operation |
| `issueKey` | string | Issue key that was assigned |
| `assigneeId` | string | Account ID of the assignee |
### `jira_transition_issue`
@@ -180,8 +188,9 @@ Move a Jira issue between workflow statuses (e.g., To Do -> In Progress)
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Transition details with timestamp, issue key, transition ID, and success status |
| `ts` | string | Timestamp of the operation |
| `issueKey` | string | Issue key that was transitioned |
| `transitionId` | string | Applied transition ID |
### `jira_search_issues`
@@ -202,8 +211,11 @@ Search for Jira issues using JQL (Jira Query Language)
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Search results with timestamp, total count, pagination details, and array of matching issues |
| `ts` | string | Timestamp of the operation |
| `total` | number | Total number of matching issues |
| `startAt` | number | Pagination start index |
| `maxResults` | number | Maximum results per page |
| `issues` | array | Array of matching issues with key, summary, status, assignee, created, updated |
### `jira_add_comment`
@@ -222,8 +234,10 @@ Add a comment to a Jira issue
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Comment details with timestamp, issue key, comment ID, body, and success status |
| `ts` | string | Timestamp of the operation |
| `issueKey` | string | Issue key the comment was added to |
| `commentId` | string | Created comment ID |
| `body` | string | Comment text content |
### `jira_get_comments`
@@ -243,8 +257,10 @@ Get all comments from a Jira issue
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Comments data with timestamp, issue key, total count, and array of comments |
| `ts` | string | Timestamp of the operation |
| `issueKey` | string | Issue key |
| `total` | number | Total number of comments |
| `comments` | array | Array of comments with id, author, body, created, updated |
### `jira_update_comment`
@@ -264,8 +280,10 @@ Update an existing comment on a Jira issue
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Updated comment details with timestamp, issue key, comment ID, body text, and success status |
| `ts` | string | Timestamp of the operation |
| `issueKey` | string | Issue key |
| `commentId` | string | Updated comment ID |
| `body` | string | Updated comment text |
### `jira_delete_comment`
@@ -284,8 +302,9 @@ Delete a comment from a Jira issue
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Deletion details with timestamp, issue key, comment ID, and success status |
| `ts` | string | Timestamp of the operation |
| `issueKey` | string | Issue key |
| `commentId` | string | Deleted comment ID |
### `jira_get_attachments`
@@ -303,8 +322,9 @@ Get all attachments from a Jira issue
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Attachments data with timestamp, issue key, and array of attachments |
| `ts` | string | Timestamp of the operation |
| `issueKey` | string | Issue key |
| `attachments` | array | Array of attachments with id, filename, size, mimeType, created, author |
### `jira_delete_attachment`
@@ -322,8 +342,8 @@ Delete an attachment from a Jira issue
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Deletion details with timestamp, attachment ID, and success status |
| `ts` | string | Timestamp of the operation |
| `attachmentId` | string | Deleted attachment ID |
### `jira_add_worklog`
@@ -344,8 +364,10 @@ Add a time tracking worklog entry to a Jira issue
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Worklog details with timestamp, issue key, worklog ID, time spent in seconds, and success status |
| `ts` | string | Timestamp of the operation |
| `issueKey` | string | Issue key the worklog was added to |
| `worklogId` | string | Created worklog ID |
| `timeSpentSeconds` | number | Time spent in seconds |
### `jira_get_worklogs`
@@ -365,8 +387,10 @@ Get all worklog entries from a Jira issue
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Worklogs data with timestamp, issue key, total count, and array of worklogs |
| `ts` | string | Timestamp of the operation |
| `issueKey` | string | Issue key |
| `total` | number | Total number of worklogs |
| `worklogs` | array | Array of worklogs with id, author, timeSpentSeconds, timeSpent, comment, created, updated, started |
### `jira_update_worklog`
@@ -388,8 +412,9 @@ Update an existing worklog entry on a Jira issue
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Worklog update details with timestamp, issue key, worklog ID, and success status |
| `ts` | string | Timestamp of the operation |
| `issueKey` | string | Issue key |
| `worklogId` | string | Updated worklog ID |
### `jira_delete_worklog`
@@ -408,8 +433,9 @@ Delete a worklog entry from a Jira issue
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Deletion details with timestamp, issue key, worklog ID, and success status |
| `ts` | string | Timestamp of the operation |
| `issueKey` | string | Issue key |
| `worklogId` | string | Deleted worklog ID |
### `jira_create_issue_link`
@@ -430,8 +456,11 @@ Create a link relationship between two Jira issues
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Issue link details with timestamp, inward issue key, outward issue key, link type, and success status |
| `ts` | string | Timestamp of the operation |
| `inwardIssue` | string | Inward issue key |
| `outwardIssue` | string | Outward issue key |
| `linkType` | string | Type of issue link |
| `linkId` | string | Created link ID |
### `jira_delete_issue_link`
@@ -449,8 +478,8 @@ Delete a link between two Jira issues
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Deletion details with timestamp, link ID, and success status |
| `ts` | string | Timestamp of the operation |
| `linkId` | string | Deleted link ID |
### `jira_add_watcher`
@@ -469,8 +498,9 @@ Add a watcher to a Jira issue to receive notifications about updates
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Watcher details with timestamp, issue key, watcher account ID, and success status |
| `ts` | string | Timestamp of the operation |
| `issueKey` | string | Issue key |
| `watcherAccountId` | string | Added watcher account ID |
### `jira_remove_watcher`
@@ -489,8 +519,9 @@ Remove a watcher from a Jira issue
| Parameter | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Operation success status |
| `output` | object | Removal details with timestamp, issue key, watcher account ID, and success status |
| `ts` | string | Timestamp of the operation |
| `issueKey` | string | Issue key |
| `watcherAccountId` | string | Removed watcher account ID |

View File

@@ -56,7 +56,7 @@ Integrate Slack into the workflow. Can send, update, and delete messages, create
### `slack_message`
Send messages to Slack channels or users through the Slack API. Supports Slack mrkdwn formatting.
Send messages to Slack channels or direct messages. Supports Slack mrkdwn formatting.
#### Input
@@ -64,7 +64,8 @@ Send messages to Slack channels or users through the Slack API. Supports Slack m
| --------- | ---- | -------- | ----------- |
| `authMethod` | string | No | Authentication method: oauth or bot_token |
| `botToken` | string | No | Bot token for Custom Bot |
| `channel` | string | Yes | Target Slack channel \(e.g., #general\) |
| `channel` | string | No | Target Slack channel \(e.g., #general\) |
| `userId` | string | No | Target Slack user ID for direct messages \(e.g., U1234567890\) |
| `text` | string | Yes | Message text to send \(supports Slack mrkdwn formatting\) |
| `thread_ts` | string | No | Thread timestamp to reply to \(creates thread reply\) |
| `files` | file[] | No | Files to attach to the message |
@@ -111,7 +112,8 @@ Read the latest messages from Slack channels. Retrieve conversation history with
| --------- | ---- | -------- | ----------- |
| `authMethod` | string | No | Authentication method: oauth or bot_token |
| `botToken` | string | No | Bot token for Custom Bot |
| `channel` | string | Yes | Slack channel to read messages from \(e.g., #general\) |
| `channel` | string | No | Slack channel to read messages from \(e.g., #general\) |
| `userId` | string | No | User ID for DM conversation \(e.g., U1234567890\) |
| `limit` | number | No | Number of messages to retrieve \(default: 10, max: 100\) |
| `oldest` | string | No | Start of time range \(timestamp\) |
| `latest` | string | No | End of time range \(timestamp\) |

View File

@@ -27,6 +27,8 @@ In Sim, the Zoom integration empowers your agents to automate scheduling and mee
- Retrieve details or invitations for any meeting
- Update or delete existing meetings directly from your automations
To connect to Zoom, drop the Zoom block and click `Connect` to authenticate with your Zoom account. Once connected, you can use the Zoom tools to create, list, update, and delete Zoom meetings. At any given time, you can disconnect your Zoom account by clicking `Disconnect` in Settings > Integrations, and access to your Zoom account will be revoked immediatley.
These capabilities let you streamline remote collaboration, automate recurring video sessions, and manage your organization's Zoom environment all as part of your workflows.
{/* MANUAL-CONTENT-END */}

View File

@@ -48,8 +48,13 @@ Recupera información detallada sobre una incidencia específica de Jira
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | object | Detalles de la incidencia de Jira con clave de incidencia, resumen, descripción, marcas de tiempo de creación y actualización |
| `ts` | string | Marca de tiempo de la operación |
| `issueKey` | string | Clave de la incidencia (p. ej., PROJ-123) |
| `summary` | string | Resumen de la incidencia |
| `description` | json | Contenido de la descripción de la incidencia |
| `created` | string | Marca de tiempo de creación de la incidencia |
| `updated` | string | Marca de tiempo de última actualización de la incidencia |
| `issue` | json | Objeto completo de la incidencia con todos los campos |
### `jira_update`
@@ -73,8 +78,9 @@ Actualizar una incidencia de Jira
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | object | Detalles actualizados de la incidencia de Jira con marca de tiempo, clave de incidencia, resumen y estado de éxito |
| `ts` | string | Marca de tiempo de la operación |
| `issueKey` | string | Clave de la incidencia actualizada (p. ej., PROJ-123) |
| `summary` | string | Resumen de la incidencia después de la actualización |
### `jira_write`
@@ -97,8 +103,10 @@ Escribir una incidencia de Jira
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | object | Detalles de la incidencia de Jira creada con marca de tiempo, clave de incidencia, resumen, estado de éxito y URL |
| `ts` | string | Marca de tiempo de la operación |
| `issueKey` | string | Clave de la incidencia creada (p. ej., PROJ-123) |
| `summary` | string | Resumen de la incidencia |
| `url` | string | URL de la incidencia creada |
### `jira_bulk_read`
@@ -116,8 +124,7 @@ Recuperar múltiples incidencias de Jira en bloque
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | array | Array de incidencias de Jira con resumen, descripción, marcas de tiempo de creación y actualización |
| `issues` | array | Array de incidencias de Jira con marca de tiempo, resumen, descripción, y marcas de tiempo de creación y actualización |
### `jira_delete_issue`
@@ -136,8 +143,8 @@ Eliminar una incidencia de Jira
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | object | Detalles de la incidencia eliminada con marca de tiempo, clave de incidencia y estado de éxito |
| `ts` | string | Marca de tiempo de la operación |
| `issueKey` | string | Clave de la incidencia eliminada |
### `jira_assign_issue`
@@ -156,8 +163,9 @@ Asignar una incidencia de Jira a un usuario
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | object | Detalles de la asignación con marca de tiempo, clave de incidencia, ID del asignado y estado de éxito |
| `ts` | string | Marca de tiempo de la operación |
| `issueKey` | string | Clave de la incidencia que fue asignada |
| `assigneeId` | string | ID de cuenta del asignado |
### `jira_transition_issue`
@@ -177,8 +185,9 @@ Mover una incidencia de Jira entre estados de flujo de trabajo (p. ej., Pendient
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | object | Detalles de la transición con marca de tiempo, clave de incidencia, ID de transición y estado de éxito |
| `ts` | string | Marca de tiempo de la operación |
| `issueKey` | string | Clave de incidencia que fue transicionada |
| `transitionId` | string | ID de transición aplicada |
### `jira_search_issues`
@@ -199,8 +208,11 @@ Buscar incidencias de Jira usando JQL (Jira Query Language)
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | object | Resultados de búsqueda con marca de tiempo, recuento total, detalles de paginación y array de incidencias coincidentes |
| `ts` | string | Marca de tiempo de la operación |
| `total` | number | Número total de incidencias coincidentes |
| `startAt` | number | Índice de inicio de paginación |
| `maxResults` | number | Máximo de resultados por página |
| `issues` | array | Array de incidencias coincidentes con clave, resumen, estado, asignado, creado, actualizado |
### `jira_add_comment`
@@ -219,8 +231,10 @@ Añadir un comentario a una incidencia de Jira
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | object | Detalles del comentario con marca de tiempo, clave de incidencia, ID del comentario, cuerpo y estado de éxito |
| `ts` | string | Marca de tiempo de la operación |
| `issueKey` | string | Clave de incidencia a la que se añadió el comentario |
| `commentId` | string | ID del comentario creado |
| `body` | string | Contenido de texto del comentario |
### `jira_get_comments`
@@ -240,8 +254,10 @@ Obtener todos los comentarios de una incidencia de Jira
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | object | Datos de comentarios con marca de tiempo, clave de incidencia, recuento total y array de comentarios |
| `ts` | string | Marca de tiempo de la operación |
| `issueKey` | string | Clave de incidencia |
| `total` | number | Número total de comentarios |
| `comments` | array | Array de comentarios con id, autor, cuerpo, creado, actualizado |
### `jira_update_comment`
@@ -261,8 +277,10 @@ Actualizar un comentario existente en una incidencia de Jira
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | object | Detalles del comentario actualizado con marca de tiempo, clave de incidencia, ID de comentario, texto del cuerpo y estado de éxito |
| `ts` | string | Marca de tiempo de la operación |
| `issueKey` | string | Clave de incidencia |
| `commentId` | string | ID del comentario actualizado |
| `body` | string | Texto actualizado del comentario |
### `jira_delete_comment`
@@ -281,8 +299,9 @@ Eliminar un comentario de una incidencia de Jira
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | object | Detalles de eliminación con marca de tiempo, clave de incidencia, ID de comentario y estado de éxito |
| `ts` | string | Marca de tiempo de la operación |
| `issueKey` | string | Clave de incidencia |
| `commentId` | string | ID del comentario eliminado |
### `jira_get_attachments`
@@ -300,8 +319,9 @@ Obtener todos los adjuntos de una incidencia de Jira
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | object | Datos de adjuntos con marca de tiempo, clave de incidencia y array de adjuntos |
| `ts` | string | Marca de tiempo de la operación |
| `issueKey` | string | Clave de incidencia |
| `attachments` | array | Array de adjuntos con id, nombre de archivo, tamaño, tipo MIME, fecha de creación y autor |
### `jira_delete_attachment`
@@ -319,8 +339,8 @@ Eliminar un adjunto de una incidencia de Jira
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | object | Detalles de eliminación con marca de tiempo, ID de adjunto y estado de éxito |
| `ts` | string | Marca de tiempo de la operación |
| `attachmentId` | string | ID del adjunto eliminado |
### `jira_add_worklog`
@@ -341,8 +361,10 @@ Añadir una entrada de registro de trabajo de seguimiento de tiempo a una incide
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | object | Detalles del registro de trabajo con marca de tiempo, clave de incidencia, ID del registro de trabajo, tiempo dedicado en segundos y estado de éxito |
| `ts` | string | Marca de tiempo de la operación |
| `issueKey` | string | Clave de incidencia a la que se añadió el registro de trabajo |
| `worklogId` | string | ID del registro de trabajo creado |
| `timeSpentSeconds` | number | Tiempo empleado en segundos |
### `jira_get_worklogs`
@@ -362,8 +384,10 @@ Obtener todas las entradas de registro de trabajo de una incidencia de Jira
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | object | Datos de registros de trabajo con marca de tiempo, clave de incidencia, recuento total y array de registros de trabajo |
| `ts` | string | Marca de tiempo de la operación |
| `issueKey` | string | Clave de incidencia |
| `total` | number | Número total de registros de trabajo |
| `worklogs` | array | Array de registros de trabajo con id, autor, segundos empleados, tiempo empleado, comentario, fecha de creación, actualización e inicio |
### `jira_update_worklog`
@@ -385,8 +409,9 @@ Actualizar una entrada existente de registro de trabajo en una incidencia de Jir
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | object | Detalles de actualización del registro de trabajo con marca de tiempo, clave de incidencia, ID de registro de trabajo y estado de éxito |
| `ts` | string | Marca de tiempo de la operación |
| `issueKey` | string | Clave de incidencia |
| `worklogId` | string | ID del registro de trabajo actualizado |
### `jira_delete_worklog`
@@ -405,8 +430,9 @@ Eliminar una entrada de registro de trabajo de una incidencia de Jira
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | object | Detalles de eliminación con marca de tiempo, clave de incidencia, ID de registro de trabajo y estado de éxito |
| `ts` | string | Marca de tiempo de la operación |
| `issueKey` | string | Clave de incidencia |
| `worklogId` | string | ID del registro de trabajo eliminado |
### `jira_create_issue_link`
@@ -427,8 +453,11 @@ Crear una relación de enlace entre dos incidencias de Jira
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | object | Detalles del enlace de incidencia con marca de tiempo, clave de incidencia de entrada, clave de incidencia de salida, tipo de enlace y estado de éxito |
| `ts` | string | Marca de tiempo de la operación |
| `inwardIssue` | string | Clave de incidencia de entrada |
| `outwardIssue` | string | Clave de incidencia de salida |
| `linkType` | string | Tipo de enlace de incidencia |
| `linkId` | string | ID del enlace creado |
### `jira_delete_issue_link`
@@ -446,8 +475,8 @@ Eliminar un enlace entre dos incidencias de Jira
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | object | Detalles de eliminación con marca de tiempo, ID del enlace y estado de éxito |
| `ts` | string | Marca de tiempo de la operación |
| `linkId` | string | ID del enlace eliminado |
### `jira_add_watcher`
@@ -466,8 +495,9 @@ Añadir un observador a una incidencia de Jira para recibir notificaciones sobre
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | object | Detalles del observador con marca de tiempo, clave de incidencia, ID de cuenta del observador y estado de éxito |
| `ts` | string | Marca de tiempo de la operación |
| `issueKey` | string | Clave de incidencia |
| `watcherAccountId` | string | ID de cuenta del observador añadido |
### `jira_remove_watcher`
@@ -486,8 +516,9 @@ Eliminar un observador de una incidencia de Jira
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Estado de éxito de la operación |
| `output` | object | Detalles de eliminación con marca de tiempo, clave de incidencia, ID de cuenta del observador y estado de éxito |
| `ts` | string | Marca de tiempo de la operación |
| `issueKey` | string | Clave de incidencia |
| `watcherAccountId` | string | ID de cuenta del observador eliminado |
## Notas

View File

@@ -54,7 +54,7 @@ Integra Slack en el flujo de trabajo. Puede enviar, actualizar y eliminar mensaj
### `slack_message`
Envía mensajes a canales o usuarios de Slack a través de la API de Slack. Compatible con el formato mrkdwn de Slack.
Envía mensajes a canales de Slack o mensajes directos. Compatible con el formato mrkdwn de Slack.
#### Entrada
@@ -62,9 +62,10 @@ Envía mensajes a canales o usuarios de Slack a través de la API de Slack. Comp
| --------- | ---- | -------- | ----------- |
| `authMethod` | string | No | Método de autenticación: oauth o bot_token |
| `botToken` | string | No | Token del bot para Bot personalizado |
| `channel` | string | | Canal de Slack objetivo (p. ej., #general) |
| `channel` | string | No | Canal de Slack objetivo (p. ej., #general) |
| `userId` | string | No | ID de usuario de Slack objetivo para mensajes directos (p. ej., U1234567890) |
| `text` | string | Sí | Texto del mensaje a enviar (admite formato mrkdwn de Slack) |
| `thread_ts` | string | No | Marca de tiempo del hilo para responder (crea respuesta en hilo) |
| `thread_ts` | string | No | Marca de tiempo del hilo al que responder (crea respuesta en hilo) |
| `files` | file[] | No | Archivos para adjuntar al mensaje |
#### Salida
@@ -109,7 +110,8 @@ Lee los últimos mensajes de los canales de Slack. Recupera el historial de conv
| --------- | ---- | -------- | ----------- |
| `authMethod` | string | No | Método de autenticación: oauth o bot_token |
| `botToken` | string | No | Token del bot para Bot personalizado |
| `channel` | string | | Canal de Slack del que leer mensajes (p. ej., #general) |
| `channel` | string | No | Canal de Slack del que leer mensajes (p. ej., #general) |
| `userId` | string | No | ID de usuario para conversación por MD (p. ej., U1234567890) |
| `limit` | number | No | Número de mensajes a recuperar (predeterminado: 10, máx: 100) |
| `oldest` | string | No | Inicio del rango de tiempo (marca de tiempo) |
| `latest` | string | No | Fin del rango de tiempo (marca de tiempo) |

View File

@@ -27,12 +27,14 @@ En Sim, la integración con Zoom permite a tus agentes automatizar la programaci
- Obtener detalles o invitaciones para cualquier reunión
- Actualizar o eliminar reuniones existentes directamente desde tus automatizaciones
Estas capacidades te permiten agilizar la colaboración remota, automatizar sesiones de video recurrentes y gestionar el entorno Zoom de tu organización como parte de tus flujos de trabajo.
Para conectarte a Zoom, arrastra el bloque de Zoom y haz clic en `Connect` para autenticarte con tu cuenta de Zoom. Una vez conectado, puedes usar las herramientas de Zoom para crear, listar, actualizar y eliminar reuniones de Zoom. En cualquier momento, puedes desconectar tu cuenta de Zoom haciendo clic en `Disconnect` en Configuración > Integraciones, y el acceso a tu cuenta de Zoom será revocado inmediatamente.
Estas capacidades te permiten agilizar la colaboración remota, automatizar sesiones de video recurrentes y gestionar el entorno de Zoom de tu organización, todo como parte de tus flujos de trabajo.
{/* MANUAL-CONTENT-END */}
## Instrucciones de uso
Integra Zoom en flujos de trabajo. Crea, lista, actualiza y elimina reuniones de Zoom. Obtén detalles de reuniones, invitaciones, grabaciones y participantes. Gestiona grabaciones en la nube de forma programática.
Integra Zoom en los flujos de trabajo. Crea, lista, actualiza y elimina reuniones de Zoom. Obtén detalles de reuniones, invitaciones, grabaciones y participantes. Gestiona grabaciones en la nube de forma programática.
## Herramientas
@@ -44,12 +46,12 @@ Crear una nueva reunión de Zoom
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `userId` | string | Sí | El ID de usuario o dirección de correo electrónico. Usa "me" para el usuario autenticado. |
| `userId` | string | Sí | El ID de usuario o dirección de correo electrónico. Use "me" para el usuario autenticado. |
| `topic` | string | Sí | Tema de la reunión |
| `type` | number | No | Tipo de reunión: 1=instantánea, 2=programada, 3=recurrente sin hora fija, 8=recurrente con hora fija |
| `startTime` | string | No | Hora de inicio de la reunión en formato ISO 8601 \(p. ej., 2025-06-03T10:00:00Z\) |
| `startTime` | string | No | Hora de inicio de la reunión en formato ISO 8601 \(ej., 2025-06-03T10:00:00Z\) |
| `duration` | number | No | Duración de la reunión en minutos |
| `timezone` | string | No | Zona horaria para la reunión \(p. ej., America/Los_Angeles\) |
| `timezone` | string | No | Zona horaria para la reunión \(ej., America/Los_Angeles\) |
| `password` | string | No | Contraseña de la reunión |
| `agenda` | string | No | Agenda de la reunión |
| `hostVideo` | boolean | No | Iniciar con video del anfitrión activado |
@@ -67,13 +69,13 @@ Crear una nueva reunión de Zoom
### `zoom_list_meetings`
Listar todas las reuniones para un usuario de Zoom
Listar todas las reuniones de un usuario de Zoom
#### Entrada
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `userId` | string | Sí | El ID de usuario o dirección de correo electrónico. Use "me" para el usuario autenticado. |
| `userId` | string | Sí | El ID de usuario o dirección de correo electrónico. Usa "me" para el usuario autenticado. |
| `type` | string | No | Filtro de tipo de reunión: scheduled, live, upcoming, upcoming_meetings, o previous_meetings |
| `pageSize` | number | No | Número de registros por página \(máximo 300\) |
| `nextPageToken` | string | No | Token para paginación para obtener la siguiente página de resultados |
@@ -103,7 +105,7 @@ Obtener detalles de una reunión específica de Zoom
| --------- | ---- | ----------- |
| `meeting` | object | Los detalles de la reunión |
### `zoom_update_meeting`
Obtener detalles de una reunión específica de Zoom
Actualizar una reunión existente de Zoom
@@ -122,9 +124,9 @@ Actualizar una reunión existente de Zoom
| `hostVideo` | boolean | No | Iniciar con video del anfitrión activado |
| `participantVideo` | boolean | No | Iniciar con video de participantes activado |
| `joinBeforeHost` | boolean | No | Permitir que los participantes se unan antes que el anfitrión |
| `muteUponEntry` | boolean | No | Silenciar a los participantes al entrar |
| `muteUponEntry` | boolean | No | Silenciar participantes al entrar |
| `waitingRoom` | boolean | No | Habilitar sala de espera |
| `autoRecording` | string | No | Configuración de grabación automática: local, en la nube o ninguna |
| `autoRecording` | string | No | Configuración de grabación automática: local, cloud o none |
#### Salida
@@ -132,7 +134,7 @@ Actualizar una reunión existente de Zoom
| --------- | ---- | ----------- |
| `success` | boolean | Si la reunión se actualizó correctamente |
### `zoom_delete_meeting`
Eliminar una reunión de Zoom
Eliminar o cancelar una reunión de Zoom
@@ -142,14 +144,14 @@ Eliminar o cancelar una reunión de Zoom
| --------- | ---- | -------- | ----------- |
| `meetingId` | string | Sí | El ID de la reunión a eliminar |
| `occurrenceId` | string | No | ID de ocurrencia para eliminar una ocurrencia específica de una reunión recurrente |
| `scheduleForReminder` | boolean | No | Enviar correo electrónico de recordatorio de cancelación a los inscritos |
| `cancelMeetingReminder` | boolean | No | Enviar correo electrónico de cancelación a los inscritos y anfitriones alternativos |
| `scheduleForReminder` | boolean | No | Enviar correo electrónico de recordatorio de cancelación a los registrados |
| `cancelMeetingReminder` | boolean | No | Enviar correo electrónico de cancelación a los registrados y anfitriones alternativos |
#### Salida
| Parámetro | Tipo | Descripción |
| --------- | ---- | ----------- |
| `success` | boolean | Indica si la reunión se eliminó correctamente |
| `success` | boolean | Si la reunión se eliminó correctamente |
### `zoom_get_meeting_invitation`
@@ -175,10 +177,10 @@ Listar todas las grabaciones en la nube para un usuario de Zoom
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `userId` | string | Sí | El ID de usuario o dirección de correo electrónico. Use "me" para el usuario autenticado. |
| `from` | string | No | Fecha de inicio en formato aaaa-mm-dd \(dentro de los últimos 6 meses\) |
| `userId` | string | Sí | El ID de usuario o dirección de correo electrónico. Usa "me" para el usuario autenticado. |
| `from` | string | No | Fecha de inicio en formato aaaa-mm-dd (dentro de los últimos 6 meses) |
| `to` | string | No | Fecha de fin en formato aaaa-mm-dd |
| `pageSize` | number | No | Número de registros por página \(máximo 300\) |
| `pageSize` | number | No | Número de registros por página (máx. 300) |
| `nextPageToken` | string | No | Token para paginación para obtener la siguiente página de resultados |
| `trash` | boolean | No | Establecer como true para listar grabaciones de la papelera |
@@ -189,9 +191,9 @@ Listar todas las grabaciones en la nube para un usuario de Zoom
| `recordings` | array | Lista de grabaciones |
| `pageInfo` | object | Información de paginación |
### `zoom_get_meeting_recordings`
Obtener todas las grabaciones para una reunión específica de Zoom
Obtener todas las grabaciones de una reunión específica de Zoom
Obtener todas las grabaciones para una reunión específica de Zoom
#### Entrada
@@ -199,7 +201,7 @@ Obtener todas las grabaciones de una reunión específica de Zoom
| --------- | ---- | -------- | ----------- |
| `meetingId` | string | Sí | El ID de la reunión o UUID de la reunión |
| `includeFolderItems` | boolean | No | Incluir elementos dentro de una carpeta |
| `ttl` | number | No | Tiempo de vida para las URLs de descarga en segundos \(máx. 604800\) |
| `ttl` | number | No | Tiempo de vida para URLs de descarga en segundos \(máx. 604800\) |
#### Salida
@@ -207,9 +209,9 @@ Obtener todas las grabaciones de una reunión específica de Zoom
| --------- | ---- | ----------- |
| `recording` | object | La grabación de la reunión con todos los archivos |
### `zoom_delete_recording`
Eliminar grabaciones en la nube para una reunión de Zoom
Eliminar grabaciones en la nube de una reunión de Zoom
Eliminar grabaciones en la nube para una reunión de Zoom
#### Entrada
@@ -225,7 +227,7 @@ Eliminar grabaciones en la nube de una reunión de Zoom
| --------- | ---- | ----------- |
| `success` | boolean | Si la grabación se eliminó correctamente |
### `zoom_list_past_participants`
Listar participantes de una reunión pasada de Zoom
Listar participantes de una reunión pasada de Zoom
@@ -233,7 +235,7 @@ Listar participantes de una reunión pasada de Zoom
| Parámetro | Tipo | Obligatorio | Descripción |
| --------- | ---- | -------- | ----------- |
| `meetingId` | string | Sí | El ID o UUID de la reunión pasada |
| `meetingId` | string | Sí | El ID de la reunión pasada o UUID |
| `pageSize` | number | No | Número de registros por página \(máx. 300\) |
| `nextPageToken` | string | No | Token para paginación para obtener la siguiente página de resultados |

View File

@@ -48,8 +48,13 @@ Récupérer des informations détaillées sur un ticket Jira spécifique
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | booléen | Statut de réussite de l'opération |
| `output` | objet | Détails du ticket Jira avec la clé du ticket, le résumé, la description, les horodatages de création et de mise à jour |
| `ts` | chaîne | Horodatage de l'opération |
| `issueKey` | chaîne | Clé du ticket \(ex. : PROJ-123\) |
| `summary` | chaîne | Résumé du ticket |
| `description` | json | Contenu de la description du ticket |
| `created` | chaîne | Horodatage de création du ticket |
| `updated` | chaîne | Horodatage de dernière mise à jour du ticket |
| `issue` | json | Objet complet du ticket avec tous les champs |
### `jira_update`
@@ -73,8 +78,9 @@ Mettre à jour un ticket Jira
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Statut de réussite de l'opération |
| `output` | object | Détails de la demande Jira mise à jour avec horodatage, clé de la demande, résumé et statut de réussite |
| `ts` | chaîne | Horodatage de l'opération |
| `issueKey` | chaîne | Clé du ticket mis à jour \(ex. : PROJ-123\) |
| `summary` | chaîne | Résumé du ticket après mise à jour |
### `jira_write`
@@ -97,8 +103,10 @@ Rédiger une demande Jira
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Statut de réussite de l'opération |
| `output` | object | Détails de la demande Jira créée avec horodatage, clé de la demande, résumé, statut de réussite et URL |
| `ts` | chaîne | Horodatage de l'opération |
| `issueKey` | chaîne | Clé du ticket créé \(ex. : PROJ-123\) |
| `summary` | chaîne | Résumé du ticket |
| `url` | chaîne | URL vers le ticket créé |
### `jira_bulk_read`
@@ -116,8 +124,7 @@ Récupérer plusieurs demandes Jira en masse
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Statut de réussite de l'opération |
| `output` | array | Tableau des tickets Jira avec résumé, description, horodatages de création et de mise à jour |
| `issues` | tableau | Tableau des tickets Jira avec horodatages ts, résumé, description, création et mise à jour |
### `jira_delete_issue`
@@ -136,8 +143,8 @@ Supprimer un ticket Jira
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | booléen | Statut de réussite de l'opération |
| `output` | objet | Détails du ticket supprimé avec horodatage, clé du ticket et statut de réussite |
| `ts` | chaîne | Horodatage de l'opération |
| `issueKey` | chaîne | Clé du ticket supprimé |
### `jira_assign_issue`
@@ -156,8 +163,9 @@ Assigner un ticket Jira à un utilisateur
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | booléen | Statut de réussite de l'opération |
| `output` | objet | Détails de l'assignation avec horodatage, clé du ticket, ID de l'assigné et statut de réussite |
| `ts` | chaîne | Horodatage de l'opération |
| `issueKey` | chaîne | Clé du ticket qui a été assigné |
| `assigneeId` | chaîne | ID de compte de l'assigné |
### `jira_transition_issue`
@@ -177,8 +185,9 @@ Déplacer un ticket Jira entre les statuts de workflow (par ex., À faire -> En
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | booléen | Statut de réussite de l'opération |
| `output` | objet | Détails de la transition avec horodatage, clé du ticket, ID de transition et statut de réussite |
| `ts` | string | Horodatage de l'opération |
| `issueKey` | string | Clé du ticket qui a été transition |
| `transitionId` | string | ID de la transition appliquée |
### `jira_search_issues`
@@ -199,8 +208,11 @@ Rechercher des tickets Jira à l'aide de JQL (Jira Query Language)
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | booléen | Statut de réussite de l'opération |
| `output` | objet | Résultats de recherche avec horodatage, nombre total, détails de pagination et tableau des tickets correspondants |
| `ts` | string | Horodatage de l'opération |
| `total` | number | Nombre total de tickets correspondants |
| `startAt` | number | Index de début de pagination |
| `maxResults` | number | Nombre maximum de résultats par page |
| `issues` | array | Tableau des tickets correspondants avec clé, résumé, statut, assigné, créé, mis à jour |
### `jira_add_comment`
@@ -219,8 +231,10 @@ Ajouter un commentaire à un ticket Jira
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | booléen | Statut de réussite de l'opération |
| `output` | objet | Détails du commentaire avec horodatage, clé du ticket, ID du commentaire, corps et statut de réussite |
| `ts` | string | Horodatage de l'opération |
| `issueKey` | string | Clé du ticket auquel le commentaire a été ajouté |
| `commentId` | string | ID du commentaire créé |
| `body` | string | Contenu textuel du commentaire |
### `jira_get_comments`
@@ -240,8 +254,10 @@ Obtenir tous les commentaires d'un ticket Jira
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Statut de réussite de l'opération |
| `output` | object | Données des commentaires avec horodatage, clé du ticket, nombre total et tableau de commentaires |
| `ts` | string | Horodatage de l'opération |
| `issueKey` | string | Clé du ticket |
| `total` | number | Nombre total de commentaires |
| `comments` | array | Tableau des commentaires avec id, auteur, corps, créé, mis à jour |
### `jira_update_comment`
@@ -261,8 +277,10 @@ Mettre à jour un commentaire existant sur un ticket Jira
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Statut de réussite de l'opération |
| `output` | object | Détails du commentaire mis à jour avec horodatage, clé du ticket, ID du commentaire, texte du corps et statut de réussite |
| `ts` | string | Horodatage de l'opération |
| `issueKey` | string | Clé du ticket |
| `commentId` | string | ID du commentaire mis à jour |
| `body` | string | Texte du commentaire mis à jour |
### `jira_delete_comment`
@@ -281,8 +299,9 @@ Supprimer un commentaire d'un ticket Jira
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Statut de réussite de l'opération |
| `output` | object | Détails de la suppression avec horodatage, clé du ticket, ID du commentaire et statut de réussite |
| `ts` | string | Horodatage de l'opération |
| `issueKey` | string | Clé du ticket |
| `commentId` | string | ID du commentaire supprimé |
### `jira_get_attachments`
@@ -300,8 +319,9 @@ Obtenir toutes les pièces jointes d'un ticket Jira
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Statut de réussite de l'opération |
| `output` | object | Données des pièces jointes avec horodatage, clé du ticket et tableau des pièces jointes |
| `ts` | string | Horodatage de l'opération |
| `issueKey` | string | Clé du ticket |
| `attachments` | array | Tableau des pièces jointes avec id, nom de fichier, taille, type MIME, date de création, auteur |
### `jira_delete_attachment`
@@ -319,8 +339,8 @@ Supprimer une pièce jointe d'un ticket Jira
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Statut de réussite de l'opération |
| `output` | object | Détails de la suppression avec horodatage, ID de la pièce jointe et statut de réussite |
| `ts` | string | Horodatage de l'opération |
| `attachmentId` | string | ID de la pièce jointe supprimée |
### `jira_add_worklog`
@@ -341,8 +361,10 @@ Ajouter une entrée de journal de travail pour le suivi du temps à un ticket Ji
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | booléen | Statut de réussite de l'opération |
| `output` | objet | Détails du journal de travail avec horodatage, clé du ticket, ID du journal de travail, temps passé en secondes et statut de réussite |
| `ts` | string | Horodatage de l'opération |
| `issueKey` | string | Clé du ticket auquel le journal de travail a été ajouté |
| `worklogId` | string | ID du journal de travail créé |
| `timeSpentSeconds` | number | Temps passé en secondes |
### `jira_get_worklogs`
@@ -362,8 +384,10 @@ Obtenir toutes les entrées du journal de travail d'un ticket Jira
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Statut de réussite de l'opération |
| `output` | object | Données des journaux de travail avec horodatage, clé du ticket, nombre total et tableau des journaux de travail |
| `ts` | string | Horodatage de l'opération |
| `issueKey` | string | Clé du ticket |
| `total` | number | Nombre total de journaux de travail |
| `worklogs` | array | Tableau des journaux de travail avec id, auteur, temps passé en secondes, temps passé, commentaire, date de création, mise à jour, démarrage |
### `jira_update_worklog`
@@ -385,8 +409,9 @@ Mettre à jour une entrée de journal de travail existante sur un ticket Jira
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Statut de réussite de l'opération |
| `output` | object | Détails de la mise à jour du journal de travail avec horodatage, clé du ticket, ID du journal de travail et statut de réussite |
| `ts` | string | Horodatage de l'opération |
| `issueKey` | string | Clé du ticket |
| `worklogId` | string | ID du journal de travail mis à jour |
### `jira_delete_worklog`
@@ -405,8 +430,9 @@ Supprimer une entrée de journal de travail d'un ticket Jira
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Statut de réussite de l'opération |
| `output` | object | Détails de la suppression avec horodatage, clé de la demande, ID du journal de travail et statut de réussite |
| `ts` | string | Horodatage de l'opération |
| `issueKey` | string | Clé du ticket |
| `worklogId` | string | ID du journal de travail supprimé |
### `jira_create_issue_link`
@@ -427,8 +453,11 @@ Créer une relation de lien entre deux tickets Jira
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Statut de réussite de l'opération |
| `output` | object | Détails du lien entre tickets avec horodatage, clé du ticket entrant, clé du ticket sortant, type de lien et statut de réussite |
| `ts` | string | Horodatage de l'opération |
| `inwardIssue` | string | Clé du ticket entrant |
| `outwardIssue` | string | Clé du ticket sortant |
| `linkType` | string | Type de lien entre tickets |
| `linkId` | string | ID du lien créé |
### `jira_delete_issue_link`
@@ -446,8 +475,8 @@ Supprimer un lien entre deux tickets Jira
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Statut de réussite de l'opération |
| `output` | object | Détails de la suppression avec horodatage, ID du lien et statut de réussite |
| `ts` | string | Horodatage de l'opération |
| `linkId` | string | ID du lien supprimé |
### `jira_add_watcher`
@@ -466,8 +495,9 @@ Ajouter un observateur à un ticket Jira pour recevoir des notifications sur les
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Statut de réussite de l'opération |
| `output` | object | Détails de l'observateur avec horodatage, clé du ticket, ID de compte de l'observateur et statut de réussite |
| `ts` | string | Horodatage de l'opération |
| `issueKey` | string | Clé du ticket |
| `watcherAccountId` | string | ID du compte observateur ajouté |
### `jira_remove_watcher`
@@ -486,8 +516,9 @@ Supprimer un observateur d'un ticket Jira
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `success` | boolean | Statut de réussite de l'opération |
| `output` | object | Détails de la suppression avec horodatage, clé de la demande, ID du compte observateur et statut de réussite |
| `ts` | string | Horodatage de l'opération |
| `issueKey` | string | Clé du ticket |
| `watcherAccountId` | string | ID du compte observateur supprimé |
## Notes

View File

@@ -54,17 +54,18 @@ Intégrez Slack dans le flux de travail. Peut envoyer, mettre à jour et supprim
### `slack_message`
Envoyez des messages aux canaux ou utilisateurs Slack via l'API Slack. Prend en charge le formatage mrkdwn de Slack.
Envoyez des messages aux canaux Slack ou en messages directs. Prend en charge le formatage mrkdwn de Slack.
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | ---------- | ----------- |
| `authMethod` | chaîne | Non | Méthode d'authentification : oauth ou bot_token |
| `botToken` | chaîne | Non | Jeton du bot pour le Bot personnalisé |
| `channel` | chaîne | Oui | Canal Slack cible \(par ex., #general\) |
| `botToken` | chaîne | Non | Jeton du bot pour Bot personnalisé |
| `channel` | chaîne | Non | Canal Slack cible \(ex. : #general\) |
| `userId` | chaîne | Non | ID utilisateur Slack cible pour les messages directs \(ex. : U1234567890\) |
| `text` | chaîne | Oui | Texte du message à envoyer \(prend en charge le formatage mrkdwn de Slack\) |
| `thread_ts` | chaîne | Non | Horodatage du fil pour répondre \(crée une réponse dans le fil\) |
| `thread_ts` | chaîne | Non | Horodatage du fil de discussion auquel répondre \(crée une réponse dans le fil\) |
| `files` | fichier[] | Non | Fichiers à joindre au message |
#### Sortie
@@ -109,7 +110,8 @@ Lisez les derniers messages des canaux Slack. Récupérez l'historique des conve
| --------- | ---- | ---------- | ----------- |
| `authMethod` | chaîne | Non | Méthode d'authentification : oauth ou bot_token |
| `botToken` | chaîne | Non | Jeton du bot pour Bot personnalisé |
| `channel` | chaîne | Oui | Canal Slack pour lire les messages \(ex. : #general\) |
| `channel` | chaîne | Non | Canal Slack pour lire les messages \(ex. : #general\) |
| `userId` | chaîne | Non | ID utilisateur pour la conversation en MP \(ex. : U1234567890\) |
| `limit` | nombre | Non | Nombre de messages à récupérer \(par défaut : 10, max : 100\) |
| `oldest` | chaîne | Non | Début de la plage temporelle \(horodatage\) |
| `latest` | chaîne | Non | Fin de la plage temporelle \(horodatage\) |

View File

@@ -27,12 +27,14 @@ Dans Sim, l'intégration Zoom permet à vos agents d'automatiser la planificatio
- Récupérer les détails ou les invitations pour n'importe quelle réunion
- Mettre à jour ou supprimer des réunions existantes directement depuis vos automatisations
Ces capacités vous permettent de rationaliser la collaboration à distance, d'automatiser les sessions vidéo récurrentes et de gérer l'environnement Zoom de votre organisation, le tout dans le cadre de vos flux de travail.
Pour vous connecter à Zoom, déposez le bloc Zoom et cliquez sur `Connect` pour vous authentifier avec votre compte Zoom. Une fois connecté, vous pouvez utiliser les outils Zoom pour créer, lister, mettre à jour et supprimer des réunions Zoom. À tout moment, vous pouvez déconnecter votre compte Zoom en cliquant sur `Disconnect` dans Paramètres > Intégrations, et l'accès à votre compte Zoom sera immédiatement révoqué.
Ces fonctionnalités vous permettent de rationaliser la collaboration à distance, d'automatiser les sessions vidéo récurrentes et de gérer l'environnement Zoom de votre organisation, le tout dans le cadre de vos flux de travail.
{/* MANUAL-CONTENT-END */}
## Instructions d'utilisation
Intégrez Zoom dans les flux de travail. Créez, listez, mettez à jour et supprimez des réunions Zoom. Obtenez les détails des réunions, les invitations, les enregistrements et les participants. Gérez les enregistrements cloud par programmation.
Intégrez Zoom dans vos flux de travail. Créez, listez, mettez à jour et supprimez des réunions Zoom. Obtenez les détails des réunions, les invitations, les enregistrements et les participants. Gérez les enregistrements cloud de manière programmatique.
## Outils
@@ -43,7 +45,7 @@ Créer une nouvelle réunion Zoom
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | -------- | ----------- |
| --------- | ---- | ----------- | ----------- |
| `userId` | string | Oui | L'ID utilisateur ou l'adresse e-mail. Utilisez "me" pour l'utilisateur authentifié. |
| `topic` | string | Oui | Sujet de la réunion |
| `type` | number | Non | Type de réunion : 1=instantanée, 2=programmée, 3=récurrente sans heure fixe, 8=récurrente à heure fixe |
@@ -57,7 +59,7 @@ Créer une nouvelle réunion Zoom
| `joinBeforeHost` | boolean | Non | Autoriser les participants à rejoindre avant l'hôte |
| `muteUponEntry` | boolean | Non | Mettre les participants en sourdine à l'entrée |
| `waitingRoom` | boolean | Non | Activer la salle d'attente |
| `autoRecording` | string | Non | Paramètre d'enregistrement automatique : local, cloud ou none |
| `autoRecording` | string | Non | Paramètre d'enregistrement automatique : local, cloud, ou none |
#### Sortie
@@ -72,11 +74,11 @@ Lister toutes les réunions pour un utilisateur Zoom
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | ----------- | ----------- |
| --------- | ---- | -------- | ----------- |
| `userId` | string | Oui | L'ID utilisateur ou l'adresse e-mail. Utilisez "me" pour l'utilisateur authentifié. |
| `type` | string | Non | Filtre de type de réunion : scheduled, live, upcoming, upcoming_meetings, ou previous_meetings |
| `pageSize` | number | Non | Nombre d'enregistrements par page \(max 300\) |
| `nextPageToken` | string | Non | Jeton pour la pagination afin d'obtenir la page suivante des résultats |
| `nextPageToken` | string | Non | Jeton pour la pagination pour obtenir la page suivante de résultats |
#### Sortie
@@ -92,7 +94,7 @@ Obtenir les détails d'une réunion Zoom spécifique
#### Entrée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | ----------- | ----------- |
| --------- | ---- | -------- | ----------- |
| `meetingId` | string | Oui | L'ID de la réunion |
| `occurrenceId` | string | Non | ID d'occurrence pour les réunions récurrentes |
| `showPreviousOccurrences` | boolean | Non | Afficher les occurrences précédentes pour les réunions récurrentes |
@@ -103,7 +105,7 @@ Obtenir les détails d'une réunion Zoom spécifique
| --------- | ---- | ----------- |
| `meeting` | object | Les détails de la réunion |
### `zoom_update_meeting`
Obtenir les détails d'une réunion Zoom spécifique
Mettre à jour une réunion Zoom existante
@@ -113,7 +115,7 @@ Mettre à jour une réunion Zoom existante
| --------- | ---- | -------- | ----------- |
| `meetingId` | string | Oui | L'ID de la réunion à mettre à jour |
| `topic` | string | Non | Sujet de la réunion |
| `type` | number | Non | Type de réunion : 1=instantanée, 2=programmée, 3=récurrente sans horaire fixe, 8=récurrente avec horaire fixe |
| `type` | number | Non | Type de réunion : 1=instantanée, 2=programmée, 3=récurrente sans heure fixe, 8=récurrente à heure fixe |
| `startTime` | string | Non | Heure de début de la réunion au format ISO 8601 \(ex., 2025-06-03T10:00:00Z\) |
| `duration` | number | Non | Durée de la réunion en minutes |
| `timezone` | string | Non | Fuseau horaire pour la réunion \(ex., America/Los_Angeles\) |
@@ -132,7 +134,7 @@ Mettre à jour une réunion Zoom existante
| --------- | ---- | ----------- |
| `success` | boolean | Indique si la réunion a été mise à jour avec succès |
### `zoom_delete_meeting`
Supprimer une réunion Zoom
Supprimer ou annuler une réunion Zoom
@@ -159,13 +161,13 @@ Obtenir le texte d'invitation pour une réunion Zoom
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | -------- | ----------- |
| `meetingId` | string | Oui | L'identifiant de la réunion |
| `meetingId` | string | Oui | L'ID de la réunion |
#### Sortie
| Paramètre | Type | Description |
| --------- | ---- | ----------- |
| `invitation` | string | Le texte d'invitation à la réunion |
| `invitation` | string | Le texte d'invitation de la réunion |
### `zoom_list_recordings`
@@ -175,11 +177,11 @@ Lister tous les enregistrements cloud pour un utilisateur Zoom
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | -------- | ----------- |
| `userId` | string | Oui | L'identifiant ou l'adresse e-mail de l'utilisateur. Utilisez "me" pour l'utilisateur authentifié. |
| `from` | string | Non | Date de début au format aaaa-mm-jj \(dans les 6 derniers mois\) |
| `userId` | string | Oui | L'ID utilisateur ou l'adresse e-mail. Utilisez "me" pour l'utilisateur authentifié. |
| `from` | string | Non | Date de début au format aaaa-mm-jj (dans les 6 derniers mois) |
| `to` | string | Non | Date de fin au format aaaa-mm-jj |
| `pageSize` | number | Non | Nombre d'enregistrements par page \(max 300\) |
| `nextPageToken` | string | Non | Jeton pour la pagination afin d'obtenir la page suivante des résultats |
| `pageSize` | number | Non | Nombre d'enregistrements par page (max 300) |
| `nextPageToken` | string | Non | Jeton pour la pagination pour obtenir la page suivante de résultats |
| `trash` | boolean | Non | Définir sur true pour lister les enregistrements de la corbeille |
#### Sortie
@@ -189,7 +191,7 @@ Lister tous les enregistrements cloud pour un utilisateur Zoom
| `recordings` | array | Liste des enregistrements |
| `pageInfo` | object | Informations de pagination |
### `zoom_get_meeting_recordings`
Obtenir tous les enregistrements pour une réunion Zoom spécifique
Obtenir tous les enregistrements pour une réunion Zoom spécifique
@@ -207,9 +209,9 @@ Obtenir tous les enregistrements pour une réunion Zoom spécifique
| --------- | ---- | ----------- |
| `recording` | object | L'enregistrement de la réunion avec tous les fichiers |
### `zoom_delete_recording`
Supprimer les enregistrements cloud pour une réunion Zoom
Supprimer les enregistrements cloud d'une réunion Zoom
Supprimer les enregistrements cloud pour une réunion Zoom
#### Entrée
@@ -225,7 +227,7 @@ Supprimer les enregistrements cloud d'une réunion Zoom
| --------- | ---- | ----------- |
| `success` | boolean | Si l'enregistrement a été supprimé avec succès |
### `zoom_list_past_participants`
Lister les participants d'une réunion Zoom passée
Lister les participants d'une réunion Zoom passée
@@ -233,7 +235,7 @@ Lister les participants d'une réunion Zoom passée
| Paramètre | Type | Obligatoire | Description |
| --------- | ---- | -------- | ----------- |
| `meetingId` | string | Oui | L'ID ou l'UUID de la réunion passée |
| `meetingId` | string | Oui | L'ID de la réunion passée ou l'UUID |
| `pageSize` | number | Non | Nombre d'enregistrements par page \(max 300\) |
| `nextPageToken` | string | Non | Jeton pour la pagination pour obtenir la page suivante de résultats |

View File

@@ -48,8 +48,13 @@ Jiraをワークフローに統合します。課題の読み取り、書き込
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | object | 課題キー、要約、説明、作成日時、更新日時を含むJira課題の詳細 |
| `ts` | string | 操作のタイムスタンプ |
| `issueKey` | string | 課題キーPROJ-123 |
| `summary` | string | 課題の要約 |
| `description` | json | 課題の説明内容 |
| `created` | string | 課題作成タイムスタンプ |
| `updated` | string | 課題最終更新タイムスタンプ |
| `issue` | json | すべてのフィールドを含む完全な課題オブジェクト |
### `jira_update`
@@ -73,8 +78,9 @@ Jira課題を更新する
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | object | タイムスタンプ、課題キー、要約、成功ステータスを含む更新されたJira課題の詳細 |
| `ts` | string | 操作のタイムスタンプ |
| `issueKey` | string | 更新された課題キーPROJ-123 |
| `summary` | string | 更新後の課題要約 |
### `jira_write`
@@ -97,8 +103,10 @@ Jira課題を作成する
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | object | タイムスタンプ、課題キー、要約、成功ステータス、URLを含む作成されたJira課題の詳細 |
| `ts` | string | 操作のタイムスタンプ |
| `issueKey` | string | 作成された課題キーPROJ-123 |
| `summary` | string | 課題の要約 |
| `url` | string | 作成された課題へのURL |
### `jira_bulk_read`
@@ -116,8 +124,7 @@ Jira課題を作成する
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | array | 概要、説明、作成日時、更新日時を含むJiraの課題の配列 |
| `issues` | array | タイムスタンプ、要約、説明、作成日時、更新日時を含むJira課題の配列 |
### `jira_delete_issue`
@@ -136,8 +143,8 @@ Jira課題を削除する
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | object | タイムスタンプ、課題キー、成功ステータスを含む削除された課題の詳細 |
| `ts` | string | 操作のタイムスタンプ |
| `issueKey` | string | 削除された課題キー |
### `jira_assign_issue`
@@ -156,8 +163,9 @@ Jira課題をユーザーに割り当てる
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | object | タイムスタンプ、課題キー、担当者ID、成功ステータスを含む割り当ての詳細 |
| `ts` | string | 操作のタイムスタンプ |
| `issueKey` | string | 割り当てられた課題キー |
| `assigneeId` | string | 担当者のアカウントID |
### `jira_transition_issue`
@@ -177,8 +185,9 @@ Jira課題をワークフローステータス間で移動するTo Do
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | object | タイムスタンプ、課題キー、移行ID、成功ステータスを含む移行の詳細 |
| `ts` | string | 操作のタイムスタンプ |
| `issueKey` | string | 遷移した課題キー |
| `transitionId` | string | 適用されたトランジションID |
### `jira_search_issues`
@@ -199,8 +208,11 @@ JQLJira Query Languageを使用してJira課題を検索する
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | object | タイムスタンプ、合計数、ページネーション詳細、一致する課題の配列を含む検索結果 |
| `ts` | string | 操作のタイムスタンプ |
| `total` | number | 一致する課題の総数 |
| `startAt` | number | ページネーション開始インデックス |
| `maxResults` | number | ページあたりの最大結果数 |
| `issues` | array | キー、要約、ステータス、担当者、作成日時、更新日時を含む一致する課題の配列 |
### `jira_add_comment`
@@ -219,8 +231,10 @@ Jira課題にコメントを追加する
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | object | タイムスタンプ、課題キー、コメントID、本文、成功ステータスを含むコメント詳細 |
| `ts` | string | 操作のタイムスタンプ |
| `issueKey` | string | コメントが追加された課題キー |
| `commentId` | string | 作成されたコメントID |
| `body` | string | コメントのテキスト内容 |
### `jira_get_comments`
@@ -240,8 +254,10 @@ Jira課題からすべてのコメントを取得する
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | object | タイムスタンプ、課題キー、合計数、コメントの配列を含むコメントデータ |
| `ts` | string | 操作のタイムスタンプ |
| `issueKey` | string | 課題キー |
| `total` | number | コメントの総数 |
| `comments` | array | ID、作成者、本文、作成日時、更新日時を含むコメントの配列 |
### `jira_update_comment`
@@ -261,8 +277,10 @@ Jira課題の既存コメントを更新する
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | object | タイムスタンプ、課題キー、コメントID、本文テキスト、成功ステータスを含む更新されたコメントの詳細 |
| `ts` | string | 操作のタイムスタンプ |
| `issueKey` | string | 課題キー |
| `commentId` | string | 更新されたコメントID |
| `body` | string | 更新されたコメントテキスト |
### `jira_delete_comment`
@@ -281,8 +299,9 @@ Jira課題からコメントを削除する
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | object | タイムスタンプ、課題キー、コメントID、成功ステータスを含む削除の詳細 |
| `ts` | string | 操作のタイムスタンプ |
| `issueKey` | string | 課題キー |
| `commentId` | string | 削除されたコメントID |
### `jira_get_attachments`
@@ -300,8 +319,9 @@ Jira課題からすべての添付ファイルを取得する
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | object | タイムスタンプ、課題キー、添付ファイルの配列を含む添付ファイルデータ |
| `ts` | string | 操作のタイムスタンプ |
| `issueKey` | string | 課題キー |
| `attachments` | array | ID、ファイル名、サイズ、MIMEタイプ、作成日時、作成者を含む添付ファイルの配列 |
### `jira_delete_attachment`
@@ -319,8 +339,8 @@ Jira課題から添付ファイルを削除する
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | object | タイムスタンプ、添付ファイルID、成功ステータスを含む削除の詳細 |
| `ts` | string | 操作のタイムスタンプ |
| `attachmentId` | string | 削除された添付ファイルID |
### `jira_add_worklog`
@@ -341,8 +361,10 @@ Jira課題に作業時間記録エントリを追加する
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | object | タイムスタンプ、課題キー、作業ログID、秒単位の作業時間、成功ステータスを含む作業ログの詳細 |
| `ts` | string | 操作のタイムスタンプ |
| `issueKey` | string | 作業ログが追加された課題キー |
| `worklogId` | string | 作成された作業ログID |
| `timeSpentSeconds` | number | 秒単位の作業時間 |
### `jira_get_worklogs`
@@ -362,8 +384,10 @@ Jira課題からすべての作業ログエントリを取得する
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | object | タイムスタンプ、課題キー、合計数、作業ログの配列を含む作業ログデータ |
| `ts` | string | 操作のタイムスタンプ |
| `issueKey` | string | 課題キー |
| `total` | number | 作業ログの総数 |
| `worklogs` | array | ID、作成者、秒単位の作業時間、作業時間、コメント、作成日時、更新日時、開始日時を含む作業ログの配列 |
### `jira_update_worklog`
@@ -385,8 +409,9 @@ Jira課題の既存の作業ログエントリを更新する
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | object | タイムスタンプ、課題キー、作業ログID、成功ステータスを含む作業ログ更新の詳細 |
| `ts` | string | 操作のタイムスタンプ |
| `issueKey` | string | 課題キー |
| `worklogId` | string | 更新された作業ログID |
### `jira_delete_worklog`
@@ -405,8 +430,9 @@ Jira課題から作業ログエントリを削除する
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | object | タイムスタンプ、課題キー、作業ログID、成功ステータスを含む削除の詳細 |
| `ts` | string | 操作のタイムスタンプ |
| `issueKey` | string | 課題キー |
| `worklogId` | string | 削除された作業ログID |
### `jira_create_issue_link`
@@ -427,8 +453,11 @@ Jira課題から作業ログエントリを削除する
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | object | タイムスタンプ、インワード課題キー、アウトワード課題キー、リンクタイプ、成功ステータスを含む課題リンクの詳細 |
| `ts` | string | 操作のタイムスタンプ |
| `inwardIssue` | string | インワード課題キー |
| `outwardIssue` | string | アウトワード課題キー |
| `linkType` | string | 課題リンクのタイプ |
| `linkId` | string | 作成されたリンクID |
### `jira_delete_issue_link`
@@ -446,8 +475,8 @@ Jira課題から作業ログエントリを削除する
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | object | タイムスタンプ、リンクID、成功ステータスを含む削除の詳細 |
| `ts` | string | 操作のタイムスタンプ |
| `linkId` | string | 削除されたリンクID |
### `jira_add_watcher`
@@ -466,8 +495,9 @@ Jira課題から作業ログエントリを削除する
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | object | タイムスタンプ、課題キー、ウォッチャーアカウントID、成功ステータスを含むウォッチャーの詳細 |
| `ts` | string | 操作のタイムスタンプ |
| `issueKey` | string | 課題キー |
| `watcherAccountId` | string | 追加されたウォッチャーのアカウントID |
### `jira_remove_watcher`
@@ -486,8 +516,9 @@ Jira課題からウォッチャーを削除する
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功ステータス |
| `output` | object | タイムスタンプ、課題キー、ウォッチャーアカウントID、成功ステータスを含む削除詳細 |
| `ts` | string | 操作のタイムスタンプ |
| `issueKey` | string | 課題キー |
| `watcherAccountId` | string | 削除されたウォッチャーのアカウントID |
## 注意事項

View File

@@ -53,7 +53,7 @@ Slackをワークフローに統合します。メッセージの送信、更新
### `slack_message`
Slack APIを通じてSlackチャンネルまたはユーザーにメッセージを送信します。Slack mrkdwnフォーマットをサポートしています。
Slackチャンネルまたはダイレクトメッセージにメッセージを送信します。Slack mrkdwn形式をサポートしています。
#### 入力
@@ -61,7 +61,8 @@ Slack APIを通じてSlackチャンネルまたはユーザーにメッセージ
| --------- | ---- | -------- | ----------- |
| `authMethod` | string | いいえ | 認証方法oauthまたはbot_token |
| `botToken` | string | いいえ | カスタムボット用のボットトークン |
| `channel` | string | い | 対象のSlackチャンネル#general |
| `channel` | string | いいえ | 対象のSlackチャンネル#general |
| `userId` | string | いいえ | ダイレクトメッセージ用の対象SlackユーザーIDU1234567890 |
| `text` | string | はい | 送信するメッセージテキストSlack mrkdwn形式をサポート |
| `thread_ts` | string | いいえ | 返信するスレッドのタイムスタンプ(スレッド返信を作成) |
| `files` | file[] | いいえ | メッセージに添付するファイル |
@@ -108,7 +109,8 @@ Slackチャンネルから最新のメッセージを読み取ります。フィ
| --------- | ---- | -------- | ----------- |
| `authMethod` | string | いいえ | 認証方法oauthまたはbot_token |
| `botToken` | string | いいえ | カスタムボット用のボットトークン |
| `channel` | string | い | メッセージを読み取るSlackチャンネル#general |
| `channel` | string | いいえ | メッセージを読み取るSlackチャンネル#general |
| `userId` | string | いいえ | DMの会話用のユーザーIDU1234567890 |
| `limit` | number | いいえ | 取得するメッセージ数デフォルト10、最大100 |
| `oldest` | string | いいえ | 時間範囲の開始(タイムスタンプ) |
| `latest` | string | いいえ | 時間範囲の終了(タイムスタンプ) |

View File

@@ -27,10 +27,12 @@ Simでは、Zoom統合によりエージェントがスケジュール設定と
- 任意の会議の詳細や招待状を取得
- 自動化から直接既存の会議を更新または削除
これらの機能により、リモートコラボレーションの効率化、定期的なビデオセッションの自動化、ワークフローの一部として組織のZoom環境を管理することができます。
Zoomに接続するには、Zoomブロックをドロップして `Connect` をクリックし、Zoomアカウントで認証します。接続後、Zoomツールを使用してZoomミーティングの作成、一覧表示、更新、削除ができます。いつでも設定 > 統合から `Disconnect` をクリックしてZoomアカウントの接続を解除でき、Zoomアカウントへのアクセスは直ちに取り消されます。
これらの機能により、リモートコラボレーションの効率化、定期的なビデオセッションの自動化、組織のZoom環境の管理をワークフローの一部として行うことができます。
{/* MANUAL-CONTENT-END */}
## 使用方法
## 使用手順
Zoomをワークフローに統合します。Zoomミーティングの作成、一覧表示、更新、削除ができます。ミーティングの詳細、招待状、録画、参加者を取得します。クラウド録画をプログラムで管理します。
@@ -42,11 +44,11 @@ Zoomをワークフローに統合します。Zoomミーティングの作成、
#### 入力
| パラメータ | 種類 | 必須 | 説明 |
| パラメータ | | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `userId` | string | はい | ユーザーIDまたはメールアドレス。認証済みユーザーの場合は「me」を使用。 |
| `topic` | string | はい | ミーティングのトピック |
| `type` | number | いいえ | ミーティングタイプ: 1=即時、2=予定、3=固定時間なしの定期的、8=固定時間の定期的 |
| `type` | number | いいえ | ミーティングタイプ: 1=即時、2=予定済み、3=固定時間なしの定期的、8=固定時間の定期的 |
| `startTime` | string | いいえ | ISO 8601形式のミーティング開始時間2025-06-03T10:00:00Z |
| `duration` | number | いいえ | ミーティング時間(分) |
| `timezone` | string | いいえ | ミーティングのタイムゾーンAmerica/Los_Angeles |
@@ -56,8 +58,8 @@ Zoomをワークフローに統合します。Zoomミーティングの作成、
| `participantVideo` | boolean | いいえ | 参加者のビデオをオンにして開始 |
| `joinBeforeHost` | boolean | いいえ | ホスト前の参加者の入室を許可 |
| `muteUponEntry` | boolean | いいえ | 入室時に参加者をミュート |
| `waitingRoom` | boolean | いいえ | 待機室を有効 |
| `autoRecording` | string | いいえ | 自動録画設定local、cloud、またはnone |
| `waitingRoom` | boolean | いいえ | 待機室を有効にする |
| `autoRecording` | string | いいえ | 自動録画設定: local、cloud、またはnone |
#### 出力
@@ -67,14 +69,14 @@ Zoomをワークフローに統合します。Zoomミーティングの作成、
### `zoom_list_meetings`
Zoomユーザーのすべてのミーティングを一覧表示する
Zoomユーザーのすべてのミーティングをリスト表示する
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `userId` | string | はい | ユーザーIDまたはメールアドレス。認証済みユーザーの場合は「me」を使用。 |
| `type` | string | いいえ | ミーティングタイプフィルター: scheduled、live、upcoming、upcoming_meetings、または previous_meetings |
| `type` | string | いいえ | ミーティングタイプフィルター: scheduled、live、upcoming、upcoming_meetings、またはprevious_meetings |
| `pageSize` | number | いいえ | ページあたりのレコード数最大300 |
| `nextPageToken` | string | いいえ | 次のページの結果を取得するためのページネーショントークン |
@@ -94,8 +96,8 @@ Zoomユーザーのすべてのミーティングを一覧表示する
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `meetingId` | string | はい | ミーティングID |
| `occurrenceId` | string | いいえ | 定期的なミーティングの開催ID |
| `showPreviousOccurrences` | boolean | いいえ | 定期的なミーティングの過去の開催を表示 |
| `occurrenceId` | string | いいえ | 定期的なミーティングの発生ID |
| `showPreviousOccurrences` | boolean | いいえ | 定期的なミーティングの過去の発生を表示 |
#### 出力
@@ -103,17 +105,17 @@ Zoomユーザーのすべてのミーティングを一覧表示する
| --------- | ---- | ----------- |
| `meeting` | object | ミーティングの詳細 |
### `zoom_update_meeting`
特定のZoomミーティングの詳細を取得する
既存のZoomミーティングを更新する
#### 入力
| パラメータ | | 必須 | 説明 |
| パラメータ | 種類 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `meetingId` | string | はい | 更新するミーティングID |
| `topic` | string | いいえ | ミーティングのトピック |
| `type` | number | いいえ | ミーティングタイプ: 1=インスタント、2=予定済み、3=定期的(固定時間なし、8=定期的(固定時間) |
| `type` | number | いいえ | ミーティングタイプ: 1=即時、2=予定、3=固定時間なしの定期的、8=固定時間の定期的 |
| `startTime` | string | いいえ | ISO 8601形式のミーティング開始時間2025-06-03T10:00:00Z |
| `duration` | number | いいえ | ミーティング時間(分) |
| `timezone` | string | いいえ | ミーティングのタイムゾーンAmerica/Los_Angeles |
@@ -121,10 +123,10 @@ Zoomユーザーのすべてのミーティングを一覧表示する
| `agenda` | string | いいえ | ミーティングの議題 |
| `hostVideo` | boolean | いいえ | ホストのビデオをオンにして開始 |
| `participantVideo` | boolean | いいえ | 参加者のビデオをオンにして開始 |
| `joinBeforeHost` | boolean | いいえ | ホストより前の参加者の入室を許可 |
| `joinBeforeHost` | boolean | いいえ | ホスト前の参加者の入室を許可 |
| `muteUponEntry` | boolean | いいえ | 入室時に参加者をミュート |
| `waitingRoom` | boolean | いいえ | 待機室を有効にする |
| `autoRecording` | string | いいえ | 自動録画設定:ローカル、クラウド、または無し |
| `waitingRoom` | boolean | いいえ | 待機室を有効 |
| `autoRecording` | string | いいえ | 自動録画設定:local、cloud、またはnone |
#### 出力
@@ -132,17 +134,17 @@ Zoomユーザーのすべてのミーティングを一覧表示する
| --------- | ---- | ----------- |
| `success` | boolean | ミーティングが正常に更新されたかどうか |
### `zoom_delete_meeting`
Zoomミーティングを削除またはキャンセルする
Zoomミーティングを削除またはキャンセルする
#### 入力
| パラメータ | | 必須 | 説明 |
| パラメータ | 種類 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `meetingId` | string | はい | 削除するミーティングID |
| `occurrenceId` | string | いいえ | 定期的なミーティングの特定の回を削除するための発生ID |
| `scheduleForReminder` | boolean | いいえ | 登録者にキャンセルリマインダーメールを送信 |
| `occurrenceId` | string | いいえ | 定期的なミーティングの特定の回を削除するための回数ID |
| `scheduleForReminder` | boolean | いいえ | 登録者にキャンセルリマインダーメールを送信 |
| `cancelMeetingReminder` | boolean | いいえ | 登録者と代替ホストにキャンセルメールを送信 |
#### 出力
@@ -169,18 +171,18 @@ Zoomミーティングの招待テキストを取得する
### `zoom_list_recordings`
Zoomユーザーのすべてのクラウド録画をリスト表示する
Zoomユーザーのすべてのクラウド録画を一覧表示する
#### 入力
| パラメータ | 型 | 必須 | 説明 |
| --------- | ---- | -------- | ----------- |
| `userId` | string | はい | ユーザーIDまたはメールアドレス。認証済みユーザーの場合は「me」を使用。 |
| `from` | string | いいえ | 開始日yyyy-mm-dd形式\(過去6ヶ月以内\) |
| `from` | string | いいえ | 開始日yyyy-mm-dd形式過去6ヶ月以内 |
| `to` | string | いいえ | 終了日yyyy-mm-dd形式 |
| `pageSize` | number | いいえ | ページあたりのレコード数最大300 |
| `pageSize` | number | いいえ | 1ページあたりのレコード数最大300 |
| `nextPageToken` | string | いいえ | 次のページの結果を取得するためのページネーショントークン |
| `trash` | boolean | いいえ | ゴミ箱から録画をリスト表示するにはtrueに設定 |
| `trash` | boolean | いいえ | ゴミ箱から録画を一覧表示するにはtrueに設定 |
#### 出力
@@ -189,9 +191,9 @@ Zoomユーザーのすべてのクラウド録画をリスト表示する
| `recordings` | array | 録画のリスト |
| `pageInfo` | object | ページネーション情報 |
### `zoom_get_meeting_recordings`
特定のZoomミーティングのすべての録画を取得する
特定のZoomミーティングのての録画を取得する
特定のZoomミーティングのすべての録画を取得する
#### 入力
@@ -207,7 +209,7 @@ Zoomユーザーのすべてのクラウド録画をリスト表示する
| --------- | ---- | ----------- |
| `recording` | object | すべてのファイルを含むミーティング録画 |
### `zoom_delete_recording`
Zoomミーティングのクラウド録画を削除する
Zoomミーティングのクラウド録画を削除する
@@ -225,7 +227,7 @@ Zoomミーティングのクラウド録画を削除する
| --------- | ---- | ----------- |
| `success` | boolean | 録画が正常に削除されたかどうか |
### `zoom_list_past_participants`
過去のZoomミーティングの参加者を一覧表示する
過去のZoomミーティングの参加者を一覧表示する
@@ -235,16 +237,16 @@ Zoomミーティングのクラウド録画を削除する
| --------- | ---- | -------- | ----------- |
| `meetingId` | string | はい | 過去のミーティングIDまたはUUID |
| `pageSize` | number | いいえ | ページあたりのレコード数最大300 |
| `nextPageToken` | string | いいえ | 結果の次のページを取得するためのページネーショントークン |
| `nextPageToken` | string | いいえ | 結果の次のページを取得するためのページトークン |
#### 出力
| パラメータ | 型 | 説明 |
| --------- | ---- | ----------- |
| `participants` | array | 会議参加者のリスト |
| `participants` | array | ミーティング参加者のリスト |
| `pageInfo` | object | ページネーション情報 |
## 注意事項
- カテゴリ: `tools`
- カテゴリ: `tools`
- タイプ: `zoom`

View File

@@ -48,8 +48,13 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 操作成功状态 |
| `output` | 对象 | 包含问题键、摘要、描述、创建和更新时间戳的 Jira 问题详细信息 |
| `ts` | 字符串 | 操作的时间戳 |
| `issueKey` | 字符串 | 问题键 \(例如PROJ-123\) |
| `summary` | 字符串 | 问题摘要 |
| `description` | JSON | 问题描述内容 |
| `created` | 字符串 | 问题创建的时间戳 |
| `updated` | 字符串 | 问题最后更新的时间戳 |
| `issue` | JSON | 包含所有字段的完整问题对象 |
### `jira_update`
@@ -73,8 +78,9 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 操作成功状态 |
| `output` | 对象 | 更新的 Jira 问题详情,包括时间戳、问题键、摘要和成功状态 |
| `ts` | 字符串 | 操作的时间戳 |
| `issueKey` | 字符串 | 更新后的问题键 \(例如PROJ-123\) |
| `summary` | 字符串 | 更新后的问题摘要 |
### `jira_write`
@@ -97,8 +103,10 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 操作成功状态 |
| `output` | 对象 | 创建的 Jira 问题详情,包括时间戳、问题键、摘要、成功状态和 URL |
| `ts` | 字符串 | 操作的时间戳 |
| `issueKey` | 字符串 | 创建的问题键 \(例如PROJ-123\) |
| `summary` | 字符串 | 问题摘要 |
| `url` | 字符串 | 创建的问题的 URL |
### `jira_bulk_read`
@@ -116,8 +124,7 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | boolean | 操作成功状态 |
| `output` | array | 包含 Jira 问题的数组,包括摘要、描述、创建和更新的时间戳 |
| `issues` | 数组 | 包含时间戳、摘要、描述、创建和更新时间戳的 Jira 问题数组 |
### `jira_delete_issue`
@@ -136,8 +143,8 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 操作成功状态 |
| `output` | 对象 | 删除的问题详情,包括时间戳、问题键和成功状态 |
| `ts` | 字符串 | 操作的时间戳 |
| `issueKey` | 字符串 | 删除的问题 |
### `jira_assign_issue`
@@ -156,8 +163,9 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 操作成功状态 |
| `output` | 对象 | 分配详情,包括时间戳、问题键、分配人 ID 和成功状态 |
| `ts` | 字符串 | 操作的时间戳 |
| `issueKey` | 字符串 | 分配的任务键 |
| `assigneeId` | 字符串 | 分配者的账户 ID |
### `jira_transition_issue`
@@ -177,8 +185,9 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 操作成功状态 |
| `output` | 对象 | 转换详情,包括时间戳、问题键、转换 ID 和成功状态 |
| `ts` | string | 操作的时间戳 |
| `issueKey` | string | 转换的问题键 |
| `transitionId` | string | 应用的转换 ID |
### `jira_search_issues`
@@ -199,8 +208,11 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 操作成功状态 |
| `output` | 对象 | 搜索结果,包括时间戳、总数、分页详情和匹配问题的数 |
| `ts` | string | 操作的时间戳 |
| `total` | number | 匹配问题的数 |
| `startAt` | number | 分页起始索引 |
| `maxResults` | number | 每页的最大结果数 |
| `issues` | array | 包含键、摘要、状态、负责人、创建时间和更新时间的匹配问题数组 |
### `jira_add_comment`
@@ -219,8 +231,10 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 操作成功状态 |
| `output` | 对象 | 评论详情,包括时间戳、问题键、评论 ID、正文和成功状态 |
| `ts` | string | 操作的时间戳 |
| `issueKey` | string | 添加评论的问题键 |
| `commentId` | string | 创建的评论 ID |
| `body` | string | 评论的文本内容 |
### `jira_get_comments`
@@ -240,8 +254,10 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 操作成功状态 |
| `output` | 对象 | 评论数据,包括时间戳、问题键、总数和评论数组 |
| `ts` | string | 操作的时间戳 |
| `issueKey` | string | 问题键 |
| `total` | number | 评论的总数 |
| `comments` | array | 包含 ID、作者、正文、创建时间和更新时间的评论数组 |
### `jira_update_comment`
@@ -261,8 +277,10 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 操作成功状态 |
| `output` | 对象 | 更新的评论详情,包括时间戳、问题键、评论 ID、正文文本和成功状态 |
| `ts` | string | 操作的时间戳 |
| `issueKey` | string | 问题键 |
| `commentId` | string | 更新的评论 ID |
| `body` | string | 更新的评论文本 |
### `jira_delete_comment`
@@ -281,8 +299,9 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 操作成功状态 |
| `output` | 对象 | 删除详情,包括时间戳、问题键、评论 ID 和成功状态 |
| `ts` | string | 操作的时间戳 |
| `issueKey` | string | 问题键 |
| `commentId` | string | 已删除的评论 ID |
### `jira_get_attachments`
@@ -300,8 +319,9 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 操作成功状态 |
| `output` | 对象 | 附件数据,包括时间戳、问题键和附件数组 |
| `ts` | string | 操作的时间戳 |
| `issueKey` | string | 问题键 |
| `attachments` | array | 附件数组,包括 id、文件名、大小、mimeType、创建时间、作者 |
### `jira_delete_attachment`
@@ -319,8 +339,8 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 操作成功状态 |
| `output` | 对象 | 删除详情,包括时间戳、附件 ID 和成功状态 |
| `ts` | string | 操作的时间戳 |
| `attachmentId` | string | 删除的附件 ID |
### `jira_add_worklog`
@@ -341,8 +361,10 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 操作成功状态 |
| `output` | 对象 | 工作日志详情,包括时间戳、问题键、工作日志 ID、花费的时间以秒为单位和成功状态 |
| `ts` | string | 操作的时间戳 |
| `issueKey` | string | 添加工作日志的相关问题键 |
| `worklogId` | string | 创建的工作日志 ID |
| `timeSpentSeconds` | number | 花费的时间(以秒为单位) |
### `jira_get_worklogs`
@@ -362,8 +384,10 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 操作成功状态 |
| `output` | 对象 | 包含时间戳、问题键、总数和工作日志数组的工作日志数据 |
| `ts` | string | 操作的时间戳 |
| `issueKey` | string | 问题键 |
| `total` | number | 工作日志的总数 |
| `worklogs` | array | 工作日志数组,包括 id、作者、timeSpentSeconds、timeSpent、评论、创建时间、更新时间、开始时间 |
### `jira_update_worklog`
@@ -385,8 +409,9 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 操作成功状态 |
| `output` | 对象 | 包含时间戳、问题键、工作日志 ID 和成功状态的工作日志更新详情 |
| `ts` | string | 操作的时间戳 |
| `issueKey` | string | 问题键 |
| `worklogId` | string | 更新的工作日志 ID |
### `jira_delete_worklog`
@@ -405,8 +430,9 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 操作成功状态 |
| `output` | 对象 | 删除详情,包括时间戳、问题键、工作日志 ID 和成功状态 |
| `ts` | string | 操作的时间戳 |
| `issueKey` | string | 问题键 |
| `worklogId` | string | 已删除的工作日志 ID |
### `jira_create_issue_link`
@@ -427,8 +453,11 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 操作成功状态 |
| `output` | 对象 | 问题链接详情,包括时间戳、内部问题键、外部问题键、链接类型和成功状态 |
| `ts` | string | 操作的时间戳 |
| `inwardIssue` | string | 内部问题键 |
| `outwardIssue` | string | 外部问题键 |
| `linkType` | string | 问题链接的类型 |
| `linkId` | string | 创建的链接 ID |
### `jira_delete_issue_link`
@@ -446,8 +475,8 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 操作成功状态 |
| `output` | 对象 | 删除详情,包括时间戳、链接 ID 和成功状态 |
| `ts` | string | 操作的时间戳 |
| `linkId` | string | 删除的链接 ID |
### `jira_add_watcher`
@@ -466,8 +495,9 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 操作成功状态 |
| `output` | 对象 | 观察者详情,包括时间戳、问题键、观察者账户 ID 和成功状态 |
| `ts` | string | 操作的时间戳 |
| `issueKey` | string | 问题键 |
| `watcherAccountId` | string | 添加的观察者账户 ID |
### `jira_remove_watcher`
@@ -486,8 +516,9 @@ Jira 的主要功能包括:
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | 布尔值 | 操作成功状态 |
| `output` | 对象 | 移除详情,包括时间戳、问题键、观察者账户 ID 和成功状态 |
| `ts` | string | 操作的时间戳 |
| `issueKey` | string | 问题键 |
| `watcherAccountId` | string | 移除的观察者账户 ID |
## 注意事项

View File

@@ -52,7 +52,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
### `slack_message`
通过 Slack API 向 Slack 频道或用户发送消息。支持 Slack mrkdwn 格式
向 Slack 频道或直接消息发送消息。支持 Slack mrkdwn 格式。
#### 输入
@@ -60,10 +60,11 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
| --------- | ---- | -------- | ----------- |
| `authMethod` | string | 否 | 认证方法oauth 或 bot_token |
| `botToken` | string | 否 | 自定义 Bot 的令牌 |
| `channel` | string | | 目标 Slack 频道(例如,#general |
| `channel` | string | | 目标 Slack 频道(例如,#general |
| `userId` | string | 否 | 目标 Slack 用户 ID用于直接消息例如U1234567890 |
| `text` | string | 是 | 要发送的消息文本(支持 Slack mrkdwn 格式) |
| `thread_ts` | string | 否 | 回复的线程时间戳(创建线程回复) |
| `files` | file[] | 否 | 附加到消息的文件 |
| `thread_ts` | string | 否 | 回复的线程时间戳(创建线程回复) |
| `files` | file[] | 否 | 附加到消息的文件 |
#### 输出
@@ -103,11 +104,12 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
#### 输入
| 参数 | 类型 | 必需 | 描述 |
| 参数 | 类型 | 是否必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `authMethod` | string | 否 | 认证方法oauth 或 bot_token |
| `botToken` | string | 否 | 自定义 Bot 的 Bot token |
| `channel` | string | | 要读取消息的 Slack 频道(例如#general |
| `botToken` | string | 否 | 自定义 Bot 的令牌 |
| `channel` | string | | 要读取消息的 Slack 频道(例如#general |
| `userId` | string | 否 | DM 对话的用户 ID例如U1234567890 |
| `limit` | number | 否 | 要检索的消息数量默认10最大100 |
| `oldest` | string | 否 | 时间范围的开始(时间戳) |
| `latest` | string | 否 | 时间范围的结束(时间戳) |

View File

@@ -27,12 +27,14 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
- 检索任何会议的详情或邀请
- 直接从您的自动化中更新或删除现有会议
这些功能使您能够简化远程协作、自动化定期视频会议,并将您的组织 Zoom 环境管理整合到工作流程中
要连接到 Zoom请拖放 Zoom 模块并点击 `Connect`,使用您的 Zoom 账户进行认证。连接后,您可以使用 Zoom 工具创建、列出、更新和删除 Zoom 会议。您可以随时通过点击“设置 > 集成”中的 `Disconnect` 断开您的 Zoom 账户连接,您的 Zoom 账户访问权限将立即被撤销
这些功能使您能够简化远程协作、自动化定期视频会议,并在工作流中管理您的组织的 Zoom 环境。
{/* MANUAL-CONTENT-END */}
## 使用说明
将 Zoom 集成到工作流中。创建、列出、更新和删除 Zoom 会议。获取会议详情、邀请、录制内容和参与者信息。以编程方式管理云录制内容
将 Zoom 集成到工作流中。创建、列出、更新和删除 Zoom 会议。获取会议详情、邀请、录制和参与者信息。以编程方式管理云录制。
## 工具
@@ -46,18 +48,18 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
| --------- | ---- | -------- | ----------- |
| `userId` | string | 是 | 用户 ID 或电子邮件地址。使用 "me" 表示已认证用户。 |
| `topic` | string | 是 | 会议主题 |
| `type` | number | 否 | 会议类型1=即时2=计划3=无固定时间的定期会议8=有固定时间的定期会议 |
| `startTime` | string | 否 | ISO 8601 格式的会议开始时间 \(例如2025-06-03T10:00:00Z\) |
| `type` | number | 否 | 会议类型1=即时会议2=预定会议3=无固定时间的循环会议8=有固定时间的循环会议 |
| `startTime` | string | 否 | 会议开始时间,采用 ISO 8601 格式 \(例如2025-06-03T10:00:00Z\) |
| `duration` | number | 否 | 会议时长(分钟) |
| `timezone` | string | 否 | 会议的时区 \(例如America/Los_Angeles\) |
| `password` | string | 否 | 会议密码 |
| `agenda` | string | 否 | 会议议程 |
| `hostVideo` | boolean | 否 | 主持人视频开启时开始 |
| `participantVideo` | boolean | 否 | 参与者视频开启时开始 |
| `joinBeforeHost` | boolean | 否 | 允许参与者在主持人之前加入 |
| `hostVideo` | boolean | 否 | 主持人视频开启时开始会议 |
| `participantVideo` | boolean | 否 | 参与者视频开启时开始会议 |
| `joinBeforeHost` | boolean | 否 | 允许参与者在主持人之前加入会议 |
| `muteUponEntry` | boolean | 否 | 参与者进入时静音 |
| `waitingRoom` | boolean | 否 | 启用等候室 |
| `autoRecording` | string | 否 | 自动录制设置:本地、云或无 |
| `autoRecording` | string | 否 | 自动录制设置:本地、云或无 |
#### 输出
@@ -94,14 +96,14 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `meetingId` | string | 是 | 会议 ID |
| `occurrenceId` | string | 否 | 循环会议的发生 ID |
| `showPreviousOccurrences` | boolean | 否 | 显示循环会议的先前发生记录 |
| `occurrenceId` | string | 否 | 定期会议的发生 ID |
| `showPreviousOccurrences` | boolean | 否 | 显示定期会议的先前发生记录 |
#### 输出
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `meeting` | object | 会议详 |
| `meeting` | object | 会议详细信息 |
### `zoom_update_meeting`
@@ -113,7 +115,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
| --------- | ---- | -------- | ----------- |
| `meetingId` | string | 是 | 要更新的会议 ID |
| `topic` | string | 否 | 会议主题 |
| `type` | number | 否 | 会议类型1=即时会议2=预定会议3=无固定时间的循环会议8=固定时间的循环会议 |
| `type` | number | 否 | 会议类型1=即时2=计划3=无固定时间的定期会议8=固定时间的定期会议 |
| `startTime` | string | 否 | ISO 8601 格式的会议开始时间 \(例如2025-06-03T10:00:00Z\) |
| `duration` | number | 否 | 会议时长(分钟) |
| `timezone` | string | 否 | 会议的时区 \(例如America/Los_Angeles\) |
@@ -124,7 +126,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
| `joinBeforeHost` | boolean | 否 | 允许参与者在主持人之前加入 |
| `muteUponEntry` | boolean | 否 | 参与者进入时静音 |
| `waitingRoom` | boolean | 否 | 启用等候室 |
| `autoRecording` | string | 否 | 自动录制设置:本地、云或无 |
| `autoRecording` | string | 否 | 自动录制设置:本地、云或无 |
#### 输出
@@ -141,7 +143,7 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `meetingId` | string | 是 | 要删除的会议 ID |
| `occurrenceId` | string | 否 | 删除循环会议特定场次的场次 ID |
| `occurrenceId` | string | 否 | 删除定期会议特定场次的场次 ID |
| `scheduleForReminder` | boolean | 否 | 向注册者发送取消提醒邮件 |
| `cancelMeetingReminder` | boolean | 否 | 向注册者和替代主持人发送取消邮件 |
@@ -175,10 +177,10 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `userId` | string | 是 | 用户 ID 或电子邮件地址。对于已认证用户,请使用 "me"。 |
| `from` | string | 否 | 开始日期,格式为 yyyy-mm-dd最近 6 个月内 |
| `userId` | string | 是 | 用户 ID 或电子邮件地址。使用 "me" 表示已认证用户。 |
| `from` | string | 否 | 开始日期,格式为 yyyy-mm-dd \(最近 6 个月内\) |
| `to` | string | 否 | 结束日期,格式为 yyyy-mm-dd |
| `pageSize` | number | 否 | 每页记录数最大 300 |
| `pageSize` | number | 否 | 每页记录数 \(最大 300\) |
| `nextPageToken` | string | 否 | 分页令牌,用于获取下一页结果 |
| `trash` | boolean | 否 | 设置为 true 以列出回收站中的录制 |
@@ -191,39 +193,39 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
### `zoom_get_meeting_recordings`
获取特定 Zoom 会议的所有录制内容
获取特定 Zoom 会议的所有录制
#### 输入
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `meetingId` | string | 是 | 会议 ID 或会议 UUID |
| `includeFolderItems` | boolean | 否 | 包括文件夹的项目 |
| `includeFolderItems` | boolean | 否 | 包括文件夹的项目 |
| `ttl` | number | 否 | 下载 URL 的有效时间(秒)\(最大值 604800\) |
#### 输出
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `recording` | object | 包含所有文件的会议录制内容 |
| `recording` | object | 包含所有文件的会议录制 |
### `zoom_delete_recording`
删除 Zoom 会议的云录制内容
删除 Zoom 会议的云录制
#### 输入
| 参数 | 类型 | 必需 | 描述 |
| --------- | ---- | -------- | ----------- |
| `meetingId` | string | 是 | 会议 ID 或会议 UUID |
| `recordingId` | string | 否 | 要删除的特定录制文件 ID。如果未提供则删除所有录制内容。 |
| `recordingId` | string | 否 | 要删除的特定录制文件 ID。如果未提供则删除所有录制。 |
| `action` | string | 否 | 删除操作:"trash" \(移至回收站\) 或 "delete" \(永久删除\) |
#### 输出
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `success` | boolean | 录制内容是否成功删除 |
| `success` | boolean | 录制是否成功删除 |
### `zoom_list_past_participants`
@@ -241,10 +243,10 @@ import { BlockInfoCard } from "@/components/ui/block-info-card"
| 参数 | 类型 | 描述 |
| --------- | ---- | ----------- |
| `participants` | 数组 | 会议参与者列表 |
| `pageInfo` | 对象 | 分页信息 |
| `participants` | array | 会议参与者列表 |
| `pageInfo` | object | 分页信息 |
## 注意事项
- 类别`tools`
- 类型`zoom`
- 类别: `tools`
- 类型: `zoom`

View File

@@ -889,9 +889,9 @@ checksums:
content/10: 71c6cf129630acff9d8df39d0a5c5407
content/11: 9c8aa3f09c9b2bd50ea4cdff3598ea4e
content/12: 8ee83eff32425b2c52929284e8485c20
content/13: 6cda87dc9837779f4572ed70b87a5654
content/13: c1ec0b00cb68561551e48616731ea43a
content/14: 371d0e46b4bd2c23f559b8bc112f6955
content/15: 2f696275726cdeefd7d7280b5bb43b21
content/15: 117e42c934a7f2a76b0399235841260e
content/16: bcadfc362b69078beee0088e5936c98b
content/17: bb43e4f36fdc1eb6211f46ddeed9e0aa
content/18: 05540cb3028d4d781521c14e5f9e3835
@@ -903,7 +903,7 @@ checksums:
content/24: 228a8ece96627883153b826a1cbaa06c
content/25: 53abe061a259c296c82676b4770ddd1b
content/26: 371d0e46b4bd2c23f559b8bc112f6955
content/27: 170ccdc4ce7ee086e9c6b5073efca582
content/27: 03e8b10ec08b354de98e360b66b779e3
content/28: bcadfc362b69078beee0088e5936c98b
content/29: b82def7d82657f941fbe60df3924eeeb
content/30: 1ca7ee3856805fa1718031c5f75b6ffb
@@ -2511,133 +2511,133 @@ checksums:
content/12: 371d0e46b4bd2c23f559b8bc112f6955
content/13: 8c25606fde43bf4ff519760364fda052
content/14: bcadfc362b69078beee0088e5936c98b
content/15: 9ee0b1e8873ef165299443a76823e7bc
content/15: 4ec31e928a8498d050922adb2f977c98
content/16: be5c68d578443b68c062029104bd6ddb
content/17: 3b38aa70e04f841184b7d958b087af8c
content/18: 371d0e46b4bd2c23f559b8bc112f6955
content/19: 5269008adfae57a3a8fb5d8bf5922498
content/20: bcadfc362b69078beee0088e5936c98b
content/21: c66b2996f62f0f7150fce59eed9ad7a8
content/21: 5317f2e9eb34d7297064b381aef6912c
content/22: ef92d95455e378abe4d27a1cdc5e1aed
content/23: febd6019055f3754953fd93395d0dbf2
content/24: 371d0e46b4bd2c23f559b8bc112f6955
content/25: 7ef3f388e5ee9346bac54c771d825f40
content/26: bcadfc362b69078beee0088e5936c98b
content/27: 7bccc537f32fabcbb4cd0a85bef612de
content/27: e0fa91c45aa780fc03e91df77417f893
content/28: b463f54cd5fe2458b5842549fbb5e1ce
content/29: 55f8c724e1a2463bc29a32518a512c73
content/30: 371d0e46b4bd2c23f559b8bc112f6955
content/31: 770b1f7b3105937d452bc2815ebb6e05
content/32: bcadfc362b69078beee0088e5936c98b
content/33: b7be768fe967164e71af56dd5cd13f86
content/33: 0b92b54ce40dc29bb6faccf82eace18b
content/34: f426b59ee38021a4254fe566995c416c
content/35: 2455b2f418cc79f4a67558678ae444bc
content/36: 371d0e46b4bd2c23f559b8bc112f6955
content/37: 320e2962c7e2d24690c75b2f69e5be9d
content/38: bcadfc362b69078beee0088e5936c98b
content/39: 25501290045d87dad2c5819200528091
content/39: 76f532ccbddb41115e56a7d56d97aa96
content/40: 52233c13208d6e10497340a37b11ef3a
content/41: 9c6bf4c4180c96e31668941aa36f2cde
content/42: 371d0e46b4bd2c23f559b8bc112f6955
content/43: a792b3be1ab2bc6bc570f5dafca56aaa
content/44: bcadfc362b69078beee0088e5936c98b
content/45: 120bc8dacae493c314aed0f4a4094c7f
content/45: 838a4016055b35389dae383f8b4ec2ac
content/46: fe4880697d8adcd75c3a2c7e5b0fec86
content/47: fdd9ab6e60b2c42a18a41ef869fb925b
content/48: 371d0e46b4bd2c23f559b8bc112f6955
content/49: 0ccf3f3f59955dd78558a0e3589579a6
content/50: bcadfc362b69078beee0088e5936c98b
content/51: 35ce33f78ffa1130c2719885759406a5
content/51: 8defd6d29c0ddbd9a811caa8f2cf3f39
content/52: f04e8809e7d4f701cf24b339d844bea5
content/53: 811c364b512dd61a2f40fb8418b6b0cd
content/54: 371d0e46b4bd2c23f559b8bc112f6955
content/55: 2ce7e48a76065784447b75b6bc0fbff9
content/56: bcadfc362b69078beee0088e5936c98b
content/57: 437fae06c917576e309864634ac006d5
content/57: 47be5344f0c8a9ede380f37f769b5b3f
content/58: 8d41bb08f7d4000b665e6786583aa2b5
content/59: 48adb1980e062be3783331522082edaf
content/60: 371d0e46b4bd2c23f559b8bc112f6955
content/61: b89e1b7a15f022c0c13adadb25e3f49d
content/62: bcadfc362b69078beee0088e5936c98b
content/63: 74e0d576bddb246c672c98a8e9f4fd32
content/63: 44b209460093fb955b8f6b4e575dde17
content/64: c02f43d19361be7571e8141a61e83980
content/65: 21a0f57793fb19dd8761b644e22ee731
content/66: 371d0e46b4bd2c23f559b8bc112f6955
content/67: 6aa3e815a37986856a2781ccfdb7b4de
content/68: bcadfc362b69078beee0088e5936c98b
content/69: b76190aa5e84cb17cdcf2e061edf706b
content/69: 9032d6a71c23f90a39232d653c3daf36
content/70: 1845561cd920176e2dbfed65eaccca9e
content/71: 2960e1e609b8c512f5cf1ef715c2a684
content/72: 371d0e46b4bd2c23f559b8bc112f6955
content/73: e3586b13bcb7c91515437d76a0027201
content/74: bcadfc362b69078beee0088e5936c98b
content/75: 520c03c754968a673ed5def1706f919d
content/75: f14261cdc2105f3c2380a90629edc172
content/76: 14a4d1b2c2f1257eadb4b26b85672fab
content/77: 45bd9b1b321f85dc31c720051c12f681
content/78: 371d0e46b4bd2c23f559b8bc112f6955
content/79: 176f866fa8ad12f179eb5466bc968914
content/80: bcadfc362b69078beee0088e5936c98b
content/81: 1fc32b27418b8efe2abba1beb6d31868
content/81: 8f1d8635d9e542fbce4ee4167d8a2bb1
content/82: 5c0b4adc7825b3ed5831bf6c4d83a6a2
content/83: cace0c917728a3a5bc93d26dd65669f7
content/84: 371d0e46b4bd2c23f559b8bc112f6955
content/85: 490b3a3ef8840f1e01a58c6875af027b
content/86: bcadfc362b69078beee0088e5936c98b
content/87: f4c4cbcb48dbbd87b27fdf76105aaa8c
content/87: 501cead9242b6febffe4659a63cef613
content/88: efa34ea34fd3d30088470cf6f4476106
content/89: 47fc6e4fd184baaf72d61223ec944148
content/90: 371d0e46b4bd2c23f559b8bc112f6955
content/91: 43349c22c04743b654d4aee849cc81ff
content/92: bcadfc362b69078beee0088e5936c98b
content/93: 82634f835e924e6b2242df6127f0969a
content/93: a53a400b7cddac3a34435d23332db795
content/94: e3a5c53a79de7fe47abd7f7a9f86fb65
content/95: 2053815e47b54488983f0571f49cd11a
content/96: 371d0e46b4bd2c23f559b8bc112f6955
content/97: 846be448c3cedb87e4bd923c63e04512
content/98: bcadfc362b69078beee0088e5936c98b
content/99: 11608f282141ee6c31f933f6c2fcaa0d
content/99: d227cd028bf20eab7f826827efa9ea90
content/100: 17d1e59a4290138d979568f39e6fea9b
content/101: cf9c3c1b441bde10b35d04d776e9f5ce
content/102: 371d0e46b4bd2c23f559b8bc112f6955
content/103: 599eb9d3e6b88cba7a15d007ce1111f4
content/104: bcadfc362b69078beee0088e5936c98b
content/105: ad1bd5c40adabc9f2a97682be1671d67
content/105: 09d70143b5598699ae1ed593baa4ac61
content/106: afa20ccc5f708cf36a0cb6ede6ec0c4f
content/107: 8a64259005d325f6849527186097f390
content/108: 371d0e46b4bd2c23f559b8bc112f6955
content/109: c2b8a2c90d216d94f24850c8124849ef
content/110: bcadfc362b69078beee0088e5936c98b
content/111: b5e005f9e95aead5c9596968b21821e1
content/111: 6bab23a5c82acbd6cd79fbdfc9bbcbde
content/112: 05141d844a911fb66fd7bdc2b98e8160
content/113: f04861fc73d9abc76dd8e140703baa14
content/114: 371d0e46b4bd2c23f559b8bc112f6955
content/115: 09a884f6fcddd37ad4968718fb48db9e
content/116: bcadfc362b69078beee0088e5936c98b
content/117: 62695bf37dd3fe43470266996e09ef86
content/117: a1645115447094e7520eb3d45244a3c8
content/118: 96b30990733f35886cb04bc6bae18613
content/119: b22baefc2beca09303baa0778b27a4d6
content/120: 371d0e46b4bd2c23f559b8bc112f6955
content/121: 9b936f3424feac6551b709d0c5d5713c
content/122: bcadfc362b69078beee0088e5936c98b
content/123: 1a249d65588fd4a33bb50af768870bbc
content/123: 6cd2f15ea11b6f07e6ac7e170a90a91f
content/124: 573661fdf0cd751a2433052dff8dcdfe
content/125: 81d70f8bd307578a5814374f31a7d6c2
content/126: 371d0e46b4bd2c23f559b8bc112f6955
content/127: d04dcb9d64bc76606af4f9309eeacb75
content/128: bcadfc362b69078beee0088e5936c98b
content/129: 7a78c9363ed6fba5d7277a24186c7296
content/129: b6b0fd5e140401e9f4c4c8a0e5ab0da1
content/130: ce10caa6dcfe95e58c32db33157d989a
content/131: 49df30ca91d4139a38b591311b7a83a8
content/132: 371d0e46b4bd2c23f559b8bc112f6955
content/133: b61b7e3b5e5b7c05fcb65478d744abb5
content/134: bcadfc362b69078beee0088e5936c98b
content/135: 9ec868a621316d03619fc37582084053
content/135: 310e65d225fb68cf48f1d44d1047ea12
content/136: 805790ac8b4ae77c30fbfc9f6023bac8
content/137: 1a4e93e8a49abd71333809a3bc0856c9
content/138: 371d0e46b4bd2c23f559b8bc112f6955
content/139: 33fde4c3da4584b51f06183b7b192a78
content/140: bcadfc362b69078beee0088e5936c98b
content/141: a4e11bf0073b1f1e45c07e3c1c7dd969
content/141: b7451190f100388d999c183958d787a7
content/142: b3f310d5ef115bea5a8b75bf25d7ea9a
content/143: 4930918f803340baa861bed9cdf789de
8f76e389f6226f608571622b015ca6a1:
@@ -47626,72 +47626,73 @@ checksums:
content/4: 0f0165c7e21355d8f8e332c2252100db
content/5: 11289606ffb19f4564a7f0a867a39a55
content/6: 05eb6fe6951b12bcddd3ae36aacc7bb3
content/7: 715b7f8ee32c3d0dcd20cc0a57a9367b
content/8: 821e6394b0a953e2b0842b04ae8f3105
content/9: e5f8dc06b6db9aeef348d8af9617c787
content/10: 9c8aa3f09c9b2bd50ea4cdff3598ea4e
content/11: 0ec27ddd5601764fadfc363811376d88
content/12: 18e3253cead6514fe5e939d98b64d8fb
content/13: 371d0e46b4bd2c23f559b8bc112f6955
content/14: 676120936020f1a25faea0d5608b7958
content/15: bcadfc362b69078beee0088e5936c98b
content/16: ecad0614a5ec681a43fea86034a30905
content/17: 8eb606aad3db305e12679efb6fe7363e
content/18: 7d9ab020b8312987af94a42c7797a6bc
content/19: 371d0e46b4bd2c23f559b8bc112f6955
content/20: 6854dad4e5e5419803d3b0a387bf36c1
content/21: bcadfc362b69078beee0088e5936c98b
content/22: 051e39427d40ab7c4b5ebbbf65c7910f
content/23: 9c42c50fa5ce2db382867e2da5bca90d
content/24: 7bc9a20018bc365ecf55a54a53ad1013
content/25: 371d0e46b4bd2c23f559b8bc112f6955
content/26: 299dce7368070dd19957ba06efef836b
content/27: bcadfc362b69078beee0088e5936c98b
content/28: d9a5be31d4296b81660b38dcb4c695cc
content/29: d732fd0df847a742d6dabfc5110ba31d
content/30: 9782a621e6d591e72b7ce5e27face7af
content/31: 371d0e46b4bd2c23f559b8bc112f6955
content/32: 2d7dd3ac552ff837d614c510033646ba
content/33: bcadfc362b69078beee0088e5936c98b
content/34: 37d84e8cc60979a8d3f1e48483d23113
content/35: 90bc3ad5e30e5d579f48787e7d8181ae
content/36: 7db1faa939033f49aad8ef462e630c26
content/37: 371d0e46b4bd2c23f559b8bc112f6955
content/38: 5e289bbda737273fa75101e276358ec8
content/39: bcadfc362b69078beee0088e5936c98b
content/40: 805d1a06016797ba04f3cb840ac59e44
content/41: 88260e555a61ba6886e56f3bc06512dc
content/42: 80c4006b7d25c461c18e9a8a35cfac72
content/43: 371d0e46b4bd2c23f559b8bc112f6955
content/44: 645735bd919e64e034c03b98cc75d5be
content/45: bcadfc362b69078beee0088e5936c98b
content/46: 842462f8cd7a897eda330bba54d297df
content/47: 96d58ab5053c5f5db3f15f82442eb3dd
content/48: 148c8f5f3872aa6e9944e221c35bc9a0
content/49: 371d0e46b4bd2c23f559b8bc112f6955
content/50: 7a449b1878a28cff4b713a104581ec63
content/51: bcadfc362b69078beee0088e5936c98b
content/52: 502548c4b9d6be040f73fc431c3c8fd6
content/53: 1304212656a10261692509a67cfae220
content/54: 042eb9071c13eb10ee5fd0bfd4e00c8a
content/55: 371d0e46b4bd2c23f559b8bc112f6955
content/56: 4263559dc306f5edcdfa1bf758adffdf
content/57: bcadfc362b69078beee0088e5936c98b
content/58: 984b85e501fbd9993b7fe38898e5d445
content/59: 12f6776606adce02255b1db24cd58d29
content/60: fc53b00cfedd65f5fd906daebd9c04df
content/61: 371d0e46b4bd2c23f559b8bc112f6955
content/62: 242a47e9aaf5c07859e2a472bed6d3ac
content/63: bcadfc362b69078beee0088e5936c98b
content/64: 2823402034702ff5ca56b9cad3572c4d
content/65: 8ddcef9d1d32bff76ac8e6c5a0e0dca5
content/66: 94a960dd84bd71825b58d2219b98dd74
content/67: 371d0e46b4bd2c23f559b8bc112f6955
content/68: e7777f90d25d134aa0a3cae9cdfc6563
content/69: bcadfc362b69078beee0088e5936c98b
content/70: affc25ff3d47510647c984a1d59b0a0e
content/71: b3f310d5ef115bea5a8b75bf25d7ea9a
content/72: 2d9d3b6969330e7b2d8e1169cfcf0031
content/7: e474de0de136881473833dd6502b6d06
content/8: 715b7f8ee32c3d0dcd20cc0a57a9367b
content/9: 821e6394b0a953e2b0842b04ae8f3105
content/10: e5f8dc06b6db9aeef348d8af9617c787
content/11: 9c8aa3f09c9b2bd50ea4cdff3598ea4e
content/12: 0ec27ddd5601764fadfc363811376d88
content/13: 18e3253cead6514fe5e939d98b64d8fb
content/14: 371d0e46b4bd2c23f559b8bc112f6955
content/15: 676120936020f1a25faea0d5608b7958
content/16: bcadfc362b69078beee0088e5936c98b
content/17: ecad0614a5ec681a43fea86034a30905
content/18: 8eb606aad3db305e12679efb6fe7363e
content/19: 7d9ab020b8312987af94a42c7797a6bc
content/20: 371d0e46b4bd2c23f559b8bc112f6955
content/21: 6854dad4e5e5419803d3b0a387bf36c1
content/22: bcadfc362b69078beee0088e5936c98b
content/23: 051e39427d40ab7c4b5ebbbf65c7910f
content/24: 9c42c50fa5ce2db382867e2da5bca90d
content/25: 7bc9a20018bc365ecf55a54a53ad1013
content/26: 371d0e46b4bd2c23f559b8bc112f6955
content/27: 299dce7368070dd19957ba06efef836b
content/28: bcadfc362b69078beee0088e5936c98b
content/29: d9a5be31d4296b81660b38dcb4c695cc
content/30: d732fd0df847a742d6dabfc5110ba31d
content/31: 9782a621e6d591e72b7ce5e27face7af
content/32: 371d0e46b4bd2c23f559b8bc112f6955
content/33: 2d7dd3ac552ff837d614c510033646ba
content/34: bcadfc362b69078beee0088e5936c98b
content/35: 37d84e8cc60979a8d3f1e48483d23113
content/36: 90bc3ad5e30e5d579f48787e7d8181ae
content/37: 7db1faa939033f49aad8ef462e630c26
content/38: 371d0e46b4bd2c23f559b8bc112f6955
content/39: 5e289bbda737273fa75101e276358ec8
content/40: bcadfc362b69078beee0088e5936c98b
content/41: 805d1a06016797ba04f3cb840ac59e44
content/42: 88260e555a61ba6886e56f3bc06512dc
content/43: 80c4006b7d25c461c18e9a8a35cfac72
content/44: 371d0e46b4bd2c23f559b8bc112f6955
content/45: 645735bd919e64e034c03b98cc75d5be
content/46: bcadfc362b69078beee0088e5936c98b
content/47: 842462f8cd7a897eda330bba54d297df
content/48: 96d58ab5053c5f5db3f15f82442eb3dd
content/49: 148c8f5f3872aa6e9944e221c35bc9a0
content/50: 371d0e46b4bd2c23f559b8bc112f6955
content/51: 7a449b1878a28cff4b713a104581ec63
content/52: bcadfc362b69078beee0088e5936c98b
content/53: 502548c4b9d6be040f73fc431c3c8fd6
content/54: 1304212656a10261692509a67cfae220
content/55: 042eb9071c13eb10ee5fd0bfd4e00c8a
content/56: 371d0e46b4bd2c23f559b8bc112f6955
content/57: 4263559dc306f5edcdfa1bf758adffdf
content/58: bcadfc362b69078beee0088e5936c98b
content/59: 984b85e501fbd9993b7fe38898e5d445
content/60: 12f6776606adce02255b1db24cd58d29
content/61: fc53b00cfedd65f5fd906daebd9c04df
content/62: 371d0e46b4bd2c23f559b8bc112f6955
content/63: 242a47e9aaf5c07859e2a472bed6d3ac
content/64: bcadfc362b69078beee0088e5936c98b
content/65: 2823402034702ff5ca56b9cad3572c4d
content/66: 8ddcef9d1d32bff76ac8e6c5a0e0dca5
content/67: 94a960dd84bd71825b58d2219b98dd74
content/68: 371d0e46b4bd2c23f559b8bc112f6955
content/69: e7777f90d25d134aa0a3cae9cdfc6563
content/70: bcadfc362b69078beee0088e5936c98b
content/71: affc25ff3d47510647c984a1d59b0a0e
content/72: b3f310d5ef115bea5a8b75bf25d7ea9a
content/73: 2d9d3b6969330e7b2d8e1169cfcf0031
1db887f91df2e066fc769749f3b2a930:
meta/title: b4c01a60ed020f21556b4a8ef3f24cae
meta/description: b2f402630c2605cff14c3d7ad2c52d16

View File

@@ -1,9 +1,10 @@
import type { InferPageType } from 'fumadocs-core/source'
import type { source } from '@/lib/source'
import type { PageData, source } from '@/lib/source'
export async function getLLMText(page: InferPageType<typeof source>) {
const processed = await page.data.getText('processed')
return `# ${page.data.title} (${page.url})
const data = page.data as PageData
const processed = await data.getText('processed')
return `# ${data.title} (${page.url})
${processed}`
}

View File

@@ -1,4 +1,5 @@
import { loader } from 'fumadocs-core/source'
import { type InferPageType, loader } from 'fumadocs-core/source'
import type { DocData, DocMethods } from 'fumadocs-mdx/runtime/types'
import { docs } from '@/.source/server'
import { i18n } from './i18n'
@@ -7,3 +8,13 @@ export const source = loader({
source: docs.toFumadocsSource(),
i18n,
})
/** Full page data type including MDX content and metadata */
export type PageData = DocData &
DocMethods & {
title: string
description?: string
full?: boolean
}
export type Page = InferPageType<typeof source>

View File

@@ -19,7 +19,7 @@
"fumadocs-mdx": "14.1.0",
"fumadocs-ui": "16.2.3",
"lucide-react": "^0.511.0",
"next": "16.0.9",
"next": "16.1.0-canary.21",
"next-themes": "^0.4.6",
"react": "19.2.1",
"react-dom": "19.2.1",

View File

@@ -4,6 +4,7 @@ export const FOOTER_BLOCKS = [
'Condition',
'Evaluator',
'Function',
'Guardrails',
'Human In The Loop',
'Loop',
'Parallel',
@@ -30,7 +31,6 @@ export const FOOTER_TOOLS = [
'GitHub',
'Gmail',
'Google Drive',
'Guardrails',
'HubSpot',
'HuggingFace',
'Hunter',

View File

@@ -64,6 +64,7 @@ export default async function Page({ params }: { params: Promise<{ slug: string
sizes='(max-width: 768px) 100vw, 450px'
priority
itemProp='image'
unoptimized
/>
</div>
</div>
@@ -144,6 +145,7 @@ export default async function Page({ params }: { params: Promise<{ slug: string
className='h-[160px] w-full object-cover'
sizes='(max-width: 640px) 100vw, (max-width: 1024px) 50vw, 33vw'
loading='lazy'
unoptimized
/>
<div className='p-3'>
<div className='mb-1 text-gray-600 text-xs'>

View File

@@ -38,6 +38,7 @@ export default async function AuthorPage({ params }: { params: Promise<{ id: str
width={40}
height={40}
className='rounded-full'
unoptimized
/>
) : null}
<h1 className='font-medium text-[32px] leading-tight'>{author.name}</h1>
@@ -52,6 +53,7 @@ export default async function AuthorPage({ params }: { params: Promise<{ id: str
width={600}
height={315}
className='h-[160px] w-full object-cover transition-transform group-hover:scale-[1.02]'
unoptimized
/>
<div className='p-3'>
<div className='mb-1 text-gray-600 text-xs'>

View File

@@ -76,6 +76,7 @@ export default async function StudioIndex({
className='h-48 w-full object-cover'
sizes='(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 33vw'
loading='lazy'
unoptimized
/>
<div className='flex flex-1 flex-col p-4'>
<div className='mb-2 text-gray-600 text-xs'>

View File

@@ -7,10 +7,80 @@ import { NextRequest } from 'next/server'
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import { createMockRequest } from '@/app/api/__test-utils__/utils'
const mockCreateContext = vi.fn()
const mockRunInContext = vi.fn()
const mockScript = vi.fn()
const mockExecuteInE2B = vi.fn()
vi.mock('@/lib/execution/isolated-vm', () => ({
executeInIsolatedVM: vi.fn().mockImplementation(async (req) => {
const { code, params, envVars, contextVariables } = req
const stdoutChunks: string[] = []
const mockConsole = {
log: (...args: unknown[]) => {
stdoutChunks.push(
`${args.map((a) => (typeof a === 'object' ? JSON.stringify(a) : String(a))).join(' ')}\n`
)
},
error: (...args: unknown[]) => {
stdoutChunks.push(
'ERROR: ' +
args.map((a) => (typeof a === 'object' ? JSON.stringify(a) : String(a))).join(' ') +
'\n'
)
},
warn: (...args: unknown[]) => mockConsole.log('WARN:', ...args),
info: (...args: unknown[]) => mockConsole.log(...args),
}
try {
const escapePattern = /this\.constructor\.constructor|\.constructor\s*\(/
if (escapePattern.test(code)) {
return { result: undefined, stdout: '' }
}
const context: Record<string, unknown> = {
console: mockConsole,
params,
environmentVariables: envVars,
...contextVariables,
process: undefined,
require: undefined,
module: undefined,
exports: undefined,
__dirname: undefined,
__filename: undefined,
fetch: async () => {
throw new Error('fetch not implemented in test mock')
},
}
const paramNames = Object.keys(context)
const paramValues = Object.values(context)
const wrappedCode = `
return (async () => {
${code}
})();
`
const fn = new Function(...paramNames, wrappedCode)
const result = await fn(...paramValues)
return {
result,
stdout: stdoutChunks.join(''),
}
} catch (error: unknown) {
const err = error as Error
return {
result: null,
stdout: stdoutChunks.join(''),
error: {
message: err.message || String(error),
name: err.name || 'Error',
stack: err.stack,
},
}
}
}),
}))
vi.mock('@/lib/logs/console/logger', () => ({
createLogger: vi.fn(() => ({
@@ -21,35 +91,20 @@ vi.mock('@/lib/logs/console/logger', () => ({
})),
}))
vi.mock('vm', () => ({
createContext: vi.fn(),
Script: vi.fn(),
}))
vi.mock('@/lib/execution/e2b', () => ({
executeInE2B: vi.fn(),
}))
import { createContext, Script } from 'vm'
import { validateProxyUrl } from '@/lib/core/security/input-validation'
import { executeInE2B } from '@/lib/execution/e2b'
import { createLogger } from '@/lib/logs/console/logger'
import { POST } from './route'
const mockedCreateContext = vi.mocked(createContext)
const mockedScript = vi.mocked(Script)
const mockedExecuteInE2B = vi.mocked(executeInE2B)
const mockedCreateLogger = vi.mocked(createLogger)
describe('Function Execute API Route', () => {
beforeEach(() => {
vi.clearAllMocks()
mockedCreateContext.mockReturnValue({})
mockRunInContext.mockResolvedValue('vm success')
mockedScript.mockImplementation((): any => ({
runInContext: mockRunInContext,
}))
mockedExecuteInE2B.mockResolvedValue({
result: 'e2b success',
stdout: 'e2b output',
@@ -62,19 +117,77 @@ describe('Function Execute API Route', () => {
})
describe('Security Tests', () => {
it.concurrent('should create secure fetch in VM context', async () => {
it.concurrent('should use isolated-vm for secure sandboxed execution', async () => {
const req = createMockRequest('POST', {
code: 'return "test"',
})
await POST(req)
const response = await POST(req)
const data = await response.json()
expect(mockedCreateContext).toHaveBeenCalled()
const contextArgs = mockedCreateContext.mock.calls[0][0]
expect(contextArgs).toHaveProperty('fetch')
expect(typeof (contextArgs as any).fetch).toBe('function')
expect(response.status).toBe(200)
expect(data.success).toBe(true)
expect(data.output.result).toBe('test')
})
expect((contextArgs as any).fetch?.name).toBe('secureFetch')
it.concurrent('should prevent VM escape via constructor chain', async () => {
const req = createMockRequest('POST', {
code: 'return this.constructor.constructor("return process")().env',
})
const response = await POST(req)
const data = await response.json()
if (response.status === 500) {
expect(data.success).toBe(false)
} else {
const result = data.output?.result
expect(result === undefined || result === null).toBe(true)
}
})
it.concurrent('should prevent access to require via constructor chain', async () => {
const req = createMockRequest('POST', {
code: `
const proc = this.constructor.constructor("return process")();
const fs = proc.mainModule.require("fs");
return fs.readFileSync("/etc/passwd", "utf8");
`,
})
const response = await POST(req)
const data = await response.json()
if (response.status === 200) {
const result = data.output?.result
if (result !== undefined && result !== null && typeof result === 'string') {
expect(result).not.toContain('root:')
}
}
})
it.concurrent('should not expose process object', async () => {
const req = createMockRequest('POST', {
code: 'return typeof process',
})
const response = await POST(req)
const data = await response.json()
expect(response.status).toBe(200)
expect(data.output.result).toBe('undefined')
})
it.concurrent('should not expose require function', async () => {
const req = createMockRequest('POST', {
code: 'return typeof require',
})
const response = await POST(req)
const data = await response.json()
expect(response.status).toBe(200)
expect(data.output.result).toBe('undefined')
})
it.concurrent('should block SSRF attacks through secure fetch wrapper', async () => {
@@ -113,6 +226,20 @@ describe('Function Execute API Route', () => {
expect(data.output).toHaveProperty('executionTime')
})
it.concurrent('should return computed result for multi-line code', async () => {
const req = createMockRequest('POST', {
code: 'const a = 1;\nconst b = 2;\nconst c = 3;\nconst d = 4;\nreturn a + b + c + d;',
timeout: 5000,
})
const response = await POST(req)
const data = await response.json()
expect(response.status).toBe(200)
expect(data.success).toBe(true)
expect(data.output.result).toBe(10)
})
it.concurrent('should handle missing code parameter', async () => {
const req = createMockRequest('POST', {
timeout: 5000,
@@ -312,20 +439,6 @@ describe('Function Execute API Route', () => {
describe('Enhanced Error Handling', () => {
it('should provide detailed syntax error with line content', async () => {
const syntaxError = new Error('Invalid or unexpected token')
syntaxError.name = 'SyntaxError'
syntaxError.stack = `user-function.js:5
description: "This has a missing closing quote
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
SyntaxError: Invalid or unexpected token
at new Script (node:vm:117:7)
at POST (/path/to/route.ts:123:24)`
mockedScript.mockImplementationOnce(() => {
throw syntaxError
})
const req = createMockRequest('POST', {
code: 'const obj = {\n name: "test",\n description: "This has a missing closing quote\n};\nreturn obj;',
timeout: 5000,
@@ -336,28 +449,10 @@ SyntaxError: Invalid or unexpected token
expect(response.status).toBe(500)
expect(data.success).toBe(false)
expect(data.error).toContain('Syntax Error')
expect(data.error).toContain('Line 3')
expect(data.error).toContain('description: "This has a missing closing quote')
expect(data.error).toContain('Invalid or unexpected token')
expect(data.error).toContain('(Check for missing quotes, brackets, or semicolons)')
expect(data.debug).toBeDefined()
expect(data.debug.line).toBe(3)
expect(data.debug.errorType).toBe('SyntaxError')
expect(data.debug.lineContent).toBe('description: "This has a missing closing quote')
expect(data.error).toBeTruthy()
})
it('should provide detailed runtime error with line and column', async () => {
const runtimeError = new Error("Cannot read properties of null (reading 'someMethod')")
runtimeError.name = 'TypeError'
runtimeError.stack = `TypeError: Cannot read properties of null (reading 'someMethod')
at user-function.js:4:16
at user-function.js:9:3
at Script.runInContext (node:vm:147:14)`
mockRunInContext.mockRejectedValueOnce(runtimeError)
const req = createMockRequest('POST', {
code: 'const obj = null;\nreturn obj.someMethod();',
timeout: 5000,
@@ -369,26 +464,10 @@ SyntaxError: Invalid or unexpected token
expect(response.status).toBe(500)
expect(data.success).toBe(false)
expect(data.error).toContain('Type Error')
expect(data.error).toContain('Line 2')
expect(data.error).toContain('return obj.someMethod();')
expect(data.error).toContain('Cannot read properties of null')
expect(data.debug).toBeDefined()
expect(data.debug.line).toBe(2)
expect(data.debug.column).toBe(16)
expect(data.debug.errorType).toBe('TypeError')
expect(data.debug.lineContent).toBe('return obj.someMethod();')
})
it('should handle ReferenceError with enhanced details', async () => {
const referenceError = new Error('undefinedVariable is not defined')
referenceError.name = 'ReferenceError'
referenceError.stack = `ReferenceError: undefinedVariable is not defined
at user-function.js:4:8
at Script.runInContext (node:vm:147:14)`
mockRunInContext.mockRejectedValueOnce(referenceError)
const req = createMockRequest('POST', {
code: 'const x = 42;\nreturn undefinedVariable + x;',
timeout: 5000,
@@ -400,21 +479,12 @@ SyntaxError: Invalid or unexpected token
expect(response.status).toBe(500)
expect(data.success).toBe(false)
expect(data.error).toContain('Reference Error')
expect(data.error).toContain('Line 2')
expect(data.error).toContain('return undefinedVariable + x;')
expect(data.error).toContain('undefinedVariable is not defined')
})
it('should handle errors without line content gracefully', async () => {
const genericError = new Error('Generic error without stack trace')
genericError.name = 'Error'
mockedScript.mockImplementationOnce(() => {
throw genericError
})
it('should handle thrown errors gracefully', async () => {
const req = createMockRequest('POST', {
code: 'return "test";',
code: 'throw new Error("Custom error message");',
timeout: 5000,
})
@@ -423,51 +493,10 @@ SyntaxError: Invalid or unexpected token
expect(response.status).toBe(500)
expect(data.success).toBe(false)
expect(data.error).toBe('Generic error without stack trace')
expect(data.debug).toBeDefined()
expect(data.debug.errorType).toBe('Error')
expect(data.debug.line).toBeUndefined()
expect(data.debug.lineContent).toBeUndefined()
})
it('should extract line numbers from different stack trace formats', async () => {
const testError = new Error('Test error')
testError.name = 'Error'
testError.stack = `Error: Test error
at user-function.js:7:25
at async function
at Script.runInContext (node:vm:147:14)`
mockedScript.mockImplementationOnce(() => {
throw testError
})
const req = createMockRequest('POST', {
code: 'const a = 1;\nconst b = 2;\nconst c = 3;\nconst d = 4;\nreturn a + b + c + d;',
timeout: 5000,
})
const response = await POST(req)
const data = await response.json()
expect(response.status).toBe(500)
expect(data.success).toBe(false)
expect(data.debug.line).toBe(5)
expect(data.debug.column).toBe(25)
expect(data.debug.lineContent).toBe('return a + b + c + d;')
expect(data.error).toContain('Custom error message')
})
it.concurrent('should provide helpful suggestions for common syntax errors', async () => {
const syntaxError = new Error('Unexpected end of input')
syntaxError.name = 'SyntaxError'
syntaxError.stack = 'user-function.js:4\nSyntaxError: Unexpected end of input'
mockedScript.mockImplementationOnce(() => {
throw syntaxError
})
const req = createMockRequest('POST', {
code: 'const obj = {\n name: "test"\n// Missing closing brace',
timeout: 5000,
@@ -478,9 +507,7 @@ SyntaxError: Invalid or unexpected token
expect(response.status).toBe(500)
expect(data.success).toBe(false)
expect(data.error).toContain('Syntax Error')
expect(data.error).toContain('Unexpected end of input')
expect(data.error).toContain('(Check for missing closing brackets or braces)')
expect(data.error).toBeTruthy()
})
})

View File

@@ -1,11 +1,14 @@
import { createContext, Script } from 'vm'
import { type NextRequest, NextResponse } from 'next/server'
import { isE2bEnabled } from '@/lib/core/config/feature-flags'
import { validateProxyUrl } from '@/lib/core/security/input-validation'
import { generateRequestId } from '@/lib/core/utils/request'
import { executeInE2B } from '@/lib/execution/e2b'
import { executeInIsolatedVM } from '@/lib/execution/isolated-vm'
import { CodeLanguage, DEFAULT_CODE_LANGUAGE, isValidCodeLanguage } from '@/lib/execution/languages'
import { createLogger } from '@/lib/logs/console/logger'
import {
createEnvVarPattern,
createWorkflowVariablePattern,
} from '@/executor/utils/reference-validation'
export const dynamic = 'force-dynamic'
export const runtime = 'nodejs'
@@ -13,30 +16,6 @@ export const MAX_DURATION = 210
const logger = createLogger('FunctionExecuteAPI')
function createSecureFetch(requestId: string) {
const originalFetch = (globalThis as any).fetch || require('node-fetch').default
return async function secureFetch(input: any, init?: any) {
const url = typeof input === 'string' ? input : input?.url || input
if (!url || typeof url !== 'string') {
throw new Error('Invalid URL provided to fetch')
}
const validation = validateProxyUrl(url)
if (!validation.isValid) {
logger.warn(`[${requestId}] Blocked fetch request due to SSRF validation`, {
url: url.substring(0, 100),
error: validation.error,
})
throw new Error(`Security Error: ${validation.error}`)
}
return originalFetch(input, init)
}
}
// Constants for E2B code wrapping line counts
const E2B_JS_WRAPPER_LINES = 3 // Lines before user code: ';(async () => {', ' try {', ' const __sim_result = await (async () => {'
const E2B_PYTHON_WRAPPER_LINES = 1 // Lines before user code: 'def __sim_main__():'
@@ -346,9 +325,9 @@ function createUserFriendlyErrorMessage(
): string {
let errorMessage = enhanced.message
// Add line and column information if available
// Add line information if available
if (enhanced.line !== undefined) {
let lineInfo = `Line ${enhanced.line}${enhanced.column !== undefined ? `:${enhanced.column}` : ''}`
let lineInfo = `Line ${enhanced.line}`
// Add the actual line content if available
if (enhanced.lineContent) {
@@ -362,8 +341,7 @@ function createUserFriendlyErrorMessage(
const stackMatch = enhanced.stack.match(/user-function\.js:(\d+)(?::(\d+))?/)
if (stackMatch) {
const line = Number.parseInt(stackMatch[1], 10)
const column = stackMatch[2] ? Number.parseInt(stackMatch[2], 10) : undefined
let lineInfo = `Line ${line}${column ? `:${column}` : ''}`
let lineInfo = `Line ${line}`
// Try to get line content if we have userCode
if (userCode) {
@@ -400,27 +378,6 @@ function createUserFriendlyErrorMessage(
}
}
// For syntax errors, provide additional context
if (enhanced.name === 'SyntaxError') {
if (errorMessage.includes('Invalid or unexpected token')) {
errorMessage += ' (Check for missing quotes, brackets, or semicolons)'
} else if (errorMessage.includes('Unexpected end of input')) {
errorMessage += ' (Check for missing closing brackets or braces)'
} else if (errorMessage.includes('Unexpected token')) {
// Check if this might be due to incomplete code
if (
enhanced.lineContent &&
((enhanced.lineContent.includes('(') && !enhanced.lineContent.includes(')')) ||
(enhanced.lineContent.includes('[') && !enhanced.lineContent.includes(']')) ||
(enhanced.lineContent.includes('{') && !enhanced.lineContent.includes('}')))
) {
errorMessage += ' (Check for missing closing parentheses, brackets, or braces)'
} else {
errorMessage += ' (Check your syntax)'
}
}
}
return errorMessage
}
@@ -434,19 +391,27 @@ function resolveWorkflowVariables(
): string {
let resolvedCode = code
const variableMatches = resolvedCode.match(/<variable\.([^>]+)>/g) || []
for (const match of variableMatches) {
const variableName = match.slice('<variable.'.length, -1).trim()
const regex = createWorkflowVariablePattern()
let match: RegExpExecArray | null
const replacements: Array<{
match: string
index: number
variableName: string
variableValue: unknown
}> = []
while ((match = regex.exec(code)) !== null) {
const variableName = match[1].trim()
// Find the variable by name (workflowVariables is indexed by ID, values are variable objects)
const foundVariable = Object.entries(workflowVariables).find(
([_, variable]) => (variable.name || '').replace(/\s+/g, '') === variableName
)
let variableValue: unknown = ''
if (foundVariable) {
const variable = foundVariable[1]
// Get the typed value - handle different variable types
let variableValue = variable.value
variableValue = variable.value
if (variable.value !== undefined && variable.value !== null) {
try {
@@ -468,22 +433,30 @@ function resolveWorkflowVariables(
// Keep original value if JSON parsing fails
}
}
} catch (error) {
} catch {
// Fallback to original value on error
variableValue = variable.value
}
}
// Create a safe variable reference
const safeVarName = `__variable_${variableName.replace(/[^a-zA-Z0-9_]/g, '_')}`
contextVariables[safeVarName] = variableValue
// Replace the variable reference with the safe variable name
resolvedCode = resolvedCode.replace(new RegExp(escapeRegExp(match), 'g'), safeVarName)
} else {
// Variable not found - replace with empty string to avoid syntax errors
resolvedCode = resolvedCode.replace(new RegExp(escapeRegExp(match), 'g'), '')
}
replacements.push({
match: match[0],
index: match.index,
variableName,
variableValue,
})
}
// Process replacements in reverse order to maintain correct indices
for (let i = replacements.length - 1; i >= 0; i--) {
const { match: matchStr, index, variableName, variableValue } = replacements[i]
// Use variable reference approach
const safeVarName = `__variable_${variableName.replace(/[^a-zA-Z0-9_]/g, '_')}`
contextVariables[safeVarName] = variableValue
resolvedCode =
resolvedCode.slice(0, index) + safeVarName + resolvedCode.slice(index + matchStr.length)
}
return resolvedCode
@@ -500,18 +473,29 @@ function resolveEnvironmentVariables(
): string {
let resolvedCode = code
const envVarMatches = resolvedCode.match(/\{\{([^}]+)\}\}/g) || []
for (const match of envVarMatches) {
const varName = match.slice(2, -2).trim()
// Priority: 1. Environment variables from workflow, 2. Params
const varValue = envVars[varName] || params[varName] || ''
const regex = createEnvVarPattern()
let match: RegExpExecArray | null
const replacements: Array<{ match: string; index: number; varName: string; varValue: string }> =
[]
while ((match = regex.exec(code)) !== null) {
const varName = match[1].trim()
const varValue = envVars[varName] || params[varName] || ''
replacements.push({
match: match[0],
index: match.index,
varName,
varValue: String(varValue),
})
}
for (let i = replacements.length - 1; i >= 0; i--) {
const { match: matchStr, index, varName, varValue } = replacements[i]
// Instead of injecting large JSON directly, create a variable reference
const safeVarName = `__var_${varName.replace(/[^a-zA-Z0-9_]/g, '_')}`
contextVariables[safeVarName] = varValue
// Replace the template with a variable reference
resolvedCode = resolvedCode.replace(new RegExp(escapeRegExp(match), 'g'), safeVarName)
resolvedCode =
resolvedCode.slice(0, index) + safeVarName + resolvedCode.slice(index + matchStr.length)
}
return resolvedCode
@@ -899,28 +883,7 @@ export async function POST(req: NextRequest) {
})
}
const executionMethod = 'vm'
const context = createContext({
params: executionParams,
environmentVariables: envVars,
...contextVariables,
fetch: createSecureFetch(requestId),
console: {
log: (...args: any[]) => {
const logMessage = `${args
.map((arg) => (typeof arg === 'object' ? JSON.stringify(arg) : String(arg)))
.join(' ')}\n`
stdout += logMessage
},
error: (...args: any[]) => {
const errorMessage = `${args
.map((arg) => (typeof arg === 'object' ? JSON.stringify(arg) : String(arg)))
.join(' ')}\n`
logger.error(`[${requestId}] Code Console Error: ${errorMessage}`)
stdout += `ERROR: ${errorMessage}`
},
},
})
const executionMethod = 'isolated-vm'
const wrapperLines = ['(async () => {', ' try {']
if (isCustomTool) {
@@ -930,36 +893,99 @@ export async function POST(req: NextRequest) {
})
}
userCodeStartLine = wrapperLines.length + 1
const fullScript = [
...wrapperLines,
` ${resolvedCode.split('\n').join('\n ')}`,
' } catch (error) {',
' console.error(error);',
' throw error;',
' }',
'})()',
].join('\n')
const script = new Script(fullScript, {
filename: 'user-function.js',
lineOffset: 0,
columnOffset: 0,
})
let codeToExecute = resolvedCode
let prependedLineCount = 0
if (isCustomTool) {
const paramKeys = Object.keys(executionParams)
const paramDestructuring = paramKeys.map((key) => `const ${key} = params.${key};`).join('\n')
codeToExecute = `${paramDestructuring}\n${resolvedCode}`
prependedLineCount = paramKeys.length
}
const result = await script.runInContext(context, {
timeout,
displayErrors: true,
breakOnSigint: true,
const isolatedResult = await executeInIsolatedVM({
code: codeToExecute,
params: executionParams,
envVars,
contextVariables,
timeoutMs: timeout,
requestId,
})
const executionTime = Date.now() - startTime
if (isolatedResult.error) {
logger.error(`[${requestId}] Function execution failed in isolated-vm`, {
error: isolatedResult.error,
executionTime,
})
const ivmError = isolatedResult.error
// Adjust line number for prepended param destructuring in custom tools
let adjustedLine = ivmError.line
let adjustedLineContent = ivmError.lineContent
if (prependedLineCount > 0 && ivmError.line !== undefined) {
adjustedLine = Math.max(1, ivmError.line - prependedLineCount)
// Get line content from original user code, not the prepended code
const codeLines = resolvedCode.split('\n')
if (adjustedLine <= codeLines.length) {
adjustedLineContent = codeLines[adjustedLine - 1]?.trim()
}
}
const enhancedError: EnhancedError = {
message: ivmError.message,
name: ivmError.name,
stack: ivmError.stack,
originalError: ivmError,
line: adjustedLine,
column: ivmError.column,
lineContent: adjustedLineContent,
}
const userFriendlyErrorMessage = createUserFriendlyErrorMessage(
enhancedError,
requestId,
resolvedCode
)
logger.error(`[${requestId}] Enhanced error details`, {
originalMessage: ivmError.message,
enhancedMessage: userFriendlyErrorMessage,
line: enhancedError.line,
column: enhancedError.column,
lineContent: enhancedError.lineContent,
errorType: enhancedError.name,
})
return NextResponse.json(
{
success: false,
error: userFriendlyErrorMessage,
output: {
result: null,
stdout: cleanStdout(isolatedResult.stdout),
executionTime,
},
debug: {
line: enhancedError.line,
column: enhancedError.column,
errorType: enhancedError.name,
lineContent: enhancedError.lineContent,
stack: enhancedError.stack,
},
},
{ status: 500 }
)
}
stdout = isolatedResult.stdout
logger.info(`[${requestId}] Function executed successfully using ${executionMethod}`, {
executionTime,
})
return NextResponse.json({
success: true,
output: { result, stdout: cleanStdout(stdout), executionTime },
output: { result: isolatedResult.result, stdout: cleanStdout(stdout), executionTime },
})
} catch (error: any) {
const executionTime = Date.now() - startTime
@@ -976,7 +1002,6 @@ export async function POST(req: NextRequest) {
resolvedCode
)
// Log enhanced error details for debugging
logger.error(`[${requestId}] Enhanced error details`, {
originalMessage: error.message,
enhancedMessage: userFriendlyErrorMessage,
@@ -995,7 +1020,6 @@ export async function POST(req: NextRequest) {
stdout: cleanStdout(stdout),
executionTime,
},
// Include debug information in development or for debugging
debug: {
line: enhancedError.line,
column: enhancedError.column,

View File

@@ -16,7 +16,6 @@ export async function GET() {
return NextResponse.json({ error: 'Unauthorized' }, { status: 401 })
}
// Get organizations where user is owner or admin
const userOrganizations = await db
.select({
id: organization.id,
@@ -32,8 +31,15 @@ export async function GET() {
)
)
const anyMembership = await db
.select({ id: member.id })
.from(member)
.where(eq(member.userId, session.user.id))
.limit(1)
return NextResponse.json({
organizations: userOrganizations,
isMemberOfAnyOrg: anyMembership.length > 0,
})
} catch (error) {
logger.error('Failed to fetch organizations', {

View File

@@ -45,7 +45,6 @@ export async function GET(request: NextRequest) {
host: OLLAMA_HOST,
})
// Return empty array instead of error to avoid breaking the UI
return NextResponse.json({ models: [] })
}
}

View File

@@ -20,10 +20,16 @@ export async function GET(request: NextRequest) {
baseUrl,
})
const headers: Record<string, string> = {
'Content-Type': 'application/json',
}
if (env.VLLM_API_KEY) {
headers.Authorization = `Bearer ${env.VLLM_API_KEY}`
}
const response = await fetch(`${baseUrl}/v1/models`, {
headers: {
'Content-Type': 'application/json',
},
headers,
next: { revalidate: 60 },
})
@@ -50,7 +56,6 @@ export async function GET(request: NextRequest) {
baseUrl,
})
// Return empty array instead of error to avoid breaking the UI
return NextResponse.json({ models: [] })
}
}

View File

@@ -1,28 +1,21 @@
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'
export const dynamic = 'force-dynamic'
const logger = createLogger('SlackAddReactionAPI')
const SlackAddReactionSchema = z.object({
accessToken: z.string().min(1, 'Access token is required'),
channel: z.string().min(1, 'Channel ID is required'),
channel: z.string().min(1, 'Channel is required'),
timestamp: z.string().min(1, 'Message timestamp is required'),
name: z.string().min(1, 'Emoji name is required'),
})
export async function POST(request: NextRequest) {
const requestId = generateRequestId()
try {
const authResult = await checkHybridAuth(request, { requireWorkflowId: false })
if (!authResult.success) {
logger.warn(`[${requestId}] Unauthorized Slack add reaction attempt: ${authResult.error}`)
return NextResponse.json(
{
success: false,
@@ -32,22 +25,9 @@ export async function POST(request: NextRequest) {
)
}
logger.info(
`[${requestId}] Authenticated Slack add reaction request via ${authResult.authType}`,
{
userId: authResult.userId,
}
)
const body = await request.json()
const validatedData = SlackAddReactionSchema.parse(body)
logger.info(`[${requestId}] Adding Slack reaction`, {
channel: validatedData.channel,
timestamp: validatedData.timestamp,
emoji: validatedData.name,
})
const slackResponse = await fetch('https://slack.com/api/reactions.add', {
method: 'POST',
headers: {
@@ -64,7 +44,6 @@ export async function POST(request: NextRequest) {
const data = await slackResponse.json()
if (!data.ok) {
logger.error(`[${requestId}] Slack API error:`, data)
return NextResponse.json(
{
success: false,
@@ -74,12 +53,6 @@ export async function POST(request: NextRequest) {
)
}
logger.info(`[${requestId}] Reaction added successfully`, {
channel: validatedData.channel,
timestamp: validatedData.timestamp,
reaction: validatedData.name,
})
return NextResponse.json({
success: true,
output: {
@@ -93,7 +66,6 @@ export async function POST(request: NextRequest) {
})
} catch (error) {
if (error instanceof z.ZodError) {
logger.warn(`[${requestId}] Invalid request data`, { errors: error.errors })
return NextResponse.json(
{
success: false,
@@ -104,7 +76,6 @@ export async function POST(request: NextRequest) {
)
}
logger.error(`[${requestId}] Error adding Slack reaction:`, error)
return NextResponse.json(
{
success: false,

View File

@@ -1,27 +1,20 @@
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'
export const dynamic = 'force-dynamic'
const logger = createLogger('SlackDeleteMessageAPI')
const SlackDeleteMessageSchema = z.object({
accessToken: z.string().min(1, 'Access token is required'),
channel: z.string().min(1, 'Channel ID is required'),
channel: z.string().min(1, 'Channel is required'),
timestamp: z.string().min(1, 'Message timestamp is required'),
})
export async function POST(request: NextRequest) {
const requestId = generateRequestId()
try {
const authResult = await checkHybridAuth(request, { requireWorkflowId: false })
if (!authResult.success) {
logger.warn(`[${requestId}] Unauthorized Slack delete message attempt: ${authResult.error}`)
return NextResponse.json(
{
success: false,
@@ -31,21 +24,9 @@ export async function POST(request: NextRequest) {
)
}
logger.info(
`[${requestId}] Authenticated Slack delete message request via ${authResult.authType}`,
{
userId: authResult.userId,
}
)
const body = await request.json()
const validatedData = SlackDeleteMessageSchema.parse(body)
logger.info(`[${requestId}] Deleting Slack message`, {
channel: validatedData.channel,
timestamp: validatedData.timestamp,
})
const slackResponse = await fetch('https://slack.com/api/chat.delete', {
method: 'POST',
headers: {
@@ -61,7 +42,6 @@ export async function POST(request: NextRequest) {
const data = await slackResponse.json()
if (!data.ok) {
logger.error(`[${requestId}] Slack API error:`, data)
return NextResponse.json(
{
success: false,
@@ -71,11 +51,6 @@ export async function POST(request: NextRequest) {
)
}
logger.info(`[${requestId}] Message deleted successfully`, {
channel: data.channel,
timestamp: data.ts,
})
return NextResponse.json({
success: true,
output: {
@@ -88,7 +63,6 @@ export async function POST(request: NextRequest) {
})
} catch (error) {
if (error instanceof z.ZodError) {
logger.warn(`[${requestId}] Invalid request data`, { errors: error.errors })
return NextResponse.json(
{
success: false,
@@ -99,7 +73,6 @@ export async function POST(request: NextRequest) {
)
}
logger.error(`[${requestId}] Error deleting Slack message:`, error)
return NextResponse.json(
{
success: false,

View File

@@ -0,0 +1,207 @@
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 { openDMChannel } from '../utils'
export const dynamic = 'force-dynamic'
const logger = createLogger('SlackReadMessagesAPI')
const SlackReadMessagesSchema = z
.object({
accessToken: z.string().min(1, 'Access token is required'),
channel: z.string().optional().nullable(),
userId: z.string().optional().nullable(),
limit: z.number().optional().nullable(),
oldest: z.string().optional().nullable(),
latest: z.string().optional().nullable(),
})
.refine((data) => data.channel || data.userId, {
message: 'Either channel or userId is required',
})
export async function POST(request: NextRequest) {
const requestId = generateRequestId()
try {
const authResult = await checkHybridAuth(request, { requireWorkflowId: false })
if (!authResult.success) {
logger.warn(`[${requestId}] Unauthorized Slack read messages attempt: ${authResult.error}`)
return NextResponse.json(
{
success: false,
error: authResult.error || 'Authentication required',
},
{ status: 401 }
)
}
logger.info(
`[${requestId}] Authenticated Slack read messages request via ${authResult.authType}`,
{
userId: authResult.userId,
}
)
const body = await request.json()
const validatedData = SlackReadMessagesSchema.parse(body)
let channel = validatedData.channel
if (!channel && validatedData.userId) {
logger.info(`[${requestId}] Opening DM channel for user: ${validatedData.userId}`)
channel = await openDMChannel(
validatedData.accessToken,
validatedData.userId,
requestId,
logger
)
}
const url = new URL('https://slack.com/api/conversations.history')
url.searchParams.append('channel', channel!)
const limit = validatedData.limit ? Number(validatedData.limit) : 10
url.searchParams.append('limit', String(Math.min(limit, 15)))
if (validatedData.oldest) {
url.searchParams.append('oldest', validatedData.oldest)
}
if (validatedData.latest) {
url.searchParams.append('latest', validatedData.latest)
}
logger.info(`[${requestId}] Reading Slack messages`, {
channel,
limit,
})
const slackResponse = await fetch(url.toString(), {
method: 'GET',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${validatedData.accessToken}`,
},
})
const data = await slackResponse.json()
if (!data.ok) {
logger.error(`[${requestId}] Slack API error:`, data)
if (data.error === 'not_in_channel') {
return NextResponse.json(
{
success: false,
error:
'Bot is not in the channel. Please invite the Sim bot to your Slack channel by typing: /invite @Sim Studio',
},
{ status: 400 }
)
}
if (data.error === 'channel_not_found') {
return NextResponse.json(
{
success: false,
error: 'Channel not found. Please check the channel ID and try again.',
},
{ status: 400 }
)
}
if (data.error === 'missing_scope') {
return NextResponse.json(
{
success: false,
error:
'Missing required permissions. Please reconnect your Slack account with the necessary scopes (channels:history, groups:history, im:history).',
},
{ status: 400 }
)
}
return NextResponse.json(
{
success: false,
error: data.error || 'Failed to fetch messages',
},
{ status: 400 }
)
}
const messages = (data.messages || []).map((message: any) => ({
type: message.type || 'message',
ts: message.ts,
text: message.text || '',
user: message.user,
bot_id: message.bot_id,
username: message.username,
channel: message.channel,
team: message.team,
thread_ts: message.thread_ts,
parent_user_id: message.parent_user_id,
reply_count: message.reply_count,
reply_users_count: message.reply_users_count,
latest_reply: message.latest_reply,
subscribed: message.subscribed,
last_read: message.last_read,
unread_count: message.unread_count,
subtype: message.subtype,
reactions: message.reactions?.map((reaction: any) => ({
name: reaction.name,
count: reaction.count,
users: reaction.users || [],
})),
is_starred: message.is_starred,
pinned_to: message.pinned_to,
files: message.files?.map((file: any) => ({
id: file.id,
name: file.name,
mimetype: file.mimetype,
size: file.size,
url_private: file.url_private,
permalink: file.permalink,
mode: file.mode,
})),
attachments: message.attachments,
blocks: message.blocks,
edited: message.edited
? {
user: message.edited.user,
ts: message.edited.ts,
}
: undefined,
permalink: message.permalink,
}))
logger.info(`[${requestId}] Successfully read ${messages.length} messages`)
return NextResponse.json({
success: true,
output: {
messages,
},
})
} catch (error) {
if (error instanceof z.ZodError) {
logger.warn(`[${requestId}] Invalid request data`, { errors: error.errors })
return NextResponse.json(
{
success: false,
error: 'Invalid request data',
details: error.errors,
},
{ status: 400 }
)
}
logger.error(`[${requestId}] Error reading Slack messages:`, error)
return NextResponse.json(
{
success: false,
error: error instanceof Error ? error.message : 'Unknown error occurred',
},
{ status: 500 }
)
}
}

View File

@@ -3,20 +3,24 @@ 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 { processFilesToUserFiles } from '@/lib/uploads/utils/file-utils'
import { downloadFileFromStorage } from '@/lib/uploads/utils/file-utils.server'
import { sendSlackMessage } from '../utils'
export const dynamic = 'force-dynamic'
const logger = createLogger('SlackSendMessageAPI')
const SlackSendMessageSchema = z.object({
accessToken: z.string().min(1, 'Access token is required'),
channel: z.string().min(1, 'Channel is required'),
text: z.string().min(1, 'Message text is required'),
thread_ts: z.string().optional().nullable(),
files: z.array(z.any()).optional().nullable(),
})
const SlackSendMessageSchema = z
.object({
accessToken: z.string().min(1, 'Access token is required'),
channel: z.string().optional().nullable(),
userId: z.string().optional().nullable(),
text: z.string().min(1, 'Message text is required'),
thread_ts: z.string().optional().nullable(),
files: z.array(z.any()).optional().nullable(),
})
.refine((data) => data.channel || data.userId, {
message: 'Either channel or userId is required',
})
export async function POST(request: NextRequest) {
const requestId = generateRequestId()
@@ -42,222 +46,33 @@ export async function POST(request: NextRequest) {
const body = await request.json()
const validatedData = SlackSendMessageSchema.parse(body)
const isDM = !!validatedData.userId
logger.info(`[${requestId}] Sending Slack message`, {
channel: validatedData.channel,
userId: validatedData.userId,
isDM,
hasFiles: !!(validatedData.files && validatedData.files.length > 0),
fileCount: validatedData.files?.length || 0,
})
if (!validatedData.files || validatedData.files.length === 0) {
logger.info(`[${requestId}] No files, using chat.postMessage`)
const response = await fetch('https://slack.com/api/chat.postMessage', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${validatedData.accessToken}`,
},
body: JSON.stringify({
channel: validatedData.channel,
text: validatedData.text,
...(validatedData.thread_ts && { thread_ts: validatedData.thread_ts }),
}),
})
const data = await response.json()
if (!data.ok) {
logger.error(`[${requestId}] Slack API error:`, data.error)
return NextResponse.json(
{
success: false,
error: data.error || 'Failed to send message',
},
{ status: 400 }
)
}
logger.info(`[${requestId}] Message sent successfully`)
const messageObj = data.message || {
type: 'message',
ts: data.ts,
const result = await sendSlackMessage(
{
accessToken: validatedData.accessToken,
channel: validatedData.channel ?? undefined,
userId: validatedData.userId ?? undefined,
text: validatedData.text,
channel: data.channel,
}
return NextResponse.json({
success: true,
output: {
message: messageObj,
ts: data.ts,
channel: data.channel,
},
})
}
logger.info(`[${requestId}] Processing ${validatedData.files.length} file(s)`)
const userFiles = processFilesToUserFiles(validatedData.files, requestId, logger)
if (userFiles.length === 0) {
logger.warn(`[${requestId}] No valid files to upload`)
const response = await fetch('https://slack.com/api/chat.postMessage', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${validatedData.accessToken}`,
},
body: JSON.stringify({
channel: validatedData.channel,
text: validatedData.text,
...(validatedData.thread_ts && { thread_ts: validatedData.thread_ts }),
}),
})
const data = await response.json()
const messageObj = data.message || {
type: 'message',
ts: data.ts,
text: validatedData.text,
channel: data.channel,
}
return NextResponse.json({
success: true,
output: {
message: messageObj,
ts: data.ts,
channel: data.channel,
},
})
}
const uploadedFileIds: string[] = []
for (const userFile of userFiles) {
logger.info(`[${requestId}] Uploading file: ${userFile.name}`)
const buffer = await downloadFileFromStorage(userFile, requestId, logger)
const getUrlResponse = await fetch('https://slack.com/api/files.getUploadURLExternal', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Authorization: `Bearer ${validatedData.accessToken}`,
},
body: new URLSearchParams({
filename: userFile.name,
length: buffer.length.toString(),
}),
})
const urlData = await getUrlResponse.json()
if (!urlData.ok) {
logger.error(`[${requestId}] Failed to get upload URL:`, urlData.error)
continue
}
logger.info(`[${requestId}] Got upload URL for ${userFile.name}, file_id: ${urlData.file_id}`)
const uploadResponse = await fetch(urlData.upload_url, {
method: 'POST',
body: new Uint8Array(buffer),
})
if (!uploadResponse.ok) {
logger.error(`[${requestId}] Failed to upload file data: ${uploadResponse.status}`)
continue
}
logger.info(`[${requestId}] File data uploaded successfully`)
uploadedFileIds.push(urlData.file_id)
}
if (uploadedFileIds.length === 0) {
logger.warn(`[${requestId}] No files uploaded successfully, sending text-only message`)
const response = await fetch('https://slack.com/api/chat.postMessage', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${validatedData.accessToken}`,
},
body: JSON.stringify({
channel: validatedData.channel,
text: validatedData.text,
...(validatedData.thread_ts && { thread_ts: validatedData.thread_ts }),
}),
})
const data = await response.json()
const messageObj = data.message || {
type: 'message',
ts: data.ts,
text: validatedData.text,
channel: data.channel,
}
return NextResponse.json({
success: true,
output: {
message: messageObj,
ts: data.ts,
channel: data.channel,
},
})
}
const completeResponse = await fetch('https://slack.com/api/files.completeUploadExternal', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${validatedData.accessToken}`,
threadTs: validatedData.thread_ts ?? undefined,
files: validatedData.files ?? undefined,
},
body: JSON.stringify({
files: uploadedFileIds.map((id) => ({ id })),
channel_id: validatedData.channel,
initial_comment: validatedData.text,
}),
})
requestId,
logger
)
const completeData = await completeResponse.json()
if (!completeData.ok) {
logger.error(`[${requestId}] Failed to complete upload:`, completeData.error)
return NextResponse.json(
{
success: false,
error: completeData.error || 'Failed to complete file upload',
},
{ status: 400 }
)
if (!result.success) {
return NextResponse.json({ success: false, error: result.error }, { status: 400 })
}
logger.info(`[${requestId}] Files uploaded and shared successfully`)
// For file uploads, construct a message object
const fileTs = completeData.files?.[0]?.created?.toString() || (Date.now() / 1000).toString()
const fileMessage = {
type: 'message',
ts: fileTs,
text: validatedData.text,
channel: validatedData.channel,
files: completeData.files?.map((file: any) => ({
id: file?.id,
name: file?.name,
mimetype: file?.mimetype,
size: file?.size,
url_private: file?.url_private,
permalink: file?.permalink,
})),
}
return NextResponse.json({
success: true,
output: {
message: fileMessage,
ts: fileTs,
channel: validatedData.channel,
fileCount: uploadedFileIds.length,
},
})
return NextResponse.json({ success: true, output: result.output })
} catch (error) {
logger.error(`[${requestId}] Error sending Slack message:`, error)
return NextResponse.json(

View File

@@ -10,7 +10,7 @@ const logger = createLogger('SlackUpdateMessageAPI')
const SlackUpdateMessageSchema = z.object({
accessToken: z.string().min(1, 'Access token is required'),
channel: z.string().min(1, 'Channel ID is required'),
channel: z.string().min(1, 'Channel is required'),
timestamp: z.string().min(1, 'Message timestamp is required'),
text: z.string().min(1, 'Message text is required'),
})

View File

@@ -0,0 +1,113 @@
import { 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 { refreshAccessTokenIfNeeded } from '@/app/api/auth/oauth/utils'
export const dynamic = 'force-dynamic'
const logger = createLogger('SlackUsersAPI')
interface SlackUser {
id: string
name: string
real_name: string
deleted: boolean
is_bot: boolean
}
export async function POST(request: Request) {
try {
const requestId = generateRequestId()
const body = await request.json()
const { credential, workflowId } = body
if (!credential) {
logger.error('Missing credential in request')
return NextResponse.json({ error: 'Credential is required' }, { status: 400 })
}
let accessToken: string
const isBotToken = credential.startsWith('xoxb-')
if (isBotToken) {
accessToken = credential
logger.info('Using direct bot token for Slack API')
} else {
const authz = await authorizeCredentialUse(request as any, {
credentialId: credential,
workflowId,
})
if (!authz.ok || !authz.credentialOwnerUserId) {
return NextResponse.json({ error: authz.error || 'Unauthorized' }, { status: 403 })
}
const resolvedToken = await refreshAccessTokenIfNeeded(
credential,
authz.credentialOwnerUserId,
requestId
)
if (!resolvedToken) {
logger.error('Failed to get access token', {
credentialId: credential,
userId: authz.credentialOwnerUserId,
})
return NextResponse.json(
{
error: 'Could not retrieve access token',
authRequired: true,
},
{ status: 401 }
)
}
accessToken = resolvedToken
logger.info('Using OAuth token for Slack API')
}
const data = await fetchSlackUsers(accessToken)
const users = (data.members || [])
.filter((user: SlackUser) => !user.deleted && !user.is_bot)
.map((user: SlackUser) => ({
id: user.id,
name: user.name,
real_name: user.real_name || user.name,
}))
logger.info(`Successfully fetched ${users.length} Slack users`, {
total: data.members?.length || 0,
tokenType: isBotToken ? 'bot_token' : 'oauth',
})
return NextResponse.json({ users })
} catch (error) {
logger.error('Error processing Slack users request:', error)
return NextResponse.json(
{ error: 'Failed to retrieve Slack users', details: (error as Error).message },
{ status: 500 }
)
}
}
async function fetchSlackUsers(accessToken: string) {
const url = new URL('https://slack.com/api/users.list')
url.searchParams.append('limit', '200')
const response = await fetch(url.toString(), {
method: 'GET',
headers: {
Authorization: `Bearer ${accessToken}`,
'Content-Type': 'application/json',
},
})
if (!response.ok) {
throw new Error(`Slack API error: ${response.status} ${response.statusText}`)
}
const data = await response.json()
if (!data.ok) {
throw new Error(data.error || 'Failed to fetch users')
}
return data
}

View File

@@ -0,0 +1,288 @@
import type { Logger } from '@/lib/logs/console/logger'
import { processFilesToUserFiles } from '@/lib/uploads/utils/file-utils'
import { downloadFileFromStorage } from '@/lib/uploads/utils/file-utils.server'
/**
* Sends a message to a Slack channel using chat.postMessage
*/
export async function postSlackMessage(
accessToken: string,
channel: string,
text: string,
threadTs?: string | null
): Promise<{ ok: boolean; ts?: string; channel?: string; message?: any; error?: string }> {
const response = await fetch('https://slack.com/api/chat.postMessage', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${accessToken}`,
},
body: JSON.stringify({
channel,
text,
...(threadTs && { thread_ts: threadTs }),
}),
})
return response.json()
}
/**
* Creates a default message object when the API doesn't return one
*/
export function createDefaultMessageObject(
ts: string,
text: string,
channel: string
): Record<string, any> {
return {
type: 'message',
ts,
text,
channel,
}
}
/**
* Formats the success response for a sent message
*/
export function formatMessageSuccessResponse(
data: any,
text: string
): {
message: any
ts: string
channel: string
} {
const messageObj = data.message || createDefaultMessageObject(data.ts, text, data.channel)
return {
message: messageObj,
ts: data.ts,
channel: data.channel,
}
}
/**
* Uploads files to Slack and returns the uploaded file IDs
*/
export async function uploadFilesToSlack(
files: any[],
accessToken: string,
requestId: string,
logger: Logger
): Promise<string[]> {
const userFiles = processFilesToUserFiles(files, requestId, logger)
const uploadedFileIds: string[] = []
for (const userFile of userFiles) {
logger.info(`[${requestId}] Uploading file: ${userFile.name}`)
const buffer = await downloadFileFromStorage(userFile, requestId, logger)
const getUrlResponse = await fetch('https://slack.com/api/files.getUploadURLExternal', {
method: 'POST',
headers: {
'Content-Type': 'application/x-www-form-urlencoded',
Authorization: `Bearer ${accessToken}`,
},
body: new URLSearchParams({
filename: userFile.name,
length: buffer.length.toString(),
}),
})
const urlData = await getUrlResponse.json()
if (!urlData.ok) {
logger.error(`[${requestId}] Failed to get upload URL:`, urlData.error)
continue
}
logger.info(`[${requestId}] Got upload URL for ${userFile.name}, file_id: ${urlData.file_id}`)
const uploadResponse = await fetch(urlData.upload_url, {
method: 'POST',
body: new Uint8Array(buffer),
})
if (!uploadResponse.ok) {
logger.error(`[${requestId}] Failed to upload file data: ${uploadResponse.status}`)
continue
}
logger.info(`[${requestId}] File data uploaded successfully`)
uploadedFileIds.push(urlData.file_id)
}
return uploadedFileIds
}
/**
* Completes the file upload process by associating files with a channel
*/
export async function completeSlackFileUpload(
uploadedFileIds: string[],
channel: string,
text: string,
accessToken: string
): Promise<{ ok: boolean; files?: any[]; error?: string }> {
const response = await fetch('https://slack.com/api/files.completeUploadExternal', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${accessToken}`,
},
body: JSON.stringify({
files: uploadedFileIds.map((id) => ({ id })),
channel_id: channel,
initial_comment: text,
}),
})
return response.json()
}
/**
* Creates a message object for file uploads
*/
export function createFileMessageObject(
text: string,
channel: string,
files: any[]
): Record<string, any> {
const fileTs = files?.[0]?.created?.toString() || (Date.now() / 1000).toString()
return {
type: 'message',
ts: fileTs,
text,
channel,
files: files?.map((file: any) => ({
id: file?.id,
name: file?.name,
mimetype: file?.mimetype,
size: file?.size,
url_private: file?.url_private,
permalink: file?.permalink,
})),
}
}
/**
* Opens a DM channel with a user and returns the channel ID
*/
export async function openDMChannel(
accessToken: string,
userId: string,
requestId: string,
logger: Logger
): Promise<string> {
const response = await fetch('https://slack.com/api/conversations.open', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${accessToken}`,
},
body: JSON.stringify({
users: userId,
}),
})
const data = await response.json()
if (!data.ok) {
logger.error(`[${requestId}] Failed to open DM channel:`, data.error)
throw new Error(data.error || 'Failed to open DM channel with user')
}
logger.info(`[${requestId}] Opened DM channel: ${data.channel.id}`)
return data.channel.id
}
export interface SlackMessageParams {
accessToken: string
channel?: string
userId?: string
text: string
threadTs?: string | null
files?: any[] | null
}
/**
* Sends a Slack message with optional file attachments
* Supports both channel messages and direct messages via userId
*/
export async function sendSlackMessage(
params: SlackMessageParams,
requestId: string,
logger: Logger
): Promise<{
success: boolean
output?: { message: any; ts: string; channel: string; fileCount?: number }
error?: string
}> {
const { accessToken, text, threadTs, files } = params
let { channel } = params
if (!channel && params.userId) {
logger.info(`[${requestId}] Opening DM channel for user: ${params.userId}`)
channel = await openDMChannel(accessToken, params.userId, requestId, logger)
}
if (!channel) {
return { success: false, error: 'Either channel or userId is required' }
}
// No files - simple message
if (!files || files.length === 0) {
logger.info(`[${requestId}] No files, using chat.postMessage`)
const data = await postSlackMessage(accessToken, channel, text, threadTs)
if (!data.ok) {
logger.error(`[${requestId}] Slack API error:`, data.error)
return { success: false, error: data.error || 'Failed to send message' }
}
logger.info(`[${requestId}] Message sent successfully`)
return { success: true, output: formatMessageSuccessResponse(data, text) }
}
// Process files
logger.info(`[${requestId}] Processing ${files.length} file(s)`)
const uploadedFileIds = await uploadFilesToSlack(files, accessToken, requestId, logger)
// No valid files uploaded - send text-only
if (uploadedFileIds.length === 0) {
logger.warn(`[${requestId}] No valid files to upload, sending text-only message`)
const data = await postSlackMessage(accessToken, channel, text, threadTs)
if (!data.ok) {
return { success: false, error: data.error || 'Failed to send message' }
}
return { success: true, output: formatMessageSuccessResponse(data, text) }
}
// Complete file upload
const completeData = await completeSlackFileUpload(uploadedFileIds, channel, text, accessToken)
if (!completeData.ok) {
logger.error(`[${requestId}] Failed to complete upload:`, completeData.error)
return { success: false, error: completeData.error || 'Failed to complete file upload' }
}
logger.info(`[${requestId}] Files uploaded and shared successfully`)
const fileMessage = createFileMessageObject(text, channel, completeData.files || [])
return {
success: true,
output: {
message: fileMessage,
ts: fileMessage.ts,
channel,
fileCount: uploadedFileIds.length,
},
}
}

View File

@@ -3,11 +3,13 @@ import { userStats, workflow } from '@sim/db/schema'
import { eq, sql } from 'drizzle-orm'
import { type NextRequest, NextResponse } from 'next/server'
import OpenAI, { AzureOpenAI } from 'openai'
import { getSession } from '@/lib/auth'
import { checkAndBillOverageThreshold } from '@/lib/billing/threshold-billing'
import { env } from '@/lib/core/config/env'
import { getCostMultiplier, isBillingEnabled } from '@/lib/core/config/feature-flags'
import { generateRequestId } from '@/lib/core/utils/request'
import { createLogger } from '@/lib/logs/console/logger'
import { verifyWorkspaceMembership } from '@/app/api/workflows/utils'
import { getModelPricing } from '@/providers/utils'
export const dynamic = 'force-dynamic'
@@ -135,7 +137,6 @@ async function updateUserStatsForWand(
costAdded: costToStore,
})
// Check if user has hit overage threshold and bill incrementally
await checkAndBillOverageThreshold(userId)
} catch (error) {
logger.error(`[${requestId}] Failed to update user stats for wand usage`, error)
@@ -146,6 +147,12 @@ export async function POST(req: NextRequest) {
const requestId = generateRequestId()
logger.info(`[${requestId}] Received wand generation request`)
const session = await getSession()
if (!session?.user?.id) {
logger.warn(`[${requestId}] Unauthorized wand generation attempt`)
return NextResponse.json({ success: false, error: 'Unauthorized' }, { status: 401 })
}
if (!client) {
logger.error(`[${requestId}] AI client not initialized. Missing API key.`)
return NextResponse.json(
@@ -167,6 +174,35 @@ export async function POST(req: NextRequest) {
)
}
if (workflowId) {
const [workflowRecord] = await db
.select({ workspaceId: workflow.workspaceId, userId: workflow.userId })
.from(workflow)
.where(eq(workflow.id, workflowId))
.limit(1)
if (!workflowRecord) {
logger.warn(`[${requestId}] Workflow not found: ${workflowId}`)
return NextResponse.json({ success: false, error: 'Workflow not found' }, { status: 404 })
}
if (workflowRecord.workspaceId) {
const permission = await verifyWorkspaceMembership(
session.user.id,
workflowRecord.workspaceId
)
if (!permission || (permission !== 'admin' && permission !== 'write')) {
logger.warn(
`[${requestId}] User ${session.user.id} does not have write access to workspace for workflow ${workflowId}`
)
return NextResponse.json({ success: false, error: 'Unauthorized' }, { status: 403 })
}
} else if (workflowRecord.userId !== session.user.id) {
logger.warn(`[${requestId}] User ${session.user.id} does not own workflow ${workflowId}`)
return NextResponse.json({ success: false, error: 'Unauthorized' }, { status: 403 })
}
}
const finalSystemPrompt =
systemPrompt ||
'You are a helpful AI assistant. Generate content exactly as requested by the user.'

View File

@@ -14,7 +14,7 @@ export default function WorkspaceLayout({ children }: { children: React.ReactNod
<ProviderModelsLoader />
<GlobalCommandsProvider>
<Tooltip.Provider delayDuration={600} skipDelayDuration={0}>
<div className='flex h-screen w-full'>
<div className='flex h-screen w-full bg-[var(--bg)]'>
<WorkspacePermissionsProvider>
<div className='shrink-0' suppressHydrationWarning>
<Sidebar />

View File

@@ -398,7 +398,7 @@ function InputOutputSection({
}, [data])
return (
<div className='flex flex-col gap-[8px]'>
<div className='flex min-w-0 flex-col gap-[8px] overflow-hidden'>
<div
className='group flex cursor-pointer items-center justify-between'
onClick={() => onToggle(sectionKey)}
@@ -436,7 +436,7 @@ function InputOutputSection({
<Code.Viewer
code={jsonString}
language='json'
className='!bg-[var(--surface-3)] min-h-0 overflow-hidden rounded-[6px] border-0'
className='!bg-[var(--surface-3)] min-h-0 max-w-full rounded-[6px] border-0 [word-break:break-all]'
wrapText
/>
)}
@@ -477,7 +477,7 @@ function NestedBlockItem({
const isChildrenExpanded = expandedChildren.has(spanId)
return (
<div className='flex flex-col gap-[8px]'>
<div className='flex min-w-0 flex-col gap-[8px] overflow-hidden'>
<ExpandableRowHeader
name={span.name}
duration={span.duration || 0}
@@ -502,7 +502,7 @@ function NestedBlockItem({
{/* Nested children */}
{hasChildren && isChildrenExpanded && (
<div className='mt-[2px] flex flex-col gap-[10px] border-[var(--border)] border-l-2 pl-[10px]'>
<div className='mt-[2px] flex min-w-0 flex-col gap-[10px] overflow-hidden border-[var(--border)] border-l-2 pl-[10px]'>
{span.children!.map((child, childIndex) => (
<NestedBlockItem
key={child.id || `${spanId}-child-${childIndex}`}
@@ -617,7 +617,7 @@ function TraceSpanItem({
return (
<>
<div className='flex flex-col gap-[8px] rounded-[6px] bg-[var(--surface-1)] px-[10px] py-[8px]'>
<div className='flex min-w-0 flex-col gap-[8px] overflow-hidden rounded-[6px] bg-[var(--surface-1)] px-[10px] py-[8px]'>
<ExpandableRowHeader
name={span.name}
duration={duration}
@@ -642,7 +642,7 @@ function TraceSpanItem({
{/* For workflow blocks, keep children nested within the card (not as separate cards) */}
{!isFirstSpan && isWorkflowBlock && inlineChildren.length > 0 && isCardExpanded && (
<div className='mt-[2px] flex flex-col gap-[10px] border-[var(--border)] border-l-2 pl-[10px]'>
<div className='mt-[2px] flex min-w-0 flex-col gap-[10px] overflow-hidden border-[var(--border)] border-l-2 pl-[10px]'>
{inlineChildren.map((childSpan, index) => (
<NestedBlockItem
key={childSpan.id || `${spanId}-nested-${index}`}
@@ -662,7 +662,7 @@ function TraceSpanItem({
{/* For non-workflow blocks, render inline children/tool calls */}
{!isFirstSpan && !isWorkflowBlock && isCardExpanded && (
<div className='mt-[2px] flex flex-col gap-[10px] border-[var(--border)] border-l-2 pl-[10px]'>
<div className='mt-[2px] flex min-w-0 flex-col gap-[10px] overflow-hidden border-[var(--border)] border-l-2 pl-[10px]'>
{[...toolCallSpans, ...inlineChildren].map((childSpan, index) => {
const childId = childSpan.id || `${spanId}-inline-${index}`
const childIsError = childSpan.status === 'error'
@@ -677,7 +677,10 @@ function TraceSpanItem({
)
return (
<div key={`inline-${childId}`} className='flex flex-col gap-[8px]'>
<div
key={`inline-${childId}`}
className='flex min-w-0 flex-col gap-[8px] overflow-hidden'
>
<ExpandableRowHeader
name={childSpan.name}
duration={childSpan.duration || 0}
@@ -727,7 +730,7 @@ function TraceSpanItem({
{/* Nested children */}
{showChildrenInProgressBar && hasNestedChildren && isNestedExpanded && (
<div className='mt-[2px] flex flex-col gap-[10px] border-[var(--border)] border-l-2 pl-[10px]'>
<div className='mt-[2px] flex min-w-0 flex-col gap-[10px] overflow-hidden border-[var(--border)] border-l-2 pl-[10px]'>
{childSpan.children!.map((nestedChild, nestedIndex) => (
<NestedBlockItem
key={nestedChild.id || `${childId}-nested-${nestedIndex}`}
@@ -809,9 +812,9 @@ export function TraceSpans({ traceSpans, totalDuration = 0 }: TraceSpansProps) {
}
return (
<div className='flex w-full flex-col gap-[6px] rounded-[6px] bg-[var(--surface-2)] px-[10px] py-[8px]'>
<div className='flex w-full min-w-0 flex-col gap-[6px] overflow-hidden rounded-[6px] bg-[var(--surface-2)] px-[10px] py-[8px]'>
<span className='font-medium text-[12px] text-[var(--text-tertiary)]'>Trace Span</span>
<div className='flex flex-col gap-[8px]'>
<div className='flex min-w-0 flex-col gap-[8px] overflow-hidden'>
{normalizedSpans.map((span, index) => (
<TraceSpanItem
key={span.id || index}

View File

@@ -179,6 +179,9 @@ const SCOPE_DESCRIPTIONS: Record<string, string> = {
'groups:history': 'Read private messages',
'chat:write': 'Send messages',
'chat:write.public': 'Post to public channels',
'im:write': 'Send direct messages',
'im:history': 'Read direct message history',
'im:read': 'View direct message channels',
'users:read': 'View workspace users',
'files:write': 'Upload files',
'files:read': 'Download and read files',

View File

@@ -1,4 +1,3 @@
export { ChannelSelectorInput } from './channel-selector/channel-selector-input'
export { CheckboxList } from './checkbox-list/checkbox-list'
export { Code } from './code/code'
export { ComboBox } from './combobox/combobox'
@@ -24,6 +23,7 @@ export { ProjectSelectorInput } from './project-selector/project-selector-input'
export { ResponseFormat } from './response/response-format'
export { ScheduleSave } from './schedule-save/schedule-save'
export { ShortInput } from './short-input/short-input'
export { SlackSelectorInput } from './slack-selector/slack-selector-input'
export { SliderInput } from './slider-input/slider-input'
export { InputFormat } from './starter/input-format'
export { SubBlockInputController } from './sub-block-input-controller'

View File

@@ -9,30 +9,51 @@ import { useDependsOnGate } from '@/app/workspace/[workspaceId]/w/[workflowId]/c
import { useForeignCredential } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-foreign-credential'
import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value'
import type { SubBlockConfig } from '@/blocks/types'
import type { SelectorContext } from '@/hooks/selectors/types'
import type { SelectorContext, SelectorKey } from '@/hooks/selectors/types'
interface ChannelSelectorInputProps {
type SlackSelectorType = 'channel-selector' | 'user-selector'
const SELECTOR_CONFIG: Record<
SlackSelectorType,
{ selectorKey: SelectorKey; placeholder: string; label: string }
> = {
'channel-selector': {
selectorKey: 'slack.channels',
placeholder: 'Select Slack channel',
label: 'Channel',
},
'user-selector': {
selectorKey: 'slack.users',
placeholder: 'Select Slack user',
label: 'User',
},
}
interface SlackSelectorInputProps {
blockId: string
subBlock: SubBlockConfig
disabled?: boolean
onChannelSelect?: (channelId: string) => void
onSelect?: (value: string) => void
isPreview?: boolean
previewValue?: any | null
previewContextValues?: Record<string, any>
}
export function ChannelSelectorInput({
export function SlackSelectorInput({
blockId,
subBlock,
disabled = false,
onChannelSelect,
onSelect,
isPreview = false,
previewValue,
previewContextValues,
}: ChannelSelectorInputProps) {
}: SlackSelectorInputProps) {
const selectorType = subBlock.type as SlackSelectorType
const config = SELECTOR_CONFIG[selectorType]
const params = useParams()
const workflowIdFromUrl = (params?.workflowId as string) || ''
const [storeValue, setStoreValue] = useSubBlockValue(blockId, subBlock.id)
const [storeValue] = useSubBlockValue(blockId, subBlock.id)
const [authMethod] = useSubBlockValue(blockId, 'authMethod')
const [botToken] = useSubBlockValue(blockId, 'botToken')
const [connectedCredential] = useSubBlockValue(blockId, 'credential')
@@ -40,37 +61,32 @@ export function ChannelSelectorInput({
const effectiveAuthMethod = previewContextValues?.authMethod ?? authMethod
const effectiveBotToken = previewContextValues?.botToken ?? botToken
const effectiveCredential = previewContextValues?.credential ?? connectedCredential
const [_channelInfo, setChannelInfo] = useState<string | null>(null)
const [_selectedValue, setSelectedValue] = useState<string | null>(null)
// Use serviceId to identify the service and derive providerId for credential lookup
const serviceId = subBlock.serviceId || ''
const effectiveProviderId = useMemo(() => getProviderIdFromServiceId(serviceId), [serviceId])
const isSlack = serviceId === 'slack'
// Central dependsOn gating
const { finalDisabled, dependsOn } = useDependsOnGate(blockId, subBlock, {
disabled,
isPreview,
previewContextValues,
})
// Choose credential strictly based on auth method - use effective values
const credential: string =
(effectiveAuthMethod as string) === 'bot_token'
? (effectiveBotToken as string) || ''
: (effectiveCredential as string) || ''
// Determine if connected OAuth credential is foreign (not applicable for bot tokens)
const { isForeignCredential } = useForeignCredential(
effectiveProviderId,
(effectiveAuthMethod as string) === 'bot_token' ? '' : (effectiveCredential as string) || ''
)
// Get the current value from the store or prop value if in preview mode (same pattern as file-selector)
useEffect(() => {
const val = isPreview && previewValue !== undefined ? previewValue : storeValue
if (typeof val === 'string') {
setChannelInfo(val)
setSelectedValue(val)
}
}, [isPreview, previewValue, storeValue])
@@ -91,11 +107,14 @@ export function ChannelSelectorInput({
<Tooltip.Root>
<Tooltip.Trigger asChild>
<div className='w-full rounded border p-4 text-center text-muted-foreground text-sm'>
Channel selector not supported for service: {serviceId || 'unknown'}
{config.label} selector not supported for service: {serviceId || 'unknown'}
</div>
</Tooltip.Trigger>
<Tooltip.Content side='top'>
<p>This channel selector is not yet implemented for {serviceId || 'unknown'}</p>
<p>
This {config.label.toLowerCase()} selector is not yet implemented for{' '}
{serviceId || 'unknown'}
</p>
</Tooltip.Content>
</Tooltip.Root>
)
@@ -108,16 +127,16 @@ export function ChannelSelectorInput({
<SelectorCombobox
blockId={blockId}
subBlock={subBlock}
selectorKey='slack.channels'
selectorKey={config.selectorKey}
selectorContext={context}
disabled={finalDisabled || shouldForceDisable || isForeignCredential}
isPreview={isPreview}
previewValue={previewValue ?? null}
placeholder={subBlock.placeholder || 'Select Slack channel'}
placeholder={subBlock.placeholder || config.placeholder}
onOptionChange={(value) => {
setChannelInfo(value)
setSelectedValue(value)
if (!isPreview) {
onChannelSelect?.(value)
onSelect?.(value)
}
}}
/>

View File

@@ -13,6 +13,10 @@ import {
} from '@/components/emcn'
import { Button } from '@/components/ui/button'
import { cn } from '@/lib/core/utils/cn'
import {
createEnvVarPattern,
createWorkflowVariablePattern,
} from '@/executor/utils/reference-validation'
interface CodeEditorProps {
value: string
@@ -132,15 +136,28 @@ export function CodeEditor({
return highlight(code, languages[language], language)
}
const placeholders: Array<{ placeholder: string; original: string; type: 'env' | 'param' }> = []
const escapeHtml = (text: string) =>
text.replace(/&/g, '&amp;').replace(/</g, '&lt;').replace(/>/g, '&gt;')
const placeholders: Array<{
placeholder: string
original: string
type: 'env' | 'param' | 'variable'
}> = []
let processedCode = code
processedCode = processedCode.replace(/\{\{([^}]+)\}\}/g, (match) => {
processedCode = processedCode.replace(createEnvVarPattern(), (match) => {
const placeholder = `__ENV_VAR_${placeholders.length}__`
placeholders.push({ placeholder, original: match, type: 'env' })
return placeholder
})
processedCode = processedCode.replace(createWorkflowVariablePattern(), (match) => {
const placeholder = `__VARIABLE_${placeholders.length}__`
placeholders.push({ placeholder, original: match, type: 'variable' })
return placeholder
})
if (schemaParameters.length > 0) {
schemaParameters.forEach((param) => {
const escapedName = param.name.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')
@@ -156,9 +173,10 @@ export function CodeEditor({
let highlighted = highlight(processedCode, languages[language], language)
placeholders.forEach(({ placeholder, original, type }) => {
const escapedOriginal = type === 'variable' ? escapeHtml(original) : original
const replacement =
type === 'env'
? `<span style="color: #34B5FF;">${original}</span>`
type === 'env' || type === 'variable'
? `<span style="color: #34B5FF;">${escapedOriginal}</span>`
: `<span style="color: #34B5FF; font-weight: 500;">${original}</span>`
highlighted = highlighted.replace(placeholder, replacement)

View File

@@ -24,7 +24,6 @@ import {
type OAuthService,
} from '@/lib/oauth/oauth'
import {
ChannelSelectorInput,
CheckboxList,
Code,
ComboBox,
@@ -33,6 +32,7 @@ import {
LongInput,
ProjectSelectorInput,
ShortInput,
SlackSelectorInput,
SliderInput,
Table,
TimeInput,
@@ -520,7 +520,7 @@ function ChannelSelectorSyncWrapper({
}) {
return (
<GenericSyncWrapper blockId={blockId} paramId={paramId} value={value} onChange={onChange}>
<ChannelSelectorInput
<SlackSelectorInput
blockId={blockId}
subBlock={{
id: paramId,
@@ -530,7 +530,7 @@ function ChannelSelectorSyncWrapper({
placeholder: uiComponent.placeholder,
dependsOn: uiComponent.dependsOn,
}}
onChannelSelect={onChange}
onSelect={onChange}
disabled={disabled}
previewContextValues={previewContextValues}
/>

View File

@@ -5,7 +5,6 @@ import { Button } from '@/components/ui/button'
import { cn } from '@/lib/core/utils/cn'
import type { FieldDiffStatus } from '@/lib/workflows/diff/types'
import {
ChannelSelectorInput,
CheckboxList,
Code,
ComboBox,
@@ -32,6 +31,7 @@ import {
ResponseFormat,
ScheduleSave,
ShortInput,
SlackSelectorInput,
SliderInput,
Switch,
Table,
@@ -157,6 +157,7 @@ const renderLabel = (
isWandEnabled: boolean
isPreview: boolean
isStreaming: boolean
disabled: boolean
onSearchClick: () => void
onSearchBlur: () => void
onSearchChange: (value: string) => void
@@ -175,6 +176,7 @@ const renderLabel = (
isWandEnabled,
isPreview,
isStreaming,
disabled,
onSearchClick,
onSearchBlur,
onSearchChange,
@@ -208,7 +210,7 @@ const renderLabel = (
</div>
{/* Wand inline prompt */}
{isWandEnabled && !isPreview && (
{isWandEnabled && !isPreview && !disabled && (
<div className='flex min-w-0 flex-1 items-center justify-end pr-[4px]'>
{!isSearchActive ? (
<Button
@@ -730,8 +732,9 @@ function SubBlockComponent({
)
case 'channel-selector':
case 'user-selector':
return (
<ChannelSelectorInput
<SlackSelectorInput
blockId={blockId}
subBlock={config}
disabled={isDisabled}
@@ -824,6 +827,7 @@ function SubBlockComponent({
isWandEnabled,
isPreview,
isStreaming: wandControlRef.current?.isWandStreaming ?? false,
disabled: isDisabled,
onSearchClick: handleSearchClick,
onSearchBlur: handleSearchBlur,
onSearchChange: handleSearchChange,

View File

@@ -1,5 +1,7 @@
import { memo, useMemo } from 'react'
import { X } from 'lucide-react'
import { BaseEdge, EdgeLabelRenderer, type EdgeProps, getSmoothStepPath } from 'reactflow'
import { useShallow } from 'zustand/react/shallow'
import type { EdgeDiffStatus } from '@/lib/workflows/diff/types'
import { useExecutionStore } from '@/stores/execution/store'
import { useWorkflowDiffStore } from '@/stores/workflow-diff'
@@ -9,7 +11,7 @@ interface WorkflowEdgeProps extends EdgeProps {
targetHandle?: string | null
}
export const WorkflowEdge = ({
const WorkflowEdgeComponent = ({
id,
sourceX,
sourceY,
@@ -41,65 +43,64 @@ export const WorkflowEdge = ({
const isInsideLoop = data?.isInsideLoop ?? false
const parentLoopId = data?.parentLoopId
const diffAnalysis = useWorkflowDiffStore((state) => state.diffAnalysis)
const isShowingDiff = useWorkflowDiffStore((state) => state.isShowingDiff)
const isDiffReady = useWorkflowDiffStore((state) => state.isDiffReady)
// Combined store subscription to reduce subscription overhead
const { diffAnalysis, isShowingDiff, isDiffReady } = useWorkflowDiffStore(
useShallow((state) => ({
diffAnalysis: state.diffAnalysis,
isShowingDiff: state.isShowingDiff,
isDiffReady: state.isDiffReady,
}))
)
const lastRunEdges = useExecutionStore((state) => state.lastRunEdges)
const generateEdgeIdentity = (
sourceId: string,
targetId: string,
sourceHandle?: string | null,
targetHandle?: string | null
): string => {
const actualSourceHandle = sourceHandle || 'source'
const actualTargetHandle = targetHandle || 'target'
return `${sourceId}-${actualSourceHandle}-${targetId}-${actualTargetHandle}`
}
const edgeIdentifier = generateEdgeIdentity(source, target, sourceHandle, targetHandle)
let edgeDiffStatus: EdgeDiffStatus = null
if (data?.isDeleted) {
edgeDiffStatus = 'deleted'
} else if (diffAnalysis?.edge_diff && edgeIdentifier && isDiffReady) {
if (isShowingDiff) {
if (diffAnalysis.edge_diff.new_edges.includes(edgeIdentifier)) {
edgeDiffStatus = 'new'
} else if (diffAnalysis.edge_diff.unchanged_edges.includes(edgeIdentifier)) {
edgeDiffStatus = 'unchanged'
}
} else {
if (diffAnalysis.edge_diff.deleted_edges.includes(edgeIdentifier)) {
edgeDiffStatus = 'deleted'
}
}
}
const dataSourceHandle = (data as { sourceHandle?: string } | undefined)?.sourceHandle
const isErrorEdge = (sourceHandle ?? dataSourceHandle) === 'error'
// Check if this edge was traversed during last execution
const edgeRunStatus = lastRunEdges.get(id)
const getEdgeColor = () => {
if (edgeDiffStatus === 'deleted') return 'var(--text-error)'
if (isErrorEdge) return 'var(--text-error)'
if (edgeDiffStatus === 'new') return 'var(--brand-tertiary)'
// Show run path status if edge was traversed
if (edgeRunStatus === 'success') return 'var(--border-success)'
if (edgeRunStatus === 'error') return 'var(--text-error)'
return 'var(--surface-12)'
}
// Memoize diff status calculation to avoid recomputing on every render
const edgeDiffStatus = useMemo((): EdgeDiffStatus => {
if (data?.isDeleted) return 'deleted'
if (!diffAnalysis?.edge_diff || !isDiffReady) return null
const edgeStyle = {
...(style ?? {}),
strokeWidth: edgeDiffStatus ? 3 : isSelected ? 2.5 : 2,
stroke: getEdgeColor(),
strokeDasharray: edgeDiffStatus === 'deleted' ? '10,5' : undefined,
opacity: edgeDiffStatus === 'deleted' ? 0.7 : isSelected ? 0.5 : 1,
}
const actualSourceHandle = sourceHandle || 'source'
const actualTargetHandle = targetHandle || 'target'
const edgeIdentifier = `${source}-${actualSourceHandle}-${target}-${actualTargetHandle}`
if (isShowingDiff) {
if (diffAnalysis.edge_diff.new_edges.includes(edgeIdentifier)) return 'new'
if (diffAnalysis.edge_diff.unchanged_edges.includes(edgeIdentifier)) return 'unchanged'
} else {
if (diffAnalysis.edge_diff.deleted_edges.includes(edgeIdentifier)) return 'deleted'
}
return null
}, [
data?.isDeleted,
diffAnalysis,
isDiffReady,
isShowingDiff,
source,
target,
sourceHandle,
targetHandle,
])
// Memoize edge style to prevent object recreation
const edgeStyle = useMemo(() => {
let color = 'var(--surface-12)'
if (edgeDiffStatus === 'deleted') color = 'var(--text-error)'
else if (isErrorEdge) color = 'var(--text-error)'
else if (edgeDiffStatus === 'new') color = 'var(--brand-tertiary)'
else if (edgeRunStatus === 'success') color = 'var(--border-success)'
else if (edgeRunStatus === 'error') color = 'var(--text-error)'
return {
...(style ?? {}),
strokeWidth: edgeDiffStatus ? 3 : isSelected ? 2.5 : 2,
stroke: color,
strokeDasharray: edgeDiffStatus === 'deleted' ? '10,5' : undefined,
opacity: edgeDiffStatus === 'deleted' ? 0.7 : isSelected ? 0.5 : 1,
}
}, [style, edgeDiffStatus, isSelected, isErrorEdge, edgeRunStatus])
return (
<>
@@ -148,3 +149,5 @@ export const WorkflowEdge = ({
</>
)
}
export const WorkflowEdge = memo(WorkflowEdgeComponent)

View File

@@ -43,26 +43,29 @@ export interface CurrentWorkflow {
*/
export function useCurrentWorkflow(): CurrentWorkflow {
// Get normal workflow state - optimized with shallow comparison
// This prevents re-renders when only subblock values change (not block structure)
const normalWorkflow = useWorkflowStore(
useShallow((state) => {
const workflow = state.getWorkflowState()
return {
blocks: workflow.blocks,
edges: workflow.edges,
loops: workflow.loops,
parallels: workflow.parallels,
lastSaved: workflow.lastSaved,
isDeployed: workflow.isDeployed,
deployedAt: workflow.deployedAt,
deploymentStatuses: workflow.deploymentStatuses,
needsRedeployment: workflow.needsRedeployment,
}
})
useShallow((state) => ({
blocks: state.blocks,
edges: state.edges,
loops: state.loops,
parallels: state.parallels,
lastSaved: state.lastSaved,
isDeployed: state.isDeployed,
deployedAt: state.deployedAt,
deploymentStatuses: state.deploymentStatuses,
needsRedeployment: state.needsRedeployment,
}))
)
// Get diff state - now including isDiffReady
const { isShowingDiff, isDiffReady, hasActiveDiff, baselineWorkflow } = useWorkflowDiffStore()
// Get diff state - optimized with shallow comparison
const { isShowingDiff, isDiffReady, hasActiveDiff, baselineWorkflow } = useWorkflowDiffStore(
useShallow((state) => ({
isShowingDiff: state.isShowingDiff,
isDiffReady: state.isDiffReady,
hasActiveDiff: state.hasActiveDiff,
baselineWorkflow: state.baselineWorkflow,
}))
)
// Create the abstracted interface - optimized to prevent unnecessary re-renders
const currentWorkflow = useMemo((): CurrentWorkflow => {

View File

@@ -2,7 +2,7 @@ import { ErrorBoundary } from '@/app/workspace/[workspaceId]/w/[workflowId]/comp
export default function WorkflowLayout({ children }: { children: React.ReactNode }) {
return (
<main className='flex h-full flex-1 flex-col overflow-hidden bg-muted/40'>
<main className='flex h-full flex-1 flex-col overflow-hidden bg-[var(--bg)]'>
<ErrorBoundary>{children}</ErrorBoundary>
</main>
)

View File

@@ -38,11 +38,10 @@ export function TeamManagement() {
const { data: organizationsData } = useOrganizations()
const activeOrganization = organizationsData?.activeOrganization
const billingData = organizationsData?.billingData?.data
const hasTeamPlan = billingData?.isTeam ?? false
const hasEnterprisePlan = billingData?.isEnterprise ?? false
const { data: userSubscriptionData } = useSubscriptionData()
const hasTeamPlan = userSubscriptionData?.data?.isTeam ?? false
const hasEnterprisePlan = userSubscriptionData?.data?.isEnterprise ?? false
const {
data: organization,

View File

@@ -316,16 +316,14 @@ export function SettingsModal({ open, onOpenChange }: SettingsModalProps) {
queryKey: organizationKeys.lists(),
queryFn: async () => {
const { client } = await import('@/lib/auth/auth-client')
const [orgsResponse, activeOrgResponse, billingResponse] = await Promise.all([
const [orgsResponse, activeOrgResponse] = await Promise.all([
client.organization.list(),
client.organization.getFullOrganization(),
fetch('/api/billing?context=user').then((r) => r.json()),
])
return {
organizations: orgsResponse.data || [],
activeOrganization: activeOrgResponse.data,
billingData: billingResponse,
}
},
staleTime: 30 * 1000,

View File

@@ -144,6 +144,12 @@ export function WorkspaceHeader({
const contextMenuRef = useRef<HTMLDivElement | null>(null)
const capturedWorkspaceRef = useRef<{ id: string; name: string } | null>(null)
// Client-only rendering for Popover to prevent Radix ID hydration mismatch
const [isMounted, setIsMounted] = useState(false)
useEffect(() => {
setIsMounted(true)
}, [])
/**
* Focus the inline list rename input when it becomes active
*/
@@ -269,104 +275,121 @@ export function WorkspaceHeader({
<Badge className='cursor-pointer' onClick={() => setIsInviteModalOpen(true)}>
Invite
</Badge>
{/* Workspace Switcher Popover */}
<Popover
open={isWorkspaceMenuOpen}
onOpenChange={(open) => {
// Don't close if context menu is opening
if (!open && isContextMenuOpen) {
return
}
setIsWorkspaceMenuOpen(open)
}}
>
<PopoverTrigger asChild>
<Button
variant='ghost-secondary'
type='button'
aria-label='Switch workspace'
className='group !p-[3px] -m-[3px]'
>
<ChevronDown
className={`h-[8px] w-[12px] transition-transform duration-100 ${
isWorkspaceMenuOpen ? 'rotate-180' : ''
}`}
/>
</Button>
</PopoverTrigger>
<PopoverContent
align='end'
side='bottom'
sideOffset={8}
style={{ maxWidth: '160px', minWidth: '160px' }}
onOpenAutoFocus={(e) => e.preventDefault()}
{/* Workspace Switcher Popover - only render after mount to avoid Radix ID hydration mismatch */}
{isMounted ? (
<Popover
open={isWorkspaceMenuOpen}
onOpenChange={(open) => {
// Don't close if context menu is opening
if (!open && isContextMenuOpen) {
return
}
setIsWorkspaceMenuOpen(open)
}}
>
{isWorkspacesLoading ? (
<PopoverItem disabled>
<span>Loading workspaces...</span>
</PopoverItem>
) : (
<>
<div className='relative flex items-center justify-between'>
<PopoverSection>Workspaces</PopoverSection>
<div className='flex items-center gap-[6px]'>
<Tooltip.Root>
<Tooltip.Trigger asChild>
<Button
variant='ghost'
type='button'
aria-label='Import workspace'
className='!p-[3px]'
onClick={(e) => {
e.stopPropagation()
onImportWorkspace()
}}
disabled={isImportingWorkspace}
>
<ArrowDown className='h-[14px] w-[14px]' />
</Button>
</Tooltip.Trigger>
<Tooltip.Content className='py-[2.5px]'>
<p>
{isImportingWorkspace ? 'Importing workspace...' : 'Import workspace'}
</p>
</Tooltip.Content>
</Tooltip.Root>
<Tooltip.Root>
<Tooltip.Trigger asChild>
<Button
variant='ghost'
type='button'
aria-label='Create workspace'
className='!p-[3px]'
onClick={async (e) => {
e.stopPropagation()
await onCreateWorkspace()
setIsWorkspaceMenuOpen(false)
}}
disabled={isCreatingWorkspace}
>
<Plus className='h-[14px] w-[14px]' />
</Button>
</Tooltip.Trigger>
<Tooltip.Content className='py-[2.5px]'>
<p>{isCreatingWorkspace ? 'Creating workspace...' : 'Create workspace'}</p>
</Tooltip.Content>
</Tooltip.Root>
<PopoverTrigger asChild>
<Button
variant='ghost-secondary'
type='button'
aria-label='Switch workspace'
className='group !p-[3px] -m-[3px]'
>
<ChevronDown
className={`h-[8px] w-[12px] transition-transform duration-100 ${
isWorkspaceMenuOpen ? 'rotate-180' : ''
}`}
/>
</Button>
</PopoverTrigger>
<PopoverContent
align='end'
side='bottom'
sideOffset={8}
style={{ maxWidth: '160px', minWidth: '160px' }}
onOpenAutoFocus={(e) => e.preventDefault()}
>
{isWorkspacesLoading ? (
<PopoverItem disabled>
<span>Loading workspaces...</span>
</PopoverItem>
) : (
<>
<div className='relative flex items-center justify-between'>
<PopoverSection>Workspaces</PopoverSection>
<div className='flex items-center gap-[6px]'>
<Tooltip.Root>
<Tooltip.Trigger asChild>
<Button
variant='ghost'
type='button'
aria-label='Import workspace'
className='!p-[3px]'
onClick={(e) => {
e.stopPropagation()
onImportWorkspace()
}}
disabled={isImportingWorkspace}
>
<ArrowDown className='h-[14px] w-[14px]' />
</Button>
</Tooltip.Trigger>
<Tooltip.Content className='py-[2.5px]'>
<p>
{isImportingWorkspace ? 'Importing workspace...' : 'Import workspace'}
</p>
</Tooltip.Content>
</Tooltip.Root>
<Tooltip.Root>
<Tooltip.Trigger asChild>
<Button
variant='ghost'
type='button'
aria-label='Create workspace'
className='!p-[3px]'
onClick={async (e) => {
e.stopPropagation()
await onCreateWorkspace()
setIsWorkspaceMenuOpen(false)
}}
disabled={isCreatingWorkspace}
>
<Plus className='h-[14px] w-[14px]' />
</Button>
</Tooltip.Trigger>
<Tooltip.Content className='py-[2.5px]'>
<p>
{isCreatingWorkspace ? 'Creating workspace...' : 'Create workspace'}
</p>
</Tooltip.Content>
</Tooltip.Root>
</div>
</div>
</div>
<div className='max-h-[200px] overflow-y-auto'>
{workspaces.map((workspace, index) => (
<div key={workspace.id} className={index > 0 ? 'mt-[2px]' : ''}>
{editingWorkspaceId === workspace.id ? (
<div className='flex h-[25px] items-center gap-[8px] rounded-[6px] bg-[var(--surface-9)] px-[6px]'>
<input
ref={listRenameInputRef}
value={editingName}
onChange={(e) => setEditingName(e.target.value)}
onKeyDown={async (e) => {
if (e.key === 'Enter') {
e.preventDefault()
<div className='max-h-[200px] overflow-y-auto'>
{workspaces.map((workspace, index) => (
<div key={workspace.id} className={index > 0 ? 'mt-[2px]' : ''}>
{editingWorkspaceId === workspace.id ? (
<div className='flex h-[25px] items-center gap-[8px] rounded-[6px] bg-[var(--surface-9)] px-[6px]'>
<input
ref={listRenameInputRef}
value={editingName}
onChange={(e) => setEditingName(e.target.value)}
onKeyDown={async (e) => {
if (e.key === 'Enter') {
e.preventDefault()
setIsListRenaming(true)
try {
await onRenameWorkspace(workspace.id, editingName.trim())
setEditingWorkspaceId(null)
} finally {
setIsListRenaming(false)
}
} else if (e.key === 'Escape') {
e.preventDefault()
setEditingWorkspaceId(null)
}
}}
onBlur={async () => {
if (!editingWorkspaceId) return
setIsListRenaming(true)
try {
await onRenameWorkspace(workspace.id, editingName.trim())
@@ -374,50 +397,47 @@ export function WorkspaceHeader({
} finally {
setIsListRenaming(false)
}
} else if (e.key === 'Escape') {
}}
className='w-full border-0 bg-transparent p-0 font-base text-[12px] text-[var(--text-primary)] outline-none focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0'
maxLength={100}
autoComplete='off'
autoCorrect='off'
autoCapitalize='off'
spellCheck='false'
disabled={isListRenaming}
onClick={(e) => {
e.preventDefault()
setEditingWorkspaceId(null)
}
}}
onBlur={async () => {
if (!editingWorkspaceId) return
setIsListRenaming(true)
try {
await onRenameWorkspace(workspace.id, editingName.trim())
setEditingWorkspaceId(null)
} finally {
setIsListRenaming(false)
}
}}
className='w-full border-0 bg-transparent p-0 font-base text-[12px] text-[var(--text-primary)] outline-none focus:outline-none focus:ring-0 focus-visible:outline-none focus-visible:ring-0 focus-visible:ring-offset-0'
maxLength={100}
autoComplete='off'
autoCorrect='off'
autoCapitalize='off'
spellCheck='false'
disabled={isListRenaming}
onClick={(e) => {
e.preventDefault()
e.stopPropagation()
}}
/>
</div>
) : (
<PopoverItem
active={workspace.id === workspaceId}
onClick={() => onWorkspaceSwitch(workspace)}
onContextMenu={(e) => handleContextMenu(e, workspace)}
>
<span className='min-w-0 flex-1 truncate'>{workspace.name}</span>
</PopoverItem>
)}
</div>
))}
</div>
</>
)}
</PopoverContent>
</Popover>
e.stopPropagation()
}}
/>
</div>
) : (
<PopoverItem
active={workspace.id === workspaceId}
onClick={() => onWorkspaceSwitch(workspace)}
onContextMenu={(e) => handleContextMenu(e, workspace)}
>
<span className='min-w-0 flex-1 truncate'>{workspace.name}</span>
</PopoverItem>
)}
</div>
))}
</div>
</>
)}
</PopoverContent>
</Popover>
) : (
<Button
variant='ghost-secondary'
type='button'
aria-label='Switch workspace'
className='group !p-[3px] -m-[3px]'
disabled
>
<ChevronDown className='h-[8px] w-[12px]' />
</Button>
)}
{/* Sidebar Collapse Toggle */}
{showCollapseButton && (
<Button

View File

@@ -9,6 +9,7 @@ import { useSession } from '@/lib/auth/auth-client'
import { getEnv, isTruthy } from '@/lib/core/config/env'
import { createLogger } from '@/lib/logs/console/logger'
import { useRegisterGlobalCommands } from '@/app/workspace/[workspaceId]/providers/global-commands-provider'
import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider'
import { createCommands } from '@/app/workspace/[workspaceId]/utils/commands-utils'
import {
HelpModal,
@@ -65,6 +66,7 @@ export function Sidebar() {
const scrollContainerRef = useRef<HTMLDivElement>(null)
const { data: sessionData, isPending: sessionLoading } = useSession()
const { canEdit } = useUserPermissionsContext()
/**
* Sidebar state from store with hydration tracking to prevent SSR mismatch.
@@ -224,12 +226,12 @@ export function Sidebar() {
)
const isLoading = workflowsLoading || sessionLoading
const initialScrollDoneRef = useRef<string | null>(null)
const initialScrollDoneRef = useRef(false)
/** Scrolls to active workflow on initial load or workspace switch */
/** Scrolls to active workflow on initial page load only */
useEffect(() => {
if (!workflowId || workflowsLoading || initialScrollDoneRef.current === workflowId) return
initialScrollDoneRef.current = workflowId
if (!workflowId || workflowsLoading || initialScrollDoneRef.current) return
initialScrollDoneRef.current = true
requestAnimationFrame(() => {
window.dispatchEvent(
new CustomEvent(SIDEBAR_SCROLL_EVENT, { detail: { itemId: workflowId } })
@@ -516,7 +518,7 @@ export function Sidebar() {
variant='ghost'
className='translate-y-[-0.25px] p-[1px]'
onClick={handleImportWorkflow}
disabled={isImporting}
disabled={isImporting || !canEdit}
>
<ArrowDown className='h-[14px] w-[14px]' />
</Button>
@@ -531,7 +533,7 @@ export function Sidebar() {
variant='ghost'
className='mr-[1px] translate-y-[-0.25px] p-[1px]'
onClick={handleCreateFolder}
disabled={isCreatingFolder}
disabled={isCreatingFolder || !canEdit}
>
<FolderPlus className='h-[14px] w-[14px]' />
</Button>
@@ -546,7 +548,7 @@ export function Sidebar() {
variant='outline'
className='translate-y-[-0.25px] p-[1px]'
onClick={handleCreateWorkflow}
disabled={isCreatingWorkflow}
disabled={isCreatingWorkflow || !canEdit}
>
<Plus className='h-[14px] w-[14px]' />
</Button>

View File

@@ -1,9 +1,9 @@
'use client'
import { useEffect, useState } from 'react'
import { Loader2 } from 'lucide-react'
import { useParams, useRouter } from 'next/navigation'
import { createLogger } from '@/lib/logs/console/logger'
import { Panel, Terminal } from '@/app/workspace/[workspaceId]/w/[workflowId]/components'
import { useWorkflows } from '@/hooks/queries/workflows'
import { useWorkflowRegistry } from '@/stores/workflows/registry/store'
@@ -55,14 +55,14 @@ export default function WorkflowsPage() {
// Always show loading state until redirect happens
// There should always be a default workflow, so we never show "no workflows found"
return (
<main className='flex h-full flex-1 flex-col overflow-hidden bg-muted/40'>
<div className='flex h-full items-center justify-center'>
<div className='text-center'>
<div className='mx-auto mb-4'>
<Loader2 className='h-5 w-5 animate-spin text-muted-foreground' />
</div>
<div className='flex h-full w-full flex-col overflow-hidden bg-[var(--bg)]'>
<div className='relative h-full w-full flex-1 bg-[var(--bg)]'>
<div className='workflow-container flex h-full items-center justify-center bg-[var(--bg)]'>
<div className='h-[18px] w-[18px] animate-spin rounded-full border-[1.5px] border-muted-foreground border-t-transparent' />
</div>
<Panel />
</div>
</main>
<Terminal />
</div>
)
}

View File

@@ -1,7 +1,6 @@
'use client'
import { useEffect } from 'react'
import { Loader2 } from 'lucide-react'
import { useRouter } from 'next/navigation'
import { useSession } from '@/lib/auth/auth-client'
import { createLogger } from '@/lib/logs/console/logger'
@@ -118,9 +117,7 @@ export default function WorkspacePage() {
if (isPending) {
return (
<div className='flex h-screen w-full items-center justify-center'>
<div className='flex flex-col items-center justify-center text-center align-middle'>
<Loader2 className='h-5 w-5 animate-spin text-muted-foreground' />
</div>
<div className='h-[18px] w-[18px] animate-spin rounded-full border-[1.5px] border-muted-foreground border-t-transparent' />
</div>
)
}

View File

@@ -160,17 +160,13 @@ export function SocketProvider({ children, user }: SocketProviderProps) {
initializedRef.current = true
setIsConnecting(true)
const initializeSocket = async () => {
const initializeSocket = () => {
try {
// Generate initial token for socket authentication
const token = await generateSocketToken()
const socketUrl = getEnv('NEXT_PUBLIC_SOCKET_URL') || 'http://localhost:3002'
logger.info('Attempting to connect to Socket.IO server', {
url: socketUrl,
userId: user?.id || 'no-user',
hasToken: !!token,
timestamp: new Date().toISOString(),
})

View File

@@ -762,7 +762,6 @@ export const JiraBlock: BlockConfig<JiraResponse> = {
outputs: {
// Common outputs across all Jira operations
ts: { type: 'string', description: 'Timestamp of the operation' },
success: { type: 'boolean', description: 'Whether the operation was successful' },
// jira_retrieve (read) outputs
issueKey: { type: 'string', description: 'Issue key (e.g., PROJ-123)' },

View File

@@ -48,6 +48,20 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
value: () => 'oauth',
required: true,
},
{
id: 'destinationType',
title: 'Destination',
type: 'dropdown',
options: [
{ label: 'Channel', id: 'channel' },
{ label: 'Direct Message', id: 'dm' },
],
value: () => 'channel',
condition: {
field: 'operation',
value: ['send', 'read'],
},
},
{
id: 'credential',
title: 'Slack Account',
@@ -60,6 +74,9 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
'groups:history',
'chat:write',
'chat:write.public',
'im:write',
'im:history',
'im:read',
'users:read',
'files:write',
'files:read',
@@ -98,9 +115,13 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
field: 'operation',
value: ['list_channels', 'list_users', 'get_user'],
not: true,
and: {
field: 'destinationType',
value: 'dm',
not: true,
},
},
},
// Manual channel ID input (advanced mode)
{
id: 'manualChannel',
title: 'Channel ID',
@@ -112,6 +133,37 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
field: 'operation',
value: ['list_channels', 'list_users', 'get_user'],
not: true,
and: {
field: 'destinationType',
value: 'dm',
not: true,
},
},
},
{
id: 'dmUserId',
title: 'User',
type: 'user-selector',
canonicalParamId: 'dmUserId',
serviceId: 'slack',
placeholder: 'Select Slack user',
mode: 'basic',
dependsOn: { all: ['authMethod'], any: ['credential', 'botToken'] },
condition: {
field: 'destinationType',
value: 'dm',
},
},
{
id: 'manualDmUserId',
title: 'User ID',
type: 'short-input',
canonicalParamId: 'dmUserId',
placeholder: 'Enter Slack user ID (e.g., U1234567890)',
mode: 'advanced',
condition: {
field: 'destinationType',
value: 'dm',
},
},
{
@@ -137,7 +189,6 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
},
required: false,
},
// File upload (basic mode)
{
id: 'attachmentFiles',
title: 'Attachments',
@@ -149,7 +200,6 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
multiple: true,
required: false,
},
// Variable reference (advanced mode)
{
id: 'files',
title: 'File Attachments',
@@ -416,8 +466,11 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
authMethod,
botToken,
operation,
destinationType,
channel,
manualChannel,
dmUserId,
manualDmUserId,
text,
title,
content,
@@ -440,21 +493,26 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
...rest
} = params
// Handle both selector and manual channel input
const isDM = destinationType === 'dm'
const effectiveChannel = (channel || manualChannel || '').trim()
const effectiveUserId = (dmUserId || manualDmUserId || '').trim()
// Operations that don't require a channel
const noChannelOperations = ['list_channels', 'list_users', 'get_user']
const dmSupportedOperations = ['send', 'read']
// Channel is required for most operations
if (!effectiveChannel && !noChannelOperations.includes(operation)) {
if (isDM && dmSupportedOperations.includes(operation)) {
if (!effectiveUserId) {
throw new Error('User is required for DM operations.')
}
} else if (!effectiveChannel && !noChannelOperations.includes(operation)) {
throw new Error('Channel is required.')
}
const baseParams: Record<string, any> = {}
// Only add channel if we have one (not needed for list_channels)
if (effectiveChannel) {
if (isDM && dmSupportedOperations.includes(operation)) {
baseParams.userId = effectiveUserId
} else if (effectiveChannel) {
baseParams.channel = effectiveChannel
}
@@ -472,18 +530,15 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
baseParams.credential = credential
}
// Handle operation-specific params
switch (operation) {
case 'send': {
if (!text || text.trim() === '') {
throw new Error('Message text is required for send operation')
}
baseParams.text = text
// Add thread_ts if provided
if (threadTs) {
baseParams.thread_ts = threadTs
}
// Add files if provided
const fileParam = attachmentFiles || files
if (fileParam) {
baseParams.files = fileParam
@@ -592,10 +647,13 @@ export const SlackBlock: BlockConfig<SlackResponse> = {
inputs: {
operation: { type: 'string', description: 'Operation to perform' },
authMethod: { type: 'string', description: 'Authentication method' },
destinationType: { type: 'string', description: 'Destination type (channel or dm)' },
credential: { type: 'string', description: 'Slack access token' },
botToken: { type: 'string', description: 'Bot token' },
channel: { type: 'string', description: 'Channel identifier' },
manualChannel: { type: 'string', description: 'Manual channel identifier' },
dmUserId: { type: 'string', description: 'User ID for DM recipient (selector)' },
manualDmUserId: { type: 'string', description: 'User ID for DM recipient (manual input)' },
text: { type: 'string', description: 'Message text' },
attachmentFiles: { type: 'json', description: 'Files to attach (UI upload)' },
files: { type: 'array', description: 'Files to attach (UserFile array)' },

View File

@@ -59,6 +59,7 @@ export type SubBlockType =
| 'file-selector' // File selector for Google Drive, etc.
| 'project-selector' // Project selector for Jira, Discord, etc.
| 'channel-selector' // Channel selector for Slack, Discord, etc.
| 'user-selector' // User selector for Slack, etc.
| 'folder-selector' // Folder selector for Gmail, etc.
| 'knowledge-base-selector' // Knowledge base selector
| 'knowledge-tag-filters' // Multiple tag filters for knowledge bases
@@ -85,6 +86,7 @@ export type SubBlockType =
export const SELECTOR_TYPES_HYDRATION_REQUIRED: SubBlockType[] = [
'oauth-input',
'channel-selector',
'user-selector',
'file-selector',
'folder-selector',
'project-selector',

View File

@@ -102,11 +102,15 @@ const SModalContent = React.forwardRef<
SModalContent.displayName = 'SModalContent'
/**
* Sidebar container.
* Sidebar container with scrollable content.
*/
const SModalSidebar = React.forwardRef<HTMLDivElement, React.HTMLAttributes<HTMLDivElement>>(
({ className, ...props }, ref) => (
<div ref={ref} className={cn('flex w-[166px] flex-col py-[12px]', className)} {...props} />
<div
ref={ref}
className={cn('flex min-h-0 w-[166px] flex-col overflow-y-auto py-[12px]', className)}
{...props}
/>
)
)

View File

@@ -19,6 +19,17 @@ export function createEnvVarPattern(): RegExp {
return new RegExp(`\\${REFERENCE.ENV_VAR_START}([^}]+)\\${REFERENCE.ENV_VAR_END}`, 'g')
}
/**
* Creates a regex pattern for matching workflow variables <variable.name>
* Captures the variable name (after "variable.") in group 1
*/
export function createWorkflowVariablePattern(): RegExp {
return new RegExp(
`${REFERENCE.START}${REFERENCE.PREFIX.VARIABLE}\\${REFERENCE.PATH_DELIMITER}([^${REFERENCE.START}${REFERENCE.END}]+)${REFERENCE.END}`,
'g'
)
}
/**
* Combined pattern matching both <reference> and {{env_var}}
*/

View File

@@ -21,18 +21,17 @@ export const organizationKeys = {
/**
* Fetch all organizations for the current user
* Note: Billing data is fetched separately via useSubscriptionData() to avoid duplicate calls
*/
async function fetchOrganizations() {
const [orgsResponse, activeOrgResponse, billingResponse] = await Promise.all([
const [orgsResponse, activeOrgResponse] = await Promise.all([
client.organization.list(),
client.organization.getFullOrganization(),
fetch('/api/billing?context=user').then((r) => r.json()),
])
return {
organizations: orgsResponse.data || [],
activeOrganization: activeOrgResponse.data,
billingData: billingResponse,
}
}

View File

@@ -10,6 +10,7 @@ import type {
const SELECTOR_STALE = 60 * 1000
type SlackChannel = { id: string; name: string }
type SlackUser = { id: string; name: string; real_name: string }
type FolderResponse = { id: string; name: string }
type PlannerTask = { id: string; title: string }
@@ -59,6 +60,30 @@ const registry: Record<SelectorKey, SelectorDefinition> = {
}))
},
},
'slack.users': {
key: 'slack.users',
staleTime: SELECTOR_STALE,
getQueryKey: ({ context }: SelectorQueryArgs) => [
'selectors',
'slack.users',
context.credentialId ?? 'none',
],
enabled: ({ context }) => Boolean(context.credentialId),
fetchList: async ({ context }: SelectorQueryArgs) => {
const body = JSON.stringify({
credential: context.credentialId,
workflowId: context.workflowId,
})
const data = await fetchJson<{ users: SlackUser[] }>('/api/tools/slack/users', {
method: 'POST',
body,
})
return (data.users || []).map((user) => ({
id: user.id,
label: user.real_name || user.name,
}))
},
},
'gmail.labels': {
key: 'gmail.labels',
staleTime: SELECTOR_STALE,

View File

@@ -32,6 +32,8 @@ export function resolveSelectorForSubBlock(
return resolveFolderSelector(subBlock, args)
case 'channel-selector':
return resolveChannelSelector(subBlock, args)
case 'user-selector':
return resolveUserSelector(subBlock, args)
case 'project-selector':
return resolveProjectSelector(subBlock, args)
case 'document-selector':
@@ -157,6 +159,21 @@ function resolveChannelSelector(
}
}
function resolveUserSelector(
subBlock: SubBlockConfig,
args: SelectorResolutionArgs
): SelectorResolution {
const serviceId = subBlock.serviceId
if (serviceId !== 'slack') {
return { key: null, context: buildBaseContext(args), allowSearch: true }
}
return {
key: 'slack.users',
context: buildBaseContext(args),
allowSearch: true,
}
}
function resolveProjectSelector(
subBlock: SubBlockConfig,
args: SelectorResolutionArgs

View File

@@ -3,6 +3,7 @@ import type { QueryKey } from '@tanstack/react-query'
export type SelectorKey =
| 'slack.channels'
| 'slack.users'
| 'gmail.labels'
| 'outlook.folders'
| 'google.calendar'

View File

@@ -24,7 +24,10 @@ import {
import { sendPlanWelcomeEmail } from '@/lib/billing'
import { authorizeSubscriptionReference } from '@/lib/billing/authorization'
import { handleNewUser } from '@/lib/billing/core/usage'
import { syncSubscriptionUsageLimits } from '@/lib/billing/organization'
import {
ensureOrganizationForTeamSubscription,
syncSubscriptionUsageLimits,
} from '@/lib/billing/organization'
import { getPlans } from '@/lib/billing/plans'
import { syncSeatsFromStripeQuantity } from '@/lib/billing/validation/seat-management'
import { handleChargeDispute, handleDisputeClosed } from '@/lib/billing/webhooks/disputes'
@@ -1637,6 +1640,9 @@ export const auth = betterAuth({
'groups:history',
'chat:write',
'chat:write.public',
'im:write',
'im:history',
'im:read',
'users:read',
'files:write',
'files:read',
@@ -2021,11 +2027,14 @@ export const auth = betterAuth({
status: subscription.status,
})
await handleSubscriptionCreated(subscription)
const resolvedSubscription =
await ensureOrganizationForTeamSubscription(subscription)
await syncSubscriptionUsageLimits(subscription)
await handleSubscriptionCreated(resolvedSubscription)
await sendPlanWelcomeEmail(subscription)
await syncSubscriptionUsageLimits(resolvedSubscription)
await sendPlanWelcomeEmail(resolvedSubscription)
},
onSubscriptionUpdate: async ({
event,
@@ -2040,40 +2049,42 @@ export const auth = betterAuth({
plan: subscription.plan,
})
const resolvedSubscription =
await ensureOrganizationForTeamSubscription(subscription)
try {
await syncSubscriptionUsageLimits(subscription)
await syncSubscriptionUsageLimits(resolvedSubscription)
} catch (error) {
logger.error('[onSubscriptionUpdate] Failed to sync usage limits', {
subscriptionId: subscription.id,
referenceId: subscription.referenceId,
subscriptionId: resolvedSubscription.id,
referenceId: resolvedSubscription.referenceId,
error,
})
}
// Sync seat count from Stripe subscription quantity for team plans
if (subscription.plan === 'team') {
if (resolvedSubscription.plan === 'team') {
try {
const stripeSubscription = event.data.object as Stripe.Subscription
const quantity = stripeSubscription.items?.data?.[0]?.quantity || 1
const result = await syncSeatsFromStripeQuantity(
subscription.id,
subscription.seats,
resolvedSubscription.id,
resolvedSubscription.seats ?? null,
quantity
)
if (result.synced) {
logger.info('[onSubscriptionUpdate] Synced seat count from Stripe', {
subscriptionId: subscription.id,
referenceId: subscription.referenceId,
subscriptionId: resolvedSubscription.id,
referenceId: resolvedSubscription.referenceId,
previousSeats: result.previousSeats,
newSeats: result.newSeats,
})
}
} catch (error) {
logger.error('[onSubscriptionUpdate] Failed to sync seat count', {
subscriptionId: subscription.id,
referenceId: subscription.referenceId,
subscriptionId: resolvedSubscription.id,
referenceId: resolvedSubscription.referenceId,
error,
})
}

View File

@@ -12,9 +12,6 @@ const CONSTANTS = {
INITIAL_TEAM_SEATS: 1,
} as const
/**
* Handles organization creation for team plans and proper referenceId management
*/
export function useSubscriptionUpgrade() {
const { data: session } = useSession()
const betterAuthSubscription = useSubscription()
@@ -40,83 +37,43 @@ export function useSubscriptionUpgrade() {
let referenceId = userId
// For team plans, create organization first and use its ID as referenceId
if (targetPlan === 'team') {
try {
// Check if user already has an organization where they are owner/admin
const orgsResponse = await fetch('/api/organizations')
if (orgsResponse.ok) {
const orgsData = await orgsResponse.json()
const existingOrg = orgsData.organizations?.find(
(org: any) => org.role === 'owner' || org.role === 'admin'
)
if (existingOrg) {
logger.info('Using existing organization for team plan upgrade', {
userId,
organizationId: existingOrg.id,
})
referenceId = existingOrg.id
}
if (!orgsResponse.ok) {
throw new Error('Failed to check organization status')
}
// Only create new organization if no suitable one exists
if (referenceId === userId) {
logger.info('Creating organization for team plan upgrade', {
const orgsData = await orgsResponse.json()
const existingOrg = orgsData.organizations?.find(
(org: any) => org.role === 'owner' || org.role === 'admin'
)
if (existingOrg) {
logger.info('Using existing organization for team plan upgrade', {
userId,
organizationId: existingOrg.id,
})
referenceId = existingOrg.id
const response = await fetch('/api/organizations', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
},
})
if (!response.ok) {
const errorData = await response.json().catch(() => ({}))
if (response.status === 409) {
throw new Error(
'You are already a member of an organization. Please leave it or ask an admin to upgrade.'
)
}
throw new Error(
errorData.message || `Failed to create organization: ${response.statusText}`
)
try {
await client.organization.setActive({ organizationId: referenceId })
logger.info('Set organization as active', { organizationId: referenceId })
} catch (error) {
logger.warn('Failed to set organization as active, proceeding with upgrade', {
organizationId: referenceId,
error: error instanceof Error ? error.message : 'Unknown error',
})
}
const result = await response.json()
logger.info('Organization API response', {
result,
success: result.success,
organizationId: result.organizationId,
})
if (!result.success || !result.organizationId) {
throw new Error('Failed to create organization for team plan')
}
referenceId = result.organizationId
}
// Set the organization as active so Better Auth recognizes it
try {
await client.organization.setActive({ organizationId: referenceId })
logger.info('Set organization as active', {
organizationId: referenceId,
oldReferenceId: userId,
newReferenceId: referenceId,
})
} catch (error) {
logger.warn('Failed to set organization as active, but proceeding with upgrade', {
organizationId: referenceId,
error: error instanceof Error ? error.message : 'Unknown error',
})
// Continue with upgrade even if setting active fails
} else if (orgsData.isMemberOfAnyOrg) {
throw new Error(
'You are already a member of an organization. Please leave it or ask an admin to upgrade.'
)
} else {
logger.info('Will create organization after payment succeeds', { userId })
}
} catch (error) {
logger.error('Failed to prepare organization for team plan', error)
logger.error('Failed to prepare for team plan upgrade', error)
throw error instanceof Error
? error
: new Error('Failed to prepare team workspace. Please try again or contact support.')
@@ -134,23 +91,17 @@ export function useSubscriptionUpgrade() {
...(targetPlan === 'team' && { seats: CONSTANTS.INITIAL_TEAM_SEATS }),
} as const
// Add subscriptionId for existing subscriptions to ensure proper plan switching
const finalParams = currentSubscriptionId
? { ...upgradeParams, subscriptionId: currentSubscriptionId }
: upgradeParams
logger.info(
currentSubscriptionId ? 'Upgrading existing subscription' : 'Creating new subscription',
{
targetPlan,
currentSubscriptionId,
referenceId,
}
{ targetPlan, currentSubscriptionId, referenceId }
)
await betterAuthSubscription.upgrade(finalParams)
// If upgrading to team plan, ensure the subscription is transferred to the organization
if (targetPlan === 'team' && currentSubscriptionId && referenceId !== userId) {
try {
logger.info('Transferring subscription to organization after upgrade', {
@@ -174,7 +125,6 @@ export function useSubscriptionUpgrade() {
organizationId: referenceId,
error: text,
})
// We don't throw here because the upgrade itself succeeded
} else {
logger.info('Successfully transferred subscription to organization', {
subscriptionId: currentSubscriptionId,
@@ -186,21 +136,16 @@ export function useSubscriptionUpgrade() {
}
}
// For team plans, refresh organization data to ensure UI updates
if (targetPlan === 'team') {
try {
await queryClient.invalidateQueries({ queryKey: organizationKeys.lists() })
logger.info('Refreshed organization data after team upgrade')
} catch (error) {
logger.warn('Failed to refresh organization data after upgrade', error)
// Don't fail the entire upgrade if data refresh fails
}
}
logger.info('Subscription upgrade completed successfully', {
targetPlan,
referenceId,
})
logger.info('Subscription upgrade completed successfully', { targetPlan, referenceId })
} catch (error) {
logger.error('Failed to initiate subscription upgrade:', error)

View File

@@ -76,9 +76,6 @@ async function createOrganizationWithOwner(
return newOrg.id
}
/**
* Create organization for team/enterprise plan upgrade
*/
export async function createOrganizationForTeamPlan(
userId: string,
userName?: string,
@@ -86,13 +83,11 @@ export async function createOrganizationForTeamPlan(
organizationSlug?: string
): Promise<string> {
try {
// Check if user already owns an organization
const existingOrgId = await getUserOwnedOrganization(userId)
if (existingOrgId) {
return existingOrgId
}
// Create new organization (same naming for both team and enterprise)
const organizationName = userName || `${userEmail || 'User'}'s Team`
const slug = organizationSlug || `${userId}-team-${Date.now()}`
@@ -117,6 +112,84 @@ export async function createOrganizationForTeamPlan(
}
}
export async function ensureOrganizationForTeamSubscription(
subscription: SubscriptionData
): Promise<SubscriptionData> {
if (subscription.plan !== 'team') {
return subscription
}
if (subscription.referenceId.startsWith('org_')) {
return subscription
}
const userId = subscription.referenceId
logger.info('Creating organization for team subscription', {
subscriptionId: subscription.id,
userId,
})
const existingMembership = await db
.select({
id: schema.member.id,
organizationId: schema.member.organizationId,
role: schema.member.role,
})
.from(schema.member)
.where(eq(schema.member.userId, userId))
.limit(1)
if (existingMembership.length > 0) {
const membership = existingMembership[0]
if (membership.role === 'owner' || membership.role === 'admin') {
logger.info('User already owns/admins an org, using it', {
userId,
organizationId: membership.organizationId,
})
await db
.update(schema.subscription)
.set({ referenceId: membership.organizationId })
.where(eq(schema.subscription.id, subscription.id))
return { ...subscription, referenceId: membership.organizationId }
}
logger.error('User is member of org but not owner/admin - cannot create team subscription', {
userId,
existingOrgId: membership.organizationId,
subscriptionId: subscription.id,
})
throw new Error('User is already member of another organization')
}
const [userData] = await db
.select({ name: schema.user.name, email: schema.user.email })
.from(schema.user)
.where(eq(schema.user.id, userId))
.limit(1)
const orgId = await createOrganizationForTeamPlan(
userId,
userData?.name || undefined,
userData?.email || undefined
)
await db
.update(schema.subscription)
.set({ referenceId: orgId })
.where(eq(schema.subscription.id, subscription.id))
logger.info('Created organization and updated subscription referenceId', {
subscriptionId: subscription.id,
userId,
organizationId: orgId,
})
return { ...subscription, referenceId: orgId }
}
/**
* Sync usage limits for subscription members
* Updates usage limits for all users associated with the subscription

View File

@@ -13,6 +13,7 @@ export const mdxComponents: MDXRemoteProps['components'] = {
className={clsx('h-auto w-full rounded-lg', props.className)}
sizes='(max-width: 768px) 100vw, 800px'
loading='lazy'
unoptimized
/>
),
h2: (props: any) => (

View File

@@ -55,6 +55,7 @@ export const buildTimeCSPDirectives: CSPDirectives = {
'https://*.s3.amazonaws.com',
'https://s3.amazonaws.com',
'https://github.com/*',
'https://collector.onedollarstats.com',
...(env.S3_BUCKET_NAME && env.AWS_REGION
? [`https://${env.S3_BUCKET_NAME}.s3.${env.AWS_REGION}.amazonaws.com`]
: []),
@@ -153,7 +154,7 @@ export function generateRuntimeCSP(): string {
default-src 'self';
script-src 'self' 'unsafe-inline' 'unsafe-eval' https://*.google.com https://apis.google.com https://assets.onedollarstats.com;
style-src 'self' 'unsafe-inline' https://fonts.googleapis.com;
img-src 'self' data: blob: https://*.googleusercontent.com https://*.google.com https://*.atlassian.com https://cdn.discordapp.com https://*.githubusercontent.com https://*.s3.amazonaws.com https://s3.amazonaws.com https://*.amazonaws.com https://*.blob.core.windows.net https://github.com/* ${brandLogoDomain} ${brandFaviconDomain};
img-src 'self' data: blob: https://*.googleusercontent.com https://*.google.com https://*.atlassian.com https://cdn.discordapp.com https://*.githubusercontent.com https://*.s3.amazonaws.com https://s3.amazonaws.com https://*.amazonaws.com https://*.blob.core.windows.net https://github.com/* https://collector.onedollarstats.com ${brandLogoDomain} ${brandFaviconDomain};
media-src 'self' blob:;
font-src 'self' https://fonts.gstatic.com;
connect-src 'self' ${appUrl} ${ollamaUrl} ${socketUrl} ${socketWsUrl} https://api.browser-use.com https://api.exa.ai https://api.firecrawl.dev https://*.googleapis.com https://*.amazonaws.com https://*.s3.amazonaws.com https://*.blob.core.windows.net https://api.github.com https://github.com/* https://*.atlassian.com https://*.supabase.co https://collector.onedollarstats.com ${dynamicDomainsStr};

View File

@@ -0,0 +1,357 @@
/**
* Node.js worker for isolated-vm execution.
* Runs in a separate Node.js process, communicates with parent via IPC.
*/
const ivm = require('isolated-vm')
const USER_CODE_START_LINE = 4
const pendingFetches = new Map()
let fetchIdCounter = 0
const FETCH_TIMEOUT_MS = 30000
/**
* Extract line and column from error stack or message
*/
function extractLineInfo(errorMessage, stack) {
if (stack) {
const stackMatch = stack.match(/(?:<isolated-vm>|user-function\.js):(\d+):(\d+)/)
if (stackMatch) {
return {
line: Number.parseInt(stackMatch[1], 10),
column: Number.parseInt(stackMatch[2], 10),
}
}
const atMatch = stack.match(/at\s+(?:<isolated-vm>|user-function\.js):(\d+):(\d+)/)
if (atMatch) {
return {
line: Number.parseInt(atMatch[1], 10),
column: Number.parseInt(atMatch[2], 10),
}
}
}
const msgMatch = errorMessage.match(/:(\d+):(\d+)/)
if (msgMatch) {
return {
line: Number.parseInt(msgMatch[1], 10),
column: Number.parseInt(msgMatch[2], 10),
}
}
return {}
}
/**
* Convert isolated-vm error info to a format compatible with the route's error handling
*/
function convertToCompatibleError(errorInfo, userCode) {
const { name } = errorInfo
let { message, stack } = errorInfo
message = message
.replace(/\s*\[user-function\.js:\d+:\d+\]/g, '')
.replace(/\s*\[<isolated-vm>:\d+:\d+\]/g, '')
.replace(/\s*\(<isolated-vm>:\d+:\d+\)/g, '')
.trim()
const lineInfo = extractLineInfo(errorInfo.message, stack)
let userLine
let lineContent
if (lineInfo.line !== undefined) {
userLine = lineInfo.line - USER_CODE_START_LINE
const codeLines = userCode.split('\n')
if (userLine > 0 && userLine <= codeLines.length) {
lineContent = codeLines[userLine - 1]?.trim()
} else if (userLine <= 0) {
userLine = 1
lineContent = codeLines[0]?.trim()
} else {
userLine = codeLines.length
lineContent = codeLines[codeLines.length - 1]?.trim()
}
}
if (stack) {
stack = stack.replace(/<isolated-vm>:(\d+):(\d+)/g, (_, line, col) => {
const adjustedLine = Number.parseInt(line, 10) - USER_CODE_START_LINE
return `user-function.js:${Math.max(1, adjustedLine)}:${col}`
})
stack = stack.replace(/at <isolated-vm>:(\d+):(\d+)/g, (_, line, col) => {
const adjustedLine = Number.parseInt(line, 10) - USER_CODE_START_LINE
return `at user-function.js:${Math.max(1, adjustedLine)}:${col}`
})
}
return {
message,
name,
stack,
line: userLine,
column: lineInfo.column,
lineContent,
}
}
/**
* Execute code in isolated-vm
*/
async function executeCode(request) {
const { code, params, envVars, contextVariables, timeoutMs, requestId } = request
const stdoutChunks = []
let isolate = null
try {
isolate = new ivm.Isolate({ memoryLimit: 128 })
const context = await isolate.createContext()
const jail = context.global
await jail.set('global', jail.derefInto())
const logCallback = new ivm.Callback((...args) => {
const message = args
.map((arg) => (typeof arg === 'object' ? JSON.stringify(arg) : String(arg)))
.join(' ')
stdoutChunks.push(`${message}\n`)
})
await jail.set('__log', logCallback)
const errorCallback = new ivm.Callback((...args) => {
const message = args
.map((arg) => (typeof arg === 'object' ? JSON.stringify(arg) : String(arg)))
.join(' ')
stdoutChunks.push(`ERROR: ${message}\n`)
})
await jail.set('__error', errorCallback)
await jail.set('params', new ivm.ExternalCopy(params).copyInto())
await jail.set('environmentVariables', new ivm.ExternalCopy(envVars).copyInto())
for (const [key, value] of Object.entries(contextVariables)) {
await jail.set(key, new ivm.ExternalCopy(value).copyInto())
}
const fetchCallback = new ivm.Reference(async (url, optionsJson) => {
return new Promise((resolve) => {
const fetchId = ++fetchIdCounter
const timeout = setTimeout(() => {
if (pendingFetches.has(fetchId)) {
pendingFetches.delete(fetchId)
resolve(JSON.stringify({ error: 'Fetch request timed out' }))
}
}, FETCH_TIMEOUT_MS)
pendingFetches.set(fetchId, { resolve, timeout })
if (process.send && process.connected) {
process.send({ type: 'fetch', fetchId, requestId, url, optionsJson })
} else {
clearTimeout(timeout)
pendingFetches.delete(fetchId)
resolve(JSON.stringify({ error: 'Parent process disconnected' }))
}
})
})
await jail.set('__fetchRef', fetchCallback)
const bootstrap = `
// Set up console object
const console = {
log: (...args) => __log(...args),
error: (...args) => __error(...args),
warn: (...args) => __log('WARN:', ...args),
info: (...args) => __log(...args),
};
// Set up fetch function that uses the host's secure fetch
async function fetch(url, options) {
let optionsJson;
if (options) {
try {
optionsJson = JSON.stringify(options);
} catch {
throw new Error('fetch options must be JSON-serializable');
}
}
const resultJson = await __fetchRef.apply(undefined, [url, optionsJson], { result: { promise: true } });
let result;
try {
result = JSON.parse(resultJson);
} catch {
throw new Error('Invalid fetch response');
}
if (result.error) {
throw new Error(result.error);
}
// Create a Response-like object
return {
ok: result.ok,
status: result.status,
statusText: result.statusText,
headers: {
get: (name) => result.headers[name.toLowerCase()] || null,
entries: () => Object.entries(result.headers),
},
text: async () => result.body,
json: async () => {
try {
return JSON.parse(result.body);
} catch (e) {
throw new Error('Failed to parse response as JSON: ' + e.message);
}
},
blob: async () => { throw new Error('blob() not supported in sandbox'); },
arrayBuffer: async () => { throw new Error('arrayBuffer() not supported in sandbox'); },
};
}
// Prevent access to dangerous globals with stronger protection
const undefined_globals = [
'Isolate', 'Context', 'Script', 'Module', 'Callback', 'Reference',
'ExternalCopy', 'process', 'require', 'module', 'exports', '__dirname', '__filename'
];
for (const name of undefined_globals) {
try {
Object.defineProperty(global, name, {
value: undefined,
writable: false,
configurable: false
});
} catch {}
}
`
const bootstrapScript = await isolate.compileScript(bootstrap)
await bootstrapScript.run(context)
const wrappedCode = `
(async () => {
try {
const __userResult = await (async () => {
${code}
})();
return JSON.stringify({ success: true, result: __userResult });
} catch (error) {
// Capture full error details including stack trace
const errorInfo = {
message: error.message || String(error),
name: error.name || 'Error',
stack: error.stack || ''
};
console.error(error.stack || error.message || error);
return JSON.stringify({ success: false, errorInfo });
}
})()
`
const userScript = await isolate.compileScript(wrappedCode, { filename: 'user-function.js' })
const resultJson = await userScript.run(context, { timeout: timeoutMs, promise: true })
let result = null
let error
if (typeof resultJson === 'string') {
try {
const parsed = JSON.parse(resultJson)
if (parsed.success) {
result = parsed.result
} else if (parsed.errorInfo) {
error = convertToCompatibleError(parsed.errorInfo, code)
} else {
error = { message: 'Unknown error', name: 'Error' }
}
} catch {
result = resultJson
}
}
const stdout = stdoutChunks.join('')
if (error) {
return { result: null, stdout, error }
}
return { result, stdout }
} catch (err) {
const stdout = stdoutChunks.join('')
if (err instanceof Error) {
const errorInfo = {
message: err.message,
name: err.name,
stack: err.stack,
}
if (err.message.includes('Script execution timed out')) {
return {
result: null,
stdout,
error: {
message: `Execution timed out after ${timeoutMs}ms`,
name: 'TimeoutError',
},
}
}
return {
result: null,
stdout,
error: convertToCompatibleError(errorInfo, code),
}
}
return {
result: null,
stdout,
error: {
message: String(err),
name: 'Error',
line: 1,
lineContent: code.split('\n')[0]?.trim(),
},
}
} finally {
if (isolate) {
isolate.dispose()
}
}
}
process.on('message', async (msg) => {
try {
if (msg.type === 'execute') {
const result = await executeCode(msg.request)
if (process.send && process.connected) {
process.send({ type: 'result', executionId: msg.executionId, result })
}
} else if (msg.type === 'fetchResponse') {
const pending = pendingFetches.get(msg.fetchId)
if (pending) {
clearTimeout(pending.timeout)
pendingFetches.delete(msg.fetchId)
pending.resolve(msg.response)
}
}
} catch (err) {
if (msg.type === 'execute' && process.send && process.connected) {
process.send({
type: 'result',
executionId: msg.executionId,
result: {
result: null,
stdout: '',
error: {
message: err instanceof Error ? err.message : 'Worker error',
name: 'WorkerError',
},
},
})
}
}
})
if (process.send) {
process.send({ type: 'ready' })
}

View File

@@ -0,0 +1,311 @@
import { type ChildProcess, execSync } from 'node:child_process'
import fs from 'node:fs'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import { validateProxyUrl } from '@/lib/core/security/input-validation'
import { createLogger } from '@/lib/logs/console/logger'
const logger = createLogger('IsolatedVMExecution')
let nodeAvailable: boolean | null = null
function checkNodeAvailable(): boolean {
if (nodeAvailable !== null) return nodeAvailable
try {
execSync('node --version', { stdio: 'ignore' })
nodeAvailable = true
} catch {
nodeAvailable = false
}
return nodeAvailable
}
export interface IsolatedVMExecutionRequest {
code: string
params: Record<string, unknown>
envVars: Record<string, string>
contextVariables: Record<string, unknown>
timeoutMs: number
requestId: string
}
export interface IsolatedVMExecutionResult {
result: unknown
stdout: string
error?: IsolatedVMError
}
export interface IsolatedVMError {
message: string
name: string
stack?: string
line?: number
column?: number
lineContent?: string
}
interface PendingExecution {
resolve: (result: IsolatedVMExecutionResult) => void
timeout: ReturnType<typeof setTimeout>
}
let worker: ChildProcess | null = null
let workerReady = false
let workerReadyPromise: Promise<void> | null = null
let workerIdleTimeout: ReturnType<typeof setTimeout> | null = null
const pendingExecutions = new Map<number, PendingExecution>()
let executionIdCounter = 0
const WORKER_IDLE_TIMEOUT_MS = 60000
function cleanupWorker() {
if (workerIdleTimeout) {
clearTimeout(workerIdleTimeout)
workerIdleTimeout = null
}
if (worker) {
worker.kill()
worker = null
}
workerReady = false
workerReadyPromise = null
}
function resetIdleTimeout() {
if (workerIdleTimeout) {
clearTimeout(workerIdleTimeout)
}
workerIdleTimeout = setTimeout(() => {
if (pendingExecutions.size === 0) {
logger.info('Cleaning up idle isolated-vm worker')
cleanupWorker()
}
}, WORKER_IDLE_TIMEOUT_MS)
}
/**
* Secure fetch wrapper that validates URLs to prevent SSRF attacks
*/
async function secureFetch(requestId: string, url: string, options?: RequestInit): Promise<string> {
const validation = validateProxyUrl(url)
if (!validation.isValid) {
logger.warn(`[${requestId}] Blocked fetch request due to SSRF validation`, {
url: url.substring(0, 100),
error: validation.error,
})
return JSON.stringify({ error: `Security Error: ${validation.error}` })
}
try {
const response = await fetch(url, options)
const body = await response.text()
const headers: Record<string, string> = {}
response.headers.forEach((value, key) => {
headers[key] = value
})
return JSON.stringify({
ok: response.ok,
status: response.status,
statusText: response.statusText,
body,
headers,
})
} catch (error: unknown) {
return JSON.stringify({ error: error instanceof Error ? error.message : 'Unknown fetch error' })
}
}
/**
* Handle IPC messages from the Node.js worker
*/
function handleWorkerMessage(message: unknown) {
if (typeof message !== 'object' || message === null) return
const msg = message as Record<string, unknown>
if (msg.type === 'result') {
const pending = pendingExecutions.get(msg.executionId as number)
if (pending) {
clearTimeout(pending.timeout)
pendingExecutions.delete(msg.executionId as number)
pending.resolve(msg.result as IsolatedVMExecutionResult)
}
return
}
if (msg.type === 'fetch') {
const { fetchId, requestId, url, optionsJson } = msg as {
fetchId: number
requestId: string
url: string
optionsJson?: string
}
let options: RequestInit | undefined
if (optionsJson) {
try {
options = JSON.parse(optionsJson)
} catch {
worker?.send({
type: 'fetchResponse',
fetchId,
response: JSON.stringify({ error: 'Invalid fetch options JSON' }),
})
return
}
}
secureFetch(requestId, url, options)
.then((response) => {
try {
worker?.send({ type: 'fetchResponse', fetchId, response })
} catch (err) {
logger.error('Failed to send fetch response to worker', { err, fetchId })
}
})
.catch((err) => {
try {
worker?.send({
type: 'fetchResponse',
fetchId,
response: JSON.stringify({
error: err instanceof Error ? err.message : 'Fetch failed',
}),
})
} catch (sendErr) {
logger.error('Failed to send fetch error to worker', { sendErr, fetchId })
}
})
}
}
/**
* Start the Node.js worker process
*/
async function ensureWorker(): Promise<void> {
if (workerReady && worker) return
if (workerReadyPromise) return workerReadyPromise
workerReadyPromise = new Promise<void>((resolve, reject) => {
if (!checkNodeAvailable()) {
reject(
new Error(
'Node.js is required for code execution but was not found. ' +
'Please install Node.js (v20+) from https://nodejs.org'
)
)
return
}
const currentDir = path.dirname(fileURLToPath(import.meta.url))
const workerPath = path.join(currentDir, 'isolated-vm-worker.cjs')
if (!fs.existsSync(workerPath)) {
reject(new Error(`Worker file not found at ${workerPath}`))
return
}
import('node:child_process').then(({ spawn }) => {
worker = spawn('node', [workerPath], {
stdio: ['ignore', 'pipe', 'inherit', 'ipc'],
serialization: 'json',
})
worker.on('message', handleWorkerMessage)
const startTimeout = setTimeout(() => {
worker?.kill()
worker = null
workerReady = false
workerReadyPromise = null
reject(new Error('Worker failed to start within timeout'))
}, 10000)
const readyHandler = (message: unknown) => {
if (
typeof message === 'object' &&
message !== null &&
(message as { type?: string }).type === 'ready'
) {
workerReady = true
clearTimeout(startTimeout)
worker?.off('message', readyHandler)
resolve()
}
}
worker.on('message', readyHandler)
worker.on('exit', () => {
if (workerIdleTimeout) {
clearTimeout(workerIdleTimeout)
workerIdleTimeout = null
}
worker = null
workerReady = false
workerReadyPromise = null
for (const [id, pending] of pendingExecutions) {
clearTimeout(pending.timeout)
pending.resolve({
result: null,
stdout: '',
error: { message: 'Worker process exited unexpectedly', name: 'WorkerError' },
})
pendingExecutions.delete(id)
}
})
})
})
return workerReadyPromise
}
/**
* Execute JavaScript code in an isolated V8 isolate via Node.js subprocess.
* The worker's V8 isolate enforces timeoutMs internally. The parent timeout
* (timeoutMs + 1000) is a safety buffer for IPC communication.
*/
export async function executeInIsolatedVM(
req: IsolatedVMExecutionRequest
): Promise<IsolatedVMExecutionResult> {
if (workerIdleTimeout) {
clearTimeout(workerIdleTimeout)
workerIdleTimeout = null
}
await ensureWorker()
if (!worker) {
return {
result: null,
stdout: '',
error: { message: 'Failed to start isolated-vm worker', name: 'WorkerError' },
}
}
const executionId = ++executionIdCounter
return new Promise((resolve) => {
const timeout = setTimeout(() => {
pendingExecutions.delete(executionId)
resolve({
result: null,
stdout: '',
error: { message: `Execution timed out after ${req.timeoutMs}ms`, name: 'TimeoutError' },
})
}, req.timeoutMs + 1000)
pendingExecutions.set(executionId, { resolve, timeout })
try {
worker!.send({ type: 'execute', executionId, request: req })
} catch {
clearTimeout(timeout)
pendingExecutions.delete(executionId)
resolve({
result: null,
stdout: '',
error: { message: 'Failed to send execution request to worker', name: 'WorkerError' },
})
return
}
resetIdleTimeout()
})
}

View File

@@ -637,6 +637,9 @@ export const OAUTH_PROVIDERS: Record<string, OAuthProviderConfig> = {
'groups:history',
'chat:write',
'chat:write.public',
'im:write',
'im:history',
'im:read',
'users:read',
'files:write',
'files:read',

View File

@@ -80,6 +80,7 @@ const nextConfig: NextConfig = {
'pino-pretty',
'thread-stream',
'ws',
'isolated-vm',
],
outputFileTracingIncludes: {
'/api/tools/stagehand/*': ['./node_modules/ws/**/*'],

View File

@@ -26,8 +26,8 @@
"@anthropic-ai/sdk": "^0.39.0",
"@aws-sdk/client-dynamodb": "3.940.0",
"@aws-sdk/client-rds-data": "3.940.0",
"@aws-sdk/client-sqs": "3.947.0",
"@aws-sdk/client-s3": "^3.779.0",
"@aws-sdk/client-sqs": "3.947.0",
"@aws-sdk/lib-dynamodb": "3.940.0",
"@aws-sdk/s3-request-presigner": "^3.779.0",
"@azure/communication-email": "1.0.0",
@@ -72,6 +72,7 @@
"@types/react-window": "2.0.0",
"@types/three": "0.177.0",
"better-auth": "1.3.12",
"binary-extensions": "^2.0.0",
"browser-image-compression": "^2.0.2",
"chalk": "5.6.2",
"cheerio": "1.1.2",
@@ -100,7 +101,7 @@
"mammoth": "^1.9.0",
"mysql2": "3.14.3",
"nanoid": "^3.3.7",
"next": "16.0.9",
"next": "16.1.0-canary.21",
"next-mdx-remote": "^5.0.0",
"next-runtime-env": "3.3.0",
"next-themes": "^0.4.6",
@@ -129,6 +130,7 @@
"stripe": "18.5.0",
"tailwind-merge": "^2.6.0",
"tailwindcss-animate": "^1.0.7",
"thread-stream": "4.0.0",
"three": "0.177.0",
"unpdf": "1.4.0",
"uuid": "^11.1.0",
@@ -169,8 +171,8 @@
"sharp"
],
"overrides": {
"next": "16.0.9",
"@next/env": "16.0.9",
"next": "16.1.0-canary.21",
"@next/env": "16.1.0-canary.21",
"drizzle-orm": "^0.44.5",
"postgres": "^3.4.5"
}

View File

@@ -53,19 +53,20 @@ describe('getApiKey', () => {
module.require = originalRequire
})
it('should return user-provided key when not in hosted environment', () => {
it.concurrent('should return user-provided key when not in hosted environment', () => {
isHostedSpy.mockReturnValue(false)
// For OpenAI
const key1 = getApiKey('openai', 'gpt-4', 'user-key-openai')
expect(key1).toBe('user-key-openai')
// For Anthropic
const key2 = getApiKey('anthropic', 'claude-3', 'user-key-anthropic')
expect(key2).toBe('user-key-anthropic')
const key3 = getApiKey('google', 'gemini-2.5-flash', 'user-key-google')
expect(key3).toBe('user-key-google')
})
it('should throw error if no key provided in non-hosted environment', () => {
it.concurrent('should throw error if no key provided in non-hosted environment', () => {
isHostedSpy.mockReturnValue(false)
expect(() => getApiKey('openai', 'gpt-4')).toThrow('API key is required for openai gpt-4')
@@ -74,63 +75,87 @@ describe('getApiKey', () => {
)
})
it('should fall back to user key in hosted environment if rotation fails', () => {
it.concurrent('should fall back to user key in hosted environment if rotation fails', () => {
isHostedSpy.mockReturnValue(true)
module.require = vi.fn(() => {
throw new Error('Rotation failed')
})
// Use gpt-4o which IS in the hosted models list
const key = getApiKey('openai', 'gpt-4o', 'user-fallback-key')
expect(key).toBe('user-fallback-key')
})
it('should throw error in hosted environment if rotation fails and no user key', () => {
isHostedSpy.mockReturnValue(true)
it.concurrent(
'should throw error in hosted environment if rotation fails and no user key',
() => {
isHostedSpy.mockReturnValue(true)
module.require = vi.fn(() => {
throw new Error('Rotation failed')
})
module.require = vi.fn(() => {
throw new Error('Rotation failed')
})
// Use gpt-4o which IS in the hosted models list
expect(() => getApiKey('openai', 'gpt-4o')).toThrow('No API key available for openai gpt-4o')
expect(() => getApiKey('openai', 'gpt-4o')).toThrow('No API key available for openai gpt-4o')
}
)
it.concurrent(
'should require user key for non-OpenAI/Anthropic providers even in hosted environment',
() => {
isHostedSpy.mockReturnValue(true)
const key = getApiKey('other-provider', 'some-model', 'user-key')
expect(key).toBe('user-key')
expect(() => getApiKey('other-provider', 'some-model')).toThrow(
'API key is required for other-provider some-model'
)
}
)
it.concurrent(
'should require user key for models NOT in hosted list even if provider matches',
() => {
isHostedSpy.mockReturnValue(true)
const key1 = getApiKey('anthropic', 'claude-sonnet-4-20250514', 'user-key-anthropic')
expect(key1).toBe('user-key-anthropic')
expect(() => getApiKey('anthropic', 'claude-sonnet-4-20250514')).toThrow(
'API key is required for anthropic claude-sonnet-4-20250514'
)
const key2 = getApiKey('openai', 'gpt-4o-2024-08-06', 'user-key-openai')
expect(key2).toBe('user-key-openai')
expect(() => getApiKey('openai', 'gpt-4o-2024-08-06')).toThrow(
'API key is required for openai gpt-4o-2024-08-06'
)
}
)
it.concurrent('should return empty for ollama provider without requiring API key', () => {
isHostedSpy.mockReturnValue(false)
const key = getApiKey('ollama', 'llama2')
expect(key).toBe('empty')
const key2 = getApiKey('ollama', 'codellama', 'user-key')
expect(key2).toBe('empty')
})
it('should require user key for non-OpenAI/Anthropic providers even in hosted environment', () => {
isHostedSpy.mockReturnValue(true)
it.concurrent(
'should return empty or user-provided key for vllm provider without requiring API key',
() => {
isHostedSpy.mockReturnValue(false)
const key = getApiKey('other-provider', 'some-model', 'user-key')
expect(key).toBe('user-key')
const key = getApiKey('vllm', 'vllm/qwen-3')
expect(key).toBe('empty')
expect(() => getApiKey('other-provider', 'some-model')).toThrow(
'API key is required for other-provider some-model'
)
})
it('should require user key for models NOT in hosted list even if provider matches', () => {
isHostedSpy.mockReturnValue(true)
// Models with version suffixes that are NOT in the hosted list should require user API key
// even though they're from anthropic/openai providers
// User provides their own key - should work
const key1 = getApiKey('anthropic', 'claude-sonnet-4-20250514', 'user-key-anthropic')
expect(key1).toBe('user-key-anthropic')
// No user key - should throw, NOT use server key
expect(() => getApiKey('anthropic', 'claude-sonnet-4-20250514')).toThrow(
'API key is required for anthropic claude-sonnet-4-20250514'
)
// Same for OpenAI versioned models not in list
const key2 = getApiKey('openai', 'gpt-4o-2024-08-06', 'user-key-openai')
expect(key2).toBe('user-key-openai')
expect(() => getApiKey('openai', 'gpt-4o-2024-08-06')).toThrow(
'API key is required for openai gpt-4o-2024-08-06'
)
})
const key2 = getApiKey('vllm', 'vllm/llama', 'user-key')
expect(key2).toBe('user-key')
}
)
})
describe('Model Capabilities', () => {
@@ -202,7 +227,6 @@ describe('Model Capabilities', () => {
it.concurrent(
'should inherit temperature support from provider for dynamically fetched models',
() => {
// OpenRouter models should inherit temperature support from provider capabilities
expect(supportsTemperature('openrouter/anthropic/claude-3.5-sonnet')).toBe(true)
expect(supportsTemperature('openrouter/openai/gpt-4')).toBe(true)
}

View File

@@ -630,13 +630,19 @@ export function getApiKey(provider: string, model: string, userProvidedKey?: str
// If user provided a key, use it as a fallback
const hasUserKey = !!userProvidedKey
// Ollama models don't require API keys - they run locally
// Ollama and vLLM models don't require API keys
const isOllamaModel =
provider === 'ollama' || useProvidersStore.getState().providers.ollama.models.includes(model)
if (isOllamaModel) {
return 'empty' // Ollama uses 'empty' as a placeholder API key
}
const isVllmModel =
provider === 'vllm' || useProvidersStore.getState().providers.vllm.models.includes(model)
if (isVllmModel) {
return userProvidedKey || 'empty' // vLLM uses 'empty' as a placeholder if no key provided
}
// Use server key rotation for all OpenAI models, Anthropic's Claude models, and Google's Gemini models on the hosted platform
const isOpenAIModel = provider === 'openai'
const isClaudeModel = provider === 'anthropic'

View File

@@ -79,7 +79,15 @@ export const vllmProvider: ProviderConfig = {
}
try {
const response = await fetch(`${baseUrl}/v1/models`)
const headers: Record<string, string> = {
'Content-Type': 'application/json',
}
if (env.VLLM_API_KEY) {
headers.Authorization = `Bearer ${env.VLLM_API_KEY}`
}
const response = await fetch(`${baseUrl}/v1/models`, { headers })
if (!response.ok) {
useProvidersStore.getState().setProviderModels('vllm', [])
logger.warn('vLLM service is not available. The provider will be disabled.')

View File

@@ -38,6 +38,57 @@ function shouldIncludeField(subBlockConfig: SubBlockConfig, isAdvancedMode: bool
return true
}
/**
* Evaluates a condition object against current field values.
* Used to determine if a conditionally-visible field should be included in params.
*/
function evaluateCondition(
condition:
| {
field: string
value: any
not?: boolean
and?: { field: string; value: any; not?: boolean }
}
| (() => {
field: string
value: any
not?: boolean
and?: { field: string; value: any; not?: boolean }
})
| undefined,
values: Record<string, any>
): boolean {
if (!condition) return true
const actual = typeof condition === 'function' ? condition() : condition
const fieldValue = values[actual.field]
const valueMatch = Array.isArray(actual.value)
? fieldValue != null &&
(actual.not ? !actual.value.includes(fieldValue) : actual.value.includes(fieldValue))
: actual.not
? fieldValue !== actual.value
: fieldValue === actual.value
const andMatch = !actual.and
? true
: (() => {
const andFieldValue = values[actual.and!.field]
const andValueMatch = Array.isArray(actual.and!.value)
? andFieldValue != null &&
(actual.and!.not
? !actual.and!.value.includes(andFieldValue)
: actual.and!.value.includes(andFieldValue))
: actual.and!.not
? andFieldValue !== actual.and!.value
: andFieldValue === actual.and!.value
return andValueMatch
})()
return valueMatch && andMatch
}
/**
* Helper function to migrate agent block params from old format to messages array
* Transforms systemPrompt/userPrompt into messages array format
@@ -343,9 +394,15 @@ export class Serializer {
const isStarterBlock = block.type === 'starter'
const isAgentBlock = block.type === 'agent'
// First collect all current values from subBlocks, filtering by mode
// First pass: collect ALL raw values for condition evaluation
const allValues: Record<string, any> = {}
Object.entries(block.subBlocks).forEach(([id, subBlock]) => {
// Find the corresponding subblock config to check its mode
allValues[id] = subBlock.value
})
// Second pass: filter by mode and conditions
Object.entries(block.subBlocks).forEach(([id, subBlock]) => {
// Find the corresponding subblock config to check its mode and condition
const subBlockConfig = blockConfig.subBlocks.find((config) => config.id === id)
// Include field if it matches current mode OR if it's the starter inputFormat with values
@@ -360,9 +417,14 @@ export class Serializer {
const isLegacyAgentField =
isAgentBlock && ['systemPrompt', 'userPrompt', 'memories'].includes(id)
// Check if field's condition is met (conditionally-hidden fields should be excluded)
const conditionMet = subBlockConfig
? evaluateCondition(subBlockConfig.condition, allValues)
: true
if (
(subBlockConfig &&
(shouldIncludeField(subBlockConfig, isAdvancedMode) || hasStarterInputFormatValues)) ||
(subBlockConfig && shouldIncludeField(subBlockConfig, isAdvancedMode) && conditionMet) ||
hasStarterInputFormatValues ||
isLegacyAgentField
) {
params[id] = subBlock.value
@@ -475,52 +537,6 @@ export class Serializer {
// Check required user-only parameters for the current tool
const missingFields: string[] = []
// Helper function to evaluate conditions
const evalCond = (
condition:
| {
field: string
value: any
not?: boolean
and?: { field: string; value: any; not?: boolean }
}
| (() => {
field: string
value: any
not?: boolean
and?: { field: string; value: any; not?: boolean }
})
| undefined,
values: Record<string, any>
): boolean => {
if (!condition) return true
const actual = typeof condition === 'function' ? condition() : condition
const fieldValue = values[actual.field]
const valueMatch = Array.isArray(actual.value)
? fieldValue != null &&
(actual.not ? !actual.value.includes(fieldValue) : actual.value.includes(fieldValue))
: actual.not
? fieldValue !== actual.value
: fieldValue === actual.value
const andMatch = !actual.and
? true
: (() => {
const andFieldValue = values[actual.and!.field]
return Array.isArray(actual.and!.value)
? andFieldValue != null &&
(actual.and!.not
? !actual.and!.value.includes(andFieldValue)
: actual.and!.value.includes(andFieldValue))
: actual.and!.not
? andFieldValue !== actual.and!.value
: andFieldValue === actual.and!.value
})()
return valueMatch && andMatch
}
// Iterate through the tool's parameters, not the block's subBlocks
Object.entries(currentTool.params || {}).forEach(([paramId, paramConfig]) => {
if (paramConfig.required && paramConfig.visibility === 'user-only') {
@@ -533,14 +549,14 @@ export class Serializer {
const includedByMode = shouldIncludeField(subBlockConfig, isAdvancedMode)
// Check visibility condition
const includedByCondition = evalCond(subBlockConfig.condition, params)
const includedByCondition = evaluateCondition(subBlockConfig.condition, params)
// Check if field is required based on its required condition (if it's a condition object)
const isRequired = (() => {
if (!subBlockConfig.required) return false
if (typeof subBlockConfig.required === 'boolean') return subBlockConfig.required
// If required is a condition object, evaluate it
return evalCond(subBlockConfig.required, params)
return evaluateCondition(subBlockConfig.required, params)
})()
shouldValidateParam = includedByMode && includedByCondition && isRequired

View File

@@ -93,8 +93,10 @@ describe('Socket Server Index Integration', () => {
clearTimeout(timeout)
if (err.code === 'EADDRINUSE') {
PORT = 3333 + Math.floor(Math.random() * 1000)
httpServer.listen(PORT, '0.0.0.0', () => {
resolve()
httpServer.close(() => {
httpServer.listen(PORT, '0.0.0.0', () => {
resolve()
})
})
} else {
reject(err)

View File

@@ -251,10 +251,7 @@ export const useWorkflowStore = create<WorkflowStore>()(
position,
},
},
edges: [...state.edges],
}))
get().updateLastSaved()
// No sync for position updates to avoid excessive syncing during drag
},
updateNodeDimensions: (id: string, dimensions: { width: number; height: number }) => {

View File

@@ -163,14 +163,9 @@ export const jiraAddCommentTool: ToolConfig<JiraAddCommentParams, JiraAddComment
},
outputs: {
success: {
type: 'boolean',
description: 'Operation success status',
},
output: {
type: 'object',
description:
'Comment details with timestamp, issue key, comment ID, body, and success status',
},
ts: { type: 'string', description: 'Timestamp of the operation' },
issueKey: { type: 'string', description: 'Issue key the comment was added to' },
commentId: { type: 'string', description: 'Created comment ID' },
body: { type: 'string', description: 'Comment text content' },
},
}

View File

@@ -141,14 +141,8 @@ export const jiraAddWatcherTool: ToolConfig<JiraAddWatcherParams, JiraAddWatcher
},
outputs: {
success: {
type: 'boolean',
description: 'Operation success status',
},
output: {
type: 'object',
description:
'Watcher details with timestamp, issue key, watcher account ID, and success status',
},
ts: { type: 'string', description: 'Timestamp of the operation' },
issueKey: { type: 'string', description: 'Issue key' },
watcherAccountId: { type: 'string', description: 'Added watcher account ID' },
},
}

View File

@@ -191,14 +191,9 @@ export const jiraAddWorklogTool: ToolConfig<JiraAddWorklogParams, JiraAddWorklog
},
outputs: {
success: {
type: 'boolean',
description: 'Operation success status',
},
output: {
type: 'object',
description:
'Worklog details with timestamp, issue key, worklog ID, time spent in seconds, and success status',
},
ts: { type: 'string', description: 'Timestamp of the operation' },
issueKey: { type: 'string', description: 'Issue key the worklog was added to' },
worklogId: { type: 'string', description: 'Created worklog ID' },
timeSpentSeconds: { type: 'number', description: 'Time spent in seconds' },
},
}

View File

@@ -144,13 +144,8 @@ export const jiraAssignIssueTool: ToolConfig<JiraAssignIssueParams, JiraAssignIs
},
outputs: {
success: {
type: 'boolean',
description: 'Operation success status',
},
output: {
type: 'object',
description: 'Assignment details with timestamp, issue key, assignee ID, and success status',
},
ts: { type: 'string', description: 'Timestamp of the operation' },
issueKey: { type: 'string', description: 'Issue key that was assigned' },
assigneeId: { type: 'string', description: 'Account ID of the assignee' },
},
}

View File

@@ -204,13 +204,10 @@ export const jiraBulkRetrieveTool: ToolConfig<JiraRetrieveBulkParams, JiraRetrie
},
outputs: {
success: {
type: 'boolean',
description: 'Operation success status',
},
output: {
issues: {
type: 'array',
description: 'Array of Jira issues with summary, description, created and updated timestamps',
description:
'Array of Jira issues with ts, summary, description, created, and updated timestamps',
},
},
}

View File

@@ -201,14 +201,10 @@ export const jiraCreateIssueLinkTool: ToolConfig<
},
outputs: {
success: {
type: 'boolean',
description: 'Operation success status',
},
output: {
type: 'object',
description:
'Issue link details with timestamp, inward issue key, outward issue key, link type, and success status',
},
ts: { type: 'string', description: 'Timestamp of the operation' },
inwardIssue: { type: 'string', description: 'Inward issue key' },
outwardIssue: { type: 'string', description: 'Outward issue key' },
linkType: { type: 'string', description: 'Type of issue link' },
linkId: { type: 'string', description: 'Created link ID' },
},
}

View File

@@ -127,13 +127,7 @@ export const jiraDeleteAttachmentTool: ToolConfig<
},
outputs: {
success: {
type: 'boolean',
description: 'Operation success status',
},
output: {
type: 'object',
description: 'Deletion details with timestamp, attachment ID, and success status',
},
ts: { type: 'string', description: 'Timestamp of the operation' },
attachmentId: { type: 'string', description: 'Deleted attachment ID' },
},
}

View File

@@ -135,13 +135,8 @@ export const jiraDeleteCommentTool: ToolConfig<JiraDeleteCommentParams, JiraDele
},
outputs: {
success: {
type: 'boolean',
description: 'Operation success status',
},
output: {
type: 'object',
description: 'Deletion details with timestamp, issue key, comment ID, and success status',
},
ts: { type: 'string', description: 'Timestamp of the operation' },
issueKey: { type: 'string', description: 'Issue key' },
commentId: { type: 'string', description: 'Deleted comment ID' },
},
}

View File

@@ -170,13 +170,7 @@ export const jiraDeleteIssueTool: ToolConfig<JiraDeleteIssueParams, JiraDeleteIs
},
outputs: {
success: {
type: 'boolean',
description: 'Operation success status',
},
output: {
type: 'object',
description: 'Deleted issue details with timestamp, issue key, and success status',
},
ts: { type: 'string', description: 'Timestamp of the operation' },
issueKey: { type: 'string', description: 'Deleted issue key' },
},
}

View File

@@ -127,13 +127,7 @@ export const jiraDeleteIssueLinkTool: ToolConfig<
},
outputs: {
success: {
type: 'boolean',
description: 'Operation success status',
},
output: {
type: 'object',
description: 'Deletion details with timestamp, link ID, and success status',
},
ts: { type: 'string', description: 'Timestamp of the operation' },
linkId: { type: 'string', description: 'Deleted link ID' },
},
}

View File

@@ -135,13 +135,8 @@ export const jiraDeleteWorklogTool: ToolConfig<JiraDeleteWorklogParams, JiraDele
},
outputs: {
success: {
type: 'boolean',
description: 'Operation success status',
},
output: {
type: 'object',
description: 'Deletion details with timestamp, issue key, worklog ID, and success status',
},
ts: { type: 'string', description: 'Timestamp of the operation' },
issueKey: { type: 'string', description: 'Issue key' },
worklogId: { type: 'string', description: 'Deleted worklog ID' },
},
}

View File

@@ -131,13 +131,11 @@ export const jiraGetAttachmentsTool: ToolConfig<
},
outputs: {
success: {
type: 'boolean',
description: 'Operation success status',
},
output: {
type: 'object',
description: 'Attachments data with timestamp, issue key, and array of attachments',
ts: { type: 'string', description: 'Timestamp of the operation' },
issueKey: { type: 'string', description: 'Issue key' },
attachments: {
type: 'array',
description: 'Array of attachments with id, filename, size, mimeType, created, author',
},
},
}

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