@neurosquad/card-sdk 1.0.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 (56) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +431 -0
  3. package/dist/card-sdk.js +5266 -0
  4. package/dist/cli.js +2838 -0
  5. package/dist/react.js +257 -0
  6. package/dist/testing.js +1150 -0
  7. package/dist/types/client/base64.d.ts +7 -0
  8. package/dist/types/client/card.d.ts +653 -0
  9. package/dist/types/client/channel.d.ts +49 -0
  10. package/dist/types/client/coalesce.d.ts +14 -0
  11. package/dist/types/client/connect.d.ts +39 -0
  12. package/dist/types/client/errors.d.ts +46 -0
  13. package/dist/types/client/helpers.d.ts +25 -0
  14. package/dist/types/client/net.d.ts +111 -0
  15. package/dist/types/client/theme.d.ts +31 -0
  16. package/dist/types/client/toolResult.d.ts +16 -0
  17. package/dist/types/contract/api.d.ts +812 -0
  18. package/dist/types/contract/index.d.ts +11 -0
  19. package/dist/types/contract/jsonSchema.d.ts +88 -0
  20. package/dist/types/contract/localized.d.ts +10 -0
  21. package/dist/types/contract/manifest.d.ts +179 -0
  22. package/dist/types/contract/network.d.ts +48 -0
  23. package/dist/types/contract/permissions.d.ts +180 -0
  24. package/dist/types/contract/ports.d.ts +237 -0
  25. package/dist/types/contract/protocol.d.ts +74 -0
  26. package/dist/types/contract/source.d.ts +111 -0
  27. package/dist/types/contract/theme.d.ts +21 -0
  28. package/dist/types/contract/version.d.ts +126 -0
  29. package/dist/types/i18n.d.ts +50 -0
  30. package/dist/types/index.d.ts +28 -0
  31. package/dist/types/react/index.d.ts +132 -0
  32. package/dist/types/testing/index.d.ts +7 -0
  33. package/dist/types/testing/mockHost.d.ts +315 -0
  34. package/dist/types/version.d.ts +2 -0
  35. package/dist/ui.css +581 -0
  36. package/package.json +77 -0
  37. package/schema/neurosquad-card.v1.json +434 -0
  38. package/templates/react/README.md +34 -0
  39. package/templates/react/_gitignore +10 -0
  40. package/templates/react/icon.png +0 -0
  41. package/templates/react/index.html +12 -0
  42. package/templates/react/neurosquad-card.json +94 -0
  43. package/templates/react/package.json +25 -0
  44. package/templates/react/src/App.tsx +131 -0
  45. package/templates/react/src/i18n.ts +61 -0
  46. package/templates/react/src/main.tsx +77 -0
  47. package/templates/react/src/styles.css +42 -0
  48. package/templates/react/tsconfig.json +18 -0
  49. package/templates/react/vite.config.ts +19 -0
  50. package/templates/vanilla/README.md +37 -0
  51. package/templates/vanilla/_gitignore +6 -0
  52. package/templates/vanilla/icon.png +0 -0
  53. package/templates/vanilla/index.html +41 -0
  54. package/templates/vanilla/main.js +256 -0
  55. package/templates/vanilla/neurosquad-card.json +94 -0
  56. package/templates/vanilla/style.css +41 -0
