@hearsay-tools/squawk 0.18.0-pr3813.7125.2 → 0.18.0-pr3815.7127
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/server/config-merge.js +7 -6
- package/dist/server/config-merge.js.map +1 -1
- package/dist/server/server.d.ts +102 -58
- 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-5Q9ABQow.js → activity-motion-CyEX8rL6.js} +1 -1
- package/web/dist/assets/{activity-route-DlqceI86.js → activity-route-DcTRaRgj.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-CwUNIjtb.js → commit-diff-panel-Bi6YXh5g.js} +1 -1
- package/web/dist/assets/{diff-DMP01PJZ.js → diff-DwvN-01t.js} +2 -2
- package/web/dist/assets/{diff-view-DZyBJH5T.js → diff-view-BcR4y84T.js} +1 -1
- package/web/dist/assets/{file-preview-aNd8Wo8R.js → file-preview-ByaoVbYu.js} +1 -1
- package/web/dist/assets/{git-toolbar-Dc1hryWl.js → git-toolbar-YtHcdCIz.js} +1 -1
- package/web/dist/assets/{github-Di8Pdrde.js → github-DCgnacFq.js} +1 -1
- package/web/dist/assets/{global-activity-route-B70RgFSF.js → global-activity-route-DXKVtPJS.js} +1 -1
- package/web/dist/assets/index-BhQ7JeB6.css +1 -0
- package/web/dist/assets/index-DetUdPPg.js +14 -0
- package/web/dist/assets/{live-protocol-Bn-xWBmZ.js → live-protocol-B8HJ-VW8.js} +1 -1
- package/web/dist/assets/{markdown-Biijl9n4.js → markdown-DuG8dQwY.js} +1 -1
- package/web/dist/assets/{picker-pill-BuYiT3fS.js → picker-pill-Bd3Q9PFA.js} +1 -1
- package/web/dist/assets/preview-pane-connected-g2INxRgP.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-DOw8cALs.js → repo-git-DSWWu3vz.js} +1 -1
- package/web/dist/assets/{report-reader-D27orMUh.js → report-reader-Ppsa0oCh.js} +1 -1
- package/web/dist/assets/{reports-CTVjW7ME.js → reports-DUQMFaO3.js} +1 -1
- package/web/dist/assets/run-header-DKNoRlDo.js +2 -0
- package/web/dist/assets/skills-BibW5PT7.js +1 -0
- package/web/dist/assets/{tab-link-B4u5eY7O.js → tab-link-CekOt2NF.js} +1 -1
- package/web/dist/assets/{task-changes-SgOFXdgF.js → task-changes-CVLI5qI-.js} +1 -1
- package/web/dist/assets/{task-commits-BJ9GfmSR.js → task-commits-Sn6Z1U8s.js} +1 -1
- package/web/dist/assets/{task-files-CMujD-kJ.js → task-files-CH6dpey9.js} +1 -1
- package/web/dist/assets/{task-github-item-BZI2C9-m.js → task-github-item-DCh49ITV.js} +1 -1
- package/web/dist/assets/{task-thread-9pHZ-2rQ.js → task-thread-oELdc5YR.js} +6 -6
- package/web/dist/assets/{thread-state-Cqckd5hi.js → thread-state-CtGUZehD.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-BLgQdNOA.js → use-hand-to-agent-state-YpAMIZ2r.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-D3elNo8t.js → workflows-DQBGigNM.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-BRcS2Xvy.css +0 -1
- package/web/dist/assets/index-BTkajdBn.js +0 -14
- package/web/dist/assets/preview-pane-connected-B_GEPKY3.js +0 -3
- package/web/dist/assets/run-header-a30D6eXM.js +0 -2
- package/web/dist/assets/skills-BKS6XwOM.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. */
|
|
@@ -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,GAAu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AK,MAAM,KAAK,IAAI,MAAM,CAAC,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
|
};
|
|
@@ -4516,19 +4538,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
4516
4538
|
} & {
|
|
4517
4539
|
"/repo/commit/:sha": {
|
|
4518
4540
|
$get: {
|
|
4519
|
-
output: string;
|
|
4520
|
-
outputFormat: "text";
|
|
4521
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
4522
|
-
input: {
|
|
4523
|
-
query: {
|
|
4524
|
-
structured?: string | undefined;
|
|
4525
|
-
};
|
|
4526
|
-
} & {
|
|
4527
|
-
param: {
|
|
4528
|
-
sha: string;
|
|
4529
|
-
};
|
|
4530
|
-
};
|
|
4531
|
-
} | {
|
|
4532
4541
|
output: {
|
|
4533
4542
|
error: string;
|
|
4534
4543
|
code?: "invalid_input" | undefined;
|
|
@@ -4592,6 +4601,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
4592
4601
|
sha: string;
|
|
4593
4602
|
};
|
|
4594
4603
|
};
|
|
4604
|
+
} | {
|
|
4605
|
+
output: string;
|
|
4606
|
+
outputFormat: "text";
|
|
4607
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
4608
|
+
input: {
|
|
4609
|
+
query: {
|
|
4610
|
+
structured?: string | undefined;
|
|
4611
|
+
};
|
|
4612
|
+
} & {
|
|
4613
|
+
param: {
|
|
4614
|
+
sha: string;
|
|
4615
|
+
};
|
|
4616
|
+
};
|
|
4595
4617
|
};
|
|
4596
4618
|
};
|
|
4597
4619
|
} & {
|
|
@@ -18100,20 +18122,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
18100
18122
|
} & {
|
|
18101
18123
|
"/runs/:id/handoff": {
|
|
18102
18124
|
$get: {
|
|
18103
|
-
output:
|
|
18104
|
-
|
|
18105
|
-
|
|
18125
|
+
output: {
|
|
18126
|
+
error: string;
|
|
18127
|
+
};
|
|
18128
|
+
outputFormat: "json";
|
|
18129
|
+
status: 404;
|
|
18106
18130
|
input: {
|
|
18107
18131
|
param: {
|
|
18108
18132
|
id: string;
|
|
18109
18133
|
};
|
|
18110
18134
|
};
|
|
18111
18135
|
} | {
|
|
18112
|
-
output:
|
|
18113
|
-
|
|
18114
|
-
|
|
18115
|
-
outputFormat: "json";
|
|
18116
|
-
status: 404;
|
|
18136
|
+
output: string;
|
|
18137
|
+
outputFormat: "text";
|
|
18138
|
+
status: 200;
|
|
18117
18139
|
input: {
|
|
18118
18140
|
param: {
|
|
18119
18141
|
id: string;
|
|
@@ -18151,20 +18173,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
18151
18173
|
} & {
|
|
18152
18174
|
"/runs/:id/diff": {
|
|
18153
18175
|
$get: {
|
|
18154
|
-
output:
|
|
18155
|
-
|
|
18156
|
-
|
|
18176
|
+
output: {
|
|
18177
|
+
error: string;
|
|
18178
|
+
};
|
|
18179
|
+
outputFormat: "json";
|
|
18180
|
+
status: 404 | 409;
|
|
18157
18181
|
input: {
|
|
18158
18182
|
param: {
|
|
18159
18183
|
id: string;
|
|
18160
18184
|
};
|
|
18161
18185
|
};
|
|
18162
18186
|
} | {
|
|
18163
|
-
output:
|
|
18164
|
-
|
|
18165
|
-
|
|
18166
|
-
outputFormat: "json";
|
|
18167
|
-
status: 404 | 409;
|
|
18187
|
+
output: string;
|
|
18188
|
+
outputFormat: "text";
|
|
18189
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
18168
18190
|
input: {
|
|
18169
18191
|
param: {
|
|
18170
18192
|
id: string;
|
|
@@ -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
|
};
|
|
@@ -20186,19 +20230,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
20186
20230
|
} & {
|
|
20187
20231
|
"/repo/commit/:sha": {
|
|
20188
20232
|
$get: {
|
|
20189
|
-
output: string;
|
|
20190
|
-
outputFormat: "text";
|
|
20191
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
20192
|
-
input: {
|
|
20193
|
-
query: {
|
|
20194
|
-
structured?: string | undefined;
|
|
20195
|
-
};
|
|
20196
|
-
} & {
|
|
20197
|
-
param: {
|
|
20198
|
-
sha: string;
|
|
20199
|
-
};
|
|
20200
|
-
};
|
|
20201
|
-
} | {
|
|
20202
20233
|
output: {
|
|
20203
20234
|
error: string;
|
|
20204
20235
|
code?: "invalid_input" | undefined;
|
|
@@ -20262,6 +20293,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
20262
20293
|
sha: string;
|
|
20263
20294
|
};
|
|
20264
20295
|
};
|
|
20296
|
+
} | {
|
|
20297
|
+
output: string;
|
|
20298
|
+
outputFormat: "text";
|
|
20299
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
20300
|
+
input: {
|
|
20301
|
+
query: {
|
|
20302
|
+
structured?: string | undefined;
|
|
20303
|
+
};
|
|
20304
|
+
} & {
|
|
20305
|
+
param: {
|
|
20306
|
+
sha: string;
|
|
20307
|
+
};
|
|
20308
|
+
};
|
|
20265
20309
|
};
|
|
20266
20310
|
};
|
|
20267
20311
|
} & {
|
|
@@ -33770,20 +33814,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
33770
33814
|
} & {
|
|
33771
33815
|
"/runs/:id/handoff": {
|
|
33772
33816
|
$get: {
|
|
33773
|
-
output:
|
|
33774
|
-
|
|
33775
|
-
|
|
33817
|
+
output: {
|
|
33818
|
+
error: string;
|
|
33819
|
+
};
|
|
33820
|
+
outputFormat: "json";
|
|
33821
|
+
status: 404;
|
|
33776
33822
|
input: {
|
|
33777
33823
|
param: {
|
|
33778
33824
|
id: string;
|
|
33779
33825
|
};
|
|
33780
33826
|
};
|
|
33781
33827
|
} | {
|
|
33782
|
-
output:
|
|
33783
|
-
|
|
33784
|
-
|
|
33785
|
-
outputFormat: "json";
|
|
33786
|
-
status: 404;
|
|
33828
|
+
output: string;
|
|
33829
|
+
outputFormat: "text";
|
|
33830
|
+
status: 200;
|
|
33787
33831
|
input: {
|
|
33788
33832
|
param: {
|
|
33789
33833
|
id: string;
|
|
@@ -33821,20 +33865,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
33821
33865
|
} & {
|
|
33822
33866
|
"/runs/:id/diff": {
|
|
33823
33867
|
$get: {
|
|
33824
|
-
output:
|
|
33825
|
-
|
|
33826
|
-
|
|
33868
|
+
output: {
|
|
33869
|
+
error: string;
|
|
33870
|
+
};
|
|
33871
|
+
outputFormat: "json";
|
|
33872
|
+
status: 404 | 409;
|
|
33827
33873
|
input: {
|
|
33828
33874
|
param: {
|
|
33829
33875
|
id: string;
|
|
33830
33876
|
};
|
|
33831
33877
|
};
|
|
33832
33878
|
} | {
|
|
33833
|
-
output:
|
|
33834
|
-
|
|
33835
|
-
|
|
33836
|
-
outputFormat: "json";
|
|
33837
|
-
status: 404 | 409;
|
|
33879
|
+
output: string;
|
|
33880
|
+
outputFormat: "text";
|
|
33881
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
33838
33882
|
input: {
|
|
33839
33883
|
param: {
|
|
33840
33884
|
id: string;
|
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')
|