@qvac/core 1.0.0-rc.5 → 1.0.0-rc.6

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 (108) hide show
  1. package/CHANGELOG.md +43 -2
  2. package/README.md +55 -4
  3. package/dist-lib/lib/api/agents.d.ts +2 -1
  4. package/dist-lib/lib/api/agents.js +5 -1
  5. package/dist-lib/lib/api/app-config.d.ts +3 -0
  6. package/dist-lib/lib/api/app-config.js +20 -0
  7. package/dist-lib/lib/api/device-routes.d.ts +1 -1
  8. package/dist-lib/lib/api/device-routes.js +3 -1
  9. package/dist-lib/lib/api/index.js +2 -1
  10. package/dist-lib/lib/api/projects.js +3 -4
  11. package/dist-lib/lib/api/served.d.ts +2 -2
  12. package/dist-lib/lib/api/served.js +24 -1
  13. package/dist-lib/lib/assistant/harness.d.ts +3 -0
  14. package/dist-lib/lib/assistant/history.js +14 -2
  15. package/dist-lib/lib/assistant/message.d.ts +1 -0
  16. package/dist-lib/lib/assistant/model-round.d.ts +3 -0
  17. package/dist-lib/lib/assistant/model-round.js +16 -2
  18. package/dist-lib/lib/assistant/round-host.d.ts +2 -0
  19. package/dist-lib/lib/assistant/round-host.js +8 -0
  20. package/dist-lib/lib/assistant-tree.d.ts +2 -0
  21. package/dist-lib/lib/assistant-tree.js +4 -2
  22. package/dist-lib/lib/assistant.d.ts +11 -1
  23. package/dist-lib/lib/assistant.js +115 -8
  24. package/dist-lib/lib/client.js +4 -1
  25. package/dist-lib/lib/core/agent-copies.js +2 -1
  26. package/dist-lib/lib/core/agent-hosting.js +9 -4
  27. package/dist-lib/lib/core/agent.js +2 -1
  28. package/dist-lib/lib/core/chat-copy.d.ts +1 -0
  29. package/dist-lib/lib/core/chat-copy.js +13 -2
  30. package/dist-lib/lib/core/chat.d.ts +0 -1
  31. package/dist-lib/lib/core/chat.js +0 -3
  32. package/dist-lib/lib/core/collections.d.ts +7 -7
  33. package/dist-lib/lib/core/collections.js +7 -7
  34. package/dist-lib/lib/core/contract/project-device-keys.d.ts +4 -2
  35. package/dist-lib/lib/core/contract/project-device-keys.js +12 -12
  36. package/dist-lib/lib/core/contract/project-host-keys.d.ts +5 -3
  37. package/dist-lib/lib/core/contract/project-host-keys.js +22 -11
  38. package/dist-lib/lib/core/contract/projects.d.ts +4 -2
  39. package/dist-lib/lib/core/contract/projects.js +29 -17
  40. package/dist-lib/lib/core/deleted-agent-runs.d.ts +1 -0
  41. package/dist-lib/lib/core/deleted-agent-runs.js +22 -11
  42. package/dist-lib/lib/core/helpers/index.d.ts +1 -1
  43. package/dist-lib/lib/core/helpers/index.js +2 -2
  44. package/dist-lib/lib/core/mesh.d.ts +1 -0
  45. package/dist-lib/lib/core/mesh.js +4 -4
  46. package/dist-lib/lib/core/project-keys.d.ts +5 -2
  47. package/dist-lib/lib/core/project-keys.js +15 -6
  48. package/dist-lib/lib/core/sync/index.js +5 -5
  49. package/dist-lib/lib/core.d.ts +2 -0
  50. package/dist-lib/lib/core.js +102 -25
  51. package/dist-lib/lib/kv-cache-ledger.d.ts +22 -0
  52. package/dist-lib/lib/kv-cache-ledger.js +72 -0
  53. package/dist-lib/lib/kv-cache-retention.d.ts +1 -0
  54. package/dist-lib/lib/kv-cache-retention.js +5 -2
  55. package/dist-lib/lib/model-memory-cap.d.ts +3 -0
  56. package/dist-lib/lib/model-memory-cap.js +15 -6
  57. package/dist-lib/lib/run-replay.d.ts +3 -2
  58. package/dist-lib/lib/run-replay.js +16 -5
  59. package/dist-lib/lib/run-transcript.js +1 -1
  60. package/dist-lib/schema/engine.js +54 -1
  61. package/dist-lib/schema/qvac.js +62 -1
  62. package/dist-lib/spec/bind.js +3 -0
  63. package/dist-lib/spec/calls.js +1 -0
  64. package/dist-lib/spec/capabilities.d.ts +2 -0
  65. package/dist-lib/spec/hrpc/hrpc.json +13 -0
  66. package/dist-lib/spec/hrpc/index.js +15 -3
  67. package/dist-lib/spec/hrpc/messages.js +253 -3
  68. package/dist-lib/spec/hyperschema/index.js +253 -3
  69. package/dist-lib/spec/hyperschema/schema.json +187 -0
  70. package/dist-lib/spec/hyperschema/types.d.ts +33 -0
  71. package/dist-lib/spec/mesh/hyperdb/db.json +110 -0
  72. package/dist-lib/spec/mesh/hyperdb/index.js +498 -2
  73. package/dist-lib/spec/mesh/hyperdb/messages.js +865 -410
  74. package/dist-lib/spec/mesh/hyperdispatch/messages.js +244 -3
  75. package/dist-lib/spec/mesh/hyperschema/index.js +244 -3
  76. package/dist-lib/spec/mesh/hyperschema/schema.json +155 -0
  77. package/dist-lib/spec/mesh/hyperschema/types.d.ts +37 -0
  78. package/package.json +27 -11
  79. package/tui/README.md +190 -0
  80. package/tui/app.mjs +8247 -0
  81. package/tui/boot.mjs +159 -0
  82. package/tui/index.mjs +89 -0
  83. package/tui/lib/boot-timing.mjs +41 -0
  84. package/tui/lib/busy-words.mjs +116 -0
  85. package/tui/lib/connect-sheet.mjs +350 -0
  86. package/tui/lib/device-target.mjs +64 -0
  87. package/tui/lib/export.mjs +194 -0
  88. package/tui/lib/folders-command.mjs +84 -0
  89. package/tui/lib/fork-command.mjs +43 -0
  90. package/tui/lib/knowledge-command.mjs +190 -0
  91. package/tui/lib/knowledge-import.mjs +153 -0
  92. package/tui/lib/local-path.mjs +21 -0
  93. package/tui/lib/move-command.mjs +17 -0
  94. package/tui/lib/render.mjs +225 -0
  95. package/tui/lib/save-file.mjs +88 -0
  96. package/tui/lib/select.mjs +81 -0
  97. package/tui/lib/selection.mjs +18 -0
  98. package/tui/lib/setup.mjs +135 -0
  99. package/tui/lib/sidebar.mjs +63 -0
  100. package/tui/lib/skill-connect.mjs +145 -0
  101. package/tui/lib/splash-art.mjs +107 -0
  102. package/tui/lib/splash.mjs +18 -0
  103. package/tui/lib/upload-frames.mjs +9 -0
  104. package/tui/lib/usage.mjs +59 -0
  105. package/tui/lib/wrap.mjs +143 -0
  106. package/tui/main.mjs +279 -0
  107. package/tui/plugins.mjs +158 -0
  108. package/worker/assistant-sidecar.mjs +1 -0
