agent-shim 8.31.0 → 8.33.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/cli.cjs +2020 -135
- package/dist/index.cjs +113 -52
- package/dist/index.mjs +113 -52
- package/dist/types/index.d.ts +788 -35
- package/package.json +2 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import * as trilean from 'trilean';
|
|
2
|
+
import { PredicateNodeSchema } from 'trilean';
|
|
1
3
|
import * as zod from 'zod';
|
|
2
4
|
import { z } from 'zod';
|
|
3
5
|
import { IncomingHttpHeaders, IncomingMessage, ServerResponse } from 'node:http';
|
|
@@ -38,37 +40,232 @@ declare const CategoryMapSchema: z.ZodPipe<z.ZodObject<{
|
|
|
38
40
|
settings?: boolean | undefined;
|
|
39
41
|
}>>;
|
|
40
42
|
/**
|
|
41
|
-
* A
|
|
43
|
+
* A `when` condition, in either form. The object form is the original sugar (every present field must hold); the predicate form is a trilean predicate tree, which expresses OR and NOT and reports a missing fact as indeterminate rather than failed. The two are one union, not a migration: every existing configuration keeps parsing, and `evaluateWhen` gives the object form the same semantics it always had by mapping it onto the equivalent predicates.
|
|
42
44
|
*/
|
|
43
|
-
declare const WhenSchema: z.ZodObject<{
|
|
45
|
+
declare const WhenSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
44
46
|
newerThan: z.ZodOptional<z.ZodString>;
|
|
45
47
|
olderThan: z.ZodOptional<z.ZodString>;
|
|
46
48
|
maxSizeBytes: z.ZodOptional<z.ZodInt>;
|
|
47
49
|
branch: z.ZodOptional<z.ZodString>;
|
|
48
50
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
49
|
-
}, z.core.$strict
|
|
50
|
-
|
|
51
|
+
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
52
|
+
kind: z.ZodLiteral<"not">;
|
|
53
|
+
operand: typeof PredicateNodeSchema;
|
|
54
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
55
|
+
kind: z.ZodLiteral<"and">;
|
|
56
|
+
left: typeof PredicateNodeSchema;
|
|
57
|
+
right: typeof PredicateNodeSchema;
|
|
58
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
59
|
+
kind: z.ZodLiteral<"or">;
|
|
60
|
+
left: typeof PredicateNodeSchema;
|
|
61
|
+
right: typeof PredicateNodeSchema;
|
|
62
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
63
|
+
kind: z.ZodLiteral<"allOf">;
|
|
64
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
65
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
66
|
+
kind: z.ZodLiteral<"anyOf">;
|
|
67
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
68
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
69
|
+
kind: z.ZodLiteral<"compare">;
|
|
70
|
+
op: z.ZodEnum<{
|
|
71
|
+
gt: "gt";
|
|
72
|
+
gte: "gte";
|
|
73
|
+
lt: "lt";
|
|
74
|
+
lte: "lte";
|
|
75
|
+
eq: "eq";
|
|
76
|
+
neq: "neq";
|
|
77
|
+
}>;
|
|
78
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
79
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
80
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
81
|
+
kind: z.ZodLiteral<"textCompare">;
|
|
82
|
+
op: z.ZodEnum<{
|
|
83
|
+
equals: "equals";
|
|
84
|
+
notEquals: "notEquals";
|
|
85
|
+
matches: "matches";
|
|
86
|
+
notMatches: "notMatches";
|
|
87
|
+
portableMatches: "portableMatches";
|
|
88
|
+
portableNotMatches: "portableNotMatches";
|
|
89
|
+
}>;
|
|
90
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
91
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
92
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
93
|
+
kind: z.ZodLiteral<"memberOf">;
|
|
94
|
+
op: z.ZodEnum<{
|
|
95
|
+
in: "in";
|
|
96
|
+
notIn: "notIn";
|
|
97
|
+
}>;
|
|
98
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
99
|
+
candidates: z.ZodArray<typeof trilean.ExpressionNodeSchema>;
|
|
100
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
101
|
+
kind: z.ZodLiteral<"exists">;
|
|
102
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
103
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
104
|
+
kind: z.ZodLiteral<"some">;
|
|
105
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
106
|
+
item: typeof PredicateNodeSchema;
|
|
107
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
108
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
109
|
+
kind: z.ZodLiteral<"every">;
|
|
110
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
111
|
+
item: typeof PredicateNodeSchema;
|
|
112
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
113
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
114
|
+
kind: z.ZodLiteral<"treeReference">;
|
|
115
|
+
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
116
|
+
}, z.core.$strip>], "kind">]>;
|
|
117
|
+
type WhenCondition = z.output<typeof WhenSchema>;
|
|
51
118
|
/** An entries value: a flat boolean, or a boolean guarded by a `when` condition. */
|
|
52
119
|
declare const EntryValueSchema: z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
53
120
|
value: z.ZodBoolean;
|
|
54
|
-
when: z.ZodObject<{
|
|
121
|
+
when: z.ZodUnion<readonly [z.ZodObject<{
|
|
55
122
|
newerThan: z.ZodOptional<z.ZodString>;
|
|
56
123
|
olderThan: z.ZodOptional<z.ZodString>;
|
|
57
124
|
maxSizeBytes: z.ZodOptional<z.ZodInt>;
|
|
58
125
|
branch: z.ZodOptional<z.ZodString>;
|
|
59
126
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
60
|
-
}, z.core.$strict
|
|
127
|
+
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
128
|
+
kind: z.ZodLiteral<"not">;
|
|
129
|
+
operand: typeof PredicateNodeSchema;
|
|
130
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
131
|
+
kind: z.ZodLiteral<"and">;
|
|
132
|
+
left: typeof PredicateNodeSchema;
|
|
133
|
+
right: typeof PredicateNodeSchema;
|
|
134
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
135
|
+
kind: z.ZodLiteral<"or">;
|
|
136
|
+
left: typeof PredicateNodeSchema;
|
|
137
|
+
right: typeof PredicateNodeSchema;
|
|
138
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
139
|
+
kind: z.ZodLiteral<"allOf">;
|
|
140
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
141
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
142
|
+
kind: z.ZodLiteral<"anyOf">;
|
|
143
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
144
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
145
|
+
kind: z.ZodLiteral<"compare">;
|
|
146
|
+
op: z.ZodEnum<{
|
|
147
|
+
gt: "gt";
|
|
148
|
+
gte: "gte";
|
|
149
|
+
lt: "lt";
|
|
150
|
+
lte: "lte";
|
|
151
|
+
eq: "eq";
|
|
152
|
+
neq: "neq";
|
|
153
|
+
}>;
|
|
154
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
155
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
156
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
157
|
+
kind: z.ZodLiteral<"textCompare">;
|
|
158
|
+
op: z.ZodEnum<{
|
|
159
|
+
equals: "equals";
|
|
160
|
+
notEquals: "notEquals";
|
|
161
|
+
matches: "matches";
|
|
162
|
+
notMatches: "notMatches";
|
|
163
|
+
portableMatches: "portableMatches";
|
|
164
|
+
portableNotMatches: "portableNotMatches";
|
|
165
|
+
}>;
|
|
166
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
167
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
168
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
169
|
+
kind: z.ZodLiteral<"memberOf">;
|
|
170
|
+
op: z.ZodEnum<{
|
|
171
|
+
in: "in";
|
|
172
|
+
notIn: "notIn";
|
|
173
|
+
}>;
|
|
174
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
175
|
+
candidates: z.ZodArray<typeof trilean.ExpressionNodeSchema>;
|
|
176
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
177
|
+
kind: z.ZodLiteral<"exists">;
|
|
178
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
179
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
180
|
+
kind: z.ZodLiteral<"some">;
|
|
181
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
182
|
+
item: typeof PredicateNodeSchema;
|
|
183
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
184
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
185
|
+
kind: z.ZodLiteral<"every">;
|
|
186
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
187
|
+
item: typeof PredicateNodeSchema;
|
|
188
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
189
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
190
|
+
kind: z.ZodLiteral<"treeReference">;
|
|
191
|
+
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
192
|
+
}, z.core.$strip>], "kind">]>;
|
|
61
193
|
}, z.core.$strict>]>;
|
|
62
194
|
type EntryValue = z.infer<typeof EntryValueSchema>;
|
|
63
195
|
declare const EntriesSchema: z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
64
196
|
value: z.ZodBoolean;
|
|
65
|
-
when: z.ZodObject<{
|
|
197
|
+
when: z.ZodUnion<readonly [z.ZodObject<{
|
|
66
198
|
newerThan: z.ZodOptional<z.ZodString>;
|
|
67
199
|
olderThan: z.ZodOptional<z.ZodString>;
|
|
68
200
|
maxSizeBytes: z.ZodOptional<z.ZodInt>;
|
|
69
201
|
branch: z.ZodOptional<z.ZodString>;
|
|
70
202
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
71
|
-
}, z.core.$strict
|
|
203
|
+
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
204
|
+
kind: z.ZodLiteral<"not">;
|
|
205
|
+
operand: typeof PredicateNodeSchema;
|
|
206
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
207
|
+
kind: z.ZodLiteral<"and">;
|
|
208
|
+
left: typeof PredicateNodeSchema;
|
|
209
|
+
right: typeof PredicateNodeSchema;
|
|
210
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
211
|
+
kind: z.ZodLiteral<"or">;
|
|
212
|
+
left: typeof PredicateNodeSchema;
|
|
213
|
+
right: typeof PredicateNodeSchema;
|
|
214
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
215
|
+
kind: z.ZodLiteral<"allOf">;
|
|
216
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
217
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
218
|
+
kind: z.ZodLiteral<"anyOf">;
|
|
219
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
220
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
221
|
+
kind: z.ZodLiteral<"compare">;
|
|
222
|
+
op: z.ZodEnum<{
|
|
223
|
+
gt: "gt";
|
|
224
|
+
gte: "gte";
|
|
225
|
+
lt: "lt";
|
|
226
|
+
lte: "lte";
|
|
227
|
+
eq: "eq";
|
|
228
|
+
neq: "neq";
|
|
229
|
+
}>;
|
|
230
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
231
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
232
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
233
|
+
kind: z.ZodLiteral<"textCompare">;
|
|
234
|
+
op: z.ZodEnum<{
|
|
235
|
+
equals: "equals";
|
|
236
|
+
notEquals: "notEquals";
|
|
237
|
+
matches: "matches";
|
|
238
|
+
notMatches: "notMatches";
|
|
239
|
+
portableMatches: "portableMatches";
|
|
240
|
+
portableNotMatches: "portableNotMatches";
|
|
241
|
+
}>;
|
|
242
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
243
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
244
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
245
|
+
kind: z.ZodLiteral<"memberOf">;
|
|
246
|
+
op: z.ZodEnum<{
|
|
247
|
+
in: "in";
|
|
248
|
+
notIn: "notIn";
|
|
249
|
+
}>;
|
|
250
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
251
|
+
candidates: z.ZodArray<typeof trilean.ExpressionNodeSchema>;
|
|
252
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
253
|
+
kind: z.ZodLiteral<"exists">;
|
|
254
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
255
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
256
|
+
kind: z.ZodLiteral<"some">;
|
|
257
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
258
|
+
item: typeof PredicateNodeSchema;
|
|
259
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
260
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
261
|
+
kind: z.ZodLiteral<"every">;
|
|
262
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
263
|
+
item: typeof PredicateNodeSchema;
|
|
264
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
265
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
266
|
+
kind: z.ZodLiteral<"treeReference">;
|
|
267
|
+
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
268
|
+
}, z.core.$strip>], "kind">]>;
|
|
72
269
|
}, z.core.$strict>]>>;
|
|
73
270
|
type Entries = z.infer<typeof EntriesSchema>;
|
|
74
271
|
/** Launch flags, resolved through the same cascade as categories and entries. */
|
|
@@ -334,13 +531,78 @@ declare const ConfigProfileSchema: z.ZodObject<{
|
|
|
334
531
|
}>>>;
|
|
335
532
|
entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
336
533
|
value: z.ZodBoolean;
|
|
337
|
-
when: z.ZodObject<{
|
|
534
|
+
when: z.ZodUnion<readonly [z.ZodObject<{
|
|
338
535
|
newerThan: z.ZodOptional<z.ZodString>;
|
|
339
536
|
olderThan: z.ZodOptional<z.ZodString>;
|
|
340
537
|
maxSizeBytes: z.ZodOptional<z.ZodInt>;
|
|
341
538
|
branch: z.ZodOptional<z.ZodString>;
|
|
342
539
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
343
|
-
}, z.core.$strict
|
|
540
|
+
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
541
|
+
kind: z.ZodLiteral<"not">;
|
|
542
|
+
operand: typeof PredicateNodeSchema;
|
|
543
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
544
|
+
kind: z.ZodLiteral<"and">;
|
|
545
|
+
left: typeof PredicateNodeSchema;
|
|
546
|
+
right: typeof PredicateNodeSchema;
|
|
547
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
548
|
+
kind: z.ZodLiteral<"or">;
|
|
549
|
+
left: typeof PredicateNodeSchema;
|
|
550
|
+
right: typeof PredicateNodeSchema;
|
|
551
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
552
|
+
kind: z.ZodLiteral<"allOf">;
|
|
553
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
554
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
555
|
+
kind: z.ZodLiteral<"anyOf">;
|
|
556
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
557
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
558
|
+
kind: z.ZodLiteral<"compare">;
|
|
559
|
+
op: z.ZodEnum<{
|
|
560
|
+
gt: "gt";
|
|
561
|
+
gte: "gte";
|
|
562
|
+
lt: "lt";
|
|
563
|
+
lte: "lte";
|
|
564
|
+
eq: "eq";
|
|
565
|
+
neq: "neq";
|
|
566
|
+
}>;
|
|
567
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
568
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
569
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
570
|
+
kind: z.ZodLiteral<"textCompare">;
|
|
571
|
+
op: z.ZodEnum<{
|
|
572
|
+
equals: "equals";
|
|
573
|
+
notEquals: "notEquals";
|
|
574
|
+
matches: "matches";
|
|
575
|
+
notMatches: "notMatches";
|
|
576
|
+
portableMatches: "portableMatches";
|
|
577
|
+
portableNotMatches: "portableNotMatches";
|
|
578
|
+
}>;
|
|
579
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
580
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
581
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
582
|
+
kind: z.ZodLiteral<"memberOf">;
|
|
583
|
+
op: z.ZodEnum<{
|
|
584
|
+
in: "in";
|
|
585
|
+
notIn: "notIn";
|
|
586
|
+
}>;
|
|
587
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
588
|
+
candidates: z.ZodArray<typeof trilean.ExpressionNodeSchema>;
|
|
589
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
590
|
+
kind: z.ZodLiteral<"exists">;
|
|
591
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
592
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
593
|
+
kind: z.ZodLiteral<"some">;
|
|
594
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
595
|
+
item: typeof PredicateNodeSchema;
|
|
596
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
597
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
598
|
+
kind: z.ZodLiteral<"every">;
|
|
599
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
600
|
+
item: typeof PredicateNodeSchema;
|
|
601
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
602
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
603
|
+
kind: z.ZodLiteral<"treeReference">;
|
|
604
|
+
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
605
|
+
}, z.core.$strip>], "kind">]>;
|
|
344
606
|
}, z.core.$strict>]>>>;
|
|
345
607
|
launch: z.ZodOptional<z.ZodObject<{
|
|
346
608
|
skipPermissions: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -379,13 +641,78 @@ type Pool = z.infer<typeof PoolSchema>;
|
|
|
379
641
|
declare const DirectoryRuleSchema: z.ZodObject<{
|
|
380
642
|
entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
381
643
|
value: z.ZodBoolean;
|
|
382
|
-
when: z.ZodObject<{
|
|
644
|
+
when: z.ZodUnion<readonly [z.ZodObject<{
|
|
383
645
|
newerThan: z.ZodOptional<z.ZodString>;
|
|
384
646
|
olderThan: z.ZodOptional<z.ZodString>;
|
|
385
647
|
maxSizeBytes: z.ZodOptional<z.ZodInt>;
|
|
386
648
|
branch: z.ZodOptional<z.ZodString>;
|
|
387
649
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
388
|
-
}, z.core.$strict
|
|
650
|
+
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
651
|
+
kind: z.ZodLiteral<"not">;
|
|
652
|
+
operand: typeof PredicateNodeSchema;
|
|
653
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
654
|
+
kind: z.ZodLiteral<"and">;
|
|
655
|
+
left: typeof PredicateNodeSchema;
|
|
656
|
+
right: typeof PredicateNodeSchema;
|
|
657
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
658
|
+
kind: z.ZodLiteral<"or">;
|
|
659
|
+
left: typeof PredicateNodeSchema;
|
|
660
|
+
right: typeof PredicateNodeSchema;
|
|
661
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
662
|
+
kind: z.ZodLiteral<"allOf">;
|
|
663
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
664
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
665
|
+
kind: z.ZodLiteral<"anyOf">;
|
|
666
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
667
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
668
|
+
kind: z.ZodLiteral<"compare">;
|
|
669
|
+
op: z.ZodEnum<{
|
|
670
|
+
gt: "gt";
|
|
671
|
+
gte: "gte";
|
|
672
|
+
lt: "lt";
|
|
673
|
+
lte: "lte";
|
|
674
|
+
eq: "eq";
|
|
675
|
+
neq: "neq";
|
|
676
|
+
}>;
|
|
677
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
678
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
679
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
680
|
+
kind: z.ZodLiteral<"textCompare">;
|
|
681
|
+
op: z.ZodEnum<{
|
|
682
|
+
equals: "equals";
|
|
683
|
+
notEquals: "notEquals";
|
|
684
|
+
matches: "matches";
|
|
685
|
+
notMatches: "notMatches";
|
|
686
|
+
portableMatches: "portableMatches";
|
|
687
|
+
portableNotMatches: "portableNotMatches";
|
|
688
|
+
}>;
|
|
689
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
690
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
691
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
692
|
+
kind: z.ZodLiteral<"memberOf">;
|
|
693
|
+
op: z.ZodEnum<{
|
|
694
|
+
in: "in";
|
|
695
|
+
notIn: "notIn";
|
|
696
|
+
}>;
|
|
697
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
698
|
+
candidates: z.ZodArray<typeof trilean.ExpressionNodeSchema>;
|
|
699
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
700
|
+
kind: z.ZodLiteral<"exists">;
|
|
701
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
702
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
703
|
+
kind: z.ZodLiteral<"some">;
|
|
704
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
705
|
+
item: typeof PredicateNodeSchema;
|
|
706
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
707
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
708
|
+
kind: z.ZodLiteral<"every">;
|
|
709
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
710
|
+
item: typeof PredicateNodeSchema;
|
|
711
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
712
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
713
|
+
kind: z.ZodLiteral<"treeReference">;
|
|
714
|
+
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
715
|
+
}, z.core.$strip>], "kind">]>;
|
|
389
716
|
}, z.core.$strict>]>>>;
|
|
390
717
|
launch: z.ZodOptional<z.ZodObject<{
|
|
391
718
|
skipPermissions: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -413,13 +740,78 @@ declare const DirectoryRuleSchema: z.ZodObject<{
|
|
|
413
740
|
path: z.ZodString;
|
|
414
741
|
configProfile: z.ZodOptional<z.ZodString>;
|
|
415
742
|
identity: z.ZodOptional<z.ZodString>;
|
|
416
|
-
when: z.ZodOptional<z.ZodObject<{
|
|
743
|
+
when: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
417
744
|
newerThan: z.ZodOptional<z.ZodString>;
|
|
418
745
|
olderThan: z.ZodOptional<z.ZodString>;
|
|
419
746
|
maxSizeBytes: z.ZodOptional<z.ZodInt>;
|
|
420
747
|
branch: z.ZodOptional<z.ZodString>;
|
|
421
748
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
422
|
-
}, z.core.$strict
|
|
749
|
+
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
750
|
+
kind: z.ZodLiteral<"not">;
|
|
751
|
+
operand: typeof PredicateNodeSchema;
|
|
752
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
753
|
+
kind: z.ZodLiteral<"and">;
|
|
754
|
+
left: typeof PredicateNodeSchema;
|
|
755
|
+
right: typeof PredicateNodeSchema;
|
|
756
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
757
|
+
kind: z.ZodLiteral<"or">;
|
|
758
|
+
left: typeof PredicateNodeSchema;
|
|
759
|
+
right: typeof PredicateNodeSchema;
|
|
760
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
761
|
+
kind: z.ZodLiteral<"allOf">;
|
|
762
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
763
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
764
|
+
kind: z.ZodLiteral<"anyOf">;
|
|
765
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
766
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
767
|
+
kind: z.ZodLiteral<"compare">;
|
|
768
|
+
op: z.ZodEnum<{
|
|
769
|
+
gt: "gt";
|
|
770
|
+
gte: "gte";
|
|
771
|
+
lt: "lt";
|
|
772
|
+
lte: "lte";
|
|
773
|
+
eq: "eq";
|
|
774
|
+
neq: "neq";
|
|
775
|
+
}>;
|
|
776
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
777
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
778
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
779
|
+
kind: z.ZodLiteral<"textCompare">;
|
|
780
|
+
op: z.ZodEnum<{
|
|
781
|
+
equals: "equals";
|
|
782
|
+
notEquals: "notEquals";
|
|
783
|
+
matches: "matches";
|
|
784
|
+
notMatches: "notMatches";
|
|
785
|
+
portableMatches: "portableMatches";
|
|
786
|
+
portableNotMatches: "portableNotMatches";
|
|
787
|
+
}>;
|
|
788
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
789
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
790
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
791
|
+
kind: z.ZodLiteral<"memberOf">;
|
|
792
|
+
op: z.ZodEnum<{
|
|
793
|
+
in: "in";
|
|
794
|
+
notIn: "notIn";
|
|
795
|
+
}>;
|
|
796
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
797
|
+
candidates: z.ZodArray<typeof trilean.ExpressionNodeSchema>;
|
|
798
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
799
|
+
kind: z.ZodLiteral<"exists">;
|
|
800
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
801
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
802
|
+
kind: z.ZodLiteral<"some">;
|
|
803
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
804
|
+
item: typeof PredicateNodeSchema;
|
|
805
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
806
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
807
|
+
kind: z.ZodLiteral<"every">;
|
|
808
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
809
|
+
item: typeof PredicateNodeSchema;
|
|
810
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
811
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
812
|
+
kind: z.ZodLiteral<"treeReference">;
|
|
813
|
+
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
814
|
+
}, z.core.$strip>], "kind">]>>;
|
|
423
815
|
}, z.core.$strict>;
|
|
424
816
|
type DirectoryRule = z.infer<typeof DirectoryRuleSchema>;
|
|
425
817
|
/** The `~/.agent-shim/directory-rules.json` file. */
|
|
@@ -428,13 +820,78 @@ declare const DirectoryRulesSchema: z.ZodObject<{
|
|
|
428
820
|
rules: z.ZodArray<z.ZodObject<{
|
|
429
821
|
entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
430
822
|
value: z.ZodBoolean;
|
|
431
|
-
when: z.ZodObject<{
|
|
823
|
+
when: z.ZodUnion<readonly [z.ZodObject<{
|
|
432
824
|
newerThan: z.ZodOptional<z.ZodString>;
|
|
433
825
|
olderThan: z.ZodOptional<z.ZodString>;
|
|
434
826
|
maxSizeBytes: z.ZodOptional<z.ZodInt>;
|
|
435
827
|
branch: z.ZodOptional<z.ZodString>;
|
|
436
828
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
437
|
-
}, z.core.$strict
|
|
829
|
+
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
830
|
+
kind: z.ZodLiteral<"not">;
|
|
831
|
+
operand: typeof PredicateNodeSchema;
|
|
832
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
833
|
+
kind: z.ZodLiteral<"and">;
|
|
834
|
+
left: typeof PredicateNodeSchema;
|
|
835
|
+
right: typeof PredicateNodeSchema;
|
|
836
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
837
|
+
kind: z.ZodLiteral<"or">;
|
|
838
|
+
left: typeof PredicateNodeSchema;
|
|
839
|
+
right: typeof PredicateNodeSchema;
|
|
840
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
841
|
+
kind: z.ZodLiteral<"allOf">;
|
|
842
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
843
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
844
|
+
kind: z.ZodLiteral<"anyOf">;
|
|
845
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
846
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
847
|
+
kind: z.ZodLiteral<"compare">;
|
|
848
|
+
op: z.ZodEnum<{
|
|
849
|
+
gt: "gt";
|
|
850
|
+
gte: "gte";
|
|
851
|
+
lt: "lt";
|
|
852
|
+
lte: "lte";
|
|
853
|
+
eq: "eq";
|
|
854
|
+
neq: "neq";
|
|
855
|
+
}>;
|
|
856
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
857
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
858
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
859
|
+
kind: z.ZodLiteral<"textCompare">;
|
|
860
|
+
op: z.ZodEnum<{
|
|
861
|
+
equals: "equals";
|
|
862
|
+
notEquals: "notEquals";
|
|
863
|
+
matches: "matches";
|
|
864
|
+
notMatches: "notMatches";
|
|
865
|
+
portableMatches: "portableMatches";
|
|
866
|
+
portableNotMatches: "portableNotMatches";
|
|
867
|
+
}>;
|
|
868
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
869
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
870
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
871
|
+
kind: z.ZodLiteral<"memberOf">;
|
|
872
|
+
op: z.ZodEnum<{
|
|
873
|
+
in: "in";
|
|
874
|
+
notIn: "notIn";
|
|
875
|
+
}>;
|
|
876
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
877
|
+
candidates: z.ZodArray<typeof trilean.ExpressionNodeSchema>;
|
|
878
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
879
|
+
kind: z.ZodLiteral<"exists">;
|
|
880
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
881
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
882
|
+
kind: z.ZodLiteral<"some">;
|
|
883
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
884
|
+
item: typeof PredicateNodeSchema;
|
|
885
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
886
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
887
|
+
kind: z.ZodLiteral<"every">;
|
|
888
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
889
|
+
item: typeof PredicateNodeSchema;
|
|
890
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
891
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
892
|
+
kind: z.ZodLiteral<"treeReference">;
|
|
893
|
+
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
894
|
+
}, z.core.$strip>], "kind">]>;
|
|
438
895
|
}, z.core.$strict>]>>>;
|
|
439
896
|
launch: z.ZodOptional<z.ZodObject<{
|
|
440
897
|
skipPermissions: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -462,13 +919,78 @@ declare const DirectoryRulesSchema: z.ZodObject<{
|
|
|
462
919
|
path: z.ZodString;
|
|
463
920
|
configProfile: z.ZodOptional<z.ZodString>;
|
|
464
921
|
identity: z.ZodOptional<z.ZodString>;
|
|
465
|
-
when: z.ZodOptional<z.ZodObject<{
|
|
922
|
+
when: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
466
923
|
newerThan: z.ZodOptional<z.ZodString>;
|
|
467
924
|
olderThan: z.ZodOptional<z.ZodString>;
|
|
468
925
|
maxSizeBytes: z.ZodOptional<z.ZodInt>;
|
|
469
926
|
branch: z.ZodOptional<z.ZodString>;
|
|
470
927
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
471
|
-
}, z.core.$strict
|
|
928
|
+
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
929
|
+
kind: z.ZodLiteral<"not">;
|
|
930
|
+
operand: typeof PredicateNodeSchema;
|
|
931
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
932
|
+
kind: z.ZodLiteral<"and">;
|
|
933
|
+
left: typeof PredicateNodeSchema;
|
|
934
|
+
right: typeof PredicateNodeSchema;
|
|
935
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
936
|
+
kind: z.ZodLiteral<"or">;
|
|
937
|
+
left: typeof PredicateNodeSchema;
|
|
938
|
+
right: typeof PredicateNodeSchema;
|
|
939
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
940
|
+
kind: z.ZodLiteral<"allOf">;
|
|
941
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
942
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
943
|
+
kind: z.ZodLiteral<"anyOf">;
|
|
944
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
945
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
946
|
+
kind: z.ZodLiteral<"compare">;
|
|
947
|
+
op: z.ZodEnum<{
|
|
948
|
+
gt: "gt";
|
|
949
|
+
gte: "gte";
|
|
950
|
+
lt: "lt";
|
|
951
|
+
lte: "lte";
|
|
952
|
+
eq: "eq";
|
|
953
|
+
neq: "neq";
|
|
954
|
+
}>;
|
|
955
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
956
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
957
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
958
|
+
kind: z.ZodLiteral<"textCompare">;
|
|
959
|
+
op: z.ZodEnum<{
|
|
960
|
+
equals: "equals";
|
|
961
|
+
notEquals: "notEquals";
|
|
962
|
+
matches: "matches";
|
|
963
|
+
notMatches: "notMatches";
|
|
964
|
+
portableMatches: "portableMatches";
|
|
965
|
+
portableNotMatches: "portableNotMatches";
|
|
966
|
+
}>;
|
|
967
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
968
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
969
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
970
|
+
kind: z.ZodLiteral<"memberOf">;
|
|
971
|
+
op: z.ZodEnum<{
|
|
972
|
+
in: "in";
|
|
973
|
+
notIn: "notIn";
|
|
974
|
+
}>;
|
|
975
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
976
|
+
candidates: z.ZodArray<typeof trilean.ExpressionNodeSchema>;
|
|
977
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
978
|
+
kind: z.ZodLiteral<"exists">;
|
|
979
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
980
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
981
|
+
kind: z.ZodLiteral<"some">;
|
|
982
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
983
|
+
item: typeof PredicateNodeSchema;
|
|
984
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
985
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
986
|
+
kind: z.ZodLiteral<"every">;
|
|
987
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
988
|
+
item: typeof PredicateNodeSchema;
|
|
989
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
990
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
991
|
+
kind: z.ZodLiteral<"treeReference">;
|
|
992
|
+
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
993
|
+
}, z.core.$strip>], "kind">]>>;
|
|
472
994
|
}, z.core.$strict>>;
|
|
473
995
|
}, z.core.$strict>;
|
|
474
996
|
type DirectoryRules = z.infer<typeof DirectoryRulesSchema>;
|
|
@@ -478,13 +1000,78 @@ type DirectoryRules = z.infer<typeof DirectoryRulesSchema>;
|
|
|
478
1000
|
declare const PortableConfigSchema: z.ZodObject<{
|
|
479
1001
|
entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
480
1002
|
value: z.ZodBoolean;
|
|
481
|
-
when: z.ZodObject<{
|
|
1003
|
+
when: z.ZodUnion<readonly [z.ZodObject<{
|
|
482
1004
|
newerThan: z.ZodOptional<z.ZodString>;
|
|
483
1005
|
olderThan: z.ZodOptional<z.ZodString>;
|
|
484
1006
|
maxSizeBytes: z.ZodOptional<z.ZodInt>;
|
|
485
1007
|
branch: z.ZodOptional<z.ZodString>;
|
|
486
1008
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
487
|
-
}, z.core.$strict
|
|
1009
|
+
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1010
|
+
kind: z.ZodLiteral<"not">;
|
|
1011
|
+
operand: typeof PredicateNodeSchema;
|
|
1012
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1013
|
+
kind: z.ZodLiteral<"and">;
|
|
1014
|
+
left: typeof PredicateNodeSchema;
|
|
1015
|
+
right: typeof PredicateNodeSchema;
|
|
1016
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1017
|
+
kind: z.ZodLiteral<"or">;
|
|
1018
|
+
left: typeof PredicateNodeSchema;
|
|
1019
|
+
right: typeof PredicateNodeSchema;
|
|
1020
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1021
|
+
kind: z.ZodLiteral<"allOf">;
|
|
1022
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
1023
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1024
|
+
kind: z.ZodLiteral<"anyOf">;
|
|
1025
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
1026
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1027
|
+
kind: z.ZodLiteral<"compare">;
|
|
1028
|
+
op: z.ZodEnum<{
|
|
1029
|
+
gt: "gt";
|
|
1030
|
+
gte: "gte";
|
|
1031
|
+
lt: "lt";
|
|
1032
|
+
lte: "lte";
|
|
1033
|
+
eq: "eq";
|
|
1034
|
+
neq: "neq";
|
|
1035
|
+
}>;
|
|
1036
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
1037
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
1038
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1039
|
+
kind: z.ZodLiteral<"textCompare">;
|
|
1040
|
+
op: z.ZodEnum<{
|
|
1041
|
+
equals: "equals";
|
|
1042
|
+
notEquals: "notEquals";
|
|
1043
|
+
matches: "matches";
|
|
1044
|
+
notMatches: "notMatches";
|
|
1045
|
+
portableMatches: "portableMatches";
|
|
1046
|
+
portableNotMatches: "portableNotMatches";
|
|
1047
|
+
}>;
|
|
1048
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
1049
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
1050
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1051
|
+
kind: z.ZodLiteral<"memberOf">;
|
|
1052
|
+
op: z.ZodEnum<{
|
|
1053
|
+
in: "in";
|
|
1054
|
+
notIn: "notIn";
|
|
1055
|
+
}>;
|
|
1056
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
1057
|
+
candidates: z.ZodArray<typeof trilean.ExpressionNodeSchema>;
|
|
1058
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1059
|
+
kind: z.ZodLiteral<"exists">;
|
|
1060
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
1061
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1062
|
+
kind: z.ZodLiteral<"some">;
|
|
1063
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
1064
|
+
item: typeof PredicateNodeSchema;
|
|
1065
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
1066
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1067
|
+
kind: z.ZodLiteral<"every">;
|
|
1068
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
1069
|
+
item: typeof PredicateNodeSchema;
|
|
1070
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
1071
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1072
|
+
kind: z.ZodLiteral<"treeReference">;
|
|
1073
|
+
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
1074
|
+
}, z.core.$strip>], "kind">]>;
|
|
488
1075
|
}, z.core.$strict>]>>>;
|
|
489
1076
|
launch: z.ZodOptional<z.ZodObject<{
|
|
490
1077
|
skipPermissions: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -511,13 +1098,78 @@ declare const PortableConfigSchema: z.ZodObject<{
|
|
|
511
1098
|
}>>>;
|
|
512
1099
|
configProfile: z.ZodOptional<z.ZodString>;
|
|
513
1100
|
identity: z.ZodOptional<z.ZodString>;
|
|
514
|
-
when: z.ZodOptional<z.ZodObject<{
|
|
1101
|
+
when: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
|
|
515
1102
|
newerThan: z.ZodOptional<z.ZodString>;
|
|
516
1103
|
olderThan: z.ZodOptional<z.ZodString>;
|
|
517
1104
|
maxSizeBytes: z.ZodOptional<z.ZodInt>;
|
|
518
1105
|
branch: z.ZodOptional<z.ZodString>;
|
|
519
1106
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
520
|
-
}, z.core.$strict
|
|
1107
|
+
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1108
|
+
kind: z.ZodLiteral<"not">;
|
|
1109
|
+
operand: typeof PredicateNodeSchema;
|
|
1110
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1111
|
+
kind: z.ZodLiteral<"and">;
|
|
1112
|
+
left: typeof PredicateNodeSchema;
|
|
1113
|
+
right: typeof PredicateNodeSchema;
|
|
1114
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1115
|
+
kind: z.ZodLiteral<"or">;
|
|
1116
|
+
left: typeof PredicateNodeSchema;
|
|
1117
|
+
right: typeof PredicateNodeSchema;
|
|
1118
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1119
|
+
kind: z.ZodLiteral<"allOf">;
|
|
1120
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
1121
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1122
|
+
kind: z.ZodLiteral<"anyOf">;
|
|
1123
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
1124
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1125
|
+
kind: z.ZodLiteral<"compare">;
|
|
1126
|
+
op: z.ZodEnum<{
|
|
1127
|
+
gt: "gt";
|
|
1128
|
+
gte: "gte";
|
|
1129
|
+
lt: "lt";
|
|
1130
|
+
lte: "lte";
|
|
1131
|
+
eq: "eq";
|
|
1132
|
+
neq: "neq";
|
|
1133
|
+
}>;
|
|
1134
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
1135
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
1136
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1137
|
+
kind: z.ZodLiteral<"textCompare">;
|
|
1138
|
+
op: z.ZodEnum<{
|
|
1139
|
+
equals: "equals";
|
|
1140
|
+
notEquals: "notEquals";
|
|
1141
|
+
matches: "matches";
|
|
1142
|
+
notMatches: "notMatches";
|
|
1143
|
+
portableMatches: "portableMatches";
|
|
1144
|
+
portableNotMatches: "portableNotMatches";
|
|
1145
|
+
}>;
|
|
1146
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
1147
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
1148
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1149
|
+
kind: z.ZodLiteral<"memberOf">;
|
|
1150
|
+
op: z.ZodEnum<{
|
|
1151
|
+
in: "in";
|
|
1152
|
+
notIn: "notIn";
|
|
1153
|
+
}>;
|
|
1154
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
1155
|
+
candidates: z.ZodArray<typeof trilean.ExpressionNodeSchema>;
|
|
1156
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1157
|
+
kind: z.ZodLiteral<"exists">;
|
|
1158
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
1159
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1160
|
+
kind: z.ZodLiteral<"some">;
|
|
1161
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
1162
|
+
item: typeof PredicateNodeSchema;
|
|
1163
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
1164
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1165
|
+
kind: z.ZodLiteral<"every">;
|
|
1166
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
1167
|
+
item: typeof PredicateNodeSchema;
|
|
1168
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
1169
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1170
|
+
kind: z.ZodLiteral<"treeReference">;
|
|
1171
|
+
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
1172
|
+
}, z.core.$strip>], "kind">]>>;
|
|
521
1173
|
}, z.core.$strict>;
|
|
522
1174
|
type PortableConfig = z.infer<typeof PortableConfigSchema>;
|
|
523
1175
|
declare const HeadroomGlobalConfigSchema: z.ZodObject<{
|
|
@@ -567,13 +1219,78 @@ declare const GlobalConfigSchema: z.ZodObject<{
|
|
|
567
1219
|
}>>>;
|
|
568
1220
|
entries: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodBoolean, z.ZodObject<{
|
|
569
1221
|
value: z.ZodBoolean;
|
|
570
|
-
when: z.ZodObject<{
|
|
1222
|
+
when: z.ZodUnion<readonly [z.ZodObject<{
|
|
571
1223
|
newerThan: z.ZodOptional<z.ZodString>;
|
|
572
1224
|
olderThan: z.ZodOptional<z.ZodString>;
|
|
573
1225
|
maxSizeBytes: z.ZodOptional<z.ZodInt>;
|
|
574
1226
|
branch: z.ZodOptional<z.ZodString>;
|
|
575
1227
|
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
576
|
-
}, z.core.$strict
|
|
1228
|
+
}, z.core.$strict>, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1229
|
+
kind: z.ZodLiteral<"not">;
|
|
1230
|
+
operand: typeof PredicateNodeSchema;
|
|
1231
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1232
|
+
kind: z.ZodLiteral<"and">;
|
|
1233
|
+
left: typeof PredicateNodeSchema;
|
|
1234
|
+
right: typeof PredicateNodeSchema;
|
|
1235
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1236
|
+
kind: z.ZodLiteral<"or">;
|
|
1237
|
+
left: typeof PredicateNodeSchema;
|
|
1238
|
+
right: typeof PredicateNodeSchema;
|
|
1239
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1240
|
+
kind: z.ZodLiteral<"allOf">;
|
|
1241
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
1242
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1243
|
+
kind: z.ZodLiteral<"anyOf">;
|
|
1244
|
+
operands: z.ZodArray<typeof PredicateNodeSchema>;
|
|
1245
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1246
|
+
kind: z.ZodLiteral<"compare">;
|
|
1247
|
+
op: z.ZodEnum<{
|
|
1248
|
+
gt: "gt";
|
|
1249
|
+
gte: "gte";
|
|
1250
|
+
lt: "lt";
|
|
1251
|
+
lte: "lte";
|
|
1252
|
+
eq: "eq";
|
|
1253
|
+
neq: "neq";
|
|
1254
|
+
}>;
|
|
1255
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
1256
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
1257
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1258
|
+
kind: z.ZodLiteral<"textCompare">;
|
|
1259
|
+
op: z.ZodEnum<{
|
|
1260
|
+
equals: "equals";
|
|
1261
|
+
notEquals: "notEquals";
|
|
1262
|
+
matches: "matches";
|
|
1263
|
+
notMatches: "notMatches";
|
|
1264
|
+
portableMatches: "portableMatches";
|
|
1265
|
+
portableNotMatches: "portableNotMatches";
|
|
1266
|
+
}>;
|
|
1267
|
+
left: typeof trilean.ExpressionNodeSchema;
|
|
1268
|
+
right: typeof trilean.ExpressionNodeSchema;
|
|
1269
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1270
|
+
kind: z.ZodLiteral<"memberOf">;
|
|
1271
|
+
op: z.ZodEnum<{
|
|
1272
|
+
in: "in";
|
|
1273
|
+
notIn: "notIn";
|
|
1274
|
+
}>;
|
|
1275
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
1276
|
+
candidates: z.ZodArray<typeof trilean.ExpressionNodeSchema>;
|
|
1277
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1278
|
+
kind: z.ZodLiteral<"exists">;
|
|
1279
|
+
operand: typeof trilean.ExpressionNodeSchema;
|
|
1280
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1281
|
+
kind: z.ZodLiteral<"some">;
|
|
1282
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
1283
|
+
item: typeof PredicateNodeSchema;
|
|
1284
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
1285
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1286
|
+
kind: z.ZodLiteral<"every">;
|
|
1287
|
+
collection: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
1288
|
+
item: typeof PredicateNodeSchema;
|
|
1289
|
+
filter: z.ZodOptional<typeof PredicateNodeSchema>;
|
|
1290
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1291
|
+
kind: z.ZodLiteral<"treeReference">;
|
|
1292
|
+
key: z.ZodType<trilean.JsonValue, unknown, z.core.$ZodTypeInternals<trilean.JsonValue, unknown>>;
|
|
1293
|
+
}, z.core.$strip>], "kind">]>;
|
|
577
1294
|
}, z.core.$strict>]>>>;
|
|
578
1295
|
launch: z.ZodOptional<z.ZodObject<{
|
|
579
1296
|
skipPermissions: z.ZodOptional<z.ZodBoolean>;
|
|
@@ -2816,6 +3533,10 @@ declare const CheckReportJsonSchema: z.ZodObject<{
|
|
|
2816
3533
|
identity: z.ZodString;
|
|
2817
3534
|
at: z.ZodISODateTime;
|
|
2818
3535
|
}, z.core.$strict>>;
|
|
3536
|
+
movedOff: z.ZodOptional<z.ZodObject<{
|
|
3537
|
+
identity: z.ZodString;
|
|
3538
|
+
reason: z.ZodString;
|
|
3539
|
+
}, z.core.$strict>>;
|
|
2819
3540
|
stickyProblem: z.ZodOptional<z.ZodString>;
|
|
2820
3541
|
}, z.core.$strict>>;
|
|
2821
3542
|
configProfile: z.ZodObject<{
|
|
@@ -3293,6 +4014,10 @@ declare const PoolPickReportSchema: z.ZodObject<{
|
|
|
3293
4014
|
identity: z.ZodString;
|
|
3294
4015
|
at: z.ZodISODateTime;
|
|
3295
4016
|
}, z.core.$strict>>;
|
|
4017
|
+
movedOff: z.ZodOptional<z.ZodObject<{
|
|
4018
|
+
identity: z.ZodString;
|
|
4019
|
+
reason: z.ZodString;
|
|
4020
|
+
}, z.core.$strict>>;
|
|
3296
4021
|
stickyProblem: z.ZodOptional<z.ZodString>;
|
|
3297
4022
|
}, z.core.$strict>;
|
|
3298
4023
|
type PoolPickReport = z.infer<typeof PoolPickReportSchema>;
|
|
@@ -4240,6 +4965,10 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
|
|
|
4240
4965
|
identity: zod.ZodString;
|
|
4241
4966
|
at: zod.ZodISODateTime;
|
|
4242
4967
|
}, zod_v4_core.$strict>>;
|
|
4968
|
+
movedOff: zod.ZodOptional<zod.ZodObject<{
|
|
4969
|
+
identity: zod.ZodString;
|
|
4970
|
+
reason: zod.ZodString;
|
|
4971
|
+
}, zod_v4_core.$strict>>;
|
|
4243
4972
|
stickyProblem: zod.ZodOptional<zod.ZodString>;
|
|
4244
4973
|
}, zod_v4_core.$strict>>;
|
|
4245
4974
|
configProfile: zod.ZodObject<{
|
|
@@ -4557,6 +5286,10 @@ declare function createControlApiRouter(deps: ControlApiDeps): {
|
|
|
4557
5286
|
identity: zod.ZodString;
|
|
4558
5287
|
at: zod.ZodISODateTime;
|
|
4559
5288
|
}, zod_v4_core.$strict>>;
|
|
5289
|
+
movedOff: zod.ZodOptional<zod.ZodObject<{
|
|
5290
|
+
identity: zod.ZodString;
|
|
5291
|
+
reason: zod.ZodString;
|
|
5292
|
+
}, zod_v4_core.$strict>>;
|
|
4560
5293
|
stickyProblem: zod.ZodOptional<zod.ZodString>;
|
|
4561
5294
|
}, zod_v4_core.$strict>, Record<never, never>, Record<never, never>>;
|
|
4562
5295
|
};
|
|
@@ -4813,6 +5546,10 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
4813
5546
|
identity: zod.ZodString;
|
|
4814
5547
|
at: zod.ZodISODateTime;
|
|
4815
5548
|
}, zod_v4_core.$strict>>;
|
|
5549
|
+
movedOff: zod.ZodOptional<zod.ZodObject<{
|
|
5550
|
+
identity: zod.ZodString;
|
|
5551
|
+
reason: zod.ZodString;
|
|
5552
|
+
}, zod_v4_core.$strict>>;
|
|
4816
5553
|
stickyProblem: zod.ZodOptional<zod.ZodString>;
|
|
4817
5554
|
}, zod_v4_core.$strict>>;
|
|
4818
5555
|
configProfile: zod.ZodObject<{
|
|
@@ -5130,6 +5867,10 @@ declare function createDoorApiRouter(deps: DoorApiDeps): {
|
|
|
5130
5867
|
identity: zod.ZodString;
|
|
5131
5868
|
at: zod.ZodISODateTime;
|
|
5132
5869
|
}, zod_v4_core.$strict>>;
|
|
5870
|
+
movedOff: zod.ZodOptional<zod.ZodObject<{
|
|
5871
|
+
identity: zod.ZodString;
|
|
5872
|
+
reason: zod.ZodString;
|
|
5873
|
+
}, zod_v4_core.$strict>>;
|
|
5133
5874
|
stickyProblem: zod.ZodOptional<zod.ZodString>;
|
|
5134
5875
|
}, zod_v4_core.$strict>, Record<never, never>, Record<never, never>>;
|
|
5135
5876
|
};
|
|
@@ -6065,7 +6806,7 @@ interface Candidate {
|
|
|
6065
6806
|
readonly class: CandidateClass;
|
|
6066
6807
|
/** Plan-size-weighted remaining quota per hour until its reset: higher is more wasted if left unused. Present for `scored` only. */
|
|
6067
6808
|
readonly score?: number;
|
|
6068
|
-
/** False when
|
|
6809
|
+
/** False when a quota window would run dry, at the observed pace, before it resets (the five-hour at its own or the rescaled shared pace, the seven-day at its own). A `scored` candidate that is not feasible ranks below every feasible one. */
|
|
6069
6810
|
readonly feasible: boolean;
|
|
6070
6811
|
/** When an `ineligible` candidate can be used again. */
|
|
6071
6812
|
readonly blockedUntilMs?: number;
|
|
@@ -6083,11 +6824,16 @@ interface PoolRanking {
|
|
|
6083
6824
|
readonly identity: string;
|
|
6084
6825
|
readonly atMs: number;
|
|
6085
6826
|
};
|
|
6827
|
+
/** The member a resumed or continued conversation started on but moved off, and why, when a launch that resumes could not keep it. One sentence for the launch decision line and `check`. */
|
|
6828
|
+
readonly movedOff?: {
|
|
6829
|
+
readonly identity: string;
|
|
6830
|
+
readonly reason: string;
|
|
6831
|
+
};
|
|
6086
6832
|
}
|
|
6087
6833
|
/**
|
|
6088
6834
|
* Ranks `members` for a launch.
|
|
6089
6835
|
*
|
|
6090
|
-
* A member is `ineligible` while a window of its plan, or a refusal it last hit, still binds; it is `unknown` without recorded quota, `pay-per-use` when its usage bills by use, and otherwise `scored`. Scored members order by how much plan-size-weighted quota would expire unused per hour of runway, with any whose five-hour window would run dry at the observed pace (their own, or the person's pace on another member rescaled by plan size) placed behind those that would not. The member last picked for this directory then moves to the front if it is
|
|
6836
|
+
* A member is `ineligible` while a window of its plan, or a refusal it last hit, still binds; it is `unknown` without recorded quota, `pay-per-use` when its usage bills by use, and otherwise `scored`. Scored members order by how much plan-size-weighted quota would expire unused per hour of runway, with any whose five-hour window would run dry at the observed pace (their own, or the person's pace on another member rescaled by plan size) or whose seven-day window would run dry at its own observed pace placed behind those that would not. The member last picked for this directory then moves to the front if it still serves on plan quota and is not projected to run dry, and either the launch resumes a conversation or its prompt cache is still warm; a resumed conversation that cannot keep its member re-ranks and continues on the pick, with the move named in `movedOff`.
|
|
6091
6837
|
*
|
|
6092
6838
|
* How members are ordered depends on `preference`. The default, "score", is the order above: class first, then feasibility, then score, with ties by name. "listed" keeps the order of `members`, which callers build in pool member order, so member order, not class, decides: an `unknown` (no usage recorded) or `pay-per-use` member can be picked before a later `scored` one, which is the list owner's stated preference, and a `scored` member that is not feasible keeps its place and its reason line rather than being demoted. In both modes the pick is the first non-`ineligible` candidate, `earliestReturn` still reports the soonest returning refused member, and the sticky-pick promotion applies unchanged.
|
|
6093
6839
|
*/
|
|
@@ -6117,20 +6863,27 @@ interface ConditionContext {
|
|
|
6117
6863
|
readonly branchDetached?: boolean;
|
|
6118
6864
|
readonly env: Readonly<Record<string, string | undefined>>;
|
|
6119
6865
|
}
|
|
6120
|
-
/**
|
|
6121
|
-
|
|
6122
|
-
|
|
6123
|
-
|
|
6124
|
-
readonly
|
|
6125
|
-
/** Which
|
|
6866
|
+
/**
|
|
6867
|
+
* The result of evaluating one `when`: definite, with which condition fields were present and which of those did not hold, or indeterminate, when a datum the condition needed is missing. Indeterminate is not false: a missing fact has not failed the condition, it has left it undecided, and the consumer decides what an undecided entry does (the resolver keeps today's behaviour of not passing it, so nothing changes for existing configurations; the pool ranking of #258 instead keeps such a member but ranks it last, naming the missing fact).
|
|
6868
|
+
*/
|
|
6869
|
+
type WhenEvaluation = {
|
|
6870
|
+
readonly status: "definite";
|
|
6871
|
+
readonly passed: boolean; /** Which condition fields were present and evaluated. */
|
|
6872
|
+
readonly checked: readonly string[]; /** Which of those fields did not hold. Empty when `passed` is true. */
|
|
6126
6873
|
readonly failed: readonly string[];
|
|
6127
|
-
}
|
|
6874
|
+
} | {
|
|
6875
|
+
readonly status: "indeterminate"; /** What was missing or wrong, in the evaluation's own words. */
|
|
6876
|
+
readonly reason: string;
|
|
6877
|
+
readonly checked: readonly string[];
|
|
6878
|
+
};
|
|
6128
6879
|
/** True when `branch` matches `pattern`. The pattern is glob-capable (`client/*`); a detached HEAD or a non-repository directory never matches. */
|
|
6129
6880
|
declare function matchBranch(pattern: string, branch: string | undefined, detached?: boolean): boolean;
|
|
6130
6881
|
/**
|
|
6131
|
-
* Evaluates a `when
|
|
6882
|
+
* Evaluates a `when`, in either of its two forms.
|
|
6883
|
+
*
|
|
6884
|
+
* The object form (`newerThan`, `olderThan`, `maxSizeBytes`, `branch`, `env`) is the original configuration sugar: every present field must hold, which is the AND of the field predicates above. It is kept unchanged, so no configuration migrates, and its per-field reporting (`checked`, `failed`) survives exactly as before.
|
|
6132
6885
|
*
|
|
6133
|
-
*
|
|
6886
|
+
* The predicate form is a trilean predicate tree, evaluated by the package's own synchronous evaluator over the reference namespace `resolversOf` documents: `and`/`or`/`not` compose, comparisons and text matches read the facts, and a reference the context cannot answer makes the evaluation indeterminate rather than false. A predicate form is reported as one condition (`checked: ["predicate"]`), because a tree has no per-field breakdown to give.
|
|
6134
6887
|
*
|
|
6135
6888
|
* `newerThan`, `olderThan`, and `maxSizeBytes` read the subtree-aggregated facts (`latestMtimeMs`, `totalSizeBytes`), never the entry's own inode stat: a directory's own mtime does not change when a file three levels beneath it is rewritten, and its own size is a ~4KB inode figure that says nothing about what it contains.
|
|
6136
6889
|
*/
|