@squadbase/vite-server 0.1.17 → 0.1.19-dev.2880e8d

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.
Files changed (87) hide show
  1. package/build-entry/server-entry.mjs +23 -0
  2. package/dist/cli/index.js +6362 -3420
  3. package/dist/connectors/airtable-oauth.js +39 -15
  4. package/dist/connectors/airtable.js +86 -15
  5. package/dist/connectors/amplitude.js +39 -15
  6. package/dist/connectors/anthropic.js +39 -15
  7. package/dist/connectors/asana.js +39 -15
  8. package/dist/connectors/attio.js +39 -15
  9. package/dist/connectors/aws-billing.js +39 -15
  10. package/dist/connectors/azure-sql.js +291 -18
  11. package/dist/connectors/backlog-api-key.js +39 -15
  12. package/dist/connectors/clickup.js +39 -15
  13. package/dist/connectors/cosmosdb.js +39 -15
  14. package/dist/connectors/customerio.js +39 -15
  15. package/dist/connectors/dbt.js +39 -15
  16. package/dist/connectors/freshdesk.js +39 -15
  17. package/dist/connectors/freshsales.js +39 -15
  18. package/dist/connectors/freshservice.js +39 -15
  19. package/dist/connectors/gamma.js +39 -15
  20. package/dist/connectors/gemini.js +39 -15
  21. package/dist/connectors/github.js +39 -15
  22. package/dist/connectors/gmail-oauth.js +32 -13
  23. package/dist/connectors/gmail.js +39 -15
  24. package/dist/connectors/google-ads.js +39 -15
  25. package/dist/connectors/google-analytics-oauth.js +135 -197
  26. package/dist/connectors/google-analytics.js +39 -15
  27. package/dist/connectors/google-audit-log.js +39 -15
  28. package/dist/connectors/google-calendar-oauth.js +40 -16
  29. package/dist/connectors/google-calendar.js +39 -15
  30. package/dist/connectors/google-docs.js +32 -13
  31. package/dist/connectors/google-drive.js +32 -13
  32. package/dist/connectors/google-search-console-oauth.js +39 -15
  33. package/dist/connectors/google-sheets.js +138 -195
  34. package/dist/connectors/google-slides.js +32 -13
  35. package/dist/connectors/grafana.js +39 -15
  36. package/dist/connectors/hackernews.d.ts +5 -0
  37. package/dist/connectors/hackernews.js +909 -0
  38. package/dist/connectors/hubspot-oauth.js +32 -13
  39. package/dist/connectors/hubspot.js +39 -15
  40. package/dist/connectors/influxdb.js +39 -15
  41. package/dist/connectors/intercom-oauth.js +32 -13
  42. package/dist/connectors/intercom.js +39 -15
  43. package/dist/connectors/jdbc.js +70 -19
  44. package/dist/connectors/jira-api-key.js +39 -15
  45. package/dist/connectors/kintone-api-token.js +39 -15
  46. package/dist/connectors/kintone.js +128 -15
  47. package/dist/connectors/linear.js +39 -15
  48. package/dist/connectors/linkedin-ads.js +39 -15
  49. package/dist/connectors/mailchimp-oauth.js +39 -15
  50. package/dist/connectors/mailchimp.js +39 -15
  51. package/dist/connectors/meta-ads-oauth.js +39 -15
  52. package/dist/connectors/meta-ads.js +39 -15
  53. package/dist/connectors/mixpanel.js +39 -15
  54. package/dist/connectors/monday.js +39 -15
  55. package/dist/connectors/mongodb.js +39 -15
  56. package/dist/connectors/notion-oauth.js +32 -13
  57. package/dist/connectors/notion.js +84 -15
  58. package/dist/connectors/openai.js +39 -15
  59. package/dist/connectors/oracle.js +293 -19
  60. package/dist/connectors/outlook-oauth.js +33 -14
  61. package/dist/connectors/powerbi-oauth.js +33 -14
  62. package/dist/connectors/salesforce.js +108 -15
  63. package/dist/connectors/semrush.js +39 -15
  64. package/dist/connectors/sentry.js +39 -15
  65. package/dist/connectors/shopify-oauth.js +32 -13
  66. package/dist/connectors/shopify.js +39 -15
  67. package/dist/connectors/slack.d.ts +5 -0
  68. package/dist/connectors/slack.js +656 -0
  69. package/dist/connectors/sqlserver.js +291 -18
  70. package/dist/connectors/stripe-api-key.js +39 -15
  71. package/dist/connectors/stripe-oauth.js +32 -13
  72. package/dist/connectors/supabase.js +293 -16
  73. package/dist/connectors/tableau.js +40 -16
  74. package/dist/connectors/tiktok-ads.js +39 -15
  75. package/dist/connectors/wix-store.js +39 -15
  76. package/dist/connectors/x.d.ts +5 -0
  77. package/dist/connectors/x.js +951 -0
  78. package/dist/connectors/zendesk-oauth.js +32 -13
  79. package/dist/connectors/zendesk.js +39 -15
  80. package/dist/index.d.ts +25 -1
  81. package/dist/index.js +6490 -3571
  82. package/dist/main.d.ts +1 -0
  83. package/dist/main.js +6494 -3575
  84. package/dist/types/server-logic.d.ts +3 -0
  85. package/dist/vite-plugin.d.ts +7 -2
  86. package/dist/vite-plugin.js +53 -44480
  87. package/package.json +14 -6