@@ -11420,16 +11420,25 @@ const encoding321 = {
11420
11420
  c.uint.preencode(state, m.capPercent)
11421
11421
  c.uint.preencode(state, m.capBytes)
11422
11422
  c.uint.preencode(state, m.usedBytes)
11423
- state.end++ // max flag is 1 so always one byte
11423
+ state.end++ // max flag is 8 so always one byte
11424
+
11425
+ if (m.totalBytes) c.uint.preencode(state, m.totalBytes)
11426
+ if (m.source) c.string.preencode(state, m.source)
11427
+ if (m.gpuClass) c.string.preencode(state, m.gpuClass)
11424
11428
  },
11425
11429
  encode(state, m) {
11426
- const flags = m.overCap ? 1 : 0
11430
+ const flags =
11431
+ (m.overCap ? 1 : 0) | (m.totalBytes ? 2 : 0) | (m.source ? 4 : 0) | (m.gpuClass ? 8 : 0)
11427
11432
 
11428
11433
  c.uint.encode(state, m.usableBytes)
11429
11434
  c.uint.encode(state, m.capPercent)
11430
11435
  c.uint.encode(state, m.capBytes)
11431
11436
  c.uint.encode(state, m.usedBytes)
11432
11437
  c.uint.encode(state, flags)
11438
+
11439
+ if (m.totalBytes) c.uint.encode(state, m.totalBytes)
11440
+ if (m.source) c.string.encode(state, m.source)
11441
+ if (m.gpuClass) c.string.encode(state, m.gpuClass)
11433
11442
  },
