@squadbase/vite-server 0.1.17 → 0.1.19-dev.a00d9c3
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 +5961 -2986
- package/dist/connectors/airtable-oauth.js +39 -15
- package/dist/connectors/airtable.js +86 -15
- package/dist/connectors/amplitude.js +39 -15
- package/dist/connectors/anthropic.js +39 -15
- package/dist/connectors/asana.js +39 -15
- package/dist/connectors/attio.js +39 -15
- package/dist/connectors/aws-billing.js +39 -15
- package/dist/connectors/azure-sql.js +291 -18
- package/dist/connectors/backlog-api-key.js +39 -15
- package/dist/connectors/clickup.js +39 -15
- package/dist/connectors/cosmosdb.js +39 -15
- package/dist/connectors/customerio.js +39 -15
- package/dist/connectors/dbt.js +39 -15
- package/dist/connectors/freshdesk.js +39 -15
- package/dist/connectors/freshsales.js +39 -15
- package/dist/connectors/freshservice.js +39 -15
- package/dist/connectors/gamma.js +39 -15
- package/dist/connectors/gemini.js +39 -15
- package/dist/connectors/github.js +39 -15
- package/dist/connectors/gmail-oauth.js +32 -13
- package/dist/connectors/gmail.js +39 -15
- package/dist/connectors/google-ads.js +39 -15
- package/dist/connectors/google-analytics-oauth.js +40 -16
- package/dist/connectors/google-analytics.js +39 -15
- package/dist/connectors/google-audit-log.js +39 -15
- package/dist/connectors/google-calendar-oauth.js +40 -16
- package/dist/connectors/google-calendar.js +39 -15
- package/dist/connectors/google-docs.js +32 -13
- package/dist/connectors/google-drive.js +32 -13
- package/dist/connectors/google-search-console-oauth.js +39 -15
- package/dist/connectors/google-sheets.js +138 -195
- package/dist/connectors/google-slides.js +32 -13
- package/dist/connectors/grafana.js +39 -15
- package/dist/connectors/hackernews.d.ts +5 -0
- package/dist/connectors/hackernews.js +909 -0
- package/dist/connectors/hubspot-oauth.js +32 -13
- package/dist/connectors/hubspot.js +39 -15
- package/dist/connectors/influxdb.js +39 -15
- package/dist/connectors/intercom-oauth.js +32 -13
- package/dist/connectors/intercom.js +39 -15
- package/dist/connectors/jdbc.js +70 -19
- package/dist/connectors/jira-api-key.js +39 -15
- package/dist/connectors/kintone-api-token.js +39 -15
- package/dist/connectors/kintone.js +128 -15
- package/dist/connectors/linear.js +39 -15
- package/dist/connectors/linkedin-ads.js +39 -15
- package/dist/connectors/mailchimp-oauth.js +39 -15
- package/dist/connectors/mailchimp.js +39 -15
- package/dist/connectors/meta-ads-oauth.js +39 -15
- package/dist/connectors/meta-ads.js +39 -15
- package/dist/connectors/mixpanel.js +39 -15
- package/dist/connectors/monday.js +39 -15
- package/dist/connectors/mongodb.js +39 -15
- package/dist/connectors/notion-oauth.js +32 -13
- package/dist/connectors/notion.js +84 -15
- package/dist/connectors/openai.js +39 -15
- package/dist/connectors/oracle.js +293 -19
- package/dist/connectors/outlook-oauth.js +33 -14
- package/dist/connectors/powerbi-oauth.js +33 -14
- package/dist/connectors/salesforce.js +108 -15
- package/dist/connectors/semrush.js +39 -15
- package/dist/connectors/sentry.js +39 -15
- package/dist/connectors/shopify-oauth.js +32 -13
- package/dist/connectors/shopify.js +39 -15
- package/dist/connectors/slack.d.ts +5 -0
- package/dist/connectors/slack.js +656 -0
- package/dist/connectors/sqlserver.js +291 -18
- package/dist/connectors/stripe-api-key.js +39 -15
- package/dist/connectors/stripe-oauth.js +32 -13
- package/dist/connectors/supabase.js +293 -16
- package/dist/connectors/tableau.js +40 -16
- package/dist/connectors/tiktok-ads.js +39 -15
- package/dist/connectors/wix-store.js +39 -15
- package/dist/connectors/x.d.ts +5 -0
- package/dist/connectors/x.js +951 -0
- package/dist/connectors/zendesk-oauth.js +32 -13
- package/dist/connectors/zendesk.js +39 -15
- package/dist/index.js +6425 -3397
- package/dist/main.js +6425 -3397
- package/dist/vite-plugin.js +5965 -2987
- package/package.json +13 -4
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
|
-
var __esm = (fn, res) => function __init() {
|
|
3
|
-
|
|
2
|
+
var __esm = (fn, res, err) => function __init() {
|
|
3
|
+
if (err) throw err[0];
|
|
4
|
+
try {
|
|
5
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
6
|
+
} catch (e) {
|
|
7
|
+
throw err = [e], e;
|
|
8
|
+
}
|
|
4
9
|
};
|
|
5
10
|
|
|
6
11
|
// ../connectors/src/parameter-definition.ts
|
|
@@ -148,6 +153,15 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
148
153
|
* `runSetupFlow` from `setup-flow.ts`.
|
|
149
154
|
*/
|
|
150
155
|
setup;
|
|
156
|
+
/**
|
|
157
|
+
* 統一 introspection。SQL DB の `information_schema` / `SHOW` / `DESCRIBE` や SaaS の
|
|
158
|
+
* メタデータ API といった取得経路の差を吸収し、tables / columns / PK / FK を共通型
|
|
159
|
+
* {@link IntrospectedSchema} へ正規化して返す。取得経路は {@link IntrospectContext} で
|
|
160
|
+
* 抽象化され、SQL DB は `ctx.query`、SaaS は `ctx.proxyFetch` + `ctx.params` を使う。
|
|
161
|
+
* `ctx.profile === true` のときは L2 プロファイル(行数・NULL 率等)も best-effort で埋める。
|
|
162
|
+
* coding-agent の `DataContextIndex` がデータ地図を構築する際に使う。
|
|
163
|
+
*/
|
|
164
|
+
introspect;
|
|
151
165
|
/**
|
|
152
166
|
* Opt-out of the default "verify before save" behavior on connection
|
|
153
167
|
* creation. The backend invokes `checkConnection` synchronously while
|
|
@@ -162,6 +176,14 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
162
176
|
* the default verify-on-create behavior without opt-in.
|
|
163
177
|
*/
|
|
164
178
|
skipConnectionCheckOnCreate;
|
|
179
|
+
/**
|
|
180
|
+
* 決定論的な「立ち上げ survey」レシピ(ルールベース prewarm 基盤)。実装した connector は、LLM を使わずに
|
|
181
|
+
* read-only で自分を survey する probe 列(テーブル/列メタデータ → 小サンプル)を宣言する。coding-agent の
|
|
182
|
+
* recon driver がこれを読み、connector ツールの `execute` を直接呼んで結果を seed にする。未実装の connector は
|
|
183
|
+
* driver 側で safely skip される(その connection は listConnections のみ seed)。標準 `information_schema` を
|
|
184
|
+
* 持つ SQL connector は `makeStandardSqlSurveyProbes` を使える。**probe は必ず read-only**。
|
|
185
|
+
*/
|
|
186
|
+
surveyProbes;
|
|
165
187
|
constructor(config) {
|
|
166
188
|
this.slug = config.slug;
|
|
167
189
|
this.authType = config.authType;
|
|
@@ -179,7 +201,9 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
179
201
|
this.query = config.query;
|
|
180
202
|
this.checkConnection = config.checkConnection;
|
|
181
203
|
this.setup = config.setup;
|
|
204
|
+
this.introspect = config.introspect;
|
|
182
205
|
this.skipConnectionCheckOnCreate = config.skipConnectionCheckOnCreate;
|
|
206
|
+
this.surveyProbes = config.surveyProbes;
|
|
183
207
|
}
|
|
184
208
|
get connectorKey() {
|
|
185
209
|
return _ConnectorPlugin.deriveKey(this.slug, this.authType);
|
|
@@ -217,25 +241,25 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
217
241
|
if (authType) return `${slug}-${authType}`;
|
|
218
242
|
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
219
243
|
// user-password
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
244
|
+
postgresql: "user-password",
|
|
245
|
+
mysql: "user-password",
|
|
246
|
+
clickhouse: "user-password",
|
|
247
|
+
kintone: "user-password",
|
|
224
248
|
"squadbase-db": "user-password",
|
|
225
249
|
// service-account
|
|
226
|
-
|
|
227
|
-
|
|
250
|
+
snowflake: "service-account",
|
|
251
|
+
bigquery: "service-account",
|
|
228
252
|
"google-analytics": "service-account",
|
|
229
253
|
"google-calendar": "service-account",
|
|
230
254
|
"aws-athena": "service-account",
|
|
231
|
-
|
|
255
|
+
redshift: "service-account",
|
|
232
256
|
// api-key
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
257
|
+
databricks: "api-key",
|
|
258
|
+
dbt: "api-key",
|
|
259
|
+
airtable: "api-key",
|
|
260
|
+
openai: "api-key",
|
|
261
|
+
gemini: "api-key",
|
|
262
|
+
anthropic: "api-key",
|
|
239
263
|
"wix-store": "api-key"
|
|
240
264
|
};
|
|
241
265
|
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
|
-
var __esm = (fn, res) => function __init() {
|
|
3
|
-
|
|
2
|
+
var __esm = (fn, res, err) => function __init() {
|
|
3
|
+
if (err) throw err[0];
|
|
4
|
+
try {
|
|
5
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
6
|
+
} catch (e) {
|
|
7
|
+
throw err = [e], e;
|
|
8
|
+
}
|
|
4
9
|
};
|
|
5
10
|
|
|
6
11
|
// ../connectors/src/parameter-definition.ts
|
|
@@ -278,6 +283,15 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
278
283
|
* `runSetupFlow` from `setup-flow.ts`.
|
|
279
284
|
*/
|
|
280
285
|
setup;
|
|
286
|
+
/**
|
|
287
|
+
* 統一 introspection。SQL DB の `information_schema` / `SHOW` / `DESCRIBE` や SaaS の
|
|
288
|
+
* メタデータ API といった取得経路の差を吸収し、tables / columns / PK / FK を共通型
|
|
289
|
+
* {@link IntrospectedSchema} へ正規化して返す。取得経路は {@link IntrospectContext} で
|
|
290
|
+
* 抽象化され、SQL DB は `ctx.query`、SaaS は `ctx.proxyFetch` + `ctx.params` を使う。
|
|
291
|
+
* `ctx.profile === true` のときは L2 プロファイル(行数・NULL 率等)も best-effort で埋める。
|
|
292
|
+
* coding-agent の `DataContextIndex` がデータ地図を構築する際に使う。
|
|
293
|
+
*/
|
|
294
|
+
introspect;
|
|
281
295
|
/**
|
|
282
296
|
* Opt-out of the default "verify before save" behavior on connection
|
|
283
297
|
* creation. The backend invokes `checkConnection` synchronously while
|
|
@@ -292,6 +306,14 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
292
306
|
* the default verify-on-create behavior without opt-in.
|
|
293
307
|
*/
|
|
294
308
|
skipConnectionCheckOnCreate;
|
|
309
|
+
/**
|
|
310
|
+
* 決定論的な「立ち上げ survey」レシピ(ルールベース prewarm 基盤)。実装した connector は、LLM を使わずに
|
|
311
|
+
* read-only で自分を survey する probe 列(テーブル/列メタデータ → 小サンプル)を宣言する。coding-agent の
|
|
312
|
+
* recon driver がこれを読み、connector ツールの `execute` を直接呼んで結果を seed にする。未実装の connector は
|
|
313
|
+
* driver 側で safely skip される(その connection は listConnections のみ seed)。標準 `information_schema` を
|
|
314
|
+
* 持つ SQL connector は `makeStandardSqlSurveyProbes` を使える。**probe は必ず read-only**。
|
|
315
|
+
*/
|
|
316
|
+
surveyProbes;
|
|
295
317
|
constructor(config) {
|
|
296
318
|
this.slug = config.slug;
|
|
297
319
|
this.authType = config.authType;
|
|
@@ -309,7 +331,9 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
309
331
|
this.query = config.query;
|
|
310
332
|
this.checkConnection = config.checkConnection;
|
|
311
333
|
this.setup = config.setup;
|
|
334
|
+
this.introspect = config.introspect;
|
|
312
335
|
this.skipConnectionCheckOnCreate = config.skipConnectionCheckOnCreate;
|
|
336
|
+
this.surveyProbes = config.surveyProbes;
|
|
313
337
|
}
|
|
314
338
|
get connectorKey() {
|
|
315
339
|
return _ConnectorPlugin.deriveKey(this.slug, this.authType);
|
|
@@ -347,25 +371,25 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
347
371
|
if (authType) return `${slug}-${authType}`;
|
|
348
372
|
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
349
373
|
// user-password
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
374
|
+
postgresql: "user-password",
|
|
375
|
+
mysql: "user-password",
|
|
376
|
+
clickhouse: "user-password",
|
|
377
|
+
kintone: "user-password",
|
|
354
378
|
"squadbase-db": "user-password",
|
|
355
379
|
// service-account
|
|
356
|
-
|
|
357
|
-
|
|
380
|
+
snowflake: "service-account",
|
|
381
|
+
bigquery: "service-account",
|
|
358
382
|
"google-analytics": "service-account",
|
|
359
383
|
"google-calendar": "service-account",
|
|
360
384
|
"aws-athena": "service-account",
|
|
361
|
-
|
|
385
|
+
redshift: "service-account",
|
|
362
386
|
// api-key
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
387
|
+
databricks: "api-key",
|
|
388
|
+
dbt: "api-key",
|
|
389
|
+
airtable: "api-key",
|
|
390
|
+
openai: "api-key",
|
|
391
|
+
gemini: "api-key",
|
|
392
|
+
anthropic: "api-key",
|
|
369
393
|
"wix-store": "api-key"
|
|
370
394
|
};
|
|
371
395
|
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|
|
@@ -610,6 +634,40 @@ var airtableSetupFlow = {
|
|
|
610
634
|
}
|
|
611
635
|
};
|
|
612
636
|
|
|
637
|
+
// ../connectors/src/connectors/airtable/introspect.ts
|
|
638
|
+
async function introspectAirtable(ctx) {
|
|
639
|
+
const baseId = ctx.params[parameters.baseId.slug];
|
|
640
|
+
if (!baseId) return { tables: [] };
|
|
641
|
+
const res = await apiFetch(ctx.params, `/meta/bases/${baseId}/tables`);
|
|
642
|
+
if (!res.ok) {
|
|
643
|
+
throw new Error(`airtable: meta/tables failed (${res.status})`);
|
|
644
|
+
}
|
|
645
|
+
const data = await res.json();
|
|
646
|
+
const atTables = data.tables ?? [];
|
|
647
|
+
const tableNameById = new Map(atTables.map((t) => [t.id, t.name]));
|
|
648
|
+
const tables = atTables.map((t) => {
|
|
649
|
+
const columns = (t.fields ?? []).map((f) => {
|
|
650
|
+
const column = {
|
|
651
|
+
name: f.name,
|
|
652
|
+
dataType: f.type,
|
|
653
|
+
nullable: true
|
|
654
|
+
};
|
|
655
|
+
if (f.id === t.primaryFieldId) column.isPrimaryKey = true;
|
|
656
|
+
const linkedId = f.options?.linkedTableId;
|
|
657
|
+
if (f.type === "multipleRecordLinks" && linkedId) {
|
|
658
|
+
column.foreignKey = {
|
|
659
|
+
schema: baseId,
|
|
660
|
+
table: tableNameById.get(linkedId) ?? linkedId,
|
|
661
|
+
column: ""
|
|
662
|
+
};
|
|
663
|
+
}
|
|
664
|
+
return column;
|
|
665
|
+
});
|
|
666
|
+
return { schema: baseId, name: t.name, type: "table", columns };
|
|
667
|
+
});
|
|
668
|
+
return { tables };
|
|
669
|
+
}
|
|
670
|
+
|
|
613
671
|
// ../connectors/src/connectors/airtable/tools/request.ts
|
|
614
672
|
import { z } from "zod";
|
|
615
673
|
var BASE_URL3 = "https://api.airtable.com/v0/";
|
|
@@ -814,6 +872,19 @@ export default async function handler(c: Context) {
|
|
|
814
872
|
- \u30EC\u30B9\u30DD\u30F3\u30B9\u306B \`offset\` \u304C\u542B\u307E\u308C\u308B\u5834\u5408\u3001\u6B21\u306E\u30EA\u30AF\u30A8\u30B9\u30C8\u306B \`?offset={offset}\` \u3092\u8FFD\u52A0\u3057\u3066\u6B21\u306E\u30DA\u30FC\u30B8\u3092\u53D6\u5F97\u3057\u307E\u3059`
|
|
815
873
|
},
|
|
816
874
|
tools,
|
|
875
|
+
// 決定論的な立ち上げ survey(ルールベース prewarm)。テーブル一覧(フィールド定義込み)を 1 GET で取得。
|
|
876
|
+
// `{baseId}` は request ツールが自動置換する。read-only。
|
|
877
|
+
surveyProbes: (_connectionId, prior) => prior.length === 0 ? [
|
|
878
|
+
{
|
|
879
|
+
tool: "request",
|
|
880
|
+
input: {
|
|
881
|
+
method: "GET",
|
|
882
|
+
path: "meta/bases/{baseId}/tables",
|
|
883
|
+
toolUseIntent: "List Airtable tables"
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
] : [],
|
|
887
|
+
introspect: (ctx) => introspectAirtable(ctx),
|
|
817
888
|
setup: (params, ctx, config) => runSetupFlow(airtableSetupFlow, params, ctx, config),
|
|
818
889
|
async checkConnection(params, _config) {
|
|
819
890
|
const apiKey = params[parameters.apiKey.slug];
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
|
-
var __esm = (fn, res) => function __init() {
|
|
3
|
-
|
|
2
|
+
var __esm = (fn, res, err) => function __init() {
|
|
3
|
+
if (err) throw err[0];
|
|
4
|
+
try {
|
|
5
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
6
|
+
} catch (e) {
|
|
7
|
+
throw err = [e], e;
|
|
8
|
+
}
|
|
4
9
|
};
|
|
5
10
|
|
|
6
11
|
// ../connectors/src/parameter-definition.ts
|
|
@@ -238,6 +243,15 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
238
243
|
* `runSetupFlow` from `setup-flow.ts`.
|
|
239
244
|
*/
|
|
240
245
|
setup;
|
|
246
|
+
/**
|
|
247
|
+
* 統一 introspection。SQL DB の `information_schema` / `SHOW` / `DESCRIBE` や SaaS の
|
|
248
|
+
* メタデータ API といった取得経路の差を吸収し、tables / columns / PK / FK を共通型
|
|
249
|
+
* {@link IntrospectedSchema} へ正規化して返す。取得経路は {@link IntrospectContext} で
|
|
250
|
+
* 抽象化され、SQL DB は `ctx.query`、SaaS は `ctx.proxyFetch` + `ctx.params` を使う。
|
|
251
|
+
* `ctx.profile === true` のときは L2 プロファイル(行数・NULL 率等)も best-effort で埋める。
|
|
252
|
+
* coding-agent の `DataContextIndex` がデータ地図を構築する際に使う。
|
|
253
|
+
*/
|
|
254
|
+
introspect;
|
|
241
255
|
/**
|
|
242
256
|
* Opt-out of the default "verify before save" behavior on connection
|
|
243
257
|
* creation. The backend invokes `checkConnection` synchronously while
|
|
@@ -252,6 +266,14 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
252
266
|
* the default verify-on-create behavior without opt-in.
|
|
253
267
|
*/
|
|
254
268
|
skipConnectionCheckOnCreate;
|
|
269
|
+
/**
|
|
270
|
+
* 決定論的な「立ち上げ survey」レシピ(ルールベース prewarm 基盤)。実装した connector は、LLM を使わずに
|
|
271
|
+
* read-only で自分を survey する probe 列(テーブル/列メタデータ → 小サンプル)を宣言する。coding-agent の
|
|
272
|
+
* recon driver がこれを読み、connector ツールの `execute` を直接呼んで結果を seed にする。未実装の connector は
|
|
273
|
+
* driver 側で safely skip される(その connection は listConnections のみ seed)。標準 `information_schema` を
|
|
274
|
+
* 持つ SQL connector は `makeStandardSqlSurveyProbes` を使える。**probe は必ず read-only**。
|
|
275
|
+
*/
|
|
276
|
+
surveyProbes;
|
|
255
277
|
constructor(config) {
|
|
256
278
|
this.slug = config.slug;
|
|
257
279
|
this.authType = config.authType;
|
|
@@ -269,7 +291,9 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
269
291
|
this.query = config.query;
|
|
270
292
|
this.checkConnection = config.checkConnection;
|
|
271
293
|
this.setup = config.setup;
|
|
294
|
+
this.introspect = config.introspect;
|
|
272
295
|
this.skipConnectionCheckOnCreate = config.skipConnectionCheckOnCreate;
|
|
296
|
+
this.surveyProbes = config.surveyProbes;
|
|
273
297
|
}
|
|
274
298
|
get connectorKey() {
|
|
275
299
|
return _ConnectorPlugin.deriveKey(this.slug, this.authType);
|
|
@@ -307,25 +331,25 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
307
331
|
if (authType) return `${slug}-${authType}`;
|
|
308
332
|
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
309
333
|
// user-password
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
334
|
+
postgresql: "user-password",
|
|
335
|
+
mysql: "user-password",
|
|
336
|
+
clickhouse: "user-password",
|
|
337
|
+
kintone: "user-password",
|
|
314
338
|
"squadbase-db": "user-password",
|
|
315
339
|
// service-account
|
|
316
|
-
|
|
317
|
-
|
|
340
|
+
snowflake: "service-account",
|
|
341
|
+
bigquery: "service-account",
|
|
318
342
|
"google-analytics": "service-account",
|
|
319
343
|
"google-calendar": "service-account",
|
|
320
344
|
"aws-athena": "service-account",
|
|
321
|
-
|
|
345
|
+
redshift: "service-account",
|
|
322
346
|
// api-key
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
347
|
+
databricks: "api-key",
|
|
348
|
+
dbt: "api-key",
|
|
349
|
+
airtable: "api-key",
|
|
350
|
+
openai: "api-key",
|
|
351
|
+
gemini: "api-key",
|
|
352
|
+
anthropic: "api-key",
|
|
329
353
|
"wix-store": "api-key"
|
|
330
354
|
};
|
|
331
355
|
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
|
-
var __esm = (fn, res) => function __init() {
|
|
3
|
-
|
|
2
|
+
var __esm = (fn, res, err) => function __init() {
|
|
3
|
+
if (err) throw err[0];
|
|
4
|
+
try {
|
|
5
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
6
|
+
} catch (e) {
|
|
7
|
+
throw err = [e], e;
|
|
8
|
+
}
|
|
4
9
|
};
|
|
5
10
|
|
|
6
11
|
// ../connectors/src/parameter-definition.ts
|
|
@@ -105,6 +110,15 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
105
110
|
* `runSetupFlow` from `setup-flow.ts`.
|
|
106
111
|
*/
|
|
107
112
|
setup;
|
|
113
|
+
/**
|
|
114
|
+
* 統一 introspection。SQL DB の `information_schema` / `SHOW` / `DESCRIBE` や SaaS の
|
|
115
|
+
* メタデータ API といった取得経路の差を吸収し、tables / columns / PK / FK を共通型
|
|
116
|
+
* {@link IntrospectedSchema} へ正規化して返す。取得経路は {@link IntrospectContext} で
|
|
117
|
+
* 抽象化され、SQL DB は `ctx.query`、SaaS は `ctx.proxyFetch` + `ctx.params` を使う。
|
|
118
|
+
* `ctx.profile === true` のときは L2 プロファイル(行数・NULL 率等)も best-effort で埋める。
|
|
119
|
+
* coding-agent の `DataContextIndex` がデータ地図を構築する際に使う。
|
|
120
|
+
*/
|
|
121
|
+
introspect;
|
|
108
122
|
/**
|
|
109
123
|
* Opt-out of the default "verify before save" behavior on connection
|
|
110
124
|
* creation. The backend invokes `checkConnection` synchronously while
|
|
@@ -119,6 +133,14 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
119
133
|
* the default verify-on-create behavior without opt-in.
|
|
120
134
|
*/
|
|
121
135
|
skipConnectionCheckOnCreate;
|
|
136
|
+
/**
|
|
137
|
+
* 決定論的な「立ち上げ survey」レシピ(ルールベース prewarm 基盤)。実装した connector は、LLM を使わずに
|
|
138
|
+
* read-only で自分を survey する probe 列(テーブル/列メタデータ → 小サンプル)を宣言する。coding-agent の
|
|
139
|
+
* recon driver がこれを読み、connector ツールの `execute` を直接呼んで結果を seed にする。未実装の connector は
|
|
140
|
+
* driver 側で safely skip される(その connection は listConnections のみ seed)。標準 `information_schema` を
|
|
141
|
+
* 持つ SQL connector は `makeStandardSqlSurveyProbes` を使える。**probe は必ず read-only**。
|
|
142
|
+
*/
|
|
143
|
+
surveyProbes;
|
|
122
144
|
constructor(config) {
|
|
123
145
|
this.slug = config.slug;
|
|
124
146
|
this.authType = config.authType;
|
|
@@ -136,7 +158,9 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
136
158
|
this.query = config.query;
|
|
137
159
|
this.checkConnection = config.checkConnection;
|
|
138
160
|
this.setup = config.setup;
|
|
161
|
+
this.introspect = config.introspect;
|
|
139
162
|
this.skipConnectionCheckOnCreate = config.skipConnectionCheckOnCreate;
|
|
163
|
+
this.surveyProbes = config.surveyProbes;
|
|
140
164
|
}
|
|
141
165
|
get connectorKey() {
|
|
142
166
|
return _ConnectorPlugin.deriveKey(this.slug, this.authType);
|
|
@@ -174,25 +198,25 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
174
198
|
if (authType) return `${slug}-${authType}`;
|
|
175
199
|
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
176
200
|
// user-password
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
201
|
+
postgresql: "user-password",
|
|
202
|
+
mysql: "user-password",
|
|
203
|
+
clickhouse: "user-password",
|
|
204
|
+
kintone: "user-password",
|
|
181
205
|
"squadbase-db": "user-password",
|
|
182
206
|
// service-account
|
|
183
|
-
|
|
184
|
-
|
|
207
|
+
snowflake: "service-account",
|
|
208
|
+
bigquery: "service-account",
|
|
185
209
|
"google-analytics": "service-account",
|
|
186
210
|
"google-calendar": "service-account",
|
|
187
211
|
"aws-athena": "service-account",
|
|
188
|
-
|
|
212
|
+
redshift: "service-account",
|
|
189
213
|
// api-key
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
214
|
+
databricks: "api-key",
|
|
215
|
+
dbt: "api-key",
|
|
216
|
+
airtable: "api-key",
|
|
217
|
+
openai: "api-key",
|
|
218
|
+
gemini: "api-key",
|
|
219
|
+
anthropic: "api-key",
|
|
196
220
|
"wix-store": "api-key"
|
|
197
221
|
};
|
|
198
222
|
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|
package/dist/connectors/asana.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
|
-
var __esm = (fn, res) => function __init() {
|
|
3
|
-
|
|
2
|
+
var __esm = (fn, res, err) => function __init() {
|
|
3
|
+
if (err) throw err[0];
|
|
4
|
+
try {
|
|
5
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
6
|
+
} catch (e) {
|
|
7
|
+
throw err = [e], e;
|
|
8
|
+
}
|
|
4
9
|
};
|
|
5
10
|
|
|
6
11
|
// ../connectors/src/parameter-definition.ts
|
|
@@ -275,6 +280,15 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
275
280
|
* `runSetupFlow` from `setup-flow.ts`.
|
|
276
281
|
*/
|
|
277
282
|
setup;
|
|
283
|
+
/**
|
|
284
|
+
* 統一 introspection。SQL DB の `information_schema` / `SHOW` / `DESCRIBE` や SaaS の
|
|
285
|
+
* メタデータ API といった取得経路の差を吸収し、tables / columns / PK / FK を共通型
|
|
286
|
+
* {@link IntrospectedSchema} へ正規化して返す。取得経路は {@link IntrospectContext} で
|
|
287
|
+
* 抽象化され、SQL DB は `ctx.query`、SaaS は `ctx.proxyFetch` + `ctx.params` を使う。
|
|
288
|
+
* `ctx.profile === true` のときは L2 プロファイル(行数・NULL 率等)も best-effort で埋める。
|
|
289
|
+
* coding-agent の `DataContextIndex` がデータ地図を構築する際に使う。
|
|
290
|
+
*/
|
|
291
|
+
introspect;
|
|
278
292
|
/**
|
|
279
293
|
* Opt-out of the default "verify before save" behavior on connection
|
|
280
294
|
* creation. The backend invokes `checkConnection` synchronously while
|
|
@@ -289,6 +303,14 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
289
303
|
* the default verify-on-create behavior without opt-in.
|
|
290
304
|
*/
|
|
291
305
|
skipConnectionCheckOnCreate;
|
|
306
|
+
/**
|
|
307
|
+
* 決定論的な「立ち上げ survey」レシピ(ルールベース prewarm 基盤)。実装した connector は、LLM を使わずに
|
|
308
|
+
* read-only で自分を survey する probe 列(テーブル/列メタデータ → 小サンプル)を宣言する。coding-agent の
|
|
309
|
+
* recon driver がこれを読み、connector ツールの `execute` を直接呼んで結果を seed にする。未実装の connector は
|
|
310
|
+
* driver 側で safely skip される(その connection は listConnections のみ seed)。標準 `information_schema` を
|
|
311
|
+
* 持つ SQL connector は `makeStandardSqlSurveyProbes` を使える。**probe は必ず read-only**。
|
|
312
|
+
*/
|
|
313
|
+
surveyProbes;
|
|
292
314
|
constructor(config) {
|
|
293
315
|
this.slug = config.slug;
|
|
294
316
|
this.authType = config.authType;
|
|
@@ -306,7 +328,9 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
306
328
|
this.query = config.query;
|
|
307
329
|
this.checkConnection = config.checkConnection;
|
|
308
330
|
this.setup = config.setup;
|
|
331
|
+
this.introspect = config.introspect;
|
|
309
332
|
this.skipConnectionCheckOnCreate = config.skipConnectionCheckOnCreate;
|
|
333
|
+
this.surveyProbes = config.surveyProbes;
|
|
310
334
|
}
|
|
311
335
|
get connectorKey() {
|
|
312
336
|
return _ConnectorPlugin.deriveKey(this.slug, this.authType);
|
|
@@ -344,25 +368,25 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
344
368
|
if (authType) return `${slug}-${authType}`;
|
|
345
369
|
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
346
370
|
// user-password
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
371
|
+
postgresql: "user-password",
|
|
372
|
+
mysql: "user-password",
|
|
373
|
+
clickhouse: "user-password",
|
|
374
|
+
kintone: "user-password",
|
|
351
375
|
"squadbase-db": "user-password",
|
|
352
376
|
// service-account
|
|
353
|
-
|
|
354
|
-
|
|
377
|
+
snowflake: "service-account",
|
|
378
|
+
bigquery: "service-account",
|
|
355
379
|
"google-analytics": "service-account",
|
|
356
380
|
"google-calendar": "service-account",
|
|
357
381
|
"aws-athena": "service-account",
|
|
358
|
-
|
|
382
|
+
redshift: "service-account",
|
|
359
383
|
// api-key
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
384
|
+
databricks: "api-key",
|
|
385
|
+
dbt: "api-key",
|
|
386
|
+
airtable: "api-key",
|
|
387
|
+
openai: "api-key",
|
|
388
|
+
gemini: "api-key",
|
|
389
|
+
anthropic: "api-key",
|
|
366
390
|
"wix-store": "api-key"
|
|
367
391
|
};
|
|
368
392
|
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|
package/dist/connectors/attio.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
2
|
-
var __esm = (fn, res) => function __init() {
|
|
3
|
-
|
|
2
|
+
var __esm = (fn, res, err) => function __init() {
|
|
3
|
+
if (err) throw err[0];
|
|
4
|
+
try {
|
|
5
|
+
return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
|
|
6
|
+
} catch (e) {
|
|
7
|
+
throw err = [e], e;
|
|
8
|
+
}
|
|
4
9
|
};
|
|
5
10
|
|
|
6
11
|
// ../connectors/src/parameter-definition.ts
|
|
@@ -411,6 +416,15 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
411
416
|
* `runSetupFlow` from `setup-flow.ts`.
|
|
412
417
|
*/
|
|
413
418
|
setup;
|
|
419
|
+
/**
|
|
420
|
+
* 統一 introspection。SQL DB の `information_schema` / `SHOW` / `DESCRIBE` や SaaS の
|
|
421
|
+
* メタデータ API といった取得経路の差を吸収し、tables / columns / PK / FK を共通型
|
|
422
|
+
* {@link IntrospectedSchema} へ正規化して返す。取得経路は {@link IntrospectContext} で
|
|
423
|
+
* 抽象化され、SQL DB は `ctx.query`、SaaS は `ctx.proxyFetch` + `ctx.params` を使う。
|
|
424
|
+
* `ctx.profile === true` のときは L2 プロファイル(行数・NULL 率等)も best-effort で埋める。
|
|
425
|
+
* coding-agent の `DataContextIndex` がデータ地図を構築する際に使う。
|
|
426
|
+
*/
|
|
427
|
+
introspect;
|
|
414
428
|
/**
|
|
415
429
|
* Opt-out of the default "verify before save" behavior on connection
|
|
416
430
|
* creation. The backend invokes `checkConnection` synchronously while
|
|
@@ -425,6 +439,14 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
425
439
|
* the default verify-on-create behavior without opt-in.
|
|
426
440
|
*/
|
|
427
441
|
skipConnectionCheckOnCreate;
|
|
442
|
+
/**
|
|
443
|
+
* 決定論的な「立ち上げ survey」レシピ(ルールベース prewarm 基盤)。実装した connector は、LLM を使わずに
|
|
444
|
+
* read-only で自分を survey する probe 列(テーブル/列メタデータ → 小サンプル)を宣言する。coding-agent の
|
|
445
|
+
* recon driver がこれを読み、connector ツールの `execute` を直接呼んで結果を seed にする。未実装の connector は
|
|
446
|
+
* driver 側で safely skip される(その connection は listConnections のみ seed)。標準 `information_schema` を
|
|
447
|
+
* 持つ SQL connector は `makeStandardSqlSurveyProbes` を使える。**probe は必ず read-only**。
|
|
448
|
+
*/
|
|
449
|
+
surveyProbes;
|
|
428
450
|
constructor(config) {
|
|
429
451
|
this.slug = config.slug;
|
|
430
452
|
this.authType = config.authType;
|
|
@@ -442,7 +464,9 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
442
464
|
this.query = config.query;
|
|
443
465
|
this.checkConnection = config.checkConnection;
|
|
444
466
|
this.setup = config.setup;
|
|
467
|
+
this.introspect = config.introspect;
|
|
445
468
|
this.skipConnectionCheckOnCreate = config.skipConnectionCheckOnCreate;
|
|
469
|
+
this.surveyProbes = config.surveyProbes;
|
|
446
470
|
}
|
|
447
471
|
get connectorKey() {
|
|
448
472
|
return _ConnectorPlugin.deriveKey(this.slug, this.authType);
|
|
@@ -480,25 +504,25 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
480
504
|
if (authType) return `${slug}-${authType}`;
|
|
481
505
|
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
482
506
|
// user-password
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
507
|
+
postgresql: "user-password",
|
|
508
|
+
mysql: "user-password",
|
|
509
|
+
clickhouse: "user-password",
|
|
510
|
+
kintone: "user-password",
|
|
487
511
|
"squadbase-db": "user-password",
|
|
488
512
|
// service-account
|
|
489
|
-
|
|
490
|
-
|
|
513
|
+
snowflake: "service-account",
|
|
514
|
+
bigquery: "service-account",
|
|
491
515
|
"google-analytics": "service-account",
|
|
492
516
|
"google-calendar": "service-account",
|
|
493
517
|
"aws-athena": "service-account",
|
|
494
|
-
|
|
518
|
+
redshift: "service-account",
|
|
495
519
|
// api-key
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
520
|
+
databricks: "api-key",
|
|
521
|
+
dbt: "api-key",
|
|
522
|
+
airtable: "api-key",
|
|
523
|
+
openai: "api-key",
|
|
524
|
+
gemini: "api-key",
|
|
525
|
+
anthropic: "api-key",
|
|
502
526
|
"wix-store": "api-key"
|
|
503
527
|
};
|
|
504
528
|
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|