@qvac/core 0.3.1 → 0.3.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 (59) hide show
  1. package/dist-lib/lib/assistant/history.d.ts +10 -1
  2. package/dist-lib/lib/assistant/history.js +36 -1
  3. package/dist-lib/lib/assistant/message.d.ts +2 -0
  4. package/dist-lib/lib/assistant/message.js +11 -0
  5. package/dist-lib/lib/assistant/skill-encode.js +27 -1
  6. package/dist-lib/lib/assistant.d.ts +5 -2
  7. package/dist-lib/lib/assistant.js +41 -8
  8. package/dist-lib/lib/core/skill-secrets.js +3 -6
  9. package/dist-lib/lib/core.d.ts +1 -0
  10. package/dist-lib/lib/core.js +51 -9
  11. package/dist-lib/lib/credential-pusher.d.ts +2 -3
  12. package/dist-lib/lib/credential-pusher.js +67 -39
  13. package/dist-lib/lib/integrations/index.d.ts +1 -2
  14. package/dist-lib/lib/integrations/index.js +0 -1
  15. package/dist-lib/lib/integrations/setup-routes.js +0 -15
  16. package/dist-lib/lib/oauth/flow-core.js +1 -1
  17. package/dist-lib/lib/oauth/flow.d.ts +4 -2
  18. package/dist-lib/lib/oauth/flow.js +3 -4
  19. package/dist-lib/lib/oauth/host.d.ts +3 -1
  20. package/dist-lib/lib/oauth/host.js +3 -1
  21. package/dist-lib/lib/oauth/keys.d.ts +21 -20
  22. package/dist-lib/lib/oauth/keys.js +59 -85
  23. package/dist-lib/lib/oauth/loopback.d.ts +2 -2
  24. package/dist-lib/lib/oauth/loopback.js +32 -19
  25. package/dist-lib/lib/oauth/loopback.stub.d.ts +2 -2
  26. package/dist-lib/lib/oauth/loopback.stub.js +2 -2
  27. package/dist-lib/lib/oauth/providers.d.ts +3 -5
  28. package/dist-lib/lib/oauth/providers.js +20 -67
  29. package/dist-lib/lib/oauth/redirect-types.d.ts +1 -0
  30. package/dist-lib/lib/oauth/registry.d.ts +10 -0
  31. package/dist-lib/lib/oauth/registry.js +25 -0
  32. package/dist-lib/lib/oauth/resolve.js +1 -1
  33. package/dist-lib/lib/oauth/token-exchange-core.js +2 -1
  34. package/dist-lib/lib/oauth/types.d.ts +1 -1
  35. package/dist-lib/lib/oauth.client.d.ts +3 -1
  36. package/dist-lib/lib/oauth.client.js +3 -1
  37. package/dist-lib/lib/oauth.d.ts +4 -7
  38. package/dist-lib/lib/oauth.js +4 -7
  39. package/dist-lib/lib/skill-types.d.ts +12 -0
  40. package/dist-lib/schema/engine.js +21 -1
  41. package/dist-lib/spec/hrpc/messages.js +114 -5
  42. package/dist-lib/spec/hyperschema/index.js +114 -5
  43. package/dist-lib/spec/hyperschema/schema.json +84 -1
  44. package/dist-lib/spec/hyperschema/types.d.ts +18 -1
  45. package/package.json +4 -4
  46. package/tui/app.mjs +98 -155
  47. package/tui/lib/save-file.mjs +1 -1
  48. package/dist-lib/lib/integrations/oauth-providers.d.ts +0 -14
  49. package/dist-lib/lib/integrations/oauth-providers.js +0 -116
  50. package/dist-lib/lib/oauth/asana.d.ts +0 -35
  51. package/dist-lib/lib/oauth/asana.js +0 -71
  52. package/dist-lib/lib/oauth/google.d.ts +0 -37
  53. package/dist-lib/lib/oauth/google.js +0 -77
  54. package/dist-lib/lib/oauth/notion.d.ts +0 -34
  55. package/dist-lib/lib/oauth/notion.js +0 -82
  56. package/dist-lib/lib/oauth/spotify.d.ts +0 -32
  57. package/dist-lib/lib/oauth/spotify.js +0 -74
  58. package/dist-lib/lib/oauth/verify.d.ts +0 -8
  59. package/dist-lib/lib/oauth/verify.js +0 -58
@@ -1,13 +1,10 @@
1
1
  export { createPkce, scopedKey } from './oauth/common.js';
2
2
  export { waitForOAuthCallback } from './oauth/browser-connect.js';