11434
11443
  decode(state) {
11435
11444
  const r0 = c.uint.decode(state)
@@ -11443,7 +11452,10 @@ const encoding321 = {
11443
11452
  capPercent: r1,
11444
11453
  capBytes: r2,
11445
11454
  usedBytes: r3,
11446
- overCap: (flags & 1) !== 0
11455
+ overCap: (flags & 1) !== 0,
11456
+ totalBytes: (flags & 2) !== 0 ? c.uint.decode(state) : 0,
11457
+ source: (flags & 4) !== 0 ? c.string.decode(state) : null,
11458
+ gpuClass: (flags & 8) !== 0 ? c.string.decode(state) : null
11447
11459
  }
11448
11460
  }
11449
11461
  }
@@ -12322,6 +12334,232 @@ const encoding356 = {
12322
12334
  }
12323
12335
  }
12324
12336
 
12337
+ const encoding357_enum = {
12338
+ target: 'target',
12339
+ config: 'config',
12340
+ connect: 'connect',
12341
+ callback: 'callback',
12342
+ cancel: 'cancel',
12343
+ disconnect: 'disconnect'
12344
+ }
12345
+
12346
+ // @assistant/skill-oauth-operation enum
12347
+ const encoding357 = {
12348
+ preencode (state, m) {
12349
+ state.end++ // max enum is 6 so always one byte
12350
+ },
12351
+ encode (state, m) {
12352
+ switch (m) {
12353
+ case 'target':
12354
+ c.uint.encode(state, 1)
12355
+ break
12356
+ case 'config':
12357
+ c.uint.encode(state, 2)
12358
+ break
12359
+ case 'connect':
12360
+ c.uint.encode(state, 3)
12361
+ break
12362
+ case 'callback':
12363
+ c.uint.encode(state, 4)
12364
+ break
12365
+ case 'cancel':
12366
+ c.uint.encode(state, 5)
12367
+ break
12368
+ case 'disconnect':
12369
+ c.uint.encode(state, 6)
12370
+ break
12371
+ default:
12372
+ throw new Error('Unknown enum')
12373
+ }
12374
+ },
12375
+ decode (state) {
12376
+ switch (c.uint.decode(state)) {
12377
+ case 1:
12378
+ return 'target'
12379
+ case 2:
12380
+ return 'config'
12381
+ case 3:
12382
+ return 'connect'
12383
+ case 4:
12384
+ return 'callback'
12385
+ case 5:
12386
+ return 'cancel'
12387
+ case 6:
12388
+ return 'disconnect'
12389
+ default: return null
12390
+ }
12391
+ }
12392
+ }
12393
+
12394
+ const encoding358_enum = {
12395
+ unavailable: 'unavailable',
12396
+ local: 'local',
12397
+ ready: 'ready',
12398
+ authorize: 'authorize',
12399
+ connected: 'connected',
12400
+ "needs-config": 'needs-config',
12401
+ refused: 'refused',
12402
+ error: 'error'
12403
+ }
12404
+
12405
+ // @assistant/skill-oauth-phase enum
12406
+ const encoding358 = {
12407
+ preencode (state, m) {
12408
+ state.end++ // max enum is 8 so always one byte
12409
+ },
12410
+ encode (state, m) {
12411
+ switch (m) {
12412
+ case 'unavailable':
12413
+ c.uint.encode(state, 1)
12414
+ break
12415
+ case 'local':
12416
+ c.uint.encode(state, 2)
12417
+ break
12418
+ case 'ready':
12419
+ c.uint.encode(state, 3)
12420
+ break
12421
+ case 'authorize':
12422
+ c.uint.encode(state, 4)
12423
+ break
12424
+ case 'connected':
12425
+ c.uint.encode(state, 5)
12426
+ break
12427
+ case 'needs-config':
12428
+ c.uint.encode(state, 6)
12429
+ break
12430
+ case 'refused':
12431
+ c.uint.encode(state, 7)
12432
+ break
12433
+ case 'error':
12434
+ c.uint.encode(state, 8)
12435
+ break
12436
+ default:
12437
+ throw new Error('Unknown enum')
12438
+ }
12439
+ },
12440
+ decode (state) {
12441
+ switch (c.uint.decode(state)) {
12442
+ case 1:
12443
+ return 'unavailable'
12444
+ case 2:
12445
+ return 'local'
12446
+ case 3:
12447
+ return 'ready'
12448
+ case 4:
12449
+ return 'authorize'
12450
+ case 5:
12451
+ return 'connected'
12452
+ case 6:
12453
+ return 'needs-config'
12454
+ case 7:
12455
+ return 'refused'
12456
+ case 8:
12457
+ return 'error'
12458
+ default: return null
12459
+ }
12460
+ }
12461
+ }
12462
+
12463
+ // @assistant/skill-oauth-request
12464
+ const encoding359 = {
12465
+ preencode(state, m) {
12466
+ encoding357.preencode(state, m.operation)
12467
+ c.string.preencode(state, m.agentId)
12468
+ c.string.preencode(state, m.credentialKey)
12469
+ state.end++ // max flag is 32 so always one byte
12470
+
12471
+ if (m.deviceId) c.fixed32.preencode(state, m.deviceId)
12472
+ if (m.attemptId) c.string.preencode(state, m.attemptId)
12473
+ if (m.clientId) c.string.preencode(state, m.clientId)
12474
+ if (m.clientSecret) c.string.preencode(state, m.clientSecret)
12475
+ if (m.address) c.string.preencode(state, m.address)
12476
+ if (m.meshId) c.string.preencode(state, m.meshId)
12477
+ },
12478
+ encode(state, m) {
12479
+ const flags =
12480
+ (m.deviceId ? 1 : 0) |
12481
+ (m.attemptId ? 2 : 0) |
12482
+ (m.clientId ? 4 : 0) |
12483
+ (m.clientSecret ? 8 : 0) |
12484
+ (m.address ? 16 : 0) |
12485
+ (m.meshId ? 32 : 0)
12486
+
12487
+ encoding357.encode(state, m.operation)
12488
+ c.string.encode(state, m.agentId)
12489
+ c.string.encode(state, m.credentialKey)
12490
+ c.uint.encode(state, flags)
12491
+
12492
+ if (m.deviceId) c.fixed32.encode(state, m.deviceId)
12493
+ if (m.attemptId) c.string.encode(state, m.attemptId)
12494
+ if (m.clientId) c.string.encode(state, m.clientId)
12495
+ if (m.clientSecret) c.string.encode(state, m.clientSecret)
12496
+ if (m.address) c.string.encode(state, m.address)
12497
+ if (m.meshId) c.string.encode(state, m.meshId)
12498
+ },
12499
+ decode(state) {
12500
+ const r0 = encoding357.decode(state)
12501
+ const r1 = c.string.decode(state)
12502
+ const r2 = c.string.decode(state)
12503
+ const flags = c.uint.decode(state)
12504
+
12505
+ return {
12506
+ operation: r0,
12507
+ agentId: r1,
12508
+ credentialKey: r2,
12509
+ deviceId: (flags & 1) !== 0 ? c.fixed32.decode(state) : null,
12510
+ attemptId: (flags & 2) !== 0 ? c.string.decode(state) : null,
12511
+ clientId: (flags & 4) !== 0 ? c.string.decode(state) : null,
12512
+ clientSecret: (flags & 8) !== 0 ? c.string.decode(state) : null,
12513
+ address: (flags & 16) !== 0 ? c.string.decode(state) : null,
12514
+ meshId: (flags & 32) !== 0 ? c.string.decode(state) : null
12515
+ }
12516
+ }
12517
+ }
12518
+
12519
+ // @assistant/skill-oauth-response
12520
+ const encoding360 = {
12521
+ preencode(state, m) {
12522
+ encoding358.preencode(state, m.phase)
12523
+ state.end++ // max flag is 32 so always one byte
12524
+
12525
+ if (m.deviceId) c.fixed32.preencode(state, m.deviceId)
12526
+ if (m.url) c.string.preencode(state, m.url)
12527
+ if (m.savedClientId) c.string.preencode(state, m.savedClientId)
12528
+ if (m.error) c.string.preencode(state, m.error)
12529
+ },
12530
+ encode(state, m) {
12531
+ const flags =
12532
+ (m.deviceId ? 1 : 0) |
12533
+ (m.url ? 2 : 0) |
12534
+ (m.clientId ? 4 : 0) |
12535
+ (m.clientSecret ? 8 : 0) |
12536
+ (m.savedClientId ? 16 : 0) |
12537
+ (m.error ? 32 : 0)
12538
+
12539
+ encoding358.encode(state, m.phase)
12540
+ c.uint.encode(state, flags)
12541
+
12542
+ if (m.deviceId) c.fixed32.encode(state, m.deviceId)
12543
+ if (m.url) c.string.encode(state, m.url)
12544
+ if (m.savedClientId) c.string.encode(state, m.savedClientId)
12545
+ if (m.error) c.string.encode(state, m.error)
12546
+ },
12547
+ decode(state) {
12548
+ const r0 = encoding358.decode(state)
12549
+ const flags = c.uint.decode(state)
12550
+
12551
+ return {
12552
+ phase: r0,
12553
+ deviceId: (flags & 1) !== 0 ? c.fixed32.decode(state) : null,
12554
+ url: (flags & 2) !== 0 ? c.string.decode(state) : null,
12555
+ clientId: (flags & 4) !== 0,
12556
+ clientSecret: (flags & 8) !== 0,
12557
+ savedClientId: (flags & 16) !== 0 ? c.string.decode(state) : null,
12558
+ error: (flags & 32) !== 0 ? c.string.decode(state) : null
12559
+ }
12560
+ }
12561
+ }
12562
+
12325
12563
  // @assistant/model-info-list.memory, deferred due to recusive use
