@qvac/core 0.11.1 → 0.11.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/CHANGELOG.md +69 -1
  2. package/README.md +19 -16
  3. package/dist-lib/lib/api/chunks.js +4 -2
  4. package/dist-lib/lib/api/rag.js +7 -5
  5. package/dist-lib/lib/assistant/history.d.ts +1 -0
  6. package/dist-lib/lib/assistant/history.js +0 -16
  7. package/dist-lib/lib/assistant-tree.d.ts +2 -0
  8. package/dist-lib/lib/assistant-tree.js +4 -2
  9. package/dist-lib/lib/assistant.d.ts +5 -1
  10. package/dist-lib/lib/assistant.js +63 -20
  11. package/dist-lib/lib/compaction.d.ts +2 -1
  12. package/dist-lib/lib/compaction.js +14 -4
  13. package/dist-lib/lib/constants.d.ts +3 -0
  14. package/dist-lib/lib/constants.js +3 -0
  15. package/dist-lib/lib/core/chat-activity.js +12 -15
  16. package/dist-lib/lib/core/chunk.d.ts +9 -1
  17. package/dist-lib/lib/core/chunk.js +42 -8
  18. package/dist-lib/lib/core/files/attachments.js +3 -3
  19. package/dist-lib/lib/core/files/index.js +2 -1
  20. package/dist-lib/lib/core/files/processing/index.d.ts +1 -0
  21. package/dist-lib/lib/core/files/processing/index.js +8 -0
  22. package/dist-lib/lib/core/files/processing/settle.d.ts +1 -0
  23. package/dist-lib/lib/core/files/processing/settle.js +20 -13
  24. package/dist-lib/lib/core/hosted-agents.d.ts +3 -0
  25. package/dist-lib/lib/core/hosted-agents.js +19 -0
  26. package/dist-lib/lib/core/notification.js +16 -13
  27. package/dist-lib/lib/core.d.ts +6 -0
  28. package/dist-lib/lib/core.js +5 -0
  29. package/dist-lib/lib/credential-pusher.d.ts +11 -7
  30. package/dist-lib/lib/credential-pusher.js +40 -8
  31. package/dist-lib/lib/integrations/setup-routes.js +7 -5
  32. package/dist-lib/lib/kv-cache-retention.d.ts +34 -0
  33. package/dist-lib/lib/kv-cache-retention.js +98 -0
  34. package/dist-lib/schema/content.js +2 -1
  35. package/dist-lib/schema/qvac.js +4 -2
  36. package/dist-lib/spec/hrpc/messages.js +4 -10
  37. package/dist-lib/spec/hyperschema/index.js +4 -10
  38. package/dist-lib/spec/hyperschema/schema.json +2 -1
  39. package/dist-lib/spec/hyperschema/types.d.ts +1 -1
  40. package/dist-lib/spec/mesh/hyperdb/messages.js +34 -14
  41. package/dist-lib/spec/mesh/hyperdispatch/messages.js +18 -8
  42. package/dist-lib/spec/mesh/hyperschema/index.js +18 -8
  43. package/dist-lib/spec/mesh/hyperschema/schema.json +11 -1
  44. package/dist-lib/spec/mesh/hyperschema/types.d.ts +3 -1
  45. package/package.json +5 -2
  46. package/tui/app.mjs +743 -266
  47. package/tui/boot.mjs +2 -2
  48. package/tui/lib/connect-sheet.mjs +350 -0
  49. package/tui/lib/setup.mjs +59 -25
  50. package/tui/lib/skill-connect.mjs +145 -0
