@squadbase/vite-server 0.1.17-dev.3b633bb → 0.1.17-dev.71a85cd
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +3310 -742
- package/dist/connectors/airtable-oauth.js +50 -8
- package/dist/connectors/airtable.js +46 -8
- package/dist/connectors/amplitude.js +10 -8
- package/dist/connectors/anthropic.js +4 -2
- package/dist/connectors/asana.js +39 -10
- package/dist/connectors/attio.js +32 -13
- package/dist/connectors/aws-billing.js +10 -8
- package/dist/connectors/azure-sql.js +33 -7
- package/dist/connectors/backlog-api-key.js +42 -15
- package/dist/connectors/clickup.js +52 -10
- package/dist/connectors/cosmosdb.js +14 -12
- package/dist/connectors/customerio.js +10 -8
- package/dist/connectors/dbt.js +688 -25
- package/dist/connectors/freshdesk.js +84 -8
- package/dist/connectors/freshsales.js +10 -8
- package/dist/connectors/freshservice.js +10 -8
- package/dist/connectors/gamma.js +17 -15
- package/dist/connectors/gemini.js +4 -2
- package/dist/connectors/github.js +14 -12
- package/dist/connectors/gmail-oauth.js +10 -10
- package/dist/connectors/gmail.js +6 -4
- package/dist/connectors/google-ads.js +10 -8
- package/dist/connectors/google-analytics-oauth.js +154 -25
- package/dist/connectors/google-analytics.js +536 -109
- package/dist/connectors/google-audit-log.js +6 -4
- package/dist/connectors/google-calendar-oauth.js +63 -15
- package/dist/connectors/google-calendar.js +63 -11
- package/dist/connectors/google-docs.js +10 -10
- package/dist/connectors/google-drive.js +32 -10
- package/dist/connectors/google-search-console-oauth.js +128 -17
- package/dist/connectors/google-sheets.js +8 -6
- package/dist/connectors/google-slides.js +10 -10
- package/dist/connectors/grafana.js +47 -10
- package/dist/connectors/hubspot-oauth.js +41 -9
- package/dist/connectors/hubspot.js +27 -9
- package/dist/connectors/influxdb.js +10 -8
- package/dist/connectors/intercom-oauth.js +72 -12
- package/dist/connectors/intercom.js +14 -12
- package/dist/connectors/jdbc.js +8 -6
- package/dist/connectors/jira-api-key.js +70 -11
- package/dist/connectors/kintone-api-token.js +68 -18
- package/dist/connectors/kintone.js +56 -11
- package/dist/connectors/linear.js +56 -12
- package/dist/connectors/linkedin-ads.js +43 -14
- package/dist/connectors/mailchimp-oauth.js +8 -6
- package/dist/connectors/mailchimp.js +8 -6
- package/dist/connectors/meta-ads-oauth.js +35 -14
- package/dist/connectors/meta-ads.js +37 -14
- package/dist/connectors/mixpanel.js +10 -8
- package/dist/connectors/monday.js +11 -9
- package/dist/connectors/mongodb.js +10 -8
- package/dist/connectors/notion-oauth.js +60 -11
- package/dist/connectors/notion.js +62 -11
- package/dist/connectors/openai.js +4 -2
- package/dist/connectors/oracle.js +25 -7
- package/dist/connectors/outlook-oauth.js +21 -21
- package/dist/connectors/powerbi-oauth.js +13 -13
- package/dist/connectors/salesforce.js +44 -9
- package/dist/connectors/semrush.js +8 -6
- package/dist/connectors/sentry.js +38 -10
- package/dist/connectors/shopify-oauth.js +43 -10
- package/dist/connectors/shopify.js +10 -8
- package/dist/connectors/sqlserver.js +33 -7
- package/dist/connectors/stripe-api-key.js +68 -15
- package/dist/connectors/stripe-oauth.js +70 -19
- package/dist/connectors/supabase.js +24 -5
- package/dist/connectors/tableau.js +17 -15
- package/dist/connectors/tiktok-ads.js +39 -16
- package/dist/connectors/wix-store.js +10 -8
- package/dist/connectors/zendesk-oauth.js +55 -12
- package/dist/connectors/zendesk.js +14 -12
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3339 -746
- package/dist/main.js +3328 -740
- package/dist/vite-plugin.js +3308 -740
- package/package.json +1 -1
|
@@ -16,6 +16,7 @@ var init_parameter_definition = __esm({
|
|
|
16
16
|
type;
|
|
17
17
|
secret;
|
|
18
18
|
required;
|
|
19
|
+
isDeprecated;
|
|
19
20
|
constructor(config) {
|
|
20
21
|
this.slug = config.slug;
|
|
21
22
|
this.name = config.name;
|
|
@@ -24,6 +25,7 @@ var init_parameter_definition = __esm({
|
|
|
24
25
|
this.type = config.type;
|
|
25
26
|
this.secret = config.secret;
|
|
26
27
|
this.required = config.required;
|
|
28
|
+
this.isDeprecated = config.isDeprecated ?? false;
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
31
|
* Get the parameter value from a ConnectorConnectionObject.
|
|
@@ -175,7 +177,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
175
177
|
/**
|
|
176
178
|
* Create tools for connections that belong to this connector.
|
|
177
179
|
* Filters connections by connectorKey internally.
|
|
178
|
-
* Returns tools keyed as
|
|
180
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
179
181
|
*/
|
|
180
182
|
createTools(connections, config, opts) {
|
|
181
183
|
const myConnections = connections.filter(
|
|
@@ -185,7 +187,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
185
187
|
for (const t of Object.values(this.tools)) {
|
|
186
188
|
const tool = t.createTool(myConnections, config);
|
|
187
189
|
const originalToModelOutput = tool.toModelOutput;
|
|
188
|
-
result[
|
|
190
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
189
191
|
...tool,
|
|
190
192
|
toModelOutput: async (options) => {
|
|
191
193
|
if (!originalToModelOutput) {
|
|
@@ -315,11 +317,11 @@ var AUTH_TYPES = {
|
|
|
315
317
|
// ../connectors/src/connectors/mailchimp-oauth/setup.ts
|
|
316
318
|
var mailchimpOauthOnboarding = new ConnectorOnboarding({
|
|
317
319
|
dataOverviewInstructions: {
|
|
318
|
-
en: `1. Call
|
|
320
|
+
en: `1. Call connector_mailchimp-oauth_request with GET /lists to list all audiences
|
|
319
321
|
2. Pick an audience and call GET /lists/{list_id}/members?count=5 to sample members
|
|
320
322
|
3. Call GET /campaigns?count=5 to list recent campaigns
|
|
321
323
|
4. Call GET /reports?count=5 to view campaign reports`,
|
|
322
|
-
ja: `1.
|
|
324
|
+
ja: `1. connector_mailchimp-oauth_request \u3067 GET /lists \u3092\u547C\u3073\u51FA\u3057\u3001\u5168\u30AA\u30FC\u30C7\u30A3\u30A8\u30F3\u30B9\u4E00\u89A7\u3092\u53D6\u5F97
|
|
323
325
|
2. \u30AA\u30FC\u30C7\u30A3\u30A8\u30F3\u30B9\u3092\u9078\u629E\u3057 GET /lists/{list_id}/members?count=5 \u3067\u30E1\u30F3\u30D0\u30FC\u3092\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0
|
|
324
326
|
3. GET /campaigns?count=5 \u3067\u6700\u8FD1\u306E\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u4E00\u89A7\u3092\u53D6\u5F97
|
|
325
327
|
4. GET /reports?count=5 \u3067\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u30EC\u30DD\u30FC\u30C8\u3092\u8868\u793A`
|
|
@@ -574,7 +576,7 @@ var mailchimpOauthConnector = new ConnectorPlugin({
|
|
|
574
576
|
systemPrompt: {
|
|
575
577
|
en: `### Tools
|
|
576
578
|
|
|
577
|
-
- \`
|
|
579
|
+
- \`connector_mailchimp-oauth_request\`: The only way to call the Mailchimp Marketing API v3. Use it to manage audiences/lists, subscribers/members, campaigns, templates, automations, and reports. Authentication is configured automatically via OAuth.
|
|
578
580
|
|
|
579
581
|
### Mailchimp Marketing API v3 Reference
|
|
580
582
|
|
|
@@ -632,7 +634,7 @@ const data = await res.json();
|
|
|
632
634
|
\`\`\``,
|
|
633
635
|
ja: `### \u30C4\u30FC\u30EB
|
|
634
636
|
|
|
635
|
-
- \`
|
|
637
|
+
- \`connector_mailchimp-oauth_request\`: Mailchimp Marketing API v3\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u30AA\u30FC\u30C7\u30A3\u30A8\u30F3\u30B9/\u30EA\u30B9\u30C8\u3001\u30B5\u30D6\u30B9\u30AF\u30E9\u30A4\u30D0\u30FC/\u30E1\u30F3\u30D0\u30FC\u3001\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u3001\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3001\u30AA\u30FC\u30C8\u30E1\u30FC\u30B7\u30E7\u30F3\u3001\u30EC\u30DD\u30FC\u30C8\u306E\u7BA1\u7406\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002OAuth\u7D4C\u7531\u3067\u8A8D\u8A3C\u306F\u81EA\u52D5\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002
|
|
636
638
|
|
|
637
639
|
### Mailchimp Marketing API v3 \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
|
|
638
640
|
|
|
@@ -16,6 +16,7 @@ var init_parameter_definition = __esm({
|
|
|
16
16
|
type;
|
|
17
17
|
secret;
|
|
18
18
|
required;
|
|
19
|
+
isDeprecated;
|
|
19
20
|
constructor(config) {
|
|
20
21
|
this.slug = config.slug;
|
|
21
22
|
this.name = config.name;
|
|
@@ -24,6 +25,7 @@ var init_parameter_definition = __esm({
|
|
|
24
25
|
this.type = config.type;
|
|
25
26
|
this.secret = config.secret;
|
|
26
27
|
this.required = config.required;
|
|
28
|
+
this.isDeprecated = config.isDeprecated ?? false;
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
31
|
* Get the parameter value from a ConnectorConnectionObject.
|
|
@@ -280,7 +282,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
280
282
|
/**
|
|
281
283
|
* Create tools for connections that belong to this connector.
|
|
282
284
|
* Filters connections by connectorKey internally.
|
|
283
|
-
* Returns tools keyed as
|
|
285
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
284
286
|
*/
|
|
285
287
|
createTools(connections, config, opts) {
|
|
286
288
|
const myConnections = connections.filter(
|
|
@@ -290,7 +292,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
290
292
|
for (const t of Object.values(this.tools)) {
|
|
291
293
|
const tool = t.createTool(myConnections, config);
|
|
292
294
|
const originalToModelOutput = tool.toModelOutput;
|
|
293
|
-
result[
|
|
295
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
294
296
|
...tool,
|
|
295
297
|
toModelOutput: async (options) => {
|
|
296
298
|
if (!originalToModelOutput) {
|
|
@@ -420,11 +422,11 @@ var AUTH_TYPES = {
|
|
|
420
422
|
// ../connectors/src/connectors/mailchimp/setup.ts
|
|
421
423
|
var mailchimpOnboarding = new ConnectorOnboarding({
|
|
422
424
|
dataOverviewInstructions: {
|
|
423
|
-
en: `1. Call
|
|
425
|
+
en: `1. Call connector_mailchimp_request with GET /lists to list all audiences
|
|
424
426
|
2. Pick an audience and call GET /lists/{list_id}/members?count=5 to sample members
|
|
425
427
|
3. Call GET /campaigns?count=5 to list recent campaigns
|
|
426
428
|
4. Call GET /reports?count=5 to view campaign reports`,
|
|
427
|
-
ja: `1.
|
|
429
|
+
ja: `1. connector_mailchimp_request \u3067 GET /lists \u3092\u547C\u3073\u51FA\u3057\u3001\u5168\u30AA\u30FC\u30C7\u30A3\u30A8\u30F3\u30B9\u4E00\u89A7\u3092\u53D6\u5F97
|
|
428
430
|
2. \u30AA\u30FC\u30C7\u30A3\u30A8\u30F3\u30B9\u3092\u9078\u629E\u3057 GET /lists/{list_id}/members?count=5 \u3067\u30E1\u30F3\u30D0\u30FC\u3092\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0
|
|
429
431
|
3. GET /campaigns?count=5 \u3067\u6700\u8FD1\u306E\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u4E00\u89A7\u3092\u53D6\u5F97
|
|
430
432
|
4. GET /reports?count=5 \u3067\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u30EC\u30DD\u30FC\u30C8\u3092\u8868\u793A`
|
|
@@ -645,7 +647,7 @@ var mailchimpConnector = new ConnectorPlugin({
|
|
|
645
647
|
systemPrompt: {
|
|
646
648
|
en: `### Tools
|
|
647
649
|
|
|
648
|
-
- \`
|
|
650
|
+
- \`connector_mailchimp_request\`: The only way to call the Mailchimp Marketing API v3. Use it to manage audiences/lists, subscribers/members, campaigns, templates, automations, and reports. Authentication (Basic Auth with API key) is configured automatically. The datacenter is extracted from the API key suffix.
|
|
649
651
|
|
|
650
652
|
### Business Logic
|
|
651
653
|
|
|
@@ -742,7 +744,7 @@ export default async function handler(c: Context) {
|
|
|
742
744
|
- Errors return \`type\`, \`title\`, \`status\`, \`detail\`, and \`instance\` fields`,
|
|
743
745
|
ja: `### \u30C4\u30FC\u30EB
|
|
744
746
|
|
|
745
|
-
- \`
|
|
747
|
+
- \`connector_mailchimp_request\`: Mailchimp Marketing API v3\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u30AA\u30FC\u30C7\u30A3\u30A8\u30F3\u30B9/\u30EA\u30B9\u30C8\u3001\u30B5\u30D6\u30B9\u30AF\u30E9\u30A4\u30D0\u30FC/\u30E1\u30F3\u30D0\u30FC\u3001\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u3001\u30C6\u30F3\u30D7\u30EC\u30FC\u30C8\u3001\u30AA\u30FC\u30C8\u30E1\u30FC\u30B7\u30E7\u30F3\u3001\u30EC\u30DD\u30FC\u30C8\u306E\u7BA1\u7406\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u8A8D\u8A3C\uFF08API\u30AD\u30FC\u306B\u3088\u308BBasic Auth\uFF09\u306F\u81EA\u52D5\u7684\u306B\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002\u30C7\u30FC\u30BF\u30BB\u30F3\u30BF\u30FC\u306FAPI\u30AD\u30FC\u306E\u30B5\u30D5\u30A3\u30C3\u30AF\u30B9\u304B\u3089\u81EA\u52D5\u691C\u51FA\u3055\u308C\u307E\u3059\u3002
|
|
746
748
|
|
|
747
749
|
### Business Logic
|
|
748
750
|
|
|
@@ -16,6 +16,7 @@ var init_parameter_definition = __esm({
|
|
|
16
16
|
type;
|
|
17
17
|
secret;
|
|
18
18
|
required;
|
|
19
|
+
isDeprecated;
|
|
19
20
|
constructor(config) {
|
|
20
21
|
this.slug = config.slug;
|
|
21
22
|
this.name = config.name;
|
|
@@ -24,6 +25,7 @@ var init_parameter_definition = __esm({
|
|
|
24
25
|
this.type = config.type;
|
|
25
26
|
this.secret = config.secret;
|
|
26
27
|
this.required = config.required;
|
|
28
|
+
this.isDeprecated = config.isDeprecated ?? false;
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
31
|
* Get the parameter value from a ConnectorConnectionObject.
|
|
@@ -169,7 +171,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
169
171
|
/**
|
|
170
172
|
* Create tools for connections that belong to this connector.
|
|
171
173
|
* Filters connections by connectorKey internally.
|
|
172
|
-
* Returns tools keyed as
|
|
174
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
173
175
|
*/
|
|
174
176
|
createTools(connections, config, opts) {
|
|
175
177
|
const myConnections = connections.filter(
|
|
@@ -179,7 +181,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
179
181
|
for (const t of Object.values(this.tools)) {
|
|
180
182
|
const tool = t.createTool(myConnections, config);
|
|
181
183
|
const originalToModelOutput = tool.toModelOutput;
|
|
182
|
-
result[
|
|
184
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
183
185
|
...tool,
|
|
184
186
|
toModelOutput: async (options) => {
|
|
185
187
|
if (!originalToModelOutput) {
|
|
@@ -446,11 +448,11 @@ var metaAdsOauthOnboarding = new ConnectorOnboarding({
|
|
|
446
448
|
- Write only 1 sentence between tool calls, then immediately call the next tool. Skip unnecessary explanations and proceed efficiently`
|
|
447
449
|
},
|
|
448
450
|
dataOverviewInstructions: {
|
|
449
|
-
en: `1. Call
|
|
450
|
-
2. Call
|
|
451
|
+
en: `1. Call connector_meta-ads-oauth_request with GET act_{adAccountId}/campaigns?fields=id,name,status,objective to explore campaign data
|
|
452
|
+
2. Call connector_meta-ads-oauth_request with GET act_{adAccountId}/insights?fields=impressions,clicks,spend,ctr,cpm&date_preset=last_7d to check recent performance
|
|
451
453
|
3. Explore ad sets and ads as needed to understand the data structure`,
|
|
452
|
-
ja: `1.
|
|
453
|
-
2.
|
|
454
|
+
ja: `1. connector_meta-ads-oauth_request \u3067 GET act_{adAccountId}/campaigns?fields=id,name,status,objective \u3092\u547C\u3073\u51FA\u3057\u3066\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u30C7\u30FC\u30BF\u3092\u63A2\u7D22
|
|
455
|
+
2. connector_meta-ads-oauth_request \u3067 GET act_{adAccountId}/insights?fields=impressions,clicks,spend,ctr,cpm&date_preset=last_7d \u3092\u547C\u3073\u51FA\u3057\u3066\u76F4\u8FD1\u306E\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u3092\u78BA\u8A8D
|
|
454
456
|
3. \u5FC5\u8981\u306B\u5FDC\u3058\u3066\u5E83\u544A\u30BB\u30C3\u30C8\u3084\u5E83\u544A\u30C7\u30FC\u30BF\u3092\u63A2\u7D22\u3057\u3001\u30C7\u30FC\u30BF\u69CB\u9020\u3092\u628A\u63E1`
|
|
455
457
|
}
|
|
456
458
|
});
|
|
@@ -501,6 +503,18 @@ async function listAdAccounts(proxyFetch) {
|
|
|
501
503
|
const data = await res.json();
|
|
502
504
|
return data.data ?? [];
|
|
503
505
|
}
|
|
506
|
+
async function fetchCampaignCount(proxyFetch, accountId) {
|
|
507
|
+
try {
|
|
508
|
+
const url = `${BASE_URL3}/act_${encodeURIComponent(accountId)}/campaigns?summary=total_count&limit=0`;
|
|
509
|
+
const res = await proxyFetch(url, { method: "GET" });
|
|
510
|
+
if (!res.ok) return null;
|
|
511
|
+
const data = await res.json();
|
|
512
|
+
const total = data.summary?.total_count;
|
|
513
|
+
return typeof total === "number" ? total : null;
|
|
514
|
+
} catch {
|
|
515
|
+
return null;
|
|
516
|
+
}
|
|
517
|
+
}
|
|
504
518
|
function bareAdAccountId(account) {
|
|
505
519
|
if (account.account_id) return account.account_id;
|
|
506
520
|
return (account.id ?? "").replace(/^act_/, "");
|
|
@@ -552,14 +566,21 @@ var metaAdsOauthSetupFlow = {
|
|
|
552
566
|
sections.push("_No ad accounts selected._", "");
|
|
553
567
|
return sections.join("\n");
|
|
554
568
|
}
|
|
555
|
-
sections.push("| Ad Account ID | Name | Currency | Status |");
|
|
556
|
-
sections.push("
|
|
557
|
-
|
|
569
|
+
sections.push("| Ad Account ID | Name | Currency | Status | Campaigns |");
|
|
570
|
+
sections.push("|---------------|------|----------|--------|-----------|");
|
|
571
|
+
const campaignCounts = await Promise.all(
|
|
572
|
+
targetIds.map((id) => fetchCampaignCount(rt.config.proxyFetch, id))
|
|
573
|
+
);
|
|
574
|
+
for (let i = 0; i < targetIds.length; i++) {
|
|
575
|
+
const id = targetIds[i];
|
|
558
576
|
const account = byId.get(id);
|
|
559
577
|
const name = (account?.name ?? "-").replace(/\|/g, "\\|");
|
|
560
578
|
const currency = account?.currency ?? "-";
|
|
561
579
|
const status = statusLabel(account?.account_status);
|
|
562
|
-
|
|
580
|
+
const campaigns = campaignCounts[i] == null ? "-" : String(campaignCounts[i]);
|
|
581
|
+
sections.push(
|
|
582
|
+
`| ${id} | ${name} | ${currency} | ${status} | ${campaigns} |`
|
|
583
|
+
);
|
|
563
584
|
}
|
|
564
585
|
sections.push("");
|
|
565
586
|
return sections.join("\n");
|
|
@@ -714,8 +735,8 @@ var metaAdsOauthConnector = new ConnectorPlugin({
|
|
|
714
735
|
systemPrompt: {
|
|
715
736
|
en: `### Tools
|
|
716
737
|
|
|
717
|
-
- \`
|
|
718
|
-
- \`
|
|
738
|
+
- \`connector_meta-ads-oauth_request\`: Send authenticated requests to the Meta Marketing API v21.0. The {adAccountId} placeholder in paths is automatically replaced. Authentication is handled automatically via OAuth proxy.
|
|
739
|
+
- \`connector_meta-ads-oauth_listAdAccounts\`: List accessible Meta ad accounts. Use this during setup to discover available accounts.
|
|
719
740
|
|
|
720
741
|
### Meta Marketing API Reference
|
|
721
742
|
|
|
@@ -771,8 +792,8 @@ const data = await res.json();
|
|
|
771
792
|
\`\`\``,
|
|
772
793
|
ja: `### \u30C4\u30FC\u30EB
|
|
773
794
|
|
|
774
|
-
- \`
|
|
775
|
-
- \`
|
|
795
|
+
- \`connector_meta-ads-oauth_request\`: Meta Marketing API v21.0\u3078\u8A8D\u8A3C\u6E08\u307F\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u9001\u4FE1\u3057\u307E\u3059\u3002\u30D1\u30B9\u5185\u306E{adAccountId}\u30D7\u30EC\u30FC\u30B9\u30DB\u30EB\u30C0\u30FC\u306F\u81EA\u52D5\u7684\u306B\u7F6E\u63DB\u3055\u308C\u307E\u3059\u3002\u8A8D\u8A3C\u306FOAuth\u30D7\u30ED\u30AD\u30B7\u7D4C\u7531\u3067\u81EA\u52D5\u7684\u306B\u51E6\u7406\u3055\u308C\u307E\u3059\u3002
|
|
796
|
+
- \`connector_meta-ads-oauth_listAdAccounts\`: \u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306AMeta\u5E83\u544A\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4E00\u89A7\u3092\u53D6\u5F97\u3057\u307E\u3059\u3002\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u6642\u306B\u5229\u7528\u53EF\u80FD\u306A\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u78BA\u8A8D\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002
|
|
776
797
|
|
|
777
798
|
### Meta Marketing API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
|
|
778
799
|
|
|
@@ -16,6 +16,7 @@ var init_parameter_definition = __esm({
|
|
|
16
16
|
type;
|
|
17
17
|
secret;
|
|
18
18
|
required;
|
|
19
|
+
isDeprecated;
|
|
19
20
|
constructor(config) {
|
|
20
21
|
this.slug = config.slug;
|
|
21
22
|
this.name = config.name;
|
|
@@ -24,6 +25,7 @@ var init_parameter_definition = __esm({
|
|
|
24
25
|
this.type = config.type;
|
|
25
26
|
this.secret = config.secret;
|
|
26
27
|
this.required = config.required;
|
|
28
|
+
this.isDeprecated = config.isDeprecated ?? false;
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
31
|
* Get the parameter value from a ConnectorConnectionObject.
|
|
@@ -240,7 +242,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
240
242
|
/**
|
|
241
243
|
* Create tools for connections that belong to this connector.
|
|
242
244
|
* Filters connections by connectorKey internally.
|
|
243
|
-
* Returns tools keyed as
|
|
245
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
244
246
|
*/
|
|
245
247
|
createTools(connections, config, opts) {
|
|
246
248
|
const myConnections = connections.filter(
|
|
@@ -250,7 +252,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
250
252
|
for (const t of Object.values(this.tools)) {
|
|
251
253
|
const tool = t.createTool(myConnections, config);
|
|
252
254
|
const originalToModelOutput = tool.toModelOutput;
|
|
253
|
-
result[
|
|
255
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
254
256
|
...tool,
|
|
255
257
|
toModelOutput: async (options) => {
|
|
256
258
|
if (!originalToModelOutput) {
|
|
@@ -478,11 +480,11 @@ var metaAdsOnboarding = new ConnectorOnboarding({
|
|
|
478
480
|
- Write only 1 sentence between tool calls, then immediately call the next tool. Skip unnecessary explanations and proceed efficiently`
|
|
479
481
|
},
|
|
480
482
|
dataOverviewInstructions: {
|
|
481
|
-
en: `1. Call
|
|
482
|
-
2. Call
|
|
483
|
+
en: `1. Call connector_meta-ads_request with GET act_{adAccountId}/campaigns?fields=id,name,status,objective to explore campaign data
|
|
484
|
+
2. Call connector_meta-ads_request with GET act_{adAccountId}/insights?fields=impressions,clicks,spend,ctr,cpm&date_preset=last_7d to check recent performance
|
|
483
485
|
3. Explore ad sets and ads as needed to understand the data structure`,
|
|
484
|
-
ja: `1.
|
|
485
|
-
2.
|
|
486
|
+
ja: `1. connector_meta-ads_request \u3067 GET act_{adAccountId}/campaigns?fields=id,name,status,objective \u3092\u547C\u3073\u51FA\u3057\u3066\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u30C7\u30FC\u30BF\u3092\u63A2\u7D22
|
|
487
|
+
2. connector_meta-ads_request \u3067 GET act_{adAccountId}/insights?fields=impressions,clicks,spend,ctr,cpm&date_preset=last_7d \u3092\u547C\u3073\u51FA\u3057\u3066\u76F4\u8FD1\u306E\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u3092\u78BA\u8A8D
|
|
486
488
|
3. \u5FC5\u8981\u306B\u5FDC\u3058\u3066\u5E83\u544A\u30BB\u30C3\u30C8\u3084\u5E83\u544A\u30C7\u30FC\u30BF\u3092\u63A2\u7D22\u3057\u3001\u30C7\u30FC\u30BF\u69CB\u9020\u3092\u628A\u63E1`
|
|
487
489
|
}
|
|
488
490
|
});
|
|
@@ -530,6 +532,20 @@ async function listAdAccounts(params) {
|
|
|
530
532
|
const data = await res.json();
|
|
531
533
|
return data.data ?? [];
|
|
532
534
|
}
|
|
535
|
+
async function fetchCampaignCount(params, accountId) {
|
|
536
|
+
try {
|
|
537
|
+
const res = await apiFetch(
|
|
538
|
+
params,
|
|
539
|
+
`/act_${encodeURIComponent(accountId)}/campaigns?summary=total_count&limit=0`
|
|
540
|
+
);
|
|
541
|
+
if (!res.ok) return null;
|
|
542
|
+
const data = await res.json();
|
|
543
|
+
const total = data.summary?.total_count;
|
|
544
|
+
return typeof total === "number" ? total : null;
|
|
545
|
+
} catch {
|
|
546
|
+
return null;
|
|
547
|
+
}
|
|
548
|
+
}
|
|
533
549
|
function bareAdAccountId(account) {
|
|
534
550
|
if (account.account_id) return account.account_id;
|
|
535
551
|
return (account.id ?? "").replace(/^act_/, "");
|
|
@@ -581,14 +597,21 @@ var metaAdsSetupFlow = {
|
|
|
581
597
|
sections.push("_No ad accounts selected._", "");
|
|
582
598
|
return sections.join("\n");
|
|
583
599
|
}
|
|
584
|
-
sections.push("| Ad Account ID | Name | Currency | Status |");
|
|
585
|
-
sections.push("
|
|
586
|
-
|
|
600
|
+
sections.push("| Ad Account ID | Name | Currency | Status | Campaigns |");
|
|
601
|
+
sections.push("|---------------|------|----------|--------|-----------|");
|
|
602
|
+
const campaignCounts = await Promise.all(
|
|
603
|
+
targetIds.map((id) => fetchCampaignCount(rt.params, id))
|
|
604
|
+
);
|
|
605
|
+
for (let i = 0; i < targetIds.length; i++) {
|
|
606
|
+
const id = targetIds[i];
|
|
587
607
|
const account = byId.get(id);
|
|
588
608
|
const name = (account?.name ?? "-").replace(/\|/g, "\\|");
|
|
589
609
|
const currency = account?.currency ?? "-";
|
|
590
610
|
const status = statusLabel(account?.account_status);
|
|
591
|
-
|
|
611
|
+
const campaigns = campaignCounts[i] == null ? "-" : String(campaignCounts[i]);
|
|
612
|
+
sections.push(
|
|
613
|
+
`| ${id} | ${name} | ${currency} | ${status} | ${campaigns} |`
|
|
614
|
+
);
|
|
592
615
|
}
|
|
593
616
|
sections.push("");
|
|
594
617
|
return sections.join("\n");
|
|
@@ -696,8 +719,8 @@ var metaAdsConnector = new ConnectorPlugin({
|
|
|
696
719
|
systemPrompt: {
|
|
697
720
|
en: `### Tools
|
|
698
721
|
|
|
699
|
-
- \`
|
|
700
|
-
- \`
|
|
722
|
+
- \`connector_meta-ads_request\`: Send authenticated requests to the Meta Marketing API v21.0. The {adAccountId} placeholder in paths is automatically replaced. Authentication is configured via the access token parameter.
|
|
723
|
+
- \`connector_meta-ads_listAdAccounts\`: List accessible Meta ad accounts. Use this during setup to discover available accounts.
|
|
701
724
|
|
|
702
725
|
### Meta Marketing API Reference
|
|
703
726
|
|
|
@@ -758,8 +781,8 @@ const accounts = await meta.listAdAccounts();
|
|
|
758
781
|
\`\`\``,
|
|
759
782
|
ja: `### \u30C4\u30FC\u30EB
|
|
760
783
|
|
|
761
|
-
- \`
|
|
762
|
-
- \`
|
|
784
|
+
- \`connector_meta-ads_request\`: Meta Marketing API v21.0\u3078\u8A8D\u8A3C\u6E08\u307F\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u9001\u4FE1\u3057\u307E\u3059\u3002\u30D1\u30B9\u5185\u306E{adAccountId}\u30D7\u30EC\u30FC\u30B9\u30DB\u30EB\u30C0\u30FC\u306F\u81EA\u52D5\u7684\u306B\u7F6E\u63DB\u3055\u308C\u307E\u3059\u3002\u8A8D\u8A3C\u306F\u30A2\u30AF\u30BB\u30B9\u30C8\u30FC\u30AF\u30F3\u30D1\u30E9\u30E1\u30FC\u30BF\u3067\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002
|
|
785
|
+
- \`connector_meta-ads_listAdAccounts\`: \u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306AMeta\u5E83\u544A\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u4E00\u89A7\u3092\u53D6\u5F97\u3057\u307E\u3059\u3002\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u6642\u306B\u5229\u7528\u53EF\u80FD\u306A\u30A2\u30AB\u30A6\u30F3\u30C8\u3092\u78BA\u8A8D\u3059\u308B\u305F\u3081\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002
|
|
763
786
|
|
|
764
787
|
### Meta Marketing API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
|
|
765
788
|
|
|
@@ -16,6 +16,7 @@ var init_parameter_definition = __esm({
|
|
|
16
16
|
type;
|
|
17
17
|
secret;
|
|
18
18
|
required;
|
|
19
|
+
isDeprecated;
|
|
19
20
|
constructor(config) {
|
|
20
21
|
this.slug = config.slug;
|
|
21
22
|
this.name = config.name;
|
|
@@ -24,6 +25,7 @@ var init_parameter_definition = __esm({
|
|
|
24
25
|
this.type = config.type;
|
|
25
26
|
this.secret = config.secret;
|
|
26
27
|
this.required = config.required;
|
|
28
|
+
this.isDeprecated = config.isDeprecated ?? false;
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
31
|
* Get the parameter value from a ConnectorConnectionObject.
|
|
@@ -332,7 +334,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
332
334
|
/**
|
|
333
335
|
* Create tools for connections that belong to this connector.
|
|
334
336
|
* Filters connections by connectorKey internally.
|
|
335
|
-
* Returns tools keyed as
|
|
337
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
336
338
|
*/
|
|
337
339
|
createTools(connections, config, opts) {
|
|
338
340
|
const myConnections = connections.filter(
|
|
@@ -342,7 +344,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
342
344
|
for (const t of Object.values(this.tools)) {
|
|
343
345
|
const tool = t.createTool(myConnections, config);
|
|
344
346
|
const originalToModelOutput = tool.toModelOutput;
|
|
345
|
-
result[
|
|
347
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
346
348
|
...tool,
|
|
347
349
|
toModelOutput: async (options) => {
|
|
348
350
|
if (!originalToModelOutput) {
|
|
@@ -471,15 +473,15 @@ var mixpanelOnboarding = new ConnectorOnboarding({
|
|
|
471
473
|
- US (default): https://mixpanel.com/api/query (Query API), https://data.mixpanel.com/api/2.0/export (Export API)
|
|
472
474
|
- EU: https://eu.mixpanel.com/api/query, https://data-eu.mixpanel.com/api/2.0/export
|
|
473
475
|
- India: https://in.mixpanel.com/api/query, https://data-in.mixpanel.com/api/2.0/export
|
|
474
|
-
2. Call
|
|
475
|
-
3. Call
|
|
476
|
+
2. Call connector_mixpanel_request with GET {exportBase}?from_date=YYYY-MM-DD&to_date=YYYY-MM-DD (use a short recent date range, e.g. 1-2 days) to export raw events and discover available event types and properties
|
|
477
|
+
3. Call connector_mixpanel_request with POST {queryBase}/engage to query user profiles and understand user properties
|
|
476
478
|
NOTE: The Query API endpoints (insights, funnels, retention) require a bookmark_id or funnel_id from existing reports in Mixpanel. Use the Export API to retrieve raw events and aggregate in code if you need ad-hoc analysis.`,
|
|
477
479
|
ja: `1. \u63A5\u7D9A\u306Eregion\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u78BA\u8A8D\u3057\u3066\u30D9\u30FC\u30B9URL\u3092\u6C7A\u5B9A\uFF1A
|
|
478
480
|
- US\uFF08\u30C7\u30D5\u30A9\u30EB\u30C8\uFF09: https://mixpanel.com/api/query\uFF08Query API\uFF09\u3001https://data.mixpanel.com/api/2.0/export\uFF08Export API\uFF09
|
|
479
481
|
- EU: https://eu.mixpanel.com/api/query\u3001https://data-eu.mixpanel.com/api/2.0/export
|
|
480
482
|
- India: https://in.mixpanel.com/api/query\u3001https://data-in.mixpanel.com/api/2.0/export
|
|
481
|
-
2.
|
|
482
|
-
3.
|
|
483
|
+
2. connector_mixpanel_request \u3067 GET {exportBase}?from_date=YYYY-MM-DD&to_date=YYYY-MM-DD \u3092\u547C\u3073\u51FA\u3057\uFF08\u76F4\u8FD11-2\u65E5\u306E\u77ED\u3044\u671F\u9593\u3092\u4F7F\u7528\uFF09\u3001\u751F\u30A4\u30D9\u30F3\u30C8\u3092\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3057\u3066\u5229\u7528\u53EF\u80FD\u306A\u30A4\u30D9\u30F3\u30C8\u30BF\u30A4\u30D7\u3068\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u78BA\u8A8D
|
|
484
|
+
3. connector_mixpanel_request \u3067 POST {queryBase}/engage \u3092\u547C\u3073\u51FA\u3057\u3001\u30E6\u30FC\u30B6\u30FC\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u3092\u7167\u4F1A\u3057\u3066\u30E6\u30FC\u30B6\u30FC\u30D7\u30ED\u30D1\u30C6\u30A3\u3092\u628A\u63E1
|
|
483
485
|
\u6CE8\u610F: Query API\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\uFF08insights\u3001funnels\u3001retention\uFF09\u306FMixpanel\u5185\u306E\u65E2\u5B58\u30EC\u30DD\u30FC\u30C8\u306Ebookmark_id\u307E\u305F\u306Ffunnel_id\u304C\u5FC5\u8981\u3067\u3059\u3002\u30A2\u30C9\u30DB\u30C3\u30AF\u5206\u6790\u304C\u5FC5\u8981\u306A\u5834\u5408\u306F\u3001Export API\u3067\u751F\u30A4\u30D9\u30F3\u30C8\u3092\u53D6\u5F97\u3057\u3001\u30B3\u30FC\u30C9\u4E0A\u3067\u96C6\u8A08\u3057\u3066\u304F\u3060\u3055\u3044\u3002`
|
|
484
486
|
}
|
|
485
487
|
});
|
|
@@ -755,7 +757,7 @@ var mixpanelConnector = new ConnectorPlugin({
|
|
|
755
757
|
systemPrompt: {
|
|
756
758
|
en: `### Tools
|
|
757
759
|
|
|
758
|
-
- \`
|
|
760
|
+
- \`connector_mixpanel_request\`: The only way to call the Mixpanel REST API. Use it for exporting raw events, querying insights/funnels/retention reports, and querying user profiles. Authentication (Basic auth with Service Account username + secret) is configured automatically. The project_id query parameter is appended automatically. Provide the full URL including query parameters \u2014 the base URL varies by region and endpoint type.
|
|
759
761
|
|
|
760
762
|
### Business Logic
|
|
761
763
|
|
|
@@ -814,7 +816,7 @@ export default async function handler(c: Context) {
|
|
|
814
816
|
IMPORTANT: The Insights endpoint requires a bookmark_id from an existing report in the Mixpanel UI. For ad-hoc event analysis, use the Export API to retrieve raw events and aggregate them in code. The Export API is the most flexible and universally accessible endpoint.`,
|
|
815
817
|
ja: `### \u30C4\u30FC\u30EB
|
|
816
818
|
|
|
817
|
-
- \`
|
|
819
|
+
- \`connector_mixpanel_request\`: Mixpanel REST API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u751F\u30A4\u30D9\u30F3\u30C8\u306E\u30A8\u30AF\u30B9\u30DD\u30FC\u30C8\u3001\u30A4\u30F3\u30B5\u30A4\u30C8/\u30D5\u30A1\u30CD\u30EB/\u30EA\u30C6\u30F3\u30B7\u30E7\u30F3\u30EC\u30DD\u30FC\u30C8\u306E\u7167\u4F1A\u3001\u30E6\u30FC\u30B6\u30FC\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB\u306E\u7167\u4F1A\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u8A8D\u8A3C\uFF08Service Account\u306E\u30E6\u30FC\u30B6\u30FC\u540D+\u30B7\u30FC\u30AF\u30EC\u30C3\u30C8\u306B\u3088\u308BBasic\u8A8D\u8A3C\uFF09\u306F\u81EA\u52D5\u7684\u306B\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002project_id\u30AF\u30A8\u30EA\u30D1\u30E9\u30E1\u30FC\u30BF\u306F\u81EA\u52D5\u7684\u306B\u4ED8\u52A0\u3055\u308C\u307E\u3059\u3002\u30AF\u30A8\u30EA\u30D1\u30E9\u30E1\u30FC\u30BF\u3092\u542B\u3080\u5B8C\u5168\u306AURL\u3092\u6307\u5B9A\u3057\u3066\u304F\u3060\u3055\u3044 \u2014 \u30D9\u30FC\u30B9URL\u306F\u30EA\u30FC\u30B8\u30E7\u30F3\u3068\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u30BF\u30A4\u30D7\u306B\u3088\u3063\u3066\u7570\u306A\u308A\u307E\u3059\u3002
|
|
818
820
|
|
|
819
821
|
### Business Logic
|
|
820
822
|
|
|
@@ -16,6 +16,7 @@ var init_parameter_definition = __esm({
|
|
|
16
16
|
type;
|
|
17
17
|
secret;
|
|
18
18
|
required;
|
|
19
|
+
isDeprecated;
|
|
19
20
|
constructor(config) {
|
|
20
21
|
this.slug = config.slug;
|
|
21
22
|
this.name = config.name;
|
|
@@ -24,6 +25,7 @@ var init_parameter_definition = __esm({
|
|
|
24
25
|
this.type = config.type;
|
|
25
26
|
this.secret = config.secret;
|
|
26
27
|
this.required = config.required;
|
|
28
|
+
this.isDeprecated = config.isDeprecated ?? false;
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
31
|
* Get the parameter value from a ConnectorConnectionObject.
|
|
@@ -362,7 +364,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
362
364
|
/**
|
|
363
365
|
* Create tools for connections that belong to this connector.
|
|
364
366
|
* Filters connections by connectorKey internally.
|
|
365
|
-
* Returns tools keyed as
|
|
367
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
366
368
|
*/
|
|
367
369
|
createTools(connections, config, opts) {
|
|
368
370
|
const myConnections = connections.filter(
|
|
@@ -372,7 +374,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
372
374
|
for (const t of Object.values(this.tools)) {
|
|
373
375
|
const tool = t.createTool(myConnections, config);
|
|
374
376
|
const originalToModelOutput = tool.toModelOutput;
|
|
375
|
-
result[
|
|
377
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
376
378
|
...tool,
|
|
377
379
|
toModelOutput: async (options) => {
|
|
378
380
|
if (!originalToModelOutput) {
|
|
@@ -502,13 +504,13 @@ var AUTH_TYPES = {
|
|
|
502
504
|
// ../connectors/src/connectors/monday/setup.ts
|
|
503
505
|
var mondayOnboarding = new ConnectorOnboarding({
|
|
504
506
|
dataOverviewInstructions: {
|
|
505
|
-
en: `1. Call
|
|
506
|
-
2. Call
|
|
507
|
-
3. For a target board, call
|
|
507
|
+
en: `1. Call connector_monday_request with query \`{ me { id name email account { id name } } }\` to verify the token and identify the account
|
|
508
|
+
2. Call connector_monday_request with query \`{ boards(limit: 10) { id name state board_kind workspace { id name } } }\` to list boards
|
|
509
|
+
3. For a target board, call connector_monday_request with query \`{ boards(ids: [BOARD_ID]) { id name columns { id title type settings_str } } }\` to inspect column definitions
|
|
508
510
|
4. Sample items with \`{ boards(ids: [BOARD_ID]) { items_page(limit: 5) { cursor items { id name created_at updated_at column_values { id text value } } } } }\`
|
|
509
511
|
5. Explore other resources (workspaces, users, tags) as needed`,
|
|
510
|
-
ja: `1.
|
|
511
|
-
2.
|
|
512
|
+
ja: `1. connector_monday_request \u3067\u30AF\u30A8\u30EA \`{ me { id name email account { id name } } }\` \u3092\u547C\u3073\u51FA\u3057\u3001\u30C8\u30FC\u30AF\u30F3\u306E\u691C\u8A3C\u3068\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u78BA\u8A8D
|
|
513
|
+
2. connector_monday_request \u3067\u30AF\u30A8\u30EA \`{ boards(limit: 10) { id name state board_kind workspace { id name } } }\` \u3092\u547C\u3073\u51FA\u3057\u3001\u30DC\u30FC\u30C9\u4E00\u89A7\u3092\u53D6\u5F97
|
|
512
514
|
3. \u5BFE\u8C61\u30DC\u30FC\u30C9\u306B\u5BFE\u3057\u3066 \`{ boards(ids: [BOARD_ID]) { id name columns { id title type settings_str } } }\` \u3092\u547C\u3073\u51FA\u3057\u3001\u30AB\u30E9\u30E0\u5B9A\u7FA9\u3092\u78BA\u8A8D
|
|
513
515
|
4. \`{ boards(ids: [BOARD_ID]) { items_page(limit: 5) { cursor items { id name created_at updated_at column_values { id text value } } } } }\` \u3067\u30A2\u30A4\u30C6\u30E0\u3092\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0
|
|
514
516
|
5. \u5FC5\u8981\u306B\u5FDC\u3058\u3066\u4ED6\u306E\u30EA\u30BD\u30FC\u30B9\uFF08workspaces\u3001users\u3001tags\uFF09\u3092\u63A2\u7D22`
|
|
@@ -771,7 +773,7 @@ var mondayConnector = new ConnectorPlugin({
|
|
|
771
773
|
systemPrompt: {
|
|
772
774
|
en: `### Tools
|
|
773
775
|
|
|
774
|
-
- \`
|
|
776
|
+
- \`connector_monday_request\`: The only way to call the monday.com GraphQL API. Use it to query and mutate all monday.com resources: boards, items, groups, columns, column values, users, workspaces, tags, teams, and updates. Authentication is configured automatically. monday.com's API is GraphQL-only \u2014 send a query string and optional variables. Items on a board are paginated with cursor-based \`items_page(limit, cursor)\`; boards/users/workspaces use page-based \`limit\`/\`page\`. IDs are passed as the GraphQL \`ID\` scalar (string).
|
|
775
777
|
|
|
776
778
|
### Business Logic
|
|
777
779
|
|
|
@@ -861,7 +863,7 @@ const items = res.data?.boards?.[0]?.items_page?.items; // always undefined!
|
|
|
861
863
|
- Some fields (e.g. \`board.tags\`) are only populated for boards that explicitly use them.`,
|
|
862
864
|
ja: `### \u30C4\u30FC\u30EB
|
|
863
865
|
|
|
864
|
-
- \`
|
|
866
|
+
- \`connector_monday_request\`: monday.com GraphQL API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u30DC\u30FC\u30C9\u3001\u30A2\u30A4\u30C6\u30E0\u3001\u30B0\u30EB\u30FC\u30D7\u3001\u30AB\u30E9\u30E0\u3001\u30AB\u30E9\u30E0\u5024\u3001\u30E6\u30FC\u30B6\u30FC\u3001\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u3001\u30BF\u30B0\u3001\u30C1\u30FC\u30E0\u3001\u30A2\u30C3\u30D7\u30C7\u30FC\u30C8\u306A\u3069\u3059\u3079\u3066\u306E\u30EA\u30BD\u30FC\u30B9\u306E\u30AF\u30A8\u30EA\u3068\u30DF\u30E5\u30FC\u30C6\u30FC\u30B7\u30E7\u30F3\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u8A8D\u8A3C\u306F\u81EA\u52D5\u7684\u306B\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002monday.com \u306E API \u306F GraphQL \u306E\u307F\u3067\u3001\u30AF\u30A8\u30EA\u6587\u5B57\u5217\u3068\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5909\u6570\u3092\u9001\u4FE1\u3057\u307E\u3059\u3002\u30DC\u30FC\u30C9\u4E0A\u306E\u30A2\u30A4\u30C6\u30E0\u306F\u30AB\u30FC\u30BD\u30EB\u30D9\u30FC\u30B9\u306E \`items_page(limit, cursor)\` \u3067\u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3\u3055\u308C\u3001\u30DC\u30FC\u30C9\uFF0F\u30E6\u30FC\u30B6\u30FC\uFF0F\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u306F\u30DA\u30FC\u30B8\u30D9\u30FC\u30B9\u306E \`limit\`/\`page\` \u3092\u4F7F\u7528\u3057\u307E\u3059\u3002ID \u306F GraphQL \u306E \`ID\` \u30B9\u30AB\u30E9\u30FC\uFF08\u6587\u5B57\u5217\uFF09\u3068\u3057\u3066\u6E21\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
|
865
867
|
|
|
866
868
|
### Business Logic
|
|
867
869
|
|
|
@@ -16,6 +16,7 @@ var init_parameter_definition = __esm({
|
|
|
16
16
|
type;
|
|
17
17
|
secret;
|
|
18
18
|
required;
|
|
19
|
+
isDeprecated;
|
|
19
20
|
constructor(config) {
|
|
20
21
|
this.slug = config.slug;
|
|
21
22
|
this.name = config.name;
|
|
@@ -24,6 +25,7 @@ var init_parameter_definition = __esm({
|
|
|
24
25
|
this.type = config.type;
|
|
25
26
|
this.secret = config.secret;
|
|
26
27
|
this.required = config.required;
|
|
28
|
+
this.isDeprecated = config.isDeprecated ?? false;
|
|
27
29
|
}
|
|
28
30
|
/**
|
|
29
31
|
* Get the parameter value from a ConnectorConnectionObject.
|
|
@@ -267,7 +269,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
267
269
|
/**
|
|
268
270
|
* Create tools for connections that belong to this connector.
|
|
269
271
|
* Filters connections by connectorKey internally.
|
|
270
|
-
* Returns tools keyed as
|
|
272
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
271
273
|
*/
|
|
272
274
|
createTools(connections, config, opts) {
|
|
273
275
|
const myConnections = connections.filter(
|
|
@@ -277,7 +279,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
277
279
|
for (const t of Object.values(this.tools)) {
|
|
278
280
|
const tool = t.createTool(myConnections, config);
|
|
279
281
|
const originalToModelOutput = tool.toModelOutput;
|
|
280
|
-
result[
|
|
282
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
281
283
|
...tool,
|
|
282
284
|
toModelOutput: async (options) => {
|
|
283
285
|
if (!originalToModelOutput) {
|
|
@@ -840,9 +842,9 @@ var mongodbConnector = new ConnectorPlugin({
|
|
|
840
842
|
systemPrompt: {
|
|
841
843
|
en: `### Tools
|
|
842
844
|
|
|
843
|
-
- \`
|
|
844
|
-
- \`
|
|
845
|
-
- \`
|
|
845
|
+
- \`connector_mongodb_listCollections\`: Lists all collections in the database. Use this first to explore available data.
|
|
846
|
+
- \`connector_mongodb_find\`: Finds documents in a collection with optional filter, projection, sort, and limit. Use for data sampling and querying specific documents. Pass filter, projection, and sort as JSON strings.
|
|
847
|
+
- \`connector_mongodb_aggregate\`: Runs a MongoDB aggregation pipeline on a collection. Use for complex data analysis, grouping, joining, and transformations. Pass pipeline as a JSON string.
|
|
846
848
|
|
|
847
849
|
### Business Logic
|
|
848
850
|
|
|
@@ -895,9 +897,9 @@ export default async function handler(_c: Context) {
|
|
|
895
897
|
- Always include limit in find queries and $limit in aggregation pipelines`,
|
|
896
898
|
ja: `### \u30C4\u30FC\u30EB
|
|
897
899
|
|
|
898
|
-
- \`
|
|
899
|
-
- \`
|
|
900
|
-
- \`
|
|
900
|
+
- \`connector_mongodb_listCollections\`: \u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u5185\u306E\u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u4E00\u89A7\u3092\u53D6\u5F97\u3057\u307E\u3059\u3002\u30C7\u30FC\u30BF\u63A2\u7D22\u306E\u6700\u521D\u306E\u30B9\u30C6\u30C3\u30D7\u3068\u3057\u3066\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
|
901
|
+
- \`connector_mongodb_find\`: \u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u5185\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u691C\u7D22\u3057\u307E\u3059\u3002\u30D5\u30A3\u30EB\u30BF\u30FC\u3001\u30D7\u30ED\u30B8\u30A7\u30AF\u30B7\u30E7\u30F3\u3001\u30BD\u30FC\u30C8\u3001\u5236\u9650\u3092\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u6307\u5B9A\u53EF\u80FD\u3002\u30C7\u30FC\u30BF\u306E\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0\u3084\u7279\u5B9A\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30AF\u30A8\u30EA\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002filter\u3001projection\u3001sort\u306FJSON\u6587\u5B57\u5217\u3067\u6E21\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
|
902
|
+
- \`connector_mongodb_aggregate\`: \u30B3\u30EC\u30AF\u30B7\u30E7\u30F3\u4E0A\u3067MongoDB\u96C6\u7D04\u30D1\u30A4\u30D7\u30E9\u30A4\u30F3\u3092\u5B9F\u884C\u3057\u307E\u3059\u3002\u8907\u96D1\u306A\u30C7\u30FC\u30BF\u5206\u6790\u3001\u30B0\u30EB\u30FC\u30D7\u5316\u3001\u7D50\u5408\u3001\u5909\u63DB\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002pipeline\u306FJSON\u6587\u5B57\u5217\u3067\u6E21\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
|
901
903
|
|
|
902
904
|
### Business Logic
|
|
903
905
|
|