@jskit-ai/connectors-catalog 0.2.11 → 0.2.13

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 (85) hide show
  1. package/CHANGELOG.md +1 -0
  2. package/docs/ai-upstream-notices.md +1 -1
  3. package/docs/ai.md +9 -0
  4. package/package.json +4 -4
  5. package/patterns/aws-storage-queries/example/formats/package.json +1 -1
  6. package/src/shared/ai-definition.js +68 -0
  7. package/src/shared/ai-framework-models.json +7334 -0
  8. package/src/shared/ai-models.json +1 -7329
  9. package/src/shared/ai.js +8 -59
  10. package/src/shared/definitions.js +2 -2
  11. package/test/ai.test.js +16 -0
  12. package/test/airtable.test.js +3 -4
  13. package/test/algolia.test.js +3 -3
  14. package/test/amazon-redshift.test.js +3 -3
  15. package/test/amplitude.test.js +3 -3
  16. package/test/apify.test.js +3 -4
  17. package/test/apollo-io.test.js +3 -4
  18. package/test/asana.test.js +3 -4
  19. package/test/ashby.test.js +3 -4
  20. package/test/atlassian.test.js +3 -3
  21. package/test/attention.test.js +3 -4
  22. package/test/aws.test.js +3 -3
  23. package/test/brevo.test.js +3 -4
  24. package/test/calendly.test.js +4 -5
  25. package/test/canva.test.js +3 -3
  26. package/test/chargebee.test.js +3 -3
  27. package/test/clickhouse.test.js +3 -3
  28. package/test/confidence.test.js +3 -3
  29. package/test/databricks.test.js +3 -3
  30. package/test/dbt-semantic-layer.test.js +3 -3
  31. package/test/designMcp.test.js +3 -3
  32. package/test/elevenlabs.test.js +3 -4
  33. package/test/firebase-cloud-messaging.test.js +3 -3
  34. package/test/firecrawl.test.js +3 -4
  35. package/test/gemini-enterprise.test.js +3 -3
  36. package/test/github-api.test.js +4 -5
  37. package/test/gitlab-api.test.js +4 -5
  38. package/test/gong.test.js +3 -3
  39. package/test/google-ads.test.js +3 -3
  40. package/test/google-maps-platform.test.js +3 -3
  41. package/test/google.test.js +3 -4
  42. package/test/granola.test.js +3 -3
  43. package/test/hex.test.js +3 -3
  44. package/test/heygen.test.js +3 -4
  45. package/test/hubspot.test.js +3 -4
  46. package/test/inngest.test.js +3 -3
  47. package/test/lightspeed.test.js +3 -3
  48. package/test/linear.test.js +3 -4
  49. package/test/linkedin.test.js +3 -3
  50. package/test/mailgun.test.js +3 -4
  51. package/test/mapbox.test.js +3 -3
  52. package/test/mcp.test.js +3 -3
  53. package/test/microsoft-fabric.test.js +3 -3
  54. package/test/microsoft.test.js +3 -3
  55. package/test/n8nOAuth.test.js +3 -4
  56. package/test/notionOAuth.test.js +5 -6
  57. package/test/oura.test.js +3 -3
  58. package/test/paddlePermissions.test.js +3 -4
  59. package/test/pipedriveOAuth.test.js +3 -4
  60. package/test/posthog.test.js +3 -3
  61. package/test/prestashop.test.js +3 -3
  62. package/test/resend.test.js +3 -3
  63. package/test/salesforce.test.js +3 -3
  64. package/test/semrush.test.js +3 -3
  65. package/test/sharedCatalogModels.test.js +21 -0
  66. package/test/shopify.test.js +3 -3
  67. package/test/slack.test.js +3 -3
  68. package/test/snowflake.test.js +3 -3
  69. package/test/tally.test.js +3 -4
  70. package/test/telegram.test.js +3 -4
  71. package/test/testDirectories.test.js +16 -0
  72. package/test/tiktok.test.js +3 -3
  73. package/test/tokens.test.js +3 -3
  74. package/test/twilio.test.js +3 -3
  75. package/test/twitch.test.js +3 -3
  76. package/test/wave.test.js +3 -3
  77. package/test/wix.test.js +3 -3
  78. package/test/wiz.test.js +3 -3
  79. package/test/wordpress-com.test.js +3 -3
  80. package/test/wordpress.test.js +3 -3
  81. package/test/workday.test.js +3 -3
  82. package/test/x-twitter.test.js +3 -3
  83. package/test/xero.test.js +3 -3
  84. package/test/zoho-books.test.js +3 -3
  85. package/test/zoho-crm.test.js +3 -3
