@intentic/sandbox-contract 1.300.0 → 1.300.1
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/contracts/agent.contract.d.ts +765 -1
- package/dist/contracts/agent.contract.d.ts.map +1 -1
- package/dist/contracts/agent.contract.js +3 -2
- package/dist/contracts/agent.contract.js.map +1 -1
- package/dist/contracts/capabilities.contract.d.ts +5 -1
- package/dist/contracts/capabilities.contract.d.ts.map +1 -1
- package/dist/contracts/capabilities.contract.js +3 -2
- package/dist/contracts/capabilities.contract.js.map +1 -1
- package/dist/contracts/exit.contract.d.ts +15 -3
- package/dist/contracts/exit.contract.d.ts.map +1 -1
- package/dist/contracts/exit.contract.js +5 -4
- package/dist/contracts/exit.contract.js.map +1 -1
- package/dist/contracts/host.contract.d.ts +24 -2
- package/dist/contracts/host.contract.d.ts.map +1 -1
- package/dist/contracts/host.contract.js +4 -3
- package/dist/contracts/host.contract.js.map +1 -1
- package/dist/contracts/intentic.contract.d.ts +10 -2
- package/dist/contracts/intentic.contract.d.ts.map +1 -1
- package/dist/contracts/intentic.contract.js +4 -3
- package/dist/contracts/intentic.contract.js.map +1 -1
- package/dist/contracts/netdisk.contract.d.ts +5 -1
- package/dist/contracts/netdisk.contract.d.ts.map +1 -1
- package/dist/contracts/netdisk.contract.js +3 -2
- package/dist/contracts/netdisk.contract.js.map +1 -1
- package/dist/contracts/runner.contract.d.ts +505 -2
- package/dist/contracts/runner.contract.d.ts.map +1 -1
- package/dist/contracts/runner.contract.js +4 -3
- package/dist/contracts/runner.contract.js.map +1 -1
- package/dist/contracts/system.contract.d.ts +333 -3
- package/dist/contracts/system.contract.d.ts.map +1 -1
- package/dist/contracts/system.contract.js +5 -4
- package/dist/contracts/system.contract.js.map +1 -1
- package/dist/contracts/vpn.contract.d.ts +5 -1
- package/dist/contracts/vpn.contract.d.ts.map +1 -1
- package/dist/contracts/vpn.contract.js +3 -2
- package/dist/contracts/vpn.contract.js.map +1 -1
- package/dist/index.d.ts +1138 -12
- package/dist/index.d.ts.map +1 -1
- package/dist/protocol/routes.d.ts +6 -0
- package/dist/protocol/routes.d.ts.map +1 -1
- package/dist/protocol/routes.js +12 -4
- package/dist/protocol/routes.js.map +1 -1
- package/dist/schemas/devices.d.ts +1 -0
- package/dist/schemas/devices.d.ts.map +1 -1
- package/dist/schemas/devices.js +43 -24
- package/dist/schemas/devices.js.map +1 -1
- package/dist/state/history-state.d.ts.map +1 -1
- package/dist/state/history-state.js +1 -0
- package/dist/state/history-state.js.map +1 -1
- package/package.json +5 -5
- package/src/contracts/agent.contract.ts +3 -2
- package/src/contracts/capabilities.contract.ts +3 -2
- package/src/contracts/exit.contract.ts +5 -4
- package/src/contracts/host.contract.ts +4 -3
- package/src/contracts/intentic.contract.ts +4 -3
- package/src/contracts/netdisk.contract.ts +3 -2
- package/src/contracts/runner.contract.ts +4 -3
- package/src/contracts/system.contract.ts +5 -4
- package/src/contracts/vpn.contract.ts +3 -2
- package/src/protocol/routes.test.ts +51 -18
- package/src/protocol/routes.ts +26 -6
- package/src/schemas/devices.ts +75 -29
- package/src/state/history-state.ts +3 -0
|
@@ -32,7 +32,16 @@ export declare const runnerContract: {
|
|
|
32
32
|
kind: "done";
|
|
33
33
|
ok: boolean;
|
|
34
34
|
detail?: string | undefined;
|
|
35
|
-
}, unknown, void
|
|
35
|
+
}, unknown, void>> & {
|
|
36
|
+
[x: symbol]: z.ZodUnion<readonly [z.ZodObject<{
|
|
37
|
+
kind: z.ZodLiteral<"line">;
|
|
38
|
+
text: z.ZodString;
|
|
39
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
40
|
+
kind: z.ZodLiteral<"done">;
|
|
41
|
+
ok: z.ZodBoolean;
|
|
42
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
43
|
+
}, z.core.$strip>]>;
|
|
44
|
+
}, Record<never, never>, Record<never, never>>;
|
|
36
45
|
runTurn: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodObject<{
|
|
37
46
|
conversationId: z.ZodString;
|
|
38
47
|
branch: z.ZodString;
|
|
@@ -813,7 +822,501 @@ export declare const runnerContract: {
|
|
|
813
822
|
approvedBy?: string | undefined;
|
|
814
823
|
kind: "credential_receipt";
|
|
815
824
|
requestId: string;
|
|
816
|
-
}, unknown, void
|
|
825
|
+
}, unknown, void>> & {
|
|
826
|
+
[x: symbol]: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
827
|
+
kind: z.ZodLiteral<"session">;
|
|
828
|
+
sessionId: z.ZodString;
|
|
829
|
+
account: z.ZodOptional<z.ZodString>;
|
|
830
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
831
|
+
kind: z.ZodLiteral<"worktree">;
|
|
832
|
+
branch: z.ZodString;
|
|
833
|
+
base: z.ZodString;
|
|
834
|
+
unenforced: z.ZodOptional<z.ZodBoolean>;
|
|
835
|
+
sync: z.ZodOptional<z.ZodObject<{
|
|
836
|
+
commits: z.ZodNumber;
|
|
837
|
+
blocked: z.ZodArray<z.ZodString>;
|
|
838
|
+
}, z.core.$strip>>;
|
|
839
|
+
remote: z.ZodOptional<z.ZodString>;
|
|
840
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
841
|
+
kind: z.ZodLiteral<"landed">;
|
|
842
|
+
landed: z.ZodBoolean;
|
|
843
|
+
conflicts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
844
|
+
repo: z.ZodString;
|
|
845
|
+
paths: z.ZodArray<z.ZodObject<{
|
|
846
|
+
path: z.ZodString;
|
|
847
|
+
reason: z.ZodEnum<{
|
|
848
|
+
binary: "binary";
|
|
849
|
+
diverged: "diverged";
|
|
850
|
+
workspace: "workspace";
|
|
851
|
+
}>;
|
|
852
|
+
}, z.core.$strip>>;
|
|
853
|
+
clean: z.ZodNumber;
|
|
854
|
+
mainBranch: z.ZodOptional<z.ZodString>;
|
|
855
|
+
}, z.core.$strip>>>;
|
|
856
|
+
held: z.ZodOptional<z.ZodBoolean>;
|
|
857
|
+
deps: z.ZodOptional<z.ZodObject<{
|
|
858
|
+
missing: z.ZodNumber;
|
|
859
|
+
started: z.ZodArray<z.ZodString>;
|
|
860
|
+
deferred: z.ZodBoolean;
|
|
861
|
+
}, z.core.$strip>>;
|
|
862
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
863
|
+
kind: z.ZodLiteral<"preamble">;
|
|
864
|
+
notes: z.ZodArray<z.ZodObject<{
|
|
865
|
+
title: z.ZodString;
|
|
866
|
+
text: z.ZodString;
|
|
867
|
+
}, z.core.$strip>>;
|
|
868
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
869
|
+
kind: z.ZodLiteral<"init">;
|
|
870
|
+
model: z.ZodString;
|
|
871
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
872
|
+
kind: z.ZodLiteral<"checkpoint">;
|
|
873
|
+
id: z.ZodString;
|
|
874
|
+
index: z.ZodOptional<z.ZodNumber>;
|
|
875
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
876
|
+
kind: z.ZodLiteral<"steer">;
|
|
877
|
+
text: z.ZodString;
|
|
878
|
+
sentAt: z.ZodNumber;
|
|
879
|
+
attachments: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
880
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
881
|
+
kind: z.ZodLiteral<"delta">;
|
|
882
|
+
text: z.ZodString;
|
|
883
|
+
parentToolUseId: z.ZodOptional<z.ZodString>;
|
|
884
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
885
|
+
kind: z.ZodLiteral<"text_end">;
|
|
886
|
+
parentToolUseId: z.ZodOptional<z.ZodString>;
|
|
887
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
888
|
+
kind: z.ZodLiteral<"thinking">;
|
|
889
|
+
text: z.ZodString;
|
|
890
|
+
parentToolUseId: z.ZodOptional<z.ZodString>;
|
|
891
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
892
|
+
kind: z.ZodLiteral<"tool_call">;
|
|
893
|
+
id: z.ZodString;
|
|
894
|
+
name: z.ZodString;
|
|
895
|
+
category: z.ZodEnum<{
|
|
896
|
+
delete: "delete";
|
|
897
|
+
edit: "edit";
|
|
898
|
+
execute: "execute";
|
|
899
|
+
fetch: "fetch";
|
|
900
|
+
move: "move";
|
|
901
|
+
other: "other";
|
|
902
|
+
read: "read";
|
|
903
|
+
search: "search";
|
|
904
|
+
think: "think";
|
|
905
|
+
}>;
|
|
906
|
+
status: z.ZodEnum<{
|
|
907
|
+
completed: "completed";
|
|
908
|
+
failed: "failed";
|
|
909
|
+
in_progress: "in_progress";
|
|
910
|
+
pending: "pending";
|
|
911
|
+
}>;
|
|
912
|
+
target: z.ZodOptional<z.ZodString>;
|
|
913
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
914
|
+
path: z.ZodString;
|
|
915
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
916
|
+
}, z.core.$strip>>>;
|
|
917
|
+
content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
918
|
+
type: z.ZodLiteral<"text">;
|
|
919
|
+
text: z.ZodString;
|
|
920
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
921
|
+
type: z.ZodLiteral<"diff">;
|
|
922
|
+
path: z.ZodString;
|
|
923
|
+
oldText: z.ZodOptional<z.ZodString>;
|
|
924
|
+
newText: z.ZodString;
|
|
925
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
926
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
927
|
+
type: z.ZodLiteral<"image">;
|
|
928
|
+
path: z.ZodString;
|
|
929
|
+
}, z.core.$strip>], "type">>>;
|
|
930
|
+
parentToolUseId: z.ZodOptional<z.ZodString>;
|
|
931
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
932
|
+
kind: z.ZodLiteral<"tool_call_update">;
|
|
933
|
+
id: z.ZodString;
|
|
934
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
935
|
+
completed: "completed";
|
|
936
|
+
failed: "failed";
|
|
937
|
+
in_progress: "in_progress";
|
|
938
|
+
pending: "pending";
|
|
939
|
+
}>>;
|
|
940
|
+
content: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
941
|
+
type: z.ZodLiteral<"text">;
|
|
942
|
+
text: z.ZodString;
|
|
943
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
944
|
+
type: z.ZodLiteral<"diff">;
|
|
945
|
+
path: z.ZodString;
|
|
946
|
+
oldText: z.ZodOptional<z.ZodString>;
|
|
947
|
+
newText: z.ZodString;
|
|
948
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
949
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
950
|
+
type: z.ZodLiteral<"image">;
|
|
951
|
+
path: z.ZodString;
|
|
952
|
+
}, z.core.$strip>], "type">>>;
|
|
953
|
+
locations: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
954
|
+
path: z.ZodString;
|
|
955
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
956
|
+
}, z.core.$strip>>>;
|
|
957
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
958
|
+
kind: z.ZodLiteral<"terminal">;
|
|
959
|
+
session: z.ZodString;
|
|
960
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
961
|
+
kind: z.ZodLiteral<"browser">;
|
|
962
|
+
session: z.ZodString;
|
|
963
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
964
|
+
kind: z.ZodLiteral<"subagent">;
|
|
965
|
+
id: z.ZodString;
|
|
966
|
+
subagentKind: z.ZodEnum<{
|
|
967
|
+
spawned: "spawned";
|
|
968
|
+
subagent: "subagent";
|
|
969
|
+
}>;
|
|
970
|
+
agentType: z.ZodOptional<z.ZodString>;
|
|
971
|
+
description: z.ZodOptional<z.ZodString>;
|
|
972
|
+
model: z.ZodOptional<z.ZodString>;
|
|
973
|
+
provider: z.ZodOptional<z.ZodString>;
|
|
974
|
+
background: z.ZodOptional<z.ZodBoolean>;
|
|
975
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
976
|
+
kind: z.ZodLiteral<"subagent_update">;
|
|
977
|
+
id: z.ZodString;
|
|
978
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
979
|
+
blocked: "blocked";
|
|
980
|
+
completed: "completed";
|
|
981
|
+
failed: "failed";
|
|
982
|
+
killed: "killed";
|
|
983
|
+
paused: "paused";
|
|
984
|
+
pending: "pending";
|
|
985
|
+
running: "running";
|
|
986
|
+
}>>;
|
|
987
|
+
tokens: z.ZodOptional<z.ZodNumber>;
|
|
988
|
+
toolUses: z.ZodOptional<z.ZodNumber>;
|
|
989
|
+
lastTool: z.ZodOptional<z.ZodString>;
|
|
990
|
+
summary: z.ZodOptional<z.ZodString>;
|
|
991
|
+
error: z.ZodOptional<z.ZodString>;
|
|
992
|
+
verification: z.ZodOptional<z.ZodObject<{
|
|
993
|
+
state: z.ZodEnum<{
|
|
994
|
+
failing: "failing";
|
|
995
|
+
"no-code": "no-code";
|
|
996
|
+
unproven: "unproven";
|
|
997
|
+
verified: "verified";
|
|
998
|
+
}>;
|
|
999
|
+
paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1000
|
+
check: z.ZodOptional<z.ZodString>;
|
|
1001
|
+
}, z.core.$strip>>;
|
|
1002
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1003
|
+
kind: z.ZodLiteral<"todos">;
|
|
1004
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1005
|
+
content: z.ZodString;
|
|
1006
|
+
status: z.ZodEnum<{
|
|
1007
|
+
completed: "completed";
|
|
1008
|
+
in_progress: "in_progress";
|
|
1009
|
+
pending: "pending";
|
|
1010
|
+
}>;
|
|
1011
|
+
activeForm: z.ZodOptional<z.ZodString>;
|
|
1012
|
+
}, z.core.$strip>>;
|
|
1013
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1014
|
+
kind: z.ZodLiteral<"commands">;
|
|
1015
|
+
items: z.ZodArray<z.ZodObject<{
|
|
1016
|
+
name: z.ZodString;
|
|
1017
|
+
description: z.ZodString;
|
|
1018
|
+
hint: z.ZodOptional<z.ZodString>;
|
|
1019
|
+
}, z.core.$strip>>;
|
|
1020
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1021
|
+
kind: z.ZodLiteral<"usage">;
|
|
1022
|
+
account: z.ZodOptional<z.ZodString>;
|
|
1023
|
+
costUsd: z.ZodOptional<z.ZodNumber>;
|
|
1024
|
+
inputTokens: z.ZodOptional<z.ZodNumber>;
|
|
1025
|
+
outputTokens: z.ZodOptional<z.ZodNumber>;
|
|
1026
|
+
cacheReadTokens: z.ZodOptional<z.ZodNumber>;
|
|
1027
|
+
cacheCreationTokens: z.ZodOptional<z.ZodNumber>;
|
|
1028
|
+
durationMs: z.ZodOptional<z.ZodNumber>;
|
|
1029
|
+
numTurns: z.ZodOptional<z.ZodNumber>;
|
|
1030
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1031
|
+
status: z.ZodEnum<{
|
|
1032
|
+
allowed: "allowed";
|
|
1033
|
+
allowed_warning: "allowed_warning";
|
|
1034
|
+
rejected: "rejected";
|
|
1035
|
+
}>;
|
|
1036
|
+
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
1037
|
+
rateLimitType: z.ZodOptional<z.ZodString>;
|
|
1038
|
+
utilization: z.ZodOptional<z.ZodNumber>;
|
|
1039
|
+
kind: z.ZodLiteral<"rate_limit_info">;
|
|
1040
|
+
account: z.ZodOptional<z.ZodString>;
|
|
1041
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1042
|
+
kind: z.ZodLiteral<"fast_mode">;
|
|
1043
|
+
state: z.ZodEnum<{
|
|
1044
|
+
cooldown: "cooldown";
|
|
1045
|
+
off: "off";
|
|
1046
|
+
on: "on";
|
|
1047
|
+
}>;
|
|
1048
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1049
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1050
|
+
kind: z.ZodLiteral<"provider_retry">;
|
|
1051
|
+
attempt: z.ZodNumber;
|
|
1052
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
1053
|
+
nextAttemptAt: z.ZodOptional<z.ZodNumber>;
|
|
1054
|
+
status: z.ZodOptional<z.ZodNumber>;
|
|
1055
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1056
|
+
kind: z.ZodLiteral<"account_usage">;
|
|
1057
|
+
account: z.ZodOptional<z.ZodString>;
|
|
1058
|
+
windows: z.ZodArray<z.ZodObject<{
|
|
1059
|
+
kind: z.ZodString;
|
|
1060
|
+
label: z.ZodOptional<z.ZodString>;
|
|
1061
|
+
utilization: z.ZodNumber;
|
|
1062
|
+
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
1063
|
+
gates: z.ZodUnion<readonly [z.ZodLiteral<"all">, z.ZodLiteral<"none">, z.ZodObject<{
|
|
1064
|
+
models: z.ZodArray<z.ZodString>;
|
|
1065
|
+
}, z.core.$strip>]>;
|
|
1066
|
+
}, z.core.$strip>>;
|
|
1067
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1068
|
+
tokens: z.ZodNumber;
|
|
1069
|
+
contextWindow: z.ZodNumber;
|
|
1070
|
+
cachedAt: z.ZodOptional<z.ZodNumber>;
|
|
1071
|
+
cacheTtlMs: z.ZodOptional<z.ZodNumber>;
|
|
1072
|
+
kind: z.ZodLiteral<"context_usage">;
|
|
1073
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1074
|
+
kind: z.ZodLiteral<"compact">;
|
|
1075
|
+
trigger: z.ZodString;
|
|
1076
|
+
preTokens: z.ZodOptional<z.ZodNumber>;
|
|
1077
|
+
postTokens: z.ZodOptional<z.ZodNumber>;
|
|
1078
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1079
|
+
requestId: z.ZodString;
|
|
1080
|
+
text: z.ZodString;
|
|
1081
|
+
document: z.ZodOptional<z.ZodObject<{
|
|
1082
|
+
path: z.ZodString;
|
|
1083
|
+
title: z.ZodString;
|
|
1084
|
+
markdown: z.ZodString;
|
|
1085
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
1086
|
+
plan: z.ZodOptional<z.ZodBoolean>;
|
|
1087
|
+
}, z.core.$strip>>;
|
|
1088
|
+
kind: z.ZodLiteral<"plan">;
|
|
1089
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1090
|
+
requestId: z.ZodString;
|
|
1091
|
+
questions: z.ZodArray<z.ZodObject<{
|
|
1092
|
+
question: z.ZodString;
|
|
1093
|
+
header: z.ZodString;
|
|
1094
|
+
multiSelect: z.ZodBoolean;
|
|
1095
|
+
options: z.ZodArray<z.ZodObject<{
|
|
1096
|
+
label: z.ZodString;
|
|
1097
|
+
description: z.ZodString;
|
|
1098
|
+
preview: z.ZodOptional<z.ZodString>;
|
|
1099
|
+
}, z.core.$strip>>;
|
|
1100
|
+
}, z.core.$strip>>;
|
|
1101
|
+
document: z.ZodOptional<z.ZodObject<{
|
|
1102
|
+
path: z.ZodString;
|
|
1103
|
+
title: z.ZodString;
|
|
1104
|
+
markdown: z.ZodString;
|
|
1105
|
+
truncated: z.ZodOptional<z.ZodBoolean>;
|
|
1106
|
+
plan: z.ZodOptional<z.ZodBoolean>;
|
|
1107
|
+
}, z.core.$strip>>;
|
|
1108
|
+
kind: z.ZodLiteral<"question">;
|
|
1109
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1110
|
+
toolName: z.ZodString;
|
|
1111
|
+
title: z.ZodOptional<z.ZodString>;
|
|
1112
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
1113
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1114
|
+
reason: z.ZodOptional<z.ZodString>;
|
|
1115
|
+
path: z.ZodOptional<z.ZodString>;
|
|
1116
|
+
alwaysLabel: z.ZodOptional<z.ZodString>;
|
|
1117
|
+
program: z.ZodOptional<z.ZodObject<{
|
|
1118
|
+
text: z.ZodString;
|
|
1119
|
+
language: z.ZodEnum<{
|
|
1120
|
+
bash: "bash";
|
|
1121
|
+
javascript: "javascript";
|
|
1122
|
+
}>;
|
|
1123
|
+
truncated: z.ZodBoolean;
|
|
1124
|
+
spans: z.ZodArray<z.ZodObject<{
|
|
1125
|
+
start: z.ZodNumber;
|
|
1126
|
+
end: z.ZodNumber;
|
|
1127
|
+
}, z.core.$strip>>;
|
|
1128
|
+
}, z.core.$strip>>;
|
|
1129
|
+
explain: z.ZodOptional<z.ZodString>;
|
|
1130
|
+
requestId: z.ZodString;
|
|
1131
|
+
kind: z.ZodLiteral<"permission">;
|
|
1132
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1133
|
+
requestId: z.ZodString;
|
|
1134
|
+
session: z.ZodString;
|
|
1135
|
+
account: z.ZodString;
|
|
1136
|
+
message: z.ZodString;
|
|
1137
|
+
kind: z.ZodLiteral<"browser_help">;
|
|
1138
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1139
|
+
requestId: z.ZodString;
|
|
1140
|
+
session: z.ZodString;
|
|
1141
|
+
message: z.ZodString;
|
|
1142
|
+
kind: z.ZodLiteral<"terminal_help">;
|
|
1143
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1144
|
+
requestId: z.ZodString;
|
|
1145
|
+
offer: z.ZodObject<{
|
|
1146
|
+
card: z.ZodString;
|
|
1147
|
+
name: z.ZodString;
|
|
1148
|
+
why: z.ZodOptional<z.ZodString>;
|
|
1149
|
+
}, z.core.$strip>;
|
|
1150
|
+
kind: z.ZodLiteral<"capability_offer">;
|
|
1151
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1152
|
+
outcome: z.ZodEnum<{
|
|
1153
|
+
connected: "connected";
|
|
1154
|
+
unfinished: "unfinished";
|
|
1155
|
+
}>;
|
|
1156
|
+
id: z.ZodOptional<z.ZodString>;
|
|
1157
|
+
kind: z.ZodLiteral<"capability_outcome">;
|
|
1158
|
+
requestId: z.ZodString;
|
|
1159
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1160
|
+
requestId: z.ZodString;
|
|
1161
|
+
offer: z.ZodObject<{
|
|
1162
|
+
url: z.ZodString;
|
|
1163
|
+
description: z.ZodOptional<z.ZodString>;
|
|
1164
|
+
payTo: z.ZodString;
|
|
1165
|
+
network: z.ZodString;
|
|
1166
|
+
asset: z.ZodString;
|
|
1167
|
+
assetName: z.ZodString;
|
|
1168
|
+
amountUsd: z.ZodString;
|
|
1169
|
+
spentTodayUsd: z.ZodString;
|
|
1170
|
+
dailyCapUsd: z.ZodString;
|
|
1171
|
+
why: z.ZodOptional<z.ZodString>;
|
|
1172
|
+
}, z.core.$strip>;
|
|
1173
|
+
kind: z.ZodLiteral<"payment_offer">;
|
|
1174
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1175
|
+
outcome: z.ZodEnum<{
|
|
1176
|
+
failed: "failed";
|
|
1177
|
+
paid: "paid";
|
|
1178
|
+
}>;
|
|
1179
|
+
amountUsd: z.ZodString;
|
|
1180
|
+
transaction: z.ZodOptional<z.ZodString>;
|
|
1181
|
+
network: z.ZodOptional<z.ZodString>;
|
|
1182
|
+
kind: z.ZodLiteral<"payment_receipt">;
|
|
1183
|
+
requestId: z.ZodString;
|
|
1184
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1185
|
+
requestId: z.ZodString;
|
|
1186
|
+
offer: z.ZodObject<{
|
|
1187
|
+
subject: z.ZodString;
|
|
1188
|
+
kind: z.ZodEnum<{
|
|
1189
|
+
capability: "capability";
|
|
1190
|
+
secret: "secret";
|
|
1191
|
+
}>;
|
|
1192
|
+
lane: z.ZodEnum<{
|
|
1193
|
+
browser: "browser";
|
|
1194
|
+
code: "code";
|
|
1195
|
+
otp: "otp";
|
|
1196
|
+
session: "session";
|
|
1197
|
+
shell: "shell";
|
|
1198
|
+
}>;
|
|
1199
|
+
detail: z.ZodOptional<z.ZodString>;
|
|
1200
|
+
why: z.ZodOptional<z.ZodString>;
|
|
1201
|
+
approvers: z.ZodArray<z.ZodString>;
|
|
1202
|
+
scope: z.ZodEnum<{
|
|
1203
|
+
conversation: "conversation";
|
|
1204
|
+
use: "use";
|
|
1205
|
+
}>;
|
|
1206
|
+
}, z.core.$strip>;
|
|
1207
|
+
kind: z.ZodLiteral<"credential_offer">;
|
|
1208
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1209
|
+
outcome: z.ZodEnum<{
|
|
1210
|
+
refused: "refused";
|
|
1211
|
+
released: "released";
|
|
1212
|
+
}>;
|
|
1213
|
+
approvedBy: z.ZodOptional<z.ZodString>;
|
|
1214
|
+
kind: z.ZodLiteral<"credential_receipt">;
|
|
1215
|
+
requestId: z.ZodString;
|
|
1216
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1217
|
+
kind: z.ZodLiteral<"resolved">;
|
|
1218
|
+
requestId: z.ZodString;
|
|
1219
|
+
reply: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
1220
|
+
kind: z.ZodLiteral<"plan">;
|
|
1221
|
+
requestId: z.ZodString;
|
|
1222
|
+
approve: z.ZodBoolean;
|
|
1223
|
+
feedback: z.ZodOptional<z.ZodString>;
|
|
1224
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1225
|
+
kind: z.ZodLiteral<"question">;
|
|
1226
|
+
requestId: z.ZodString;
|
|
1227
|
+
answers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString>>>;
|
|
1228
|
+
cancelled: z.ZodOptional<z.ZodBoolean>;
|
|
1229
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1230
|
+
kind: z.ZodLiteral<"permission">;
|
|
1231
|
+
requestId: z.ZodString;
|
|
1232
|
+
decision: z.ZodEnum<{
|
|
1233
|
+
always: "always";
|
|
1234
|
+
deny: "deny";
|
|
1235
|
+
once: "once";
|
|
1236
|
+
}>;
|
|
1237
|
+
feedback: z.ZodOptional<z.ZodString>;
|
|
1238
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1239
|
+
kind: z.ZodLiteral<"browser_help">;
|
|
1240
|
+
requestId: z.ZodString;
|
|
1241
|
+
helped: z.ZodBoolean;
|
|
1242
|
+
note: z.ZodOptional<z.ZodString>;
|
|
1243
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1244
|
+
kind: z.ZodLiteral<"terminal_help">;
|
|
1245
|
+
requestId: z.ZodString;
|
|
1246
|
+
helped: z.ZodBoolean;
|
|
1247
|
+
note: z.ZodOptional<z.ZodString>;
|
|
1248
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1249
|
+
kind: z.ZodLiteral<"capability_offer">;
|
|
1250
|
+
requestId: z.ZodString;
|
|
1251
|
+
connect: z.ZodBoolean;
|
|
1252
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1253
|
+
kind: z.ZodLiteral<"payment_offer">;
|
|
1254
|
+
requestId: z.ZodString;
|
|
1255
|
+
approve: z.ZodBoolean;
|
|
1256
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1257
|
+
kind: z.ZodLiteral<"credential_offer">;
|
|
1258
|
+
requestId: z.ZodString;
|
|
1259
|
+
approve: z.ZodBoolean;
|
|
1260
|
+
}, z.core.$strip>], "kind">>;
|
|
1261
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1262
|
+
kind: z.ZodLiteral<"mode">;
|
|
1263
|
+
mode: z.ZodEnum<{
|
|
1264
|
+
bypassPermissions: "bypassPermissions";
|
|
1265
|
+
default: "default";
|
|
1266
|
+
plan: "plan";
|
|
1267
|
+
}>;
|
|
1268
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1269
|
+
kind: z.ZodLiteral<"error">;
|
|
1270
|
+
message: z.ZodString;
|
|
1271
|
+
code: z.ZodOptional<z.ZodEnum<{
|
|
1272
|
+
"agent-busy": "agent-busy";
|
|
1273
|
+
"claude-not-entitled": "claude-not-entitled";
|
|
1274
|
+
"claude-reauth": "claude-reauth";
|
|
1275
|
+
"claude-token-refused": "claude-token-refused";
|
|
1276
|
+
"codex-advisory": "codex-advisory";
|
|
1277
|
+
"codex-model-invalid": "codex-model-invalid";
|
|
1278
|
+
"codex-reauth": "codex-reauth";
|
|
1279
|
+
"context-window-too-small": "context-window-too-small";
|
|
1280
|
+
"engine-version-floor": "engine-version-floor";
|
|
1281
|
+
"grok-model-invalid": "grok-model-invalid";
|
|
1282
|
+
"harness-incomplete": "harness-incomplete";
|
|
1283
|
+
"model-unavailable": "model-unavailable";
|
|
1284
|
+
"provider-outage": "provider-outage";
|
|
1285
|
+
rate_limit: "rate_limit";
|
|
1286
|
+
"sandbox-memory-low": "sandbox-memory-low";
|
|
1287
|
+
"session-not-found": "session-not-found";
|
|
1288
|
+
"subscription-required": "subscription-required";
|
|
1289
|
+
"trial-exhausted": "trial-exhausted";
|
|
1290
|
+
"trial-model-unavailable": "trial-model-unavailable";
|
|
1291
|
+
"trial-unavailable": "trial-unavailable";
|
|
1292
|
+
"turn-cap": "turn-cap";
|
|
1293
|
+
"unknown-command": "unknown-command";
|
|
1294
|
+
}>>;
|
|
1295
|
+
engine: z.ZodOptional<z.ZodObject<{
|
|
1296
|
+
id: z.ZodString;
|
|
1297
|
+
running: z.ZodOptional<z.ZodString>;
|
|
1298
|
+
floor: z.ZodString;
|
|
1299
|
+
}, z.core.$strip>>;
|
|
1300
|
+
resetsAt: z.ZodOptional<z.ZodNumber>;
|
|
1301
|
+
autoResume: z.ZodOptional<z.ZodEnum<{
|
|
1302
|
+
available: "available";
|
|
1303
|
+
scheduled: "scheduled";
|
|
1304
|
+
}>>;
|
|
1305
|
+
held: z.ZodOptional<z.ZodObject<{
|
|
1306
|
+
ran: z.ZodBoolean;
|
|
1307
|
+
contextTokens: z.ZodOptional<z.ZodNumber>;
|
|
1308
|
+
handoffTokens: z.ZodOptional<z.ZodNumber>;
|
|
1309
|
+
moving: z.ZodOptional<z.ZodString>;
|
|
1310
|
+
}, z.core.$strip>>;
|
|
1311
|
+
outage: z.ZodOptional<z.ZodObject<{
|
|
1312
|
+
retryAt: z.ZodNumber;
|
|
1313
|
+
attempt: z.ZodNumber;
|
|
1314
|
+
maxAttempts: z.ZodNumber;
|
|
1315
|
+
}, z.core.$strip>>;
|
|
1316
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
1317
|
+
kind: z.ZodLiteral<"done">;
|
|
1318
|
+
}, z.core.$strip>], "kind">;
|
|
1319
|
+
}, Record<never, never>, Record<never, never>>;
|
|
817
1320
|
reply: import("@orpc/contract").ContractProcedureBuilderWithInputOutput<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
818
1321
|
kind: z.ZodLiteral<"plan">;
|
|
819
1322
|
requestId: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/runner.contract.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"runner.contract.d.ts","sourceRoot":"","sources":["../../src/contracts/runner.contract.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAUxB,eAAO,MAAM,cAAc;IAEvB,QAAQ;;;;;;IAER,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAEb,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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1
|
+
import { oc } from "@orpc/contract";
|
|
2
|
+
import { streamOf } from "../protocol/routes.js";
|
|
2
3
|
import { z } from "zod";
|
|
3
4
|
import { AgentEventSchema } from "../events/agent-events.js";
|
|
4
5
|
import { RunnerFactsSchema, RunnerSyncLineSchema, RunnerSyncSchema, RunnerTurnSchema } from "../protocol/runner-protocol.js";
|
|
@@ -7,8 +8,8 @@ import { AgentReplySchema } from "../schemas/providers/plan-limits.js";
|
|
|
7
8
|
import { OkSchema } from "../schemas/shared.js";
|
|
8
9
|
export const runnerContract = {
|
|
9
10
|
describe: oc.output(RunnerFactsSchema),
|
|
10
|
-
syncWorkspace: oc.input(RunnerSyncSchema).output(
|
|
11
|
-
runTurn: oc.input(RunnerTurnSchema).output(
|
|
11
|
+
syncWorkspace: oc.input(RunnerSyncSchema).output(streamOf(RunnerSyncLineSchema)),
|
|
12
|
+
runTurn: oc.input(RunnerTurnSchema).output(streamOf(AgentEventSchema)),
|
|
12
13
|
reply: oc.input(AgentReplySchema).output(z.object({ applied: z.boolean() })),
|
|
13
14
|
steer: oc
|
|
14
15
|
.input(z.object({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.contract.js","sourceRoot":"","sources":["../../src/contracts/runner.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"runner.contract.js","sourceRoot":"","sources":["../../src/contracts/runner.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,oBAAoB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAC7H,OAAO,EAAE,mBAAmB,EAAE,MA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