@squadbase/vite-server 0.1.17 → 0.1.18

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 (82) hide show
  1. package/dist/cli/index.js +5961 -2986
  2. package/dist/connectors/airtable-oauth.js +39 -15
  3. package/dist/connectors/airtable.js +86 -15
  4. package/dist/connectors/amplitude.js +39 -15
  5. package/dist/connectors/anthropic.js +39 -15
  6. package/dist/connectors/asana.js +39 -15
  7. package/dist/connectors/attio.js +39 -15
  8. package/dist/connectors/aws-billing.js +39 -15
  9. package/dist/connectors/azure-sql.js +291 -18
  10. package/dist/connectors/backlog-api-key.js +39 -15
  11. package/dist/connectors/clickup.js +39 -15
  12. package/dist/connectors/cosmosdb.js +39 -15
  13. package/dist/connectors/customerio.js +39 -15
  14. package/dist/connectors/dbt.js +39 -15
  15. package/dist/connectors/freshdesk.js +39 -15
  16. package/dist/connectors/freshsales.js +39 -15
  17. package/dist/connectors/freshservice.js +39 -15
  18. package/dist/connectors/gamma.js +39 -15
  19. package/dist/connectors/gemini.js +39 -15
  20. package/dist/connectors/github.js +39 -15
  21. package/dist/connectors/gmail-oauth.js +32 -13
  22. package/dist/connectors/gmail.js +39 -15
  23. package/dist/connectors/google-ads.js +39 -15
  24. package/dist/connectors/google-analytics-oauth.js +40 -16
  25. package/dist/connectors/google-analytics.js +39 -15
  26. package/dist/connectors/google-audit-log.js +39 -15
  27. package/dist/connectors/google-calendar-oauth.js +40 -16
  28. package/dist/connectors/google-calendar.js +39 -15
  29. package/dist/connectors/google-docs.js +32 -13
  30. package/dist/connectors/google-drive.js +32 -13
  31. package/dist/connectors/google-search-console-oauth.js +39 -15
  32. package/dist/connectors/google-sheets.js +138 -195
  33. package/dist/connectors/google-slides.js +32 -13
  34. package/dist/connectors/grafana.js +39 -15
  35. package/dist/connectors/hackernews.d.ts +5 -0
  36. package/dist/connectors/hackernews.js +909 -0
  37. package/dist/connectors/hubspot-oauth.js +32 -13
  38. package/dist/connectors/hubspot.js +39 -15
  39. package/dist/connectors/influxdb.js +39 -15
  40. package/dist/connectors/intercom-oauth.js +32 -13
  41. package/dist/connectors/intercom.js +39 -15
  42. package/dist/connectors/jdbc.js +70 -19
  43. package/dist/connectors/jira-api-key.js +39 -15
  44. package/dist/connectors/kintone-api-token.js +39 -15
  45. package/dist/connectors/kintone.js +128 -15
  46. package/dist/connectors/linear.js +39 -15
  47. package/dist/connectors/linkedin-ads.js +39 -15
  48. package/dist/connectors/mailchimp-oauth.js +39 -15
  49. package/dist/connectors/mailchimp.js +39 -15
  50. package/dist/connectors/meta-ads-oauth.js +39 -15
  51. package/dist/connectors/meta-ads.js +39 -15
  52. package/dist/connectors/mixpanel.js +39 -15
  53. package/dist/connectors/monday.js +39 -15
  54. package/dist/connectors/mongodb.js +39 -15
  55. package/dist/connectors/notion-oauth.js +32 -13
  56. package/dist/connectors/notion.js +84 -15
  57. package/dist/connectors/openai.js +39 -15
  58. package/dist/connectors/oracle.js +293 -19
  59. package/dist/connectors/outlook-oauth.js +33 -14
  60. package/dist/connectors/powerbi-oauth.js +33 -14
  61. package/dist/connectors/salesforce.js +108 -15
  62. package/dist/connectors/semrush.js +39 -15
  63. package/dist/connectors/sentry.js +39 -15
  64. package/dist/connectors/shopify-oauth.js +32 -13
  65. package/dist/connectors/shopify.js +39 -15
  66. package/dist/connectors/slack.d.ts +5 -0
  67. package/dist/connectors/slack.js +656 -0
  68. package/dist/connectors/sqlserver.js +291 -18
  69. package/dist/connectors/stripe-api-key.js +39 -15
  70. package/dist/connectors/stripe-oauth.js +32 -13
  71. package/dist/connectors/supabase.js +293 -16
  72. package/dist/connectors/tableau.js +40 -16
  73. package/dist/connectors/tiktok-ads.js +39 -15
  74. package/dist/connectors/wix-store.js +39 -15
  75. package/dist/connectors/x.d.ts +5 -0
  76. package/dist/connectors/x.js +951 -0
  77. package/dist/connectors/zendesk-oauth.js +32 -13
  78. package/dist/connectors/zendesk.js +39 -15
  79. package/dist/index.js +6404 -3394
  80. package/dist/main.js +6404 -3394
  81. package/dist/vite-plugin.js +5961 -2986
  82. package/package.json +16 -4
