happy-imou-cloud 2.1.0 → 2.1.2
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/bin/happy-cloud.mjs +4 -0
- package/compat/acp-sdk-schema/index.js +28 -0
- package/compat/acp-sdk-schema/types.gen.js +3 -0
- package/compat/acp-sdk-schema/zod.gen.js +1554 -0
- package/compat/ink-build/components/Cursor.d.ts +83 -0
- package/compat/ink-build/components/Cursor.js +53 -0
- package/compat/ink-build/components/CursorContext.d.ts +11 -0
- package/compat/ink-build/components/CursorContext.js +8 -0
- package/compat/ink-build/components/ErrorBoundary.d.ts +18 -0
- package/compat/ink-build/components/ErrorBoundary.js +23 -0
- package/compat/ink-build/hooks/use-cursor.d.ts +12 -0
- package/compat/ink-build/hooks/use-cursor.js +29 -0
- package/dist/{BaseReasoningProcessor-DQkzwRuf.mjs → BaseReasoningProcessor-BaOWkVcu.mjs} +3 -3
- package/dist/{BaseReasoningProcessor-C9mH8EVn.cjs → BaseReasoningProcessor-CzvqwxuY.cjs} +3 -3
- package/dist/{ProviderSelectionHandler-BlrrLPlo.mjs → ProviderSelectionHandler-Q8pl7e-d.mjs} +2 -2
- package/dist/{ProviderSelectionHandler-5Dedbm8j.cjs → ProviderSelectionHandler-wwbfeK_s.cjs} +2 -2
- package/dist/{api-w_CUxb9Q.mjs → api-Cxifhw5r.mjs} +4 -3
- package/dist/{api-Bd-MnOS4.cjs → api-DZimmN4C.cjs} +4 -3
- package/dist/{command-mTWwCqTY.mjs → command-B6LM3Nml.mjs} +3 -3
- package/dist/{command-DoDmHNxR.cjs → command-RcCJI1jl.cjs} +3 -3
- package/dist/{index-BQmJ4NAa.cjs → index-Cuvs0lFS.cjs} +11 -11
- package/dist/{index-GuXV-pxB.mjs → index-Des7I5WX.mjs} +8 -8
- package/dist/index.cjs +3 -3
- package/dist/index.mjs +3 -3
- package/dist/lib.cjs +1 -1
- package/dist/lib.d.cts +82 -81
- package/dist/lib.d.mts +82 -81
- package/dist/lib.mjs +1 -1
- package/dist/{persistence-MSy70is3.mjs → persistence-6d4U4Sh8.mjs} +1 -1
- package/dist/{persistence-BL06LLVz.cjs → persistence-C8-MtdQK.cjs} +1 -1
- package/dist/{registerKillSessionHandler-CjWfUfc3.mjs → registerKillSessionHandler-BFBkz_XT.mjs} +3 -3
- package/dist/{registerKillSessionHandler-D9kwxy6B.cjs → registerKillSessionHandler-BapPCRmp.cjs} +3 -3
- package/dist/{runClaude-DpZ95Twb.mjs → runClaude-CPV5Uap2.mjs} +34 -5
- package/dist/{runClaude-D2ZEXue8.cjs → runClaude-DVnqKa1q.cjs} +34 -5
- package/dist/{runCodex-Dz_1ho8d.cjs → runCodex-Bzsp8gFO.cjs} +26 -18
- package/dist/{runCodex-CJwaep2R.mjs → runCodex-CwtLSTMJ.mjs} +26 -18
- package/dist/{runGemini-Dfu6LltX.cjs → runGemini-6Dwyk_Km.cjs} +83 -17
- package/dist/{runGemini-BehqjM73.mjs → runGemini-Bmoxehlh.mjs} +83 -17
- package/package.json +3 -2
- package/scripts/build.mjs +2 -0
- package/scripts/devtools/README.md +9 -9
- package/scripts/e2e/fake-codex-acp-agent.mjs +139 -139
- package/scripts/e2e/local-server-session-roundtrip.mjs +1063 -1063
- package/scripts/ensureAcpSdkCompat.mjs +171 -0
- package/scripts/release-smoke.mjs +14 -0
package/dist/lib.d.mts
CHANGED
|
@@ -437,13 +437,6 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
|
|
|
437
437
|
repeatFingerprint: string | null;
|
|
438
438
|
}>>;
|
|
439
439
|
}, "strip", z.ZodTypeAny, {
|
|
440
|
-
repeat?: {
|
|
441
|
-
threshold: number;
|
|
442
|
-
fingerprints: Record<string, {
|
|
443
|
-
count: number;
|
|
444
|
-
lastSeenAt: number;
|
|
445
|
-
}>;
|
|
446
|
-
} | undefined;
|
|
447
440
|
taskContext?: {
|
|
448
441
|
taskId: string;
|
|
449
442
|
organizationId: string;
|
|
@@ -461,6 +454,13 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
|
|
|
461
454
|
ownerRunId: string;
|
|
462
455
|
claimedAt: number;
|
|
463
456
|
} | null | undefined;
|
|
457
|
+
repeat?: {
|
|
458
|
+
threshold: number;
|
|
459
|
+
fingerprints: Record<string, {
|
|
460
|
+
count: number;
|
|
461
|
+
lastSeenAt: number;
|
|
462
|
+
}>;
|
|
463
|
+
} | undefined;
|
|
464
464
|
lastTurnReport?: {
|
|
465
465
|
summary: string;
|
|
466
466
|
taskId: string;
|
|
@@ -475,13 +475,6 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
|
|
|
475
475
|
repeatFingerprint: string | null;
|
|
476
476
|
} | undefined;
|
|
477
477
|
}, {
|
|
478
|
-
repeat?: {
|
|
479
|
-
threshold: number;
|
|
480
|
-
fingerprints: Record<string, {
|
|
481
|
-
count: number;
|
|
482
|
-
lastSeenAt: number;
|
|
483
|
-
}>;
|
|
484
|
-
} | undefined;
|
|
485
478
|
taskContext?: {
|
|
486
479
|
taskId: string;
|
|
487
480
|
organizationId: string;
|
|
@@ -499,6 +492,13 @@ declare const HappyOrgMetadataSchema: z.ZodObject<{
|
|
|
499
492
|
ownerRunId: string;
|
|
500
493
|
claimedAt: number;
|
|
501
494
|
} | null | undefined;
|
|
495
|
+
repeat?: {
|
|
496
|
+
threshold: number;
|
|
497
|
+
fingerprints: Record<string, {
|
|
498
|
+
count: number;
|
|
499
|
+
lastSeenAt: number;
|
|
500
|
+
}>;
|
|
501
|
+
} | undefined;
|
|
502
502
|
lastTurnReport?: {
|
|
503
503
|
summary: string;
|
|
504
504
|
taskId: string;
|
|
@@ -626,19 +626,19 @@ declare const UpdateSchema: z.ZodObject<{
|
|
|
626
626
|
flavor?: string | null | undefined;
|
|
627
627
|
}>>>;
|
|
628
628
|
}, "strip", z.ZodTypeAny, {
|
|
629
|
-
id: string;
|
|
630
629
|
t: "new-session";
|
|
630
|
+
id: string;
|
|
631
631
|
seq: number;
|
|
632
632
|
metadata: string;
|
|
633
633
|
metadataVersion: number;
|
|
634
634
|
agentState: string | null;
|
|
635
635
|
agentStateVersion: number;
|
|
636
|
-
createdAt?: number | undefined;
|
|
637
|
-
updatedAt?: number | undefined;
|
|
638
|
-
active?: boolean | undefined;
|
|
639
636
|
title?: string | null | undefined;
|
|
640
637
|
dataEncryptionKey?: string | null | undefined;
|
|
638
|
+
active?: boolean | undefined;
|
|
641
639
|
activeAt?: number | undefined;
|
|
640
|
+
createdAt?: number | undefined;
|
|
641
|
+
updatedAt?: number | undefined;
|
|
642
642
|
sessionIndex?: {
|
|
643
643
|
machineId?: string | null | undefined;
|
|
644
644
|
hostPid?: number | null | undefined;
|
|
@@ -647,19 +647,19 @@ declare const UpdateSchema: z.ZodObject<{
|
|
|
647
647
|
flavor?: string | null | undefined;
|
|
648
648
|
} | null | undefined;
|
|
649
649
|
}, {
|
|
650
|
-
id: string;
|
|
651
650
|
t: "new-session";
|
|
651
|
+
id: string;
|
|
652
652
|
seq: number;
|
|
653
653
|
metadata: string;
|
|
654
654
|
metadataVersion: number;
|
|
655
655
|
agentState: string | null;
|
|
656
656
|
agentStateVersion: number;
|
|
657
|
-
createdAt?: number | undefined;
|
|
658
|
-
updatedAt?: number | undefined;
|
|
659
|
-
active?: boolean | undefined;
|
|
660
657
|
title?: string | null | undefined;
|
|
661
658
|
dataEncryptionKey?: string | null | undefined;
|
|
659
|
+
active?: boolean | undefined;
|
|
662
660
|
activeAt?: number | undefined;
|
|
661
|
+
createdAt?: number | undefined;
|
|
662
|
+
updatedAt?: number | undefined;
|
|
663
663
|
sessionIndex?: {
|
|
664
664
|
machineId?: string | null | undefined;
|
|
665
665
|
hostPid?: number | null | undefined;
|
|
@@ -685,21 +685,21 @@ declare const UpdateSchema: z.ZodObject<{
|
|
|
685
685
|
createdAt: z.ZodOptional<z.ZodNumber>;
|
|
686
686
|
updatedAt: z.ZodOptional<z.ZodNumber>;
|
|
687
687
|
}, "strip", z.ZodTypeAny, {
|
|
688
|
-
id: string;
|
|
689
688
|
content: {
|
|
690
689
|
c: string;
|
|
691
690
|
t: "encrypted";
|
|
692
691
|
};
|
|
692
|
+
id: string;
|
|
693
693
|
seq: number;
|
|
694
694
|
createdAt?: number | undefined;
|
|
695
695
|
updatedAt?: number | undefined;
|
|
696
696
|
localId?: string | null | undefined;
|
|
697
697
|
}, {
|
|
698
|
-
id: string;
|
|
699
698
|
content: {
|
|
700
699
|
c: string;
|
|
701
700
|
t: "encrypted";
|
|
702
701
|
};
|
|
702
|
+
id: string;
|
|
703
703
|
seq: number;
|
|
704
704
|
createdAt?: number | undefined;
|
|
705
705
|
updatedAt?: number | undefined;
|
|
@@ -709,11 +709,11 @@ declare const UpdateSchema: z.ZodObject<{
|
|
|
709
709
|
t: z.ZodLiteral<"new-message">;
|
|
710
710
|
}, "strip", z.ZodTypeAny, {
|
|
711
711
|
message: {
|
|
712
|
-
id: string;
|
|
713
712
|
content: {
|
|
714
713
|
c: string;
|
|
715
714
|
t: "encrypted";
|
|
716
715
|
};
|
|
716
|
+
id: string;
|
|
717
717
|
seq: number;
|
|
718
718
|
createdAt?: number | undefined;
|
|
719
719
|
updatedAt?: number | undefined;
|
|
@@ -723,11 +723,11 @@ declare const UpdateSchema: z.ZodObject<{
|
|
|
723
723
|
sid: string;
|
|
724
724
|
}, {
|
|
725
725
|
message: {
|
|
726
|
-
id: string;
|
|
727
726
|
content: {
|
|
728
727
|
c: string;
|
|
729
728
|
t: "encrypted";
|
|
730
729
|
};
|
|
730
|
+
id: string;
|
|
731
731
|
seq: number;
|
|
732
732
|
createdAt?: number | undefined;
|
|
733
733
|
updatedAt?: number | undefined;
|
|
@@ -883,22 +883,22 @@ declare const UpdateSchema: z.ZodObject<{
|
|
|
883
883
|
createdAt: z.ZodNumber;
|
|
884
884
|
}, "strip", z.ZodTypeAny, {
|
|
885
885
|
id: string;
|
|
886
|
-
createdAt: number;
|
|
887
886
|
seq: number;
|
|
887
|
+
createdAt: number;
|
|
888
888
|
body: {
|
|
889
|
-
id: string;
|
|
890
889
|
t: "new-session";
|
|
890
|
+
id: string;
|
|
891
891
|
seq: number;
|
|
892
892
|
metadata: string;
|
|
893
893
|
metadataVersion: number;
|
|
894
894
|
agentState: string | null;
|
|
895
895
|
agentStateVersion: number;
|
|
896
|
-
createdAt?: number | undefined;
|
|
897
|
-
updatedAt?: number | undefined;
|
|
898
|
-
active?: boolean | undefined;
|
|
899
896
|
title?: string | null | undefined;
|
|
900
897
|
dataEncryptionKey?: string | null | undefined;
|
|
898
|
+
active?: boolean | undefined;
|
|
901
899
|
activeAt?: number | undefined;
|
|
900
|
+
createdAt?: number | undefined;
|
|
901
|
+
updatedAt?: number | undefined;
|
|
902
902
|
sessionIndex?: {
|
|
903
903
|
machineId?: string | null | undefined;
|
|
904
904
|
hostPid?: number | null | undefined;
|
|
@@ -908,11 +908,11 @@ declare const UpdateSchema: z.ZodObject<{
|
|
|
908
908
|
} | null | undefined;
|
|
909
909
|
} | {
|
|
910
910
|
message: {
|
|
911
|
-
id: string;
|
|
912
911
|
content: {
|
|
913
912
|
c: string;
|
|
914
913
|
t: "encrypted";
|
|
915
914
|
};
|
|
915
|
+
id: string;
|
|
916
916
|
seq: number;
|
|
917
917
|
createdAt?: number | undefined;
|
|
918
918
|
updatedAt?: number | undefined;
|
|
@@ -959,22 +959,22 @@ declare const UpdateSchema: z.ZodObject<{
|
|
|
959
959
|
};
|
|
960
960
|
}, {
|
|
961
961
|
id: string;
|
|
962
|
-
createdAt: number;
|
|
963
962
|
seq: number;
|
|
963
|
+
createdAt: number;
|
|
964
964
|
body: {
|
|
965
|
-
id: string;
|
|
966
965
|
t: "new-session";
|
|
966
|
+
id: string;
|
|
967
967
|
seq: number;
|
|
968
968
|
metadata: string;
|
|
969
969
|
metadataVersion: number;
|
|
970
970
|
agentState: string | null;
|
|
971
971
|
agentStateVersion: number;
|
|
972
|
-
createdAt?: number | undefined;
|
|
973
|
-
updatedAt?: number | undefined;
|
|
974
|
-
active?: boolean | undefined;
|
|
975
972
|
title?: string | null | undefined;
|
|
976
973
|
dataEncryptionKey?: string | null | undefined;
|
|
974
|
+
active?: boolean | undefined;
|
|
977
975
|
activeAt?: number | undefined;
|
|
976
|
+
createdAt?: number | undefined;
|
|
977
|
+
updatedAt?: number | undefined;
|
|
978
978
|
sessionIndex?: {
|
|
979
979
|
machineId?: string | null | undefined;
|
|
980
980
|
hostPid?: number | null | undefined;
|
|
@@ -984,11 +984,11 @@ declare const UpdateSchema: z.ZodObject<{
|
|
|
984
984
|
} | null | undefined;
|
|
985
985
|
} | {
|
|
986
986
|
message: {
|
|
987
|
-
id: string;
|
|
988
987
|
content: {
|
|
989
988
|
c: string;
|
|
990
989
|
t: "encrypted";
|
|
991
990
|
};
|
|
991
|
+
id: string;
|
|
992
992
|
seq: number;
|
|
993
993
|
createdAt?: number | undefined;
|
|
994
994
|
updatedAt?: number | undefined;
|
|
@@ -1160,32 +1160,32 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
1160
1160
|
}, "strip", z.ZodTypeAny, {
|
|
1161
1161
|
id: string;
|
|
1162
1162
|
lastChangeSeq: number;
|
|
1163
|
-
createdAt?: number | undefined;
|
|
1164
|
-
updatedAt?: number | undefined;
|
|
1165
|
-
active?: boolean | undefined;
|
|
1166
1163
|
title?: string | null | undefined;
|
|
1167
1164
|
metadata?: string | undefined;
|
|
1168
1165
|
metadataVersion?: number | undefined;
|
|
1169
1166
|
agentState?: string | null | undefined;
|
|
1170
1167
|
agentStateVersion?: number | undefined;
|
|
1171
1168
|
dataEncryptionKey?: string | null | undefined;
|
|
1169
|
+
active?: boolean | undefined;
|
|
1172
1170
|
activeAt?: number | undefined;
|
|
1171
|
+
createdAt?: number | undefined;
|
|
1172
|
+
updatedAt?: number | undefined;
|
|
1173
1173
|
pendingCount?: number | undefined;
|
|
1174
1174
|
pendingVersion?: number | undefined;
|
|
1175
1175
|
deleted?: boolean | undefined;
|
|
1176
1176
|
}, {
|
|
1177
1177
|
id: string;
|
|
1178
1178
|
lastChangeSeq: number;
|
|
1179
|
-
createdAt?: number | undefined;
|
|
1180
|
-
updatedAt?: number | undefined;
|
|
1181
|
-
active?: boolean | undefined;
|
|
1182
1179
|
title?: string | null | undefined;
|
|
1183
1180
|
metadata?: string | undefined;
|
|
1184
1181
|
metadataVersion?: number | undefined;
|
|
1185
1182
|
agentState?: string | null | undefined;
|
|
1186
1183
|
agentStateVersion?: number | undefined;
|
|
1187
1184
|
dataEncryptionKey?: string | null | undefined;
|
|
1185
|
+
active?: boolean | undefined;
|
|
1188
1186
|
activeAt?: number | undefined;
|
|
1187
|
+
createdAt?: number | undefined;
|
|
1188
|
+
updatedAt?: number | undefined;
|
|
1189
1189
|
pendingCount?: number | undefined;
|
|
1190
1190
|
pendingVersion?: number | undefined;
|
|
1191
1191
|
deleted?: boolean | undefined;
|
|
@@ -1208,52 +1208,52 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
1208
1208
|
createdAt: z.ZodNumber;
|
|
1209
1209
|
updatedAt: z.ZodNumber;
|
|
1210
1210
|
}, "strip", z.ZodTypeAny, {
|
|
1211
|
-
id: string;
|
|
1212
|
-
createdAt: number;
|
|
1213
|
-
updatedAt: number;
|
|
1214
1211
|
content: {
|
|
1215
1212
|
c: string;
|
|
1216
1213
|
t: "encrypted";
|
|
1217
1214
|
};
|
|
1218
|
-
seq: number;
|
|
1219
|
-
localId: string | null;
|
|
1220
|
-
}, {
|
|
1221
1215
|
id: string;
|
|
1216
|
+
seq: number;
|
|
1222
1217
|
createdAt: number;
|
|
1223
1218
|
updatedAt: number;
|
|
1219
|
+
localId: string | null;
|
|
1220
|
+
}, {
|
|
1224
1221
|
content: {
|
|
1225
1222
|
c: string;
|
|
1226
1223
|
t: "encrypted";
|
|
1227
1224
|
};
|
|
1225
|
+
id: string;
|
|
1228
1226
|
seq: number;
|
|
1227
|
+
createdAt: number;
|
|
1228
|
+
updatedAt: number;
|
|
1229
1229
|
localId: string | null;
|
|
1230
1230
|
}>, "many">;
|
|
1231
1231
|
truncated: z.ZodBoolean;
|
|
1232
1232
|
oldestRetainedSeq: z.ZodNullable<z.ZodNumber>;
|
|
1233
1233
|
}, "strip", z.ZodTypeAny, {
|
|
1234
1234
|
messages: {
|
|
1235
|
-
id: string;
|
|
1236
|
-
createdAt: number;
|
|
1237
|
-
updatedAt: number;
|
|
1238
1235
|
content: {
|
|
1239
1236
|
c: string;
|
|
1240
1237
|
t: "encrypted";
|
|
1241
1238
|
};
|
|
1239
|
+
id: string;
|
|
1242
1240
|
seq: number;
|
|
1241
|
+
createdAt: number;
|
|
1242
|
+
updatedAt: number;
|
|
1243
1243
|
localId: string | null;
|
|
1244
1244
|
}[];
|
|
1245
1245
|
truncated: boolean;
|
|
1246
1246
|
oldestRetainedSeq: number | null;
|
|
1247
1247
|
}, {
|
|
1248
1248
|
messages: {
|
|
1249
|
-
id: string;
|
|
1250
|
-
createdAt: number;
|
|
1251
|
-
updatedAt: number;
|
|
1252
1249
|
content: {
|
|
1253
1250
|
c: string;
|
|
1254
1251
|
t: "encrypted";
|
|
1255
1252
|
};
|
|
1253
|
+
id: string;
|
|
1256
1254
|
seq: number;
|
|
1255
|
+
createdAt: number;
|
|
1256
|
+
updatedAt: number;
|
|
1257
1257
|
localId: string | null;
|
|
1258
1258
|
}[];
|
|
1259
1259
|
truncated: boolean;
|
|
@@ -1272,30 +1272,30 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
1272
1272
|
session: {
|
|
1273
1273
|
id: string;
|
|
1274
1274
|
lastChangeSeq: number;
|
|
1275
|
-
createdAt?: number | undefined;
|
|
1276
|
-
updatedAt?: number | undefined;
|
|
1277
|
-
active?: boolean | undefined;
|
|
1278
1275
|
title?: string | null | undefined;
|
|
1279
1276
|
metadata?: string | undefined;
|
|
1280
1277
|
metadataVersion?: number | undefined;
|
|
1281
1278
|
agentState?: string | null | undefined;
|
|
1282
1279
|
agentStateVersion?: number | undefined;
|
|
1283
1280
|
dataEncryptionKey?: string | null | undefined;
|
|
1281
|
+
active?: boolean | undefined;
|
|
1284
1282
|
activeAt?: number | undefined;
|
|
1283
|
+
createdAt?: number | undefined;
|
|
1284
|
+
updatedAt?: number | undefined;
|
|
1285
1285
|
pendingCount?: number | undefined;
|
|
1286
1286
|
pendingVersion?: number | undefined;
|
|
1287
1287
|
deleted?: boolean | undefined;
|
|
1288
1288
|
};
|
|
1289
1289
|
snapshot: {
|
|
1290
1290
|
messages: {
|
|
1291
|
-
id: string;
|
|
1292
|
-
createdAt: number;
|
|
1293
|
-
updatedAt: number;
|
|
1294
1291
|
content: {
|
|
1295
1292
|
c: string;
|
|
1296
1293
|
t: "encrypted";
|
|
1297
1294
|
};
|
|
1295
|
+
id: string;
|
|
1298
1296
|
seq: number;
|
|
1297
|
+
createdAt: number;
|
|
1298
|
+
updatedAt: number;
|
|
1299
1299
|
localId: string | null;
|
|
1300
1300
|
}[];
|
|
1301
1301
|
truncated: boolean;
|
|
@@ -1314,30 +1314,30 @@ declare const ProtocolV3SessionSnapshotResponseSchema: z.ZodObject<{
|
|
|
1314
1314
|
session: {
|
|
1315
1315
|
id: string;
|
|
1316
1316
|
lastChangeSeq: number;
|
|
1317
|
-
createdAt?: number | undefined;
|
|
1318
|
-
updatedAt?: number | undefined;
|
|
1319
|
-
active?: boolean | undefined;
|
|
1320
1317
|
title?: string | null | undefined;
|
|
1321
1318
|
metadata?: string | undefined;
|
|
1322
1319
|
metadataVersion?: number | undefined;
|
|
1323
1320
|
agentState?: string | null | undefined;
|
|
1324
1321
|
agentStateVersion?: number | undefined;
|
|
1325
1322
|
dataEncryptionKey?: string | null | undefined;
|
|
1323
|
+
active?: boolean | undefined;
|
|
1326
1324
|
activeAt?: number | undefined;
|
|
1325
|
+
createdAt?: number | undefined;
|
|
1326
|
+
updatedAt?: number | undefined;
|
|
1327
1327
|
pendingCount?: number | undefined;
|
|
1328
1328
|
pendingVersion?: number | undefined;
|
|
1329
1329
|
deleted?: boolean | undefined;
|
|
1330
1330
|
};
|
|
1331
1331
|
snapshot: {
|
|
1332
1332
|
messages: {
|
|
1333
|
-
id: string;
|
|
1334
|
-
createdAt: number;
|
|
1335
|
-
updatedAt: number;
|
|
1336
1333
|
content: {
|
|
1337
1334
|
c: string;
|
|
1338
1335
|
t: "encrypted";
|
|
1339
1336
|
};
|
|
1337
|
+
id: string;
|
|
1340
1338
|
seq: number;
|
|
1339
|
+
createdAt: number;
|
|
1340
|
+
updatedAt: number;
|
|
1341
1341
|
localId: string | null;
|
|
1342
1342
|
}[];
|
|
1343
1343
|
truncated: boolean;
|
|
@@ -1453,32 +1453,32 @@ declare const ProtocolV3SessionChangesResponseSchema: z.ZodObject<{
|
|
|
1453
1453
|
}, "strip", z.ZodTypeAny, {
|
|
1454
1454
|
id: string;
|
|
1455
1455
|
lastChangeSeq: number;
|
|
1456
|
-
createdAt?: number | undefined;
|
|
1457
|
-
updatedAt?: number | undefined;
|
|
1458
|
-
active?: boolean | undefined;
|
|
1459
1456
|
title?: string | null | undefined;
|
|
1460
1457
|
metadata?: string | undefined;
|
|
1461
1458
|
metadataVersion?: number | undefined;
|
|
1462
1459
|
agentState?: string | null | undefined;
|
|
1463
1460
|
agentStateVersion?: number | undefined;
|
|
1464
1461
|
dataEncryptionKey?: string | null | undefined;
|
|
1462
|
+
active?: boolean | undefined;
|
|
1465
1463
|
activeAt?: number | undefined;
|
|
1464
|
+
createdAt?: number | undefined;
|
|
1465
|
+
updatedAt?: number | undefined;
|
|
1466
1466
|
pendingCount?: number | undefined;
|
|
1467
1467
|
pendingVersion?: number | undefined;
|
|
1468
1468
|
deleted?: boolean | undefined;
|
|
1469
1469
|
}, {
|
|
1470
1470
|
id: string;
|
|
1471
1471
|
lastChangeSeq: number;
|
|
1472
|
-
createdAt?: number | undefined;
|
|
1473
|
-
updatedAt?: number | undefined;
|
|
1474
|
-
active?: boolean | undefined;
|
|
1475
1472
|
title?: string | null | undefined;
|
|
1476
1473
|
metadata?: string | undefined;
|
|
1477
1474
|
metadataVersion?: number | undefined;
|
|
1478
1475
|
agentState?: string | null | undefined;
|
|
1479
1476
|
agentStateVersion?: number | undefined;
|
|
1480
1477
|
dataEncryptionKey?: string | null | undefined;
|
|
1478
|
+
active?: boolean | undefined;
|
|
1481
1479
|
activeAt?: number | undefined;
|
|
1480
|
+
createdAt?: number | undefined;
|
|
1481
|
+
updatedAt?: number | undefined;
|
|
1482
1482
|
pendingCount?: number | undefined;
|
|
1483
1483
|
pendingVersion?: number | undefined;
|
|
1484
1484
|
deleted?: boolean | undefined;
|
|
@@ -1525,16 +1525,16 @@ declare const ProtocolV3SessionChangesResponseSchema: z.ZodObject<{
|
|
|
1525
1525
|
session: {
|
|
1526
1526
|
id: string;
|
|
1527
1527
|
lastChangeSeq: number;
|
|
1528
|
-
createdAt?: number | undefined;
|
|
1529
|
-
updatedAt?: number | undefined;
|
|
1530
|
-
active?: boolean | undefined;
|
|
1531
1528
|
title?: string | null | undefined;
|
|
1532
1529
|
metadata?: string | undefined;
|
|
1533
1530
|
metadataVersion?: number | undefined;
|
|
1534
1531
|
agentState?: string | null | undefined;
|
|
1535
1532
|
agentStateVersion?: number | undefined;
|
|
1536
1533
|
dataEncryptionKey?: string | null | undefined;
|
|
1534
|
+
active?: boolean | undefined;
|
|
1537
1535
|
activeAt?: number | undefined;
|
|
1536
|
+
createdAt?: number | undefined;
|
|
1537
|
+
updatedAt?: number | undefined;
|
|
1538
1538
|
pendingCount?: number | undefined;
|
|
1539
1539
|
pendingVersion?: number | undefined;
|
|
1540
1540
|
deleted?: boolean | undefined;
|
|
@@ -1563,16 +1563,16 @@ declare const ProtocolV3SessionChangesResponseSchema: z.ZodObject<{
|
|
|
1563
1563
|
session: {
|
|
1564
1564
|
id: string;
|
|
1565
1565
|
lastChangeSeq: number;
|
|
1566
|
-
createdAt?: number | undefined;
|
|
1567
|
-
updatedAt?: number | undefined;
|
|
1568
|
-
active?: boolean | undefined;
|
|
1569
1566
|
title?: string | null | undefined;
|
|
1570
1567
|
metadata?: string | undefined;
|
|
1571
1568
|
metadataVersion?: number | undefined;
|
|
1572
1569
|
agentState?: string | null | undefined;
|
|
1573
1570
|
agentStateVersion?: number | undefined;
|
|
1574
1571
|
dataEncryptionKey?: string | null | undefined;
|
|
1572
|
+
active?: boolean | undefined;
|
|
1575
1573
|
activeAt?: number | undefined;
|
|
1574
|
+
createdAt?: number | undefined;
|
|
1575
|
+
updatedAt?: number | undefined;
|
|
1576
1576
|
pendingCount?: number | undefined;
|
|
1577
1577
|
pendingVersion?: number | undefined;
|
|
1578
1578
|
deleted?: boolean | undefined;
|
|
@@ -2344,4 +2344,5 @@ declare class Configuration {
|
|
|
2344
2344
|
}
|
|
2345
2345
|
declare const configuration: Configuration;
|
|
2346
2346
|
|
|
2347
|
-
export { ApiClient, ApiSessionClient,
|
|
2347
|
+
export { ApiClient, ApiSessionClient, RawJSONLinesSchema, configuration, logger };
|
|
2348
|
+
export type { RawJSONLines };
|
package/dist/lib.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as ApiClient, a as ApiSessionClient, c as configuration, l as logger } from './api-
|
|
1
|
+
export { A as ApiClient, a as ApiSessionClient, c as configuration, l as logger } from './api-Cxifhw5r.mjs';
|
|
2
2
|
export { R as RawJSONLinesSchema } from './types-CiliQpqS.mjs';
|
|
3
3
|
import 'axios';
|
|
4
4
|
import 'chalk';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { unlink, readFile, mkdir, open, stat, writeFile, rename } from 'node:fs/promises';
|
|
2
2
|
import { existsSync, unlinkSync, readdirSync, constants, writeFileSync, readFileSync } from 'node:fs';
|
|
3
3
|
import { join, dirname } from 'node:path';
|
|
4
|
-
import { c as configuration, l as logger, e as encodeBase64 } from './api-
|
|
4
|
+
import { c as configuration, l as logger, e as encodeBase64 } from './api-Cxifhw5r.mjs';
|
|
5
5
|
import * as z from 'zod';
|
|
6
6
|
import 'axios';
|
|
7
7
|
import 'chalk';
|
package/dist/{registerKillSessionHandler-CjWfUfc3.mjs → registerKillSessionHandler-BFBkz_XT.mjs}
RENAMED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { i as initialMachineMetadata, e as projectPath, R as RuntimeShell, h as resolveCanonicalToolNameV2, f as formatDisplayMessage } from './index-
|
|
2
|
-
import { readSettings } from './persistence-
|
|
1
|
+
import { i as initialMachineMetadata, e as projectPath, R as RuntimeShell, h as resolveCanonicalToolNameV2, f as formatDisplayMessage } from './index-Des7I5WX.mjs';
|
|
2
|
+
import { readSettings } from './persistence-6d4U4Sh8.mjs';
|
|
3
3
|
import os from 'node:os';
|
|
4
4
|
import { resolve } from 'node:path';
|
|
5
|
-
import { c as configuration, p as packageJson, H as HAPPY_ORG_TURN_REPORT_TAG, d as HAPPY_ORG_SUMMARY_MAX_LENGTH, f as HAPPY_ORG_REPEAT_THRESHOLD, l as logger } from './api-
|
|
5
|
+
import { c as configuration, p as packageJson, H as HAPPY_ORG_TURN_REPORT_TAG, d as HAPPY_ORG_SUMMARY_MAX_LENGTH, f as HAPPY_ORG_REPEAT_THRESHOLD, l as logger } from './api-Cxifhw5r.mjs';
|
|
6
6
|
import { randomUUID } from 'node:crypto';
|
|
7
7
|
import { createHash } from 'crypto';
|
|
8
8
|
import 'axios';
|
package/dist/{registerKillSessionHandler-D9kwxy6B.cjs → registerKillSessionHandler-BapPCRmp.cjs}
RENAMED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var persistence = require('./persistence-
|
|
3
|
+
var index = require('./index-Cuvs0lFS.cjs');
|
|
4
|
+
var persistence = require('./persistence-C8-MtdQK.cjs');
|
|
5
5
|
var os = require('node:os');
|
|
6
6
|
var path = require('node:path');
|
|
7
|
-
var api = require('./api-
|
|
7
|
+
var api = require('./api-DZimmN4C.cjs');
|
|
8
8
|
var node_crypto = require('node:crypto');
|
|
9
9
|
var crypto = require('crypto');
|
|
10
10
|
require('axios');
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { randomUUID } from 'node:crypto';
|
|
2
|
-
import { l as logger, g as backoff, h as delay, j as AsyncLock, c as configuration, s as startOfflineReconnection, b as connectionState, A as ApiClient, i as isAuthenticationRequiredError } from './api-
|
|
2
|
+
import { l as logger, g as backoff, h as delay, j as AsyncLock, c as configuration, s as startOfflineReconnection, b as connectionState, A as ApiClient, i as isAuthenticationRequiredError } from './api-Cxifhw5r.mjs';
|
|
3
3
|
import 'cross-spawn';
|
|
4
4
|
import '@agentclientprotocol/sdk';
|
|
5
|
-
import { j as getProjectPath, F as Future, k as claudeLocal, E as ExitCodeError, l as trimIdent, m as createClaudeBackend, f as formatDisplayMessage, t as truncateDisplayMessage, n as claudeCheckSession, e as projectPath, o as mapToClaudeMode, P as PushableAsyncIterable, q as query, A as AbortError, b as stopCaffeinate, p as publishSessionRegistration, u as getEnvironmentInfo, w as startCaffeinate } from './index-
|
|
5
|
+
import { j as getProjectPath, F as Future, k as claudeLocal, E as ExitCodeError, l as trimIdent, m as createClaudeBackend, f as formatDisplayMessage, t as truncateDisplayMessage, n as claudeCheckSession, e as projectPath, o as mapToClaudeMode, P as PushableAsyncIterable, q as query, A as AbortError, b as stopCaffeinate, p as publishSessionRegistration, u as getEnvironmentInfo, w as startCaffeinate } from './index-Des7I5WX.mjs';
|
|
6
6
|
import 'ps-list';
|
|
7
7
|
import 'fs';
|
|
8
8
|
import 'path';
|
|
@@ -13,7 +13,7 @@ import { dirname, basename, join, resolve } from 'node:path';
|
|
|
13
13
|
import { homedir } from 'node:os';
|
|
14
14
|
import { execSync } from 'node:child_process';
|
|
15
15
|
import 'node:readline';
|
|
16
|
-
import './persistence-
|
|
16
|
+
import './persistence-6d4U4Sh8.mjs';
|
|
17
17
|
import { readFile } from 'node:fs/promises';
|
|
18
18
|
import { stat, watch, access } from 'fs/promises';
|
|
19
19
|
import 'crypto';
|
|
@@ -24,9 +24,9 @@ import 'tweetnacl';
|
|
|
24
24
|
import 'open';
|
|
25
25
|
import React, { useState, useRef, useEffect, useCallback } from 'react';
|
|
26
26
|
import { useStdout, useInput, Box, Text, render } from 'ink';
|
|
27
|
-
import { c as createKeepAliveController, P as ProviderSelectionHandler, r as runModeLoop } from './ProviderSelectionHandler-
|
|
27
|
+
import { c as createKeepAliveController, P as ProviderSelectionHandler, r as runModeLoop } from './ProviderSelectionHandler-Q8pl7e-d.mjs';
|
|
28
28
|
import { R as RawJSONLinesSchema } from './types-CiliQpqS.mjs';
|
|
29
|
-
import { B as BasePermissionHandler, f as MessageBuffer, C as ConversationHistory$1, i as buildHappyOrgTurnPrompt, w as waitForResponseCompleteWithAbort, j as finalizeHappyOrgTurn, l as launchRuntimeHandleWithFactoryResult, n as forwardAgentMessageToProviderSession, s as syncControlledByUserState, r as resolveHappyOrgQueuedTurn, e as ensureManagedProviderMachine, M as MissingMachineIdError, c as createSessionMetadata, b as MessageQueue2, h as hashObject, d as registerKillSessionHandler, k as closeProviderSession } from './registerKillSessionHandler-
|
|
29
|
+
import { B as BasePermissionHandler, f as MessageBuffer, C as ConversationHistory$1, i as buildHappyOrgTurnPrompt, w as waitForResponseCompleteWithAbort, j as finalizeHappyOrgTurn, l as launchRuntimeHandleWithFactoryResult, n as forwardAgentMessageToProviderSession, s as syncControlledByUserState, r as resolveHappyOrgQueuedTurn, e as ensureManagedProviderMachine, M as MissingMachineIdError, c as createSessionMetadata, b as MessageQueue2, h as hashObject, d as registerKillSessionHandler, k as closeProviderSession } from './registerKillSessionHandler-BFBkz_XT.mjs';
|
|
30
30
|
import 'socket.io-client';
|
|
31
31
|
import 'expo-server-sdk';
|
|
32
32
|
import { isDeepStrictEqual } from 'node:util';
|
|
@@ -993,6 +993,7 @@ async function claudeAcpRemoteLauncher(session) {
|
|
|
993
993
|
let inkInstance = null;
|
|
994
994
|
let shouldExit = false;
|
|
995
995
|
let abortController = new AbortController();
|
|
996
|
+
let turnInFlight = false;
|
|
996
997
|
let runtimeHandle = null;
|
|
997
998
|
let unsubscribeRuntimeMessages = null;
|
|
998
999
|
let currentModeHash = null;
|
|
@@ -1003,6 +1004,7 @@ async function claudeAcpRemoteLauncher(session) {
|
|
|
1003
1004
|
let currentAssistantMessageId = null;
|
|
1004
1005
|
let currentThinkingMessageId = null;
|
|
1005
1006
|
let shouldInjectHistoryOnNextSession = false;
|
|
1007
|
+
let unexpectedRuntimeStopRecovery = null;
|
|
1006
1008
|
let readyAlreadySent = false;
|
|
1007
1009
|
const permissionHandler = new ClaudeAcpPermissionHandler(session.client);
|
|
1008
1010
|
const selectionHandler = new ProviderSelectionHandler(session.client, "Claude");
|
|
@@ -1111,6 +1113,28 @@ async function claudeAcpRemoteLauncher(session) {
|
|
|
1111
1113
|
}
|
|
1112
1114
|
emitStatusMessage(reason);
|
|
1113
1115
|
};
|
|
1116
|
+
const recoverUnexpectedRuntimeStop = async (detail) => {
|
|
1117
|
+
if (shouldExit || session.queue.isClosed() || unexpectedRuntimeStopRecovery) {
|
|
1118
|
+
return;
|
|
1119
|
+
}
|
|
1120
|
+
const errorMessage = normalizeClaudeBackendError(detail);
|
|
1121
|
+
unexpectedRuntimeStopRecovery = (async () => {
|
|
1122
|
+
queueHistoryInjectionForRestart(
|
|
1123
|
+
`Claude runtime stopped unexpectedly (${errorMessage}). Starting a new Claude ACP session on the next message...`
|
|
1124
|
+
);
|
|
1125
|
+
await disposeRuntimeHandle();
|
|
1126
|
+
session.clearSessionId();
|
|
1127
|
+
currentModeHash = null;
|
|
1128
|
+
permissionHandler.reset();
|
|
1129
|
+
selectionHandler.reset();
|
|
1130
|
+
resetTurnState();
|
|
1131
|
+
})();
|
|
1132
|
+
try {
|
|
1133
|
+
await unexpectedRuntimeStopRecovery;
|
|
1134
|
+
} finally {
|
|
1135
|
+
unexpectedRuntimeStopRecovery = null;
|
|
1136
|
+
}
|
|
1137
|
+
};
|
|
1114
1138
|
const setupRuntimeMessageHandler = (activeRuntimeHandle) => {
|
|
1115
1139
|
const forwardAgentMessage = (agentMessage) => {
|
|
1116
1140
|
forwardAgentMessageToProviderSession(agentMessage, {
|
|
@@ -1159,6 +1183,9 @@ async function claudeAcpRemoteLauncher(session) {
|
|
|
1159
1183
|
}
|
|
1160
1184
|
if (msg.status === "idle" || msg.status === "stopped") {
|
|
1161
1185
|
session.onThinkingChange(false);
|
|
1186
|
+
if (msg.status === "stopped" && !turnInFlight) {
|
|
1187
|
+
void recoverUnexpectedRuntimeStop(msg.detail);
|
|
1188
|
+
}
|
|
1162
1189
|
return;
|
|
1163
1190
|
}
|
|
1164
1191
|
if (msg.status === "error") {
|
|
@@ -1376,6 +1403,7 @@ ${systemPrompt}` : systemPrompt,
|
|
|
1376
1403
|
let shouldClearHistoryAfterTurn = false;
|
|
1377
1404
|
let turnStatus = "task_complete";
|
|
1378
1405
|
try {
|
|
1406
|
+
turnInFlight = true;
|
|
1379
1407
|
const activeRuntimeHandle = runtimeHandle ?? await createRuntimeHandle(message.mode);
|
|
1380
1408
|
let promptToSend = message.message;
|
|
1381
1409
|
if (shouldInjectHistoryOnNextSession && conversationHistory.hasHistory()) {
|
|
@@ -1418,6 +1446,7 @@ ${systemPrompt}` : systemPrompt,
|
|
|
1418
1446
|
currentModeHash = null;
|
|
1419
1447
|
}
|
|
1420
1448
|
} finally {
|
|
1449
|
+
turnInFlight = false;
|
|
1421
1450
|
const finalizedTurn = finalizeHappyOrgTurn({
|
|
1422
1451
|
metadata: session.client.getMetadataSnapshot?.() ?? null,
|
|
1423
1452
|
queuedTurn: message.mode.happyOrg,
|