@@ -0,0 +1,34 @@
1
+ import type { LoggerInterface } from '@qvac/logging';
2
+ import type { Capabilities } from '../spec/capabilities.d.ts';
3
+ import type { AssistantChat } from '../spec/hyperschema/types.d.ts';
4
+ type RetentionEngine = Pick<Capabilities, 'configGet' | 'configSet' | 'listChats'>;
5
+ export interface KvCacheRetentionOptions {
6
+ readonly active: () => boolean;
7
+ readonly running: (chatId: string) => boolean;
8
+ readonly deleteChatKvCache: (chatId: string) => Promise<boolean>;
9
+ readonly defaultMs?: number | undefined;
10
+ readonly logger?: LoggerInterface | null;
11
+ readonly now?: () => number;
12
+ }
13
+ interface IdleWindow {
14
+ readonly from: number;
15
+ readonly cutoff: number;
16
+ }
17
+ export declare function kvCacheRetentionMs(value: unknown, defaultMs?: number): number | null;
18
+ export declare function kvCacheSweptKey(meshId: string): string;
19
+ export declare function idleChatIds(chats: ReadonlyArray<AssistantChat>, { from, cutoff }: IdleWindow): string[];
20
+ export declare class KvCacheRetention {
21
+ private readonly _engine;
22
+ private readonly _opts;
23
+ private readonly _now;
24
+ private readonly _queued;
25
+ private _queue;
26
+ private _timer;
27
+ constructor(engine: RetentionEngine, opts: KvCacheRetentionOptions);
28
+ sweep(meshId: string): Promise<void>;
29
+ start(meshIds: () => Iterable<string>): void;
30
+ stop(): void;
31
+ private _sweep;
32
+ private _deleteIdle;
33
+ }
34
+ export {};
@@ -0,0 +1,98 @@
1
+ import { KV_CACHE_RETENTION_DAYS_DEFAULT, KV_CACHE_RETENTION_KEY } from './constants.js';
2
+ import { errorMessage } from './guards.js';
3
+ import { unref } from './unref.js';
4
+ const DAY_MS = 24 * 60 * 60_000;
5
+ const DEFAULT_MS = KV_CACHE_RETENTION_DAYS_DEFAULT * DAY_MS;
6
+ const SWEEP_TICK_MS = 60 * 60_000;
7
+ export function kvCacheRetentionMs(value, defaultMs = DEFAULT_MS) {
8
+ if (typeof value !== 'number' || !Number.isFinite(value)) {
9
+ return defaultMs > 0 ? defaultMs : null;
10
+ }
11
+ return value > 0 ? value * DAY_MS : null;
12
+ }
13
+ export function kvCacheSweptKey(meshId) {
14
+ return `kvCache.sweptThrough.${meshId}`;
15
+ }
16
+ export function idleChatIds(chats, { from, cutoff }) {
17
+ return chats
18
+ .filter((chat) => {
19
+ const at = chat.lastActivityAt || chat.createdAt;
20
+ return at >= from && at < cutoff;
21
+ })
22
+ .map((chat) => chat.id);
23
+ }
24
+ export class KvCacheRetention {
25
+ _engine;
26
+ _opts;
27
+ _now;
28
+ _queued;
29
+ _queue;
30
+ _timer;
31
+ constructor(engine, opts) {
32
+ this._engine = engine;
33
+ this._opts = opts;
34
+ this._now = opts.now ?? Date.now;
35
+ this._queued = new Set();
36
+ this._queue = Promise.resolve();
37
+ this._timer = null;
38
+ }
39
+ sweep(meshId) {
40
+ if (this._queued.has(meshId)) {
41
+ return this._queue;
42
+ }
43
+ this._queued.add(meshId);
44
+ this._queue = this._queue.then(() => {
45
+ this._queued.delete(meshId);
46
+ return this._sweep(meshId).catch((err) => this._opts.logger?.warn('kv-cache-retention', 'sweep failed', {
47
+ meshId,
48
+ error: errorMessage(err)
49
+ }));
50
+ });
51
+ return this._queue;
52
+ }
53
+ start(meshIds) {
54
+ this._timer = setInterval(() => {
55
+ for (const meshId of meshIds()) {
56
+ void this.sweep(meshId);
57
+ }
58
+ }, SWEEP_TICK_MS);
59
+ unref(this._timer);
60
+ }
61
+ stop() {
62
+ if (this._timer) {
63
+ clearInterval(this._timer);
64
+ }
65
+ this._timer = null;
66
+ }
67
+ async _sweep(meshId) {
68
+ const retention = await this._engine.configGet({ key: KV_CACHE_RETENTION_KEY });
69
+ const retentionMs = kvCacheRetentionMs(retention.value, this._opts.defaultMs);
70
+ if (retentionMs === null || !this._opts.active()) {
71
+ return;
72
+ }
73
+ const markKey = kvCacheSweptKey(meshId);
74
+ const mark = await this._engine.configGet({ key: markKey });
75
+ const from = typeof mark.value === 'number' ? mark.value : 0;
76
+ const cutoff = this._now() - retentionMs;
77
+ if (cutoff <= from) {
78
+ return;
79
+ }
80
+ const { chats } = await this._engine.listChats({ meshId });
81
+ if (await this._deleteIdle(idleChatIds(chats ?? [], { from, cutoff }))) {
82
+ await this._engine.configSet({ key: markKey, value: cutoff });
83
+ }
84
+ }
85
+ async _deleteIdle(chatIds) {
86
+ let complete = true;
87
+ for (const chatId of chatIds) {
88
+ if (!this._opts.active())
89
+ return false;
90
+ if (this._opts.running(chatId))
91
+ continue;
92
+ if (!(await this._opts.deleteChatKvCache(chatId))) {
93
+ complete = false;
94
+ }
95
+ }
96
+ return complete;
97
+ }
98
+ }
@@ -95,9 +95,10 @@ export function registerContentTypes(ns, namespace) {
95
95
  { name: 'name', type: 'string', required: true },
96
96
  { name: 'arguments', type: 'json' }
97
97
  ]);
98
+ const result = namespace === 'assistant' ? { required: true } : {};
98
99
  versioned('chunk-content-tool-result', [
99
100
  { name: 'name', type: 'string', required: true },
100
- { name: 'result', type: 'json' }
101
+ { name: 'result', type: 'json', ...result }
101
102
  ]);
102
103
  const attachment = [
103
104
  { name: 'id', type: 'string', required: true },
@@ -83,7 +83,8 @@ export function registerQvacTypes(ns) {
83
83
  { name: 'capability', type: 'string' },
84
84
  { name: 'capabilityArgs', type: 'json' },
85
85
  { name: 'enhance', type: '@qvac/enhance-mode' },
86
- { name: 'sourceId', type: 'string' }
86
+ { name: 'sourceId', type: 'string' },
87
+ { name: 'falsyResult', type: 'string' }
87
88
  ]);
