@ekanos/sdk 0.1.2 → 0.1.3

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 (53) hide show
  1. package/README.md +1093 -140
  2. package/api-report.md +202 -0
  3. package/dist/components/index.d.ts +3 -2
  4. package/dist/components/index.js +3 -2
  5. package/dist/components/index.js.map +1 -1
  6. package/dist/components/widgets/widget-context.js.map +1 -1
  7. package/dist/context/index.d.ts +1 -1
  8. package/dist/context/index.js +1 -1
  9. package/dist/context/index.js.map +1 -1
  10. package/dist/context/types.d.ts +1 -1
  11. package/dist/context/types.js.map +1 -1
  12. package/dist/hooks/activation-actions-context.d.ts +4 -4
  13. package/dist/hooks/activation-actions-context.js +1 -1
  14. package/dist/hooks/activation-actions-context.js.map +1 -1
  15. package/dist/hooks/index.d.ts +2 -2
  16. package/dist/hooks/index.js +2 -2
  17. package/dist/hooks/index.js.map +1 -1
  18. package/dist/hooks/use-oauth-connection-status.d.ts +18 -72
  19. package/dist/hooks/use-oauth-connection-status.js +1 -1
  20. package/dist/hooks/use-oauth-connection-status.js.map +1 -1
  21. package/dist/index.d.ts +3 -2
  22. package/dist/index.js +3 -2
  23. package/dist/index.js.map +1 -1
  24. package/dist/integration/define-integration.d.ts +2 -3
  25. package/dist/integration/define-integration.js +2 -3
  26. package/dist/integration/define-integration.js.map +1 -1
  27. package/dist/integration/index.d.ts +2 -2
  28. package/dist/integration/index.js +2 -2
  29. package/dist/integration/index.js.map +1 -1
  30. package/dist/testing/index.d.ts +1 -1
  31. package/dist/testing/index.js +1 -1
  32. package/dist/testing/index.js.map +1 -1
  33. package/dist/types/index.d.ts +3 -4
  34. package/dist/types/index.js +3 -4
  35. package/dist/types/index.js.map +1 -1
  36. package/dist/types/integration.d.ts +2 -2
  37. package/dist/types/integration.js.map +1 -1
  38. package/dist/types/widget-ask-context.d.ts +1 -1
  39. package/dist/types/widget-ask-context.js.map +1 -1
  40. package/eslint.preset.mjs +2 -4
  41. package/package.json +14 -16
  42. package/dist/mcp/guards.d.ts +0 -40
  43. package/dist/mcp/guards.js +0 -99
  44. package/dist/mcp/guards.js.map +0 -1
  45. package/dist/mcp/index.d.ts +0 -22
  46. package/dist/mcp/index.js +0 -22
  47. package/dist/mcp/index.js.map +0 -1
  48. package/dist/mcp/ownership.d.ts +0 -74
  49. package/dist/mcp/ownership.js +0 -83
  50. package/dist/mcp/ownership.js.map +0 -1
  51. package/dist/mcp/types.d.ts +0 -145
  52. package/dist/mcp/types.js +0 -2
  53. package/dist/mcp/types.js.map +0 -1