package/CHANGELOG.md CHANGED
@@ -2,6 +2,7 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ - The browser catalog (`./shared`) no longer bundles the whole AI model snapshot. The AI connector definition now reads only the 13 configurable providers (0.2 MB, in `ai-models.json`). The other 200 providers, which are framework metadata (2.0 MB), moved to `ai-framework-models.json`, which only `./shared/ai` and `./server/ai` load. Exports, the catalogue and every configurable model's choices, hints and credential scopes are unchanged. The definition no longer recognises a framework provider's model key, which its settings schema already rejected.
5
6
  - The Resend guide shows local auth's `auth.local.confirmation-sender` next to its recovery sender.
6
7
 
7
8
  ## 0.2.0 - 2026-10-29
@@ -1,6 +1,6 @@
1
1
  # AI catalogue upstream notices
2
2
 
3
- The bundled snapshot is derived from models.dev data and OpenCode’s public-access rule. Both are MIT licensed. See `src/shared/ai-models.json` for retrieval date, URLs and source hashes. No upstream code executes at runtime.
3
+ The bundled snapshot is derived from models.dev data and OpenCode’s public-access rule. Both are MIT licensed. See `src/shared/ai-models.json` for retrieval date, URLs and source hashes; the providers that are not configurable are in `src/shared/ai-framework-models.json`. No upstream code executes at runtime.
4
4
 
5
5
  ## models.dev
6
6
 
package/docs/ai.md CHANGED
@@ -39,6 +39,15 @@ The raw-source hashes and source URLs are in the bundled `ai-models.json`;
39
39
  [upstream MIT notices](ai-upstream-notices.md) accompany it. Updates require
40
40
  deliberate review and a new package release.
41
41
 
42
+ The snapshot is kept in two files. `ai-models.json` holds the extraction's
43
+ details and the 13 configurable providers. `ai-framework-models.json` holds the
44
+ other 200 providers, which are framework metadata. The AI connector definition
45
+ in `@jskit-ai/connectors-catalog/shared` needs only the configurable providers,
46
+ so a browser bundle of the catalog carries about 0.2 MB of model data instead of
47
+ the 2.2 MB snapshot. `./shared/ai` and `./server/ai` load both files and see the
48
+ whole catalogue. When the snapshot is refreshed, keep each provider in the file
49
+ that matches whether it is configurable.
50
+
42
51
  The reviewed catalogue adds the exact `deepseek/deepseek-flash` identity for
43
52
  DeepSeek V4.1 Flash. It retains `deepseek/deepseek-v4-flash` and
44
53
  `deepseek/deepseek-v4-flash-vision-exp` for saved selections: DeepSeek still
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/connectors-catalog",
3
- "version": "0.2.11",
3
+ "version": "0.2.13",
4
4
  "description": "Provider definitions and focused API operations for JSKIT connectors.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -125,14 +125,14 @@
125
125
  "@aws-sdk/client-redshift-data": "3.1128.0",
126
126
  "@aws-sdk/client-s3": "3.1128.0",
127
127
  "@aws-sdk/s3-request-presigner": "3.1128.0",
128
- "@jskit-ai/connectors-core": "0.2.11",
128
+ "@jskit-ai/connectors-core": "0.2.13",
129
129
  "@modelcontextprotocol/sdk": "1.32.1",
130
130
  "@smithy/fetch-http-handler": "5.8.0",
131
131
  "jose": "^6.1.3",
132
132
  "json-rest-schema": "^1.0.17"
133
133
  },
134
134
  "peerDependencies": {
135
- "@jskit-ai/kernel": "0.2.10"
135
+ "@jskit-ai/kernel": "0.2.12"
136
136
  },
137
137
  "jskit": {
138
138
  "kind": "runtime",
@@ -150,6 +150,6 @@
150
150
  }
151
151
  },
152
152
  "scripts": {
153
- "test": "node --test --test-concurrency=1"
153
+ "test": "jskit test"
154
154
  }
155
155
  }
@@ -2,7 +2,7 @@
2
2
  "name": "s3-native-format-example",
3
3
  "private": true,
4
4
  "type": "module",