@@ -1,6 +1,11 @@
1
1
  var __getOwnPropNames = Object.getOwnPropertyNames;
2
- var __esm = (fn, res) => function __init() {
3
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
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
@@ -187,6 +192,15 @@ var ConnectorPlugin = class _ConnectorPlugin {
187
192
  * `runSetupFlow` from `setup-flow.ts`.
188
193
  */
189
194
  setup;
195
+ /**
196
+ * 統一 introspection。SQL DB の `information_schema` / `SHOW` / `DESCRIBE` や SaaS の
197
+ * メタデータ API といった取得経路の差を吸収し、tables / columns / PK / FK を共通型
198
+ * {@link IntrospectedSchema} へ正規化して返す。取得経路は {@link IntrospectContext} で
199
+ * 抽象化され、SQL DB は `ctx.query`、SaaS は `ctx.proxyFetch` + `ctx.params` を使う。
200
+ * `ctx.profile === true` のときは L2 プロファイル(行数・NULL 率等)も best-effort で埋める。
201
+ * coding-agent の `DataContextIndex` がデータ地図を構築する際に使う。
202
+ */
203
+ introspect;
190
204
  /**
191
205
  * Opt-out of the default "verify before save" behavior on connection
192
206
  * creation. The backend invokes `checkConnection` synchronously while
@@ -201,6 +215,14 @@ var ConnectorPlugin = class _ConnectorPlugin {
201
215
  * the default verify-on-create behavior without opt-in.
202
216
  */
203
217
  skipConnectionCheckOnCreate;
218
+ /**
219
+ * 決定論的な「立ち上げ survey」レシピ(ルールベース prewarm 基盤)。実装した connector は、LLM を使わずに
220
+ * read-only で自分を survey する probe 列(テーブル/列メタデータ → 小サンプル)を宣言する。coding-agent の
221
+ * recon driver がこれを読み、connector ツールの `execute` を直接呼んで結果を seed にする。未実装の connector は
222
+ * driver 側で safely skip される(その connection は listConnections のみ seed)。標準 `information_schema` を
223
+ * 持つ SQL connector は `makeStandardSqlSurveyProbes` を使える。**probe は必ず read-only**。
224
+ */
225
+ surveyProbes;
204
226
  constructor(config) {
205
227
  this.slug = config.slug;
206
228
  this.authType = config.authType;
@@ -218,7 +240,9 @@ var ConnectorPlugin = class _ConnectorPlugin {
218
240
  this.query = config.query;
219
241
  this.checkConnection = config.checkConnection;
220
242
  this.setup = config.setup;
243
+ this.introspect = config.introspect;
221
244
  this.skipConnectionCheckOnCreate = config.skipConnectionCheckOnCreate;
245
+ this.surveyProbes = config.surveyProbes;
222
246
  }
223
247
  get connectorKey() {
224
248
  return _ConnectorPlugin.deriveKey(this.slug, this.authType);
@@ -256,25 +280,25 @@ var ConnectorPlugin = class _ConnectorPlugin {
256
280
  if (authType) return `${slug}-${authType}`;
257
281
  const LEGACY_NULL_AUTH_TYPE_MAP = {
258
282
  // user-password
259
- "postgresql": "user-password",
260
- "mysql": "user-password",
261
- "clickhouse": "user-password",
262
- "kintone": "user-password",
283
+ postgresql: "user-password",
284
+ mysql: "user-password",
285
+ clickhouse: "user-password",
286
+ kintone: "user-password",
263
287
  "squadbase-db": "user-password",
264
288
  // service-account
265
- "snowflake": "service-account",
266
- "bigquery": "service-account",
289
+ snowflake: "service-account",
290
+ bigquery: "service-account",
267
291
  "google-analytics": "service-account",
268
292
  "google-calendar": "service-account",
269
293
  "aws-athena": "service-account",
270
- "redshift": "service-account",
294
+ redshift: "service-account",
271
295
  // api-key
272
- "databricks": "api-key",
273
- "dbt": "api-key",
274
- "airtable": "api-key",
275
- "openai": "api-key",
276
- "gemini": "api-key",
277
- "anthropic": "api-key",
296
+ databricks: "api-key",
297
+ dbt: "api-key",
298
+ airtable: "api-key",
299
+ openai: "api-key",
300
+ gemini: "api-key",
301
+ anthropic: "api-key",
278
302
  "wix-store": "api-key"
279
303
  };
280
304
  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
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
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
@@ -203,6 +208,15 @@ var ConnectorPlugin = class _ConnectorPlugin {
203
208
  * `runSetupFlow` from `setup-flow.ts`.
204
209
  */
205
210
  setup;
211
+ /**
212
+ * 統一 introspection。SQL DB の `information_schema` / `SHOW` / `DESCRIBE` や SaaS の
213
+ * メタデータ API といった取得経路の差を吸収し、tables / columns / PK / FK を共通型
214
+ * {@link IntrospectedSchema} へ正規化して返す。取得経路は {@link IntrospectContext} で
215
+ * 抽象化され、SQL DB は `ctx.query`、SaaS は `ctx.proxyFetch` + `ctx.params` を使う。
216
+ * `ctx.profile === true` のときは L2 プロファイル(行数・NULL 率等)も best-effort で埋める。
217
+ * coding-agent の `DataContextIndex` がデータ地図を構築する際に使う。
218
+ */
219
+ introspect;
206
220
  /**
207
221
  * Opt-out of the default "verify before save" behavior on connection
208
222
  * creation. The backend invokes `checkConnection` synchronously while
@@ -217,6 +231,14 @@ var ConnectorPlugin = class _ConnectorPlugin {
217
231
  * the default verify-on-create behavior without opt-in.
218
232
  */
219
233
  skipConnectionCheckOnCreate;
234
+ /**
235
+ * 決定論的な「立ち上げ survey」レシピ(ルールベース prewarm 基盤)。実装した connector は、LLM を使わずに
236
+ * read-only で自分を survey する probe 列(テーブル/列メタデータ → 小サンプル)を宣言する。coding-agent の
237
+ * recon driver がこれを読み、connector ツールの `execute` を直接呼んで結果を seed にする。未実装の connector は
238
+ * driver 側で safely skip される(その connection は listConnections のみ seed)。標準 `information_schema` を
239
+ * 持つ SQL connector は `makeStandardSqlSurveyProbes` を使える。**probe は必ず read-only**。
240
+ */
241
+ surveyProbes;
220
242
  constructor(config) {
221
243
  this.slug = config.slug;
222
244
  this.authType = config.authType;
@@ -234,7 +256,9 @@ var ConnectorPlugin = class _ConnectorPlugin {
234
256
  this.query = config.query;
235
257
  this.checkConnection = config.checkConnection;
236
258
  this.setup = config.setup;
259
+ this.introspect = config.introspect;
237
260
  this.skipConnectionCheckOnCreate = config.skipConnectionCheckOnCreate;
261
+ this.surveyProbes = config.surveyProbes;
238
262
  }
239
263
  get connectorKey() {
240
264
  return _ConnectorPlugin.deriveKey(this.slug, this.authType);
@@ -272,25 +296,25 @@ var ConnectorPlugin = class _ConnectorPlugin {
272
296
  if (authType) return `${slug}-${authType}`;
273
297
  const LEGACY_NULL_AUTH_TYPE_MAP = {
274
298
  // user-password
275
- "postgresql": "user-password",
276
- "mysql": "user-password",
277
- "clickhouse": "user-password",
278
- "kintone": "user-password",
299
+ postgresql: "user-password",
300
+ mysql: "user-password",
301
+ clickhouse: "user-password",
302
+ kintone: "user-password",
279
303
  "squadbase-db": "user-password",
280
304
  // service-account
281
- "snowflake": "service-account",
282
- "bigquery": "service-account",
305
+ snowflake: "service-account",
306
+ bigquery: "service-account",
283
307
  "google-analytics": "service-account",
284
308
  "google-calendar": "service-account",
285
309
  "aws-athena": "service-account",
286
- "redshift": "service-account",
310
+ redshift: "service-account",
287
311
  // api-key
288
- "databricks": "api-key",
289
- "dbt": "api-key",
290
- "airtable": "api-key",
291
- "openai": "api-key",
292
- "gemini": "api-key",
293
- "anthropic": "api-key",
312
+ databricks: "api-key",
313
+ dbt: "api-key",
314
+ airtable: "api-key",
315
+ openai: "api-key",
316
+ gemini: "api-key",
317
+ anthropic: "api-key",
294
318
  "wix-store": "api-key"
295
319
  };
296
320
  const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
@@ -815,7 +839,7 @@ var googleCalendarOauthConnector = new ConnectorPlugin({
815
839
  description: "Connect to Google Calendar for calendar and event data access using OAuth.",
816
840
  iconUrl: "https://images.ctfassets.net/9ncizv60xc5y/2YsqoBEpdELmfDeFcyGHyE/4494c633b5ae15e562cb739cd85442c1/google-calendar.png",
817
841
  parameters,
818
- releaseFlag: { dev1: true, dev2: false, prod: false },
842
+ releaseFlag: { dev1: true, dev2: true, prod: true },
819
843
  categories: ["productivity"],
820
844
  onboarding: googleCalendarOauthOnboarding,
821
845
  proxyPolicy: {
@@ -1,6 +1,11 @@
1
1
  var __getOwnPropNames = Object.getOwnPropertyNames;
2
- var __esm = (fn, res) => function __init() {
3
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
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
@@ -208,6 +213,15 @@ var ConnectorPlugin = class _ConnectorPlugin {
208
213
  * `runSetupFlow` from `setup-flow.ts`.
209
214
  */
210
215
  setup;
216
+ /**
217
+ * 統一 introspection。SQL DB の `information_schema` / `SHOW` / `DESCRIBE` や SaaS の
218
+ * メタデータ API といった取得経路の差を吸収し、tables / columns / PK / FK を共通型
219
+ * {@link IntrospectedSchema} へ正規化して返す。取得経路は {@link IntrospectContext} で
220
+ * 抽象化され、SQL DB は `ctx.query`、SaaS は `ctx.proxyFetch` + `ctx.params` を使う。
221
+ * `ctx.profile === true` のときは L2 プロファイル(行数・NULL 率等)も best-effort で埋める。
222
+ * coding-agent の `DataContextIndex` がデータ地図を構築する際に使う。
223
+ */
224
+ introspect;
211
225
  /**
212
226
  * Opt-out of the default "verify before save" behavior on connection
213
227
  * creation. The backend invokes `checkConnection` synchronously while
@@ -222,6 +236,14 @@ var ConnectorPlugin = class _ConnectorPlugin {
222
236
  * the default verify-on-create behavior without opt-in.
223
237
  */
224
238
  skipConnectionCheckOnCreate;
239
+ /**
240
+ * 決定論的な「立ち上げ survey」レシピ(ルールベース prewarm 基盤)。実装した connector は、LLM を使わずに
241
+ * read-only で自分を survey する probe 列(テーブル/列メタデータ → 小サンプル)を宣言する。coding-agent の
242
+ * recon driver がこれを読み、connector ツールの `execute` を直接呼んで結果を seed にする。未実装の connector は
243
+ * driver 側で safely skip される(その connection は listConnections のみ seed)。標準 `information_schema` を
244
+ * 持つ SQL connector は `makeStandardSqlSurveyProbes` を使える。**probe は必ず read-only**。
245
+ */
246
+ surveyProbes;
225
247
  constructor(config) {
226
248
  this.slug = config.slug;
227
249
  this.authType = config.authType;
@@ -239,7 +261,9 @@ var ConnectorPlugin = class _ConnectorPlugin {
239
261
  this.query = config.query;
240
262
  this.checkConnection = config.checkConnection;
241
263
  this.setup = config.setup;
264
+ this.introspect = config.introspect;
242
265
  this.skipConnectionCheckOnCreate = config.skipConnectionCheckOnCreate;
266
+ this.surveyProbes = config.surveyProbes;
243
267
  }
244
268
  get connectorKey() {
245
269
  return _ConnectorPlugin.deriveKey(this.slug, this.authType);
@@ -277,25 +301,25 @@ var ConnectorPlugin = class _ConnectorPlugin {
277
301
  if (authType) return `${slug}-${authType}`;
278
302
  const LEGACY_NULL_AUTH_TYPE_MAP = {
279
303
  // user-password
280
- "postgresql": "user-password",
281
- "mysql": "user-password",
282
- "clickhouse": "user-password",
283
- "kintone": "user-password",
304
+ postgresql: "user-password",
305
+ mysql: "user-password",
306
+ clickhouse: "user-password",
307
+ kintone: "user-password",
284
308
  "squadbase-db": "user-password",
285
309
  // service-account
286
- "snowflake": "service-account",
287
- "bigquery": "service-account",
310
+ snowflake: "service-account",
311
+ bigquery: "service-account",
288
312
  "google-analytics": "service-account",
289
313
  "google-calendar": "service-account",
290
314
  "aws-athena": "service-account",
291
- "redshift": "service-account",
315
+ redshift: "service-account",
292
316
  // api-key
293
- "databricks": "api-key",
294
- "dbt": "api-key",
295
- "airtable": "api-key",
296
- "openai": "api-key",
297
- "gemini": "api-key",
298
- "anthropic": "api-key",
317
+ databricks: "api-key",
318
+ dbt: "api-key",
319
+ airtable: "api-key",
320
+ openai: "api-key",
321
+ gemini: "api-key",
322
+ anthropic: "api-key",
299
323
  "wix-store": "api-key"
300
324
  };
301
325
  const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
@@ -121,6 +121,15 @@ var ConnectorPlugin = class _ConnectorPlugin {
121
121
  * `runSetupFlow` from `setup-flow.ts`.
122
122
  */
123
123
  setup;
124
+ /**
125
+ * 統一 introspection。SQL DB の `information_schema` / `SHOW` / `DESCRIBE` や SaaS の
126
+ * メタデータ API といった取得経路の差を吸収し、tables / columns / PK / FK を共通型
127
+ * {@link IntrospectedSchema} へ正規化して返す。取得経路は {@link IntrospectContext} で
128
+ * 抽象化され、SQL DB は `ctx.query`、SaaS は `ctx.proxyFetch` + `ctx.params` を使う。
129
+ * `ctx.profile === true` のときは L2 プロファイル(行数・NULL 率等)も best-effort で埋める。
130
+ * coding-agent の `DataContextIndex` がデータ地図を構築する際に使う。
131
+ */
132
+ introspect;
124
133
  /**
125
134
  * Opt-out of the default "verify before save" behavior on connection
126
135
  * creation. The backend invokes `checkConnection` synchronously while
@@ -135,6 +144,14 @@ var ConnectorPlugin = class _ConnectorPlugin {
135
144
  * the default verify-on-create behavior without opt-in.
136
145
  */
137
146
  skipConnectionCheckOnCreate;
147
+ /**
148
+ * 決定論的な「立ち上げ survey」レシピ(ルールベース prewarm 基盤)。実装した connector は、LLM を使わずに
149
+ * read-only で自分を survey する probe 列(テーブル/列メタデータ → 小サンプル)を宣言する。coding-agent の
150
+ * recon driver がこれを読み、connector ツールの `execute` を直接呼んで結果を seed にする。未実装の connector は
151
+ * driver 側で safely skip される(その connection は listConnections のみ seed)。標準 `information_schema` を
152
+ * 持つ SQL connector は `makeStandardSqlSurveyProbes` を使える。**probe は必ず read-only**。
153
+ */
154
+ surveyProbes;
138
155
  constructor(config) {
139
156
  this.slug = config.slug;
140
157
  this.authType = config.authType;
@@ -152,7 +169,9 @@ var ConnectorPlugin = class _ConnectorPlugin {
152
169
  this.query = config.query;
153
170
  this.checkConnection = config.checkConnection;
154
171
  this.setup = config.setup;
172
+ this.introspect = config.introspect;
155
173
  this.skipConnectionCheckOnCreate = config.skipConnectionCheckOnCreate;
174
+ this.surveyProbes = config.surveyProbes;
156
175
  }
157
176
  get connectorKey() {
158
177
  return _ConnectorPlugin.deriveKey(this.slug, this.authType);
@@ -190,25 +209,25 @@ var ConnectorPlugin = class _ConnectorPlugin {
190
209
  if (authType) return `${slug}-${authType}`;
191
210
  const LEGACY_NULL_AUTH_TYPE_MAP = {
192
211
  // user-password
193
- "postgresql": "user-password",
194
- "mysql": "user-password",
195
- "clickhouse": "user-password",
196
- "kintone": "user-password",
212
+ postgresql: "user-password",
213
+ mysql: "user-password",
214
+ clickhouse: "user-password",
215
+ kintone: "user-password",
197
216
  "squadbase-db": "user-password",
198
217
  // service-account
199
- "snowflake": "service-account",
200
- "bigquery": "service-account",
218
+ snowflake: "service-account",
219
+ bigquery: "service-account",
201
220
  "google-analytics": "service-account",
202
221
  "google-calendar": "service-account",
203
222
  "aws-athena": "service-account",
204
- "redshift": "service-account",
223
+ redshift: "service-account",
205
224
  // api-key
206
- "databricks": "api-key",
207
- "dbt": "api-key",
208
- "airtable": "api-key",
209
- "openai": "api-key",
210
- "gemini": "api-key",
211
- "anthropic": "api-key",
225
+ databricks: "api-key",
226
+ dbt: "api-key",
227
+ airtable: "api-key",
228
+ openai: "api-key",
229
+ gemini: "api-key",
230
+ anthropic: "api-key",
212
231
  "wix-store": "api-key"
213
232
  };
214
233
  const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
@@ -210,6 +210,15 @@ var ConnectorPlugin = class _ConnectorPlugin {
210
210
  * `runSetupFlow` from `setup-flow.ts`.
211
211
  */
212
212
  setup;
213
+ /**
214
+ * 統一 introspection。SQL DB の `information_schema` / `SHOW` / `DESCRIBE` や SaaS の
215
+ * メタデータ API といった取得経路の差を吸収し、tables / columns / PK / FK を共通型
216
+ * {@link IntrospectedSchema} へ正規化して返す。取得経路は {@link IntrospectContext} で
217
+ * 抽象化され、SQL DB は `ctx.query`、SaaS は `ctx.proxyFetch` + `ctx.params` を使う。
218
+ * `ctx.profile === true` のときは L2 プロファイル(行数・NULL 率等)も best-effort で埋める。
219
+ * coding-agent の `DataContextIndex` がデータ地図を構築する際に使う。
220
+ */
221
+ introspect;
213
222
  /**
214
223
  * Opt-out of the default "verify before save" behavior on connection
215
224
  * creation. The backend invokes `checkConnection` synchronously while
@@ -224,6 +233,14 @@ var ConnectorPlugin = class _ConnectorPlugin {
224
233
  * the default verify-on-create behavior without opt-in.
225
234
  */
226
235
  skipConnectionCheckOnCreate;
236
+ /**
237
+ * 決定論的な「立ち上げ survey」レシピ(ルールベース prewarm 基盤)。実装した connector は、LLM を使わずに
238
+ * read-only で自分を survey する probe 列(テーブル/列メタデータ → 小サンプル)を宣言する。coding-agent の
239
+ * recon driver がこれを読み、connector ツールの `execute` を直接呼んで結果を seed にする。未実装の connector は
240
+ * driver 側で safely skip される(その connection は listConnections のみ seed)。標準 `information_schema` を
241
+ * 持つ SQL connector は `makeStandardSqlSurveyProbes` を使える。**probe は必ず read-only**。
242
+ */
243
+ surveyProbes;
227
244
  constructor(config) {
228
245
  this.slug = config.slug;
229
246
  this.authType = config.authType;
@@ -241,7 +258,9 @@ var ConnectorPlugin = class _ConnectorPlugin {
241
258
  this.query = config.query;
242
259
  this.checkConnection = config.checkConnection;
243
260
  this.setup = config.setup;
261
+ this.introspect = config.introspect;
244
262
  this.skipConnectionCheckOnCreate = config.skipConnectionCheckOnCreate;
263
+ this.surveyProbes = config.surveyProbes;
245
264
  }
246
265
  get connectorKey() {
247
266
  return _ConnectorPlugin.deriveKey(this.slug, this.authType);
@@ -279,25 +298,25 @@ var ConnectorPlugin = class _ConnectorPlugin {
279
298
  if (authType) return `${slug}-${authType}`;
280
299
  const LEGACY_NULL_AUTH_TYPE_MAP = {
281
300
  // user-password
282
- "postgresql": "user-password",
283
- "mysql": "user-password",
284
- "clickhouse": "user-password",
285
- "kintone": "user-password",
301
+ postgresql: "user-password",
302
+ mysql: "user-password",
303
+ clickhouse: "user-password",
304
+ kintone: "user-password",
286
305
  "squadbase-db": "user-password",
287
306
  // service-account
288
- "snowflake": "service-account",
289
- "bigquery": "service-account",
307
+ snowflake: "service-account",
308
+ bigquery: "service-account",
290
309
  "google-analytics": "service-account",
291
310
  "google-calendar": "service-account",
292
311
  "aws-athena": "service-account",
293
- "redshift": "service-account",
312
+ redshift: "service-account",
294
313
  // api-key
295
- "databricks": "api-key",
296
- "dbt": "api-key",
297
- "airtable": "api-key",
298
- "openai": "api-key",
299
- "gemini": "api-key",
300
- "anthropic": "api-key",
314
+ databricks: "api-key",
315
+ dbt: "api-key",
316
+ airtable: "api-key",
317
+ openai: "api-key",
318
+ gemini: "api-key",
319
+ anthropic: "api-key",
301
320
  "wix-store": "api-key"
302
321
  };
303
322
  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
- return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
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
@@ -217,6 +222,15 @@ var ConnectorPlugin = class _ConnectorPlugin {
217
222
  * `runSetupFlow` from `setup-flow.ts`.
218
223
  */
219
224
  setup;
225
+ /**
226
+ * 統一 introspection。SQL DB の `information_schema` / `SHOW` / `DESCRIBE` や SaaS の
227
+ * メタデータ API といった取得経路の差を吸収し、tables / columns / PK / FK を共通型
228
+ * {@link IntrospectedSchema} へ正規化して返す。取得経路は {@link IntrospectContext} で
229
+ * 抽象化され、SQL DB は `ctx.query`、SaaS は `ctx.proxyFetch` + `ctx.params` を使う。
230
+ * `ctx.profile === true` のときは L2 プロファイル(行数・NULL 率等)も best-effort で埋める。
231
+ * coding-agent の `DataContextIndex` がデータ地図を構築する際に使う。
232
+ */
233
+ introspect;
220
234
  /**
221
235
  * Opt-out of the default "verify before save" behavior on connection
222
236
  * creation. The backend invokes `checkConnection` synchronously while
@@ -231,6 +245,14 @@ var ConnectorPlugin = class _ConnectorPlugin {
231
245
  * the default verify-on-create behavior without opt-in.
232
246
  */
233
247
  skipConnectionCheckOnCreate;
248
+ /**
249
+ * 決定論的な「立ち上げ survey」レシピ(ルールベース prewarm 基盤)。実装した connector は、LLM を使わずに
250
+ * read-only で自分を survey する probe 列(テーブル/列メタデータ → 小サンプル)を宣言する。coding-agent の
251
+ * recon driver がこれを読み、connector ツールの `execute` を直接呼んで結果を seed にする。未実装の connector は
252
+ * driver 側で safely skip される(その connection は listConnections のみ seed)。標準 `information_schema` を
253
+ * 持つ SQL connector は `makeStandardSqlSurveyProbes` を使える。**probe は必ず read-only**。
254
+ */
255
+ surveyProbes;
234
256
  constructor(config) {
235
257
  this.slug = config.slug;
236
258
  this.authType = config.authType;
@@ -248,7 +270,9 @@ var ConnectorPlugin = class _ConnectorPlugin {
248
270
  this.query = config.query;
249
271
  this.checkConnection = config.checkConnection;
250
272
  this.setup = config.setup;
273
+ this.introspect = config.introspect;
251
274
  this.skipConnectionCheckOnCreate = config.skipConnectionCheckOnCreate;
275
+ this.surveyProbes = config.surveyProbes;
252
276
  }
253
277
  get connectorKey() {
254
278
  return _ConnectorPlugin.deriveKey(this.slug, this.authType);
@@ -286,25 +310,25 @@ var ConnectorPlugin = class _ConnectorPlugin {
286
310
  if (authType) return `${slug}-${authType}`;
287
311
  const LEGACY_NULL_AUTH_TYPE_MAP = {
288
312
  // user-password
289
- "postgresql": "user-password",
290
- "mysql": "user-password",
291
- "clickhouse": "user-password",
292
- "kintone": "user-password",
313
+ postgresql: "user-password",
314
+ mysql: "user-password",
315
+ clickhouse: "user-password",
316
+ kintone: "user-password",
293
317
  "squadbase-db": "user-password",
294
318
  // service-account
295
- "snowflake": "service-account",
296
- "bigquery": "service-account",
319
+ snowflake: "service-account",
320
+ bigquery: "service-account",
297
321
  "google-analytics": "service-account",
298
322
  "google-calendar": "service-account",
299
323
  "aws-athena": "service-account",
300
- "redshift": "service-account",
324
+ redshift: "service-account",
301
325
  // api-key
302
- "databricks": "api-key",
303
- "dbt": "api-key",
304
- "airtable": "api-key",
305
- "openai": "api-key",
306
- "gemini": "api-key",
307
- "anthropic": "api-key",
326
+ databricks: "api-key",
327
+ dbt: "api-key",
328
+ airtable: "api-key",
329
+ openai: "api-key",
330
+ gemini: "api-key",
331
+ anthropic: "api-key",
308
332
  "wix-store": "api-key"
309
333
  };
310
334
  const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];