package/api-report.md ADDED
@@ -0,0 +1,202 @@
1
+ # `@ekanos/sdk` API report
2
+
3
+ Generated — do not edit by hand.
4
+
5
+ Regenerate: `pnpm --filter @ekanos/sdk api-report`
6
+ Drift check: `pnpm --filter @ekanos/sdk api-report:check`
7
+
8
+ This is the complete surface of every entrypoint. The authoring guide
9
+ for these symbols is README.md. Entrypoints marked WORKSPACE-ONLY are
10
+ not reachable from a published install — see the note in each section.
11
+
12
+ Total exported names: **146** across 7 entrypoints.
13
+
14
+ ## `@ekanos/sdk` (32 exports)
15
+
16
+ | Export | Kind |
17
+ | --- | --- |
18
+ | `AccountProductData` | interface |
19
+ | `AccountProductDataType` | type alias |
20
+ | `ActivationFormProps` | type alias |
21
+ | `ActivationResult` | interface |
22
+ | `HealthCheckResult` | interface |
23
+ | `HealthStatus` | type alias |
24
+ | `IntegrationActor` | type alias |
25
+ | `IntegrationCapability` | interface |
26
+ | `IntegrationComponentProps` | type alias |
27
+ | `IntegrationConfig` | interface |
28
+ | `IntegrationContext` | interface |
29
+ | `IntegrationFetch` | type alias |
30
+ | `IntegrationLogger` | interface |
31
+ | `IntegrationMetadata` | interface |
32
+ | `IntegrationPermission` | interface |
33
+ | `IntegrationSecrets` | interface |
34
+ | `IntegrationStorage` | interface |
35
+ | `MarketplaceTileProps` | type alias |
36
+ | `ScopedStore` | interface |
37
+ | `StorageEntry` | interface |
38
+ | `StorageKeyDeclaration` | interface |
39
+ | `StorageKeyDeclarationInput` | type alias |
40
+ | `StorageKeySchema` | type alias |
41
+ | `StorageSchemaMap` | type alias |
42
+ | `StorageSchemas` | interface |
43
+ | `StorageScopeSchemas` | type alias |
44
+ | `StorageWriteOptions` | interface |
45
+ | `WidgetAskContext` | interface |
46
+ | `WidgetConfig` | interface |
47
+ | `WidgetSnapshot` | type alias |
48
+ | `WidgetSuggestedPrompt` | interface |
49
+ | `WorkspaceTargetDefinition` | interface |
50
+
51
+ ## `@ekanos/sdk/components` (24 exports)
52
+
53
+ | Export | Kind |
54
+ | --- | --- |
55
+ | `ActivationDialog` | function |
56
+ | `ActivationInline` | function |
57
+ | `AiPromptChip` | function |
58
+ | `AskIcon` | function |
59
+ | `BaseActivationDialog` | function |
60
+ | `BaseActivationForm` | function |
61
+ | `BaseActivationFormProps` | interface |
62
+ | `BaseMarketplaceTile` | function |
63
+ | `BaseMarketplaceTileProps` | type alias |
64
+ | `OAuthActivationForm` | function |
65
+ | `OAuthActivationFormConfig` | interface |
66
+ | `Widget` | variable |
67
+ | `WidgetActions` | interface |
68
+ | `WidgetAskBar` | function |
69
+ | `WidgetContext` | variable |
70
+ | `WidgetContextValue` | interface |
71
+ | `WidgetDataLoading` | function |
72
+ | `WidgetHealth` | interface |
73
+ | `WidgetMeta` | interface |
74
+ | `WidgetPreviewProvider` | function |
75
+ | `WidgetPreviewProviderProps` | interface |
76
+ | `WidgetRenderState` | type alias |
77
+ | `WidgetState` | interface |
78
+ | `currentReturnPath` | function |
79
+
80
+ ## `@ekanos/sdk/hooks` (28 exports)
81
+
82
+ | Export | Kind |
83
+ | --- | --- |
84
+ | `ActivateIntegrationAction` | type alias |
85
+ | `ActivateIntegrationInput` | interface |
86
+ | `AskAssistantProvider` | function |
87
+ | `ConnectionCheckAction` | type alias |
88
+ | `ConnectionCheckResult` | interface |
89
+ | `DeactivateIntegrationAction` | type alias |
90
+ | `DeactivateIntegrationInput` | interface |
91
+ | `FetchIntegrationStorageOptions` | interface |
92
+ | `IntegrationActionResult` | type alias |
93
+ | `IntegrationActivationActions` | interface |
94
+ | `IntegrationActivationProvider` | function |
95
+ | `OAuthErrorParam` | interface |
96
+ | `PublishEventInput` | interface |
97
+ | `UseOAuthConnectionStatusOptions` | interface |
98
+ | `WidgetEvent` | interface |
99
+ | `WidgetEventFilter` | interface |
100
+ | `WidgetEventProvider` | function |
101
+ | `WidgetEventSubscriber` | type alias |
102
+ | `fetchIntegrationStorage` | function |
103
+ | `integrationStorageUrl` | function |
104
+ | `useActivateIntegration` | function |
105
+ | `useAskAssistant` | function |
106
+ | `useDeactivateIntegration` | function |
107
+ | `useOAuthConnectionStatus` | function |
108
+ | `useOAuthWidgetGate` | function |
109
+ | `useRegisterAskAssistant` | function |
110
+ | `useWidgetEventBus` | function |
111
+ | `useWidgetEvents` | function |
112
+
113
+ ## `@ekanos/sdk/mcp` (13 exports) — WORKSPACE-ONLY, NOT PUBLISHED
114
+
115
+ > **Not part of the partner surface.** This entrypoint is absent from
116
+ > `publishConfig.exports` and its files are excluded from the tarball,
117
+ > so importing `@ekanos/sdk/mcp` cannot resolve from an installed
118
+ > package. `ToolContext` here carries the host request context,
119
+ > including an admin Supabase client that BYPASSES RLS — it is host
120
+ > machinery, not an authoring contract. Partner tools are declared as
121
+ > `PartnerToolModule` from `@ekanos/sdk/integration`, whose `run`
122
+ > receives only the capability `IntegrationContext`.
123
+
124
+ | Export | Kind |
125
+ | --- | --- |
126
+ | `PartnerToolRun` | type alias |
127
+ | `RenderInstruction` | type alias |
128
+ | `ToolContext` | type alias |
129
+ | `ToolModule` | type alias |
130
+ | `ToolOwnershipError` | class |
131
+ | `ToolParamsSchema` | type alias |
132
+ | `ToolRunResult` | type alias |
133
+ | `UiComponentMeta` | type alias |
134
+ | `assertResourceOwnership` | function |
135
+ | `ensureAccountMembership` | function |
136
+ | `ensureGroupMembership` | function |
137
+ | `getAccountId` | function |
138
+ | `resolveSelfOnly` | function |
139
+
140
+ ## `@ekanos/sdk/context` (11 exports)
141
+
142
+ | Export | Kind |
143
+ | --- | --- |
144
+ | `EgressDeniedError` | class |
145
+ | `IntegrationContextCarrier` | interface |
146
+ | `SecretAccessError` | class |
147
+ | `StorageValidationError` | class |
148
+ | `assertStorageKeyDeclared` | function |
149
+ | `assertStorageKeyWritable` | function |
150
+ | `isEgressAllowed` | function |
151
+ | `isStorageKeyClientReadable` | function |
152
+ | `parseStorageValue` | function |
153
+ | `requireContext` | function |
154
+ | `resolveStorageKeyDeclaration` | function |
155
+
156
+ ## `@ekanos/sdk/testing` (13 exports)
157
+
158
+ | Export | Kind |
159
+ | --- | --- |
160
+ | `DefinitionContextOptions` | type alias |
161
+ | `InvokeScheduleOptions` | interface |
162
+ | `InvokeWebhookOptions` | interface |
163
+ | `MockContextOptions` | interface |
164
+ | `MockFetchHandler` | interface |
165
+ | `MockIntegrationContext` | interface |
166
+ | `RecordedFetchCall` | interface |
167
+ | `RecordedLog` | interface |
168
+ | `ScheduleInvocationOutcome` | interface |
169
+ | `WebhookInvocationOutcome` | interface |
170
+ | `createMockContext` | function |
171
+ | `invokeSchedule` | function |
172
+ | `invokeWebhook` | function |
173
+
174
+ ## `@ekanos/sdk/integration` (25 exports)
175
+
176
+ | Export | Kind |
177
+ | --- | --- |
178
+ | `DefinitionCollisionInput` | interface |
179
+ | `FirstPartyInventory` | interface |
180
+ | `IntegrationCapabilityDeclaration` | type alias |
181
+ | `IntegrationComponentDeclarations` | interface |
182
+ | `IntegrationDefinition` | interface |
183
+ | `IntegrationDefinitionSchema` | variable |
184
+ | `IntegrationPermissionDeclaration` | type alias |
185
+ | `IntegrationProposals` | type alias |
186
+ | `OAuthProviderDeclaration` | interface |
187
+ | `OAuthTokens` | interface |
188
+ | `PartnerOAuthDeclaration` | interface |
189
+ | `PartnerScheduleDeclaration` | interface |
190
+ | `PartnerToolModule` | interface |
191
+ | `PartnerToolParameters` | type alias |
192
+ | `PartnerWebhookDeclaration` | interface |
193
+ | `PartnerWidgetDeclaration` | type alias |
194
+ | `ScheduleInvocation` | interface |
195
+ | `ScheduleResult` | interface |
196
+ | `ToolClassificationProposal` | type alias |
197
+ | `WebhookEvent` | interface |
198
+ | `WebhookResult` | interface |
199
+ | `WebhookSignatureDeclaration` | type alias |
200
+ | `defineIntegration` | function |
201
+ | `parseCronExpression` | function |
202
+ | `validateIntegrationDefinitions` | function |
@@ -9,7 +9,8 @@
9
9
  * The SDK OWNS these implementations — the pre-inversion re-exports through
10
10
  * `@kit/integrations-core/components/*` are gone; core now re-exports FROM