88
89
  versioned('chunk-counter', [
89
90
  { name: 'chatId', type: 'string', required: true },
@@ -117,7 +118,8 @@ export function registerQvacTypes(ns) {
117
118
  { name: 'capability', type: 'string' },
118
119
  { name: 'capabilityArgs', type: 'json' },
119
120
  { name: 'enhance', type: '@qvac/enhance-mode' },
120
- { name: 'sourceId', type: 'string' }
121
+ { name: 'sourceId', type: 'string' },
122
+ { name: 'falsyResult', type: 'string' }
121
123
  ]);
122
124
  versioned('update-chunk-operation', [
123
125
  { name: 'id', type: 'string', required: true },
@@ -3293,26 +3293,20 @@ const encoding87 = {
3293
3293
  const encoding88 = {
3294
3294
  preencode(state, m) {
3295
3295
  c.string.preencode(state, m.name)
3296
- state.end++ // max flag is 1 so always one byte
3297
-
3298
- if (m.result) c.json.preencode(state, m.result)
3296
+ c.json.preencode(state, m.result)
3299
3297
  },
3300
3298
  encode(state, m) {
3301
- const flags = m.result ? 1 : 0
3302
-
3303
3299
  c.string.encode(state, m.name)
3304
- c.uint.encode(state, flags)
3305
-
3306
- if (m.result) c.json.encode(state, m.result)
3300
+ c.json.encode(state, m.result)
3307
3301
  },
3308
3302
  decode(state) {
3309
3303
  const r0 = c.string.decode(state)
3310
- const flags = c.uint.decode(state)
3304
+ const r1 = c.json.decode(state)
3311
3305
 
3312
3306
  return {
3313
3307
  version: 0,
3314
3308
  name: r0,
3315
- result: (flags & 1) !== 0 ? c.json.decode(state) : null
3309
+ result: r1
3316
3310
  }
3317
3311
  }
3318
3312
  }
@@ -3293,26 +3293,20 @@ const encoding87 = {
3293
3293
  const encoding88 = {
3294
3294
  preencode(state, m) {
3295
3295
  c.string.preencode(state, m.name)
3296
- state.end++ // max flag is 1 so always one byte
3297
-
3298
- if (m.result) c.json.preencode(state, m.result)
3296
+ c.json.preencode(state, m.result)
3299
3297
  },
3300
3298
  encode(state, m) {
3301
- const flags = m.result ? 1 : 0
3302
-
3303
3299
  c.string.encode(state, m.name)
3304
- c.uint.encode(state, flags)
3305
-
3306
- if (m.result) c.json.encode(state, m.result)
3300
+ c.json.encode(state, m.result)
3307
3301
  },
3308
3302
  decode(state) {
3309
3303
  const r0 = c.string.decode(state)
3310
- const flags = c.uint.decode(state)
3304
+ const r1 = c.json.decode(state)
3311
3305
 
3312
3306
  return {
3313
3307
  version: 0,
3314
3308
  name: r0,
3315
- result: (flags & 1) !== 0 ? c.json.decode(state) : null
3309
+ result: r1
3316
3310
  }
3317
3311
  }
3318
3312
  }
@@ -2524,7 +2524,7 @@
2524
2524
  "name": "chunk-content-tool-result-v1",
2525
2525
  "namespace": "assistant",
2526
2526
  "compact": false,
2527
- "flagsPosition": 1,
2527
+ "flagsPosition": -1,
2528
2528
  "fields": [
2529
2529
  {
2530
2530
  "name": "name",
@@ -2534,6 +2534,7 @@
2534
2534
  },
2535
2535
  {
2536
2536
  "name": "result",
2537
+ "required": true,
2537
2538
  "type": "json",
2538
2539
  "version": 1
2539
2540
  }
@@ -516,7 +516,7 @@ export type AssistantChunkContentToolCall = (AssistantChunkContentToolCallV1 & {
516
516
 
517
517
  export interface AssistantChunkContentToolResultV1 {
518
518
  name: string
519
- result?: unknown | null
519
+ result: unknown
520
520
  }
521
521
 
522
522
  export type AssistantChunkContentToolResult = (AssistantChunkContentToolResultV1 & { version?: number })
@@ -1,12 +1,12 @@
1
1
  // This file is autogenerated by the hyperschema compiler
2
- // Schema Version: 17
2
+ // Schema Version: 18
3
3
  /* eslint-disable camelcase */
4
4
  /* eslint-disable quotes */
5
5
  /* eslint-disable space-before-function-paren */
6
6
 
7
7
  import { c } from 'hyperschema/runtime'
8
8
 
9
- const VERSION = 17
9
+ const VERSION = 18
10
10
 
11
11
  // eslint-disable-next-line no-unused-vars
12
12
  let version = VERSION
@@ -1047,7 +1047,8 @@ const encoding27 = {
1047
1047
  ((version >= 10 && m.capability) ? 524288 : 0) |
1048
1048
  ((version >= 10 && m.capabilityArgs) ? 1048576 : 0) |
1049
1049
  ((version >= 10 && m.enhance) ? 2097152 : 0) |
1050
- ((version >= 16 && m.sourceId) ? 4194304 : 0)
1050
+ ((version >= 16 && m.sourceId) ? 4194304 : 0) |
1051
+ ((version >= 18 && m.falsyResult) ? 8388608 : 0)
1051
1052
 
1052
1053
  c.string.preencode(state, m.id)
1053
1054
  c.string.preencode(state, m.chatId)
@@ -1080,6 +1081,7 @@ const encoding27 = {
1080
1081
  if (version >= 10 && m.capabilityArgs) c.json.preencode(state, m.capabilityArgs)
1081
1082
  if (version >= 10 && m.enhance) encoding141.preencode(state, m.enhance)
1082
1083
  if (version >= 16 && m.sourceId) c.string.preencode(state, m.sourceId)
1084
+ if (version >= 18 && m.falsyResult) c.string.preencode(state, m.falsyResult)
1083
1085
  },
1084
1086
  encode(state, m) {
1085
1087
  const flags =
@@ -1105,7 +1107,8 @@ const encoding27 = {
1105
1107
  ((version >= 10 && m.capability) ? 524288 : 0) |
1106
1108
  ((version >= 10 && m.capabilityArgs) ? 1048576 : 0) |
1107
1109
  ((version >= 10 && m.enhance) ? 2097152 : 0) |
1108
- ((version >= 16 && m.sourceId) ? 4194304 : 0)
1110
+ ((version >= 16 && m.sourceId) ? 4194304 : 0) |
1111
+ ((version >= 18 && m.falsyResult) ? 8388608 : 0)
1109
1112
 
1110
1113
  c.string.encode(state, m.id)
1111
1114
  c.string.encode(state, m.chatId)
@@ -1138,6 +1141,7 @@ const encoding27 = {
1138
1141
  if (version >= 10 && m.capabilityArgs) c.json.encode(state, m.capabilityArgs)
1139
1142
  if (version >= 10 && m.enhance) encoding141.encode(state, m.enhance)
1140
1143
  if (version >= 16 && m.sourceId) c.string.encode(state, m.sourceId)
1144
+ if (version >= 18 && m.falsyResult) c.string.encode(state, m.falsyResult)
1141
1145
  },
1142
1146
  decode(state) {
1143
1147
  const r0 = c.string.decode(state)
@@ -1174,7 +1178,8 @@ const encoding27 = {
1174
1178
  capability: (version >= 10 && (flags & 524288) !== 0) ? c.string.decode(state) : null,
1175
1179
  capabilityArgs: (version >= 10 && (flags & 1048576) !== 0) ? c.json.decode(state) : null,
1176
1180
  enhance: (version >= 10 && (flags & 2097152) !== 0) ? encoding141.decode(state) : null,
1177
- sourceId: (version >= 16 && (flags & 4194304) !== 0) ? c.string.decode(state) : null
1181
+ sourceId: (version >= 16 && (flags & 4194304) !== 0) ? c.string.decode(state) : null,
1182
+ falsyResult: (version >= 18 && (flags & 8388608) !== 0) ? c.string.decode(state) : null
1178
1183
  }
1179
1184
  }
1180
1185
  }
@@ -1318,7 +1323,8 @@ const encoding31 = {
1318
1323
  ((version >= 10 && m.capability) ? 262144 : 0) |
1319
1324
  ((version >= 10 && m.capabilityArgs) ? 524288 : 0) |
1320
1325
  ((version >= 10 && m.enhance) ? 1048576 : 0) |
1321
- ((version >= 16 && m.sourceId) ? 2097152 : 0)
1326
+ ((version >= 16 && m.sourceId) ? 2097152 : 0) |
1327
+ ((version >= 18 && m.falsyResult) ? 4194304 : 0)
1322
1328
 
1323
1329
  c.string.preencode(state, m.id)
1324
1330
  c.string.preencode(state, m.chatId)
@@ -1349,6 +1355,7 @@ const encoding31 = {
1349
1355
  if (version >= 10 && m.capabilityArgs) c.json.preencode(state, m.capabilityArgs)
1350
1356
  if (version >= 10 && m.enhance) encoding141.preencode(state, m.enhance)
1351
1357
  if (version >= 16 && m.sourceId) c.string.preencode(state, m.sourceId)
1358
+ if (version >= 18 && m.falsyResult) c.string.preencode(state, m.falsyResult)
1352
1359
  },
1353
1360
  encode(state, m) {
1354
1361
  const flags =
@@ -1373,7 +1380,8 @@ const encoding31 = {
1373
1380
  ((version >= 10 && m.capability) ? 262144 : 0) |
1374
1381
  ((version >= 10 && m.capabilityArgs) ? 524288 : 0) |
1375
1382
  ((version >= 10 && m.enhance) ? 1048576 : 0) |
1376
- ((version >= 16 && m.sourceId) ? 2097152 : 0)
1383
+ ((version >= 16 && m.sourceId) ? 2097152 : 0) |
1384
+ ((version >= 18 && m.falsyResult) ? 4194304 : 0)
1377
1385
 
1378
1386
  c.string.encode(state, m.id)
1379
1387
  c.string.encode(state, m.chatId)
@@ -1404,6 +1412,7 @@ const encoding31 = {
1404
1412
  if (version >= 10 && m.capabilityArgs) c.json.encode(state, m.capabilityArgs)
1405
1413
  if (version >= 10 && m.enhance) encoding141.encode(state, m.enhance)
1406
1414
  if (version >= 16 && m.sourceId) c.string.encode(state, m.sourceId)
1415
+ if (version >= 18 && m.falsyResult) c.string.encode(state, m.falsyResult)
1407
1416
  },
1408
1417
  decode(state) {
1409
1418
  const r0 = c.string.decode(state)
@@ -1438,7 +1447,8 @@ const encoding31 = {
1438
1447
  capability: (version >= 10 && (flags & 262144) !== 0) ? c.string.decode(state) : null,
1439
1448
  capabilityArgs: (version >= 10 && (flags & 524288) !== 0) ? c.json.decode(state) : null,
1440
1449
  enhance: (version >= 10 && (flags & 1048576) !== 0) ? encoding141.decode(state) : null,
1441
- sourceId: (version >= 16 && (flags & 2097152) !== 0) ? c.string.decode(state) : null
1450
+ sourceId: (version >= 16 && (flags & 2097152) !== 0) ? c.string.decode(state) : null,
1451
+ falsyResult: (version >= 18 && (flags & 4194304) !== 0) ? c.string.decode(state) : null
1442
1452
  }
1443
1453
  }
1444
1454
  }
@@ -7238,7 +7248,8 @@ const encoding182 = {
7238
7248
  ((version >= 10 && m.capability) ? 524288 : 0) |
7239
7249
  ((version >= 10 && m.capabilityArgs) ? 1048576 : 0) |
7240
7250
  ((version >= 10 && m.enhance) ? 2097152 : 0) |
7241
- ((version >= 16 && m.sourceId) ? 4194304 : 0)
7251
+ ((version >= 16 && m.sourceId) ? 4194304 : 0) |
7252
+ ((version >= 18 && m.falsyResult) ? 8388608 : 0)
7242
7253
 
7243
7254
  c.string.preencode(state, m.chatId)
7244
7255
  c.uint.preencode(state, flags)
@@ -7270,6 +7281,7 @@ const encoding182 = {
7270
7281
  if (version >= 10 && m.capabilityArgs) c.json.preencode(state, m.capabilityArgs)
7271
7282
  if (version >= 10 && m.enhance) encoding141.preencode(state, m.enhance)
7272
7283
  if (version >= 16 && m.sourceId) c.string.preencode(state, m.sourceId)
7284
+ if (version >= 18 && m.falsyResult) c.string.preencode(state, m.falsyResult)
7273
7285
  },
7274
7286
  encode(state, m) {
7275
7287
  const flags =
@@ -7295,7 +7307,8 @@ const encoding182 = {
7295
7307
  ((version >= 10 && m.capability) ? 524288 : 0) |
7296
7308
  ((version >= 10 && m.capabilityArgs) ? 1048576 : 0) |
7297
7309
  ((version >= 10 && m.enhance) ? 2097152 : 0) |
7298
- ((version >= 16 && m.sourceId) ? 4194304 : 0)
7310
+ ((version >= 16 && m.sourceId) ? 4194304 : 0) |
7311
+ ((version >= 18 && m.falsyResult) ? 8388608 : 0)
7299
7312
 
7300
7313
  c.string.encode(state, m.chatId)
7301
7314
  c.uint.encode(state, flags)
@@ -7327,6 +7340,7 @@ const encoding182 = {
7327
7340
  if (version >= 10 && m.capabilityArgs) c.json.encode(state, m.capabilityArgs)
7328
7341
  if (version >= 10 && m.enhance) encoding141.encode(state, m.enhance)
7329
7342
  if (version >= 16 && m.sourceId) c.string.encode(state, m.sourceId)
7343
+ if (version >= 18 && m.falsyResult) c.string.encode(state, m.falsyResult)
7330
7344
  },
7331
7345
  decode(state) {
7332
7346
  const r1 = c.string.decode(state)
@@ -7362,7 +7376,8 @@ const encoding182 = {
7362
7376
  capability: (version >= 10 && (flags & 524288) !== 0) ? c.string.decode(state) : null,
7363
7377
  capabilityArgs: (version >= 10 && (flags & 1048576) !== 0) ? c.json.decode(state) : null,
7364
7378
  enhance: (version >= 10 && (flags & 2097152) !== 0) ? encoding141.decode(state) : null,
7365
- sourceId: (version >= 16 && (flags & 4194304) !== 0) ? c.string.decode(state) : null
7379
+ sourceId: (version >= 16 && (flags & 4194304) !== 0) ? c.string.decode(state) : null,
7380
+ falsyResult: (version >= 18 && (flags & 8388608) !== 0) ? c.string.decode(state) : null
7366
7381
  }
7367
7382
  }
7368
7383
  }
@@ -9725,7 +9740,8 @@ const encoding238 = {
9725
9740
  ((version >= 10 && m.capability) ? 524288 : 0) |
9726
9741
  ((version >= 10 && m.capabilityArgs) ? 1048576 : 0) |
9727
9742
  ((version >= 10 && m.enhance) ? 2097152 : 0) |
9728
- ((version >= 16 && m.sourceId) ? 4194304 : 0)
9743
+ ((version >= 16 && m.sourceId) ? 4194304 : 0) |
9744
+ ((version >= 18 && m.falsyResult) ? 8388608 : 0)
9729
9745
 
9730
9746
  c.string.preencode(state, m.id)
9731
9747
  c.uint.preencode(state, flags)
@@ -9756,6 +9772,7 @@ const encoding238 = {
9756
9772
  if (version >= 10 && m.capabilityArgs) c.json.preencode(state, m.capabilityArgs)
9757
9773
  if (version >= 10 && m.enhance) encoding141.preencode(state, m.enhance)
9758
9774
  if (version >= 16 && m.sourceId) c.string.preencode(state, m.sourceId)
9775
+ if (version >= 18 && m.falsyResult) c.string.preencode(state, m.falsyResult)
9759
9776
  },
9760
9777
  encode(state, m) {
9761
9778
  const flags =
@@ -9781,7 +9798,8 @@ const encoding238 = {
9781
9798
  ((version >= 10 && m.capability) ? 524288 : 0) |
9782
9799
  ((version >= 10 && m.capabilityArgs) ? 1048576 : 0) |
9783
9800
  ((version >= 10 && m.enhance) ? 2097152 : 0) |
9784
- ((version >= 16 && m.sourceId) ? 4194304 : 0)
9801
+ ((version >= 16 && m.sourceId) ? 4194304 : 0) |
9802
+ ((version >= 18 && m.falsyResult) ? 8388608 : 0)
9785
9803
 
9786
9804
  c.string.encode(state, m.id)
9787
9805
  c.uint.encode(state, flags)
@@ -9812,6 +9830,7 @@ const encoding238 = {
9812
9830
  if (version >= 10 && m.capabilityArgs) c.json.encode(state, m.capabilityArgs)
9813
9831
  if (version >= 10 && m.enhance) encoding141.encode(state, m.enhance)
9814
9832
  if (version >= 16 && m.sourceId) c.string.encode(state, m.sourceId)
9833
+ if (version >= 18 && m.falsyResult) c.string.encode(state, m.falsyResult)
9815
9834
  },
9816
9835
  decode(state) {
9817
9836
  const r0 = c.string.decode(state)
@@ -9847,7 +9866,8 @@ const encoding238 = {
9847
9866
  capability: (version >= 10 && (flags & 524288) !== 0) ? c.string.decode(state) : null,
9848
9867
  capabilityArgs: (version >= 10 && (flags & 1048576) !== 0) ? c.json.decode(state) : null,
9849
9868
  enhance: (version >= 10 && (flags & 2097152) !== 0) ? encoding141.decode(state) : null,
9850
- sourceId: (version >= 16 && (flags & 4194304) !== 0) ? c.string.decode(state) : null
9869
+ sourceId: (version >= 16 && (flags & 4194304) !== 0) ? c.string.decode(state) : null,
9870
+ falsyResult: (version >= 18 && (flags & 8388608) !== 0) ? c.string.decode(state) : null
9851
9871
  }
9852
9872
  }
9853
9873
  }
@@ -1,12 +1,12 @@
1
1
  // This file is autogenerated by the hyperschema compiler
2
- // Schema Version: 17
2
+ // Schema Version: 18
3
3
  /* eslint-disable camelcase */
4
4
  /* eslint-disable quotes */
5
5
  /* eslint-disable space-before-function-paren */
6
6
 
7
7
  import { c } from 'hyperschema/runtime'
8
8
 
9
- const VERSION = 17
9
+ const VERSION = 18
10
10
 
11
11
  // eslint-disable-next-line no-unused-vars
12
12
  let version = VERSION
@@ -1047,7 +1047,8 @@ const encoding27 = {
1047
1047
  ((version >= 10 && m.capability) ? 524288 : 0) |
1048
1048
  ((version >= 10 && m.capabilityArgs) ? 1048576 : 0) |
1049
1049
  ((version >= 10 && m.enhance) ? 2097152 : 0) |
1050
- ((version >= 16 && m.sourceId) ? 4194304 : 0)
1050
+ ((version >= 16 && m.sourceId) ? 4194304 : 0) |
1051
+ ((version >= 18 && m.falsyResult) ? 8388608 : 0)
1051
1052
 
1052
1053
  c.string.preencode(state, m.id)
1053
1054
  c.string.preencode(state, m.chatId)
@@ -1080,6 +1081,7 @@ const encoding27 = {
1080
1081
  if (version >= 10 && m.capabilityArgs) c.json.preencode(state, m.capabilityArgs)
1081
1082
  if (version >= 10 && m.enhance) encoding141.preencode(state, m.enhance)
1082
1083
  if (version >= 16 && m.sourceId) c.string.preencode(state, m.sourceId)
1084
+ if (version >= 18 && m.falsyResult) c.string.preencode(state, m.falsyResult)
1083
1085
  },
1084
1086
  encode(state, m) {
1085
1087
  const flags =
@@ -1105,7 +1107,8 @@ const encoding27 = {
1105
1107
  ((version >= 10 && m.capability) ? 524288 : 0) |
1106
1108
  ((version >= 10 && m.capabilityArgs) ? 1048576 : 0) |
1107
1109
  ((version >= 10 && m.enhance) ? 2097152 : 0) |
1108
- ((version >= 16 && m.sourceId) ? 4194304 : 0)
1110
+ ((version >= 16 && m.sourceId) ? 4194304 : 0) |
1111
+ ((version >= 18 && m.falsyResult) ? 8388608 : 0)
1109
1112
 
1110
1113
  c.string.encode(state, m.id)
1111
1114
  c.string.encode(state, m.chatId)
@@ -1138,6 +1141,7 @@ const encoding27 = {
1138
1141
  if (version >= 10 && m.capabilityArgs) c.json.encode(state, m.capabilityArgs)
1139
1142
  if (version >= 10 && m.enhance) encoding141.encode(state, m.enhance)
1140
1143
  if (version >= 16 && m.sourceId) c.string.encode(state, m.sourceId)
1144
+ if (version >= 18 && m.falsyResult) c.string.encode(state, m.falsyResult)
1141
1145
  },
1142
1146
  decode(state) {
1143
1147
  const r0 = c.string.decode(state)
@@ -1174,7 +1178,8 @@ const encoding27 = {
1174
1178
  capability: (version >= 10 && (flags & 524288) !== 0) ? c.string.decode(state) : null,
1175
1179
  capabilityArgs: (version >= 10 && (flags & 1048576) !== 0) ? c.json.decode(state) : null,
1176
1180
  enhance: (version >= 10 && (flags & 2097152) !== 0) ? encoding141.decode(state) : null,
1177
- sourceId: (version >= 16 && (flags & 4194304) !== 0) ? c.string.decode(state) : null
1181
+ sourceId: (version >= 16 && (flags & 4194304) !== 0) ? c.string.decode(state) : null,
1182
+ falsyResult: (version >= 18 && (flags & 8388608) !== 0) ? c.string.decode(state) : null
1178
1183
  }
1179
1184
  }
1180
1185
  }
@@ -1318,7 +1323,8 @@ const encoding31 = {
1318
1323
  ((version >= 10 && m.capability) ? 262144 : 0) |
1319
1324
  ((version >= 10 && m.capabilityArgs) ? 524288 : 0) |
1320
1325
  ((version >= 10 && m.enhance) ? 1048576 : 0) |
1321
- ((version >= 16 && m.sourceId) ? 2097152 : 0)
1326
+ ((version >= 16 && m.sourceId) ? 2097152 : 0) |
1327
+ ((version >= 18 && m.falsyResult) ? 4194304 : 0)
1322
1328
 
1323
1329
  c.string.preencode(state, m.id)
1324
1330
  c.string.preencode(state, m.chatId)
@@ -1349,6 +1355,7 @@ const encoding31 = {
1349
1355
  if (version >= 10 && m.capabilityArgs) c.json.preencode(state, m.capabilityArgs)
1350
1356
  if (version >= 10 && m.enhance) encoding141.preencode(state, m.enhance)
1351
1357
  if (version >= 16 && m.sourceId) c.string.preencode(state, m.sourceId)
1358
+ if (version >= 18 && m.falsyResult) c.string.preencode(state, m.falsyResult)
1352
1359
  },
1353
1360
  encode(state, m) {
1354
1361
  const flags =
@@ -1373,7 +1380,8 @@ const encoding31 = {
1373
1380
  ((version >= 10 && m.capability) ? 262144 : 0) |
1374
1381
  ((version >= 10 && m.capabilityArgs) ? 524288 : 0) |
1375
1382
  ((version >= 10 && m.enhance) ? 1048576 : 0) |
1376
- ((version >= 16 && m.sourceId) ? 2097152 : 0)
1383
+ ((version >= 16 && m.sourceId) ? 2097152 : 0) |
1384
+ ((version >= 18 && m.falsyResult) ? 4194304 : 0)
1377
1385
 
1378
1386
  c.string.encode(state, m.id)
1379
1387
  c.string.encode(state, m.chatId)
@@ -1404,6 +1412,7 @@ const encoding31 = {
1404
1412
  if (version >= 10 && m.capabilityArgs) c.json.encode(state, m.capabilityArgs)
1405
1413
  if (version >= 10 && m.enhance) encoding141.encode(state, m.enhance)
1406
1414
  if (version >= 16 && m.sourceId) c.string.encode(state, m.sourceId)
1415
+ if (version >= 18 && m.falsyResult) c.string.encode(state, m.falsyResult)
1407
1416
  },
1408
1417
  decode(state) {
1409
1418
  const r0 = c.string.decode(state)
@@ -1438,7 +1447,8 @@ const encoding31 = {
1438
1447
  capability: (version >= 10 && (flags & 262144) !== 0) ? c.string.decode(state) : null,
1439
1448
  capabilityArgs: (version >= 10 && (flags & 524288) !== 0) ? c.json.decode(state) : null,
1440
1449
  enhance: (version >= 10 && (flags & 1048576) !== 0) ? encoding141.decode(state) : null,
1441
- sourceId: (version >= 16 && (flags & 2097152) !== 0) ? c.string.decode(state) : null
1450
+ sourceId: (version >= 16 && (flags & 2097152) !== 0) ? c.string.decode(state) : null,
1451
+ falsyResult: (version >= 18 && (flags & 4194304) !== 0) ? c.string.decode(state) : null
1442
1452
  }
1443
1453
  }
1444
1454
  }
@@ -1,12 +1,12 @@
1
1
  // This file is autogenerated by the hyperschema compiler
2
- // Schema Version: 17
2
+ // Schema Version: 18
3
3
  /* eslint-disable camelcase */
4
4
  /* eslint-disable quotes */
5
5
  /* eslint-disable space-before-function-paren */
6
6
 
7
7
  import { c } from 'hyperschema/runtime'
8
8
 
9
- const VERSION = 17
9
+ const VERSION = 18
10
10
 
11
11
  // eslint-disable-next-line no-unused-vars
12
12
  let version = VERSION
@@ -1047,7 +1047,8 @@ const encoding27 = {
1047
1047
  ((version >= 10 && m.capability) ? 524288 : 0) |
1048
1048
  ((version >= 10 && m.capabilityArgs) ? 1048576 : 0) |
1049
1049
  ((version >= 10 && m.enhance) ? 2097152 : 0) |
1050
- ((version >= 16 && m.sourceId) ? 4194304 : 0)
1050
+ ((version >= 16 && m.sourceId) ? 4194304 : 0) |
1051
+ ((version >= 18 && m.falsyResult) ? 8388608 : 0)
1051
1052
 
1052
1053
  c.string.preencode(state, m.id)
1053
1054
  c.string.preencode(state, m.chatId)
@@ -1080,6 +1081,7 @@ const encoding27 = {
1080
1081
  if (version >= 10 && m.capabilityArgs) c.json.preencode(state, m.capabilityArgs)
1081
1082
  if (version >= 10 && m.enhance) encoding141.preencode(state, m.enhance)
1082
1083
  if (version >= 16 && m.sourceId) c.string.preencode(state, m.sourceId)
1084
+ if (version >= 18 && m.falsyResult) c.string.preencode(state, m.falsyResult)
1083
1085
  },
1084
1086
  encode(state, m) {
1085
1087
  const flags =
@@ -1105,7 +1107,8 @@ const encoding27 = {
1105
1107
  ((version >= 10 && m.capability) ? 524288 : 0) |
1106
1108
  ((version >= 10 && m.capabilityArgs) ? 1048576 : 0) |
1107
1109
  ((version >= 10 && m.enhance) ? 2097152 : 0) |
1108
- ((version >= 16 && m.sourceId) ? 4194304 : 0)
1110
+ ((version >= 16 && m.sourceId) ? 4194304 : 0) |
1111
+ ((version >= 18 && m.falsyResult) ? 8388608 : 0)
1109
1112
 
1110
1113
  c.string.encode(state, m.id)
1111
1114
  c.string.encode(state, m.chatId)
@@ -1138,6 +1141,7 @@ const encoding27 = {
1138
1141
  if (version >= 10 && m.capabilityArgs) c.json.encode(state, m.capabilityArgs)
1139
1142
  if (version >= 10 && m.enhance) encoding141.encode(state, m.enhance)
1140
1143
  if (version >= 16 && m.sourceId) c.string.encode(state, m.sourceId)
1144
+ if (version >= 18 && m.falsyResult) c.string.encode(state, m.falsyResult)
1141
1145
  },
1142
1146
  decode(state) {
1143
1147
  const r0 = c.string.decode(state)
@@ -1174,7 +1178,8 @@ const encoding27 = {
1174
1178
  capability: (version >= 10 && (flags & 524288) !== 0) ? c.string.decode(state) : null,
1175
1179
  capabilityArgs: (version >= 10 && (flags & 1048576) !== 0) ? c.json.decode(state) : null,
1176
1180
  enhance: (version >= 10 && (flags & 2097152) !== 0) ? encoding141.decode(state) : null,
1177
- sourceId: (version >= 16 && (flags & 4194304) !== 0) ? c.string.decode(state) : null
1181
+ sourceId: (version >= 16 && (flags & 4194304) !== 0) ? c.string.decode(state) : null,
1182
+ falsyResult: (version >= 18 && (flags & 8388608) !== 0) ? c.string.decode(state) : null
1178
1183
  }
1179
1184
  }
1180
1185
  }
@@ -1318,7 +1323,8 @@ const encoding31 = {
1318
1323
  ((version >= 10 && m.capability) ? 262144 : 0) |
1319
1324
  ((version >= 10 && m.capabilityArgs) ? 524288 : 0) |
1320
1325
  ((version >= 10 && m.enhance) ? 1048576 : 0) |
1321
- ((version >= 16 && m.sourceId) ? 2097152 : 0)
1326
+ ((version >= 16 && m.sourceId) ? 2097152 : 0) |
1327
+ ((version >= 18 && m.falsyResult) ? 4194304 : 0)
1322
1328
 
1323
1329
  c.string.preencode(state, m.id)
1324
1330
  c.string.preencode(state, m.chatId)
@@ -1349,6 +1355,7 @@ const encoding31 = {
1349
1355
  if (version >= 10 && m.capabilityArgs) c.json.preencode(state, m.capabilityArgs)
1350
1356
  if (version >= 10 && m.enhance) encoding141.preencode(state, m.enhance)
1351
1357
  if (version >= 16 && m.sourceId) c.string.preencode(state, m.sourceId)
1358
+ if (version >= 18 && m.falsyResult) c.string.preencode(state, m.falsyResult)
1352
1359
  },
1353
1360
  encode(state, m) {
1354
1361
  const flags =
@@ -1373,7 +1380,8 @@ const encoding31 = {
1373
1380
  ((version >= 10 && m.capability) ? 262144 : 0) |
1374
1381
  ((version >= 10 && m.capabilityArgs) ? 524288 : 0) |
1375
1382
  ((version >= 10 && m.enhance) ? 1048576 : 0) |
1376
- ((version >= 16 && m.sourceId) ? 2097152 : 0)
1383
+ ((version >= 16 && m.sourceId) ? 2097152 : 0) |
1384
+ ((version >= 18 && m.falsyResult) ? 4194304 : 0)
1377
1385
 
1378
1386
  c.string.encode(state, m.id)
1379
1387
  c.string.encode(state, m.chatId)
@@ -1404,6 +1412,7 @@ const encoding31 = {
1404
1412
  if (version >= 10 && m.capabilityArgs) c.json.encode(state, m.capabilityArgs)
1405
1413
  if (version >= 10 && m.enhance) encoding141.encode(state, m.enhance)
1406
1414
  if (version >= 16 && m.sourceId) c.string.encode(state, m.sourceId)
1415
+ if (version >= 18 && m.falsyResult) c.string.encode(state, m.falsyResult)
1407
1416
  },
1408
1417
  decode(state) {
1409
1418
  const r0 = c.string.decode(state)
@@ -1438,7 +1447,8 @@ const encoding31 = {
1438
1447
  capability: (version >= 10 && (flags & 262144) !== 0) ? c.string.decode(state) : null,
1439
1448
  capabilityArgs: (version >= 10 && (flags & 524288) !== 0) ? c.json.decode(state) : null,
1440
1449
  enhance: (version >= 10 && (flags & 1048576) !== 0) ? encoding141.decode(state) : null,
1441
- sourceId: (version >= 16 && (flags & 2097152) !== 0) ? c.string.decode(state) : null
1450
+ sourceId: (version >= 16 && (flags & 2097152) !== 0) ? c.string.decode(state) : null,
1451
+ falsyResult: (version >= 18 && (flags & 4194304) !== 0) ? c.string.decode(state) : null
1442
1452
  }
1443
1453
  }
1444
1454
  }