3
- export { buildGoogleAuthUrl, connectGoogle, exchangeGoogleCode, GOOGLE_OAUTH_PORT, refreshGoogleToken, resolveGoogleCredential } from './oauth/google.js';
4
- export { buildNotionAuthUrl, connectNotion, exchangeNotionCode, NOTION_MCP_CREDENTIAL_KEY, NOTION_OAUTH_PORT, NOTION_OAUTH_STATE_KEY, refreshNotionToken, registerNotionClient, resolveNotionCredential } from './oauth/notion.js';
5
- export { buildAsanaAuthUrl, connectAsana, exchangeAsanaCode, ASANA_MCP_CREDENTIAL_KEY, ASANA_OAUTH_PORT, ASANA_OAUTH_STATE_KEY, refreshAsanaToken, resolveAsanaCredential } from './oauth/asana.js';
6
- export { buildSpotifyAuthUrl, connectSpotify, exchangeSpotifyCode, refreshSpotifyToken, resolveSpotifyCredential, SPOTIFY_CREDENTIAL_KEY, SPOTIFY_OAUTH_PORT, SPOTIFY_OAUTH_STATE_KEY } from './oauth/spotify.js';
7
3
  export { cancelOAuthFlow, runOAuthFlow } from './oauth/flow.js';
8
- export { defaultCredentialKeyFor, GMAIL_CREDENTIAL_KEY, GOOGLE_CALENDAR_CREDENTIAL_KEY, GOOGLE_CREDENTIAL_KEYS, GOOGLE_DOCS_CREDENTIAL_KEY, GOOGLE_DRIVE_CREDENTIAL_KEY, GOOGLE_SHEETS_CREDENTIAL_KEY, LEGACY_GOOGLE_CREDENTIAL_KEY, OAUTH_KEY_SPECS, oauthKeySpec, oauthStateKeyFor } from './oauth/keys.js';
4
+ export { OAUTH_CALLBACK_PATH, OAUTH_WAIT_FOR_CODE_TIMEOUT_MS, oauthRedirectUri, specFromRoute } from './oauth/keys.js';
5
+ export { oauthSpecFor, oauthSpecs } from './oauth/registry.js';
9
6
  export { generatePkceChallenge } from './oauth/pkce.js';
10
- export { buildProviderConfig, providerRequiresSecret, providerSupportsDcr, providerSupportsSharedIosSession } from './oauth/providers.js';
7
+ export { buildProviderConfig } from './oauth/providers.js';
11
8
  export { registerOAuthClient, resolveDynamicClientId } from './oauth/register.js';
9
+ export { resolveOAuthCredential } from './oauth/resolve.js';
12
10
  export { isTokenExpired, refreshOAuthTokens } from './oauth/token-exchange.js';
13
- export { verifyOAuthTokens } from './oauth/verify.js';
@@ -21,6 +21,17 @@ export type SkillSetupField = {
21
21
  readonly secret?: boolean | undefined;
22
22
  readonly required?: boolean | undefined;
23
23
  };
24
+ export type SkillOAuthConfig = {
25
+ readonly stateKey: string;
26
+ readonly authUrl: string;
27
+ readonly tokenUrl: string;
28
+ readonly scopes: ReadonlyArray<string>;
29
+ readonly tokenAuth: 'pkce-only' | 'secret-in-body' | 'secret-in-basic';
30
+ readonly extraAuthParams?: Readonly<Record<string, string>> | undefined;
31
+ readonly registrationEndpoint?: string | undefined;
32
+ readonly port?: number | undefined;
33
+ readonly sharedIosSession?: boolean | undefined;
34
+ };
24
35
  export type SkillSetupRoute = {
25
36
  readonly kind: 'oauth' | 'token' | 'install' | 'picker' | 'instructions';
26
37
  readonly label: string;
@@ -32,6 +43,7 @@ export type SkillSetupRoute = {
32
43
  readonly configSteps?: ReadonlyArray<string> | undefined;
33
44
  readonly fields?: ReadonlyArray<SkillSetupField> | undefined;
34
45
  readonly satisfied?: boolean | undefined;
46
+ readonly oauth?: SkillOAuthConfig | undefined;
35
47
  };
36
48
  export type SkillSetup = {
37
49
  readonly summary?: string | undefined;
@@ -1099,6 +1099,25 @@ export function registerEngineTypes(ns) {
1099
1099
  { name: 'required', type: 'bool' }
1100
1100
  ]
1101
1101
  });
