@bobannomi/app-host 0.1.1 → 0.3.0
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/README.md +16 -11
- package/dist/index.d.ts +357 -170
- package/dist/index.js +492 -211
- package/dist/index.js.map +3 -3
- package/dist/protocol.d.ts +512 -321
- package/dist/protocol.js +358 -303
- package/dist/protocol.js.map +3 -3
- package/package.json +4 -9
- package/dist/node/service-host.d.ts +0 -1447
- package/dist/node/service-host.js +0 -1408
- package/dist/node/service-host.js.map +0 -6
package/dist/index.d.ts
CHANGED
|
@@ -23,6 +23,8 @@ declare const APP_HOST_ERROR_RETRY: {
|
|
|
23
23
|
readonly resource_revision_conflict: "query";
|
|
24
24
|
readonly request_conflict: "never";
|
|
25
25
|
readonly cursor_stale: "query";
|
|
26
|
+
readonly model_provider_not_configured: "never";
|
|
27
|
+
readonly model_not_configured: "never";
|
|
26
28
|
};
|
|
27
29
|
type AppHostErrorCode = keyof typeof APP_HOST_ERROR_RETRY;
|
|
28
30
|
type AppHostRetry = "safe" | "never" | "query";
|
|
@@ -45,26 +47,7 @@ declare class AppHostError extends Error {
|
|
|
45
47
|
});
|
|
46
48
|
}
|
|
47
49
|
|
|
48
|
-
|
|
49
|
-
state: "absent" | "unauthorized" | "stopped" | "starting" | "recovering" | "ready" | "failed";
|
|
50
|
-
reason?: "dependency_missing" | "service_start_failed" | "service_unavailable" | "result_unknown" | "incompatible" | "revoked";
|
|
51
|
-
instanceId?: string;
|
|
52
|
-
apiVersion?: string;
|
|
53
|
-
}
|
|
54
|
-
interface ServiceWork {
|
|
55
|
-
requestId: string;
|
|
56
|
-
state: ServiceWorkState;
|
|
57
|
-
updatedAt: string;
|
|
58
|
-
result?: JsonValue$1;
|
|
59
|
-
error?: JsonValue$1;
|
|
60
|
-
}
|
|
61
|
-
interface ServiceConnectionDescriptor {
|
|
62
|
-
connectionId: string;
|
|
63
|
-
baseUrl: string;
|
|
64
|
-
apiVersion: string;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
declare const APP_HOST_FEATURES: readonly ["fetch-v1", "fetch-inline-body-v1", "fetch-target-close-v1", "service-v1", "extended-errors-v1", "workspace-v1", "session-resources-v1", "session-controls-v1", "conversation-creation-session-v1", "trusted-desktop-v1", "attachments-v1", "auxiliary-sessions-v1", "system-ui-v1", "lifecycle-v1", "commands-v1", "resource-catalog-v1", "file-content-v1", "window-chrome-v1", "window-updates-v1", "window-update-check-v1", "embedded-browser-v1", "browser-binding-invalidation-v1", "browser-capture-preview-v1"];
|
|
50
|
+
declare const APP_HOST_FEATURES: readonly ["fetch-v1", "fetch-inline-body-v1", "fetch-target-close-v1", "service-v1", "extended-errors-v1", "workspace-v1", "session-resources-v1", "session-controls-v1", "conversation-creation-session-v1", "trusted-desktop-v1", "attachments-v1", "auxiliary-sessions-v1", "system-ui-v1", "lifecycle-v1", "commands-v1", "resource-catalog-v1", "file-content-v1", "window-chrome-v1", "window-updates-v1", "window-update-check-v1", "embedded-browser-v1", "browser-binding-invalidation-v1", "browser-capture-preview-v1", "workbench-computer-v1"];
|
|
68
51
|
type AppHostFeature = (typeof APP_HOST_FEATURES)[number];
|
|
69
52
|
type FetchDirection = "upload" | "download";
|
|
70
53
|
type PageFetchFrame = {
|
|
@@ -149,7 +132,6 @@ interface SessionConfigurationInput {
|
|
|
149
132
|
pluginAutoSelectionEnabled?: boolean;
|
|
150
133
|
activePluginId?: string | null;
|
|
151
134
|
pluginIds?: string[];
|
|
152
|
-
serviceBindings?: string[];
|
|
153
135
|
memory?: {
|
|
154
136
|
enabled: boolean;
|
|
155
137
|
};
|
|
@@ -248,20 +230,25 @@ declare function validConnection(v: unknown): v is {
|
|
|
248
230
|
baseUrl: string;
|
|
249
231
|
};
|
|
250
232
|
|
|
251
|
-
interface
|
|
233
|
+
interface ConversationCreationOptions {
|
|
252
234
|
dataScopeId: string;
|
|
253
235
|
requestId: string;
|
|
254
236
|
sessionId: string;
|
|
255
|
-
workspaceId?: string;
|
|
256
|
-
outsideProject?: boolean;
|
|
257
|
-
taskLocation: "current" | "worktree";
|
|
258
237
|
configuration: SessionConfigurationInput;
|
|
259
238
|
preparationRevision?: string;
|
|
260
239
|
}
|
|
240
|
+
type WorkspaceConversationCreation = ConversationCreationOptions & ({
|
|
241
|
+
workspaceId: string;
|
|
242
|
+
outsideProject?: never;
|
|
243
|
+
taskLocation: "current" | "worktree";
|
|
244
|
+
} | {
|
|
245
|
+
workspaceId?: never;
|
|
246
|
+
outsideProject: true;
|
|
247
|
+
taskLocation: "current";
|
|
248
|
+
});
|
|
261
249
|
interface WorkspaceConversationResult extends SessionCreationReceipt {
|
|
262
250
|
session?: SessionRecord;
|
|
263
251
|
operationState?: "prepared" | "running" | "completed" | "failed" | "unknown";
|
|
264
|
-
indexBindingPending?: true;
|
|
265
252
|
workspaceId?: string;
|
|
266
253
|
executionRoot?: string;
|
|
267
254
|
privateSessionId?: string;
|
|
@@ -296,6 +283,25 @@ type SessionControlOriginal = {
|
|
|
296
283
|
};
|
|
297
284
|
};
|
|
298
285
|
|
|
286
|
+
interface ServiceStatus {
|
|
287
|
+
state: "absent" | "unauthorized" | "stopped" | "starting" | "recovering" | "ready" | "failed";
|
|
288
|
+
reason?: "dependency_missing" | "service_start_failed" | "service_unavailable" | "result_unknown" | "incompatible" | "revoked";
|
|
289
|
+
instanceId?: string;
|
|
290
|
+
apiVersion?: string;
|
|
291
|
+
}
|
|
292
|
+
interface ServiceWork {
|
|
293
|
+
requestId: string;
|
|
294
|
+
state: ServiceWorkState;
|
|
295
|
+
updatedAt: string;
|
|
296
|
+
result?: JsonValue$1;
|
|
297
|
+
error?: JsonValue$1;
|
|
298
|
+
}
|
|
299
|
+
interface ServiceConnectionDescriptor {
|
|
300
|
+
connectionId: string;
|
|
301
|
+
baseUrl: string;
|
|
302
|
+
apiVersion: string;
|
|
303
|
+
}
|
|
304
|
+
|
|
299
305
|
interface WorkspaceRef {
|
|
300
306
|
id: string;
|
|
301
307
|
displayName: string;
|
|
@@ -326,13 +332,9 @@ interface WorkspaceText {
|
|
|
326
332
|
revision: string;
|
|
327
333
|
}
|
|
328
334
|
|
|
329
|
-
interface
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
original: WorkspaceConversationCreation;
|
|
333
|
-
dataScopeId: string;
|
|
334
|
-
}): Promise<WorkspaceConversationResult>;
|
|
335
|
-
getConversationCreationResult(input: WorkspaceConversationCreation): Promise<WorkspaceConversationResult | null>;
|
|
335
|
+
interface ConversationPreparationGroup {
|
|
336
|
+
create(input: WorkspaceConversationCreation): Promise<WorkspaceConversationResult>;
|
|
337
|
+
getResult(input: WorkspaceConversationCreation): Promise<WorkspaceConversationResult | null>;
|
|
336
338
|
}
|
|
337
339
|
|
|
338
340
|
interface AppCommandSnapshot {
|
|
@@ -445,7 +447,7 @@ interface DesktopTarget {
|
|
|
445
447
|
root?: DesktopRoot;
|
|
446
448
|
sessionId?: string;
|
|
447
449
|
}
|
|
448
|
-
type WorkspaceOperationKind = "files.writeText" | "git.switchBranch" | "git.createBranch"
|
|
450
|
+
type WorkspaceOperationKind = "files.writeText" | "git.switchBranch" | "git.createBranch";
|
|
449
451
|
interface WorkspaceOperation {
|
|
450
452
|
requestId: string;
|
|
451
453
|
kind: WorkspaceOperationKind;
|
|
@@ -461,6 +463,21 @@ interface WorkspaceOperationOriginal {
|
|
|
461
463
|
kind: WorkspaceOperationKind;
|
|
462
464
|
body: JsonValue$1;
|
|
463
465
|
}
|
|
466
|
+
interface FileOperationOriginal {
|
|
467
|
+
kind: "files.writeText";
|
|
468
|
+
body: {
|
|
469
|
+
path: string;
|
|
470
|
+
expectedSha256: string;
|
|
471
|
+
text: string;
|
|
472
|
+
};
|
|
473
|
+
}
|
|
474
|
+
interface GitOperationOriginal {
|
|
475
|
+
kind: "git.switchBranch" | "git.createBranch";
|
|
476
|
+
body: {
|
|
477
|
+
expectedHead: string;
|
|
478
|
+
branch: string;
|
|
479
|
+
};
|
|
480
|
+
}
|
|
464
481
|
interface BindDesktopTarget {
|
|
465
482
|
directory?: string;
|
|
466
483
|
workspaceId?: string;
|
|
@@ -742,7 +759,7 @@ interface PluginAppCatalog {
|
|
|
742
759
|
}[];
|
|
743
760
|
}[];
|
|
744
761
|
}
|
|
745
|
-
type Entry<P, R> = {
|
|
762
|
+
type Entry$1<P, R> = {
|
|
746
763
|
params: P;
|
|
747
764
|
result: R;
|
|
748
765
|
};
|
|
@@ -752,17 +769,21 @@ type Target = {
|
|
|
752
769
|
type Mount = Target & {
|
|
753
770
|
mountId: string;
|
|
754
771
|
};
|
|
755
|
-
type Action = Mount & {
|
|
772
|
+
type Action$1 = Mount & {
|
|
756
773
|
requestId: string;
|
|
757
774
|
expectedRevision: number;
|
|
758
775
|
source: PluginAppSource$1;
|
|
759
776
|
};
|
|
777
|
+
type OperationQuery<Original> = Target & {
|
|
778
|
+
requestId: string;
|
|
779
|
+
original: Original;
|
|
780
|
+
};
|
|
760
781
|
interface DesktopMethodMap {
|
|
761
|
-
"desktop.bindTarget": Entry<Omit<BindDesktopTarget, "connection"> & {
|
|
782
|
+
"desktop.bindTarget": Entry$1<Omit<BindDesktopTarget, "connection"> & {
|
|
762
783
|
connectionId?: string;
|
|
763
784
|
}, DesktopTarget>;
|
|
764
|
-
"desktop.releaseTarget": Entry<Target, void>;
|
|
765
|
-
"desktop.files.listFiles": Entry<Target & {
|
|
785
|
+
"desktop.releaseTarget": Entry$1<Target, void>;
|
|
786
|
+
"desktop.files.listFiles": Entry$1<Target & {
|
|
766
787
|
directory?: string;
|
|
767
788
|
recursive?: boolean;
|
|
768
789
|
}, {
|
|
@@ -772,71 +793,65 @@ interface DesktopMethodMap {
|
|
|
772
793
|
kind: "file" | "directory";
|
|
773
794
|
}[];
|
|
774
795
|
}>;
|
|
775
|
-
"desktop.files.search": Entry<Target & {
|
|
796
|
+
"desktop.files.search": Entry$1<Target & {
|
|
776
797
|
query: string;
|
|
777
798
|
directory?: string;
|
|
778
799
|
limit?: number;
|
|
779
800
|
}, DesktopSearch>;
|
|
780
|
-
"desktop.files.openRead": Entry<Target & {
|
|
801
|
+
"desktop.files.openRead": Entry$1<Target & {
|
|
781
802
|
path: string;
|
|
782
803
|
}, {
|
|
783
804
|
connectionId: string;
|
|
784
805
|
baseUrl: string;
|
|
785
806
|
}>;
|
|
786
|
-
"desktop.files.readText": Entry<Target & {
|
|
807
|
+
"desktop.files.readText": Entry$1<Target & {
|
|
787
808
|
path: string;
|
|
788
809
|
}, DesktopText>;
|
|
789
|
-
"desktop.files.writeText": Entry<Target & {
|
|
790
|
-
requestId: string;
|
|
791
|
-
path: string;
|
|
792
|
-
expectedSha256: string;
|
|
793
|
-
text: string;
|
|
794
|
-
}, WorkspaceOperation>;
|
|
795
|
-
"desktop.files.getOperation": Entry<Target & {
|
|
810
|
+
"desktop.files.writeText": Entry$1<Target & {
|
|
796
811
|
requestId: string;
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
"desktop.files.revealPath": Entry<Target & {
|
|
812
|
+
} & FileOperationOriginal["body"], WorkspaceOperation>;
|
|
813
|
+
"desktop.files.getOperation": Entry$1<OperationQuery<WorkspaceOperationOriginal>, WorkspaceOperation | null>;
|
|
814
|
+
"desktop.files.revealPath": Entry$1<Target & {
|
|
800
815
|
path: string;
|
|
801
816
|
}, void>;
|
|
802
|
-
"desktop.files.listOpeners": Entry<Target, DesktopOpener[]>;
|
|
803
|
-
"desktop.files.openWith": Entry<Target & {
|
|
817
|
+
"desktop.files.listOpeners": Entry$1<Target, DesktopOpener[]>;
|
|
818
|
+
"desktop.files.openWith": Entry$1<Target & {
|
|
804
819
|
path: string;
|
|
805
820
|
openerId: string;
|
|
806
821
|
}, void>;
|
|
807
|
-
"desktop.clipboard.readText": Entry<Target, string>;
|
|
808
|
-
"desktop.clipboard.writeText": Entry<Target & {
|
|
822
|
+
"desktop.clipboard.readText": Entry$1<Target, string>;
|
|
823
|
+
"desktop.clipboard.writeText": Entry$1<Target & {
|
|
809
824
|
text: string;
|
|
810
825
|
}, void>;
|
|
811
|
-
"desktop.clipboard.showTextMenu": Entry<Target & {
|
|
826
|
+
"desktop.clipboard.showTextMenu": Entry$1<Target & {
|
|
812
827
|
editable: boolean;
|
|
813
828
|
hasSelection: boolean;
|
|
814
829
|
}, "copy" | "select-all" | null>;
|
|
815
|
-
"desktop.windows.openExternal": Entry<Target & {
|
|
830
|
+
"desktop.windows.openExternal": Entry$1<Target & {
|
|
816
831
|
url: string;
|
|
817
832
|
}, void>;
|
|
818
|
-
"desktop.windows.getZoom": Entry<Target, {
|
|
833
|
+
"desktop.windows.getZoom": Entry$1<Target, {
|
|
819
834
|
factor: number;
|
|
820
835
|
}>;
|
|
821
|
-
"desktop.windows.setZoom": Entry<Target & {
|
|
836
|
+
"desktop.windows.setZoom": Entry$1<Target & {
|
|
822
837
|
factor: number;
|
|
823
838
|
}, {
|
|
824
839
|
factor: number;
|
|
825
840
|
}>;
|
|
826
|
-
"desktop.windows.edit": Entry<Target & {
|
|
841
|
+
"desktop.windows.edit": Entry$1<Target & {
|
|
827
842
|
action: "undo" | "redo" | "cut" | "copy" | "paste" | "selectAll";
|
|
828
843
|
}, void>;
|
|
829
|
-
"desktop.git.status": Entry<Target, {
|
|
844
|
+
"desktop.git.status": Entry$1<Target, {
|
|
830
845
|
root: string;
|
|
831
846
|
commonDir: string;
|
|
832
847
|
head: string;
|
|
833
848
|
branch: string;
|
|
834
849
|
changes: string[];
|
|
835
850
|
}>;
|
|
836
|
-
"desktop.git.listBranches": Entry<Target, {
|
|
851
|
+
"desktop.git.listBranches": Entry$1<Target, {
|
|
837
852
|
branches: string[];
|
|
838
853
|
}>;
|
|
839
|
-
"desktop.git.changes": Entry<Target & {
|
|
854
|
+
"desktop.git.changes": Entry$1<Target & {
|
|
840
855
|
range?: "uncommitted" | "working" | "staged";
|
|
841
856
|
ignoreWhitespace?: boolean;
|
|
842
857
|
}, {
|
|
@@ -844,7 +859,7 @@ interface DesktopMethodMap {
|
|
|
844
859
|
totalAdditions: number;
|
|
845
860
|
totalDeletions: number;
|
|
846
861
|
}>;
|
|
847
|
-
"desktop.git.diff": Entry<Target & {
|
|
862
|
+
"desktop.git.diff": Entry$1<Target & {
|
|
848
863
|
path?: string;
|
|
849
864
|
base?: string;
|
|
850
865
|
head?: string;
|
|
@@ -854,130 +869,121 @@ interface DesktopMethodMap {
|
|
|
854
869
|
text: string;
|
|
855
870
|
truncated: boolean;
|
|
856
871
|
}>;
|
|
857
|
-
"desktop.git.switchBranch": Entry<Target & {
|
|
858
|
-
requestId: string;
|
|
859
|
-
expectedHead: string;
|
|
860
|
-
branch: string;
|
|
861
|
-
}, WorkspaceOperation>;
|
|
862
|
-
"desktop.git.createBranch": Entry<Target & {
|
|
872
|
+
"desktop.git.switchBranch": Entry$1<Target & {
|
|
863
873
|
requestId: string;
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
}, WorkspaceOperation>;
|
|
867
|
-
"desktop.git.createTaskWorktree": Entry<Target & {
|
|
874
|
+
} & GitOperationOriginal["body"], WorkspaceOperation>;
|
|
875
|
+
"desktop.git.createBranch": Entry$1<Target & {
|
|
868
876
|
requestId: string;
|
|
869
|
-
|
|
870
|
-
|
|
871
|
-
}, WorkspaceOperation>;
|
|
872
|
-
"desktop.terminals.create": Entry<Target & {
|
|
877
|
+
} & GitOperationOriginal["body"], WorkspaceOperation>;
|
|
878
|
+
"desktop.terminals.create": Entry$1<Target & {
|
|
873
879
|
requestId: string;
|
|
874
880
|
cols: number;
|
|
875
881
|
rows: number;
|
|
876
882
|
name?: string;
|
|
877
883
|
}, DesktopTerminal>;
|
|
878
|
-
"desktop.terminals.list": Entry<Target, DesktopTerminalInfo[]>;
|
|
879
|
-
"desktop.terminals.restart": Entry<Target & {
|
|
884
|
+
"desktop.terminals.list": Entry$1<Target, DesktopTerminalInfo[]>;
|
|
885
|
+
"desktop.terminals.restart": Entry$1<Target & {
|
|
880
886
|
terminalId: string;
|
|
881
887
|
requestId: string;
|
|
882
888
|
}, DesktopTerminal>;
|
|
883
|
-
"desktop.terminals.getRequest": Entry<Target & {
|
|
889
|
+
"desktop.terminals.getRequest": Entry$1<Target & {
|
|
884
890
|
requestId: string;
|
|
885
891
|
original: DesktopTerminalRequestOriginal;
|
|
886
892
|
}, DesktopTerminalRequestReceipt>;
|
|
887
|
-
"desktop.terminals.snapshot": Entry<Target & {
|
|
893
|
+
"desktop.terminals.snapshot": Entry$1<Target & {
|
|
888
894
|
terminalId: string;
|
|
889
895
|
after?: number;
|
|
890
896
|
maxChars?: number;
|
|
891
897
|
}, DesktopTerminalSnapshot>;
|
|
892
|
-
"desktop.terminals.subscribe": Entry<Target & {
|
|
898
|
+
"desktop.terminals.subscribe": Entry$1<Target & {
|
|
893
899
|
terminalId: string;
|
|
894
900
|
}, void>;
|
|
895
|
-
"desktop.terminals.write": Entry<Target & {
|
|
901
|
+
"desktop.terminals.write": Entry$1<Target & {
|
|
896
902
|
terminalId: string;
|
|
897
903
|
data: string;
|
|
898
904
|
}, void>;
|
|
899
|
-
"desktop.terminals.resize": Entry<Target & {
|
|
905
|
+
"desktop.terminals.resize": Entry$1<Target & {
|
|
900
906
|
terminalId: string;
|
|
901
907
|
cols: number;
|
|
902
908
|
rows: number;
|
|
903
909
|
}, void>;
|
|
904
|
-
"desktop.terminals.close": Entry<Target & {
|
|
910
|
+
"desktop.terminals.close": Entry$1<Target & {
|
|
905
911
|
terminalId?: string;
|
|
906
912
|
requestId?: string;
|
|
907
913
|
}, void>;
|
|
908
|
-
"desktop.windows.open": Entry<Target & {
|
|
914
|
+
"desktop.windows.open": Entry$1<Target & {
|
|
909
915
|
requestId: string;
|
|
910
916
|
mode: "application" | "content";
|
|
911
917
|
url: string;
|
|
912
918
|
}, DesktopWindow>;
|
|
913
|
-
"desktop.windows.adopt": Entry<Target & {
|
|
919
|
+
"desktop.windows.adopt": Entry$1<Target & {
|
|
914
920
|
requestId: string;
|
|
915
921
|
windowId: number;
|
|
916
922
|
}, DesktopWindow>;
|
|
917
|
-
"desktop.windows.get": Entry<Target & {
|
|
923
|
+
"desktop.windows.get": Entry$1<Target & {
|
|
918
924
|
requestId: string;
|
|
919
925
|
}, DesktopWindow | null>;
|
|
920
|
-
"desktop.windows.close": Entry<Target & {
|
|
926
|
+
"desktop.windows.close": Entry$1<Target & {
|
|
921
927
|
requestId: string;
|
|
922
928
|
}, DesktopWindow>;
|
|
923
|
-
"desktop.windows.setAlwaysOnTop": Entry<Target & {
|
|
929
|
+
"desktop.windows.setAlwaysOnTop": Entry$1<Target & {
|
|
924
930
|
requestId?: string;
|
|
925
931
|
alwaysOnTop: boolean;
|
|
926
932
|
}, {
|
|
927
933
|
alwaysOnTop: boolean;
|
|
928
934
|
}>;
|
|
929
|
-
"desktop.windows.focus": Entry<Target & {
|
|
935
|
+
"desktop.windows.focus": Entry$1<Target & {
|
|
930
936
|
requestId?: string;
|
|
931
937
|
}, {
|
|
932
938
|
focused: boolean;
|
|
933
939
|
visible: boolean;
|
|
934
940
|
minimized: boolean;
|
|
935
941
|
}>;
|
|
936
|
-
"desktop.browser.register": Entry<Target & {
|
|
942
|
+
"desktop.browser.register": Entry$1<Target & {
|
|
937
943
|
tabId: string;
|
|
938
944
|
guestId: number;
|
|
939
945
|
}, BrowserAnnotationSnapshot>;
|
|
940
|
-
"desktop.browser.openLocalFile": Entry<Target & {
|
|
946
|
+
"desktop.browser.openLocalFile": Entry$1<Target & {
|
|
941
947
|
path: string;
|
|
942
948
|
}, {
|
|
943
949
|
url: string;
|
|
944
950
|
}>;
|
|
945
|
-
"desktop.browser.unregister": Entry<Target & {
|
|
951
|
+
"desktop.browser.unregister": Entry$1<Target & {
|
|
946
952
|
tabId: string;
|
|
947
953
|
}, void>;
|
|
948
|
-
"desktop.browser.setActive": Entry<Target & {
|
|
954
|
+
"desktop.browser.setActive": Entry$1<Target & {
|
|
949
955
|
tabId: string;
|
|
950
956
|
}, void>;
|
|
951
|
-
"desktop.browser.readAnnotations": Entry<BrowserPage, BrowserAnnotationSnapshot>;
|
|
952
|
-
"desktop.browser.setAnnotationMode": Entry<BrowserPage & {
|
|
957
|
+
"desktop.browser.readAnnotations": Entry$1<BrowserPage, BrowserAnnotationSnapshot>;
|
|
958
|
+
"desktop.browser.setAnnotationMode": Entry$1<BrowserPage & {
|
|
953
959
|
mode: AnnotationMode;
|
|
954
960
|
}, BrowserAnnotationSnapshot>;
|
|
955
|
-
"desktop.browser.addAnnotation": Entry<BrowserPage & {
|
|
961
|
+
"desktop.browser.addAnnotation": Entry$1<BrowserPage & {
|
|
956
962
|
selectionId: string;
|
|
957
963
|
comment: string;
|
|
958
964
|
}, BrowserAnnotationSnapshot>;
|
|
959
|
-
"desktop.browser.focusAnnotation": Entry<BrowserPage & {
|
|
965
|
+
"desktop.browser.focusAnnotation": Entry$1<BrowserPage & {
|
|
960
966
|
annotationId: string;
|
|
961
967
|
}, BrowserAnnotationSnapshot>;
|
|
962
|
-
"desktop.browser.removeAnnotation": Entry<BrowserPage & {
|
|
968
|
+
"desktop.browser.removeAnnotation": Entry$1<BrowserPage & {
|
|
963
969
|
annotationId: string;
|
|
964
970
|
}, BrowserAnnotationSnapshot>;
|
|
965
|
-
"desktop.browser.capturePreview": Entry<BrowserPage, {
|
|
971
|
+
"desktop.browser.capturePreview": Entry$1<BrowserPage, {
|
|
966
972
|
bytes: Uint8Array<ArrayBuffer>;
|
|
967
973
|
width: number;
|
|
968
974
|
height: number;
|
|
969
975
|
}>;
|
|
970
|
-
"desktop.pluginApps.catalog": Entry<Target, PluginAppCatalog>;
|
|
971
|
-
"desktop.pluginApps.composerContext": Entry<Target & {
|
|
976
|
+
"desktop.pluginApps.catalog": Entry$1<Target, PluginAppCatalog>;
|
|
977
|
+
"desktop.pluginApps.composerContext": Entry$1<Target & {
|
|
972
978
|
contextIds: string[];
|
|
973
979
|
}, PluginAppComposerContext[]>;
|
|
974
|
-
"desktop.pluginApps.open": Entry<Target & {
|
|
980
|
+
"desktop.pluginApps.open": Entry$1<Target & {
|
|
975
981
|
requestId: string;
|
|
976
982
|
pluginId: string;
|
|
977
983
|
surfaceId: string;
|
|
978
984
|
expectedRevision?: number;
|
|
979
985
|
}, PluginAppMount>;
|
|
980
|
-
"desktop.pluginApps.openToolResult": Entry<Target & {
|
|
986
|
+
"desktop.pluginApps.openToolResult": Entry$1<Target & {
|
|
981
987
|
sourcePartId: string;
|
|
982
988
|
}, {
|
|
983
989
|
mounted: PluginAppMount;
|
|
@@ -988,29 +994,29 @@ interface DesktopMethodMap {
|
|
|
988
994
|
dataError?: string;
|
|
989
995
|
};
|
|
990
996
|
}>;
|
|
991
|
-
"desktop.pluginApps.mount": Entry<Target & {
|
|
997
|
+
"desktop.pluginApps.mount": Entry$1<Target & {
|
|
992
998
|
source: PluginAppSource$1;
|
|
993
999
|
}, PluginAppMount>;
|
|
994
|
-
"desktop.pluginApps.refresh": Entry<Mount, PluginAppHostState>;
|
|
995
|
-
"desktop.pluginApps.rejectMenuOpen": Entry<Mount & {
|
|
1000
|
+
"desktop.pluginApps.refresh": Entry$1<Mount, PluginAppHostState>;
|
|
1001
|
+
"desktop.pluginApps.rejectMenuOpen": Entry$1<Mount & {
|
|
996
1002
|
requestId: string;
|
|
997
1003
|
menuOpeningRevision: number;
|
|
998
1004
|
}, {
|
|
999
1005
|
closed: boolean;
|
|
1000
1006
|
}>;
|
|
1001
|
-
"desktop.pluginApps.prepareTool": Entry<Mount & {
|
|
1007
|
+
"desktop.pluginApps.prepareTool": Entry$1<Mount & {
|
|
1002
1008
|
source: PluginAppSource$1;
|
|
1003
1009
|
requestId: string;
|
|
1004
1010
|
expectedRevision: number;
|
|
1005
1011
|
name: string;
|
|
1006
1012
|
arguments: Record<string, JsonValue$1>;
|
|
1007
1013
|
}, PluginAppPreparedTool>;
|
|
1008
|
-
"desktop.pluginApps.invokeTool": Entry<Action, PluginAppActionResponse | {
|
|
1014
|
+
"desktop.pluginApps.invokeTool": Entry$1<Action$1, PluginAppActionResponse | {
|
|
1009
1015
|
code: "plugin_app_busy";
|
|
1010
1016
|
notAccepted: true;
|
|
1011
1017
|
requestId: string;
|
|
1012
1018
|
}>;
|
|
1013
|
-
"desktop.pluginApps.getAction": Entry<Action | Target & {
|
|
1019
|
+
"desktop.pluginApps.getAction": Entry$1<Action$1 | Target & {
|
|
1014
1020
|
source: PluginAppSource$1;
|
|
1015
1021
|
requestId: string;
|
|
1016
1022
|
expectedRevision: number;
|
|
@@ -1019,70 +1025,82 @@ interface DesktopMethodMap {
|
|
|
1019
1025
|
args: Record<string, JsonValue$1>;
|
|
1020
1026
|
};
|
|
1021
1027
|
}, PluginAppActionResponse>;
|
|
1022
|
-
"desktop.pluginApps.cancelTool": Entry<Action, void>;
|
|
1023
|
-
"desktop.pluginApps.readResource": Entry<Mount & {
|
|
1028
|
+
"desktop.pluginApps.cancelTool": Entry$1<Action$1, void>;
|
|
1029
|
+
"desktop.pluginApps.readResource": Entry$1<Mount & {
|
|
1024
1030
|
source: PluginAppSource$1;
|
|
1025
1031
|
uri: string;
|
|
1026
1032
|
}, {
|
|
1027
1033
|
contents: JsonValue$1[];
|
|
1028
1034
|
}>;
|
|
1029
|
-
"desktop.pluginApps.listResources": Entry<Mount & {
|
|
1035
|
+
"desktop.pluginApps.listResources": Entry$1<Mount & {
|
|
1030
1036
|
source: PluginAppSource$1;
|
|
1031
1037
|
cursor?: string;
|
|
1032
1038
|
}, {
|
|
1033
1039
|
resources: JsonValue$1[];
|
|
1034
1040
|
nextCursor?: string;
|
|
1035
1041
|
}>;
|
|
1036
|
-
"desktop.pluginApps.listResourceTemplates": Entry<Mount & {
|
|
1042
|
+
"desktop.pluginApps.listResourceTemplates": Entry$1<Mount & {
|
|
1037
1043
|
source: PluginAppSource$1;
|
|
1038
1044
|
cursor?: string;
|
|
1039
1045
|
}, {
|
|
1040
1046
|
resourceTemplates: JsonValue$1[];
|
|
1041
1047
|
nextCursor?: string;
|
|
1042
1048
|
}>;
|
|
1043
|
-
"desktop.pluginApps.prepareMessage": Entry<Action & {
|
|
1049
|
+
"desktop.pluginApps.prepareMessage": Entry$1<Action$1 & {
|
|
1044
1050
|
content: JsonValue$1;
|
|
1045
1051
|
role: JsonValue$1;
|
|
1046
1052
|
}, PluginAppPreparedMessage>;
|
|
1047
|
-
"desktop.pluginApps.submitMessage": Entry<Action, PluginAppSubmissionReceipt>;
|
|
1048
|
-
"desktop.pluginApps.getMessageSubmission": Entry<Action, PluginAppSubmissionReceipt>;
|
|
1049
|
-
"desktop.pluginApps.cancelMessage": Entry<Action, void>;
|
|
1050
|
-
"desktop.pluginApps.updateModelContext": Entry<Action & {
|
|
1053
|
+
"desktop.pluginApps.submitMessage": Entry$1<Action$1, PluginAppSubmissionReceipt>;
|
|
1054
|
+
"desktop.pluginApps.getMessageSubmission": Entry$1<Action$1, PluginAppSubmissionReceipt>;
|
|
1055
|
+
"desktop.pluginApps.cancelMessage": Entry$1<Action$1, void>;
|
|
1056
|
+
"desktop.pluginApps.updateModelContext": Entry$1<Action$1 & {
|
|
1051
1057
|
content?: JsonValue$1;
|
|
1052
1058
|
structuredContent?: JsonValue$1;
|
|
1053
1059
|
}, PluginAppModelContext>;
|
|
1054
|
-
"desktop.pluginApps.release": Entry<Mount, void>;
|
|
1055
|
-
"desktop.pluginApps.closePanel": Entry<Mount, void>;
|
|
1056
|
-
"desktop.pluginApps.closeApp": Entry<Action, {
|
|
1060
|
+
"desktop.pluginApps.release": Entry$1<Mount, void>;
|
|
1061
|
+
"desktop.pluginApps.closePanel": Entry$1<Mount, void>;
|
|
1062
|
+
"desktop.pluginApps.closeApp": Entry$1<Action$1, {
|
|
1057
1063
|
app: PluginAppRecord;
|
|
1058
1064
|
}>;
|
|
1059
1065
|
}
|
|
1060
1066
|
type DesktopMethod = keyof DesktopMethodMap;
|
|
1067
|
+
declare const DESKTOP_ADAPTED_METHODS: readonly ["desktop.files.openRead", "desktop.files.getOperation"];
|
|
1061
1068
|
type ApiGroup<G extends string> = {
|
|
1062
|
-
[M in DesktopMethod as M extends `desktop.${G}.${infer N}` ? N : never]: (input: DesktopMethodMap[M]["params"]) => Promise<DesktopMethodMap[M]["result"]>;
|
|
1069
|
+
[M in Exclude<DesktopMethod, (typeof DESKTOP_ADAPTED_METHODS)[number]> as M extends `desktop.${G}.${infer N}` ? N : never]: (input: DesktopMethodMap[M]["params"]) => Promise<DesktopMethodMap[M]["result"]>;
|
|
1063
1070
|
};
|
|
1064
1071
|
interface AppHostDesktop {
|
|
1065
1072
|
bindTarget(input: BindDesktopTarget): Promise<DesktopTarget>;
|
|
1066
1073
|
releaseTarget(input: Target): Promise<void>;
|
|
1067
|
-
files:
|
|
1068
|
-
readFile(input: {
|
|
1069
|
-
targetId: string;
|
|
1070
|
-
path: string;
|
|
1071
|
-
range?: {
|
|
1072
|
-
start: number;
|
|
1073
|
-
end?: number;
|
|
1074
|
-
};
|
|
1075
|
-
}, options?: {
|
|
1076
|
-
signal?: AbortSignal;
|
|
1077
|
-
}): Promise<Response>;
|
|
1078
|
-
};
|
|
1074
|
+
files: AppHostFileOperations;
|
|
1079
1075
|
clipboard: ApiGroup<"clipboard">;
|
|
1080
|
-
git:
|
|
1081
|
-
terminals:
|
|
1076
|
+
git: AppHostGitOperations;
|
|
1077
|
+
terminals: AppHostTerminalOperations;
|
|
1082
1078
|
windows: ApiGroup<"windows">;
|
|
1083
1079
|
browser: ApiGroup<"browser">;
|
|
1084
1080
|
pluginApps: ApiGroup<"pluginApps">;
|
|
1085
1081
|
}
|
|
1082
|
+
interface AppHostFileOperations extends ApiGroup<"files"> {
|
|
1083
|
+
/** Read bytes from a file in the bound desktop target, optionally using a byte range. */
|
|
1084
|
+
readFile(input: {
|
|
1085
|
+
targetId: string;
|
|
1086
|
+
path: string;
|
|
1087
|
+
range?: {
|
|
1088
|
+
start: number;
|
|
1089
|
+
end?: number;
|
|
1090
|
+
};
|
|
1091
|
+
}, options?: {
|
|
1092
|
+
signal?: AbortSignal;
|
|
1093
|
+
}): Promise<Response>;
|
|
1094
|
+
/** Query the original write using the same request ID and original file contents. */
|
|
1095
|
+
getOperation(input: OperationQuery<FileOperationOriginal>): Promise<WorkspaceOperation | null>;
|
|
1096
|
+
}
|
|
1097
|
+
interface AppHostGitOperations extends ApiGroup<"git"> {
|
|
1098
|
+
/** Query the receipt using the original branch operation and request ID. */
|
|
1099
|
+
getOperation(input: OperationQuery<GitOperationOriginal>): Promise<WorkspaceOperation | null>;
|
|
1100
|
+
}
|
|
1101
|
+
/** Interactive terminal operations for an authorized desktop target. */
|
|
1102
|
+
interface AppHostTerminalOperations extends ApiGroup<"terminals"> {
|
|
1103
|
+
}
|
|
1086
1104
|
declare const validBrowserSnapshot: Check;
|
|
1087
1105
|
declare const validDesktopTarget: Check;
|
|
1088
1106
|
declare const validWorkspaceOperation: Check;
|
|
@@ -1190,9 +1208,10 @@ declare const validExtensionResult: (value: unknown) => boolean;
|
|
|
1190
1208
|
/** Project records and filesystem locations have separate business identities. */
|
|
1191
1209
|
interface SystemProject {
|
|
1192
1210
|
workspaceId: string;
|
|
1193
|
-
projectId
|
|
1211
|
+
projectId: string;
|
|
1194
1212
|
name: string;
|
|
1195
1213
|
path: string;
|
|
1214
|
+
rootIdentity?: DesktopRoot["identity"];
|
|
1196
1215
|
available: boolean;
|
|
1197
1216
|
lastOpenedAt: number;
|
|
1198
1217
|
defaultShell?: string;
|
|
@@ -1200,6 +1219,7 @@ interface SystemProject {
|
|
|
1200
1219
|
interface ProjectSnapshot {
|
|
1201
1220
|
dataScopeId: string;
|
|
1202
1221
|
projects: SystemProject[];
|
|
1222
|
+
selectedWorkspaceId?: string;
|
|
1203
1223
|
}
|
|
1204
1224
|
type Scope = {
|
|
1205
1225
|
dataScopeId: string;
|
|
@@ -1218,16 +1238,97 @@ type ProjectRequest = {
|
|
|
1218
1238
|
shell: string | null;
|
|
1219
1239
|
} | Project & {
|
|
1220
1240
|
action: "archive";
|
|
1221
|
-
} |
|
|
1241
|
+
} | Project & {
|
|
1222
1242
|
action: "rebind";
|
|
1223
|
-
projectId?: string;
|
|
1224
|
-
workspaceId: string;
|
|
1225
1243
|
previousWorkspaceId: string;
|
|
1226
|
-
|
|
1244
|
+
expectedPath: string;
|
|
1227
1245
|
};
|
|
1228
1246
|
declare function validProjectRequest(value: unknown): value is ProjectRequest;
|
|
1229
1247
|
declare const validProjectSnapshot: (value: unknown) => value is ProjectSnapshot;
|
|
1230
1248
|
|
|
1249
|
+
type Root = {
|
|
1250
|
+
rootPath: string;
|
|
1251
|
+
identity?: {
|
|
1252
|
+
dev: string;
|
|
1253
|
+
ino: string;
|
|
1254
|
+
};
|
|
1255
|
+
};
|
|
1256
|
+
type File = Root & {
|
|
1257
|
+
path: string;
|
|
1258
|
+
};
|
|
1259
|
+
type Write = File & {
|
|
1260
|
+
requestId: string;
|
|
1261
|
+
content: string;
|
|
1262
|
+
originalContent: string;
|
|
1263
|
+
};
|
|
1264
|
+
type Preview = {
|
|
1265
|
+
path: string;
|
|
1266
|
+
name: string;
|
|
1267
|
+
language: string;
|
|
1268
|
+
size: number;
|
|
1269
|
+
binary: boolean;
|
|
1270
|
+
content: string | null;
|
|
1271
|
+
scope: "project" | "extra-root";
|
|
1272
|
+
relativePath: string;
|
|
1273
|
+
rootLabel: string;
|
|
1274
|
+
previewBytes: ArrayBuffer | null;
|
|
1275
|
+
mediaType: "image/avif" | "image/bmp" | "image/gif" | "image/jpeg" | "image/png" | "image/webp" | null;
|
|
1276
|
+
imagePreviewError: "image_too_large" | "image_unsupported" | null;
|
|
1277
|
+
rootIdentity?: Root["identity"];
|
|
1278
|
+
documentPreview?: {
|
|
1279
|
+
format: "pdf" | "epub" | "docx" | "xlsx" | "pptx";
|
|
1280
|
+
bytes: ArrayBuffer;
|
|
1281
|
+
};
|
|
1282
|
+
};
|
|
1283
|
+
type Tree = {
|
|
1284
|
+
rootPath: string;
|
|
1285
|
+
entries: {
|
|
1286
|
+
path: string;
|
|
1287
|
+
type: "file" | "directory";
|
|
1288
|
+
size?: number;
|
|
1289
|
+
}[];
|
|
1290
|
+
truncated?: boolean;
|
|
1291
|
+
};
|
|
1292
|
+
type Entry<Input, Result> = {
|
|
1293
|
+
input: Input;
|
|
1294
|
+
result: Result;
|
|
1295
|
+
};
|
|
1296
|
+
type LocalWorkspaceActions = {
|
|
1297
|
+
pick: Entry<{}, Required<Root> & {
|
|
1298
|
+
workspaceId: string;
|
|
1299
|
+
} | null>;
|
|
1300
|
+
list: Entry<Root & {
|
|
1301
|
+
path?: string;
|
|
1302
|
+
}, Tree>;
|
|
1303
|
+
find: Entry<Root & {
|
|
1304
|
+
query: string;
|
|
1305
|
+
}, {
|
|
1306
|
+
files: string[];
|
|
1307
|
+
truncated: boolean;
|
|
1308
|
+
}>;
|
|
1309
|
+
read: Entry<File, Preview>;
|
|
1310
|
+
write: Entry<Write, Preview>;
|
|
1311
|
+
getWrite: Entry<Write, Preview | null>;
|
|
1312
|
+
reveal: Entry<File, void>;
|
|
1313
|
+
openWith: Entry<File & {
|
|
1314
|
+
openerId: string;
|
|
1315
|
+
}, void>;
|
|
1316
|
+
copyPath: Entry<File & {
|
|
1317
|
+
absolute?: boolean;
|
|
1318
|
+
}, void>;
|
|
1319
|
+
listOpeners: Entry<{}, DesktopOpener[]>;
|
|
1320
|
+
webPreview: Entry<File, {
|
|
1321
|
+
url: string;
|
|
1322
|
+
}>;
|
|
1323
|
+
};
|
|
1324
|
+
type Action = keyof LocalWorkspaceActions;
|
|
1325
|
+
type LocalWorkspaceRequest = {
|
|
1326
|
+
[A in Action]: {
|
|
1327
|
+
action: A;
|
|
1328
|
+
} & LocalWorkspaceActions[A]["input"];
|
|
1329
|
+
}[Action];
|
|
1330
|
+
type LocalWorkspaceResult<A extends Action = Action> = LocalWorkspaceActions[A]["result"];
|
|
1331
|
+
|
|
1231
1332
|
interface CustomModelProviderInput {
|
|
1232
1333
|
id: string;
|
|
1233
1334
|
displayName: string;
|
|
@@ -1328,6 +1429,8 @@ interface ProviderDefaultsSnapshot {
|
|
|
1328
1429
|
}>;
|
|
1329
1430
|
fastModeAvailable: false;
|
|
1330
1431
|
fastModeReason: string;
|
|
1432
|
+
/** Present when the caller supplied a proof for its current account gateway. */
|
|
1433
|
+
accountGatewayMatches?: boolean;
|
|
1331
1434
|
}
|
|
1332
1435
|
interface ProviderConnectionTestResult {
|
|
1333
1436
|
status: "verified" | "failed";
|
|
@@ -1337,6 +1440,7 @@ interface ProviderConnectionTestResult {
|
|
|
1337
1440
|
}
|
|
1338
1441
|
type ProviderDefaultsRequest = {
|
|
1339
1442
|
action: "snapshot";
|
|
1443
|
+
accountGatewayProof?: string;
|
|
1340
1444
|
} | {
|
|
1341
1445
|
action: "updateModel";
|
|
1342
1446
|
provider?: string;
|
|
@@ -1353,7 +1457,7 @@ type ProviderDefaultsRequest = {
|
|
|
1353
1457
|
model: string;
|
|
1354
1458
|
};
|
|
1355
1459
|
|
|
1356
|
-
declare const SYSTEM_SETTINGS_SECTIONS: readonly ["general", "notifications", "profile", "appearance", "keyboard", "providers", "permissions", "personalization", "billing", "
|
|
1460
|
+
declare const SYSTEM_SETTINGS_SECTIONS: readonly ["general", "notifications", "profile", "appearance", "keyboard", "providers", "permissions", "personalization", "billing", "terminal", "git", "runtime", "storage", "diagnostics"];
|
|
1357
1461
|
type SessionSettingsOriginal = Extract<SessionControlOriginal, {
|
|
1358
1462
|
action: "fork";
|
|
1359
1463
|
}>;
|
|
@@ -1474,12 +1578,30 @@ type SystemEvent = {
|
|
|
1474
1578
|
type: "git-preferences-changed";
|
|
1475
1579
|
defaultTaskLocation: "current" | "worktree";
|
|
1476
1580
|
};
|
|
1477
|
-
declare const
|
|
1581
|
+
declare const CHANNEL_SETTINGS_ACTIONS: readonly ["snapshot", "runtimeStatus", "connect", "patch", "remove", "allowAdd", "allowRemove", "startRegistration", "registrationStatus", "cancelRegistration", "startRuntime", "stopRuntime"];
|
|
1582
|
+
type ChannelSettingsAction = typeof CHANNEL_SETTINGS_ACTIONS[number];
|
|
1583
|
+
type ChannelSettingsRequest = {
|
|
1584
|
+
action: ChannelSettingsAction;
|
|
1585
|
+
input?: unknown;
|
|
1586
|
+
};
|
|
1587
|
+
type ChannelSettingsResult = {
|
|
1588
|
+
value: object;
|
|
1589
|
+
} | {
|
|
1590
|
+
error: "invalid_configuration" | "conflict";
|
|
1591
|
+
};
|
|
1592
|
+
type RequestChannelSettings = (request: ChannelSettingsRequest) => Promise<ChannelSettingsResult>;
|
|
1593
|
+
/** Internal bridge used by the bundled workbench settings page. */
|
|
1594
|
+
declare function workbenchChannelSettings(system: object): RequestChannelSettings;
|
|
1595
|
+
declare const SYSTEM_METHODS: readonly ["system.projects", "system.workspace", "system.extensions", "system.modelProviders", "system.channelSettings", "system.providerDefaults", "system.open", "system.getPresentationPreferences", "system.setTheme", "system.setWindowMaterial", "system.copyText", "system.openExternal", "system.navigationReady", "system.completeNavigation"];
|
|
1478
1596
|
interface SystemMethodMap {
|
|
1479
1597
|
"system.projects": {
|
|
1480
1598
|
params: ProjectRequest;
|
|
1481
1599
|
result: ProjectSnapshot;
|
|
1482
1600
|
};
|
|
1601
|
+
"system.workspace": {
|
|
1602
|
+
params: LocalWorkspaceRequest;
|
|
1603
|
+
result: LocalWorkspaceResult;
|
|
1604
|
+
};
|
|
1483
1605
|
"system.extensions": {
|
|
1484
1606
|
params: ExtensionRequest;
|
|
1485
1607
|
result: unknown;
|
|
@@ -1488,6 +1610,10 @@ interface SystemMethodMap {
|
|
|
1488
1610
|
params: ModelProviderRequest;
|
|
1489
1611
|
result: ModelProviderConnection[];
|
|
1490
1612
|
};
|
|
1613
|
+
"system.channelSettings": {
|
|
1614
|
+
params: ChannelSettingsRequest;
|
|
1615
|
+
result: ChannelSettingsResult;
|
|
1616
|
+
};
|
|
1491
1617
|
"system.providerDefaults": {
|
|
1492
1618
|
params: ProviderDefaultsRequest;
|
|
1493
1619
|
result: ProviderDefaultsSnapshot | ProviderConnectionTestResult;
|
|
@@ -1550,6 +1676,10 @@ declare function validSystemResult(method: SystemMethod, value: unknown): boolea
|
|
|
1550
1676
|
declare function validSystemEvent(value: unknown): value is SystemEvent;
|
|
1551
1677
|
interface AppHostSystem {
|
|
1552
1678
|
projects(input: ProjectRequest): Promise<ProjectSnapshot>;
|
|
1679
|
+
/** Local files for the trusted, built-in workbench. */
|
|
1680
|
+
workspace<A extends LocalWorkspaceRequest["action"]>(input: Extract<LocalWorkspaceRequest, {
|
|
1681
|
+
action: A;
|
|
1682
|
+
}>): Promise<LocalWorkspaceResult<A>>;
|
|
1553
1683
|
/** Requires the explicit extensions.manage installation capability. */
|
|
1554
1684
|
extensions(input: ExtensionRequest): Promise<unknown>;
|
|
1555
1685
|
/** Manages connections for the active built-in workbench. */
|
|
@@ -1586,26 +1716,27 @@ interface SystemRequester {
|
|
|
1586
1716
|
}
|
|
1587
1717
|
declare function createAppSystemApi(requester: SystemRequester, connectionOwner: object): AppHostSystem;
|
|
1588
1718
|
|
|
1719
|
+
interface WorkspaceDirectory {
|
|
1720
|
+
readonly id: string;
|
|
1721
|
+
readonly displayName: string;
|
|
1722
|
+
listFiles(options?: {
|
|
1723
|
+
directory?: string;
|
|
1724
|
+
cursor?: string;
|
|
1725
|
+
}): Promise<WorkspaceFilePage>;
|
|
1726
|
+
readText(path: string): Promise<WorkspaceText>;
|
|
1727
|
+
}
|
|
1589
1728
|
interface AppHostWorkspace {
|
|
1590
1729
|
list(input?: {
|
|
1591
1730
|
cursor?: string;
|
|
1592
1731
|
}): Promise<WorkspaceDirectoryPage>;
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1732
|
+
/** Supply and save requestId before opening the picker if its result needs to be recovered. */
|
|
1733
|
+
pick(input?: {
|
|
1734
|
+
requestId?: string;
|
|
1735
|
+
}): Promise<WorkspaceDirectory | null>;
|
|
1736
|
+
open(id: string): Promise<WorkspaceDirectory>;
|
|
1596
1737
|
getSelection(input: {
|
|
1597
1738
|
requestId: string;
|
|
1598
1739
|
}): Promise<WorkspaceSelection>;
|
|
1599
|
-
get(id: string): Promise<WorkspaceRef>;
|
|
1600
|
-
listFiles(input: {
|
|
1601
|
-
workspaceId: string;
|
|
1602
|
-
directory: string;
|
|
1603
|
-
cursor?: string;
|
|
1604
|
-
}): Promise<WorkspaceFilePage>;
|
|
1605
|
-
readText(input: {
|
|
1606
|
-
workspaceId: string;
|
|
1607
|
-
path: string;
|
|
1608
|
-
}): Promise<WorkspaceText>;
|
|
1609
1740
|
}
|
|
1610
1741
|
|
|
1611
1742
|
interface WorkspaceDirectoryPage {
|
|
@@ -1736,18 +1867,18 @@ interface AuxiliaryMethodMap {
|
|
|
1736
1867
|
}
|
|
1737
1868
|
type AuxiliaryMethod = keyof AuxiliaryMethodMap;
|
|
1738
1869
|
declare const AUXILIARY_METHODS: readonly ["sessions.getAuxiliaryOptions", "sessions.openAuxiliary", "sessions.getAuxiliary", "sessions.closeAuxiliary"];
|
|
1739
|
-
interface
|
|
1740
|
-
|
|
1870
|
+
interface AuxiliarySessionsGroup {
|
|
1871
|
+
getOptions(input: {
|
|
1741
1872
|
connection: AgentConnection;
|
|
1742
1873
|
sessionId: string;
|
|
1743
1874
|
}): Promise<AuxiliaryOptions>;
|
|
1744
|
-
|
|
1875
|
+
open(input: AuxiliaryRequest): Promise<{
|
|
1745
1876
|
leaseId: string;
|
|
1746
1877
|
sessionId: string;
|
|
1747
1878
|
connection: AgentConnection;
|
|
1748
1879
|
}>;
|
|
1749
|
-
|
|
1750
|
-
|
|
1880
|
+
get(input: AuxiliaryRequest): Promise<AuxiliaryReceipt | null>;
|
|
1881
|
+
close(input: AuxiliaryRequest): Promise<AuxiliaryReceipt>;
|
|
1751
1882
|
}
|
|
1752
1883
|
declare function isAuxiliaryMethod(method: string): method is AuxiliaryMethod;
|
|
1753
1884
|
declare function validAuxiliaryInput(method: AuxiliaryMethod, v: unknown): boolean;
|
|
@@ -1755,12 +1886,14 @@ declare function validAuxiliaryResult(method: AuxiliaryMethod, v: unknown): bool
|
|
|
1755
1886
|
declare function createAppAuxiliarySessionsApi(rpc: {
|
|
1756
1887
|
requireFeature(): void;
|
|
1757
1888
|
request<M extends AuxiliaryMethod>(method: M, params: AuxiliaryMethodMap[M]["params"]): Promise<AuxiliaryMethodMap[M]["result"]>;
|
|
1758
|
-
}, streams: ConnectionStreams):
|
|
1889
|
+
}, streams: ConnectionStreams): AuxiliarySessionsGroup;
|
|
1759
1890
|
|
|
1760
1891
|
interface AppHostSessions {
|
|
1761
1892
|
/** Handles share the page's connection. Closing any handle ends the
|
|
1762
1893
|
* connection and all its in-flight requests. */
|
|
1763
1894
|
getConnection(): Promise<AgentConnection>;
|
|
1895
|
+
preparation: ConversationPreparationGroup;
|
|
1896
|
+
auxiliary: AuxiliarySessionsGroup;
|
|
1764
1897
|
}
|
|
1765
1898
|
|
|
1766
1899
|
interface ServiceConnection {
|
|
@@ -1782,6 +1915,60 @@ interface AppHostService {
|
|
|
1782
1915
|
}>;
|
|
1783
1916
|
}
|
|
1784
1917
|
|
|
1918
|
+
interface DesktopComputerCandidate {
|
|
1919
|
+
id: string;
|
|
1920
|
+
label: string;
|
|
1921
|
+
detail?: string;
|
|
1922
|
+
}
|
|
1923
|
+
type DesktopComputerPrompt = {
|
|
1924
|
+
id: string;
|
|
1925
|
+
} & ({
|
|
1926
|
+
kind: "authorize";
|
|
1927
|
+
sessionId: string;
|
|
1928
|
+
appName: string;
|
|
1929
|
+
} | {
|
|
1930
|
+
kind: "choose";
|
|
1931
|
+
sessionId: string;
|
|
1932
|
+
candidates: readonly DesktopComputerCandidate[];
|
|
1933
|
+
confirmChange?: true;
|
|
1934
|
+
});
|
|
1935
|
+
type DesktopComputerInteractionEvent = {
|
|
1936
|
+
type: "prompt";
|
|
1937
|
+
prompt: DesktopComputerPrompt;
|
|
1938
|
+
} | {
|
|
1939
|
+
type: "dismissed";
|
|
1940
|
+
id: string;
|
|
1941
|
+
};
|
|
1942
|
+
interface DesktopComputerActivity {
|
|
1943
|
+
sessionId: string;
|
|
1944
|
+
runId: string;
|
|
1945
|
+
phase: "ready" | "observing" | "foreground" | "paused" | "stopped";
|
|
1946
|
+
app?: string;
|
|
1947
|
+
title?: string;
|
|
1948
|
+
action?: string;
|
|
1949
|
+
evidence?: string;
|
|
1950
|
+
reason?: string;
|
|
1951
|
+
captureEnabled?: boolean;
|
|
1952
|
+
captureRevocation?: "pending" | "failed";
|
|
1953
|
+
inputRelease?: "pending" | "failed";
|
|
1954
|
+
preview?: {
|
|
1955
|
+
dataUrl: string;
|
|
1956
|
+
width: number;
|
|
1957
|
+
height: number;
|
|
1958
|
+
};
|
|
1959
|
+
}
|
|
1960
|
+
interface DesktopComputerActivityUpdate {
|
|
1961
|
+
sessionId: string;
|
|
1962
|
+
activity: DesktopComputerActivity | null;
|
|
1963
|
+
}
|
|
1964
|
+
type WorkbenchComputerEvent = {
|
|
1965
|
+
type: "workbench-computer-activity";
|
|
1966
|
+
update: DesktopComputerActivityUpdate;
|
|
1967
|
+
} | {
|
|
1968
|
+
type: "workbench-computer-prompt";
|
|
1969
|
+
interaction: DesktopComputerInteractionEvent;
|
|
1970
|
+
};
|
|
1971
|
+
|
|
1785
1972
|
type AppUnloadReason = "switch" | "reload" | "disable" | "quit";
|
|
1786
1973
|
interface AppUnloadRequest {
|
|
1787
1974
|
id: string;
|
|
@@ -1809,7 +1996,7 @@ interface AppContext {
|
|
|
1809
1996
|
}>>;
|
|
1810
1997
|
readonly storageQuotaBytes: number;
|
|
1811
1998
|
}
|
|
1812
|
-
type AppHostEvent = DesktopToolEvent | SystemEvent | CommandInvocation | ResourceChanged | WindowStateChanged | {
|
|
1999
|
+
type AppHostEvent = DesktopToolEvent | SystemEvent | CommandInvocation | ResourceChanged | WindowStateChanged | WorkbenchComputerEvent | {
|
|
1813
2000
|
type: "service-changed";
|
|
1814
2001
|
service: ServiceStatus;
|
|
1815
2002
|
} | {
|
|
@@ -1958,7 +2145,7 @@ interface AppHost {
|
|
|
1958
2145
|
lifecycle: AppHostLifecycle;
|
|
1959
2146
|
system: AppHostSystem;
|
|
1960
2147
|
window: AppHostWindow;
|
|
1961
|
-
sessions: AppHostSessions
|
|
2148
|
+
sessions: AppHostSessions;
|
|
1962
2149
|
desktop: AppHostDesktop;
|
|
1963
2150
|
attachments: AppHostAttachments;
|
|
1964
2151
|
workspace: AppHostWorkspace;
|
|
@@ -2017,5 +2204,5 @@ interface PluginAppConversationInput {
|
|
|
2017
2204
|
|
|
2018
2205
|
declare function parsePluginAppComposerContexts(value: unknown): PluginAppConversationInput[];
|
|
2019
2206
|
|
|
2020
|
-
export { ATTACHMENTS_METHODS, AUXILIARY_METHODS, AppHostError, BROWSER_CAPTURE_PREVIEW_MAX_BYTES, COMMANDS_METHODS, DESKTOP_METHODS, EXTENSION_INPUTS, RESOURCE_CATALOG_METHODS, SYSTEM_METHODS, SYSTEM_SETTINGS_SECTIONS, SYSTEM_SHORTCUT_IDS, WINDOW_METHODS, canonicalDesktopRequest, connectAppHost, createAppAttachmentsApi, createAppAuxiliarySessionsApi, createAppCommandsApi, createAppDesktopApi, createAppSystemApi, createAppWindowApi, createPageFetchClient, createResourceCatalogApi, isAuxiliaryMethod, isCommandsMethod, isDesktopMethod, isResourceCatalogMethod, isSystemMethod, isWindowMethod, parsePluginAppComposerContexts, validAppCommandSnapshot, validAppWindowState, validAttachmentsInput, validAttachmentsResult, validAuxiliaryInput, validAuxiliaryResult, validBrowserSnapshot, validCommandInvocation, validCommandReceipt, validCommandsInput, validDesktopEvent, validDesktopInput, validDesktopNavigationTarget, validDesktopResult, validDesktopResultForInput, validDesktopTarget, validExtensionRequest, validExtensionResult, validPresentationSnapshot, validProjectRequest, validProjectSnapshot, validResourceCatalogInput, validResourceCatalogResult, validResourceChanged, validSessionSettingsTarget, validSystemEvent, validSystemInput, validSystemResult, validWindowEvent, validWindowInput, validWindowResult, validWorkspaceOperation };
|
|
2021
|
-
export type { AgentConnection, AnnotationMode, AnnotationRect, AnnotationTarget, AppCommandRegistration, AppCommandSnapshot, AppContext, AppHost, AppHostAttachments,
|
|
2207
|
+
export { ATTACHMENTS_METHODS, AUXILIARY_METHODS, AppHostError, BROWSER_CAPTURE_PREVIEW_MAX_BYTES, COMMANDS_METHODS, DESKTOP_METHODS, EXTENSION_INPUTS, RESOURCE_CATALOG_METHODS, SYSTEM_METHODS, SYSTEM_SETTINGS_SECTIONS, SYSTEM_SHORTCUT_IDS, WINDOW_METHODS, canonicalDesktopRequest, connectAppHost, createAppAttachmentsApi, createAppAuxiliarySessionsApi, createAppCommandsApi, createAppDesktopApi, createAppSystemApi, createAppWindowApi, createPageFetchClient, createResourceCatalogApi, isAuxiliaryMethod, isCommandsMethod, isDesktopMethod, isResourceCatalogMethod, isSystemMethod, isWindowMethod, parsePluginAppComposerContexts, validAppCommandSnapshot, validAppWindowState, validAttachmentsInput, validAttachmentsResult, validAuxiliaryInput, validAuxiliaryResult, validBrowserSnapshot, validCommandInvocation, validCommandReceipt, validCommandsInput, validDesktopEvent, validDesktopInput, validDesktopNavigationTarget, validDesktopResult, validDesktopResultForInput, validDesktopTarget, validExtensionRequest, validExtensionResult, validPresentationSnapshot, validProjectRequest, validProjectSnapshot, validResourceCatalogInput, validResourceCatalogResult, validResourceChanged, validSessionSettingsTarget, validSystemEvent, validSystemInput, validSystemResult, validWindowEvent, validWindowInput, validWindowResult, validWorkspaceOperation, workbenchChannelSettings };
|
|
2208
|
+
export type { AgentConnection, AnnotationMode, AnnotationRect, AnnotationTarget, AppCommandRegistration, AppCommandSnapshot, AppContext, AppHost, AppHostAttachments, AppHostCommands, AppHostDesktop, AppHostErrorCode, AppHostErrorInfo, AppHostEvent, AppHostFileOperations, AppHostGitOperations, AppHostLifecycle, AppHostRetry, AppHostService, AppHostSessions, AppHostStorage, AppHostSystem, AppHostTerminalOperations, AppHostWindow, AppHostWorkspace, AppUnloadHandler, AppUnloadReason, AppUnloadRequest, AppWindowMaterialState, AppWindowOpenHostInput, AppWindowStartupResult, AppWindowState, AppWindowUpdateCheckResult, AppWindowUpdateState, AppearancePreferences, AttachmentsMethod, AttachmentsMethodMap, AuxiliaryMethod, AuxiliaryMethodMap, AuxiliaryOptions, AuxiliaryReceipt, AuxiliaryRequest, AuxiliarySelection, AuxiliarySessionsGroup, AuxiliaryWireRequest, BindDesktopTarget, BrowserAnnotationRecord, BrowserAnnotationSnapshot, BrowserPage, ChannelSettingsAction, ClientConnection, CommandInvocation, CommandReceipt, CommandsMethod, CommandsMethodMap, ConnectParams, ConversationPreparationGroup, DesktopGitChange, DesktopMethod, DesktopMethodMap, DesktopNavigationTarget, DesktopOpener, DesktopRoot, DesktopSearch, DesktopTarget, DesktopTerminal, DesktopTerminalInfo, DesktopTerminalRequestOriginal, DesktopTerminalRequestReceipt, DesktopTerminalSnapshot, DesktopText, DesktopToolEvent, DesktopWindow, ExtensionOperation, ExtensionRequest, FileOperationOriginal, GitOperationOriginal, JsonValue$1 as JsonValue, LocalWorkspaceRequest, LocalWorkspaceResult, LoginResult, ModelProviderConnection, ModelProviderRequest, NavigationCompletionStatus, PluginAppActionReceipt, PluginAppActionResponse, PluginAppCatalog, PluginAppComposerContext, PluginAppHostState, PluginAppModelContext, PluginAppMount, PluginAppPreparedMessage, PluginAppPreparedTool, PluginAppRecord, PluginAppSource$1 as PluginAppSource, PluginAppSubmissionReceipt, PluginAppToolPolicy, PresentationSnapshot, ProjectRequest, ProjectSnapshot, ProviderConnectionTestResult, ProviderDefaultsRequest, ProviderDefaultsSnapshot, ResourceCatalogMethod, ResourceCatalogMethodMap, ResourceChanged, ServiceConnection, ServiceConnectionDescriptor, ServiceStatus, ServiceWork, ServiceWorkState, SessionSettingsTarget, SessionSettingsWireTarget, StorageGetResult, StoredFile, SystemEvent, SystemMethod, SystemMethodMap, SystemOpenInput, SystemOpenWireInput, SystemProject, SystemRequester, SystemShortcutId, WindowMethod, WindowMethodMap, WindowRequester, WindowStateChanged, WorkspaceConversationCreation, WorkspaceConversationResult, WorkspaceDirectory, WorkspaceDirectoryPage, WorkspaceFilePage, WorkspaceOperation, WorkspaceOperationKind, WorkspaceOperationOriginal, WorkspaceRef, WorkspaceSelection, WorkspaceText };
|