@hearsay-tools/squawk 0.18.0-dev.5939 → 0.18.0-dev.6015
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/service.d.ts +1 -1
- package/dist/automations/service.js +1 -1
- package/dist/ci-wait/tools.d.ts +4 -4
- package/dist/contract/automation-schedule.d.ts +9 -0
- package/dist/contract/automations.d.ts +1 -9
- package/dist/contract/index.js +1956 -1960
- package/dist/contract/run-status.d.ts +32 -0
- package/dist/contract/runs.d.ts +1 -21
- package/dist/delegation/routes.d.ts +71 -71
- package/dist/delegation/service.d.ts +1 -1
- package/dist/delegation/service.js +1 -1
- package/dist/delegation/transport.d.ts +9 -9
- package/dist/discovery/catalog.d.ts +2 -9
- package/dist/discovery/catalog.js +1 -18
- package/dist/discovery/catalog.js.map +1 -1
- package/dist/discovery/choices.d.ts +10 -0
- package/dist/discovery/choices.js +19 -0
- package/dist/discovery/choices.js.map +1 -0
- package/dist/runs/run-exits.d.ts +290 -290
- package/dist/server/activity-routes.d.ts +23 -23
- package/dist/server/live-routes.d.ts +6 -6
- package/dist/server/reports-api.d.ts +2 -2
- package/dist/server/server.d.ts +92 -92
- package/dist/server/workspace-live-routes.d.ts +6 -6
- package/dist/workflows/input-acknowledgement.d.ts +24 -24
- package/package.json +4 -4
- package/web/dist/assets/{activity-motion-XsGcc9eM.js → activity-motion-Bqd8S9Xy.js} +2 -2
- package/web/dist/assets/{activity-route-DIDXHV7J.js → activity-route-DQI_8J09.js} +1 -1
- package/web/dist/assets/{agent-accounts-CuRvwNoA.js → agent-accounts-C6eyz75V.js} +1 -1
- package/web/dist/assets/{cez-idle-DtpdVf_5.js → cez-idle-NomdGTfa.js} +1 -1
- package/web/dist/assets/{commit-diff-panel-DtHg36xc.js → commit-diff-panel-C7BUSPzE.js} +1 -1
- package/web/dist/assets/{control-locations-CljaLD_b.js → control-locations-DlrUP5vD.js} +1 -1
- package/web/dist/assets/{diff-ImdJ4tPA.js → diff-Bwy0qFul.js} +2 -2
- package/web/dist/assets/{diff-view-BMqNpcSH.js → diff-view-B9kgeZTm.js} +1 -1
- package/web/dist/assets/{file-preview-C58stPPw.js → file-preview-DrXgM1-S.js} +1 -1
- package/web/dist/assets/{git-toolbar-Dzp24LO7.js → git-toolbar-B1gOn_1U.js} +1 -1
- package/web/dist/assets/{github-Cn0hlJsH.js → github-g-ZOTwHQ.js} +1 -1
- package/web/dist/assets/{github-sidebar-model-BSNdxNKJ.js → github-sidebar-model-BdoLA7qT.js} +1 -1
- package/web/dist/assets/{global-activity-route-D5ke1ZQa.js → global-activity-route-CZ_xwiz3.js} +1 -1
- package/web/dist/assets/index-75IttVLX.js +17 -0
- package/web/dist/assets/{live-protocol-BAiIX_Mf.js → live-protocol-DBPXI6ks.js} +1 -1
- package/web/dist/assets/{live-refetch-CstQIN6c.js → live-refetch-pzhdhNS_.js} +1 -1
- package/web/dist/assets/{preview-pane-connected-Cl-W1pDv.js → preview-pane-connected-Cx8q-Yrh.js} +1 -1
- package/web/dist/assets/{project-router-Dd63wBeA.js → project-router-BFKfAFvq.js} +1 -1
- package/web/dist/assets/project-scope-context-DSkcNKO7.js +4 -0
- package/web/dist/assets/{queries-BPdWfTBN.js → queries-BtScxiQP.js} +1 -1
- package/web/dist/assets/{repo-git-YYivBJ2x.js → repo-git-DgZuI4FP.js} +1 -1
- package/web/dist/assets/{report-reader-gGAlVnKU.js → report-reader-CeBtx_Sf.js} +1 -1
- package/web/dist/assets/reports-CRPxIRMM.js +1 -0
- package/web/dist/assets/{run-header-CxRJxVsR.js → run-header-C8Eeonkx.js} +2 -2
- package/web/dist/assets/{skills-CEFXcZA5.js → skills-DDoJCcmD.js} +1 -1
- package/web/dist/assets/{tab-link-CDrve3Rf.js → tab-link-DDpdYMnv.js} +1 -1
- package/web/dist/assets/{task-changes-Bm4gjXBb.js → task-changes-XAcKfebn.js} +1 -1
- package/web/dist/assets/{task-commits-DYHV533w.js → task-commits-D5V0Q0au.js} +1 -1
- package/web/dist/assets/{task-files-Bqvj0rbX.js → task-files-CkPJZE0w.js} +1 -1
- package/web/dist/assets/{task-github-item-YkTV2--_.js → task-github-item-CbCOKkvp.js} +1 -1
- package/web/dist/assets/{task-thread-CempX7k0.js → task-thread-DyR8HsDz.js} +5 -5
- package/web/dist/assets/{thread-state-BpcneWuV.js → thread-state-BtmIMbkZ.js} +1 -1
- package/web/dist/assets/{use-hand-to-agent-state-B9qtivFb.js → use-hand-to-agent-state-BUpbMYM9.js} +1 -1
- package/web/dist/assets/{useInfiniteQuery-hrWYY8aw.js → useInfiniteQuery-BmfExLUr.js} +1 -1
- package/web/dist/assets/useQuery-8pHkglP4.js +1 -0
- package/web/dist/assets/{workflows-z-CqJ0JW.js → workflows-CEFtJj_h.js} +1 -1
- package/web/dist/assets/{ws-Cn8d-Fu-.js → ws-CEQH0TUT.js} +1 -1
- package/web/dist/index.html +13 -13
- package/web/dist/live-worker.js +1 -1
- package/web/dist/assets/index-lMBPAedr.js +0 -17
- package/web/dist/assets/project-scope-context-wlB-Y0ii.js +0 -4
- package/web/dist/assets/reports-B_xpuTvK.js +0 -1
- package/web/dist/assets/useQuery-BHmKi9_o.js +0 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/**
|
|
3
|
+
* The lifecycle enums a run, a step, and a step kind can hold. This module imports only zod:
|
|
4
|
+
* activity.ts and the testkit need the enums without the run record
|
|
5
|
+
* (hearsay-tools/cezarion#3369). `runs.ts` re-exports the names.
|
|
6
|
+
*/
|
|
7
|
+
export declare const runStatusSchema: z.ZodEnum<{
|
|
8
|
+
cancelled: "cancelled";
|
|
9
|
+
done: "done";
|
|
10
|
+
failed: "failed";
|
|
11
|
+
queued: "queued";
|
|
12
|
+
review: "review";
|
|
13
|
+
running: "running";
|
|
14
|
+
waiting: "waiting";
|
|
15
|
+
}>;
|
|
16
|
+
export type RunStatus = z.infer<typeof runStatusSchema>;
|
|
17
|
+
export declare const stepStatusSchema: z.ZodEnum<{
|
|
18
|
+
cancelled: "cancelled";
|
|
19
|
+
done: "done";
|
|
20
|
+
failed: "failed";
|
|
21
|
+
pending: "pending";
|
|
22
|
+
review: "review";
|
|
23
|
+
running: "running";
|
|
24
|
+
skipped: "skipped";
|
|
25
|
+
waiting: "waiting";
|
|
26
|
+
}>;
|
|
27
|
+
export type StepStatus = z.infer<typeof stepStatusSchema>;
|
|
28
|
+
export declare const stepKindSchema: z.ZodEnum<{
|
|
29
|
+
agent: "agent";
|
|
30
|
+
check: "check";
|
|
31
|
+
}>;
|
|
32
|
+
export type StepKind = z.infer<typeof stepKindSchema>;
|
package/dist/contract/runs.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
+
export { runStatusSchema, type RunStatus, stepStatusSchema, type StepStatus, stepKindSchema, type StepKind } from './run-status.ts';
|
|
2
3
|
/**
|
|
3
4
|
* The RUNS family of `/api/v1` — a task's record, its lifecycle mutations, and the artifacts
|
|
4
5
|
* (queued prompt stack, commits, git actions) that hang off one run.
|
|
@@ -42,16 +43,6 @@ export declare const autoArchiveReceiptSchema: z.ZodObject<{
|
|
|
42
43
|
mergedAt: z.ZodString;
|
|
43
44
|
}, z.core.$strip>>;
|
|
44
45
|
}, z.core.$strip>;
|
|
45
|
-
export declare const runStatusSchema: z.ZodEnum<{
|
|
46
|
-
cancelled: "cancelled";
|
|
47
|
-
done: "done";
|
|
48
|
-
failed: "failed";
|
|
49
|
-
queued: "queued";
|
|
50
|
-
review: "review";
|
|
51
|
-
running: "running";
|
|
52
|
-
waiting: "waiting";
|
|
53
|
-
}>;
|
|
54
|
-
export type RunStatus = z.infer<typeof runStatusSchema>;
|
|
55
46
|
/** Durable completion work. The id fences replies from a previous completion or setting. */
|
|
56
47
|
export declare const completionActionSchema: z.ZodObject<{
|
|
57
48
|
id: z.ZodString;
|
|
@@ -62,17 +53,6 @@ export declare const completionActionSchema: z.ZodObject<{
|
|
|
62
53
|
}>;
|
|
63
54
|
message: z.ZodOptional<z.ZodString>;
|
|
64
55
|
}, z.core.$strip>;
|
|
65
|
-
export declare const stepStatusSchema: z.ZodEnum<{
|
|
66
|
-
cancelled: "cancelled";
|
|
67
|
-
done: "done";
|
|
68
|
-
failed: "failed";
|
|
69
|
-
pending: "pending";
|
|
70
|
-
review: "review";
|
|
71
|
-
running: "running";
|
|
72
|
-
skipped: "skipped";
|
|
73
|
-
waiting: "waiting";
|
|
74
|
-
}>;
|
|
75
|
-
export type StepStatus = z.infer<typeof stepStatusSchema>;
|
|
76
56
|
/** Cursor native session transport; legacy ones omit it (ACP). `cursor-acp` is only read (hearsay-tools/cezarion#1267). */
|
|
77
57
|
export declare const sessionTransportSchema: z.ZodEnum<{
|
|
78
58
|
"cursor-acp": "cursor-acp";
|
|
@@ -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,24 +76,21 @@ 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
|
} & {
|
|
82
82
|
"/discover": {
|
|
83
83
|
$post: {
|
|
84
84
|
output: {
|
|
85
|
+
scope: "host-default-account";
|
|
86
|
+
runners: {
|
|
87
|
+
status: "connected" | "disconnected" | "not-installed" | "unknown";
|
|
88
|
+
enabled?: boolean | undefined;
|
|
89
|
+
hint?: string | undefined;
|
|
90
|
+
authFailureId?: string | undefined;
|
|
91
|
+
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
92
|
+
}[];
|
|
93
|
+
} | {
|
|
85
94
|
tasks: {
|
|
86
95
|
id: string;
|
|
87
96
|
title: string;
|
|
@@ -93,15 +102,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
93
102
|
reason?: string | undefined;
|
|
94
103
|
}[];
|
|
95
104
|
nextOffset?: number | undefined;
|
|
96
|
-
} | {
|
|
97
|
-
scope: "host-default-account";
|
|
98
|
-
runners: {
|
|
99
|
-
status: "connected" | "disconnected" | "not-installed" | "unknown";
|
|
100
|
-
enabled?: boolean | undefined;
|
|
101
|
-
hint?: string | undefined;
|
|
102
|
-
authFailureId?: string | undefined;
|
|
103
|
-
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
104
|
-
}[];
|
|
105
105
|
} | {
|
|
106
106
|
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
107
107
|
models: {
|
|
@@ -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;
|
|
@@ -716,7 +728,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
716
728
|
workerId: string;
|
|
717
729
|
};
|
|
718
730
|
};
|
|
719
|
-
}
|
|
731
|
+
};
|
|
732
|
+
};
|
|
733
|
+
} & {
|
|
734
|
+
"/:workerId/collect": {
|
|
735
|
+
$post: {
|
|
720
736
|
output: {
|
|
721
737
|
error: string;
|
|
722
738
|
code?: "invalid_input" | undefined;
|
|
@@ -727,12 +743,10 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
727
743
|
param: {
|
|
728
744
|
workerId: string;
|
|
729
745
|
};
|
|
746
|
+
} & {
|
|
747
|
+
json: Record<string, never>;
|
|
730
748
|
};
|
|
731
|
-
}
|
|
732
|
-
};
|
|
733
|
-
} & {
|
|
734
|
-
"/:workerId/collect": {
|
|
735
|
-
$post: {
|
|
749
|
+
} | {
|
|
736
750
|
output: {
|
|
737
751
|
workerId: string;
|
|
738
752
|
parentRunId: string;
|
|
@@ -834,7 +848,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
834
848
|
} & {
|
|
835
849
|
json: Record<string, never>;
|
|
836
850
|
};
|
|
837
|
-
}
|
|
851
|
+
};
|
|
852
|
+
};
|
|
853
|
+
} & {
|
|
854
|
+
"/:workerId/steer": {
|
|
855
|
+
$post: {
|
|
838
856
|
output: {
|
|
839
857
|
error: string;
|
|
840
858
|
code?: "invalid_input" | undefined;
|
|
@@ -846,13 +864,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
846
864
|
workerId: string;
|
|
847
865
|
};
|
|
848
866
|
} & {
|
|
849
|
-
json:
|
|
867
|
+
json: {
|
|
868
|
+
text: string;
|
|
869
|
+
};
|
|
850
870
|
};
|
|
851
|
-
}
|
|
852
|
-
};
|
|
853
|
-
} & {
|
|
854
|
-
"/:workerId/steer": {
|
|
855
|
-
$post: {
|
|
871
|
+
} | {
|
|
856
872
|
output: {
|
|
857
873
|
workerId: string;
|
|
858
874
|
state: "delivered" | "queued";
|
|
@@ -868,7 +884,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
868
884
|
text: string;
|
|
869
885
|
};
|
|
870
886
|
};
|
|
871
|
-
}
|
|
887
|
+
};
|
|
888
|
+
};
|
|
889
|
+
} & {
|
|
890
|
+
"/:workerId/stop": {
|
|
891
|
+
$post: {
|
|
872
892
|
output: {
|
|
873
893
|
error: string;
|
|
874
894
|
code?: "invalid_input" | undefined;
|
|
@@ -880,15 +900,9 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
880
900
|
workerId: string;
|
|
881
901
|
};
|
|
882
902
|
} & {
|
|
883
|
-
json:
|
|
884
|
-
text: string;
|
|
885
|
-
};
|
|
903
|
+
json: Record<string, never>;
|
|
886
904
|
};
|
|
887
|
-
}
|
|
888
|
-
};
|
|
889
|
-
} & {
|
|
890
|
-
"/:workerId/stop": {
|
|
891
|
-
$post: {
|
|
905
|
+
} | {
|
|
892
906
|
output: {
|
|
893
907
|
workerId: string;
|
|
894
908
|
state: "stopping" | "terminated";
|
|
@@ -902,7 +916,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
902
916
|
} & {
|
|
903
917
|
json: Record<string, never>;
|
|
904
918
|
};
|
|
905
|
-
}
|
|
919
|
+
};
|
|
920
|
+
};
|
|
921
|
+
} & {
|
|
922
|
+
"/:workerId/destroy": {
|
|
923
|
+
$post: {
|
|
906
924
|
output: {
|
|
907
925
|
error: string;
|
|
908
926
|
code?: "invalid_input" | undefined;
|
|
@@ -916,11 +934,7 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
916
934
|
} & {
|
|
917
935
|
json: Record<string, never>;
|
|
918
936
|
};
|
|
919
|
-
}
|
|
920
|
-
};
|
|
921
|
-
} & {
|
|
922
|
-
"/:workerId/destroy": {
|
|
923
|
-
$post: {
|
|
937
|
+
} | {
|
|
924
938
|
output: {
|
|
925
939
|
workerId: string;
|
|
926
940
|
state: "complete" | "incomplete";
|
|
@@ -943,20 +957,6 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
943
957
|
} & {
|
|
944
958
|
json: Record<string, never>;
|
|
945
959
|
};
|
|
946
|
-
} | {
|
|
947
|
-
output: {
|
|
948
|
-
error: string;
|
|
949
|
-
code?: "invalid_input" | undefined;
|
|
950
|
-
};
|
|
951
|
-
outputFormat: "json";
|
|
952
|
-
status: 400;
|
|
953
|
-
input: {
|
|
954
|
-
param: {
|
|
955
|
-
workerId: string;
|
|
956
|
-
};
|
|
957
|
-
} & {
|
|
958
|
-
json: Record<string, never>;
|
|
959
|
-
};
|
|
960
960
|
} | {
|
|
961
961
|
output: {
|
|
962
962
|
workerId: string;
|
|
@@ -986,13 +986,11 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
986
986
|
"/:workerId/diff": {
|
|
987
987
|
$get: {
|
|
988
988
|
output: {
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
diff: string;
|
|
992
|
-
truncated: boolean;
|
|
989
|
+
error: string;
|
|
990
|
+
code?: "invalid_input" | undefined;
|
|
993
991
|
};
|
|
994
992
|
outputFormat: "json";
|
|
995
|
-
status:
|
|
993
|
+
status: 400;
|
|
996
994
|
input: {
|
|
997
995
|
param: {
|
|
998
996
|
workerId: string;
|
|
@@ -1000,11 +998,13 @@ export declare function createDelegationRoutes(service: DelegationService, crede
|
|
|
1000
998
|
};
|
|
1001
999
|
} | {
|
|
1002
1000
|
output: {
|
|
1003
|
-
|
|
1004
|
-
|
|
1001
|
+
workerId: string;
|
|
1002
|
+
baselineSha: string;
|
|
1003
|
+
diff: string;
|
|
1004
|
+
truncated: boolean;
|
|
1005
1005
|
};
|
|
1006
1006
|
outputFormat: "json";
|
|
1007
|
-
status:
|
|
1007
|
+
status: 200;
|
|
1008
1008
|
input: {
|
|
1009
1009
|
param: {
|
|
1010
1010
|
workerId: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { Home } from '../home/home.ts';
|
|
2
|
-
import { type HostDiscovery } from '../discovery/
|
|
2
|
+
import { type HostDiscovery } from '../discovery/choices.ts';
|
|
3
3
|
export { rootDelegation } from './conversations.ts';
|
|
4
4
|
import { type DiscoveryRequest, type DiscoveryResponse } from '../contract/index.js';
|
|
5
5
|
import { type ConversationSendRequest, type ConversationSendResult, type ConversationInspectRequest, type ConversationInspectResult, type ConversationCancelRequest, type InboxReserveResult, type InboxReceiptRequest, type InboxReceiptResult, type RequestWaitRequest, type RequestOutcome } from '../contract/index.js';
|
|
@@ -3,7 +3,7 @@ import { WAIT_KINDS } from '../workflows/run/wait-kinds.js';
|
|
|
3
3
|
import { projectPaths } from '../project-paths.js';
|
|
4
4
|
import { assertReplyDirection, sendRequestContext, sendAdmission, sendMessage, sendInput } from './conversation-send.js';
|
|
5
5
|
import { discoverTasks } from './task-discovery.js';
|
|
6
|
-
import { discoveredRunners, missingModelChoices } from '../discovery/
|
|
6
|
+
import { discoveredRunners, missingModelChoices } from '../discovery/choices.js';
|
|
7
7
|
import { assertConversationCapacity, assertFamilySender, byCreatedAtAndId, commitAccepted, familyPair, inboxEntryIn, orphanedPeerMessage, peerPair, takesPart, projectConversationEvents, reconcileConversationState, replyOutcomes } from './conversations.js';
|
|
8
8
|
export { rootDelegation } from './conversations.js';
|
|
9
9
|
import { collectWorkerEvidence, revalidateRetainedWorkerResult, workerRevision } from './results.js';
|
|
@@ -67,15 +67,6 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
67
67
|
source: "cache" | "live" | "unavailable";
|
|
68
68
|
stale: boolean;
|
|
69
69
|
reason?: string | undefined;
|
|
70
|
-
} | {
|
|
71
|
-
scope: "host-default-account";
|
|
72
|
-
runners: {
|
|
73
|
-
status: "connected" | "disconnected" | "not-installed" | "unknown";
|
|
74
|
-
enabled?: boolean | undefined;
|
|
75
|
-
hint?: string | undefined;
|
|
76
|
-
authFailureId?: string | undefined;
|
|
77
|
-
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
78
|
-
}[];
|
|
79
70
|
} | {
|
|
80
71
|
tasks: {
|
|
81
72
|
id: string;
|
|
@@ -88,6 +79,15 @@ export declare function createDelegationApp(routes: DelegationRoutes): import("h
|
|
|
88
79
|
reason?: string | undefined;
|
|
89
80
|
}[];
|
|
90
81
|
nextOffset?: number | undefined;
|
|
82
|
+
} | {
|
|
83
|
+
scope: "host-default-account";
|
|
84
|
+
runners: {
|
|
85
|
+
status: "connected" | "disconnected" | "not-installed" | "unknown";
|
|
86
|
+
enabled?: boolean | undefined;
|
|
87
|
+
hint?: string | undefined;
|
|
88
|
+
authFailureId?: string | undefined;
|
|
89
|
+
runner: "claude" | "codex" | "cursor" | "omp" | "opencode" | "pi";
|
|
90
|
+
}[];
|
|
91
91
|
};
|
|
92
92
|
outputFormat: "json";
|
|
93
93
|
status: 200;
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
import type { Home } from '../home/home.ts';
|
|
2
2
|
import { type ProviderAuthService } from '../core/provider-auth.ts';
|
|
3
|
-
import { type ModelDiscoveryRunner, type ProviderStatusResponse } from '../contract/index.js';
|
|
4
|
-
import type { ModelChoices, DiscoveredRunners } from '../contract/index.js';
|
|
5
3
|
import { RunnerModelCatalog } from '../core/runner-model-catalog.ts';
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
providers(): Promise<ProviderStatusResponse>;
|
|
9
|
-
}
|
|
4
|
+
import type { HostDiscovery } from './choices.ts';
|
|
5
|
+
export { discoveredRunners, missingModelChoices, type HostDiscovery } from './choices.ts';
|
|
10
6
|
/** Initialize before recovery or headless execution; the cockpit reuses this same model cache. */
|
|
11
7
|
export declare function createHostDiscovery(root: string, auth: ProviderAuthService, home: Home): HostDiscovery & {
|
|
12
8
|
models: RunnerModelCatalog;
|
|
13
9
|
};
|
|
14
|
-
export declare function discoveredRunners(status: ProviderStatusResponse): DiscoveredRunners;
|
|
15
|
-
/** A fresh nonempty host catalog can disprove an explicit selection; unavailable data cannot. */
|
|
16
|
-
export declare function missingModelChoices(source: HostDiscovery, runner: ModelDiscoveryRunner, model: string, effectiveModel?: string, modelIdentity?: string): Promise<ModelChoices | undefined>;
|
|
@@ -2,8 +2,8 @@ import { hostModelCatalogAdapters } from '../core/host-model-catalog.js';
|
|
|
2
2
|
import { providerAuthChecksDisabled } from '../core/provider-auth.js';
|
|
3
3
|
import { applyProviderEnablement } from '../core/provider-availability.js';
|
|
4
4
|
import { loadWorkspaceConfig } from '../workspace/config.js';
|
|
5
|
-
import { MODEL_DISCOVERY_RUNNERS } from '../contract/index.js';
|
|
6
5
|
import { RunnerModelCatalog } from '../core/runner-model-catalog.js';
|
|
6
|
+
export { discoveredRunners, missingModelChoices } from './choices.js';
|
|
7
7
|
/** Initialize before recovery or headless execution; the cockpit reuses this same model cache. */
|
|
8
8
|
export function createHostDiscovery(root, auth, home) {
|
|
9
9
|
return {
|
|
@@ -11,21 +11,4 @@ export function createHostDiscovery(root, auth, home) {
|
|
|
11
11
|
providers: async () => applyProviderEnablement(await auth.status(), providerAuthChecksDisabled() ? [] : (await loadWorkspaceConfig(home.workspaceConfig)).disabledProviders),
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
export function discoveredRunners(status) {
|
|
15
|
-
return { scope: 'host-default-account', runners: status.providers.map(({ provider, profileId: _profileId, ...row }) => ({ runner: provider, ...row })) };
|
|
16
|
-
}
|
|
17
|
-
/** A fresh nonempty host catalog can disprove an explicit selection; unavailable data cannot. */
|
|
18
|
-
export async function missingModelChoices(source, runner, model, effectiveModel, modelIdentity) {
|
|
19
|
-
// Reuse account-aware normalization from execution selection, including custom providers.
|
|
20
|
-
// Compare complete IDs only: never strip another runner's provider prefix speculatively.
|
|
21
|
-
const ids = new Set([model, effectiveModel, modelIdentity].filter((id) => id !== undefined));
|
|
22
|
-
const catalog = await source.models.get(runner);
|
|
23
|
-
if (catalog.source === 'unavailable' || catalog.stale || !catalog.models.length || catalog.models.some(row => ids.has(row.id)))
|
|
24
|
-
return;
|
|
25
|
-
const alternatives = await Promise.all(MODEL_DISCOVERY_RUNNERS.filter(id => id !== runner).map(async (id) => {
|
|
26
|
-
const other = await source.models.get(id);
|
|
27
|
-
return other.source !== 'unavailable' && !other.stale && other.models.some(row => ids.has(row.id)) ? id : undefined;
|
|
28
|
-
}));
|
|
29
|
-
return { runner, requestedModel: model, availableModels: catalog.models, otherRunners: alternatives.filter((id) => id !== undefined) };
|
|
30
|
-
}
|
|
31
14
|
//# sourceMappingURL=catalog.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/discovery/catalog.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,0BAA0B,EAA4B,MAAM,0BAA0B,CAAC;AAChG,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/discovery/catalog.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AACzE,OAAO,EAAE,0BAA0B,EAA4B,MAAM,0BAA0B,CAAC;AAChG,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAGrE,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAsB,MAAM,cAAc,CAAC;AAE1F,kGAAkG;AAClG,MAAM,UAAU,mBAAmB,CAAC,IAAY,EAAE,IAAyB,EAAE,IAAU;IACrF,OAAO;QACL,MAAM,EAAE,IAAI,kBAAkB,CAAC,EAAE,QAAQ,EAAE,wBAAwB,CAAC,IAAI,CAAC,EAAE,CAAC;QAC5E,SAAS,EAAE,KAAK,IAAI,EAAE,CAAC,uBAAuB,CAAC,MAAM,IAAI,CAAC,MAAM,EAAE,EAAE,0BAA0B,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,MAAM,mBAAmB,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,CAAC,iBAAiB,CAAC;KAC7K,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ModelDiscoveryRunner, type ProviderStatusResponse } from '../contract/index.js';
|
|
2
|
+
import type { ModelChoices, DiscoveredRunners } from '../contract/index.js';
|
|
3
|
+
import type { RunnerModelCatalog } from '../core/runner-model-catalog.ts';
|
|
4
|
+
export interface HostDiscovery {
|
|
5
|
+
models: Pick<RunnerModelCatalog, 'get'>;
|
|
6
|
+
providers(): Promise<ProviderStatusResponse>;
|
|
7
|
+
}
|
|
8
|
+
export declare function discoveredRunners(status: ProviderStatusResponse): DiscoveredRunners;
|
|
9
|
+
/** A fresh nonempty host catalog can disprove an explicit selection; unavailable data cannot. */
|
|
10
|
+
export declare function missingModelChoices(source: HostDiscovery, runner: ModelDiscoveryRunner, model: string, effectiveModel?: string, modelIdentity?: string): Promise<ModelChoices | undefined>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { MODEL_DISCOVERY_RUNNERS } from '../contract/index.js';
|
|
2
|
+
export function discoveredRunners(status) {
|
|
3
|
+
return { scope: 'host-default-account', runners: status.providers.map(({ provider, profileId: _profileId, ...row }) => ({ runner: provider, ...row })) };
|
|
4
|
+
}
|
|
5
|
+
/** A fresh nonempty host catalog can disprove an explicit selection; unavailable data cannot. */
|
|
6
|
+
export async function missingModelChoices(source, runner, model, effectiveModel, modelIdentity) {
|
|
7
|
+
// Reuse account-aware normalization from execution selection, including custom providers.
|
|
8
|
+
// Compare complete IDs only: never strip another runner's provider prefix speculatively.
|
|
9
|
+
const ids = new Set([model, effectiveModel, modelIdentity].filter((id) => id !== undefined));
|
|
10
|
+
const catalog = await source.models.get(runner);
|
|
11
|
+
if (catalog.source === 'unavailable' || catalog.stale || !catalog.models.length || catalog.models.some(row => ids.has(row.id)))
|
|
12
|
+
return;
|
|
13
|
+
const alternatives = await Promise.all(MODEL_DISCOVERY_RUNNERS.filter(id => id !== runner).map(async (id) => {
|
|
14
|
+
const other = await source.models.get(id);
|
|
15
|
+
return other.source !== 'unavailable' && !other.stale && other.models.some(row => ids.has(row.id)) ? id : undefined;
|
|
16
|
+
}));
|
|
17
|
+
return { runner, requestedModel: model, availableModels: catalog.models, otherRunners: alternatives.filter((id) => id !== undefined) };
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=choices.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"choices.js","sourceRoot":"","sources":["../../src/discovery/choices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAA0D,MAAM,wCAAwC,CAAC;AASzI,MAAM,UAAU,iBAAiB,CAAC,MAA8B;IAC9D,OAAO,EAAE,KAAK,EAAE,sBAAsB,EAAE,OAAO,EAAE,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,EAAE,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,GAAG,GAAG,EAAE,EAAE,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,GAAG,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC;AAC3J,CAAC;AAED,iGAAiG;AACjG,MAAM,CAAC,KAAK,UAAU,mBAAmB,CAAC,MAAqB,EAAE,MAA4B,EAAE,KAAa,EAAE,cAAuB,EAAE,aAAsB;IAC3J,0FAA0F;IAC1F,yFAAyF;IACzF,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,CAAC,KAAK,EAAE,cAAc,EAAE,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC,EAAE,EAAgB,EAAE,CAAC,EAAE,KAAK,SAAS,CAAC,CAAC,CAAC;IAC3G,MAAM,OAAO,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;IAChD,IAAI,OAAO,CAAC,MAAM,KAAK,aAAa,IAAI,OAAO,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,IAAI,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAAE,OAAO;IACvI,MAAM,YAAY,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,uBAAuB,CAAC,MAAM,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,MAAM,CAAC,CAAC,GAAG,CAAC,KAAK,EAAC,EAAE,EAAC,EAAE;QACxG,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC;QAC1C,OAAO,KAAK,CAAC,MAAM,KAAK,aAAa,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,KAAK,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;IACtH,CAAC,CAAC,CAAC,CAAC;IACJ,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,KAAK,EAAE,eAAe,EAAE,OAAO,CAAC,MAAM,EAAE,YAAY,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,EAAE,EAA8B,EAAE,CAAC,EAAE,KAAK,SAAS,CAAC,EAAE,CAAC;AACrK,CAAC"}
|