1102
+ ns.register({
1103
+ name: 'skill-setup-token-auth',
1104
+ enum: ['pkce-only', 'secret-in-body', 'secret-in-basic'],
1105
+ strings: true
1106
+ });
1107
+ ns.register({
1108
+ name: 'skill-setup-oauth',
1109
+ fields: [
1110
+ { name: 'stateKey', type: 'string', required: true },
1111
+ { name: 'authUrl', type: 'string', required: true },
1112
+ { name: 'tokenUrl', type: 'string', required: true },
1113
+ { name: 'tokenAuth', type: '@assistant/skill-setup-token-auth', required: true },
1114
+ { name: 'scopes', type: 'string', array: true },
1115
+ { name: 'extraAuthParams', type: 'json' },
1116
+ { name: 'registrationEndpoint', type: 'string' },
1117
+ { name: 'port', type: 'uint' },
1118
+ { name: 'sharedIosSession', type: 'bool' }
1119
+ ]
1120
+ });
1102
1121
  ns.register({
1103
1122
  name: 'skill-setup-route-kind',
1104
1123
  enum: ['oauth', 'token', 'install', 'picker', 'instructions'],
@@ -1116,7 +1135,8 @@ export function registerEngineTypes(ns) {
1116
1135
  { name: 'steps', type: 'string', array: true },
1117
1136
  { name: 'configSteps', type: 'string', array: true },
1118
1137
  { name: 'fields', type: '@assistant/skill-setup-field', array: true },
1119
- { name: 'satisfied', type: 'bool' }
1138
+ { name: 'satisfied', type: 'bool' },
1139
+ { name: 'oauth', type: '@assistant/skill-setup-oauth' }
1120
1140
  ]
1121
1141
  });
