@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
|
@@ -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.
|
|
@@ -251,7 +253,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
251
253
|
/**
|
|
252
254
|
* Create tools for connections that belong to this connector.
|
|
253
255
|
* Filters connections by connectorKey internally.
|
|
254
|
-
* Returns tools keyed as
|
|
256
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
255
257
|
*/
|
|
256
258
|
createTools(connections, config, opts) {
|
|
257
259
|
const myConnections = connections.filter(
|
|
@@ -261,7 +263,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
261
263
|
for (const t of Object.values(this.tools)) {
|
|
262
264
|
const tool = t.createTool(myConnections, config);
|
|
263
265
|
const originalToModelOutput = tool.toModelOutput;
|
|
264
|
-
result[
|
|
266
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
265
267
|
...tool,
|
|
266
268
|
toModelOutput: async (options) => {
|
|
267
269
|
if (!originalToModelOutput) {
|
|
@@ -388,14 +390,14 @@ var kintoneApiTokenOnboarding = new ConnectorOnboarding({
|
|
|
388
390
|
dataOverviewInstructions: {
|
|
389
391
|
en: `Each connection is scoped to a single kintone app (configured via the "app-id" parameter). The request tool auto-injects the configured app id, so you do NOT need to specify "app=" in paths or "app" in bodies. apps.json is NOT available with API Token auth.
|
|
390
392
|
|
|
391
|
-
1. Call
|
|
392
|
-
2. Call
|
|
393
|
-
3. Call
|
|
393
|
+
1. Call connector_kintone-api-key_request with GET app.json to fetch the scoped app's metadata (name, description, creator)
|
|
394
|
+
2. Call connector_kintone-api-key_request with GET app/form/fields.json to get field definitions
|
|
395
|
+
3. Call connector_kintone-api-key_request with GET records.json with query=limit 5 to sample records`,
|
|
394
396
|
ja: `\u5404\u63A5\u7D9A\u306F1\u3064\u306Ekintone\u30A2\u30D7\u30EA\u306B\u30B9\u30B3\u30FC\u30D7\u3055\u308C\u3066\u3044\u307E\u3059\uFF08"app-id" \u30D1\u30E9\u30E1\u30FC\u30BF\u3067\u8A2D\u5B9A\uFF09\u3002request \u30C4\u30FC\u30EB\u306F\u8A2D\u5B9A\u3055\u308C\u305F\u30A2\u30D7\u30EAID\u3092\u81EA\u52D5\u6CE8\u5165\u3059\u308B\u305F\u3081\u3001\u30D1\u30B9\u306B "app=" \u3084 body \u306B "app" \u3092\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u306F\u3042\u308A\u307E\u305B\u3093\u3002API Token \u8A8D\u8A3C\u3067\u306F apps.json \u306F\u5229\u7528\u3067\u304D\u307E\u305B\u3093\u3002
|
|
395
397
|
|
|
396
|
-
1.
|
|
397
|
-
2.
|
|
398
|
-
3.
|
|
398
|
+
1. connector_kintone-api-key_request \u3067 GET app.json \u3092\u547C\u3073\u51FA\u3057\u3001\u30B9\u30B3\u30FC\u30D7\u5BFE\u8C61\u30A2\u30D7\u30EA\u306E\u30E1\u30BF\u60C5\u5831\uFF08\u30A2\u30D7\u30EA\u540D\u3001\u8AAC\u660E\u3001\u4F5C\u6210\u8005\uFF09\u3092\u53D6\u5F97
|
|
399
|
+
2. connector_kintone-api-key_request \u3067 GET app/form/fields.json \u3092\u547C\u3073\u51FA\u3057\u3001\u30D5\u30A3\u30FC\u30EB\u30C9\u5B9A\u7FA9\u3092\u53D6\u5F97
|
|
400
|
+
3. connector_kintone-api-key_request \u3067 GET records.json \u3092 query=limit 5 \u3067\u547C\u3073\u51FA\u3057\u3001\u30EC\u30B3\u30FC\u30C9\u3092\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0`
|
|
399
401
|
}
|
|
400
402
|
});
|
|
401
403
|
|
|
@@ -419,6 +421,7 @@ async function apiFetch(params, path2, init) {
|
|
|
419
421
|
}
|
|
420
422
|
|
|
421
423
|
// ../connectors/src/connectors/kintone-api-token/setup-flow.ts
|
|
424
|
+
var SAMPLE_RECORD_LIMIT = 5;
|
|
422
425
|
async function getAppMetadata(params, appId) {
|
|
423
426
|
const res = await apiFetch(
|
|
424
427
|
params,
|
|
@@ -445,15 +448,28 @@ async function getFormFields(params, appId) {
|
|
|
445
448
|
}
|
|
446
449
|
return await res.json();
|
|
447
450
|
}
|
|
451
|
+
async function getSampleRecords(params, appId) {
|
|
452
|
+
const res = await apiFetch(
|
|
453
|
+
params,
|
|
454
|
+
`records.json?app=${encodeURIComponent(appId)}&query=${encodeURIComponent(`limit ${SAMPLE_RECORD_LIMIT}`)}&totalCount=true`
|
|
455
|
+
);
|
|
456
|
+
if (!res.ok) return { records: [], totalCount: null };
|
|
457
|
+
return await res.json();
|
|
458
|
+
}
|
|
459
|
+
function formatRecordValue(val) {
|
|
460
|
+
if (val == null) return "";
|
|
461
|
+
if (typeof val === "string") return val.length > 50 ? `${val.slice(0, 50)}\u2026` : val;
|
|
462
|
+
if (Array.isArray(val)) return `[${val.length} items]`;
|
|
463
|
+
if (typeof val === "object") return JSON.stringify(val).slice(0, 50);
|
|
464
|
+
return String(val);
|
|
465
|
+
}
|
|
448
466
|
var kintoneApiTokenSetupFlow = {
|
|
449
467
|
initialState: () => ({}),
|
|
450
468
|
steps: [],
|
|
451
469
|
async finalize(_state, rt) {
|
|
452
|
-
const appId = rt.params[
|
|
470
|
+
const appId = rt.params["app-id"];
|
|
453
471
|
if (!appId) {
|
|
454
|
-
|
|
455
|
-
"kintone-api-token setup: missing app-id parameter on finalize"
|
|
456
|
-
);
|
|
472
|
+
return "## kintone\n\n_App ID \u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093\u3002_\n";
|
|
457
473
|
}
|
|
458
474
|
const sections = ["## kintone", ""];
|
|
459
475
|
const app = await getAppMetadata(rt.params, appId);
|
|
@@ -463,15 +479,39 @@ var kintoneApiTokenSetupFlow = {
|
|
|
463
479
|
sections.push(app.description, "");
|
|
464
480
|
}
|
|
465
481
|
const fields = await getFormFields(rt.params, appId);
|
|
482
|
+
const fieldEntries = Object.entries(fields.properties ?? {});
|
|
483
|
+
sections.push("#### Fields", "");
|
|
466
484
|
sections.push("| Field code | Label | Type | Required |");
|
|
467
485
|
sections.push("|------------|-------|------|----------|");
|
|
468
|
-
for (const [code, def] of
|
|
486
|
+
for (const [code, def] of fieldEntries) {
|
|
469
487
|
const escapedLabel = (def.label ?? "").replace(/\|/g, "\\|");
|
|
470
488
|
sections.push(
|
|
471
489
|
`| ${code} | ${escapedLabel || "-"} | ${def.type} | ${def.required ? "yes" : "no"} |`
|
|
472
490
|
);
|
|
473
491
|
}
|
|
474
492
|
sections.push("");
|
|
493
|
+
const sampleData = await getSampleRecords(rt.params, appId);
|
|
494
|
+
const totalCount = sampleData.totalCount ? Number(sampleData.totalCount) : null;
|
|
495
|
+
if (totalCount != null) {
|
|
496
|
+
sections.push(`#### Record count: ${totalCount.toLocaleString()}`, "");
|
|
497
|
+
}
|
|
498
|
+
const records = sampleData.records ?? [];
|
|
499
|
+
if (records.length > 0) {
|
|
500
|
+
const sampleFields = fieldEntries.slice(0, 8).map(([code]) => code);
|
|
501
|
+
if (sampleFields.length > 0) {
|
|
502
|
+
sections.push(`#### Sample records (${records.length})`, "");
|
|
503
|
+
sections.push(`| ${sampleFields.join(" | ")} |`);
|
|
504
|
+
sections.push(`| ${sampleFields.map(() => "---").join(" | ")} |`);
|
|
505
|
+
for (const record of records) {
|
|
506
|
+
const cells = sampleFields.map((code) => {
|
|
507
|
+
const cell = record[code];
|
|
508
|
+
return formatRecordValue(cell?.value).replace(/\|/g, "\\|");
|
|
509
|
+
});
|
|
510
|
+
sections.push(`| ${cells.join(" | ")} |`);
|
|
511
|
+
}
|
|
512
|
+
sections.push("");
|
|
513
|
+
}
|
|
514
|
+
}
|
|
475
515
|
return sections.join("\n");
|
|
476
516
|
}
|
|
477
517
|
};
|
|
@@ -594,7 +634,7 @@ var kintoneApiTokenConnector = new ConnectorPlugin({
|
|
|
594
634
|
systemPrompt: {
|
|
595
635
|
en: `### Tools
|
|
596
636
|
|
|
597
|
-
- \`
|
|
637
|
+
- \`connector_kintone-api-key_request\`: The only way to call the kintone REST API. Use it to fetch app metadata/field definitions and read/write records. Authentication (API Token), base URL, and the connection's app id are configured automatically. Each connection is scoped to exactly one app (kintone API tokens are per-app).
|
|
598
638
|
|
|
599
639
|
### App scoping (important)
|
|
600
640
|
|
|
@@ -667,7 +707,7 @@ export default async function handler(c: Context) {
|
|
|
667
707
|
- String: \`like "partial match"\``,
|
|
668
708
|
ja: `### \u30C4\u30FC\u30EB
|
|
669
709
|
|
|
670
|
-
- \`
|
|
710
|
+
- \`connector_kintone-api-key_request\`: kintone REST API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u30A2\u30D7\u30EA\u306E\u30E1\u30BF\u60C5\u5831\u30FB\u30D5\u30A3\u30FC\u30EB\u30C9\u5B9A\u7FA9\u306E\u53D6\u5F97\u3001\u30EC\u30B3\u30FC\u30C9\u306E\u8AAD\u307F\u66F8\u304D\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u8A8D\u8A3C\uFF08API\u30C8\u30FC\u30AF\u30F3\uFF09\u3001\u30D9\u30FC\u30B9URL\u3001\u304A\u3088\u3073\u63A5\u7D9A\u306E\u30A2\u30D7\u30EAID\u306F\u81EA\u52D5\u7684\u306B\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002\u5404\u63A5\u7D9A\u306F\u3061\u3087\u3046\u30691\u3064\u306E\u30A2\u30D7\u30EA\u306B\u30B9\u30B3\u30FC\u30D7\u3055\u308C\u3066\u3044\u307E\u3059\uFF08kintone API\u30C8\u30FC\u30AF\u30F3\u306F\u30A2\u30D7\u30EA\u5358\u4F4D\u306E\u305F\u3081\uFF09\u3002
|
|
671
711
|
|
|
672
712
|
### \u30A2\u30D7\u30EA\u30B9\u30B3\u30FC\u30D7\uFF08\u91CD\u8981\uFF09
|
|
673
713
|
|
|
@@ -745,14 +785,15 @@ export default async function handler(c: Context) {
|
|
|
745
785
|
const baseUrl = params[parameters.baseUrl.slug];
|
|
746
786
|
const apiToken = params[parameters.apiToken.slug];
|
|
747
787
|
const appId = params[parameters.appId.slug];
|
|
748
|
-
if (!baseUrl || !apiToken
|
|
788
|
+
if (!baseUrl || !apiToken) {
|
|
749
789
|
return {
|
|
750
790
|
success: false,
|
|
751
|
-
error: `Missing required parameters: ${parameters.baseUrl.slug}, ${parameters.apiToken.slug}
|
|
791
|
+
error: `Missing required parameters: ${parameters.baseUrl.slug}, ${parameters.apiToken.slug}`
|
|
752
792
|
};
|
|
753
793
|
}
|
|
754
794
|
try {
|
|
755
|
-
const
|
|
795
|
+
const path2 = appId ? `app.json?id=${encodeURIComponent(appId)}` : `app/form/fields.json?app=0`;
|
|
796
|
+
const url = `${baseUrl.replace(/\/+$/, "")}/k/v1/${path2}`;
|
|
756
797
|
const res = await fetch(url, {
|
|
757
798
|
method: "GET",
|
|
758
799
|
headers: {
|
|
@@ -760,6 +801,15 @@ export default async function handler(c: Context) {
|
|
|
760
801
|
Accept: "application/json"
|
|
761
802
|
}
|
|
762
803
|
});
|
|
804
|
+
if (!appId) {
|
|
805
|
+
if (res.status === 401 || res.status === 403) {
|
|
806
|
+
return {
|
|
807
|
+
success: false,
|
|
808
|
+
error: "kintone API failed: invalid API token"
|
|
809
|
+
};
|
|
810
|
+
}
|
|
811
|
+
return { success: true };
|
|
812
|
+
}
|
|
763
813
|
if (!res.ok) {
|
|
764
814
|
const data = await res.json().catch(() => null);
|
|
765
815
|
const message = data?.message ?? `HTTP ${res.status} ${res.statusText}`;
|
|
@@ -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.
|
|
@@ -260,7 +262,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
260
262
|
/**
|
|
261
263
|
* Create tools for connections that belong to this connector.
|
|
262
264
|
* Filters connections by connectorKey internally.
|
|
263
|
-
* Returns tools keyed as
|
|
265
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
264
266
|
*/
|
|
265
267
|
createTools(connections, config, opts) {
|
|
266
268
|
const myConnections = connections.filter(
|
|
@@ -270,7 +272,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
270
272
|
for (const t of Object.values(this.tools)) {
|
|
271
273
|
const tool = t.createTool(myConnections, config);
|
|
272
274
|
const originalToModelOutput = tool.toModelOutput;
|
|
273
|
-
result[
|
|
275
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
274
276
|
...tool,
|
|
275
277
|
toModelOutput: async (options) => {
|
|
276
278
|
if (!originalToModelOutput) {
|
|
@@ -400,12 +402,12 @@ var AUTH_TYPES = {
|
|
|
400
402
|
// ../connectors/src/connectors/kintone/setup.ts
|
|
401
403
|
var kintoneOnboarding = new ConnectorOnboarding({
|
|
402
404
|
dataOverviewInstructions: {
|
|
403
|
-
en: `1. Call
|
|
404
|
-
2. For key apps, call
|
|
405
|
-
3. Call
|
|
406
|
-
ja: `1.
|
|
407
|
-
2. \u4E3B\u8981\u30A2\u30D7\u30EA\u306B\u3064\u3044\u3066
|
|
408
|
-
3.
|
|
405
|
+
en: `1. Call connector_kintone_request with GET apps.json to list available apps
|
|
406
|
+
2. For key apps, call connector_kintone_request with GET app/form/fields.json?app={appId} to get field definitions
|
|
407
|
+
3. Call connector_kintone_request with GET records.json?app={appId}&query=limit 5 to sample records`,
|
|
408
|
+
ja: `1. connector_kintone_request \u3067 GET apps.json \u3092\u547C\u3073\u51FA\u3057\u3001\u5229\u7528\u53EF\u80FD\u306A\u30A2\u30D7\u30EA\u4E00\u89A7\u3092\u53D6\u5F97
|
|
409
|
+
2. \u4E3B\u8981\u30A2\u30D7\u30EA\u306B\u3064\u3044\u3066 connector_kintone_request \u3067 GET app/form/fields.json?app={appId} \u3092\u547C\u3073\u51FA\u3057\u3001\u30D5\u30A3\u30FC\u30EB\u30C9\u5B9A\u7FA9\u3092\u53D6\u5F97
|
|
410
|
+
3. connector_kintone_request \u3067 GET records.json?app={appId}&query=limit 5 \u3092\u547C\u3073\u51FA\u3057\u3001\u30EC\u30B3\u30FC\u30C9\u3092\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0`
|
|
409
411
|
}
|
|
410
412
|
});
|
|
411
413
|
|
|
@@ -433,6 +435,7 @@ async function apiFetch(params, path2, init) {
|
|
|
433
435
|
// ../connectors/src/connectors/kintone/setup-flow.ts
|
|
434
436
|
var ALL_APPS = "__ALL_APPS__";
|
|
435
437
|
var KINTONE_SETUP_MAX_APPS = 20;
|
|
438
|
+
var SAMPLE_RECORD_LIMIT = 5;
|
|
436
439
|
async function listApps(params) {
|
|
437
440
|
const results = [];
|
|
438
441
|
let offset = 0;
|
|
@@ -466,6 +469,25 @@ async function getFormFields(params, appId) {
|
|
|
466
469
|
}
|
|
467
470
|
return await res.json();
|
|
468
471
|
}
|
|
472
|
+
async function getSampleRecords(params, appId) {
|
|
473
|
+
try {
|
|
474
|
+
const res = await apiFetch(
|
|
475
|
+
params,
|
|
476
|
+
`records.json?app=${encodeURIComponent(appId)}&query=${encodeURIComponent(`limit ${SAMPLE_RECORD_LIMIT}`)}&totalCount=true`
|
|
477
|
+
);
|
|
478
|
+
if (!res.ok) return { records: [], totalCount: null };
|
|
479
|
+
return await res.json();
|
|
480
|
+
} catch {
|
|
481
|
+
return { records: [], totalCount: null };
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
function formatRecordValue(val) {
|
|
485
|
+
if (val == null) return "";
|
|
486
|
+
if (typeof val === "string") return val.length > 50 ? `${val.slice(0, 50)}\u2026` : val;
|
|
487
|
+
if (Array.isArray(val)) return `[${val.length} items]`;
|
|
488
|
+
if (typeof val === "object") return JSON.stringify(val).slice(0, 50);
|
|
489
|
+
return String(val);
|
|
490
|
+
}
|
|
469
491
|
var kintoneSetupFlow = {
|
|
470
492
|
initialState: () => ({}),
|
|
471
493
|
steps: [
|
|
@@ -511,15 +533,38 @@ var kintoneSetupFlow = {
|
|
|
511
533
|
sections.push(app.description, "");
|
|
512
534
|
}
|
|
513
535
|
const fields = await getFormFields(rt.params, appId);
|
|
536
|
+
const fieldEntries = Object.entries(fields.properties ?? {});
|
|
514
537
|
sections.push("| Field code | Label | Type | Required |");
|
|
515
538
|
sections.push("|------------|-------|------|----------|");
|
|
516
|
-
for (const [code, def] of
|
|
539
|
+
for (const [code, def] of fieldEntries) {
|
|
517
540
|
const escapedLabel = (def.label ?? "").replace(/\|/g, "\\|");
|
|
518
541
|
sections.push(
|
|
519
542
|
`| ${code} | ${escapedLabel || "-"} | ${def.type} | ${def.required ? "yes" : "no"} |`
|
|
520
543
|
);
|
|
521
544
|
}
|
|
522
545
|
sections.push("");
|
|
546
|
+
const sampleData = await getSampleRecords(rt.params, appId);
|
|
547
|
+
const totalCount = sampleData.totalCount ? Number(sampleData.totalCount) : null;
|
|
548
|
+
if (totalCount != null) {
|
|
549
|
+
sections.push(`#### Record count: ${totalCount.toLocaleString()}`, "");
|
|
550
|
+
}
|
|
551
|
+
const records = sampleData.records ?? [];
|
|
552
|
+
if (records.length > 0) {
|
|
553
|
+
const sampleFields = fieldEntries.slice(0, 8).map(([code]) => code);
|
|
554
|
+
if (sampleFields.length > 0) {
|
|
555
|
+
sections.push(`#### Sample records (${records.length})`, "");
|
|
556
|
+
sections.push(`| ${sampleFields.join(" | ")} |`);
|
|
557
|
+
sections.push(`| ${sampleFields.map(() => "---").join(" | ")} |`);
|
|
558
|
+
for (const record of records) {
|
|
559
|
+
const cells = sampleFields.map((code) => {
|
|
560
|
+
const cell = record[code];
|
|
561
|
+
return formatRecordValue(cell?.value).replace(/\|/g, "\\|");
|
|
562
|
+
});
|
|
563
|
+
sections.push(`| ${cells.join(" | ")} |`);
|
|
564
|
+
}
|
|
565
|
+
sections.push("");
|
|
566
|
+
}
|
|
567
|
+
}
|
|
523
568
|
}
|
|
524
569
|
return sections.join("\n");
|
|
525
570
|
}
|
|
@@ -612,7 +657,7 @@ var kintoneConnector = new ConnectorPlugin({
|
|
|
612
657
|
systemPrompt: {
|
|
613
658
|
en: `### Tools
|
|
614
659
|
|
|
615
|
-
- \`
|
|
660
|
+
- \`connector_kintone_request\`: The only way to call the kintone REST API. Use it to list apps, fetch field definitions, and read/write records. The base URL (e.g., \`https://example.cybozu.com\`) is automatically resolved. See the kintone REST API Reference below for endpoints and the kintone query syntax.
|
|
616
661
|
|
|
617
662
|
### Business Logic
|
|
618
663
|
|
|
@@ -679,7 +724,7 @@ export default async function handler(c: Context) {
|
|
|
679
724
|
- String: \`like "partial match"\``,
|
|
680
725
|
ja: `### \u30C4\u30FC\u30EB
|
|
681
726
|
|
|
682
|
-
- \`
|
|
727
|
+
- \`connector_kintone_request\`: kintone REST API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u30A2\u30D7\u30EA\u4E00\u89A7\u306E\u53D6\u5F97\u3001\u30D5\u30A3\u30FC\u30EB\u30C9\u5B9A\u7FA9\u306E\u53D6\u5F97\u3001\u30EC\u30B3\u30FC\u30C9\u306E\u8AAD\u307F\u66F8\u304D\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u30D9\u30FC\u30B9URL\uFF08\u4F8B: \`https://example.cybozu.com\`\uFF09\u306F\u81EA\u52D5\u7684\u306B\u89E3\u6C7A\u3055\u308C\u307E\u3059\u3002\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u304A\u3088\u3073kintone\u30AF\u30A8\u30EA\u69CB\u6587\u306F\u4E0B\u90E8\u306E\u300Ckintone REST API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9\u300D\u3092\u53C2\u7167\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
|
683
728
|
|
|
684
729
|
### Business Logic
|
|
685
730
|
|
|
@@ -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.
|
|
@@ -266,7 +268,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
266
268
|
/**
|
|
267
269
|
* Create tools for connections that belong to this connector.
|
|
268
270
|
* Filters connections by connectorKey internally.
|
|
269
|
-
* Returns tools keyed as
|
|
271
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
270
272
|
*/
|
|
271
273
|
createTools(connections, config, opts) {
|
|
272
274
|
const myConnections = connections.filter(
|
|
@@ -276,7 +278,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
276
278
|
for (const t of Object.values(this.tools)) {
|
|
277
279
|
const tool = t.createTool(myConnections, config);
|
|
278
280
|
const originalToModelOutput = tool.toModelOutput;
|
|
279
|
-
result[
|
|
281
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
280
282
|
...tool,
|
|
281
283
|
toModelOutput: async (options) => {
|
|
282
284
|
if (!originalToModelOutput) {
|
|
@@ -406,15 +408,15 @@ var AUTH_TYPES = {
|
|
|
406
408
|
// ../connectors/src/connectors/linear/setup.ts
|
|
407
409
|
var linearOnboarding = new ConnectorOnboarding({
|
|
408
410
|
dataOverviewInstructions: {
|
|
409
|
-
en: `1. Call
|
|
410
|
-
2. Call
|
|
411
|
-
3. Call
|
|
412
|
-
4. Call
|
|
411
|
+
en: `1. Call connector_linear_request with query \`{ teams { nodes { id name } } }\` to list all teams
|
|
412
|
+
2. Call connector_linear_request with query \`{ workflowStates { nodes { id name type } } }\` to list workflow states
|
|
413
|
+
3. Call connector_linear_request with query \`{ issues(first: 5, orderBy: updatedAt) { nodes { id identifier title state { name } assignee { name } priority } } }\` to sample recent issues
|
|
414
|
+
4. Call connector_linear_request with query \`{ projects(first: 5) { nodes { id name state } } }\` to list projects
|
|
413
415
|
5. Explore other resources (cycles, labels, users) as needed`,
|
|
414
|
-
ja: `1.
|
|
415
|
-
2.
|
|
416
|
-
3.
|
|
417
|
-
4.
|
|
416
|
+
ja: `1. connector_linear_request \u3067\u30AF\u30A8\u30EA \`{ teams { nodes { id name } } }\` \u3092\u547C\u3073\u51FA\u3057\u3001\u30C1\u30FC\u30E0\u4E00\u89A7\u3092\u53D6\u5F97
|
|
417
|
+
2. connector_linear_request \u3067\u30AF\u30A8\u30EA \`{ workflowStates { nodes { id name type } } }\` \u3092\u547C\u3073\u51FA\u3057\u3001\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u72B6\u614B\u4E00\u89A7\u3092\u53D6\u5F97
|
|
418
|
+
3. connector_linear_request \u3067\u30AF\u30A8\u30EA \`{ issues(first: 5, orderBy: updatedAt) { nodes { id identifier title state { name } assignee { name } priority } } }\` \u3092\u547C\u3073\u51FA\u3057\u3001\u6700\u8FD1\u306EIssue\u3092\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0
|
|
419
|
+
4. connector_linear_request \u3067\u30AF\u30A8\u30EA \`{ projects(first: 5) { nodes { id name state } } }\` \u3092\u547C\u3073\u51FA\u3057\u3001\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u4E00\u89A7\u3092\u53D6\u5F97
|
|
418
420
|
5. \u5FC5\u8981\u306B\u5FDC\u3058\u3066\u4ED6\u306E\u30EA\u30BD\u30FC\u30B9\uFF08cycles\u3001labels\u3001users\uFF09\u3092\u63A2\u7D22`
|
|
419
421
|
}
|
|
420
422
|
});
|
|
@@ -471,6 +473,35 @@ async function getTeamDetail(params, teamId) {
|
|
|
471
473
|
);
|
|
472
474
|
return data.team ?? null;
|
|
473
475
|
}
|
|
476
|
+
async function getIssueBreakdown(params, teamId) {
|
|
477
|
+
try {
|
|
478
|
+
const data = await gqlFetch(
|
|
479
|
+
params,
|
|
480
|
+
`query($id: String!) {
|
|
481
|
+
team(id: $id) {
|
|
482
|
+
issues(first: 250) { nodes { state { name type } } }
|
|
483
|
+
}
|
|
484
|
+
}`,
|
|
485
|
+
{ id: teamId }
|
|
486
|
+
);
|
|
487
|
+
const nodes = data.team?.issues?.nodes ?? [];
|
|
488
|
+
const counts = /* @__PURE__ */ new Map();
|
|
489
|
+
for (const n of nodes) {
|
|
490
|
+
const key = `${n.state?.name ?? "Unknown"}|${n.state?.type ?? "unknown"}`;
|
|
491
|
+
const existing = counts.get(key);
|
|
492
|
+
if (existing) existing.count++;
|
|
493
|
+
else
|
|
494
|
+
counts.set(key, {
|
|
495
|
+
stateName: n.state?.name ?? "Unknown",
|
|
496
|
+
stateType: n.state?.type ?? "unknown",
|
|
497
|
+
count: 1
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
return { total: nodes.length, byState: Array.from(counts.values()) };
|
|
501
|
+
} catch {
|
|
502
|
+
return null;
|
|
503
|
+
}
|
|
504
|
+
}
|
|
474
505
|
var linearSetupFlow = {
|
|
475
506
|
initialState: () => ({}),
|
|
476
507
|
steps: [
|
|
@@ -527,6 +558,19 @@ var linearSetupFlow = {
|
|
|
527
558
|
sections.push(` - ${s.name} (${s.type})`);
|
|
528
559
|
}
|
|
529
560
|
sections.push("");
|
|
561
|
+
const breakdown = await getIssueBreakdown(rt.params, teamId);
|
|
562
|
+
if (breakdown && breakdown.byState.length > 0) {
|
|
563
|
+
sections.push(
|
|
564
|
+
`#### Issues (${breakdown.total}${breakdown.total === 250 ? "+" : ""})`,
|
|
565
|
+
""
|
|
566
|
+
);
|
|
567
|
+
sections.push("| State | Type | Count |");
|
|
568
|
+
sections.push("|-------|------|-------|");
|
|
569
|
+
for (const b of breakdown.byState) {
|
|
570
|
+
sections.push(`| ${b.stateName} | ${b.stateType} | ${b.count} |`);
|
|
571
|
+
}
|
|
572
|
+
sections.push("");
|
|
573
|
+
}
|
|
530
574
|
}
|
|
531
575
|
return sections.join("\n");
|
|
532
576
|
}
|
|
@@ -637,7 +681,7 @@ var linearConnector = new ConnectorPlugin({
|
|
|
637
681
|
systemPrompt: {
|
|
638
682
|
en: `### Tools
|
|
639
683
|
|
|
640
|
-
- \`
|
|
684
|
+
- \`connector_linear_request\`: The only way to call the Linear GraphQL API. Use it to query and mutate all Linear resources: issues, projects, teams, cycles, users, labels, workflow states, and comments. Authentication is configured automatically. Linear's API is GraphQL-only \u2014 send a query string and optional variables. Pagination uses Relay-style cursors with \`first\`/\`after\` and \`last\`/\`before\` arguments. Archived resources are hidden by default; pass \`includeArchived: true\` to include them.
|
|
641
685
|
|
|
642
686
|
### Business Logic
|
|
643
687
|
|
|
@@ -698,7 +742,7 @@ export default async function handler(c: Context) {
|
|
|
698
742
|
- \`mutation { commentCreate(input: { issueId: "...", body: "..." }) { success comment { id body } } }\` \u2014 add comment`,
|
|
699
743
|
ja: `### \u30C4\u30FC\u30EB
|
|
700
744
|
|
|
701
|
-
- \`
|
|
745
|
+
- \`connector_linear_request\`: Linear GraphQL API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002Issue\u3001\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u3001\u30C1\u30FC\u30E0\u3001\u30B5\u30A4\u30AF\u30EB\u3001\u30E6\u30FC\u30B6\u30FC\u3001\u30E9\u30D9\u30EB\u3001\u30EF\u30FC\u30AF\u30D5\u30ED\u30FC\u72B6\u614B\u3001\u30B3\u30E1\u30F3\u30C8\u306A\u3069\u3059\u3079\u3066\u306ELinear\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\u3002Linear\u306EAPI\u306FGraphQL\u306E\u307F\u3067\u3059\u3002\u30AF\u30A8\u30EA\u6587\u5B57\u5217\u3068\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u5909\u6570\u3092\u9001\u4FE1\u3057\u307E\u3059\u3002\u30DA\u30FC\u30B8\u30CD\u30FC\u30B7\u30E7\u30F3\u306FRelay\u5F62\u5F0F\u306E\u30AB\u30FC\u30BD\u30EB\u30D9\u30FC\u30B9\u3067\u3001\`first\`/\`after\`\u304A\u3088\u3073\`last\`/\`before\`\u5F15\u6570\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002\u30A2\u30FC\u30AB\u30A4\u30D6\u3055\u308C\u305F\u30EA\u30BD\u30FC\u30B9\u306F\u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u975E\u8868\u793A\u3067\u3059\u3002\`includeArchived: true\`\u3092\u6E21\u3059\u3068\u542B\u3081\u3089\u308C\u307E\u3059\u3002
|
|
702
746
|
|
|
703
747
|
### Business Logic
|
|
704
748
|
|
|
@@ -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) {
|
|
@@ -451,11 +453,11 @@ var linkedinAdsOnboarding = new ConnectorOnboarding({
|
|
|
451
453
|
- Write only 1 sentence between tool calls, then immediately call the next tool. Skip unnecessary explanations and proceed efficiently`
|
|
452
454
|
},
|
|
453
455
|
dataOverviewInstructions: {
|
|
454
|
-
en: `1. Call
|
|
455
|
-
2. Call
|
|
456
|
+
en: `1. Call connector_linkedin-ads_request with GET adAccounts/{adAccountId}/adCampaigns?q=search&search=(status:(values:List(ACTIVE)))&pageSize=10 to explore campaigns
|
|
457
|
+
2. Call connector_linkedin-ads_request with GET adAnalytics?q=analytics&pivot=CAMPAIGN&timeGranularity=MONTHLY&dateRange=(start:(year:2025,month:1,day:1))&accounts=List(urn%3Ali%3AsponsoredAccount%3A{adAccountId})&fields=impressions,clicks,costInLocalCurrency,dateRange,pivotValues to check recent performance
|
|
456
458
|
3. Explore campaign groups and creatives as needed to understand the data structure`,
|
|
457
|
-
ja: `1.
|
|
458
|
-
2.
|
|
459
|
+
ja: `1. connector_linkedin-ads_request \u3067 GET adAccounts/{adAccountId}/adCampaigns?q=search&search=(status:(values:List(ACTIVE)))&pageSize=10 \u3092\u547C\u3073\u51FA\u3057\u3066\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u30C7\u30FC\u30BF\u3092\u63A2\u7D22
|
|
460
|
+
2. connector_linkedin-ads_request \u3067 GET adAnalytics?q=analytics&pivot=CAMPAIGN&timeGranularity=MONTHLY&dateRange=(start:(year:2025,month:1,day:1))&accounts=List(urn%3Ali%3AsponsoredAccount%3A{adAccountId})&fields=impressions,clicks,costInLocalCurrency,dateRange,pivotValues \u3092\u547C\u3073\u51FA\u3057\u3066\u76F4\u8FD1\u306E\u30D1\u30D5\u30A9\u30FC\u30DE\u30F3\u30B9\u3092\u78BA\u8A8D
|
|
459
461
|
3. \u5FC5\u8981\u306B\u5FDC\u3058\u3066\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u30B0\u30EB\u30FC\u30D7\u3084\u30AF\u30EA\u30A8\u30A4\u30C6\u30A3\u30D6\u3092\u63A2\u7D22\u3057\u3001\u30C7\u30FC\u30BF\u69CB\u9020\u3092\u628A\u63E1`
|
|
460
462
|
}
|
|
461
463
|
});
|
|
@@ -500,6 +502,24 @@ async function listAdAccounts(proxyFetch) {
|
|
|
500
502
|
const data = await res.json();
|
|
501
503
|
return data.elements ?? [];
|
|
502
504
|
}
|
|
505
|
+
async function fetchCampaignCount(proxyFetch, accountId) {
|
|
506
|
+
try {
|
|
507
|
+
const account = encodeURIComponent(
|
|
508
|
+
`urn:li:sponsoredAccount:${accountId}`
|
|
509
|
+
);
|
|
510
|
+
const url = `${BASE_URL3}/adCampaigns?q=search&search.account.values[0]=${account}&count=1`;
|
|
511
|
+
const res = await proxyFetch(url, {
|
|
512
|
+
method: "GET",
|
|
513
|
+
headers: defaultHeaders()
|
|
514
|
+
});
|
|
515
|
+
if (!res.ok) return null;
|
|
516
|
+
const data = await res.json();
|
|
517
|
+
const total = data.paging?.total;
|
|
518
|
+
return typeof total === "number" ? total : null;
|
|
519
|
+
} catch {
|
|
520
|
+
return null;
|
|
521
|
+
}
|
|
522
|
+
}
|
|
503
523
|
var linkedinAdsSetupFlow = {
|
|
504
524
|
initialState: () => ({}),
|
|
505
525
|
steps: [
|
|
@@ -547,16 +567,25 @@ var linkedinAdsSetupFlow = {
|
|
|
547
567
|
sections.push("_No ad accounts selected._", "");
|
|
548
568
|
return sections.join("\n");
|
|
549
569
|
}
|
|
550
|
-
sections.push(
|
|
551
|
-
|
|
552
|
-
|
|
570
|
+
sections.push(
|
|
571
|
+
"| Ad Account ID | Name | Currency | Type | Status | Campaigns |"
|
|
572
|
+
);
|
|
573
|
+
sections.push(
|
|
574
|
+
"|---------------|------|----------|------|--------|-----------|"
|
|
575
|
+
);
|
|
576
|
+
const campaignCounts = await Promise.all(
|
|
577
|
+
targetIds.map((id) => fetchCampaignCount(rt.config.proxyFetch, id))
|
|
578
|
+
);
|
|
579
|
+
for (let i = 0; i < targetIds.length; i++) {
|
|
580
|
+
const id = targetIds[i];
|
|
553
581
|
const account = byId.get(id);
|
|
554
582
|
const name = (account?.name ?? "-").replace(/\|/g, "\\|");
|
|
555
583
|
const currency = account?.currency ?? "-";
|
|
556
584
|
const type = account?.type ?? "-";
|
|
557
585
|
const status = account?.status ?? "-";
|
|
586
|
+
const campaigns = campaignCounts[i] == null ? "-" : String(campaignCounts[i]);
|
|
558
587
|
sections.push(
|
|
559
|
-
`| ${id} | ${name} | ${currency} | ${type} | ${status} |`
|
|
588
|
+
`| ${id} | ${name} | ${currency} | ${type} | ${status} | ${campaigns} |`
|
|
560
589
|
);
|
|
561
590
|
}
|
|
562
591
|
sections.push("");
|
|
@@ -724,8 +753,8 @@ var linkedinAdsConnector = new ConnectorPlugin({
|
|
|
724
753
|
systemPrompt: {
|
|
725
754
|
en: `### Tools
|
|
726
755
|
|
|
727
|
-
- \`
|
|
728
|
-
- \`
|
|
756
|
+
- \`connector_linkedin-ads_request\`: Send authenticated requests to the LinkedIn Marketing API (REST). The {adAccountId} placeholder in paths is automatically replaced. Authentication is handled automatically via OAuth proxy. Required headers (LinkedIn-Version, X-Restli-Protocol-Version) are set automatically.
|
|
757
|
+
- \`connector_linkedin-ads_listAdAccounts\`: List accessible LinkedIn ad accounts. Use this during setup to discover available accounts.
|
|
729
758
|
|
|
730
759
|
### LinkedIn Marketing API Reference
|
|
731
760
|
|
|
@@ -817,8 +846,8 @@ const data = await res.json();
|
|
|
817
846
|
\`\`\``,
|
|
818
847
|
ja: `### \u30C4\u30FC\u30EB
|
|
819
848
|
|
|
820
|
-
- \`
|
|
821
|
-
- \`
|
|
849
|
+
- \`connector_linkedin-ads_request\`: LinkedIn Marketing API\uFF08REST\uFF09\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\u5FC5\u9808\u30D8\u30C3\u30C0\u30FC\uFF08LinkedIn-Version\u3001X-Restli-Protocol-Version\uFF09\u306F\u81EA\u52D5\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002
|
|
850
|
+
- \`connector_linkedin-ads_listAdAccounts\`: \u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306ALinkedIn\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
|
|
822
851
|
|
|
823
852
|
### LinkedIn Marketing API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
|
|
824
853
|
|