@ekanos/sdk 0.2.0 → 0.4.0

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 (68) hide show
  1. package/README.md +113 -33
  2. package/api-report.md +15 -4
  3. package/dist/components/base-activation-dialog.d.ts +15 -5
  4. package/dist/components/base-activation-dialog.js +31 -5
  5. package/dist/components/base-activation-dialog.js.map +1 -1
  6. package/dist/components/base-activation-form.d.ts +20 -5
  7. package/dist/components/base-activation-form.js +12 -5
  8. package/dist/components/base-activation-form.js.map +1 -1
  9. package/dist/components/base-marketplace-tile.js +12 -10
  10. package/dist/components/base-marketplace-tile.js.map +1 -1
  11. package/dist/components/index.d.ts +1 -1
  12. package/dist/components/index.js.map +1 -1
  13. package/dist/components/oauth-activation-form.d.ts +23 -16
  14. package/dist/components/oauth-activation-form.js +34 -20
  15. package/dist/components/oauth-activation-form.js.map +1 -1
  16. package/dist/components/widgets/use-relative-time.d.ts +7 -0
  17. package/dist/components/widgets/use-relative-time.js +55 -0
  18. package/dist/components/widgets/use-relative-time.js.map +1 -0
  19. package/dist/components/widgets/widget-ask-bar.js.map +1 -1
  20. package/dist/components/widgets/widget-context.d.ts +21 -0
  21. package/dist/components/widgets/widget-context.js.map +1 -1
  22. package/dist/components/widgets/widget-preview-provider.d.ts +1 -1
  23. package/dist/components/widgets/widget-preview-provider.js +1 -1
  24. package/dist/components/widgets/widget-preview-provider.js.map +1 -1
  25. package/dist/components/widgets/widget-state-components.d.ts +4 -1
  26. package/dist/components/widgets/widget-state-components.js +6 -4
  27. package/dist/components/widgets/widget-state-components.js.map +1 -1
  28. package/dist/components/widgets/widget.d.ts +47 -2
  29. package/dist/components/widgets/widget.js +111 -23
  30. package/dist/components/widgets/widget.js.map +1 -1
  31. package/dist/context/egress.js.map +1 -1
  32. package/dist/context/storage-validation.d.ts +24 -4
  33. package/dist/context/storage-validation.js +5 -2
  34. package/dist/context/storage-validation.js.map +1 -1
  35. package/dist/errors/public-action-error.d.ts +31 -0
  36. package/dist/errors/public-action-error.js +35 -0
  37. package/dist/errors/public-action-error.js.map +1 -0
  38. package/dist/hooks/ask-assistant-context.js.map +1 -1
  39. package/dist/hooks/fetch-integration-storage.js.map +1 -1
  40. package/dist/hooks/index.d.ts +2 -0
  41. package/dist/hooks/index.js +6 -0
  42. package/dist/hooks/index.js.map +1 -1
  43. package/dist/hooks/partner-oauth.js +3 -0
  44. package/dist/hooks/partner-oauth.js.map +1 -1
  45. package/dist/hooks/use-integration-action.d.ts +105 -0
  46. package/dist/hooks/use-integration-action.js +134 -0
  47. package/dist/hooks/use-integration-action.js.map +1 -0
  48. package/dist/hooks/use-oauth-connection-status.d.ts +78 -78
  49. package/dist/hooks/use-oauth-connection-status.js +17 -10
  50. package/dist/hooks/use-oauth-connection-status.js.map +1 -1
  51. package/dist/hooks/widget-event-context.js.map +1 -1
  52. package/dist/integration/event-surfaces.js.map +1 -1
  53. package/dist/integration/index.d.ts +3 -2
  54. package/dist/integration/index.js +5 -1
  55. package/dist/integration/index.js.map +1 -1
  56. package/dist/testing/invoke.js +9 -5
  57. package/dist/testing/invoke.js.map +1 -1
  58. package/dist/testing/mock-context.js +8 -7
  59. package/dist/testing/mock-context.js.map +1 -1
  60. package/dist/testing/mock-fetch-provider.js.map +1 -1
  61. package/dist/types/integration.d.ts +42 -24
  62. package/dist/types/integration.js.map +1 -1
  63. package/dist/types/widget-ask-context.d.ts +9 -0
  64. package/dist/types/widget-ask-context.js.map +1 -1
  65. package/dist/types/workspace-target.d.ts +3 -2
  66. package/dist/types/workspace-target.js.map +1 -1
  67. package/eslint.preset.mjs +9 -8
  68. package/package.json +37 -41