1122
1142
  ns.register({
@@ -1,12 +1,12 @@
1
1
  // This file is autogenerated by the hyperschema compiler
2
- // Schema Version: 8
2
+ // Schema Version: 9
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 = 8
9
+ const VERSION = 9
10
10
 
11
11
  // eslint-disable-next-line no-unused-vars
12
12
  let version = VERSION
@@ -5241,7 +5241,8 @@ const encoding137 = {
5241
5241
  (m.steps ? 16 : 0) |
5242
5242
  (m.configSteps ? 32 : 0) |
5243
5243
  (m.fields ? 64 : 0) |
5244
- (m.satisfied ? 128 : 0)
5244
+ (m.satisfied ? 128 : 0) |
5245
+ ((version >= 9 && m.oauth) ? 256 : 0)
5245
5246
 
5246
5247
  encoding136.preencode(state, m.kind)
5247
5248
  c.string.preencode(state, m.label)
@@ -5254,6 +5255,7 @@ const encoding137 = {
5254
5255
  if (m.steps) encoding137_6.preencode(state, m.steps)
5255
5256
  if (m.configSteps) encoding137_7.preencode(state, m.configSteps)
5256
5257
  if (m.fields) encoding137_8.preencode(state, m.fields)
5258
+ if (version >= 9 && m.oauth) encoding137_10.preencode(state, m.oauth)
5257
5259
  },
5258
5260
  encode(state, m) {
5259
5261
  const flags =
@@ -5264,7 +5266,8 @@ const encoding137 = {
5264
5266
  (m.steps ? 16 : 0) |
5265
5267
  (m.configSteps ? 32 : 0) |
5266
5268
  (m.fields ? 64 : 0) |
5267
- (m.satisfied ? 128 : 0)
5269
+ (m.satisfied ? 128 : 0) |
5270
+ ((version >= 9 && m.oauth) ? 256 : 0)
5268
5271
 
5269
5272
  encoding136.encode(state, m.kind)
5270
5273
  c.string.encode(state, m.label)
@@ -5277,6 +5280,7 @@ const encoding137 = {
5277
5280
  if (m.steps) encoding137_6.encode(state, m.steps)
5278
5281
  if (m.configSteps) encoding137_7.encode(state, m.configSteps)
5279
5282
  if (m.fields) encoding137_8.encode(state, m.fields)
5283
+ if (version >= 9 && m.oauth) encoding137_10.encode(state, m.oauth)
5280
5284
  },
5281
5285
  decode(state) {
5282
5286
  const r0 = encoding136.decode(state)
@@ -5293,7 +5297,8 @@ const encoding137 = {
5293
5297
  steps: (flags & 16) !== 0 ? encoding137_6.decode(state) : null,
5294
5298
  configSteps: (flags & 32) !== 0 ? encoding137_7.decode(state) : null,
5295
5299
  fields: (flags & 64) !== 0 ? encoding137_8.decode(state) : null,
5296
- satisfied: (flags & 128) !== 0
5300
+ satisfied: (flags & 128) !== 0,
5301
+ oauth: (version >= 9 && (flags & 256) !== 0) ? encoding137_10.decode(state) : null
5297
5302
  }
5298
5303
  }
5299
5304
  }
@@ -8690,12 +8695,110 @@ const encoding247 = {
8690
8695
  }
8691
8696
  }
8692
8697
 
8698
+ const encoding248_enum = {
8699
+ "pkce-only": 'pkce-only',
8700
+ "secret-in-body": 'secret-in-body',
8701
+ "secret-in-basic": 'secret-in-basic'
8702
+ }
8703
+
8704
+ // @assistant/skill-setup-token-auth enum
8705
+ const encoding248 = {
8706
+ preencode (state, m) {
8707
+ state.end++ // max enum is 3 so always one byte
8708
+ },
8709
+ encode (state, m) {
8710
+ switch (m) {
8711
+ case 'pkce-only':
8712
+ c.uint.encode(state, 1)
8713
+ break
8714
+ case 'secret-in-body':
8715
+ c.uint.encode(state, 2)
8716
+ break
8717
+ case 'secret-in-basic':
8718
+ c.uint.encode(state, 3)
8719
+ break
8720
+ default:
8721
+ throw new Error('Unknown enum')
8722
+ }
8723
+ },
8724
+ decode (state) {
8725
+ switch (c.uint.decode(state)) {
8726
+ case 1:
8727
+ return 'pkce-only'
8728
+ case 2:
8729
+ return 'secret-in-body'
8730
+ case 3:
8731
+ return 'secret-in-basic'
8732
+ default: return null
8733
+ }
8734
+ }
8735
+ }
8736
+
8737
+ // @assistant/skill-setup-oauth.scopes
8738
+ const encoding249_4 = encoding12_6
8739
+
8740
+ // @assistant/skill-setup-oauth
8741
+ const encoding249 = {
8742
+ preencode(state, m) {
8743
+ c.string.preencode(state, m.stateKey)
8744
+ c.string.preencode(state, m.authUrl)
8745
+ c.string.preencode(state, m.tokenUrl)
8746
+ encoding248.preencode(state, m.tokenAuth)
8747
+ state.end++ // max flag is 16 so always one byte
8748
+
8749
+ if (version >= 9 && m.scopes) encoding249_4.preencode(state, m.scopes)
8750
+ if (version >= 9 && m.extraAuthParams) c.json.preencode(state, m.extraAuthParams)
8751
+ if (version >= 9 && m.registrationEndpoint) c.string.preencode(state, m.registrationEndpoint)
8752
+ if (version >= 9 && m.port) c.uint.preencode(state, m.port)
8753
+ },
8754
+ encode(state, m) {
8755
+ const flags =
8756
+ ((version >= 9 && m.scopes) ? 1 : 0) |
8757
+ ((version >= 9 && m.extraAuthParams) ? 2 : 0) |
8758
+ ((version >= 9 && m.registrationEndpoint) ? 4 : 0) |
8759
+ ((version >= 9 && m.port) ? 8 : 0) |
8760
+ ((version >= 9 && m.sharedIosSession) ? 16 : 0)
8761
+
8762
+ c.string.encode(state, m.stateKey)
8763
+ c.string.encode(state, m.authUrl)
8764
+ c.string.encode(state, m.tokenUrl)
8765
+ encoding248.encode(state, m.tokenAuth)
8766
+ c.uint.encode(state, flags)
8767
+
8768
+ if (version >= 9 && m.scopes) encoding249_4.encode(state, m.scopes)
8769
+ if (version >= 9 && m.extraAuthParams) c.json.encode(state, m.extraAuthParams)
8770
+ if (version >= 9 && m.registrationEndpoint) c.string.encode(state, m.registrationEndpoint)
8771
+ if (version >= 9 && m.port) c.uint.encode(state, m.port)
8772
+ },
8773
+ decode(state) {
8774
+ const r0 = c.string.decode(state)
8775
+ const r1 = c.string.decode(state)
8776
+ const r2 = c.string.decode(state)
8777
+ const r3 = encoding248.decode(state)
8778
+ const flags = c.uint.decode(state)
8779
+
8780
+ return {
8781
+ stateKey: r0,
8782
+ authUrl: r1,
8783
+ tokenUrl: r2,
8784
+ tokenAuth: r3,
8785
+ scopes: (version >= 9 && (flags & 1) !== 0) ? encoding249_4.decode(state) : null,
8786
+ extraAuthParams: (version >= 9 && (flags & 2) !== 0) ? c.json.decode(state) : null,
8787
+ registrationEndpoint: (version >= 9 && (flags & 4) !== 0) ? c.string.decode(state) : null,
8788
+ port: (version >= 9 && (flags & 8) !== 0) ? c.uint.decode(state) : 0,
8789
+ sharedIosSession: (version >= 9 && (flags & 16) !== 0)
8790
+ }
8791
+ }
8792
+ }
8793
+
8693
8794
  // @assistant/chat-list.groups, deferred due to recusive use
8694
8795
  const encoding18_1 = c.array(c.frame(encoding186))
8695
8796
  // @assistant/device.toolCatalog, deferred due to recusive use
8696
8797
  const encoding23_15 = c.array(c.frame(encoding175))
8697
8798
  // @assistant/save-device-capabilities-request.toolCatalog, deferred due to recusive use
8698
8799
  const encoding25_5 = encoding23_15
8800
+ // @assistant/skill-setup-route.oauth, deferred due to recusive use
8801
+ const encoding137_10 = c.frame(encoding249)
8699
8802
  // @assistant/chat-group-list.groups, deferred due to recusive use
8700
8803
  const encoding187_0 = encoding18_1
8701
8804
 
@@ -8779,6 +8882,8 @@ function getEnum(name) {
8779
8882
  return encoding203_enum
8780
8883
  case '@assistant/notification-kind':
8781
8884
  return encoding209_enum
8885
+ case '@assistant/skill-setup-token-auth':
8886
+ return encoding248_enum
8782
8887
  default:
8783
8888
  throw new Error('Enum not found ' + name)
8784
8889
  }
@@ -9282,6 +9387,10 @@ function getEncoding(name) {
9282
9387
  return encoding246
9283
9388
  case '@assistant/inference-calls-handoff-ack':
9284
9389
  return encoding247
9390
+ case '@assistant/skill-setup-token-auth':
9391
+ return encoding248
9392
+ case '@assistant/skill-setup-oauth':
9393
+ return encoding249
9285
9394
  default:
9286
9395
  throw new Error('Encoder not found ' + name)
9287
9396
  }
@@ -1,12 +1,12 @@
1
1
  // This file is autogenerated by the hyperschema compiler
2
- // Schema Version: 8
2
+ // Schema Version: 9
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 = 8
9
+ const VERSION = 9
10
10
 
11
11
  // eslint-disable-next-line no-unused-vars
12
12
  let version = VERSION
@@ -5241,7 +5241,8 @@ const encoding137 = {
5241
5241
  (m.steps ? 16 : 0) |
5242
5242
  (m.configSteps ? 32 : 0) |
5243
5243
  (m.fields ? 64 : 0) |
5244
- (m.satisfied ? 128 : 0)
5244
+ (m.satisfied ? 128 : 0) |
5245
+ ((version >= 9 && m.oauth) ? 256 : 0)
5245
5246
 
5246
5247
  encoding136.preencode(state, m.kind)
5247
5248
  c.string.preencode(state, m.label)
@@ -5254,6 +5255,7 @@ const encoding137 = {
5254
5255
  if (m.steps) encoding137_6.preencode(state, m.steps)
5255
5256
  if (m.configSteps) encoding137_7.preencode(state, m.configSteps)
5256
5257
  if (m.fields) encoding137_8.preencode(state, m.fields)
5258
+ if (version >= 9 && m.oauth) encoding137_10.preencode(state, m.oauth)
5257
5259
  },
5258
5260
  encode(state, m) {
5259
5261
  const flags =
@@ -5264,7 +5266,8 @@ const encoding137 = {
5264
5266
  (m.steps ? 16 : 0) |
5265
5267
  (m.configSteps ? 32 : 0) |
5266
5268
  (m.fields ? 64 : 0) |
5267
- (m.satisfied ? 128 : 0)
5269
+ (m.satisfied ? 128 : 0) |
5270
+ ((version >= 9 && m.oauth) ? 256 : 0)
5268
5271
 
5269
5272
  encoding136.encode(state, m.kind)
5270
5273
  c.string.encode(state, m.label)
@@ -5277,6 +5280,7 @@ const encoding137 = {
5277
5280
  if (m.steps) encoding137_6.encode(state, m.steps)
5278
5281
  if (m.configSteps) encoding137_7.encode(state, m.configSteps)
5279
5282
  if (m.fields) encoding137_8.encode(state, m.fields)
5283
+ if (version >= 9 && m.oauth) encoding137_10.encode(state, m.oauth)
5280
5284
  },
5281
5285
  decode(state) {
5282
5286
  const r0 = encoding136.decode(state)
@@ -5293,7 +5297,8 @@ const encoding137 = {
5293
5297
  steps: (flags & 16) !== 0 ? encoding137_6.decode(state) : null,
5294
5298
  configSteps: (flags & 32) !== 0 ? encoding137_7.decode(state) : null,
5295
5299
  fields: (flags & 64) !== 0 ? encoding137_8.decode(state) : null,
5296
- satisfied: (flags & 128) !== 0
5300
+ satisfied: (flags & 128) !== 0,
5301
+ oauth: (version >= 9 && (flags & 256) !== 0) ? encoding137_10.decode(state) : null
5297
5302
  }
5298
5303
  }
5299
5304
  }
@@ -8690,12 +8695,110 @@ const encoding247 = {
8690
8695
  }
8691
8696
  }
8692
8697
 
8698
+ const encoding248_enum = {
8699
+ "pkce-only": 'pkce-only',
8700
+ "secret-in-body": 'secret-in-body',
8701
+ "secret-in-basic": 'secret-in-basic'
8702
+ }
8703
+
8704
+ // @assistant/skill-setup-token-auth enum
8705
+ const encoding248 = {
8706
+ preencode (state, m) {
8707
+ state.end++ // max enum is 3 so always one byte
8708
+ },
8709
+ encode (state, m) {
8710
+ switch (m) {
8711
+ case 'pkce-only':
8712
+ c.uint.encode(state, 1)
8713
+ break
8714
+ case 'secret-in-body':
8715
+ c.uint.encode(state, 2)
8716
+ break
8717
+ case 'secret-in-basic':
8718
+ c.uint.encode(state, 3)
8719
+ break
8720
+ default:
8721
+ throw new Error('Unknown enum')
8722
+ }
8723
+ },
8724
+ decode (state) {
8725
+ switch (c.uint.decode(state)) {
8726
+ case 1:
8727
+ return 'pkce-only'
8728
+ case 2:
8729
+ return 'secret-in-body'
8730
+ case 3:
8731
+ return 'secret-in-basic'
8732
+ default: return null
8733
+ }
8734
+ }
8735
+ }
8736
+
8737
+ // @assistant/skill-setup-oauth.scopes
8738
+ const encoding249_4 = encoding12_6
8739
+
8740
+ // @assistant/skill-setup-oauth
8741
+ const encoding249 = {
8742
+ preencode(state, m) {
8743
+ c.string.preencode(state, m.stateKey)
8744
+ c.string.preencode(state, m.authUrl)
8745
+ c.string.preencode(state, m.tokenUrl)
8746
+ encoding248.preencode(state, m.tokenAuth)
8747
+ state.end++ // max flag is 16 so always one byte
8748
+
8749
+ if (version >= 9 && m.scopes) encoding249_4.preencode(state, m.scopes)
8750
+ if (version >= 9 && m.extraAuthParams) c.json.preencode(state, m.extraAuthParams)
8751
+ if (version >= 9 && m.registrationEndpoint) c.string.preencode(state, m.registrationEndpoint)
8752
+ if (version >= 9 && m.port) c.uint.preencode(state, m.port)
8753
+ },
8754
+ encode(state, m) {
8755
+ const flags =
8756
+ ((version >= 9 && m.scopes) ? 1 : 0) |
8757
+ ((version >= 9 && m.extraAuthParams) ? 2 : 0) |
8758
+ ((version >= 9 && m.registrationEndpoint) ? 4 : 0) |
8759
+ ((version >= 9 && m.port) ? 8 : 0) |
8760
+ ((version >= 9 && m.sharedIosSession) ? 16 : 0)
8761
+
8762
+ c.string.encode(state, m.stateKey)
8763
+ c.string.encode(state, m.authUrl)
8764
+ c.string.encode(state, m.tokenUrl)
8765
+ encoding248.encode(state, m.tokenAuth)
8766
+ c.uint.encode(state, flags)
8767
+
8768
+ if (version >= 9 && m.scopes) encoding249_4.encode(state, m.scopes)
8769
+ if (version >= 9 && m.extraAuthParams) c.json.encode(state, m.extraAuthParams)
8770
+ if (version >= 9 && m.registrationEndpoint) c.string.encode(state, m.registrationEndpoint)
8771
+ if (version >= 9 && m.port) c.uint.encode(state, m.port)
8772
+ },
8773
+ decode(state) {
8774
+ const r0 = c.string.decode(state)
8775
+ const r1 = c.string.decode(state)
8776
+ const r2 = c.string.decode(state)
8777
+ const r3 = encoding248.decode(state)
8778
+ const flags = c.uint.decode(state)
8779
+
8780
+ return {
8781
+ stateKey: r0,
8782
+ authUrl: r1,
8783
+ tokenUrl: r2,
8784
+ tokenAuth: r3,
8785
+ scopes: (version >= 9 && (flags & 1) !== 0) ? encoding249_4.decode(state) : null,
8786
+ extraAuthParams: (version >= 9 && (flags & 2) !== 0) ? c.json.decode(state) : null,
8787
+ registrationEndpoint: (version >= 9 && (flags & 4) !== 0) ? c.string.decode(state) : null,
8788
+ port: (version >= 9 && (flags & 8) !== 0) ? c.uint.decode(state) : 0,
8789
+ sharedIosSession: (version >= 9 && (flags & 16) !== 0)
8790
+ }
8791
+ }
8792
+ }
8793
+
8693
8794
  // @assistant/chat-list.groups, deferred due to recusive use
8694
8795
  const encoding18_1 = c.array(c.frame(encoding186))
8695
8796
  // @assistant/device.toolCatalog, deferred due to recusive use
8696
8797
  const encoding23_15 = c.array(c.frame(encoding175))
8697
8798
  // @assistant/save-device-capabilities-request.toolCatalog, deferred due to recusive use
8698
8799
  const encoding25_5 = encoding23_15
8800
+ // @assistant/skill-setup-route.oauth, deferred due to recusive use
8801
+ const encoding137_10 = c.frame(encoding249)
8699
8802
  // @assistant/chat-group-list.groups, deferred due to recusive use
8700
8803
  const encoding187_0 = encoding18_1
8701
8804
 
@@ -8779,6 +8882,8 @@ function getEnum(name) {
8779
8882
  return encoding203_enum
8780
8883
  case '@assistant/notification-kind':
8781
8884
  return encoding209_enum
8885
+ case '@assistant/skill-setup-token-auth':
8886
+ return encoding248_enum
8782
8887
  default:
8783
8888
  throw new Error('Enum not found ' + name)
8784
8889
  }
@@ -9282,6 +9387,10 @@ function getEncoding(name) {
9282
9387
  return encoding246
9283
9388
  case '@assistant/inference-calls-handoff-ack':
9284
9389
  return encoding247
9390
+ case '@assistant/skill-setup-token-auth':
9391
+ return encoding248
9392
+ case '@assistant/skill-setup-oauth':
9393
+ return encoding249
9285
9394
  default:
9286
9395
  throw new Error('Encoder not found ' + name)
9287
9396
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": 8,
2
+ "version": 9,
3
3
  "schema": [
4
4
  {
5
5
  "name": "empty",
@@ -4174,6 +4174,11 @@
4174
4174
  "name": "satisfied",
4175
4175
  "type": "bool",
4176
4176
  "version": 1
4177
+ },
4178
+ {
4179
+ "name": "oauth",
4180
+ "type": "@assistant/skill-setup-oauth",
4181
+ "version": 9
4177
4182
  }
4178
4183
  ]
4179
4184
  },
@@ -6961,6 +6966,84 @@
6961
6966
  "version": 8
6962
6967
  }
6963
6968
  ]
6969
+ },
6970
+ {
6971
+ "name": "skill-setup-token-auth",
6972
+ "namespace": "assistant",
6973
+ "offset": 1,
6974
+ "enum": [
6975
+ {
6976
+ "key": "pkce-only",
6977
+ "version": 9
6978
+ },
6979
+ {
6980
+ "key": "secret-in-body",
6981
+ "version": 9
6982
+ },
6983
+ {
6984
+ "key": "secret-in-basic",
6985
+ "version": 9
6986
+ }
6987
+ ],
6988
+ "strings": true
6989
+ },
6990
+ {
6991
+ "name": "skill-setup-oauth",
6992
+ "namespace": "assistant",
6993
+ "compact": false,
6994
+ "flagsPosition": 4,
6995
+ "fields": [
6996
+ {
6997
+ "name": "stateKey",
6998
+ "required": true,
6999
+ "type": "string",
7000
+ "version": 9
7001
+ },
7002
+ {
7003
+ "name": "authUrl",
7004
+ "required": true,
7005
+ "type": "string",
7006
+ "version": 9
7007
+ },
7008
+ {
7009
+ "name": "tokenUrl",
7010
+ "required": true,
7011
+ "type": "string",
7012
+ "version": 9
7013
+ },
7014
+ {
7015
+ "name": "tokenAuth",
7016
+ "required": true,
7017
+ "type": "@assistant/skill-setup-token-auth",
7018
+ "version": 9
7019
+ },
7020
+ {
7021
+ "name": "scopes",
7022
+ "array": true,
7023
+ "type": "string",
7024
+ "version": 9
7025
+ },
7026
+ {
7027
+ "name": "extraAuthParams",
7028
+ "type": "json",
7029
+ "version": 9
7030
+ },
7031
+ {
7032
+ "name": "registrationEndpoint",
7033
+ "type": "string",
7034
+ "version": 9
7035
+ },
7036
+ {
7037
+ "name": "port",
7038
+ "type": "uint",
7039
+ "version": 9
7040
+ },
7041
+ {
7042
+ "name": "sharedIosSession",
7043
+ "type": "bool",
7044
+ "version": 9
7045
+ }
7046
+ ]
6964
7047
  }
6965
7048
  ]