11
11
  * here for first-party code (one source of truth, two consumption paths —
12
- * DEVELOPER_EXPERIENCE_PLAN.md §5.1). UI primitives come from `@ekanos/ui`
12
+ * one source of truth with two consumption paths. UI primitives come from
13
+ * `@ekanos/ui`
13
14
  * (the published slice of the host design system), never `@kit/ui`.
14
15
  *
15
16
  * Server seam: nothing here imports a server module. `OAuthActivationForm`
@@ -22,7 +23,7 @@
22
23
  * config hierarchy) provides it, the SDK's `Widget.*` reads it.
23
24
  *
24
25
  * Surface discipline: additions require an entry in
25
- * docs/devex/sdk-export-map.md ("`@ekanos/sdk/components`").
26
+ * api-report.md, regenerated by `pnpm --filter @ekanos/sdk api-report`.
26
27
  */
27
28
  export { Widget } from './widgets/widget.js';
28
29
  export { WidgetContext, type WidgetActions, type WidgetContextValue, type WidgetHealth, type WidgetMeta, type WidgetRenderState, type WidgetState, } from './widgets/widget-context.js';
@@ -9,7 +9,8 @@
9
9
  * The SDK OWNS these implementations — the pre-inversion re-exports through
10
10
  * `@kit/integrations-core/components/*` are gone; core now re-exports FROM
11
11
  * here for first-party code (one source of truth, two consumption paths —
12
- * DEVELOPER_EXPERIENCE_PLAN.md §5.1). UI primitives come from `@ekanos/ui`
12
+ * one source of truth with two consumption paths. UI primitives come from
13
+ * `@ekanos/ui`
13
14
  * (the published slice of the host design system), never `@kit/ui`.
14
15
  *
15
16
  * Server seam: nothing here imports a server module. `OAuthActivationForm`
@@ -22,7 +23,7 @@
22
23
  * config hierarchy) provides it, the SDK's `Widget.*` reads it.
23
24
  *
24
25
  * Surface discipline: additions require an entry in
25
- * docs/devex/sdk-export-map.md ("`@ekanos/sdk/components`").
26
+ * api-report.md, regenerated by `pnpm --filter @ekanos/sdk api-report`.
26
27
  */
27
28
  export { Widget } from './widgets/widget.js';
28
29
  export { WidgetContext, } from './widgets/widget-context.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EACL,aAAa,GAOd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["/**\n * @ekanos/sdk/components — client-side building blocks.\n *\n * Import from client components only. `Widget` is the compound API every\n * dashboard widget renders through; the activation forms are the two\n * sanctioned activation UX bases (credential-style and OAuth-style), and\n * `BaseMarketplaceTile` is the matching base for the marketplace tile.\n *\n * The SDK OWNS these implementations — the pre-inversion re-exports through\n * `@kit/integrations-core/components/*` are gone; core now re-exports FROM\n * here for first-party code (one source of truth, two consumption paths —\n * DEVELOPER_EXPERIENCE_PLAN.md §5.1). UI primitives come from `@ekanos/ui`\n * (the published slice of the host design system), never `@kit/ui`.\n *\n * Server seam: nothing here imports a server module. `OAuthActivationForm`\n * performs activation through the host-injected actions seam\n * (`IntegrationActivationProvider`, @ekanos/sdk/hooks) — a server-action\n * REFERENCE bound by the host, not server code shipped to the browser.\n *\n * `WidgetContext` is the single context identity both sides share: the\n * host's `DashboardWidgetProvider` (host chrome — persistence callbacks,\n * config hierarchy) provides it, the SDK's `Widget.*` reads it.\n *\n * Surface discipline: additions require an entry in\n * docs/devex/sdk-export-map.md (\"`@ekanos/sdk/components`\").\n */\n\nexport { Widget } from './widgets/widget';\nexport {\n WidgetContext,\n type WidgetActions,\n type WidgetContextValue,\n type WidgetHealth,\n type WidgetMeta,\n type WidgetRenderState,\n type WidgetState,\n} from './widgets/widget-context';\nexport { WidgetPreviewProvider } from './widgets/widget-preview-provider';\nexport type { WidgetPreviewProviderProps } from './widgets/widget-preview-provider';\nexport { AiPromptChip } from './widgets/ai-prompt-chip';\nexport { AskIcon } from './widgets/ask-icon';\nexport { WidgetAskBar } from './widgets/widget-ask-bar';\nexport { WidgetDataLoading } from './widgets/widget-state-components';\n\nexport { BaseActivationForm } from './base-activation-form';\nexport type { BaseActivationFormProps } from './base-activation-form';\nexport {\n ActivationDialog,\n ActivationInline,\n BaseActivationDialog,\n} from './base-activation-dialog';\n\nexport { BaseMarketplaceTile } from './base-marketplace-tile';\nexport type { BaseMarketplaceTileProps } from './base-marketplace-tile';\n\nexport { OAuthActivationForm } from './oauth-activation-form';\nexport type { OAuthActivationFormConfig } from './oauth-activation-form';\n\nexport { currentReturnPath } from './current-return-path';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAC1C,OAAO,EACL,aAAa,GAOd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,qBAAqB,EAAE,MAAM,mCAAmC,CAAC;AAE1E,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAE5D,OAAO,EACL,gBAAgB,EAChB,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAG9D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC","sourcesContent":["/**\n * @ekanos/sdk/components — client-side building blocks.\n *\n * Import from client components only. `Widget` is the compound API every\n * dashboard widget renders through; the activation forms are the two\n * sanctioned activation UX bases (credential-style and OAuth-style), and\n * `BaseMarketplaceTile` is the matching base for the marketplace tile.\n *\n * The SDK OWNS these implementations — the pre-inversion re-exports through\n * `@kit/integrations-core/components/*` are gone; core now re-exports FROM\n * here for first-party code (one source of truth, two consumption paths —\n * one source of truth with two consumption paths. UI primitives come from\n * `@ekanos/ui`\n * (the published slice of the host design system), never `@kit/ui`.\n *\n * Server seam: nothing here imports a server module. `OAuthActivationForm`\n * performs activation through the host-injected actions seam\n * (`IntegrationActivationProvider`, @ekanos/sdk/hooks) — a server-action\n * REFERENCE bound by the host, not server code shipped to the browser.\n *\n * `WidgetContext` is the single context identity both sides share: the\n * host's `DashboardWidgetProvider` (host chrome — persistence callbacks,\n * config hierarchy) provides it, the SDK's `Widget.*` reads it.\n *\n * Surface discipline: additions require an entry in\n * api-report.md, regenerated by `pnpm --filter @ekanos/sdk api-report`.\n */\n\nexport { Widget } from './widgets/widget';\nexport {\n WidgetContext,\n type WidgetActions,\n type WidgetContextValue,\n type WidgetHealth,\n type WidgetMeta,\n type WidgetRenderState,\n type WidgetState,\n} from './widgets/widget-context';\nexport { WidgetPreviewProvider } from './widgets/widget-preview-provider';\nexport type { WidgetPreviewProviderProps } from './widgets/widget-preview-provider';\nexport { AiPromptChip } from './widgets/ai-prompt-chip';\nexport { AskIcon } from './widgets/ask-icon';\nexport { WidgetAskBar } from './widgets/widget-ask-bar';\nexport { WidgetDataLoading } from './widgets/widget-state-components';\n\nexport { BaseActivationForm } from './base-activation-form';\nexport type { BaseActivationFormProps } from './base-activation-form';\nexport {\n ActivationDialog,\n ActivationInline,\n BaseActivationDialog,\n} from './base-activation-dialog';\n\nexport { BaseMarketplaceTile } from './base-marketplace-tile';\nexport type { BaseMarketplaceTileProps } from './base-marketplace-tile';\n\nexport { OAuthActivationForm } from './oauth-activation-form';\nexport type { OAuthActivationFormConfig } from './oauth-activation-form';\n\nexport { currentReturnPath } from './current-return-path';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"widget-context.js","sourceRoot":"","sources":["../../../src/components/widgets/widget-context.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAmDtC,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAA4B,IAAI,CAAC,CAAC","sourcesContent":["'use client';\n\nimport { createContext } from 'react';\n\nimport type { WidgetAskContext } from '../../types/widget-ask-context';\n\nexport type WidgetRenderState =\n | 'active'\n | 'disabled'\n | 'loading'\n | 'error'\n | 'inactive';\n\nexport interface WidgetState {\n state: WidgetRenderState;\n collapsed: boolean;\n pinned: boolean;\n pendingCollapse: boolean;\n pendingPin: boolean;\n}\n\nexport interface WidgetActions {\n toggleCollapsed: () => void;\n togglePinned: () => void;\n}\n\nexport interface WidgetHealth {\n status: 'healthy' | 'degraded' | 'unhealthy' | 'unknown';\n lastSuccessAt?: string | null;\n errorMessage?: string | null;\n}\n\nexport interface WidgetMeta {\n widgetId: string;\n title?: string;\n subtitle?: string;\n description?: string;\n maxContentHeight?: string;\n isCollapsible: boolean;\n isPinnable: boolean;\n askContext?: WidgetAskContext;\n aiFooterEnabled: boolean;\n className?: string;\n /** Integration health for this widget's product, if known. */\n health?: WidgetHealth;\n}\n\nexport interface WidgetContextValue {\n state: WidgetState;\n actions: WidgetActions;\n meta: WidgetMeta;\n}\n\nexport const WidgetContext = createContext<WidgetContextValue | null>(null);\n"]}
