omegon 0.8.3 → 0.9.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/extensions/cleave/dispatcher.ts +213 -20
- package/extensions/cleave/index.ts +24 -8
- package/extensions/cleave/rpc-child.ts +269 -0
- package/extensions/cleave/types.ts +52 -0
- package/extensions/openspec/spec.ts +3 -0
- package/node_modules/@types/node/README.md +3 -3
- package/node_modules/@types/node/assert/strict.d.ts +11 -5
- package/node_modules/@types/node/assert.d.ts +173 -50
- package/node_modules/@types/node/async_hooks.d.ts +8 -28
- package/node_modules/@types/node/buffer.buffer.d.ts +7 -1
- package/node_modules/@types/node/buffer.d.ts +168 -44
- package/node_modules/@types/node/child_process.d.ts +70 -27
- package/node_modules/@types/node/cluster.d.ts +332 -240
- package/node_modules/@types/node/compatibility/disposable.d.ts +14 -0
- package/node_modules/@types/node/compatibility/index.d.ts +9 -0
- package/node_modules/@types/node/compatibility/indexable.d.ts +20 -0
- package/node_modules/@types/node/compatibility/iterators.d.ts +0 -1
- package/node_modules/@types/node/console.d.ts +350 -49
- package/node_modules/@types/node/constants.d.ts +4 -3
- package/node_modules/@types/node/crypto.d.ts +1110 -630
- package/node_modules/@types/node/dgram.d.ts +51 -15
- package/node_modules/@types/node/diagnostics_channel.d.ts +6 -4
- package/node_modules/@types/node/dns/promises.d.ts +4 -4
- package/node_modules/@types/node/dns.d.ts +133 -132
- package/node_modules/@types/node/domain.d.ts +17 -13
- package/node_modules/@types/node/events.d.ts +663 -734
- package/node_modules/@types/node/fs/promises.d.ts +9 -43
- package/node_modules/@types/node/fs.d.ts +411 -628
- package/node_modules/@types/node/globals.d.ts +30 -8
- package/node_modules/@types/node/globals.typedarray.d.ts +0 -63
- package/node_modules/@types/node/http.d.ts +265 -364
- package/node_modules/@types/node/http2.d.ts +715 -551
- package/node_modules/@types/node/https.d.ts +239 -65
- package/node_modules/@types/node/index.d.ts +6 -24
- package/node_modules/@types/node/inspector.d.ts +53 -69
- package/node_modules/@types/node/inspector.generated.d.ts +410 -759
- package/node_modules/@types/node/module.d.ts +186 -52
- package/node_modules/@types/node/net.d.ts +194 -70
- package/node_modules/@types/node/os.d.ts +11 -12
- package/node_modules/@types/node/package.json +3 -13
- package/node_modules/@types/node/path.d.ts +133 -120
- package/node_modules/@types/node/perf_hooks.d.ts +643 -318
- package/node_modules/@types/node/process.d.ts +132 -223
- package/node_modules/@types/node/punycode.d.ts +5 -5
- package/node_modules/@types/node/querystring.d.ts +4 -4
- package/node_modules/@types/node/readline/promises.d.ts +3 -3
- package/node_modules/@types/node/readline.d.ts +120 -68
- package/node_modules/@types/node/repl.d.ts +100 -87
- package/node_modules/@types/node/sea.d.ts +1 -10
- package/node_modules/@types/node/sqlite.d.ts +19 -363
- package/node_modules/@types/node/stream/consumers.d.ts +10 -10
- package/node_modules/@types/node/stream/promises.d.ts +15 -136
- package/node_modules/@types/node/stream/web.d.ts +502 -176
- package/node_modules/@types/node/stream.d.ts +475 -581
- package/node_modules/@types/node/string_decoder.d.ts +4 -4
- package/node_modules/@types/node/test.d.ts +196 -308
- package/node_modules/@types/node/timers/promises.d.ts +4 -4
- package/node_modules/@types/node/timers.d.ts +132 -4
- package/node_modules/@types/node/tls.d.ts +226 -110
- package/node_modules/@types/node/trace_events.d.ts +9 -9
- package/node_modules/@types/node/ts5.6/buffer.buffer.d.ts +7 -1
- package/node_modules/@types/node/ts5.6/globals.typedarray.d.ts +0 -2
- package/node_modules/@types/node/ts5.6/index.d.ts +6 -26
- package/node_modules/@types/node/tty.d.ts +16 -58
- package/node_modules/@types/node/url.d.ts +573 -130
- package/node_modules/@types/node/util.d.ts +1100 -181
- package/node_modules/@types/node/v8.d.ts +8 -76
- package/node_modules/@types/node/vm.d.ts +72 -280
- package/node_modules/@types/node/wasi.d.ts +4 -25
- package/node_modules/@types/node/web-globals/abortcontroller.d.ts +2 -27
- package/node_modules/@types/node/web-globals/events.d.ts +0 -9
- package/node_modules/@types/node/web-globals/fetch.d.ts +0 -14
- package/node_modules/@types/node/web-globals/navigator.d.ts +0 -3
- package/node_modules/@types/node/worker_threads.d.ts +335 -268
- package/node_modules/@types/node/zlib.d.ts +74 -9
- package/node_modules/undici-types/agent.d.ts +12 -13
- package/node_modules/undici-types/api.d.ts +26 -26
- package/node_modules/undici-types/balanced-pool.d.ts +12 -13
- package/node_modules/undici-types/client.d.ts +19 -19
- package/node_modules/undici-types/connector.d.ts +2 -2
- package/node_modules/undici-types/cookies.d.ts +0 -2
- package/node_modules/undici-types/diagnostics-channel.d.ts +10 -18
- package/node_modules/undici-types/dispatcher.d.ts +103 -123
- package/node_modules/undici-types/env-http-proxy-agent.d.ts +3 -4
- package/node_modules/undici-types/errors.d.ts +54 -66
- package/node_modules/undici-types/eventsource.d.ts +4 -9
- package/node_modules/undici-types/fetch.d.ts +20 -22
- package/node_modules/undici-types/file.d.ts +39 -0
- package/node_modules/undici-types/filereader.d.ts +54 -0
- package/node_modules/undici-types/formdata.d.ts +7 -7
- package/node_modules/undici-types/global-dispatcher.d.ts +4 -4
- package/node_modules/undici-types/global-origin.d.ts +5 -5
- package/node_modules/undici-types/handlers.d.ts +8 -8
- package/node_modules/undici-types/header.d.ts +1 -157
- package/node_modules/undici-types/index.d.ts +47 -64
- package/node_modules/undici-types/interceptors.d.ts +8 -64
- package/node_modules/undici-types/mock-agent.d.ts +18 -36
- package/node_modules/undici-types/mock-client.d.ts +4 -6
- package/node_modules/undici-types/mock-errors.d.ts +3 -3
- package/node_modules/undici-types/mock-interceptor.d.ts +20 -21
- package/node_modules/undici-types/mock-pool.d.ts +4 -6
- package/node_modules/undici-types/package.json +1 -1
- package/node_modules/undici-types/patch.d.ts +4 -0
- package/node_modules/undici-types/pool-stats.d.ts +8 -8
- package/node_modules/undici-types/pool.d.ts +13 -15
- package/node_modules/undici-types/proxy-agent.d.ts +4 -5
- package/node_modules/undici-types/readable.d.ts +16 -19
- package/node_modules/undici-types/retry-agent.d.ts +1 -1
- package/node_modules/undici-types/retry-handler.d.ts +10 -19
- package/node_modules/undici-types/util.d.ts +3 -3
- package/node_modules/undici-types/webidl.d.ts +29 -142
- package/node_modules/undici-types/websocket.d.ts +10 -46
- package/package.json +2 -1
- package/skills/cleave/SKILL.md +62 -2
- package/node_modules/@types/node/inspector/promises.d.ts +0 -41
- package/node_modules/@types/node/path/posix.d.ts +0 -8
- package/node_modules/@types/node/path/win32.d.ts +0 -8
- package/node_modules/@types/node/quic.d.ts +0 -910
- package/node_modules/@types/node/test/reporters.d.ts +0 -96
- package/node_modules/@types/node/ts5.6/compatibility/float16array.d.ts +0 -71
- package/node_modules/@types/node/ts5.7/compatibility/float16array.d.ts +0 -72
- package/node_modules/@types/node/ts5.7/index.d.ts +0 -117
- package/node_modules/@types/node/util/types.d.ts +0 -558
- package/node_modules/@types/node/web-globals/blob.d.ts +0 -23
- package/node_modules/@types/node/web-globals/console.d.ts +0 -9
- package/node_modules/@types/node/web-globals/crypto.d.ts +0 -39
- package/node_modules/@types/node/web-globals/encoding.d.ts +0 -11
- package/node_modules/@types/node/web-globals/importmeta.d.ts +0 -13
- package/node_modules/@types/node/web-globals/messaging.d.ts +0 -23
- package/node_modules/@types/node/web-globals/performance.d.ts +0 -45
- package/node_modules/@types/node/web-globals/streams.d.ts +0 -115
- package/node_modules/@types/node/web-globals/timers.d.ts +0 -44
- package/node_modules/@types/node/web-globals/url.d.ts +0 -24
- package/node_modules/undici-types/cache-interceptor.d.ts +0 -173
- package/node_modules/undici-types/client-stats.d.ts +0 -15
- package/node_modules/undici-types/h2c-client.d.ts +0 -73
- package/node_modules/undici-types/mock-call-history.d.ts +0 -111
- package/node_modules/undici-types/round-robin-pool.d.ts +0 -41
- package/node_modules/undici-types/snapshot-agent.d.ts +0 -109
- package/node_modules/undici-types/utility.d.ts +0 -7
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
// These types are not exported, and are only used internally
|
|
2
|
-
import * as undici from './index'
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* Take in an unknown value and return one that is of type T
|
|
@@ -10,13 +9,15 @@ type SequenceConverter<T> = (object: unknown, iterable?: IterableIterator<T>) =>
|
|
|
10
9
|
|
|
11
10
|
type RecordConverter<K extends string, V> = (object: unknown) => Record<K, V>
|
|
12
11
|
|
|
12
|
+
interface ConvertToIntOpts {
|
|
13
|
+
clamp?: boolean
|
|
14
|
+
enforceRange?: boolean
|
|
15
|
+
}
|
|
16
|
+
|
|
13
17
|
interface WebidlErrors {
|
|
14
|
-
/**
|
|
15
|
-
* @description Instantiate an error
|
|
16
|
-
*/
|
|
17
18
|
exception (opts: { header: string, message: string }): TypeError
|
|
18
19
|
/**
|
|
19
|
-
* @description
|
|
20
|
+
* @description Throw an error when conversion from one type to another has failed
|
|
20
21
|
*/
|
|
21
22
|
conversionFailed (opts: {
|
|
22
23
|
prefix: string
|
|
@@ -33,24 +34,11 @@ interface WebidlErrors {
|
|
|
33
34
|
}): TypeError
|
|
34
35
|
}
|
|
35
36
|
|
|
36
|
-
interface WebIDLTypes {
|
|
37
|
-
UNDEFINED: 1,
|
|
38
|
-
BOOLEAN: 2,
|
|
39
|
-
STRING: 3,
|
|
40
|
-
SYMBOL: 4,
|
|
41
|
-
NUMBER: 5,
|
|
42
|
-
BIGINT: 6,
|
|
43
|
-
NULL: 7
|
|
44
|
-
OBJECT: 8
|
|
45
|
-
}
|
|
46
|
-
|
|
47
37
|
interface WebidlUtil {
|
|
48
38
|
/**
|
|
49
39
|
* @see https://tc39.es/ecma262/#sec-ecmascript-data-types-and-values
|
|
50
40
|
*/
|
|
51
|
-
Type (object: unknown):
|
|
52
|
-
|
|
53
|
-
TypeValueToString (o: unknown):
|
|
41
|
+
Type (object: unknown):
|
|
54
42
|
| 'Undefined'
|
|
55
43
|
| 'Boolean'
|
|
56
44
|
| 'String'
|
|
@@ -60,8 +48,6 @@ interface WebidlUtil {
|
|
|
60
48
|
| 'Null'
|
|
61
49
|
| 'Object'
|
|
62
50
|
|
|
63
|
-
Types: WebIDLTypes
|
|
64
|
-
|
|
65
51
|
/**
|
|
66
52
|
* @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint
|
|
67
53
|
*/
|
|
@@ -69,11 +55,11 @@ interface WebidlUtil {
|
|
|
69
55
|
V: unknown,
|
|
70
56
|
bitLength: number,
|
|
71
57
|
signedness: 'signed' | 'unsigned',
|
|
72
|
-
|
|
58
|
+
opts?: ConvertToIntOpts
|
|
73
59
|
): number
|
|
74
60
|
|
|
75
61
|
/**
|
|
76
|
-
* @see https://webidl.spec.whatwg.org/#abstract-opdef-
|
|
62
|
+
* @see https://webidl.spec.whatwg.org/#abstract-opdef-converttoint
|
|
77
63
|
*/
|
|
78
64
|
IntegerPart (N: number): number
|
|
79
65
|
|
|
@@ -82,24 +68,20 @@ interface WebidlUtil {
|
|
|
82
68
|
*/
|
|
83
69
|
Stringify (V: any): string
|
|
84
70
|
|
|
85
|
-
MakeTypeAssertion <I>(I: I): (arg: any) => arg is I
|
|
86
|
-
|
|
87
71
|
/**
|
|
88
72
|
* Mark a value as uncloneable for Node.js.
|
|
89
73
|
* This is only effective in some newer Node.js versions.
|
|
90
74
|
*/
|
|
91
75
|
markAsUncloneable (V: any): void
|
|
92
|
-
|
|
93
|
-
IsResizableArrayBuffer (V: ArrayBufferLike): boolean
|
|
94
|
-
|
|
95
|
-
HasFlag (flag: number, attributes: number): boolean
|
|
96
76
|
}
|
|
97
77
|
|
|
98
78
|
interface WebidlConverters {
|
|
99
79
|
/**
|
|
100
80
|
* @see https://webidl.spec.whatwg.org/#es-DOMString
|
|
101
81
|
*/
|
|
102
|
-
DOMString (V: unknown, prefix: string, argument: string,
|
|
82
|
+
DOMString (V: unknown, prefix: string, argument: string, opts?: {
|
|
83
|
+
legacyNullToEmptyString: boolean
|
|
84
|
+
}): string
|
|
103
85
|
|
|
104
86
|
/**
|
|
105
87
|
* @see https://webidl.spec.whatwg.org/#es-ByteString
|
|
@@ -139,140 +121,59 @@ interface WebidlConverters {
|
|
|
139
121
|
/**
|
|
140
122
|
* @see https://webidl.spec.whatwg.org/#es-unsigned-short
|
|
141
123
|
*/
|
|
142
|
-
['unsigned short'] (V: unknown,
|
|
124
|
+
['unsigned short'] (V: unknown, opts?: ConvertToIntOpts): number
|
|
143
125
|
|
|
144
126
|
/**
|
|
145
127
|
* @see https://webidl.spec.whatwg.org/#idl-ArrayBuffer
|
|
146
128
|
*/
|
|
147
|
-
ArrayBuffer (
|
|
148
|
-
|
|
149
|
-
prefix: string,
|
|
150
|
-
argument: string,
|
|
151
|
-
options?: { allowResizable: boolean }
|
|
152
|
-
): ArrayBuffer
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* @see https://webidl.spec.whatwg.org/#idl-SharedArrayBuffer
|
|
156
|
-
*/
|
|
157
|
-
SharedArrayBuffer (
|
|
158
|
-
V: unknown,
|
|
159
|
-
prefix: string,
|
|
160
|
-
argument: string,
|
|
161
|
-
options?: { allowResizable: boolean }
|
|
162
|
-
): SharedArrayBuffer
|
|
129
|
+
ArrayBuffer (V: unknown): ArrayBufferLike
|
|
130
|
+
ArrayBuffer (V: unknown, opts: { allowShared: false }): ArrayBuffer
|
|
163
131
|
|
|
164
132
|
/**
|
|
165
133
|
* @see https://webidl.spec.whatwg.org/#es-buffer-source-types
|
|
166
134
|
*/
|
|
167
135
|
TypedArray (
|
|
168
136
|
V: unknown,
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
flags?: number
|
|
173
|
-
): NodeJS.TypedArray
|
|
174
|
-
|
|
175
|
-
/**
|
|
176
|
-
* @see https://webidl.spec.whatwg.org/#es-buffer-source-types
|
|
177
|
-
*/
|
|
178
|
-
DataView (
|
|
137
|
+
TypedArray: NodeJS.TypedArray | ArrayBufferLike
|
|
138
|
+
): NodeJS.TypedArray | ArrayBufferLike
|
|
139
|
+
TypedArray (
|
|
179
140
|
V: unknown,
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
): DataView
|
|
141
|
+
TypedArray: NodeJS.TypedArray | ArrayBufferLike,
|
|
142
|
+
opts?: { allowShared: false }
|
|
143
|
+
): NodeJS.TypedArray | ArrayBuffer
|
|
184
144
|
|
|
185
145
|
/**
|
|
186
146
|
* @see https://webidl.spec.whatwg.org/#es-buffer-source-types
|
|
187
147
|
*/
|
|
188
|
-
|
|
189
|
-
V: unknown,
|
|
190
|
-
prefix: string,
|
|
191
|
-
argument: string,
|
|
192
|
-
flags?: number
|
|
193
|
-
): NodeJS.ArrayBufferView
|
|
148
|
+
DataView (V: unknown, opts?: { allowShared: boolean }): DataView
|
|
194
149
|
|
|
195
150
|
/**
|
|
196
151
|
* @see https://webidl.spec.whatwg.org/#BufferSource
|
|
197
152
|
*/
|
|
198
153
|
BufferSource (
|
|
199
154
|
V: unknown,
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
flags?: number
|
|
203
|
-
): ArrayBuffer | NodeJS.ArrayBufferView
|
|
204
|
-
|
|
205
|
-
/**
|
|
206
|
-
* @see https://webidl.spec.whatwg.org/#AllowSharedBufferSource
|
|
207
|
-
*/
|
|
208
|
-
AllowSharedBufferSource (
|
|
209
|
-
V: unknown,
|
|
210
|
-
prefix: string,
|
|
211
|
-
argument: string,
|
|
212
|
-
flags?: number
|
|
213
|
-
): ArrayBuffer | SharedArrayBuffer | NodeJS.ArrayBufferView
|
|
155
|
+
opts?: { allowShared: boolean }
|
|
156
|
+
): NodeJS.TypedArray | ArrayBufferLike | DataView
|
|
214
157
|
|
|
215
158
|
['sequence<ByteString>']: SequenceConverter<string>
|
|
216
|
-
|
|
159
|
+
|
|
217
160
|
['sequence<sequence<ByteString>>']: SequenceConverter<string[]>
|
|
218
161
|
|
|
219
162
|
['record<ByteString, ByteString>']: RecordConverter<string, string>
|
|
220
163
|
|
|
221
|
-
/**
|
|
222
|
-
* @see https://fetch.spec.whatwg.org/#requestinfo
|
|
223
|
-
*/
|
|
224
|
-
RequestInfo (V: unknown): undici.Request | string
|
|
225
|
-
|
|
226
|
-
/**
|
|
227
|
-
* @see https://fetch.spec.whatwg.org/#requestinit
|
|
228
|
-
*/
|
|
229
|
-
RequestInit (V: unknown): undici.RequestInit
|
|
230
|
-
|
|
231
|
-
/**
|
|
232
|
-
* @see https://html.spec.whatwg.org/multipage/webappapis.html#eventhandlernonnull
|
|
233
|
-
*/
|
|
234
|
-
EventHandlerNonNull (V: unknown): Function | null
|
|
235
|
-
|
|
236
|
-
WebSocketStreamWrite (V: unknown): ArrayBuffer | NodeJS.TypedArray | string
|
|
237
|
-
|
|
238
164
|
[Key: string]: (...args: any[]) => unknown
|
|
239
165
|
}
|
|
240
166
|
|
|
241
|
-
type WebidlIsFunction<T> = (arg: any) => arg is T
|
|
242
|
-
|
|
243
|
-
interface WebidlIs {
|
|
244
|
-
Request: WebidlIsFunction<undici.Request>
|
|
245
|
-
Response: WebidlIsFunction<undici.Response>
|
|
246
|
-
ReadableStream: WebidlIsFunction<ReadableStream>
|
|
247
|
-
Blob: WebidlIsFunction<Blob>
|
|
248
|
-
URLSearchParams: WebidlIsFunction<URLSearchParams>
|
|
249
|
-
File: WebidlIsFunction<File>
|
|
250
|
-
FormData: WebidlIsFunction<undici.FormData>
|
|
251
|
-
URL: WebidlIsFunction<URL>
|
|
252
|
-
WebSocketError: WebidlIsFunction<undici.WebSocketError>
|
|
253
|
-
AbortSignal: WebidlIsFunction<AbortSignal>
|
|
254
|
-
MessagePort: WebidlIsFunction<MessagePort>
|
|
255
|
-
USVString: WebidlIsFunction<string>
|
|
256
|
-
/**
|
|
257
|
-
* @see https://webidl.spec.whatwg.org/#BufferSource
|
|
258
|
-
*/
|
|
259
|
-
BufferSource: WebidlIsFunction<ArrayBuffer | NodeJS.TypedArray>
|
|
260
|
-
}
|
|
261
|
-
|
|
262
167
|
export interface Webidl {
|
|
263
168
|
errors: WebidlErrors
|
|
264
169
|
util: WebidlUtil
|
|
265
170
|
converters: WebidlConverters
|
|
266
|
-
is: WebidlIs
|
|
267
|
-
attributes: WebIDLExtendedAttributes
|
|
268
171
|
|
|
269
172
|
/**
|
|
270
173
|
* @description Performs a brand-check on {@param V} to ensure it is a
|
|
271
174
|
* {@param cls} object.
|
|
272
175
|
*/
|
|
273
|
-
brandCheck <Interface
|
|
274
|
-
|
|
275
|
-
brandCheckMultiple <Interfaces extends (new () => unknown)[]> (list: Interfaces): (V: any) => asserts V is Interfaces[number]
|
|
176
|
+
brandCheck <Interface>(V: unknown, cls: Interface, opts?: { strict?: boolean }): asserts V is Interface
|
|
276
177
|
|
|
277
178
|
/**
|
|
278
179
|
* @see https://webidl.spec.whatwg.org/#es-sequence
|
|
@@ -295,11 +196,10 @@ export interface Webidl {
|
|
|
295
196
|
* Similar to {@link Webidl.brandCheck} but allows skipping the check if third party
|
|
296
197
|
* interfaces are allowed.
|
|
297
198
|
*/
|
|
298
|
-
interfaceConverter <Interface>(
|
|
199
|
+
interfaceConverter <Interface>(cls: Interface): (
|
|
299
200
|
V: unknown,
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
) => asserts V is Interface
|
|
201
|
+
opts?: { strict: boolean }
|
|
202
|
+
) => asserts V is typeof cls
|
|
303
203
|
|
|
304
204
|
// TODO(@KhafraDev): a type could likely be implemented that can infer the return type
|
|
305
205
|
// from the converters given?
|
|
@@ -326,16 +226,3 @@ export interface Webidl {
|
|
|
326
226
|
|
|
327
227
|
argumentLengthCheck (args: { length: number }, min: number, context: string): void
|
|
328
228
|
}
|
|
329
|
-
|
|
330
|
-
interface WebIDLExtendedAttributes {
|
|
331
|
-
/** https://webidl.spec.whatwg.org/#Clamp */
|
|
332
|
-
Clamp: number
|
|
333
|
-
/** https://webidl.spec.whatwg.org/#EnforceRange */
|
|
334
|
-
EnforceRange: number
|
|
335
|
-
/** https://webidl.spec.whatwg.org/#AllowShared */
|
|
336
|
-
AllowShared: number
|
|
337
|
-
/** https://webidl.spec.whatwg.org/#AllowResizable */
|
|
338
|
-
AllowResizable: number
|
|
339
|
-
/** https://webidl.spec.whatwg.org/#LegacyNullToEmptyString */
|
|
340
|
-
LegacyNullToEmptyString: number
|
|
341
|
-
}
|
|
@@ -1,8 +1,7 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
|
|
3
|
-
import type { Blob } from '
|
|
4
|
-
import type {
|
|
5
|
-
import type { MessagePort } from 'node:worker_threads'
|
|
3
|
+
import type { Blob } from 'buffer'
|
|
4
|
+
import type { MessagePort } from 'worker_threads'
|
|
6
5
|
import {
|
|
7
6
|
EventInit,
|
|
8
7
|
EventListenerOptions,
|
|
@@ -23,7 +22,7 @@ interface WebSocketEventMap {
|
|
|
23
22
|
|
|
24
23
|
interface WebSocket extends EventTarget {
|
|
25
24
|
binaryType: BinaryType
|
|
26
|
-
|
|
25
|
+
|
|
27
26
|
readonly bufferedAmount: number
|
|
28
27
|
readonly extensions: string
|
|
29
28
|
|
|
@@ -96,16 +95,16 @@ interface MessageEventInit<T = any> extends EventInit {
|
|
|
96
95
|
data?: T
|
|
97
96
|
lastEventId?: string
|
|
98
97
|
origin?: string
|
|
99
|
-
ports?: MessagePort[]
|
|
100
|
-
source?: MessagePort | null
|
|
98
|
+
ports?: (typeof MessagePort)[]
|
|
99
|
+
source?: typeof MessagePort | null
|
|
101
100
|
}
|
|
102
101
|
|
|
103
102
|
interface MessageEvent<T = any> extends Event {
|
|
104
103
|
readonly data: T
|
|
105
104
|
readonly lastEventId: string
|
|
106
105
|
readonly origin: string
|
|
107
|
-
readonly ports:
|
|
108
|
-
readonly source: MessagePort | null
|
|
106
|
+
readonly ports: ReadonlyArray<typeof MessagePort>
|
|
107
|
+
readonly source: typeof MessagePort | null
|
|
109
108
|
initMessageEvent(
|
|
110
109
|
type: string,
|
|
111
110
|
bubbles?: boolean,
|
|
@@ -113,8 +112,8 @@ interface MessageEvent<T = any> extends Event {
|
|
|
113
112
|
data?: any,
|
|
114
113
|
origin?: string,
|
|
115
114
|
lastEventId?: string,
|
|
116
|
-
source?: MessagePort | null,
|
|
117
|
-
ports?: MessagePort[]
|
|
115
|
+
source?: typeof MessagePort | null,
|
|
116
|
+
ports?: (typeof MessagePort)[]
|
|
118
117
|
): void;
|
|
119
118
|
}
|
|
120
119
|
|
|
@@ -136,7 +135,7 @@ interface ErrorEvent extends Event {
|
|
|
136
135
|
readonly filename: string
|
|
137
136
|
readonly lineno: number
|
|
138
137
|
readonly colno: number
|
|
139
|
-
readonly error:
|
|
138
|
+
readonly error: any
|
|
140
139
|
}
|
|
141
140
|
|
|
142
141
|
export declare const ErrorEvent: {
|
|
@@ -149,38 +148,3 @@ interface WebSocketInit {
|
|
|
149
148
|
dispatcher?: Dispatcher,
|
|
150
149
|
headers?: HeadersInit
|
|
151
150
|
}
|
|
152
|
-
|
|
153
|
-
interface WebSocketStreamOptions {
|
|
154
|
-
protocols?: string | string[]
|
|
155
|
-
signal?: AbortSignal
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
interface WebSocketCloseInfo {
|
|
159
|
-
closeCode: number
|
|
160
|
-
reason: string
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
interface WebSocketStream {
|
|
164
|
-
closed: Promise<WebSocketCloseInfo>
|
|
165
|
-
opened: Promise<{
|
|
166
|
-
extensions: string
|
|
167
|
-
protocol: string
|
|
168
|
-
readable: ReadableStream
|
|
169
|
-
writable: WritableStream
|
|
170
|
-
}>
|
|
171
|
-
url: string
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
export declare const WebSocketStream: {
|
|
175
|
-
prototype: WebSocketStream
|
|
176
|
-
new (url: string | URL, options?: WebSocketStreamOptions): WebSocketStream
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
interface WebSocketError extends Event, WebSocketCloseInfo {}
|
|
180
|
-
|
|
181
|
-
export declare const WebSocketError: {
|
|
182
|
-
prototype: WebSocketError
|
|
183
|
-
new (type: string, init?: WebSocketCloseInfo): WebSocketError
|
|
184
|
-
}
|
|
185
|
-
|
|
186
|
-
export declare const ping: (ws: WebSocket, body?: Buffer) => void
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omegon",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Omegon — an opinionated distribution of pi (by Mario Zechner) with extensions for lifecycle management, memory, orchestration, and visualization",
|
|
5
5
|
"bin": {
|
|
6
6
|
"omegon": "bin/omegon.mjs",
|
|
@@ -99,6 +99,7 @@
|
|
|
99
99
|
"better-sqlite3": "^12.6.2"
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
|
+
"@types/node": "^22.0.0",
|
|
102
103
|
"typescript": "^5.9.3"
|
|
103
104
|
}
|
|
104
105
|
}
|
package/skills/cleave/SKILL.md
CHANGED
|
@@ -173,6 +173,55 @@ Skills can hint at the model complexity needed. The resolution order is:
|
|
|
173
173
|
3. Skill-based tier hint (highest `preferredTier` wins)
|
|
174
174
|
4. Default: sonnet
|
|
175
175
|
|
|
176
|
+
## Child Dispatch: RPC Mode (Phase 1)
|
|
177
|
+
|
|
178
|
+
Since Phase 1 of cleave-process-tree, child processes are spawned in **RPC mode**
|
|
179
|
+
(`--mode rpc --no-session`) by default. This replaces the legacy pipe mode for
|
|
180
|
+
task execution while keeping pipe mode for adversarial review.
|
|
181
|
+
|
|
182
|
+
### How It Works
|
|
183
|
+
|
|
184
|
+
1. The dispatcher spawns the child with `--mode rpc --no-session`
|
|
185
|
+
2. The task prompt is sent as a JSON command on stdin via `sendRpcCommand()`
|
|
186
|
+
3. The child emits structured JSON events on stdout (one per line, JSONL framing)
|
|
187
|
+
4. Events are parsed by `parseRpcEventStream()` and mapped to `RpcProgressUpdate`
|
|
188
|
+
5. Progress updates drive the dashboard in real time (tool starts, lifecycle, errors)
|
|
189
|
+
|
|
190
|
+
### Key Types
|
|
191
|
+
|
|
192
|
+
- **`RpcChildEvent`** — Union of all structured events from the child (agent/turn/message
|
|
193
|
+
lifecycle, tool execution, compaction, retry, pipe_closed sentinel)
|
|
194
|
+
- **`RpcProgressUpdate`** — Dashboard-friendly summary: `{ kind, summary, toolName? }`
|
|
195
|
+
|
|
196
|
+
### The `useRpc` Flag
|
|
197
|
+
|
|
198
|
+
`spawnChild()` accepts `useRpc?: boolean` (default: `true`).
|
|
199
|
+
- **`true`** → RPC mode with structured event streaming and dashboard progress
|
|
200
|
+
- **`false`** → Legacy pipe mode with debounced last-line output
|
|
201
|
+
|
|
202
|
+
### Pipe-Mode Fallback
|
|
203
|
+
|
|
204
|
+
Adversarial review (`review.ts`) continues to use **pipe mode**. RPC mode is used
|
|
205
|
+
only for task execution dispatch. If RPC stdout breaks mid-stream, the parser emits
|
|
206
|
+
a synthetic `pipe_closed` event for graceful degradation.
|
|
207
|
+
|
|
208
|
+
### Task File Contract
|
|
209
|
+
|
|
210
|
+
The task file format (`tasks.md`) is **unchanged** by RPC mode. OpenSpec task parsing,
|
|
211
|
+
dependency markers, spec-domain annotations, and skill annotations all work exactly
|
|
212
|
+
as before. RPC mode changes only the coordination channel between dispatcher and child,
|
|
213
|
+
not the planning or task contract layer.
|
|
214
|
+
|
|
215
|
+
### Phase 1 vs Phase 2
|
|
216
|
+
|
|
217
|
+
| Capability | Phase 1 (current) | Phase 2 (future) |
|
|
218
|
+
|------------|-------------------|-------------------|
|
|
219
|
+
| Dispatch mode | RPC for tasks, pipe for review | RPC for both |
|
|
220
|
+
| Event streaming | Structured JSON on stdout | Same |
|
|
221
|
+
| Dashboard progress | Real-time tool/lifecycle updates | + resource metrics |
|
|
222
|
+
| Graceful degradation | pipe_closed sentinel | + reconnect |
|
|
223
|
+
| Process tree control | spawn + timeout | + pause/resume/cancel |
|
|
224
|
+
|
|
176
225
|
## Architecture
|
|
177
226
|
|
|
178
227
|
```
|
|
@@ -182,15 +231,26 @@ extensions/cleave/
|
|
|
182
231
|
planner.ts — LLM prompt builder, JSON plan parser, wave computation
|
|
183
232
|
openspec.ts — OpenSpec tasks.md parser → ChildPlan[] conversion
|
|
184
233
|
dispatcher.ts — Child process dispatch, AsyncSemaphore, wave execution
|
|
185
|
-
|
|
234
|
+
rpc-child.ts — RPC child communication: JSON framing, event parsing, progress mapping
|
|
235
|
+
review.ts — Adversarial review loop, severity gating, churn detection (pipe mode)
|
|
186
236
|
skills.ts — Skill matching, resolution, model tier hints
|
|
187
237
|
conflicts.ts — 4-step conflict detection (file overlap, decision
|
|
188
238
|
contradiction, interface mismatch, assumption violation)
|
|
189
239
|
workspace.ts — Workspace management under ~/.pi/cleave/
|
|
190
240
|
worktree.ts — Git worktree create/merge/cleanup under ~/.pi/cleave/wt/
|
|
191
|
-
types.ts — Shared type definitions
|
|
241
|
+
types.ts — Shared type definitions (includes RpcChildEvent, RpcProgressUpdate)
|
|
192
242
|
```
|
|
193
243
|
|
|
244
|
+
### Coordination Channel
|
|
245
|
+
|
|
246
|
+
The dispatcher uses RPC mode as the primary coordination channel between the parent
|
|
247
|
+
cleave process and child agent processes. Communication is bidirectional:
|
|
248
|
+
|
|
249
|
+
- **Parent → Child**: JSON commands on stdin (`sendRpcCommand`, `buildPromptCommand`)
|
|
250
|
+
- **Child → Parent**: Structured JSONL events on stdout (`parseRpcEventStream`)
|
|
251
|
+
- **Progress**: Events are mapped to `RpcProgressUpdate` via `mapEventToProgress()`
|
|
252
|
+
and forwarded to the dashboard via `emitCleaveChildProgress()`
|
|
253
|
+
|
|
194
254
|
## Workspace Layout
|
|
195
255
|
|
|
196
256
|
Workspaces and worktrees live outside the target repo:
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* The `node:inspector/promises` module provides an API for interacting with the V8
|
|
3
|
-
* inspector.
|
|
4
|
-
* @see [source](https://github.com/nodejs/node/blob/v25.x/lib/inspector/promises.js)
|
|
5
|
-
* @since v19.0.0
|
|
6
|
-
*/
|
|
7
|
-
declare module "node:inspector/promises" {
|
|
8
|
-
import { EventEmitter } from "node:events";
|
|
9
|
-
export { close, console, NetworkResources, open, url, waitForDebugger } from "node:inspector";
|
|
10
|
-
/**
|
|
11
|
-
* The `inspector.Session` is used for dispatching messages to the V8 inspector
|
|
12
|
-
* back-end and receiving message responses and notifications.
|
|
13
|
-
* @since v19.0.0
|
|
14
|
-
*/
|
|
15
|
-
export class Session extends EventEmitter {
|
|
16
|
-
/**
|
|
17
|
-
* Create a new instance of the inspector.Session class.
|
|
18
|
-
* The inspector session needs to be connected through `session.connect()` before the messages can be dispatched to the inspector backend.
|
|
19
|
-
*/
|
|
20
|
-
constructor();
|
|
21
|
-
/**
|
|
22
|
-
* Connects a session to the inspector back-end.
|
|
23
|
-
*/
|
|
24
|
-
connect(): void;
|
|
25
|
-
/**
|
|
26
|
-
* Connects a session to the inspector back-end.
|
|
27
|
-
* An exception will be thrown if this API was not called on a Worker thread.
|
|
28
|
-
* @since v12.11.0
|
|
29
|
-
*/
|
|
30
|
-
connectToMainThread(): void;
|
|
31
|
-
/**
|
|
32
|
-
* Immediately close the session. All pending message callbacks will be called with an error.
|
|
33
|
-
* `session.connect()` will need to be called to be able to send messages again.
|
|
34
|
-
* Reconnected session will lose all inspector state, such as enabled agents or configured breakpoints.
|
|
35
|
-
*/
|
|
36
|
-
disconnect(): void;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
declare module "inspector/promises" {
|
|
40
|
-
export * from "node:inspector/promises";
|
|
41
|
-
}
|