@@ -133,6 +133,15 @@ var ConnectorPlugin = class _ConnectorPlugin {
133
133
  * `runSetupFlow` from `setup-flow.ts`.
134
134
  */
135
135
  setup;
136
+ /**
137
+ * 統一 introspection。SQL DB の `information_schema` / `SHOW` / `DESCRIBE` や SaaS の
138
+ * メタデータ API といった取得経路の差を吸収し、tables / columns / PK / FK を共通型
139
+ * {@link IntrospectedSchema} へ正規化して返す。取得経路は {@link IntrospectContext} で
140
+ * 抽象化され、SQL DB は `ctx.query`、SaaS は `ctx.proxyFetch` + `ctx.params` を使う。
141
+ * `ctx.profile === true` のときは L2 プロファイル(行数・NULL 率等)も best-effort で埋める。
142
+ * coding-agent の `DataContextIndex` がデータ地図を構築する際に使う。
143
+ */
144
+ introspect;
136
145
  /**
137
146
  * Opt-out of the default "verify before save" behavior on connection
138
147
  * creation. The backend invokes `checkConnection` synchronously while
@@ -147,6 +156,14 @@ var ConnectorPlugin = class _ConnectorPlugin {
147
156
  * the default verify-on-create behavior without opt-in.
148
157
  */
149
158
  skipConnectionCheckOnCreate;
159
+ /**
160
+ * 決定論的な「立ち上げ survey」レシピ(ルールベース prewarm 基盤)。実装した connector は、LLM を使わずに
161
+ * read-only で自分を survey する probe 列(テーブル/列メタデータ → 小サンプル)を宣言する。coding-agent の
162
+ * recon driver がこれを読み、connector ツールの `execute` を直接呼んで結果を seed にする。未実装の connector は
163
+ * driver 側で safely skip される(その connection は listConnections のみ seed)。標準 `information_schema` を
164
+ * 持つ SQL connector は `makeStandardSqlSurveyProbes` を使える。**probe は必ず read-only**。
165
+ */
166
+ surveyProbes;
150
167
  constructor(config) {
151
168
  this.slug = config.slug;
152
169
  this.authType = config.authType;
@@ -164,7 +181,9 @@ var ConnectorPlugin = class _ConnectorPlugin {
164
181
  this.query = config.query;
165
182
  this.checkConnection = config.checkConnection;
166
183
  this.setup = config.setup;
184
+ this.introspect = config.introspect;
167
185
  this.skipConnectionCheckOnCreate = config.skipConnectionCheckOnCreate;
186
+ this.surveyProbes = config.surveyProbes;
168
187
  }
169
188
  get connectorKey() {
170
189
  return _ConnectorPlugin.deriveKey(this.slug, this.authType);
@@ -202,25 +221,25 @@ var ConnectorPlugin = class _ConnectorPlugin {
202
221
  if (authType) return `${slug}-${authType}`;
203
222
  const LEGACY_NULL_AUTH_TYPE_MAP = {
204
223
  // user-password
205
- "postgresql": "user-password",
206
- "mysql": "user-password",
207
- "clickhouse": "user-password",
208
- "kintone": "user-password",
224
+ postgresql: "user-password",
225
+ mysql: "user-password",
226
+ clickhouse: "user-password",
227
+ kintone: "user-password",
209
228
  "squadbase-db": "user-password",
210
229
  // service-account
211
- "snowflake": "service-account",
212
- "bigquery": "service-account",
230
+ snowflake: "service-account",
231
+ bigquery: "service-account",
213
232
  "google-analytics": "service-account",
214
233
  "google-calendar": "service-account",
215
234
  "aws-athena": "service-account",
216
- "redshift": "service-account",
235
+ redshift: "service-account",
217
236
  // api-key
218
- "databricks": "api-key",
219
- "dbt": "api-key",
220
- "airtable": "api-key",
221
- "openai": "api-key",
222
- "gemini": "api-key",
223
- "anthropic": "api-key",
237
+ databricks: "api-key",
238
+ dbt: "api-key",
239
+ airtable: "api-key",
240
+ openai: "api-key",
241
+ gemini: "api-key",
242
+ anthropic: "api-key",
224
243
  "wix-store": "api-key"
225
244
  };
226
245
  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
@@ -244,6 +249,15 @@ var ConnectorPlugin = class _ConnectorPlugin {
244
249
  * `runSetupFlow` from `setup-flow.ts`.
245
250
  */
246
251
  setup;
252
+ /**
253
+ * 統一 introspection。SQL DB の `information_schema` / `SHOW` / `DESCRIBE` や SaaS の
254
+ * メタデータ API といった取得経路の差を吸収し、tables / columns / PK / FK を共通型
255
+ * {@link IntrospectedSchema} へ正規化して返す。取得経路は {@link IntrospectContext} で
256
+ * 抽象化され、SQL DB は `ctx.query`、SaaS は `ctx.proxyFetch` + `ctx.params` を使う。
257
+ * `ctx.profile === true` のときは L2 プロファイル(行数・NULL 率等)も best-effort で埋める。
258
+ * coding-agent の `DataContextIndex` がデータ地図を構築する際に使う。
259
+ */
260
+ introspect;
247
261
  /**
248
262
  * Opt-out of the default "verify before save" behavior on connection
249
263
  * creation. The backend invokes `checkConnection` synchronously while
@@ -258,6 +272,14 @@ var ConnectorPlugin = class _ConnectorPlugin {
258
272
  * the default verify-on-create behavior without opt-in.
259
273
  */
260
274
  skipConnectionCheckOnCreate;
275
+ /**
276
+ * 決定論的な「立ち上げ survey」レシピ(ルールベース prewarm 基盤)。実装した connector は、LLM を使わずに
277
+ * read-only で自分を survey する probe 列(テーブル/列メタデータ → 小サンプル)を宣言する。coding-agent の
278
+ * recon driver がこれを読み、connector ツールの `execute` を直接呼んで結果を seed にする。未実装の connector は
279
+ * driver 側で safely skip される(その connection は listConnections のみ seed)。標準 `information_schema` を
280
+ * 持つ SQL connector は `makeStandardSqlSurveyProbes` を使える。**probe は必ず read-only**。
281
+ */
282
+ surveyProbes;
261
283
  constructor(config) {
262
284
  this.slug = config.slug;
263
285
  this.authType = config.authType;
@@ -275,7 +297,9 @@ var ConnectorPlugin = class _ConnectorPlugin {
275
297
  this.query = config.query;
276
298
  this.checkConnection = config.checkConnection;
277
299
  this.setup = config.setup;
300
+ this.introspect = config.introspect;
278
301
  this.skipConnectionCheckOnCreate = config.skipConnectionCheckOnCreate;
302
+ this.surveyProbes = config.surveyProbes;
279
303
  }
280
304
  get connectorKey() {
281
305
  return _ConnectorPlugin.deriveKey(this.slug, this.authType);
@@ -313,25 +337,25 @@ var ConnectorPlugin = class _ConnectorPlugin {
313
337
  if (authType) return `${slug}-${authType}`;
314
338
  const LEGACY_NULL_AUTH_TYPE_MAP = {
315
339
  // user-password
316
- "postgresql": "user-password",
317
- "mysql": "user-password",
318
- "clickhouse": "user-password",
319
- "kintone": "user-password",
340
+ postgresql: "user-password",
341
+ mysql: "user-password",
342
+ clickhouse: "user-password",
343
+ kintone: "user-password",
320
344
  "squadbase-db": "user-password",
321
345
  // service-account
322
- "snowflake": "service-account",
323
- "bigquery": "service-account",
346
+ snowflake: "service-account",
347
+ bigquery: "service-account",
324
348
  "google-analytics": "service-account",
325
349
  "google-calendar": "service-account",
326
350
  "aws-athena": "service-account",
327
- "redshift": "service-account",
351
+ redshift: "service-account",
328
352
  // api-key
329
- "databricks": "api-key",
330
- "dbt": "api-key",
331
- "airtable": "api-key",
332
- "openai": "api-key",
333
- "gemini": "api-key",
334
- "anthropic": "api-key",
353
+ databricks: "api-key",
354
+ dbt: "api-key",
355
+ airtable: "api-key",
356
+ openai: "api-key",
357
+ gemini: "api-key",
358
+ anthropic: "api-key",
335
359
  "wix-store": "api-key"
336
360
  };
337
361
  const fallbackAuthType = LEGACY_NULL_AUTH_TYPE_MAP[slug];
@@ -0,0 +1,5 @@
1
+ import * as _squadbase_connectors_sdk from '@squadbase/connectors/sdk';
2
+
3
+ declare const connection: (connectionId: string) => _squadbase_connectors_sdk.HackerNewsConnectorSdk;
4
+
5
+ export { connection };