1
+ {"version":3,"file":"widget-context.js","sourceRoot":"","sources":["../../../src/components/widgets/widget-context.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AA+CtC,MAAM,CAAC,MAAM,aAAa,GAAG,aAAa,CAA4B,IAAI,CAAC,CAAC","sourcesContent":["'use client';\n\nimport { createContext } from 'react';\n\nimport type { WidgetAskContext } from '../../types/widget-ask-context';\n\nexport type WidgetRenderState =\n 'active' | 'disabled' | 'loading' | 'error' | 'inactive';\n\nexport interface WidgetState {\n state: WidgetRenderState;\n collapsed: boolean;\n pinned: boolean;\n pendingCollapse: boolean;\n pendingPin: boolean;\n}\n\nexport interface WidgetActions {\n toggleCollapsed: () => void;\n togglePinned: () => void;\n}\n\nexport interface WidgetHealth {\n status: 'healthy' | 'degraded' | 'unhealthy' | 'unknown';\n lastSuccessAt?: string | null;\n errorMessage?: string | null;\n}\n\nexport interface WidgetMeta {\n widgetId: string;\n title?: string;\n subtitle?: string;\n description?: string;\n maxContentHeight?: string;\n isCollapsible: boolean;\n isPinnable: boolean;\n askContext?: WidgetAskContext;\n aiFooterEnabled: boolean;\n className?: string;\n /** Integration health for this widget's product, if known. */\n health?: WidgetHealth;\n}\n\nexport interface WidgetContextValue {\n state: WidgetState;\n actions: WidgetActions;\n meta: WidgetMeta;\n}\n\nexport const WidgetContext = createContext<WidgetContextValue | null>(null);\n"]}
@@ -11,7 +11,7 @@
11
11
  * type-only from the SDK root — import them from `@ekanos/sdk`.
12
12
  *
13
13
  * Surface discipline: additions require an entry in
14
- * docs/devex/sdk-export-map.md ("Context & testing entrypoints (P1)").
14
+ * api-report.md, regenerated by `pnpm --filter @ekanos/sdk api-report`.
15
15
  */
16
16
  export { EgressDeniedError, SecretAccessError, StorageValidationError, } from './errors.js';
17
17
  export { isEgressAllowed } from './egress.js';
@@ -11,7 +11,7 @@
11
11
  * type-only from the SDK root — import them from `@ekanos/sdk`.
12
12
  *
13
13
  * Surface discipline: additions require an entry in
14
- * docs/devex/sdk-export-map.md ("Context & testing entrypoints (P1)").
14
+ * api-report.md, regenerated by `pnpm --filter @ekanos/sdk api-report`.
15
15
  */
16
16
  export { EgressDeniedError, SecretAccessError, StorageValidationError, } from './errors.js';
17
17
  export { isEgressAllowed } from './egress.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,iBAAiB,EACjB,4BAA4B,GAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,cAAc,GAEf,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * @ekanos/sdk/context — the capability context's pure shared runtime.\n *\n * Dependency-pure and isomorphic (zod only — no `@kit/*`, no `server-only`):\n * the error classes, the egress allowlist matcher, and the storage\n * validators are ONE implementation shared by the `@ekanos/sdk/testing`\n * mock and the production host wrapper, so behavior proven against the mock\n * holds in prod.\n *\n * The context TYPES (`IntegrationContext` and friends) are exported\n * type-only from the SDK root — import them from `@ekanos/sdk`.\n *\n * Surface discipline: additions require an entry in\n * docs/devex/sdk-export-map.md (\"Context & testing entrypoints (P1)\").\n */\n\nexport {\n EgressDeniedError,\n SecretAccessError,\n StorageValidationError,\n} from './errors';\nexport { isEgressAllowed } from './egress';\nexport {\n assertStorageKeyDeclared,\n assertStorageKeyWritable,\n isStorageKeyClientReadable,\n parseStorageValue,\n resolveStorageKeyDeclaration,\n} from './storage-validation';\nexport {\n requireContext,\n type IntegrationContextCarrier,\n} from './require-context';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/context/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EACL,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,GACvB,MAAM,UAAU,CAAC;AAClB,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAC3C,OAAO,EACL,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,iBAAiB,EACjB,4BAA4B,GAC7B,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,cAAc,GAEf,MAAM,mBAAmB,CAAC","sourcesContent":["/**\n * @ekanos/sdk/context — the capability context's pure shared runtime.\n *\n * Dependency-pure and isomorphic (zod only — no `@kit/*`, no `server-only`):\n * the error classes, the egress allowlist matcher, and the storage\n * validators are ONE implementation shared by the `@ekanos/sdk/testing`\n * mock and the production host wrapper, so behavior proven against the mock\n * holds in prod.\n *\n * The context TYPES (`IntegrationContext` and friends) are exported\n * type-only from the SDK root — import them from `@ekanos/sdk`.\n *\n * Surface discipline: additions require an entry in\n * api-report.md, regenerated by `pnpm --filter @ekanos/sdk api-report`.\n */\n\nexport {\n EgressDeniedError,\n SecretAccessError,\n StorageValidationError,\n} from './errors';\nexport { isEgressAllowed } from './egress';\nexport {\n assertStorageKeyDeclared,\n assertStorageKeyWritable,\n isStorageKeyClientReadable,\n parseStorageValue,\n resolveStorageKeyDeclaration,\n} from './storage-validation';\nexport {\n requireContext,\n type IntegrationContextCarrier,\n} from './require-context';\n"]}
@@ -6,6 +6,6 @@
6
6
  * every existing `@ekanos/sdk` import path (`./types`, `../context/types`,
7
7
  * the root barrel) keeps resolving unchanged.
8
8
  *
9
- * Spec: docs/devex/capability-context-proposal.md (all six §7 rulings).
9
+ * The authoring guide for everything below is this package's README.
10
10
  */
11
11
  export type { IntegrationActor, IntegrationContext, IntegrationStorage, ScopedStore, IntegrationSecrets, IntegrationFetch, IntegrationLogger, StorageEntry, StorageWriteOptions, StorageSchemas, StorageSchemaMap, StorageScopeSchemas, StorageKeyDeclaration, StorageKeyDeclarationInput, StorageKeySchema, } from '@ekanos/integration-schema';
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/context/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * The capability-context types now live in `@ekanos/integration-schema` (the\n * dependency-pure package both `@ekanos/sdk` and `@kit/integrations-core`\n * depend on) so the canonical integration-definition schema can reference\n * `IntegrationContext` without a package cycle. This file re-exports them so\n * every existing `@ekanos/sdk` import path (`./types`, `../context/types`,\n * the root barrel) keeps resolving unchanged.\n *\n * Spec: docs/devex/capability-context-proposal.md (all six §7 rulings).\n */\nexport type {\n IntegrationActor,\n IntegrationContext,\n IntegrationStorage,\n ScopedStore,\n IntegrationSecrets,\n IntegrationFetch,\n IntegrationLogger,\n StorageEntry,\n StorageWriteOptions,\n StorageSchemas,\n StorageSchemaMap,\n StorageScopeSchemas,\n StorageKeyDeclaration,\n StorageKeyDeclarationInput,\n StorageKeySchema,\n} from '@ekanos/integration-schema';\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/context/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * The capability-context types now live in `@ekanos/integration-schema` (the\n * dependency-pure package both `@ekanos/sdk` and `@kit/integrations-core`\n * depend on) so the canonical integration-definition schema can reference\n * `IntegrationContext` without a package cycle. This file re-exports them so\n * every existing `@ekanos/sdk` import path (`./types`, `../context/types`,\n * the root barrel) keeps resolving unchanged.\n *\n * The authoring guide for everything below is this package's README.\n */\nexport type {\n IntegrationActor,\n IntegrationContext,\n IntegrationStorage,\n ScopedStore,\n IntegrationSecrets,\n IntegrationFetch,\n IntegrationLogger,\n StorageEntry,\n StorageWriteOptions,\n StorageSchemas,\n StorageSchemaMap,\n StorageScopeSchemas,\n StorageKeyDeclaration,\n StorageKeyDeclarationInput,\n StorageKeySchema,\n} from '@ekanos/integration-schema';\n"]}
@@ -1,12 +1,12 @@
1
1
  import { type ReactNode } from 'react';
2
2
  /**
3
3
  * The host-injection seam for integration activation (the SDK inversion,
4
- * DEVELOPER_EXPERIENCE_PLAN.md §5.1).
4
+ * so there is one source of truth with two consumption paths).
5
5
  *
6
6
  * A published SDK cannot import the host's `'use server'` activation actions
7
7
  * — that import is what used to drag `server-only` (via `@kit/next/actions`)
8
- * into every partner client graph and broke partner tests on day one
9
- * (sdk-export-map.md, BLOCKER 2). Instead the HOST binds its real server
8
+ * into every partner client graph and broke partner tests on day one.
9
+ * Instead the HOST binds its real server
10
10
  * actions once, at the root of its client tree:
11
11
  *
12
12
  * ```tsx
@@ -66,7 +66,7 @@ export interface IntegrationActivationActions {
66
66
  }
67
67
  /**
68
68
  * Host-mounted provider that binds the real activation server actions.
69
- * Mounted once at the root of the host's client tree (apps/web root
69
+ * Mounted once at the root of the host's client tree (the app's root
70
70
  * providers; the harness mounts it with fixture actions).
71
71
  */
72
72
  export declare function IntegrationActivationProvider({ actions, children, }: {
@@ -4,7 +4,7 @@ import { createContext, use, useMemo } from 'react';
4
4
  const IntegrationActivationContext = createContext(null);
5
5
  /**
6
6
  * Host-mounted provider that binds the real activation server actions.
7
- * Mounted once at the root of the host's client tree (apps/web root
7
+ * Mounted once at the root of the host's client tree (the app's root
8
8
  * providers; the harness mounts it with fixture actions).
9
9
  */
10
10
  export function IntegrationActivationProvider({ actions, children, }) {
@@ -1 +1 @@
1
- {"version":3,"file":"activation-actions-context.js","sourceRoot":"","sources":["../../src/hooks/activation-actions-context.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAkB,aAAa,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AA8EpE,MAAM,4BAA4B,GAChC,aAAa,CAAsC,IAAI,CAAC,CAAC;AAE3D;;;;GAIG;AACH,MAAM,UAAU,6BAA6B,CAAC,EAC5C,OAAO,EACP,QAAQ,GAIT;IACC,MAAM,KAAK,GAAG,OAAO,CACnB,GAAG,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,EACtE,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,CACvC,CAAC;IAEF,OAAO,CACL,KAAC,4BAA4B,IAAC,KAAK,EAAE,KAAK,YACvC,QAAQ,GACoB,CAChC,CAAC;AACJ,CAAC;AAED,MAAM,wBAAwB,GAC5B,yEAAyE;IACzE,4DAA4D;IAC5D,oEAAoE;IACpE,eAAe,CAAC;AAElB;;;GAGG;AACH,MAAM,UAAU,+BAA+B;IAC7C,MAAM,OAAO,GAAG,GAAG,CAAC,4BAA4B,CAAC,CAAC;IAElD,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,IAAI,OAAO;YAAE,OAAO,OAAO,CAAC;QAE5B,MAAM,MAAM,GAAG,GAAG,EAAE,CAClB,OAAO,CAAC,MAAM,CACZ,IAAI,KAAK,CAAC,wBAAwB,CAAC,CACpC,CAAC;QAEJ,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAClD,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;AAChB,CAAC","sourcesContent":["'use client';\n\nimport { type ReactNode, createContext, use, useMemo } from 'react';\n\n/**\n * The host-injection seam for integration activation (the SDK inversion,\n * DEVELOPER_EXPERIENCE_PLAN.md §5.1).\n *\n * A published SDK cannot import the host's `'use server'` activation actions\n * — that import is what used to drag `server-only` (via `@kit/next/actions`)\n * into every partner client graph and broke partner tests on day one\n * (sdk-export-map.md, BLOCKER 2). Instead the HOST binds its real server\n * actions once, at the root of its client tree:\n *\n * ```tsx\n * // host chrome (e.g. @kit/integrations-core's bridge component)\n * <IntegrationActivationProvider actions={{ activate, deactivate }}>\n * {children}\n * </IntegrationActivationProvider>\n * ```\n *\n * and `useActivateIntegration()` / `useDeactivateIntegration()` keep their\n * zero-argument call signature everywhere — first-party integrations,\n * examples, and partner code are byte-identical before and after the\n * inversion. Server-action references are serializable client values in\n * React 19, so passing them through context is sanctioned.\n *\n * Outside a provider the hooks reject AT CALL TIME with an actionable\n * error (mirroring `useAskAssistant`'s no-op-outside-provider contract,\n * but loud rather than silent — a swallowed activation would look like a\n * hung form).\n */\n\n/** Input accepted by the host's activate action (BaseActivationSchema). */\nexport interface ActivateIntegrationInput {\n accountId: string;\n sourceId?: string;\n productId?: string;\n integrationSlug: string;\n activationData?: unknown;\n /**\n * The TEAM account context the user activated within — separate from\n * `accountId`, which for `scope: 'user'` integrations is the personal\n * account. Optional; the host falls back to `accountId` when absent.\n */\n teamAccountId?: string;\n /** The host schema is passthrough: extra integration fields ride along. */\n [key: string]: unknown;\n}\n\n/** Input accepted by the host's deactivate action (DeactivationSchema). */\nexport interface DeactivateIntegrationInput {\n accountId: string;\n productId?: string;\n integrationSlug: string;\n [key: string]: unknown;\n}\n\n/**\n * The host action envelope. Host actions return richer payloads; the SDK\n * only relies on the `success` / `errorMessage` pair.\n */\nexport type IntegrationActionResult = {\n success?: boolean;\n errorMessage?: string;\n} & Record<string, unknown>;\n\nexport type ActivateIntegrationAction = (\n input: ActivateIntegrationInput,\n) => Promise<IntegrationActionResult | undefined>;\n\nexport type DeactivateIntegrationAction = (\n input: DeactivateIntegrationInput,\n) => Promise<IntegrationActionResult | undefined>;\n\nexport interface IntegrationActivationActions {\n activate: ActivateIntegrationAction;\n deactivate: DeactivateIntegrationAction;\n}\n\nconst IntegrationActivationContext =\n createContext<IntegrationActivationActions | null>(null);\n\n/**\n * Host-mounted provider that binds the real activation server actions.\n * Mounted once at the root of the host's client tree (apps/web root\n * providers; the harness mounts it with fixture actions).\n */\nexport function IntegrationActivationProvider({\n actions,\n children,\n}: {\n actions: IntegrationActivationActions;\n children: ReactNode;\n}) {\n const value = useMemo(\n () => ({ activate: actions.activate, deactivate: actions.deactivate }),\n [actions.activate, actions.deactivate],\n );\n\n return (\n <IntegrationActivationContext value={value}>\n {children}\n </IntegrationActivationContext>\n );\n}\n\nconst MISSING_PROVIDER_MESSAGE =\n 'No IntegrationActivationProvider is mounted. The host application must ' +\n 'bind its activation server actions (see @ekanos/sdk/hooks ' +\n 'IntegrationActivationProvider) above any component that activates ' +\n 'integrations.';\n\n/**\n * Internal: resolve the host-bound actions, or a pair that rejects loudly.\n * Not exported from the entrypoint — hooks and the OAuth form consume it.\n */\nexport function useIntegrationActivationActions(): IntegrationActivationActions {\n const context = use(IntegrationActivationContext);\n\n return useMemo(() => {\n if (context) return context;\n\n const reject = () =>\n Promise.reject<IntegrationActionResult>(\n new Error(MISSING_PROVIDER_MESSAGE),\n );\n\n return { activate: reject, deactivate: reject };\n }, [context]);\n}\n"]}
1
+ {"version":3,"file":"activation-actions-context.js","sourceRoot":"","sources":["../../src/hooks/activation-actions-context.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAkB,aAAa,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AA8EpE,MAAM,4BAA4B,GAChC,aAAa,CAAsC,IAAI,CAAC,CAAC;AAE3D;;;;GAIG;AACH,MAAM,UAAU,6BAA6B,CAAC,EAC5C,OAAO,EACP,QAAQ,GAIT;IACC,MAAM,KAAK,GAAG,OAAO,CACnB,GAAG,EAAE,CAAC,CAAC,EAAE,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,CAAC,EACtE,CAAC,OAAO,CAAC,QAAQ,EAAE,OAAO,CAAC,UAAU,CAAC,CACvC,CAAC;IAEF,OAAO,CACL,KAAC,4BAA4B,IAAC,KAAK,EAAE,KAAK,YACvC,QAAQ,GACoB,CAChC,CAAC;AACJ,CAAC;AAED,MAAM,wBAAwB,GAC5B,yEAAyE;IACzE,4DAA4D;IAC5D,oEAAoE;IACpE,eAAe,CAAC;AAElB;;;GAGG;AACH,MAAM,UAAU,+BAA+B;IAC7C,MAAM,OAAO,GAAG,GAAG,CAAC,4BAA4B,CAAC,CAAC;IAElD,OAAO,OAAO,CAAC,GAAG,EAAE;QAClB,IAAI,OAAO;YAAE,OAAO,OAAO,CAAC;QAE5B,MAAM,MAAM,GAAG,GAAG,EAAE,CAClB,OAAO,CAAC,MAAM,CACZ,IAAI,KAAK,CAAC,wBAAwB,CAAC,CACpC,CAAC;QAEJ,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,CAAC;IAClD,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;AAChB,CAAC","sourcesContent":["'use client';\n\nimport { type ReactNode, createContext, use, useMemo } from 'react';\n\n/**\n * The host-injection seam for integration activation (the SDK inversion,\n * so there is one source of truth with two consumption paths).\n *\n * A published SDK cannot import the host's `'use server'` activation actions\n * — that import is what used to drag `server-only` (via `@kit/next/actions`)\n * into every partner client graph and broke partner tests on day one.\n * Instead the HOST binds its real server\n * actions once, at the root of its client tree:\n *\n * ```tsx\n * // host chrome (e.g. @kit/integrations-core's bridge component)\n * <IntegrationActivationProvider actions={{ activate, deactivate }}>\n * {children}\n * </IntegrationActivationProvider>\n * ```\n *\n * and `useActivateIntegration()` / `useDeactivateIntegration()` keep their\n * zero-argument call signature everywhere — first-party integrations,\n * examples, and partner code are byte-identical before and after the\n * inversion. Server-action references are serializable client values in\n * React 19, so passing them through context is sanctioned.\n *\n * Outside a provider the hooks reject AT CALL TIME with an actionable\n * error (mirroring `useAskAssistant`'s no-op-outside-provider contract,\n * but loud rather than silent — a swallowed activation would look like a\n * hung form).\n */\n\n/** Input accepted by the host's activate action (BaseActivationSchema). */\nexport interface ActivateIntegrationInput {\n accountId: string;\n sourceId?: string;\n productId?: string;\n integrationSlug: string;\n activationData?: unknown;\n /**\n * The TEAM account context the user activated within — separate from\n * `accountId`, which for `scope: 'user'` integrations is the personal\n * account. Optional; the host falls back to `accountId` when absent.\n */\n teamAccountId?: string;\n /** The host schema is passthrough: extra integration fields ride along. */\n [key: string]: unknown;\n}\n\n/** Input accepted by the host's deactivate action (DeactivationSchema). */\nexport interface DeactivateIntegrationInput {\n accountId: string;\n productId?: string;\n integrationSlug: string;\n [key: string]: unknown;\n}\n\n/**\n * The host action envelope. Host actions return richer payloads; the SDK\n * only relies on the `success` / `errorMessage` pair.\n */\nexport type IntegrationActionResult = {\n success?: boolean;\n errorMessage?: string;\n} & Record<string, unknown>;\n\nexport type ActivateIntegrationAction = (\n input: ActivateIntegrationInput,\n) => Promise<IntegrationActionResult | undefined>;\n\nexport type DeactivateIntegrationAction = (\n input: DeactivateIntegrationInput,\n) => Promise<IntegrationActionResult | undefined>;\n\nexport interface IntegrationActivationActions {\n activate: ActivateIntegrationAction;\n deactivate: DeactivateIntegrationAction;\n}\n\nconst IntegrationActivationContext =\n createContext<IntegrationActivationActions | null>(null);\n\n/**\n * Host-mounted provider that binds the real activation server actions.\n * Mounted once at the root of the host's client tree (the app's root\n * providers; the harness mounts it with fixture actions).\n */\nexport function IntegrationActivationProvider({\n actions,\n children,\n}: {\n actions: IntegrationActivationActions;\n children: ReactNode;\n}) {\n const value = useMemo(\n () => ({ activate: actions.activate, deactivate: actions.deactivate }),\n [actions.activate, actions.deactivate],\n );\n\n return (\n <IntegrationActivationContext value={value}>\n {children}\n </IntegrationActivationContext>\n );\n}\n\nconst MISSING_PROVIDER_MESSAGE =\n 'No IntegrationActivationProvider is mounted. The host application must ' +\n 'bind its activation server actions (see @ekanos/sdk/hooks ' +\n 'IntegrationActivationProvider) above any component that activates ' +\n 'integrations.';\n\n/**\n * Internal: resolve the host-bound actions, or a pair that rejects loudly.\n * Not exported from the entrypoint — hooks and the OAuth form consume it.\n */\nexport function useIntegrationActivationActions(): IntegrationActivationActions {\n const context = use(IntegrationActivationContext);\n\n return useMemo(() => {\n if (context) return context;\n\n const reject = () =>\n Promise.reject<IntegrationActionResult>(\n new Error(MISSING_PROVIDER_MESSAGE),\n );\n\n return { activate: reject, deactivate: reject };\n }, [context]);\n}\n"]}
@@ -4,7 +4,7 @@
4
4
  * Import from client components only. The SDK OWNS these implementations;
5
5
  * `@kit/integrations-core/hooks` re-exports them for first-party code, so
6
6
  * there is one source of truth with two consumption paths
7
- * (DEVELOPER_EXPERIENCE_PLAN.md §5.1).
7
+ * so there is one source of truth with two consumption paths.
8
8
  *
9
9
  * Server seam: nothing here imports a server module. The activation hooks
10
10
  * reach the host's `'use server'` actions ONLY through the
@@ -13,7 +13,7 @@
13
13
  * of `server-only` in a partner's module graph.
14
14
  *
15
15
  * Surface discipline: additions require an entry in
16
- * docs/devex/sdk-export-map.md ("`@ekanos/sdk/hooks`").
16
+ * api-report.md, regenerated by `pnpm --filter @ekanos/sdk api-report`.
17
17
  */
18
18
  export { useActivateIntegration, useDeactivateIntegration, } from './use-activate-integration.js';
19
19
  export { IntegrationActivationProvider } from './activation-actions-context.js';
@@ -4,7 +4,7 @@
4
4
  * Import from client components only. The SDK OWNS these implementations;
5
5
  * `@kit/integrations-core/hooks` re-exports them for first-party code, so
6
6
  * there is one source of truth with two consumption paths
7
- * (DEVELOPER_EXPERIENCE_PLAN.md §5.1).
7
+ * so there is one source of truth with two consumption paths.
8
8
  *
9
9
  * Server seam: nothing here imports a server module. The activation hooks
10
10
  * reach the host's `'use server'` actions ONLY through the
@@ -13,7 +13,7 @@
13
13
  * of `server-only` in a partner's module graph.
14
14
  *
15
15
  * Surface discipline: additions require an entry in
16
- * docs/devex/sdk-export-map.md ("`@ekanos/sdk/hooks`").
16
+ * api-report.md, regenerated by `pnpm --filter @ekanos/sdk api-report`.
17
17
  */
18
18
  // Activation (host-injected server actions)
19
19
  export { useActivateIntegration, useDeactivateIntegration, } from './use-activate-integration.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,4CAA4C;AAC5C,OAAO,EACL,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAU7E,kDAAkD;AAClD,mEAAmE;AACnE,qEAAqE;AACrE,OAAO,EACL,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,6BAA6B,CAAC;AAGrC,0BAA0B;AAC1B,OAAO,EACL,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,+BAA+B,CAAC;AAQvC,mBAAmB;AACnB,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAQtD,wBAAwB;AACxB,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,uBAAuB,GACxB,MAAM,yBAAyB,CAAC","sourcesContent":["/**\n * @ekanos/sdk/hooks — client-side hooks.\n *\n * Import from client components only. The SDK OWNS these implementations;\n * `@kit/integrations-core/hooks` re-exports them for first-party code, so\n * there is one source of truth with two consumption paths\n * (DEVELOPER_EXPERIENCE_PLAN.md §5.1).\n *\n * Server seam: nothing here imports a server module. The activation hooks\n * reach the host's `'use server'` actions ONLY through the\n * `IntegrationActivationProvider` injection seam\n * (activation-actions-context.tsx) — that is what keeps this entrypoint free\n * of `server-only` in a partner's module graph.\n *\n * Surface discipline: additions require an entry in\n * docs/devex/sdk-export-map.md (\"`@ekanos/sdk/hooks`\").\n */\n\n// Activation (host-injected server actions)\nexport {\n useActivateIntegration,\n useDeactivateIntegration,\n} from './use-activate-integration';\nexport { IntegrationActivationProvider } from './activation-actions-context';\nexport type {\n ActivateIntegrationAction,\n ActivateIntegrationInput,\n DeactivateIntegrationAction,\n DeactivateIntegrationInput,\n IntegrationActionResult,\n IntegrationActivationActions,\n} from './activation-actions-context';\n\n// Generic client-side storage bridge (host route:\n// GET /api/integrations/[slug]/storage). Serves only keys declared\n// `clientReadable: true`; a key that did not opt in reads as absent.\nexport {\n fetchIntegrationStorage,\n integrationStorageUrl,\n} from './fetch-integration-storage';\nexport type { FetchIntegrationStorageOptions } from './fetch-integration-storage';\n\n// OAuth connection status\nexport {\n useOAuthConnectionStatus,\n useOAuthWidgetGate,\n} from './use-oauth-connection-status';\nexport type {\n ConnectionCheckAction,\n ConnectionCheckResult,\n OAuthErrorParam,\n UseOAuthConnectionStatusOptions,\n} from './use-oauth-connection-status';\n\n// Widget Event Bus\nexport { WidgetEventProvider, useWidgetEventBus } from './widget-event-context';\nexport { useWidgetEvents } from './use-widget-events';\nexport type {\n PublishEventInput,\n WidgetEvent,\n WidgetEventFilter,\n WidgetEventSubscriber,\n} from './widget-event-types';\n\n// Widget Ask-Bar Bridge\nexport {\n AskAssistantProvider,\n useAskAssistant,\n useRegisterAskAssistant,\n} from './ask-assistant-context';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,4CAA4C;AAC5C,OAAO,EACL,sBAAsB,EACtB,wBAAwB,GACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,6BAA6B,EAAE,MAAM,8BAA8B,CAAC;AAU7E,kDAAkD;AAClD,mEAAmE;AACnE,qEAAqE;AACrE,OAAO,EACL,uBAAuB,EACvB,qBAAqB,GACtB,MAAM,6BAA6B,CAAC;AAGrC,0BAA0B;AAC1B,OAAO,EACL,wBAAwB,EACxB,kBAAkB,GACnB,MAAM,+BAA+B,CAAC;AAQvC,mBAAmB;AACnB,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAQtD,wBAAwB;AACxB,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,uBAAuB,GACxB,MAAM,yBAAyB,CAAC","sourcesContent":["/**\n * @ekanos/sdk/hooks — client-side hooks.\n *\n * Import from client components only. The SDK OWNS these implementations;\n * `@kit/integrations-core/hooks` re-exports them for first-party code, so\n * there is one source of truth with two consumption paths\n * so there is one source of truth with two consumption paths.\n *\n * Server seam: nothing here imports a server module. The activation hooks\n * reach the host's `'use server'` actions ONLY through the\n * `IntegrationActivationProvider` injection seam\n * (activation-actions-context.tsx) — that is what keeps this entrypoint free\n * of `server-only` in a partner's module graph.\n *\n * Surface discipline: additions require an entry in\n * api-report.md, regenerated by `pnpm --filter @ekanos/sdk api-report`.\n */\n\n// Activation (host-injected server actions)\nexport {\n useActivateIntegration,\n useDeactivateIntegration,\n} from './use-activate-integration';\nexport { IntegrationActivationProvider } from './activation-actions-context';\nexport type {\n ActivateIntegrationAction,\n ActivateIntegrationInput,\n DeactivateIntegrationAction,\n DeactivateIntegrationInput,\n IntegrationActionResult,\n IntegrationActivationActions,\n} from './activation-actions-context';\n\n// Generic client-side storage bridge (host route:\n// GET /api/integrations/[slug]/storage). Serves only keys declared\n// `clientReadable: true`; a key that did not opt in reads as absent.\nexport {\n fetchIntegrationStorage,\n integrationStorageUrl,\n} from './fetch-integration-storage';\nexport type { FetchIntegrationStorageOptions } from './fetch-integration-storage';\n\n// OAuth connection status\nexport {\n useOAuthConnectionStatus,\n useOAuthWidgetGate,\n} from './use-oauth-connection-status';\nexport type {\n ConnectionCheckAction,\n ConnectionCheckResult,\n OAuthErrorParam,\n UseOAuthConnectionStatusOptions,\n} from './use-oauth-connection-status';\n\n// Widget Event Bus\nexport { WidgetEventProvider, useWidgetEventBus } from './widget-event-context';\nexport { useWidgetEvents } from './use-widget-events';\nexport type {\n PublishEventInput,\n WidgetEvent,\n WidgetEventFilter,\n WidgetEventSubscriber,\n} from './widget-event-types';\n\n// Widget Ask-Bar Bridge\nexport {\n AskAssistantProvider,\n useAskAssistant,\n useRegisterAskAssistant,\n} from './ask-assistant-context';\n"]}