@squadbase/vite-server 0.1.17-dev.3b633bb → 0.1.17-dev.423ee34
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 +3307 -739
- 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 +20 -20
- package/dist/connectors/powerbi-oauth.js +12 -12
- 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 +16 -14
- 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 +3336 -743
- package/dist/main.js +3325 -737
- package/dist/vite-plugin.js +3305 -737
- package/package.json +1 -1
|
@@ -118,7 +118,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
118
118
|
/**
|
|
119
119
|
* Create tools for connections that belong to this connector.
|
|
120
120
|
* Filters connections by connectorKey internally.
|
|
121
|
-
* Returns tools keyed as
|
|
121
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
122
122
|
*/
|
|
123
123
|
createTools(connections, config, opts) {
|
|
124
124
|
const myConnections = connections.filter(
|
|
@@ -128,7 +128,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
128
128
|
for (const t of Object.values(this.tools)) {
|
|
129
129
|
const tool = t.createTool(myConnections, config);
|
|
130
130
|
const originalToModelOutput = tool.toModelOutput;
|
|
131
|
-
result[
|
|
131
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
132
132
|
...tool,
|
|
133
133
|
toModelOutput: async (options) => {
|
|
134
134
|
if (!originalToModelOutput) {
|
|
@@ -395,13 +395,13 @@ var notionOauthOnboarding = new ConnectorOnboarding({
|
|
|
395
395
|
- Write only 1 sentence between tool calls, then immediately call the next tool. Skip unnecessary explanations and proceed efficiently`
|
|
396
396
|
},
|
|
397
397
|
dataOverviewInstructions: {
|
|
398
|
-
en: `1. Call
|
|
399
|
-
2. For each database found, call
|
|
400
|
-
3. Call
|
|
398
|
+
en: `1. Call connector_notion-oauth_request with POST /search and { "page_size": 5 } to discover available pages and databases
|
|
399
|
+
2. For each database found, call connector_notion-oauth_request with POST /databases/{database_id}/query and { "page_size": 5 } to sample records
|
|
400
|
+
3. Call connector_notion-oauth_request with GET /users to list workspace members
|
|
401
401
|
4. Explore page content with GET /blocks/{page_id}/children as needed`,
|
|
402
|
-
ja: `1.
|
|
403
|
-
2. \u898B\u3064\u304B\u3063\u305F\u5404\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u306B\u3064\u3044\u3066\
|
|
404
|
-
3.
|
|
402
|
+
ja: `1. connector_notion-oauth_request \u3067 POST /search \u3092 { "page_size": 5 } \u3067\u547C\u3073\u51FA\u3057\u3001\u5229\u7528\u53EF\u80FD\u306A\u30DA\u30FC\u30B8\u3068\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3092\u691C\u51FA
|
|
403
|
+
2. \u898B\u3064\u304B\u3063\u305F\u5404\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u306B\u3064\u3044\u3066\u3001connector_notion-oauth_request \u3067 POST /databases/{database_id}/query \u3092 { "page_size": 5 } \u3067\u547C\u3073\u51FA\u3057\u3001\u30EC\u30B3\u30FC\u30C9\u3092\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0
|
|
404
|
+
3. connector_notion-oauth_request \u3067 GET /users \u3092\u547C\u3073\u51FA\u3057\u3001\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u30E1\u30F3\u30D0\u30FC\u3092\u4E00\u89A7\u8868\u793A
|
|
405
405
|
4. \u5FC5\u8981\u306B\u5FDC\u3058\u3066 GET /blocks/{page_id}/children \u3067\u30DA\u30FC\u30B8\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u63A2\u7D22`
|
|
406
406
|
}
|
|
407
407
|
});
|
|
@@ -465,6 +465,38 @@ async function getDatabase(proxyFetch, databaseId) {
|
|
|
465
465
|
}
|
|
466
466
|
return await res.json();
|
|
467
467
|
}
|
|
468
|
+
async function queryDatabaseSample(proxyFetch, databaseId) {
|
|
469
|
+
try {
|
|
470
|
+
const res = await apiFetch(proxyFetch, `/databases/${databaseId}/query`, {
|
|
471
|
+
method: "POST",
|
|
472
|
+
body: JSON.stringify({ page_size: 3 })
|
|
473
|
+
});
|
|
474
|
+
if (!res.ok) return [];
|
|
475
|
+
const data = await res.json();
|
|
476
|
+
return data.results ?? [];
|
|
477
|
+
} catch {
|
|
478
|
+
return [];
|
|
479
|
+
}
|
|
480
|
+
}
|
|
481
|
+
function formatPropertyValue(prop) {
|
|
482
|
+
if (prop == null || typeof prop !== "object") return "";
|
|
483
|
+
const p = prop;
|
|
484
|
+
const t = p.type ?? "";
|
|
485
|
+
const v = p[t];
|
|
486
|
+
if (v == null) return "";
|
|
487
|
+
if (typeof v === "string" || typeof v === "number" || typeof v === "boolean")
|
|
488
|
+
return String(v);
|
|
489
|
+
if (Array.isArray(v)) {
|
|
490
|
+
if (v.length === 0) return "";
|
|
491
|
+
const first = v[0];
|
|
492
|
+
return first.plain_text ?? first.name ?? `[${v.length} items]`;
|
|
493
|
+
}
|
|
494
|
+
if (typeof v === "object") {
|
|
495
|
+
const o = v;
|
|
496
|
+
return o.name ?? o.plain_text ?? o.start ?? JSON.stringify(v).slice(0, 30);
|
|
497
|
+
}
|
|
498
|
+
return String(v);
|
|
499
|
+
}
|
|
468
500
|
var notionOauthSetupFlow = {
|
|
469
501
|
initialState: () => ({}),
|
|
470
502
|
steps: [
|
|
@@ -509,11 +541,28 @@ var notionOauthSetupFlow = {
|
|
|
509
541
|
sections.push(`### Database: ${title}`, "", `- id: \`${db.id}\``, "");
|
|
510
542
|
sections.push("| Property | Type |");
|
|
511
543
|
sections.push("|----------|------|");
|
|
512
|
-
|
|
544
|
+
const propEntries = Object.entries(db.properties ?? {});
|
|
545
|
+
for (const [name, def] of propEntries) {
|
|
513
546
|
const escapedName = name.replace(/\|/g, "\\|");
|
|
514
547
|
sections.push(`| ${escapedName} | ${def?.type ?? "-"} |`);
|
|
515
548
|
}
|
|
516
549
|
sections.push("");
|
|
550
|
+
const pages = await queryDatabaseSample(rt.config.proxyFetch, dbId);
|
|
551
|
+
if (pages.length > 0) {
|
|
552
|
+
const sampleProps = propEntries.slice(0, 5).map(([n]) => n);
|
|
553
|
+
if (sampleProps.length > 0) {
|
|
554
|
+
sections.push(`#### Sample pages (${pages.length})`, "");
|
|
555
|
+
sections.push(`| ${sampleProps.join(" | ")} |`);
|
|
556
|
+
sections.push(`| ${sampleProps.map(() => "---").join(" | ")} |`);
|
|
557
|
+
for (const page of pages) {
|
|
558
|
+
const cells = sampleProps.map(
|
|
559
|
+
(n) => formatPropertyValue(page.properties?.[n]).replace(/\|/g, "\\|")
|
|
560
|
+
);
|
|
561
|
+
sections.push(`| ${cells.join(" | ")} |`);
|
|
562
|
+
}
|
|
563
|
+
sections.push("");
|
|
564
|
+
}
|
|
565
|
+
}
|
|
517
566
|
}
|
|
518
567
|
return sections.join("\n");
|
|
519
568
|
}
|
|
@@ -543,7 +592,7 @@ var notionOauthConnector = new ConnectorPlugin({
|
|
|
543
592
|
systemPrompt: {
|
|
544
593
|
en: `### Tools
|
|
545
594
|
|
|
546
|
-
- \`
|
|
595
|
+
- \`connector_notion-oauth_request\`: The only way to call the Notion API. Use it to search pages and databases, query database records, retrieve page content and blocks, and manage workspace data. Authentication is configured automatically via OAuth. Notion-Version header is set automatically. Pagination uses cursor-based \`start_cursor\` and \`page_size\` (max 100) with \`has_more\` and \`next_cursor\` in the response.
|
|
547
596
|
|
|
548
597
|
### Notion API Reference
|
|
549
598
|
|
|
@@ -593,7 +642,7 @@ const data = await res.json();
|
|
|
593
642
|
\`\`\``,
|
|
594
643
|
ja: `### \u30C4\u30FC\u30EB
|
|
595
644
|
|
|
596
|
-
- \`
|
|
645
|
+
- \`connector_notion-oauth_request\`: Notion API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u30DA\u30FC\u30B8\u3084\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u306E\u691C\u7D22\u3001\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30EC\u30B3\u30FC\u30C9\u306E\u30AF\u30A8\u30EA\u3001\u30DA\u30FC\u30B8\u30B3\u30F3\u30C6\u30F3\u30C4\u3084\u30D6\u30ED\u30C3\u30AF\u306E\u53D6\u5F97\u3001\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u30C7\u30FC\u30BF\u306E\u7BA1\u7406\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002OAuth\u7D4C\u7531\u3067\u8A8D\u8A3C\u306F\u81EA\u52D5\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002Notion-Version\u30D8\u30C3\u30C0\u30FC\u3082\u81EA\u52D5\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002\u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3\u306F\u30EC\u30B9\u30DD\u30F3\u30B9\u306E \`has_more\` \u3068 \`next_cursor\` \u306B\u3088\u308B\u30AB\u30FC\u30BD\u30EB\u30D9\u30FC\u30B9\u3067\u3001\`start_cursor\` \u3068 \`page_size\`\uFF08\u6700\u5927100\uFF09\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002
|
|
597
646
|
|
|
598
647
|
### Notion API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
|
|
599
648
|
|
|
@@ -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.
|
|
@@ -282,7 +284,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
282
284
|
/**
|
|
283
285
|
* Create tools for connections that belong to this connector.
|
|
284
286
|
* Filters connections by connectorKey internally.
|
|
285
|
-
* Returns tools keyed as
|
|
287
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
286
288
|
*/
|
|
287
289
|
createTools(connections, config, opts) {
|
|
288
290
|
const myConnections = connections.filter(
|
|
@@ -292,7 +294,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
292
294
|
for (const t of Object.values(this.tools)) {
|
|
293
295
|
const tool = t.createTool(myConnections, config);
|
|
294
296
|
const originalToModelOutput = tool.toModelOutput;
|
|
295
|
-
result[
|
|
297
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
296
298
|
...tool,
|
|
297
299
|
toModelOutput: async (options) => {
|
|
298
300
|
if (!originalToModelOutput) {
|
|
@@ -422,13 +424,13 @@ var AUTH_TYPES = {
|
|
|
422
424
|
// ../connectors/src/connectors/notion/setup.ts
|
|
423
425
|
var notionOnboarding = new ConnectorOnboarding({
|
|
424
426
|
dataOverviewInstructions: {
|
|
425
|
-
en: `1. Call
|
|
426
|
-
2. For each database found, call
|
|
427
|
-
3. Call
|
|
427
|
+
en: `1. Call connector_notion_request with POST /search and { "page_size": 5 } to discover available pages and databases
|
|
428
|
+
2. For each database found, call connector_notion_request with POST /databases/{database_id}/query and { "page_size": 5 } to sample records and understand the schema
|
|
429
|
+
3. Call connector_notion_request with GET /users to list workspace members
|
|
428
430
|
4. Explore page content with GET /blocks/{page_id}/children as needed`,
|
|
429
|
-
ja: `1.
|
|
430
|
-
2. \u898B\u3064\u304B\u3063\u305F\u5404\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u306B\u3064\u3044\u3066\
|
|
431
|
-
3.
|
|
431
|
+
ja: `1. connector_notion_request \u3067 POST /search \u3092 { "page_size": 5 } \u3067\u547C\u3073\u51FA\u3057\u3001\u5229\u7528\u53EF\u80FD\u306A\u30DA\u30FC\u30B8\u3068\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u3092\u691C\u51FA
|
|
432
|
+
2. \u898B\u3064\u304B\u3063\u305F\u5404\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u306B\u3064\u3044\u3066\u3001connector_notion_request \u3067 POST /databases/{database_id}/query \u3092 { "page_size": 5 } \u3067\u547C\u3073\u51FA\u3057\u3001\u30EC\u30B3\u30FC\u30C9\u306E\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0\u3068\u30B9\u30AD\u30FC\u30DE\u306E\u628A\u63E1\u3092\u884C\u3046
|
|
433
|
+
3. connector_notion_request \u3067 GET /users \u3092\u547C\u3073\u51FA\u3057\u3001\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u30E1\u30F3\u30D0\u30FC\u3092\u4E00\u89A7\u8868\u793A
|
|
432
434
|
4. \u5FC5\u8981\u306B\u5FDC\u3058\u3066 GET /blocks/{page_id}/children \u3067\u30DA\u30FC\u30B8\u30B3\u30F3\u30C6\u30F3\u30C4\u3092\u63A2\u7D22`
|
|
433
435
|
}
|
|
434
436
|
});
|
|
@@ -492,6 +494,38 @@ async function getDatabase(params, databaseId) {
|
|
|
492
494
|
}
|
|
493
495
|
return await res.json();
|
|
494
496
|
}
|
|
497
|
+
async function queryDatabaseSample(params, databaseId) {
|
|
498
|
+
try {
|
|
499
|
+
const res = await apiFetch(params, `/databases/${databaseId}/query`, {
|
|
500
|
+
method: "POST",
|
|
501
|
+
body: JSON.stringify({ page_size: 3 })
|
|
502
|
+
});
|
|
503
|
+
if (!res.ok) return [];
|
|
504
|
+
const data = await res.json();
|
|
505
|
+
return data.results ?? [];
|
|
506
|
+
} catch {
|
|
507
|
+
return [];
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
function formatPropertyValue(prop) {
|
|
511
|
+
if (prop == null || typeof prop !== "object") return "";
|
|
512
|
+
const p = prop;
|
|
513
|
+
const t = p.type ?? "";
|
|
514
|
+
const v = p[t];
|
|
515
|
+
if (v == null) return "";
|
|
516
|
+
if (typeof v === "string" || typeof v === "number" || typeof v === "boolean")
|
|
517
|
+
return String(v);
|
|
518
|
+
if (Array.isArray(v)) {
|
|
519
|
+
if (v.length === 0) return "";
|
|
520
|
+
const first = v[0];
|
|
521
|
+
return first.plain_text ?? first.name ?? `[${v.length} items]`;
|
|
522
|
+
}
|
|
523
|
+
if (typeof v === "object") {
|
|
524
|
+
const o = v;
|
|
525
|
+
return o.name ?? o.plain_text ?? o.start ?? JSON.stringify(v).slice(0, 30);
|
|
526
|
+
}
|
|
527
|
+
return String(v);
|
|
528
|
+
}
|
|
495
529
|
var notionSetupFlow = {
|
|
496
530
|
initialState: () => ({}),
|
|
497
531
|
steps: [
|
|
@@ -536,11 +570,28 @@ var notionSetupFlow = {
|
|
|
536
570
|
sections.push(`### Database: ${title}`, "", `- id: \`${db.id}\``, "");
|
|
537
571
|
sections.push("| Property | Type |");
|
|
538
572
|
sections.push("|----------|------|");
|
|
539
|
-
|
|
573
|
+
const propEntries = Object.entries(db.properties ?? {});
|
|
574
|
+
for (const [name, def] of propEntries) {
|
|
540
575
|
const escapedName = name.replace(/\|/g, "\\|");
|
|
541
576
|
sections.push(`| ${escapedName} | ${def?.type ?? "-"} |`);
|
|
542
577
|
}
|
|
543
578
|
sections.push("");
|
|
579
|
+
const pages = await queryDatabaseSample(rt.params, dbId);
|
|
580
|
+
if (pages.length > 0) {
|
|
581
|
+
const sampleProps = propEntries.slice(0, 5).map(([n]) => n);
|
|
582
|
+
if (sampleProps.length > 0) {
|
|
583
|
+
sections.push(`#### Sample pages (${pages.length})`, "");
|
|
584
|
+
sections.push(`| ${sampleProps.join(" | ")} |`);
|
|
585
|
+
sections.push(`| ${sampleProps.map(() => "---").join(" | ")} |`);
|
|
586
|
+
for (const page of pages) {
|
|
587
|
+
const cells = sampleProps.map(
|
|
588
|
+
(n) => formatPropertyValue(page.properties?.[n]).replace(/\|/g, "\\|")
|
|
589
|
+
);
|
|
590
|
+
sections.push(`| ${cells.join(" | ")} |`);
|
|
591
|
+
}
|
|
592
|
+
sections.push("");
|
|
593
|
+
}
|
|
594
|
+
}
|
|
544
595
|
}
|
|
545
596
|
return sections.join("\n");
|
|
546
597
|
}
|
|
@@ -641,7 +692,7 @@ var notionConnector = new ConnectorPlugin({
|
|
|
641
692
|
systemPrompt: {
|
|
642
693
|
en: `### Tools
|
|
643
694
|
|
|
644
|
-
- \`
|
|
695
|
+
- \`connector_notion_request\`: The only way to call the Notion REST API. Use it to search pages and databases, query database records, retrieve page content and blocks, and manage workspace data. Authentication (Bearer token) and Notion-Version header are configured automatically. Pagination uses cursor-based \`start_cursor\` and \`page_size\` (max 100) with \`has_more\` and \`next_cursor\` in the response.
|
|
645
696
|
|
|
646
697
|
### Business Logic
|
|
647
698
|
|
|
@@ -711,7 +762,7 @@ export default async function handler(c: Context) {
|
|
|
711
762
|
- Properties with more than 25 items (e.g., people, relation) need the property endpoint for full data`,
|
|
712
763
|
ja: `### \u30C4\u30FC\u30EB
|
|
713
764
|
|
|
714
|
-
- \`
|
|
765
|
+
- \`connector_notion_request\`: Notion REST API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u30DA\u30FC\u30B8\u3084\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u306E\u691C\u7D22\u3001\u30C7\u30FC\u30BF\u30D9\u30FC\u30B9\u30EC\u30B3\u30FC\u30C9\u306E\u30AF\u30A8\u30EA\u3001\u30DA\u30FC\u30B8\u30B3\u30F3\u30C6\u30F3\u30C4\u3084\u30D6\u30ED\u30C3\u30AF\u306E\u53D6\u5F97\u3001\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u30C7\u30FC\u30BF\u306E\u7BA1\u7406\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u8A8D\u8A3C\uFF08Bearer\u30C8\u30FC\u30AF\u30F3\uFF09\u3068Notion-Version\u30D8\u30C3\u30C0\u30FC\u306F\u81EA\u52D5\u7684\u306B\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002\u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3\u306F\u30EC\u30B9\u30DD\u30F3\u30B9\u306E \`has_more\` \u3068 \`next_cursor\` \u306B\u3088\u308B\u30AB\u30FC\u30BD\u30EB\u30D9\u30FC\u30B9\u3067\u3001\`start_cursor\` \u3068 \`page_size\`\uFF08\u6700\u5927100\uFF09\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002
|
|
715
766
|
|
|
716
767
|
### Business Logic
|
|
717
768
|
|
|
@@ -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.
|
|
@@ -142,7 +144,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
142
144
|
/**
|
|
143
145
|
* Create tools for connections that belong to this connector.
|
|
144
146
|
* Filters connections by connectorKey internally.
|
|
145
|
-
* Returns tools keyed as
|
|
147
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
146
148
|
*/
|
|
147
149
|
createTools(connections, config, opts) {
|
|
148
150
|
const myConnections = connections.filter(
|
|
@@ -152,7 +154,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
152
154
|
for (const t of Object.values(this.tools)) {
|
|
153
155
|
const tool = t.createTool(myConnections, config);
|
|
154
156
|
const originalToModelOutput = tool.toModelOutput;
|
|
155
|
-
result[
|
|
157
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
156
158
|
...tool,
|
|
157
159
|
toModelOutput: async (options) => {
|
|
158
160
|
if (!originalToModelOutput) {
|
|
@@ -21,6 +21,7 @@ var init_parameter_definition = __esm({
|
|
|
21
21
|
type;
|
|
22
22
|
secret;
|
|
23
23
|
required;
|
|
24
|
+
isDeprecated;
|
|
24
25
|
constructor(config) {
|
|
25
26
|
this.slug = config.slug;
|
|
26
27
|
this.name = config.name;
|
|
@@ -29,6 +30,7 @@ var init_parameter_definition = __esm({
|
|
|
29
30
|
this.type = config.type;
|
|
30
31
|
this.secret = config.secret;
|
|
31
32
|
this.required = config.required;
|
|
33
|
+
this.isDeprecated = config.isDeprecated ?? false;
|
|
32
34
|
}
|
|
33
35
|
/**
|
|
34
36
|
* Get the parameter value from a ConnectorConnectionObject.
|
|
@@ -545,7 +547,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
545
547
|
/**
|
|
546
548
|
* Create tools for connections that belong to this connector.
|
|
547
549
|
* Filters connections by connectorKey internally.
|
|
548
|
-
* Returns tools keyed as
|
|
550
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
549
551
|
*/
|
|
550
552
|
createTools(connections, config, opts) {
|
|
551
553
|
const myConnections = connections.filter(
|
|
@@ -555,7 +557,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
555
557
|
for (const t of Object.values(this.tools)) {
|
|
556
558
|
const tool = t.createTool(myConnections, config);
|
|
557
559
|
const originalToModelOutput = tool.toModelOutput;
|
|
558
|
-
result[
|
|
560
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
559
561
|
...tool,
|
|
560
562
|
toModelOutput: async (options) => {
|
|
561
563
|
if (!originalToModelOutput) {
|
|
@@ -704,12 +706,12 @@ init_oracle_runner();
|
|
|
704
706
|
// ../connectors/src/connectors/oracle/setup.ts
|
|
705
707
|
var oracleOnboarding = new ConnectorOnboarding({
|
|
706
708
|
dataOverviewInstructions: {
|
|
707
|
-
en: `1. Use
|
|
709
|
+
en: `1. Use connector_oracle_executeQuery to confirm the version: \`SELECT BANNER FROM V$VERSION\`
|
|
708
710
|
2. Identify the current schema (Oracle treats users as schemas): \`SELECT USER FROM DUAL\`
|
|
709
711
|
3. List user tables: \`SELECT TABLE_NAME FROM USER_TABLES\`. To explore other schemas the connection has access to, use \`ALL_TABLES\` filtered by \`OWNER\`.
|
|
710
712
|
4. For key tables, fetch column info: \`SELECT COLUMN_NAME, DATA_TYPE FROM USER_TAB_COLUMNS WHERE TABLE_NAME = UPPER('xxx')\` (Oracle stores unquoted identifiers as upper-case).
|
|
711
713
|
5. Sample up to 3 tables. Oracle has no \`LIMIT\` keyword: use \`FETCH FIRST n ROWS ONLY\` or \`ROWNUM\`: \`SELECT * FROM <table> FETCH FIRST 5 ROWS ONLY\``,
|
|
712
|
-
ja: `1.
|
|
714
|
+
ja: `1. connector_oracle_executeQuery \u3067\u30D0\u30FC\u30B8\u30E7\u30F3\u3092\u78BA\u8A8D: \`SELECT BANNER FROM V$VERSION\`
|
|
713
715
|
2. \u73FE\u5728\u306E\u30B9\u30AD\u30FC\u30DE\uFF08Oracle\u3067\u306F\u30E6\u30FC\u30B6\u30FC\uFF1D\u30B9\u30AD\u30FC\u30DE\uFF09\u3092\u78BA\u8A8D: \`SELECT USER FROM DUAL\`
|
|
714
716
|
3. \u30E6\u30FC\u30B6\u30FC\u30C6\u30FC\u30D6\u30EB\u4E00\u89A7\u3092\u53D6\u5F97: \`SELECT TABLE_NAME FROM USER_TABLES\`\u3002\u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306A\u4ED6\u30B9\u30AD\u30FC\u30DE\u3092\u53C2\u7167\u3059\u308B\u5834\u5408\u306F \`ALL_TABLES\` \u3092 \`OWNER\` \u3067\u30D5\u30A3\u30EB\u30BF\u30EA\u30F3\u30B0\u3002
|
|
715
717
|
4. \u4E3B\u8981\u30C6\u30FC\u30D6\u30EB\u306E\u30AB\u30E9\u30E0\u60C5\u5831\u3092\u53D6\u5F97: \`SELECT COLUMN_NAME, DATA_TYPE FROM USER_TAB_COLUMNS WHERE TABLE_NAME = UPPER('xxx')\`\uFF08Oracle \u306F\u30AF\u30A9\u30FC\u30C8\u306A\u3057\u8B58\u5225\u5B50\u3092\u5927\u6587\u5B57\u3067\u4FDD\u5B58\uFF09\u3002
|
|
@@ -838,6 +840,20 @@ var oracleSetupFlow = {
|
|
|
838
840
|
fetchAll: () => fetchTableAndViewNames(rt.params, owner),
|
|
839
841
|
limit: ORACLE_SETUP_MAX_TABLES
|
|
840
842
|
});
|
|
843
|
+
let rowCounts = /* @__PURE__ */ new Map();
|
|
844
|
+
try {
|
|
845
|
+
const countRows = await runOracleSetupQuery(
|
|
846
|
+
rt.params,
|
|
847
|
+
`SELECT TABLE_NAME, NUM_ROWS FROM ALL_TABLES WHERE OWNER = ${quoteLiteral(owner)}`
|
|
848
|
+
);
|
|
849
|
+
rowCounts = new Map(
|
|
850
|
+
countRows.filter((r) => r["NUM_ROWS"] != null).map((r) => [
|
|
851
|
+
String(r["TABLE_NAME"] ?? ""),
|
|
852
|
+
Number(r["NUM_ROWS"])
|
|
853
|
+
])
|
|
854
|
+
);
|
|
855
|
+
} catch {
|
|
856
|
+
}
|
|
841
857
|
const typeRows = targetTables.length > 0 ? await runOracleSetupQuery(
|
|
842
858
|
rt.params,
|
|
843
859
|
`SELECT OBJECT_NAME, OBJECT_TYPE FROM ALL_OBJECTS
|
|
@@ -867,7 +883,9 @@ var oracleSetupFlow = {
|
|
|
867
883
|
AND TABLE_NAME = ${quoteLiteral(table)}
|
|
868
884
|
ORDER BY COLUMN_ID`
|
|
869
885
|
);
|
|
870
|
-
|
|
886
|
+
const rowCount = rowCounts.get(table);
|
|
887
|
+
const rowCountSuffix = typeof rowCount === "number" ? ` (~${rowCount.toLocaleString()} rows)` : "";
|
|
888
|
+
sections.push(`#### ${heading}: ${table}${rowCountSuffix}`, "");
|
|
871
889
|
sections.push("| Column | Type | Nullable | Default |");
|
|
872
890
|
sections.push("|--------|------|----------|---------|");
|
|
873
891
|
for (const c of cols) {
|
|
@@ -981,7 +999,7 @@ var oracleConnector = new ConnectorPlugin({
|
|
|
981
999
|
systemPrompt: {
|
|
982
1000
|
en: `### Tools
|
|
983
1001
|
|
|
984
|
-
- \`
|
|
1002
|
+
- \`connector_oracle_executeQuery\`: Executes a SQL query against an Oracle Database and returns rows. Use it for schema exploration via \`USER_TABLES\` / \`USER_TAB_COLUMNS\` / \`ALL_TABLES\` and for sampling data. See the SQL Reference below for Oracle-specific syntax.
|
|
985
1003
|
|
|
986
1004
|
### Business Logic
|
|
987
1005
|
|
|
@@ -1000,7 +1018,7 @@ The business logic type for this connector is "sql".
|
|
|
1000
1018
|
- Row-limit compatibility: the platform's server-logic schema inference may wrap your query as \`SELECT * FROM (<inner>) AS _sq LIMIT N\`. Oracle has no \`LIMIT\` keyword, so the connector detects this exact wrapper at \`query()\` time, executes \`<inner>\` directly, and slices the first N rows in JS. You do not need to handle this \u2014 but do not author your own \`LIMIT\` clauses; use \`FETCH FIRST N ROWS ONLY\`, \`OFFSET m ROWS FETCH NEXT N ROWS ONLY\`, or \`ROWNUM\` filters.`,
|
|
1001
1019
|
ja: `### \u30C4\u30FC\u30EB
|
|
1002
1020
|
|
|
1003
|
-
- \`
|
|
1021
|
+
- \`connector_oracle_executeQuery\`: Oracle Database \u306B\u5BFE\u3057\u3066 SQL \u3092\u5B9F\u884C\u3057\u3001\u884C\u30C7\u30FC\u30BF\u3092\u8FD4\u3057\u307E\u3059\u3002\`USER_TABLES\` / \`USER_TAB_COLUMNS\` / \`ALL_TABLES\` \u3092\u4F7F\u3063\u305F\u30B9\u30AD\u30FC\u30DE\u63A2\u7D22\u3084\u30C7\u30FC\u30BF\u306E\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0\u306B\u4F7F\u3044\u307E\u3059\u3002Oracle \u56FA\u6709\u306E\u69CB\u6587\u306F\u4E0B\u90E8\u306E\u300CSQL \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9\u300D\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
|
1004
1022
|
|
|
1005
1023
|
### Business Logic
|
|
1006
1024
|
|
|
@@ -232,7 +232,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
232
232
|
/**
|
|
233
233
|
* Create tools for connections that belong to this connector.
|
|
234
234
|
* Filters connections by connectorKey internally.
|
|
235
|
-
* Returns tools keyed as
|
|
235
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
236
236
|
*/
|
|
237
237
|
createTools(connections, config, opts) {
|
|
238
238
|
const myConnections = connections.filter(
|
|
@@ -242,7 +242,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
242
242
|
for (const t of Object.values(this.tools)) {
|
|
243
243
|
const tool = t.createTool(myConnections, config);
|
|
244
244
|
const originalToModelOutput = tool.toModelOutput;
|
|
245
|
-
result[
|
|
245
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
246
246
|
...tool,
|
|
247
247
|
toModelOutput: async (options) => {
|
|
248
248
|
if (!originalToModelOutput) {
|
|
@@ -533,27 +533,27 @@ var outlookOnboarding = new ConnectorOnboarding({
|
|
|
533
533
|
},
|
|
534
534
|
dataOverviewInstructions: {
|
|
535
535
|
en: `Mail
|
|
536
|
-
1. Call
|
|
537
|
-
2. Call
|
|
538
|
-
3. Call
|
|
539
|
-
4. Call
|
|
540
|
-
5. For threading, call
|
|
536
|
+
1. Call connector_outlook-oauth_request with GET /me/mailFolders to list mail folders
|
|
537
|
+
2. Call connector_outlook-oauth_request with GET /me/messages?$top=5&$select=id,subject,from,receivedDateTime,conversationId to sample recent messages
|
|
538
|
+
3. Call connector_outlook-oauth_request with GET /me/messages/{id} for an interesting message to inspect the full payload
|
|
539
|
+
4. Call connector_outlook-oauth_request with GET /me/mailFolders/{folderId}/messages?$top=5 to drill into a specific folder
|
|
540
|
+
5. For threading, call connector_outlook-oauth_request with GET /me/messages?$filter=conversationId%20eq%20'<id>'&$orderby=receivedDateTime%20asc to pull every message in a conversation
|
|
541
541
|
|
|
542
542
|
Calendar
|
|
543
|
-
6. Call
|
|
544
|
-
7. Call
|
|
545
|
-
8. Call
|
|
543
|
+
6. Call connector_outlook-oauth_request with GET /me/calendars to list calendars (default + shared)
|
|
544
|
+
7. Call connector_outlook-oauth_request with GET /me/calendarView?startDateTime=<startISO>&endDateTime=<endISO>&$top=5&$select=id,subject,start,end,attendees to sample upcoming occurrences (expands recurring events)
|
|
545
|
+
8. Call connector_outlook-oauth_request with GET /me/events/{eventId} for an interesting event to inspect attendees, body, and location`,
|
|
546
546
|
ja: `\u30E1\u30FC\u30EB
|
|
547
|
-
1.
|
|
548
|
-
2.
|
|
549
|
-
3. \u8208\u5473\u306E\u3042\u308B\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u3064\u3044\u3066
|
|
550
|
-
4.
|
|
551
|
-
5. \u30B9\u30EC\u30C3\u30C9\u3092\u8FFD\u3046\u5834\u5408\u306F
|
|
547
|
+
1. connector_outlook-oauth_request \u3067 GET /me/mailFolders \u3092\u547C\u3073\u51FA\u3057\u3001\u30E1\u30FC\u30EB\u30D5\u30A9\u30EB\u30C0\u4E00\u89A7\u3092\u53D6\u5F97
|
|
548
|
+
2. connector_outlook-oauth_request \u3067 GET /me/messages?$top=5&$select=id,subject,from,receivedDateTime,conversationId \u3092\u547C\u3073\u51FA\u3057\u3001\u6700\u65B0\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0
|
|
549
|
+
3. \u8208\u5473\u306E\u3042\u308B\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u3064\u3044\u3066 connector_outlook-oauth_request \u3067 GET /me/messages/{id} \u3092\u547C\u3073\u51FA\u3057\u3001\u30DA\u30A4\u30ED\u30FC\u30C9\u5168\u4F53\u3092\u78BA\u8A8D
|
|
550
|
+
4. connector_outlook-oauth_request \u3067 GET /me/mailFolders/{folderId}/messages?$top=5 \u3092\u547C\u3073\u51FA\u3057\u3001\u7279\u5B9A\u30D5\u30A9\u30EB\u30C0\u306E\u4E2D\u8EAB\u3092\u78BA\u8A8D
|
|
551
|
+
5. \u30B9\u30EC\u30C3\u30C9\u3092\u8FFD\u3046\u5834\u5408\u306F connector_outlook-oauth_request \u3067 GET /me/messages?$filter=conversationId%20eq%20'<id>'&$orderby=receivedDateTime%20asc \u3092\u547C\u3073\u51FA\u3057\u3001\u4F1A\u8A71\u306B\u542B\u307E\u308C\u308B\u5168\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u53D6\u5F97
|
|
552
552
|
|
|
553
553
|
\u30AB\u30EC\u30F3\u30C0\u30FC
|
|
554
|
-
6.
|
|
555
|
-
7.
|
|
556
|
-
8. \u8208\u5473\u306E\u3042\u308B\u30A4\u30D9\u30F3\u30C8\u306B\u3064\u3044\u3066
|
|
554
|
+
6. connector_outlook-oauth_request \u3067 GET /me/calendars \u3092\u547C\u3073\u51FA\u3057\u3001\u30AB\u30EC\u30F3\u30C0\u30FC\u4E00\u89A7 (\u30C7\u30D5\u30A9\u30EB\u30C8 + \u5171\u6709) \u3092\u53D6\u5F97
|
|
555
|
+
7. connector_outlook-oauth_request \u3067 GET /me/calendarView?startDateTime=<startISO>&endDateTime=<endISO>&$top=5&$select=id,subject,start,end,attendees \u3092\u547C\u3073\u51FA\u3057\u3001\u76F4\u8FD1\u306E occurrence \u3092\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0 (\u7E70\u308A\u8FD4\u3057\u30A4\u30D9\u30F3\u30C8\u3092\u5C55\u958B)
|
|
556
|
+
8. \u8208\u5473\u306E\u3042\u308B\u30A4\u30D9\u30F3\u30C8\u306B\u3064\u3044\u3066 connector_outlook-oauth_request \u3067 GET /me/events/{eventId} \u3092\u547C\u3073\u51FA\u3057\u3001\u53C2\u52A0\u8005\u30FB\u672C\u6587\u30FB\u5834\u6240\u3092\u78BA\u8A8D`
|
|
557
557
|
}
|
|
558
558
|
});
|
|
559
559
|
|
|
@@ -667,7 +667,7 @@ var outlookOauthConnector = new ConnectorPlugin({
|
|
|
667
667
|
systemPrompt: {
|
|
668
668
|
en: `### Tools
|
|
669
669
|
|
|
670
|
-
- \`
|
|
670
|
+
- \`connector_outlook-oauth_request\`: The only way to call Microsoft Graph for Outlook (read-only). Use it to fetch the user profile (\`/me\`), list mail folders (\`/me/mailFolders\`), read messages (\`/me/messages\`, \`/me/messages/{id}\`), fetch attachments (\`/me/messages/{id}/attachments\`), list calendars (\`/me/calendars\`), and read events (\`/me/events\`, \`/me/calendarView\`). Authentication is configured automatically via OAuth.
|
|
671
671
|
|
|
672
672
|
### Microsoft Graph Reference (Outlook Mail)
|
|
673
673
|
|
|
@@ -800,7 +800,7 @@ events.value.forEach(e => console.log(e.start.dateTime, e.subject));
|
|
|
800
800
|
\`\`\``,
|
|
801
801
|
ja: `### \u30C4\u30FC\u30EB
|
|
802
802
|
|
|
803
|
-
- \`
|
|
803
|
+
- \`connector_outlook-oauth_request\`: Outlook \u5411\u3051\u306E Microsoft Graph \u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\uFF08\u8AAD\u307F\u53D6\u308A\u5C02\u7528\uFF09\u3002\u30E6\u30FC\u30B6\u30FC\u30D7\u30ED\u30D5\u30A3\u30FC\u30EB (\`/me\`)\u3001\u30E1\u30FC\u30EB\u30D5\u30A9\u30EB\u30C0 (\`/me/mailFolders\`)\u3001\u30E1\u30C3\u30BB\u30FC\u30B8 (\`/me/messages\`)\u3001\u6DFB\u4ED8\u30D5\u30A1\u30A4\u30EB (\`/me/messages/{id}/attachments\`)\u3001\u30AB\u30EC\u30F3\u30C0\u30FC (\`/me/calendars\`)\u3001\u30A4\u30D9\u30F3\u30C8 (\`/me/events\`, \`/me/calendarView\`) \u306E\u53D6\u5F97\u306B\u4F7F\u3044\u307E\u3059\u3002OAuth \u7D4C\u7531\u3067\u8A8D\u8A3C\u306F\u81EA\u52D5\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002
|
|
804
804
|
|
|
805
805
|
### Microsoft Graph \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9 (Outlook \u30E1\u30FC\u30EB)
|
|
806
806
|
|
|
@@ -190,7 +190,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
190
190
|
/**
|
|
191
191
|
* Create tools for connections that belong to this connector.
|
|
192
192
|
* Filters connections by connectorKey internally.
|
|
193
|
-
* Returns tools keyed as
|
|
193
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
194
194
|
*/
|
|
195
195
|
createTools(connections, config, opts) {
|
|
196
196
|
const myConnections = connections.filter(
|
|
@@ -200,7 +200,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
200
200
|
for (const t of Object.values(this.tools)) {
|
|
201
201
|
const tool = t.createTool(myConnections, config);
|
|
202
202
|
const originalToModelOutput = tool.toModelOutput;
|
|
203
|
-
result[
|
|
203
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
204
204
|
...tool,
|
|
205
205
|
toModelOutput: async (options) => {
|
|
206
206
|
if (!originalToModelOutput) {
|
|
@@ -491,14 +491,14 @@ var powerbiOauthOnboarding = new ConnectorOnboarding({
|
|
|
491
491
|
- Write only 1 sentence between tool calls, then immediately call the next tool`
|
|
492
492
|
},
|
|
493
493
|
dataOverviewInstructions: {
|
|
494
|
-
en: `1. Call
|
|
495
|
-
2. For a target workspace, call
|
|
496
|
-
3. Call
|
|
497
|
-
4. For each interesting dataset call
|
|
498
|
-
ja: `1.
|
|
499
|
-
2. \u5BFE\u8C61\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u306B\u5BFE\u3057\u3066
|
|
500
|
-
3.
|
|
501
|
-
4. \u8208\u5473\u306E\u3042\u308B\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306B\u3064\u3044\u3066
|
|
494
|
+
en: `1. Call connector_powerbi-oauth_request with GET /groups to list accessible workspaces
|
|
495
|
+
2. For a target workspace, call connector_powerbi-oauth_request with GET /groups/{groupId}/datasets to list datasets
|
|
496
|
+
3. Call connector_powerbi-oauth_request with GET /groups/{groupId}/reports to list reports
|
|
497
|
+
4. For each interesting dataset call connector_powerbi-oauth_request with GET /groups/{groupId}/datasets/{datasetId}/tables to inspect tables`,
|
|
498
|
+
ja: `1. connector_powerbi-oauth_request \u3067 GET /groups \u3092\u547C\u3073\u51FA\u3057\u3001\u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306A\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u4E00\u89A7\u3092\u53D6\u5F97
|
|
499
|
+
2. \u5BFE\u8C61\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9\u306B\u5BFE\u3057\u3066 connector_powerbi-oauth_request \u3067 GET /groups/{groupId}/datasets \u3092\u547C\u3073\u51FA\u3057\u3001\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u4E00\u89A7\u3092\u53D6\u5F97
|
|
500
|
+
3. connector_powerbi-oauth_request \u3067 GET /groups/{groupId}/reports \u3092\u547C\u3073\u51FA\u3057\u3001\u30EC\u30DD\u30FC\u30C8\u4E00\u89A7\u3092\u53D6\u5F97
|
|
501
|
+
4. \u8208\u5473\u306E\u3042\u308B\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u306B\u3064\u3044\u3066 connector_powerbi-oauth_request \u3067 GET /groups/{groupId}/datasets/{datasetId}/tables \u3092\u547C\u3073\u51FA\u3057\u3001\u30C6\u30FC\u30D6\u30EB\u69CB\u9020\u3092\u78BA\u8A8D`
|
|
502
502
|
}
|
|
503
503
|
});
|
|
504
504
|
|
|
@@ -906,7 +906,7 @@ var powerbiOauthConnector = new ConnectorPlugin({
|
|
|
906
906
|
systemPrompt: {
|
|
907
907
|
en: `### Tools
|
|
908
908
|
|
|
909
|
-
- \`
|
|
909
|
+
- \`connector_powerbi-oauth_request\`: The only way to call the Power BI REST API v1.0. Use it to list workspaces (\`/groups\`), datasets, reports, and to run DAX via the \`executeQueries\` endpoint. Authentication is configured automatically via OAuth (Microsoft Entra ID).
|
|
910
910
|
|
|
911
911
|
### Business Logic
|
|
912
912
|
|
|
@@ -962,7 +962,7 @@ export default async function handler(c: Context) {
|
|
|
962
962
|
- Each \`executeQueries\` call accepts one query in the \`queries\` array (per current Power BI API limits)`,
|
|
963
963
|
ja: `### \u30C4\u30FC\u30EB
|
|
964
964
|
|
|
965
|
-
- \`
|
|
965
|
+
- \`connector_powerbi-oauth_request\`: Power BI REST API v1.0 \u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u30EF\u30FC\u30AF\u30B9\u30DA\u30FC\u30B9 (\`/groups\`)\u3001\u30C7\u30FC\u30BF\u30BB\u30C3\u30C8\u3001\u30EC\u30DD\u30FC\u30C8\u306E\u4E00\u89A7\u53D6\u5F97\u3084\u3001\`executeQueries\` \u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u306B\u3088\u308B DAX \u306E\u5B9F\u884C\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002OAuth (Microsoft Entra ID) \u7D4C\u7531\u3067\u8A8D\u8A3C\u306F\u81EA\u52D5\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002
|
|
966
966
|
|
|
967
967
|
### Business Logic
|
|
968
968
|
|