@@ -0,0 +1,132 @@
1
+ /**
2
+ * `@neurosquad/card-sdk/react` — React bindings: a provider that connects
3
+ * the card, and hooks over its live state.
4
+ *
5
+ * @example
6
+ * import { createRoot } from 'react-dom/client'
7
+ * import { CardProvider, useCardContext, useStorage } from '@neurosquad/card-sdk/react'
8
+ *
9
+ * function App() {
10
+ * const { instance } = useCardContext()
11
+ * const [count, setCount] = useStorage('count', 0)
12
+ * return <button onClick={() => setCount(count + 1)}>{instance.displayName}: {count}</button>
13
+ * }
14
+ *
15
+ * createRoot(document.getElementById('root')!).render(
16
+ * <CardProvider fallback={<p>Connecting…</p>}><App /></CardProvider>
17
+ * )
18
+ *
19
+ * @packageDocumentation
20
+ */
21
+ import { type ReactNode } from 'react';
22
+ import { type AgentInfo, type AgentStatus, type Card, type CardEvents, type CardVisibility, type Catalog, type ConnectOptions, type HostContext, type I18nSnapshot, type JsonValue, type PeerInfo, type PortRequestHandler, type SettingValue, type StorageScope, type ThemeSnapshot, type ToolHandler, type Widen, type Translator } from '../index.js';
23
+ /** Props of {@link CardProvider}. */
24
+ export interface CardProviderProps {
25
+ /** A card you connected yourself (or from `createMockHost().connect()`). Without it the provider calls `connect()`. */
26
+ card?: Card;
27
+ /** Options for `connect()` when the provider connects. */
28
+ connectOptions?: ConnectOptions;
29
+ /** Shown while connecting. */
30
+ fallback?: ReactNode;
31
+ /** Shown when connecting fails. Default: the error message. */
32
+ errorFallback?: (error: Error) => ReactNode;
33
+ children?: ReactNode;
34
+ }
35
+ /**
36
+ * Connects the card (or uses the one you pass) and makes it available to
37
+ * the hooks below. Renders `fallback` until connected.
38
+ */
39
+ export declare function CardProvider({ card, connectOptions, fallback, errorFallback, children }: CardProviderProps): ReactNode;
40
+ /** The connected {@link Card}. Must be used under {@link CardProvider}. */
41
+ export declare function useCard(): Card;
42
+ /**
43
+ * The live HostContext (visibility, size, theme, language, settings,
44
+ * permissions, peers…). Re-renders when any of it changes.
45
+ */
46
+ export declare function useCardContext(): HostContext;
47
+ /**
48
+ * The card's settings values and a setter for non-secret ones.
49
+ *
50
+ * @example
51
+ * const [settings, setSettings] = useSettings()
52
+ * <Switch checked={settings.values.compact === true} onChange={(v) => setSettings({ compact: v })} />
53
+ */
54
+ export declare function useSettings(): [
55
+ HostContext['settings'],
56
+ (values: Record<string, SettingValue>) => Promise<void>
57
+ ];
58
+ /** Result of {@link useStorage} beyond value and setter. */
59
+ export interface StorageState {
60
+ /** True until the first read finished. */
61
+ loading: boolean;
62
+ /** The last read or write error. */
63
+ error: Error | null;
64
+ }
65
+ /**
66
+ * A persisted value in the card's storage, like `useState`. The setter
67
+ * updates at once and writes in the background. Package-scope values follow
68
+ * writes from other instances.
69
+ *
70
+ * @param key Storage key.
71
+ * @param initial Value until (and unless) one is stored.
72
+ * @param options `scope`: `'instance'` (default) or `'package'`.
73
+ */
74
+ export declare function useStorage<I extends JsonValue>(key: string, initial: I, options?: {
75
+ scope?: StorageScope;
76
+ }): [Widen<I>, (value: Widen<I> | ((previous: Widen<I>) => Widen<I>)) => void, StorageState];
77
+ /**
78
+ * The agents and shells of the workspace (`agents.read`), kept current from
79
+ * `agents.changed` and `agents.status`.
80
+ */
81
+ export declare function useAgents(): {
82
+ agents: AgentInfo[];
83
+ loading: boolean;
84
+ error: Error | null;
85
+ refresh: () => void;
86
+ };
87
+ /** One agent's live status, or `undefined` while unknown. */
88
+ export declare function useAgentStatus(agentId: string | null | undefined): AgentStatus | undefined;
89
+ /**
90
+ * The last value that arrived on an input port (or any input when omitted),
91
+ * with who sent it.
92
+ */
93
+ export declare function usePort<T = JsonValue>(input?: string): {
94
+ data: T | undefined;
95
+ message: CardEvents['ports.message'] | undefined;
96
+ };
97
+ /** A stable function that emits on one output port; resolves with the number of peers reached. */
98
+ export declare function useEmit<T = JsonValue>(output: string): (data: T) => Promise<number>;
99
+ /** Arrow-connected cards and their ports, live. */
100
+ export declare function usePeers(): PeerInfo[];
101
+ /** The app theme snapshot, live. (The `--ns-*` CSS variables are already applied for you.) */
102
+ export declare function useTheme(): ThemeSnapshot;
103
+ /** The app language (`en`, `ru`, `zh`) and locale, live. */
104
+ export declare function useLanguage(): I18nSnapshot;
105
+ /** `visible`, `offscreen`, `overview` or `hidden`, live. */
106
+ export declare function useVisibility(): CardVisibility;
107
+ /** Whether the card is expanded to fill the canvas. */
108
+ export declare function useExpanded(): boolean;
109
+ /**
110
+ * True when nobody can see the card's body (offscreen, zoomed out to the
111
+ * overview, or hidden). Pause animations and polling while it is.
112
+ */
113
+ export declare function usePaused(): boolean;
114
+ /**
115
+ * Implements a manifest tool while the component is mounted. The latest
116
+ * handler is always used — no need to memoize it.
117
+ */
118
+ export declare function useTool<A = JsonValue>(name: string, handler: ToolHandler<A>): void;
119
+ /** Answers requests to a `mode: "request"` input while mounted. */
120
+ export declare function usePortRequest<T = JsonValue>(input: string, handler: PortRequestHandler<T>): void;
121
+ /**
122
+ * Subscribes to any host event while mounted (the latest handler is used).
123
+ *
124
+ * @example
125
+ * useCardEvent('agents.turn', (turn) => turn.phase === 'end' && refresh())
126
+ */
127
+ export declare function useCardEvent<E extends keyof CardEvents>(event: E, handler: (data: CardEvents[E]) => void): void;
128
+ /**
129
+ * A translator for your own strings that follows the app language.
130
+ * Create the catalog outside the component (or memoize it).
131
+ */
132
+ export declare function useTranslator(catalog: Catalog): Translator;
@@ -0,0 +1,7 @@
1
+ /**
2
+ * `@neurosquad/card-sdk/testing` — an in-memory NeuroSquad host for unit
3
+ * tests and for previewing a card outside the app.
4
+ *
5
+ * @packageDocumentation
6
+ */
7
+ export { createMockHost, MockHost, type MockFetchRequest, type MockFetchResponse, type MockHostOptions, type MockPeer } from './mockHost.js';
@@ -0,0 +1,315 @@
1
+ import { type AgentInfo, type CardEvents, type CardEventName, type CardLanguage, type CardManifest, type CardMethodName, type CardSize, type CardVisibility, type EventTopic, type HostContext, type JsonValue, type MethodParams, type MethodResult, type NormalizedManifest, type PeerInfo, type PermissionId, type PortInfo, type SettingValue, type ThemeSnapshot, type ToolResultPayload, type UsageSummary, type Card, type ConnectOptions } from '../index.js';
2
+ /** A peer card in the mock: its description plus optional behaviour. */
3
+ export interface MockPeer extends PeerInfo {
4
+ /** Retained output values (`ports.read`). */
5
+ retained?: Record<string, JsonValue>;
6
+ /** Answers `ports.request` to this peer. */
7
+ respond?: (input: string, data: JsonValue) => JsonValue | Promise<JsonValue>;
8
+ }
9
+ /** What a mock `net.fetch` handler receives. */
10
+ export interface MockFetchRequest {
11
+ url: string;
12
+ method: string;
13
+ headers: Record<string, string>;
14
+ /** Decoded body (base64 bodies arrive as bytes). */
15
+ body?: string | Uint8Array;
16
+ }
17
+ /** What a mock `net.fetch` handler returns. */
18
+ export interface MockFetchResponse {
19
+ status?: number;
20
+ statusText?: string;
21
+ headers?: Record<string, string>;
22
+ /** A string, bytes, or a JSON value (serialized). */
23
+ body?: string | Uint8Array | JsonValue;
24
+ /** For `responseType: 'stream'`: the chunks to send, in order. */
25
+ stream?: (string | Uint8Array)[];
26
+ /** Fail the request with NETWORK_ERROR. */
27
+ error?: string;
28
+ }
29
+ /** Options of {@link createMockHost}. */
30
+ export interface MockHostOptions {
31
+ /** The card's manifest (validated like the app does). Default: a minimal manifest named `mock-card`. */
32
+ manifest?: CardManifest;
33
+ /**
34
+ * Granted permissions. Default: every *required* permission of the manifest
35
+ * (as after install consent); `'all'` also grants optional ones.
36
+ */
37
+ grant?: 'all' | PermissionId[];
38
+ /** Overrides of the HostContext sent on `host.ready`. */
39
+ context?: Partial<Omit<HostContext, 'instance'>> & {
40
+ instance?: Partial<HostContext['instance']>;
41
+ };
42
+ /** Agents and shells in the workspace. */
43
+ agents?: AgentInfo[];
44
+ /** What `agents.readScreen` returns per agent id. */
45
+ screens?: Record<string, string>;
46
+ /** What `agents.lastReply` returns per agent id. */
47
+ replies?: Record<string, string>;
48
+ /** Arrow-connected cards. */
49
+ peers?: MockPeer[];
50
+ /** Files of the in-memory workspace folder (relative paths). */
51
+ files?: Record<string, string | Uint8Array>;
52
+ /** Handles `net.fetch` after the host's URL/permission checks. Default: NETWORK_ERROR. */
53
+ fetch?: (request: MockFetchRequest) => MockFetchResponse | Promise<MockFetchResponse>;
54
+ /** Answers `ui.confirm`, `card.openLink` and dangerous prompts. Default: confirms. */
55
+ confirm?: (request: {
56
+ type: 'confirm' | 'open-link';
57
+ title?: string;
58
+ message?: string;
59
+ url?: string;
60
+ }) => boolean | Promise<boolean>;
61
+ /** Answers `permissions.request`. Default: grants every requested optional permission. */
62
+ requestPermissions?: (ids: PermissionId[]) => PermissionId[] | Promise<PermissionId[]>;
63
+ /** Protocol the mock host speaks (to test PROTOCOL_MISMATCH). Default: the SDK's. */
64
+ hostProtocol?: number;
65
+ /** Apply per-method throttles (`minIntervalMs`, `perMinute`). Default false — tests stay deterministic. */
66
+ enforceRateLimits?: boolean;
67
+ /** Usage summary for `usage.summary`. */
68
+ usage?: UsageSummary;
69
+ /**
70
+ * Initial setting values (as if the user had saved them in the host form).
71
+ * Same as calling `setSettings(values)` before `connect()`.
72
+ */
73
+ settings?: Record<string, SettingValue>;
74
+ /**
75
+ * Values of the manifest's `secret` settings the user has entered. The card
76
+ * never sees them; `{{secret:key}}` in `net.fetch` headers is replaced with
77
+ * them, and a declared secret missing here fails with INVALID_PARAMS like
78
+ * the app. Change later with `setSecret()`.
79
+ */
80
+ secrets?: Record<string, string>;
81
+ /** Log every request and event to the console. */
82
+ verbose?: boolean;
83
+ }
84
+ interface StoredFile {
85
+ data: Uint8Array;
86
+ mtimeMs: number;
87
+ }
88
+ /**
89
+ * An in-memory host. Create it with {@link createMockHost}, then
90
+ * `await host.connect()` to get a real {@link Card} wired to it.
91
+ *
92
+ * @example
93
+ * import { createMockHost } from '@neurosquad/card-sdk/testing'
94
+ *
95
+ * const host = createMockHost({ manifest, peers: [notePeer] })
96
+ * const card = await host.connect()
97
+ * await card.ports.emit('summary', '# Done')
98
+ * expect(host.deliveries).toEqual([{ to: 'note-1', input: 'append', data: '# Done', output: 'summary' }])
99
+ */
100
+ export declare class MockHost {
101
+ private readonly options;
102
+ /** The validated, normalized manifest. */
103
+ readonly manifest: NormalizedManifest;
104
+ /** Every request the card made, in order (after the envelope check). */
105
+ readonly calls: {
106
+ method: string;
107
+ params: unknown;
108
+ }[];
109
+ /** Every event sent to the card. */
110
+ readonly events: {
111
+ event: string;
112
+ data: unknown;
113
+ }[];
114
+ /** Storage per scope. */
115
+ readonly storage: {
116
+ instance: Map<string, JsonValue>;
117
+ package: Map<string, JsonValue>;
118
+ };
119
+ /** `ports.emit` / `ports.send` deliveries to peers. */
120
+ readonly deliveries: {
121
+ to: string;
122
+ output: string;
123
+ input: string;
124
+ data: JsonValue;
125
+ }[];
126
+ /** Retained values of the card's own outputs. */
127
+ readonly retained: Map<string, {
128
+ data: JsonValue;
129
+ at: number;
130
+ }>;
131
+ /** Prompts the card sent to agents. */
132
+ readonly prompts: {
133
+ agentId: string;
134
+ text: string;
135
+ delivered: 'sent' | 'queued' | 'inserted';
136
+ }[];
137
+ /** Terminal writes and runs. */
138
+ readonly terminal: {
139
+ agentId: string;
140
+ text: string;
141
+ kind: 'write' | 'run';
142
+ }[];
143
+ /** `host.log` lines. */
144
+ readonly logs: {
145
+ level: string;
146
+ message: string;
147
+ }[];
148
+ /** `ui.toast` messages. */
149
+ readonly toasts: {
150
+ message: string;
151
+ tone?: string;
152
+ }[];
153
+ /** Clipboard writes. */
154
+ readonly clipboard: string[];
155
+ /** Cards spawned with `card.spawn`. */
156
+ readonly spawned: {
157
+ cardId: string;
158
+ kind: string;
159
+ title?: string;
160
+ init?: JsonValue;
161
+ }[];
162
+ /** `net.abort` request ids. */
163
+ readonly aborted: string[];
164
+ /** `host.pong` sequence numbers received. */
165
+ readonly pongs: number[];
166
+ /** Topics the card is subscribed to (and agent ids for agents.output). */
167
+ readonly subscriptions: Set<EventTopic>;
168
+ outputAgents: string[];
169
+ /** Header/tile state the card set. */
170
+ readonly chrome: {
171
+ title: string | null;
172
+ status: MethodParams<'card.setStatus'> | null;
173
+ badge: MethodParams<'card.setBadge'> | null;
174
+ overview: MethodParams<'card.setOverview'> | null;
175
+ attention: MethodParams<'card.attention'> | null;
176
+ menu: MethodParams<'ui.setMenu'>['items'];
177
+ enabledTools: Record<string, boolean>;
178
+ };
179
+ /** Workspace files. */
180
+ readonly files: Map<string, StoredFile>;
181
+ private context;
182
+ private granted;
183
+ private port;
184
+ private ready;
185
+ private readonly overrides;
186
+ private readonly lastCall;
187
+ private readonly minuteCalls;
188
+ private readonly toolCalls;
189
+ private readonly portRequests;
190
+ private readonly watchers;
191
+ private seq;
192
+ private counter;
193
+ private settingsValues;
194
+ private secretsSet;
195
+ private readonly secretValues;
196
+ /** Agents whose last status was `working` (the turn rule main applies). */
197
+ private readonly lastStatus;
198
+ constructor(options?: MockHostOptions);
199
+ /** A new channel for a card; the returned port goes to `connect({ port })`. Replaces a previous one. */
200
+ createPort(): MessagePort;
201
+ /** Connects a real SDK {@link Card} to this host. */
202
+ connect(options?: Omit<ConnectOptions, 'port' | 'window'>): Promise<Card>;
203
+ /** Replaces or adds the handler of a method (runs after the host's schema/permission checks). */
204
+ handle<M extends CardMethodName>(method: M, handler: (params: MethodParams<M>, host: MockHost) => MethodResult<M> | Promise<MethodResult<M>>): this;
205
+ /** Closes the channel (the card sees UNAVAILABLE on later calls). */
206
+ close(): void;
207
+ /** Current HostContext (as it would be sent on `host.ready` now). */
208
+ get hostContext(): HostContext;
209
+ /** Currently granted permission ids (with implications). */
210
+ get grants(): Set<PermissionId>;
211
+ /** Sends any event to the card. */
212
+ emit<E extends CardEventName>(event: E, data: CardEvents[E]): void;
213
+ /** Sends `host.ping` and resolves when the card's `host.pong` arrives. */
214
+ ping(timeoutMs?: number): Promise<number>;
215
+ setVisibility(state: CardVisibility): void;
216
+ setExpanded(expanded: boolean): void;
217
+ resize(size: CardSize): void;
218
+ /** Sends `lifecycle.suspend`. */
219
+ suspend(graceMs?: number): void;
220
+ setTheme(theme: ThemeSnapshot): void;
221
+ setLanguage(language: CardLanguage): void;
222
+ /** The user changed settings in the host form (secrets: pass `true`/`false` in `secrets`). */
223
+ setSettings(values: Record<string, SettingValue>, secrets?: Record<string, boolean>): void;
224
+ /**
225
+ * The user entered (or cleared, with `null`) a secret setting in the host
226
+ * form. The card only sees `settings.secrets[key]` flip; the value is used
227
+ * for `{{secret:key}}` in `net.fetch` headers.
228
+ */
229
+ setSecret(key: string, value: string | null): void;
230
+ /** Grants or revokes permissions (the card gets `permissions.changed`). */
231
+ setGrants(ids: PermissionId[]): void;
232
+ /** Replaces the connected cards (the card gets `ports.peersChanged`). */
233
+ setPeers(peers: MockPeer[]): void;
234
+ /**
235
+ * Delivers a value to one of the card's inputs, as if a peer emitted it —
236
+ * with the app's checks: `from.cardId`, when given, must be a peer whose
237
+ * arrow points at this card (`upstream` or `both`); the value is converted
238
+ * from the sender's output type (`from.output` of that peer, or
239
+ * `from.type`) to the input's type and must fit the input's schema.
240
+ * Without `from.cardId` the first upstream peer is the sender, or an
241
+ * anonymous custom card when there is none. Throws when the app would not
242
+ * deliver the value.
243
+ */
244
+ sendPortMessage(input: string, data: JsonValue, from?: {
245
+ cardId?: string;
246
+ kind?: PeerInfo['kind'];
247
+ output?: string;
248
+ /** The sender's output type (default: the peer's output's type, else the input's type). */
249
+ type?: PortInfo['type'];
250
+ }): void;
251
+ /** Asks one of the card's `mode: "request"` inputs and resolves with its reply. */
252
+ requestPort(input: string, data: JsonValue, options?: {
253
+ from?: string;
254
+ timeoutMs?: number;
255
+ }): Promise<JsonValue>;
256
+ /**
257
+ * Calls one of the card's tools as a connected agent would, and resolves
258
+ * with the result (rejects with the card's error message).
259
+ */
260
+ callTool(tool: string, args?: JsonValue, options?: {
261
+ agent?: {
262
+ id: string;
263
+ name: string;
264
+ };
265
+ timeoutMs?: number;
266
+ }): Promise<ToolResultPayload> & {
267
+ callId: string;
268
+ };
269
+ /** Cancels a running tool call (`tools.cancel`); the promise from callTool rejects. */
270
+ cancelTool(callId: string): void;
271
+ /**
272
+ * Changes an agent's status; the card gets `agents.status` if subscribed,
273
+ * and `agents.turn` by the app's rule: `start` on entering `working`,
274
+ * `end` on leaving it for `finished` or `needs-input`.
275
+ */
276
+ setAgentStatus(agentId: string, status: AgentInfo['status']): void;
277
+ /** Output of an agent; the card gets `agents.output` if subscribed for that agent. */
278
+ agentOutput(agentId: string, text: string): void;
279
+ /** Changes a file (or creates it) and notifies matching watchers. */
280
+ touchFile(path: string, data?: string | Uint8Array): void;
281
+ /** Text of a file in the mock workspace, or undefined. */
282
+ readFile(path: string): string | undefined;
283
+ private putFile;
284
+ private agentList;
285
+ private permissionList;
286
+ private peerInfos;
287
+ private peer;
288
+ private connectedAgent;
289
+ private until;
290
+ private reply;
291
+ private receive;
292
+ private dispatch;
293
+ private throttle;
294
+ private builtin;
295
+ /** HostContext.chrome as the app would send it. */
296
+ chromeState(): NonNullable<HostContext['chrome']>;
297
+ private storageBytes;
298
+ private confirmed;
299
+ private deliver;
300
+ private fetch;
301
+ /** The app's write rules: any `.git` segment, agent config (`.claude/`, `CLAUDE.md`, `.mcp.json`…). */
302
+ private assertWritable;
303
+ private fs;
304
+ }
305
+ /**
306
+ * Creates an in-memory host for tests and standalone previews. See
307
+ * {@link MockHost} for what it records and how to drive the card.
308
+ *
309
+ * @example Standalone preview (a page opened outside the app)
310
+ * const card = window.parent === window
311
+ * ? await createMockHost({ manifest }).connect()
312
+ * : await connect()
313
+ */
314
+ export declare function createMockHost(options?: MockHostOptions): MockHost;
315
+ export {};
@@ -0,0 +1,2 @@
1
+ /** Version of `@neurosquad/card-sdk` (sent to the host in `host.ready`). Kept equal to package.json by a test. */
2
+ export declare const SDK_VERSION = "1.0.0";