@hearsay-tools/squawk 0.18.0-pr3814.7126.2 → 0.18.0-pr3822.7151
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/contract/config-requests.d.ts +4 -0
- package/dist/contract/index.js +11 -2
- package/dist/contract/workspace.d.ts +14 -0
- package/dist/delegation/routes.d.ts +62 -62
- package/dist/server/config-merge.js +7 -6
- package/dist/server/config-merge.js.map +1 -1
- package/dist/server/server.d.ts +44 -0
- package/dist/server/server.js +11 -11
- package/dist/server/server.js.map +1 -1
- package/dist/worktree-setup.d.ts +9 -0
- package/dist/worktree-setup.js +8 -0
- package/dist/worktree-setup.js.map +1 -1
- package/package.json +4 -4
- package/web/dist/assets/{activity-motion-CRjdIuq0.js → activity-motion-DUCV5L0w.js} +1 -1
- package/web/dist/assets/{activity-route-4yon6jwC.js → activity-route-DhR7Phxz.js} +1 -1
- package/web/dist/assets/{agent-accounts-l_Gn-Dja.js → agent-accounts-Ck78cTaG.js} +1 -1
- package/web/dist/assets/attention-DLIMAzlf.js +1 -0
- package/web/dist/assets/{cez-idle-BEO5j8ow.js → cez-idle-Catc8I8F.js} +1 -1
- package/web/dist/assets/{commit-diff-panel-Cfnt30Tt.js → commit-diff-panel-DROIgIvc.js} +1 -1
- package/web/dist/assets/{diff-Dx1bGt0w.js → diff-DpxnwWWi.js} +2 -2
- package/web/dist/assets/{diff-view-DJ4iFfkd.js → diff-view-CT2koEmZ.js} +1 -1
- package/web/dist/assets/{file-preview-6POBIfS-.js → file-preview-DoN49plc.js} +1 -1
- package/web/dist/assets/{git-toolbar-DwK9tJOu.js → git-toolbar-BK3rzi1x.js} +1 -1
- package/web/dist/assets/{github-shozEZ-Z.js → github-C3NKXyls.js} +1 -1
- package/web/dist/assets/{global-activity-route-D_JqpAAR.js → global-activity-route-S7yzZmEr.js} +1 -1
- package/web/dist/assets/index-BRcS2Xvy.css +1 -0
- package/web/dist/assets/index-DgjX4EGJ.js +14 -0
- package/web/dist/assets/{live-protocol-Bn-xWBmZ.js → live-protocol-B8HJ-VW8.js} +1 -1
- package/web/dist/assets/{markdown-fN_tqxh3.js → markdown-B0anEsMd.js} +1 -1
- package/web/dist/assets/{picker-pill-BuYiT3fS.js → picker-pill-Bd3Q9PFA.js} +1 -1
- package/web/dist/assets/preview-pane-connected-BzekXFjg.js +3 -0
- package/web/dist/assets/{project-router-C68VktrY.js → project-router-BKoMKwmx.js} +1 -1
- package/web/dist/assets/{project-scope-context-Vv8ygMl6.js → project-scope-context-Cb2B_LxQ.js} +1 -1
- package/web/dist/assets/{prompt-template-menu-hXOsL4ia.js → prompt-template-menu-BBSaimz3.js} +1 -1
- package/web/dist/assets/{queries-Drt3XAiW.js → queries-Bb9GjWMQ.js} +1 -1
- package/web/dist/assets/{reference-chip-oVw9Lal9.js → reference-chip-AYFrAylA.js} +1 -1
- package/web/dist/assets/{repo-git-B295X5Wv.js → repo-git-B7ZeLEvR.js} +1 -1
- package/web/dist/assets/{report-reader-HocN04sH.js → report-reader-D3ClRGaS.js} +1 -1
- package/web/dist/assets/{reports-B1KiT5at.js → reports-DY-sN7ya.js} +1 -1
- package/web/dist/assets/run-header-B2aqbtt8.js +2 -0
- package/web/dist/assets/skills-CvgUI4o3.js +1 -0
- package/web/dist/assets/{tab-link-B4u5eY7O.js → tab-link-CekOt2NF.js} +1 -1
- package/web/dist/assets/{task-changes-Bx8mrihw.js → task-changes-DI7U63bx.js} +1 -1
- package/web/dist/assets/{task-commits-bARHGfsG.js → task-commits-BHb8bDAK.js} +1 -1
- package/web/dist/assets/{task-files-_SX670LL.js → task-files-C_JvFlH3.js} +1 -1
- package/web/dist/assets/{task-github-item-Cw8-5BXV.js → task-github-item-Da601f-w.js} +1 -1
- package/web/dist/assets/{task-thread-BAeGEFEe.js → task-thread-BcgJ2CLQ.js} +6 -6
- package/web/dist/assets/{thread-state-BpW3fVNR.js → thread-state-AfNliBC6.js} +1 -1
- package/web/dist/assets/{use-desktop-CuYLi0j4.js → use-desktop-tg8hhNdq.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-DU4XEkhv.js → use-hand-to-agent-state-CFQoeO76.js} +1 -1
- package/web/dist/assets/{useInfiniteQuery-LV3jJNT5.js → useInfiniteQuery-De6BP_4x.js} +1 -1
- package/web/dist/assets/useQuery-BsOmvrd_.js +1 -0
- package/web/dist/assets/{workflows-B_b47Jog.js → workflows-C-sOpa7G.js} +3 -3
- package/web/dist/assets/{ws-DfYRWmd-.js → ws-2N3miuuZ.js} +1 -1
- package/web/dist/index.html +16 -16
- package/web/dist/live-worker.js +1 -1
- package/web/dist/assets/attention-DcMKBngT.js +0 -1
- package/web/dist/assets/index-BhQ7JeB6.css +0 -1
- package/web/dist/assets/index-DMq98FV0.js +0 -14
- package/web/dist/assets/preview-pane-connected-D81HxFOI.js +0 -3
- package/web/dist/assets/run-header-DyKGLM8b.js +0 -2
- package/web/dist/assets/skills-BRDqkbTt.js +0 -1
- package/web/dist/assets/useQuery-DdfGRa2n.js +0 -1
|
@@ -26,6 +26,10 @@ export declare const setConfigSchema: z.ZodObject<{
|
|
|
26
26
|
commands: z.ZodArray<z.ZodString>;
|
|
27
27
|
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
28
28
|
}, z.core.$strict>>>;
|
|
29
|
+
worktreeTeardown: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
30
|
+
commands: z.ZodArray<z.ZodString>;
|
|
31
|
+
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
}, z.core.$strict>>>;
|
|
29
33
|
systemPrompt: z.ZodOptional<z.ZodNullable<z.ZodString>>;
|
|
30
34
|
}, z.core.$strip>;
|
|
31
35
|
export declare const setAgentConfigSchema: z.ZodObject<{
|
package/dist/contract/index.js
CHANGED
|
@@ -418,7 +418,13 @@ var configResponseSchema = z7.object({
|
|
|
418
418
|
* timeout filled in. null = no setup, or an invalid value (then `worktreeSetupIssue` says why). */
|
|
419
419
|
worktreeSetup: z7.object({ commands: z7.array(z7.string()), timeoutSeconds: z7.number() }).nullable(),
|
|
420
420
|
/** Why `config.json`'s `worktreeSetup` is invalid; null when it is valid or absent. */
|
|
421
|
-
worktreeSetupIssue: z7.string().nullable()
|
|
421
|
+
worktreeSetupIssue: z7.string().nullable(),
|
|
422
|
+
/** Worktree teardown (hearsay-tools/squawk#914): the commands worker destroy runs in the worker's
|
|
423
|
+
* worktree before it looks for holders, with the timeout filled in. null = no teardown, or an
|
|
424
|
+
* invalid value (then `worktreeTeardownIssue` says why). */
|
|
425
|
+
worktreeTeardown: z7.object({ commands: z7.array(z7.string()), timeoutSeconds: z7.number() }).nullable(),
|
|
426
|
+
/** Why `config.json`'s `worktreeTeardown` is invalid; null when it is valid or absent. */
|
|
427
|
+
worktreeTeardownIssue: z7.string().nullable()
|
|
422
428
|
});
|
|
423
429
|
var setConfigResponseSchema = configResponseSchema;
|
|
424
430
|
var setConfigInputSchema = z7.object({
|
|
@@ -444,7 +450,10 @@ var setConfigInputSchema = z7.object({
|
|
|
444
450
|
reviewGate: z7.boolean().nullable().optional(),
|
|
445
451
|
/** Worktree setup (#917). null or an empty command list deletes the key. Refused with 409 by a
|
|
446
452
|
* hosted cockpit: these are commands the host runs. */
|
|
447
|
-
worktreeSetup: worktreeSetupConfigSchema.nullable().optional()
|
|
453
|
+
worktreeSetup: worktreeSetupConfigSchema.nullable().optional(),
|
|
454
|
+
/** Worktree teardown (hearsay-tools/squawk#914): the same shape, clear values and hosted-cockpit
|
|
455
|
+
* refusal as `worktreeSetup`. */
|
|
456
|
+
worktreeTeardown: worktreeSetupConfigSchema.nullable().optional()
|
|
448
457
|
});
|
|
449
458
|
var providerIdSchema = runnerSchema;
|
|
450
459
|
var providerConnectionStateSchema = z7.enum([
|
|
@@ -355,6 +355,11 @@ export declare const configResponseSchema: z.ZodObject<{
|
|
|
355
355
|
timeoutSeconds: z.ZodNumber;
|
|
356
356
|
}, z.core.$strip>>;
|
|
357
357
|
worktreeSetupIssue: z.ZodNullable<z.ZodString>;
|
|
358
|
+
worktreeTeardown: z.ZodNullable<z.ZodObject<{
|
|
359
|
+
commands: z.ZodArray<z.ZodString>;
|
|
360
|
+
timeoutSeconds: z.ZodNumber;
|
|
361
|
+
}, z.core.$strip>>;
|
|
362
|
+
worktreeTeardownIssue: z.ZodNullable<z.ZodString>;
|
|
358
363
|
}, z.core.$strip>;
|
|
359
364
|
export type ConfigResponse = z.infer<typeof configResponseSchema>;
|
|
360
365
|
/** The `PUT /api/v1/config` answer: the same shape GET serves (`configAnswer` builds both). */
|
|
@@ -394,6 +399,11 @@ export declare const setConfigResponseSchema: z.ZodObject<{
|
|
|
394
399
|
timeoutSeconds: z.ZodNumber;
|
|
395
400
|
}, z.core.$strip>>;
|
|
396
401
|
worktreeSetupIssue: z.ZodNullable<z.ZodString>;
|
|
402
|
+
worktreeTeardown: z.ZodNullable<z.ZodObject<{
|
|
403
|
+
commands: z.ZodArray<z.ZodString>;
|
|
404
|
+
timeoutSeconds: z.ZodNumber;
|
|
405
|
+
}, z.core.$strip>>;
|
|
406
|
+
worktreeTeardownIssue: z.ZodNullable<z.ZodString>;
|
|
397
407
|
}, z.core.$strip>;
|
|
398
408
|
export type SetConfigResponse = z.infer<typeof setConfigResponseSchema>;
|
|
399
409
|
/**
|
|
@@ -430,6 +440,10 @@ export declare const setConfigInputSchema: z.ZodObject<{
|
|
|
430
440
|
commands: z.ZodArray<z.ZodString>;
|
|
431
441
|
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
432
442
|
}, z.core.$strict>>>;
|
|
443
|
+
worktreeTeardown: z.ZodOptional<z.ZodNullable<z.ZodObject<{
|
|
444
|
+
commands: z.ZodArray<z.ZodString>;
|
|
445
|
+
timeoutSeconds: z.ZodOptional<z.ZodNumber>;
|
|
446
|
+
}, z.core.$strict>>>;
|
|
433
447
|
}, z.core.$strip>;
|
|
434
448
|
export type SetConfigInput = z.infer<typeof setConfigInputSchema>;
|
|
435
449
|
/** The agent backends are the providers — one alias, never a second enum. */
|
|
@@ -27,6 +27,18 @@ 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
|
+
} | {
|
|
30
42
|
output: {
|
|
31
43
|
workers: {
|
|
32
44
|
workerId: string;
|
|
@@ -64,18 +76,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
64
76
|
offset?: string | undefined;
|
|
65
77
|
};
|
|
66
78
|
};
|
|
67
|
-
} | {
|
|
68
|
-
output: {
|
|
69
|
-
error: string;
|
|
70
|
-
code?: "invalid_input" | undefined;
|
|
71
|
-
};
|
|
72
|
-
outputFormat: "json";
|
|
73
|
-
status: 400;
|
|
74
|
-
input: {
|
|
75
|
-
query: {
|
|
76
|
-
offset?: string | undefined;
|
|
77
|
-
};
|
|
78
|
-
};
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
81
|
} & {
|
|
@@ -613,6 +613,18 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
613
613
|
} & {
|
|
614
614
|
"/:workerId": {
|
|
615
615
|
$get: {
|
|
616
|
+
output: {
|
|
617
|
+
error: string;
|
|
618
|
+
code?: "invalid_input" | undefined;
|
|
619
|
+
};
|
|
620
|
+
outputFormat: "json";
|
|
621
|
+
status: 400;
|
|
622
|
+
input: {
|
|
623
|
+
param: {
|
|
624
|
+
workerId: string;
|
|
625
|
+
};
|
|
626
|
+
};
|
|
627
|
+
} | {
|
|
616
628
|
output: {
|
|
617
629
|
workerId: string;
|
|
618
630
|
parentRunId: string;
|
|
@@ -720,7 +732,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
720
732
|
workerId: string;
|
|
721
733
|
};
|
|
722
734
|
};
|
|
723
|
-
}
|
|
735
|
+
};
|
|
736
|
+
};
|
|
737
|
+
} & {
|
|
738
|
+
"/:workerId/collect": {
|
|
739
|
+
$post: {
|
|
724
740
|
output: {
|
|
725
741
|
error: string;
|
|
726
742
|
code?: "invalid_input" | undefined;
|
|
@@ -731,12 +747,10 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
731
747
|
param: {
|
|
732
748
|
workerId: string;
|
|
733
749
|
};
|
|
750
|
+
} & {
|
|
751
|
+
json: Record<string, never>;
|
|
734
752
|
};
|
|
735
|
-
}
|
|
736
|
-
};
|
|
737
|
-
} & {
|
|
738
|
-
"/:workerId/collect": {
|
|
739
|
-
$post: {
|
|
753
|
+
} | {
|
|
740
754
|
output: {
|
|
741
755
|
workerId: string;
|
|
742
756
|
parentRunId: string;
|
|
@@ -838,7 +852,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
838
852
|
} & {
|
|
839
853
|
json: Record<string, never>;
|
|
840
854
|
};
|
|
841
|
-
}
|
|
855
|
+
};
|
|
856
|
+
};
|
|
857
|
+
} & {
|
|
858
|
+
"/:workerId/steer": {
|
|
859
|
+
$post: {
|
|
842
860
|
output: {
|
|
843
861
|
error: string;
|
|
844
862
|
code?: "invalid_input" | undefined;
|
|
@@ -850,13 +868,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
850
868
|
workerId: string;
|
|
851
869
|
};
|
|
852
870
|
} & {
|
|
853
|
-
json:
|
|
871
|
+
json: {
|
|
872
|
+
text: string;
|
|
873
|
+
};
|
|
854
874
|
};
|
|
855
|
-
}
|
|
856
|
-
};
|
|
857
|
-
} & {
|
|
858
|
-
"/:workerId/steer": {
|
|
859
|
-
$post: {
|
|
875
|
+
} | {
|
|
860
876
|
output: {
|
|
861
877
|
workerId: string;
|
|
862
878
|
state: "delivered" | "queued";
|
|
@@ -872,7 +888,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
872
888
|
text: string;
|
|
873
889
|
};
|
|
874
890
|
};
|
|
875
|
-
}
|
|
891
|
+
};
|
|
892
|
+
};
|
|
893
|
+
} & {
|
|
894
|
+
"/:workerId/stop": {
|
|
895
|
+
$post: {
|
|
876
896
|
output: {
|
|
877
897
|
error: string;
|
|
878
898
|
code?: "invalid_input" | undefined;
|
|
@@ -884,15 +904,9 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
884
904
|
workerId: string;
|
|
885
905
|
};
|
|
886
906
|
} & {
|
|
887
|
-
json:
|
|
888
|
-
text: string;
|
|
889
|
-
};
|
|
907
|
+
json: Record<string, never>;
|
|
890
908
|
};
|
|
891
|
-
}
|
|
892
|
-
};
|
|
893
|
-
} & {
|
|
894
|
-
"/:workerId/stop": {
|
|
895
|
-
$post: {
|
|
909
|
+
} | {
|
|
896
910
|
output: {
|
|
897
911
|
workerId: string;
|
|
898
912
|
state: "stopping" | "terminated";
|
|
@@ -906,7 +920,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
906
920
|
} & {
|
|
907
921
|
json: Record<string, never>;
|
|
908
922
|
};
|
|
909
|
-
}
|
|
923
|
+
};
|
|
924
|
+
};
|
|
925
|
+
} & {
|
|
926
|
+
"/:workerId/destroy": {
|
|
927
|
+
$post: {
|
|
910
928
|
output: {
|
|
911
929
|
error: string;
|
|
912
930
|
code?: "invalid_input" | undefined;
|
|
@@ -920,11 +938,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
920
938
|
} & {
|
|
921
939
|
json: Record<string, never>;
|
|
922
940
|
};
|
|
923
|
-
}
|
|
924
|
-
};
|
|
925
|
-
} & {
|
|
926
|
-
"/:workerId/destroy": {
|
|
927
|
-
$post: {
|
|
941
|
+
} | {
|
|
928
942
|
output: {
|
|
929
943
|
workerId: string;
|
|
930
944
|
state: "complete" | "incomplete";
|
|
@@ -947,20 +961,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
947
961
|
} & {
|
|
948
962
|
json: Record<string, never>;
|
|
949
963
|
};
|
|
950
|
-
} | {
|
|
951
|
-
output: {
|
|
952
|
-
error: string;
|
|
953
|
-
code?: "invalid_input" | undefined;
|
|
954
|
-
};
|
|
955
|
-
outputFormat: "json";
|
|
956
|
-
status: 400;
|
|
957
|
-
input: {
|
|
958
|
-
param: {
|
|
959
|
-
workerId: string;
|
|
960
|
-
};
|
|
961
|
-
} & {
|
|
962
|
-
json: Record<string, never>;
|
|
963
|
-
};
|
|
964
964
|
} | {
|
|
965
965
|
output: {
|
|
966
966
|
workerId: string;
|
|
@@ -990,13 +990,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
990
990
|
"/:workerId/diff": {
|
|
991
991
|
$get: {
|
|
992
992
|
output: {
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
diff: string;
|
|
996
|
-
truncated: boolean;
|
|
993
|
+
error: string;
|
|
994
|
+
code?: "invalid_input" | undefined;
|
|
997
995
|
};
|
|
998
996
|
outputFormat: "json";
|
|
999
|
-
status:
|
|
997
|
+
status: 400;
|
|
1000
998
|
input: {
|
|
1001
999
|
param: {
|
|
1002
1000
|
workerId: string;
|
|
@@ -1004,11 +1002,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1004
1002
|
};
|
|
1005
1003
|
} | {
|
|
1006
1004
|
output: {
|
|
1007
|
-
|
|
1008
|
-
|
|
1005
|
+
workerId: string;
|
|
1006
|
+
baselineSha: string;
|
|
1007
|
+
diff: string;
|
|
1008
|
+
truncated: boolean;
|
|
1009
1009
|
};
|
|
1010
1010
|
outputFormat: "json";
|
|
1011
|
-
status:
|
|
1011
|
+
status: 200;
|
|
1012
1012
|
input: {
|
|
1013
1013
|
param: {
|
|
1014
1014
|
workerId: string;
|
|
@@ -8,15 +8,15 @@ function applyValue(raw, key, value, clear = [null]) {
|
|
|
8
8
|
else
|
|
9
9
|
raw[key] = value;
|
|
10
10
|
}
|
|
11
|
-
function
|
|
12
|
-
// null or no commands = no
|
|
13
|
-
const setup = body
|
|
11
|
+
function applyWorktreeCommands(raw, body, key) {
|
|
12
|
+
// null or no commands = no commands: delete the key rather than store an empty list.
|
|
13
|
+
const setup = body[key];
|
|
14
14
|
if (setup === undefined)
|
|
15
15
|
return;
|
|
16
16
|
if (setup === null || setup.commands.length === 0)
|
|
17
|
-
delete raw
|
|
17
|
+
delete raw[key];
|
|
18
18
|
else
|
|
19
|
-
raw
|
|
19
|
+
raw[key] = {
|
|
20
20
|
commands: setup.commands,
|
|
21
21
|
...(setup.timeoutSeconds !== undefined ? { timeoutSeconds: setup.timeoutSeconds } : {}),
|
|
22
22
|
};
|
|
@@ -52,7 +52,8 @@ const fieldAppliers = {
|
|
|
52
52
|
reviewGate: (raw, body) => applyValue(raw, 'reviewGate', body.reviewGate),
|
|
53
53
|
// null or 0 both mean "no ceiling" — drop the key back to the default.
|
|
54
54
|
memoryLimitMb: (raw, body) => applyValue(raw, 'memoryLimitMb', body.memoryLimitMb, [null, 0]),
|
|
55
|
-
worktreeSetup:
|
|
55
|
+
worktreeSetup: (raw, body) => applyWorktreeCommands(raw, body, 'worktreeSetup'),
|
|
56
|
+
worktreeTeardown: (raw, body) => applyWorktreeCommands(raw, body, 'worktreeTeardown'),
|
|
56
57
|
defaultModels: applyDefaultModels,
|
|
57
58
|
};
|
|
58
59
|
/** Merge parsed config fields without materializing defaults or mutating either input. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-merge.js","sourceRoot":"","sources":["../../src/server/config-merge.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAC;AAKhD,sFAAsF;AACtF,SAAS,UAAU,CAAC,GAAc,EAAE,GAAW,EAAE,KAAc,EAAE,KAAK,GAAuB,CAAC,IAAI,CAAC;IACjG,IAA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AC,MAAM,CAAC,aAAa,CAAC;QAAE,KAAK,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC;IACpE,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,OAAe,EAAE,IAAoB;IACrE,OAAO,gBAAgB,CAAqB,OAAO,EAAE,CAAC,OAAO,EAAE,EAAE,CAC/D,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;AACrI,CAAC"}
|
package/dist/server/server.d.ts
CHANGED
|
@@ -3684,6 +3684,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
3684
3684
|
timeoutSeconds: number;
|
|
3685
3685
|
} | null;
|
|
3686
3686
|
worktreeSetupIssue: string | null;
|
|
3687
|
+
worktreeTeardown: {
|
|
3688
|
+
commands: string[];
|
|
3689
|
+
timeoutSeconds: number;
|
|
3690
|
+
} | null;
|
|
3691
|
+
worktreeTeardownIssue: string | null;
|
|
3687
3692
|
};
|
|
3688
3693
|
outputFormat: "json";
|
|
3689
3694
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
@@ -3718,6 +3723,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
3718
3723
|
timeoutSeconds: number;
|
|
3719
3724
|
} | null;
|
|
3720
3725
|
worktreeSetupIssue: string | null;
|
|
3726
|
+
worktreeTeardown: {
|
|
3727
|
+
commands: string[];
|
|
3728
|
+
timeoutSeconds: number;
|
|
3729
|
+
} | null;
|
|
3730
|
+
worktreeTeardownIssue: string | null;
|
|
3721
3731
|
};
|
|
3722
3732
|
outputFormat: "json";
|
|
3723
3733
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
@@ -3742,6 +3752,10 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
3742
3752
|
commands: string[];
|
|
3743
3753
|
timeoutSeconds?: number | undefined;
|
|
3744
3754
|
} | null | undefined;
|
|
3755
|
+
worktreeTeardown?: {
|
|
3756
|
+
commands: string[];
|
|
3757
|
+
timeoutSeconds?: number | undefined;
|
|
3758
|
+
} | null | undefined;
|
|
3745
3759
|
systemPrompt?: string | null | undefined;
|
|
3746
3760
|
};
|
|
3747
3761
|
};
|
|
@@ -3772,6 +3786,10 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
3772
3786
|
commands: string[];
|
|
3773
3787
|
timeoutSeconds?: number | undefined;
|
|
3774
3788
|
} | null | undefined;
|
|
3789
|
+
worktreeTeardown?: {
|
|
3790
|
+
commands: string[];
|
|
3791
|
+
timeoutSeconds?: number | undefined;
|
|
3792
|
+
} | null | undefined;
|
|
3775
3793
|
systemPrompt?: string | null | undefined;
|
|
3776
3794
|
};
|
|
3777
3795
|
};
|
|
@@ -3802,6 +3820,10 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
3802
3820
|
commands: string[];
|
|
3803
3821
|
timeoutSeconds?: number | undefined;
|
|
3804
3822
|
} | null | undefined;
|
|
3823
|
+
worktreeTeardown?: {
|
|
3824
|
+
commands: string[];
|
|
3825
|
+
timeoutSeconds?: number | undefined;
|
|
3826
|
+
} | null | undefined;
|
|
3805
3827
|
systemPrompt?: string | null | undefined;
|
|
3806
3828
|
};
|
|
3807
3829
|
};
|
|
@@ -19354,6 +19376,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
19354
19376
|
timeoutSeconds: number;
|
|
19355
19377
|
} | null;
|
|
19356
19378
|
worktreeSetupIssue: string | null;
|
|
19379
|
+
worktreeTeardown: {
|
|
19380
|
+
commands: string[];
|
|
19381
|
+
timeoutSeconds: number;
|
|
19382
|
+
} | null;
|
|
19383
|
+
worktreeTeardownIssue: string | null;
|
|
19357
19384
|
};
|
|
19358
19385
|
outputFormat: "json";
|
|
19359
19386
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
@@ -19388,6 +19415,11 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
19388
19415
|
timeoutSeconds: number;
|
|
19389
19416
|
} | null;
|
|
19390
19417
|
worktreeSetupIssue: string | null;
|
|
19418
|
+
worktreeTeardown: {
|
|
19419
|
+
commands: string[];
|
|
19420
|
+
timeoutSeconds: number;
|
|
19421
|
+
} | null;
|
|
19422
|
+
worktreeTeardownIssue: string | null;
|
|
19391
19423
|
};
|
|
19392
19424
|
outputFormat: "json";
|
|
19393
19425
|
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
@@ -19412,6 +19444,10 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
19412
19444
|
commands: string[];
|
|
19413
19445
|
timeoutSeconds?: number | undefined;
|
|
19414
19446
|
} | null | undefined;
|
|
19447
|
+
worktreeTeardown?: {
|
|
19448
|
+
commands: string[];
|
|
19449
|
+
timeoutSeconds?: number | undefined;
|
|
19450
|
+
} | null | undefined;
|
|
19415
19451
|
systemPrompt?: string | null | undefined;
|
|
19416
19452
|
};
|
|
19417
19453
|
};
|
|
@@ -19442,6 +19478,10 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
19442
19478
|
commands: string[];
|
|
19443
19479
|
timeoutSeconds?: number | undefined;
|
|
19444
19480
|
} | null | undefined;
|
|
19481
|
+
worktreeTeardown?: {
|
|
19482
|
+
commands: string[];
|
|
19483
|
+
timeoutSeconds?: number | undefined;
|
|
19484
|
+
} | null | undefined;
|
|
19445
19485
|
systemPrompt?: string | null | undefined;
|
|
19446
19486
|
};
|
|
19447
19487
|
};
|
|
@@ -19472,6 +19512,10 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
19472
19512
|
commands: string[];
|
|
19473
19513
|
timeoutSeconds?: number | undefined;
|
|
19474
19514
|
} | null | undefined;
|
|
19515
|
+
worktreeTeardown?: {
|
|
19516
|
+
commands: string[];
|
|
19517
|
+
timeoutSeconds?: number | undefined;
|
|
19518
|
+
} | null | undefined;
|
|
19475
19519
|
systemPrompt?: string | null | undefined;
|
|
19476
19520
|
};
|
|
19477
19521
|
};
|
package/dist/server/server.js
CHANGED
|
@@ -117,7 +117,7 @@ import { attributeLog, classifyInputFor, deleteBranches, forgetRepoBranches, rea
|
|
|
117
117
|
import { claimRepoGitMutation, localPullBranches, pullRepoCheckout } from './repo-pull.js';
|
|
118
118
|
import { collectChanges, collectCommitChanges, collectRunCommits, commitAll, createOrSwitchBranch, pushCurrentBranch, readWorktreePath, } from './git-changes.js';
|
|
119
119
|
import { healthConfig, loadConfig, resolveWorktreeRetention } from '../config.js';
|
|
120
|
-
import {
|
|
120
|
+
import { reportWorktreeCommands } from '../worktree-setup.js';
|
|
121
121
|
import { readConfigFile, statConfigPath, writeConfigFile } from '../agent-config/files.js';
|
|
122
122
|
import { readAgentModelDefaults } from '../agent-config/models.js';
|
|
123
123
|
import { listAgentConfig } from '../agent-config/service.js';
|
|
@@ -3985,14 +3985,15 @@ export function createApp(deps) {
|
|
|
3985
3985
|
release();
|
|
3986
3986
|
}
|
|
3987
3987
|
});
|
|
3988
|
-
/** #917: setup commands run on the host
|
|
3989
|
-
const
|
|
3988
|
+
/** #917, hearsay-tools/squawk#914: setup and teardown commands run on the host. */
|
|
3989
|
+
const WORKTREE_COMMANDS_HOSTED_ERROR = `Worktree setup and teardown commands are read-only on this remote cockpit. To allow remote edits, run \`${productIdentity().command} remote-settings enable\` on the machine running ${productName('cezar')}.`;
|
|
3990
3990
|
// The Settings → Agents knobs in one read (R6 Step 1.5) — an ADDITIVE
|
|
3991
3991
|
// sibling of PUT /api/config below; /api/health keeps its protected shape.
|
|
3992
3992
|
const configAnswer = async (repoRoot, config) => {
|
|
3993
3993
|
const archive = resolveArchiveOnMerge(config, await loadWorkspaceConfig(deps.home.workspaceConfig));
|
|
3994
3994
|
const nativeModels = await readAgentModelDefaults(repoRoot);
|
|
3995
|
-
const setup =
|
|
3995
|
+
const setup = reportWorktreeCommands(config.worktreeSetup);
|
|
3996
|
+
const teardown = reportWorktreeCommands(config.worktreeTeardown);
|
|
3996
3997
|
const modelsLocked = agentModelsLocked(repoRoot, process.env, deps.home);
|
|
3997
3998
|
return {
|
|
3998
3999
|
archiveOnMerge: config.archiveOnMerge ?? null,
|
|
@@ -4018,9 +4019,9 @@ export function createApp(deps) {
|
|
|
4018
4019
|
// Optional review gate (#489): tri-state — null means "no config key, the
|
|
4019
4020
|
// CEZ_REVIEW_GATE env default (OFF) decides".
|
|
4020
4021
|
reviewGate: config.reviewGate ?? null,
|
|
4021
|
-
// Worktree setup (#917): an invalid value is reported
|
|
4022
|
-
worktreeSetup: setup.
|
|
4023
|
-
|
|
4022
|
+
// Worktree setup (#917) and teardown (hearsay-tools/squawk#914): an invalid value is reported.
|
|
4023
|
+
worktreeSetup: setup.value, worktreeSetupIssue: setup.issue,
|
|
4024
|
+
worktreeTeardown: teardown.value, worktreeTeardownIssue: teardown.issue,
|
|
4024
4025
|
};
|
|
4025
4026
|
};
|
|
4026
4027
|
// ---- chained family: per-repo config (project-scoped) ----
|
|
@@ -4035,10 +4036,9 @@ export function createApp(deps) {
|
|
|
4035
4036
|
if (agentModelsLocked(repoRoot, process.env, deps.home) && parsed.data.defaultModels !== undefined) {
|
|
4036
4037
|
return c.json({ error: AGENT_MODELS_LOCKED_ERROR }, 409);
|
|
4037
4038
|
}
|
|
4038
|
-
//
|
|
4039
|
-
|
|
4040
|
-
|
|
4041
|
-
return c.json({ error: WORKTREE_SETUP_HOSTED_ERROR }, 409);
|
|
4039
|
+
// Host commands need settings administration (hearsay-tools/cezarion#2428), checked before any write.
|
|
4040
|
+
if ([parsed.data.worktreeSetup, parsed.data.worktreeTeardown].some((v) => v !== undefined) && !capabilities().settingsAdmin) {
|
|
4041
|
+
return c.json({ error: WORKTREE_COMMANDS_HOSTED_ERROR }, 409);
|
|
4042
4042
|
}
|
|
4043
4043
|
const refused = await writeMergedConfig(dataDir, parsed.data).catch((err) => ({ failed: err instanceof Error ? err.message : String(err) }));
|
|
4044
4044
|
if (typeof refused === 'object')
|