@1mbrain/sdk 0.1.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/README.md ADDED
@@ -0,0 +1,85 @@
1
+ # @1mbrain/sdk
2
+
3
+ The official TypeScript/Node.js client for [1MBrain](https://github.com/stolenhourdev/1mbrain) — a portable, holographic memory layer for AI agents.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ npm install @1mbrain/sdk
9
+ # or
10
+ yarn add @1mbrain/sdk
11
+ # or
12
+ pnpm add @1mbrain/sdk
13
+ ```
14
+
15
+ ## Quick Start
16
+
17
+ ```typescript
18
+ import { OneMBrainClient } from '@1mbrain/sdk';
19
+
20
+ // Initialize the client
21
+ const brain = new OneMBrainClient({
22
+ apiUrl: 'http://localhost:3100', // URL to your 1MBrain API instance
23
+ apiKey: 'your-api-key', // Provide your configured API key
24
+ agentId: 'my-assistant-bot', // Namespace: each agent/bot gets isolated memory
25
+ });
26
+
27
+ async function main() {
28
+ // 1. Store a memory
29
+ const memory = await brain.remember({
30
+ type: 'semantic',
31
+ content: 'User prefers Bahasa Indonesia as primary language',
32
+ importance: 0.9,
33
+ tags: ['preference', 'language'],
34
+ });
35
+ console.log('Stored memory ID:', memory.id);
36
+
37
+ // 2. Recall memories
38
+ const results = await brain.recall({
39
+ query: 'what language does the user prefer?',
40
+ limit: 5,
41
+ useSpreadingActivation: true,
42
+ });
43
+
44
+ results.forEach(r => console.log(`[${r.score.toFixed(3)}] ${r.memory.content}`));
45
+
46
+ // 3. Create an explicit association between memories
47
+ if (results.length > 1) {
48
+ await brain.associate(memory.id, {
49
+ targetId: results[1].memory.id,
50
+ strength: 0.8,
51
+ });
52
+ }
53
+
54
+ // 4. Forget a memory
55
+ // await brain.forget(memory.id);
56
+ }
57
+
58
+ main().catch(console.error);
59
+ ```
60
+
61
+ ## API Reference
62
+
63
+ ### `OneMBrainClient(config)`
64
+
65
+ Configuration options:
66
+ - `apiUrl` (string): Base URL of the 1MBrain API.
67
+ - `apiKey` (string): Your API key for authentication.
68
+ - `agentId` (string, optional): Default agent namespace. Can be overridden in individual method calls.
69
+
70
+ ### Methods
71
+
72
+ | Method | Parameters | Returns |
73
+ |--------|------------|---------|
74
+ | `remember(input)` | `{ type, content, importance?, tags?, metadata?, agentId? }` | `Promise<Memory>` |
75
+ | `recall(input)` | `{ query, limit?, type?, tags?, maxHops?, activationThreshold?, blendWeight?, agentId? }` | `Promise<RecallResult[]>` |
76
+ | `forget(id, options?)` | `id` (string), `options?: { agentId? }` | `Promise<boolean>` |
77
+ | `associate(sourceId, params)` | `sourceId` (string), `params: { targetId, strength, origin?, agentId? }` | `Promise<Association>` |
78
+
79
+ ## Error Handling
80
+
81
+ The client throws `OneMBrainError` on API failures. You can catch these to handle specific HTTP status codes or error messages gracefully.
82
+
83
+ ## License
84
+
85
+ MIT
@@ -0,0 +1 @@
1
+ {"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.es2021.d.ts","../../../../node_modules/typescript/lib/lib.es2022.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.dom.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2016.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","../../../../node_modules/typescript/lib/lib.es2017.date.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.es2021.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2021.string.d.ts","../../../../node_modules/typescript/lib/lib.es2021.weakref.d.ts","../../../../node_modules/typescript/lib/lib.es2021.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.array.d.ts","../../../../node_modules/typescript/lib/lib.es2022.error.d.ts","../../../../node_modules/typescript/lib/lib.es2022.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2022.object.d.ts","../../../../node_modules/typescript/lib/lib.es2022.string.d.ts","../../../../node_modules/typescript/lib/lib.es2022.regexp.d.ts","../../../../node_modules/typescript/lib/lib.decorators.d.ts","../../../../node_modules/typescript/lib/lib.decorators.legacy.d.ts","../../../core/dist/types.d.ts","../../../../node_modules/zod/v3/helpers/typealiases.d.cts","../../../../node_modules/zod/v3/helpers/util.d.cts","../../../../node_modules/zod/v3/index.d.cts","../../../../node_modules/zod/v3/zoderror.d.cts","../../../../node_modules/zod/v3/locales/en.d.cts","../../../../node_modules/zod/v3/errors.d.cts","../../../../node_modules/zod/v3/helpers/parseutil.d.cts","../../../../node_modules/zod/v3/helpers/enumutil.d.cts","../../../../node_modules/zod/v3/helpers/errorutil.d.cts","../../../../node_modules/zod/v3/helpers/partialutil.d.cts","../../../../node_modules/zod/v3/standard-schema.d.cts","../../../../node_modules/zod/v3/types.d.cts","../../../../node_modules/zod/v3/external.d.cts","../../../../node_modules/zod/index.d.cts","../../../core/dist/schemas.d.ts","../../../core/dist/events.d.ts","../../../core/dist/engine.d.ts","../../../core/dist/ranking-policy.d.ts","../../../core/dist/passport.d.ts","../../../core/dist/db/sqlite-provider.d.ts","../../../core/dist/db/postgres-provider.d.ts","../../../core/dist/db/index.d.ts","../../../core/dist/embedding/openai-provider.d.ts","../../../core/dist/embedding/ollama-provider.d.ts","../../../core/dist/embedding/keyword-provider.d.ts","../../../core/dist/embedding/index.d.ts","../../../core/dist/config.d.ts","../../../../node_modules/@types/node/compatibility/disposable.d.ts","../../../../node_modules/@types/node/compatibility/indexable.d.ts","../../../../node_modules/@types/node/compatibility/iterators.d.ts","../../../../node_modules/@types/node/compatibility/index.d.ts","../../../../node_modules/@types/node/globals.typedarray.d.ts","../../../../node_modules/@types/node/buffer.buffer.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/web-globals/abortcontroller.d.ts","../../../../node_modules/@types/node/web-globals/domexception.d.ts","../../../../node_modules/@types/node/web-globals/events.d.ts","../../../../node_modules/buffer/index.d.ts","../../../../node_modules/undici-types/header.d.ts","../../../../node_modules/undici-types/readable.d.ts","../../../../node_modules/undici-types/file.d.ts","../../../../node_modules/undici-types/fetch.d.ts","../../../../node_modules/undici-types/formdata.d.ts","../../../../node_modules/undici-types/connector.d.ts","../../../../node_modules/undici-types/client.d.ts","../../../../node_modules/undici-types/errors.d.ts","../../../../node_modules/undici-types/dispatcher.d.ts","../../../../node_modules/undici-types/global-dispatcher.d.ts","../../../../node_modules/undici-types/global-origin.d.ts","../../../../node_modules/undici-types/pool-stats.d.ts","../../../../node_modules/undici-types/pool.d.ts","../../../../node_modules/undici-types/handlers.d.ts","../../../../node_modules/undici-types/balanced-pool.d.ts","../../../../node_modules/undici-types/agent.d.ts","../../../../node_modules/undici-types/mock-interceptor.d.ts","../../../../node_modules/undici-types/mock-agent.d.ts","../../../../node_modules/undici-types/mock-client.d.ts","../../../../node_modules/undici-types/mock-pool.d.ts","../../../../node_modules/undici-types/mock-errors.d.ts","../../../../node_modules/undici-types/proxy-agent.d.ts","../../../../node_modules/undici-types/env-http-proxy-agent.d.ts","../../../../node_modules/undici-types/retry-handler.d.ts","../../../../node_modules/undici-types/retry-agent.d.ts","../../../../node_modules/undici-types/api.d.ts","../../../../node_modules/undici-types/interceptors.d.ts","../../../../node_modules/undici-types/util.d.ts","../../../../node_modules/undici-types/cookies.d.ts","../../../../node_modules/undici-types/patch.d.ts","../../../../node_modules/undici-types/websocket.d.ts","../../../../node_modules/undici-types/eventsource.d.ts","../../../../node_modules/undici-types/filereader.d.ts","../../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../../node_modules/undici-types/content-type.d.ts","../../../../node_modules/undici-types/cache.d.ts","../../../../node_modules/undici-types/index.d.ts","../../../../node_modules/@types/node/web-globals/fetch.d.ts","../../../../node_modules/@types/node/web-globals/navigator.d.ts","../../../../node_modules/@types/node/web-globals/storage.d.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/inspector.generated.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/readline/promises.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/sea.d.ts","../../../../node_modules/@types/node/sqlite.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/@types/node/stream/web.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/test.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/pino-std-serializers/index.d.ts","../../../../node_modules/sonic-boom/types/index.d.ts","../../../../node_modules/pino/pino.d.ts","../../../core/dist/logger.d.ts","../../../core/dist/index.d.ts","../src/index.ts","../src/hermes.ts","../../../../node_modules/@types/better-sqlite3/index.d.ts","../../../../node_modules/@types/d3-array/index.d.ts","../../../../node_modules/@types/d3-selection/index.d.ts","../../../../node_modules/@types/d3-axis/index.d.ts","../../../../node_modules/@types/d3-brush/index.d.ts","../../../../node_modules/@types/d3-chord/index.d.ts","../../../../node_modules/@types/d3-color/index.d.ts","../../../../node_modules/@types/geojson/index.d.ts","../../../../node_modules/@types/d3-contour/index.d.ts","../../../../node_modules/@types/d3-delaunay/index.d.ts","../../../../node_modules/@types/d3-dispatch/index.d.ts","../../../../node_modules/@types/d3-drag/index.d.ts","../../../../node_modules/@types/d3-dsv/index.d.ts","../../../../node_modules/@types/d3-ease/index.d.ts","../../../../node_modules/@types/d3-fetch/index.d.ts","../../../../node_modules/@types/d3-force/index.d.ts","../../../../node_modules/@types/d3-format/index.d.ts","../../../../node_modules/@types/d3-geo/index.d.ts","../../../../node_modules/@types/d3-hierarchy/index.d.ts","../../../../node_modules/@types/d3-interpolate/index.d.ts","../../../../node_modules/@types/d3-path/index.d.ts","../../../../node_modules/@types/d3-polygon/index.d.ts","../../../../node_modules/@types/d3-quadtree/index.d.ts","../../../../node_modules/@types/d3-random/index.d.ts","../../../../node_modules/@types/d3-time/index.d.ts","../../../../node_modules/@types/d3-scale/index.d.ts","../../../../node_modules/@types/d3-scale-chromatic/index.d.ts","../../../../node_modules/@types/d3-shape/index.d.ts","../../../../node_modules/@types/d3-time-format/index.d.ts","../../../../node_modules/@types/d3-timer/index.d.ts","../../../../node_modules/@types/d3-transition/index.d.ts","../../../../node_modules/@types/d3-zoom/index.d.ts","../../../../node_modules/@types/d3/index.d.ts","../../../../node_modules/@types/estree/index.d.ts","../../../../node_modules/@types/istanbul-lib-coverage/index.d.ts","../../../../node_modules/@types/istanbul-lib-report/index.d.ts","../../../../node_modules/@types/istanbul-reports/index.d.ts","../../../../node_modules/@jest/expect-utils/build/index.d.ts","../../../../node_modules/chalk/index.d.ts","../../../../node_modules/@sinclair/typebox/typebox.d.ts","../../../../node_modules/@jest/schemas/build/index.d.ts","../../../../node_modules/pretty-format/build/index.d.ts","../../../../node_modules/jest-diff/build/index.d.ts","../../../../node_modules/jest-matcher-utils/build/index.d.ts","../../../../node_modules/expect/build/index.d.ts","../../../../node_modules/@types/jest/index.d.ts","../../../../node_modules/parse5/dist/common/html.d.ts","../../../../node_modules/parse5/dist/common/token.d.ts","../../../../node_modules/parse5/dist/common/error-codes.d.ts","../../../../node_modules/parse5/dist/tokenizer/preprocessor.d.ts","../../../../node_modules/entities/dist/esm/generated/decode-data-html.d.ts","../../../../node_modules/entities/dist/esm/generated/decode-data-xml.d.ts","../../../../node_modules/entities/dist/esm/decode-codepoint.d.ts","../../../../node_modules/entities/dist/esm/decode.d.ts","../../../../node_modules/parse5/dist/tokenizer/index.d.ts","../../../../node_modules/parse5/dist/tree-adapters/interface.d.ts","../../../../node_modules/parse5/dist/parser/open-element-stack.d.ts","../../../../node_modules/parse5/dist/parser/formatting-element-list.d.ts","../../../../node_modules/parse5/dist/parser/index.d.ts","../../../../node_modules/parse5/dist/tree-adapters/default.d.ts","../../../../node_modules/parse5/dist/serializer/index.d.ts","../../../../node_modules/parse5/dist/common/foreign-content.d.ts","../../../../node_modules/parse5/dist/index.d.ts","../../../../node_modules/tough-cookie/dist/cookie/constants.d.ts","../../../../node_modules/tough-cookie/dist/cookie/cookie.d.ts","../../../../node_modules/tough-cookie/dist/utils.d.ts","../../../../node_modules/tough-cookie/dist/store.d.ts","../../../../node_modules/tough-cookie/dist/memstore.d.ts","../../../../node_modules/tough-cookie/dist/pathmatch.d.ts","../../../../node_modules/tough-cookie/dist/permutedomain.d.ts","../../../../node_modules/tough-cookie/dist/getpublicsuffix.d.ts","../../../../node_modules/tough-cookie/dist/validators.d.ts","../../../../node_modules/tough-cookie/dist/version.d.ts","../../../../node_modules/tough-cookie/dist/cookie/canonicaldomain.d.ts","../../../../node_modules/tough-cookie/dist/cookie/cookiecompare.d.ts","../../../../node_modules/tough-cookie/dist/cookie/cookiejar.d.ts","../../../../node_modules/tough-cookie/dist/cookie/defaultpath.d.ts","../../../../node_modules/tough-cookie/dist/cookie/domainmatch.d.ts","../../../../node_modules/tough-cookie/dist/cookie/formatdate.d.ts","../../../../node_modules/tough-cookie/dist/cookie/parsedate.d.ts","../../../../node_modules/tough-cookie/dist/cookie/permutepath.d.ts","../../../../node_modules/tough-cookie/dist/cookie/index.d.ts","../../../../node_modules/@types/jsdom/base.d.ts","../../../../node_modules/@types/jsdom/index.d.ts","../../../../node_modules/@types/json-schema/index.d.ts","../../../../node_modules/form-data/index.d.ts","../../../../node_modules/@types/node-fetch/externals.d.ts","../../../../node_modules/@types/node-fetch/index.d.ts","../../../../node_modules/@types/pg/node_modules/pg-types/lib/builtins.d.ts","../../../../node_modules/@types/pg/node_modules/pg-types/index.d.ts","../../../../node_modules/pg-protocol/dist/messages.d.ts","../../../../node_modules/pg-protocol/dist/serializer.d.ts","../../../../node_modules/pg-protocol/dist/parser.d.ts","../../../../node_modules/pg-protocol/dist/index.d.ts","../../../../node_modules/@types/pg/index.d.ts","../../../../node_modules/@types/react/global.d.ts","../../../../node_modules/csstype/index.d.ts","../../../../node_modules/@types/react/index.d.ts","../../../../node_modules/@types/react-dom/index.d.ts","../../../../node_modules/@types/retry/index.d.ts","../../../../node_modules/@types/stack-utils/index.d.ts","../../../../node_modules/@types/tough-cookie/index.d.ts","../../../../node_modules/@types/turndown/index.d.ts","../../../../node_modules/@types/uuid/index.d.ts","../../../../node_modules/@types/webidl-conversions/index.d.ts","../../../../node_modules/@types/whatwg-url/index.d.ts","../../../../node_modules/@types/yargs-parser/index.d.ts","../../../../node_modules/@types/yargs/index.d.ts"],"fileIdsList":[[93,142,159,160],[93,142,159,160,239],[93,142,159,160,192],[93,142,159,160,202,230],[93,142,159,160,201,207],[93,142,159,160,212],[93,142,159,160,207],[93,142,159,160,206],[93,142,159,160,224],[93,142,159,160,220],[93,142,159,160,202,219,230],[93,142,159,160,201,202,203,204,205,206,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231],[93,142,159,160,234],[93,142,159,160,235],[93,142,159,160,241,244],[93,142,153,159,160,188,192,262,281,283],[93,142,159,160,282],[93,142,156,159,160,185,192,285,286],[93,139,140,142,159,160],[93,141,142,159,160],[142,159,160],[93,142,147,159,160,177],[93,142,143,148,153,159,160,162,174,185],[93,142,143,144,153,159,160,162],[88,89,90,93,142,159,160],[93,142,145,159,160,186],[93,142,146,147,154,159,160,163],[93,142,147,159,160,174,182],[93,142,148,150,153,159,160,162],[93,141,142,149,159,160],[93,142,150,151,159,160],[93,142,152,153,159,160],[93,141,142,153,159,160],[93,142,153,154,155,159,160,174,185],[93,142,153,154,155,159,160,169,174,177],[93,135,142,150,153,156,159,160,162,174,185],[93,142,153,154,156,157,159,160,162,174,182,185],[93,142,156,158,159,160,174,182,185],[91,92,93,94,95,96,97,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191],[93,142,153,159,160],[93,142,159,160,161,185],[93,142,150,153,159,160,162,174],[93,142,159,160,163],[93,142,159,160,164],[93,141,142,159,160,165],[93,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191],[93,142,159,160,167],[93,142,159,160,168],[93,142,153,159,160,169,170],[93,142,159,160,169,171,186,188],[93,142,154,159,160],[93,142,153,159,160,174,175,177],[93,142,159,160,176,177],[93,142,159,160,174,175],[93,142,159,160,177],[93,142,159,160,178],[93,139,142,159,160,174,179,185],[93,142,153,159,160,180,181],[93,142,159,160,180,181],[93,142,147,159,160,162,174,182],[93,142,159,160,183],[93,142,159,160,162,184],[93,142,156,159,160,168,185],[93,142,147,159,160,186],[93,142,159,160,174,187],[93,142,159,160,161,188],[93,142,159,160,189],[93,135,142,159,160],[93,135,142,153,155,159,160,165,174,177,185,187,188,190],[93,142,159,160,174,191],[93,142,153,159,160,174,182,192,289,290,293,294],[93,142,159,160,288],[93,142,159,160,297],[93,142,159,160,295,296],[93,142,159,160,306],[93,142,159,160,250,251,252],[93,142,159,160,237,243],[93,142,156,159,160,174,192],[93,142,159,160,241],[93,142,159,160,238,242],[93,142,159,160,247],[93,142,159,160,246,247],[93,142,159,160,246],[93,142,159,160,246,247,248,254,255,258,259,260,261],[93,142,159,160,247,255],[93,142,159,160,246,247,248,254,255,256,257],[93,142,159,160,246,255],[93,142,159,160,255,259],[93,142,159,160,247,248,249,253],[93,142,159,160,248],[93,142,159,160,246,247,255],[93,142,159,160,192,290,291,292],[93,142,159,160,174,192,290],[93,142,156,159,160,192],[93,142,153,159,160,190,193,194],[93,142,159,160,240],[93,142,153,159,160,192],[93,142,159,160,265],[93,142,159,160,263],[93,142,159,160,264],[93,142,159,160,263,264,265,266],[93,142,159,160,263,264,265,266,267,268,269,270,271,272,273,274,275,276,277,278,279,280],[93,142,159,160,264,265,266],[93,142,159,160,265,281],[93,107,111,142,159,160,185],[93,107,142,159,160,174,185],[93,102,142,159,160],[93,104,107,142,159,160,182,185],[93,142,159,160,162,182],[93,102,142,159,160,192],[93,104,107,142,159,160,162,185],[93,99,100,103,106,142,153,159,160,174,185],[93,107,114,142,159,160],[93,99,105,142,159,160],[93,107,128,129,142,159,160],[93,103,107,142,159,160,177,185,192],[93,128,142,159,160,192],[93,101,102,142,159,160,192],[93,107,142,159,160],[93,101,102,103,104,105,106,107,108,109,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,129,130,131,132,133,134,142,159,160],[93,107,122,142,159,160],[93,107,114,115,142,159,160],[93,105,107,115,116,142,159,160],[93,106,142,159,160],[93,99,102,107,142,159,160],[93,107,111,115,116,142,159,160],[93,111,142,159,160],[93,105,107,110,142,159,160,185],[93,99,104,107,114,142,159,160],[93,142,159,160,174],[93,102,107,128,142,159,160,190,192],[73,93,142,159,160],[64,65,93,142,159,160],[61,62,64,66,67,72,93,142,159,160],[62,64,93,142,159,160],[72,93,142,159,160],[64,93,142,159,160],[61,62,64,67,68,69,70,71,93,142,159,160],[61,62,63,93,142,159,160],[60,93,142,159,160],[60,80,81,93,142,159,160],[60,83,84,85,93,142,159,160],[60,76,93,142,159,160],[60,75,76,77,78,79,82,86,87,93,142,159,160,196],[93,142,159,160,195],[74,93,142,159,160],[93,142,159,160,198],[93,142,159,160,197]],"fileInfos":[{"version":"c430d44666289dae81f30fa7b2edebf186ecc91a2d4c71266ea6ae76388792e1","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"ee7bad0c15b58988daa84371e0b89d313b762ab83cb5b31b8a2d1162e8eb41c2","impliedFormat":1},{"version":"080941d9f9ff9307f7e27a83bcd888b7c8270716c39af943532438932ec1d0b9","affectsGlobalScope":true,"impliedFormat":1},{"version":"2e80ee7a49e8ac312cc11b77f1475804bee36b3b2bc896bead8b6e1266befb43","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"fb0f136d372979348d59b3f5020b4cdb81b5504192b1cacff5d1fbba29378aa1","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"a680117f487a4d2f30ea46f1b4b7f58bef1480456e18ba53ee85c2746eeca012","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"3925a6c820dcb1a06506c90b1577db1fdbf7705d65b62b99dce4be75c637e26b","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a3d63ef2b853447ec4f749d3f368ce642264246e02911fcb1590d8c161b8005","affectsGlobalScope":true,"impliedFormat":1},{"version":"8cdf8847677ac7d20486e54dd3fcf09eda95812ac8ace44b4418da1bbbab6eb8","affectsGlobalScope":true,"impliedFormat":1},{"version":"8444af78980e3b20b49324f4a16ba35024fef3ee069a0eb67616ea6ca821c47a","affectsGlobalScope":true,"impliedFormat":1},{"version":"3287d9d085fbd618c3971944b65b4be57859f5415f495b33a6adc994edd2f004","affectsGlobalScope":true,"impliedFormat":1},{"version":"b4b67b1a91182421f5df999988c690f14d813b9850b40acd06ed44691f6727ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},"8aef23d6ba5a209400e367bc994015a58c90db1b526cc525ef51a6cea7eeda1b",{"version":"d3cfde44f8089768ebb08098c96d01ca260b88bccf238d55eee93f1c620ff5a5","impliedFormat":1},{"version":"293eadad9dead44c6fd1db6de552663c33f215c55a1bfa2802a1bceed88ff0ec","impliedFormat":1},{"version":"833e92c058d033cde3f29a6c7603f517001d1ddd8020bc94d2067a3bc69b2a8e","impliedFormat":1},{"version":"08b2fae7b0f553ad9f79faec864b179fc58bc172e295a70943e8585dd85f600c","impliedFormat":1},{"version":"f12edf1672a94c578eca32216839604f1e1c16b40a1896198deabf99c882b340","impliedFormat":1},{"version":"e3498cf5e428e6c6b9e97bd88736f26d6cf147dedbfa5a8ad3ed8e05e059af8a","impliedFormat":1},{"version":"dba3f34531fd9b1b6e072928b6f885aa4d28dd6789cbd0e93563d43f4b62da53","impliedFormat":1},{"version":"f672c876c1a04a223cf2023b3d91e8a52bb1544c576b81bf64a8fec82be9969c","impliedFormat":1},{"version":"e4b03ddcf8563b1c0aee782a185286ed85a255ce8a30df8453aade2188bbc904","impliedFormat":1},{"version":"2329d90062487e1eaca87b5e06abcbbeeecf80a82f65f949fd332cfcf824b87b","impliedFormat":1},{"version":"25b3f581e12ede11e5739f57a86e8668fbc0124f6649506def306cad2c59d262","impliedFormat":1},{"version":"4fdb529707247a1a917a4626bfb6a293d52cd8ee57ccf03830ec91d39d606d6d","impliedFormat":1},{"version":"a9ebb67d6bbead6044b43714b50dcb77b8f7541ffe803046fdec1714c1eba206","impliedFormat":1},{"version":"5780b706cece027f0d4444fbb4e1af62dc51e19da7c3d3719f67b22b033859b9","impliedFormat":1},"9fd6b78b31819ca314dbc47cf924799efd46d2a14deb306450ef144d30f81dba","5273a7079c81a821307766ad3bb7770a8fe842b00772f6b5e2a1fe921981f121","c90f871bac390dbf50fa299c1c1e4bdf9372399c47d4dbb5a2d588b1361fd7ed","1d20940219675a4033746fe60631228811665ea61055734c8ae4b0c89fc9370c","94af405bdf528fa958d3b576b6bcfaf37f373dfb807ac7712e577f19fbde0108","b891bb6e869ebbf04c09f1deb65fa215fd52948609f42379282cb3d0be39e5b2","432ed87b24fd5ed8b0594260a46644d8b0916eb1fbb688adbf065c09f530d5ed","3501efb7ca71aa1efb4793ea027472a16744155e7ef9a4c361dbfcd3ac4a14d4","553786048166601059154f10b735501ef0d071e6be7cd56bf8ab7d28a75f6952","cfb611e1084541ad83b69ed2cfb37070fc00f5c9482908d5edf2bbe5a242f16d","328c157c2741db76b38bfb89447f1a3ec3e4971f296debeff119e3148ad7f29a","f62f38d94e55606e56c8583df42d6edba9d902864a651668ed093b3d8acc0d3c","26619f061082e866b5ea9478f8e1858b19b63b9b831c1efef0a59a3a6957f2e5",{"version":"6c7176368037af28cb72f2392010fa1cef295d6d6744bca8cfb54985f3a18c3e","affectsGlobalScope":true,"impliedFormat":1},{"version":"ab41ef1f2cdafb8df48be20cd969d875602483859dc194e9c97c8a576892c052","affectsGlobalScope":true,"impliedFormat":1},{"version":"437e20f2ba32abaeb7985e0afe0002de1917bc74e949ba585e49feba65da6ca1","affectsGlobalScope":true,"impliedFormat":1},{"version":"21d819c173c0cf7cc3ce57c3276e77fd9a8a01d35a06ad87158781515c9a438a","impliedFormat":1},{"version":"98cffbf06d6bab333473c70a893770dbe990783904002c4f1a960447b4b53dca","affectsGlobalScope":true,"impliedFormat":1},{"version":"3af97acf03cc97de58a3a4bc91f8f616408099bc4233f6d0852e72a8ffb91ac9","affectsGlobalScope":true,"impliedFormat":1},{"version":"808069bba06b6768b62fd22429b53362e7af342da4a236ed2d2e1c89fcca3b4a","affectsGlobalScope":true,"impliedFormat":1},{"version":"1db0b7dca579049ca4193d034d835f6bfe73096c73663e5ef9a0b5779939f3d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"9798340ffb0d067d69b1ae5b32faa17ab31b82466a3fc00d8f2f2df0c8554aaa","affectsGlobalScope":true,"impliedFormat":1},{"version":"f26b11d8d8e4b8028f1c7d618b22274c892e4b0ef5b3678a8ccbad85419aef43","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e9c23ba78aabc2e0a27033f18737a6df754067731e69dc5f52823957d60a4b6","impliedFormat":1},{"version":"5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","impliedFormat":1},{"version":"763fe0f42b3d79b440a9b6e51e9ba3f3f91352469c1e4b3b67bfa4ff6352f3f4","impliedFormat":1},{"version":"25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","impliedFormat":1},{"version":"c464d66b20788266e5353b48dc4aa6bc0dc4a707276df1e7152ab0c9ae21fad8","impliedFormat":1},{"version":"78d0d27c130d35c60b5e5566c9f1e5be77caf39804636bc1a40133919a949f21","impliedFormat":1},{"version":"c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","impliedFormat":1},{"version":"1d6e127068ea8e104a912e42fc0a110e2aa5a66a356a917a163e8cf9a65e4a75","impliedFormat":1},{"version":"5ded6427296cdf3b9542de4471d2aa8d3983671d4cac0f4bf9c637208d1ced43","impliedFormat":1},{"version":"7f182617db458e98fc18dfb272d40aa2fff3a353c44a89b2c0ccb3937709bfb5","impliedFormat":1},{"version":"cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","impliedFormat":1},{"version":"385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","impliedFormat":1},{"version":"9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","impliedFormat":1},{"version":"0b8a9268adaf4da35e7fa830c8981cfa22adbbe5b3f6f5ab91f6658899e657a7","impliedFormat":1},{"version":"11396ed8a44c02ab9798b7dca436009f866e8dae3c9c25e8c1fbc396880bf1bb","impliedFormat":1},{"version":"ba7bc87d01492633cb5a0e5da8a4a42a1c86270e7b3d2dea5d156828a84e4882","impliedFormat":1},{"version":"4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","impliedFormat":1},{"version":"c21dc52e277bcfc75fac0436ccb75c204f9e1b3fa5e12729670910639f27343e","impliedFormat":1},{"version":"13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","impliedFormat":1},{"version":"9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","impliedFormat":1},{"version":"4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","impliedFormat":1},{"version":"24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","impliedFormat":1},{"version":"ea0148f897b45a76544ae179784c95af1bd6721b8610af9ffa467a518a086a43","impliedFormat":1},{"version":"24c6a117721e606c9984335f71711877293a9651e44f59f3d21c1ea0856f9cc9","impliedFormat":1},{"version":"dd3273ead9fbde62a72949c97dbec2247ea08e0c6952e701a483d74ef92d6a17","impliedFormat":1},{"version":"405822be75ad3e4d162e07439bac80c6bcc6dbae1929e179cf467ec0b9ee4e2e","impliedFormat":1},{"version":"0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","impliedFormat":1},{"version":"e61be3f894b41b7baa1fbd6a66893f2579bfad01d208b4ff61daef21493ef0a8","impliedFormat":1},{"version":"bd0532fd6556073727d28da0edfd1736417a3f9f394877b6d5ef6ad88fba1d1a","impliedFormat":1},{"version":"89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","impliedFormat":1},{"version":"615ba88d0128ed16bf83ef8ccbb6aff05c3ee2db1cc0f89ab50a4939bfc1943f","impliedFormat":1},{"version":"a4d551dbf8746780194d550c88f26cf937caf8d56f102969a110cfaed4b06656","impliedFormat":1},{"version":"8bd86b8e8f6a6aa6c49b71e14c4ffe1211a0e97c80f08d2c8cc98838006e4b88","impliedFormat":1},{"version":"317e63deeb21ac07f3992f5b50cdca8338f10acd4fbb7257ebf56735bf52ab00","impliedFormat":1},{"version":"4732aec92b20fb28c5fe9ad99521fb59974289ed1e45aecb282616202184064f","impliedFormat":1},{"version":"2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","impliedFormat":1},{"version":"c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","impliedFormat":1},{"version":"bf67d53d168abc1298888693338cb82854bdb2e69ef83f8a0092093c2d562107","impliedFormat":1},{"version":"b52476feb4a0cbcb25e5931b930fc73cb6643fb1a5060bf8a3dda0eeae5b4b68","affectsGlobalScope":true,"impliedFormat":1},{"version":"f9501cc13ce624c72b61f12b3963e84fad210fbdf0ffbc4590e08460a3f04eba","affectsGlobalScope":true,"impliedFormat":1},{"version":"e7721c4f69f93c91360c26a0a84ee885997d748237ef78ef665b153e622b36c1","affectsGlobalScope":true,"impliedFormat":1},{"version":"0fa06ada475b910e2106c98c68b10483dc8811d0c14a8a8dd36efb2672485b29","impliedFormat":1},{"version":"33e5e9aba62c3193d10d1d33ae1fa75c46a1171cf76fef750777377d53b0303f","impliedFormat":1},{"version":"2b06b93fd01bcd49d1a6bd1f9b65ddcae6480b9a86e9061634d6f8e354c1468f","impliedFormat":1},{"version":"6a0cd27e5dc2cfbe039e731cf879d12b0e2dded06d1b1dedad07f7712de0d7f4","affectsGlobalScope":true,"impliedFormat":1},{"version":"13f5c844119c43e51ce777c509267f14d6aaf31eafb2c2b002ca35584cd13b29","impliedFormat":1},{"version":"e60477649d6ad21542bd2dc7e3d9ff6853d0797ba9f689ba2f6653818999c264","impliedFormat":1},{"version":"c2510f124c0293ab80b1777c44d80f812b75612f297b9857406468c0f4dafe29","affectsGlobalScope":true,"impliedFormat":1},{"version":"5524481e56c48ff486f42926778c0a3cce1cc85dc46683b92b1271865bcf015a","impliedFormat":1},{"version":"4c829ab315f57c5442c6667b53769975acbf92003a66aef19bce151987675bd1","affectsGlobalScope":true,"impliedFormat":1},{"version":"b2ade7657e2db96d18315694789eff2ddd3d8aea7215b181f8a0b303277cc579","impliedFormat":1},{"version":"9855e02d837744303391e5623a531734443a5f8e6e8755e018c41d63ad797db2","impliedFormat":1},{"version":"4d631b81fa2f07a0e63a9a143d6a82c25c5f051298651a9b69176ba28930756d","impliedFormat":1},{"version":"836a356aae992ff3c28a0212e3eabcb76dd4b0cc06bcb9607aeef560661b860d","impliedFormat":1},{"version":"1e0d1f8b0adfa0b0330e028c7941b5a98c08b600efe7f14d2d2a00854fb2f393","impliedFormat":1},{"version":"41670ee38943d9cbb4924e436f56fc19ee94232bc96108562de1a734af20dc2c","affectsGlobalScope":true,"impliedFormat":1},{"version":"c906fb15bd2aabc9ed1e3f44eb6a8661199d6c320b3aa196b826121552cb3695","impliedFormat":1},{"version":"22295e8103f1d6d8ea4b5d6211e43421fe4564e34d0dd8e09e520e452d89e659","impliedFormat":1},{"version":"58647d85d0f722a1ce9de50955df60a7489f0593bf1a7015521efe901c06d770","impliedFormat":1},{"version":"9018e9493596e2d041fc531f5101a0d05f9d2e1311f4ae3c74345b1766158c08","impliedFormat":1},{"version":"a10f0e1854f3316d7ee437b79649e5a6ae3ae14ffe6322b02d4987071a95362e","impliedFormat":1},{"version":"e208f73ef6a980104304b0d2ca5f6bf1b85de6009d2c7e404028b875020fa8f2","impliedFormat":1},{"version":"d163b6bc2372b4f07260747cbc6c0a6405ab3fbcea3852305e98ac43ca59f5bc","impliedFormat":1},{"version":"e6fa9ad47c5f71ff733744a029d1dc472c618de53804eae08ffc243b936f87ff","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6f137d651076822d4fe884287e68fd61785a0d3d1fdb250a5059b691fa897db","impliedFormat":1},{"version":"24826ed94a78d5c64bd857570fdbd96229ad41b5cb654c08d75a9845e3ab7dde","impliedFormat":1},{"version":"8b479a130ccb62e98f11f136d3ac80f2984fdc07616516d29881f3061f2dd472","impliedFormat":1},{"version":"928af3d90454bf656a52a48679f199f64c1435247d6189d1caf4c68f2eaf921f","affectsGlobalScope":true,"impliedFormat":1},{"version":"bceb58df66ab8fb00170df20cd813978c5ab84be1d285710c4eb005d8e9d8efb","affectsGlobalScope":true,"impliedFormat":1},{"version":"3f16a7e4deafa527ed9995a772bb380eb7d3c2c0fd4ae178c5263ed18394db2c","impliedFormat":1},{"version":"933921f0bb0ec12ef45d1062a1fc0f27635318f4d294e4d99de9a5493e618ca2","impliedFormat":1},{"version":"71a0f3ad612c123b57239a7749770017ecfe6b66411488000aba83e4546fde25","impliedFormat":1},{"version":"77fbe5eecb6fac4b6242bbf6eebfc43e98ce5ccba8fa44e0ef6a95c945ff4d98","impliedFormat":1},{"version":"4f9d8ca0c417b67b69eeb54c7ca1bedd7b56034bb9bfd27c5d4f3bc4692daca7","impliedFormat":1},{"version":"814118df420c4e38fe5ae1b9a3bafb6e9c2aa40838e528cde908381867be6466","impliedFormat":1},{"version":"a3fc63c0d7b031693f665f5494412ba4b551fe644ededccc0ab5922401079c95","impliedFormat":1},{"version":"80523c00b8544a2000ae0143e4a90a00b47f99823eb7926c1e03c494216fc363","impliedFormat":1},{"version":"37ba7b45141a45ce6e80e66f2a96c8a5ab1bcef0fc2d0f56bb58df96ec67e972","impliedFormat":1},{"version":"45650f47bfb376c8a8ed39d4bcda5902ab899a3150029684ee4c10676d9fbaee","impliedFormat":1},{"version":"746911b62b329587939560deb5c036aca48aece03147b021fa680223255d5183","affectsGlobalScope":true,"impliedFormat":1},{"version":"18fd40412d102c5564136f29735e5d1c3b455b8a37f920da79561f1fde068208","impliedFormat":1},{"version":"c8d3e5a18ba35629954e48c4cc8f11dc88224650067a172685c736b27a34a4dc","impliedFormat":1},{"version":"f0be1b8078cd549d91f37c30c222c2a187ac1cf981d994fb476a1adc61387b14","affectsGlobalScope":true,"impliedFormat":1},{"version":"0aaed1d72199b01234152f7a60046bc947f1f37d78d182e9ae09c4289e06a592","impliedFormat":1},{"version":"2b55d426ff2b9087485e52ac4bc7cfafe1dc420fc76dad926cd46526567c501a","impliedFormat":1},{"version":"66ba1b2c3e3a3644a1011cd530fb444a96b1b2dfe2f5e837a002d41a1a799e60","impliedFormat":1},{"version":"7e514f5b852fdbc166b539fdd1f4e9114f29911592a5eb10a94bb3a13ccac3c4","impliedFormat":1},{"version":"5b7aa3c4c1a5d81b411e8cb302b45507fea9358d3569196b27eb1a27ae3a90ef","affectsGlobalScope":true,"impliedFormat":1},{"version":"5987a903da92c7462e0b35704ce7da94d7fdc4b89a984871c0e2b87a8aae9e69","affectsGlobalScope":true,"impliedFormat":1},{"version":"ea08a0345023ade2b47fbff5a76d0d0ed8bff10bc9d22b83f40858a8e941501c","impliedFormat":1},{"version":"47613031a5a31510831304405af561b0ffaedb734437c595256bb61a90f9311b","impliedFormat":1},{"version":"ae062ce7d9510060c5d7e7952ae379224fb3f8f2dd74e88959878af2057c143b","impliedFormat":1},{"version":"8a1a0d0a4a06a8d278947fcb66bf684f117bf147f89b06e50662d79a53be3e9f","affectsGlobalScope":true,"impliedFormat":1},{"version":"358765d5ea8afd285d4fd1532e78b88273f18cb3f87403a9b16fef61ac9fdcfe","impliedFormat":1},{"version":"9f55299850d4f0921e79b6bf344b47c420ce0f507b9dcf593e532b09ea7eeea1","impliedFormat":1},{"version":"4fe80f12b1d5189384a219095c2eabadbb389c2d3703aae7c5376dbaa56061df","impliedFormat":1},{"version":"9eb1d2dceae65d1c82fc6be7e9b6b19cf3ca93c364678611107362b6ad4d2d41","impliedFormat":1},{"version":"8065e20ac0ad0536d4f1c8d4c2303272a4d25c450bea8d25deb25697d19300e5","impliedFormat":1},"868e68cefbb9c264d6adf2ee92d2846a8bf3be42f3196303d5c003a013919f60","d79807d8aa591779881b585f86b89c44a321f94c829a148bc5006137f28eea8c",{"version":"a8fbad753c870c32af817b3217968a10a8505df5ae612ca75ed6e78d920e1814","signature":"4758911f9d146f4a9edabe7b7f6707ee1aa642a164fb5ad3620fa24089582f97"},{"version":"2156ae94ace6213569a1d89b8a187aedfb1fe26a09994a4a222abae79bf6ce45","signature":"42cfcf2fff4c4fccd6c057dcae8bb9045d4a30e16b2a4b628de4d6e427a41ad9"},{"version":"c2a6a737189ced24ffe0634e9239b087e4c26378d0490f95141b9b9b042b746c","impliedFormat":1},{"version":"b1538a92b9bae8d230267210c5db38c2eb6bdb352128a3ce3aa8c6acf9fc9622","impliedFormat":1},{"version":"469532350a366536390c6eb3bde6839ec5c81fe1227a6b7b6a70202954d70c40","impliedFormat":1},{"version":"17c9f569be89b4c3c17dc17a9fb7909b6bab34f73da5a9a02d160f502624e2e8","impliedFormat":1},{"version":"003df7b9a77eaeb7a524b795caeeb0576e624e78dea5e362b053cb96ae89132a","impliedFormat":1},{"version":"7ba17571f91993b87c12b5e4ecafe66b1a1e2467ac26fcb5b8cee900f6cf8ff4","impliedFormat":1},{"version":"6fc1a4f64372593767a9b7b774e9b3b92bf04e8785c3f9ea98973aa9f4bbe490","impliedFormat":1},{"version":"d30e67059f5c545c5f8f0cc328a36d2e03b8c4a091b4301bc1d6afb2b1491a3a","impliedFormat":1},{"version":"8b219399c6a743b7c526d4267800bd7c84cf8e27f51884c86ad032d662218a9d","impliedFormat":1},{"version":"bad6d83a581dbd97677b96ee3270a5e7d91b692d220b87aab53d63649e47b9ad","impliedFormat":1},{"version":"324726a1827e34c0c45c43c32ecf73d235b01e76ef6d0f44c2c0270628df746a","impliedFormat":1},{"version":"54e79224429e911b5d6aeb3cf9097ec9fd0f140d5a1461bbdece3066b17c232c","impliedFormat":1},{"version":"e1b666b145865bc8d0d843134b21cf589c13beba05d333c7568e7c30309d933a","impliedFormat":1},{"version":"ff09b6fbdcf74d8af4e131b8866925c5e18d225540b9b19ce9485ca93e574d84","impliedFormat":1},{"version":"c836b5d8d84d990419548574fc037c923284df05803b098fe5ddaa49f88b898a","impliedFormat":1},{"version":"3a2b8ed9d6b687ab3e1eac3350c40b1624632f9e837afe8a4b5da295acf491cb","impliedFormat":1},{"version":"189266dd5f90a981910c70d7dfa05e2bca901a4f8a2680d7030c3abbfb5b1e23","impliedFormat":1},{"version":"5ec8dcf94c99d8f1ed7bb042cdfa4ef6a9810ca2f61d959be33bcaf3f309debe","impliedFormat":1},{"version":"a80e02af710bdac31f2d8308890ac4de4b6a221aafcbce808123bfc2903c5dc2","impliedFormat":1},{"version":"d5895252efa27a50f134a9b580aa61f7def5ab73d0a8071f9b5bf9a317c01c2d","impliedFormat":1},{"version":"2c378d9368abcd2eba8c29b294d40909845f68557bc0b38117e4f04fc56e5f9c","impliedFormat":1},{"version":"0f345151cece7be8d10df068b58983ea8bcbfead1b216f0734037a6c63d8af87","impliedFormat":1},{"version":"37fd7bde9c88aa142756d15aeba872498f45ad149e0d1e56f3bccc1af405c520","impliedFormat":1},{"version":"2a920fd01157f819cf0213edfb801c3fb970549228c316ce0a4b1885020bad35","impliedFormat":1},{"version":"56208c500dcb5f42be7e18e8cb578f257a1a89b94b3280c506818fed06391805","impliedFormat":1},{"version":"0c94c2e497e1b9bcfda66aea239d5d36cd980d12a6d9d59e66f4be1fa3da5d5a","impliedFormat":1},{"version":"a67774ceb500c681e1129b50a631fa210872bd4438fae55e5e8698bac7036b19","impliedFormat":1},{"version":"9b048390bcffe88c023a4cd742a720b41d4cd7df83bc9270e6f2339bf38de278","affectsGlobalScope":true,"impliedFormat":1},{"version":"dd8936160e41420264a9d5fade0ff95cc92cab56032a84c74a46b4c38e43121e","impliedFormat":1},{"version":"1f366bde16e0513fa7b64f87f86689c4d36efd85afce7eb24753e9c99b91c319","impliedFormat":1},{"version":"421c3f008f6ef4a5db2194d58a7b960ef6f33e94b033415649cd557be09ef619","impliedFormat":1},{"version":"57568ff84b8ba1a4f8c817141644b49252cc39ec7b899e4bfba0ec0557c910a0","impliedFormat":1},{"version":"e6f10f9a770dedf552ca0946eef3a3386b9bfb41509233a30fc8ca47c49db71c","impliedFormat":1},{"version":"751764bb94219b4ce8f5475dc35d3de2e432fea01a0c9610cd7f69ad05e398c6","impliedFormat":1},{"version":"035a5df183489c2e22f3cf59fc1ed2b043d27f357eecc0eb8d8e840059d44245","impliedFormat":1},{"version":"a4809f4d92317535e6b22b01019437030077a76fec1d93b9881c9ed4738fcc54","impliedFormat":1},{"version":"5f53fa0bd22096d2a78533f94e02c899143b8f0f9891a46965294ee8b91a9434","impliedFormat":1},{"version":"cdcc132f207d097d7d3aa75615ab9a2e71d6a478162dde8b67f88ea19f3e54de","impliedFormat":1},{"version":"0d14fa22c41fdc7277e6f71473b20ebc07f40f00e38875142335d5b63cdfc9d2","impliedFormat":1},{"version":"e1028394c1cf96d5d057ecc647e31e457b919092f882ed0c7092152b077fed9d","impliedFormat":1},{"version":"f315e1e65a1f80992f0509e84e4ae2df15ecd9ef73df975f7c98813b71e4c8da","impliedFormat":1},{"version":"5b9586e9b0b6322e5bfbd2c29bd3b8e21ab9d871f82346cb71020e3d84bae73e","impliedFormat":1},{"version":"3e70a7e67c2cb16f8cd49097360c0309fe9d1e3210ff9222e9dac1f8df9d4fb6","impliedFormat":1},{"version":"ab68d2a3e3e8767c3fba8f80de099a1cfc18c0de79e42cb02ae66e22dfe14a66","impliedFormat":1},{"version":"d96cc6598148bf1a98fb2e8dcf01c63a4b3558bdaec6ef35e087fd0562eb40ec","impliedFormat":1},{"version":"f8db4fea512ab759b2223b90ecbbe7dae919c02f8ce95ec03f7fb1cf757cfbeb","affectsGlobalScope":true,"impliedFormat":1},{"version":"19990350fca066265b2c190c9b6cde1229f35002ea2d4df8c9e397e9942f6c89","impliedFormat":99},{"version":"8fb8fdda477cd7382477ffda92c2bb7d9f7ef583b1aa531eb6b2dc2f0a206c10","impliedFormat":99},{"version":"66995b0c991b5c5d42eff1d950733f85482c7419f7296ab8952e03718169e379","impliedFormat":99},{"version":"9863f888da357e35e013ca3465b794a490a198226bd8232c2f81fb44e16ff323","impliedFormat":99},{"version":"84bc2d80326a83ee4a6e7cba2fd480b86502660770c0e24da96535af597c9f1e","impliedFormat":99},{"version":"ea27768379b866ee3f5da2419650acdb01125479f7af73580a4bceb25b79e372","impliedFormat":99},{"version":"598931eeb4362542cae5845f95c5f0e45ac668925a40ce201e244d7fe808e965","impliedFormat":99},{"version":"da9ef88cde9f715756da642ad80c4cd87a987f465d325462d6bc2a0b11d202c8","impliedFormat":99},{"version":"b4c6184d78303b0816e779a48bef779b15aea4a66028eb819aac0abee8407dea","impliedFormat":99},{"version":"db085d2171d48938a99e851dafe0e486dce9859e5dfa73c21de5ed3d4d6fb0c5","impliedFormat":99},{"version":"62a3ad1ddd1f5974b3bf105680b3e09420f2230711d6520a521fab2be1a32838","impliedFormat":99},{"version":"a77be6fc44c876bc10c897107f84eaba10790913ebdcad40fcda7e47469b2160","impliedFormat":99},{"version":"06cf55b6da5cef54eaaf51cdc3d4e5ebf16adfdd9ebd20cec7fe719be9ced017","impliedFormat":99},{"version":"91f5dbcdb25d145a56cffe957ec665256827892d779ef108eb2f3864faff523b","impliedFormat":99},{"version":"052ba354bab8fb943e0bc05a0769f7b81d7c3b3c6cd0f5cfa53c7b2da2a525c5","impliedFormat":99},{"version":"927955a3de5857e0a1c575ced5a4245e74e6821d720ed213141347dd1870197f","impliedFormat":99},{"version":"fec804d54cd97dd77e956232fc37dc13f53e160d4bbeeb5489e86eeaa91f7ebd","impliedFormat":99},{"version":"c1d53a14aad7cda2cb0b91f5daccd06c8e3f25cb26c09e008f46ad2896c80bf1","impliedFormat":1},{"version":"c789127b81f23a44e7cd20eaff043bb8ddd8b75aca955504b81217d6347709d8","impliedFormat":1},{"version":"1e13bda0589d714493973ae87a135aadb8bdadc2b8ba412a62d6a8f05f13ae76","impliedFormat":1},{"version":"9e9217786bc4dced2d11b82eaf62c77f172a2b4671f1a6353835dcbf7eef0843","impliedFormat":1},{"version":"8c18473f354a9648fd8798196f520b3c3868181c315ab6a726177e5b5d2ada1c","impliedFormat":1},{"version":"067fe0fe11f79aa3eef819ee2f1d7beecc7a6d9e95ee1b2b84553495fb61b2fe","impliedFormat":1},{"version":"65e7aa0d38b9513dad1d66fa622ca0897efd8f6e11cb3887231451eb1dde719a","impliedFormat":1},{"version":"cf8d966c5b46aa3b4e2bc55aeaf5932253a734d2c09fc9e05867d47f7fc3fe31","impliedFormat":1},{"version":"e11fb3c6b0788cddcda16e472a173c03d8729201dc325beb1251f54d2630ebbb","impliedFormat":1},{"version":"9034c961e85ef73bdd4e07e2c56d7adfa4c00ee6cf568dcfc13d059575aac8a8","impliedFormat":1},{"version":"48676769d0f4904e916425f778ae25c140370fb90b33ad85151c7ebab166a0cc","impliedFormat":1},{"version":"b70a8d1c0d9628260158c2e96982f5ffb415ca87f97388ea743e52bd6ef37a9c","impliedFormat":1},{"version":"709bae51a9b0263a888c6adf48fb1380634e37267abcea46a52eb02a14b76292","impliedFormat":1},{"version":"7a625afe5721361715736bc3f9548206e1f173dcdc43eecaf7f70557f5151361","impliedFormat":1},{"version":"4d114e382693704d3792d2d6da45adc1aa2d8a86c1b8ebe5fc225dccd30aaf36","impliedFormat":1},{"version":"329760175a249a5e13e16f281ede4d8da4a4a72d511bf631bf7e5bd363146a80","impliedFormat":1},{"version":"9fbdb40eb68109a83dcc5f19c450556b20699b4fa19783dabdfc06a9937c9c30","impliedFormat":1},{"version":"afb75becf7075fc3673a6f1f7b669b5bb909ae67609284ce6548ec44d8038a61","impliedFormat":1},{"version":"4018b7fb337b14d2a40dd091208fbd39b3400136dfda00e9995b51cf64783a9f","impliedFormat":1},{"version":"6f5a9b68ce8608014210f5a777f8dd82e6382285f6278c811b7b0214bbcac5bd","impliedFormat":1},{"version":"af11413ffc8c34a2a2475cb9d2982b4cc87a9317bf474474eedaacc4aaab4582","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","impliedFormat":1},{"version":"736097ddbb2903bef918bb3b5811ef1c9c5656f2a73bd39b22a91b9cc2525e50","impliedFormat":1},{"version":"4340936f4e937c452ae783514e7c7bbb7fc06d0c97993ff4865370d0962bb9cf","impliedFormat":1},{"version":"b70c7ea83a7d0de17a791d9b5283f664033a96362c42cc4d2b2e0bdaa65ef7d1","impliedFormat":1},{"version":"35f50e2adbdf8dd774e5296c87740f5d03dc443757bf75aee87e2b3831ae552b","impliedFormat":1},{"version":"d75ca53134de3b91925e889738a1e5cda0715fc1947380424bd61f4e9b8f7a2e","impliedFormat":1},{"version":"17230b34bb564a3a2e36f9d3985372ccab4ad1722df2c43f7c5c2b553f68e5db","impliedFormat":1},{"version":"dcb41cc4b671f5f85d3754e68dfde7824686a8adbb4c690cb259c1501cb868e1","impliedFormat":1},{"version":"21ac4cf3f8d8c6e1201cb31f600be708c9a37867fc5c73b7ccf80560fae591c8","impliedFormat":1},{"version":"0dfe35191a04e8f9dc7caeb9f52f2ee07402736563d12cbccd15fb5f31ac877f","impliedFormat":1},{"version":"fdbcb702fc789aee045791146a758ecf18b7cfd51ec1f2dfe895c3d0e35c3ac3","impliedFormat":1},{"version":"7e29f41b158de217f94cb9676bf9cbd0cd9b5a46e1985141ed36e075c52bf6ad","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac51dd7d31333793807a6abaa5ae168512b6131bd41d9c5b98477fc3b7800f9f","impliedFormat":1},{"version":"dc782ff85b2cb10075ecffc158af7bfb27ff97bf8491c917efea0c3d622d5ac4","impliedFormat":1},{"version":"be1cc4d94ea60cbe567bc29ed479d42587bf1e6cba490f123d329976b0fe4ee5","impliedFormat":1},{"version":"199f9ead0daf25ae4c5632e3d1f42570af59685294a38123eef457407e13f365","impliedFormat":1},{"version":"ab82804a14454734010dcdcd43f564ff7b0389bee4c5692eec76ff5b30d4cf66","impliedFormat":1},{"version":"03c258e060b7da220973f84b89615e4e9850e9b5d30b3a8e4840b3e3268ae8eb","impliedFormat":1},{"version":"f80cb0ced191be0a08767ee613ec61b89d193ab698c7c0c8133b49a183c5ea26","impliedFormat":1},{"version":"f874ea4d0091b0a44362a5f74d26caab2e66dec306c2bf7e8965f5106e784c3b","impliedFormat":1},{"version":"f2f23fe34b735887db1d5597714ae37a6ffae530cafd6908c9d79d485667c956","impliedFormat":1},{"version":"6ac066e6c4ed2c7177e20516664165e9c9db7c20ec463a57f45f9bf276efb337","impliedFormat":1},{"version":"bae8d023ef6b23df7da26f51cea44321f95817c190342a36882e93b80d07a960","impliedFormat":1},{"version":"26a770cec4bd2e7dbba95c6e536390fffe83c6268b78974a93727903b515c4e7","impliedFormat":1}],"root":[198,199],"options":{"allowImportingTsExtensions":false,"composite":true,"declaration":true,"declarationMap":true,"esModuleInterop":true,"module":99,"noFallthroughCasesInSwitch":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","rootDir":"../src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9,"tsBuildInfoFile":"./.tsbuildinfo","verbatimModuleSyntax":true},"referencedMap":[[237,1],[240,2],[239,1],[200,3],[201,1],[203,4],[204,4],[205,1],[206,1],[208,5],[209,1],[210,1],[211,4],[212,1],[213,1],[214,6],[215,1],[216,1],[217,7],[218,1],[219,8],[220,1],[221,1],[222,1],[223,1],[226,1],[225,9],[202,1],[227,10],[228,1],[224,1],[229,1],[230,4],[231,11],[232,12],[233,1],[207,1],[234,1],[235,13],[236,14],[245,15],[282,16],[283,17],[284,1],[286,1],[287,18],[139,19],[140,19],[141,20],[93,21],[142,22],[143,23],[144,24],[88,1],[91,25],[89,1],[90,1],[145,26],[146,27],[147,28],[148,29],[149,30],[150,31],[151,31],[152,32],[153,33],[154,34],[155,35],[94,1],[92,1],[156,36],[157,37],[158,38],[192,39],[159,40],[160,1],[161,41],[162,42],[163,43],[164,44],[165,45],[166,46],[167,47],[168,48],[169,49],[170,49],[171,50],[172,1],[173,51],[174,52],[176,53],[175,54],[177,55],[178,56],[179,57],[180,58],[181,59],[182,60],[183,61],[184,62],[185,63],[186,64],[187,65],[188,66],[189,67],[95,1],[96,1],[97,1],[136,68],[137,1],[138,1],[190,69],[191,70],[294,71],[289,72],[288,1],[298,73],[295,1],[297,74],[299,1],[300,1],[301,1],[302,1],[303,1],[304,1],[305,1],[306,1],[307,75],[98,1],[238,1],[296,1],[252,1],[253,76],[250,1],[251,1],[244,77],[285,78],[242,79],[243,80],[248,81],[261,82],[246,1],[247,83],[262,84],[257,85],[258,86],[256,87],[260,88],[254,89],[249,90],[259,91],[255,82],[293,92],[290,3],[292,93],[291,3],[193,94],[195,95],[241,96],[194,97],[273,98],[263,1],[264,99],[274,100],[275,101],[276,98],[277,98],[278,1],[281,102],[279,98],[280,1],[270,1],[267,103],[268,1],[269,1],[266,104],[265,1],[271,98],[272,1],[58,1],[59,1],[10,1],[11,1],[13,1],[12,1],[2,1],[14,1],[15,1],[16,1],[17,1],[18,1],[19,1],[20,1],[21,1],[3,1],[22,1],[23,1],[4,1],[24,1],[28,1],[25,1],[26,1],[27,1],[29,1],[30,1],[31,1],[5,1],[32,1],[33,1],[34,1],[35,1],[6,1],[39,1],[36,1],[37,1],[38,1],[40,1],[7,1],[41,1],[46,1],[47,1],[42,1],[43,1],[44,1],[45,1],[8,1],[51,1],[48,1],[49,1],[50,1],[52,1],[9,1],[53,1],[54,1],[55,1],[57,1],[56,1],[1,1],[114,105],[124,106],[113,105],[134,107],[105,108],[104,109],[133,3],[127,110],[132,111],[107,112],[121,113],[106,114],[130,115],[102,116],[101,3],[131,117],[103,118],[108,119],[109,1],[112,119],[99,1],[135,120],[125,121],[116,122],[117,123],[119,124],[115,125],[118,126],[128,3],[110,127],[111,128],[120,129],[100,130],[123,121],[122,119],[126,1],[129,131],[74,132],[66,133],[73,134],[68,1],[69,1],[67,135],[70,136],[61,1],[62,1],[63,132],[65,137],[71,1],[72,138],[64,139],[87,140],[82,141],[81,140],[80,140],[86,142],[85,140],[84,140],[83,140],[77,143],[76,140],[197,144],[196,145],[79,140],[78,140],[75,146],[60,1],[199,147],[198,148]],"latestChangedDtsFile":"./hermes.d.ts","version":"5.9.3"}
@@ -0,0 +1,185 @@
1
+ /**
2
+ * @1mbrain/hermes-adapter
3
+ *
4
+ * NOTE: This is an optional convenience wrapper tailored specifically for the Hermes
5
+ * agent framework. It serves as a reference/blueprint. For other frameworks or gateways,
6
+ * use the generic `OneMBrainClient` directly from '@1mbrain/sdk'.
7
+ *
8
+ * Hermes context objects are automatically mapped to the correct 1MBrain memory type,
9
+ * importance score, and metadata tags, so you never have to think about them in your
10
+ * agent code.
11
+ *
12
+ * Quick start:
13
+ *
14
+ * ```ts
15
+ * import { HermesMemoryAdapter } from '@1mbrain/sdk/hermes';
16
+ *
17
+ * const memory = new HermesMemoryAdapter({
18
+ * apiUrl: process.env.ONEMILLION_API_URL!,
19
+ * apiKey: process.env.ONEMILLION_API_KEY!,
20
+ * agentId: 'hermes-agent-1', // your instance name/namespace
21
+ * defaultImportance: 0.6,
22
+ * });
23
+ *
24
+ * // Store an episodic memory from a conversation turn
25
+ * await memory.rememberTurn({
26
+ * userMessage: "What is VibeAman pricing?",
27
+ * assistantReply: "VibeAman starts at Rp 150k/month.",
28
+ * });
29
+ *
30
+ * // Store a persistent user preference
31
+ * await memory.rememberPreference('preferred_language', 'Bahasa Indonesia');
32
+ *
33
+ * // Store a procedural pattern
34
+ * await memory.rememberProcedure('push_to_github', 'Create PRD → push markdown deliverable');
35
+ *
36
+ * // Recall with automatic context enrichment
37
+ * const results = await memory.recall('pricing');
38
+ * ```
39
+ */
40
+ import type { AssociateInput, Memory, SearchResult } from './index.js';
41
+ export interface HermesMemoryAdapterConfig {
42
+ apiUrl: string;
43
+ apiKey: string;
44
+ agentId?: string;
45
+ /** Default importance score for new memories (0–1). Defaults to 0.6. */
46
+ defaultImportance?: number;
47
+ /** Custom fetch implementation (useful in Cloudflare Workers / Edge). */
48
+ fetch?: typeof fetch;
49
+ }
50
+ export interface HermesTurn {
51
+ /** The raw user message from the current conversation turn. */
52
+ userMessage: string;
53
+ /** The assistant reply that was generated for this turn. */
54
+ assistantReply?: string;
55
+ /** Optional topic tags to attach to this episodic memory. */
56
+ topics?: string[];
57
+ /** Optional conversation / session ID for grouping. */
58
+ sessionId?: string;
59
+ }
60
+ export interface HermesRecallOptions {
61
+ /** Maximum number of results (default: 8). */
62
+ limit?: number;
63
+ /**
64
+ * Restrict recall to a specific memory type.
65
+ * When omitted, all types are searched.
66
+ */
67
+ type?: 'episodic' | 'semantic' | 'procedural' | 'entity' | 'warning';
68
+ /** Filter by tags. */
69
+ tags?: string[];
70
+ /** Number of graph hops for spreading activation (default: 2). */
71
+ maxHops?: number;
72
+ /**
73
+ * If provided, override the default agentId for this call.
74
+ * Useful when querying another Hermes instance's memory.
75
+ */
76
+ agentId?: string;
77
+ }
78
+ export declare class HermesMemoryAdapter {
79
+ private readonly client;
80
+ private readonly defaultImportance;
81
+ private readonly agentId?;
82
+ constructor(config: HermesMemoryAdapterConfig);
83
+ /**
84
+ * Store a conversation turn as an episodic memory.
85
+ * The content is formatted as a Q&A pair for rich recall later.
86
+ */
87
+ rememberTurn(turn: HermesTurn, agentId?: string): Promise<Memory>;
88
+ /**
89
+ * Store a durable user preference as a semantic memory.
90
+ * Semantic memories don't decay as fast and are weighted higher on recall.
91
+ */
92
+ rememberPreference(key: string, value: string, agentId?: string): Promise<Memory>;
93
+ /**
94
+ * Store a learned behavioural pattern or workflow as a procedural memory.
95
+ * Procedural memories carry high importance by default.
96
+ */
97
+ rememberProcedure(name: string, pattern: string, agentId?: string): Promise<Memory>;
98
+ /**
99
+ * General-purpose remember — uses sensible Hermes defaults.
100
+ * Delegates directly to the underlying SDK client.
101
+ */
102
+ remember(content: string, options?: {
103
+ type?: 'episodic' | 'semantic' | 'procedural';
104
+ importance?: number;
105
+ tags?: string[];
106
+ agentId?: string;
107
+ }): Promise<Memory>;
108
+ /**
109
+ * Recall memories relevant to the given query.
110
+ * Automatically uses spreading activation (2 hops) for richer results.
111
+ */
112
+ recall(query: string, options?: HermesRecallOptions): Promise<SearchResult[]>;
113
+ /**
114
+ * Recall only episodic memories (conversation history).
115
+ */
116
+ recallHistory(query: string, limit?: number, agentId?: string): Promise<SearchResult[]>;
117
+ /**
118
+ * Recall only semantic memories (facts & preferences).
119
+ */
120
+ recallFacts(query: string, limit?: number, agentId?: string): Promise<SearchResult[]>;
121
+ /**
122
+ * Recall only procedural memories (learned workflows).
123
+ */
124
+ recallProcedures(query: string, limit?: number, agentId?: string): Promise<SearchResult[]>;
125
+ /** Hard-delete a memory by ID. */
126
+ forget(memoryId: string, agentId?: string): Promise<boolean>;
127
+ /** Create an explicit association between two memories. */
128
+ associate(sourceId: string, targetId: string, strength?: number, agentId?: string, relationType?: AssociateInput['relationType']): Promise<boolean>;
129
+ /**
130
+ * Build a formatted memory context block for injection into an LLM system prompt.
131
+ *
132
+ * Returns a markdown-formatted string listing the most relevant memories
133
+ * so Hermes can surface them to the model without manual formatting.
134
+ *
135
+ * @example
136
+ * const ctx = await memory.buildContext('user preferences');
137
+ * systemPrompt = `${baseSystemPrompt}\n\n${ctx}`;
138
+ */
139
+ buildContext(query: string, limit?: number, agentId?: string): Promise<string>;
140
+ /**
141
+ * Ingest a web page URL and store its factual content as memories.
142
+ *
143
+ * The server-side pipeline automatically:
144
+ * 1. Fetches the URL
145
+ * 2. Converts HTML → Markdown (noise stripped)
146
+ * 3. Chunks the content
147
+ * 4. Extracts factual claims via LLM (using your configured provider)
148
+ * 5. Stores facts with type/importance/metadata auto-set
149
+ * 6. Deduplicates (won't re-ingest the same page content twice)
150
+ *
151
+ * Works from any gateway: Telegram, Discord, browser extension, CLI.
152
+ *
153
+ * @example
154
+ * // Telegram bot handler
155
+ * if (message.startsWith('/learn ')) {
156
+ * const url = message.slice(7).trim();
157
+ * const result = await memory.learnFromUrl(url);
158
+ * return `✅ Learned ${result.storedCount} facts from "${result.title}"`;
159
+ * }
160
+ */
161
+ learnFromUrl(url: string, options?: {
162
+ agentId?: string;
163
+ confidenceThreshold?: number;
164
+ maxChunkChars?: number;
165
+ deduplicate?: boolean;
166
+ }): Promise<{
167
+ ok: boolean;
168
+ title: string;
169
+ url: string;
170
+ storedCount: number;
171
+ deduplicated: boolean;
172
+ memoryIds: string[];
173
+ error?: string;
174
+ }>;
175
+ /**
176
+ * Recall memories that were ingested from a specific source domain or URL pattern.
177
+ *
178
+ * Uses the `domain:` tag automatically added during ingestion.
179
+ *
180
+ * @example
181
+ * const newsFromKompas = await memory.recallFromSource('kompas.com', 'AI regulation');
182
+ */
183
+ recallFromSource(domain: string, query: string, limit?: number, agentId?: string): Promise<SearchResult[]>;
184
+ }
185
+ //# sourceMappingURL=hermes.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hermes.d.ts","sourceRoot":"","sources":["../src/hermes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAGH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAMvE,MAAM,WAAW,yBAAyB;IACxC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,wEAAwE;IACxE,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,yEAAyE;IACzE,KAAK,CAAC,EAAE,OAAO,KAAK,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IAC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O,CAAC,EAAE,MAAM,CAAC;QACjB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;QACvB,WAAW,CAAC,EAAE,OAAO,CAAC;KAClB,GACL,OAAO,CAAC;QACT,EAAE,EAAE,OAAO,CAAC;QACZ,KAAK,EAAE,MAAM,CAAC;QACd,GAAG,EAAE,MAAM,CAAC;QACZ,WAAW,EAAE,MAAM,CAAC;QACpB,YAAY,EAAE,OAAO,CAAC;QACtB,SAAS,EAAE,MAAM,EAAE,CAAC;QACpB,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;IAmBF;;;;;;;OAOG;IACG,gBAAgB,CACpB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,KAAK,SAAI,EACT,OAAO,CAAC,EAAE,MAAM,GACf,OAAO,CAAC,YAAY,EAAE,CAAC;CAO3B"}
package/dist/hermes.js ADDED
@@ -0,0 +1,248 @@
1
+ /**
2
+ * @1mbrain/hermes-adapter
3
+ *
4
+ * NOTE: This is an optional convenience wrapper tailored specifically for the Hermes
5
+ * agent framework. It serves as a reference/blueprint. For other frameworks or gateways,
6
+ * use the generic `OneMBrainClient` directly from '@1mbrain/sdk'.
7
+ *
8
+ * Hermes context objects are automatically mapped to the correct 1MBrain memory type,
9
+ * importance score, and metadata tags, so you never have to think about them in your
10
+ * agent code.
11
+ *
12
+ * Quick start:
13
+ *
14
+ * ```ts
15
+ * import { HermesMemoryAdapter } from '@1mbrain/sdk/hermes';
16
+ *
17
+ * const memory = new HermesMemoryAdapter({
18
+ * apiUrl: process.env.ONEMILLION_API_URL!,
19
+ * apiKey: process.env.ONEMILLION_API_KEY!,
20
+ * agentId: 'hermes-agent-1', // your instance name/namespace
21
+ * defaultImportance: 0.6,
22
+ * });
23
+ *
24
+ * // Store an episodic memory from a conversation turn
25
+ * await memory.rememberTurn({
26
+ * userMessage: "What is VibeAman pricing?",
27
+ * assistantReply: "VibeAman starts at Rp 150k/month.",
28
+ * });
29
+ *
30
+ * // Store a persistent user preference
31
+ * await memory.rememberPreference('preferred_language', 'Bahasa Indonesia');
32
+ *
33
+ * // Store a procedural pattern
34
+ * await memory.rememberProcedure('push_to_github', 'Create PRD → push markdown deliverable');
35
+ *
36
+ * // Recall with automatic context enrichment
37
+ * const results = await memory.recall('pricing');
38
+ * ```
39
+ */
40
+ import { OneMBrainClient } from './index.js';
41
+ // ---------------------------------------------------------------------------
42
+ // Adapter
43
+ // ---------------------------------------------------------------------------
44
+ export class HermesMemoryAdapter {
45
+ client;
46
+ defaultImportance;
47
+ agentId;
48
+ constructor(config) {
49
+ this.client = new OneMBrainClient({
50
+ apiUrl: config.apiUrl,
51
+ apiKey: config.apiKey,
52
+ agentId: config.agentId,
53
+ fetch: config.fetch,
54
+ });
55
+ this.defaultImportance = config.defaultImportance ?? 0.6;
56
+ this.agentId = config.agentId;
57
+ }
58
+ // ------------------------------------------------------------------
59
+ // Specialised remember helpers
60
+ // ------------------------------------------------------------------
61
+ /**
62
+ * Store a conversation turn as an episodic memory.
63
+ * The content is formatted as a Q&A pair for rich recall later.
64
+ */
65
+ async rememberTurn(turn, agentId) {
66
+ const content = turn.assistantReply
67
+ ? `User: ${turn.userMessage}\nHermes: ${turn.assistantReply}`
68
+ : `User: ${turn.userMessage}`;
69
+ const tags = ['episodic', 'conversation-turn', ...(turn.topics ?? [])];
70
+ if (turn.sessionId)
71
+ tags.push(`session:${turn.sessionId}`);
72
+ return this.client.remember({
73
+ content,
74
+ type: 'episodic',
75
+ importance: this.defaultImportance,
76
+ tags,
77
+ agentId,
78
+ });
79
+ }
80
+ /**
81
+ * Store a durable user preference as a semantic memory.
82
+ * Semantic memories don't decay as fast and are weighted higher on recall.
83
+ */
84
+ async rememberPreference(key, value, agentId) {
85
+ return this.client.remember({
86
+ content: `User preference — ${key}: ${value}`,
87
+ type: 'semantic',
88
+ importance: 0.85,
89
+ tags: ['semantic', 'preference', `pref:${key}`],
90
+ agentId,
91
+ });
92
+ }
93
+ /**
94
+ * Store a learned behavioural pattern or workflow as a procedural memory.
95
+ * Procedural memories carry high importance by default.
96
+ */
97
+ async rememberProcedure(name, pattern, agentId) {
98
+ return this.client.remember({
99
+ content: `Procedure — ${name}: ${pattern}`,
100
+ type: 'procedural',
101
+ importance: 0.9,
102
+ tags: ['procedural', 'workflow', `proc:${name}`],
103
+ agentId,
104
+ });
105
+ }
106
+ /**
107
+ * General-purpose remember — uses sensible Hermes defaults.
108
+ * Delegates directly to the underlying SDK client.
109
+ */
110
+ async remember(content, options = {}) {
111
+ return this.client.remember({
112
+ content,
113
+ type: options.type ?? 'episodic',
114
+ importance: options.importance ?? this.defaultImportance,
115
+ tags: ['source:hermes', ...(options.tags ?? [])],
116
+ agentId: options.agentId,
117
+ });
118
+ }
119
+ // ------------------------------------------------------------------
120
+ // Recall
121
+ // ------------------------------------------------------------------
122
+ /**
123
+ * Recall memories relevant to the given query.
124
+ * Automatically uses spreading activation (2 hops) for richer results.
125
+ */
126
+ async recall(query, options = {}) {
127
+ return this.client.recall({
128
+ query,
129
+ limit: options.limit ?? 8,
130
+ type: options.type,
131
+ maxHops: options.maxHops ?? 2,
132
+ agentId: options.agentId,
133
+ });
134
+ }
135
+ /**
136
+ * Recall only episodic memories (conversation history).
137
+ */
138
+ async recallHistory(query, limit = 5, agentId) {
139
+ return this.recall(query, { type: 'episodic', limit, agentId });
140
+ }
141
+ /**
142
+ * Recall only semantic memories (facts & preferences).
143
+ */
144
+ async recallFacts(query, limit = 5, agentId) {
145
+ return this.recall(query, { type: 'semantic', limit, agentId });
146
+ }
147
+ /**
148
+ * Recall only procedural memories (learned workflows).
149
+ */
150
+ async recallProcedures(query, limit = 5, agentId) {
151
+ return this.recall(query, { type: 'procedural', limit, agentId });
152
+ }
153
+ // ------------------------------------------------------------------
154
+ // Forget
155
+ // ------------------------------------------------------------------
156
+ /** Hard-delete a memory by ID. */
157
+ async forget(memoryId, agentId) {
158
+ return this.client.forget(memoryId, { agentId });
159
+ }
160
+ // ------------------------------------------------------------------
161
+ // Associate
162
+ // ------------------------------------------------------------------
163
+ /** Create an explicit association between two memories. */
164
+ async associate(sourceId, targetId, strength = 0.5, agentId, relationType = 'relates_to') {
165
+ return this.client.associate(sourceId, { targetId, strength, origin: 'explicit', agentId, relationType });
166
+ }
167
+ // ------------------------------------------------------------------
168
+ // Context builder (for injecting memory into LLM prompts)
169
+ // ------------------------------------------------------------------
170
+ /**
171
+ * Build a formatted memory context block for injection into an LLM system prompt.
172
+ *
173
+ * Returns a markdown-formatted string listing the most relevant memories
174
+ * so Hermes can surface them to the model without manual formatting.
175
+ *
176
+ * @example
177
+ * const ctx = await memory.buildContext('user preferences');
178
+ * systemPrompt = `${baseSystemPrompt}\n\n${ctx}`;
179
+ */
180
+ async buildContext(query, limit = 6, agentId) {
181
+ const results = await this.recall(query, { limit, agentId });
182
+ if (results.length === 0)
183
+ return '';
184
+ const lines = ['## Relevant Memories', ''];
185
+ for (const { memory, score } of results) {
186
+ const typeLabel = memory.type.charAt(0).toUpperCase() + memory.type.slice(1);
187
+ lines.push(`- [${typeLabel}] (relevance: ${score.toFixed(2)}) ${memory.content}`);
188
+ }
189
+ return lines.join('\n');
190
+ }
191
+ // ------------------------------------------------------------------
192
+ // Web Page Ingestion (Phase 6)
193
+ // ------------------------------------------------------------------
194
+ /**
195
+ * Ingest a web page URL and store its factual content as memories.
196
+ *
197
+ * The server-side pipeline automatically:
198
+ * 1. Fetches the URL
199
+ * 2. Converts HTML → Markdown (noise stripped)
200
+ * 3. Chunks the content
201
+ * 4. Extracts factual claims via LLM (using your configured provider)
202
+ * 5. Stores facts with type/importance/metadata auto-set
203
+ * 6. Deduplicates (won't re-ingest the same page content twice)
204
+ *
205
+ * Works from any gateway: Telegram, Discord, browser extension, CLI.
206
+ *
207
+ * @example
208
+ * // Telegram bot handler
209
+ * if (message.startsWith('/learn ')) {
210
+ * const url = message.slice(7).trim();
211
+ * const result = await memory.learnFromUrl(url);
212
+ * return `✅ Learned ${result.storedCount} facts from "${result.title}"`;
213
+ * }
214
+ */
215
+ async learnFromUrl(url, options = {}) {
216
+ const agentId = options.agentId ?? this.agentId;
217
+ const result = await this.client.ingestUrl(url, {
218
+ agentId,
219
+ confidenceThreshold: options.confidenceThreshold,
220
+ maxChunkChars: options.maxChunkChars,
221
+ deduplicate: options.deduplicate,
222
+ });
223
+ return {
224
+ ok: true,
225
+ title: result.title,
226
+ url: result.url,
227
+ storedCount: result.storedCount,
228
+ deduplicated: result.deduplicated,
229
+ memoryIds: result.memoryIds,
230
+ };
231
+ }
232
+ /**
233
+ * Recall memories that were ingested from a specific source domain or URL pattern.
234
+ *
235
+ * Uses the `domain:` tag automatically added during ingestion.
236
+ *
237
+ * @example
238
+ * const newsFromKompas = await memory.recallFromSource('kompas.com', 'AI regulation');
239
+ */
240
+ async recallFromSource(domain, query, limit = 8, agentId) {
241
+ return this.recall(query, {
242
+ limit,
243
+ agentId,
244
+ tags: [`domain:${domain}`],
245
+ });
246
+ }
247
+ }
248
+ //# sourceMappingURL=hermes.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hermes.js","sourceRoot":"","sources":["../src/hermes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsCG;AAEH,OAAO,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AA+C7C,8EAA8E;AAC9E,UAAU;AACV,8EAA8E;AAE9E,MAAM,OAAO,mBAAmB;IACb,MAAM,CAAkB;IACxB,iBAAiB,CAAS;IAC1B,OAAO,CAAU;IAElC,YAAY,MAAiC;QAC3C,IAAI,CAAC,MAAM,GAAG,IAAI,eAAe,CAAC;YAChC,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,MAAM,EAAE,MAAM,CAAC,MAAM;YACrB,OAAO,EAAE,MAAM,CAAC,OAAO;YACvB,KAAK,EAAE,MAAM,CAAC,KAAK;SACpB,CAAC,CAAC;QACH,IAAI,CAAC,iBAAiB,GAAG,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EACb,KAAK,GAAG,CAAC,EACT,OAAgB;QAEhB,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE;YACxB,KAAK;YACL,OAAO;YACP,IAAI,EAAE,CAAC,UAAU,MAAM,EAAE,CAAC;SAC3B,CAAC,CAAC;IACL,CAAC;CACF"}
@@ -0,0 +1,99 @@
1
+ import type { CreateAssociationInput, CreateMemoryInput, Memory, SearchMemoryInput, SearchResult } from '@1mbrain/core';
2
+ export interface OneMBrainClientConfig {
3
+ apiUrl: string;
4
+ apiKey: string;
5
+ agentId?: string;
6
+ fetch?: typeof fetch;
7
+ }
8
+ export type RememberInput = Omit<CreateMemoryInput, 'agentId'> & {
9
+ agentId?: string;
10
+ };
11
+ export type RecallInput = Omit<SearchMemoryInput, 'agentId'> & {
12
+ agentId?: string;
13
+ };
14
+ export type AssociateInput = Omit<CreateAssociationInput, 'sourceId' | 'agentId'> & {
15
+ agentId?: string;
16
+ };
17
+ export interface IngestUrlOptions {
18
+ agentId?: string;
19
+ confidenceThreshold?: number;
20
+ maxChunkChars?: number;
21
+ deduplicate?: boolean;
22
+ }
23
+ export interface IngestResult {
24
+ title: string;
25
+ url: string;
26
+ sourceHash: string;
27
+ chunkCount: number;
28
+ extractedCount: number;
29
+ storedCount: number;
30
+ skippedCount: number;
31
+ errorCount: number;
32
+ deduplicated: boolean;
33
+ memoryIds: string[];
34
+ }
35
+ export interface ConsolidateOptions {
36
+ agentId?: string;
37
+ dryRun?: boolean;
38
+ clusterStrategy?: 'tags' | 'graph' | 'hybrid';
39
+ }
40
+ export interface ConsolidationResult {
41
+ agentId: string;
42
+ triggerReason: 'sleep-cycle' | 'threshold';
43
+ dryRun: boolean;
44
+ storedCount: number;
45
+ archivedCount: number;
46
+ clustersProcessed: number;
47
+ skipped: {
48
+ noCandidates: number;
49
+ tooSmallClusters: number;
50
+ summarizationFailed: number;
51
+ dryRun: number;
52
+ };
53
+ errors: string[];
54
+ summaryIds: string[];
55
+ }
56
+ export interface ApiEnvelope<T> {
57
+ success: boolean;
58
+ data: T;
59
+ meta?: Record<string, unknown>;
60
+ message?: string;
61
+ }
62
+ export declare class OneMBrainError extends Error {
63
+ readonly status: number;
64
+ readonly details?: unknown | undefined;
65
+ constructor(message: string, status: number, details?: unknown | undefined);
66
+ }
67
+ export declare class OneMBrainClient {
68
+ private readonly apiUrl;
69
+ private readonly apiKey;
70
+ private readonly agentId?;
71
+ private readonly fetchFn;
72
+ constructor(config: OneMBrainClientConfig);
73
+ remember(input: RememberInput): Promise<Memory>;
74
+ recall(input: RecallInput): Promise<SearchResult[]>;
75
+ forget(id: string, options?: {
76
+ agentId?: string;
77
+ }): Promise<boolean>;
78
+ associate(sourceId: string, input: AssociateInput): Promise<boolean>;
79
+ /**
80
+ * Ingest a web page URL into memory.
81
+ *
82
+ * The server-side pipeline will:
83
+ * 1. Fetch the page HTML
84
+ * 2. Extract main content → Markdown
85
+ * 3. Chunk and extract factual claims via LLM
86
+ * 4. Store facts as memories (type, importance, metadata auto-set)
87
+ *
88
+ * Works from any gateway: Telegram, Discord, browser extension, CLI.
89
+ *
90
+ * @param url - The URL to ingest
91
+ * @param options - Optional overrides (agentId, confidenceThreshold, etc.)
92
+ */
93
+ ingestUrl(url: string, options?: IngestUrlOptions): Promise<IngestResult>;
94
+ consolidate(options?: ConsolidateOptions): Promise<ConsolidationResult>;
95
+ private resolveAgentId;
96
+ private request;
97
+ }
98
+ export type { Memory, SearchResult };
99
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,iBAAiB,EACjB,MAAM,EACN,iBAAiB,EACjB,YAAY,EACb,MAAM,eAAe,CAAC;AAEvB,MAAM,WAAW,qBAAqB;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACj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CAAC;IASxE,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,OAAO,CAAC;IAkB1E;;;;;;;;;;;;;OAaG;IACG,SAAS,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,YAAY,CAAC;IAiB7E,WAAW,CAAC,OAAO,GAAE,kBAAuB,GAAG,OAAO,CAAC,mBAAmB,CAAC;IAejF,OAAO,CAAC,cAAc;YAUR,OAAO;CA8BtB;AAuDD,YAAY,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,177 @@
1
+ export class OneMBrainError extends Error {
2
+ status;
3
+ details;
4
+ constructor(message, status, details) {
5
+ super(message);
6
+ this.status = status;
7
+ this.details = details;
8
+ this.name = 'OneMBrainError';
9
+ }
10
+ }
11
+ export class OneMBrainClient {
12
+ apiUrl;
13
+ apiKey;
14
+ agentId;
15
+ fetchFn;
16
+ constructor(config) {
17
+ if (!config.apiUrl) {
18
+ throw new Error('apiUrl is required');
19
+ }
20
+ if (!config.apiKey) {
21
+ throw new Error('apiKey is required');
22
+ }
23
+ this.apiUrl = config.apiUrl.replace(/\/+$/, '');
24
+ this.apiKey = config.apiKey;
25
+ this.agentId = config.agentId;
26
+ this.fetchFn = config.fetch ?? fetch;
27
+ }
28
+ async remember(input) {
29
+ const agentId = this.resolveAgentId(input.agentId);
30
+ const envelope = await this.request('/v1/memories', {
31
+ method: 'POST',
32
+ agentId,
33
+ body: {
34
+ ...input,
35
+ agentId,
36
+ },
37
+ });
38
+ return deserializeMemory(envelope.data);
39
+ }
40
+ async recall(input) {
41
+ const agentId = this.resolveAgentId(input.agentId);
42
+ const params = toSearchParams({
43
+ ...input,
44
+ agentId,
45
+ q: input.query,
46
+ query: undefined,
47
+ });
48
+ const envelope = await this.request(`/v1/memories/search?${params.toString()}`, {
49
+ method: 'GET',
50
+ agentId,
51
+ });
52
+ return envelope.data.map((result) => ({
53
+ ...result,
54
+ memory: deserializeMemory(result.memory),
55
+ }));
56
+ }
57
+ async forget(id, options = {}) {
58
+ const envelope = await this.request(`/v1/memories/${id}`, {
59
+ method: 'DELETE',
60
+ agentId: this.resolveAgentId(options.agentId),
61
+ });
62
+ return envelope.success;
63
+ }
64
+ async associate(sourceId, input) {
65
+ const envelope = await this.request(`/v1/memories/${sourceId}/associate`, {
66
+ method: 'POST',
67
+ agentId: this.resolveAgentId(input.agentId),
68
+ body: {
69
+ targetId: input.targetId,
70
+ strength: input.strength,
71
+ origin: input.origin,
72
+ relationType: input.relationType,
73
+ },
74
+ });
75
+ return envelope.success;
76
+ }
77
+ /**
78
+ * Ingest a web page URL into memory.
79
+ *
80
+ * The server-side pipeline will:
81
+ * 1. Fetch the page HTML
82
+ * 2. Extract main content → Markdown
83
+ * 3. Chunk and extract factual claims via LLM
84
+ * 4. Store facts as memories (type, importance, metadata auto-set)
85
+ *
86
+ * Works from any gateway: Telegram, Discord, browser extension, CLI.
87
+ *
88
+ * @param url - The URL to ingest
89
+ * @param options - Optional overrides (agentId, confidenceThreshold, etc.)
90
+ */
91
+ async ingestUrl(url, options = {}) {
92
+ const agentId = this.resolveAgentId(options.agentId);
93
+ const envelope = await this.request('/v1/ingest/url', {
94
+ method: 'POST',
95
+ agentId,
96
+ body: {
97
+ url,
98
+ agentId,
99
+ confidenceThreshold: options.confidenceThreshold,
100
+ maxChunkChars: options.maxChunkChars,
101
+ deduplicate: options.deduplicate,
102
+ },
103
+ });
104
+ return envelope.data;
105
+ }
106
+ async consolidate(options = {}) {
107
+ const agentId = this.resolveAgentId(options.agentId);
108
+ const envelope = await this.request('/v1/consolidate', {
109
+ method: 'POST',
110
+ agentId,
111
+ body: {
112
+ agentId,
113
+ dryRun: options.dryRun,
114
+ clusterStrategy: options.clusterStrategy,
115
+ },
116
+ });
117
+ return envelope.data;
118
+ }
119
+ resolveAgentId(agentId) {
120
+ const resolved = agentId ?? this.agentId;
121
+ if (!resolved) {
122
+ throw new Error('agentId is required');
123
+ }
124
+ return resolved;
125
+ }
126
+ async request(path, options) {
127
+ const response = await this.fetchFn(`${this.apiUrl}${path}`, {
128
+ method: options.method,
129
+ headers: {
130
+ 'content-type': 'application/json',
131
+ 'x-api-key': this.apiKey,
132
+ 'x-agent-id': options.agentId,
133
+ },
134
+ body: options.body === undefined ? undefined : JSON.stringify(options.body),
135
+ });
136
+ const payload = await readJson(response);
137
+ if (!response.ok) {
138
+ throw new OneMBrainError(extractErrorMessage(payload, response.statusText), response.status, payload);
139
+ }
140
+ return payload;
141
+ }
142
+ }
143
+ function deserializeMemory(memory) {
144
+ return {
145
+ ...memory,
146
+ createdAt: new Date(memory.createdAt),
147
+ lastAccessedAt: new Date(memory.lastAccessedAt),
148
+ };
149
+ }
150
+ function toSearchParams(input) {
151
+ const params = new URLSearchParams();
152
+ for (const [key, value] of Object.entries(input)) {
153
+ if (value === undefined || value === null) {
154
+ continue;
155
+ }
156
+ if (Array.isArray(value)) {
157
+ params.set(key, value.join(','));
158
+ continue;
159
+ }
160
+ params.set(key, String(value));
161
+ }
162
+ return params;
163
+ }
164
+ async function readJson(response) {
165
+ const text = await response.text();
166
+ return text ? JSON.parse(text) : {};
167
+ }
168
+ function extractErrorMessage(payload, fallback) {
169
+ if (payload && typeof payload === 'object' && 'error' in payload) {
170
+ return String(payload.error);
171
+ }
172
+ if (payload && typeof payload === 'object' && 'message' in payload) {
173
+ return String(payload.message);
174
+ }
175
+ return fallback || '1MBrain request failed';
176
+ }
177
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA6EA,MAAM,OAAO,cAAe,SAAQ,KAAK;IAG5B;IACA;IAHX,YACE,OAAe,EACN,MAAc,EACd,OAAiB;QAE1B,KAAK,CAAC,OAAO,CAAC,CAAC;QAHN,WAAM,GAAN,MAAM,CAAQ;QACd,YAAO,GAAP,OAAO,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AAS;QACX,CAAC;QAED,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IACjC,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,KAAK,UAAU,QAAQ,CAAC,QAAkB;IACxC,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IACnC,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;AACtC,CAAC;AAED,SAAS,mBAAmB,CAAC,OAAgB,EAAE,QAAgB;IAC7D,IAAI,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,OAAO,IAAI,OAAO,EAAE,CAAC;QACjE,OAAO,MAAM,CAAE,OAA8B,CAAC,KAAK,CAAC,CAAC;IACvD,CAAC;IAED,IAAI,OAAO,IAAI,OAAO,OAAO,KAAK,QAAQ,IAAI,SAAS,IAAI,OAAO,EAAE,CAAC;QACnE,OAAO,MAAM,CAAE,OAAgC,CAAC,OAAO,CAAC,CAAC;IAC3D,CAAC;IAED,OAAO,QAAQ,IAAI,wBAAwB,CAAC;AAC9C,CAAC"}
package/package.json ADDED
@@ -0,0 +1,38 @@
1
+ {
2
+ "name": "@1mbrain/sdk",
3
+ "version": "0.1.0",
4
+ "description": "TypeScript client SDK for the 1MBrain REST API.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.js",
12
+ "types": "./dist/index.d.ts"
13
+ },
14
+ "./hermes": {
15
+ "import": "./dist/hermes.js",
16
+ "types": "./dist/hermes.d.ts"
17
+ }
18
+ },
19
+ "scripts": {
20
+ "build": "tsc -p tsconfig.json",
21
+ "dev": "tsc -p tsconfig.json --watch",
22
+ "test": "vitest run",
23
+ "typecheck": "tsc -p tsconfig.json --noEmit"
24
+ },
25
+ "dependencies": {
26
+ "@1mbrain/core": "*"
27
+ },
28
+ "devDependencies": {
29
+ "typescript": "^5.7.0",
30
+ "vitest": "^2.1.0"
31
+ },
32
+ "files": [
33
+ "dist"
34
+ ],
35
+ "publishConfig": {
36
+ "access": "public"
37
+ }
38
+ }