@hearsay-tools/squawk 0.18.0-pr3433.6018 → 0.18.0-pr3434.6072
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/automations/enabled.d.ts +2 -0
- package/dist/automations/enabled.js +6 -0
- package/dist/automations/enabled.js.map +1 -0
- package/dist/autosave-commit.d.ts +52 -0
- package/dist/autosave-commit.js +378 -0
- package/dist/autosave-commit.js.map +1 -0
- package/dist/ci-wait/controller.d.ts +37 -37
- package/dist/ci-wait/tool-catalog.js +2 -1
- package/dist/ci-wait/tool-catalog.js.map +1 -1
- package/dist/ci-wait/tools.d.ts +4 -4
- package/dist/core/structured-output.d.ts +9 -0
- package/dist/core/structured-output.js +64 -0
- package/dist/core/structured-output.js.map +1 -0
- package/dist/delegation/routes.d.ts +15 -15
- package/dist/delegation/transport.d.ts +15 -15
- package/dist/git-worktree.d.ts +0 -52
- package/dist/git-worktree.js +2 -374
- package/dist/git-worktree.js.map +1 -1
- package/dist/home/recovery.d.ts +0 -1
- package/dist/home/recovery.js +0 -1
- package/dist/home/recovery.js.map +1 -1
- package/dist/planner.d.ts +1 -8
- package/dist/planner.js +2 -63
- package/dist/planner.js.map +1 -1
- package/dist/runs/auto-name.js +1 -1
- package/dist/runs/auto-name.js.map +1 -1
- package/dist/runs/webhook.d.ts +1 -3
- package/dist/runs/webhook.js +2 -10
- package/dist/runs/webhook.js.map +1 -1
- package/dist/server/capabilities.js +2 -1
- package/dist/server/capabilities.js.map +1 -1
- package/dist/server/forge/draft-pr.js +1 -1
- package/dist/server/forge/draft-pr.js.map +1 -1
- package/dist/server/home-recovery-routes.js +2 -1
- package/dist/server/home-recovery-routes.js.map +1 -1
- package/dist/server/live-routes.d.ts +6 -6
- package/dist/server/reports-api.d.ts +2 -2
- package/dist/server/server.d.ts +448 -448
- package/dist/voice/routes.d.ts +19 -19
- package/dist/workflows/run/continuation-session.d.ts +1 -1
- package/dist/workflows/run/input-delivery.d.ts +1 -1
- package/dist/workflows/run/input-delivery.js +3 -4
- package/dist/workflows/run/input-delivery.js.map +1 -1
- package/dist/workflows/run/launch-context.js +3 -3
- package/dist/workflows/run/launch-context.js.map +1 -1
- package/dist/workflows/run/run-settlement.d.ts +1 -1
- package/dist/workflows/run/run-settlement.js.map +1 -1
- package/dist/workflows/run/worktree-autosave.d.ts +1 -1
- package/dist/workflows/run/worktree-autosave.js +1 -1
- package/dist/workflows/run/worktree-autosave.js.map +1 -1
- package/dist/workspace/registry-entry.d.ts +4 -0
- package/dist/workspace/registry-entry.js +11 -0
- package/dist/workspace/registry-entry.js.map +1 -0
- package/package.json +4 -4
- package/scripts/mock-lifecycle.d.mts +2 -0
- package/scripts/mock-lifecycle.mjs +5 -1
- package/web/dist/assets/activity-motion-uhQPLbuu.js +2 -0
- package/web/dist/assets/activity-route-Dkulydc2.js +1 -0
- package/web/dist/assets/agent-accounts-BNlpWTOY.js +18 -0
- package/web/dist/assets/attention-VmnPpwJx.js +1 -0
- package/web/dist/assets/commit-diff-panel-C9GL2tao.js +1 -0
- package/web/dist/assets/diff-BbT6HX3u.js +3 -0
- package/web/dist/assets/{diff-view-B9kgeZTm.js → diff-view-oyOw4umg.js} +4 -4
- package/web/dist/assets/file-preview-BQ0R19La.js +2 -0
- package/web/dist/assets/git-toolbar-PeaVnT03.js +1 -0
- package/web/dist/assets/github-5L2qkK1k.js +1 -0
- package/web/dist/assets/global-activity-route-DLfuJ7Lw.js +1 -0
- package/web/dist/assets/index-CFbFtL5O.js +17 -0
- package/web/dist/assets/index-DI_O8V74.css +1 -0
- package/web/dist/assets/live-refetch-CZb2VOyu.js +1 -0
- package/web/dist/assets/popover-G6KGT-qq.js +1 -0
- package/web/dist/assets/preview-pane-connected-ClnZeK7_.js +3 -0
- package/web/dist/assets/prompt-template-menu-D4-inlE4.js +1 -0
- package/web/dist/assets/queries-D2MPDhtr.js +1 -0
- package/web/dist/assets/reference-chip-Drpbf-MP.js +1 -0
- package/web/dist/assets/repo-git-C5kdJUtx.js +1 -0
- package/web/dist/assets/report-reader-C9f7Zevx.js +1 -0
- package/web/dist/assets/reports-DLozsIav.js +1 -0
- package/web/dist/assets/run-header-gKKxDTom.js +2 -0
- package/web/dist/assets/skills-nbFjA9HV.js +1 -0
- package/web/dist/assets/task-changes-DcgY25bB.js +1 -0
- package/web/dist/assets/task-commits-amSX-bTC.js +1 -0
- package/web/dist/assets/task-files-BW4uOVGM.js +1 -0
- package/web/dist/assets/task-github-item-CG8dVePG.js +1 -0
- package/web/dist/assets/task-thread-BJRqzTFi.js +9 -0
- package/web/dist/assets/{thread-state-BtmIMbkZ.js → thread-state-CtFtvKUi.js} +1 -1
- package/web/dist/assets/use-hand-to-agent-state-DWLpzA5t.js +1 -0
- package/web/dist/assets/workflows-DDM-LFxD.js +7 -0
- package/web/dist/index.html +12 -11
- package/web/dist/assets/activity-motion-Bqd8S9Xy.js +0 -2
- package/web/dist/assets/activity-route-DQI_8J09.js +0 -1
- package/web/dist/assets/agent-accounts-C6eyz75V.js +0 -18
- package/web/dist/assets/commit-diff-panel-C7BUSPzE.js +0 -1
- package/web/dist/assets/control-locations-DlrUP5vD.js +0 -1
- package/web/dist/assets/diff-Bwy0qFul.js +0 -3
- package/web/dist/assets/file-preview-DrXgM1-S.js +0 -2
- package/web/dist/assets/git-toolbar-B1gOn_1U.js +0 -1
- package/web/dist/assets/github-g-ZOTwHQ.js +0 -1
- package/web/dist/assets/github-sidebar-model-BdoLA7qT.js +0 -1
- package/web/dist/assets/global-activity-route-CZ_xwiz3.js +0 -1
- package/web/dist/assets/index-75IttVLX.js +0 -17
- package/web/dist/assets/index-9YmaiQ1k.css +0 -1
- package/web/dist/assets/live-refetch-pzhdhNS_.js +0 -1
- package/web/dist/assets/popover-N-u5z2xh.js +0 -1
- package/web/dist/assets/preview-pane-connected-Cx8q-Yrh.js +0 -3
- package/web/dist/assets/queries-BtScxiQP.js +0 -1
- package/web/dist/assets/repo-git-DgZuI4FP.js +0 -1
- package/web/dist/assets/report-reader-CeBtx_Sf.js +0 -1
- package/web/dist/assets/reports-CRPxIRMM.js +0 -1
- package/web/dist/assets/run-header-C8Eeonkx.js +0 -2
- package/web/dist/assets/skills-DDoJCcmD.js +0 -1
- package/web/dist/assets/task-changes-XAcKfebn.js +0 -1
- package/web/dist/assets/task-commits-D5V0Q0au.js +0 -1
- package/web/dist/assets/task-files-CkPJZE0w.js +0 -1
- package/web/dist/assets/task-github-item-CbCOKkvp.js +0 -1
- package/web/dist/assets/task-thread-DyR8HsDz.js +0 -9
- package/web/dist/assets/use-hand-to-agent-state-BUpbMYM9.js +0 -1
- package/web/dist/assets/workflows-CEFtJj_h.js +0 -7
|
@@ -288,11 +288,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
288
288
|
"/api/v1/tools/ask": {
|
|
289
289
|
$post: {
|
|
290
290
|
output: {
|
|
291
|
-
|
|
291
|
+
ok: false;
|
|
292
|
+
code: 'unavailable';
|
|
292
293
|
message: string;
|
|
293
294
|
};
|
|
294
295
|
outputFormat: "json";
|
|
295
|
-
status:
|
|
296
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
296
297
|
input: {
|
|
297
298
|
json: {
|
|
298
299
|
questions: {
|
|
@@ -310,12 +311,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
310
311
|
};
|
|
311
312
|
} | {
|
|
312
313
|
output: {
|
|
313
|
-
|
|
314
|
-
code: 'unavailable';
|
|
314
|
+
code: 'capability_revoked';
|
|
315
315
|
message: string;
|
|
316
316
|
};
|
|
317
317
|
outputFormat: "json";
|
|
318
|
-
status:
|
|
318
|
+
status: 401;
|
|
319
319
|
input: {
|
|
320
320
|
json: {
|
|
321
321
|
questions: {
|
|
@@ -383,11 +383,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
383
383
|
"/api/v1/tools/cancel-wait": {
|
|
384
384
|
$post: {
|
|
385
385
|
output: {
|
|
386
|
-
|
|
386
|
+
cancelled: false;
|
|
387
|
+
code: 'unavailable';
|
|
387
388
|
message: string;
|
|
388
389
|
};
|
|
389
390
|
outputFormat: "json";
|
|
390
|
-
status:
|
|
391
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
391
392
|
input: {
|
|
392
393
|
json: {
|
|
393
394
|
wait_id: string;
|
|
@@ -395,12 +396,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
395
396
|
};
|
|
396
397
|
} | {
|
|
397
398
|
output: {
|
|
398
|
-
|
|
399
|
-
code: 'unavailable';
|
|
399
|
+
code: 'capability_revoked';
|
|
400
400
|
message: string;
|
|
401
401
|
};
|
|
402
402
|
outputFormat: "json";
|
|
403
|
-
status:
|
|
403
|
+
status: 401;
|
|
404
404
|
input: {
|
|
405
405
|
json: {
|
|
406
406
|
wait_id: string;
|
|
@@ -448,11 +448,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
448
448
|
"/api/v1/tools/done": {
|
|
449
449
|
$post: {
|
|
450
450
|
output: {
|
|
451
|
-
|
|
451
|
+
ok: false;
|
|
452
|
+
code: 'unavailable';
|
|
452
453
|
message: string;
|
|
453
454
|
};
|
|
454
455
|
outputFormat: "json";
|
|
455
|
-
status:
|
|
456
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
456
457
|
input: {
|
|
457
458
|
json: {
|
|
458
459
|
summary?: string | undefined;
|
|
@@ -460,12 +461,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
460
461
|
};
|
|
461
462
|
} | {
|
|
462
463
|
output: {
|
|
463
|
-
|
|
464
|
-
code: 'unavailable';
|
|
464
|
+
code: 'capability_revoked';
|
|
465
465
|
message: string;
|
|
466
466
|
};
|
|
467
467
|
outputFormat: "json";
|
|
468
|
-
status:
|
|
468
|
+
status: 401;
|
|
469
469
|
input: {
|
|
470
470
|
json: {
|
|
471
471
|
summary?: string | undefined;
|
|
@@ -533,11 +533,13 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
533
533
|
"/api/v1/tools/preview-stop": {
|
|
534
534
|
$post: {
|
|
535
535
|
output: {
|
|
536
|
-
|
|
536
|
+
ok: boolean;
|
|
537
|
+
code: "adopted" | "approval_required" | "headless" | "invalid_input" | "not_registered" | "port_held" | "port_in_use" | "preview_disabled" | "restarted" | "stopped" | "unavailable" | "worktree_missing";
|
|
537
538
|
message: string;
|
|
539
|
+
hint: string;
|
|
538
540
|
};
|
|
539
541
|
outputFormat: "json";
|
|
540
|
-
status:
|
|
542
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
541
543
|
input: {
|
|
542
544
|
json: {
|
|
543
545
|
port: number;
|
|
@@ -546,13 +548,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
546
548
|
};
|
|
547
549
|
} | {
|
|
548
550
|
output: {
|
|
549
|
-
|
|
550
|
-
code: "adopted" | "approval_required" | "headless" | "invalid_input" | "not_registered" | "port_held" | "port_in_use" | "preview_disabled" | "restarted" | "stopped" | "unavailable" | "worktree_missing";
|
|
551
|
+
code: 'capability_revoked';
|
|
551
552
|
message: string;
|
|
552
|
-
hint: string;
|
|
553
553
|
};
|
|
554
554
|
outputFormat: "json";
|
|
555
|
-
status:
|
|
555
|
+
status: 401;
|
|
556
556
|
input: {
|
|
557
557
|
json: {
|
|
558
558
|
port: number;
|
|
@@ -565,11 +565,13 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
565
565
|
"/api/v1/tools/preview-serve": {
|
|
566
566
|
$post: {
|
|
567
567
|
output: {
|
|
568
|
-
|
|
568
|
+
ok: boolean;
|
|
569
|
+
code: "cezar_port" | "cwd_outside_worktree" | "headless" | "invalid_input" | "port_held" | "preview_disabled" | "registered" | "replaced" | "too_many" | "unavailable" | "worktree_missing";
|
|
569
570
|
message: string;
|
|
571
|
+
hint: string;
|
|
570
572
|
};
|
|
571
573
|
outputFormat: "json";
|
|
572
|
-
status:
|
|
574
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
573
575
|
input: {
|
|
574
576
|
json: {
|
|
575
577
|
command: string;
|
|
@@ -581,13 +583,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
581
583
|
};
|
|
582
584
|
} | {
|
|
583
585
|
output: {
|
|
584
|
-
|
|
585
|
-
code: "cezar_port" | "cwd_outside_worktree" | "headless" | "invalid_input" | "port_held" | "preview_disabled" | "registered" | "replaced" | "too_many" | "unavailable" | "worktree_missing";
|
|
586
|
+
code: 'capability_revoked';
|
|
586
587
|
message: string;
|
|
587
|
-
hint: string;
|
|
588
588
|
};
|
|
589
589
|
outputFormat: "json";
|
|
590
|
-
status:
|
|
590
|
+
status: 401;
|
|
591
591
|
input: {
|
|
592
592
|
json: {
|
|
593
593
|
command: string;
|
|
@@ -603,11 +603,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
603
603
|
"/api/v1/tools/schedule-task": {
|
|
604
604
|
$post: {
|
|
605
605
|
output: {
|
|
606
|
-
|
|
606
|
+
ok: false;
|
|
607
|
+
code: import('../contract/index.js').ScheduledTaskRefusalCode;
|
|
607
608
|
message: string;
|
|
608
609
|
};
|
|
609
610
|
outputFormat: "json";
|
|
610
|
-
status:
|
|
611
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
611
612
|
input: {
|
|
612
613
|
json: {
|
|
613
614
|
at?: string | undefined;
|
|
@@ -624,12 +625,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
624
625
|
};
|
|
625
626
|
} | {
|
|
626
627
|
output: {
|
|
627
|
-
|
|
628
|
-
code: import('../contract/index.js').ScheduledTaskRefusalCode;
|
|
628
|
+
code: 'capability_revoked';
|
|
629
629
|
message: string;
|
|
630
630
|
};
|
|
631
631
|
outputFormat: "json";
|
|
632
|
-
status:
|
|
632
|
+
status: 401;
|
|
633
633
|
input: {
|
|
634
634
|
json: {
|
|
635
635
|
at?: string | undefined;
|
|
@@ -684,11 +684,12 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
684
684
|
"/api/v1/tools/scheduled-tasks": {
|
|
685
685
|
$post: {
|
|
686
686
|
output: {
|
|
687
|
-
|
|
687
|
+
ok: false;
|
|
688
|
+
code: import('../contract/index.js').ScheduledTaskRefusalCode;
|
|
688
689
|
message: string;
|
|
689
690
|
};
|
|
690
691
|
outputFormat: "json";
|
|
691
|
-
status:
|
|
692
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
692
693
|
input: {
|
|
693
694
|
json: {
|
|
694
695
|
at?: string | undefined;
|
|
@@ -721,12 +722,11 @@ export declare function ciToolRoutes(capabilities: Map<string, Capability>): imp
|
|
|
721
722
|
};
|
|
722
723
|
} | {
|
|
723
724
|
output: {
|
|
724
|
-
|
|
725
|
-
code: import('../contract/index.js').ScheduledTaskRefusalCode;
|
|
725
|
+
code: 'capability_revoked';
|
|
726
726
|
message: string;
|
|
727
727
|
};
|
|
728
728
|
outputFormat: "json";
|
|
729
|
-
status:
|
|
729
|
+
status: 401;
|
|
730
730
|
input: {
|
|
731
731
|
json: {
|
|
732
732
|
at?: string | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { productEnv } from '../core/product-env.js';
|
|
2
|
+
import { automationsEnabled } from '../automations/enabled.js';
|
|
2
3
|
import { cezarAskRequestSchema, cezarCancelWaitRequestSchema, cezarDoneRequestSchema, cezarWaitRequestSchema } from '../contract/index.js';
|
|
3
4
|
import { ASK_LIMITS } from '../contract/index.js';
|
|
4
5
|
import { previewStopRequestSchema, previewServeRequestSchema } from '../contract/index.js';
|
|
@@ -10,7 +11,7 @@ export function previewToolEnabled(env = process.env) {
|
|
|
10
11
|
}
|
|
11
12
|
/** Automations are on unless the value is exactly `0` (spec 2026-10-02-scheduled-automations). */
|
|
12
13
|
export function automationsToolEnabled(env = process.env) {
|
|
13
|
-
return
|
|
14
|
+
return automationsEnabled(env);
|
|
14
15
|
}
|
|
15
16
|
/**
|
|
16
17
|
* The Anthropic tool API refuses a top-level `oneOf`/`anyOf`/`allOf`, so `cezar_wait` advertises
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-catalog.js","sourceRoot":"","sources":["../../src/ci-wait/tool-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACzJ,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AAC3G,OAAO,EAAE,yBAAyB,EAAE,2BAA2B,EAAE,MAAM,8CAA8C,CAAC;AACtH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,2FAA2F;AAC3F,MAAM,UAAU,kBAAkB,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IACrE,OAAO,UAAU,CAAC,SAAS,EAAE,GAAG,CAAC,KAAK,GAAG,CAAC;AAC5C,CAAC;AAED,kGAAkG;AAClG,MAAM,UAAU,sBAAsB,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IACzE,OAAO,
|
|
1
|
+
{"version":3,"file":"tool-catalog.js","sourceRoot":"","sources":["../../src/ci-wait/tool-catalog.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,4BAA4B,EAAE,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AACzJ,OAAO,EAAE,UAAU,EAAE,MAAM,yCAAyC,CAAC;AACrE,OAAO,EAAE,wBAA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kBAAkB,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,kBAAkB;QACnF,GAAG,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,qBAAqB,EAAE,yBAAyB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;QACtF,GAAG,CAAC,sBAAsB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,0BAA0B,EAAE,4BAA4B,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;KACnG,CAAC;AACJ,CAAC;AACD,MAAM,UAAU,cAAc,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IACjE,OAAO,oBAAoB,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1D,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAAC,GAAG,GAAsB,OAAO,CAAC,GAAG;IACpE,OAAO,CAAC,gBAAgB,EAAE,iBAAiB,EAAE,iBAAiB,EAAE,GAAG,CAAC,kBAAkB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;SACjH,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,OAAO,GAAG,CAAC,SAAS,CAAC,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAC7I,CAAC"}
|
package/dist/ci-wait/tools.d.ts
CHANGED
|
@@ -248,6 +248,10 @@ export declare function invokeScheduleTaskTool(input: unknown): Promise<{
|
|
|
248
248
|
}[];
|
|
249
249
|
isError: boolean;
|
|
250
250
|
details: {
|
|
251
|
+
ok: false;
|
|
252
|
+
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
253
|
+
message: string;
|
|
254
|
+
} | {
|
|
251
255
|
ok: true;
|
|
252
256
|
task: {
|
|
253
257
|
id: string;
|
|
@@ -259,10 +263,6 @@ export declare function invokeScheduleTaskTool(input: unknown): Promise<{
|
|
|
259
263
|
url?: string | undefined;
|
|
260
264
|
};
|
|
261
265
|
note: string;
|
|
262
|
-
} | {
|
|
263
|
-
ok: false;
|
|
264
|
-
code: "automations_off" | "conflict" | "invalid_request" | "not_found" | "unavailable";
|
|
265
|
-
message: string;
|
|
266
266
|
};
|
|
267
267
|
}>;
|
|
268
268
|
export declare function invokeScheduledTasksTool(input: unknown): Promise<{
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* Best-effort structured-output extraction (trimmed from @cezar/core's
|
|
4
|
+
* `parseStructured`): try the whole string after stripping a ```json fence,
|
|
5
|
+
* then scan for balanced top-level `{...}` blocks and return the first that
|
|
6
|
+
* validates. Null when nothing does — the caller decides how to recover.
|
|
7
|
+
*/
|
|
8
|
+
export declare function parseStructured<T>(raw: string, schema: z.ZodType<T, unknown>): T | null;
|
|
9
|
+
export declare function extractJsonObjectCandidates(raw: string): string[];
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Best-effort structured-output extraction (trimmed from @cezar/core's
|
|
3
|
+
* `parseStructured`): try the whole string after stripping a ```json fence,
|
|
4
|
+
* then scan for balanced top-level `{...}` blocks and return the first that
|
|
5
|
+
* validates. Null when nothing does — the caller decides how to recover.
|
|
6
|
+
*/
|
|
7
|
+
export function parseStructured(raw, schema) {
|
|
8
|
+
const cleaned = raw
|
|
9
|
+
.replace(/^```(?:json|javascript|js|jsonl)?\s*\n?/im, '')
|
|
10
|
+
.replace(/\n?```\s*$/m, '')
|
|
11
|
+
.trim();
|
|
12
|
+
try {
|
|
13
|
+
return schema.parse(JSON.parse(cleaned));
|
|
14
|
+
}
|
|
15
|
+
catch {
|
|
16
|
+
for (const candidate of extractJsonObjectCandidates(raw)) {
|
|
17
|
+
try {
|
|
18
|
+
return schema.parse(JSON.parse(candidate));
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
continue;
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
export function extractJsonObjectCandidates(raw) {
|
|
28
|
+
const candidates = [];
|
|
29
|
+
let start = -1;
|
|
30
|
+
let depth = 0;
|
|
31
|
+
let inString = false;
|
|
32
|
+
let escaped = false;
|
|
33
|
+
for (let i = 0; i < raw.length; i++) {
|
|
34
|
+
const ch = raw[i];
|
|
35
|
+
if (inString) {
|
|
36
|
+
if (escaped)
|
|
37
|
+
escaped = false;
|
|
38
|
+
else if (ch === '\\')
|
|
39
|
+
escaped = true;
|
|
40
|
+
else if (ch === '"')
|
|
41
|
+
inString = false;
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
if (ch === '"') {
|
|
45
|
+
inString = true;
|
|
46
|
+
}
|
|
47
|
+
else if (ch === '{') {
|
|
48
|
+
if (depth === 0)
|
|
49
|
+
start = i;
|
|
50
|
+
depth++;
|
|
51
|
+
}
|
|
52
|
+
else if (ch === '}') {
|
|
53
|
+
if (depth === 0)
|
|
54
|
+
continue;
|
|
55
|
+
depth--;
|
|
56
|
+
if (depth === 0 && start >= 0) {
|
|
57
|
+
candidates.push(raw.slice(start, i + 1));
|
|
58
|
+
start = -1;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
return candidates;
|
|
63
|
+
}
|
|
64
|
+
//# sourceMappingURL=structured-output.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"structured-output.js","sourceRoot":"","sources":["../../src/core/structured-output.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,UAAU,eAAe,CAAI,GAAW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G,IAAI,CAAC;QAClB,CAAC;aAAM,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;YACtB,IAAI,KAAK,KAAK,CAAC;gBAAE,KAAK,GAAG,CAAC,CAAC;YAC3B,KAAK,EAAE,CAAC;QACV,CAAC;aAAM,IAAI,EAAE,KAAK,GAAG,EAAE,CAAC;YACtB,IAAI,KAAK,KAAK,CAAC;gBAAE,SAAS;YAC1B,KAAK,EAAE,CAAC;YACR,IAAI,KAAK,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,EAAE,CAAC;gBAC9B,UAAU,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;gBACzC,KAAK,GAAG,CAAC,CAAC,CAAC;YACb,CAAC;QACH,CAAC;IACH,CAAC;IACD,OAAO,UAAU,CAAC;AACpB,CAAC"}
|
|
@@ -82,6 +82,17 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
82
82
|
"/discover": {
|
|
83
83
|
$post: {
|
|
84
84
|
output: {
|
|
85
|
+
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
86
|
+
models: {
|
|
87
|
+
id: string;
|
|
88
|
+
label: string;
|
|
89
|
+
description: string;
|
|
90
|
+
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
91
|
+
}[];
|
|
92
|
+
source: "cache" | "live" | "unavailable";
|
|
93
|
+
stale: boolean;
|
|
94
|
+
reason?: string | undefined;
|
|
95
|
+
} | {
|
|
85
96
|
scope: "host-default-account";
|
|
86
97
|
runners: {
|
|
87
98
|
status: "connected" | "disconnected" | "not-installed" | "unknown";
|
|
@@ -102,17 +113,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
102
113
|
reason?: string | undefined;
|
|
103
114
|
}[];
|
|
104
115
|
nextOffset?: number | undefined;
|
|
105
|
-
} | {
|
|
106
|
-
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
107
|
-
models: {
|
|
108
|
-
id: string;
|
|
109
|
-
label: string;
|
|
110
|
-
description: string;
|
|
111
|
-
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
112
|
-
}[];
|
|
113
|
-
source: "cache" | "live" | "unavailable";
|
|
114
|
-
stale: boolean;
|
|
115
|
-
reason?: string | undefined;
|
|
116
116
|
};
|
|
117
117
|
outputFormat: "json";
|
|
118
118
|
status: 200;
|
|
@@ -221,13 +221,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
221
221
|
status: 200;
|
|
222
222
|
input: {
|
|
223
223
|
json: {
|
|
224
|
-
requestIds: string[];
|
|
225
|
-
mode?: "all" | "any" | "one" | undefined;
|
|
226
|
-
timeoutSeconds?: number | undefined;
|
|
227
|
-
} | {
|
|
228
224
|
workerIds: string[];
|
|
229
225
|
timeoutSeconds?: number | undefined;
|
|
230
226
|
mode?: "all" | "any" | "one" | undefined;
|
|
227
|
+
} | {
|
|
228
|
+
requestIds: string[];
|
|
229
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
230
|
+
timeoutSeconds?: number | undefined;
|
|
231
231
|
} | {
|
|
232
232
|
peerIds: string[];
|
|
233
233
|
timeoutSeconds?: number | undefined;
|
|
@@ -57,17 +57,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
57
57
|
"/discover": {
|
|
58
58
|
$post: {
|
|
59
59
|
output: {
|
|
60
|
-
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
61
|
-
models: {
|
|
62
|
-
id: string;
|
|
63
|
-
label: string;
|
|
64
|
-
description: string;
|
|
65
|
-
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
66
|
-
}[];
|
|
67
|
-
source: "cache" | "live" | "unavailable";
|
|
68
|
-
stale: boolean;
|
|
69
|
-
reason?: string | undefined;
|
|
70
|
-
} | {
|
|
71
60
|
tasks: {
|
|
72
61
|
id: string;
|
|
73
62
|
title: string;
|
|
@@ -88,6 +77,17 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
88
77
|
authFailureId?: string | undefined;
|
|
89
78
|
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
90
79
|
}[];
|
|
80
|
+
} | {
|
|
81
|
+
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
82
|
+
models: {
|
|
83
|
+
id: string;
|
|
84
|
+
label: string;
|
|
85
|
+
description: string;
|
|
86
|
+
effortLevels?: ("high" | "low" | "max" | "medium" | "xhigh")[] | undefined;
|
|
87
|
+
}[];
|
|
88
|
+
source: "cache" | "live" | "unavailable";
|
|
89
|
+
stale: boolean;
|
|
90
|
+
reason?: string | undefined;
|
|
91
91
|
};
|
|
92
92
|
outputFormat: "json";
|
|
93
93
|
status: 200;
|
|
@@ -196,13 +196,13 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
196
196
|
status: 200;
|
|
197
197
|
input: {
|
|
198
198
|
json: {
|
|
199
|
-
requestIds: string[];
|
|
200
|
-
mode?: "all" | "any" | "one" | undefined;
|
|
201
|
-
timeoutSeconds?: number | undefined;
|
|
202
|
-
} | {
|
|
203
199
|
workerIds: string[];
|
|
204
200
|
timeoutSeconds?: number | undefined;
|
|
205
201
|
mode?: "all" | "any" | "one" | undefined;
|
|
202
|
+
} | {
|
|
203
|
+
requestIds: string[];
|
|
204
|
+
mode?: "all" | "any" | "one" | undefined;
|
|
205
|
+
timeoutSeconds?: number | undefined;
|
|
206
206
|
} | {
|
|
207
207
|
peerIds: string[];
|
|
208
208
|
timeoutSeconds?: number | undefined;
|
package/dist/git-worktree.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { type AutosaveOptions } from './autosave-git.ts';
|
|
2
1
|
import { type LiveIndexCheck, type DiffRefusal } from './git-private-index.ts';
|
|
3
2
|
/** One worktree per task (spec 006). Only createWorktree throws; its caller reports failure. */
|
|
4
3
|
export declare const DIFF_CAP = 400000;
|
|
@@ -50,57 +49,6 @@ export type RemoveWorktreeOptions = {
|
|
|
50
49
|
assertCurrent?: () => void;
|
|
51
50
|
};
|
|
52
51
|
export declare function removeWorktree(repoRoot: string, worktreePath: string, branch?: string, opts?: RemoveWorktreeOptions): Promise<void>;
|
|
53
|
-
/**
|
|
54
|
-
* Autosave reason. Only periodic saves are opt-in. Turn-end, finalization and timer saves
|
|
55
|
-
* require the task branch; pre-PR saves follow current HEAD.
|
|
56
|
-
*/
|
|
57
|
-
export type AutosaveReason = 'periodic' | 'turn end' | 'run finalize' | 'pre-PR';
|
|
58
|
-
/**
|
|
59
|
-
* Structured autosave outcome. Pre-PR must report refused/failed saves. A task-branch mismatch
|
|
60
|
-
* skips; an unfinished merge, cherry-pick or revert refuses a guarded save.
|
|
61
|
-
*/
|
|
62
|
-
export type AutosaveResult = 'committed' | 'nothing-to-do' | 'refused' | 'failed' | 'skipped';
|
|
63
|
-
/**
|
|
64
|
-
* The facts behind a `committed` or `skipped` save, for the caller's report
|
|
65
|
-
* (hearsay-tools/cezarion#1004). `branch` is HEAD's branch name, `null` on a
|
|
66
|
-
* detached HEAD; `sha` is the short hash of the autosave commit, `null` when
|
|
67
|
-
* the commit landed but its hash could not be read back.
|
|
68
|
-
*/
|
|
69
|
-
export type AutosaveOutcome = {
|
|
70
|
-
result: 'committed';
|
|
71
|
-
sha: string | null;
|
|
72
|
-
branch: string | null;
|
|
73
|
-
} | {
|
|
74
|
-
result: 'skipped';
|
|
75
|
-
branch: string | null;
|
|
76
|
-
changedPaths: number;
|
|
77
|
-
};
|
|
78
|
-
export interface AutosaveCommitOptions extends AutosaveOptions {
|
|
79
|
-
/** The task's own branch (`cez/<id8>`). Given, the save commits only while HEAD is
|
|
80
|
-
* `refs/heads/<taskBranch>`, and writes that ref by compare-and-swap; on any other
|
|
81
|
-
* branch or a detached HEAD it returns `skipped` and leaves the working tree alone,
|
|
82
|
-
* and the index too unless HEAD moves while it saves. */
|
|
83
|
-
taskBranch?: string;
|
|
84
|
-
/** Receives the facts behind a `committed` or `skipped` result. Never called otherwise. */
|
|
85
|
-
onOutcome?: (outcome: AutosaveOutcome) => void;
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Stage and commit everything in the worktree as a "cezar autosave" commit
|
|
89
|
-
* (janitor pattern) — the agent's progress is recoverable from the `cez/<id8>`
|
|
90
|
-
* branch history. Quietly a no-op when nothing changed. With `taskBranch`, a
|
|
91
|
-
* worktree whose HEAD the agent moved to another branch (or detached) is left
|
|
92
|
-
* uncommitted instead: an autosave commit there lands in the agent's own PR
|
|
93
|
-
* history (hearsay-tools/cezarion#1004).
|
|
94
|
-
*
|
|
95
|
-
* The message carries `reason` so the opt-in periodic timer and the always-on
|
|
96
|
-
* flushes are distinguishable in `git log`; the `cezar autosave` prefix is kept
|
|
97
|
-
* so existing log greps still match.
|
|
98
|
-
*
|
|
99
|
-
* Refuses to commit a worktree that is mid-merge or still carries conflict
|
|
100
|
-
* markers: the incident behind #471 was an autosave capturing a half-resolved
|
|
101
|
-
* merge, and a blind `git add -A` would do it again.
|
|
102
|
-
*/
|
|
103
|
-
export declare function autosaveCommit(dir: string, reason: AutosaveReason, options?: AutosaveCommitOptions): Promise<AutosaveResult>;
|
|
104
52
|
/**
|
|
105
53
|
* Whole-branch committed, uncommitted and untracked diff against the merge-base. Preserve this
|
|
106
54
|
* anchor for the protected text endpoint and conservative settlement checks.
|