6966
7049
  }
@@ -1,5 +1,5 @@
1
1
  // This file is autogenerated by hyperschema-ts
2
- // Schema version: 8
2
+ // Schema version: 9
3
3
  // Do not edit manually.
4
4
 
5
5
  export interface AssistantEmpty {
@@ -864,6 +864,7 @@ export interface AssistantSkillSetupRoute {
864
864
  configSteps?: string[] | null
865
865
  fields?: AssistantSkillSetupField[] | null
866
866
  satisfied?: boolean
867
+ oauth?: AssistantSkillSetupOauth | null
867
868
  }
868
869
 
869
870
  export interface AssistantSkillSetup {
@@ -1499,6 +1500,20 @@ export interface AssistantInferenceCallsHandoffAck {
1499
1500
  truncated?: boolean
1500
1501
  }
1501
1502
 
1503
+ export type AssistantSkillSetupTokenAuth = "pkce-only" | "secret-in-body" | "secret-in-basic"
1504
+
1505
+ export interface AssistantSkillSetupOauth {
1506
+ stateKey: string
1507
+ authUrl: string
1508
+ tokenUrl: string
1509
+ tokenAuth: AssistantSkillSetupTokenAuth
1510
+ scopes?: string[] | null
1511
+ extraAuthParams?: unknown | null
1512
+ registrationEndpoint?: string | null
1513
+ port?: number
1514
+ sharedIosSession?: boolean
1515
+ }
1516
+
1502
1517
  export interface SchemaTypes {
1503
1518
  "@assistant/empty": AssistantEmpty
1504
1519
  "@assistant/ok-response": AssistantOkResponse
@@ -1748,4 +1763,6 @@ export interface SchemaTypes {
1748
1763
  "@assistant/inference-calls-request": AssistantInferenceCallsRequest
1749
1764
  "@assistant/inference-calls-handoff": AssistantInferenceCallsHandoff
1750
1765
  "@assistant/inference-calls-handoff-ack": AssistantInferenceCallsHandoffAck
1766
+ "@assistant/skill-setup-token-auth": AssistantSkillSetupTokenAuth
1767
+ "@assistant/skill-setup-oauth": AssistantSkillSetupOauth
1751
1768
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qvac/core",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "type": "module",
5
5
  "description": "Peer-to-peer AI across your devices",
6
6
  "exports": {
@@ -221,8 +221,8 @@
221
221
  }
222
222
  },
223
223
  "dependencies": {
224
- "@qvac/harness": "^0.2.9",
225
- "@qvac/skills": "^0.1.3",
224
+ "@qvac/harness": "^0.3.1",
225
+ "@qvac/skills": "^0.1.6",
226
226
  "asenion": "^0.1.0",
227
227
  "autobee": "^2.10.0",
228
228
  "b4a": "^1.8.1",
@@ -275,7 +275,7 @@
275
275
  "protomux": "^3.11.0",
276
276
  "protomux-wakeup": "^2.9.0",
277
277
  "rache": "^1.0.0",
278
- "rag-extract": "^0.1.0",
278
+ "rag-extract": "^0.1.1",
279
279
  "ready-guard": "^1.0.0",
280
280
  "ready-resource": "^1.2.0",
281
281
  "rocksdb-native": "^3.17.4",