@squadbase/vite-server 0.1.17-dev.a9ddcfa → 0.1.17-dev.e4768d1
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 +8941 -3700
- package/dist/connectors/airtable-oauth.js +87 -23
- package/dist/connectors/airtable.js +130 -23
- package/dist/connectors/amplitude.js +47 -23
- package/dist/connectors/anthropic.js +41 -17
- package/dist/connectors/asana.js +76 -25
- package/dist/connectors/attio.js +69 -28
- package/dist/connectors/aws-billing.js +47 -23
- package/dist/connectors/azure-sql.js +322 -25
- package/dist/connectors/backlog-api-key.js +79 -30
- package/dist/connectors/clickup.js +89 -25
- package/dist/connectors/cosmosdb.js +51 -27
- package/dist/connectors/customerio.js +47 -23
- package/dist/connectors/dbt.js +725 -40
- package/dist/connectors/freshdesk.js +121 -23
- package/dist/connectors/freshsales.js +47 -23
- package/dist/connectors/freshservice.js +47 -23
- package/dist/connectors/gamma.js +54 -30
- package/dist/connectors/gemini.js +41 -17
- package/dist/connectors/github.js +51 -27
- package/dist/connectors/gmail-oauth.js +42 -23
- package/dist/connectors/gmail.js +43 -19
- package/dist/connectors/google-ads.js +47 -23
- package/dist/connectors/google-analytics-oauth.js +191 -40
- package/dist/connectors/google-analytics.js +529 -111
- package/dist/connectors/google-audit-log.js +43 -19
- package/dist/connectors/google-calendar-oauth.js +100 -30
- package/dist/connectors/google-calendar.js +100 -26
- package/dist/connectors/google-docs.js +42 -23
- package/dist/connectors/google-drive.js +64 -23
- package/dist/connectors/google-search-console-oauth.js +165 -32
- package/dist/connectors/google-sheets.js +142 -199
- package/dist/connectors/google-slides.js +42 -23
- package/dist/connectors/grafana.js +84 -25
- package/dist/connectors/hackernews.d.ts +5 -0
- package/dist/connectors/hackernews.js +909 -0
- package/dist/connectors/hubspot-oauth.js +73 -22
- package/dist/connectors/hubspot.js +64 -24
- package/dist/connectors/influxdb.js +47 -23
- package/dist/connectors/intercom-oauth.js +104 -25
- package/dist/connectors/intercom.js +51 -27
- package/dist/connectors/jdbc.js +76 -25
- package/dist/connectors/jira-api-key.js +107 -26
- package/dist/connectors/kintone-api-token.js +105 -33
- package/dist/connectors/kintone.js +182 -26
- package/dist/connectors/linear.js +93 -27
- package/dist/connectors/linkedin-ads.js +80 -29
- package/dist/connectors/mailchimp-oauth.js +45 -21
- package/dist/connectors/mailchimp.js +45 -21
- package/dist/connectors/meta-ads-oauth.js +72 -29
- package/dist/connectors/meta-ads.js +74 -29
- package/dist/connectors/mixpanel.js +47 -23
- package/dist/connectors/monday.js +48 -24
- package/dist/connectors/mongodb.js +47 -23
- package/dist/connectors/notion-oauth.js +92 -24
- package/dist/connectors/notion.js +144 -26
- package/dist/connectors/openai.js +41 -17
- package/dist/connectors/oracle.js +316 -26
- package/dist/connectors/outlook-oauth.js +53 -34
- package/dist/connectors/powerbi-oauth.js +45 -26
- package/dist/connectors/salesforce.js +150 -24
- package/dist/connectors/semrush.js +45 -21
- package/dist/connectors/sentry.js +75 -25
- package/dist/connectors/shopify-oauth.js +75 -23
- package/dist/connectors/shopify.js +47 -23
- package/dist/connectors/sqlserver.js +322 -25
- package/dist/connectors/stripe-api-key.js +105 -30
- package/dist/connectors/stripe-oauth.js +102 -32
- package/dist/connectors/supabase.js +315 -21
- package/dist/connectors/tableau.js +54 -30
- package/dist/connectors/tiktok-ads.js +76 -31
- package/dist/connectors/wix-store.js +47 -23
- package/dist/connectors/x.d.ts +5 -0
- package/dist/connectors/x.js +951 -0
- package/dist/connectors/zendesk-oauth.js +87 -25
- package/dist/connectors/zendesk.js +51 -27
- package/dist/index.js +9005 -3709
- package/dist/main.js +9005 -3709
- package/dist/vite-plugin.js +8939 -3698
- package/package.json +12 -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
|
|
@@ -256,6 +261,15 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
256
261
|
* `runSetupFlow` from `setup-flow.ts`.
|
|
257
262
|
*/
|
|
258
263
|
setup;
|
|
264
|
+
/**
|
|
265
|
+
* 統一 introspection。SQL DB の `information_schema` / `SHOW` / `DESCRIBE` や SaaS の
|
|
266
|
+
* メタデータ API といった取得経路の差を吸収し、tables / columns / PK / FK を共通型
|
|
267
|
+
* {@link IntrospectedSchema} へ正規化して返す。取得経路は {@link IntrospectContext} で
|
|
268
|
+
* 抽象化され、SQL DB は `ctx.query`、SaaS は `ctx.proxyFetch` + `ctx.params` を使う。
|
|
269
|
+
* `ctx.profile === true` のときは L2 プロファイル(行数・NULL 率等)も best-effort で埋める。
|
|
270
|
+
* coding-agent の `DataContextIndex` がデータ地図を構築する際に使う。
|
|
271
|
+
*/
|
|
272
|
+
introspect;
|
|
259
273
|
/**
|
|
260
274
|
* Opt-out of the default "verify before save" behavior on connection
|
|
261
275
|
* creation. The backend invokes `checkConnection` synchronously while
|
|
@@ -270,6 +284,14 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
270
284
|
* the default verify-on-create behavior without opt-in.
|
|
271
285
|
*/
|
|
272
286
|
skipConnectionCheckOnCreate;
|
|
287
|
+
/**
|
|
288
|
+
* 決定論的な「立ち上げ survey」レシピ(ルールベース prewarm 基盤)。実装した connector は、LLM を使わずに
|
|
289
|
+
* read-only で自分を survey する probe 列(テーブル/列メタデータ → 小サンプル)を宣言する。coding-agent の
|
|
290
|
+
* recon driver がこれを読み、connector ツールの `execute` を直接呼んで結果を seed にする。未実装の connector は
|
|
291
|
+
* driver 側で safely skip される(その connection は listConnections のみ seed)。標準 `information_schema` を
|
|
292
|
+
* 持つ SQL connector は `makeStandardSqlSurveyProbes` を使える。**probe は必ず read-only**。
|
|
293
|
+
*/
|
|
294
|
+
surveyProbes;
|
|
273
295
|
constructor(config) {
|
|
274
296
|
this.slug = config.slug;
|
|
275
297
|
this.authType = config.authType;
|
|
@@ -287,7 +309,9 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
287
309
|
this.query = config.query;
|
|
288
310
|
this.checkConnection = config.checkConnection;
|
|
289
311
|
this.setup = config.setup;
|
|
312
|
+
this.introspect = config.introspect;
|
|
290
313
|
this.skipConnectionCheckOnCreate = config.skipConnectionCheckOnCreate;
|
|
314
|
+
this.surveyProbes = config.surveyProbes;
|
|
291
315
|
}
|
|
292
316
|
get connectorKey() {
|
|
293
317
|
return _ConnectorPlugin.deriveKey(this.slug, this.authType);
|
|
@@ -295,7 +319,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
295
319
|
/**
|
|
296
320
|
* Create tools for connections that belong to this connector.
|
|
297
321
|
* Filters connections by connectorKey internally.
|
|
298
|
-
* Returns tools keyed as
|
|
322
|
+
* Returns tools keyed as `connector_${connectorKey}_${toolName}`.
|
|
299
323
|
*/
|
|
300
324
|
createTools(connections, config, opts) {
|
|
301
325
|
const myConnections = connections.filter(
|
|
@@ -305,7 +329,7 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
305
329
|
for (const t of Object.values(this.tools)) {
|
|
306
330
|
const tool = t.createTool(myConnections, config);
|
|
307
331
|
const originalToModelOutput = tool.toModelOutput;
|
|
308
|
-
result[
|
|
332
|
+
result[`connector_${this.connectorKey}_${t.name}`] = {
|
|
309
333
|
...tool,
|
|
310
334
|
toModelOutput: async (options) => {
|
|
311
335
|
if (!originalToModelOutput) {
|
|
@@ -325,25 +349,25 @@ var ConnectorPlugin = class _ConnectorPlugin {
|
|
|
325
349
|
if (authType) return `${slug}-${authType}`;
|
|
326
350
|
const LEGACY_NULL_AUTH_TYPE_MAP = {
|
|
327
351
|
// user-password
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
352
|
+
postgresql: "user-password",
|
|
353
|
+
mysql: "user-password",
|
|
354
|
+
clickhouse: "user-password",
|
|
355
|
+
kintone: "user-password",
|
|
332
356
|
"squadbase-db": "user-password",
|
|
333
357
|
// service-account
|
|
334
|
-
|
|
335
|
-
|
|
358
|
+
snowflake: "service-account",
|
|
359
|
+
bigquery: "service-account",
|
|
336
360
|
"google-analytics": "service-account",
|
|
337
361
|
"google-calendar": "service-account",
|
|
338
362
|
"aws-athena": "service-account",
|
|
339
|
-
|
|
363
|
+
redshift: "service-account",
|
|
340
364
|
// api-key
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
365
|
+
databricks: "api-key",
|
|
366
|
+
dbt: "api-key",
|
|
367
|
+
airtable: "api-key",
|
|
368
|
+
openai: "api-key",
|
|
369
|
+
gemini: "api-key",
|
|
370
|
+
anthropic: "api-key",
|
|
347
371
|
"wix-store": "api-key"
|
|
348
372
|
};
|
|
349
373
|
const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
|
|
@@ -430,12 +454,12 @@ var AUTH_TYPES = {
|
|
|
430
454
|
// ../connectors/src/connectors/customerio/setup.ts
|
|
431
455
|
var customerioOnboarding = new ConnectorOnboarding({
|
|
432
456
|
dataOverviewInstructions: {
|
|
433
|
-
en: `1. Call
|
|
434
|
-
2. Call
|
|
457
|
+
en: `1. Call connector_customerio_request with GET /v1/segments to list all segments
|
|
458
|
+
2. Call connector_customerio_request with GET /v1/campaigns to list all campaigns
|
|
435
459
|
3. Pick a segment and call GET /v1/segments/{segment_id}/membership to view member IDs
|
|
436
460
|
4. Pick a customer ID and call GET /v1/customers/{id}/attributes to view customer attributes`,
|
|
437
|
-
ja: `1.
|
|
438
|
-
2.
|
|
461
|
+
ja: `1. connector_customerio_request \u3067 GET /v1/segments \u3092\u547C\u3073\u51FA\u3057\u3001\u5168\u30BB\u30B0\u30E1\u30F3\u30C8\u4E00\u89A7\u3092\u53D6\u5F97
|
|
462
|
+
2. connector_customerio_request \u3067 GET /v1/campaigns \u3092\u547C\u3073\u51FA\u3057\u3001\u5168\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u4E00\u89A7\u3092\u53D6\u5F97
|
|
439
463
|
3. \u30BB\u30B0\u30E1\u30F3\u30C8\u3092\u9078\u629E\u3057 GET /v1/segments/{segment_id}/membership \u3067\u30E1\u30F3\u30D0\u30FCID\u3092\u78BA\u8A8D
|
|
440
464
|
4. \u9867\u5BA2ID\u3092\u9078\u629E\u3057 GET /v1/customers/{id}/attributes \u3067\u9867\u5BA2\u5C5E\u6027\u3092\u78BA\u8A8D`
|
|
441
465
|
}
|
|
@@ -667,7 +691,7 @@ var customerioConnector = new ConnectorPlugin({
|
|
|
667
691
|
systemPrompt: {
|
|
668
692
|
en: `### Tools
|
|
669
693
|
|
|
670
|
-
- \`
|
|
694
|
+
- \`connector_customerio_request\`: The only way to call the Customer.io App API. Use it to read customer data, manage campaigns and segments, send transactional messages, and trigger broadcasts. Authentication (Bearer token with App API Key) is configured automatically.
|
|
671
695
|
|
|
672
696
|
### Business Logic
|
|
673
697
|
|
|
@@ -751,7 +775,7 @@ export default async function handler(c: Context) {
|
|
|
751
775
|
- Pagination uses cursor-based \`start\` parameter for customer listing`,
|
|
752
776
|
ja: `### \u30C4\u30FC\u30EB
|
|
753
777
|
|
|
754
|
-
- \`
|
|
778
|
+
- \`connector_customerio_request\`: Customer.io App API\u3092\u547C\u3073\u51FA\u3059\u552F\u4E00\u306E\u624B\u6BB5\u3067\u3059\u3002\u9867\u5BA2\u30C7\u30FC\u30BF\u306E\u8AAD\u307F\u53D6\u308A\u3001\u30AD\u30E3\u30F3\u30DA\u30FC\u30F3\u3084\u30BB\u30B0\u30E1\u30F3\u30C8\u306E\u7BA1\u7406\u3001\u30C8\u30E9\u30F3\u30B6\u30AF\u30B7\u30E7\u30F3\u30E1\u30C3\u30BB\u30FC\u30B8\u306E\u9001\u4FE1\u3001\u30D6\u30ED\u30FC\u30C9\u30AD\u30E3\u30B9\u30C8\u306E\u30C8\u30EA\u30AC\u30FC\u306B\u4F7F\u7528\u3057\u307E\u3059\u3002\u8A8D\u8A3C\uFF08App API\u30AD\u30FC\u306B\u3088\u308BBearer\u30C8\u30FC\u30AF\u30F3\uFF09\u306F\u81EA\u52D5\u7684\u306B\u8A2D\u5B9A\u3055\u308C\u307E\u3059\u3002
|
|
755
779
|
|
|
756
780
|
### Business Logic
|
|
757
781
|
|