@cortexkit/anthropic-auth-core 2.11.1 → 2.11.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/accounts.d.ts +30 -16
- package/dist/cachekeep.d.ts +8 -5
- package/dist/index.d.ts +17 -1
- package/dist/index.js +6468 -1969
- package/dist/internal-types/claustrum/custody.d.ts +4 -0
- package/dist/internal-types/claustrum/index.d.ts +1 -1
- package/dist/internal-types/routing-accessor/index.d.ts +34 -9
- package/dist/internal-types/settings/define.d.ts +35 -0
- package/dist/internal-types/settings/descriptors.d.ts +97 -0
- package/dist/internal-types/settings/edit.d.ts +24 -0
- package/dist/internal-types/settings/handle.d.ts +30 -0
- package/dist/internal-types/settings/index.d.ts +10 -0
- package/dist/internal-types/settings/move.d.ts +76 -0
- package/dist/internal-types/settings/parse.d.ts +24 -0
- package/dist/internal-types/settings/paths.d.ts +12 -0
- package/dist/internal-types/settings/refusal.d.ts +7 -0
- package/dist/internal-types/settings/resolve.d.ts +15 -0
- package/dist/internal-types/settings/schema.d.ts +29 -0
- package/dist/internal-types/settings/snapshot.d.ts +24 -0
- package/dist/message-threads.d.ts +29 -2
- package/dist/native-account-runtime.d.ts +22 -8
- package/dist/native-runtime-settings.d.ts +41 -0
- package/dist/native-settings-write.d.ts +19 -0
- package/dist/path-options.d.ts +16 -0
- package/dist/pool-paths.d.ts +2 -1
- package/dist/routing-relay.d.ts +6 -1
- package/dist/routing-wait.d.ts +14 -0
- package/dist/routing.d.ts +2 -2
- package/dist/settings-definition.d.ts +621 -0
- package/dist/settings-mode.d.ts +22 -0
- package/dist/settings-move-fence.d.ts +44 -0
- package/dist/settings-move-map.d.ts +7 -0
- package/dist/settings-move-run.d.ts +29 -0
- package/dist/settings-move-source.d.ts +50 -0
- package/dist/settings-move-sources.d.ts +35 -0
- package/dist/settings-paths.d.ts +30 -0
- package/dist/settings-protection-copy.d.ts +12 -0
- package/dist/settings-protection-legacy.d.ts +22 -0
- package/dist/settings-record.d.ts +8 -0
- package/dist/settings-service.d.ts +99 -0
- package/dist/settings-three-way.d.ts +5 -0
- package/dist/sticky-routing.d.ts +14 -0
- package/package.json +3 -2
- package/schema/anthropic-auth.schema.json +1081 -0
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
/** Scalar ranges follow validateNativeMigrationSettings; list entries replace whole values. */
|
|
2
|
+
export declare const settingsDefinition: import("./internal-types/settings/index.js").SettingsDefinition<{
|
|
3
|
+
readonly routing_mode: {
|
|
4
|
+
readonly hosts: 'both';
|
|
5
|
+
readonly project: 'user-only';
|
|
6
|
+
readonly overrides: {
|
|
7
|
+
readonly host: true;
|
|
8
|
+
};
|
|
9
|
+
readonly value: Readonly<{
|
|
10
|
+
readonly kind: 'oneOf';
|
|
11
|
+
readonly values: readonly ["main-first", "fallback-first", "sticky-balanced"];
|
|
12
|
+
}>;
|
|
13
|
+
readonly default: "main-first";
|
|
14
|
+
};
|
|
15
|
+
readonly max_same_account_wait: {
|
|
16
|
+
readonly hosts: 'both';
|
|
17
|
+
readonly project: 'user-only';
|
|
18
|
+
readonly overrides: {
|
|
19
|
+
readonly host: true;
|
|
20
|
+
};
|
|
21
|
+
readonly value: Readonly<{
|
|
22
|
+
readonly kind: 'oneOf';
|
|
23
|
+
readonly values: readonly ["off", "15m", "cache"];
|
|
24
|
+
}>;
|
|
25
|
+
readonly default: "15m";
|
|
26
|
+
};
|
|
27
|
+
readonly fallback_on: {
|
|
28
|
+
readonly hosts: 'both';
|
|
29
|
+
readonly project: 'user-only';
|
|
30
|
+
readonly overrides: {
|
|
31
|
+
readonly host: true;
|
|
32
|
+
};
|
|
33
|
+
readonly value: {
|
|
34
|
+
readonly kind: 'list';
|
|
35
|
+
readonly item: Readonly<{
|
|
36
|
+
readonly kind: 'integer';
|
|
37
|
+
readonly min: number | undefined;
|
|
38
|
+
readonly max: number | undefined;
|
|
39
|
+
}>;
|
|
40
|
+
};
|
|
41
|
+
readonly default: readonly [401, 403, 429];
|
|
42
|
+
};
|
|
43
|
+
readonly refresh_enabled: {
|
|
44
|
+
readonly hosts: 'both';
|
|
45
|
+
readonly project: 'user-only';
|
|
46
|
+
readonly overrides: {
|
|
47
|
+
readonly host: true;
|
|
48
|
+
};
|
|
49
|
+
readonly value: Readonly<{
|
|
50
|
+
readonly kind: 'boolean';
|
|
51
|
+
}>;
|
|
52
|
+
readonly default: true;
|
|
53
|
+
};
|
|
54
|
+
readonly refresh_interval_minutes: {
|
|
55
|
+
readonly hosts: 'both';
|
|
56
|
+
readonly project: 'user-only';
|
|
57
|
+
readonly overrides: {
|
|
58
|
+
readonly host: true;
|
|
59
|
+
};
|
|
60
|
+
readonly value: Readonly<{
|
|
61
|
+
readonly kind: 'number';
|
|
62
|
+
readonly min: number | undefined;
|
|
63
|
+
readonly max: number | undefined;
|
|
64
|
+
}>;
|
|
65
|
+
readonly default: 10;
|
|
66
|
+
};
|
|
67
|
+
readonly refresh_refresh_before_expiry_minutes: {
|
|
68
|
+
readonly hosts: 'both';
|
|
69
|
+
readonly project: 'user-only';
|
|
70
|
+
readonly overrides: {
|
|
71
|
+
readonly host: true;
|
|
72
|
+
};
|
|
73
|
+
readonly value: Readonly<{
|
|
74
|
+
readonly kind: 'number';
|
|
75
|
+
readonly min: number | undefined;
|
|
76
|
+
readonly max: number | undefined;
|
|
77
|
+
}>;
|
|
78
|
+
readonly default: 240;
|
|
79
|
+
};
|
|
80
|
+
readonly quota_enabled: {
|
|
81
|
+
readonly hosts: 'both';
|
|
82
|
+
readonly project: 'user-only';
|
|
83
|
+
readonly overrides: {
|
|
84
|
+
readonly host: true;
|
|
85
|
+
};
|
|
86
|
+
readonly value: Readonly<{
|
|
87
|
+
readonly kind: 'oneOf';
|
|
88
|
+
readonly values: readonly ["default", "on", "off"];
|
|
89
|
+
}>;
|
|
90
|
+
readonly default: "default";
|
|
91
|
+
};
|
|
92
|
+
readonly quota_check_interval_minutes: {
|
|
93
|
+
readonly hosts: 'both';
|
|
94
|
+
readonly project: 'user-only';
|
|
95
|
+
readonly overrides: {
|
|
96
|
+
readonly host: true;
|
|
97
|
+
};
|
|
98
|
+
readonly value: Readonly<{
|
|
99
|
+
readonly kind: 'number';
|
|
100
|
+
readonly min: number | undefined;
|
|
101
|
+
readonly max: number | undefined;
|
|
102
|
+
}>;
|
|
103
|
+
readonly default: 5;
|
|
104
|
+
};
|
|
105
|
+
readonly quota_refresh_every_n_requests: {
|
|
106
|
+
readonly hosts: 'both';
|
|
107
|
+
readonly project: 'user-only';
|
|
108
|
+
readonly overrides: {
|
|
109
|
+
readonly host: true;
|
|
110
|
+
};
|
|
111
|
+
readonly value: Readonly<{
|
|
112
|
+
readonly kind: 'number';
|
|
113
|
+
readonly min: number | undefined;
|
|
114
|
+
readonly max: number | undefined;
|
|
115
|
+
}>;
|
|
116
|
+
readonly default: 0;
|
|
117
|
+
};
|
|
118
|
+
readonly quota_minimum_remaining_five_hour: {
|
|
119
|
+
readonly hosts: 'both';
|
|
120
|
+
readonly project: 'user-only';
|
|
121
|
+
readonly overrides: {
|
|
122
|
+
readonly host: true;
|
|
123
|
+
};
|
|
124
|
+
readonly value: Readonly<{
|
|
125
|
+
readonly kind: 'number';
|
|
126
|
+
readonly min: number | undefined;
|
|
127
|
+
readonly max: number | undefined;
|
|
128
|
+
}>;
|
|
129
|
+
readonly default: 0;
|
|
130
|
+
};
|
|
131
|
+
readonly quota_minimum_remaining_seven_day: {
|
|
132
|
+
readonly hosts: 'both';
|
|
133
|
+
readonly project: 'user-only';
|
|
134
|
+
readonly overrides: {
|
|
135
|
+
readonly host: true;
|
|
136
|
+
};
|
|
137
|
+
readonly value: Readonly<{
|
|
138
|
+
readonly kind: 'number';
|
|
139
|
+
readonly min: number | undefined;
|
|
140
|
+
readonly max: number | undefined;
|
|
141
|
+
}>;
|
|
142
|
+
readonly default: 0;
|
|
143
|
+
};
|
|
144
|
+
readonly quota_minimum_remaining_scoped: {
|
|
145
|
+
readonly hosts: 'both';
|
|
146
|
+
readonly project: 'user-only';
|
|
147
|
+
readonly overrides: {
|
|
148
|
+
readonly host: true;
|
|
149
|
+
};
|
|
150
|
+
readonly value: Readonly<{
|
|
151
|
+
readonly kind: 'number';
|
|
152
|
+
readonly min: number | undefined;
|
|
153
|
+
readonly max: number | undefined;
|
|
154
|
+
}>;
|
|
155
|
+
readonly default: 0;
|
|
156
|
+
};
|
|
157
|
+
readonly quota_fail_closed_on_unknown_quota: {
|
|
158
|
+
readonly hosts: 'both';
|
|
159
|
+
readonly project: 'user-only';
|
|
160
|
+
readonly overrides: {
|
|
161
|
+
readonly host: true;
|
|
162
|
+
};
|
|
163
|
+
readonly value: Readonly<{
|
|
164
|
+
readonly kind: 'oneOf';
|
|
165
|
+
readonly values: readonly ["default", "on", "off"];
|
|
166
|
+
}>;
|
|
167
|
+
readonly default: "default";
|
|
168
|
+
};
|
|
169
|
+
readonly quota_show_toasts: {
|
|
170
|
+
readonly hosts: 'both';
|
|
171
|
+
readonly project: 'user-only';
|
|
172
|
+
readonly overrides: {
|
|
173
|
+
readonly host: true;
|
|
174
|
+
};
|
|
175
|
+
readonly value: Readonly<{
|
|
176
|
+
readonly kind: 'boolean';
|
|
177
|
+
}>;
|
|
178
|
+
readonly default: false;
|
|
179
|
+
};
|
|
180
|
+
readonly quota_header_feed_enabled: {
|
|
181
|
+
readonly hosts: 'both';
|
|
182
|
+
readonly project: 'user-only';
|
|
183
|
+
readonly overrides: {
|
|
184
|
+
readonly host: true;
|
|
185
|
+
};
|
|
186
|
+
readonly value: Readonly<{
|
|
187
|
+
readonly kind: 'boolean';
|
|
188
|
+
}>;
|
|
189
|
+
readonly default: false;
|
|
190
|
+
};
|
|
191
|
+
readonly killswitch_enabled: {
|
|
192
|
+
readonly hosts: 'both';
|
|
193
|
+
readonly project: 'user-only';
|
|
194
|
+
readonly overrides: {
|
|
195
|
+
readonly host: true;
|
|
196
|
+
};
|
|
197
|
+
readonly value: Readonly<{
|
|
198
|
+
readonly kind: 'boolean';
|
|
199
|
+
}>;
|
|
200
|
+
readonly default: false;
|
|
201
|
+
};
|
|
202
|
+
readonly killswitch_default_five_hour: {
|
|
203
|
+
readonly hosts: 'both';
|
|
204
|
+
readonly project: 'user-only';
|
|
205
|
+
readonly overrides: {
|
|
206
|
+
readonly host: true;
|
|
207
|
+
};
|
|
208
|
+
readonly value: Readonly<{
|
|
209
|
+
readonly kind: 'number';
|
|
210
|
+
readonly min: number | undefined;
|
|
211
|
+
readonly max: number | undefined;
|
|
212
|
+
}>;
|
|
213
|
+
readonly default: 5;
|
|
214
|
+
};
|
|
215
|
+
readonly killswitch_default_seven_day: {
|
|
216
|
+
readonly hosts: 'both';
|
|
217
|
+
readonly project: 'user-only';
|
|
218
|
+
readonly overrides: {
|
|
219
|
+
readonly host: true;
|
|
220
|
+
};
|
|
221
|
+
readonly value: Readonly<{
|
|
222
|
+
readonly kind: 'number';
|
|
223
|
+
readonly min: number | undefined;
|
|
224
|
+
readonly max: number | undefined;
|
|
225
|
+
}>;
|
|
226
|
+
readonly default: 10;
|
|
227
|
+
};
|
|
228
|
+
readonly killswitch_default_scoped: {
|
|
229
|
+
readonly hosts: 'both';
|
|
230
|
+
readonly project: 'user-only';
|
|
231
|
+
readonly overrides: {
|
|
232
|
+
readonly host: true;
|
|
233
|
+
};
|
|
234
|
+
readonly value: Readonly<{
|
|
235
|
+
readonly kind: 'number';
|
|
236
|
+
readonly min: number | undefined;
|
|
237
|
+
readonly max: number | undefined;
|
|
238
|
+
}>;
|
|
239
|
+
readonly default: 0;
|
|
240
|
+
};
|
|
241
|
+
readonly killswitch_account_floors: {
|
|
242
|
+
readonly hosts: 'both';
|
|
243
|
+
readonly project: 'user-only';
|
|
244
|
+
readonly value: {
|
|
245
|
+
readonly kind: 'list';
|
|
246
|
+
readonly item: {
|
|
247
|
+
readonly kind: 'object';
|
|
248
|
+
readonly fields: {
|
|
249
|
+
readonly account: Readonly<{
|
|
250
|
+
readonly kind: 'string';
|
|
251
|
+
}>;
|
|
252
|
+
readonly host: Readonly<{
|
|
253
|
+
readonly kind: 'oneOf';
|
|
254
|
+
readonly values: readonly ["opencode", "pi", "both"];
|
|
255
|
+
}>;
|
|
256
|
+
readonly five_hour: Readonly<{
|
|
257
|
+
readonly kind: 'number';
|
|
258
|
+
readonly min: number | undefined;
|
|
259
|
+
readonly max: number | undefined;
|
|
260
|
+
}>;
|
|
261
|
+
readonly seven_day: Readonly<{
|
|
262
|
+
readonly kind: 'number';
|
|
263
|
+
readonly min: number | undefined;
|
|
264
|
+
readonly max: number | undefined;
|
|
265
|
+
}>;
|
|
266
|
+
readonly scoped: Readonly<{
|
|
267
|
+
readonly kind: 'number';
|
|
268
|
+
readonly min: number | undefined;
|
|
269
|
+
readonly max: number | undefined;
|
|
270
|
+
}>;
|
|
271
|
+
};
|
|
272
|
+
};
|
|
273
|
+
};
|
|
274
|
+
readonly default: readonly [];
|
|
275
|
+
};
|
|
276
|
+
readonly claude_cache_enabled: {
|
|
277
|
+
readonly hosts: 'both';
|
|
278
|
+
readonly project: 'user-only';
|
|
279
|
+
readonly overrides: {
|
|
280
|
+
readonly host: true;
|
|
281
|
+
readonly model: true;
|
|
282
|
+
};
|
|
283
|
+
readonly value: Readonly<{
|
|
284
|
+
readonly kind: 'oneOf';
|
|
285
|
+
readonly values: readonly ["default", "on", "off"];
|
|
286
|
+
}>;
|
|
287
|
+
readonly default: "default";
|
|
288
|
+
};
|
|
289
|
+
readonly claude_cache_mode: {
|
|
290
|
+
readonly hosts: 'both';
|
|
291
|
+
readonly project: 'user-only';
|
|
292
|
+
readonly overrides: {
|
|
293
|
+
readonly host: true;
|
|
294
|
+
readonly model: true;
|
|
295
|
+
};
|
|
296
|
+
readonly value: Readonly<{
|
|
297
|
+
readonly kind: 'oneOf';
|
|
298
|
+
readonly values: readonly ["explicit", "automatic", "hybrid"];
|
|
299
|
+
}>;
|
|
300
|
+
readonly default: "explicit";
|
|
301
|
+
};
|
|
302
|
+
readonly cache_keep_enabled: {
|
|
303
|
+
readonly hosts: 'both';
|
|
304
|
+
readonly project: 'user-only';
|
|
305
|
+
readonly overrides: {
|
|
306
|
+
readonly host: true;
|
|
307
|
+
readonly model: true;
|
|
308
|
+
};
|
|
309
|
+
readonly value: Readonly<{
|
|
310
|
+
readonly kind: 'boolean';
|
|
311
|
+
}>;
|
|
312
|
+
readonly default: false;
|
|
313
|
+
};
|
|
314
|
+
readonly cache_keep_always: {
|
|
315
|
+
readonly hosts: 'both';
|
|
316
|
+
readonly project: 'user-only';
|
|
317
|
+
readonly overrides: {
|
|
318
|
+
readonly host: true;
|
|
319
|
+
};
|
|
320
|
+
readonly value: Readonly<{
|
|
321
|
+
readonly kind: 'boolean';
|
|
322
|
+
}>;
|
|
323
|
+
readonly default: false;
|
|
324
|
+
};
|
|
325
|
+
readonly cache_keep_window: {
|
|
326
|
+
readonly hosts: 'both';
|
|
327
|
+
readonly project: 'user-only';
|
|
328
|
+
readonly overrides: {
|
|
329
|
+
readonly host: true;
|
|
330
|
+
};
|
|
331
|
+
readonly value: {
|
|
332
|
+
readonly kind: 'list';
|
|
333
|
+
readonly item: {
|
|
334
|
+
readonly kind: 'object';
|
|
335
|
+
readonly fields: {
|
|
336
|
+
readonly start_hour: Readonly<{
|
|
337
|
+
readonly kind: 'number';
|
|
338
|
+
readonly min: number | undefined;
|
|
339
|
+
readonly max: number | undefined;
|
|
340
|
+
}>;
|
|
341
|
+
readonly end_hour: Readonly<{
|
|
342
|
+
readonly kind: 'number';
|
|
343
|
+
readonly min: number | undefined;
|
|
344
|
+
readonly max: number | undefined;
|
|
345
|
+
}>;
|
|
346
|
+
};
|
|
347
|
+
};
|
|
348
|
+
};
|
|
349
|
+
readonly default: readonly [];
|
|
350
|
+
};
|
|
351
|
+
readonly cache_keep_subagents: {
|
|
352
|
+
readonly hosts: 'both';
|
|
353
|
+
readonly project: 'user-only';
|
|
354
|
+
readonly overrides: {
|
|
355
|
+
readonly host: true;
|
|
356
|
+
};
|
|
357
|
+
readonly value: Readonly<{
|
|
358
|
+
readonly kind: 'boolean';
|
|
359
|
+
}>;
|
|
360
|
+
readonly default: false;
|
|
361
|
+
};
|
|
362
|
+
readonly dump_enabled: {
|
|
363
|
+
readonly hosts: 'both';
|
|
364
|
+
readonly project: 'user-only';
|
|
365
|
+
readonly overrides: {
|
|
366
|
+
readonly host: true;
|
|
367
|
+
};
|
|
368
|
+
readonly value: Readonly<{
|
|
369
|
+
readonly kind: 'boolean';
|
|
370
|
+
}>;
|
|
371
|
+
readonly default: false;
|
|
372
|
+
};
|
|
373
|
+
readonly prime_enabled: {
|
|
374
|
+
readonly hosts: 'both';
|
|
375
|
+
readonly project: 'user-only';
|
|
376
|
+
readonly overrides: {
|
|
377
|
+
readonly host: true;
|
|
378
|
+
};
|
|
379
|
+
readonly value: Readonly<{
|
|
380
|
+
readonly kind: 'boolean';
|
|
381
|
+
}>;
|
|
382
|
+
readonly default: false;
|
|
383
|
+
};
|
|
384
|
+
readonly claude_fast_enabled: {
|
|
385
|
+
readonly hosts: 'both';
|
|
386
|
+
readonly project: 'user-only';
|
|
387
|
+
readonly overrides: {
|
|
388
|
+
readonly host: true;
|
|
389
|
+
readonly model: true;
|
|
390
|
+
};
|
|
391
|
+
readonly value: Readonly<{
|
|
392
|
+
readonly kind: 'boolean';
|
|
393
|
+
}>;
|
|
394
|
+
readonly default: false;
|
|
395
|
+
};
|
|
396
|
+
readonly cost_zeroing_enabled: {
|
|
397
|
+
readonly hosts: 'both';
|
|
398
|
+
readonly project: 'user-only';
|
|
399
|
+
readonly overrides: {
|
|
400
|
+
readonly host: true;
|
|
401
|
+
};
|
|
402
|
+
readonly value: Readonly<{
|
|
403
|
+
readonly kind: 'boolean';
|
|
404
|
+
}>;
|
|
405
|
+
readonly default: true;
|
|
406
|
+
};
|
|
407
|
+
readonly log_level: {
|
|
408
|
+
readonly hosts: 'both';
|
|
409
|
+
readonly project: 'user-only';
|
|
410
|
+
readonly overrides: {
|
|
411
|
+
readonly host: true;
|
|
412
|
+
};
|
|
413
|
+
readonly value: Readonly<{
|
|
414
|
+
readonly kind: 'oneOf';
|
|
415
|
+
readonly values: readonly ["default", "debug", "info", "warn", "error", "trace"];
|
|
416
|
+
}>;
|
|
417
|
+
readonly default: "default";
|
|
418
|
+
};
|
|
419
|
+
readonly thinking_binding_prefix_mismatch_behavior: {
|
|
420
|
+
readonly hosts: 'both';
|
|
421
|
+
readonly project: 'user-only';
|
|
422
|
+
readonly overrides: {
|
|
423
|
+
readonly host: true;
|
|
424
|
+
readonly model: true;
|
|
425
|
+
};
|
|
426
|
+
readonly value: Readonly<{
|
|
427
|
+
readonly kind: 'oneOf';
|
|
428
|
+
readonly values: readonly ["account-default", "error", "drop_block"];
|
|
429
|
+
}>;
|
|
430
|
+
readonly default: "account-default";
|
|
431
|
+
};
|
|
432
|
+
readonly turn_end_note_tools: {
|
|
433
|
+
readonly hosts: 'both';
|
|
434
|
+
readonly project: 'user-only';
|
|
435
|
+
readonly overrides: {
|
|
436
|
+
readonly host: true;
|
|
437
|
+
};
|
|
438
|
+
readonly value: {
|
|
439
|
+
readonly kind: 'list';
|
|
440
|
+
readonly item: Readonly<{
|
|
441
|
+
readonly kind: 'string';
|
|
442
|
+
}>;
|
|
443
|
+
};
|
|
444
|
+
readonly default: readonly ["board", "ctx_reduce"];
|
|
445
|
+
};
|
|
446
|
+
}>;
|
|
447
|
+
export type SettingsKey = keyof typeof settingsDefinition.settings;
|
|
448
|
+
/** Empty: no Pi-specific default is needed beyond per-reader default/on/off handling. */
|
|
449
|
+
export declare const SETTINGS_PI_DIFFERING_FIELDS: readonly [];
|
|
450
|
+
/** Names the current readers whose absence behavior determines each schema default. */
|
|
451
|
+
export declare const SETTINGS_DEFAULT_READERS: {
|
|
452
|
+
readonly routing_mode: 'packages/core/src/routing.ts:getRoutingMode';
|
|
453
|
+
readonly max_same_account_wait: 'packages/core/src/routing.ts:getMaxSameAccountWait';
|
|
454
|
+
readonly fallback_on: 'packages/core/src/accounts.ts:shouldFallbackStatus';
|
|
455
|
+
readonly refresh_enabled: 'packages/opencode/src/index.ts:mainRefreshEnabled';
|
|
456
|
+
readonly refresh_interval_minutes: 'packages/core/src/accounts.ts:getRefreshIntervalMs';
|
|
457
|
+
readonly refresh_refresh_before_expiry_minutes: 'packages/core/src/accounts.ts:getRefreshBeforeExpiryMs';
|
|
458
|
+
readonly quota_enabled: 'packages/core/src/accounts.ts:quotaEnabled';
|
|
459
|
+
readonly quota_check_interval_minutes: 'packages/core/src/accounts.ts:getQuotaCheckIntervalMs';
|
|
460
|
+
readonly quota_refresh_every_n_requests: 'packages/core/src/accounts.ts:getQuotaRefreshEveryNRequests';
|
|
461
|
+
readonly quota_minimum_remaining_five_hour: 'packages/core/src/accounts.ts:getQuotaMinimumRemainingThresholds';
|
|
462
|
+
readonly quota_minimum_remaining_seven_day: 'packages/core/src/accounts.ts:getQuotaMinimumRemainingThresholds';
|
|
463
|
+
readonly quota_minimum_remaining_scoped: 'packages/core/src/accounts.ts:normalizeKillswitchThresholds';
|
|
464
|
+
readonly quota_fail_closed_on_unknown_quota: 'packages/core/src/accounts.ts:failClosedOnUnknownQuota';
|
|
465
|
+
readonly quota_show_toasts: 'packages/opencode/src/index.ts:showQuotaToastFromCache';
|
|
466
|
+
readonly quota_header_feed_enabled: 'packages/opencode/src/index.ts:AnthropicAuthPlugin quotaHeaderFeedRegistry';
|
|
467
|
+
readonly killswitch_enabled: 'packages/core/src/accounts.ts:isKillswitchEnabled';
|
|
468
|
+
readonly killswitch_default_five_hour: 'packages/core/src/accounts.ts:getKillswitchThresholdsForAccount';
|
|
469
|
+
readonly killswitch_default_seven_day: 'packages/core/src/accounts.ts:getKillswitchThresholdsForAccount';
|
|
470
|
+
readonly killswitch_default_scoped: 'packages/core/src/accounts.ts:getKillswitchThresholdsForAccount';
|
|
471
|
+
readonly killswitch_account_floors: 'packages/core/src/accounts.ts:getKillswitchConfig';
|
|
472
|
+
readonly claude_cache_enabled: 'packages/core/src/accounts.ts:isCache1hPersistentlyEnabled';
|
|
473
|
+
readonly claude_cache_mode: 'packages/core/src/accounts.ts:getCache1hPersistentMode';
|
|
474
|
+
readonly cache_keep_enabled: 'packages/core/src/cachekeep.ts:isCacheKeepPersistentlyEnabled';
|
|
475
|
+
readonly cache_keep_always: 'packages/core/src/cachekeep.ts:isCacheKeepAlways';
|
|
476
|
+
readonly cache_keep_window: 'packages/core/src/cachekeep.ts:getCacheKeepWindow';
|
|
477
|
+
readonly cache_keep_subagents: 'packages/core/src/accounts.ts:isCacheKeepSubagentsEnabled';
|
|
478
|
+
readonly dump_enabled: 'packages/core/src/accounts.ts:isDumpPersistentlyEnabled';
|
|
479
|
+
readonly prime_enabled: 'packages/core/src/accounts.ts:isPrimePersistentlyEnabled';
|
|
480
|
+
readonly claude_fast_enabled: 'packages/core/src/accounts.ts:isFastModePersistentlyEnabled';
|
|
481
|
+
readonly cost_zeroing_enabled: 'packages/core/src/accounts.ts:isCostZeroingEnabled';
|
|
482
|
+
readonly log_level: 'packages/core/src/accounts.ts:getPersistedLogLevel';
|
|
483
|
+
readonly thinking_binding_prefix_mismatch_behavior: 'packages/core/src/thinking-binding.ts:getThinkingPrefixMismatchBehavior';
|
|
484
|
+
readonly turn_end_note_tools: 'packages/core/src/turn-end-note.ts:applyTurnEndNotes';
|
|
485
|
+
};
|
|
486
|
+
/** These enum members defer to the existing environment/account inference. */
|
|
487
|
+
export declare const SETTINGS_INFERRED_FIELDS: readonly ["log_level", "thinking_binding_prefix_mismatch_behavior"];
|
|
488
|
+
export declare const SETTINGS_INFER_MEMBERS: {
|
|
489
|
+
readonly log_level: 'default';
|
|
490
|
+
readonly thinking_binding_prefix_mismatch_behavior: 'account-default';
|
|
491
|
+
};
|
|
492
|
+
/** Direct policy reads, enum mappings and host entry points that delegate to shared helpers. */
|
|
493
|
+
export declare const SETTINGS_THREE_WAY_READERS: {
|
|
494
|
+
readonly claude_cache_enabled: readonly [{
|
|
495
|
+
readonly path: 'packages/core/src/accounts.ts';
|
|
496
|
+
readonly reader: 'isCache1hPersistentlyEnabled';
|
|
497
|
+
readonly absent: false;
|
|
498
|
+
}, {
|
|
499
|
+
readonly path: 'packages/core/src/cachekeep.ts';
|
|
500
|
+
readonly reader: 'isCacheKeepHybridActive';
|
|
501
|
+
readonly absent: false;
|
|
502
|
+
}, {
|
|
503
|
+
readonly path: 'packages/opencode/src/index.ts';
|
|
504
|
+
readonly reader: 'AnthropicAuthPlugin (persistent cache latch via isCache1hPersistentlyEnabled)';
|
|
505
|
+
readonly absent: false;
|
|
506
|
+
}, {
|
|
507
|
+
readonly path: 'packages/opencode/src/v2/wire.ts';
|
|
508
|
+
readonly reader: 'createNativeWirePolicy transformOptions';
|
|
509
|
+
readonly absent: true;
|
|
510
|
+
}, {
|
|
511
|
+
readonly path: 'packages/pi/src/stream.ts';
|
|
512
|
+
readonly reader: 'sendAnthropicRequest (via isCache1hPersistentlyEnabled)';
|
|
513
|
+
readonly absent: false;
|
|
514
|
+
}, {
|
|
515
|
+
readonly path: 'packages/pi/src/native-commands.ts';
|
|
516
|
+
readonly reader: 'createPiNativeCommands status cache (via isCache1hPersistentlyEnabled)';
|
|
517
|
+
readonly absent: false;
|
|
518
|
+
}];
|
|
519
|
+
readonly quota_enabled: readonly [{
|
|
520
|
+
readonly path: 'packages/core/src/accounts.ts';
|
|
521
|
+
readonly reader: 'quotaEnabled';
|
|
522
|
+
readonly absent: true;
|
|
523
|
+
}, {
|
|
524
|
+
readonly path: 'packages/core/src/accounts.ts';
|
|
525
|
+
readonly reader: 'quotaSnapshotPassesPolicy (via quotaEnabled)';
|
|
526
|
+
readonly absent: true;
|
|
527
|
+
}, {
|
|
528
|
+
readonly path: 'packages/core/src/accounts.ts';
|
|
529
|
+
readonly reader: 'quotaRefusalTiming (via quotaEnabled)';
|
|
530
|
+
readonly absent: true;
|
|
531
|
+
}, {
|
|
532
|
+
readonly path: 'packages/core/src/accounts.ts';
|
|
533
|
+
readonly reader: 'getQuotaNextRefreshAt (via quotaEnabled)';
|
|
534
|
+
readonly absent: true;
|
|
535
|
+
}, {
|
|
536
|
+
readonly path: 'packages/opencode/src/index.ts';
|
|
537
|
+
readonly reader: 'mainProviderQuotaRestriction';
|
|
538
|
+
readonly absent: true;
|
|
539
|
+
}, {
|
|
540
|
+
readonly path: 'packages/opencode/src/index.ts';
|
|
541
|
+
readonly reader: 'pollFallbackQuotas';
|
|
542
|
+
readonly absent: true;
|
|
543
|
+
}, {
|
|
544
|
+
readonly path: 'packages/opencode/src/index.ts';
|
|
545
|
+
readonly reader: 'scheduleSidebarMainQuotaRefresh';
|
|
546
|
+
readonly absent: false;
|
|
547
|
+
}, {
|
|
548
|
+
readonly path: 'packages/opencode/src/index.ts';
|
|
549
|
+
readonly reader: 'mainQuotaRoutingEnabled';
|
|
550
|
+
readonly absent: false;
|
|
551
|
+
}, {
|
|
552
|
+
readonly path: 'packages/opencode/src/v2/source.ts';
|
|
553
|
+
readonly reader: 'createNativeAnthropicSource chooseAccount';
|
|
554
|
+
readonly absent: true;
|
|
555
|
+
}, {
|
|
556
|
+
readonly path: 'packages/opencode/src/v2/lifecycle.ts';
|
|
557
|
+
readonly reader: 'startNativeAnthropicLifecycle run';
|
|
558
|
+
readonly absent: true;
|
|
559
|
+
}, {
|
|
560
|
+
readonly path: 'packages/pi/src/native.ts';
|
|
561
|
+
readonly reader: 'requestPolicy (via quotaSnapshotPassesPolicy)';
|
|
562
|
+
readonly absent: true;
|
|
563
|
+
}, {
|
|
564
|
+
readonly path: 'packages/pi/src/stream.ts';
|
|
565
|
+
readonly reader: 'getPiRoutingServices getUsableFallbackAccounts (via quotaSnapshotPassesPolicy)';
|
|
566
|
+
readonly absent: true;
|
|
567
|
+
}];
|
|
568
|
+
readonly quota_fail_closed_on_unknown_quota: readonly [{
|
|
569
|
+
readonly path: 'packages/core/src/settings-protection-legacy.ts';
|
|
570
|
+
readonly reader: 'legacySettingsProtection';
|
|
571
|
+
readonly kind: 'mapping';
|
|
572
|
+
readonly absent: 'default';
|
|
573
|
+
}, {
|
|
574
|
+
readonly path: 'packages/core/src/accounts.ts';
|
|
575
|
+
readonly reader: 'failClosedOnUnknownQuota';
|
|
576
|
+
readonly absent: true;
|
|
577
|
+
}, {
|
|
578
|
+
readonly path: 'packages/core/src/accounts.ts';
|
|
579
|
+
readonly reader: 'quotaSnapshotPassesPolicy (via failClosedOnUnknownQuota)';
|
|
580
|
+
readonly absent: true;
|
|
581
|
+
}, {
|
|
582
|
+
readonly path: 'packages/core/src/accounts.ts';
|
|
583
|
+
readonly reader: 'killswitchPassesPolicy (via failClosedOnUnknownQuota)';
|
|
584
|
+
readonly absent: true;
|
|
585
|
+
}, {
|
|
586
|
+
readonly path: 'packages/opencode/src/index.ts';
|
|
587
|
+
readonly reader: 'getRoutableFallbackAccounts';
|
|
588
|
+
readonly absent: false;
|
|
589
|
+
}, {
|
|
590
|
+
readonly path: 'packages/opencode/src/index.ts';
|
|
591
|
+
readonly reader: 'AnthropicAuthPlugin authTransport.fetch main quota backoff check';
|
|
592
|
+
readonly absent: false;
|
|
593
|
+
}];
|
|
594
|
+
};
|
|
595
|
+
export declare function malformedSettingsText(file: string): string;
|
|
596
|
+
export declare function refusedSettingsWriteText(key: SettingsKey, file: string): string;
|
|
597
|
+
export declare function refusedSettingsRecreationText(file: string): string;
|
|
598
|
+
export declare function invalidSettingsWriteText(key: SettingsKey, file: string): string;
|
|
599
|
+
/** Only fixed, local text is shown; dependency errors can contain file contents. */
|
|
600
|
+
export declare const SETTINGS_WRITE_FAILURES: {
|
|
601
|
+
readonly 'settings-unparseable': {
|
|
602
|
+
readonly outcome: 'refused';
|
|
603
|
+
readonly text: typeof malformedSettingsText;
|
|
604
|
+
};
|
|
605
|
+
readonly 'settings-newer-version': {
|
|
606
|
+
readonly outcome: 'refused';
|
|
607
|
+
readonly text: (file: string) => string;
|
|
608
|
+
};
|
|
609
|
+
readonly 'settings-invalid-value': {
|
|
610
|
+
readonly outcome: 'refused';
|
|
611
|
+
readonly text: (file: string) => string;
|
|
612
|
+
};
|
|
613
|
+
readonly 'settings-busy': {
|
|
614
|
+
readonly outcome: 'failed';
|
|
615
|
+
readonly text: (file: string) => string;
|
|
616
|
+
};
|
|
617
|
+
readonly 'settings-unavailable': {
|
|
618
|
+
readonly outcome: 'failed';
|
|
619
|
+
readonly text: (file: string) => string;
|
|
620
|
+
};
|
|
621
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type OwnerOnlyOptions } from './owner-only.ts';
|
|
2
|
+
import { type PathResolutionOptions } from './path-options.ts';
|
|
3
|
+
import type { SettingsPaths } from './settings-paths.ts';
|
|
4
|
+
export type SettingsMode = 'separate' | 'user-file' | 'legacy';
|
|
5
|
+
/** Injectable filesystem operations for authority checks and marker publication. */
|
|
6
|
+
export interface SettingsModeFs {
|
|
7
|
+
exists(path: string): Promise<boolean>;
|
|
8
|
+
mkdir(path: string): Promise<void>;
|
|
9
|
+
writeMarker(path: string, bytes: Uint8Array): Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
export interface SettingsModeOptions extends PathResolutionOptions {
|
|
12
|
+
fs?: Partial<SettingsModeFs>;
|
|
13
|
+
ownership?: OwnerOnlyOptions;
|
|
14
|
+
now?: () => number;
|
|
15
|
+
moveCompleted?: boolean;
|
|
16
|
+
}
|
|
17
|
+
/** Only existence confers authority; informational move notes are never read. */
|
|
18
|
+
export declare function hasSettingsMoveMarker(target: string, options?: SettingsModeOptions): Promise<boolean>;
|
|
19
|
+
/** Publish once after a completed move or a usable hand-made file is found. */
|
|
20
|
+
export declare function writeSettingsMoveMarker(target: string, options?: SettingsModeOptions): Promise<void>;
|
|
21
|
+
/** Startup/menu/watch/timer work only: request readers consume the cached mode. */
|
|
22
|
+
export declare function resolveSettingsMode(paths: Pick<SettingsPaths, 'target' | 'separate'>, options?: SettingsModeOptions): Promise<SettingsMode>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { type HolderEntry, type HolderFileContents, type HolderLiveness, type NativeHolderRegistration } from './holder-registry.ts';
|
|
2
|
+
import { type FenceBlocker, type PreNArtifactLocations } from './layout-fence.ts';
|
|
3
|
+
import { type PathResolutionOptions } from './path-options.ts';
|
|
4
|
+
/** The first release that serves settings from the shared user file. */
|
|
5
|
+
export declare const SETTINGS_MOVE_FIRST_RELEASE = "2.12.0";
|
|
6
|
+
export type SettingsMoveFenceBlocker = {
|
|
7
|
+
kind: 'registration';
|
|
8
|
+
reason: string;
|
|
9
|
+
} | {
|
|
10
|
+
kind: 'floor';
|
|
11
|
+
release: string;
|
|
12
|
+
} | {
|
|
13
|
+
kind: 'settings-holder';
|
|
14
|
+
holderFile: string;
|
|
15
|
+
pid: number | null;
|
|
16
|
+
release: string | null;
|
|
17
|
+
reason: 'unreadable' | 'release';
|
|
18
|
+
} | Extract<FenceBlocker, {
|
|
19
|
+
kind: 'holder-file' | 'pre-n-artifact' | 'artifact-scan';
|
|
20
|
+
}>;
|
|
21
|
+
export interface SettingsMoveFenceOptions extends PathResolutionOptions {
|
|
22
|
+
/** Every settings store the move will read, including overridden stores. */
|
|
23
|
+
stores: readonly string[];
|
|
24
|
+
/** A failed or still-pending registration prevents only this settings move. */
|
|
25
|
+
registration: Pick<NativeHolderRegistration, 'status'> | undefined;
|
|
26
|
+
floor?: string;
|
|
27
|
+
self?: Pick<HolderEntry, 'pid' | 'incarnation'>;
|
|
28
|
+
liveness?: HolderLiveness;
|
|
29
|
+
artifacts?: PreNArtifactLocations;
|
|
30
|
+
/** Tests inject holder sets without consulting the installed package release. */
|
|
31
|
+
readHolders?: (path: string) => Promise<HolderFileContents | undefined>;
|
|
32
|
+
}
|
|
33
|
+
/** Check both hosts' standard holder folders as well as every move source's folder. */
|
|
34
|
+
export declare function settingsMoveHolderFiles(options: PathResolutionOptions & {
|
|
35
|
+
stores: readonly string[];
|
|
36
|
+
}): Promise<string[]>;
|
|
37
|
+
/**
|
|
38
|
+
* A closed fence is not a startup refusal: the caller keeps serving legacy settings.
|
|
39
|
+
* Any older live holder blocks, even when its file list shares no path with a move source.
|
|
40
|
+
*/
|
|
41
|
+
export declare function checkSettingsMoveFence(options: SettingsMoveFenceOptions): Promise<{
|
|
42
|
+
open: boolean;
|
|
43
|
+
blockers: SettingsMoveFenceBlocker[];
|
|
44
|
+
}>;
|