@modelprofile.com/authswitch 6.5.0 → 7.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/dist_ts/00_commitinfo_data.js +1 -1
  2. package/dist_ts/authority-contract.d.ts +302 -6
  3. package/dist_ts/authority-contract.js +1 -1
  4. package/dist_ts/authority-runtime-contract.d.ts +13 -0
  5. package/dist_ts/authorityrehearsal.child.d.ts +1 -0
  6. package/dist_ts/authorityrehearsal.child.js +395 -0
  7. package/dist_ts/classes.accountlist.js +4 -3
  8. package/dist_ts/classes.authoritybackup.d.ts +134 -0
  9. package/dist_ts/classes.authoritybackup.js +769 -0
  10. package/dist_ts/classes.authoritybroker.d.ts +25 -5
  11. package/dist_ts/classes.authoritybroker.js +392 -123
  12. package/dist_ts/classes.authoritycli.d.ts +24 -0
  13. package/dist_ts/classes.authoritycli.js +675 -0
  14. package/dist_ts/classes.authorityclient.d.ts +19 -7
  15. package/dist_ts/classes.authorityclient.js +51 -14
  16. package/dist_ts/classes.authoritydaemon.d.ts +28 -1
  17. package/dist_ts/classes.authoritydaemon.js +482 -36
  18. package/dist_ts/classes.authoritydatabase.d.ts +175 -10
  19. package/dist_ts/classes.authoritydatabase.js +1100 -52
  20. package/dist_ts/classes.authoritymodels.d.ts +223 -1
  21. package/dist_ts/classes.authoritymodels.js +798 -9
  22. package/dist_ts/classes.authoritypreuse.d.ts +47 -0
  23. package/dist_ts/classes.authoritypreuse.js +278 -0
  24. package/dist_ts/classes.authorityregistry.d.ts +24 -0
  25. package/dist_ts/classes.authorityregistry.js +88 -0
  26. package/dist_ts/classes.authorityrehearsal.d.ts +127 -0
  27. package/dist_ts/classes.authorityrehearsal.js +632 -0
  28. package/dist_ts/classes.authorityusage.d.ts +160 -0
  29. package/dist_ts/classes.authorityusage.js +429 -0
  30. package/dist_ts/classes.claudeauthority.d.ts +66 -0
  31. package/dist_ts/classes.claudeauthority.js +532 -0
  32. package/dist_ts/classes.claudecodeharness.js +3 -2
  33. package/dist_ts/classes.claudecodelocks.d.ts +13 -0
  34. package/dist_ts/classes.claudecodelocks.js +75 -3
  35. package/dist_ts/classes.claudenative.d.ts +137 -0
  36. package/dist_ts/classes.claudenative.js +731 -0
  37. package/dist_ts/classes.claudestatus.d.ts +9 -0
  38. package/dist_ts/classes.claudestatus.js +26 -9
  39. package/dist_ts/classes.claudetokenrefresh.d.ts +15 -1
  40. package/dist_ts/classes.claudetokenrefresh.js +74 -21
  41. package/dist_ts/classes.codexharness.js +4 -2
  42. package/dist_ts/classes.codexmanaged.d.ts +11 -0
  43. package/dist_ts/classes.codexmanaged.js +75 -14
  44. package/dist_ts/classes.codexpreuse.d.ts +8 -0
  45. package/dist_ts/classes.codexpreuse.js +24 -6
  46. package/dist_ts/classes.fileharness.d.ts +2 -0
  47. package/dist_ts/classes.fileharness.js +6 -4
  48. package/dist_ts/classes.limits.js +12 -7
  49. package/dist_ts/classes.opencodeharness.js +2 -2
  50. package/dist_ts/claudehttp.d.ts +10 -0
  51. package/dist_ts/claudehttp.js +29 -3
  52. package/dist_ts/index.d.ts +1 -0
  53. package/dist_ts/index.js +7 -1
  54. package/dist_ts/interfaces.harness.d.ts +6 -0
  55. package/dist_ts/interfaces.list.d.ts +9 -3
  56. package/dist_ts/plugins.d.ts +5 -2
  57. package/dist_ts/plugins.js +7 -3
  58. package/dist_ts/ts_migration/0001_authority_meta.d.ts +3 -0
  59. package/dist_ts/ts_migration/0001_authority_meta.js +32 -0
  60. package/dist_ts/ts_migration/index.d.ts +3 -0
  61. package/dist_ts/ts_migration/index.js +6 -0
  62. package/package.json +4 -1
  63. package/readme.md +181 -14
  64. package/ts/00_commitinfo_data.ts +1 -1
  65. package/ts/authority-contract.ts +264 -9
  66. package/ts/authority-runtime-contract.ts +14 -0
  67. package/ts/authorityrehearsal.child.ts +330 -0
  68. package/ts/classes.accountlist.ts +3 -2
  69. package/ts/classes.authoritybackup.ts +780 -0
  70. package/ts/classes.authoritybroker.ts +389 -121
  71. package/ts/classes.authoritycli.ts +719 -0
  72. package/ts/classes.authorityclient.ts +75 -18
  73. package/ts/classes.authoritydaemon.ts +449 -36
  74. package/ts/classes.authoritydatabase.ts +1147 -55
  75. package/ts/classes.authoritymodels.ts +541 -6
  76. package/ts/classes.authoritypreuse.ts +297 -0
  77. package/ts/classes.authorityregistry.ts +118 -0
  78. package/ts/classes.authorityrehearsal.ts +625 -0
  79. package/ts/classes.authorityusage.ts +527 -0
  80. package/ts/classes.claudeauthority.ts +541 -0
  81. package/ts/classes.claudecodeharness.ts +2 -1
  82. package/ts/classes.claudecodelocks.ts +70 -1
  83. package/ts/classes.claudenative.ts +816 -0
  84. package/ts/classes.claudestatus.ts +38 -9
  85. package/ts/classes.claudetokenrefresh.ts +82 -19
  86. package/ts/classes.codexharness.ts +3 -1
  87. package/ts/classes.codexmanaged.ts +75 -12
  88. package/ts/classes.codexpreuse.ts +33 -5
  89. package/ts/classes.fileharness.ts +7 -3
  90. package/ts/classes.limits.ts +11 -6
  91. package/ts/classes.opencodeharness.ts +1 -1
  92. package/ts/claudehttp.ts +31 -2
  93. package/ts/index.ts +6 -0
  94. package/ts/interfaces.harness.ts +6 -0
  95. package/ts/interfaces.list.ts +9 -3
  96. package/ts/plugins.ts +7 -2
  97. package/ts/ts_migration/0001_authority_meta.ts +33 -0
  98. package/ts/ts_migration/index.ts +7 -0
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@modelprofile.com/authswitch',
6
- version: '6.5.0',
6
+ version: '7.0.0',
7
7
  description: 'Manage Codex, OpenCode and Claude Code accounts with guided switching and live usage status'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSw4QkFBOEI7SUFDcEMsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLDZGQUE2RjtDQUMzRyxDQUFBIn0=
