@quantiya/codevibe-core 2.0.90 → 2.0.91
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/companion-mode/codex-native-state.d.ts +414 -21
- package/dist/index.d.ts +1 -1
- package/dist/index.js +502 -502
- package/dist/orchestration-shell/cli.js +3 -2
- package/package.json +2 -2
|
@@ -93,6 +93,23 @@ declare const eventSchema: z.ZodObject<{
|
|
|
93
93
|
payloadJson: string;
|
|
94
94
|
syncLifecycleVersion?: 1 | undefined;
|
|
95
95
|
}>;
|
|
96
|
+
declare const approvalDecisionSchema: z.ZodUnion<[z.ZodEnum<["accept", "acceptForSession", "cancel", "decline"]>, z.ZodObject<{
|
|
97
|
+
acceptWithExecpolicyAmendment: z.ZodObject<{
|
|
98
|
+
execpolicy_amendment: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
|
|
99
|
+
}, "strict", z.ZodTypeAny, {
|
|
100
|
+
execpolicy_amendment: string[];
|
|
101
|
+
}, {
|
|
102
|
+
execpolicy_amendment: string[];
|
|
103
|
+
}>;
|
|
104
|
+
}, "strict", z.ZodTypeAny, {
|
|
105
|
+
acceptWithExecpolicyAmendment: {
|
|
106
|
+
execpolicy_amendment: string[];
|
|
107
|
+
};
|
|
108
|
+
}, {
|
|
109
|
+
acceptWithExecpolicyAmendment: {
|
|
110
|
+
execpolicy_amendment: string[];
|
|
111
|
+
};
|
|
112
|
+
}>]>;
|
|
96
113
|
declare const controlSchema: z.ZodObject<{
|
|
97
114
|
key: z.ZodString;
|
|
98
115
|
scope: z.ZodObject<{
|
|
@@ -159,6 +176,101 @@ declare const controlSchema: z.ZodObject<{
|
|
|
159
176
|
nativeResolutionJson: string | null;
|
|
160
177
|
answerEventId: string | null;
|
|
161
178
|
}>;
|
|
179
|
+
declare const rejectionSchema: z.ZodObject<{
|
|
180
|
+
event: z.ZodObject<Omit<{
|
|
181
|
+
eventId: z.ZodEffects<z.ZodString, string, string>;
|
|
182
|
+
timestamp: z.ZodString;
|
|
183
|
+
sessionId: z.ZodString;
|
|
184
|
+
sessionGenerationId: z.ZodNullable<z.ZodString>;
|
|
185
|
+
syncLifecycleVersion: z.ZodOptional<z.ZodLiteral<1>>;
|
|
186
|
+
source: z.ZodLiteral<"MOBILE">;
|
|
187
|
+
type: z.ZodEnum<["USER_PROMPT", "PROMPT_RESPONSE"]>;
|
|
188
|
+
payloadJson: z.ZodString;
|
|
189
|
+
}, "payloadJson">, "strict", z.ZodTypeAny, {
|
|
190
|
+
source: "MOBILE";
|
|
191
|
+
eventId: string;
|
|
192
|
+
sessionId: string;
|
|
193
|
+
sessionGenerationId: string | null;
|
|
194
|
+
type: "USER_PROMPT" | "PROMPT_RESPONSE";
|
|
195
|
+
timestamp: string;
|
|
196
|
+
syncLifecycleVersion?: 1 | undefined;
|
|
197
|
+
}, {
|
|
198
|
+
source: "MOBILE";
|
|
199
|
+
eventId: string;
|
|
200
|
+
sessionId: string;
|
|
201
|
+
sessionGenerationId: string | null;
|
|
202
|
+
type: "USER_PROMPT" | "PROMPT_RESPONSE";
|
|
203
|
+
timestamp: string;
|
|
204
|
+
syncLifecycleVersion?: 1 | undefined;
|
|
205
|
+
}>;
|
|
206
|
+
eventSha256: z.ZodString;
|
|
207
|
+
scope: z.ZodObject<{
|
|
208
|
+
sessionId: z.ZodString;
|
|
209
|
+
sessionGenerationId: z.ZodString;
|
|
210
|
+
expectedSessionKeyGen: z.ZodString;
|
|
211
|
+
}, "strict", z.ZodTypeAny, {
|
|
212
|
+
sessionId: string;
|
|
213
|
+
sessionGenerationId: string;
|
|
214
|
+
expectedSessionKeyGen: string;
|
|
215
|
+
}, {
|
|
216
|
+
sessionId: string;
|
|
217
|
+
sessionGenerationId: string;
|
|
218
|
+
expectedSessionKeyGen: string;
|
|
219
|
+
}>;
|
|
220
|
+
controlKey: z.ZodNullable<z.ZodString>;
|
|
221
|
+
winningEventId: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
|
|
222
|
+
reason: z.ZodEnum<["ALREADY_ANSWERED", "NOT_APPLIED"]>;
|
|
223
|
+
raiseJson: z.ZodString;
|
|
224
|
+
noticeOutcome: z.ZodEnum<["MISSING", "ACCEPTED", "OMITTED"]>;
|
|
225
|
+
noticeResolved: z.ZodBoolean;
|
|
226
|
+
cloudDelivered: z.ZodBoolean;
|
|
227
|
+
}, "strict", z.ZodTypeAny, {
|
|
228
|
+
reason: "ALREADY_ANSWERED" | "NOT_APPLIED";
|
|
229
|
+
event: {
|
|
230
|
+
source: "MOBILE";
|
|
231
|
+
eventId: string;
|
|
232
|
+
sessionId: string;
|
|
233
|
+
sessionGenerationId: string | null;
|
|
234
|
+
type: "USER_PROMPT" | "PROMPT_RESPONSE";
|
|
235
|
+
timestamp: string;
|
|
236
|
+
syncLifecycleVersion?: 1 | undefined;
|
|
237
|
+
};
|
|
238
|
+
scope: {
|
|
239
|
+
sessionId: string;
|
|
240
|
+
sessionGenerationId: string;
|
|
241
|
+
expectedSessionKeyGen: string;
|
|
242
|
+
};
|
|
243
|
+
eventSha256: string;
|
|
244
|
+
controlKey: string | null;
|
|
245
|
+
raiseJson: string;
|
|
246
|
+
winningEventId: string | null;
|
|
247
|
+
noticeOutcome: "ACCEPTED" | "OMITTED" | "MISSING";
|
|
248
|
+
noticeResolved: boolean;
|
|
249
|
+
cloudDelivered: boolean;
|
|
250
|
+
}, {
|
|
251
|
+
reason: "ALREADY_ANSWERED" | "NOT_APPLIED";
|
|
252
|
+
event: {
|
|
253
|
+
source: "MOBILE";
|
|
254
|
+
eventId: string;
|
|
255
|
+
sessionId: string;
|
|
256
|
+
sessionGenerationId: string | null;
|
|
257
|
+
type: "USER_PROMPT" | "PROMPT_RESPONSE";
|
|
258
|
+
timestamp: string;
|
|
259
|
+
syncLifecycleVersion?: 1 | undefined;
|
|
260
|
+
};
|
|
261
|
+
scope: {
|
|
262
|
+
sessionId: string;
|
|
263
|
+
sessionGenerationId: string;
|
|
264
|
+
expectedSessionKeyGen: string;
|
|
265
|
+
};
|
|
266
|
+
eventSha256: string;
|
|
267
|
+
controlKey: string | null;
|
|
268
|
+
raiseJson: string;
|
|
269
|
+
winningEventId: string | null;
|
|
270
|
+
noticeOutcome: "ACCEPTED" | "OMITTED" | "MISSING";
|
|
271
|
+
noticeResolved: boolean;
|
|
272
|
+
cloudDelivered: boolean;
|
|
273
|
+
}>;
|
|
162
274
|
declare const recordSchema: z.ZodObject<{
|
|
163
275
|
version: z.ZodLiteral<1>;
|
|
164
276
|
stable: z.ZodObject<{
|
|
@@ -305,17 +417,41 @@ declare const recordSchema: z.ZodObject<{
|
|
|
305
417
|
nativeInstanceId: z.ZodString;
|
|
306
418
|
requestId: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
307
419
|
method: z.ZodEnum<["command", "file"]>;
|
|
308
|
-
decision: z.ZodEnum<["accept", "cancel", "decline"]
|
|
420
|
+
decision: z.ZodUnion<[z.ZodEnum<["accept", "acceptForSession", "cancel", "decline"]>, z.ZodObject<{
|
|
421
|
+
acceptWithExecpolicyAmendment: z.ZodObject<{
|
|
422
|
+
execpolicy_amendment: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
|
|
423
|
+
}, "strict", z.ZodTypeAny, {
|
|
424
|
+
execpolicy_amendment: string[];
|
|
425
|
+
}, {
|
|
426
|
+
execpolicy_amendment: string[];
|
|
427
|
+
}>;
|
|
428
|
+
}, "strict", z.ZodTypeAny, {
|
|
429
|
+
acceptWithExecpolicyAmendment: {
|
|
430
|
+
execpolicy_amendment: string[];
|
|
431
|
+
};
|
|
432
|
+
}, {
|
|
433
|
+
acceptWithExecpolicyAmendment: {
|
|
434
|
+
execpolicy_amendment: string[];
|
|
435
|
+
};
|
|
436
|
+
}>]>;
|
|
309
437
|
detailsSha256: z.ZodString;
|
|
310
438
|
}, "strict", z.ZodTypeAny, {
|
|
311
439
|
method: "file" | "command";
|
|
312
|
-
decision: "accept" | "cancel" | "decline"
|
|
440
|
+
decision: "accept" | "acceptForSession" | "cancel" | "decline" | {
|
|
441
|
+
acceptWithExecpolicyAmendment: {
|
|
442
|
+
execpolicy_amendment: string[];
|
|
443
|
+
};
|
|
444
|
+
};
|
|
313
445
|
nativeInstanceId: string;
|
|
314
446
|
requestId: string | number;
|
|
315
447
|
detailsSha256: string;
|
|
316
448
|
}, {
|
|
317
449
|
method: "file" | "command";
|
|
318
|
-
decision: "accept" | "cancel" | "decline"
|
|
450
|
+
decision: "accept" | "acceptForSession" | "cancel" | "decline" | {
|
|
451
|
+
acceptWithExecpolicyAmendment: {
|
|
452
|
+
execpolicy_amendment: string[];
|
|
453
|
+
};
|
|
454
|
+
};
|
|
319
455
|
nativeInstanceId: string;
|
|
320
456
|
requestId: string | number;
|
|
321
457
|
detailsSha256: string;
|
|
@@ -325,7 +461,11 @@ declare const recordSchema: z.ZodObject<{
|
|
|
325
461
|
turnId: string | null;
|
|
326
462
|
approval: {
|
|
327
463
|
method: "file" | "command";
|
|
328
|
-
decision: "accept" | "cancel" | "decline"
|
|
464
|
+
decision: "accept" | "acceptForSession" | "cancel" | "decline" | {
|
|
465
|
+
acceptWithExecpolicyAmendment: {
|
|
466
|
+
execpolicy_amendment: string[];
|
|
467
|
+
};
|
|
468
|
+
};
|
|
329
469
|
nativeInstanceId: string;
|
|
330
470
|
requestId: string | number;
|
|
331
471
|
detailsSha256: string;
|
|
@@ -339,7 +479,11 @@ declare const recordSchema: z.ZodObject<{
|
|
|
339
479
|
turnId: string | null;
|
|
340
480
|
approval: {
|
|
341
481
|
method: "file" | "command";
|
|
342
|
-
decision: "accept" | "cancel" | "decline"
|
|
482
|
+
decision: "accept" | "acceptForSession" | "cancel" | "decline" | {
|
|
483
|
+
acceptWithExecpolicyAmendment: {
|
|
484
|
+
execpolicy_amendment: string[];
|
|
485
|
+
};
|
|
486
|
+
};
|
|
343
487
|
nativeInstanceId: string;
|
|
344
488
|
requestId: string | number;
|
|
345
489
|
detailsSha256: string;
|
|
@@ -377,7 +521,11 @@ declare const recordSchema: z.ZodObject<{
|
|
|
377
521
|
turnId: string | null;
|
|
378
522
|
approval: {
|
|
379
523
|
method: "file" | "command";
|
|
380
|
-
decision: "accept" | "cancel" | "decline"
|
|
524
|
+
decision: "accept" | "acceptForSession" | "cancel" | "decline" | {
|
|
525
|
+
acceptWithExecpolicyAmendment: {
|
|
526
|
+
execpolicy_amendment: string[];
|
|
527
|
+
};
|
|
528
|
+
};
|
|
381
529
|
nativeInstanceId: string;
|
|
382
530
|
requestId: string | number;
|
|
383
531
|
detailsSha256: string;
|
|
@@ -415,7 +563,11 @@ declare const recordSchema: z.ZodObject<{
|
|
|
415
563
|
turnId: string | null;
|
|
416
564
|
approval: {
|
|
417
565
|
method: "file" | "command";
|
|
418
|
-
decision: "accept" | "cancel" | "decline"
|
|
566
|
+
decision: "accept" | "acceptForSession" | "cancel" | "decline" | {
|
|
567
|
+
acceptWithExecpolicyAmendment: {
|
|
568
|
+
execpolicy_amendment: string[];
|
|
569
|
+
};
|
|
570
|
+
};
|
|
419
571
|
nativeInstanceId: string;
|
|
420
572
|
requestId: string | number;
|
|
421
573
|
detailsSha256: string;
|
|
@@ -482,17 +634,41 @@ declare const recordSchema: z.ZodObject<{
|
|
|
482
634
|
nativeInstanceId: z.ZodString;
|
|
483
635
|
requestId: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
484
636
|
method: z.ZodEnum<["command", "file"]>;
|
|
485
|
-
decision: z.ZodEnum<["accept", "cancel", "decline"]
|
|
637
|
+
decision: z.ZodUnion<[z.ZodEnum<["accept", "acceptForSession", "cancel", "decline"]>, z.ZodObject<{
|
|
638
|
+
acceptWithExecpolicyAmendment: z.ZodObject<{
|
|
639
|
+
execpolicy_amendment: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
|
|
640
|
+
}, "strict", z.ZodTypeAny, {
|
|
641
|
+
execpolicy_amendment: string[];
|
|
642
|
+
}, {
|
|
643
|
+
execpolicy_amendment: string[];
|
|
644
|
+
}>;
|
|
645
|
+
}, "strict", z.ZodTypeAny, {
|
|
646
|
+
acceptWithExecpolicyAmendment: {
|
|
647
|
+
execpolicy_amendment: string[];
|
|
648
|
+
};
|
|
649
|
+
}, {
|
|
650
|
+
acceptWithExecpolicyAmendment: {
|
|
651
|
+
execpolicy_amendment: string[];
|
|
652
|
+
};
|
|
653
|
+
}>]>;
|
|
486
654
|
detailsSha256: z.ZodString;
|
|
487
655
|
}, "strict", z.ZodTypeAny, {
|
|
488
656
|
method: "file" | "command";
|
|
489
|
-
decision: "accept" | "cancel" | "decline"
|
|
657
|
+
decision: "accept" | "acceptForSession" | "cancel" | "decline" | {
|
|
658
|
+
acceptWithExecpolicyAmendment: {
|
|
659
|
+
execpolicy_amendment: string[];
|
|
660
|
+
};
|
|
661
|
+
};
|
|
490
662
|
nativeInstanceId: string;
|
|
491
663
|
requestId: string | number;
|
|
492
664
|
detailsSha256: string;
|
|
493
665
|
}, {
|
|
494
666
|
method: "file" | "command";
|
|
495
|
-
decision: "accept" | "cancel" | "decline"
|
|
667
|
+
decision: "accept" | "acceptForSession" | "cancel" | "decline" | {
|
|
668
|
+
acceptWithExecpolicyAmendment: {
|
|
669
|
+
execpolicy_amendment: string[];
|
|
670
|
+
};
|
|
671
|
+
};
|
|
496
672
|
nativeInstanceId: string;
|
|
497
673
|
requestId: string | number;
|
|
498
674
|
detailsSha256: string;
|
|
@@ -502,7 +678,11 @@ declare const recordSchema: z.ZodObject<{
|
|
|
502
678
|
turnId: string | null;
|
|
503
679
|
approval: {
|
|
504
680
|
method: "file" | "command";
|
|
505
|
-
decision: "accept" | "cancel" | "decline"
|
|
681
|
+
decision: "accept" | "acceptForSession" | "cancel" | "decline" | {
|
|
682
|
+
acceptWithExecpolicyAmendment: {
|
|
683
|
+
execpolicy_amendment: string[];
|
|
684
|
+
};
|
|
685
|
+
};
|
|
506
686
|
nativeInstanceId: string;
|
|
507
687
|
requestId: string | number;
|
|
508
688
|
detailsSha256: string;
|
|
@@ -516,7 +696,11 @@ declare const recordSchema: z.ZodObject<{
|
|
|
516
696
|
turnId: string | null;
|
|
517
697
|
approval: {
|
|
518
698
|
method: "file" | "command";
|
|
519
|
-
decision: "accept" | "cancel" | "decline"
|
|
699
|
+
decision: "accept" | "acceptForSession" | "cancel" | "decline" | {
|
|
700
|
+
acceptWithExecpolicyAmendment: {
|
|
701
|
+
execpolicy_amendment: string[];
|
|
702
|
+
};
|
|
703
|
+
};
|
|
520
704
|
nativeInstanceId: string;
|
|
521
705
|
requestId: string | number;
|
|
522
706
|
detailsSha256: string;
|
|
@@ -552,7 +736,11 @@ declare const recordSchema: z.ZodObject<{
|
|
|
552
736
|
turnId: string | null;
|
|
553
737
|
approval: {
|
|
554
738
|
method: "file" | "command";
|
|
555
|
-
decision: "accept" | "cancel" | "decline"
|
|
739
|
+
decision: "accept" | "acceptForSession" | "cancel" | "decline" | {
|
|
740
|
+
acceptWithExecpolicyAmendment: {
|
|
741
|
+
execpolicy_amendment: string[];
|
|
742
|
+
};
|
|
743
|
+
};
|
|
556
744
|
nativeInstanceId: string;
|
|
557
745
|
requestId: string | number;
|
|
558
746
|
detailsSha256: string;
|
|
@@ -588,7 +776,11 @@ declare const recordSchema: z.ZodObject<{
|
|
|
588
776
|
turnId: string | null;
|
|
589
777
|
approval: {
|
|
590
778
|
method: "file" | "command";
|
|
591
|
-
decision: "accept" | "cancel" | "decline"
|
|
779
|
+
decision: "accept" | "acceptForSession" | "cancel" | "decline" | {
|
|
780
|
+
acceptWithExecpolicyAmendment: {
|
|
781
|
+
execpolicy_amendment: string[];
|
|
782
|
+
};
|
|
783
|
+
};
|
|
592
784
|
nativeInstanceId: string;
|
|
593
785
|
requestId: string | number;
|
|
594
786
|
detailsSha256: string;
|
|
@@ -668,6 +860,101 @@ declare const recordSchema: z.ZodObject<{
|
|
|
668
860
|
nativeResolutionJson: string | null;
|
|
669
861
|
answerEventId: string | null;
|
|
670
862
|
}>, "many">;
|
|
863
|
+
rejections: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
864
|
+
event: z.ZodObject<Omit<{
|
|
865
|
+
eventId: z.ZodEffects<z.ZodString, string, string>;
|
|
866
|
+
timestamp: z.ZodString;
|
|
867
|
+
sessionId: z.ZodString;
|
|
868
|
+
sessionGenerationId: z.ZodNullable<z.ZodString>;
|
|
869
|
+
syncLifecycleVersion: z.ZodOptional<z.ZodLiteral<1>>;
|
|
870
|
+
source: z.ZodLiteral<"MOBILE">;
|
|
871
|
+
type: z.ZodEnum<["USER_PROMPT", "PROMPT_RESPONSE"]>;
|
|
872
|
+
payloadJson: z.ZodString;
|
|
873
|
+
}, "payloadJson">, "strict", z.ZodTypeAny, {
|
|
874
|
+
source: "MOBILE";
|
|
875
|
+
eventId: string;
|
|
876
|
+
sessionId: string;
|
|
877
|
+
sessionGenerationId: string | null;
|
|
878
|
+
type: "USER_PROMPT" | "PROMPT_RESPONSE";
|
|
879
|
+
timestamp: string;
|
|
880
|
+
syncLifecycleVersion?: 1 | undefined;
|
|
881
|
+
}, {
|
|
882
|
+
source: "MOBILE";
|
|
883
|
+
eventId: string;
|
|
884
|
+
sessionId: string;
|
|
885
|
+
sessionGenerationId: string | null;
|
|
886
|
+
type: "USER_PROMPT" | "PROMPT_RESPONSE";
|
|
887
|
+
timestamp: string;
|
|
888
|
+
syncLifecycleVersion?: 1 | undefined;
|
|
889
|
+
}>;
|
|
890
|
+
eventSha256: z.ZodString;
|
|
891
|
+
scope: z.ZodObject<{
|
|
892
|
+
sessionId: z.ZodString;
|
|
893
|
+
sessionGenerationId: z.ZodString;
|
|
894
|
+
expectedSessionKeyGen: z.ZodString;
|
|
895
|
+
}, "strict", z.ZodTypeAny, {
|
|
896
|
+
sessionId: string;
|
|
897
|
+
sessionGenerationId: string;
|
|
898
|
+
expectedSessionKeyGen: string;
|
|
899
|
+
}, {
|
|
900
|
+
sessionId: string;
|
|
901
|
+
sessionGenerationId: string;
|
|
902
|
+
expectedSessionKeyGen: string;
|
|
903
|
+
}>;
|
|
904
|
+
controlKey: z.ZodNullable<z.ZodString>;
|
|
905
|
+
winningEventId: z.ZodNullable<z.ZodEffects<z.ZodString, string, string>>;
|
|
906
|
+
reason: z.ZodEnum<["ALREADY_ANSWERED", "NOT_APPLIED"]>;
|
|
907
|
+
raiseJson: z.ZodString;
|
|
908
|
+
noticeOutcome: z.ZodEnum<["MISSING", "ACCEPTED", "OMITTED"]>;
|
|
909
|
+
noticeResolved: z.ZodBoolean;
|
|
910
|
+
cloudDelivered: z.ZodBoolean;
|
|
911
|
+
}, "strict", z.ZodTypeAny, {
|
|
912
|
+
reason: "ALREADY_ANSWERED" | "NOT_APPLIED";
|
|
913
|
+
event: {
|
|
914
|
+
source: "MOBILE";
|
|
915
|
+
eventId: string;
|
|
916
|
+
sessionId: string;
|
|
917
|
+
sessionGenerationId: string | null;
|
|
918
|
+
type: "USER_PROMPT" | "PROMPT_RESPONSE";
|
|
919
|
+
timestamp: string;
|
|
920
|
+
syncLifecycleVersion?: 1 | undefined;
|
|
921
|
+
};
|
|
922
|
+
scope: {
|
|
923
|
+
sessionId: string;
|
|
924
|
+
sessionGenerationId: string;
|
|
925
|
+
expectedSessionKeyGen: string;
|
|
926
|
+
};
|
|
927
|
+
eventSha256: string;
|
|
928
|
+
controlKey: string | null;
|
|
929
|
+
raiseJson: string;
|
|
930
|
+
winningEventId: string | null;
|
|
931
|
+
noticeOutcome: "ACCEPTED" | "OMITTED" | "MISSING";
|
|
932
|
+
noticeResolved: boolean;
|
|
933
|
+
cloudDelivered: boolean;
|
|
934
|
+
}, {
|
|
935
|
+
reason: "ALREADY_ANSWERED" | "NOT_APPLIED";
|
|
936
|
+
event: {
|
|
937
|
+
source: "MOBILE";
|
|
938
|
+
eventId: string;
|
|
939
|
+
sessionId: string;
|
|
940
|
+
sessionGenerationId: string | null;
|
|
941
|
+
type: "USER_PROMPT" | "PROMPT_RESPONSE";
|
|
942
|
+
timestamp: string;
|
|
943
|
+
syncLifecycleVersion?: 1 | undefined;
|
|
944
|
+
};
|
|
945
|
+
scope: {
|
|
946
|
+
sessionId: string;
|
|
947
|
+
sessionGenerationId: string;
|
|
948
|
+
expectedSessionKeyGen: string;
|
|
949
|
+
};
|
|
950
|
+
eventSha256: string;
|
|
951
|
+
controlKey: string | null;
|
|
952
|
+
raiseJson: string;
|
|
953
|
+
winningEventId: string | null;
|
|
954
|
+
noticeOutcome: "ACCEPTED" | "OMITTED" | "MISSING";
|
|
955
|
+
noticeResolved: boolean;
|
|
956
|
+
cloudDelivered: boolean;
|
|
957
|
+
}>, "many">>;
|
|
671
958
|
diagnostic: z.ZodObject<{
|
|
672
959
|
nativeConfirmedCloudAckMissing: z.ZodNumber;
|
|
673
960
|
notSent: z.ZodNumber;
|
|
@@ -714,7 +1001,11 @@ declare const recordSchema: z.ZodObject<{
|
|
|
714
1001
|
turnId: string | null;
|
|
715
1002
|
approval: {
|
|
716
1003
|
method: "file" | "command";
|
|
717
|
-
decision: "accept" | "cancel" | "decline"
|
|
1004
|
+
decision: "accept" | "acceptForSession" | "cancel" | "decline" | {
|
|
1005
|
+
acceptWithExecpolicyAmendment: {
|
|
1006
|
+
execpolicy_amendment: string[];
|
|
1007
|
+
};
|
|
1008
|
+
};
|
|
718
1009
|
nativeInstanceId: string;
|
|
719
1010
|
requestId: string | number;
|
|
720
1011
|
detailsSha256: string;
|
|
@@ -750,7 +1041,11 @@ declare const recordSchema: z.ZodObject<{
|
|
|
750
1041
|
turnId: string | null;
|
|
751
1042
|
approval: {
|
|
752
1043
|
method: "file" | "command";
|
|
753
|
-
decision: "accept" | "cancel" | "decline"
|
|
1044
|
+
decision: "accept" | "acceptForSession" | "cancel" | "decline" | {
|
|
1045
|
+
acceptWithExecpolicyAmendment: {
|
|
1046
|
+
execpolicy_amendment: string[];
|
|
1047
|
+
};
|
|
1048
|
+
};
|
|
754
1049
|
nativeInstanceId: string;
|
|
755
1050
|
requestId: string | number;
|
|
756
1051
|
detailsSha256: string;
|
|
@@ -802,6 +1097,30 @@ declare const recordSchema: z.ZodObject<{
|
|
|
802
1097
|
nativeResolutionJson: string | null;
|
|
803
1098
|
answerEventId: string | null;
|
|
804
1099
|
}[];
|
|
1100
|
+
rejections: {
|
|
1101
|
+
reason: "ALREADY_ANSWERED" | "NOT_APPLIED";
|
|
1102
|
+
event: {
|
|
1103
|
+
source: "MOBILE";
|
|
1104
|
+
eventId: string;
|
|
1105
|
+
sessionId: string;
|
|
1106
|
+
sessionGenerationId: string | null;
|
|
1107
|
+
type: "USER_PROMPT" | "PROMPT_RESPONSE";
|
|
1108
|
+
timestamp: string;
|
|
1109
|
+
syncLifecycleVersion?: 1 | undefined;
|
|
1110
|
+
};
|
|
1111
|
+
scope: {
|
|
1112
|
+
sessionId: string;
|
|
1113
|
+
sessionGenerationId: string;
|
|
1114
|
+
expectedSessionKeyGen: string;
|
|
1115
|
+
};
|
|
1116
|
+
eventSha256: string;
|
|
1117
|
+
controlKey: string | null;
|
|
1118
|
+
raiseJson: string;
|
|
1119
|
+
winningEventId: string | null;
|
|
1120
|
+
noticeOutcome: "ACCEPTED" | "OMITTED" | "MISSING";
|
|
1121
|
+
noticeResolved: boolean;
|
|
1122
|
+
cloudDelivered: boolean;
|
|
1123
|
+
}[];
|
|
805
1124
|
diagnostic: {
|
|
806
1125
|
nativeConfirmedCloudAckMissing: number;
|
|
807
1126
|
notSent: number;
|
|
@@ -842,7 +1161,11 @@ declare const recordSchema: z.ZodObject<{
|
|
|
842
1161
|
turnId: string | null;
|
|
843
1162
|
approval: {
|
|
844
1163
|
method: "file" | "command";
|
|
845
|
-
decision: "accept" | "cancel" | "decline"
|
|
1164
|
+
decision: "accept" | "acceptForSession" | "cancel" | "decline" | {
|
|
1165
|
+
acceptWithExecpolicyAmendment: {
|
|
1166
|
+
execpolicy_amendment: string[];
|
|
1167
|
+
};
|
|
1168
|
+
};
|
|
846
1169
|
nativeInstanceId: string;
|
|
847
1170
|
requestId: string | number;
|
|
848
1171
|
detailsSha256: string;
|
|
@@ -878,7 +1201,11 @@ declare const recordSchema: z.ZodObject<{
|
|
|
878
1201
|
turnId: string | null;
|
|
879
1202
|
approval: {
|
|
880
1203
|
method: "file" | "command";
|
|
881
|
-
decision: "accept" | "cancel" | "decline"
|
|
1204
|
+
decision: "accept" | "acceptForSession" | "cancel" | "decline" | {
|
|
1205
|
+
acceptWithExecpolicyAmendment: {
|
|
1206
|
+
execpolicy_amendment: string[];
|
|
1207
|
+
};
|
|
1208
|
+
};
|
|
882
1209
|
nativeInstanceId: string;
|
|
883
1210
|
requestId: string | number;
|
|
884
1211
|
detailsSha256: string;
|
|
@@ -934,6 +1261,30 @@ declare const recordSchema: z.ZodObject<{
|
|
|
934
1261
|
nativeConfirmedCloudAckMissing: number;
|
|
935
1262
|
notSent: number;
|
|
936
1263
|
};
|
|
1264
|
+
rejections?: {
|
|
1265
|
+
reason: "ALREADY_ANSWERED" | "NOT_APPLIED";
|
|
1266
|
+
event: {
|
|
1267
|
+
source: "MOBILE";
|
|
1268
|
+
eventId: string;
|
|
1269
|
+
sessionId: string;
|
|
1270
|
+
sessionGenerationId: string | null;
|
|
1271
|
+
type: "USER_PROMPT" | "PROMPT_RESPONSE";
|
|
1272
|
+
timestamp: string;
|
|
1273
|
+
syncLifecycleVersion?: 1 | undefined;
|
|
1274
|
+
};
|
|
1275
|
+
scope: {
|
|
1276
|
+
sessionId: string;
|
|
1277
|
+
sessionGenerationId: string;
|
|
1278
|
+
expectedSessionKeyGen: string;
|
|
1279
|
+
};
|
|
1280
|
+
eventSha256: string;
|
|
1281
|
+
controlKey: string | null;
|
|
1282
|
+
raiseJson: string;
|
|
1283
|
+
winningEventId: string | null;
|
|
1284
|
+
noticeOutcome: "ACCEPTED" | "OMITTED" | "MISSING";
|
|
1285
|
+
noticeResolved: boolean;
|
|
1286
|
+
cloudDelivered: boolean;
|
|
1287
|
+
}[] | undefined;
|
|
937
1288
|
}>;
|
|
938
1289
|
declare const intentSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
939
1290
|
kind: z.ZodLiteral<"user">;
|
|
@@ -973,12 +1324,32 @@ declare const intentSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
|
973
1324
|
nativeInstanceId: z.ZodString;
|
|
974
1325
|
requestId: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
|
|
975
1326
|
method: z.ZodEnum<["command", "file"]>;
|
|
976
|
-
decision: z.ZodEnum<["accept", "cancel", "decline"]
|
|
1327
|
+
decision: z.ZodUnion<[z.ZodEnum<["accept", "acceptForSession", "cancel", "decline"]>, z.ZodObject<{
|
|
1328
|
+
acceptWithExecpolicyAmendment: z.ZodObject<{
|
|
1329
|
+
execpolicy_amendment: z.ZodArray<z.ZodEffects<z.ZodString, string, string>, "many">;
|
|
1330
|
+
}, "strict", z.ZodTypeAny, {
|
|
1331
|
+
execpolicy_amendment: string[];
|
|
1332
|
+
}, {
|
|
1333
|
+
execpolicy_amendment: string[];
|
|
1334
|
+
}>;
|
|
1335
|
+
}, "strict", z.ZodTypeAny, {
|
|
1336
|
+
acceptWithExecpolicyAmendment: {
|
|
1337
|
+
execpolicy_amendment: string[];
|
|
1338
|
+
};
|
|
1339
|
+
}, {
|
|
1340
|
+
acceptWithExecpolicyAmendment: {
|
|
1341
|
+
execpolicy_amendment: string[];
|
|
1342
|
+
};
|
|
1343
|
+
}>]>;
|
|
977
1344
|
detailsSha256: z.ZodString;
|
|
978
1345
|
}, "strict", z.ZodTypeAny, {
|
|
979
1346
|
method: "file" | "command";
|
|
980
1347
|
kind: "approval";
|
|
981
|
-
decision: "accept" | "cancel" | "decline"
|
|
1348
|
+
decision: "accept" | "acceptForSession" | "cancel" | "decline" | {
|
|
1349
|
+
acceptWithExecpolicyAmendment: {
|
|
1350
|
+
execpolicy_amendment: string[];
|
|
1351
|
+
};
|
|
1352
|
+
};
|
|
982
1353
|
turnId: string;
|
|
983
1354
|
nativeInstanceId: string;
|
|
984
1355
|
requestId: string | number;
|
|
@@ -988,7 +1359,11 @@ declare const intentSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
|
988
1359
|
}, {
|
|
989
1360
|
method: "file" | "command";
|
|
990
1361
|
kind: "approval";
|
|
991
|
-
decision: "accept" | "cancel" | "decline"
|
|
1362
|
+
decision: "accept" | "acceptForSession" | "cancel" | "decline" | {
|
|
1363
|
+
acceptWithExecpolicyAmendment: {
|
|
1364
|
+
execpolicy_amendment: string[];
|
|
1365
|
+
};
|
|
1366
|
+
};
|
|
992
1367
|
turnId: string;
|
|
993
1368
|
nativeInstanceId: string;
|
|
994
1369
|
requestId: string | number;
|
|
@@ -1004,6 +1379,8 @@ export type CodexNativeControl = z.infer<typeof controlSchema>;
|
|
|
1004
1379
|
export type CodexNativeIntent = z.infer<typeof intentSchema>;
|
|
1005
1380
|
export type CodexNativeState = z.infer<typeof recordSchema>;
|
|
1006
1381
|
export type CodexNativeEntry = CodexNativeState['entries'][number];
|
|
1382
|
+
export type CodexNativeRejection = z.infer<typeof rejectionSchema>;
|
|
1383
|
+
export type CodexNativeApprovalDecision = z.infer<typeof approvalDecisionSchema>;
|
|
1007
1384
|
export interface CodexNativeStateOptions {
|
|
1008
1385
|
identity: CodexNativeStableIdentity;
|
|
1009
1386
|
/** Stable installed data path. Private tests may supply their recorded root. */
|
|
@@ -1071,6 +1448,16 @@ export declare class CodexNativeStateStore {
|
|
|
1071
1448
|
* Conversely a pause committed first still prevents prepare from sending. */
|
|
1072
1449
|
pauseOpenQuestions(owner: CodexNativeOwner): Promise<void>;
|
|
1073
1450
|
prepare(owner: CodexNativeOwner, value: CodexNativeEvent, intentValue: CodexNativeIntent, controlKey?: string | null): Promise<'COMMITTED' | 'DUPLICATE'>;
|
|
1451
|
+
/** The same lock as answer reservation decides a losing explicit reply.
|
|
1452
|
+
* Missing/paused controls and existing native attempts are never reclassified. */
|
|
1453
|
+
rejectAnsweredControl(owner: CodexNativeOwner, value: CodexNativeEvent, promptId: string): Promise<CodexNativeRejection | null>;
|
|
1454
|
+
/** A deterministic binding refusal before prepare/send is terminal for this
|
|
1455
|
+
* exact event. The lock proves no native attempt exists; it never creates a
|
|
1456
|
+
* control reservation, replay payload, or EXECUTED acknowledgement. */
|
|
1457
|
+
rejectUnappliedInput(owner: CodexNativeOwner, value: CodexNativeEvent): Promise<CodexNativeRejection | null>;
|
|
1458
|
+
acknowledgeRejectionNotice(owner: CodexNativeOwner, eventId: string, outcome: 'ACCEPTED' | 'OMITTED'): Promise<void>;
|
|
1459
|
+
resolveRejectionNotice(owner: CodexNativeOwner, eventId: string): Promise<void>;
|
|
1460
|
+
acknowledgeRejectedDelivery(owner: CodexNativeOwner, eventId: string, value: unknown): Promise<void>;
|
|
1074
1461
|
/** Shared eligibility for every saved input, including async questions and
|
|
1075
1462
|
* native approvals. A closed/paused control is normal retained work, not
|
|
1076
1463
|
* authority to send or an error that may monopolize the recovery queue. */
|
|
@@ -1112,6 +1499,12 @@ export declare class CodexNativeStateStore {
|
|
|
1112
1499
|
turnId: string;
|
|
1113
1500
|
item: unknown;
|
|
1114
1501
|
}): Promise<void>;
|
|
1502
|
+
/** An interrupted native turn withdraws its unanswered questions. This is
|
|
1503
|
+
* presentation closure, never proof that a mobile answer executed. */
|
|
1504
|
+
observeQuestionInterruption(owner: CodexNativeOwner, controlKey: string, receipt: {
|
|
1505
|
+
nativeInstanceId: string;
|
|
1506
|
+
message: unknown;
|
|
1507
|
+
}): Promise<void>;
|
|
1115
1508
|
/** Only an exact signed status receipt can record cloud execution. Native
|
|
1116
1509
|
* proof is independently required;an RPC write or DELIVERED is not enough. */
|
|
1117
1510
|
acknowledgeInputExecution(owner: CodexNativeOwner, eventId: string, value: unknown): Promise<void>;
|
package/dist/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ export { DurableDesktopSyncWriter, SyncJournalError } from './appsync';
|
|
|
27
27
|
export type { ShellSyncSource, ShellSyncTicket, ShellSyncSourceInventory } from './appsync';
|
|
28
28
|
export type { DurableSyncResult, DurableDesktopSyncWriterOptions, DesktopSyncSessionScope, DesktopSyncSourceIdentity } from './appsync';
|
|
29
29
|
export { CodexNativeStateStore, CodexNativeStateError, snapshotCodexNativeEvent } from './companion-mode/codex-native-state';
|
|
30
|
-
export type { CodexNativeStateOptions, CodexNativeScope, CodexNativeStableIdentity, CodexNativeOwner, CodexNativeEvent, CodexNativeControl, CodexNativeIntent, CodexNativeState, CodexNativeEntry } from './companion-mode/codex-native-state';
|
|
30
|
+
export type { CodexNativeStateOptions, CodexNativeScope, CodexNativeStableIdentity, CodexNativeOwner, CodexNativeEvent, CodexNativeControl, CodexNativeIntent, CodexNativeState, CodexNativeEntry, CodexNativeRejection, CodexNativeApprovalDecision } from './companion-mode/codex-native-state';
|
|
31
31
|
export { CodexNativeDispatcher } from './companion-mode/codex-native-dispatcher';
|
|
32
32
|
export type { CodexNativeDispatcherOptions, CodexNativeDispatchResult } from './companion-mode/codex-native-dispatcher';
|
|
33
33
|
export { MAX_SYNC_SOURCE_ANCHOR_BYTES } from './appsync';
|