12326
12564
  const encoding175_1 = c.frame(encoding321)
12327
12565
 
@@ -12423,6 +12661,10 @@ function getEnum(name) {
12423
12661
  return encoding324_enum
12424
12662
  case '@assistant/knowledge-source':
12425
12663
  return encoding346_enum
12664
+ case '@assistant/skill-oauth-operation':
12665
+ return encoding357_enum
12666
+ case '@assistant/skill-oauth-phase':
12667
+ return encoding358_enum
12426
12668
  default:
12427
12669
  throw new Error('Enum not found ' + name)
12428
12670
  }
@@ -13144,6 +13386,14 @@ function getEncoding(name) {
13144
13386
  return encoding355
13145
13387
  case '@assistant/quarantined-skill-keys':
13146
13388
  return encoding356
13389
+ case '@assistant/skill-oauth-operation':
13390
+ return encoding357
13391
+ case '@assistant/skill-oauth-phase':
13392
+ return encoding358
13393
+ case '@assistant/skill-oauth-request':
13394
+ return encoding359
13395
+ case '@assistant/skill-oauth-response':
13396
+ return encoding360
13147
13397
  default:
13148
13398
  throw new Error('Encoder not found ' + name)
13149
13399
  }
@@ -11420,16 +11420,25 @@ const encoding321 = {
11420
11420
  c.uint.preencode(state, m.capPercent)
11421
11421
  c.uint.preencode(state, m.capBytes)
11422
11422
  c.uint.preencode(state, m.usedBytes)
11423
- state.end++ // max flag is 1 so always one byte
11423
+ state.end++ // max flag is 8 so always one byte
11424
+
11425
+ if (m.totalBytes) c.uint.preencode(state, m.totalBytes)
11426
+ if (m.source) c.string.preencode(state, m.source)
11427
+ if (m.gpuClass) c.string.preencode(state, m.gpuClass)
11424
11428
  },
