oh-my-opencode 0.3.4 → 0.4.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/README.ko.md +136 -37
- package/README.md +134 -35
- package/dist/auth/antigravity/constants.d.ts +36 -0
- package/dist/auth/antigravity/fetch.d.ts +68 -0
- package/dist/auth/antigravity/index.d.ts +13 -0
- package/dist/auth/antigravity/message-converter.d.ts +54 -0
- package/dist/auth/antigravity/oauth.d.ts +85 -0
- package/dist/auth/antigravity/plugin.d.ts +54 -0
- package/dist/auth/antigravity/project.d.ts +20 -0
- package/dist/auth/antigravity/request.d.ts +104 -0
- package/dist/auth/antigravity/response.d.ts +137 -0
- package/dist/auth/antigravity/thinking.d.ts +234 -0
- package/dist/auth/antigravity/thought-signature-store.d.ts +52 -0
- package/dist/auth/antigravity/token.d.ts +41 -0
- package/dist/auth/antigravity/tools.d.ts +119 -0
- package/dist/auth/antigravity/types.d.ts +173 -0
- package/dist/config/schema.d.ts +66 -66
- package/dist/features/background-agent/index.d.ts +2 -0
- package/dist/features/background-agent/manager.d.ts +37 -0
- package/dist/features/background-agent/types.d.ts +27 -0
- package/dist/google-auth.d.ts +3 -0
- package/dist/hooks/anthropic-auto-compact/types.d.ts +11 -0
- package/dist/hooks/auto-update-checker/cache.d.ts +1 -0
- package/dist/hooks/auto-update-checker/checker.d.ts +6 -0
- package/dist/hooks/auto-update-checker/constants.d.ts +8 -0
- package/dist/hooks/auto-update-checker/index.d.ts +12 -0
- package/dist/hooks/auto-update-checker/types.d.ts +19 -0
- package/dist/hooks/background-notification/index.d.ts +12 -0
- package/dist/hooks/background-notification/types.d.ts +4 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/rules-injector/constants.d.ts +6 -0
- package/dist/hooks/rules-injector/finder.d.ts +45 -0
- package/dist/hooks/rules-injector/index.d.ts +22 -0
- package/dist/hooks/rules-injector/matcher.d.ts +21 -0
- package/dist/hooks/rules-injector/parser.d.ts +18 -0
- package/dist/hooks/rules-injector/storage.d.ts +9 -0
- package/dist/hooks/rules-injector/types.d.ts +41 -0
- package/dist/hooks/session-recovery/storage.d.ts +1 -0
- package/dist/index.js +4290 -1433
- package/dist/tools/ast-grep/index.d.ts +4 -4
- package/dist/tools/ast-grep/tools.d.ts +4 -4
- package/dist/tools/background-task/constants.d.ts +3 -0
- package/dist/tools/background-task/index.d.ts +3 -0
- package/dist/tools/background-task/tools.d.ts +39 -0
- package/dist/tools/background-task/types.d.ts +13 -0
- package/dist/tools/call-omo-agent/constants.d.ts +2 -0
- package/dist/tools/call-omo-agent/index.d.ts +3 -0
- package/dist/tools/call-omo-agent/tools.d.ts +22 -0
- package/dist/tools/call-omo-agent/types.d.ts +24 -0
- package/dist/tools/index.d.ts +47 -6
- package/dist/tools/lsp/tools.d.ts +2 -2
- package/package.json +11 -3
package/dist/config/schema.d.ts
CHANGED
|
@@ -22,32 +22,32 @@ export declare const AgentOverrideConfigSchema: z.ZodObject<{
|
|
|
22
22
|
color: z.ZodOptional<z.ZodString>;
|
|
23
23
|
permission: z.ZodOptional<z.ZodObject<{
|
|
24
24
|
edit: z.ZodOptional<z.ZodEnum<{
|
|
25
|
-
ask: "ask";
|
|
26
25
|
allow: "allow";
|
|
26
|
+
ask: "ask";
|
|
27
27
|
deny: "deny";
|
|
28
28
|
}>>;
|
|
29
29
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
30
|
-
ask: "ask";
|
|
31
30
|
allow: "allow";
|
|
31
|
+
ask: "ask";
|
|
32
32
|
deny: "deny";
|
|
33
33
|
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
34
|
-
ask: "ask";
|
|
35
34
|
allow: "allow";
|
|
35
|
+
ask: "ask";
|
|
36
36
|
deny: "deny";
|
|
37
37
|
}>>]>>;
|
|
38
38
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
39
|
-
ask: "ask";
|
|
40
39
|
allow: "allow";
|
|
40
|
+
ask: "ask";
|
|
41
41
|
deny: "deny";
|
|
42
42
|
}>>;
|
|
43
43
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
44
|
-
ask: "ask";
|
|
45
44
|
allow: "allow";
|
|
45
|
+
ask: "ask";
|
|
46
46
|
deny: "deny";
|
|
47
47
|
}>>;
|
|
48
48
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
49
|
-
ask: "ask";
|
|
50
49
|
allow: "allow";
|
|
50
|
+
ask: "ask";
|
|
51
51
|
deny: "deny";
|
|
52
52
|
}>>;
|
|
53
53
|
}, z.core.$strip>>;
|
|
@@ -69,32 +69,32 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
69
69
|
color: z.ZodOptional<z.ZodString>;
|
|
70
70
|
permission: z.ZodOptional<z.ZodObject<{
|
|
71
71
|
edit: z.ZodOptional<z.ZodEnum<{
|
|
72
|
-
ask: "ask";
|
|
73
72
|
allow: "allow";
|
|
73
|
+
ask: "ask";
|
|
74
74
|
deny: "deny";
|
|
75
75
|
}>>;
|
|
76
76
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
77
|
-
ask: "ask";
|
|
78
77
|
allow: "allow";
|
|
78
|
+
ask: "ask";
|
|
79
79
|
deny: "deny";
|
|
80
80
|
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
81
|
-
ask: "ask";
|
|
82
81
|
allow: "allow";
|
|
82
|
+
ask: "ask";
|
|
83
83
|
deny: "deny";
|
|
84
84
|
}>>]>>;
|
|
85
85
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
86
|
-
ask: "ask";
|
|
87
86
|
allow: "allow";
|
|
87
|
+
ask: "ask";
|
|
88
88
|
deny: "deny";
|
|
89
89
|
}>>;
|
|
90
90
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
91
|
-
ask: "ask";
|
|
92
91
|
allow: "allow";
|
|
92
|
+
ask: "ask";
|
|
93
93
|
deny: "deny";
|
|
94
94
|
}>>;
|
|
95
95
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
96
|
-
ask: "ask";
|
|
97
96
|
allow: "allow";
|
|
97
|
+
ask: "ask";
|
|
98
98
|
deny: "deny";
|
|
99
99
|
}>>;
|
|
100
100
|
}, z.core.$strip>>;
|
|
@@ -115,32 +115,32 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
115
115
|
color: z.ZodOptional<z.ZodString>;
|
|
116
116
|
permission: z.ZodOptional<z.ZodObject<{
|
|
117
117
|
edit: z.ZodOptional<z.ZodEnum<{
|
|
118
|
-
ask: "ask";
|
|
119
118
|
allow: "allow";
|
|
119
|
+
ask: "ask";
|
|
120
120
|
deny: "deny";
|
|
121
121
|
}>>;
|
|
122
122
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
123
|
-
ask: "ask";
|
|
124
123
|
allow: "allow";
|
|
124
|
+
ask: "ask";
|
|
125
125
|
deny: "deny";
|
|
126
126
|
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
127
|
-
ask: "ask";
|
|
128
127
|
allow: "allow";
|
|
128
|
+
ask: "ask";
|
|
129
129
|
deny: "deny";
|
|
130
130
|
}>>]>>;
|
|
131
131
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
132
|
-
ask: "ask";
|
|
133
132
|
allow: "allow";
|
|
133
|
+
ask: "ask";
|
|
134
134
|
deny: "deny";
|
|
135
135
|
}>>;
|
|
136
136
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
137
|
-
ask: "ask";
|
|
138
137
|
allow: "allow";
|
|
138
|
+
ask: "ask";
|
|
139
139
|
deny: "deny";
|
|
140
140
|
}>>;
|
|
141
141
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
142
|
-
ask: "ask";
|
|
143
142
|
allow: "allow";
|
|
143
|
+
ask: "ask";
|
|
144
144
|
deny: "deny";
|
|
145
145
|
}>>;
|
|
146
146
|
}, z.core.$strip>>;
|
|
@@ -161,32 +161,32 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
161
161
|
color: z.ZodOptional<z.ZodString>;
|
|
162
162
|
permission: z.ZodOptional<z.ZodObject<{
|
|
163
163
|
edit: z.ZodOptional<z.ZodEnum<{
|
|
164
|
-
ask: "ask";
|
|
165
164
|
allow: "allow";
|
|
165
|
+
ask: "ask";
|
|
166
166
|
deny: "deny";
|
|
167
167
|
}>>;
|
|
168
168
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
169
|
-
ask: "ask";
|
|
170
169
|
allow: "allow";
|
|
170
|
+
ask: "ask";
|
|
171
171
|
deny: "deny";
|
|
172
172
|
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
173
|
-
ask: "ask";
|
|
174
173
|
allow: "allow";
|
|
174
|
+
ask: "ask";
|
|
175
175
|
deny: "deny";
|
|
176
176
|
}>>]>>;
|
|
177
177
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
178
|
-
ask: "ask";
|
|
179
178
|
allow: "allow";
|
|
179
|
+
ask: "ask";
|
|
180
180
|
deny: "deny";
|
|
181
181
|
}>>;
|
|
182
182
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
183
|
-
ask: "ask";
|
|
184
183
|
allow: "allow";
|
|
184
|
+
ask: "ask";
|
|
185
185
|
deny: "deny";
|
|
186
186
|
}>>;
|
|
187
187
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
188
|
-
ask: "ask";
|
|
189
188
|
allow: "allow";
|
|
189
|
+
ask: "ask";
|
|
190
190
|
deny: "deny";
|
|
191
191
|
}>>;
|
|
192
192
|
}, z.core.$strip>>;
|
|
@@ -207,32 +207,32 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
207
207
|
color: z.ZodOptional<z.ZodString>;
|
|
208
208
|
permission: z.ZodOptional<z.ZodObject<{
|
|
209
209
|
edit: z.ZodOptional<z.ZodEnum<{
|
|
210
|
-
ask: "ask";
|
|
211
210
|
allow: "allow";
|
|
211
|
+
ask: "ask";
|
|
212
212
|
deny: "deny";
|
|
213
213
|
}>>;
|
|
214
214
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
215
|
-
ask: "ask";
|
|
216
215
|
allow: "allow";
|
|
216
|
+
ask: "ask";
|
|
217
217
|
deny: "deny";
|
|
218
218
|
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
219
|
-
ask: "ask";
|
|
220
219
|
allow: "allow";
|
|
220
|
+
ask: "ask";
|
|
221
221
|
deny: "deny";
|
|
222
222
|
}>>]>>;
|
|
223
223
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
224
|
-
ask: "ask";
|
|
225
224
|
allow: "allow";
|
|
225
|
+
ask: "ask";
|
|
226
226
|
deny: "deny";
|
|
227
227
|
}>>;
|
|
228
228
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
229
|
-
ask: "ask";
|
|
230
229
|
allow: "allow";
|
|
230
|
+
ask: "ask";
|
|
231
231
|
deny: "deny";
|
|
232
232
|
}>>;
|
|
233
233
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
234
|
-
ask: "ask";
|
|
235
234
|
allow: "allow";
|
|
235
|
+
ask: "ask";
|
|
236
236
|
deny: "deny";
|
|
237
237
|
}>>;
|
|
238
238
|
}, z.core.$strip>>;
|
|
@@ -253,32 +253,32 @@ export declare const AgentOverridesSchema: z.ZodObject<{
|
|
|
253
253
|
color: z.ZodOptional<z.ZodString>;
|
|
254
254
|
permission: z.ZodOptional<z.ZodObject<{
|
|
255
255
|
edit: z.ZodOptional<z.ZodEnum<{
|
|
256
|
-
ask: "ask";
|
|
257
256
|
allow: "allow";
|
|
257
|
+
ask: "ask";
|
|
258
258
|
deny: "deny";
|
|
259
259
|
}>>;
|
|
260
260
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
261
|
-
ask: "ask";
|
|
262
261
|
allow: "allow";
|
|
262
|
+
ask: "ask";
|
|
263
263
|
deny: "deny";
|
|
264
264
|
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
265
|
-
ask: "ask";
|
|
266
265
|
allow: "allow";
|
|
266
|
+
ask: "ask";
|
|
267
267
|
deny: "deny";
|
|
268
268
|
}>>]>>;
|
|
269
269
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
270
|
-
ask: "ask";
|
|
271
270
|
allow: "allow";
|
|
271
|
+
ask: "ask";
|
|
272
272
|
deny: "deny";
|
|
273
273
|
}>>;
|
|
274
274
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
275
|
-
ask: "ask";
|
|
276
275
|
allow: "allow";
|
|
276
|
+
ask: "ask";
|
|
277
277
|
deny: "deny";
|
|
278
278
|
}>>;
|
|
279
279
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
280
|
-
ask: "ask";
|
|
281
280
|
allow: "allow";
|
|
281
|
+
ask: "ask";
|
|
282
282
|
deny: "deny";
|
|
283
283
|
}>>;
|
|
284
284
|
}, z.core.$strip>>;
|
|
@@ -321,32 +321,32 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
321
321
|
color: z.ZodOptional<z.ZodString>;
|
|
322
322
|
permission: z.ZodOptional<z.ZodObject<{
|
|
323
323
|
edit: z.ZodOptional<z.ZodEnum<{
|
|
324
|
-
ask: "ask";
|
|
325
324
|
allow: "allow";
|
|
325
|
+
ask: "ask";
|
|
326
326
|
deny: "deny";
|
|
327
327
|
}>>;
|
|
328
328
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
329
|
-
ask: "ask";
|
|
330
329
|
allow: "allow";
|
|
330
|
+
ask: "ask";
|
|
331
331
|
deny: "deny";
|
|
332
332
|
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
333
|
-
ask: "ask";
|
|
334
333
|
allow: "allow";
|
|
334
|
+
ask: "ask";
|
|
335
335
|
deny: "deny";
|
|
336
336
|
}>>]>>;
|
|
337
337
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
338
|
-
ask: "ask";
|
|
339
338
|
allow: "allow";
|
|
339
|
+
ask: "ask";
|
|
340
340
|
deny: "deny";
|
|
341
341
|
}>>;
|
|
342
342
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
343
|
-
ask: "ask";
|
|
344
343
|
allow: "allow";
|
|
344
|
+
ask: "ask";
|
|
345
345
|
deny: "deny";
|
|
346
346
|
}>>;
|
|
347
347
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
348
|
-
ask: "ask";
|
|
349
348
|
allow: "allow";
|
|
349
|
+
ask: "ask";
|
|
350
350
|
deny: "deny";
|
|
351
351
|
}>>;
|
|
352
352
|
}, z.core.$strip>>;
|
|
@@ -367,32 +367,32 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
367
367
|
color: z.ZodOptional<z.ZodString>;
|
|
368
368
|
permission: z.ZodOptional<z.ZodObject<{
|
|
369
369
|
edit: z.ZodOptional<z.ZodEnum<{
|
|
370
|
-
ask: "ask";
|
|
371
370
|
allow: "allow";
|
|
371
|
+
ask: "ask";
|
|
372
372
|
deny: "deny";
|
|
373
373
|
}>>;
|
|
374
374
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
375
|
-
ask: "ask";
|
|
376
375
|
allow: "allow";
|
|
376
|
+
ask: "ask";
|
|
377
377
|
deny: "deny";
|
|
378
378
|
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
379
|
-
ask: "ask";
|
|
380
379
|
allow: "allow";
|
|
380
|
+
ask: "ask";
|
|
381
381
|
deny: "deny";
|
|
382
382
|
}>>]>>;
|
|
383
383
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
384
|
-
ask: "ask";
|
|
385
384
|
allow: "allow";
|
|
385
|
+
ask: "ask";
|
|
386
386
|
deny: "deny";
|
|
387
387
|
}>>;
|
|
388
388
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
389
|
-
ask: "ask";
|
|
390
389
|
allow: "allow";
|
|
390
|
+
ask: "ask";
|
|
391
391
|
deny: "deny";
|
|
392
392
|
}>>;
|
|
393
393
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
394
|
-
ask: "ask";
|
|
395
394
|
allow: "allow";
|
|
395
|
+
ask: "ask";
|
|
396
396
|
deny: "deny";
|
|
397
397
|
}>>;
|
|
398
398
|
}, z.core.$strip>>;
|
|
@@ -413,32 +413,32 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
413
413
|
color: z.ZodOptional<z.ZodString>;
|
|
414
414
|
permission: z.ZodOptional<z.ZodObject<{
|
|
415
415
|
edit: z.ZodOptional<z.ZodEnum<{
|
|
416
|
-
ask: "ask";
|
|
417
416
|
allow: "allow";
|
|
417
|
+
ask: "ask";
|
|
418
418
|
deny: "deny";
|
|
419
419
|
}>>;
|
|
420
420
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
421
|
-
ask: "ask";
|
|
422
421
|
allow: "allow";
|
|
422
|
+
ask: "ask";
|
|
423
423
|
deny: "deny";
|
|
424
424
|
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
425
|
-
ask: "ask";
|
|
426
425
|
allow: "allow";
|
|
426
|
+
ask: "ask";
|
|
427
427
|
deny: "deny";
|
|
428
428
|
}>>]>>;
|
|
429
429
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
430
|
-
ask: "ask";
|
|
431
430
|
allow: "allow";
|
|
431
|
+
ask: "ask";
|
|
432
432
|
deny: "deny";
|
|
433
433
|
}>>;
|
|
434
434
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
435
|
-
ask: "ask";
|
|
436
435
|
allow: "allow";
|
|
436
|
+
ask: "ask";
|
|
437
437
|
deny: "deny";
|
|
438
438
|
}>>;
|
|
439
439
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
440
|
-
ask: "ask";
|
|
441
440
|
allow: "allow";
|
|
441
|
+
ask: "ask";
|
|
442
442
|
deny: "deny";
|
|
443
443
|
}>>;
|
|
444
444
|
}, z.core.$strip>>;
|
|
@@ -459,32 +459,32 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
459
459
|
color: z.ZodOptional<z.ZodString>;
|
|
460
460
|
permission: z.ZodOptional<z.ZodObject<{
|
|
461
461
|
edit: z.ZodOptional<z.ZodEnum<{
|
|
462
|
-
ask: "ask";
|
|
463
462
|
allow: "allow";
|
|
463
|
+
ask: "ask";
|
|
464
464
|
deny: "deny";
|
|
465
465
|
}>>;
|
|
466
466
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
467
|
-
ask: "ask";
|
|
468
467
|
allow: "allow";
|
|
468
|
+
ask: "ask";
|
|
469
469
|
deny: "deny";
|
|
470
470
|
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
471
|
-
ask: "ask";
|
|
472
471
|
allow: "allow";
|
|
472
|
+
ask: "ask";
|
|
473
473
|
deny: "deny";
|
|
474
474
|
}>>]>>;
|
|
475
475
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
476
|
-
ask: "ask";
|
|
477
476
|
allow: "allow";
|
|
477
|
+
ask: "ask";
|
|
478
478
|
deny: "deny";
|
|
479
479
|
}>>;
|
|
480
480
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
481
|
-
ask: "ask";
|
|
482
481
|
allow: "allow";
|
|
482
|
+
ask: "ask";
|
|
483
483
|
deny: "deny";
|
|
484
484
|
}>>;
|
|
485
485
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
486
|
-
ask: "ask";
|
|
487
486
|
allow: "allow";
|
|
487
|
+
ask: "ask";
|
|
488
488
|
deny: "deny";
|
|
489
489
|
}>>;
|
|
490
490
|
}, z.core.$strip>>;
|
|
@@ -505,32 +505,32 @@ export declare const OhMyOpenCodeConfigSchema: z.ZodObject<{
|
|
|
505
505
|
color: z.ZodOptional<z.ZodString>;
|
|
506
506
|
permission: z.ZodOptional<z.ZodObject<{
|
|
507
507
|
edit: z.ZodOptional<z.ZodEnum<{
|
|
508
|
-
ask: "ask";
|
|
509
508
|
allow: "allow";
|
|
509
|
+
ask: "ask";
|
|
510
510
|
deny: "deny";
|
|
511
511
|
}>>;
|
|
512
512
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
513
|
-
ask: "ask";
|
|
514
513
|
allow: "allow";
|
|
514
|
+
ask: "ask";
|
|
515
515
|
deny: "deny";
|
|
516
516
|
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
517
|
-
ask: "ask";
|
|
518
517
|
allow: "allow";
|
|
518
|
+
ask: "ask";
|
|
519
519
|
deny: "deny";
|
|
520
520
|
}>>]>>;
|
|
521
521
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
522
|
-
ask: "ask";
|
|
523
522
|
allow: "allow";
|
|
523
|
+
ask: "ask";
|
|
524
524
|
deny: "deny";
|
|
525
525
|
}>>;
|
|
526
526
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
527
|
-
ask: "ask";
|
|
528
527
|
allow: "allow";
|
|
528
|
+
ask: "ask";
|
|
529
529
|
deny: "deny";
|
|
530
530
|
}>>;
|
|
531
531
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
532
|
-
ask: "ask";
|
|
533
532
|
allow: "allow";
|
|
533
|
+
ask: "ask";
|
|
534
534
|
deny: "deny";
|
|
535
535
|
}>>;
|
|
536
536
|
}, z.core.$strip>>;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
import type { BackgroundTask, LaunchInput } from "./types";
|
|
3
|
+
interface EventProperties {
|
|
4
|
+
sessionID?: string;
|
|
5
|
+
info?: {
|
|
6
|
+
id?: string;
|
|
7
|
+
};
|
|
8
|
+
[key: string]: unknown;
|
|
9
|
+
}
|
|
10
|
+
interface Event {
|
|
11
|
+
type: string;
|
|
12
|
+
properties?: EventProperties;
|
|
13
|
+
}
|
|
14
|
+
export declare class BackgroundManager {
|
|
15
|
+
private tasks;
|
|
16
|
+
private notifications;
|
|
17
|
+
private client;
|
|
18
|
+
private directory;
|
|
19
|
+
private pollingInterval?;
|
|
20
|
+
constructor(ctx: PluginInput);
|
|
21
|
+
launch(input: LaunchInput): Promise<BackgroundTask>;
|
|
22
|
+
getTask(id: string): BackgroundTask | undefined;
|
|
23
|
+
getTasksByParentSession(sessionID: string): BackgroundTask[];
|
|
24
|
+
findBySession(sessionID: string): BackgroundTask | undefined;
|
|
25
|
+
handleEvent(event: Event): void;
|
|
26
|
+
markForNotification(task: BackgroundTask): void;
|
|
27
|
+
getPendingNotifications(sessionID: string): BackgroundTask[];
|
|
28
|
+
clearNotifications(sessionID: string): void;
|
|
29
|
+
private clearNotificationsForTask;
|
|
30
|
+
private startPolling;
|
|
31
|
+
private stopPolling;
|
|
32
|
+
private notifyParentSession;
|
|
33
|
+
private formatDuration;
|
|
34
|
+
private hasRunningTasks;
|
|
35
|
+
private pollRunningTasks;
|
|
36
|
+
}
|
|
37
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export type BackgroundTaskStatus = "running" | "completed" | "error" | "cancelled";
|
|
2
|
+
export interface TaskProgress {
|
|
3
|
+
toolCalls: number;
|
|
4
|
+
lastTool?: string;
|
|
5
|
+
lastUpdate: Date;
|
|
6
|
+
}
|
|
7
|
+
export interface BackgroundTask {
|
|
8
|
+
id: string;
|
|
9
|
+
sessionID: string;
|
|
10
|
+
parentSessionID: string;
|
|
11
|
+
parentMessageID: string;
|
|
12
|
+
description: string;
|
|
13
|
+
agent: string;
|
|
14
|
+
status: BackgroundTaskStatus;
|
|
15
|
+
startedAt: Date;
|
|
16
|
+
completedAt?: Date;
|
|
17
|
+
result?: string;
|
|
18
|
+
error?: string;
|
|
19
|
+
progress?: TaskProgress;
|
|
20
|
+
}
|
|
21
|
+
export interface LaunchInput {
|
|
22
|
+
description: string;
|
|
23
|
+
prompt: string;
|
|
24
|
+
agent: string;
|
|
25
|
+
parentSessionID: string;
|
|
26
|
+
parentMessageID: string;
|
|
27
|
+
}
|
|
@@ -6,7 +6,18 @@ export interface ParsedTokenLimitError {
|
|
|
6
6
|
providerID?: string;
|
|
7
7
|
modelID?: string;
|
|
8
8
|
}
|
|
9
|
+
export interface RetryState {
|
|
10
|
+
attempt: number;
|
|
11
|
+
lastAttemptTime: number;
|
|
12
|
+
}
|
|
9
13
|
export interface AutoCompactState {
|
|
10
14
|
pendingCompact: Set<string>;
|
|
11
15
|
errorDataBySession: Map<string, ParsedTokenLimitError>;
|
|
16
|
+
retryStateBySession: Map<string, RetryState>;
|
|
12
17
|
}
|
|
18
|
+
export declare const RETRY_CONFIG: {
|
|
19
|
+
readonly maxAttempts: 5;
|
|
20
|
+
readonly initialDelayMs: 2000;
|
|
21
|
+
readonly backoffFactor: 2;
|
|
22
|
+
readonly maxDelayMs: 30000;
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function invalidateCache(): boolean;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { UpdateCheckResult } from "./types";
|
|
2
|
+
export declare function isLocalDevMode(directory: string): boolean;
|
|
3
|
+
export declare function findPluginEntry(directory: string): string | null;
|
|
4
|
+
export declare function getCachedVersion(): string | null;
|
|
5
|
+
export declare function getLatestVersion(): Promise<string | null>;
|
|
6
|
+
export declare function checkForUpdate(directory: string): Promise<UpdateCheckResult>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const PACKAGE_NAME = "oh-my-opencode";
|
|
2
|
+
export declare const NPM_REGISTRY_URL = "https://registry.npmjs.org/-/package/oh-my-opencode/dist-tags";
|
|
3
|
+
export declare const NPM_FETCH_TIMEOUT = 5000;
|
|
4
|
+
export declare const CACHE_DIR: string;
|
|
5
|
+
export declare const VERSION_FILE: string;
|
|
6
|
+
export declare const INSTALLED_PACKAGE_JSON: string;
|
|
7
|
+
export declare const USER_CONFIG_DIR: string;
|
|
8
|
+
export declare const USER_OPENCODE_CONFIG: string;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { PluginInput } from "@opencode-ai/plugin";
|
|
2
|
+
export declare function createAutoUpdateCheckerHook(ctx: PluginInput): {
|
|
3
|
+
event: ({ event }: {
|
|
4
|
+
event: {
|
|
5
|
+
type: string;
|
|
6
|
+
properties?: unknown;
|
|
7
|
+
};
|
|
8
|
+
}) => Promise<void>;
|
|
9
|
+
};
|
|
10
|
+
export type { UpdateCheckResult } from "./types";
|
|
11
|
+
export { checkForUpdate } from "./checker";
|
|
12
|
+
export { invalidateCache } from "./cache";
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export interface NpmDistTags {
|
|
2
|
+
latest: string;
|
|
3
|
+
[key: string]: string;
|
|
4
|
+
}
|
|
5
|
+
export interface OpencodeConfig {
|
|
6
|
+
plugin?: string[];
|
|
7
|
+
[key: string]: unknown;
|
|
8
|
+
}
|
|
9
|
+
export interface PackageJson {
|
|
10
|
+
version: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
[key: string]: unknown;
|
|
13
|
+
}
|
|
14
|
+
export interface UpdateCheckResult {
|
|
15
|
+
needsUpdate: boolean;
|
|
16
|
+
currentVersion: string | null;
|
|
17
|
+
latestVersion: string | null;
|
|
18
|
+
isLocalDev: boolean;
|
|
19
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BackgroundManager } from "../../features/background-agent";
|
|
2
|
+
interface Event {
|
|
3
|
+
type: string;
|
|
4
|
+
properties?: Record<string, unknown>;
|
|
5
|
+
}
|
|
6
|
+
interface EventInput {
|
|
7
|
+
event: Event;
|
|
8
|
+
}
|
|
9
|
+
export declare function createBackgroundNotificationHook(manager: BackgroundManager): {
|
|
10
|
+
event: ({ event }: EventInput) => Promise<void>;
|
|
11
|
+
};
|
|
12
|
+
export type { BackgroundNotificationHookConfig } from "./types";
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -10,3 +10,6 @@ export { createEmptyTaskResponseDetectorHook } from "./empty-task-response-detec
|
|
|
10
10
|
export { createAnthropicAutoCompactHook } from "./anthropic-auto-compact";
|
|
11
11
|
export { createThinkModeHook } from "./think-mode";
|
|
12
12
|
export { createClaudeCodeHooksHook } from "./claude-code-hooks";
|
|
13
|
+
export { createRulesInjectorHook } from "./rules-injector";
|
|
14
|
+
export { createBackgroundNotificationHook } from "./background-notification";
|
|
15
|
+
export { createAutoUpdateCheckerHook } from "./auto-update-checker";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare const OPENCODE_STORAGE: string;
|
|
2
|
+
export declare const RULES_INJECTOR_STORAGE: string;
|
|
3
|
+
export declare const PROJECT_MARKERS: string[];
|
|
4
|
+
export declare const PROJECT_RULE_SUBDIRS: [string, string][];
|
|
5
|
+
export declare const USER_RULE_DIR = ".claude/rules";
|
|
6
|
+
export declare const RULE_EXTENSIONS: string[];
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Candidate rule file with metadata for filtering and sorting
|
|
3
|
+
*/
|
|
4
|
+
export interface RuleFileCandidate {
|
|
5
|
+
/** Absolute path to the rule file */
|
|
6
|
+
path: string;
|
|
7
|
+
/** Real path after symlink resolution (for duplicate detection) */
|
|
8
|
+
realPath: string;
|
|
9
|
+
/** Whether this is a global/user-level rule */
|
|
10
|
+
isGlobal: boolean;
|
|
11
|
+
/** Directory distance from current file (9999 for global rules) */
|
|
12
|
+
distance: number;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Find project root by walking up from startPath.
|
|
16
|
+
* Checks for PROJECT_MARKERS (.git, pyproject.toml, package.json, etc.)
|
|
17
|
+
*
|
|
18
|
+
* @param startPath - Starting path to search from (file or directory)
|
|
19
|
+
* @returns Project root path or null if not found
|
|
20
|
+
*/
|
|
21
|
+
export declare function findProjectRoot(startPath: string): string | null;
|
|
22
|
+
/**
|
|
23
|
+
* Calculate directory distance between a rule file and current file.
|
|
24
|
+
* Distance is based on common ancestor within project root.
|
|
25
|
+
*
|
|
26
|
+
* @param rulePath - Path to the rule file
|
|
27
|
+
* @param currentFile - Path to the current file being edited
|
|
28
|
+
* @param projectRoot - Project root for relative path calculation
|
|
29
|
+
* @returns Distance (0 = same directory, higher = further)
|
|
30
|
+
*/
|
|
31
|
+
export declare function calculateDistance(rulePath: string, currentFile: string, projectRoot: string | null): number;
|
|
32
|
+
/**
|
|
33
|
+
* Find all rule files for a given context.
|
|
34
|
+
* Searches from currentFile upward to projectRoot for rule directories,
|
|
35
|
+
* then user-level directory (~/.claude/rules).
|
|
36
|
+
*
|
|
37
|
+
* IMPORTANT: This searches EVERY directory from file to project root.
|
|
38
|
+
* Not just the project root itself.
|
|
39
|
+
*
|
|
40
|
+
* @param projectRoot - Project root path (or null if outside any project)
|
|
41
|
+
* @param homeDir - User home directory
|
|
42
|
+
* @param currentFile - Current file being edited (for distance calculation)
|
|
43
|
+
* @returns Array of rule file candidates sorted by distance
|
|
44
|
+
*/
|
|
45
|
+
export declare function findRuleFiles(projectRoot: string | null, homeDir: string, currentFile: string): RuleFileCandidate[];
|