@hearsay-tools/squawk 0.18.0-dev.6936 → 0.18.0-dev.6941
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/index.js +12 -4
- package/dist/contract/runs.d.ts +13 -2
- package/dist/delegation/conversations.d.ts +6 -0
- package/dist/runs/legacy-run-rows.d.ts +7 -0
- package/dist/runs/legacy-run-rows.js +25 -0
- package/dist/runs/legacy-run-rows.js.map +1 -1
- package/dist/runs/outcome-commit.d.ts +1 -5
- package/dist/runs/outcome-commit.js +1 -2
- package/dist/runs/outcome-commit.js.map +1 -1
- package/dist/runs/run-exits.d.ts +18 -0
- package/dist/runs/store.d.ts +6 -0
- package/dist/server/server.d.ts +112 -58
- package/dist/workflows/continuation-admission.d.ts +3 -0
- package/dist/workflows/run/done-accepted.d.ts +14 -8
- package/dist/workflows/run/done-accepted.js +31 -12
- package/dist/workflows/run/done-accepted.js.map +1 -1
- package/dist/workflows/run/input-delivery.d.ts +5 -3
- package/dist/workflows/run/input-delivery.js +15 -9
- package/dist/workflows/run/input-delivery.js.map +1 -1
- package/dist/workflows/run/run-finish.js +8 -5
- package/dist/workflows/run/run-finish.js.map +1 -1
- package/dist/workflows/run/turn-settler.js +2 -2
- package/dist/workflows/run/turn-settler.js.map +1 -1
- package/dist/workflows/run/wait-engine.d.ts +3 -0
- package/dist/workflows/run/wait-kinds.d.ts +2 -2
- package/dist/workflows/run/wait-kinds.js +2 -1
- package/dist/workflows/run/wait-kinds.js.map +1 -1
- package/package.json +4 -4
- package/web/dist/assets/{activity-motion-DXtoOkpz.js → activity-motion-CNFhTAyJ.js} +1 -1
- package/web/dist/assets/{activity-route-r-em7Y-G.js → activity-route-DEw-RhOo.js} +1 -1
- package/web/dist/assets/{agent-accounts-DuMsyDoO.js → agent-accounts-BiXu1qX6.js} +1 -1
- package/web/dist/assets/attention-D4F-L5Pd.js +1 -0
- package/web/dist/assets/{commit-diff-panel-BGLQaKRb.js → commit-diff-panel-BmrwPYS-.js} +1 -1
- package/web/dist/assets/{diff-BRFJnYsC.js → diff-DnpyQ0n1.js} +2 -2
- package/web/dist/assets/{diff-view-JWqbvzMs.js → diff-view-Bt1YTobA.js} +1 -1
- package/web/dist/assets/{file-preview-BW__Krxm.js → file-preview-BjxKsQu3.js} +1 -1
- package/web/dist/assets/{git-toolbar-DoXf_s-G.js → git-toolbar-BO3VJ7ch.js} +1 -1
- package/web/dist/assets/{github-CijmslJ6.js → github-DpER38di.js} +1 -1
- package/web/dist/assets/{global-activity-route-B2EeYnAW.js → global-activity-route-BvAyzzV-.js} +1 -1
- package/web/dist/assets/{index-BHoqo9RG.js → index-BgSywETH.js} +4 -4
- package/web/dist/assets/{preview-pane-connected-D6vrA6hJ.js → preview-pane-connected-DXW08Xx1.js} +1 -1
- package/web/dist/assets/{project-router-C5EZmTkk.js → project-router-znDYCNAi.js} +1 -1
- package/web/dist/assets/{project-scope-context-HUq7jkZN.js → project-scope-context-D8RGERU-.js} +1 -1
- package/web/dist/assets/{prompt-template-menu-DOYsMTKv.js → prompt-template-menu-tmJbj04L.js} +1 -1
- package/web/dist/assets/{queries-BXHx1ZPw.js → queries-LH_fzdoQ.js} +1 -1
- package/web/dist/assets/{reference-chip-CjJnlcQb.js → reference-chip-DMasK3J9.js} +1 -1
- package/web/dist/assets/{repo-git-CyRoQgtr.js → repo-git-CLGuBU9l.js} +1 -1
- package/web/dist/assets/{report-reader-BJiEbYfZ.js → report-reader-zvoZvJ8x.js} +1 -1
- package/web/dist/assets/{reports-Ddn-WBxa.js → reports-Dw0aaOYg.js} +1 -1
- package/web/dist/assets/{run-header-B7qHisMu.js → run-header-pjcEwvZV.js} +1 -1
- package/web/dist/assets/{skills-D2wzJWpY.js → skills-DWQTOqs8.js} +1 -1
- package/web/dist/assets/{tab-link-B_gKjZgM.js → tab-link-C5SNXkMO.js} +1 -1
- package/web/dist/assets/{task-changes-CqKQIYHP.js → task-changes-DNrFdznk.js} +1 -1
- package/web/dist/assets/{task-commits-CY7XFJBU.js → task-commits-rBD5uKnT.js} +1 -1
- package/web/dist/assets/{task-files-CW1gWAY3.js → task-files-Bd7-ZWkS.js} +1 -1
- package/web/dist/assets/{task-github-item-Djq-z2As.js → task-github-item-BwxuT5Wp.js} +1 -1
- package/web/dist/assets/{task-thread-DyZ9WjLc.js → task-thread-LWQvapkq.js} +1 -1
- package/web/dist/assets/{thread-state-Dbru_dO3.js → thread-state-BNabVGns.js} +1 -1
- package/web/dist/assets/{use-desktop-BCMH-x7R.js → use-desktop-kNRvVC8C.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-C94Si0KS.js → use-hand-to-agent-state-C54WuUrs.js} +1 -1
- package/web/dist/assets/{useInfiniteQuery-O53uZ95W.js → useInfiniteQuery-DZDwRft0.js} +1 -1
- package/web/dist/assets/useQuery-BTWv1-sJ.js +1 -0
- package/web/dist/assets/{workflows-CwS6zbSa.js → workflows-BeWMwP3r.js} +1 -1
- package/web/dist/assets/{ws-CRnL5yIc.js → ws-ClC12aJd.js} +1 -1
- package/web/dist/index.html +12 -12
- package/web/dist/assets/attention-CB_z05E7.js +0 -1
- package/web/dist/assets/useQuery-C9ErlZEv.js +0 -1
package/dist/server/server.d.ts
CHANGED
|
@@ -4780,6 +4780,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
4780
4780
|
} & {
|
|
4781
4781
|
"/repo/commit/:sha": {
|
|
4782
4782
|
$get: {
|
|
4783
|
+
output: string;
|
|
4784
|
+
outputFormat: "text";
|
|
4785
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
4786
|
+
input: {
|
|
4787
|
+
query: {
|
|
4788
|
+
structured?: string | undefined;
|
|
4789
|
+
};
|
|
4790
|
+
} & {
|
|
4791
|
+
param: {
|
|
4792
|
+
sha: string;
|
|
4793
|
+
};
|
|
4794
|
+
};
|
|
4795
|
+
} | {
|
|
4783
4796
|
output: {
|
|
4784
4797
|
error: string;
|
|
4785
4798
|
code?: "invalid_input" | undefined;
|
|
@@ -4843,19 +4856,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
4843
4856
|
sha: string;
|
|
4844
4857
|
};
|
|
4845
4858
|
};
|
|
4846
|
-
} | {
|
|
4847
|
-
output: string;
|
|
4848
|
-
outputFormat: "text";
|
|
4849
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
4850
|
-
input: {
|
|
4851
|
-
query: {
|
|
4852
|
-
structured?: string | undefined;
|
|
4853
|
-
};
|
|
4854
|
-
} & {
|
|
4855
|
-
param: {
|
|
4856
|
-
sha: string;
|
|
4857
|
-
};
|
|
4858
|
-
};
|
|
4859
4859
|
};
|
|
4860
4860
|
};
|
|
4861
4861
|
} & {
|
|
@@ -7078,6 +7078,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
7078
7078
|
session: string;
|
|
7079
7079
|
at: string;
|
|
7080
7080
|
seq: number;
|
|
7081
|
+
openWaits: string[];
|
|
7082
|
+
settledWaits: string[];
|
|
7083
|
+
lastInput?: string | undefined;
|
|
7081
7084
|
summary?: string | undefined;
|
|
7082
7085
|
freeTurn?: true | undefined;
|
|
7083
7086
|
} | undefined;
|
|
@@ -9693,6 +9696,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
9693
9696
|
session: string;
|
|
9694
9697
|
at: string;
|
|
9695
9698
|
seq: number;
|
|
9699
|
+
openWaits: string[];
|
|
9700
|
+
settledWaits: string[];
|
|
9701
|
+
lastInput?: string | undefined;
|
|
9696
9702
|
summary?: string | undefined;
|
|
9697
9703
|
freeTurn?: true | undefined;
|
|
9698
9704
|
} | undefined;
|
|
@@ -10800,6 +10806,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
10800
10806
|
session: string;
|
|
10801
10807
|
at: string;
|
|
10802
10808
|
seq: number;
|
|
10809
|
+
openWaits: string[];
|
|
10810
|
+
settledWaits: string[];
|
|
10811
|
+
lastInput?: string | undefined;
|
|
10803
10812
|
summary?: string | undefined;
|
|
10804
10813
|
freeTurn?: true | undefined;
|
|
10805
10814
|
} | undefined;
|
|
@@ -11908,6 +11917,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
11908
11917
|
session: string;
|
|
11909
11918
|
at: string;
|
|
11910
11919
|
seq: number;
|
|
11920
|
+
openWaits: string[];
|
|
11921
|
+
settledWaits: string[];
|
|
11922
|
+
lastInput?: string | undefined;
|
|
11911
11923
|
summary?: string | undefined;
|
|
11912
11924
|
freeTurn?: true | undefined;
|
|
11913
11925
|
} | undefined;
|
|
@@ -13043,6 +13055,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
13043
13055
|
session: string;
|
|
13044
13056
|
at: string;
|
|
13045
13057
|
seq: number;
|
|
13058
|
+
openWaits: string[];
|
|
13059
|
+
settledWaits: string[];
|
|
13060
|
+
lastInput?: string | undefined;
|
|
13046
13061
|
summary?: string | undefined;
|
|
13047
13062
|
freeTurn?: true | undefined;
|
|
13048
13063
|
} | undefined;
|
|
@@ -14126,6 +14141,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
14126
14141
|
session: string;
|
|
14127
14142
|
at: string;
|
|
14128
14143
|
seq: number;
|
|
14144
|
+
openWaits: string[];
|
|
14145
|
+
settledWaits: string[];
|
|
14146
|
+
lastInput?: string | undefined;
|
|
14129
14147
|
summary?: string | undefined;
|
|
14130
14148
|
freeTurn?: true | undefined;
|
|
14131
14149
|
} | undefined;
|
|
@@ -15209,6 +15227,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
15209
15227
|
session: string;
|
|
15210
15228
|
at: string;
|
|
15211
15229
|
seq: number;
|
|
15230
|
+
openWaits: string[];
|
|
15231
|
+
settledWaits: string[];
|
|
15232
|
+
lastInput?: string | undefined;
|
|
15212
15233
|
summary?: string | undefined;
|
|
15213
15234
|
freeTurn?: true | undefined;
|
|
15214
15235
|
} | undefined;
|
|
@@ -15431,6 +15452,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
15431
15452
|
session: string;
|
|
15432
15453
|
at: string;
|
|
15433
15454
|
seq: number;
|
|
15455
|
+
openWaits: string[];
|
|
15456
|
+
settledWaits: string[];
|
|
15457
|
+
lastInput?: string | undefined;
|
|
15434
15458
|
summary?: string | undefined;
|
|
15435
15459
|
freeTurn?: true | undefined;
|
|
15436
15460
|
} | undefined;
|
|
@@ -17576,6 +17600,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
17576
17600
|
session: string;
|
|
17577
17601
|
at: string;
|
|
17578
17602
|
seq: number;
|
|
17603
|
+
openWaits: string[];
|
|
17604
|
+
settledWaits: string[];
|
|
17605
|
+
lastInput?: string | undefined;
|
|
17579
17606
|
summary?: string | undefined;
|
|
17580
17607
|
freeTurn?: true | undefined;
|
|
17581
17608
|
} | undefined;
|
|
@@ -18306,20 +18333,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
18306
18333
|
} & {
|
|
18307
18334
|
"/runs/:id/handoff": {
|
|
18308
18335
|
$get: {
|
|
18309
|
-
output:
|
|
18310
|
-
|
|
18311
|
-
|
|
18312
|
-
outputFormat: "json";
|
|
18313
|
-
status: 404;
|
|
18336
|
+
output: string;
|
|
18337
|
+
outputFormat: "text";
|
|
18338
|
+
status: 200;
|
|
18314
18339
|
input: {
|
|
18315
18340
|
param: {
|
|
18316
18341
|
id: string;
|
|
18317
18342
|
};
|
|
18318
18343
|
};
|
|
18319
18344
|
} | {
|
|
18320
|
-
output:
|
|
18321
|
-
|
|
18322
|
-
|
|
18345
|
+
output: {
|
|
18346
|
+
error: string;
|
|
18347
|
+
};
|
|
18348
|
+
outputFormat: "json";
|
|
18349
|
+
status: 404;
|
|
18323
18350
|
input: {
|
|
18324
18351
|
param: {
|
|
18325
18352
|
id: string;
|
|
@@ -18357,20 +18384,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
18357
18384
|
} & {
|
|
18358
18385
|
"/runs/:id/diff": {
|
|
18359
18386
|
$get: {
|
|
18360
|
-
output:
|
|
18361
|
-
|
|
18362
|
-
|
|
18363
|
-
outputFormat: "json";
|
|
18364
|
-
status: 404 | 409;
|
|
18387
|
+
output: string;
|
|
18388
|
+
outputFormat: "text";
|
|
18389
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
18365
18390
|
input: {
|
|
18366
18391
|
param: {
|
|
18367
18392
|
id: string;
|
|
18368
18393
|
};
|
|
18369
18394
|
};
|
|
18370
18395
|
} | {
|
|
18371
|
-
output:
|
|
18372
|
-
|
|
18373
|
-
|
|
18396
|
+
output: {
|
|
18397
|
+
error: string;
|
|
18398
|
+
};
|
|
18399
|
+
outputFormat: "json";
|
|
18400
|
+
status: 404 | 409;
|
|
18374
18401
|
input: {
|
|
18375
18402
|
param: {
|
|
18376
18403
|
id: string;
|
|
@@ -20658,6 +20685,19 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
20658
20685
|
} & {
|
|
20659
20686
|
"/repo/commit/:sha": {
|
|
20660
20687
|
$get: {
|
|
20688
|
+
output: string;
|
|
20689
|
+
outputFormat: "text";
|
|
20690
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
20691
|
+
input: {
|
|
20692
|
+
query: {
|
|
20693
|
+
structured?: string | undefined;
|
|
20694
|
+
};
|
|
20695
|
+
} & {
|
|
20696
|
+
param: {
|
|
20697
|
+
sha: string;
|
|
20698
|
+
};
|
|
20699
|
+
};
|
|
20700
|
+
} | {
|
|
20661
20701
|
output: {
|
|
20662
20702
|
error: string;
|
|
20663
20703
|
code?: "invalid_input" | undefined;
|
|
@@ -20721,19 +20761,6 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
20721
20761
|
sha: string;
|
|
20722
20762
|
};
|
|
20723
20763
|
};
|
|
20724
|
-
} | {
|
|
20725
|
-
output: string;
|
|
20726
|
-
outputFormat: "text";
|
|
20727
|
-
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
20728
|
-
input: {
|
|
20729
|
-
query: {
|
|
20730
|
-
structured?: string | undefined;
|
|
20731
|
-
};
|
|
20732
|
-
} & {
|
|
20733
|
-
param: {
|
|
20734
|
-
sha: string;
|
|
20735
|
-
};
|
|
20736
|
-
};
|
|
20737
20764
|
};
|
|
20738
20765
|
};
|
|
20739
20766
|
} & {
|
|
@@ -22956,6 +22983,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
22956
22983
|
session: string;
|
|
22957
22984
|
at: string;
|
|
22958
22985
|
seq: number;
|
|
22986
|
+
openWaits: string[];
|
|
22987
|
+
settledWaits: string[];
|
|
22988
|
+
lastInput?: string | undefined;
|
|
22959
22989
|
summary?: string | undefined;
|
|
22960
22990
|
freeTurn?: true | undefined;
|
|
22961
22991
|
} | undefined;
|
|
@@ -25571,6 +25601,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
25571
25601
|
session: string;
|
|
25572
25602
|
at: string;
|
|
25573
25603
|
seq: number;
|
|
25604
|
+
openWaits: string[];
|
|
25605
|
+
settledWaits: string[];
|
|
25606
|
+
lastInput?: string | undefined;
|
|
25574
25607
|
summary?: string | undefined;
|
|
25575
25608
|
freeTurn?: true | undefined;
|
|
25576
25609
|
} | undefined;
|
|
@@ -26678,6 +26711,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
26678
26711
|
session: string;
|
|
26679
26712
|
at: string;
|
|
26680
26713
|
seq: number;
|
|
26714
|
+
openWaits: string[];
|
|
26715
|
+
settledWaits: string[];
|
|
26716
|
+
lastInput?: string | undefined;
|
|
26681
26717
|
summary?: string | undefined;
|
|
26682
26718
|
freeTurn?: true | undefined;
|
|
26683
26719
|
} | undefined;
|
|
@@ -27786,6 +27822,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
27786
27822
|
session: string;
|
|
27787
27823
|
at: string;
|
|
27788
27824
|
seq: number;
|
|
27825
|
+
openWaits: string[];
|
|
27826
|
+
settledWaits: string[];
|
|
27827
|
+
lastInput?: string | undefined;
|
|
27789
27828
|
summary?: string | undefined;
|
|
27790
27829
|
freeTurn?: true | undefined;
|
|
27791
27830
|
} | undefined;
|
|
@@ -28921,6 +28960,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
28921
28960
|
session: string;
|
|
28922
28961
|
at: string;
|
|
28923
28962
|
seq: number;
|
|
28963
|
+
openWaits: string[];
|
|
28964
|
+
settledWaits: string[];
|
|
28965
|
+
lastInput?: string | undefined;
|
|
28924
28966
|
summary?: string | undefined;
|
|
28925
28967
|
freeTurn?: true | undefined;
|
|
28926
28968
|
} | undefined;
|
|
@@ -30004,6 +30046,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
30004
30046
|
session: string;
|
|
30005
30047
|
at: string;
|
|
30006
30048
|
seq: number;
|
|
30049
|
+
openWaits: string[];
|
|
30050
|
+
settledWaits: string[];
|
|
30051
|
+
lastInput?: string | undefined;
|
|
30007
30052
|
summary?: string | undefined;
|
|
30008
30053
|
freeTurn?: true | undefined;
|
|
30009
30054
|
} | undefined;
|
|
@@ -31087,6 +31132,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
31087
31132
|
session: string;
|
|
31088
31133
|
at: string;
|
|
31089
31134
|
seq: number;
|
|
31135
|
+
openWaits: string[];
|
|
31136
|
+
settledWaits: string[];
|
|
31137
|
+
lastInput?: string | undefined;
|
|
31090
31138
|
summary?: string | undefined;
|
|
31091
31139
|
freeTurn?: true | undefined;
|
|
31092
31140
|
} | undefined;
|
|
@@ -31309,6 +31357,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
31309
31357
|
session: string;
|
|
31310
31358
|
at: string;
|
|
31311
31359
|
seq: number;
|
|
31360
|
+
openWaits: string[];
|
|
31361
|
+
settledWaits: string[];
|
|
31362
|
+
lastInput?: string | undefined;
|
|
31312
31363
|
summary?: string | undefined;
|
|
31313
31364
|
freeTurn?: true | undefined;
|
|
31314
31365
|
} | undefined;
|
|
@@ -33454,6 +33505,9 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
33454
33505
|
session: string;
|
|
33455
33506
|
at: string;
|
|
33456
33507
|
seq: number;
|
|
33508
|
+
openWaits: string[];
|
|
33509
|
+
settledWaits: string[];
|
|
33510
|
+
lastInput?: string | undefined;
|
|
33457
33511
|
summary?: string | undefined;
|
|
33458
33512
|
freeTurn?: true | undefined;
|
|
33459
33513
|
} | undefined;
|
|
@@ -34184,20 +34238,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
34184
34238
|
} & {
|
|
34185
34239
|
"/runs/:id/handoff": {
|
|
34186
34240
|
$get: {
|
|
34187
|
-
output:
|
|
34188
|
-
|
|
34189
|
-
|
|
34190
|
-
outputFormat: "json";
|
|
34191
|
-
status: 404;
|
|
34241
|
+
output: string;
|
|
34242
|
+
outputFormat: "text";
|
|
34243
|
+
status: 200;
|
|
34192
34244
|
input: {
|
|
34193
34245
|
param: {
|
|
34194
34246
|
id: string;
|
|
34195
34247
|
};
|
|
34196
34248
|
};
|
|
34197
34249
|
} | {
|
|
34198
|
-
output:
|
|
34199
|
-
|
|
34200
|
-
|
|
34250
|
+
output: {
|
|
34251
|
+
error: string;
|
|
34252
|
+
};
|
|
34253
|
+
outputFormat: "json";
|
|
34254
|
+
status: 404;
|
|
34201
34255
|
input: {
|
|
34202
34256
|
param: {
|
|
34203
34257
|
id: string;
|
|
@@ -34235,20 +34289,20 @@ export declare function createApp(deps: ServerDeps): import("hono/hono-base").Ho
|
|
|
34235
34289
|
} & {
|
|
34236
34290
|
"/runs/:id/diff": {
|
|
34237
34291
|
$get: {
|
|
34238
|
-
output:
|
|
34239
|
-
|
|
34240
|
-
|
|
34241
|
-
outputFormat: "json";
|
|
34242
|
-
status: 404 | 409;
|
|
34292
|
+
output: string;
|
|
34293
|
+
outputFormat: "text";
|
|
34294
|
+
status: import("hono/utils/http-status").ContentfulStatusCode;
|
|
34243
34295
|
input: {
|
|
34244
34296
|
param: {
|
|
34245
34297
|
id: string;
|
|
34246
34298
|
};
|
|
34247
34299
|
};
|
|
34248
34300
|
} | {
|
|
34249
|
-
output:
|
|
34250
|
-
|
|
34251
|
-
|
|
34301
|
+
output: {
|
|
34302
|
+
error: string;
|
|
34303
|
+
};
|
|
34304
|
+
outputFormat: "json";
|
|
34305
|
+
status: 404 | 409;
|
|
34252
34306
|
input: {
|
|
34253
34307
|
param: {
|
|
34254
34308
|
id: string;
|
|
@@ -1141,6 +1141,9 @@ export declare class ContinuationChecks {
|
|
|
1141
1141
|
session: string;
|
|
1142
1142
|
at: string;
|
|
1143
1143
|
seq: number;
|
|
1144
|
+
openWaits: string[];
|
|
1145
|
+
settledWaits: string[];
|
|
1146
|
+
lastInput?: string | undefined;
|
|
1144
1147
|
summary?: string | undefined;
|
|
1145
1148
|
freeTurn?: true | undefined;
|
|
1146
1149
|
} | undefined;
|
|
@@ -17,15 +17,20 @@ export declare function reconsideredBy(run: RunRecord, inputIds: readonly string
|
|
|
17
17
|
* opens completes, so it cannot be told from the message that opened this turn. It runs as the
|
|
18
18
|
* next turn before any done, and one sent after the done withdraws it (`acceptedDoneHolds`). */
|
|
19
19
|
export declare function owedAtDone(run: RunRecord, state: ActiveRun): DoneOwedInput[];
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
export declare function
|
|
20
|
+
type DoneAccepted = NonNullable<RunRecord['doneAccepted']>;
|
|
21
|
+
/** What the run held when the done was accepted, by identity (hearsay-tools/squawk#2587): the
|
|
22
|
+
* waits open then, the waits settled then, and its last agent input. "After the done" is read
|
|
23
|
+
* against these, never against clock time, which cannot order two facts of one millisecond. */
|
|
24
|
+
export declare function factsAtDone(run: RunRecord): Pick<DoneAccepted, 'openWaits' | 'settledWaits' | 'lastInput'>;
|
|
25
|
+
/** The first instruction among the agent inputs added after the done, on any path (a steer, an
|
|
26
|
+
* inbox read, a continuation's opening input). */
|
|
27
|
+
export declare function instructionAfter(run: RunRecord, done: DoneAccepted): string | undefined;
|
|
28
|
+
/** A wait result that failed and was not settled when the done was accepted. */
|
|
29
|
+
export declare function failedResultAfter(run: RunRecord, done: DoneAccepted): string | undefined;
|
|
25
30
|
/** A wait or a question the agent registered after the done, by any path: the tool, the CLI, a
|
|
26
|
-
* native ask. A replayed registration keeps its
|
|
27
|
-
* live-workers timer are not the agent's. */
|
|
28
|
-
export declare function registeredAfter(run: RunRecord,
|
|
31
|
+
* native ask; one the done did not know. A replayed registration keeps its wait, and Squawk's own
|
|
32
|
+
* waits and its live-workers timer are not the agent's. */
|
|
33
|
+
export declare function registeredAfter(run: RunRecord, done: DoneAccepted): string | undefined;
|
|
29
34
|
/** A human message recorded after the done: its `user-message` event. */
|
|
30
35
|
export declare function humanMessageAfter(events: readonly RunEvent[], seq: number): string | undefined;
|
|
31
36
|
/** A turn started after the done: the turn end that reads it is not the done's own. */
|
|
@@ -34,3 +39,4 @@ export declare function laterTurn(events: readonly RunEvent[], seq: number): boo
|
|
|
34
39
|
* done's one delivery turn that costs no wake; `kept`, the done holds but that turn is spent;
|
|
35
40
|
* `withdrawn`, the input or a fact recorded since withdraws it. Undefined with no done or no input. */
|
|
36
41
|
export declare function acceptedDoneDelivery(run: RunRecord, events: readonly RunEvent[], inputIds: readonly string[]): 'free' | 'kept' | 'withdrawn' | undefined;
|
|
42
|
+
export {};
|
|
@@ -74,11 +74,29 @@ function notReadYet(state) {
|
|
|
74
74
|
const thisTurn = new Set([...input.turnOpenerIds ?? [], ...input.bundledInputIds ?? [], ...input.consumedBeforeAck ?? [], ...(input.openingAgentInputId ? [input.openingAgentInputId] : [])]);
|
|
75
75
|
return id => !thisTurn.has(id);
|
|
76
76
|
}
|
|
77
|
-
/**
|
|
78
|
-
*
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
77
|
+
/** What the run held when the done was accepted, by identity (hearsay-tools/squawk#2587): the
|
|
78
|
+
* waits open then, the waits settled then, and its last agent input. "After the done" is read
|
|
79
|
+
* against these, never against clock time, which cannot order two facts of one millisecond. */
|
|
80
|
+
export function factsAtDone(run) {
|
|
81
|
+
const waits = [...run.waits ?? [], ...run.lastWaits ?? []];
|
|
82
|
+
const last = run.agentInputs?.at(-1)?.id;
|
|
83
|
+
return {
|
|
84
|
+
openWaits: waits.filter(wait => wait.phase === 'open').map(wait => wait.id).slice(-32),
|
|
85
|
+
settledWaits: waits.filter(wait => wait.phase !== 'open').map(wait => wait.id).slice(-32),
|
|
86
|
+
...(last === undefined ? {} : { lastInput: last }),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
/** The agent inputs added after the done: those after its last input then. An input then is
|
|
90
|
+
* never removed (the call refused undelivered input, and only undelivered input is withdrawn). */
|
|
91
|
+
function inputsAfter(run, done) {
|
|
92
|
+
const inputs = run.agentInputs ?? [];
|
|
93
|
+
return done.lastInput === undefined ? inputs : inputs.slice(inputs.findIndex(entry => entry.id === done.lastInput) + 1);
|
|
94
|
+
}
|
|
95
|
+
/** The first instruction among the agent inputs added after the done, on any path (a steer, an
|
|
96
|
+
* inbox read, a continuation's opening input). */
|
|
97
|
+
export function instructionAfter(run, done) {
|
|
98
|
+
for (const entry of inputsAfter(run, done)) {
|
|
99
|
+
const reason = instruction(entry);
|
|
82
100
|
if (reason)
|
|
83
101
|
return reason;
|
|
84
102
|
}
|
|
@@ -88,16 +106,17 @@ export function instructionAfter(run, at) {
|
|
|
88
106
|
function liveAndSettledWaits(run) {
|
|
89
107
|
return [...run.waits ?? [], ...run.lastWaits ?? []].filter(wait => wait.phase !== 'cancelled');
|
|
90
108
|
}
|
|
91
|
-
/** A wait result that failed and
|
|
92
|
-
export function failedResultAfter(run,
|
|
93
|
-
const failed = liveAndSettledWaits(run).find(wait =>
|
|
109
|
+
/** A wait result that failed and was not settled when the done was accepted. */
|
|
110
|
+
export function failedResultAfter(run, done) {
|
|
111
|
+
const failed = liveAndSettledWaits(run).find(wait => wait.phase !== 'open' && !done.settledWaits.includes(wait.id) && WAIT_KINDS[wait.kind].failedResult(wait));
|
|
94
112
|
return failed && `a failed ${failed.kind} wait result`;
|
|
95
113
|
}
|
|
96
114
|
/** A wait or a question the agent registered after the done, by any path: the tool, the CLI, a
|
|
97
|
-
* native ask. A replayed registration keeps its
|
|
98
|
-
* live-workers timer are not the agent's. */
|
|
99
|
-
export function registeredAfter(run,
|
|
100
|
-
const
|
|
115
|
+
* native ask; one the done did not know. A replayed registration keeps its wait, and Squawk's own
|
|
116
|
+
* waits and its live-workers timer are not the agent's. */
|
|
117
|
+
export function registeredAfter(run, done) {
|
|
118
|
+
const known = new Set([...done.openWaits, ...done.settledWaits]);
|
|
119
|
+
const wait = liveAndSettledWaits(run).find(entry => !known.has(entry.id) && entry.source === 'agent' && entry.via !== 'monitoring-line');
|
|
101
120
|
if (!wait)
|
|
102
121
|
return undefined;
|
|
103
122
|
return WAIT_KINDS[wait.kind].userAnswers ? 'the agent asked the user' : 'the agent registered a wait';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"done-accepted.js","sourceRoot":"","sources":["../../../src/workflows/run/done-accepted.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAEtD;;;;;GAKG;AAEH;;+BAE+B;AAC/B,SAAS,WAAW,CAAC,KAAiB;IACpC,IAAI,KAAK,CAAC,MAAM,KAAK,OAAO;QAAE,OAAO,SAAS,CAAC;IAC/C,IAAI,CAAC,KAAK,CAAC,YAAY;QAAE,OAA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AC,iBAAiB,CAAC,GAAG,EAAE,MAAM,CAAC,CAAC,KAAK,IAAI,cAAc,CAAC,GAAG,EAAE,QAAQ,CAAC;QAAE,OAAO,WAAW,CAAC;IAC/F,OAAO,GAAG,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC;AACrD,CAAC"}
|
|
@@ -54,8 +54,10 @@ export declare class InputGroup {
|
|
|
54
54
|
get consumedBeforeAck(): ReadonlySet<string> | undefined;
|
|
55
55
|
/** Messages carried behind a human answer, read at that turn's end. */
|
|
56
56
|
get bundledInputIds(): readonly string[] | undefined;
|
|
57
|
-
/** The input
|
|
58
|
-
* whenever its harness reports the read (hearsay-tools/squawk#2587).
|
|
57
|
+
/** The input the transport accepted at the last turn boundary: it opened the turn after it,
|
|
58
|
+
* which reads it whenever its harness reports the read (hearsay-tools/squawk#2587). A later
|
|
59
|
+
* boundary send, a human message included, replaces it; an accepted send mid-turn takes its
|
|
60
|
+
* inputs out of it. */
|
|
59
61
|
get turnOpenerIds(): readonly string[] | undefined;
|
|
60
62
|
/** Unread reports received while the same submission's ACK is pending. */
|
|
61
63
|
get retiredInFlight(): ReadonlySet<string> | undefined;
|
|
@@ -84,7 +86,7 @@ export declare class InputGroup {
|
|
|
84
86
|
clearUnreadInputs(): void;
|
|
85
87
|
bundleInputs(ids: readonly string[]): void;
|
|
86
88
|
clearBundledInputs(): void;
|
|
87
|
-
|
|
89
|
+
markTurnOpeners(ids: readonly string[], opensTurn: boolean): void;
|
|
88
90
|
retireInFlight(id: string): void;
|
|
89
91
|
forgetRetiredInput(id: string): void;
|
|
90
92
|
prepareUnreadRetry(): void;
|
|
@@ -88,8 +88,10 @@ export class InputGroup {
|
|
|
88
88
|
get consumedBeforeAck() { return this.#consumedView; }
|
|
89
89
|
/** Messages carried behind a human answer, read at that turn's end. */
|
|
90
90
|
get bundledInputIds() { return this.#bundledInputIds; }
|
|
91
|
-
/** The input
|
|
92
|
-
* whenever its harness reports the read (hearsay-tools/squawk#2587).
|
|
91
|
+
/** The input the transport accepted at the last turn boundary: it opened the turn after it,
|
|
92
|
+
* which reads it whenever its harness reports the read (hearsay-tools/squawk#2587). A later
|
|
93
|
+
* boundary send, a human message included, replaces it; an accepted send mid-turn takes its
|
|
94
|
+
* inputs out of it. */
|
|
93
95
|
get turnOpenerIds() { return this.#turnOpenerIds; }
|
|
94
96
|
/** Unread reports received while the same submission's ACK is pending. */
|
|
95
97
|
get retiredInFlight() { return this.#retiredView; }
|
|
@@ -126,7 +128,9 @@ export class InputGroup {
|
|
|
126
128
|
this.#bundledInputIds = Object.freeze([...(this.#bundledInputIds ?? []), ...ids]);
|
|
127
129
|
}
|
|
128
130
|
clearBundledInputs() { this.#bundledInputIds = undefined; }
|
|
129
|
-
|
|
131
|
+
markTurnOpeners(ids, opensTurn) {
|
|
132
|
+
this.#turnOpenerIds = Object.freeze(opensTurn ? [...ids] : (this.#turnOpenerIds ?? []).filter(id => !ids.includes(id)));
|
|
133
|
+
}
|
|
130
134
|
retireInFlight(id) {
|
|
131
135
|
if (!this.#retiredInFlight) {
|
|
132
136
|
this.#retiredInFlight = new Set();
|
|
@@ -364,11 +368,10 @@ export class InputDelivery {
|
|
|
364
368
|
const session = state.liveSession.session;
|
|
365
369
|
const content = [{ type: 'text', text }, ...(bundle ? [{ type: 'text', text: bundle.text }] : [])];
|
|
366
370
|
const delivered = [reply.id, ...(bundle?.inputs.map(input => input.id) ?? [])];
|
|
371
|
+
const opensTurn = state.boundary.atTurnBoundary === session;
|
|
367
372
|
if (!handToTransport(state, session, delivered, wire => wire.sendMessage(content)))
|
|
368
373
|
return;
|
|
369
|
-
|
|
370
|
-
if (state.boundary.atTurnBoundary === session)
|
|
371
|
-
state.inputState.openTurnWith(delivered);
|
|
374
|
+
state.inputState.markTurnOpeners(delivered, opensTurn);
|
|
372
375
|
this.context.store.appendEvent(runId, { type: 'human-input-delivered', askSeq, source });
|
|
373
376
|
inputReceipts.commitRoutedAnswer(this.context, runId, state, { askSeq, delivered: [reply.id, ...(bundle?.inputs.map(input => input.id) ?? [])] }, fallback, this.maxAutoContinues);
|
|
374
377
|
// Spend the answer's admission now so later messages can steer before its turn ends.
|
|
@@ -553,8 +556,6 @@ export class InputDelivery {
|
|
|
553
556
|
const refusal = !!this.context.store.getRun(runId)?.agentInputs?.some(input => input.purpose === 'completion-refusal' && inputIds.includes(input.id));
|
|
554
557
|
const atBoundary = state.boundary.atTurnBoundary === session;
|
|
555
558
|
const flight = new InputFlight(session, inputIds, this.host.line.isAdmitted(runId) && atBoundary ? true : undefined);
|
|
556
|
-
if (atBoundary && inputIds.length)
|
|
557
|
-
state.inputState.openTurnWith(inputIds);
|
|
558
559
|
// A batch with timer results is an automatic wake: it reserves one unit of the budget now, so a timer that comes due before this acknowledgement counts it, and gives it back if the batch is refused or its acknowledgement rejects (hearsay-tools/cezarion#1233).
|
|
559
560
|
// The accepted done's one free delivery turn costs no wake: the run finishes when it ends (hearsay-tools/squawk#2587).
|
|
560
561
|
if (done !== 'free' && reservesAutomaticWake(this.context.store.getRun(runId), flight, inputIds, () => this.host.countAutomaticWakes(runId, beforeHumanReset), this.maxAutoContinues))
|
|
@@ -563,6 +564,8 @@ export class InputDelivery {
|
|
|
563
564
|
const settled = this.sendAgentInput(runId, state, flight, content, refusal);
|
|
564
565
|
if (!settled)
|
|
565
566
|
return false;
|
|
567
|
+
// Only a send the transport accepted at a boundary opens the turn after it (hearsay-tools/squawk#2587).
|
|
568
|
+
state.inputState.markTurnOpeners(inputIds, atBoundary);
|
|
566
569
|
this.host.workerExecutions.trackDelivery(runId, settled);
|
|
567
570
|
this.resumeParkedRun(runId, state, beforeHumanReset);
|
|
568
571
|
this.recordAgentInputTurn(runId, state, flight, refusal);
|
|
@@ -864,7 +867,10 @@ export class InputDelivery {
|
|
|
864
867
|
const atTurnBoundary = state.boundary.atTurnBoundary === session;
|
|
865
868
|
// A human message withdraws an accepted done: its turn end reads the message (hearsay-tools/squawk#2587).
|
|
866
869
|
const sent = this.context.store.getRun(runId)?.doneAccepted ? [...deliverable, { type: 'text', text: `\n\n${DONE_RECONSIDERED_NOTE}` }] : deliverable;
|
|
867
|
-
const
|
|
870
|
+
const bundled = prepared.bundle?.inputs.map(input => input.id) ?? [];
|
|
871
|
+
const delivered = handToTransport(state, session, bundled, wire => wire.sendMessage(sent));
|
|
872
|
+
if (delivered)
|
|
873
|
+
state.inputState.markTurnOpeners(bundled, atTurnBoundary);
|
|
868
874
|
if (delivered && expanded !== blocks)
|
|
869
875
|
this.host.runSkills.provisionLiveSlashSkill(runId, state, blocks);
|
|
870
876
|
if (delivered)
|