@localhostdevs/sdk 0.3.0 → 0.3.1

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 CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  The JavaScript SDK for building bots on **[localhostdevs](https://localhostdevs.com)** — run your app on your own laptop and publish it as a command-driven bot that anyone can use through a chat-style interface.
4
4
 
5
+ > Pre-1.0: API surface may break in minor versions (`0.x → 0.y`). Once the platform launches with external users, we'll cut a 1.0 that promises stability.
6
+
5
7
  ## Install
6
8
 
7
9
  ```bash
@@ -17,7 +19,6 @@ import { Bot } from '@localhostdevs/sdk';
17
19
 
18
20
  const bot = new Bot({
19
21
  id: 'price-bot', // your bot's handle (matches the @handle on the marketplace)
20
- natsUrl: 'nats://broker.localhostdevs.com:4222',
21
22
  // apiKey: process.env.LHD_API_KEY, // optional; auto-read from env if unset
22
23
  });
23
24
 
@@ -39,20 +40,18 @@ Then:
39
40
  LHD_API_KEY=<your bot's API key from the dashboard> node app.js
40
41
  ```
41
42
 
42
- The bot stays online for as long as the process runs. Heartbeats fire every 5 seconds so the marketplace shows it as online.
43
+ The bot stays online for as long as the process runs. The gateway keeps the connection healthy via heartbeats; consumers see your bot as **online** while it's connected.
43
44
 
44
45
  ## API
45
46
 
46
47
  ### `new Bot(opts)`
47
48
 
48
- | Option | Type | Default | Notes |
49
- | -------------------- | ------------------- | ---------------------------- | --------------------------------------------------------------------------------------------------------------------------- |
50
- | `id` | `string` (required) | — | Your bot's handle. Lowercase letters / digits / dashes. |
51
- | `apiKey` | `string` | `process.env.LHD_API_KEY` | **Preferred.** Per-bot API key from the dashboard. The broker validates it and scopes you to your own subjects only. |
52
- | `natsUrl` | `string` | `nats://localhost:4222` | The NATS broker URL. |
53
- | `natsToken` | `string` | `process.env.LHD_NATS_TOKEN` | **Deprecated** kept for the v0.2 v0.3 transition. Shared broker token; will be removed in v0.4. Don't use for new bots. |
54
- | `heartbeatMs` | `number` | `5000` | Heartbeat interval in milliseconds. |
55
- | `idempotencyLruSize` | `number` | `1024` | How many recent message IDs to remember for deduplication. |
49
+ | Option | Type | Default | Notes |
50
+ | -------------------- | ------------------- | ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
51
+ | `id` | `string` (required) | — | Your bot's handle. Lowercase letters / digits / dashes. |
52
+ | `apiKey` | `string` (required) | `process.env.LHD_API_KEY` | Per-bot API key from the dashboard. The gateway validates it and scopes you to your own bot only. |
53
+ | `serverUrl` | `string` | `process.env.LHD_SERVER_URL` or `wss://bot-api.localhostdevs.com` | Gateway WebSocket URL. Override for local testing against a self-hosted gateway. |
54
+ | `idempotencyLruSize` | `number` | `1024` | How many recent message IDs to remember for deduplication. |
56
55
 
57
56
  ### `bot.cmd(name, handler)`
58
57
 
@@ -74,23 +73,19 @@ bot.cmd('greet', async (ctx) => {
74
73
 
75
74
  ### `await bot.connect()`
76
75
 
77
- Open the NATS connection, subscribe to your command subject, and start emitting heartbeats. Resolves after the subscription is registered with the broker safe to publish from outside immediately after.
76
+ Open the WebSocket to the gateway, authenticate, and start receiving commands. Resolves after the gateway sends `HELLO` (the SDK is ready for traffic).
78
77
 
79
78
  ### `await bot.disconnect()`
80
79
 
81
- Stop heartbeats, drain the subscription, close the connection.
82
-
83
- ### `bot.subjectFor(commandName)`
84
-
85
- Helper that returns the NATS subject this command would land on. Useful in tests and scripts.
80
+ Close the WebSocket cleanly.
86
81
 
87
82
  ## Idempotency
88
83
 
89
- Every command from the platform carries a `msgId`. The SDK deduplicates redelivered messages via a fixed-size LRU keyed by `msgId`. If a consumer accidentally re-sends the same command, your handler runs once.
84
+ Every command from the gateway carries a `msgId`. The SDK deduplicates redelivered messages via a fixed-size LRU keyed by `msgId`. If the gateway happens to deliver the same command twice, your handler runs once.
90
85
 
91
- ## Heartbeats
86
+ ## Online / offline status
92
87
 
93
- The SDK publishes a heartbeat every `heartbeatMs` (default 5s) so the marketplace can show your bot as **online**. If heartbeats stop arriving for >15s the bot appears **stale**; >30s it goes **offline**.
88
+ The gateway pings the bot every 30 seconds and the SDK responds. If the gateway stops hearing from you for >60 seconds it marks the bot offline. Reconnect simply by starting the process again.
94
89
 
95
90
  ## Bot-to-bot composition
96
91
 
@@ -107,6 +102,17 @@ bot.cmd('summary', async (ctx) => {
107
102
 
108
103
  Chains run up to depth 5 with loop detection. The original consumer pays for every step.
109
104
 
105
+ ## Migrating from v0.2 → v0.3 (gateway pivot)
106
+
107
+ v0.3 is a breaking change vs v0.2 — the SDK no longer talks to NATS directly. It opens a WebSocket to the managed gateway and auths with a per-bot API key:
108
+
109
+ | Was (v0.2) | Now (v0.3) |
110
+ | -------------------------------------- | ------------------------------ |
111
+ | `new Bot({ id, natsUrl: 'nats://…' })` | `new Bot({ id, apiKey: '…' })` |
112
+ | `LHD_NATS_TOKEN=… node app.js` | `LHD_API_KEY=… node app.js` |
113
+
114
+ Drop the `natsUrl` and `natsToken` options entirely — the SDK figures out the right gateway URL on its own. Use your bot's **per-bot API key** from the dashboard (not the old shared broker token).
115
+
110
116
  ## License
111
117
 
112
118
  MIT
package/dist/bot.d.ts CHANGED
@@ -2,25 +2,29 @@ import { nanoid } from 'nanoid';
2
2
  import type { BotOptions, CommandHandler } from './types.js';
3
3
  export declare class Bot {
4
4
  private readonly opts;
5
- private nc;
6
- private subscription;
7
- private heartbeatTimer;
5
+ private transport;
8
6
  private readonly handlers;
9
7
  private readonly seen;
10
8
  private readonly seenQueue;
11
9
  constructor(opts: BotOptions);
12
10
  /** Register a handler for a command. Must be called before connect(). */
13
11
  cmd(name: string, handler: CommandHandler): this;
14
- /** Helper for tests + scripts: the subject a command should be published to. */
15
- subjectFor(command: string): string;
16
- /** Open NATS connection, subscribe to command subjects, start heartbeat. */
12
+ /** Open WS connection to the gateway, identify, await HELLO, ready to receive commands. */
17
13
  connect(): Promise<void>;
18
- /** Tear down: stop heartbeat, drain subscription, close NATS. */
14
+ /**
15
+ * Resolution order for apiKey at connect time:
16
+ * 1. constructor opts / LHD_API_KEY env
17
+ * 2. ~/.localhostdevs/credentials.json[id]
18
+ * 3. (interactive TTY) browser-based SSO; cache the result for next time
19
+ */
20
+ private resolveApiKey;
21
+ /** Close the gateway connection. */
19
22
  disconnect(): Promise<void>;
20
- private publishHeartbeat;
21
- private consume;
23
+ private dispatch;
24
+ private makeContext;
22
25
  private isDuplicate;
23
26
  private recordSeen;
24
27
  }
28
+ export declare const SDK_PACKAGE_VERSION = "0.3.1";
25
29
  export { nanoid };
26
30
  //# sourceMappingURL=bot.d.ts.map
package/dist/bot.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"bot.d.ts","sourceRoot":"","sources":["../src/bot.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,KAAK,EAAE,UAAU,EAAmB,cAAc,EAAqB,MAAM,YAAY,CAAC;AAYjG,qBAAa,GAAG;IACd,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAqB;IAC1C,OAAO,CAAC,EAAE,CAA+B;IACzC,OAAO,CAAC,YAAY,CAA6B;IACjD,OAAO,CAAC,cAAc,CAA+C;IACrE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqC;IAC9D,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA0B;IAC/C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAgB;gBAE9B,IAAI,EAAE,UAAU;IAc5B,yEAAyE;IACzE,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;IAWhD,gFAAgF;IAChF,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM;IAInC,4EAA4E;IACtE,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IA+B9B,iEAAiE;IAC3D,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAejC,OAAO,CAAC,gBAAgB;YAMV,OAAO;IA+BrB,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,UAAU;CAQnB;AAGD,OAAO,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"bot.d.ts","sourceRoot":"","sources":["../src/bot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIhC,OAAO,KAAK,EAAE,UAAU,EAAkB,cAAc,EAAa,MAAM,YAAY,CAAC;AAcxF,qBAAa,GAAG;IACd,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAqB;IAC1C,OAAO,CAAC,SAAS,CAA0B;IAC3C,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqC;IAC9D,OAAO,CAAC,QAAQ,CAAC,IAAI,CAA0B;IAC/C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAgB;gBAE9B,IAAI,EAAE,UAAU;IAc5B,yEAAyE;IACzE,GAAG,CAAC,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,cAAc,GAAG,IAAI;IAWhD,2FAA2F;IACrF,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC;IAuB9B;;;;;OAKG;YACW,aAAa;IAoB3B,oCAAoC;IAC9B,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;YAOnB,QAAQ;IAiBtB,OAAO,CAAC,WAAW;IAoBnB,OAAO,CAAC,WAAW;IAInB,OAAO,CAAC,UAAU;CAQnB;AAKD,eAAO,MAAM,mBAAmB,UAAU,CAAC;AAG3C,OAAO,EAAE,MAAM,EAAE,CAAC"}
package/dist/bot.js CHANGED
@@ -1,35 +1,32 @@
1
- import { connect, JSONCodec } from 'nats';
2
1
  import { nanoid } from 'nanoid';
3
- import { createCommandContext } from './context.js';
4
- import { subjects } from './subjects.js';
5
- const codec = JSONCodec();
6
- const DEFAULT_NATS_URL = 'nats://localhost:4222';
7
- const DEFAULT_HEARTBEAT_MS = 5000;
2
+ import { Transport } from './transport.js';
3
+ import { readCredentialFor, writeCredentialFor } from './credentials.js';
4
+ import { runDeviceFlow } from './sso.js';
5
+ const DEFAULT_SERVER_URL = 'wss://bot-api.localhostdevs.com';
6
+ const DEFAULT_API_BASE_URL = 'https://localhostdevs.com';
8
7
  const DEFAULT_IDEMPOTENCY_LRU_SIZE = 1024;
9
8
  export class Bot {
10
9
  opts;
11
- nc = null;
12
- subscription = null;
13
- heartbeatTimer = null;
10
+ transport = null;
14
11
  handlers = new Map();
15
12
  seen = new Set();
16
- seenQueue = []; // FIFO for LRU eviction
13
+ seenQueue = [];
17
14
  constructor(opts) {
18
15
  if (!opts.id || !/^[a-z0-9][a-z0-9-]*[a-z0-9]$/.test(opts.id)) {
19
16
  throw new Error(`Bot id must be lowercase alphanumeric + dashes (got ${opts.id})`);
20
17
  }
21
18
  this.opts = {
22
19
  id: opts.id,
23
- natsUrl: opts.natsUrl ?? DEFAULT_NATS_URL,
20
+ // apiKey is resolved lazily at connect time so SSO can run when none is provided.
24
21
  apiKey: opts.apiKey ?? process.env.LHD_API_KEY ?? null,
25
- natsToken: opts.natsToken ?? process.env.LHD_NATS_TOKEN ?? null,
26
- heartbeatMs: opts.heartbeatMs ?? DEFAULT_HEARTBEAT_MS,
22
+ serverUrl: opts.serverUrl ?? process.env.LHD_SERVER_URL ?? DEFAULT_SERVER_URL,
23
+ apiBaseUrl: opts.apiBaseUrl ?? process.env.LHD_API_BASE_URL ?? DEFAULT_API_BASE_URL,
27
24
  idempotencyLruSize: opts.idempotencyLruSize ?? DEFAULT_IDEMPOTENCY_LRU_SIZE,
28
25
  };
29
26
  }
30
27
  /** Register a handler for a command. Must be called before connect(). */
31
28
  cmd(name, handler) {
32
- if (this.nc) {
29
+ if (this.transport) {
33
30
  throw new Error('cmd() must be called before connect()');
34
31
  }
35
32
  if (this.handlers.has(name)) {
@@ -38,87 +35,92 @@ export class Bot {
38
35
  this.handlers.set(name, handler);
39
36
  return this;
40
37
  }
41
- /** Helper for tests + scripts: the subject a command should be published to. */
42
- subjectFor(command) {
43
- return subjects.cmd(this.opts.id, command);
44
- }
45
- /** Open NATS connection, subscribe to command subjects, start heartbeat. */
38
+ /** Open WS connection to the gateway, identify, await HELLO, ready to receive commands. */
46
39
  async connect() {
47
- if (this.nc) {
40
+ if (this.transport) {
48
41
  throw new Error('already connected');
49
42
  }
50
- const connectOpts = { servers: this.opts.natsUrl };
51
- if (this.opts.apiKey) {
52
- // Preferred: per-bot auth. The broker's auth-callout maps user→bot
53
- // and verifies the password against the api_keys table.
54
- connectOpts.user = this.opts.id;
55
- connectOpts.pass = this.opts.apiKey;
56
- }
57
- else if (this.opts.natsToken) {
58
- // Legacy: shared broker token. Deprecated; will be removed in v0.4.
59
- console.warn('[localhostdevs sdk] natsToken is deprecated — switch to apiKey before v0.4. See https://github.com/jugod0/localhostdevelopers');
60
- connectOpts.token = this.opts.natsToken;
43
+ const apiKey = await this.resolveApiKey();
44
+ const transport = new Transport({
45
+ serverUrl: this.opts.serverUrl,
46
+ apiKey,
47
+ botId: this.opts.id,
48
+ sdkVersion: SDK_PACKAGE_VERSION,
49
+ onCommand: (cmd) => void this.dispatch(cmd),
50
+ onError: (err) => {
51
+ console.error('[localhostdevs sdk] gateway error:', err.message);
52
+ },
53
+ onClose: (reason) => {
54
+ console.warn('[localhostdevs sdk] gateway connection closed:', reason);
55
+ },
56
+ });
57
+ await transport.connect();
58
+ this.transport = transport;
59
+ }
60
+ /**
61
+ * Resolution order for apiKey at connect time:
62
+ * 1. constructor opts / LHD_API_KEY env
63
+ * 2. ~/.localhostdevs/credentials.json[id]
64
+ * 3. (interactive TTY) browser-based SSO; cache the result for next time
65
+ */
66
+ async resolveApiKey() {
67
+ if (this.opts.apiKey)
68
+ return this.opts.apiKey;
69
+ const cached = await readCredentialFor(this.opts.id);
70
+ if (cached)
71
+ return cached;
72
+ if (!process.stdin.isTTY) {
73
+ throw new Error('No apiKey provided (constructor / LHD_API_KEY / ~/.localhostdevs/credentials.json) and not running interactively. Run `node app.js` from a real terminal once to authorize, or set LHD_API_KEY.');
61
74
  }
62
- this.nc = await connect(connectOpts);
63
- this.subscription = this.nc.subscribe(subjects.cmdAll(this.opts.id));
64
- // Force the SUB protocol command to be ack'd by the server before connect()
65
- // resolves. Without this, callers (and tests) that publish immediately after
66
- // connect() can lose the first message — NATS core drops messages with no
67
- // matching subscribers.
68
- await this.nc.flush();
69
- void this.consume();
70
- this.heartbeatTimer = setInterval(() => this.publishHeartbeat(), this.opts.heartbeatMs);
71
- this.publishHeartbeat(); // emit immediately on connect
75
+ const { token } = await runDeviceFlow({
76
+ id: this.opts.id,
77
+ apiBaseUrl: this.opts.apiBaseUrl,
78
+ });
79
+ await writeCredentialFor(this.opts.id, token);
80
+ return token;
72
81
  }
73
- /** Tear down: stop heartbeat, drain subscription, close NATS. */
82
+ /** Close the gateway connection. */
74
83
  async disconnect() {
75
- if (this.heartbeatTimer) {
76
- clearInterval(this.heartbeatTimer);
77
- this.heartbeatTimer = null;
78
- }
79
- if (this.subscription) {
80
- this.subscription.unsubscribe();
81
- this.subscription = null;
82
- }
83
- if (this.nc) {
84
- await this.nc.drain();
85
- this.nc = null;
84
+ if (this.transport) {
85
+ await this.transport.close();
86
+ this.transport = null;
86
87
  }
87
88
  }
88
- publishHeartbeat() {
89
- if (!this.nc)
89
+ async dispatch(cmd) {
90
+ if (this.isDuplicate(cmd.msgId))
90
91
  return;
91
- const beat = { botId: this.opts.id, ts: Date.now() };
92
- this.nc.publish(subjects.heartbeat(this.opts.id), codec.encode(beat));
93
- }
94
- async consume() {
95
- if (!this.subscription || !this.nc)
92
+ this.recordSeen(cmd.msgId);
93
+ const handler = this.handlers.get(cmd.command);
94
+ if (!handler) {
95
+ // Unknown command — drop. v1 is silent; future work could publish an error reply.
96
96
  return;
97
- for await (const msg of this.subscription) {
98
- try {
99
- const envelope = codec.decode(msg.data);
100
- if (!envelope ||
101
- typeof envelope.command !== 'string' ||
102
- typeof envelope.msgId !== 'string') {
103
- continue; // malformed; drop silently
104
- }
105
- if (this.isDuplicate(envelope.msgId)) {
106
- continue;
97
+ }
98
+ const ctx = this.makeContext(cmd);
99
+ try {
100
+ await handler(ctx);
101
+ }
102
+ catch (err) {
103
+ console.error('[localhostdevs sdk] command handler error:', err);
104
+ }
105
+ }
106
+ makeContext(cmd) {
107
+ let replied = false;
108
+ const transport = this.transport;
109
+ return {
110
+ command: cmd.command,
111
+ args: cmd.args ?? {},
112
+ msgId: cmd.msgId,
113
+ reply: async (body) => {
114
+ if (replied) {
115
+ throw new Error(`reply() called more than once for msgId=${cmd.msgId}`);
107
116
  }
108
- this.recordSeen(envelope.msgId);
109
- const handler = this.handlers.get(envelope.command);
110
- if (!handler) {
111
- // Unknown command — could publish an error reply; v1 keeps it simple and drops.
112
- continue;
117
+ replied = true;
118
+ if (!transport) {
119
+ throw new Error('reply() called after disconnect');
113
120
  }
114
- const ctx = createCommandContext(this.nc, envelope);
115
- await handler(ctx);
116
- }
117
- catch (err) {
118
- // Don't let one bad message kill the loop. Log to stderr for now.
119
- console.error('[localhostdevs sdk] command dispatch error:', err);
120
- }
121
- }
121
+ transport.sendReply(cmd.msgId, body);
122
+ },
123
+ };
122
124
  }
123
125
  isDuplicate(msgId) {
124
126
  return this.seen.has(msgId);
@@ -133,6 +135,10 @@ export class Bot {
133
135
  }
134
136
  }
135
137
  }
138
+ // Internal version constant — exported so the transport can stamp IDENTIFY frames.
139
+ // Pre-1.0: breaking changes are allowed in minor bumps (0.x). We're staying in
140
+ // 0.x until the platform launches with external users.
141
+ export const SDK_PACKAGE_VERSION = '0.3.1';
136
142
  // Re-export nanoid so demo scripts can use the same id generator the SDK expects.
137
143
  export { nanoid };
138
144
  //# sourceMappingURL=bot.js.map
package/dist/bot.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"bot.js","sourceRoot":"","sources":["../src/bot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAA0C,SAAS,EAAE,MAAM,MAAM,CAAC;AAClF,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;A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,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;YACvC,CAAC;SACF,CAAC;IACJ,CAAC;IAEO,WAAW,CAAC,KAAa;QAC/B,OAAO,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAC9B,CAAC;IAEO,UAAU,CAAC,KAAa;QAC9B,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;QACrB,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAC3B,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,IAAI,CAAC,IAAI,CAAC,kBAAkB,EAAE,CAAC;YAC5D,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;YACvC,IAAI,OAAO;gBAAE,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;QACzC,CAAC;IACH,CAAC;CACF;AAED,mFAAmF;AACnF,+EAA+E;AAC/E,uDAAuD;AACvD,MAAM,CAAC,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAE3C,kFAAkF;AAClF,OAAO,EAAE,MAAM,EAAE,CAAC"}
@@ -0,0 +1,12 @@
1
+ export interface StoredCredentials {
2
+ /** Keyed by bot handle. */
3
+ bots: Record<string, {
4
+ apiKey: string;
5
+ updatedAt: string;
6
+ }>;
7
+ }
8
+ export declare function readCredentials(): Promise<StoredCredentials>;
9
+ export declare function readCredentialFor(handle: string): Promise<string | null>;
10
+ export declare function writeCredentialFor(handle: string, apiKey: string): Promise<void>;
11
+ export declare function credentialFilePath(): string;
12
+ //# sourceMappingURL=credentials.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.d.ts","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,iBAAiB;IAChC,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAC7D;AAID,wBAAsB,eAAe,IAAI,OAAO,CAAC,iBAAiB,CAAC,CAYlE;AAED,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAG9E;AAED,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAatF;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C"}
@@ -0,0 +1,43 @@
1
+ import { promises as fs } from 'node:fs';
2
+ import { join } from 'node:path';
3
+ import { homedir } from 'node:os';
4
+ const CRED_DIR = join(homedir(), '.localhostdevs');
5
+ const CRED_FILE = join(CRED_DIR, 'credentials.json');
6
+ const EMPTY = { bots: {} };
7
+ export async function readCredentials() {
8
+ try {
9
+ const raw = await fs.readFile(CRED_FILE, 'utf8');
10
+ const parsed = JSON.parse(raw);
11
+ return { bots: parsed.bots ?? {} };
12
+ }
13
+ catch (err) {
14
+ if (err.code === 'ENOENT') {
15
+ return EMPTY;
16
+ }
17
+ // Malformed JSON or permissions issue — treat as empty to avoid blocking the user.
18
+ return EMPTY;
19
+ }
20
+ }
21
+ export async function readCredentialFor(handle) {
22
+ const creds = await readCredentials();
23
+ return creds.bots[handle]?.apiKey ?? null;
24
+ }
25
+ export async function writeCredentialFor(handle, apiKey) {
26
+ const existing = await readCredentials();
27
+ existing.bots[handle] = { apiKey, updatedAt: new Date().toISOString() };
28
+ await fs.mkdir(CRED_DIR, { recursive: true });
29
+ const tmp = `${CRED_FILE}.tmp`;
30
+ await fs.writeFile(tmp, JSON.stringify(existing, null, 2), { encoding: 'utf8', mode: 0o600 });
31
+ await fs.rename(tmp, CRED_FILE);
32
+ // Best-effort: tighten the file mode after rename (rename may not preserve mode on every FS).
33
+ try {
34
+ await fs.chmod(CRED_FILE, 0o600);
35
+ }
36
+ catch {
37
+ // ignore on Windows / weird filesystems
38
+ }
39
+ }
40
+ export function credentialFilePath() {
41
+ return CRED_FILE;
42
+ }
43
+ //# sourceMappingURL=credentials.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"credentials.js","sourceRoot":"","sources":["../src/credentials.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,IAAI,EAAE,EAAE,MAAM,SAAS,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAElC,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,EAAE,EAAE,gBAAgB,CAAC,CAAC;AACnD,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,EAAE,kBAAkB,CAAC,CAAC;AAOrD,MAAM,KAAK,GAAsB,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;AAE9C,MAAM,CAAC,KAAK,UAAU,eAAe;IACnC,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,MAAM,EAAE,CAAC,QAAQ,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;QACjD,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAA+B,CAAC;QAC7D,OAAO,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,IAAI,EAAE,EAAE,CAAC;IACrC,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,IAAK,GAA6B,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;YACrD,OAAO,KAAK,CAAC;QACf,CAAC;QACD,mFAAmF;QACnF,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,MAAc;IACpD,MAAM,KAAK,GAAG,MAAM,eAAe,EAAE,CAAC;IACtC,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,MAAM,IAAI,IAAI,CAAC;AAC5C,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,kBAAkB,CAAC,MAAc,EAAE,MAAc;IACrE,MAAM,QAAQ,GAAG,MAAM,eAAe,EAAE,CAAC;IACzC,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,CAAC,WAAW,EAAE,EAAE,CAAC;IACxE,MAAM,EAAE,CAAC,KAAK,CAAC,QAAQ,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;IAC9C,MAAM,GAAG,GAAG,GAAG,SAAS,MAAM,CAAC;IAC/B,MAAM,EAAE,CAAC,SAAS,CAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC9F,MAAM,EAAE,CAAC,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC;IAChC,8FAA8F;IAC9F,IAAI,CAAC;QACH,MAAM,EAAE,CAAC,KAAK,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;IACnC,CAAC;IAAC,MAAM,CAAC;QACP,wCAAwC;IAC1C,CAAC;AACH,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO,SAAS,CAAC;AACnB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,3 @@
1
- export declare const SDK_PACKAGE_VERSION = "0.2.0";
2
- export { Bot } from './bot.js';
3
- export { subjects } from './subjects.js';
1
+ export { Bot, SDK_PACKAGE_VERSION } from './bot.js';
4
2
  export type { BotOptions, CommandContext, CommandHandler, CommandEnvelope, ReplyBody, ReplyEnvelope, HeartbeatEnvelope, } from './types.js';
5
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,mBAAmB,UAAU,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,YAAY,EACV,UAAU,EACV,cAAc,EACd,cAAc,EACd,eAAe,EACf,SAAS,EACT,aAAa,EACb,iBAAiB,GAClB,MAAM,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AACpD,YAAY,EACV,UAAU,EACV,cAAc,EACd,cAAc,EACd,eAAe,EACf,SAAS,EACT,aAAa,EACb,iBAAiB,GAClB,MAAM,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -1,4 +1,2 @@
1
- export const SDK_PACKAGE_VERSION = '0.2.0';
2
- export { Bot } from './bot.js';
3
- export { subjects } from './subjects.js';
1
+ export { Bot, SDK_PACKAGE_VERSION } from './bot.js';
4
2
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,mBAAmB,GAAG,OAAO,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC"}
package/dist/sso.d.ts ADDED
@@ -0,0 +1,21 @@
1
+ export interface DeviceFlowResult {
2
+ token: string;
3
+ botHandle: string | null;
4
+ }
5
+ export interface DeviceFlowOptions {
6
+ /** Bot handle the SDK intends to authenticate as. */
7
+ id: string;
8
+ /** HTTP base URL of the platform API. Defaults to https://localhostdevs.com. */
9
+ apiBaseUrl: string;
10
+ /**
11
+ * Optional logger for the URL + waiting messages. Defaults to console.log.
12
+ * Set to () => {} to silence.
13
+ */
14
+ log?: (line: string) => void;
15
+ }
16
+ /**
17
+ * Run the device-flow auth dance. Returns a fresh apiKey after the user
18
+ * approves in the browser. Throws on expiry / denial.
19
+ */
20
+ export declare function runDeviceFlow(opts: DeviceFlowOptions): Promise<DeviceFlowResult>;
21
+ //# sourceMappingURL=sso.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sso.d.ts","sourceRoot":"","sources":["../src/sso.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,MAAM,WAAW,iBAAiB;IAChC,qDAAqD;IACrD,EAAE,EAAE,MAAM,CAAC;IACX,gFAAgF;IAChF,UAAU,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,GAAG,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CAC9B;AAiBD;;;GAGG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAqEtF"}
package/dist/sso.js ADDED
@@ -0,0 +1,81 @@
1
+ import { spawn } from 'node:child_process';
2
+ import { platform } from 'node:os';
3
+ /**
4
+ * Run the device-flow auth dance. Returns a fresh apiKey after the user
5
+ * approves in the browser. Throws on expiry / denial.
6
+ */
7
+ export async function runDeviceFlow(opts) {
8
+ // eslint-disable-next-line no-console -- intentional user-facing CLI output
9
+ const log = opts.log ?? ((line) => console.log(line));
10
+ const apiBase = opts.apiBaseUrl.replace(/\/$/, '');
11
+ // 1. Begin: ask the server for codes.
12
+ const beginRes = await fetch(`${apiBase}/api/auth/cli/begin`, {
13
+ method: 'POST',
14
+ headers: { 'content-type': 'application/json' },
15
+ body: JSON.stringify({ id: opts.id }),
16
+ });
17
+ if (!beginRes.ok) {
18
+ throw new Error(`failed to begin auth flow: HTTP ${beginRes.status}`);
19
+ }
20
+ const begin = (await beginRes.json());
21
+ log('');
22
+ log('Authorize this bot in your browser:');
23
+ log(` ${begin.verificationUriComplete}`);
24
+ log('');
25
+ log(`Or paste this code at ${begin.verificationUri}: ${begin.userCode}`);
26
+ log('');
27
+ log('Waiting for approval...');
28
+ // Best-effort: try to open the URL automatically.
29
+ tryOpenBrowser(begin.verificationUriComplete);
30
+ // 2. Poll loop.
31
+ const deadline = Date.now() + begin.expiresInSec * 1000;
32
+ let intervalMs = Math.max(begin.pollIntervalSec * 1000, 1000);
33
+ while (Date.now() < deadline) {
34
+ await sleep(intervalMs);
35
+ const res = await fetch(`${apiBase}/api/auth/cli/poll`, {
36
+ method: 'POST',
37
+ headers: { 'content-type': 'application/json' },
38
+ body: JSON.stringify({ deviceCode: begin.deviceCode }),
39
+ });
40
+ if (res.status === 200) {
41
+ const data = (await res.json());
42
+ log('');
43
+ log(`✓ Authorized as @${data.botHandle ?? opts.id}.`);
44
+ return { token: data.token, botHandle: data.botHandle };
45
+ }
46
+ if (res.status === 202) {
47
+ // authorization_pending — keep waiting
48
+ continue;
49
+ }
50
+ if (res.status === 429) {
51
+ // slow_down — back off
52
+ intervalMs = Math.min(intervalMs * 2, 10_000);
53
+ continue;
54
+ }
55
+ if (res.status === 403) {
56
+ throw new Error('authorization denied by user');
57
+ }
58
+ if (res.status === 410) {
59
+ throw new Error('authorization code expired before approval');
60
+ }
61
+ if (res.status === 404) {
62
+ throw new Error('invalid device code (server lost the auth attempt)');
63
+ }
64
+ // Unknown status — surface it.
65
+ throw new Error(`unexpected poll status ${res.status}`);
66
+ }
67
+ throw new Error('authorization timed out — restart `node app.js` to try again');
68
+ }
69
+ function sleep(ms) {
70
+ return new Promise((resolve) => setTimeout(resolve, ms));
71
+ }
72
+ function tryOpenBrowser(url) {
73
+ const cmd = platform() === 'win32' ? 'start' : platform() === 'darwin' ? 'open' : 'xdg-open';
74
+ try {
75
+ spawn(cmd, [url], { detached: true, stdio: 'ignore', shell: true }).unref();
76
+ }
77
+ catch {
78
+ // ignore — we already printed the URL for the user to open manually
79
+ }
80
+ }
81
+ //# sourceMappingURL=sso.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sso.js","sourceRoot":"","sources":["../src/sso.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAkCnC;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,aAAa,CAAC,IAAuB;IACzD,4EAA4E;IAC5E,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,CAAC,CAAC,IAAY,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC;IAC9D,MAAM,OAAO,GAAG,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAEnD,sCAAsC;IACtC,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,GAAG,OAAO,qBAAqB,EAAE;QAC5D,MAAM,EAAE,MAAM;QACd,OAAO,EAAE,EAAE,cAAc,EAAE,kBAAkB,EAAE;QAC/C,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,EAAE,EAAE,EAAE,IAAI,CAAC,EAAE,EAAE,CAAC;KACtC,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,mCAAmC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IACxE,CAAC;IACD,MAAM,KAAK,GAAG,CAAC,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAkB,CAAC;IAEvD,GAAG,CAAC,EAAE,CAAC,CAAC;IACR,GAAG,CAAC,qCAAqC,CAAC,CAAC;IAC3C,GAAG,CAAC,KAAK,KAAK,CA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AAQ,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;IAC9E,CAAC;IAAC,MAAM,CAAC;QACP,oEAAoE;IACtE,CAAC;AACH,CAAC"}
@@ -0,0 +1,58 @@
1
+ /** Wire protocol opcodes — mirrors the gateway. Keep in sync with services/bot-gateway. */
2
+ export declare const OP: {
3
+ readonly COMMAND: 0;
4
+ readonly IDENTIFY: 1;
5
+ readonly HEARTBEAT: 2;
6
+ readonly REPLY: 3;
7
+ readonly ERROR: 9;
8
+ readonly HELLO: 10;
9
+ readonly HEARTBEAT_ACK: 11;
10
+ };
11
+ export type CommandFrame = {
12
+ msgId: string;
13
+ command: string;
14
+ args: Record<string, unknown>;
15
+ };
16
+ export type ReplyBodyShape = {
17
+ text?: string;
18
+ data?: unknown;
19
+ dispatch?: {
20
+ to: string;
21
+ command: string;
22
+ args?: Record<string, unknown>;
23
+ };
24
+ };
25
+ export interface TransportOptions {
26
+ serverUrl: string;
27
+ apiKey: string;
28
+ botId: string;
29
+ sdkVersion: string;
30
+ onCommand: (cmd: CommandFrame) => void;
31
+ onClose?: (reason: string) => void;
32
+ onError?: (err: Error) => void;
33
+ }
34
+ /**
35
+ * Thin WebSocket client implementing the bot-gateway opcode protocol.
36
+ * - Sends IDENTIFY on open, awaits HELLO before resolving connect()
37
+ * - Starts heartbeat per the interval the server tells us
38
+ * - Forwards COMMAND frames to onCommand
39
+ * - Exposes sendReply() for the Bot to ship REPLY frames
40
+ */
41
+ export declare class Transport {
42
+ private readonly opts;
43
+ private ws;
44
+ private heartbeatTimer;
45
+ private heartbeatIntervalMs;
46
+ private sessionId;
47
+ private ready;
48
+ constructor(opts: TransportOptions);
49
+ connect(): Promise<void>;
50
+ private handleMessage;
51
+ sendReply(msgId: string, body: ReplyBodyShape): void;
52
+ private send;
53
+ private startHeartbeat;
54
+ close(): Promise<void>;
55
+ private cleanup;
56
+ get currentSessionId(): string | null;
57
+ }
58
+ //# sourceMappingURL=transport.d.ts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IAkD9B,OAAO,CAAC,aAAa;IAgCrB,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,cAAc,GAAG,IAAI;IAIpD,OAAO,CAAC,IAAI;IAKZ,OAAO,CAAC,cAAc;IAMhB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAQ5B,OAAO,CAAC,OAAO;IAQf,IAAI,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAEpC;CACF"}
@@ -0,0 +1,144 @@
1
+ import { WebSocket } from 'ws';
2
+ /** Wire protocol opcodes — mirrors the gateway. Keep in sync with services/bot-gateway. */
3
+ export const OP = {
4
+ COMMAND: 0,
5
+ IDENTIFY: 1,
6
+ HEARTBEAT: 2,
7
+ REPLY: 3,
8
+ ERROR: 9,
9
+ HELLO: 10,
10
+ HEARTBEAT_ACK: 11,
11
+ };
12
+ /**
13
+ * Thin WebSocket client implementing the bot-gateway opcode protocol.
14
+ * - Sends IDENTIFY on open, awaits HELLO before resolving connect()
15
+ * - Starts heartbeat per the interval the server tells us
16
+ * - Forwards COMMAND frames to onCommand
17
+ * - Exposes sendReply() for the Bot to ship REPLY frames
18
+ */
19
+ export class Transport {
20
+ opts;
21
+ ws = null;
22
+ heartbeatTimer = null;
23
+ heartbeatIntervalMs = 30_000;
24
+ sessionId = null;
25
+ ready = false;
26
+ constructor(opts) {
27
+ this.opts = opts;
28
+ }
29
+ async connect() {
30
+ this.ws = new WebSocket(this.opts.serverUrl);
31
+ return new Promise((resolve, reject) => {
32
+ let settled = false;
33
+ const settle = (err) => {
34
+ if (settled)
35
+ return;
36
+ settled = true;
37
+ if (err)
38
+ reject(err);
39
+ else
40
+ resolve();
41
+ };
42
+ const ws = this.ws;
43
+ ws.on('open', () => {
44
+ this.send({
45
+ op: OP.IDENTIFY,
46
+ d: {
47
+ apiKey: this.opts.apiKey,
48
+ id: this.opts.botId,
49
+ sdkVersion: this.opts.sdkVersion,
50
+ },
51
+ });
52
+ });
53
+ ws.on('message', (raw) => {
54
+ let msg;
55
+ try {
56
+ msg = JSON.parse(raw.toString());
57
+ }
58
+ catch {
59
+ // malformed — drop
60
+ return;
61
+ }
62
+ this.handleMessage(msg, settle);
63
+ });
64
+ ws.on('close', (_code, reason) => {
65
+ this.cleanup();
66
+ const reasonStr = reason?.toString() || 'closed';
67
+ if (!settled)
68
+ settle(new Error(`websocket closed before HELLO: ${reasonStr}`));
69
+ this.opts.onClose?.(reasonStr);
70
+ });
71
+ ws.on('error', (err) => {
72
+ if (!settled)
73
+ settle(err);
74
+ else
75
+ this.opts.onError?.(err);
76
+ });
77
+ });
78
+ }
79
+ handleMessage(msg, settle) {
80
+ switch (msg.op) {
81
+ case OP.HELLO: {
82
+ const d = msg.d;
83
+ this.sessionId = d.sessionId;
84
+ this.heartbeatIntervalMs = d.heartbeatIntervalMs;
85
+ this.startHeartbeat();
86
+ this.ready = true;
87
+ settle(undefined);
88
+ return;
89
+ }
90
+ case OP.HEARTBEAT_ACK:
91
+ return;
92
+ case OP.COMMAND: {
93
+ const d = msg.d;
94
+ if (!d?.msgId || typeof d.command !== 'string')
95
+ return;
96
+ this.opts.onCommand(d);
97
+ return;
98
+ }
99
+ case OP.ERROR: {
100
+ const d = msg.d;
101
+ const err = new Error(`gateway error: ${d.code} — ${d.message}`);
102
+ if (!this.ready)
103
+ settle(err);
104
+ else
105
+ this.opts.onError?.(err);
106
+ return;
107
+ }
108
+ default:
109
+ // Unknown op — log + ignore. Forward-compat.
110
+ return;
111
+ }
112
+ }
113
+ sendReply(msgId, body) {
114
+ this.send({ op: OP.REPLY, d: { msgId, body } });
115
+ }
116
+ send(msg) {
117
+ if (!this.ws || this.ws.readyState !== WebSocket.OPEN)
118
+ return;
119
+ this.ws.send(JSON.stringify(msg));
120
+ }
121
+ startHeartbeat() {
122
+ this.heartbeatTimer = setInterval(() => {
123
+ this.send({ op: OP.HEARTBEAT, d: {} });
124
+ }, this.heartbeatIntervalMs);
125
+ }
126
+ async close() {
127
+ this.cleanup();
128
+ if (this.ws && this.ws.readyState === WebSocket.OPEN) {
129
+ this.ws.close(1000, 'client closing');
130
+ }
131
+ this.ws = null;
132
+ }
133
+ cleanup() {
134
+ if (this.heartbeatTimer) {
135
+ clearInterval(this.heartbeatTimer);
136
+ this.heartbeatTimer = null;
137
+ }
138
+ this.ready = false;
139
+ }
140
+ get currentSessionId() {
141
+ return this.sessionId;
142
+ }
143
+ }
144
+ //# sourceMappingURL=transport.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transport.js","sourceRoot":"","sources":["../src/transport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,IAAI,CAAC;AAE/B,2FAA2F;AAC3F,MAAM,CAAC,MAAM,EAAE,GAAG;IAChB,OAAO,EAAE,CAAC;IACV,QAAQ,EAAE,CAAC;IACX,SAAS,EAAE,CAAC;IACZ,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,CAAC;IACR,KAAK,EAAE,EAAE;IACT,aAAa,EAAE,EAAE;CACT,CAAC;AAwBX;;;;;;GAMG;AACH,MAAM,OAAO,SAAS;IAOS;IANrB,EAAE,GAAqB,IAAI,CAAC;IAC5B,cAAc,GAA0C,IAAI,CAAC;IAC7D,mBAAmB,GAAG,MAAM,CAAC;IAC7B,SAAS,GAAkB,IAAI,CAAC;IAChC,KAAK,GAAG,KAAK,CAAC;IAEtB,YAA6B,IAAsB;QAAtB,SAAI,GAAJ,IAAI,CAAkB;IAAG,CAAC;IAEvD,KAAK,CAAC,OAAO;QACX,IAAI,CAAC,EAAE,GAAG,IAAI,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QAE7C,OAAO,IAAI,OAAO,CAAO,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE;YAC3C,IAAI,OAAO,GAAG,KAAK,CAAC;YACpB,MAAM,MAAM,GAAG,CAAC,GAAW,EAAE,EAAE;gBAC7B,IAAI,OAAO;oBAAE,OAAO;gBACpB,OAAO,GAAG,IAAI,CAAC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,cAAc,CAAC,CAAC;YACnC,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC;QAC7B,CAAC;QACD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACrB,CAAC;IAED,IAAI,gBAAgB;QAClB,OAAO,IAAI,CAAC,SAAS,CAAC;IACxB,CAAC;CACF"}
package/dist/types.d.ts CHANGED
@@ -26,40 +26,42 @@ export interface ReplyBody {
26
26
  };
27
27
  }
28
28
  export interface BotOptions {
29
- /** Stable identifier for this bot (e.g., 'price-bot'). Used in NATS subject names. */
29
+ /** Stable identifier for this bot (e.g., 'price-bot'). Used as the gateway login user. */
30
30
  id: string;
31
31
  /**
32
32
  * Per-bot API key (e.g., `lhd_live_…`) issued by the dashboard.
33
- * **Preferred** over `natsToken`. Sent as the NATS `password` for the
34
- * `id` user; the broker's auth-callout validates against the platform's
35
- * api_keys table and scopes subject permissions to this one bot.
36
- * Falls back to `process.env.LHD_API_KEY`.
33
+ * Optional. If not provided and not in env / cached credentials, the SDK
34
+ * runs a browser-based SSO flow on first connect.
35
+ * Resolution order: constructor `LHD_API_KEY` env `~/.localhostdevs/credentials.json` SSO.
37
36
  */
38
37
  apiKey?: string;
39
- /** NATS connection URL. Defaults to `nats://localhost:4222`. */
40
- natsUrl?: string;
41
38
  /**
42
- * @deprecated Use `apiKey` instead. Kept for backward compatibility
43
- * during the v0.2 → v0.3 migration. Shared broker token; will be
44
- * removed in v0.4. Falls back to `process.env.LHD_NATS_TOKEN`.
39
+ * WebSocket URL of the localhostdevs bot gateway.
40
+ * Defaults to `process.env.LHD_SERVER_URL` if set, else
41
+ * `wss://bot-api.localhostdevs.com`.
45
42
  */
46
- natsToken?: string;
47
- /** Heartbeat interval in milliseconds. Defaults to 5000. */
48
- heartbeatMs?: number;
43
+ serverUrl?: string;
44
+ /**
45
+ * HTTP base URL of the localhostdevs platform API (for SSO auth flow).
46
+ * Defaults to `process.env.LHD_API_BASE_URL` if set, else
47
+ * `https://localhostdevs.com`.
48
+ */
49
+ apiBaseUrl?: string;
49
50
  /** Idempotency LRU size. Defaults to 1024. */
50
51
  idempotencyLruSize?: number;
51
52
  }
53
+ /** Internal: command frame the gateway sends to the bot. */
52
54
  export interface CommandEnvelope {
53
55
  msgId: string;
54
56
  command: string;
55
57
  args: Record<string, unknown>;
56
- /** NATS subject the bot should reply on. */
57
- replyTo: string;
58
58
  }
59
+ /** Internal: reply frame the bot sends back to the gateway. */
59
60
  export interface ReplyEnvelope {
60
61
  msgId: string;
61
62
  body: ReplyBody;
62
63
  }
64
+ /** Heartbeat — kept exported because tests historically inspected it. */
63
65
  export interface HeartbeatEnvelope {
64
66
  botId: string;
65
67
  ts: number;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,cAAc,GAAG,CAAC,GAAG,EAAE,cAAc,KAAK,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;AAE3E,MAAM,WAAW,cAAc;IAC7B,0DAA0D;IAC1D,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,+CAA+C;IAC/C,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC,2FAA2F;IAC3F,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,8EAA8E;IAC9E,KAAK,CAAC,IAAI,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CACvC;AAED,MAAM,WAAW,SAAS;IACxB,kCAAkC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,QAAQ,CAAC,EAAE;QACT,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChC,CAAC;CACH;AAED,MA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kC;IAClC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,8EAA8E;IAC9E,IAAI,CAAC,EAAE,OAAO,CAAC;IACf;;;;OAIG;IACH,QAAQ,CAAC,EAAE;QACT,EAAE,EAAE,MAAM,CAAC;QACX,OAAO,EAAE,MAAM,CAAC;QAChB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChC,CAAC;CACH;AAED,MAAM,WAAW,UAAU;IACzB,0FAA0F;IAC1F,EAAE,EAAE,MAAM,CAAC;IACX;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,8CAA8C;IAC9C,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,4DAA4D;AAC5D,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAC/B;AAED,+DAA+D;AAC/D,MAAM,WAAW,aAAa;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,SAAS,CAAC;CACjB;AAED,yEAAyE;AACzE,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;CACZ"}
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@localhostdevs/sdk",
3
- "version": "0.3.0",
3
+ "version": "0.3.1",
4
4
  "description": "JavaScript SDK for building bots on localhostdevs — run your app on your laptop, publish it as a command-driven bot.",
5
5
  "keywords": [
6
6
  "localhostdevs",
7
7
  "bot",
8
- "nats",
8
+ "websocket",
9
9
  "chatops",
10
10
  "cli",
11
11
  "sdk"
@@ -38,14 +38,14 @@
38
38
  "build": "tsc -p tsconfig.build.json",
39
39
  "typecheck": "tsc --noEmit",
40
40
  "test": "vitest run",
41
- "demo:client": "tsx scripts/demo-client.ts",
42
41
  "prepublishOnly": "npm run build"
43
42
  },
44
43
  "dependencies": {
45
44
  "nanoid": "^5.1.11",
46
- "nats": "^2.29.3"
45
+ "ws": "^8.18.0"
47
46
  },
48
47
  "devDependencies": {
48
+ "@types/ws": "^8.5.13",
49
49
  "tsx": "^4.21.0"
50
50
  },
51
51
  "publishConfig": {
package/dist/context.d.ts DELETED
@@ -1,11 +0,0 @@
1
- import type { NatsConnection } from 'nats';
2
- import type { CommandContext } from './types.js';
3
- import { subjects } from './subjects.js';
4
- export declare function createCommandContext(nc: NatsConnection, envelope: {
5
- command: string;
6
- args: Record<string, unknown>;
7
- msgId: string;
8
- replyTo: string;
9
- }): CommandContext;
10
- export { subjects };
11
- //# sourceMappingURL=context.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,MAAM,CAAC;AAE3C,OAAO,KAAK,EAAE,cAAc,EAA4B,MAAM,YAAY,CAAC;AAC3E,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAIzC,wBAAgB,oBAAoB,CAClC,EAAE,EAAE,cAAc,EAClB,QAAQ,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC3F,cAAc,CAiBhB;AAGD,OAAO,EAAE,QAAQ,EAAE,CAAC"}
package/dist/context.js DELETED
@@ -1,23 +0,0 @@
1
- import { JSONCodec } from 'nats';
2
- import { subjects } from './subjects.js';
3
- const codec = JSONCodec();
4
- export function createCommandContext(nc, envelope) {
5
- let replied = false;
6
- return {
7
- command: envelope.command,
8
- args: envelope.args,
9
- msgId: envelope.msgId,
10
- async reply(body) {
11
- if (replied) {
12
- throw new Error(`reply() called more than once for msgId=${envelope.msgId}`);
13
- }
14
- replied = true;
15
- const payload = { msgId: envelope.msgId, body };
16
- nc.publish(envelope.replyTo, codec.encode(payload));
17
- // No need to await — NATS publish is fire-and-forget.
18
- },
19
- };
20
- }
21
- // Re-export for tests.
22
- export { subjects };
23
- //# sourceMappingURL=context.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"context.js","sourceRoot":"","sources":["../src/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,MAAM,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEzC,MAAM,KAAK,GAAG,SAAS,EAAE,CAAC;AAE1B,MAAM,UAAU,oBAAoB,CAClC,EAAkB,EAClB,QAA4F;IAE5F,IAAI,OAAO,GAAG,KAAK,CAAC;IAEpB,OAAO;QACL,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,IAAI,EAAE,QAAQ,CAAC,IAAI;QACnB,KAAK,EAAE,QAAQ,CAAC,KAAK;QACrB,KAAK,CAAC,KAAK,CAAC,IAAe;YACzB,IAAI,OAAO,EAAE,CAAC;gBACZ,MAAM,IAAI,KAAK,CAAC,2CAA2C,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC;YAC/E,CAAC;YACD,OAAO,GAAG,IAAI,CAAC;YACf,MAAM,OAAO,GAAkB,EAAE,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC;YAC/D,EAAE,CAAC,OAAO,CAAC,QAAQ,CAAC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC;YACpD,sDAAsD;QACxD,CAAC;KACF,CAAC;AACJ,CAAC;AAED,uBAAuB;AACvB,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -1,17 +0,0 @@
1
- /**
2
- * NATS subject helpers.
3
- *
4
- * bot.<id>.cmd.<command> — command published by gateway/CLI, consumed by bot
5
- * bot.<id>.heartbeat — 5-second presence pings from the bot
6
- * reply.<msgId> — per-message reply subject; publisher subscribes to this
7
- *
8
- * The reply subject deliberately doesn't include the bot id; replies are correlated
9
- * via msgId, and the publisher only listens to its own short-lived reply subject.
10
- */
11
- export declare const subjects: {
12
- cmd: (botId: string, command: string) => string;
13
- cmdAll: (botId: string) => string;
14
- heartbeat: (botId: string) => string;
15
- reply: (msgId: string) => string;
16
- };
17
- //# sourceMappingURL=subjects.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"subjects.d.ts","sourceRoot":"","sources":["../src/subjects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,eAAO,MAAM,QAAQ;iBACN,MAAM,WAAW,MAAM,KAAG,MAAM;oBAC7B,MAAM,KAAG,MAAM;uBACZ,MAAM,KAAG,MAAM;mBACnB,MAAM,KAAG,MAAM;CAC/B,CAAC"}
package/dist/subjects.js DELETED
@@ -1,17 +0,0 @@
1
- /**
2
- * NATS subject helpers.
3
- *
4
- * bot.<id>.cmd.<command> — command published by gateway/CLI, consumed by bot
5
- * bot.<id>.heartbeat — 5-second presence pings from the bot
6
- * reply.<msgId> — per-message reply subject; publisher subscribes to this
7
- *
8
- * The reply subject deliberately doesn't include the bot id; replies are correlated
9
- * via msgId, and the publisher only listens to its own short-lived reply subject.
10
- */
11
- export const subjects = {
12
- cmd: (botId, command) => `bot.${botId}.cmd.${command}`,
13
- cmdAll: (botId) => `bot.${botId}.cmd.>`,
14
- heartbeat: (botId) => `bot.${botId}.heartbeat`,
15
- reply: (msgId) => `reply.${msgId}`,
16
- };
17
- //# sourceMappingURL=subjects.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"subjects.js","sourceRoot":"","sources":["../src/subjects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG;IACtB,GAAG,EAAE,CAAC,KAAa,EAAE,OAAe,EAAU,EAAE,CAAC,OAAO,KAAK,QAAQ,OAAO,EAAE;IAC9E,MAAM,EAAE,CAAC,KAAa,EAAU,EAAE,CAAC,OAAO,KAAK,QAAQ;IACvD,SAAS,EAAE,CAAC,KAAa,EAAU,EAAE,CAAC,OAAO,KAAK,YAAY;IAC9D,KAAK,EAAE,CAAC,KAAa,EAAU,EAAE,CAAC,SAAS,KAAK,EAAE;CACnD,CAAC"}
@@ -1 +0,0 @@
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.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","../../../node_modules/nats/lib/nats-base-client/util.d.ts","../../../node_modules/nats/lib/nats-base-client/codec.d.ts","../../../node_modules/nats/lib/jetstream/jsbaseclient_api.d.ts","../../../node_modules/nats/lib/jetstream/jsapi_types.d.ts","../../../node_modules/nats/lib/jetstream/jslister.d.ts","../../../node_modules/nats/lib/jetstream/jsmconsumer_api.d.ts","../../../node_modules/nats/lib/nats-base-client/queued_iterator.d.ts","../../../node_modules/nats/lib/nats-base-client/idleheartbeat_monitor.d.ts","../../../node_modules/nats/lib/jetstream/jsmsg.d.ts","../../../node_modules/nats/lib/jetstream/consumer.d.ts","../../../node_modules/nats/lib/nats-base-client/typedsub.d.ts","../../../node_modules/nats/lib/jetstream/types.d.ts","../../../node_modules/nats/lib/nats-base-client/core.d.ts","../../../node_modules/nats/lib/nats-base-client/transport.d.ts","../../../node_modules/nats/lib/nats-base-client/databuffer.d.ts","../../../node_modules/nats/lib/nats-base-client/servers.d.ts","../../../node_modules/nats/lib/nats-base-client/muxsubscription.d.ts","../../../node_modules/nats/lib/nats-base-client/heartbeats.d.ts","../../../node_modules/nats/lib/nats-base-client/denobuffer.d.ts","../../../node_modules/nats/lib/nats-base-client/parser.d.ts","../../../node_modules/nats/lib/nats-base-client/semver.d.ts","../../../node_modules/nats/lib/nats-base-client/protocol.d.ts","../../../node_modules/nats/lib/nats-base-client/encoders.d.ts","../../../node_modules/nats/lib/nats-base-client/types.d.ts","../../../node_modules/nats/lib/nats-base-client/nats.d.ts","../../../node_modules/nats/lib/nats-base-client/nuid.d.ts","../../../node_modules/nats/lib/nats-base-client/msg.d.ts","../../../node_modules/nats/lib/nats-base-client/headers.d.ts","../../../node_modules/nats/lib/nats-base-client/options.d.ts","../../../node_modules/nats/lib/nats-base-client/request.d.ts","../../../node_modules/nats/lib/nats-base-client/authenticator.d.ts","../../../node_modules/nats/lib/nats-base-client/nkeys.d.ts","../../../node_modules/nats/lib/nats-base-client/bench.d.ts","../../../node_modules/nats/lib/nats-base-client/ipparser.d.ts","../../../node_modules/nats/lib/jetstream/kv.d.ts","../../../node_modules/nats/lib/nats-base-client/internal_mod.d.ts","../../../node_modules/nats/lib/jetstream/jsutil.d.ts","../../../node_modules/nats/lib/jetstream/internal_mod.d.ts","../../../node_modules/nats/lib/src/nats-base-client.d.ts","../../../node_modules/nats/lib/src/connect.d.ts","../../../node_modules/nats/lib/nats-base-client/mod.d.ts","../../../node_modules/nats/lib/jetstream/mod.d.ts","../../../node_modules/nats/lib/src/mod.d.ts","../node_modules/nanoid/index.d.ts","../src/types.ts","../src/subjects.ts","../src/context.ts","../src/bot.ts","../src/index.ts","../../../node_modules/@vitest/pretty-format/dist/index.d.ts","../../../node_modules/@vitest/utils/dist/types.d.ts","../../../node_modules/@vitest/utils/dist/helpers.d.ts","../../../node_modules/tinyrainbow/dist/index-c1cfc5e9.d.ts","../../../node_modules/tinyrainbow/dist/node.d.ts","../../../node_modules/@vitest/utils/dist/index.d.ts","../../../node_modules/@vitest/runner/dist/tasks-3znpj1lr.d.ts","../../../node_modules/@vitest/utils/dist/types-bxe-2udy.d.ts","../../../node_modules/@vitest/utils/dist/diff.d.ts","../../../node_modules/@vitest/runner/dist/types.d.ts","../../../node_modules/@vitest/utils/dist/error.d.ts","../../../node_modules/@vitest/runner/dist/index.d.ts","../../../node_modules/vitest/dist/chunks/environment.looobwuu.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/rollup/node_modules/@types/estree/index.d.ts","../../../node_modules/rollup/dist/rollup.d.ts","../../../node_modules/rollup/dist/parseast.d.ts","../../../node_modules/vite/types/hmrpayload.d.ts","../../../node_modules/vite/types/customevent.d.ts","../../../node_modules/vite/types/hot.d.ts","../../../node_modules/vite/dist/node/types.d-agj9qkwt.d.ts","../../../node_modules/esbuild/lib/main.d.ts","../../../node_modules/source-map-js/source-map.d.ts","../../../node_modules/postcss/lib/previous-map.d.ts","../../../node_modules/postcss/lib/input.d.ts","../../../node_modules/postcss/lib/css-syntax-error.d.ts","../../../node_modules/postcss/lib/declaration.d.ts","../../../node_modules/postcss/lib/root.d.ts","../../../node_modules/postcss/lib/warning.d.ts","../../../node_modules/postcss/lib/lazy-result.d.ts","../../../node_modules/postcss/lib/no-work-result.d.ts","../../../node_modules/postcss/lib/processor.d.ts","../../../node_modules/postcss/lib/result.d.ts","../../../node_modules/postcss/lib/document.d.ts","../../../node_modules/postcss/lib/rule.d.ts","../../../node_modules/postcss/lib/node.d.ts","../../../node_modules/postcss/lib/comment.d.ts","../../../node_modules/postcss/lib/container.d.ts","../../../node_modules/postcss/lib/at-rule.d.ts","../../../node_modules/postcss/lib/list.d.ts","../../../node_modules/postcss/lib/postcss.d.ts","../../../node_modules/postcss/lib/postcss.d.mts","../../../node_modules/vite/dist/node/runtime.d.ts","../../../node_modules/vite/types/importglob.d.ts","../../../node_modules/vite/types/metadata.d.ts","../../../node_modules/vite/dist/node/index.d.ts","../../../node_modules/@vitest/snapshot/dist/environment-ddx0edty.d.ts","../../../node_modules/@vitest/snapshot/dist/rawsnapshot-cpnkto81.d.ts","../../../node_modules/@vitest/snapshot/dist/index.d.ts","../../../node_modules/@vitest/snapshot/dist/environment.d.ts","../../../node_modules/vitest/dist/chunks/config.cy0c388z.d.ts","../../../node_modules/vite-node/dist/trace-mapping.d-dlvdeqop.d.ts","../../../node_modules/vite-node/dist/index-z0r8hvru.d.ts","../../../node_modules/vite-node/dist/index.d.ts","../../../node_modules/@vitest/utils/dist/source-map.d.ts","../../../node_modules/vite-node/dist/client.d.ts","../../../node_modules/vite-node/dist/server.d.ts","../../../node_modules/@vitest/runner/dist/utils.d.ts","../../../node_modules/tinybench/dist/index.d.ts","../../../node_modules/vitest/dist/chunks/benchmark.geerunq4.d.ts","../../../node_modules/@vitest/snapshot/dist/manager.d.ts","../../../node_modules/vitest/dist/chunks/reporters.nr4dxcka.d.ts","../../../node_modules/vitest/dist/chunks/worker.tn5kgiih.d.ts","../../../node_modules/vitest/dist/chunks/worker.b9fxpcac.d.ts","../../../node_modules/vitest/dist/chunks/vite.czkp4x9w.d.ts","../../../node_modules/@vitest/expect/dist/chai.d.cts","../../../node_modules/@vitest/expect/dist/index.d.ts","../../../node_modules/@vitest/expect/index.d.ts","../../../node_modules/@vitest/spy/dist/index.d.ts","../../../node_modules/@vitest/mocker/dist/types-dzoqtgin.d.ts","../../../node_modules/@vitest/mocker/dist/index.d.ts","../../../node_modules/vitest/dist/chunks/mocker.crtm890j.d.ts","../../../node_modules/vitest/dist/chunks/suite.b2jumifp.d.ts","../../../node_modules/expect-type/dist/utils.d.ts","../../../node_modules/expect-type/dist/overloads.d.ts","../../../node_modules/expect-type/dist/branding.d.ts","../../../node_modules/expect-type/dist/messages.d.ts","../../../node_modules/expect-type/dist/index.d.ts","../../../node_modules/vitest/dist/index.d.ts","../src/__tests__/bot.test.ts","../src/__tests__/sentinel.test.ts","../scripts/demo-client.ts"],"fileIdsList":[[125,171,172,174,191,192],[125,173,174,191,192],[174,191,192],[125,174,179,191,192,209],[125,174,175,180,185,191,192,194,206,217],[125,174,175,176,185,191,192,194],[125,174,191,192],[120,121,122,125,174,191,192],[125,174,177,191,192,218],[125,174,178,179,186,191,192,195],[125,174,179,191,192,206,214],[125,174,180,182,185,191,192,194],[125,173,174,181,191,192],[125,174,182,183,191,192],[125,174,184,185,191,192],[125,173,174,185,191,192],[125,174,185,186,187,191,192,206,217],[125,174,185,186,187,191,192,201,206,209],[125,167,174,182,185,188,191,192,194,206,217],[125,174,185,186,188,189,191,192,194,206,214,217],[125,174,188,190,191,192,206,214,217],[123,124,125,126,127,128,129,168,169,170,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223],[125,174,185,191,192],[125,174,191,192,193,217],[125,174,182,185,191,192,194,206],[125,174,191,192,195],[125,174,191,192,196],[125,173,174,191,192,197],[125,171,172,173,174,175,176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223],[125,174,191,192,199],[125,174,191,192,200],[125,174,185,191,192,201,202],[125,174,191,192,201,203,218,220],[125,174,186,191,192],[125,174,185,191,192,206,207,209],[125,174,191,192,208,209],[125,174,191,192,206,207],[125,174,191,192,209],[125,174,191,192,210],[125,171,174,191,192,206,211,217],[125,174,185,191,192,212,213],[125,174,191,192,212,213],[125,174,179,191,192,194,206,214],[125,174,191,192,215],[125,174,191,192,194,216],[125,174,188,191,192,200,217],[125,174,179,191,192,218],[125,174,191,192,206,219],[125,174,191,192,193,220],[125,174,191,192,221],[125,167,174,191,192],[125,167,174,185,187,191,192,197,206,209,217,219,220,222],[125,174,191,192,206,223],[111,112,115,125,174,191,192],[125,174,191,192,277],[125,174,191,192,280],[112,113,115,116,117,125,174,191,192],[112,125,174,191,192],[112,113,115,125,174,191,192],[112,113,125,174,191,192],[125,174,191,192,257],[107,125,174,191,192,257,258],[107,125,174,191,192,257],[107,114,125,174,191,192],[108,125,174,191,192],[107,108,109,111,125,174,191,192],[107,125,174,191,192],[125,174,191,192,284,285],[125,174,191,192,284,285,286,287],[125,174,191,192,284,286],[125,174,191,192,284],[58,61,63,64,65,66,70,125,174,191,192],[60,61,62,63,66,67,69,94,125,174,191,192],[70,125,174,191,192],[59,70,82,125,174,191,192],[60,61,125,174,191,192],[60,61,62,70,125,174,191,192],[61,70,125,174,191,192],[61,66,69,70,125,174,191,192],[69,95,125,174,191,192],[60,61,62,63,66,67,68,70,125,174,191,192],[58,70,125,174,191,192],[69,125,174,191,192],[58,59,64,68,70,71,72,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,125,174,191,192],[93,125,174,191,192],[59,70,77,125,174,191,192],[69,70,78,79,81,125,174,191,192],[70,76,125,174,191,192],[58,64,70,71,72,73,74,75,77,78,125,174,191,192],[58,70,74,125,174,191,192],[58,64,70,79,125,174,191,192],[68,70,80,125,174,191,192],[96,125,174,191,192],[97,98,99,125,174,191,192],[93,95,125,174,191,192],[125,174,191,192,248],[125,174,191,192,246,248],[125,174,191,192,237,245,246,247,249,251],[125,174,191,192,235],[125,174,191,192,238,243,248,251],[125,174,191,192,234,251],[125,174,191,192,238,239,242,243,244,251],[125,174,191,192,238,239,240,242,243,251],[125,174,191,192,235,236,237,238,239,243,244,245,247,248,249,251],[125,174,191,192,251],[125,174,191,192,233,235,236,237,238,239,240,242,243,244,245,246,247,248,249,250],[125,174,191,192,233,251],[125,174,191,192,238,240,241,243,244,251],[125,174,191,192,242,251],[125,174,191,192,243,244,248,251],[125,174,191,192,236,246],[125,174,191,192,226,255],[125,174,191,192,225,226],[110,125,174,191,192],[125,139,143,174,191,192,217],[125,139,174,191,192,206,217],[125,134,174,191,192],[125,136,139,174,191,192,214,217],[125,174,191,192,194,214],[125,174,191,192,224],[125,134,174,191,192,224],[125,136,139,174,191,192,194,217],[125,131,132,135,138,174,185,191,192,206,217],[125,139,146,174,191,192],[125,131,137,174,191,192],[125,139,160,161,174,191,192],[125,135,139,174,191,192,209,217,224],[125,160,174,191,192,224],[125,133,134,174,191,192,224],[125,139,174,191,192],[125,133,134,135,136,137,138,139,140,141,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,161,162,163,164,165,166,174,191,192],[125,139,154,174,191,192],[125,139,146,147,174,191,192],[125,137,139,147,148,174,191,192],[125,138,174,191,192],[125,131,134,139,174,191,192],[125,139,143,147,148,174,191,192],[125,143,174,191,192],[125,137,139,142,174,191,192,217],[125,131,136,139,146,174,191,192],[125,174,191,192,206],[125,134,139,160,174,191,192,222,224],[125,174,191,192,262,263],[125,174,191,192,262],[125,174,191,192,256,262,263,275],[125,174,185,186,188,189,190,191,192,194,206,214,217,223,224,226,227,228,229,230,231,232,252,253,254,255],[125,174,191,192,228,229,230,231],[125,174,191,192,228,229,230],[125,174,191,192,228],[125,174,191,192,229],[125,174,191,192,226],[118,125,174,191,192,268,269,289],[107,118,125,174,191,192,259,260,289],[125,174,191,192,281],[107,112,118,119,125,174,186,191,192,206,256,259,261,264,265,266,267,270,271,275,276,289],[118,125,174,191,192,268,269,270,289],[125,174,191,192,256,272],[125,174,191,192,222,273],[118,119,125,174,191,192,259,261,264,289],[107,112,115,118,119,125,174,186,191,192,206,222,256,259,260,261,264,265,266,267,268,269,270,271,272,273,274,275,276,278,279,281,282,283,288,289],[100,101,102,103,125,174,191,192],[100,101,102,103,105,125,174,191,192,289],[106,125,174,191,192,289],[100,101,102,103,104,125,174,191,192],[100,102,103,125,174,191,192],[102,103,105,125,174,191,192]],"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":"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},{"version":"2c9940f017de6212c2c6112b9081c76f9e65310a42af0e61be3e6e9abf7f0bd5","impliedFormat":1},{"version":"33d47592253ddf2c8b7a294ae95ab40a94b5ddb5f6b9b83b722ed43849f17e41","impliedFormat":1},{"version":"de9850a04c2e1d54602a3e88bb5aa4760d9db22cf345ea3b02a08dcd1fc37c8b","impliedFormat":1},{"version":"96c7f08a6ac14487d26ba42510bcecc85e6bdc3a33a50df16d7d271fa9f4dae6","impliedFormat":1},{"version":"f67a33e9e24f568c91a4e3e2d8cabb3daf3caae32d3d08fb397dae3780639eec","impliedFormat":1},{"version":"af1307c43f75b749851f8e2f67b2e6736487d1441621ca18732c218a47496a48","impliedFormat":1},{"version":"1614011a9cb4b5228fe0819521394890c28ac1b6fdfca626b71d84c110d02850","impliedFormat":1},{"version":"4d26aca4ae69dfa0bfcd19c7b291e5867698b1ffe1f6af6098b4456697386c6e","impliedFormat":1},{"version":"9949d5808339a32b33e899014c4b936b61468b5879336951ca175244193e6aa8","impliedFormat":1},{"version":"036d8455ad6f638555e47cba88bad36f67bdf31604bcfb210a77aa3af5bd5185","impliedFormat":1},{"version":"79d5f1841caac458d7a47ace5cc547b4d7e0b6349e8949b2c4c6e6ac236fb1aa","impliedFormat":1},{"version":"274ffa0d9e62b8c3b0697418fd6f32701905f8a634ac680918c798315dd53b86","impliedFormat":1},{"version":"200e01179a40e70b7caf240172b0db588d00f1f9886d5ec22c550c93561fd48f","impliedFormat":1},{"version":"18a4c96dbf9509797669d18f9b34829877c9e705b9fbfd01615d8af9c99ee516","impliedFormat":1},{"version":"ecde95506bc9bfaf169eba3337005fe1a4a3fc4a4ae3f4d317a85553e2f22c64","impliedFormat":1},{"version":"9fb9631b0787790e799594970cf6ef7cb2173d730d7ae2d57697f60f5a860e94","impliedFormat":1},{"version":"0cd87633b68c343a4b995c1f7ae28799737d46d950abbb3fc07fbd9db15ab560","impliedFormat":1},{"version":"3e28f9c9b27f5789204aad8692d12fe46a69c962d79dfaf70d3c37bc41db247d","impliedFormat":1},{"version":"30e03e99c34605a4a408d6b8535e769b1d02f21af421598d1f44bef153637566","impliedFormat":1},{"version":"5528fcd80925b30412eab8131182c1a77baa335dfe875334ed90e9ad0e129281","impliedFormat":1},{"version":"45459e5e862aa6152414fdc4a73ff3a5ca68a703cf9040e4a5af3788a62820f4","impliedFormat":1},{"version":"9f4eb5b4f6ee41dc7d1cabadee8e0ca38d5ab4a63b060e370147524baff2ca9d","impliedFormat":1},{"version":"9a22722d034272f7caea3e77f04760e6429a96567a4827e89ade9541cb6944c7","impliedFormat":1},{"version":"aaa9935369c79df9901d01238721a0c9552d2d5d8b2003e38f198d5042f75b51","impliedFormat":1},{"version":"b8d3d3d6e53a69c166096c572bd0c1d857ea9cf065320b1912eb3bac79d1f455","impliedFormat":1},{"version":"db6b1282d27fa7c0c1f63af90a134e2b3641b2517fe63e79600173f938825883","impliedFormat":1},{"version":"7a86ebd2511b08bd29ea232c128c26e6408697984945927bc2d3521e3a407512","impliedFormat":1},{"version":"984f30dabcf607fc26c4404415d67e938a784044a34f87d2fe36b89e0bbeb6cc","impliedFormat":1},{"version":"3bd2b18fb7a8e2858563f285e5195fc3cb58bddc030705bc845b8a1d85bb3894","impliedFormat":1},{"version":"caf0ba1b68ff9c4435615c16bb252e1ef51170aab1d355bb6663cbb58c09b06c","impliedFormat":1},{"version":"7179bfaac26759ccb4ed3ea13d7fcfb5cf3150d9632e97cd8f4650990e8d63ad","impliedFormat":1},{"version":"bc399896d66e5cc6cb7d069180a7181b93d14c43e938852b5c8cfefe1b76b443","impliedFormat":1},{"version":"abc8bcb0d28b91aa8de5f35cd60d107e4d4db4087217ebd1ab145673ba7ac0ad","impliedFormat":1},{"version":"1a4df56182c0c3db0c3cd24053b2a448a7cf0cf434c132b3baad7f7779502e90","impliedFormat":1},{"version":"849b7a65dd513282a5d2ba5dd3345dcdccf7ce5a3b69c30a7b094b9b3b36e46d","impliedFormat":1},{"version":"88350c55901c9c8c3849b2e8622d414c731adb164633e239173e491097d616ec","impliedFormat":1},{"version":"2ead347cdc2610b3ea0f000c4e55a02904a9fb58e45efc9baf1d0589a181c221","impliedFormat":1},{"version":"06e64968516bbf12b7d388d01d5f3f9c18e705fd1b15ce108eb4c568d0ab3f2d","impliedFormat":1},{"version":"5824546363337819f73a70cb94120a0cca407c63bf1f57098dd57a89ee825b2e","impliedFormat":1},{"version":"fe343271f55363e8602b4fb43ad712833cb68ebeb50b2ff1c05b91ee04b4e07e","impliedFormat":1},{"version":"7ffa23db9027d9029976f874d028fbc95c4e96cbedc2708895e15870457ae59f","impliedFormat":1},{"version":"465447d62f1750e04d98cc30df8756dc79a0e8ce0a33a02bc8da46f303bdd8e5","impliedFormat":1},{"version":"34c89375bf43cf3caec2b2e3eb4709d22b7d991d8db89a2744a95106c64532a6","impliedFormat":1},{"version":"3637e4089eaf583a1675743fa74e25ff09144b400782ed787d37980fc36fa085","impliedFormat":99},"cafbd21ec6549c8b03998612956d5e741baf5694bea49754c534de1c6be59f6f","0e6b0303b0b60cf3b66ecd1837a5bbf247f6220e4d30dd158c7afbbc4a6b9888","f3abe2a9901eb544763e5e805c2f00ecc0f9f140355cf251702e88f1e7db24c2","77e2916a317b66df0afcf4b83ea4e09d99d9907256523676ec31eb0705c196cb","8f5fe16c16fb388796d7cafe8468a0f0d494fd993189ee9ed1a970215c70880c",{"version":"d2e64a6f25013b099e83bfadb2c388d7bef3e8f3fdb25528225bbc841e7e7e3a","impliedFormat":99},{"version":"369ba5259e66ca8c7d35e3234f7a2a0863a770fdb8266505747c65cf346a0804","impliedFormat":99},{"version":"64d984f55025daf604f670b7dfd090ea765f2098aee871174ef2ee3e94479098","impliedFormat":99},{"version":"f147b6710441cf3ec3234adf63b0593ce5e8c9b692959d21d3babc8454bcf743","impliedFormat":99},{"version":"e96d5373a66c2cfbbc7e6642cf274055aa2c7ff6bd37be7480c66faf9804db6d","impliedFormat":99},{"version":"02bcdd7a76c5c1c485cbf05626d24c86ac8f9a1d8dc31f8924108bbaa4cf3ba9","impliedFormat":99},{"version":"c874ab6feac6e0fdf9142727c9a876065777a5392f14b0bbcf869b1e69eb46b5","impliedFormat":99},{"version":"7c553fc9e34773ddbaabe0fa1367d4b109101d0868a008f11042bee24b5a925d","impliedFormat":99},{"version":"9962ce696fbdce2421d883ca4b062a54f982496625437ae4d3633376c5ad4a80","impliedFormat":99},{"version":"e3ea467c4a7f743f3548c9ed61300591965b1d12c08c8bb9aaff8a002ba95fce","impliedFormat":99},{"version":"4c17183a07a63bea2653fbfc0a942b027160ddbee823024789a415f9589de327","impliedFormat":99},{"version":"3e2203c892297ea44b87470fde51b3d48cfe3eeb6901995de429539462894464","impliedFormat":99},{"version":"c84bf7a4abc5e7fdf45971a71b25b0e0d34ccd5e720a866dd78bb71d60d41a3f","impliedFormat":99},{"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":"4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","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":"73b5fa37db36eeac90c4d752e39586f1b57187400c4f5280fd05f16437287a45","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":"151ff381ef9ff8da2da9b9663ebf657eac35c4c9a19183420c05728f31a6761d","impliedFormat":1},{"version":"ee70b8037ecdf0de6c04f35277f253663a536d7e38f1539d270e4e916d225a3f","affectsGlobalScope":true,"impliedFormat":1},{"version":"a660aa95476042d3fdcc1343cf6bb8fdf24772d31712b1db321c5a4dcc325434","impliedFormat":1},{"version":"282f98006ed7fa9bb2cd9bdbe2524595cfc4bcd58a0bb3232e4519f2138df811","impliedFormat":1},{"version":"6222e987b58abfe92597e1273ad7233626285bc2d78409d4a7b113d81a83496b","impliedFormat":1},{"version":"cbe726263ae9a7bf32352380f7e8ab66ee25b3457137e316929269c19e18a2be","impliedFormat":1},{"version":"8b96046bf5fb0a815cba6b0880d9f97b7f3a93cf187e8dcfe8e2792e97f38f87","impliedFormat":99},{"version":"bacf2c84cf448b2cd02c717ad46c3d7fd530e0c91282888c923ad64810a4d511","affectsGlobalScope":true,"impliedFormat":1},{"version":"402e5c534fb2b85fa771170595db3ac0dd532112c8fa44fc23f233bc6967488b","impliedFormat":1},{"version":"52dcc257df5119fb66d864625112ce5033ac51a4c2afe376a0b299d2f7f76e4a","impliedFormat":1},{"version":"e5bab5f871ef708d52d47b3e5d0aa72a08ee7a152f33931d9a60809711a2a9a3","impliedFormat":1},{"version":"e16dc2a81595736024a206c7d5c8a39bfe2e6039208ef29981d0d95434ba8fcf","impliedFormat":1},{"version":"cc4a4903fb698ca1d961d4c10dce658aa3a479faf40509d526f122b044eaf6a4","impliedFormat":1},{"version":"19ee8416e6473ed6c7adb868fa796b5653cf0fa2a337658e677eaa0d134388c3","impliedFormat":1},{"version":"1328ab4e442614b28cdb3d4b414cf68325c0da0dca07287a338d0654b7a00261","impliedFormat":1},{"version":"a039dc21f045919f3cbee2ec13812cc6cc3eebc99dae4be00973230f468d19a6","impliedFormat":1},{"version":"3fbe57af01460e49dcd29df55d6931e1672bc6f1be0fb073d11410bc16f9037d","impliedFormat":1},{"version":"f760be449e8562ec5c09bb5187e8e1eabf3c113c0c58cddda53ef8c69f3e2131","impliedFormat":1},{"version":"44325ed13294fce6ab825b82947bbeed2611db7dad9d9135260192f375e5a189","impliedFormat":1},{"version":"e392e8fb5b514eafc585601c1d781485aa6dd6a320e75daf1064a4c6918a1b45","impliedFormat":1},{"version":"46e4a36e8ddbdfb4e7330e11c81c970dc8b218611df9183d39c41c5f8c653b55","impliedFormat":1},{"version":"370bde134aa8c2abc926d0e99d3a4d5d5dba65c6ee65459137e4f02670cbf841","impliedFormat":1},{"version":"6332f565867cf4a740a70e30f31cefba37ef7cebcf74f22eab8d744fde6d193e","impliedFormat":1},{"version":"2977b7884aedc895a1d0c9c210c7cf3272c29d6959a08a6fa3ff71e0aff08175","impliedFormat":1},{"version":"17f2922d41ddd032830a91371c948cd9ce903b35c95adca72271a54584f19b0b","impliedFormat":1},{"version":"3eed76ede2a1a14d7c9bb0a642041282dcc264811139d3dd275c9fe14efc9840","impliedFormat":1},{"version":"e3cf0611709328b449ec13f8c436712d62003620ce480139fae46ce001c2ee9f","impliedFormat":1},{"version":"8d369483f0c2b9ee388129cfdb6a43bc8112b377e86a41884bd06e19ce04f4c1","impliedFormat":99},{"version":"82e687ebd99518bc63ea04b0c3810fb6e50aa6942decd0ca6f7a56d9b9a212a6","impliedFormat":99},{"version":"7f698624bbbb060ece7c0e51b7236520ebada74b747d7523c7df376453ed6fea","impliedFormat":1},{"version":"8f07f2b6514744ac96e51d7cb8518c0f4de319471237ea10cf688b8d0e9d0225","impliedFormat":1},{"version":"257b83faa134d971c738a6b9e4c47e59bb7b23274719d92197580dd662bfafc3","impliedFormat":99},{"version":"e01ea380015ed698c3c0e2ccd0db72f3fc3ef1abc4519f122aa1c1a8d419a505","impliedFormat":99},{"version":"5ada1f8a9580c0f7478fe03ae3e07e958f0b79bdfb9dd50eeb98c1324f40011b","impliedFormat":99},{"version":"a8301dc90b4bd9fba333226ee0f1681aeeff1bd90233a8f647e687cb4b7d3521","impliedFormat":99},{"version":"e3225dc0bec183183509d290f641786245e6652bc3dce755f7ef404060693c35","impliedFormat":99},{"version":"09a03870ed8c55d7453bc9ad684df88965f2f770f987481ca71b8a09be5205bc","impliedFormat":99},{"version":"e6233e1c976265e85aa8ad76c3881febe6264cb06ae3136f0257e1eab4a6cc5a","impliedFormat":99},{"version":"2cdd50ddc49e2d608ee848fc4ab0db9a2716624fabb4209c7c683d87e54d79c5","impliedFormat":99},{"version":"e431d664338b8470abb1750d699c7dfcebb1a25434559ef85bb96f1e82de5972","impliedFormat":99},{"version":"2c4254139d037c3caca66ce291c1308c1b5092cfcb151eb25980db932dd3b01a","impliedFormat":99},{"version":"970ae00ed018cb96352dc3f37355ef9c2d9f8aa94d7174ccd6d0ed855e462097","impliedFormat":99},{"version":"d2f8dee457ef7660b604226d471d55d927c3051766bdd80353553837492635c3","impliedFormat":99},{"version":"110a503289a2ef76141ffff3ffceb9a1c3662c32748eb9f6777a2bd0866d6fb1","impliedFormat":99},{"version":"69bf2422313487956e4dacf049f30cb91b34968912058d244cb19e4baa24da97","impliedFormat":99},{"version":"310e6b62c493ce991624169a1c1904015769d947be88dc67e00adc7ebebcfa87","impliedFormat":99},{"version":"62fefda288160bf6e435b21cc03d3fbac11193d8d3bd0e82d86623cca7691c29","impliedFormat":99},{"version":"fcc46a8bcbf9bef21023bba1995160a25f0bc590ca3563ec44c315b4f4c1b18a","impliedFormat":99},{"version":"0309a01650023994ed96edbd675ea4fdc3779a823ce716ad876cc77afb792b62","impliedFormat":99},{"version":"f13d7beeea58e219daef3a40e0dc4f2bd7d9581ac04cedec236102a12dfd2090","impliedFormat":99},{"version":"669573548930fb7d0a0761b827e203dc623581e21febf0be80fb02414f217d74","impliedFormat":99},{"version":"48c411efce1848d1ed55de41d7deb93cbf7c04080912fd87aa517ed25ef42639","affectsGlobalScope":true,"impliedFormat":1},{"version":"a094636c05f3e75cb072684dd42cd25a4c1324bec4a866706c85c04cecd49613","affectsGlobalScope":true,"impliedFormat":99},{"version":"fe2d63fcfdde197391b6b70daf7be8c02a60afa90754a5f4a04bdc367f62793d","impliedFormat":99},{"version":"9a3e2c85ec1ab7a0874a19814cc73c691b716282cb727914093089c5a8475955","impliedFormat":99},{"version":"cbdc781d2429935c9c42acd680f2a53a9f633e8de03290ec6ea818e4f7bff19a","impliedFormat":99},{"version":"9f6d9f5dd710922f82f69abf9a324e28122b5f31ae6f6ce78427716db30a377e","impliedFormat":99},{"version":"ac2414a284bdecfd6ab7b87578744ab056cd04dd574b17853cd76830ef5b72f2","impliedFormat":99},{"version":"c3f921bbc9d2e65bd503a56fbc66da910e68467baedb0b9db0cc939e1876c0d7","impliedFormat":99},{"version":"c30a41267fc04c6518b17e55dcb2b810f267af4314b0b6d7df1c33a76ce1b330","impliedFormat":1},{"version":"72422d0bac4076912385d0c10911b82e4694fc106e2d70added091f88f0824ba","impliedFormat":1},{"version":"da251b82c25bee1d93f9fd80c5a61d945da4f708ca21285541d7aff83ecb8200","impliedFormat":1},{"version":"64db14db2bf37ac089766fdb3c7e1160fabc10e9929bc2deeede7237e4419fc8","impliedFormat":1},{"version":"98b94085c9f78eba36d3d2314affe973e8994f99864b8708122750788825c771","impliedFormat":1},{"version":"0cc99fbb161d78729d71fad66c6c363e3095862d6277160f29fa960744b785c6","affectsGlobalScope":true,"impliedFormat":99},"f30ad7cfd45abf28636cd342c66de289a19df4a1b4d015af8a85dff5b63d65ae","d70effff365e85b233a3205f007aec81f2c3e4bdd6e0630fba8f423019aae650","06e7c768f7e9538837f1e8141a5df1ba4ef07a6ad9361ea2c66a15f3edf966d5"],"root":[[102,106],[290,292]],"options":{"declaration":true,"declarationMap":true,"esModuleInterop":true,"exactOptionalPropertyTypes":true,"module":99,"noImplicitOverride":true,"noUncheckedIndexedAccess":true,"outDir":"./","rootDir":"..","skipLibCheck":true,"sourceMap":true,"strict":true,"target":9},"referencedMap":[[171,1],[172,1],[173,2],[125,3],[174,4],[175,5],[176,6],[120,7],[123,8],[121,7],[122,7],[177,9],[178,10],[179,11],[180,12],[181,13],[182,14],[183,14],[184,15],[185,16],[186,17],[187,18],[126,7],[124,7],[188,19],[189,20],[190,21],[224,22],[191,23],[192,7],[193,24],[194,25],[195,26],[196,27],[197,28],[198,29],[199,30],[200,31],[201,32],[202,32],[203,33],[204,7],[205,34],[206,35],[208,36],[207,37],[209,38],[210,39],[211,40],[212,41],[213,42],[214,43],[215,44],[216,45],[217,46],[218,47],[219,48],[220,49],[221,50],[127,7],[128,7],[129,7],[168,51],[169,7],[170,7],[222,52],[223,53],[276,7],[277,54],[278,55],[281,56],[280,7],[107,7],[118,57],[113,58],[116,59],[268,60],[257,7],[260,61],[259,62],[271,62],[258,63],[279,7],[115,64],[117,64],[109,65],[112,66],[265,65],[114,67],[108,7],[130,7],[232,7],[286,68],[288,69],[287,70],[285,71],[284,7],[67,72],[95,73],[61,74],[60,75],[62,76],[63,77],[66,78],[94,74],[92,79],[99,80],[69,81],[88,74],[90,82],[59,7],[70,83],[72,7],[76,7],[80,7],[85,74],[75,82],[65,7],[93,84],[91,7],[98,85],[84,86],[74,74],[82,87],[89,7],[83,7],[86,74],[77,88],[79,89],[64,82],[87,90],[78,7],[73,74],[71,74],[68,91],[81,92],[58,74],[97,93],[100,94],[96,95],[249,96],[247,97],[248,98],[236,99],[237,97],[244,100],[235,101],[240,102],[250,7],[241,103],[246,104],[252,105],[251,106],[234,107],[242,108],[243,109],[238,110],[245,96],[239,111],[227,112],[226,113],[225,7],[233,7],[269,7],[110,7],[111,114],[56,7],[57,7],[11,7],[10,7],[2,7],[12,7],[13,7],[14,7],[15,7],[16,7],[17,7],[18,7],[19,7],[3,7],[20,7],[21,7],[4,7],[22,7],[26,7],[23,7],[24,7],[25,7],[27,7],[28,7],[29,7],[5,7],[30,7],[31,7],[32,7],[33,7],[6,7],[37,7],[34,7],[35,7],[36,7],[38,7],[7,7],[39,7],[44,7],[45,7],[40,7],[41,7],[42,7],[43,7],[8,7],[49,7],[46,7],[47,7],[48,7],[50,7],[9,7],[51,7],[52,7],[53,7],[55,7],[54,7],[1,7],[146,115],[156,116],[145,115],[166,117],[137,118],[136,119],[165,120],[159,121],[164,122],[139,123],[153,124],[138,125],[162,126],[134,127],[133,120],[163,128],[135,129],[140,130],[141,7],[144,130],[131,7],[167,131],[157,132],[148,133],[149,134],[151,135],[147,136],[150,137],[160,120],[142,138],[143,139],[152,140],[132,141],[155,132],[154,130],[158,7],[161,142],[266,143],[263,144],[264,143],[267,145],[262,7],[256,146],[253,147],[231,148],[229,149],[228,7],[230,150],[254,7],[255,151],[270,152],[261,153],[119,7],[282,154],[272,155],[283,156],[275,157],[274,158],[273,159],[289,160],[101,7],[292,161],[290,162],[291,163],[105,164],[104,165],[106,166],[103,7],[102,7]],"affectedFilesPendingEmit":[[292,51],[290,51],[291,51],[105,51],[104,51],[106,51],[103,51],[102,51]],"version":"5.9.3"}