@@ -1,20 +1,38 @@
1
1
  import type { ITypedRequest } from '@api.global/typedrequest-interfaces';
2
+ import type { IAuthSwitchUsageSnapshot } from './classes.authorityusage.js';
3
+ export type { IAuthSwitchUsageSnapshot } from './classes.authorityusage.js';
2
4
  /** Credential-free account management contract. Safe to import in browser code. */
3
- export type TAuthSwitchAccountHealth = 'ready' | 'refreshing' | 'retry_wait' | 'needs_reauth' | 'native' | 'legacy_native_pending' | 'removed';
5
+ export type TAuthSwitchLoginPurpose = 'openai_managed' | 'claude_host_native' | 'claude_container_setup' | 'opencode_native';
6
+ export type TAuthSwitchLoginHealth = 'ready' | 'refreshing' | 'retry_wait' | 'needs_reauth' | 'unverified' | 'pending_handoff' | 'handoff_quarantined' | 'removed';
4
7
  export interface IAuthSwitchAccount {
5
8
  id: string;
6
9
  providerId: string;
7
10
  label: string;
8
11
  email: string | null;
9
12
  plan: string | null;
10
- health: TAuthSwitchAccountHealth;
13
+ removed: boolean;
14
+ revision: number;
15
+ statusObservedAt: string;
16
+ }
17
+ /** One independently owned login. Native ownership does not imply observed health. */
18
+ export interface IAuthSwitchLogin {
19
+ id: string;
20
+ accountId: string;
21
+ providerId: string;
22
+ purpose: TAuthSwitchLoginPurpose;
11
23
  owner: 'daemon' | 'claude_native' | 'legacy_native' | 'none';
24
+ health: TAuthSwitchLoginHealth;
25
+ problem: 'none' | 'provider_unavailable' | 'exchange_uncertain' | 'provider_rejected' | 'native_owner';
12
26
  grantGeneration: number;
13
27
  revision: number;
14
28
  accessExpiresAt: string | null;
15
29
  retryAt: string | null;
16
- problem: 'none' | 'provider_unavailable' | 'exchange_uncertain' | 'provider_rejected' | 'native_owner';
17
30
  statusObservedAt: string;
31
+ capabilities: {
32
+ canReauthenticate: boolean;
33
+ canBind: boolean;
34
+ canPreuse: boolean;
35
+ };
18
36
  }
