@cortexkit/opencode-openai-auth 1.14.1 → 1.15.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.
- package/dist/bin.js +9 -9
- package/dist/{codex-request-Cl6zEfsR.d.ts → codex-request-DYqSE0ti.d.ts} +373 -2
- package/dist/{index-wma2ggn9.js → index-14x5shtc.js} +2 -2
- package/dist/index-1wcg7g9d.js +2 -0
- package/dist/index-50p400eg.js +8 -0
- package/dist/index-98q3mydm.js +64 -0
- package/dist/{index-yygzbxjk.js → index-bhkycxbm.js} +1 -1
- package/dist/{index-k5av4j8p.js → index-dzpjz8hv.js} +2 -2
- package/dist/{index-cxnrd85v.js → index-f7kmsdfk.js} +1 -1
- package/dist/{index-z9cj13z7.js → index-hnfqppx9.js} +1 -1
- package/dist/{index-2f330s35.js → index-m8m7rakq.js} +2 -2
- package/dist/index-mjsmvmt4.js +76 -0
- package/dist/{index-gkye2xh1.js → index-s8ghhc9z.js} +2 -2
- package/dist/{index-94b345dw.js → index-t65axpta.js} +1 -1
- package/dist/index-xjtbg7sx.js +101 -0
- package/dist/index.d.ts +1 -372
- package/dist/index.js +1 -1
- package/dist/openai-auth.schema.json +400 -0
- package/dist/rpc/port-file.js +1 -1
- package/dist/rpc/protocol.js +1 -1
- package/dist/rpc/rpc-client.js +1 -1
- package/dist/rpc/rpc-dir.js +1 -1
- package/dist/sidebar-state.js +1 -1
- package/dist/{token-sgwxn4xg.js → token-j34j1zhm.js} +1 -1
- package/dist/token-util-bf619nmg.js +1 -0
- package/dist/tui-preferences.js +3 -3
- package/dist/v2/server.d.ts +1 -1
- package/dist/v2/server.js +2 -2
- package/package.json +3 -3
- package/src/tui-compiled/raw/logger.js +8 -1
- package/src/tui-compiled/raw/shared/061e741c052de9c1-paths.js +48 -0
- package/src/tui-compiled/raw/shared/0766d78c6f481f18-watcher.js +41 -18
- package/src/tui-compiled/raw/shared/23300c068d0b2ffc-parse.js +65 -0
- package/src/tui-compiled/raw/shared/3000be4f79f20eb6-write.js +88 -0
- package/src/tui-compiled/raw/shared/44449e891fab9fbc-edit.js +229 -0
- package/src/tui-compiled/raw/shared/4825e03209d6ae3e-with-lock.js +1 -1
- package/src/tui-compiled/raw/shared/5803fadb30af0ec0-descriptors.js +81 -0
- package/src/tui-compiled/raw/shared/58bc35a3cd459085-define.js +52 -0
- package/src/tui-compiled/raw/shared/5f4bc45522ab9bc6-update.js +139 -0
- package/src/tui-compiled/raw/shared/6948d70969aa7a55-fs.js +19 -0
- package/src/tui-compiled/raw/shared/754d6017f8e419cf-builtins.js +28 -12
- package/src/tui-compiled/raw/shared/81758f9fe7c2a576-handle.js +228 -0
- package/src/tui-compiled/raw/shared/87f6e22d4fc34918-resolve.js +51 -0
- package/src/tui-compiled/raw/shared/8a18abe4fa2977c8-menu.js +1 -0
- package/src/tui-compiled/raw/shared/8ab1f5794e677151-move.js +351 -0
- package/src/tui-compiled/raw/shared/92e38944b51b2405-file-read-cache.js +9 -5
- package/src/tui-compiled/raw/shared/9865a4fa45882c6f-settings-decisions.js +13 -0
- package/src/tui-compiled/raw/shared/cc0f2d1963547799-index.js +7 -0
- package/src/tui-compiled/raw/shared/dbc61cd405941828-accounts.js +48 -5
- package/src/tui-compiled/raw/shared/e0ed4a490e4eaa4f-schema.js +81 -0
- package/src/tui-compiled/raw/shared/e8cd4929507508d8-refresh-file-lock.js +146 -2
- package/src/tui-compiled/raw/shared/eac0bed49f3d4110-lock-errors.js +15 -0
- package/src/tui-compiled/raw/shared/facfd8afc431d68a-refusal.js +15 -0
- package/src/tui-compiled/raw/shared/fc7db0c5aa764565-settings-install.js +85 -0
- package/src/tui-compiled/raw/shared/fcd26e77bc538838-snapshot.js +150 -0
- package/src/tui-compiled/runtime/logger.js +8 -1
- package/src/tui-compiled/runtime/shared/061e741c052de9c1-paths.js +48 -0
- package/src/tui-compiled/runtime/shared/0766d78c6f481f18-watcher.js +41 -18
- package/src/tui-compiled/runtime/shared/23300c068d0b2ffc-parse.js +65 -0
- package/src/tui-compiled/runtime/shared/3000be4f79f20eb6-write.js +88 -0
- package/src/tui-compiled/runtime/shared/44449e891fab9fbc-edit.js +229 -0
- package/src/tui-compiled/runtime/shared/4825e03209d6ae3e-with-lock.js +1 -1
- package/src/tui-compiled/runtime/shared/5803fadb30af0ec0-descriptors.js +81 -0
- package/src/tui-compiled/runtime/shared/58bc35a3cd459085-define.js +52 -0
- package/src/tui-compiled/runtime/shared/5f4bc45522ab9bc6-update.js +139 -0
- package/src/tui-compiled/runtime/shared/6948d70969aa7a55-fs.js +19 -0
- package/src/tui-compiled/runtime/shared/754d6017f8e419cf-builtins.js +28 -12
- package/src/tui-compiled/runtime/shared/81758f9fe7c2a576-handle.js +228 -0
- package/src/tui-compiled/runtime/shared/87f6e22d4fc34918-resolve.js +51 -0
- package/src/tui-compiled/runtime/shared/8a18abe4fa2977c8-menu.js +1 -0
- package/src/tui-compiled/runtime/shared/8ab1f5794e677151-move.js +351 -0
- package/src/tui-compiled/runtime/shared/92e38944b51b2405-file-read-cache.js +9 -5
- package/src/tui-compiled/runtime/shared/9865a4fa45882c6f-settings-decisions.js +13 -0
- package/src/tui-compiled/runtime/shared/cc0f2d1963547799-index.js +7 -0
- package/src/tui-compiled/runtime/shared/dbc61cd405941828-accounts.js +48 -5
- package/src/tui-compiled/runtime/shared/e0ed4a490e4eaa4f-schema.js +81 -0
- package/src/tui-compiled/runtime/shared/e8cd4929507508d8-refresh-file-lock.js +146 -2
- package/src/tui-compiled/runtime/shared/eac0bed49f3d4110-lock-errors.js +15 -0
- package/src/tui-compiled/runtime/shared/facfd8afc431d68a-refusal.js +15 -0
- package/src/tui-compiled/runtime/shared/fc7db0c5aa764565-settings-install.js +85 -0
- package/src/tui-compiled/runtime/shared/fcd26e77bc538838-snapshot.js +150 -0
- package/dist/index-3mbw88h7.js +0 -91
- package/dist/index-999nwa9p.js +0 -76
- package/dist/index-pc4vrrex.js +0 -2
- package/dist/index-snq7bwr6.js +0 -8
- package/dist/index-xk7f1aef.js +0 -64
- package/dist/token-util-8mrnmkge.js +0 -1
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"type": "object",
|
|
4
|
+
"properties": {
|
|
5
|
+
"schema_version": {
|
|
6
|
+
"type": "integer",
|
|
7
|
+
"minimum": 1
|
|
8
|
+
},
|
|
9
|
+
"$schema": {
|
|
10
|
+
"type": "string"
|
|
11
|
+
},
|
|
12
|
+
"routing_mode": {
|
|
13
|
+
"anyOf": [
|
|
14
|
+
{
|
|
15
|
+
"enum": ["ordered", "main-first", "fallback-first", "sticky-balanced"]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "object",
|
|
19
|
+
"properties": {
|
|
20
|
+
"default": {
|
|
21
|
+
"enum": [
|
|
22
|
+
"ordered",
|
|
23
|
+
"main-first",
|
|
24
|
+
"fallback-first",
|
|
25
|
+
"sticky-balanced"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
"opencode": {
|
|
29
|
+
"enum": [
|
|
30
|
+
"ordered",
|
|
31
|
+
"main-first",
|
|
32
|
+
"fallback-first",
|
|
33
|
+
"sticky-balanced"
|
|
34
|
+
]
|
|
35
|
+
},
|
|
36
|
+
"pi": {
|
|
37
|
+
"enum": [
|
|
38
|
+
"ordered",
|
|
39
|
+
"main-first",
|
|
40
|
+
"fallback-first",
|
|
41
|
+
"sticky-balanced"
|
|
42
|
+
]
|
|
43
|
+
}
|
|
44
|
+
},
|
|
45
|
+
"additionalProperties": false
|
|
46
|
+
}
|
|
47
|
+
]
|
|
48
|
+
},
|
|
49
|
+
"max_same_account_wait": {
|
|
50
|
+
"anyOf": [
|
|
51
|
+
{
|
|
52
|
+
"enum": ["off", "15m", "cache"]
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"type": "object",
|
|
56
|
+
"properties": {
|
|
57
|
+
"default": {
|
|
58
|
+
"enum": ["off", "15m", "cache"]
|
|
59
|
+
},
|
|
60
|
+
"opencode": {
|
|
61
|
+
"enum": ["off", "15m", "cache"]
|
|
62
|
+
},
|
|
63
|
+
"pi": {
|
|
64
|
+
"enum": ["off", "15m", "cache"]
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"additionalProperties": false
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"fallback_on": {
|
|
72
|
+
"anyOf": [
|
|
73
|
+
{
|
|
74
|
+
"type": "array",
|
|
75
|
+
"items": {
|
|
76
|
+
"type": "integer"
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"type": "object",
|
|
81
|
+
"properties": {
|
|
82
|
+
"default": {
|
|
83
|
+
"type": "array",
|
|
84
|
+
"items": {
|
|
85
|
+
"type": "integer"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
"opencode": {
|
|
89
|
+
"type": "array",
|
|
90
|
+
"items": {
|
|
91
|
+
"type": "integer"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
"pi": {
|
|
95
|
+
"type": "array",
|
|
96
|
+
"items": {
|
|
97
|
+
"type": "integer"
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"additionalProperties": false
|
|
102
|
+
}
|
|
103
|
+
]
|
|
104
|
+
},
|
|
105
|
+
"refresh_enabled": {
|
|
106
|
+
"type": "boolean"
|
|
107
|
+
},
|
|
108
|
+
"refresh_before_expiry_minutes": {
|
|
109
|
+
"anyOf": [
|
|
110
|
+
{
|
|
111
|
+
"type": "number"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"type": "object",
|
|
115
|
+
"properties": {
|
|
116
|
+
"default": {
|
|
117
|
+
"type": "number"
|
|
118
|
+
},
|
|
119
|
+
"opencode": {
|
|
120
|
+
"type": "number"
|
|
121
|
+
},
|
|
122
|
+
"pi": {
|
|
123
|
+
"type": "number"
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
"additionalProperties": false
|
|
127
|
+
}
|
|
128
|
+
]
|
|
129
|
+
},
|
|
130
|
+
"quota_enabled": {
|
|
131
|
+
"anyOf": [
|
|
132
|
+
{
|
|
133
|
+
"type": "boolean"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"type": "object",
|
|
137
|
+
"properties": {
|
|
138
|
+
"default": {
|
|
139
|
+
"type": "boolean"
|
|
140
|
+
},
|
|
141
|
+
"opencode": {
|
|
142
|
+
"type": "boolean"
|
|
143
|
+
},
|
|
144
|
+
"pi": {
|
|
145
|
+
"type": "boolean"
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
"additionalProperties": false
|
|
149
|
+
}
|
|
150
|
+
]
|
|
151
|
+
},
|
|
152
|
+
"quota_check_interval_minutes": {
|
|
153
|
+
"type": "number",
|
|
154
|
+
"minimum": 1
|
|
155
|
+
},
|
|
156
|
+
"quota_minimum_remaining": {
|
|
157
|
+
"anyOf": [
|
|
158
|
+
{
|
|
159
|
+
"type": "array",
|
|
160
|
+
"items": {
|
|
161
|
+
"type": "object",
|
|
162
|
+
"properties": {
|
|
163
|
+
"window": {
|
|
164
|
+
"enum": ["primary", "secondary"]
|
|
165
|
+
},
|
|
166
|
+
"floor": {
|
|
167
|
+
"type": "number"
|
|
168
|
+
}
|
|
169
|
+
},
|
|
170
|
+
"additionalProperties": false,
|
|
171
|
+
"required": ["window", "floor"]
|
|
172
|
+
}
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"type": "object",
|
|
176
|
+
"properties": {
|
|
177
|
+
"default": {
|
|
178
|
+
"type": "array",
|
|
179
|
+
"items": {
|
|
180
|
+
"type": "object",
|
|
181
|
+
"properties": {
|
|
182
|
+
"window": {
|
|
183
|
+
"enum": ["primary", "secondary"]
|
|
184
|
+
},
|
|
185
|
+
"floor": {
|
|
186
|
+
"type": "number"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
"additionalProperties": false,
|
|
190
|
+
"required": ["window", "floor"]
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"opencode": {
|
|
194
|
+
"type": "array",
|
|
195
|
+
"items": {
|
|
196
|
+
"type": "object",
|
|
197
|
+
"properties": {
|
|
198
|
+
"window": {
|
|
199
|
+
"enum": ["primary", "secondary"]
|
|
200
|
+
},
|
|
201
|
+
"floor": {
|
|
202
|
+
"type": "number"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
"additionalProperties": false,
|
|
206
|
+
"required": ["window", "floor"]
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"pi": {
|
|
210
|
+
"type": "array",
|
|
211
|
+
"items": {
|
|
212
|
+
"type": "object",
|
|
213
|
+
"properties": {
|
|
214
|
+
"window": {
|
|
215
|
+
"enum": ["primary", "secondary"]
|
|
216
|
+
},
|
|
217
|
+
"floor": {
|
|
218
|
+
"type": "number"
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"additionalProperties": false,
|
|
222
|
+
"required": ["window", "floor"]
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
"additionalProperties": false
|
|
227
|
+
}
|
|
228
|
+
]
|
|
229
|
+
},
|
|
230
|
+
"quota_fail_closed_on_unknown": {
|
|
231
|
+
"anyOf": [
|
|
232
|
+
{
|
|
233
|
+
"type": "boolean"
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
"type": "object",
|
|
237
|
+
"properties": {
|
|
238
|
+
"default": {
|
|
239
|
+
"type": "boolean"
|
|
240
|
+
},
|
|
241
|
+
"opencode": {
|
|
242
|
+
"type": "boolean"
|
|
243
|
+
},
|
|
244
|
+
"pi": {
|
|
245
|
+
"type": "boolean"
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"additionalProperties": false
|
|
249
|
+
}
|
|
250
|
+
]
|
|
251
|
+
},
|
|
252
|
+
"cost_zeroing": {
|
|
253
|
+
"type": "boolean"
|
|
254
|
+
},
|
|
255
|
+
"killswitch_enabled": {
|
|
256
|
+
"anyOf": [
|
|
257
|
+
{
|
|
258
|
+
"type": "boolean"
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
"type": "object",
|
|
262
|
+
"properties": {
|
|
263
|
+
"default": {
|
|
264
|
+
"type": "boolean"
|
|
265
|
+
},
|
|
266
|
+
"opencode": {
|
|
267
|
+
"type": "boolean"
|
|
268
|
+
},
|
|
269
|
+
"pi": {
|
|
270
|
+
"type": "boolean"
|
|
271
|
+
}
|
|
272
|
+
},
|
|
273
|
+
"additionalProperties": false
|
|
274
|
+
}
|
|
275
|
+
]
|
|
276
|
+
},
|
|
277
|
+
"killswitch_default_primary": {
|
|
278
|
+
"anyOf": [
|
|
279
|
+
{
|
|
280
|
+
"type": "number"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"type": "object",
|
|
284
|
+
"properties": {
|
|
285
|
+
"default": {
|
|
286
|
+
"type": "number"
|
|
287
|
+
},
|
|
288
|
+
"opencode": {
|
|
289
|
+
"type": "number"
|
|
290
|
+
},
|
|
291
|
+
"pi": {
|
|
292
|
+
"type": "number"
|
|
293
|
+
}
|
|
294
|
+
},
|
|
295
|
+
"additionalProperties": false
|
|
296
|
+
}
|
|
297
|
+
]
|
|
298
|
+
},
|
|
299
|
+
"killswitch_default_secondary": {
|
|
300
|
+
"anyOf": [
|
|
301
|
+
{
|
|
302
|
+
"type": "number"
|
|
303
|
+
},
|
|
304
|
+
{
|
|
305
|
+
"type": "object",
|
|
306
|
+
"properties": {
|
|
307
|
+
"default": {
|
|
308
|
+
"type": "number"
|
|
309
|
+
},
|
|
310
|
+
"opencode": {
|
|
311
|
+
"type": "number"
|
|
312
|
+
},
|
|
313
|
+
"pi": {
|
|
314
|
+
"type": "number"
|
|
315
|
+
}
|
|
316
|
+
},
|
|
317
|
+
"additionalProperties": false
|
|
318
|
+
}
|
|
319
|
+
]
|
|
320
|
+
},
|
|
321
|
+
"killswitch_account_floors": {
|
|
322
|
+
"type": "array",
|
|
323
|
+
"items": {
|
|
324
|
+
"type": "object",
|
|
325
|
+
"properties": {
|
|
326
|
+
"account": {
|
|
327
|
+
"type": "string"
|
|
328
|
+
},
|
|
329
|
+
"host": {
|
|
330
|
+
"enum": ["opencode", "pi", "both"]
|
|
331
|
+
},
|
|
332
|
+
"primary": {
|
|
333
|
+
"type": "number"
|
|
334
|
+
},
|
|
335
|
+
"secondary": {
|
|
336
|
+
"type": "number"
|
|
337
|
+
}
|
|
338
|
+
},
|
|
339
|
+
"additionalProperties": false,
|
|
340
|
+
"required": ["account", "host", "primary", "secondary"]
|
|
341
|
+
}
|
|
342
|
+
},
|
|
343
|
+
"cache_keep_enabled": {
|
|
344
|
+
"type": "boolean"
|
|
345
|
+
},
|
|
346
|
+
"cache_keep_subagents": {
|
|
347
|
+
"type": "boolean"
|
|
348
|
+
},
|
|
349
|
+
"cache_keep_sustain": {
|
|
350
|
+
"type": "boolean"
|
|
351
|
+
},
|
|
352
|
+
"cache_keep_window": {
|
|
353
|
+
"type": "array",
|
|
354
|
+
"items": {
|
|
355
|
+
"type": "object",
|
|
356
|
+
"properties": {
|
|
357
|
+
"start_hour": {
|
|
358
|
+
"type": "integer",
|
|
359
|
+
"minimum": 0,
|
|
360
|
+
"maximum": 23
|
|
361
|
+
},
|
|
362
|
+
"end_hour": {
|
|
363
|
+
"type": "integer",
|
|
364
|
+
"minimum": 0,
|
|
365
|
+
"maximum": 23
|
|
366
|
+
}
|
|
367
|
+
},
|
|
368
|
+
"additionalProperties": false,
|
|
369
|
+
"required": ["start_hour", "end_hour"]
|
|
370
|
+
}
|
|
371
|
+
},
|
|
372
|
+
"log_level": {
|
|
373
|
+
"enum": ["error", "warn", "info", "debug", "trace", "default"]
|
|
374
|
+
},
|
|
375
|
+
"request_dumps": {
|
|
376
|
+
"type": "boolean"
|
|
377
|
+
},
|
|
378
|
+
"dump_dir": {
|
|
379
|
+
"type": "string"
|
|
380
|
+
},
|
|
381
|
+
"dump_max_bytes": {
|
|
382
|
+
"type": "integer",
|
|
383
|
+
"minimum": 0,
|
|
384
|
+
"maximum": 9007199254740991
|
|
385
|
+
},
|
|
386
|
+
"web_sockets": {
|
|
387
|
+
"type": "boolean"
|
|
388
|
+
},
|
|
389
|
+
"raw_web_socket": {
|
|
390
|
+
"type": "boolean"
|
|
391
|
+
},
|
|
392
|
+
"responses_lite": {
|
|
393
|
+
"type": "boolean"
|
|
394
|
+
},
|
|
395
|
+
"codex_api_endpoint": {
|
|
396
|
+
"type": "string"
|
|
397
|
+
}
|
|
398
|
+
},
|
|
399
|
+
"additionalProperties": false
|
|
400
|
+
}
|
package/dist/rpc/port-file.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{lg as b,mg as c}from"../index-s8ghhc9z.js";import{qg as a}from"../index-14x5shtc.js";import"../index-m8m7rakq.js";import"../index-t65axpta.js";import"../index-f7kmsdfk.js";export{b as writePortFile,c as isOpenaiRpcStateDir,a as discoverPortFile};
|
package/dist/rpc/protocol.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Eg as b}from"../index-1wcg7g9d.js";import"../index-m8m7rakq.js";import"../index-f7kmsdfk.js";export{b as isNotifyPayload};
|
package/dist/rpc/rpc-client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{rg as F,sg as f}from"../index-14x5shtc.js";import"../index-m8m7rakq.js";import"../index-f7kmsdfk.js";function y(r,s,v){return f(r,s,v)}export{y as createRpcClient,F as DEFAULT_RPC_TIMEOUT_MS};
|
package/dist/rpc/rpc-dir.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Sg as a,Tg as b,Ug as c,Vg as d}from"../index-t65axpta.js";import"../index-f7kmsdfk.js";export{a as tmpdir,d as resolveRpcDir,c as getRpcDir,b as RPC_DIRECTORY_PREFIX};
|
package/dist/sidebar-state.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$c as
|
|
1
|
+
import{$c as w,Fc as a,Gc as b,Hc as c,Ic as d,Jc as e,Kc as f,Lc as g,Mc as h,Nc as i,Oc as j,Pc as k,Qc as l,Rc as m,Sc as n,Tc as o,Uc as p,Vc as q,Wc as r,Xc as s,Yc as t,Zc as u,_c as v,ad as x,bd as y,cd as z,dd as A,ed as B,fd as C,gd as D,hd as E,id as F,jd as G,kd as H,ld as I,md as J,nd as K,od as L,pd as M,qd as N,rd as O,sd as P,td as Q,ud as R,vd as S,wd as T}from"./index-dzpjz8hv.js";import"./index-xjtbg7sx.js";import"./index-50p400eg.js";import"./index-1wcg7g9d.js";import"./index-m8m7rakq.js";import"./index-f7kmsdfk.js";export{y as upsertSidebarActiveRouting,p as spendControlExhaustedResetAt,O as sidebarQuotaProjection,I as settleWithinBudget,w as setSidebarState,x as setSidebarMachineState,z as setSidebarLegacyRouting,e as setLegacySidebarStateFileForTest,C as resolveSidebarStickyAssignment,s as resolveSessionStickyAccount,t as resolveSessionSidebarRouting,N as resolveActiveAccount,A as removeSidebarActiveRouting,K as rememberStickyPin,v as pruneStickyAssignments,u as pruneActiveRouting,D as planSidebarStickyAssignmentFromSnapshot,B as planSidebarStickyAssignment,E as persistSidebarStickyAssignment,k as normalizeSidebarState,o as isUsableRoutingEntry,r as isQuotaExhausted,h as hashSidebarSessionId,i as getSidebarStateFile,l as getSidebarState,d as getPresentQuotaWindows,P as getCollapsedQuotaSummary,Q as getCollapsedAccountLines,c as formatWindowLabel,S as fitCollapsedLabel,q as exhaustedQuotaResetAt,G as drainSidebarWrites,R as displayWidth,J as createSidebarStateCache,M as createSidebarBookkeepingQueue,T as computeQuotaPacing,F as clearSidebarStickyAssignment,L as applyStickyPinOverlay,b as accountServesOnCredits,a as accountCreditsText,g as STICKY_ASSIGNMENT_MAX_ENTRIES,f as STICKY_ASSIGNMENT_MAX_AGE_MS,H as HOT_PATH_READ_BUDGET_MS,j as DEFAULT_SIDEBAR_STATE,n as ACTIVE_ROUTING_MAX_ENTRIES,m as ACTIVE_ROUTING_MAX_AGE_MS};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as U,b as V}from"./index-
|
|
1
|
+
import{a as U,b as V}from"./index-hnfqppx9.js";import{Wg as R}from"./index-f7kmsdfk.js";var E=R((M,Q)=>{var{defineProperty:H,getOwnPropertyDescriptor:W,getOwnPropertyNames:X}=Object,Y=Object.prototype.hasOwnProperty,Z=(z,q)=>{for(var B in q)H(z,B,{get:q[B],enumerable:!0})},$=(z,q,B,F)=>{if(q&&typeof q==="object"||typeof q==="function"){for(let v of X(q))if(!Y.call(z,v)&&v!==B)H(z,v,{get:()=>q[v],enumerable:!(F=W(q,v))||F.enumerable})}return z},A=(z)=>$(H({},"__esModule",{value:!0}),z),L={};Z(L,{refreshToken:()=>D});Q.exports=A(L);var K=U(),G=V();async function D(z){let q=z?.project,B=z?.team;if(!q&&!B){let v=(0,G.findProjectInfo)();q=v.projectId,B=v.teamId}else if(!q||!B){let v=(0,G.findProjectInfo)();q=q??v.projectId,B=B??v.teamId}if(!q)throw new K.VercelOidcTokenError("Failed to refresh OIDC token: No project specified. Try re-linking your project with `vc link`");let F=(0,G.loadToken)(q);if(!F||(0,G.isExpired)((0,G.getTokenPayload)(F.token),z?.expirationBufferMs)){let v=await(0,G.getVercelToken)({expirationBufferMs:z?.expirationBufferMs});if(F=await(0,G.getVercelOidcToken)(v,q,B),!F)throw new K.VercelOidcTokenError("Failed to refresh OIDC token");(0,G.saveToken)(F,q)}process.env.VERCEL_OIDC_TOKEN=F.token;return}});export default E();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as a}from"./index-hnfqppx9.js";import"./index-f7kmsdfk.js";export default a();
|
package/dist/tui-preferences.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{Vf as _,bg as R,cg as I,dg as x}from"./index-50p400eg.js";import{Gg as N,Hg as L,Ng as j}from"./index-m8m7rakq.js";import"./index-f7kmsdfk.js";import{mkdir as T,writeFile as h}from"node:fs/promises";import{homedir as y}from"node:os";import{dirname as f,join as C}from"node:path";import{applyEdits as g,modify as k,parse as b}from"jsonc-parser";function E(z){return z!==null&&typeof z==="object"&&!Array.isArray(z)}async function S(z){try{let q=[],H=b(await j(z,N),q,{allowTrailingComma:!0});return q.length===0&&E(H)?H:{}}catch(q){if(q instanceof L&&q.code!=="ENOENT")throw q;return{}}}var w=`// Shared preferences for TUI plugins.
|
|
2
2
|
// Plugins update individual keys in place and preserve comments.
|
|
3
3
|
{}
|
|
4
|
-
`;function
|
|
4
|
+
`;function A(z){let{file:q,pluginKey:H,beforeCommit:Q}=z,X={...I.preferences,timeoutMs:z.timeoutMs??I.preferences.timeoutMs},$=Promise.resolve();async function V(J,D){await R(q,X,async(U)=>{let B;try{B=await j(q,N)}catch(M){if(M.code!=="ENOENT")throw M;B=""}if(B.trim()==="")B=w;let W=g(B,k(B,[H,...J],D,{formattingOptions:{insertSpaces:!0,tabSize:2}}));await _(q,W,{serialize:(M)=>String(M),beforeRename:async()=>{await Q?.(),await U.assertOwned()}})})}return{queueTuiPreferenceUpdate(J,D){let U=[...J],B=structuredClone(D),W=$.then(()=>V(U,B));return $=W.catch(()=>{}),W}}}var p="OPENCODE_TUI_PREFERENCES_FILE",c="tui-preferences.jsonc";function K(){let z=process.env[p];if(z)return z;let q=process.env.OPENCODE_CONFIG_DIR||C(process.env.XDG_CONFIG_HOME||C(y(),".config"),"opencode");return C(q,c)}function Y(z){return typeof z==="object"&&z!==null&&!Array.isArray(z)}function Jq(){return S(K())}var v="openai-auth",d=160,m={forceToTop:!1,order:d,startCollapsed:!1,rememberCollapsed:!0,collapsed:null,pollMs:1500,refreshDebounceMs:200,header:{label:"OPENAI",showVersion:!0},sections:{quota:!0,fallbackAccounts:!0,routing:!0,health:!0,pacing:!0},appearance:{barWidth:10,barFilledChar:"█",barEmptyChar:"░",warnThreshold:50,errorThreshold:80}};function Z(z,q){return typeof z==="boolean"?z:q}function G(z,q,H,Q){if(typeof z!=="number"||!Number.isFinite(z))return q;return Math.min(Math.max(Math.round(z),H),Q)}function u(z,q,H){if(typeof z!=="string"||z.length===0)return q;return z.slice(0,H)}function P(z,q){if(typeof z!=="string")return q;return[...z][0]??q}function Yq(z){let q=z[v];if(!Y(q))return structuredClone(m);let H=m,Q=Y(q.header)?q.header:{},X=Y(q.sections)?q.sections:{},$=Y(q.appearance)?q.appearance:{},V=G($.warnThreshold,H.appearance.warnThreshold,0,99),J=Math.max(G($.errorThreshold,H.appearance.errorThreshold,0,100),Math.min(V+1,100));return{forceToTop:Z(q.forceToTop,H.forceToTop),order:G(q.order,H.order,-1e4,1e4),startCollapsed:Z(q.startCollapsed,H.startCollapsed),rememberCollapsed:Z(q.rememberCollapsed,H.rememberCollapsed),collapsed:typeof q.collapsed==="boolean"?q.collapsed:null,pollMs:G(q.pollMs,H.pollMs,500,30000),refreshDebounceMs:G(q.refreshDebounceMs,H.refreshDebounceMs,50,5000),header:{label:u(Q.label,H.header.label,20),showVersion:Z(Q.showVersion,H.header.showVersion)},sections:{quota:Z(X.quota,H.sections.quota),fallbackAccounts:Z(X.fallbackAccounts,H.sections.fallbackAccounts),routing:Z(X.routing,H.sections.routing),health:Z(X.health,H.sections.health),pacing:Z(X.pacing,H.sections.pacing)},appearance:{barWidth:G($.barWidth,H.appearance.barWidth,4,40),barFilledChar:P($.barFilledChar,H.appearance.barFilledChar),barEmptyChar:P($.barEmptyChar,H.appearance.barEmptyChar),warnThreshold:V,errorThreshold:J}}}var s=-1e5;function Vq(z,q,H){let Q=z[q];if(!Y(Q))return H;if(Q.forceToTop===!0)return s+Object.keys(z).indexOf(q);return G(Q.order,H,-1e4,1e4)}var n=`// Shared preferences for opencode TUI plugins.
|
|
5
5
|
// One top-level key per plugin (short name). See each plugin's README for
|
|
6
6
|
// its supported settings. This file is safe to hand-edit; plugins update
|
|
7
7
|
// individual keys in place and preserve comments.
|
|
8
8
|
{}
|
|
9
|
-
`,
|
|
9
|
+
`,F=new Map;function o(z,q){let H=JSON.stringify([z,q]),Q=F.get(H);if(!Q)Q=A({file:z,pluginKey:q}),F.set(H,Q);return Q}async function i(z){await T(f(z),{recursive:!0}),await h(z,n,{encoding:"utf8",flag:"wx"}).catch(()=>{})}var O=Promise.resolve();function Wq(z,q,H){let Q=K(),X=o(Q,z);return O=O.then(()=>i(Q)).then(()=>X.queueTuiPreferenceUpdate(q,H)).catch(()=>{}),O}function Mq(z){return x(K(),z)}export{Mq as watchTuiPreferences,Yq as resolveOpenaiAuthPrefs,Jq as readTuiPreferencesFile,Wq as queueTuiPreferenceUpdate,K as getTuiPreferencesFile,Vq as computeEffectiveOrder,p as TUI_PREFS_FILE_ENV,v as PLUGIN_KEY,d as DEFAULT_SLOT_ORDER,m as DEFAULT_PREFS};
|
package/dist/v2/server.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as HostSlotAdapter, d as OpenAiVaultOptions, f as BeginAccountLoginOptions, i as CodexSessionMetadata, o as RuntimeLayoutOptions, p as BeginAccountLoginResult, r as CodexRequestRuntime, s as PoolLifecycleDeps
|
|
1
|
+
import { C as AccountPaths, c as HostSlotAdapter, d as OpenAiVaultOptions, f as BeginAccountLoginOptions, i as CodexSessionMetadata, o as RuntimeLayoutOptions, p as BeginAccountLoginResult, r as CodexRequestRuntime, s as PoolLifecycleDeps } from "../codex-request-DYqSE0ti.js";
|
|
2
2
|
import { i as OpenDialogPayload, n as ApplyResult } from "../protocol-BZZtDn5h.js";
|
|
3
3
|
import { Plugin } from "@opencode/plugin";
|
|
4
4
|
import "@opencode/plugin/promise/integration";
|