11425
11429
  encode(state, m) {
11426
- const flags = m.overCap ? 1 : 0
11430
+ const flags =
11431
+ (m.overCap ? 1 : 0) | (m.totalBytes ? 2 : 0) | (m.source ? 4 : 0) | (m.gpuClass ? 8 : 0)
11427
11432
 
11428
11433
  c.uint.encode(state, m.usableBytes)
11429
11434
  c.uint.encode(state, m.capPercent)
11430
11435
  c.uint.encode(state, m.capBytes)
11431
11436
  c.uint.encode(state, m.usedBytes)
11432
11437
  c.uint.encode(state, flags)
11438
+
11439
+ if (m.totalBytes) c.uint.encode(state, m.totalBytes)
11440
+ if (m.source) c.string.encode(state, m.source)
11441
+ if (m.gpuClass) c.string.encode(state, m.gpuClass)
11433
11442
  },
11434
11443
  decode(state) {
11435
11444
  const r0 = c.uint.decode(state)
@@ -11443,7 +11452,10 @@ const encoding321 = {
11443
11452
  capPercent: r1,
11444
11453
  capBytes: r2,
11445
11454
  usedBytes: r3,
11446
- overCap: (flags & 1) !== 0
11455
+ overCap: (flags & 1) !== 0,
11456
+ totalBytes: (flags & 2) !== 0 ? c.uint.decode(state) : 0,
11457
+ source: (flags & 4) !== 0 ? c.string.decode(state) : null,
11458
+ gpuClass: (flags & 8) !== 0 ? c.string.decode(state) : null
11447
11459
  }
11448
11460
  }