19
37
  export interface IAuthSwitchBinding {
20
38
  id: string;
@@ -25,15 +43,142 @@ export interface IAuthSwitchBinding {
25
43
  revision: number;
26
44
  }
27
45
  export interface IAuthSwitchSnapshot {
28
- schemaVersion: 1;
46
+ schemaVersion: 2;
29
47
  epoch: string;
30
48
  revision: number;
31
49
  generatedAt: string;
32
50
  accounts: IAuthSwitchAccount[];
51
+ logins: IAuthSwitchLogin[];
33
52
  bindings: IAuthSwitchBinding[];
34
53
  nextAccountCursor: string | null;
54
+ nextLoginCursor: string | null;
35
55
  nextBindingCursor: string | null;
36
56
  }
57
+ /** Persisted account evidence. No provider request is made while collecting diagnostics. */
58
+ export interface IAuthSwitchDoctorAccountEvidence {
59
+ id: string;
60
+ providerId: string;
61
+ removed: boolean;
62
+ statusObservedAt: string;
63
+ evidence: 'stored';
64
+ liveCheck: 'not_checked';
65
+ }
66
+ /** Persisted login evidence. Stored readiness is not a live provider-health claim. */
67
+ export interface IAuthSwitchDoctorLoginEvidence {
68
+ id: string;
69
+ accountId: string;
70
+ providerId: string;
71
+ purpose: TAuthSwitchLoginPurpose;
72
+ owner: 'daemon' | 'claude_native' | 'legacy_native' | 'none';
73
+ state: 'ready' | 'exchange_may_have_been_sent' | 'retry_wait' | 'needs_reauth' | 'native' | 'legacy_native_pending' | 'handoff_pending' | 'handoff_quarantined' | 'removed';
74
+ problem: 'none' | 'provider_unavailable' | 'exchange_uncertain' | 'provider_rejected' | 'native_owner';
75
+ grantGeneration: number;
76
+ authorizationGeneration: number;
77
+ accessExpiresAt: string | null;
78
+ retryAt: string | null;
79
+ statusObservedAt: string;
80
+ evidence: 'stored';
81
+ liveCheck: 'not_checked';
82
+ }
83
+ export interface IAuthSwitchDoctorManagedCodex {
84
+ homeId: string;
85
+ accountId: string;
86
+ loginId: string;
87
+ scopeId: string;
88
+ health: 'healthy' | 'degraded' | 'unknown';
89
+ durable: {
90
+ state: 'idle' | 'launch_prepared' | 'registered';
91
+ runId: string | null;
92
+ pid: number | null;
93
+ startedAt: string | null;
94
+ };
95
+ daemon: {
96
+ state: 'untracked' | 'starting' | 'ready' | 'stopping' | 'degraded';
97
+ assignment: 'untracked' | 'matches' | 'mismatch';
98
+ };
99
+ process: {
100
+ state: 'not_expected' | 'absent' | 'observed' | 'unknown';
101
+ identity: 'not_applicable' | 'unregistered' | 'matches' | 'mismatch' | 'unknown';
102
+ pid: number | null;
103
+ startedAt: string | null;
104
+ observedAt: string;
105
+ problem: 'none' | 'inspection_failed' | 'multiple_claimants';
106
+ };
107
+ }
108
+ export interface IAuthSwitchDoctorClaudeHome {
109
+ id: string;
110
+ activeAccountId: string;
111
+ activeLoginId: string;
112
+ pendingOperationId: string | null;
113
+ status: 'ready' | 'quarantined';
114
+ revision: number;
115
+ createdAt: string;
116
+ }
117
+ export interface IAuthSwitchDoctorClaudeHandoff {
118
+ id: string;
119
+ homeId: string;
120
+ outgoingAccountId: string;
121
+ outgoingLoginId: string;
122
+ incomingAccountId: string;
123
+ incomingLoginId: string;
124
+ phase: 'reserved' | 'prepared' | 'committed' | 'aborted' | 'quarantined';
125
+ problem: 'none' | 'native_uncertain' | 'foreign_or_torn' | 'unsupported_effective_auth' | 'database_uncertain';
126
+ runningEffectiveAuth: 'no_scoped_sessions' | 'unsupported_effective_auth' | null;
127
+ startedAt: string;
128
+ updatedAt: string;
129
+ revision: number;
130
+ }
131
+ export interface IAuthSwitchDoctorNativeHandoff {
132
+ id: string;
133
+ accountId: string;
134
+ loginId: string;
135
+ nativeHomeId: string;
136
+ direction: 'to_native' | 'to_daemon';
137
+ phase: 'prepared' | 'source_stopped' | 'target_written' | 'verified' | 'committed' | 'needs_reauth' | 'aborted';
138
+ operationId: string;
139
+ revision: number;
140
+ statusObservedAt: string;
141
+ }
142
+ export interface IAuthSwitchDoctorMigration {
143
+ id: string;
144
+ sourceKind: 'authswitch_stash' | 'authswitch_backup' | 'agl_flex' | 'codex_native' | 'opencode_native' | 'claude_native';
145
+ status: 'pending_native_owner' | 'prepared' | 'verified' | 'complete' | 'quarantined';
146
+ accountId: string | null;
147
+ loginId: string | null;
148
+ revision: number;
149
+ statusObservedAt: string;
150
+ }
151
+ /** One independently observed diagnostic page. Separate pages are not one atomic global snapshot. */
152
+ export interface IAuthSwitchDoctorPage {
153
+ observedAt: string;
154
+ daemon: {
155
+ state: 'ready' | 'closing';
156
+ claudeNativeAuthority: 'configured' | 'not_configured';
157
+ observedAt: string;
158
+ };
159
+ database: {
160
+ state: 'available';
161
+ observedAt: string;
162
+ schemaVersion: 2;
163
+ admission: 'open' | 'closed_restored';
164
+ epoch: string;
165
+ revision: number;
166
+ };
167
+ accounts: IAuthSwitchDoctorAccountEvidence[];
168
+ logins: IAuthSwitchDoctorLoginEvidence[];
169
+ managedCodex: IAuthSwitchDoctorManagedCodex[];
170
+ claudeHomes: IAuthSwitchDoctorClaudeHome[];
171
+ claudeHandoffs: IAuthSwitchDoctorClaudeHandoff[];
172
+ nativeHandoffs: IAuthSwitchDoctorNativeHandoff[];
173
+ migrations: IAuthSwitchDoctorMigration[];
174
+ nextAccountCursor: string | null;
175
+ nextLoginCursor: string | null;
176
+ nextCodexHomeCursor: string | null;
177
+ nextClaudeHomeCursor: string | null;
178
+ nextClaudeHandoffCursor: string | null;
179
+ nextNativeHandoffCursor: string | null;
180
+ nextMigrationCursor: string | null;
181
+ }
37
182
  export interface IAuthSwitchAccountEvent {
38
183
  epoch: string;
39
184
  revision: number;
@@ -50,15 +195,91 @@ export type TAuthSwitchLoginPrompt = {
50
195
  };
51
196
  export interface IAuthSwitchOperation {
52
197
  id: string;
53
- state: 'pending' | 'complete' | 'failed' | 'cancelled';
198
+ kind: 'add_openai' | 'reauth_openai';
199
+ purpose: 'openai_managed';
200
+ targetAccountId: string | null;
201
+ targetLoginId: string | null;
202
+ state: 'starting' | 'pending' | 'committing' | 'complete' | 'failed' | 'cancelled' | 'interrupted' | 'outcome_unknown';
54
203
  prompt: TAuthSwitchLoginPrompt | null;
55
- account: IAuthSwitchAccount | null;
204
+ result: {
205
+ accountId: string;
206
+ loginId: string;
207
+ accountRevision: number;
208
+ loginGeneration: number;
209
+ } | null;
56
210
  error: string | null;
211
+ createdAt: string;
212
+ updatedAt: string;
213
+ finishedAt: string | null;
214
+ revision: number;
215
+ }
216
+ /** Credential-free receipt for one exact, never-replayed quota-consuming request. */
217
+ export interface IAuthSwitchPreuseOperation {
218
+ id: string;
219
+ accountId: string;
220
+ loginId: string;
221
+ purpose: 'openai_managed';
222
+ requestedModel: string | null;
223
+ model: string | null;
224
+ state: 'preparing' | 'request_may_have_started' | 'complete' | 'not_sent' | 'outcome_unknown';
225
+ result: {
226
+ inputTokens: number | null;
227
+ outputTokens: number | null;
228
+ totalTokens: number | null;
229
+ } | null;
230
+ problem: 'none' | 'target_unavailable' | 'access_unavailable' | 'catalog_unavailable' | 'account_busy' | 'cancelled' | 'authority_closing' | 'interrupted' | 'request_uncertain' | 'restored_history_uncertain';
231
+ createdAt: string;
232
+ updatedAt: string;
233
+ finishedAt: string | null;
234
+ revision: number;
235
+ }
236
+ /** Credential-free native file ownership result. It makes no claim about a running session's active request. */
237
+ export interface IAuthSwitchClaudeNativeHandoff {
238
+ id: string;
239
+ homeId: string;
240
+ outgoingAccountId: string;
241
+ incomingAccountId: string;
242
+ phase: 'reserved' | 'prepared' | 'committed' | 'aborted' | 'quarantined';
243
+ problem: 'none' | 'native_uncertain' | 'foreign_or_torn' | 'unsupported_effective_auth' | 'database_uncertain';
244
+ runningEffectiveAuth: 'no_scoped_sessions' | 'unsupported_effective_auth' | null;
245
+ updatedAt: string;
246
+ }
247
+ export interface IReq_AuthSwitchSwitchClaudeNative extends ITypedRequest {
248
+ method: 'authswitch.authority.claude.switch';
249
+ request: {
250
+ accountId: string;
251
+ loginId: string;
252
+ purpose: 'claude_host_native';
253
+ };
254
+ response: {
255
+ handoff: IAuthSwitchClaudeNativeHandoff;
256
+ };
257
+ }
258
+ export interface IReq_AuthSwitchClaudeNativeHandoff extends ITypedRequest {
259
+ method: 'authswitch.authority.claude.handoff';
260
+ request: {
261
+ operationId: string;
262
+ };
263
+ response: {
264
+ handoff: IAuthSwitchClaudeNativeHandoff;
265
+ };
266
+ }
267
+ export interface IReq_AuthSwitchClaudeNativeHandoffs extends ITypedRequest {
268
+ method: 'authswitch.authority.claude.handoffs';
269
+ request: {
270
+ after?: string;
271
+ limit?: number;
272
+ };
273
+ response: {
274
+ handoffs: IAuthSwitchClaudeNativeHandoff[];
275
+ nextCursor: string | null;
276
+ };
57
277
  }
58
278
  export interface IReq_AuthSwitchSnapshot extends ITypedRequest {
59
279
  method: 'authswitch.authority.snapshot';
60
280
  request: {
61
281
  accountAfter?: string;
282
+ loginAfter?: string;
62
283
  bindingAfter?: string;
63
284
  limit?: number;
64
285
  };
@@ -66,6 +287,34 @@ export interface IReq_AuthSwitchSnapshot extends ITypedRequest {
66
287
  snapshot: IAuthSwitchSnapshot;
67
288
  };
68
289
  }
290
+ export interface IReq_AuthSwitchDoctor extends ITypedRequest {
291
+ method: 'authswitch.authority.doctor';
292
+ request: {
293
+ accountAfter?: string;
294
+ loginAfter?: string;
295
+ codexHomeAfter?: string;
296
+ claudeHomeAfter?: string;
297
+ claudeHandoffAfter?: string;
298
+ nativeHandoffAfter?: string;
299
+ migrationAfter?: string;
300
+ limit?: number;
301
+ };
302
+ response: {
303
+ page: IAuthSwitchDoctorPage;
304
+ };
305
+ }
306
+ /** Management-only usage read. The DTO contains no access or refresh credential. */
307
+ export interface IReq_AuthSwitchUsage extends ITypedRequest {
308
+ method: 'authswitch.authority.usage';
309
+ request: {
310
+ accountId: string;
311
+ loginId: string;
312
+ force?: boolean;
313
+ };
314
+ response: {
315
+ usage: IAuthSwitchUsageSnapshot;
316
+ };
317
+ }
69
318
  export interface IReq_AuthSwitchEvents extends ITypedRequest {
70
319
  method: 'authswitch.authority.events';
71
320
  request: {
@@ -83,6 +332,7 @@ export interface IReq_AuthSwitchEvents extends ITypedRequest {
83
332
  export interface IReq_AuthSwitchBeginAdd extends ITypedRequest {
84
333
  method: 'authswitch.authority.add';
85
334
  request: {
335
+ operationId: string;
86
336
  providerId: 'openai';
87
337
  flow: 'device';
88
338
  };
@@ -93,13 +343,27 @@ export interface IReq_AuthSwitchBeginAdd extends ITypedRequest {
93
343
  export interface IReq_AuthSwitchBeginReauth extends ITypedRequest {
94
344
  method: 'authswitch.authority.reauth';
95
345
  request: {
346
+ operationId: string;
96
347
  accountId: string;
348
+ loginId: string;
349
+ purpose: 'openai_managed';
97
350
  flow: 'device';
98
351
  };
99
352
  response: {
100
353
  operation: IAuthSwitchOperation;
101
354
  };
102
355
  }
356
+ export interface IReq_AuthSwitchListOperations extends ITypedRequest {
357
+ method: 'authswitch.authority.operations';
358
+ request: {
359
+ after?: string;
360
+ limit?: number;
361
+ };
362
+ response: {
363
+ operations: IAuthSwitchOperation[];
364
+ nextCursor: string | null;
365
+ };
366
+ }
103
367
  export interface IReq_AuthSwitchGetOperation extends ITypedRequest {
104
368
  method: 'authswitch.authority.operation';
105
369
  request: {
@@ -118,6 +382,38 @@ export interface IReq_AuthSwitchCancelOperation extends ITypedRequest {
118
382
  operation: IAuthSwitchOperation;
119
383
  };
120
384
  }
385
+ export interface IReq_AuthSwitchStartPreuse extends ITypedRequest {
386
+ method: 'authswitch.authority.preuse.start';
387
+ request: {
388
+ operationId: string;
389
+ accountId: string;
390
+ loginId: string;
391
+ purpose: 'openai_managed';
392
+ prompt: string;
393
+ model?: string;
394
+ };
395
+ response: {
396
+ operation: IAuthSwitchPreuseOperation;
397
+ };
398
+ }
399
+ export interface IReq_AuthSwitchGetPreuse extends ITypedRequest {
400
+ method: 'authswitch.authority.preuse.operation';
401
+ request: {
402
+ operationId: string;
403
+ };
404
+ response: {
405
+ operation: IAuthSwitchPreuseOperation;
406
+ };
407
+ }
408
+ export interface IReq_AuthSwitchCancelPreuse extends ITypedRequest {
409
+ method: 'authswitch.authority.preuse.cancel';
410
+ request: {
411
+ operationId: string;
412
+ };
413
+ response: {
414
+ operation: IAuthSwitchPreuseOperation;
415
+ };
416
+ }
121
417
  export interface IReq_AuthSwitchRenameAccount extends ITypedRequest {
122
418
  method: 'authswitch.authority.rename';
123
419
  request: {
@@ -1,3 +1,3 @@
1
1
  export {};
2
2
  /** Runtime capability is returned only to trusted backend callers; do not expose this response in a browser API. */
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aG9yaXR5LWNvbnRyYWN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvYXV0aG9yaXR5LWNvbnRyYWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUE0R0Esb0hBQW9IIn0=
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aG9yaXR5LWNvbnRyYWN0LmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvYXV0aG9yaXR5LWNvbnRyYWN0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7QUEyV0Esb0hBQW9IIn0=
@@ -5,6 +5,8 @@ export interface IReq_AuthSwitchBindAccount extends ITypedRequest {
5
5
  method: 'authswitch.authority.bind';
6
6
  request: {
7
7
  accountId: string;
8
+ loginId: string;
9
+ purpose: 'openai_managed';
8
10
  runtime: IAuthSwitchBinding['runtime'];
9
11
  scopeId: string;
10
12
  incarnationId: string;
@@ -32,3 +34,14 @@ export interface IReq_AuthSwitchResolveAccess extends ITypedRequest {
32
34
  grantGeneration: number;
33
35
  };
34
36
  }
37
+ /** Backend-only release for one exact external runtime capability. */
38
+ export interface IReq_AuthSwitchReleaseBinding extends ITypedRequest {
39
+ method: 'authswitch.authority.release';
40
+ request: {
41
+ bindingId: string;
42
+ capability: string;
43
+ };
44
+ response: {
45
+ state: 'released' | 'inactive';
46
+ };
47
+ }
@@ -0,0 +1 @@
1
+ export {};