@squadbase/vite-server 0.1.17-dev.24af54e → 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 +4873 -1073
- package/dist/connectors/airtable-oauth.js +78 -11
- package/dist/connectors/airtable.js +74 -11
- package/dist/connectors/amplitude.js +38 -11
- package/dist/connectors/anthropic.js +4 -2
- package/dist/connectors/asana.js +67 -13
- package/dist/connectors/attio.js +60 -16
- package/dist/connectors/aws-billing.js +38 -11
- package/dist/connectors/azure-sql.js +64 -13
- package/dist/connectors/backlog-api-key.js +70 -18
- package/dist/connectors/clickup.js +80 -13
- package/dist/connectors/cosmosdb.js +42 -15
- package/dist/connectors/customerio.js +39 -12
- package/dist/connectors/dbt.js +716 -28
- package/dist/connectors/freshdesk.js +112 -11
- package/dist/connectors/freshsales.js +38 -11
- package/dist/connectors/freshservice.js +38 -11
- package/dist/connectors/gamma.js +47 -20
- package/dist/connectors/gemini.js +4 -2
- package/dist/connectors/github.js +42 -15
- package/dist/connectors/gmail-oauth.js +38 -13
- package/dist/connectors/gmail.js +34 -7
- package/dist/connectors/google-ads.js +38 -11
- package/dist/connectors/google-analytics-oauth.js +182 -28
- package/dist/connectors/google-analytics.js +653 -104
- package/dist/connectors/google-audit-log.js +34 -7
- package/dist/connectors/google-calendar-oauth.js +91 -18
- package/dist/connectors/google-calendar.js +91 -14
- package/dist/connectors/google-docs.js +38 -13
- package/dist/connectors/google-drive.js +60 -13
- package/dist/connectors/google-search-console-oauth.js +156 -20
- package/dist/connectors/google-sheets.js +36 -9
- package/dist/connectors/google-slides.js +38 -13
- package/dist/connectors/grafana.js +75 -13
- package/dist/connectors/hubspot-oauth.js +69 -12
- package/dist/connectors/hubspot.js +55 -12
- package/dist/connectors/influxdb.js +38 -11
- package/dist/connectors/intercom-oauth.js +100 -15
- package/dist/connectors/intercom.js +42 -15
- package/dist/connectors/jdbc.js +36 -9
- package/dist/connectors/jira-api-key.js +98 -14
- package/dist/connectors/kintone-api-token.js +96 -21
- package/dist/connectors/kintone.js +84 -14
- package/dist/connectors/linear.js +84 -15
- package/dist/connectors/linkedin-ads.js +71 -17
- package/dist/connectors/mailchimp-oauth.js +36 -9
- package/dist/connectors/mailchimp.js +36 -9
- package/dist/connectors/meta-ads-oauth.js +63 -17
- package/dist/connectors/meta-ads.js +65 -17
- package/dist/connectors/mixpanel.js +38 -11
- package/dist/connectors/monday.js +39 -12
- package/dist/connectors/mongodb.js +38 -11
- package/dist/connectors/notion-oauth.js +88 -14
- package/dist/connectors/notion.js +90 -14
- package/dist/connectors/openai.js +4 -2
- package/dist/connectors/oracle.js +78 -20
- package/dist/connectors/outlook-oauth.js +48 -23
- package/dist/connectors/powerbi-oauth.js +321 -49
- package/dist/connectors/salesforce.js +72 -12
- package/dist/connectors/semrush.js +374 -52
- package/dist/connectors/sentry.js +66 -13
- package/dist/connectors/shopify-oauth.js +71 -13
- package/dist/connectors/shopify.js +38 -11
- package/dist/connectors/sqlserver.js +64 -13
- package/dist/connectors/stripe-api-key.js +96 -18
- package/dist/connectors/stripe-oauth.js +98 -22
- package/dist/connectors/supabase.js +55 -11
- package/dist/connectors/tableau.js +262 -92
- package/dist/connectors/tiktok-ads.js +67 -19
- package/dist/connectors/wix-store.js +38 -11
- package/dist/connectors/zendesk-oauth.js +83 -15
- package/dist/connectors/zendesk.js +42 -15
- package/dist/index.d.ts +1 -0
- package/dist/index.js +4902 -1077
- package/dist/main.js +4891 -1071
- package/dist/vite-plugin.js +4871 -1071
- 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.
|
|
@@ -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) {
|
|
@@ -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.
|
|
@@ -402,7 +404,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
402
404
|
/**
|
|
403
405
|
* Create tools for connections that belong to this connector.
|
|
404
406
|
* Filters connections by connectorKey internally.
|
|
405
|
-
* Returns tools keyed as
|
|
407
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
406
408
|
*/
|
|
407
409
|
createTools(connections, config, opts) {
|
|
408
410
|
const myConnections = connections.filter(
|
|
@@ -412,7 +414,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
412
414
|
for (const t of Object.values(this.tools)) {
|
|
413
415
|
const tool = t.createTool(myConnections, config);
|
|
414
416
|
const originalToModelOutput = tool.toModelOutput;
|
|
415
|
-
result[
|
|
417
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
416
418
|
...tool,
|
|
417
419
|
toModelOutput: async (options) => {
|
|
418
420
|
if (!originalToModelOutput) {
|
|
@@ -468,19 +470,34 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
468
470
|
};
|
|
469
471
|
let state = flow.initialState();
|
|
470
472
|
let answerIdx = 0;
|
|
473
|
+
const pendingParameterUpdates = [];
|
|
471
474
|
for (const step of flow.steps) {
|
|
472
475
|
const ans = ctx.answers[answerIdx];
|
|
473
476
|
if (ans && ans.questionSlug === step.slug) {
|
|
474
477
|
state = step.applyAnswer(state, ans.answer);
|
|
478
|
+
if (step.toParameterUpdates) {
|
|
479
|
+
pendingParameterUpdates.push(...step.toParameterUpdates(state));
|
|
480
|
+
}
|
|
475
481
|
answerIdx += 1;
|
|
476
482
|
continue;
|
|
477
483
|
}
|
|
484
|
+
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
478
485
|
if (step.type === "text") {
|
|
486
|
+
if (step.fetchOptions) {
|
|
487
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
488
|
+
if (options2.length === 0) {
|
|
489
|
+
continue;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
479
492
|
return {
|
|
480
493
|
type: "nextQuestion",
|
|
481
494
|
questionSlug: step.slug,
|
|
482
495
|
question: step.question[ctx.language],
|
|
483
|
-
questionType: "text"
|
|
496
|
+
questionType: "text",
|
|
497
|
+
allowFreeText: resolvedAllowFreeText,
|
|
498
|
+
...pendingParameterUpdates.length > 0 && {
|
|
499
|
+
parameterUpdates: pendingParameterUpdates
|
|
500
|
+
}
|
|
484
501
|
};
|
|
485
502
|
}
|
|
486
503
|
const options = step.fetchOptions ? await step.fetchOptions(state, runtime) : [];
|
|
@@ -492,11 +509,21 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
492
509
|
questionSlug: step.slug,
|
|
493
510
|
question: step.question[ctx.language],
|
|
494
511
|
questionType: step.type,
|
|
495
|
-
options
|
|
512
|
+
options,
|
|
513
|
+
allowFreeText: resolvedAllowFreeText,
|
|
514
|
+
...pendingParameterUpdates.length > 0 && {
|
|
515
|
+
parameterUpdates: pendingParameterUpdates
|
|
516
|
+
}
|
|
496
517
|
};
|
|
497
518
|
}
|
|
498
519
|
const dataInvestigationResult = await flow.finalize(state, runtime);
|
|
499
|
-
return {
|
|
520
|
+
return {
|
|
521
|
+
type: "fulfilled",
|
|
522
|
+
dataInvestigationResult,
|
|
523
|
+
...pendingParameterUpdates.length > 0 && {
|
|
524
|
+
parameterUpdates: pendingParameterUpdates
|
|
525
|
+
}
|
|
526
|
+
};
|
|
500
527
|
}
|
|
501
528
|
async function resolveSetupSelection(params) {
|
|
502
529
|
const { selected, allSentinel, fetchAll, limit } = params;
|
|
@@ -517,16 +544,16 @@ var AUTH_TYPES = {
|
|
|
517
544
|
// ../connectors/src/connectors/github/setup.ts
|
|
518
545
|
var githubOnboarding = new ConnectorOnboarding({
|
|
519
546
|
dataOverviewInstructions: {
|
|
520
|
-
en: `1. Call
|
|
521
|
-
2. Call
|
|
547
|
+
en: `1. Call connector_github_request with GET /user to confirm credentials and discover the authenticated account (login, name, plan).
|
|
548
|
+
2. Call connector_github_request with GET /user/repos?per_page=10&sort=updated to sample repositories the token can see. For organisation-owned repos, use GET /orgs/{org}/repos.
|
|
522
549
|
3. Pick a representative repo and inspect its activity:
|
|
523
550
|
- GET /repos/{owner}/{repo}/issues?state=open&per_page=10 \u2014 recent open issues (the GitHub API treats pull requests as issues; filter with the \`pull_request\` field if you want only issues).
|
|
524
551
|
- GET /repos/{owner}/{repo}/pulls?state=open&per_page=10 \u2014 open pull requests.
|
|
525
552
|
- GET /repos/{owner}/{repo}/commits?per_page=10 \u2014 recent commits on the default branch.
|
|
526
553
|
4. For broad discovery, use the search endpoints (GET /search/repositories?q=..., /search/issues?q=..., /search/code?q=...). These are heavily rate-limited (30 req/min for authenticated users), so use them sparingly.
|
|
527
554
|
5. Pagination is page-based: \`?page=1&per_page=100\` (max 100). The \`Link\` response header carries \`rel="next"\` / \`rel="last"\` URLs when more results exist.`,
|
|
528
|
-
ja: `1.
|
|
529
|
-
2.
|
|
555
|
+
ja: `1. connector_github_request \u3067 GET /user \u3092\u547C\u3073\u51FA\u3057\u3001\u8A8D\u8A3C\u60C5\u5831\u306E\u78BA\u8A8D\u3068\u8A8D\u8A3C\u6E08\u307F\u30A2\u30AB\u30A6\u30F3\u30C8\u306E\u60C5\u5831\uFF08login, name, plan\uFF09\u3092\u53D6\u5F97\u3057\u307E\u3059\u3002
|
|
556
|
+
2. connector_github_request \u3067 GET /user/repos?per_page=10&sort=updated \u3092\u547C\u3073\u51FA\u3057\u3066\u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306A\u30EA\u30DD\u30B8\u30C8\u30EA\u3092\u30B5\u30F3\u30D7\u30EA\u30F3\u30B0\u3057\u307E\u3059\u3002Organization \u6240\u6709\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u306F GET /orgs/{org}/repos \u3092\u4F7F\u7528\u3057\u307E\u3059\u3002
|
|
530
557
|
3. \u4EE3\u8868\u7684\u306A\u30EA\u30DD\u30B8\u30C8\u30EA\u3092\u9078\u3073\u3001\u30A2\u30AF\u30C6\u30A3\u30D3\u30C6\u30A3\u3092\u78BA\u8A8D\u3057\u307E\u3059:
|
|
531
558
|
- GET /repos/{owner}/{repo}/issues?state=open&per_page=10 \u2014 \u76F4\u8FD1\u306E\u30AA\u30FC\u30D7\u30F3\u30A4\u30B7\u30E5\u30FC\uFF08GitHub API \u306F\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8\u3082\u30A4\u30B7\u30E5\u30FC\u6271\u3044\u3057\u307E\u3059\u3002\u30A4\u30B7\u30E5\u30FC\u306E\u307F\u304C\u5FC5\u8981\u306A\u5834\u5408\u306F \`pull_request\` \u30D5\u30A3\u30FC\u30EB\u30C9\u3067\u9664\u5916\uFF09\u3002
|
|
532
559
|
- GET /repos/{owner}/{repo}/pulls?state=open&per_page=10 \u2014 \u30AA\u30FC\u30D7\u30F3\u306A\u30D7\u30EB\u30EA\u30AF\u30A8\u30B9\u30C8\u4E00\u89A7\u3002
|
|
@@ -854,14 +881,14 @@ var githubConnector = new ConnectorPlugin({
|
|
|
854
881
|
systemPrompt: {
|
|
855
882
|
en: `### Tools
|
|
856
883
|
|
|
857
|
-
- \`
|
|
884
|
+
- \`connector_github_request\`: The only way to call the GitHub REST API. Use it to read repositories, issues, pull requests, commits, comments, releases, GitHub Actions runs, organisation metadata, and the search endpoints. Authentication (\`Authorization: Bearer <PAT>\`) and required headers (\`Accept: application/vnd.github+json\`, \`X-GitHub-Api-Version: 2022-11-28\`, \`User-Agent\`) are configured automatically. Both Classic (\`ghp_\u2026\`) and fine-grained (\`github_pat_\u2026\`) tokens work.
|
|
858
885
|
|
|
859
886
|
### Cloning Repositories for Deep Code Exploration
|
|
860
887
|
|
|
861
|
-
\`
|
|
888
|
+
\`connector_github_request\` plus \`/repos/{owner}/{repo}/contents/{path}\` is fine for reading a few files. When the task requires deep exploration \u2014 reading many files, searching across the codebase with ripgrep / grep, or inspecting many commits \u2014 prefer \`git clone\` via the bash tool. Follow these rules **strictly**:
|
|
862
889
|
|
|
863
890
|
1. **Always clone OUTSIDE the dashboard project.** The current working directory is the user's Vite-based dashboard project, which is itself a git repository. Cloning into it (or any subdirectory of it) would pollute the dashboard's git index, risk accidental commits, and create nested-repo confusion. Always clone into a path outside the project \u2014 use \`$(mktemp -d)\`, \`/tmp/<unique-name>\`, or \`~/.cache/<unique-name>\`.
|
|
864
|
-
2. **NEVER commit, push, or otherwise write to the cloned repo.** This is a strictly read-only flow. Do not run \`git commit\`, \`git push\`, \`git tag\`, \`git rebase\`, or any other write operation inside the cloned working tree. The connector is for reading source; if the task requires writing back to GitHub (creating an issue, posting a comment, etc.), use \`
|
|
891
|
+
2. **NEVER commit, push, or otherwise write to the cloned repo.** This is a strictly read-only flow. Do not run \`git commit\`, \`git push\`, \`git tag\`, \`git rebase\`, or any other write operation inside the cloned working tree. The connector is for reading source; if the task requires writing back to GitHub (creating an issue, posting a comment, etc.), use \`connector_github_request\` \u2014 never \`git push\`.
|
|
865
892
|
3. **Authenticate via HTTPS using the PAT inline.** Run \`git clone https://<TOKEN>@github.com/<owner>/<repo>.git <target-dir>\`. Avoid logging the URL with the token interpolated; redact when echoing commands.
|
|
866
893
|
4. **Prefer shallow clones.** Use \`--depth=1 --single-branch\` unless full history is specifically required.
|
|
867
894
|
5. **Clean up when done.** Remove the cloned directory (\`rm -rf <target-dir>\`) once exploration is complete.
|
|
@@ -961,14 +988,14 @@ export default async function handler(c: Context) {
|
|
|
961
988
|
- GET \`/rate_limit\` \u2014 Inspect remaining quota across REST / GraphQL / search`,
|
|
962
989
|
ja: `### \u30C4\u30FC\u30EB
|
|
963
990
|
|
|
964
|
-
- \`
|
|
991
|
+
- \`connector_github_request\`: GitHub REST API \u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u30EA\u30DD\u30B8\u30C8\u30EA\u3001Issue\u3001Pull Request\u3001\u30B3\u30DF\u30C3\u30C8\u3001\u30B3\u30E1\u30F3\u30C8\u3001Release\u3001GitHub Actions \u306E\u30E9\u30F3\u3001\u7D44\u7E54\u30E1\u30BF\u60C5\u5831\u3001\u30B5\u30FC\u30C1\u7CFB\u30A8\u30F3\u30C9\u30DD\u30A4\u30F3\u30C8\u306E\u53D6\u5F97\u30FB\u66F4\u65B0\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u8A8D\u8A3C\uFF08\`Authorization: Bearer <PAT>\`\uFF09\u3068\u5FC5\u9808\u30D8\u30C3\u30C0\uFF08\`Accept: application/vnd.github+json\`\u3001\`X-GitHub-Api-Version: 2022-11-28\`\u3001\`User-Agent\`\uFF09\u306F\u81EA\u52D5\u3067\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002Classic\uFF08\`ghp_\u2026\`\uFF09/ fine-grained\uFF08\`github_pat_\u2026\`\uFF09\u3069\u3061\u3089\u306E PAT \u3082\u5229\u7528\u53EF\u80FD\u3067\u3059\u3002
|
|
965
992
|
|
|
966
993
|
### \u6DF1\u3044\u30B3\u30FC\u30C9\u63A2\u7D22\u306E\u305F\u3081\u306E\u30EA\u30DD\u30B8\u30C8\u30EA\u30AF\u30ED\u30FC\u30F3
|
|
967
994
|
|
|
968
|
-
\u6570\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u3080\u7A0B\u5EA6\u306A\u3089 \`
|
|
995
|
+
\u6570\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u3080\u7A0B\u5EA6\u306A\u3089 \`connector_github_request\` \u3068 \`/repos/{owner}/{repo}/contents/{path}\` \u3067\u5341\u5206\u3067\u3059\u3002\u591A\u6570\u306E\u30D5\u30A1\u30A4\u30EB\u3092\u8AAD\u3080\u3001ripgrep / grep \u3067\u6A2A\u65AD\u691C\u7D22\u3059\u308B\u3001\u8907\u6570\u30B3\u30DF\u30C3\u30C8\u3092\u8ABF\u3079\u308B\u306A\u3069 **\u6DF1\u3044\u63A2\u7D22\u304C\u5FC5\u8981\u306A\u5834\u5408\u306F** bash \u30C4\u30FC\u30EB\u7D4C\u7531\u3067 \`git clone\` \u3092\u4F7F\u3063\u3066\u304F\u3060\u3055\u3044\u3002\u4EE5\u4E0B\u306E\u30EB\u30FC\u30EB\u3092 **\u53B3\u5B88** \u3059\u308B\u3053\u3068\uFF1A
|
|
969
996
|
|
|
970
997
|
1. **\u5FC5\u305A\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u5916\u306B\u30AF\u30ED\u30FC\u30F3\u3059\u308B\u3053\u3068\u3002** \u73FE\u5728\u306E\u4F5C\u696D\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u306F\u30E6\u30FC\u30B6\u30FC\u306E Vite \u30D9\u30FC\u30B9\u306E\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\uFF08\u305D\u308C\u81EA\u4F53\u304C git \u30EA\u30DD\u30B8\u30C8\u30EA\uFF09\u3067\u3059\u3002\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5185\uFF08\u3042\u308B\u3044\u306F\u305D\u306E\u30B5\u30D6\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\uFF09\u306B\u30AF\u30ED\u30FC\u30F3\u3059\u308B\u3068\u30C0\u30C3\u30B7\u30E5\u30DC\u30FC\u30C9\u306E git \u306E\u72B6\u614B\u3092\u6C5A\u67D3\u3057\u3001\u8AA4\u30B3\u30DF\u30C3\u30C8\u3084\u30CD\u30B9\u30C8\u3057\u305F\u30EA\u30DD\u30B8\u30C8\u30EA\u306E\u6DF7\u4E71\u306E\u539F\u56E0\u306B\u306A\u308A\u307E\u3059\u3002\u5FC5\u305A\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u5916\u306E\u30D1\u30B9\uFF08\`$(mktemp -d)\`, \`/tmp/<unique-name>\`, \`~/.cache/<unique-name>\` \u306A\u3069\uFF09\u306B\u30AF\u30ED\u30FC\u30F3\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
|
971
|
-
2. **\u7D76\u5BFE\u306B commit / push / \u66F8\u304D\u8FBC\u307F\u64CD\u4F5C\u3092\u3057\u306A\u3044\u3053\u3068\u3002** \u3053\u308C\u306F\u53B3\u5BC6\u306B read-only \u306E\u30D5\u30ED\u30FC\u3067\u3059\u3002\u30AF\u30ED\u30FC\u30F3\u3057\u305F\u4F5C\u696D\u30C4\u30EA\u30FC\u5185\u3067 \`git commit\` / \`git push\` / \`git tag\` / \`git rebase\` \u306A\u3069\u306E\u66F8\u304D\u8FBC\u307F\u64CD\u4F5C\u3092\u884C\u308F\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002GitHub \u3078\u306E\u66F8\u304D\u8FBC\u307F\u304C\u5FC5\u8981\u306A\u5834\u5408\uFF08Issue \u4F5C\u6210\u3001\u30B3\u30E1\u30F3\u30C8\u6295\u7A3F\u7B49\uFF09\u306F \`
|
|
998
|
+
2. **\u7D76\u5BFE\u306B commit / push / \u66F8\u304D\u8FBC\u307F\u64CD\u4F5C\u3092\u3057\u306A\u3044\u3053\u3068\u3002** \u3053\u308C\u306F\u53B3\u5BC6\u306B read-only \u306E\u30D5\u30ED\u30FC\u3067\u3059\u3002\u30AF\u30ED\u30FC\u30F3\u3057\u305F\u4F5C\u696D\u30C4\u30EA\u30FC\u5185\u3067 \`git commit\` / \`git push\` / \`git tag\` / \`git rebase\` \u306A\u3069\u306E\u66F8\u304D\u8FBC\u307F\u64CD\u4F5C\u3092\u884C\u308F\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002GitHub \u3078\u306E\u66F8\u304D\u8FBC\u307F\u304C\u5FC5\u8981\u306A\u5834\u5408\uFF08Issue \u4F5C\u6210\u3001\u30B3\u30E1\u30F3\u30C8\u6295\u7A3F\u7B49\uFF09\u306F \`connector_github_request\` \u3092\u4F7F\u7528\u3057\u3001\`git push\` \u3067\u884C\u308F\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
|
|
972
999
|
3. **HTTPS \u8A8D\u8A3C\u3067 PAT \u3092\u30A4\u30F3\u30E9\u30A4\u30F3\u3067\u6E21\u3059\u3053\u3068\u3002** \`git clone https://<TOKEN>@github.com/<owner>/<repo>.git <target-dir>\` \u306E\u3088\u3046\u306B\u57CB\u3081\u8FBC\u307F\u307E\u3059\u3002\u30C8\u30FC\u30AF\u30F3\u5165\u308A\u306E URL \u3092\u305D\u306E\u307E\u307E\u30ED\u30B0\u306B\u51FA\u529B\u3057\u306A\u3044\u3088\u3046\u3001\u30B3\u30DE\u30F3\u30C9\u3092\u30A8\u30B3\u30FC\u3059\u308B\u969B\u306F\u30DE\u30B9\u30AF\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
|
973
1000
|
4. **shallow clone \u3092\u512A\u5148\u3059\u308B\u3053\u3068\u3002** \u5C65\u6B74\u304C\u7279\u306B\u5FC5\u8981\u3067\u306A\u3044\u9650\u308A \`--depth=1 --single-branch\` \u3092\u4F7F\u7528\u3057\u307E\u3059\u3002
|
|
974
1001
|
5. **\u4F5C\u696D\u5F8C\u306F\u524A\u9664\u3059\u308B\u3053\u3068\u3002** \u63A2\u7D22\u304C\u7D42\u308F\u3063\u305F\u3089\u30AF\u30ED\u30FC\u30F3\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u524A\u9664\uFF08\`rm -rf <target-dir>\`\uFF09\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
|
@@ -212,7 +212,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
212
212
|
/**
|
|
213
213
|
* Create tools for connections that belong to this connector.
|
|
214
214
|
* Filters connections by connectorKey internally.
|
|
215
|
-
* Returns tools keyed as
|
|
215
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
216
216
|
*/
|
|
217
217
|
createTools(connections, config, opts) {
|
|
218
218
|
const myConnections = connections.filter(
|
|
@@ -222,7 +222,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
222
222
|
for (const t of Object.values(this.tools)) {
|
|
223
223
|
const tool = t.createTool(myConnections, config);
|
|
224
224
|
const originalToModelOutput = tool.toModelOutput;
|
|
225
|
-
result[
|
|
225
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
226
226
|
...tool,
|
|
227
227
|
toModelOutput: async (options) => {
|
|
228
228
|
if (!originalToModelOutput) {
|
|
@@ -278,19 +278,34 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
278
278
|
};
|
|
279
279
|
let state = flow.initialState();
|
|
280
280
|
let answerIdx = 0;
|
|
281
|
+
const pendingParameterUpdates = [];
|
|
281
282
|
for (const step of flow.steps) {
|
|
282
283
|
const ans = ctx.answers[answerIdx];
|
|
283
284
|
if (ans && ans.questionSlug === step.slug) {
|
|
284
285
|
state = step.applyAnswer(state, ans.answer);
|
|
286
|
+
if (step.toParameterUpdates) {
|
|
287
|
+
pendingParameterUpdates.push(...step.toParameterUpdates(state));
|
|
288
|
+
}
|
|
285
289
|
answerIdx += 1;
|
|
286
290
|
continue;
|
|
287
291
|
}
|
|
292
|
+
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
288
293
|
if (step.type === "text") {
|
|
294
|
+
if (step.fetchOptions) {
|
|
295
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
296
|
+
if (options2.length === 0) {
|
|
297
|
+
continue;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
289
300
|
return {
|
|
290
301
|
type: "nextQuestion",
|
|
291
302
|
questionSlug: step.slug,
|
|
292
303
|
question: step.question[ctx.language],
|
|
293
|
-
questionType: "text"
|
|
304
|
+
questionType: "text",
|
|
305
|
+
allowFreeText: resolvedAllowFreeText,
|
|
306
|
+
...pendingParameterUpdates.length > 0 && {
|
|
307
|
+
parameterUpdates: pendingParameterUpdates
|
|
308
|
+
}
|
|
294
309
|
};
|
|
295
310
|
}
|
|
296
311
|
const options = step.fetchOptions ? await step.fetchOptions(state, runtime) : [];
|
|
@@ -302,11 +317,21 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
302
317
|
questionSlug: step.slug,
|
|
303
318
|
question: step.question[ctx.language],
|
|
304
319
|
questionType: step.type,
|
|
305
|
-
options
|
|
320
|
+
options,
|
|
321
|
+
allowFreeText: resolvedAllowFreeText,
|
|
322
|
+
...pendingParameterUpdates.length > 0 && {
|
|
323
|
+
parameterUpdates: pendingParameterUpdates
|
|
324
|
+
}
|
|
306
325
|
};
|
|
307
326
|
}
|
|
308
327
|
const dataInvestigationResult = await flow.finalize(state, runtime);
|
|
309
|
-
return {
|
|
328
|
+
return {
|
|
329
|
+
type: "fulfilled",
|
|
330
|
+
dataInvestigationResult,
|
|
331
|
+
...pendingParameterUpdates.length > 0 && {
|
|
332
|
+
parameterUpdates: pendingParameterUpdates
|
|
333
|
+
}
|
|
334
|
+
};
|
|
310
335
|
}
|
|
311
336
|
async function resolveSetupSelection(params) {
|
|
312
337
|
const { selected, allSentinel, fetchAll, limit } = params;
|
|
@@ -485,12 +510,12 @@ var gmailOnboarding = new ConnectorOnboarding({
|
|
|
485
510
|
- Write only 1 sentence between tool calls, then immediately call the next tool. Skip unnecessary explanations and proceed efficiently`
|
|
486
511
|
},
|
|
487
512
|
dataOverviewInstructions: {
|
|
488
|
-
en: `1. Call
|
|
489
|
-
2. Call
|
|
490
|
-
3. Call
|
|
491
|
-
ja: `1.
|
|
492
|
-
2.
|
|
493
|
-
3. \u5404\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u3064\u3044\u3066
|
|
513
|
+
en: `1. Call connector_gmail-oauth_request with GET /me/labels to list all labels
|
|
514
|
+
2. Call connector_gmail-oauth_request with GET /me/messages?maxResults=5 to get recent message IDs
|
|
515
|
+
3. Call connector_gmail-oauth_request with GET /me/messages/{id}?format=metadata for each message to see subjects and senders`,
|
|
516
|
+
ja: `1. connector_gmail-oauth_request \u3067 GET /me/labels \u3092\u547C\u3073\u51FA\u3057\u3001\u5168\u30E9\u30D9\u30EB\u4E00\u89A7\u3092\u53D6\u5F97
|
|
517
|
+
2. connector_gmail-oauth_request \u3067 GET /me/messages?maxResults=5 \u3092\u547C\u3073\u51FA\u3057\u3001\u6700\u65B0\u30E1\u30C3\u30BB\u30FC\u30B8ID\u3092\u53D6\u5F97
|
|
518
|
+
3. \u5404\u30E1\u30C3\u30BB\u30FC\u30B8\u306B\u3064\u3044\u3066 connector_gmail-oauth_request \u3067 GET /me/messages/{id}?format=metadata \u3092\u547C\u3073\u51FA\u3057\u3001\u4EF6\u540D\u3068\u9001\u4FE1\u8005\u3092\u78BA\u8A8D`
|
|
494
519
|
}
|
|
495
520
|
});
|
|
496
521
|
|
|
@@ -602,7 +627,7 @@ var gmailOauthConnector = new ConnectorPlugin({
|
|
|
602
627
|
systemPrompt: {
|
|
603
628
|
en: `### Tools
|
|
604
629
|
|
|
605
|
-
- \`
|
|
630
|
+
- \`connector_gmail-oauth_request\`: The only way to call the Gmail API (read-only). Use it to list messages, get message details, list labels, list threads, and get user profile. Authentication is configured automatically via OAuth.
|
|
606
631
|
|
|
607
632
|
### Gmail API Reference
|
|
608
633
|
|
|
@@ -685,7 +710,7 @@ thread.messages.forEach(m => console.log(m.snippet));
|
|
|
685
710
|
\`\`\``,
|
|
686
711
|
ja: `### \u30C4\u30FC\u30EB
|
|
687
712
|
|
|
688
|
-
- \`
|
|
713
|
+
- \`connector_gmail-oauth_request\`: Gmail API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\uFF08\u8AAD\u307F\u53D6\u308A\u5C02\u7528\uFF09\u3002\u30E1\u30C3\u30BB\u30FC\u30B8\u4E00\u89A7\u306E\u53D6\u5F97\u3001\u30E1\u30C3\u30BB\u30FC\u30B8\u8A73\u7D30\u306E\u53D6\u5F97\u3001\u30E9\u30D9\u30EB\u4E00\u89A7\u3001\u30B9\u30EC\u30C3\u30C9\u4E00\u89A7\u3001\u30E6\u30FC\u30B6\u30FC\u30D7\u30ED\u30D5\u30A3\u30FC\u30EB\u306E\u53D6\u5F97\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002OAuth\u7D4C\u7531\u3067\u8A8D\u8A3C\u306F\u81EA\u52D5\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002
|
|
689
714
|
|
|
690
715
|
### Gmail API \u30EA\u30D5\u30A1\u30EC\u30F3\u30B9
|
|
691
716
|
|
package/dist/connectors/gmail.js
CHANGED
|
@@ -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.
|
|
@@ -224,7 +226,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
224
226
|
/**
|
|
225
227
|
* Create tools for connections that belong to this connector.
|
|
226
228
|
* Filters connections by connectorKey internally.
|
|
227
|
-
* Returns tools keyed as
|
|
229
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
228
230
|
*/
|
|
229
231
|
createTools(connections, config, opts) {
|
|
230
232
|
const myConnections = connections.filter(
|
|
@@ -234,7 +236,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
234
236
|
for (const t of Object.values(this.tools)) {
|
|
235
237
|
const tool = t.createTool(myConnections, config);
|
|
236
238
|
const originalToModelOutput = tool.toModelOutput;
|
|
237
|
-
result[
|
|
239
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
238
240
|
...tool,
|
|
239
241
|
toModelOutput: async (options) => {
|
|
240
242
|
if (!originalToModelOutput) {
|
|
@@ -290,19 +292,34 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
290
292
|
};
|
|
291
293
|
let state = flow.initialState();
|
|
292
294
|
let answerIdx = 0;
|
|
295
|
+
const pendingParameterUpdates = [];
|
|
293
296
|
for (const step of flow.steps) {
|
|
294
297
|
const ans = ctx.answers[answerIdx];
|
|
295
298
|
if (ans && ans.questionSlug === step.slug) {
|
|
296
299
|
state = step.applyAnswer(state, ans.answer);
|
|
300
|
+
if (step.toParameterUpdates) {
|
|
301
|
+
pendingParameterUpdates.push(...step.toParameterUpdates(state));
|
|
302
|
+
}
|
|
297
303
|
answerIdx += 1;
|
|
298
304
|
continue;
|
|
299
305
|
}
|
|
306
|
+
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
300
307
|
if (step.type === "text") {
|
|
308
|
+
if (step.fetchOptions) {
|
|
309
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
310
|
+
if (options2.length === 0) {
|
|
311
|
+
continue;
|
|
312
|
+
}
|
|
313
|
+
}
|
|
301
314
|
return {
|
|
302
315
|
type: "nextQuestion",
|
|
303
316
|
questionSlug: step.slug,
|
|
304
317
|
question: step.question[ctx.language],
|
|
305
|
-
questionType: "text"
|
|
318
|
+
questionType: "text",
|
|
319
|
+
allowFreeText: resolvedAllowFreeText,
|
|
320
|
+
...pendingParameterUpdates.length > 0 && {
|
|
321
|
+
parameterUpdates: pendingParameterUpdates
|
|
322
|
+
}
|
|
306
323
|
};
|
|
307
324
|
}
|
|
308
325
|
const options = step.fetchOptions ? await step.fetchOptions(state, runtime) : [];
|
|
@@ -314,11 +331,21 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
314
331
|
questionSlug: step.slug,
|
|
315
332
|
question: step.question[ctx.language],
|
|
316
333
|
questionType: step.type,
|
|
317
|
-
options
|
|
334
|
+
options,
|
|
335
|
+
allowFreeText: resolvedAllowFreeText,
|
|
336
|
+
...pendingParameterUpdates.length > 0 && {
|
|
337
|
+
parameterUpdates: pendingParameterUpdates
|
|
338
|
+
}
|
|
318
339
|
};
|
|
319
340
|
}
|
|
320
341
|
const dataInvestigationResult = await flow.finalize(state, runtime);
|
|
321
|
-
return {
|
|
342
|
+
return {
|
|
343
|
+
type: "fulfilled",
|
|
344
|
+
dataInvestigationResult,
|
|
345
|
+
...pendingParameterUpdates.length > 0 && {
|
|
346
|
+
parameterUpdates: pendingParameterUpdates
|
|
347
|
+
}
|
|
348
|
+
};
|
|
322
349
|
}
|
|
323
350
|
async function resolveSetupSelection(params) {
|
|
324
351
|
const { selected, allSentinel, fetchAll, limit } = params;
|
|
@@ -694,7 +721,7 @@ var gmailConnector = new ConnectorPlugin({
|
|
|
694
721
|
systemPrompt: {
|
|
695
722
|
en: `### Tools
|
|
696
723
|
|
|
697
|
-
- \`
|
|
724
|
+
- \`connector_gmail-service-account_request_with_delegation\`: Call the Gmail API on behalf of the specified Workspace user via Domain-wide Delegation. Pass \`subject\` as the target user's email; the token will be issued as that user. Always pass \`scopes\`.
|
|
698
725
|
|
|
699
726
|
### OAuth Scopes (pass as \`scopes\` argument)
|
|
700
727
|
|
|
@@ -787,7 +814,7 @@ for (const msg of messages.messages ?? []) {
|
|
|
787
814
|
\`\`\``,
|
|
788
815
|
ja: `### \u30C4\u30FC\u30EB
|
|
789
816
|
|
|
790
|
-
- \`
|
|
817
|
+
- \`connector_gmail-service-account_request_with_delegation\`: \u6307\u5B9A\u3055\u308C\u305F Workspace \u30E6\u30FC\u30B6\u30FC\u306B\u4EE3\u308F\u3063\u3066 Domain-wide Delegation \u7D4C\u7531\u3067 Gmail API \u3092\u547C\u3073\u51FA\u3057\u307E\u3059\u3002\u4EE3\u7406\u5BFE\u8C61\u306E\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9\u3092 \`subject\` \u3068\u3057\u3066\u6E21\u3057\u3066\u304F\u3060\u3055\u3044\u3002\u30C8\u30FC\u30AF\u30F3\u306F\u305D\u306E\u30E6\u30FC\u30B6\u30FC\u3068\u3057\u3066\u767A\u884C\u3055\u308C\u307E\u3059\u3002\`scopes\` \u3082\u6BCE\u56DE\u6E21\u3057\u3066\u304F\u3060\u3055\u3044\u3002
|
|
791
818
|
|
|
792
819
|
### OAuth \u30B9\u30B3\u30FC\u30D7 (\`scopes\` \u5F15\u6570\u3067\u6E21\u3059)
|
|
793
820
|
|
|
@@ -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.
|
|
@@ -272,7 +274,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
272
274
|
/**
|
|
273
275
|
* Create tools for connections that belong to this connector.
|
|
274
276
|
* Filters connections by connectorKey internally.
|
|
275
|
-
* Returns tools keyed as
|
|
277
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
276
278
|
*/
|
|
277
279
|
createTools(connections, config, opts) {
|
|
278
280
|
const myConnections = connections.filter(
|
|
@@ -282,7 +284,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
282
284
|
for (const t of Object.values(this.tools)) {
|
|
283
285
|
const tool = t.createTool(myConnections, config);
|
|
284
286
|
const originalToModelOutput = tool.toModelOutput;
|
|
285
|
-
result[
|
|
287
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
286
288
|
...tool,
|
|
287
289
|
toModelOutput: async (options) => {
|
|
288
290
|
if (!originalToModelOutput) {
|
|
@@ -338,19 +340,34 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
338
340
|
};
|
|
339
341
|
let state = flow.initialState();
|
|
340
342
|
let answerIdx = 0;
|
|
343
|
+
const pendingParameterUpdates = [];
|
|
341
344
|
for (const step of flow.steps) {
|
|
342
345
|
const ans = ctx.answers[answerIdx];
|
|
343
346
|
if (ans && ans.questionSlug === step.slug) {
|
|
344
347
|
state = step.applyAnswer(state, ans.answer);
|
|
348
|
+
if (step.toParameterUpdates) {
|
|
349
|
+
pendingParameterUpdates.push(...step.toParameterUpdates(state));
|
|
350
|
+
}
|
|
345
351
|
answerIdx += 1;
|
|
346
352
|
continue;
|
|
347
353
|
}
|
|
354
|
+
const resolvedAllowFreeText = step.allowFreeText !== void 0 ? step.allowFreeText : true;
|
|
348
355
|
if (step.type === "text") {
|
|
356
|
+
if (step.fetchOptions) {
|
|
357
|
+
const options2 = await step.fetchOptions(state, runtime);
|
|
358
|
+
if (options2.length === 0) {
|
|
359
|
+
continue;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
349
362
|
return {
|
|
350
363
|
type: "nextQuestion",
|
|
351
364
|
questionSlug: step.slug,
|
|
352
365
|
question: step.question[ctx.language],
|
|
353
|
-
questionType: "text"
|
|
366
|
+
questionType: "text",
|
|
367
|
+
allowFreeText: resolvedAllowFreeText,
|
|
368
|
+
...pendingParameterUpdates.length > 0 && {
|
|
369
|
+
parameterUpdates: pendingParameterUpdates
|
|
370
|
+
}
|
|
354
371
|
};
|
|
355
372
|
}
|
|
356
373
|
const options = step.fetchOptions ? await step.fetchOptions(state, runtime) : [];
|
|
@@ -362,11 +379,21 @@ async function runSetupFlow(flow, params, ctx, config) {
|
|
|
362
379
|
questionSlug: step.slug,
|
|
363
380
|
question: step.question[ctx.language],
|
|
364
381
|
questionType: step.type,
|
|
365
|
-
options
|
|
382
|
+
options,
|
|
383
|
+
allowFreeText: resolvedAllowFreeText,
|
|
384
|
+
...pendingParameterUpdates.length > 0 && {
|
|
385
|
+
parameterUpdates: pendingParameterUpdates
|
|
386
|
+
}
|
|
366
387
|
};
|
|
367
388
|
}
|
|
368
389
|
const dataInvestigationResult = await flow.finalize(state, runtime);
|
|
369
|
-
return {
|
|
390
|
+
return {
|
|
391
|
+
type: "fulfilled",
|
|
392
|
+
dataInvestigationResult,
|
|
393
|
+
...pendingParameterUpdates.length > 0 && {
|
|
394
|
+
parameterUpdates: pendingParameterUpdates
|
|
395
|
+
}
|
|
396
|
+
};
|
|
370
397
|
}
|
|
371
398
|
async function resolveSetupSelection(params) {
|
|
372
399
|
const { selected, allSentinel, fetchAll, limit } = params;
|
|
@@ -635,9 +662,9 @@ var googleAdsOnboarding = new ConnectorOnboarding({
|
|
|
635
662
|
- Write only 1 sentence between tool calls, then immediately call the next tool. Skip unnecessary explanations and proceed efficiently`
|
|
636
663
|
},
|
|
637
664
|
dataOverviewInstructions: {
|
|
638
|
-
en: `1. Call
|
|
665
|
+
en: `1. Call connector_google-ads-oauth_request with POST customers/{customerId}/googleAds:searchStream to explore available campaign data using GAQL: SELECT campaign.id, campaign.name, campaign.status FROM campaign LIMIT 10
|
|
639
666
|
2. Explore ad group and keyword data as needed to understand the data structure`,
|
|
640
|
-
ja: `1.
|
|
667
|
+
ja: `1. connector_google-ads-oauth_request \u3067 POST customers/{customerId}/googleAds:searchStream \u3092\u547C\u3073\u51FA\u3057\u3001GAQL\u3067\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u30C7\u30FC\u30BF\u3092\u63A2\u7D22: SELECT campaign.id, campaign.name, campaign.status FROM campaign LIMIT 10
|
|
641
668
|
2. \u5FC5\u8981\u306B\u5FDC\u3058\u3066\u5E83\u544A\u30B0\u30EB\u30FC\u30D7\u3084\u30AD\u30FC\u30EF\u30FC\u30C9\u30C7\u30FC\u30BF\u3092\u63A2\u7D22\u3057\u3001\u30C7\u30FC\u30BF\u69CB\u9020\u3092\u628A\u63E1`
|
|
642
669
|
}
|
|
643
670
|
});
|
|
@@ -909,8 +936,8 @@ var googleAdsConnector = new ConnectorPlugin({
|
|
|
909
936
|
systemPrompt: {
|
|
910
937
|
en: `### Tools (setup-time only)
|
|
911
938
|
|
|
912
|
-
- \`
|
|
913
|
-
- \`
|
|
939
|
+
- \`connector_google-ads-oauth_request\`: Send authenticated requests to the Google Ads API during setup / data overview. Use it for GAQL queries via searchStream. The {customerId} placeholder in paths is automatically replaced (hyphens removed). Authentication and developer token are configured automatically.
|
|
940
|
+
- \`connector_google-ads-oauth_listCustomers\`: List accessible Google Ads customer accounts. Use this during setup to discover available accounts.
|
|
914
941
|
|
|
915
942
|
> **Important**: These tools are only available at setup time. Inside server-logic handlers, use the SDK (\`connection(id).search\`, etc.) \u2014 the SDK's fetch is already wired through the OAuth proxy. **Do NOT** hand-roll HTTP calls to \`_sqcore/connections/*/request\` from a handler.
|
|
916
943
|
|
|
@@ -971,8 +998,8 @@ const customerIds = await ads.listAccessibleCustomers();
|
|
|
971
998
|
\`\`\``,
|
|
972
999
|
ja: `### \u30C4\u30FC\u30EB\uFF08\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u6642\u306E\u307F\uFF09
|
|
973
1000
|
|
|
974
|
-
- \`
|
|
975
|
-
- \`
|
|
1001
|
+
- \`connector_google-ads-oauth_request\`: \u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u3084\u30C7\u30FC\u30BF\u6982\u8981\u628A\u63E1\u6642\u306B Google Ads API \u3078\u8A8D\u8A3C\u6E08\u307F\u30EA\u30AF\u30A8\u30B9\u30C8\u3092\u9001\u4FE1\u3057\u307E\u3059\u3002searchStream \u3092\u4F7F\u3063\u305F GAQL \u30AF\u30A8\u30EA\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u30D1\u30B9\u5185\u306E {customerId} \u30D7\u30EC\u30FC\u30B9\u30DB\u30EB\u30C0\u30FC\u306F\u81EA\u52D5\u7684\u306B\u7F6E\u63DB\u3055\u308C\u307E\u3059\uFF08\u30CF\u30A4\u30D5\u30F3\u306F\u9664\u53BB\uFF09\u3002\u8A8D\u8A3C\u3068\u30C7\u30D9\u30ED\u30C3\u30D1\u30FC\u30C8\u30FC\u30AF\u30F3\u306F\u81EA\u52D5\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002
|
|
1002
|
+
- \`connector_google-ads-oauth_listCustomers\`: \u30A2\u30AF\u30BB\u30B9\u53EF\u80FD\u306A Google Ads \u9867\u5BA2\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
|
|
976
1003
|
|
|
977
1004
|
> **\u91CD\u8981**: \u3053\u308C\u3089\u306E\u30C4\u30FC\u30EB\u306F\u30BB\u30C3\u30C8\u30A2\u30C3\u30D7\u6642\u306E\u307F\u5229\u7528\u53EF\u80FD\u3067\u3059\u3002\u30B5\u30FC\u30D0\u30FC\u30ED\u30B8\u30C3\u30AF\u306E\u30CF\u30F3\u30C9\u30E9\u5185\u3067\u306F\u5FC5\u305A SDK\uFF08\`connection(id).search\` \u306A\u3069\uFF09\u3092\u4F7F\u3063\u3066\u304F\u3060\u3055\u3044\u3002SDK \u306E fetch \u306F OAuth \u30D7\u30ED\u30AD\u30B7\u7D4C\u7531\u3067\u65E2\u306B\u914D\u7DDA\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u30CF\u30F3\u30C9\u30E9\u304B\u3089 \`_sqcore/connections/*/request\` \u3092\u624B\u66F8\u304D\u3067\u547C\u3073\u51FA\u3055\u306A\u3044\u3067\u304F\u3060\u3055\u3044\u3002
|
|
978
1005
|
|