@bobannomi/app-host 0.7.0 → 0.8.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/dist/index.d.ts +15 -220
- package/dist/index.js +61 -245
- package/dist/index.js.map +3 -3
- package/dist/protocol.d.ts +18 -221
- package/dist/protocol.js +58 -228
- package/dist/protocol.js.map +3 -3
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1159,53 +1159,6 @@ declare function createAppDesktopApi(rpc: {
|
|
|
1159
1159
|
/** Persist this normalized original alongside a request ID; recovery sends exactly that request. */
|
|
1160
1160
|
declare function canonicalDesktopRequest(value: unknown): string;
|
|
1161
1161
|
|
|
1162
|
-
/** The extension manager's finite operations. */
|
|
1163
|
-
declare const EXTENSION_INPUTS: {
|
|
1164
|
-
context: Check;
|
|
1165
|
-
"plugins.loadIcon": Check;
|
|
1166
|
-
"plugins.snapshot": Check;
|
|
1167
|
-
"plugins.enable": Check;
|
|
1168
|
-
"plugins.disable": Check;
|
|
1169
|
-
"plugins.uninstall": Check;
|
|
1170
|
-
"plugins.reload": Check;
|
|
1171
|
-
"plugins.importArchive": Check;
|
|
1172
|
-
"plugins.confirmArchive": Check;
|
|
1173
|
-
"plugins.cancelArchive": Check;
|
|
1174
|
-
"plugins.importGit": Check;
|
|
1175
|
-
"plugins.confirmGit": Check;
|
|
1176
|
-
"plugins.cancelGit": Check;
|
|
1177
|
-
"plugins.marketplaceCatalog": Check;
|
|
1178
|
-
"plugins.marketplaceAddSource": Check;
|
|
1179
|
-
"plugins.marketplaceSetSourceEnabled": Check;
|
|
1180
|
-
"plugins.marketplaceRemoveSource": Check;
|
|
1181
|
-
"plugins.marketplacePreview": Check;
|
|
1182
|
-
"plugins.marketplaceConfirm": Check;
|
|
1183
|
-
"plugins.marketplaceCancel": Check;
|
|
1184
|
-
"plugins.marketplaceOperation": Check;
|
|
1185
|
-
"skills.snapshot": Check;
|
|
1186
|
-
"skills.remove": Check;
|
|
1187
|
-
"skills.marketplaceCatalog": Check;
|
|
1188
|
-
"skills.marketplaceInstall": (value: unknown) => boolean;
|
|
1189
|
-
"mcp.snapshot": Check;
|
|
1190
|
-
"mcp.exportConfig": Check;
|
|
1191
|
-
"mcp.getConfig": Check;
|
|
1192
|
-
"mcp.add": Check;
|
|
1193
|
-
"mcp.update": Check;
|
|
1194
|
-
"mcp.remove": Check;
|
|
1195
|
-
"mcp.setEnabled": Check;
|
|
1196
|
-
"mcp.login": Check;
|
|
1197
|
-
"mcp.loginStatus": Check;
|
|
1198
|
-
"mcp.cancelLogin": Check;
|
|
1199
|
-
"mcp.logout": Check;
|
|
1200
|
-
};
|
|
1201
|
-
type ExtensionOperation = keyof typeof EXTENSION_INPUTS;
|
|
1202
|
-
interface ExtensionRequest {
|
|
1203
|
-
operation: ExtensionOperation;
|
|
1204
|
-
input: Record<string, unknown>;
|
|
1205
|
-
}
|
|
1206
|
-
declare function validExtensionRequest(value: unknown): value is ExtensionRequest;
|
|
1207
|
-
declare const validExtensionResult: (value: unknown) => boolean;
|
|
1208
|
-
|
|
1209
1162
|
/** Project records and filesystem locations have separate business identities. */
|
|
1210
1163
|
interface SystemProject {
|
|
1211
1164
|
workspaceId: string;
|
|
@@ -1330,134 +1283,6 @@ type LocalWorkspaceRequest = {
|
|
|
1330
1283
|
}[Action];
|
|
1331
1284
|
type LocalWorkspaceResult<A extends Action = Action> = LocalWorkspaceActions[A]["result"];
|
|
1332
1285
|
|
|
1333
|
-
interface CustomModelProviderInput {
|
|
1334
|
-
id: string;
|
|
1335
|
-
displayName: string;
|
|
1336
|
-
baseUrl: string;
|
|
1337
|
-
apiFormat: "openai";
|
|
1338
|
-
apiKey?: string;
|
|
1339
|
-
models: {
|
|
1340
|
-
id: string;
|
|
1341
|
-
displayName: string;
|
|
1342
|
-
imageInputSupport?: "native" | "unsupported" | "unknown";
|
|
1343
|
-
contextWindow?: number;
|
|
1344
|
-
maxOutputTokens?: number;
|
|
1345
|
-
}[];
|
|
1346
|
-
headers?: Record<string, string>;
|
|
1347
|
-
secretHeaders?: Record<string, string | null>;
|
|
1348
|
-
}
|
|
1349
|
-
type Removal = {
|
|
1350
|
-
provider: string;
|
|
1351
|
-
disableDefault?: boolean;
|
|
1352
|
-
replacement?: {
|
|
1353
|
-
provider: string;
|
|
1354
|
-
model: string;
|
|
1355
|
-
};
|
|
1356
|
-
};
|
|
1357
|
-
type ModelProviderRequest = {
|
|
1358
|
-
action: "list";
|
|
1359
|
-
} | {
|
|
1360
|
-
action: "refresh";
|
|
1361
|
-
} | {
|
|
1362
|
-
action: "connect";
|
|
1363
|
-
provider: string;
|
|
1364
|
-
apiKey: string;
|
|
1365
|
-
headers?: Record<string, string>;
|
|
1366
|
-
secretHeaders?: Record<string, string | null>;
|
|
1367
|
-
} | {
|
|
1368
|
-
action: "updateHeaders";
|
|
1369
|
-
provider: string;
|
|
1370
|
-
headers: Record<string, string>;
|
|
1371
|
-
secretHeaders?: Record<string, string | null>;
|
|
1372
|
-
} | {
|
|
1373
|
-
action: "createCustom";
|
|
1374
|
-
value: CustomModelProviderInput;
|
|
1375
|
-
} | {
|
|
1376
|
-
action: "syncAccount";
|
|
1377
|
-
value: CustomModelProviderInput;
|
|
1378
|
-
} | {
|
|
1379
|
-
action: "updateCustom";
|
|
1380
|
-
provider: string;
|
|
1381
|
-
value: CustomModelProviderInput;
|
|
1382
|
-
} | ({
|
|
1383
|
-
action: "disconnect";
|
|
1384
|
-
} & Removal) | ({
|
|
1385
|
-
action: "removeCustom";
|
|
1386
|
-
} & Removal);
|
|
1387
|
-
interface ModelProviderConnection {
|
|
1388
|
-
name: string;
|
|
1389
|
-
displayName: string;
|
|
1390
|
-
connected: boolean;
|
|
1391
|
-
active: boolean;
|
|
1392
|
-
custom?: boolean;
|
|
1393
|
-
credentialLabel?: string;
|
|
1394
|
-
credentialSource: "credentials" | "environment" | "subscription" | "local" | "configured" | "none";
|
|
1395
|
-
source?: "builtin" | "catalog" | "custom" | "subscription";
|
|
1396
|
-
baseUrl?: string;
|
|
1397
|
-
headers?: Record<string, string>;
|
|
1398
|
-
secretHeaderNames?: string[];
|
|
1399
|
-
models: {
|
|
1400
|
-
id: string;
|
|
1401
|
-
label: string;
|
|
1402
|
-
imageInputSupport?: "native" | "unsupported" | "unknown";
|
|
1403
|
-
declaredLimits?: {
|
|
1404
|
-
contextWindow?: number;
|
|
1405
|
-
maxOutputTokens?: number;
|
|
1406
|
-
};
|
|
1407
|
-
}[];
|
|
1408
|
-
}
|
|
1409
|
-
interface ProviderDefaultsSnapshot {
|
|
1410
|
-
models: {
|
|
1411
|
-
id: string;
|
|
1412
|
-
label: string;
|
|
1413
|
-
provider: string;
|
|
1414
|
-
providerName: string;
|
|
1415
|
-
reasoningEfforts?: string[];
|
|
1416
|
-
contextWindow?: number;
|
|
1417
|
-
inputModalities?: string[];
|
|
1418
|
-
inputCapabilities?: {
|
|
1419
|
-
image: "native" | "unsupported" | "unknown";
|
|
1420
|
-
};
|
|
1421
|
-
}[];
|
|
1422
|
-
provider: string | null;
|
|
1423
|
-
model: string | null;
|
|
1424
|
-
effort: string | null;
|
|
1425
|
-
disabled: boolean;
|
|
1426
|
-
revision: string;
|
|
1427
|
-
verified: Record<string, {
|
|
1428
|
-
model: string;
|
|
1429
|
-
checkedAt: number;
|
|
1430
|
-
}>;
|
|
1431
|
-
fastModeAvailable: false;
|
|
1432
|
-
fastModeReason: string;
|
|
1433
|
-
/** Present when the caller supplied a proof for its current account gateway. */
|
|
1434
|
-
accountGatewayMatches?: boolean;
|
|
1435
|
-
}
|
|
1436
|
-
interface ProviderConnectionTestResult {
|
|
1437
|
-
status: "verified" | "failed";
|
|
1438
|
-
category?: "authentication" | "address" | "network" | "model" | "unsupported" | "service";
|
|
1439
|
-
detail: string;
|
|
1440
|
-
checkedAt: number;
|
|
1441
|
-
}
|
|
1442
|
-
type ProviderDefaultsRequest = {
|
|
1443
|
-
action: "snapshot";
|
|
1444
|
-
accountGatewayProof?: string;
|
|
1445
|
-
} | {
|
|
1446
|
-
action: "updateModel";
|
|
1447
|
-
provider?: string;
|
|
1448
|
-
model: string;
|
|
1449
|
-
effort?: string | null;
|
|
1450
|
-
expectedRevision?: string;
|
|
1451
|
-
} | {
|
|
1452
|
-
action: "updateEffort";
|
|
1453
|
-
effort: string | null;
|
|
1454
|
-
expectedRevision: string;
|
|
1455
|
-
} | {
|
|
1456
|
-
action: "test";
|
|
1457
|
-
provider: string;
|
|
1458
|
-
model: string;
|
|
1459
|
-
};
|
|
1460
|
-
|
|
1461
1286
|
declare const SYSTEM_SETTINGS_SECTIONS: readonly ["general", "notifications", "profile", "appearance", "keyboard", "providers", "permissions", "personalization", "billing", "terminal", "git", "runtime", "storage", "diagnostics"];
|
|
1462
1287
|
type SessionSettingsOriginal = Extract<SessionControlOriginal, {
|
|
1463
1288
|
action: "fork";
|
|
@@ -1495,9 +1320,6 @@ type SystemSimpleOpenInput = {
|
|
|
1495
1320
|
page: "scheduled";
|
|
1496
1321
|
taskId?: string;
|
|
1497
1322
|
scheduledRunId?: string;
|
|
1498
|
-
} | {
|
|
1499
|
-
page: "extensions";
|
|
1500
|
-
tab?: "plugins" | "skills" | "mcp";
|
|
1501
1323
|
} | {
|
|
1502
1324
|
page: "settings";
|
|
1503
1325
|
section?: (typeof SYSTEM_SETTINGS_SECTIONS)[number];
|
|
@@ -1529,6 +1351,8 @@ type DesktopNavigationTarget = {
|
|
|
1529
1351
|
taskId: string;
|
|
1530
1352
|
scheduledRunId: string;
|
|
1531
1353
|
sessionId?: string;
|
|
1354
|
+
} | {
|
|
1355
|
+
kind: "extensions";
|
|
1532
1356
|
});
|
|
1533
1357
|
type NavigationCompletionStatus = "opened" | "unavailable" | "permission_required" | "cancelled";
|
|
1534
1358
|
interface AppearancePreferences {
|
|
@@ -1579,21 +1403,7 @@ type SystemEvent = {
|
|
|
1579
1403
|
type: "git-preferences-changed";
|
|
1580
1404
|
defaultTaskLocation: "current" | "worktree";
|
|
1581
1405
|
};
|
|
1582
|
-
declare const
|
|
1583
|
-
type ChannelSettingsAction = typeof CHANNEL_SETTINGS_ACTIONS[number];
|
|
1584
|
-
type ChannelSettingsRequest = {
|
|
1585
|
-
action: ChannelSettingsAction;
|
|
1586
|
-
input?: unknown;
|
|
1587
|
-
};
|
|
1588
|
-
type ChannelSettingsResult = {
|
|
1589
|
-
value: object;
|
|
1590
|
-
} | {
|
|
1591
|
-
error: "invalid_configuration" | "conflict";
|
|
1592
|
-
};
|
|
1593
|
-
type RequestChannelSettings = (request: ChannelSettingsRequest) => Promise<ChannelSettingsResult>;
|
|
1594
|
-
/** Internal bridge used by the bundled workbench settings page. */
|
|
1595
|
-
declare function workbenchChannelSettings(system: object): RequestChannelSettings;
|
|
1596
|
-
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"];
|
|
1406
|
+
declare const SYSTEM_METHODS: readonly ["system.projects", "system.workspace", "system.pickFile", "system.open", "system.getPresentationPreferences", "system.setTheme", "system.setWindowMaterial", "system.copyText", "system.openExternal", "system.navigationReady", "system.completeNavigation"];
|
|
1597
1407
|
interface SystemMethodMap {
|
|
1598
1408
|
"system.projects": {
|
|
1599
1409
|
params: ProjectRequest;
|
|
@@ -1603,21 +1413,14 @@ interface SystemMethodMap {
|
|
|
1603
1413
|
params: LocalWorkspaceRequest;
|
|
1604
1414
|
result: LocalWorkspaceResult;
|
|
1605
1415
|
};
|
|
1606
|
-
"system.
|
|
1607
|
-
params:
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
"system.channelSettings": {
|
|
1615
|
-
params: ChannelSettingsRequest;
|
|
1616
|
-
result: ChannelSettingsResult;
|
|
1617
|
-
};
|
|
1618
|
-
"system.providerDefaults": {
|
|
1619
|
-
params: ProviderDefaultsRequest;
|
|
1620
|
-
result: ProviderDefaultsSnapshot | ProviderConnectionTestResult;
|
|
1416
|
+
"system.pickFile": {
|
|
1417
|
+
params: {
|
|
1418
|
+
filters?: {
|
|
1419
|
+
name: string;
|
|
1420
|
+
extensions: string[];
|
|
1421
|
+
}[];
|
|
1422
|
+
};
|
|
1423
|
+
result: string | null;
|
|
1621
1424
|
};
|
|
1622
1425
|
"system.open": {
|
|
1623
1426
|
params: SystemOpenWireInput;
|
|
@@ -1681,16 +1484,8 @@ interface AppHostSystem {
|
|
|
1681
1484
|
workspace<A extends LocalWorkspaceRequest["action"]>(input: Extract<LocalWorkspaceRequest, {
|
|
1682
1485
|
action: A;
|
|
1683
1486
|
}>): Promise<LocalWorkspaceResult<A>>;
|
|
1684
|
-
/**
|
|
1685
|
-
|
|
1686
|
-
/** Manages connections for the active built-in workbench. */
|
|
1687
|
-
modelProviders(input: ModelProviderRequest): Promise<ModelProviderConnection[]>;
|
|
1688
|
-
providerDefaults(input: Extract<ProviderDefaultsRequest, {
|
|
1689
|
-
action: "test";
|
|
1690
|
-
}>): Promise<ProviderConnectionTestResult>;
|
|
1691
|
-
providerDefaults(input: Exclude<ProviderDefaultsRequest, {
|
|
1692
|
-
action: "test";
|
|
1693
|
-
}>): Promise<ProviderDefaultsSnapshot>;
|
|
1487
|
+
/** Opens the file picker for the built-in workbench and returns the selected local path. */
|
|
1488
|
+
pickFile(input?: SystemMethodMap["system.pickFile"]["params"]): Promise<string | null>;
|
|
1694
1489
|
open(input: SystemOpenInput): Promise<{
|
|
1695
1490
|
opened: true;
|
|
1696
1491
|
}>;
|
|
@@ -2208,5 +2003,5 @@ interface PluginAppConversationInput {
|
|
|
2208
2003
|
|
|
2209
2004
|
declare function parsePluginAppComposerContexts(value: unknown): PluginAppConversationInput[];
|
|
2210
2005
|
|
|
2211
|
-
export { ATTACHMENTS_METHODS, AUXILIARY_METHODS, AppHostError, BROWSER_CAPTURE_PREVIEW_MAX_BYTES, COMMANDS_METHODS, DESKTOP_METHODS,
|
|
2212
|
-
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,
|
|
2006
|
+
export { ATTACHMENTS_METHODS, AUXILIARY_METHODS, AppHostError, BROWSER_CAPTURE_PREVIEW_MAX_BYTES, COMMANDS_METHODS, DESKTOP_METHODS, 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, validPresentationSnapshot, validProjectRequest, validProjectSnapshot, validResourceCatalogInput, validResourceCatalogResult, validResourceChanged, validSessionSettingsTarget, validSystemEvent, validSystemInput, validSystemResult, validWindowEvent, validWindowInput, validWindowResult, validWorkspaceOperation };
|
|
2007
|
+
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, ClientConnection, CommandInvocation, CommandReceipt, CommandsMethod, CommandsMethodMap, ConnectParams, ConversationPreparationGroup, DesktopGitChange, DesktopMethod, DesktopMethodMap, DesktopNavigationTarget, DesktopOpener, DesktopRoot, DesktopSearch, DesktopTarget, DesktopTerminal, DesktopTerminalInfo, DesktopTerminalRequestOriginal, DesktopTerminalRequestReceipt, DesktopTerminalSnapshot, DesktopText, DesktopToolEvent, DesktopWindow, FileOperationOriginal, GitOperationOriginal, JsonValue$1 as JsonValue, LocalWorkspaceRequest, LocalWorkspaceResult, LoginResult, NavigationCompletionStatus, PluginAppActionReceipt, PluginAppActionResponse, PluginAppCatalog, PluginAppComposerContext, PluginAppHostState, PluginAppModelContext, PluginAppMount, PluginAppPreparedMessage, PluginAppPreparedTool, PluginAppRecord, PluginAppSource$1 as PluginAppSource, PluginAppSubmissionReceipt, PluginAppToolPolicy, PresentationSnapshot, ProjectRequest, ProjectSnapshot, 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 };
|