@handsforbots/storage-local 0.0.0-stage → 2.0.0-alpha.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.
package/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright © 2024 Alex Lana and Hands for Bots contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,21 @@
1
- # Temporary Holding Version
1
+ # @handsforbots/storage-local
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Persists the Hands for Bots conversation in localStorage/sessionStorage with an inactivity timeout.
4
+
5
+ Part of [Hands for Bots](https://github.com/handsforbots/handsforbots), a headless multimodal and action layer between users, GUIs and agents.
6
+
7
+ ## Install
8
+
9
+ ```bash
10
+ npm install @handsforbots/storage-local@alpha @handsforbots/core@alpha
11
+ ```
12
+
13
+ ## Documentation
14
+
15
+ - [This package](https://github.com/handsforbots/handsforbots/blob/main/docs/en-us/plugins.md#storage-local)
16
+ - [Getting started](https://github.com/handsforbots/handsforbots/blob/main/docs/en-us/getting-started.md)
17
+ - [Documentação em português](https://github.com/handsforbots/handsforbots/blob/main/docs/pt-br/README.md)
18
+
19
+ ## License
20
+
21
+ MIT
@@ -0,0 +1,77 @@
1
+ import { type Retention, type Storage } from '@handsforbots/core';
2
+ export type { Retention } from '@handsforbots/core';
3
+ /** Where the encryption key comes from. When it stops returning a key, what is stored can't be read. */
4
+ export type KeySource = {
5
+ /** The current key (renewing its lifetime). Creates one when `create` is set. Null when there is none or it's unavailable. */
6
+ get(create: boolean): Promise<CryptoKey | null>;
7
+ /** True when the key is known to be gone, without a request (lets the sweep delete leftovers). */
8
+ gone?(): boolean;
9
+ /** Lifetime after the last use, when known. 0 = until the browser closes. */
10
+ ttlMinutes?: number;
11
+ /** Drops the key for good (consent withdrawn). */
12
+ forget?(): void | Promise<void>;
13
+ };
14
+ export type LocalStorageOptions = {
15
+ /** Storage key. Default 'h4b:conversation'. */
16
+ key?: string;
17
+ /**
18
+ * Encrypt the stored conversation (AES-GCM) with a key that expires outside
19
+ * the stored data, so it becomes unreadable even if the site is never opened
20
+ * again. Default true.
21
+ */
22
+ encrypt?: boolean;
23
+ /** Where the key lives. Default `cookieKey()` (a cookie that expires after 30 minutes idle); see also `backendKey()`. */
24
+ keySource?: KeySource;
25
+ /** Default retention. Default 'key'. */
26
+ retention?: Exclude<Retention, 'server'>;
27
+ /** Retentions the end user may pick (e.g. in the widget). Empty (default) = fixed by the developer. */
28
+ userChoices?: Exclude<Retention, 'server'>[];
29
+ };
30
+ export type LocalStorage = Storage & {
31
+ readonly retention: Retention;
32
+ /** Remembers a retention for this browser. What was stored under another one is deleted: save again to keep it. Doesn't check `userChoices`. */
33
+ setRetention(retention: Retention): void;
34
+ /** Deletes data whose TTL passed or whose key is gone. Runs on load and every minute in the plugin. */
35
+ sweep(): void;
36
+ /** Deletes everything this storage keeps in the browser: the conversation under every retention, the retention preference and the key. */
37
+ forget(): Promise<void>;
38
+ };
39
+ export declare const storageLocal: (config?: LocalStorageOptions | undefined) => import("@handsforbots/core").Plugin<LocalStorageOptions | undefined>;
40
+ export declare function createLocalStorage(options?: LocalStorageOptions): LocalStorage;
41
+ export type CookieKeyOptions = {
42
+ /** Lifetime after the last load or save. Default 30. 0 = until the browser closes. */
43
+ ttlMinutes?: number;
44
+ /** Default 'h4b-key'. */
45
+ name?: string;
46
+ /** Default '/'. Narrow it to the paths that show the chat so the cookie travels less. */
47
+ path?: string;
48
+ domain?: string;
49
+ /** Default 'Strict'. */
50
+ sameSite?: 'Strict' | 'Lax';
51
+ };
52
+ /**
53
+ * The key lives in a cookie with Max-Age, renewed on use. When the browser
54
+ * drops it, what is stored can no longer be read, even if the site is never
55
+ * opened again. The cookie is readable by the page's scripts and is sent with
56
+ * requests to its path.
57
+ */
58
+ export declare function cookieKey(options?: CookieKeyOptions): KeySource;
59
+ export type BackendKeyOptions = {
60
+ /** Endpoint that holds the key for this user's session. */
61
+ url: string;
62
+ /** Lifetime the server applies, if you want it shown to users. */
63
+ ttlMinutes?: number;
64
+ headers?: Record<string, string> | (() => Record<string, string> | Promise<Record<string, string>>);
65
+ /** Default 'same-origin', so the server can find the session by its own (HttpOnly) cookie. */
66
+ credentials?: RequestCredentials;
67
+ fetch?: typeof fetch;
68
+ };
69
+ /**
70
+ * The key lives on your server, which decides when it expires. Protocol:
71
+ * `GET url` → 200 `{ "key": "<base64url, 32 bytes>" }` (and renews it) or 404;
72
+ * `POST url` → 200 with the existing key or a new one; `DELETE url` (when
73
+ * consent is withdrawn) drops it, and any answer is accepted. The key is
74
+ * fetched on every load and save and kept only in memory.
75
+ */
76
+ export declare function backendKey(options: BackendKeyOptions): KeySource;
77
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,KAAK,SAAS,EAGd,KAAK,OAAO,EACb,MAAM,oBA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M,CAAA;IACnB,yBAAyB;IACzB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,yFAAyF;IACzF,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,wBAAwB;IACxB,QAAQ,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAA;CAC5B,CAAA;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,OAAO,GAAE,gBAAqB,GAAG,SAAS,CA4CnE;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,2DAA2D;IAC3D,GAAG,EAAE,MAAM,CAAA;IACX,kEAAkE;IAClE,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,MAAM,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;IACnG,8FAA8F;IAC9F,WAAW,CAAC,EAAE,kBAAkB,CAAA;IAChC,KAAK,CAAC,EAAE,OAAO,KAAK,CAAA;CACrB,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,SAAS,CAwBhE"}
package/dist/index.js ADDED
@@ -0,0 +1,299 @@
1
+ import { definePlugin, sameRetention, storableSnapshot, } from '@handsforbots/core';
2
+ export const storageLocal = definePlugin({
3
+ name: 'storage-local',
4
+ provides: ['storage', 'retention'],
5
+ consent: 'persistence',
6
+ apply(ctx, options = {}) {
7
+ const keySource = options.keySource ?? cookieKey();
8
+ const storage = createLocalStorage({ ...options, keySource });
9
+ const choices = choicesOf(options);
10
+ const listeners = new Set();
11
+ const control = {
12
+ get current() {
13
+ return storage.retention;
14
+ },
15
+ choices,
16
+ location: 'browser',
17
+ encrypted: options.encrypt ?? true,
18
+ keyTtlMinutes: options.encrypt === false ? undefined : keySource.ttlMinutes,
19
+ async set(retention) {
20
+ if (!choices.some((c) => sameRetention(c, retention))) {
21
+ throw new Error(`[h4b] storage-local: retention ${JSON.stringify(retention)} is not one of the choices`);
22
+ }
23
+ storage.setRetention(retention);
24
+ await ctx.app.persist();
25
+ listeners.forEach((l) => l());
26
+ },
27
+ subscribe(listener) {
28
+ listeners.add(listener);
29
+ return () => void listeners.delete(listener);
30
+ },
31
+ };
32
+ ctx.provide('storage', storage);
33
+ ctx.provide('retention', control);
34
+ const timer = setInterval(() => {
35
+ try {
36
+ storage.sweep();
37
+ }
38
+ catch (error) {
39
+ ctx.emit('error', { error, source: 'storage' });
40
+ }
41
+ }, 60_000);
42
+ ctx.onDispose(() => clearInterval(timer));
43
+ ctx.onRevoke(() => storage.forget());
44
+ },
45
+ // Denied on a later visit: drop what an earlier one kept, without mounting.
46
+ async erase(_app, options = {}) {
47
+ await createLocalStorage(options).forget();
48
+ },
49
+ });
50
+ export function createLocalStorage(options = {}) {
51
+ const key = options.key ?? 'h4b:conversation';
52
+ const prefKey = `${key}:retention`;
53
+ const encrypt = options.encrypt ?? true;
54
+ const keys = options.keySource ?? cookieKey();
55
+ const choices = choicesOf(options);
56
+ const area = (retention) => {
57
+ try {
58
+ return retention === 'tab' ? sessionStorage : localStorage;
59
+ }
60
+ catch {
61
+ return undefined; // blocked storage (privacy mode, sandboxed iframes)
62
+ }
63
+ };
64
+ /** The end user's choice is shared by all tabs, so it is read again on every access. */
65
+ const retention = () => {
66
+ try {
67
+ const saved = localStorage.getItem(prefKey);
68
+ if (saved) {
69
+ const parsed = JSON.parse(saved);
70
+ if (choices.some((c) => sameRetention(c, parsed)))
71
+ return parsed;
72
+ }
73
+ }
74
+ catch {
75
+ /* unavailable or corrupted: use the default */
76
+ }
77
+ return choices[0];
78
+ };
79
+ const ttlOf = (r) => (typeof r === 'object' ? r.ttlMinutes * 60_000 : 0);
80
+ const read = (r) => {
81
+ const raw = area(r)?.getItem(key);
82
+ if (!raw)
83
+ return null;
84
+ try {
85
+ const stored = JSON.parse(raw);
86
+ if (stored.version === (encrypt ? 2 : 1))
87
+ return stored;
88
+ }
89
+ catch {
90
+ /* corrupted */
91
+ }
92
+ area(r)?.removeItem(key); // corrupted, or left over from the other `encrypt` setting
93
+ return null;
94
+ };
95
+ const expired = (stored, r) => (ttlOf(r) > 0 && Date.now() - stored.savedAt > ttlOf(r)) || (stored.version === 2 && !!keys.gone?.());
96
+ return {
97
+ get retention() {
98
+ return retention();
99
+ },
100
+ setRetention(next) {
101
+ const before = retention();
102
+ try {
103
+ localStorage.setItem(prefKey, JSON.stringify(next));
104
+ }
105
+ catch {
106
+ /* not remembered across reloads */
107
+ }
108
+ if (!sameRetention(before, next))
109
+ area(before)?.removeItem(key);
110
+ },
111
+ sweep() {
112
+ const r = retention();
113
+ const stored = read(r);
114
+ if (stored && expired(stored, r))
115
+ area(r)?.removeItem(key);
116
+ },
117
+ async load() {
118
+ const r = retention();
119
+ const stored = read(r);
120
+ if (!stored)
121
+ return null;
122
+ if (expired(stored, r)) {
123
+ area(r)?.removeItem(key);
124
+ return null;
125
+ }
126
+ if (stored.version === 1)
127
+ return stored.snapshot;
128
+ const cryptoKey = await keys.get(false);
129
+ try {
130
+ if (!cryptoKey)
131
+ throw new Error('no key');
132
+ const json = await crypto.subtle.decrypt({ name: 'AES-GCM', iv: fromBase64(stored.iv) }, cryptoKey, fromBase64(stored.data));
133
+ return JSON.parse(new TextDecoder().decode(json));
134
+ }
135
+ catch {
136
+ area(r)?.removeItem(key); // its key no longer exists
137
+ return null;
138
+ }
139
+ },
140
+ async save(snapshot) {
141
+ const r = retention();
142
+ const clean = storableSnapshot(snapshot);
143
+ if (!encrypt) {
144
+ const stored = { version: 1, savedAt: Date.now(), snapshot: clean };
145
+ area(r)?.setItem(key, JSON.stringify(stored));
146
+ return;
147
+ }
148
+ const cryptoKey = typeof crypto !== 'undefined' && crypto.subtle ? await keys.get(true) : null;
149
+ if (!cryptoKey) {
150
+ area(r)?.removeItem(key);
151
+ throw new Error('[h4b] storage-local: no encryption key (needs Web Crypto and the key source); the conversation was not saved');
152
+ }
153
+ const iv = crypto.getRandomValues(new Uint8Array(12));
154
+ const data = await crypto.subtle.encrypt({ name: 'AES-GCM', iv }, cryptoKey, new TextEncoder().encode(JSON.stringify(clean)));
155
+ const stored = { version: 2, savedAt: Date.now(), iv: toBase64(iv), data: toBase64(new Uint8Array(data)) };
156
+ area(r)?.setItem(key, JSON.stringify(stored));
157
+ },
158
+ clear() {
159
+ for (const r of ['key', 'tab'])
160
+ area(r)?.removeItem(key);
161
+ },
162
+ async forget() {
163
+ for (const r of ['key', 'tab'])
164
+ area(r)?.removeItem(key);
165
+ try {
166
+ localStorage.removeItem(prefKey);
167
+ }
168
+ catch {
169
+ /* blocked storage: nothing was kept */
170
+ }
171
+ if (encrypt)
172
+ await keys.forget?.();
173
+ },
174
+ };
175
+ }
176
+ function choicesOf(options) {
177
+ const list = [options.retention ?? 'key', ...(options.userChoices ?? [])];
178
+ return list.filter((r, i) => list.findIndex((o) => sameRetention(o, r)) === i);
179
+ }
180
+ /**
181
+ * The key lives in a cookie with Max-Age, renewed on use. When the browser
182
+ * drops it, what is stored can no longer be read, even if the site is never
183
+ * opened again. The cookie is readable by the page's scripts and is sent with
184
+ * requests to its path.
185
+ */
186
+ export function cookieKey(options = {}) {
187
+ const name = options.name ?? 'h4b-key';
188
+ const ttlMinutes = options.ttlMinutes ?? 30;
189
+ const importer = keyImporter();
190
+ const write = (raw) => {
191
+ const secure = typeof location !== 'undefined' && location.protocol === 'https:';
192
+ document.cookie = [
193
+ `${name}=${raw}`,
194
+ `Path=${options.path ?? '/'}`,
195
+ options.domain ? `Domain=${options.domain}` : '',
196
+ `SameSite=${options.sameSite ?? 'Strict'}`,
197
+ ttlMinutes > 0 ? `Max-Age=${Math.round(ttlMinutes * 60)}` : '',
198
+ secure ? 'Secure' : '',
199
+ ]
200
+ .filter(Boolean)
201
+ .join('; ');
202
+ };
203
+ return {
204
+ ttlMinutes,
205
+ gone: () => typeof document !== 'undefined' && !readCookie(name),
206
+ forget() {
207
+ if (typeof document === 'undefined')
208
+ return;
209
+ document.cookie = [
210
+ `${name}=`,
211
+ `Path=${options.path ?? '/'}`,
212
+ options.domain ? `Domain=${options.domain}` : '',
213
+ 'Max-Age=0',
214
+ ]
215
+ .filter(Boolean)
216
+ .join('; ');
217
+ },
218
+ async get(create) {
219
+ if (typeof document === 'undefined')
220
+ return null;
221
+ let raw = readCookie(name);
222
+ if (raw)
223
+ write(raw);
224
+ else if (create) {
225
+ write(toBase64(crypto.getRandomValues(new Uint8Array(32))));
226
+ raw = readCookie(name); // another tab may have written first; cookies may be blocked
227
+ }
228
+ return raw ? importer(raw) : null;
229
+ },
230
+ };
231
+ }
232
+ /**
233
+ * The key lives on your server, which decides when it expires. Protocol:
234
+ * `GET url` → 200 `{ "key": "<base64url, 32 bytes>" }` (and renews it) or 404;
235
+ * `POST url` → 200 with the existing key or a new one; `DELETE url` (when
236
+ * consent is withdrawn) drops it, and any answer is accepted. The key is
237
+ * fetched on every load and save and kept only in memory.
238
+ */
239
+ export function backendKey(options) {
240
+ const importer = keyImporter();
241
+ const call = async (method) => {
242
+ const doFetch = options.fetch ?? globalThis.fetch;
243
+ const headers = typeof options.headers === 'function' ? await options.headers() : options.headers;
244
+ return doFetch(options.url, {
245
+ method,
246
+ headers: { accept: 'application/json', ...headers },
247
+ credentials: options.credentials ?? 'same-origin',
248
+ });
249
+ };
250
+ return {
251
+ ttlMinutes: options.ttlMinutes,
252
+ async forget() {
253
+ await call('DELETE');
254
+ },
255
+ async get(create) {
256
+ const response = await call(create ? 'POST' : 'GET');
257
+ if (response.status === 404)
258
+ return null;
259
+ if (!response.ok)
260
+ throw new Error(`[h4b] backendKey: ${response.status} from ${options.url}`);
261
+ const { key } = (await response.json());
262
+ return key ? importer(key) : null;
263
+ },
264
+ };
265
+ }
266
+ /** Imports raw keys as non-extractable AES-GCM keys, reusing the last one. */
267
+ function keyImporter() {
268
+ let cached;
269
+ return async (raw) => {
270
+ if (cached?.raw !== raw) {
271
+ const key = await crypto.subtle.importKey('raw', fromBase64(raw), 'AES-GCM', false, ['encrypt', 'decrypt']);
272
+ cached = { raw, key };
273
+ }
274
+ return cached.key;
275
+ };
276
+ }
277
+ function readCookie(name) {
278
+ for (const pair of document.cookie.split(';')) {
279
+ const [k, ...v] = pair.trim().split('=');
280
+ if (k === name)
281
+ return v.join('=') || undefined;
282
+ }
283
+ return undefined;
284
+ }
285
+ /** base64url, safe inside a cookie value. */
286
+ function toBase64(bytes) {
287
+ let s = '';
288
+ for (const b of bytes)
289
+ s += String.fromCharCode(b);
290
+ return btoa(s).replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');
291
+ }
292
+ function fromBase64(text) {
293
+ const s = atob(text.replace(/-/g, '+').replace(/_/g, '/'));
294
+ const bytes = new Uint8Array(s.length);
295
+ for (let i = 0; i < s.length; i++)
296
+ bytes[i] = s.charCodeAt(i);
297
+ return bytes;
298
+ }
299
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,aAAa,EACb,gBAAgB,GAKjB,MAAM,oBAAoB,CAAA;AA8C3B,MAAM,CAAC,MAAM,YAAY,GAAG,YAAY,CAAkC;IACxE,IAAI,EAAE,eAAe;IACrB,QAAQ,EAAE,CAAC,SAAS,EAAE,WAAW,CAAC;IAClC,OAAO,EAAE,aAAa;IACtB,KAAK,CAAC,GAAG,EAAE,OAAO,GAAG,EAAE;QACrB,MAAM,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,SAAS,EAAE,CAAA;QAClD,MAAM,OAAO,GAAG,kBAAkB,CAAC,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,CAAC,CAAA;QAC7D,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC,CAAA;QAClC,MAAM,SAAS,GAAG,IAAI,GAAG,EAAc,C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AC,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAA;IAC1D,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,CAAA;IACtC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE;QAAE,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAA;IAC7D,OAAO,KAAK,CAAA;AACd,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,41 @@
1
1
  {
2
2
  "name": "@handsforbots/storage-local",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
3
+ "version": "2.0.0-alpha.0",
4
+ "description": "Persists the Hands for Bots conversation in localStorage/sessionStorage with an inactivity timeout.",
5
+ "license": "MIT",
6
+ "homepage": "https://github.com/handsforbots/handsforbots/blob/main/docs/en-us/plugins.md#storage-local",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "git+https://github.com/handsforbots/handsforbots.git",
10
+ "directory": "packages/storage-local"
11
+ },
12
+ "bugs": {
13
+ "url": "https://github.com/handsforbots/handsforbots/issues"
14
+ },
15
+ "type": "module",
16
+ "sideEffects": false,
17
+ "exports": {
18
+ ".": {
19
+ "types": "./dist/index.d.ts",
20
+ "import": "./dist/index.js"
21
+ }
22
+ },
23
+ "publishConfig": {
24
+ "access": "public"
25
+ },
26
+ "files": [
27
+ "dist"
28
+ ],
29
+ "peerDependencies": {
30
+ "@handsforbots/core": "^2.0.0-alpha.0"
31
+ },
32
+ "devDependencies": {
33
+ "jsdom": "^27.0.0",
34
+ "@handsforbots/core": "^2.0.0-alpha.0",
35
+ "@handsforbots/testkit": "^2.0.0-alpha.0"
36
+ },
37
+ "scripts": {
38
+ "build": "tsc -p tsconfig.build.json",
39
+ "typecheck": "tsc -p tsconfig.json --noEmit"
40
+ }
6
41
  }