5
- "scripts": { "test": "node --test --test-concurrency=1 verify-formats.mjs" },
5
+ "scripts": { "test": "node verify-formats.mjs" },
6
6
  "dependencies": {
7
7
  "csv-parse": "7.0.2",
8
8
  "csv-stringify": "6.8.3",
@@ -0,0 +1,68 @@
1
+ import { createSchema } from "json-rest-schema";
2
+ // The AI connector's definition, from the configurable providers alone: ai-models.json holds the extraction's details
3
+ // and the configurable (direct API-key) providers; the other providers, framework metadata, are in
4
+ // ai-framework-models.json, which only the catalogue (ai.js) loads. So the browser catalog ("./shared") carries this
5
+ // connector without the whole model snapshot.
6
+ import snapshot from "./ai-models.json" with { type: "json" };
7
+
8
+ // Message keys; render them with the app's text helper (useJskitText().text).
9
+ const aiAccessLabels = Object.freeze({
10
+ "free-no-setup": "jskit.connectors.ai.access.freeNoSetup",
11
+ "free-with-connection": "jskit.connectors.ai.access.freeWithConnection",
12
+ paid: "jskit.connectors.ai.access.paid",
13
+ unknown: "jskit.connectors.ai.access.unknown"
14
+ });
15
+ const selectedModelHints = Object.freeze({
16
+ "free-no-setup": "jskit.connectors.ai.fields.model.selectedHint.freeNoSetup",
17
+ "free-with-connection": "jskit.connectors.ai.fields.model.selectedHint.freeWithConnection",
18
+ paid: "jskit.connectors.ai.fields.model.selectedHint.paid",
19
+ unknown: "jskit.connectors.ai.fields.model.selectedHint.unknown"
20
+ });
21
+ const accessOrder = ["free-no-setup", "free-with-connection", "paid", "unknown"];
22
+ const byAccessThenKey = (a, b) => accessOrder.indexOf(a.access) - accessOrder.indexOf(b.access) || a.key.localeCompare(b.key);
23
+ // A provider record with its connection kind and each model's catalogue key.
24
+ const catalogueProvider = (provider, connection) => Object.freeze({
25
+ ...provider, connection,
26
+ models: Object.freeze(provider.models.map((model) => Object.freeze({ ...model, key: `${provider.id}/${model.id}`, providerId: provider.id })))
27
+ });
28
+ // These direct API-key routes need no coding subscription or cloud identity exchange.
29
+ const configurableProviders = Object.freeze(snapshot.providers.map((provider) => catalogueProvider(provider, "api-key")));
30
+ const catalogueDateFormat = Object.freeze({ day: "numeric", month: "long", year: "numeric", timeZone: "UTC" });
31
+ const configurableModels = new Map(configurableProviders.flatMap((provider) => provider.models.map((model) => [model.key, model])));
32
+
33
+ const activeModels = [...configurableModels.values()].filter((model) => model.status !== "deprecated").sort(byAccessThenKey);
34
+ const modelItems = Object.freeze(activeModels.map((model) => Object.freeze({
35
+ value: model.key, title: `${model.name} (${model.providerId})`, props: { subtitle: aiAccessLabels[model.access] }
36
+ })));
37
+ const aiDefinition = Object.freeze({
38
+ id: "ai", name: "AI", description: "jskit.connectors.ai.description",
39
+ accountModes: ["shared", "per-user"], authenticationMethods: ["api-key", "none"], scopes: [],
40
+ authenticationMethodsForSettings: (settings = {}) => configurableModels.get(settings.model)?.access === "free-no-setup"
41
+ ? ["none", "api-key"] : ["api-key"],
42
+ authenticationLabels: { none: "jskit.connectors.ai.authenticationLabels.none", "api-key": "jskit.connectors.ai.authenticationLabels.apiKey" },
43
+ authenticationHint: "jskit.connectors.ai.authenticationHint",
44
+ settingsSchema: createSchema({ model: { type: "string", required: true,
45
+ enum: modelItems.map((item) => item.value) } }),
46
+ settingsFields: [{ name: "model", label: "jskit.connectors.ai.fields.model.label", searchable: true, items: modelItems,
47
+ credentialScope: (key) => configurableModels.get(key)?.providerId,
48
+ // The catalogue date is display text: formatDate (useJskitText's) uses the app's active
49
+ // locale; without an app language it keeps its fixed English form.
50
+ hint: (settings = {}, { formatDate } = {}) => {
51
+ const model = configurableModels.get(settings.model);
52
+ const date = formatDate ? formatDate(snapshot.extractedAt, catalogueDateFormat)
53
+ : new Date(snapshot.extractedAt).toLocaleDateString("en-GB", catalogueDateFormat);
54
+ return model ? { key: selectedModelHints[model.access], params: { model: model.name, date } }
55
+ : { key: "jskit.connectors.ai.fields.model.hint", params: { date } };
56
+ } }],
57
+ apiKeyReferenceHint: "jskit.connectors.ai.apiKeyReferenceHint",
58
+ setup: {
59
+ url: "https://opencode.ai/docs/zen/",
60
+ steps: [
61
+ "Choose a provider and model; no model is preselected. Create a regular API key in that provider's dashboard. Z.AI's GLM-4.7-Flash uses a regular Z.AI key; its Coding Plan is a different product.",
62
+ "For a shared account, store the administrator's key in Env. For individual accounts, your application must provide private key entry, storage and disconnect controls for each authenticated user.",
63
+ "Saving selects configuration; it does not verify a provider account or install an AI library into your application. Follow the AI connection guide for the selected framework."
64
+ ]
65
+ }
66
+ });
67
+
68
+ export { aiAccessLabels, aiDefinition, byAccessThenKey, catalogueProvider, configurableProviders };