11449
11461
  }
@@ -12322,6 +12334,232 @@ const encoding356 = {
12322
12334
  }
12323
12335
  }
12324
12336
 
12337
+ const encoding357_enum = {
12338
+ target: 'target',
12339
+ config: 'config',
12340
+ connect: 'connect',
12341
+ callback: 'callback',
12342
+ cancel: 'cancel',
12343
+ disconnect: 'disconnect'
12344
+ }
12345
+
12346
+ // @assistant/skill-oauth-operation enum
12347
+ const encoding357 = {
12348
+ preencode (state, m) {
12349
+ state.end++ // max enum is 6 so always one byte
12350
+ },
12351
+ encode (state, m) {
12352
+ switch (m) {
12353
+ case 'target':
12354
+ c.uint.encode(state, 1)
12355
+ break
12356
+ case 'config':
12357
+ c.uint.encode(state, 2)
12358
+ break
12359
+ case 'connect':
12360
+ c.uint.encode(state, 3)
12361
+ break
12362
+ case 'callback':
12363
+ c.uint.encode(state, 4)
12364
+ break
12365
+ case 'cancel':
12366
+ c.uint.encode(state, 5)
12367
+ break
12368
+ case 'disconnect':
12369
+ c.uint.encode(state, 6)
12370
+ break
12371
+ default:
12372
+ throw new Error('Unknown enum')
12373
+ }
12374
+ },
12375
+ decode (state) {
12376
+ switch (c.uint.decode(state)) {
12377
+ case 1:
12378
+ return 'target'
12379
+ case 2:
12380
+ return 'config'
12381
+ case 3:
12382
+ return 'connect'
12383
+ case 4:
12384
+ return 'callback'
12385
+ case 5:
12386
+ return 'cancel'
12387
+ case 6:
12388
+ return 'disconnect'
12389
+ default: return null
12390
+ }
12391
+ }
12392
+ }
12393
+
12394
+ const encoding358_enum = {
12395
+ unavailable: 'unavailable',
12396
+ local: 'local',
12397
+ ready: 'ready',
12398
+ authorize: 'authorize',
12399
+ connected: 'connected',
12400
+ "needs-config": 'needs-config',
12401
+ refused: 'refused',
12402
+ error: 'error'
12403
+ }
12404
+
12405
+ // @assistant/skill-oauth-phase enum
12406
+ const encoding358 = {
12407
+ preencode (state, m) {
12408
+ state.end++ // max enum is 8 so always one byte
12409
+ },
12410
+ encode (state, m) {
12411
+ switch (m) {
12412
+ case 'unavailable':
12413
+ c.uint.encode(state, 1)
12414
+ break
12415
+ case 'local':
12416
+ c.uint.encode(state, 2)
12417
+ break
12418
+ case 'ready':
12419
+ c.uint.encode(state, 3)
12420
+ break
12421
+ case 'authorize':
12422
+ c.uint.encode(state, 4)
12423
+ break
12424
+ case 'connected':
12425
+ c.uint.encode(state, 5)
12426
+ break
12427
+ case 'needs-config':
12428
+ c.uint.encode(state, 6)
12429
+ break
12430
+ case 'refused':
12431
+ c.uint.encode(state, 7)
12432
+ break
12433
+ case 'error':
12434
+ c.uint.encode(state, 8)
12435
+ break
12436
+ default:
12437
+ throw new Error('Unknown enum')
12438
+ }
12439
+ },
12440
+ decode (state) {
12441
+ switch (c.uint.decode(state)) {
12442
+ case 1:
12443
+ return 'unavailable'
12444
+ case 2:
12445
+ return 'local'
12446
+ case 3:
12447
+ return 'ready'
12448
+ case 4:
12449
+ return 'authorize'
12450
+ case 5:
12451
+ return 'connected'
12452
+ case 6:
12453
+ return 'needs-config'
12454
+ case 7:
12455
+ return 'refused'
12456
+ case 8:
12457
+ return 'error'
12458
+ default: return null
12459
+ }
12460
+ }
12461
+ }
12462
+
12463
+ // @assistant/skill-oauth-request
12464
+ const encoding359 = {
12465
+ preencode(state, m) {
12466
+ encoding357.preencode(state, m.operation)
12467
+ c.string.preencode(state, m.agentId)
12468
+ c.string.preencode(state, m.credentialKey)
12469
+ state.end++ // max flag is 32 so always one byte
12470
+
12471
+ if (m.deviceId) c.fixed32.preencode(state, m.deviceId)
12472
+ if (m.attemptId) c.string.preencode(state, m.attemptId)
12473
+ if (m.clientId) c.string.preencode(state, m.clientId)
12474
+ if (m.clientSecret) c.string.preencode(state, m.clientSecret)
12475
+ if (m.address) c.string.preencode(state, m.address)
12476
+ if (m.meshId) c.string.preencode(state, m.meshId)
12477
+ },
12478
+ encode(state, m) {
12479
+ const flags =
12480
+ (m.deviceId ? 1 : 0) |
12481
+ (m.attemptId ? 2 : 0) |
12482
+ (m.clientId ? 4 : 0) |
12483
+ (m.clientSecret ? 8 : 0) |
12484
+ (m.address ? 16 : 0) |
12485
+ (m.meshId ? 32 : 0)
12486
+
12487
+ encoding357.encode(state, m.operation)
12488
+ c.string.encode(state, m.agentId)
12489
+ c.string.encode(state, m.credentialKey)
12490
+ c.uint.encode(state, flags)
12491
+
12492
+ if (m.deviceId) c.fixed32.encode(state, m.deviceId)
12493
+ if (m.attemptId) c.string.encode(state, m.attemptId)
12494
+ if (m.clientId) c.string.encode(state, m.clientId)
12495
+ if (m.clientSecret) c.string.encode(state, m.clientSecret)
12496
+ if (m.address) c.string.encode(state, m.address)
12497
+ if (m.meshId) c.string.encode(state, m.meshId)
12498
+ },
12499
+ decode(state) {
12500
+ const r0 = encoding357.decode(state)
12501
+ const r1 = c.string.decode(state)
12502
+ const r2 = c.string.decode(state)
12503
+ const flags = c.uint.decode(state)
12504
+
12505
+ return {
12506
+ operation: r0,
12507
+ agentId: r1,
12508
+ credentialKey: r2,
12509
+ deviceId: (flags & 1) !== 0 ? c.fixed32.decode(state) : null,
12510
+ attemptId: (flags & 2) !== 0 ? c.string.decode(state) : null,
12511
+ clientId: (flags & 4) !== 0 ? c.string.decode(state) : null,
12512
+ clientSecret: (flags & 8) !== 0 ? c.string.decode(state) : null,
12513
+ address: (flags & 16) !== 0 ? c.string.decode(state) : null,
12514
+ meshId: (flags & 32) !== 0 ? c.string.decode(state) : null
12515
+ }
12516
+ }
12517
+ }
12518
+
12519
+ // @assistant/skill-oauth-response
12520
+ const encoding360 = {
12521
+ preencode(state, m) {
12522
+ encoding358.preencode(state, m.phase)
12523
+ state.end++ // max flag is 32 so always one byte
12524
+
12525
+ if (m.deviceId) c.fixed32.preencode(state, m.deviceId)
12526
+ if (m.url) c.string.preencode(state, m.url)
12527
+ if (m.savedClientId) c.string.preencode(state, m.savedClientId)
12528
+ if (m.error) c.string.preencode(state, m.error)
12529
+ },
12530
+ encode(state, m) {
12531
+ const flags =
12532
+ (m.deviceId ? 1 : 0) |
12533
+ (m.url ? 2 : 0) |
12534
+ (m.clientId ? 4 : 0) |
12535
+ (m.clientSecret ? 8 : 0) |
12536
+ (m.savedClientId ? 16 : 0) |
12537
+ (m.error ? 32 : 0)
12538
+
12539
+ encoding358.encode(state, m.phase)
12540
+ c.uint.encode(state, flags)
12541
+
12542
+ if (m.deviceId) c.fixed32.encode(state, m.deviceId)
12543
+ if (m.url) c.string.encode(state, m.url)
12544
+ if (m.savedClientId) c.string.encode(state, m.savedClientId)
12545
+ if (m.error) c.string.encode(state, m.error)
12546
+ },
12547
+ decode(state) {
12548
+ const r0 = encoding358.decode(state)
12549
+ const flags = c.uint.decode(state)
12550
+
12551
+ return {
12552
+ phase: r0,
12553
+ deviceId: (flags & 1) !== 0 ? c.fixed32.decode(state) : null,
12554
+ url: (flags & 2) !== 0 ? c.string.decode(state) : null,
12555
+ clientId: (flags & 4) !== 0,
12556
+ clientSecret: (flags & 8) !== 0,
12557
+ savedClientId: (flags & 16) !== 0 ? c.string.decode(state) : null,
12558
+ error: (flags & 32) !== 0 ? c.string.decode(state) : null
12559
+ }
12560
+ }
12561
+ }
12562
+
12325
12563
  // @assistant/model-info-list.memory, deferred due to recusive use
12326
12564
  const encoding175_1 = c.frame(encoding321)
12327
12565
 
@@ -12423,6 +12661,10 @@ function getEnum(name) {
12423
12661
  return encoding324_enum
12424
12662
  case '@assistant/knowledge-source':
12425
12663
  return encoding346_enum
12664
+ case '@assistant/skill-oauth-operation':
12665
+ return encoding357_enum
12666
+ case '@assistant/skill-oauth-phase':
12667
+ return encoding358_enum
12426
12668
  default:
12427
12669
  throw new Error('Enum not found ' + name)
12428
12670
  }
@@ -13144,6 +13386,14 @@ function getEncoding(name) {
13144
13386
  return encoding355
13145
13387
  case '@assistant/quarantined-skill-keys':
13146
13388
  return encoding356
13389
+ case '@assistant/skill-oauth-operation':
13390
+ return encoding357
13391
+ case '@assistant/skill-oauth-phase':
13392
+ return encoding358
13393
+ case '@assistant/skill-oauth-request':
13394
+ return encoding359
13395
+ case '@assistant/skill-oauth-response':
13396
+ return encoding360
13147
13397
  default:
13148
13398
  throw new Error('Encoder not found ' + name)
13149
13399
  }