package/eslint.preset.mjs CHANGED
@@ -100,6 +100,7 @@ const CTX_SECRETS_REMEDIATION =
100
100
  * closed separately in `no-restricted-syntax` below, so the list cannot be
101
101
  * routed around by building the specifier at runtime.
102
102
  */
103
+ /** @type {Array<{ names: string[]; importNames?: string[]; message: string }>} */
103
104
  const BANNED_MODULES = [
104
105
  {
105
106
  names: ['fs', 'node:fs', 'fs/promises', 'node:fs/promises'],
@@ -194,12 +195,12 @@ const BANNED_MODULES = [
194
195
  CTX_FETCH_REMEDIATION,
195
196
  },
196
197
  {
197
- names: ['react-i18next'],
198
- importNames: ['Trans'],
198
+ names: ['react-i18next', 'i18next'],
199
199
  message:
200
- 'Use `Trans` from `@ekanos/ui/trans` instead — it is wired to the ' +
201
- "host's i18n instance, so your strings resolve against the same " +
202
- 'namespaces and language the surrounding page already loaded.',
200
+ "Use `Trans` from `@ekanos/ui/trans` instead — it reads the host's " +
201
+ 'next-intl messages, so your strings resolve against the same ' +
202
+ 'namespaces and language the surrounding page already loaded. The ' +
203
+ 'host has no i18next instance.',
203
204
  },
204
205
  ];
205
206
 
@@ -229,7 +230,7 @@ const GLOBAL_ESCAPE_OTHER_MEMBERS =
229
230
  const KIT_PATTERN = {
230
231
  group: ['@kit/*', '@kit/*/**'],
231
232
  message:
232
- '`@kit/*` packages are workspace-internal to the Fusion monorepo and do ' +
233
+ '`@kit/*` packages are workspace-internal to the Ekanos monorepo and do ' +
233
234
  'not exist on any registry, so this import cannot resolve for anyone ' +
234
235
  'outside it — including in the clean-room build your submission is gated ' +
235
236
  'on. Import UI primitives from `@ekanos/ui/*` (badge, button, card, form, ' +
@@ -394,8 +395,8 @@ export const capabilityRules = {
394
395
  * The preset. Spread it AFTER any base config: it deliberately replaces a
395
396
  * base `no-restricted-imports` / `no-restricted-globals` /
396
397
  * `no-restricted-syntax` setting rather than merging with it (flat config does
397
- * not merge rule options), and it re-states the one entry the Fusion base
398
- * config carries — `react-i18next`'s `Trans` — in its partner-correct form.
398
+ * not merge rule options), and it re-states the one entry the Ekanos base
399
+ * config carries — the i18next ban — in its partner-correct form.
399
400
  */
400
401
  export default [
401
402
  {
package/package.json CHANGED
@@ -1,15 +1,11 @@
1
1
  {
2
2
  "name": "@ekanos/sdk",
3
- "version": "0.2.0",
4
- "type": "module",
3
+ "version": "0.4.0",
5
4
  "description": "The official SDK for building Ekanos integrations.",
6
- "license": "MIT",
7
5
  "bugs": {
8
6
  "email": "npm@govastly.com"
9
7
  },
10
- "sideEffects": [
11
- "**/mcp/**"
12
- ],
8
+ "license": "MIT",
13
9
  "files": [
14
10
  "dist",
15
11
  "!dist/mcp",
@@ -18,6 +14,26 @@
18
14
  "LICENSE",
19
15
  "eslint.preset.mjs"
20
16
  ],
17
+ "type": "module",
18
+ "sideEffects": [
19
+ "**/mcp/**"
20
+ ],
21
+ "typesVersions": {
22
+ "*": {
23
+ "context": [
24
+ "dist/context/index.d.ts"
25
+ ],
26
+ "testing": [
27
+ "dist/testing/index.d.ts"
28
+ ],
29
+ "integration": [
30
+ "dist/integration/index.d.ts"
31
+ ],
32
+ "*": [
33
+ "dist/*"
34
+ ]
35
+ }
36
+ },
21
37
  "exports": {
22
38
  ".": {
23
39
  "types": "./dist/index.d.ts",
@@ -49,57 +65,37 @@
49
65
  "access": "public"
50
66
  },
51
67
  "dependencies": {
52
- "@ekanos/integration-schema": "0.2.0",
53
- "@ekanos/ui": "0.2.0",
68
+ "@ekanos/integration-schema": "0.4.0",
69
+ "@ekanos/ui": "0.4.0",
54
70
  "@supabase/supabase-js": "2.87.1",
55
71
  "server-only": "^0.0.1"
56
72
  },
57
- "peerDependencies": {
58
- "@hookform/resolvers": "^5.2.2",
59
- "@tanstack/react-query": "^5.101.4",
60
- "next": "^16.0.0",
61
- "react": "^19.2.8",
62
- "react-hook-form": "^7.68.0",
63
- "zod": "^3.25.76"
64
- },
65
73
  "devDependencies": {
66
74
  "@hookform/resolvers": "^5.9.1",
67
- "@kit/eslint-config": "0.2.0",
68
- "@kit/prettier-config": "0.1.0",
69
75
  "@kit/tsconfig": "0.1.0",
70
- "@tanstack/react-query": "5.102.8",
76
+ "@tanstack/react-query": "5.103.2",
71
77
  "@types/react": "19.2.18",
72
78
  "@types/react-dom": "19.2.5",
73
- "next": "16.3.3",
79
+ "eslint": "^10.11.0",
80
+ "next": "16.3.6",
74
81
  "react": "19.2.8",
75
82
  "react-dom": "19.2.8",
76
- "react-hook-form": "^7.87.0",
77
- "typescript": "^5.9.3",
83
+ "react-hook-form": "^7.88.0",
84
+ "typescript": "^7.0.2",
78
85
  "vitest": "4.1.10",
79
- "zod": "3.25.76"
86
+ "zod": "4.6.5"
80
87
  },
81
- "prettier": "@kit/prettier-config",
82
- "typesVersions": {
83
- "*": {
84
- "context": [
85
- "dist/context/index.d.ts"
86
- ],
87
- "testing": [
88
- "dist/testing/index.d.ts"
89
- ],
90
- "integration": [
91
- "dist/integration/index.d.ts"
92
- ],
93
- "*": [
94
- "dist/*"
95
- ]
96
- }
88
+ "peerDependencies": {
89
+ "@hookform/resolvers": "^5.2.2",
90
+ "@tanstack/react-query": "^5.101.4",
91
+ "next": "^16.0.0",
92
+ "react": "^19.2.8",
93
+ "react-hook-form": "^7.68.0",
94
+ "zod": "^3.25.76 || ^4.0.0"
97
95
  },
98
96
  "scripts": {
99
97
  "build": "rm -rf dist && tsc -p tsconfig.build.json && node scripts/rewrite-esm-specifiers.mjs",
100
98
  "clean": "git clean -xdf .turbo node_modules dist",
101
- "format": "prettier --check \"**/*.{ts,tsx}\"",
102
- "lint": "eslint .",
103
99
  "typecheck": "tsc --noEmit",
104
100
  "test": "vitest run --config vitest.config.ts",
105
101
  "api-report": "node scripts/api-report.mjs",