@linkshell/host 0.4.67 → 0.4.69
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/host/src/drivers/acp/driver.d.ts +9 -1
- package/dist/host/src/drivers/acp/driver.js +44 -2
- package/dist/host/src/drivers/acp/driver.js.map +1 -1
- package/dist/host/src/drivers/claude/driver.d.ts +20 -1
- package/dist/host/src/drivers/claude/driver.js +144 -4
- package/dist/host/src/drivers/claude/driver.js.map +1 -1
- package/dist/host/src/drivers/claude/transcript.d.ts +15 -0
- package/dist/host/src/drivers/claude/transcript.js +86 -1
- package/dist/host/src/drivers/claude/transcript.js.map +1 -1
- package/dist/host/src/drivers/codex/driver.d.ts +30 -2
- package/dist/host/src/drivers/codex/driver.js +241 -9
- package/dist/host/src/drivers/codex/driver.js.map +1 -1
- package/dist/host/src/drivers/types.d.ts +34 -0
- package/dist/host/src/host.js +2 -1
- package/dist/host/src/host.js.map +1 -1
- package/dist/host/src/hub.d.ts +19 -1
- package/dist/host/src/hub.js +153 -11
- package/dist/host/src/hub.js.map +1 -1
- package/dist/host/src/live-activities.d.ts +2 -1
- package/dist/host/src/live-activities.js +25 -2
- package/dist/host/src/live-activities.js.map +1 -1
- package/dist/host/src/rpc/server.js +11 -1
- package/dist/host/src/rpc/server.js.map +1 -1
- package/dist/host/src/side.d.ts +28 -0
- package/dist/host/src/side.js +142 -0
- package/dist/host/src/side.js.map +1 -0
- package/dist/host/src/store.d.ts +10 -0
- package/dist/host/src/store.js +59 -2
- package/dist/host/src/store.js.map +1 -1
- package/dist/host/tsconfig.tsbuildinfo +1 -1
- package/dist/wire/src/index.d.ts +1 -0
- package/dist/wire/src/index.js +1 -0
- package/dist/wire/src/index.js.map +1 -1
- package/dist/wire/src/model.d.ts +22 -0
- package/dist/wire/src/model.js +4 -0
- package/dist/wire/src/model.js.map +1 -1
- package/dist/wire/src/rpc.d.ts +330 -3
- package/dist/wire/src/rpc.js +35 -0
- package/dist/wire/src/rpc.js.map +1 -1
- package/dist/wire/src/side.d.ts +83 -0
- package/dist/wire/src/side.js +26 -0
- package/dist/wire/src/side.js.map +1 -0
- package/package.json +3 -3
package/dist/wire/src/rpc.d.ts
CHANGED
|
@@ -64,6 +64,13 @@ export type AppErrorCode = z.infer<typeof appErrorCodeSchema>;
|
|
|
64
64
|
export declare const RPC_INVALID_PARAMS = -32602;
|
|
65
65
|
export declare const RPC_METHOD_NOT_FOUND = -32601;
|
|
66
66
|
export declare const RPC_APP_ERROR = -32000;
|
|
67
|
+
/**
|
|
68
|
+
* The host's RPC revision, in `machine.info`. Goes up when the host gains
|
|
69
|
+
* methods or notifications an app may rely on, so an app can tell the
|
|
70
|
+
* computer is older than itself and say so (an absent revision is 0).
|
|
71
|
+
* 1: side conversations (`sessions.side`), `machine.info.protocol` itself.
|
|
72
|
+
*/
|
|
73
|
+
export declare const HOST_PROTOCOL = 1;
|
|
67
74
|
export declare const directoryEntrySchema: z.ZodObject<{
|
|
68
75
|
name: z.ZodString;
|
|
69
76
|
path: z.ZodString;
|
|
@@ -3898,6 +3905,7 @@ declare const coreMethods: {
|
|
|
3898
3905
|
hostname: z.ZodString;
|
|
3899
3906
|
platform: z.ZodString;
|
|
3900
3907
|
hostVersion: z.ZodString;
|
|
3908
|
+
protocol: z.ZodOptional<z.ZodNumber>;
|
|
3901
3909
|
home: z.ZodOptional<z.ZodString>;
|
|
3902
3910
|
agents: z.ZodArray<z.ZodObject<{
|
|
3903
3911
|
id: z.ZodString;
|
|
@@ -3928,6 +3936,7 @@ declare const coreMethods: {
|
|
|
3928
3936
|
embeddedContext: z.ZodOptional<z.ZodBoolean>;
|
|
3929
3937
|
acp: z.ZodOptional<z.ZodBoolean>;
|
|
3930
3938
|
fork: z.ZodBoolean;
|
|
3939
|
+
side: z.ZodOptional<z.ZodBoolean>;
|
|
3931
3940
|
models: z.ZodBoolean;
|
|
3932
3941
|
modes: z.ZodBoolean;
|
|
3933
3942
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -3941,6 +3950,7 @@ declare const coreMethods: {
|
|
|
3941
3950
|
audio?: boolean | undefined;
|
|
3942
3951
|
embeddedContext?: boolean | undefined;
|
|
3943
3952
|
acp?: boolean | undefined;
|
|
3953
|
+
side?: boolean | undefined;
|
|
3944
3954
|
}, {
|
|
3945
3955
|
interrupt: boolean;
|
|
3946
3956
|
steer: boolean;
|
|
@@ -3952,6 +3962,7 @@ declare const coreMethods: {
|
|
|
3952
3962
|
audio?: boolean | undefined;
|
|
3953
3963
|
embeddedContext?: boolean | undefined;
|
|
3954
3964
|
acp?: boolean | undefined;
|
|
3965
|
+
side?: boolean | undefined;
|
|
3955
3966
|
}>;
|
|
3956
3967
|
}, "strip", z.ZodTypeAny, {
|
|
3957
3968
|
id: string;
|
|
@@ -3969,6 +3980,7 @@ declare const coreMethods: {
|
|
|
3969
3980
|
audio?: boolean | undefined;
|
|
3970
3981
|
embeddedContext?: boolean | undefined;
|
|
3971
3982
|
acp?: boolean | undefined;
|
|
3983
|
+
side?: boolean | undefined;
|
|
3972
3984
|
};
|
|
3973
3985
|
version?: string | undefined;
|
|
3974
3986
|
problem?: string | undefined;
|
|
@@ -3993,6 +4005,7 @@ declare const coreMethods: {
|
|
|
3993
4005
|
audio?: boolean | undefined;
|
|
3994
4006
|
embeddedContext?: boolean | undefined;
|
|
3995
4007
|
acp?: boolean | undefined;
|
|
4008
|
+
side?: boolean | undefined;
|
|
3996
4009
|
};
|
|
3997
4010
|
version?: string | undefined;
|
|
3998
4011
|
problem?: string | undefined;
|
|
@@ -4027,6 +4040,7 @@ declare const coreMethods: {
|
|
|
4027
4040
|
audio?: boolean | undefined;
|
|
4028
4041
|
embeddedContext?: boolean | undefined;
|
|
4029
4042
|
acp?: boolean | undefined;
|
|
4043
|
+
side?: boolean | undefined;
|
|
4030
4044
|
};
|
|
4031
4045
|
version?: string | undefined;
|
|
4032
4046
|
problem?: string | undefined;
|
|
@@ -4040,6 +4054,7 @@ declare const coreMethods: {
|
|
|
4040
4054
|
hostname: string;
|
|
4041
4055
|
platform: string;
|
|
4042
4056
|
hostVersion: string;
|
|
4057
|
+
protocol?: number | undefined;
|
|
4043
4058
|
home?: string | undefined;
|
|
4044
4059
|
direct?: {
|
|
4045
4060
|
iceServers: string[];
|
|
@@ -4062,6 +4077,7 @@ declare const coreMethods: {
|
|
|
4062
4077
|
audio?: boolean | undefined;
|
|
4063
4078
|
embeddedContext?: boolean | undefined;
|
|
4064
4079
|
acp?: boolean | undefined;
|
|
4080
|
+
side?: boolean | undefined;
|
|
4065
4081
|
};
|
|
4066
4082
|
version?: string | undefined;
|
|
4067
4083
|
problem?: string | undefined;
|
|
@@ -4075,6 +4091,7 @@ declare const coreMethods: {
|
|
|
4075
4091
|
hostname: string;
|
|
4076
4092
|
platform: string;
|
|
4077
4093
|
hostVersion: string;
|
|
4094
|
+
protocol?: number | undefined;
|
|
4078
4095
|
home?: string | undefined;
|
|
4079
4096
|
direct?: {
|
|
4080
4097
|
iceServers: string[];
|
|
@@ -21675,6 +21692,223 @@ declare const coreMethods: {
|
|
|
21675
21692
|
}[];
|
|
21676
21693
|
}>;
|
|
21677
21694
|
};
|
|
21695
|
+
/**
|
|
21696
|
+
* Asks in a side conversation of the session (a new one without `sideId`):
|
|
21697
|
+
* answered from what the session knows, never added to it. Returns once the
|
|
21698
|
+
* question is on its way; the answer comes in `session.side`. Only for an
|
|
21699
|
+
* agent whose capabilities say `side`.
|
|
21700
|
+
*/
|
|
21701
|
+
readonly "sessions.side": {
|
|
21702
|
+
readonly params: z.ZodObject<{
|
|
21703
|
+
sessionId: z.ZodString;
|
|
21704
|
+
sideId: z.ZodOptional<z.ZodString>;
|
|
21705
|
+
text: z.ZodString;
|
|
21706
|
+
}, "strip", z.ZodTypeAny, {
|
|
21707
|
+
text: string;
|
|
21708
|
+
sessionId: string;
|
|
21709
|
+
sideId?: string | undefined;
|
|
21710
|
+
}, {
|
|
21711
|
+
text: string;
|
|
21712
|
+
sessionId: string;
|
|
21713
|
+
sideId?: string | undefined;
|
|
21714
|
+
}>;
|
|
21715
|
+
readonly result: z.ZodObject<{
|
|
21716
|
+
side: z.ZodObject<{
|
|
21717
|
+
sideId: z.ZodString;
|
|
21718
|
+
createdAt: z.ZodNumber;
|
|
21719
|
+
running: z.ZodBoolean;
|
|
21720
|
+
revision: z.ZodNumber;
|
|
21721
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
21722
|
+
id: z.ZodString;
|
|
21723
|
+
role: z.ZodEnum<["user", "assistant"]>;
|
|
21724
|
+
text: z.ZodString;
|
|
21725
|
+
activity: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
21726
|
+
error: z.ZodOptional<z.ZodString>;
|
|
21727
|
+
}, "strip", z.ZodTypeAny, {
|
|
21728
|
+
text: string;
|
|
21729
|
+
id: string;
|
|
21730
|
+
role: "user" | "assistant";
|
|
21731
|
+
error?: string | undefined;
|
|
21732
|
+
activity?: string[] | undefined;
|
|
21733
|
+
}, {
|
|
21734
|
+
text: string;
|
|
21735
|
+
id: string;
|
|
21736
|
+
role: "user" | "assistant";
|
|
21737
|
+
error?: string | undefined;
|
|
21738
|
+
activity?: string[] | undefined;
|
|
21739
|
+
}>, "many">;
|
|
21740
|
+
}, "strip", z.ZodTypeAny, {
|
|
21741
|
+
running: boolean;
|
|
21742
|
+
createdAt: number;
|
|
21743
|
+
sideId: string;
|
|
21744
|
+
revision: number;
|
|
21745
|
+
messages: {
|
|
21746
|
+
text: string;
|
|
21747
|
+
id: string;
|
|
21748
|
+
role: "user" | "assistant";
|
|
21749
|
+
error?: string | undefined;
|
|
21750
|
+
activity?: string[] | undefined;
|
|
21751
|
+
}[];
|
|
21752
|
+
}, {
|
|
21753
|
+
running: boolean;
|
|
21754
|
+
createdAt: number;
|
|
21755
|
+
sideId: string;
|
|
21756
|
+
revision: number;
|
|
21757
|
+
messages: {
|
|
21758
|
+
text: string;
|
|
21759
|
+
id: string;
|
|
21760
|
+
role: "user" | "assistant";
|
|
21761
|
+
error?: string | undefined;
|
|
21762
|
+
activity?: string[] | undefined;
|
|
21763
|
+
}[];
|
|
21764
|
+
}>;
|
|
21765
|
+
}, "strip", z.ZodTypeAny, {
|
|
21766
|
+
side: {
|
|
21767
|
+
running: boolean;
|
|
21768
|
+
createdAt: number;
|
|
21769
|
+
sideId: string;
|
|
21770
|
+
revision: number;
|
|
21771
|
+
messages: {
|
|
21772
|
+
text: string;
|
|
21773
|
+
id: string;
|
|
21774
|
+
role: "user" | "assistant";
|
|
21775
|
+
error?: string | undefined;
|
|
21776
|
+
activity?: string[] | undefined;
|
|
21777
|
+
}[];
|
|
21778
|
+
};
|
|
21779
|
+
}, {
|
|
21780
|
+
side: {
|
|
21781
|
+
running: boolean;
|
|
21782
|
+
createdAt: number;
|
|
21783
|
+
sideId: string;
|
|
21784
|
+
revision: number;
|
|
21785
|
+
messages: {
|
|
21786
|
+
text: string;
|
|
21787
|
+
id: string;
|
|
21788
|
+
role: "user" | "assistant";
|
|
21789
|
+
error?: string | undefined;
|
|
21790
|
+
activity?: string[] | undefined;
|
|
21791
|
+
}[];
|
|
21792
|
+
};
|
|
21793
|
+
}>;
|
|
21794
|
+
};
|
|
21795
|
+
/** The session's open side conversations, oldest first. */
|
|
21796
|
+
readonly "sessions.sides": {
|
|
21797
|
+
readonly params: z.ZodObject<{
|
|
21798
|
+
sessionId: z.ZodString;
|
|
21799
|
+
}, "strip", z.ZodTypeAny, {
|
|
21800
|
+
sessionId: string;
|
|
21801
|
+
}, {
|
|
21802
|
+
sessionId: string;
|
|
21803
|
+
}>;
|
|
21804
|
+
readonly result: z.ZodObject<{
|
|
21805
|
+
sides: z.ZodArray<z.ZodObject<{
|
|
21806
|
+
sideId: z.ZodString;
|
|
21807
|
+
createdAt: z.ZodNumber;
|
|
21808
|
+
running: z.ZodBoolean;
|
|
21809
|
+
revision: z.ZodNumber;
|
|
21810
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
21811
|
+
id: z.ZodString;
|
|
21812
|
+
role: z.ZodEnum<["user", "assistant"]>;
|
|
21813
|
+
text: z.ZodString;
|
|
21814
|
+
activity: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
21815
|
+
error: z.ZodOptional<z.ZodString>;
|
|
21816
|
+
}, "strip", z.ZodTypeAny, {
|
|
21817
|
+
text: string;
|
|
21818
|
+
id: string;
|
|
21819
|
+
role: "user" | "assistant";
|
|
21820
|
+
error?: string | undefined;
|
|
21821
|
+
activity?: string[] | undefined;
|
|
21822
|
+
}, {
|
|
21823
|
+
text: string;
|
|
21824
|
+
id: string;
|
|
21825
|
+
role: "user" | "assistant";
|
|
21826
|
+
error?: string | undefined;
|
|
21827
|
+
activity?: string[] | undefined;
|
|
21828
|
+
}>, "many">;
|
|
21829
|
+
}, "strip", z.ZodTypeAny, {
|
|
21830
|
+
running: boolean;
|
|
21831
|
+
createdAt: number;
|
|
21832
|
+
sideId: string;
|
|
21833
|
+
revision: number;
|
|
21834
|
+
messages: {
|
|
21835
|
+
text: string;
|
|
21836
|
+
id: string;
|
|
21837
|
+
role: "user" | "assistant";
|
|
21838
|
+
error?: string | undefined;
|
|
21839
|
+
activity?: string[] | undefined;
|
|
21840
|
+
}[];
|
|
21841
|
+
}, {
|
|
21842
|
+
running: boolean;
|
|
21843
|
+
createdAt: number;
|
|
21844
|
+
sideId: string;
|
|
21845
|
+
revision: number;
|
|
21846
|
+
messages: {
|
|
21847
|
+
text: string;
|
|
21848
|
+
id: string;
|
|
21849
|
+
role: "user" | "assistant";
|
|
21850
|
+
error?: string | undefined;
|
|
21851
|
+
activity?: string[] | undefined;
|
|
21852
|
+
}[];
|
|
21853
|
+
}>, "many">;
|
|
21854
|
+
}, "strip", z.ZodTypeAny, {
|
|
21855
|
+
sides: {
|
|
21856
|
+
running: boolean;
|
|
21857
|
+
createdAt: number;
|
|
21858
|
+
sideId: string;
|
|
21859
|
+
revision: number;
|
|
21860
|
+
messages: {
|
|
21861
|
+
text: string;
|
|
21862
|
+
id: string;
|
|
21863
|
+
role: "user" | "assistant";
|
|
21864
|
+
error?: string | undefined;
|
|
21865
|
+
activity?: string[] | undefined;
|
|
21866
|
+
}[];
|
|
21867
|
+
}[];
|
|
21868
|
+
}, {
|
|
21869
|
+
sides: {
|
|
21870
|
+
running: boolean;
|
|
21871
|
+
createdAt: number;
|
|
21872
|
+
sideId: string;
|
|
21873
|
+
revision: number;
|
|
21874
|
+
messages: {
|
|
21875
|
+
text: string;
|
|
21876
|
+
id: string;
|
|
21877
|
+
role: "user" | "assistant";
|
|
21878
|
+
error?: string | undefined;
|
|
21879
|
+
activity?: string[] | undefined;
|
|
21880
|
+
}[];
|
|
21881
|
+
}[];
|
|
21882
|
+
}>;
|
|
21883
|
+
};
|
|
21884
|
+
/** Stops the answer under way. */
|
|
21885
|
+
readonly "sessions.sideCancel": {
|
|
21886
|
+
readonly params: z.ZodObject<{
|
|
21887
|
+
sessionId: z.ZodString;
|
|
21888
|
+
sideId: z.ZodString;
|
|
21889
|
+
}, "strip", z.ZodTypeAny, {
|
|
21890
|
+
sessionId: string;
|
|
21891
|
+
sideId: string;
|
|
21892
|
+
}, {
|
|
21893
|
+
sessionId: string;
|
|
21894
|
+
sideId: string;
|
|
21895
|
+
}>;
|
|
21896
|
+
readonly result: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
|
|
21897
|
+
};
|
|
21898
|
+
/** Ends a side conversation: it is forgotten, and whatever the agent kept for it let go. */
|
|
21899
|
+
readonly "sessions.sideClose": {
|
|
21900
|
+
readonly params: z.ZodObject<{
|
|
21901
|
+
sessionId: z.ZodString;
|
|
21902
|
+
sideId: z.ZodString;
|
|
21903
|
+
}, "strip", z.ZodTypeAny, {
|
|
21904
|
+
sessionId: string;
|
|
21905
|
+
sideId: string;
|
|
21906
|
+
}, {
|
|
21907
|
+
sessionId: string;
|
|
21908
|
+
sideId: string;
|
|
21909
|
+
}>;
|
|
21910
|
+
readonly result: z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>;
|
|
21911
|
+
};
|
|
21678
21912
|
/** The commands this session left running in the background, and the ones that have ended; newest first. */
|
|
21679
21913
|
readonly "sessions.tasks": {
|
|
21680
21914
|
readonly params: z.ZodObject<{
|
|
@@ -25570,9 +25804,9 @@ declare const coreMethods: {
|
|
|
25570
25804
|
revision?: string | undefined;
|
|
25571
25805
|
}, {
|
|
25572
25806
|
path: string;
|
|
25807
|
+
revision?: string | undefined;
|
|
25573
25808
|
offset?: number | undefined;
|
|
25574
25809
|
maxBytes?: number | undefined;
|
|
25575
|
-
revision?: string | undefined;
|
|
25576
25810
|
}>;
|
|
25577
25811
|
readonly result: z.ZodObject<{
|
|
25578
25812
|
size: z.ZodNumber;
|
|
@@ -25583,14 +25817,14 @@ declare const coreMethods: {
|
|
|
25583
25817
|
}, "strip", z.ZodTypeAny, {
|
|
25584
25818
|
data: string;
|
|
25585
25819
|
size: number;
|
|
25586
|
-
nextOffset: number;
|
|
25587
25820
|
revision: string;
|
|
25821
|
+
nextOffset: number;
|
|
25588
25822
|
done: boolean;
|
|
25589
25823
|
}, {
|
|
25590
25824
|
data: string;
|
|
25591
25825
|
size: number;
|
|
25592
|
-
nextOffset: number;
|
|
25593
25826
|
revision: string;
|
|
25827
|
+
nextOffset: number;
|
|
25594
25828
|
done: boolean;
|
|
25595
25829
|
}>;
|
|
25596
25830
|
};
|
|
@@ -26361,6 +26595,7 @@ export declare const notifications: {
|
|
|
26361
26595
|
embeddedContext: z.ZodOptional<z.ZodBoolean>;
|
|
26362
26596
|
acp: z.ZodOptional<z.ZodBoolean>;
|
|
26363
26597
|
fork: z.ZodBoolean;
|
|
26598
|
+
side: z.ZodOptional<z.ZodBoolean>;
|
|
26364
26599
|
models: z.ZodBoolean;
|
|
26365
26600
|
modes: z.ZodBoolean;
|
|
26366
26601
|
}, "strip", z.ZodTypeAny, {
|
|
@@ -26374,6 +26609,7 @@ export declare const notifications: {
|
|
|
26374
26609
|
audio?: boolean | undefined;
|
|
26375
26610
|
embeddedContext?: boolean | undefined;
|
|
26376
26611
|
acp?: boolean | undefined;
|
|
26612
|
+
side?: boolean | undefined;
|
|
26377
26613
|
}, {
|
|
26378
26614
|
interrupt: boolean;
|
|
26379
26615
|
steer: boolean;
|
|
@@ -26385,6 +26621,7 @@ export declare const notifications: {
|
|
|
26385
26621
|
audio?: boolean | undefined;
|
|
26386
26622
|
embeddedContext?: boolean | undefined;
|
|
26387
26623
|
acp?: boolean | undefined;
|
|
26624
|
+
side?: boolean | undefined;
|
|
26388
26625
|
}>;
|
|
26389
26626
|
}, "strip", z.ZodTypeAny, {
|
|
26390
26627
|
id: string;
|
|
@@ -26402,6 +26639,7 @@ export declare const notifications: {
|
|
|
26402
26639
|
audio?: boolean | undefined;
|
|
26403
26640
|
embeddedContext?: boolean | undefined;
|
|
26404
26641
|
acp?: boolean | undefined;
|
|
26642
|
+
side?: boolean | undefined;
|
|
26405
26643
|
};
|
|
26406
26644
|
version?: string | undefined;
|
|
26407
26645
|
problem?: string | undefined;
|
|
@@ -26426,6 +26664,7 @@ export declare const notifications: {
|
|
|
26426
26664
|
audio?: boolean | undefined;
|
|
26427
26665
|
embeddedContext?: boolean | undefined;
|
|
26428
26666
|
acp?: boolean | undefined;
|
|
26667
|
+
side?: boolean | undefined;
|
|
26429
26668
|
};
|
|
26430
26669
|
version?: string | undefined;
|
|
26431
26670
|
problem?: string | undefined;
|
|
@@ -26452,6 +26691,7 @@ export declare const notifications: {
|
|
|
26452
26691
|
audio?: boolean | undefined;
|
|
26453
26692
|
embeddedContext?: boolean | undefined;
|
|
26454
26693
|
acp?: boolean | undefined;
|
|
26694
|
+
side?: boolean | undefined;
|
|
26455
26695
|
};
|
|
26456
26696
|
version?: string | undefined;
|
|
26457
26697
|
problem?: string | undefined;
|
|
@@ -26478,6 +26718,7 @@ export declare const notifications: {
|
|
|
26478
26718
|
audio?: boolean | undefined;
|
|
26479
26719
|
embeddedContext?: boolean | undefined;
|
|
26480
26720
|
acp?: boolean | undefined;
|
|
26721
|
+
side?: boolean | undefined;
|
|
26481
26722
|
};
|
|
26482
26723
|
version?: string | undefined;
|
|
26483
26724
|
problem?: string | undefined;
|
|
@@ -33254,6 +33495,92 @@ export declare const notifications: {
|
|
|
33254
33495
|
} | undefined;
|
|
33255
33496
|
};
|
|
33256
33497
|
}>;
|
|
33498
|
+
/** A side conversation changed (to every client), or ended (`closed`). */
|
|
33499
|
+
readonly "session.side": z.ZodObject<{
|
|
33500
|
+
sessionId: z.ZodString;
|
|
33501
|
+
side: z.ZodObject<{
|
|
33502
|
+
sideId: z.ZodString;
|
|
33503
|
+
createdAt: z.ZodNumber;
|
|
33504
|
+
running: z.ZodBoolean;
|
|
33505
|
+
revision: z.ZodNumber;
|
|
33506
|
+
messages: z.ZodArray<z.ZodObject<{
|
|
33507
|
+
id: z.ZodString;
|
|
33508
|
+
role: z.ZodEnum<["user", "assistant"]>;
|
|
33509
|
+
text: z.ZodString;
|
|
33510
|
+
activity: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
33511
|
+
error: z.ZodOptional<z.ZodString>;
|
|
33512
|
+
}, "strip", z.ZodTypeAny, {
|
|
33513
|
+
text: string;
|
|
33514
|
+
id: string;
|
|
33515
|
+
role: "user" | "assistant";
|
|
33516
|
+
error?: string | undefined;
|
|
33517
|
+
activity?: string[] | undefined;
|
|
33518
|
+
}, {
|
|
33519
|
+
text: string;
|
|
33520
|
+
id: string;
|
|
33521
|
+
role: "user" | "assistant";
|
|
33522
|
+
error?: string | undefined;
|
|
33523
|
+
activity?: string[] | undefined;
|
|
33524
|
+
}>, "many">;
|
|
33525
|
+
}, "strip", z.ZodTypeAny, {
|
|
33526
|
+
running: boolean;
|
|
33527
|
+
createdAt: number;
|
|
33528
|
+
sideId: string;
|
|
33529
|
+
revision: number;
|
|
33530
|
+
messages: {
|
|
33531
|
+
text: string;
|
|
33532
|
+
id: string;
|
|
33533
|
+
role: "user" | "assistant";
|
|
33534
|
+
error?: string | undefined;
|
|
33535
|
+
activity?: string[] | undefined;
|
|
33536
|
+
}[];
|
|
33537
|
+
}, {
|
|
33538
|
+
running: boolean;
|
|
33539
|
+
createdAt: number;
|
|
33540
|
+
sideId: string;
|
|
33541
|
+
revision: number;
|
|
33542
|
+
messages: {
|
|
33543
|
+
text: string;
|
|
33544
|
+
id: string;
|
|
33545
|
+
role: "user" | "assistant";
|
|
33546
|
+
error?: string | undefined;
|
|
33547
|
+
activity?: string[] | undefined;
|
|
33548
|
+
}[];
|
|
33549
|
+
}>;
|
|
33550
|
+
closed: z.ZodOptional<z.ZodBoolean>;
|
|
33551
|
+
}, "strip", z.ZodTypeAny, {
|
|
33552
|
+
sessionId: string;
|
|
33553
|
+
side: {
|
|
33554
|
+
running: boolean;
|
|
33555
|
+
createdAt: number;
|
|
33556
|
+
sideId: string;
|
|
33557
|
+
revision: number;
|
|
33558
|
+
messages: {
|
|
33559
|
+
text: string;
|
|
33560
|
+
id: string;
|
|
33561
|
+
role: "user" | "assistant";
|
|
33562
|
+
error?: string | undefined;
|
|
33563
|
+
activity?: string[] | undefined;
|
|
33564
|
+
}[];
|
|
33565
|
+
};
|
|
33566
|
+
closed?: boolean | undefined;
|
|
33567
|
+
}, {
|
|
33568
|
+
sessionId: string;
|
|
33569
|
+
side: {
|
|
33570
|
+
running: boolean;
|
|
33571
|
+
createdAt: number;
|
|
33572
|
+
sideId: string;
|
|
33573
|
+
revision: number;
|
|
33574
|
+
messages: {
|
|
33575
|
+
text: string;
|
|
33576
|
+
id: string;
|
|
33577
|
+
role: "user" | "assistant";
|
|
33578
|
+
error?: string | undefined;
|
|
33579
|
+
activity?: string[] | undefined;
|
|
33580
|
+
}[];
|
|
33581
|
+
};
|
|
33582
|
+
closed?: boolean | undefined;
|
|
33583
|
+
}>;
|
|
33257
33584
|
/** A session was deleted (from any device, or natively by the agent). */
|
|
33258
33585
|
readonly "session.removed": z.ZodObject<{
|
|
33259
33586
|
sessionId: z.ZodString;
|
package/dist/wire/src/rpc.js
CHANGED
|
@@ -6,6 +6,7 @@ import { editorRequestSchema, editorResultSchema } from "./editor.js";
|
|
|
6
6
|
import { liveActivityIdSchema, liveActivitySubscriptionSchema } from "./live-activity.js";
|
|
7
7
|
import { backgroundTaskSchema, agentInfoSchema, gatewayStatusSchema, machineInfoSchema, portInfoSchema, projectSummarySchema, terminalInfoSchema, sessionDriverSchema, sessionSummarySchema, subagentInfoSchema, gitInfoSchema, worktreeEntrySchema, questionAnswerSchema, pendingPermissionSchema, } from "./model.js";
|
|
8
8
|
import { contentBlockSchema, sessionEventSchema, sessionNoticeSchema } from "./updates.js";
|
|
9
|
+
import { sideChatSchema } from "./side.js";
|
|
9
10
|
// ── JSON-RPC 2.0 framing ─────────────────────────────────────────────
|
|
10
11
|
export const rpcIdSchema = z.union([z.string(), z.number()]);
|
|
11
12
|
export const rpcErrorSchema = z.object({
|
|
@@ -40,6 +41,13 @@ export const RPC_INVALID_PARAMS = -32602;
|
|
|
40
41
|
export const RPC_METHOD_NOT_FOUND = -32601;
|
|
41
42
|
export const RPC_APP_ERROR = -32000;
|
|
42
43
|
// ── Methods (client → host) ──────────────────────────────────────────
|
|
44
|
+
/**
|
|
45
|
+
* The host's RPC revision, in `machine.info`. Goes up when the host gains
|
|
46
|
+
* methods or notifications an app may rely on, so an app can tell the
|
|
47
|
+
* computer is older than itself and say so (an absent revision is 0).
|
|
48
|
+
* 1: side conversations (`sessions.side`), `machine.info.protocol` itself.
|
|
49
|
+
*/
|
|
50
|
+
export const HOST_PROTOCOL = 1;
|
|
43
51
|
const empty = z.object({}).passthrough();
|
|
44
52
|
export const directoryEntrySchema = z.object({
|
|
45
53
|
name: z.string(),
|
|
@@ -187,6 +195,31 @@ const coreMethods = {
|
|
|
187
195
|
params: z.object({ sessionId: z.string().min(1), toolCallId: z.string().min(1), lazyImages: z.boolean().optional() }),
|
|
188
196
|
result: z.object({ events: z.array(sessionEventSchema) }),
|
|
189
197
|
},
|
|
198
|
+
/**
|
|
199
|
+
* Asks in a side conversation of the session (a new one without `sideId`):
|
|
200
|
+
* answered from what the session knows, never added to it. Returns once the
|
|
201
|
+
* question is on its way; the answer comes in `session.side`. Only for an
|
|
202
|
+
* agent whose capabilities say `side`.
|
|
203
|
+
*/
|
|
204
|
+
"sessions.side": {
|
|
205
|
+
params: z.object({ sessionId: z.string().min(1), sideId: z.string().min(1).optional(), text: z.string().min(1).max(20_000) }),
|
|
206
|
+
result: z.object({ side: sideChatSchema }),
|
|
207
|
+
},
|
|
208
|
+
/** The session's open side conversations, oldest first. */
|
|
209
|
+
"sessions.sides": {
|
|
210
|
+
params: z.object({ sessionId: z.string().min(1) }),
|
|
211
|
+
result: z.object({ sides: z.array(sideChatSchema) }),
|
|
212
|
+
},
|
|
213
|
+
/** Stops the answer under way. */
|
|
214
|
+
"sessions.sideCancel": {
|
|
215
|
+
params: z.object({ sessionId: z.string().min(1), sideId: z.string().min(1) }),
|
|
216
|
+
result: empty,
|
|
217
|
+
},
|
|
218
|
+
/** Ends a side conversation: it is forgotten, and whatever the agent kept for it let go. */
|
|
219
|
+
"sessions.sideClose": {
|
|
220
|
+
params: z.object({ sessionId: z.string().min(1), sideId: z.string().min(1) }),
|
|
221
|
+
result: empty,
|
|
222
|
+
},
|
|
190
223
|
/** The commands this session left running in the background, and the ones that have ended; newest first. */
|
|
191
224
|
"sessions.tasks": {
|
|
192
225
|
params: z.object({ sessionId: z.string().min(1) }),
|
|
@@ -651,6 +684,8 @@ export const notifications = {
|
|
|
651
684
|
*/
|
|
652
685
|
"session.window": z.object({ sessionId: z.string(), startSeq: z.number().int().nonnegative() }),
|
|
653
686
|
"session.summary": z.object({ session: sessionSummarySchema }),
|
|
687
|
+
/** A side conversation changed (to every client), or ended (`closed`). */
|
|
688
|
+
"session.side": z.object({ sessionId: z.string(), side: sideChatSchema, closed: z.boolean().optional() }),
|
|
654
689
|
/** A session was deleted (from any device, or natively by the agent). */
|
|
655
690
|
"session.removed": z.object({ sessionId: z.string() }),
|
|
656
691
|
"session.preview.show": z.object({ sessionId: z.string() }),
|