@bobannomi/app-host 0.7.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/index.d.ts +19 -239
- package/dist/index.js +131 -297
- package/dist/index.js.map +3 -3
- package/dist/protocol.d.ts +19 -254
- package/dist/protocol.js +65 -261
- package/dist/protocol.js.map +3 -3
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
应用页面使用的浏览器接入库,无运行时依赖。`connectAppHost({ hostApi: "^0.1.0" })` 等待宿主页面端口并核对接口版本,返回 `AppHost`。页面通过 `hasFeature()` 判断当前文档协商的能力,实际操作由宿主再次校验权限。
|
|
6
6
|
|
|
7
|
-
用户选中的本机目录从 `host.workspace.pick()` 取得,文件由 Main 读取。获准的桌面目标用 `host.desktop.files` 和 `host.desktop.terminals
|
|
7
|
+
用户选中的本机目录从 `host.workspace.pick()` 取得,文件由 Main 读取。获准的桌面目标用 `host.desktop.files` 和 `host.desktop.terminals`。页面可直接调用 `connectAgent()`,将返回的 `clientOptions` 传给 `BobanNomiClient`,再用 `client.sessions.byId(id)` 操作会话。 [页面示例](../../apps/client-docs/examples/browser/README.md)
|
|
8
8
|
|
|
9
9
|
`host.sessions.preparation` 用 `create` 提交会话创建,用 `getResult` 查询完整原请求。`host.sessions.auxiliary` 用 `getOptions` 读取原会话可用配置,再用同一个请求执行 `open`、`get` 和 `close`。临时会话与打开它的页面相绑定。
|
|
10
10
|
|
|
@@ -58,19 +58,19 @@ JSON 方法使用非空键,文件方法使用宿主签发的文件 ID;页面
|
|
|
58
58
|
|
|
59
59
|
SDK 兼容只有 `code` 和 `message` 的错误回复。每次连接都核对版本,同一文档共用一次功能协商。若旧宿主拒绝协商并返回 `invalid_request`,`connectAppHost` 会失败,存储和登录也无法通过这次连接使用。连接成功后的普通业务错误不会断开连接。Desktop 在协商 `extended-errors-v1` 前使用旧错误字段和错误码。功能协商与授权分开,Agent 和应用服务仍需要对应批准及实际运行适配器。`createPageFetchClient({send,onMessage,onClose})` 用宿主给出的连接信息构造可注入标准 Client SDK 的 fetch。
|
|
60
60
|
|
|
61
|
-
|
|
61
|
+
页面通过 `connectAgent()` 取得 `clientOptions` 后,可用 Client SDK 的 `client.models.list()`、`client.agents.list()` 和 `client.skills.list()` 读取模型、角色和技能。审批和提问由会话内入口处理,已接纳的 Run 在关页后继续沿原配置执行。
|
|
62
62
|
|
|
63
|
-
|
|
63
|
+
用户点击「选择目录」时,调用 `host.workspace.pick()` 打开 Nomi 的本机目录选择器。取消返回 `null`。选中的目录提供 `listFiles()` 和 `readText(path)`,默认列根目录,路径相对于所选目录。可用 `host.workspace.open(id)` 重新取得已选目录。Electron 主进程处理本机读操作并逐次核对授权。需要在页面刷新后核对原选择时,先保存 `requestId`,再调用 `pick({ requestId })`。用 `getSelection({ requestId })` 查询原回执,完成后按回执中的目录 ID 调用 `open(id)`。选择操作不自动重试。
|
|
64
64
|
|
|
65
65
|
## 应用提供模型目录
|
|
66
66
|
|
|
67
|
-
页面用 `
|
|
67
|
+
页面用 `connectAgent()` 取得 `clientOptions`,再用 `new BobanNomiClient({ ...clientOptions, providers })` 传入应用自己的供应商。每个供应商提供模型列表和包含模型服务地址与 API key 的 `connection`。应用用 `client.models.list()` 展示选项,按用户选中的供应商和模型 ID 创建会话和发消息。 [应用内 Agent 示例](../../apps/client-docs/src/content/docs/guides/app-agent.mdx)
|
|
68
68
|
|
|
69
69
|
## Desktop tools
|
|
70
70
|
|
|
71
71
|
根入口提供 `parsePluginAppComposerContexts`,校验插件输入框上下文。历史交互和 MCP 工具结果从各自的合同包读取。
|
|
72
72
|
|
|
73
|
-
`
|
|
73
|
+
`connectAgent()` 由包的根入口导出,可以直接打开当前产品的 daemon 连接。将返回的 `clientOptions` 交给 Client SDK,按会话 ID 读取历史、订阅事件,或继续有执行权限的用户会话。Daemon 按每次访问的会话及操作核对授权。调用附件、辅助会话和原生文件工具时,通过 `connectAppHost()` 打开对应的宿主入口。执行目录是创建请求的业务参数。
|
|
74
74
|
|
|
75
75
|
`host.desktop` fixes an explicit target (scope, draft revision, optional actual root and session), then exposes typed files, Git, terminal, window, browser annotation/capture and MCP App operations. `host.attachments.getConnection` also supports a draft-only target. `host.sessions.auxiliary` exposes options, open, query and close using the original standard connection. Each wire method validates both request and reply. Connections are recorded in a per-document WeakMap, and a fabricated or foreign document connection cannot be bound. The three negotiated features are only available when their actual host services are assembled. Recovery methods query original request receipts.
|
|
76
76
|
|
package/dist/index.d.ts
CHANGED
|
@@ -47,7 +47,7 @@ declare class AppHostError extends Error {
|
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
49
|
|
|
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-
|
|
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-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"];
|
|
51
51
|
type AppHostFeature = (typeof APP_HOST_FEATURES)[number];
|
|
52
52
|
type FetchDirection = "upload" | "download";
|
|
53
53
|
type PageFetchFrame = {
|
|
@@ -416,7 +416,9 @@ interface ConnectionStreams {
|
|
|
416
416
|
fetchFor(id: string, base: string): typeof fetch;
|
|
417
417
|
isClosed?(id: string): boolean;
|
|
418
418
|
}
|
|
419
|
-
/**
|
|
419
|
+
/** Opens the product daemon through fixed preload IPC, independently of desktop tool messages. */
|
|
420
|
+
declare function connectAgent(): Promise<AgentConnection>;
|
|
421
|
+
/** A Client transport. Pass an AbortSignal to cancel an individual request. */
|
|
420
422
|
interface AgentConnection {
|
|
421
423
|
/** Optional location hint. Execution always uses the Session/Run's persisted root. */
|
|
422
424
|
readonly cwd?: string;
|
|
@@ -425,7 +427,7 @@ interface AgentConnection {
|
|
|
425
427
|
readonly baseUrl: string;
|
|
426
428
|
readonly fetch: typeof fetch;
|
|
427
429
|
};
|
|
428
|
-
/** True once
|
|
430
|
+
/** True once this connection can no longer accept requests. */
|
|
429
431
|
isClosed?(): boolean;
|
|
430
432
|
}
|
|
431
433
|
|
|
@@ -1159,53 +1161,6 @@ declare function createAppDesktopApi(rpc: {
|
|
|
1159
1161
|
/** Persist this normalized original alongside a request ID; recovery sends exactly that request. */
|
|
1160
1162
|
declare function canonicalDesktopRequest(value: unknown): string;
|
|
1161
1163
|
|
|
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
1164
|
/** Project records and filesystem locations have separate business identities. */
|
|
1210
1165
|
interface SystemProject {
|
|
1211
1166
|
workspaceId: string;
|
|
@@ -1229,16 +1184,9 @@ type Project = Scope & {
|
|
|
1229
1184
|
projectId: string;
|
|
1230
1185
|
workspaceId: string;
|
|
1231
1186
|
};
|
|
1232
|
-
type ProjectRequest = {
|
|
1233
|
-
action: "list";
|
|
1234
|
-
} | Scope & {
|
|
1187
|
+
type ProjectRequest = Scope & {
|
|
1235
1188
|
action: "register";
|
|
1236
1189
|
workspaceId: string;
|
|
1237
|
-
} | Project & {
|
|
1238
|
-
action: "setDefaultShell";
|
|
1239
|
-
shell: string | null;
|
|
1240
|
-
} | Project & {
|
|
1241
|
-
action: "archive";
|
|
1242
1190
|
} | Project & {
|
|
1243
1191
|
action: "rebind";
|
|
1244
1192
|
previousWorkspaceId: string;
|
|
@@ -1294,6 +1242,7 @@ type Entry<Input, Result> = {
|
|
|
1294
1242
|
input: Input;
|
|
1295
1243
|
result: Result;
|
|
1296
1244
|
};
|
|
1245
|
+
type GitRead<M extends "desktop.git.changes" | "desktop.git.diff"> = Entry<Root & Omit<DesktopMethodMap[M]["params"], "targetId">, DesktopMethodMap[M]["result"]>;
|
|
1297
1246
|
type LocalWorkspaceActions = {
|
|
1298
1247
|
pick: Entry<{}, Required<Root> & {
|
|
1299
1248
|
workspaceId: string;
|
|
@@ -1321,6 +1270,8 @@ type LocalWorkspaceActions = {
|
|
|
1321
1270
|
webPreview: Entry<File, {
|
|
1322
1271
|
url: string;
|
|
1323
1272
|
}>;
|
|
1273
|
+
gitChanges: GitRead<"desktop.git.changes">;
|
|
1274
|
+
gitDiff: GitRead<"desktop.git.diff">;
|
|
1324
1275
|
};
|
|
1325
1276
|
type Action = keyof LocalWorkspaceActions;
|
|
1326
1277
|
type LocalWorkspaceRequest = {
|
|
@@ -1330,134 +1281,6 @@ type LocalWorkspaceRequest = {
|
|
|
1330
1281
|
}[Action];
|
|
1331
1282
|
type LocalWorkspaceResult<A extends Action = Action> = LocalWorkspaceActions[A]["result"];
|
|
1332
1283
|
|
|
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
1284
|
declare const SYSTEM_SETTINGS_SECTIONS: readonly ["general", "notifications", "profile", "appearance", "keyboard", "providers", "permissions", "personalization", "billing", "terminal", "git", "runtime", "storage", "diagnostics"];
|
|
1462
1285
|
type SessionSettingsOriginal = Extract<SessionControlOriginal, {
|
|
1463
1286
|
action: "fork";
|
|
@@ -1495,9 +1318,6 @@ type SystemSimpleOpenInput = {
|
|
|
1495
1318
|
page: "scheduled";
|
|
1496
1319
|
taskId?: string;
|
|
1497
1320
|
scheduledRunId?: string;
|
|
1498
|
-
} | {
|
|
1499
|
-
page: "extensions";
|
|
1500
|
-
tab?: "plugins" | "skills" | "mcp";
|
|
1501
1321
|
} | {
|
|
1502
1322
|
page: "settings";
|
|
1503
1323
|
section?: (typeof SYSTEM_SETTINGS_SECTIONS)[number];
|
|
@@ -1529,6 +1349,8 @@ type DesktopNavigationTarget = {
|
|
|
1529
1349
|
taskId: string;
|
|
1530
1350
|
scheduledRunId: string;
|
|
1531
1351
|
sessionId?: string;
|
|
1352
|
+
} | {
|
|
1353
|
+
kind: "extensions";
|
|
1532
1354
|
});
|
|
1533
1355
|
type NavigationCompletionStatus = "opened" | "unavailable" | "permission_required" | "cancelled";
|
|
1534
1356
|
interface AppearancePreferences {
|
|
@@ -1579,21 +1401,7 @@ type SystemEvent = {
|
|
|
1579
1401
|
type: "git-preferences-changed";
|
|
1580
1402
|
defaultTaskLocation: "current" | "worktree";
|
|
1581
1403
|
};
|
|
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"];
|
|
1404
|
+
declare const SYSTEM_METHODS: readonly ["system.projects", "system.workspace", "system.open", "system.getPresentationPreferences", "system.setTheme", "system.setWindowMaterial", "system.copyText", "system.openExternal", "system.navigationReady", "system.completeNavigation"];
|
|
1597
1405
|
interface SystemMethodMap {
|
|
1598
1406
|
"system.projects": {
|
|
1599
1407
|
params: ProjectRequest;
|
|
@@ -1603,22 +1411,6 @@ interface SystemMethodMap {
|
|
|
1603
1411
|
params: LocalWorkspaceRequest;
|
|
1604
1412
|
result: LocalWorkspaceResult;
|
|
1605
1413
|
};
|
|
1606
|
-
"system.extensions": {
|
|
1607
|
-
params: ExtensionRequest;
|
|
1608
|
-
result: unknown;
|
|
1609
|
-
};
|
|
1610
|
-
"system.modelProviders": {
|
|
1611
|
-
params: ModelProviderRequest;
|
|
1612
|
-
result: ModelProviderConnection[];
|
|
1613
|
-
};
|
|
1614
|
-
"system.channelSettings": {
|
|
1615
|
-
params: ChannelSettingsRequest;
|
|
1616
|
-
result: ChannelSettingsResult;
|
|
1617
|
-
};
|
|
1618
|
-
"system.providerDefaults": {
|
|
1619
|
-
params: ProviderDefaultsRequest;
|
|
1620
|
-
result: ProviderDefaultsSnapshot | ProviderConnectionTestResult;
|
|
1621
|
-
};
|
|
1622
1414
|
"system.open": {
|
|
1623
1415
|
params: SystemOpenWireInput;
|
|
1624
1416
|
result: {
|
|
@@ -1681,16 +1473,6 @@ interface AppHostSystem {
|
|
|
1681
1473
|
workspace<A extends LocalWorkspaceRequest["action"]>(input: Extract<LocalWorkspaceRequest, {
|
|
1682
1474
|
action: A;
|
|
1683
1475
|
}>): Promise<LocalWorkspaceResult<A>>;
|
|
1684
|
-
/** Requires the explicit extensions.manage installation capability. */
|
|
1685
|
-
extensions(input: ExtensionRequest): Promise<unknown>;
|
|
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>;
|
|
1694
1476
|
open(input: SystemOpenInput): Promise<{
|
|
1695
1477
|
opened: true;
|
|
1696
1478
|
}>;
|
|
@@ -1889,11 +1671,6 @@ declare function createAppAuxiliarySessionsApi(rpc: {
|
|
|
1889
1671
|
request<M extends AuxiliaryMethod>(method: M, params: AuxiliaryMethodMap[M]["params"]): Promise<AuxiliaryMethodMap[M]["result"]>;
|
|
1890
1672
|
}, streams: ConnectionStreams): AuxiliarySessionsGroup;
|
|
1891
1673
|
|
|
1892
|
-
interface AppHostSessions {
|
|
1893
|
-
preparation: ConversationPreparationGroup;
|
|
1894
|
-
auxiliary: AuxiliarySessionsGroup;
|
|
1895
|
-
}
|
|
1896
|
-
|
|
1897
1674
|
interface ServiceConnection {
|
|
1898
1675
|
readonly baseUrl: string;
|
|
1899
1676
|
readonly apiVersion: string;
|
|
@@ -2133,6 +1910,11 @@ interface NativeWindowControls {
|
|
|
2133
1910
|
}
|
|
2134
1911
|
declare function createAppWindowApi(requester: WindowRequester, native?: NativeWindowControls): AppHostWindow;
|
|
2135
1912
|
|
|
1913
|
+
interface AppHostSessions {
|
|
1914
|
+
preparation: ConversationPreparationGroup;
|
|
1915
|
+
auxiliary: AuxiliarySessionsGroup;
|
|
1916
|
+
}
|
|
1917
|
+
|
|
2136
1918
|
interface AppHostStorage {
|
|
2137
1919
|
get(key: string): Promise<StorageGetResult>;
|
|
2138
1920
|
set(key: string, value: JsonValue$1): Promise<void>;
|
|
@@ -2147,8 +1929,6 @@ interface AppHost {
|
|
|
2147
1929
|
lifecycle: AppHostLifecycle;
|
|
2148
1930
|
system: AppHostSystem;
|
|
2149
1931
|
window: AppHostWindow;
|
|
2150
|
-
/** Get the host-managed Agent connection authorized for the current page. */
|
|
2151
|
-
getAuthorizedAgentConnection(): Promise<AgentConnection>;
|
|
2152
1932
|
sessions: AppHostSessions;
|
|
2153
1933
|
desktop: AppHostDesktop;
|
|
2154
1934
|
attachments: AppHostAttachments;
|
|
@@ -2208,5 +1988,5 @@ interface PluginAppConversationInput {
|
|
|
2208
1988
|
|
|
2209
1989
|
declare function parsePluginAppComposerContexts(value: unknown): PluginAppConversationInput[];
|
|
2210
1990
|
|
|
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,
|
|
1991
|
+
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, connectAgent, 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 };
|
|
1992
|
+
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 };
|