oh-my-opencode 0.3.4 → 0.4.1
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 +5 -2
- 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/index.d.ts +4 -2
- package/dist/hooks/session-recovery/storage.d.ts +1 -0
- package/dist/hooks/todo-continuation-enforcer.d.ts +11 -6
- package/dist/index.js +4490 -1584
- package/dist/shared/deep-merge.d.ts +12 -0
- package/dist/shared/index.d.ts +1 -0
- 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,33 +22,33 @@ 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";
|
|
27
26
|
deny: "deny";
|
|
27
|
+
ask: "ask";
|
|
28
28
|
}>>;
|
|
29
29
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
30
|
-
ask: "ask";
|
|
31
30
|
allow: "allow";
|
|
32
31
|
deny: "deny";
|
|
33
|
-
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
34
32
|
ask: "ask";
|
|
33
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
35
34
|
allow: "allow";
|
|
36
35
|
deny: "deny";
|
|
36
|
+
ask: "ask";
|
|
37
37
|
}>>]>>;
|
|
38
38
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
39
|
-
ask: "ask";
|
|
40
39
|
allow: "allow";
|
|
41
40
|
deny: "deny";
|
|
41
|
+
ask: "ask";
|
|
42
42
|
}>>;
|
|
43
43
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
44
|
-
ask: "ask";
|
|
45
44
|
allow: "allow";
|
|
46
45
|
deny: "deny";
|
|
46
|
+
ask: "ask";
|
|
47
47
|
}>>;
|
|
48
48
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
49
|
-
ask: "ask";
|
|
50
49
|
allow: "allow";
|
|
51
50
|
deny: "deny";
|
|
51
|
+
ask: "ask";
|
|
52
52
|
}>>;
|
|
53
53
|
}, z.core.$strip>>;
|
|
54
54
|
}, z.core.$strip>;
|
|
@@ -69,33 +69,33 @@ 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";
|
|
74
73
|
deny: "deny";
|
|
74
|
+
ask: "ask";
|
|
75
75
|
}>>;
|
|
76
76
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
77
|
-
ask: "ask";
|
|
78
77
|
allow: "allow";
|
|
79
78
|
deny: "deny";
|
|
80
|
-
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
81
79
|
ask: "ask";
|
|
80
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
82
81
|
allow: "allow";
|
|
83
82
|
deny: "deny";
|
|
83
|
+
ask: "ask";
|
|
84
84
|
}>>]>>;
|
|
85
85
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
86
|
-
ask: "ask";
|
|
87
86
|
allow: "allow";
|
|
88
87
|
deny: "deny";
|
|
88
|
+
ask: "ask";
|
|
89
89
|
}>>;
|
|
90
90
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
91
|
-
ask: "ask";
|
|
92
91
|
allow: "allow";
|
|
93
92
|
deny: "deny";
|
|
93
|
+
ask: "ask";
|
|
94
94
|
}>>;
|
|
95
95
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
96
|
-
ask: "ask";
|
|
97
96
|
allow: "allow";
|
|
98
97
|
deny: "deny";
|
|
98
|
+
ask: "ask";
|
|
99
99
|
}>>;
|
|
100
100
|
}, z.core.$strip>>;
|
|
101
101
|
}, z.core.$strip>>>;
|
|
@@ -115,33 +115,33 @@ 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";
|
|
120
119
|
deny: "deny";
|
|
120
|
+
ask: "ask";
|
|
121
121
|
}>>;
|
|
122
122
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
123
|
-
ask: "ask";
|
|
124
123
|
allow: "allow";
|
|
125
124
|
deny: "deny";
|
|
126
|
-
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
127
125
|
ask: "ask";
|
|
126
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
128
127
|
allow: "allow";
|
|
129
128
|
deny: "deny";
|
|
129
|
+
ask: "ask";
|
|
130
130
|
}>>]>>;
|
|
131
131
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
132
|
-
ask: "ask";
|
|
133
132
|
allow: "allow";
|
|
134
133
|
deny: "deny";
|
|
134
|
+
ask: "ask";
|
|
135
135
|
}>>;
|
|
136
136
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
137
|
-
ask: "ask";
|
|
138
137
|
allow: "allow";
|
|
139
138
|
deny: "deny";
|
|
139
|
+
ask: "ask";
|
|
140
140
|
}>>;
|
|
141
141
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
142
|
-
ask: "ask";
|
|
143
142
|
allow: "allow";
|
|
144
143
|
deny: "deny";
|
|
144
|
+
ask: "ask";
|
|
145
145
|
}>>;
|
|
146
146
|
}, z.core.$strip>>;
|
|
147
147
|
}, z.core.$strip>>>;
|
|
@@ -161,33 +161,33 @@ 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";
|
|
166
165
|
deny: "deny";
|
|
166
|
+
ask: "ask";
|
|
167
167
|
}>>;
|
|
168
168
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
169
|
-
ask: "ask";
|
|
170
169
|
allow: "allow";
|
|
171
170
|
deny: "deny";
|
|
172
|
-
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
173
171
|
ask: "ask";
|
|
172
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
174
173
|
allow: "allow";
|
|
175
174
|
deny: "deny";
|
|
175
|
+
ask: "ask";
|
|
176
176
|
}>>]>>;
|
|
177
177
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
178
|
-
ask: "ask";
|
|
179
178
|
allow: "allow";
|
|
180
179
|
deny: "deny";
|
|
180
|
+
ask: "ask";
|
|
181
181
|
}>>;
|
|
182
182
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
183
|
-
ask: "ask";
|
|
184
183
|
allow: "allow";
|
|
185
184
|
deny: "deny";
|
|
185
|
+
ask: "ask";
|
|
186
186
|
}>>;
|
|
187
187
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
188
|
-
ask: "ask";
|
|
189
188
|
allow: "allow";
|
|
190
189
|
deny: "deny";
|
|
190
|
+
ask: "ask";
|
|
191
191
|
}>>;
|
|
192
192
|
}, z.core.$strip>>;
|
|
193
193
|
}, z.core.$strip>>>;
|
|
@@ -207,33 +207,33 @@ 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";
|
|
212
211
|
deny: "deny";
|
|
212
|
+
ask: "ask";
|
|
213
213
|
}>>;
|
|
214
214
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
215
|
-
ask: "ask";
|
|
216
215
|
allow: "allow";
|
|
217
216
|
deny: "deny";
|
|
218
|
-
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
219
217
|
ask: "ask";
|
|
218
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
220
219
|
allow: "allow";
|
|
221
220
|
deny: "deny";
|
|
221
|
+
ask: "ask";
|
|
222
222
|
}>>]>>;
|
|
223
223
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
224
|
-
ask: "ask";
|
|
225
224
|
allow: "allow";
|
|
226
225
|
deny: "deny";
|
|
226
|
+
ask: "ask";
|
|
227
227
|
}>>;
|
|
228
228
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
229
|
-
ask: "ask";
|
|
230
229
|
allow: "allow";
|
|
231
230
|
deny: "deny";
|
|
231
|
+
ask: "ask";
|
|
232
232
|
}>>;
|
|
233
233
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
234
|
-
ask: "ask";
|
|
235
234
|
allow: "allow";
|
|
236
235
|
deny: "deny";
|
|
236
|
+
ask: "ask";
|
|
237
237
|
}>>;
|
|
238
238
|
}, z.core.$strip>>;
|
|
239
239
|
}, z.core.$strip>>>;
|
|
@@ -253,33 +253,33 @@ 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";
|
|
258
257
|
deny: "deny";
|
|
258
|
+
ask: "ask";
|
|
259
259
|
}>>;
|
|
260
260
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
261
|
-
ask: "ask";
|
|
262
261
|
allow: "allow";
|
|
263
262
|
deny: "deny";
|
|
264
|
-
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
265
263
|
ask: "ask";
|
|
264
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
266
265
|
allow: "allow";
|
|
267
266
|
deny: "deny";
|
|
267
|
+
ask: "ask";
|
|
268
268
|
}>>]>>;
|
|
269
269
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
270
|
-
ask: "ask";
|
|
271
270
|
allow: "allow";
|
|
272
271
|
deny: "deny";
|
|
272
|
+
ask: "ask";
|
|
273
273
|
}>>;
|
|
274
274
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
275
|
-
ask: "ask";
|
|
276
275
|
allow: "allow";
|
|
277
276
|
deny: "deny";
|
|
277
|
+
ask: "ask";
|
|
278
278
|
}>>;
|
|
279
279
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
280
|
-
ask: "ask";
|
|
281
280
|
allow: "allow";
|
|
282
281
|
deny: "deny";
|
|
282
|
+
ask: "ask";
|
|
283
283
|
}>>;
|
|
284
284
|
}, z.core.$strip>>;
|
|
285
285
|
}, z.core.$strip>>>;
|
|
@@ -321,33 +321,33 @@ 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";
|
|
326
325
|
deny: "deny";
|
|
326
|
+
ask: "ask";
|
|
327
327
|
}>>;
|
|
328
328
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
329
|
-
ask: "ask";
|
|
330
329
|
allow: "allow";
|
|
331
330
|
deny: "deny";
|
|
332
|
-
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
333
331
|
ask: "ask";
|
|
332
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
334
333
|
allow: "allow";
|
|
335
334
|
deny: "deny";
|
|
335
|
+
ask: "ask";
|
|
336
336
|
}>>]>>;
|
|
337
337
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
338
|
-
ask: "ask";
|
|
339
338
|
allow: "allow";
|
|
340
339
|
deny: "deny";
|
|
340
|
+
ask: "ask";
|
|
341
341
|
}>>;
|
|
342
342
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
343
|
-
ask: "ask";
|
|
344
343
|
allow: "allow";
|
|
345
344
|
deny: "deny";
|
|
345
|
+
ask: "ask";
|
|
346
346
|
}>>;
|
|
347
347
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
348
|
-
ask: "ask";
|
|
349
348
|
allow: "allow";
|
|
350
349
|
deny: "deny";
|
|
350
|
+
ask: "ask";
|
|
351
351
|
}>>;
|
|
352
352
|
}, z.core.$strip>>;
|
|
353
353
|
}, z.core.$strip>>>;
|
|
@@ -367,33 +367,33 @@ 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";
|
|
372
371
|
deny: "deny";
|
|
372
|
+
ask: "ask";
|
|
373
373
|
}>>;
|
|
374
374
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
375
|
-
ask: "ask";
|
|
376
375
|
allow: "allow";
|
|
377
376
|
deny: "deny";
|
|
378
|
-
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
379
377
|
ask: "ask";
|
|
378
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
380
379
|
allow: "allow";
|
|
381
380
|
deny: "deny";
|
|
381
|
+
ask: "ask";
|
|
382
382
|
}>>]>>;
|
|
383
383
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
384
|
-
ask: "ask";
|
|
385
384
|
allow: "allow";
|
|
386
385
|
deny: "deny";
|
|
386
|
+
ask: "ask";
|
|
387
387
|
}>>;
|
|
388
388
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
389
|
-
ask: "ask";
|
|
390
389
|
allow: "allow";
|
|
391
390
|
deny: "deny";
|
|
391
|
+
ask: "ask";
|
|
392
392
|
}>>;
|
|
393
393
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
394
|
-
ask: "ask";
|
|
395
394
|
allow: "allow";
|
|
396
395
|
deny: "deny";
|
|
396
|
+
ask: "ask";
|
|
397
397
|
}>>;
|
|
398
398
|
}, z.core.$strip>>;
|
|
399
399
|
}, z.core.$strip>>>;
|
|
@@ -413,33 +413,33 @@ 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";
|
|
418
417
|
deny: "deny";
|
|
418
|
+
ask: "ask";
|
|
419
419
|
}>>;
|
|
420
420
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
421
|
-
ask: "ask";
|
|
422
421
|
allow: "allow";
|
|
423
422
|
deny: "deny";
|
|
424
|
-
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
425
423
|
ask: "ask";
|
|
424
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
426
425
|
allow: "allow";
|
|
427
426
|
deny: "deny";
|
|
427
|
+
ask: "ask";
|
|
428
428
|
}>>]>>;
|
|
429
429
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
430
|
-
ask: "ask";
|
|
431
430
|
allow: "allow";
|
|
432
431
|
deny: "deny";
|
|
432
|
+
ask: "ask";
|
|
433
433
|
}>>;
|
|
434
434
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
435
|
-
ask: "ask";
|
|
436
435
|
allow: "allow";
|
|
437
436
|
deny: "deny";
|
|
437
|
+
ask: "ask";
|
|
438
438
|
}>>;
|
|
439
439
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
440
|
-
ask: "ask";
|
|
441
440
|
allow: "allow";
|
|
442
441
|
deny: "deny";
|
|
442
|
+
ask: "ask";
|
|
443
443
|
}>>;
|
|
444
444
|
}, z.core.$strip>>;
|
|
445
445
|
}, z.core.$strip>>>;
|
|
@@ -459,33 +459,33 @@ 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";
|
|
464
463
|
deny: "deny";
|
|
464
|
+
ask: "ask";
|
|
465
465
|
}>>;
|
|
466
466
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
467
|
-
ask: "ask";
|
|
468
467
|
allow: "allow";
|
|
469
468
|
deny: "deny";
|
|
470
|
-
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
471
469
|
ask: "ask";
|
|
470
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
472
471
|
allow: "allow";
|
|
473
472
|
deny: "deny";
|
|
473
|
+
ask: "ask";
|
|
474
474
|
}>>]>>;
|
|
475
475
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
476
|
-
ask: "ask";
|
|
477
476
|
allow: "allow";
|
|
478
477
|
deny: "deny";
|
|
478
|
+
ask: "ask";
|
|
479
479
|
}>>;
|
|
480
480
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
481
|
-
ask: "ask";
|
|
482
481
|
allow: "allow";
|
|
483
482
|
deny: "deny";
|
|
483
|
+
ask: "ask";
|
|
484
484
|
}>>;
|
|
485
485
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
486
|
-
ask: "ask";
|
|
487
486
|
allow: "allow";
|
|
488
487
|
deny: "deny";
|
|
488
|
+
ask: "ask";
|
|
489
489
|
}>>;
|
|
490
490
|
}, z.core.$strip>>;
|
|
491
491
|
}, z.core.$strip>>>;
|
|
@@ -505,33 +505,33 @@ 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";
|
|
510
509
|
deny: "deny";
|
|
510
|
+
ask: "ask";
|
|
511
511
|
}>>;
|
|
512
512
|
bash: z.ZodOptional<z.ZodUnion<readonly [z.ZodEnum<{
|
|
513
|
-
ask: "ask";
|
|
514
513
|
allow: "allow";
|
|
515
514
|
deny: "deny";
|
|
516
|
-
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
517
515
|
ask: "ask";
|
|
516
|
+
}>, z.ZodRecord<z.ZodString, z.ZodEnum<{
|
|
518
517
|
allow: "allow";
|
|
519
518
|
deny: "deny";
|
|
519
|
+
ask: "ask";
|
|
520
520
|
}>>]>>;
|
|
521
521
|
webfetch: z.ZodOptional<z.ZodEnum<{
|
|
522
|
-
ask: "ask";
|
|
523
522
|
allow: "allow";
|
|
524
523
|
deny: "deny";
|
|
524
|
+
ask: "ask";
|
|
525
525
|
}>>;
|
|
526
526
|
doom_loop: z.ZodOptional<z.ZodEnum<{
|
|
527
|
-
ask: "ask";
|
|
528
527
|
allow: "allow";
|
|
529
528
|
deny: "deny";
|
|
529
|
+
ask: "ask";
|
|
530
530
|
}>>;
|
|
531
531
|
external_directory: z.ZodOptional<z.ZodEnum<{
|
|
532
|
-
ask: "ask";
|
|
533
532
|
allow: "allow";
|
|
534
533
|
deny: "deny";
|
|
534
|
+
ask: "ask";
|
|
535
535
|
}>>;
|
|
536
536
|
}, z.core.$strip>>;
|
|
537
537
|
}, 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
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
export { createTodoContinuationEnforcer } from "./todo-continuation-enforcer";
|
|
1
|
+
export { createTodoContinuationEnforcer, type TodoContinuationEnforcer } from "./todo-continuation-enforcer";
|
|
2
2
|
export { createContextWindowMonitorHook } from "./context-window-monitor";
|
|
3
3
|
export { createSessionNotification } from "./session-notification";
|
|
4
|
-
export { createSessionRecoveryHook } from "./session-recovery";
|
|
4
|
+
export { createSessionRecoveryHook, type SessionRecoveryHook } from "./session-recovery";
|
|
5
5
|
export { createCommentCheckerHooks } from "./comment-checker";
|
|
6
6
|
export { createGrepOutputTruncatorHook } from "./grep-output-truncator";
|
|
7
7
|
export { createDirectoryAgentsInjectorHook } from "./directory-agents-injector";
|
|
@@ -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[];
|