@hearsay-tools/squawk 0.18.0-pr4120.7919 → 0.18.0-pr4121.7921
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/ci-wait/tools.d.ts +4 -4
- package/dist/delegation/routes.d.ts +65 -65
- package/dist/project-migration/auto.js +13 -30
- package/dist/project-migration/auto.js.map +1 -1
- package/dist/project-migration/live.d.ts +0 -9
- package/dist/project-migration/live.js +1 -58
- package/dist/project-migration/live.js.map +1 -1
- package/dist/project-migration/plan.d.ts +0 -3
- package/dist/project-migration/plan.js +1 -1
- package/dist/project-migration/plan.js.map +1 -1
- package/dist/project-paths.d.ts +0 -2
- package/dist/project-paths.js +4 -7
- package/dist/project-paths.js.map +1 -1
- package/dist/server/models-routes.d.ts +13 -13
- package/dist/server/reports-api.d.ts +2 -2
- package/dist/server/server.d.ts +1450 -1450
- package/dist/server/workspace-live-routes.d.ts +6 -6
- package/package.json +4 -4
- package/dist/project-migration/pending.d.ts +0 -10
- package/dist/project-migration/pending.js +0 -57
- package/dist/project-migration/pending.js.map +0 -1
package/dist/ci-wait/tools.d.ts
CHANGED
|
@@ -263,6 +263,10 @@ export declare function invokeScheduleTaskTool(input: unknown): Promise<{
|
|
|
263
263
|
}[];
|
|
264
264
|
isError: boolean;
|
|
265
265
|
details: {
|
|
266
|
+
ok: false;
|
|
267
|
+
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
268
|
+
message: string;
|
|
269
|
+
} | {
|
|
266
270
|
ok: true;
|
|
267
271
|
task: {
|
|
268
272
|
id: string;
|
|
@@ -274,10 +278,6 @@ export declare function invokeScheduleTaskTool(input: unknown): Promise<{
|
|
|
274
278
|
url?: string | undefined;
|
|
275
279
|
};
|
|
276
280
|
note: string;
|
|
277
|
-
} | {
|
|
278
|
-
ok: false;
|
|
279
|
-
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
280
|
-
message: string;
|
|
281
281
|
};
|
|
282
282
|
}>;
|
|
283
283
|
export declare function invokeScheduledTasksTool(input: unknown): Promise<{
|
|
@@ -27,18 +27,6 @@ export declare function delegationFailure(error: unknown): {
|
|
|
27
27
|
export declare function createDelegationRoutes(service: DelegationService, credentials: CredentialRegistry): import("hono/hono-base").HonoBase<Env, {
|
|
28
28
|
"/list": {
|
|
29
29
|
$get: {
|
|
30
|
-
output: {
|
|
31
|
-
error: string;
|
|
32
|
-
code?: "invalid_input" | undefined;
|
|
33
|
-
};
|
|
34
|
-
outputFormat: "json";
|
|
35
|
-
status: 400;
|
|
36
|
-
input: {
|
|
37
|
-
query: {
|
|
38
|
-
offset?: string | undefined;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
} | {
|
|
42
30
|
output: {
|
|
43
31
|
workers: {
|
|
44
32
|
workerId: string;
|
|
@@ -85,6 +73,18 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
85
73
|
offset?: string | undefined;
|
|
86
74
|
};
|
|
87
75
|
};
|
|
76
|
+
} | {
|
|
77
|
+
output: {
|
|
78
|
+
error: string;
|
|
79
|
+
code?: "invalid_input" | undefined;
|
|
80
|
+
};
|
|
81
|
+
outputFormat: "json";
|
|
82
|
+
status: 400;
|
|
83
|
+
input: {
|
|
84
|
+
query: {
|
|
85
|
+
offset?: string | undefined;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
88
|
};
|
|
89
89
|
};
|
|
90
90
|
} & {
|
|
@@ -629,18 +629,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
629
629
|
} & {
|
|
630
630
|
"/:workerId": {
|
|
631
631
|
$get: {
|
|
632
|
-
output: {
|
|
633
|
-
error: string;
|
|
634
|
-
code?: "invalid_input" | undefined;
|
|
635
|
-
};
|
|
636
|
-
outputFormat: "json";
|
|
637
|
-
status: 400;
|
|
638
|
-
input: {
|
|
639
|
-
param: {
|
|
640
|
-
workerId: string;
|
|
641
|
-
};
|
|
642
|
-
};
|
|
643
|
-
} | {
|
|
644
632
|
output: {
|
|
645
633
|
workerId: string;
|
|
646
634
|
settled: boolean;
|
|
@@ -758,11 +746,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
758
746
|
workerId: string;
|
|
759
747
|
};
|
|
760
748
|
};
|
|
761
|
-
}
|
|
762
|
-
};
|
|
763
|
-
} & {
|
|
764
|
-
"/:workerId/collect": {
|
|
765
|
-
$post: {
|
|
749
|
+
} | {
|
|
766
750
|
output: {
|
|
767
751
|
error: string;
|
|
768
752
|
code?: "invalid_input" | undefined;
|
|
@@ -773,10 +757,12 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
773
757
|
param: {
|
|
774
758
|
workerId: string;
|
|
775
759
|
};
|
|
776
|
-
} & {
|
|
777
|
-
json: Record<string, never>;
|
|
778
760
|
};
|
|
779
|
-
}
|
|
761
|
+
};
|
|
762
|
+
};
|
|
763
|
+
} & {
|
|
764
|
+
"/:workerId/collect": {
|
|
765
|
+
$post: {
|
|
780
766
|
output: {
|
|
781
767
|
workerId: string;
|
|
782
768
|
parentRunId: string;
|
|
@@ -899,11 +885,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
899
885
|
} & {
|
|
900
886
|
json: Record<string, never>;
|
|
901
887
|
};
|
|
902
|
-
}
|
|
903
|
-
};
|
|
904
|
-
} & {
|
|
905
|
-
"/:workerId/steer": {
|
|
906
|
-
$post: {
|
|
888
|
+
} | {
|
|
907
889
|
output: {
|
|
908
890
|
error: string;
|
|
909
891
|
code?: "invalid_input" | undefined;
|
|
@@ -915,11 +897,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
915
897
|
workerId: string;
|
|
916
898
|
};
|
|
917
899
|
} & {
|
|
918
|
-
json:
|
|
919
|
-
text: string;
|
|
920
|
-
};
|
|
900
|
+
json: Record<string, never>;
|
|
921
901
|
};
|
|
922
|
-
}
|
|
902
|
+
};
|
|
903
|
+
};
|
|
904
|
+
} & {
|
|
905
|
+
"/:workerId/steer": {
|
|
906
|
+
$post: {
|
|
923
907
|
output: {
|
|
924
908
|
workerId: string;
|
|
925
909
|
state: "delivered" | "queued";
|
|
@@ -935,11 +919,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
935
919
|
text: string;
|
|
936
920
|
};
|
|
937
921
|
};
|
|
938
|
-
}
|
|
939
|
-
};
|
|
940
|
-
} & {
|
|
941
|
-
"/:workerId/stop": {
|
|
942
|
-
$post: {
|
|
922
|
+
} | {
|
|
943
923
|
output: {
|
|
944
924
|
error: string;
|
|
945
925
|
code?: "invalid_input" | undefined;
|
|
@@ -951,9 +931,15 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
951
931
|
workerId: string;
|
|
952
932
|
};
|
|
953
933
|
} & {
|
|
954
|
-
json:
|
|
934
|
+
json: {
|
|
935
|
+
text: string;
|
|
936
|
+
};
|
|
955
937
|
};
|
|
956
|
-
}
|
|
938
|
+
};
|
|
939
|
+
};
|
|
940
|
+
} & {
|
|
941
|
+
"/:workerId/stop": {
|
|
942
|
+
$post: {
|
|
957
943
|
output: {
|
|
958
944
|
workerId: string;
|
|
959
945
|
state: "stopping" | "terminated";
|
|
@@ -967,11 +953,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
967
953
|
} & {
|
|
968
954
|
json: Record<string, never>;
|
|
969
955
|
};
|
|
970
|
-
}
|
|
971
|
-
};
|
|
972
|
-
} & {
|
|
973
|
-
"/:workerId/destroy": {
|
|
974
|
-
$post: {
|
|
956
|
+
} | {
|
|
975
957
|
output: {
|
|
976
958
|
error: string;
|
|
977
959
|
code?: "invalid_input" | undefined;
|
|
@@ -983,11 +965,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
983
965
|
workerId: string;
|
|
984
966
|
};
|
|
985
967
|
} & {
|
|
986
|
-
json:
|
|
987
|
-
discardWork?: true | undefined;
|
|
988
|
-
};
|
|
968
|
+
json: Record<string, never>;
|
|
989
969
|
};
|
|
990
|
-
}
|
|
970
|
+
};
|
|
971
|
+
};
|
|
972
|
+
} & {
|
|
973
|
+
"/:workerId/destroy": {
|
|
974
|
+
$post: {
|
|
991
975
|
output: {
|
|
992
976
|
workerId: string;
|
|
993
977
|
state: "complete" | "incomplete";
|
|
@@ -1016,6 +1000,22 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1016
1000
|
discardWork?: true | undefined;
|
|
1017
1001
|
};
|
|
1018
1002
|
};
|
|
1003
|
+
} | {
|
|
1004
|
+
output: {
|
|
1005
|
+
error: string;
|
|
1006
|
+
code?: "invalid_input" | undefined;
|
|
1007
|
+
};
|
|
1008
|
+
outputFormat: "json";
|
|
1009
|
+
status: 400;
|
|
1010
|
+
input: {
|
|
1011
|
+
param: {
|
|
1012
|
+
workerId: string;
|
|
1013
|
+
};
|
|
1014
|
+
} & {
|
|
1015
|
+
json: {
|
|
1016
|
+
discardWork?: true | undefined;
|
|
1017
|
+
};
|
|
1018
|
+
};
|
|
1019
1019
|
} | {
|
|
1020
1020
|
output: {
|
|
1021
1021
|
workerId: string;
|
|
@@ -1051,11 +1051,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1051
1051
|
"/:workerId/diff": {
|
|
1052
1052
|
$get: {
|
|
1053
1053
|
output: {
|
|
1054
|
-
|
|
1055
|
-
|
|
1054
|
+
workerId: string;
|
|
1055
|
+
baselineSha: string;
|
|
1056
|
+
diff: string;
|
|
1057
|
+
truncated: boolean;
|
|
1056
1058
|
};
|
|
1057
1059
|
outputFormat: "json";
|
|
1058
|
-
status:
|
|
1060
|
+
status: 200;
|
|
1059
1061
|
input: {
|
|
1060
1062
|
param: {
|
|
1061
1063
|
workerId: string;
|
|
@@ -1063,13 +1065,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1063
1065
|
};
|
|
1064
1066
|
} | {
|
|
1065
1067
|
output: {
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
diff: string;
|
|
1069
|
-
truncated: boolean;
|
|
1068
|
+
error: string;
|
|
1069
|
+
code?: "invalid_input" | undefined;
|
|
1070
1070
|
};
|
|
1071
1071
|
outputFormat: "json";
|
|
1072
|
-
status:
|
|
1072
|
+
status: 400;
|
|
1073
1073
|
input: {
|
|
1074
1074
|
param: {
|
|
1075
1075
|
workerId: string;
|
|
@@ -6,8 +6,7 @@ import { CockpitOwnership, migrationFencePaths } from '../server/cockpit-ownersh
|
|
|
6
6
|
import { ProjectMigrationRefusedError, resolveKeptRunIds } from './engine.js';
|
|
7
7
|
import { projectCockpits, projectForeignTasksOffline } from './live.js';
|
|
8
8
|
import { moveUnderFence } from './offline.js';
|
|
9
|
-
import { LEGACY_PROJECT_DIR, planProjectMigration } from './plan.js';
|
|
10
|
-
import { legacyMoveWorkLeft } from './pending.js';
|
|
9
|
+
import { LEGACY_PROJECT_DIR, legacyStateLeft, MIGRATED_PROJECT_DIR, planProjectMigration } from './plan.js';
|
|
11
10
|
import { ProjectMigrationRecoveryError, recoverProjectMigration } from './recovery.js';
|
|
12
11
|
import { automationLeaseHeld } from '../automations/store.js';
|
|
13
12
|
/** Each cockpit run's (its ownership's) attempt per project: no retry loop inside one run, and a
|
|
@@ -29,56 +28,43 @@ async function blocker(root, homes) {
|
|
|
29
28
|
function refusal(plan) {
|
|
30
29
|
return [...plan.blockers, ...plan.conflicts.map(conflict => `${conflict.path}: ${conflict.reason}`)].join('; ');
|
|
31
30
|
}
|
|
32
|
-
const errorText = (error) => error instanceof Error ? error.message : String(error);
|
|
33
31
|
/**
|
|
34
|
-
* 'nothing' when there is nothing to move, a reason when the move must wait, or undefined to go
|
|
35
|
-
*
|
|
36
|
-
* a plan with a blocker or conflict before its journal exists. With one live, the move waits; the
|
|
37
|
-
* plan runs here only so that a refusal the operator must fix first is named instead.
|
|
32
|
+
* 'nothing' when there is nothing to move, a reason when the move must wait, or undefined to go ahead.
|
|
33
|
+
* As in the move itself, a plan refused anyway names its own refusal, not a failure to read the kept tasks.
|
|
38
34
|
*/
|
|
39
35
|
async function precheck(root, homes) {
|
|
40
|
-
// An unmarked project moves while its `.ai/cezar/` exists, even with nothing in it to carry: the move marks it.
|
|
41
|
-
if (!projectMoveMarked(root) && !pathPresent(join(root, ...LEGACY_PROJECT_DIR.split('/'))))
|
|
42
|
-
return 'nothing';
|
|
43
|
-
const live = await blocker(root, homes).catch(errorText);
|
|
44
|
-
if (!live)
|
|
45
|
-
return undefined;
|
|
46
36
|
try {
|
|
47
37
|
const plan = await planProjectMigration(root, { keep: await resolveKeptRunIds({ repoRoot: root }) });
|
|
48
38
|
const refused = refusal(plan);
|
|
49
39
|
if (refused)
|
|
50
40
|
return { reason: refused };
|
|
51
|
-
|
|
41
|
+
// An unmarked project moves while its `.ai/cezar/` exists, even with nothing in it to carry: the move marks it.
|
|
42
|
+
if (plan.alreadyMoved || (!projectMoveMarked(root) && !pathPresent(plan.source)))
|
|
52
43
|
return 'nothing';
|
|
53
|
-
|
|
44
|
+
const live = await blocker(root, homes);
|
|
45
|
+
return live ? { reason: live } : undefined;
|
|
54
46
|
}
|
|
55
47
|
catch (error) {
|
|
56
|
-
// As in the move itself, a plan refused anyway names its own refusal, not a failure to read the kept tasks.
|
|
57
48
|
if (error instanceof ProjectMigrationRefusedError)
|
|
58
49
|
return { reason: refusal(error.plan) };
|
|
59
|
-
return { reason:
|
|
50
|
+
return { reason: error instanceof Error ? error.message : String(error) };
|
|
60
51
|
}
|
|
61
52
|
}
|
|
62
53
|
/**
|
|
63
54
|
* The move under `ownership`'s fence. Any failure before the journal exists (a refusal, a race, a
|
|
64
55
|
* file system error claiming the fence) is a reason to wait: nothing moved, the project is served
|
|
65
|
-
* as before.
|
|
66
|
-
* tasks. Only a failure after the journal exists closes the project through recovery.
|
|
56
|
+
* as before. Only a failure after the journal exists closes the project through recovery.
|
|
67
57
|
*/
|
|
68
58
|
async function move(root, ownership, fault) {
|
|
69
59
|
try {
|
|
70
60
|
const answer = await moveUnderFence(root, ownership, fault);
|
|
71
|
-
if (answer.alreadyMoved)
|
|
72
|
-
return 'nothing';
|
|
73
61
|
return { gitMv: answer.gitMv, leftovers: answer.leftovers };
|
|
74
62
|
}
|
|
75
63
|
catch (error) {
|
|
76
64
|
const journal = migrationFencePaths(projectPaths(root).write).journal;
|
|
77
65
|
if (pathPresent(journal))
|
|
78
66
|
throw new ProjectMigrationRecoveryError(journal, root, error);
|
|
79
|
-
|
|
80
|
-
return { reason: refusal(error.plan) };
|
|
81
|
-
return { reason: errorText(error) };
|
|
67
|
+
return { reason: error instanceof Error ? error.message : String(error) };
|
|
82
68
|
}
|
|
83
69
|
}
|
|
84
70
|
/** What a later caller of an attempt that already ran sees: nothing left for it to move. */
|
|
@@ -112,10 +98,9 @@ export function moveProjectWhenIdle(root, options) {
|
|
|
112
98
|
async function attempt(root, options) {
|
|
113
99
|
markFreshProject(root);
|
|
114
100
|
// A completed move marked the project (hearsay-tools/cezarion#3150): `.ai/cezar/` is its fallback
|
|
115
|
-
// now, and holds nothing more to move once only
|
|
116
|
-
//
|
|
117
|
-
|
|
118
|
-
if (projectMoveMarked(root) && !await legacyMoveWorkLeft(root))
|
|
101
|
+
// now, and holds nothing more to move once only the ownership claims are left in it. An unmarked
|
|
102
|
+
// project still needs the move that marks it, even when its `.ai/cezar/` is empty or tracked only.
|
|
103
|
+
if (projectMoveMarked(root) && !legacyStateLeft(join(root, ...LEGACY_PROJECT_DIR.split('/')), join(root, ...MIGRATED_PROJECT_DIR.split('/'))))
|
|
119
104
|
return { status: 'nothing' };
|
|
120
105
|
const log = options.log ?? ((line) => console.warn(line));
|
|
121
106
|
const blocked = (reason) => {
|
|
@@ -130,8 +115,6 @@ async function attempt(root, options) {
|
|
|
130
115
|
const ownership = options.ownership ?? new CockpitOwnership();
|
|
131
116
|
try {
|
|
132
117
|
const result = await move(root, ownership, options.fault);
|
|
133
|
-
if (result === 'nothing')
|
|
134
|
-
return { status: 'nothing' };
|
|
135
118
|
if ('reason' in result)
|
|
136
119
|
return blocked(result.reason);
|
|
137
120
|
log(`[${productIdentity().command}] ${movedNotice(root, result.leftovers)}${result.gitMv.length
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auto.js","sourceRoot":"","sources":["../../src/project-migration/auto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxG,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACvF,OAAO,EAAE,4BAA4B,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,
|
|
1
|
+
{"version":3,"file":"auto.js","sourceRoot":"","sources":["../../src/project-migration/auto.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,EAAE,mBAAmB,EAAE,WAAW,EAAE,iBAAiB,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACxG,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,gCAAgC,CAAC;AACvF,OAAO,EAAE,4BAA4B,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,0BAA0B,EAAE,MAAM,WAAW,CAAC;AACxE,OAAO,EAAE,cAAc,EAAE,MAAM,cA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AC5E,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,MAAM,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACxC,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC,GAAG,IAAa,EAAE,EAAE,GAAG,OAAO,GAAG,IAAI,CAAC,CAAC,OAAO,KAAK,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAwB,CAAC;IACzG,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,OAAO,OAAO,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,EAAE,GAAG,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;AACjF,CAAC"}
|
|
@@ -62,12 +62,3 @@ export declare function projectForeignTasksOffline(root: string): LiveProjectTas
|
|
|
62
62
|
* items move.
|
|
63
63
|
*/
|
|
64
64
|
export declare function projectKeptRunIds(root: string): ReadonlySet<string>;
|
|
65
|
-
/**
|
|
66
|
-
* Which of `ids` can still resume, by the rule of `projectKeptRunIds`, read by id instead of
|
|
67
|
-
* parsing every row of every store: the cockpit's check whether the items a moved project keeps
|
|
68
|
-
* in `.ai/cezar/` may move now. Each store is read in place, so SQLite may touch its shared-memory
|
|
69
|
-
* file; the cockpit that asks opens the store anyway. Undefined when the answer is unknown: a store
|
|
70
|
-
* or an index without a store cannot be read, or a task is not archived or is live but its record
|
|
71
|
-
* cannot be read. The full plan then decides, as before.
|
|
72
|
-
*/
|
|
73
|
-
export declare function keptAmong(root: string, ids: ReadonlySet<string>): ReadonlySet<string> | undefined;
|
|
@@ -4,7 +4,7 @@ import { readCockpitLeases } from '../home/leases.js';
|
|
|
4
4
|
import { pathPresent, projectPaths } from '../project-paths.js';
|
|
5
5
|
import { projectLiveTasks } from '../runs/live-tasks.js';
|
|
6
6
|
import { claimOwnerLive } from '../runs/run-claims.js';
|
|
7
|
-
import { RUNS_DB_FILE
|
|
7
|
+
import { RUNS_DB_FILE } from '../runs/run-database.js';
|
|
8
8
|
import { parseRunRecords } from '../runs/store.js';
|
|
9
9
|
import { isLiveRecord } from '../runs/run-row.js';
|
|
10
10
|
import { anotherCockpitOwner } from '../server/cockpit-ownership.js';
|
|
@@ -187,61 +187,4 @@ export function projectKeptRunIds(root) {
|
|
|
187
187
|
kept.add(run.id);
|
|
188
188
|
return kept;
|
|
189
189
|
}
|
|
190
|
-
function taskFacts(db, id, facts) {
|
|
191
|
-
const row = db.get(id);
|
|
192
|
-
// The first store whose record parses wins; a row not archived that parses nowhere is unknown.
|
|
193
|
-
if (row && !facts.run) {
|
|
194
|
-
facts.run = record(parseJson(row.data));
|
|
195
|
-
if (!facts.run && !row.archived)
|
|
196
|
-
facts.unparsed = true;
|
|
197
|
-
}
|
|
198
|
-
if (row?.live)
|
|
199
|
-
facts.live = true;
|
|
200
|
-
const family = db.familyOf(id);
|
|
201
|
-
const claim = family === undefined ? undefined : db.getClaim(family);
|
|
202
|
-
if (claim && claimOwnerLive(claim))
|
|
203
|
-
facts.foreign = true;
|
|
204
|
-
}
|
|
205
|
-
/**
|
|
206
|
-
* Which of `ids` can still resume, by the rule of `projectKeptRunIds`, read by id instead of
|
|
207
|
-
* parsing every row of every store: the cockpit's check whether the items a moved project keeps
|
|
208
|
-
* in `.ai/cezar/` may move now. Each store is read in place, so SQLite may touch its shared-memory
|
|
209
|
-
* file; the cockpit that asks opens the store anyway. Undefined when the answer is unknown: a store
|
|
210
|
-
* or an index without a store cannot be read, or a task is not archived or is live but its record
|
|
211
|
-
* cannot be read. The full plan then decides, as before.
|
|
212
|
-
*/
|
|
213
|
-
export function keptAmong(root, ids) {
|
|
214
|
-
const facts = new Map([...ids].map(id => [id, { unparsed: false, live: false, foreign: false }]));
|
|
215
|
-
try {
|
|
216
|
-
for (const directory of projectPaths(root).reads) {
|
|
217
|
-
const database = join(directory, RUNS_DB_FILE);
|
|
218
|
-
if (!pathPresent(database)) {
|
|
219
|
-
if (pathPresent(join(directory, 'runs.json')))
|
|
220
|
-
return undefined;
|
|
221
|
-
continue;
|
|
222
|
-
}
|
|
223
|
-
const db = RunDatabase.openReadOnly(database);
|
|
224
|
-
if (!db)
|
|
225
|
-
return undefined;
|
|
226
|
-
try {
|
|
227
|
-
for (const [id, known] of facts)
|
|
228
|
-
taskFacts(db, id, known);
|
|
229
|
-
}
|
|
230
|
-
finally {
|
|
231
|
-
db.close();
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
catch {
|
|
236
|
-
return undefined;
|
|
237
|
-
}
|
|
238
|
-
const kept = new Set();
|
|
239
|
-
for (const [id, { run, unparsed, live, foreign }] of facts) {
|
|
240
|
-
if (!run && (unparsed || live || foreign))
|
|
241
|
-
return undefined;
|
|
242
|
-
if (run && (!run.archived || foreign || (live && isLiveRecord(run))))
|
|
243
|
-
kept.add(id);
|
|
244
|
-
}
|
|
245
|
-
return kept;
|
|
246
|
-
}
|
|
247
190
|
//# sourceMappingURL=live.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live.js","sourceRoot":"","sources":["../../src/project-migration/live.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAEjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"live.js","sourceRoot":"","sources":["../../src/project-migration/live.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACrD,OAAO,EAAE,IAAI,EA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,gBAAgB,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC;IAClE,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,OAAO,EAAE;QAAE,IAAI,CAAC,GAAG,CAAC,QAAQ;YAAE,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;IACtE,OAAO,IAAI,CAAC;AACd,CAAC"}
|
|
@@ -112,9 +112,6 @@ export declare function legacyItemsPresent(source: string): boolean;
|
|
|
112
112
|
/** Whether a moved project still has work for a move: items in the old directory `source`, or an
|
|
113
113
|
* unreadable kept-task list in `destination`, which a move rewrites from the run store. */
|
|
114
114
|
export declare function legacyStateLeft(source: string, destination: string): boolean;
|
|
115
|
-
/** The leftover tasks the moved directory `destination` names now, read from disk; undefined
|
|
116
|
-
* when the file is present but unreadable, so the move rewrites it from the run store. */
|
|
117
|
-
export declare function currentLeftovers(destination: string): string[] | undefined;
|
|
118
115
|
/** The dry run as text: every move, repair, rewrite, tracked file and conflict, and the boundary. */
|
|
119
116
|
export declare function describeProjectMigrationPlan(plan: ProjectMigrationPlan): string;
|
|
120
117
|
export {};
|
|
@@ -538,7 +538,7 @@ export function legacyStateLeft(source, destination) {
|
|
|
538
538
|
}
|
|
539
539
|
/** The leftover tasks the moved directory `destination` names now, read from disk; undefined
|
|
540
540
|
* when the file is present but unreadable, so the move rewrites it from the run store. */
|
|
541
|
-
|
|
541
|
+
function currentLeftovers(destination) {
|
|
542
542
|
forgetLegacyRunIds(destination);
|
|
543
543
|
try {
|
|
544
544
|
return [...legacyRunIds(destination)].sort();
|