@agentknight/sdk 0.9.68 → 0.9.72

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.
Files changed (30) hide show
  1. package/dist/chunks/{acp-adapter-RZX5SUB3.js → acp-adapter-PCNN2NAJ.js} +41 -4
  2. package/dist/chunks/{chunk-Y6NCJB55.js → chunk-23BKGY5J.js} +4 -4
  3. package/dist/chunks/{chunk-UHRUQM4D.js → chunk-2UHBY25U.js} +1 -1
  4. package/dist/chunks/{chunk-CFQQOAQV.js → chunk-36KL4FSH.js} +2 -2
  5. package/dist/chunks/{chunk-FY4XTWUF.js → chunk-5BDFZ3AS.js} +4 -13
  6. package/dist/chunks/{chunk-DWTXWVIA.js → chunk-5FJJZCP6.js} +683 -629
  7. package/dist/chunks/{chunk-B777YB6E.js → chunk-DXHAKWGO.js} +2 -2
  8. package/dist/chunks/{chunk-35OF2ZNS.js → chunk-E5VHBC55.js} +14 -0
  9. package/dist/chunks/{chunk-MB3H6HEI.js → chunk-FQ26TSDG.js} +2 -2
  10. package/dist/chunks/{chunk-Q5OUZJCZ.js → chunk-GRUDMHEJ.js} +1 -1
  11. package/dist/chunks/{chunk-AWVC5NX4.js → chunk-I42IONUU.js} +1 -1
  12. package/dist/chunks/{chunk-4XT65OSG.js → chunk-KPHWVNKP.js} +46 -3
  13. package/dist/chunks/{chunk-EDYVCZIR.js → chunk-PAJZL5ST.js} +7 -2
  14. package/dist/chunks/{chunk-LCA2MWOQ.js → chunk-TFUSRA2B.js} +2 -2
  15. package/dist/chunks/chunk-UTF7KLMJ.js +11 -0
  16. package/dist/chunks/chunk-VEJLENEQ.js +174 -0
  17. package/dist/chunks/chunk-VOR4AECB.js +78 -0
  18. package/dist/chunks/{claude-adapter-FQSQIYUY.js → claude-adapter-A4LPYQ2Z.js} +296 -223
  19. package/dist/chunks/{codex-adapter-TOXSRT2W.js → codex-adapter-AFGS7MPX.js} +249 -66
  20. package/dist/chunks/{copilot-adapter-KUCX7XQW.js → copilot-adapter-NXJTI2HY.js} +27 -70
  21. package/dist/chunks/{managed-agent-adapter-LGBRXDGP.js → managed-agent-adapter-4C2PWD4V.js} +9 -7
  22. package/dist/chunks/{pi-adapter-RXNZSE4F.js → pi-adapter-EZOIK5RA.js} +7 -9
  23. package/dist/configuration.js +4 -4
  24. package/dist/index.d.ts +153 -8
  25. package/dist/index.js +183 -57
  26. package/dist/runtime.js +2 -2
  27. package/dist/session-analytics-worker.js +6 -7
  28. package/package.json +2 -3
  29. package/dist/chunks/chunk-IXGVSREH.js +0 -48
  30. package/dist/chunks/chunk-T6226JFS.js +0 -55
@@ -1,7 +1,6 @@
1
1
  import {
2
2
  LiveTimelineProjection,
3
3
  NotGitDirectoryError,
4
- PromptPreparationError,
5
4
  SESSION_PROJECT_IDENTITY_CONCURRENCY,
6
5
  SessionDirectoryLister,
7
6
  SessionProjectIdentityError,
@@ -18,47 +17,50 @@ import {
18
17
  recordTimelineSyncDiagnostic,
19
18
  resolveGitProjectIdentity,
20
19
  sanitizeGitRemoteUrl
21
- } from "./chunk-FY4XTWUF.js";
20
+ } from "./chunk-5BDFZ3AS.js";
22
21
  import "./chunk-IJPJQF7S.js";
23
22
  import {
24
23
  AnalyticsIndexResultSchema,
25
24
  AnalyticsReplySchema,
26
25
  openSessionEventLog,
27
26
  readSessionUpdatePage
28
- } from "./chunk-Y6NCJB55.js";
27
+ } from "./chunk-23BKGY5J.js";
29
28
  import {
30
29
  ConversationNormalizer,
31
30
  isDisplayableHumanMessage
32
- } from "./chunk-EDYVCZIR.js";
31
+ } from "./chunk-PAJZL5ST.js";
33
32
  import {
34
33
  assertMainSessionId,
35
34
  isResearchSessionId
36
- } from "./chunk-AWVC5NX4.js";
35
+ } from "./chunk-I42IONUU.js";
37
36
  import {
38
37
  GroupChatError,
39
38
  GroupChatMessageSchema,
40
39
  GroupChatRuntime
41
- } from "./chunk-MB3H6HEI.js";
40
+ } from "./chunk-FQ26TSDG.js";
41
+ import {
42
+ PromptPreparationError
43
+ } from "./chunk-UTF7KLMJ.js";
42
44
  import {
43
45
  deletePromptAttachments,
44
46
  stagePromptAttachments,
45
47
  validatePromptAttachments
46
- } from "./chunk-B777YB6E.js";
48
+ } from "./chunk-DXHAKWGO.js";
47
49
  import {
48
50
  CopilotSessionCompatibilityClient,
51
+ copilotRuntimeOptions,
49
52
  resolveCopilotSessionDirectory,
50
53
  resumeWithCopilotSessionCompatibility
51
- } from "./chunk-35OF2ZNS.js";
52
- import "./chunk-4XT65OSG.js";
53
- import "./chunk-IXGVSREH.js";
54
+ } from "./chunk-E5VHBC55.js";
55
+ import "./chunk-KPHWVNKP.js";
54
56
  import {
55
57
  AgentSessionRenameError,
56
58
  TimelinePageBudgetError,
57
59
  validateSessionName
58
- } from "./chunk-CFQQOAQV.js";
60
+ } from "./chunk-36KL4FSH.js";
59
61
  import {
60
62
  SessionOperationError
61
- } from "./chunk-UHRUQM4D.js";
63
+ } from "./chunk-2UHBY25U.js";
62
64
  import {
63
65
  ConversationItemSchema,
64
66
  CopilotModelOptionSchema,
@@ -80,14 +82,14 @@ import {
80
82
  WorkbenchScheduleProposalSchema,
81
83
  WorkbenchScheduleSnapshotSchema,
82
84
  WorkbenchTelemetrySchema
83
- } from "./chunk-DWTXWVIA.js";
85
+ } from "./chunk-5FJJZCP6.js";
84
86
 
85
87
  // src/copilot-adapter.ts
86
88
  import { createHash as createHash3, randomUUID as randomUUID5 } from "node:crypto";
87
- import { existsSync, statSync } from "node:fs";
89
+ import { readFileSync } from "node:fs";
88
90
  import { readFile as readFile2, realpath, stat } from "node:fs/promises";
89
- import { createRequire } from "node:module";
90
- import { basename, dirname, extname, isAbsolute, join as join2, relative, resolve } from "node:path";
91
+ import { findPackageJSON } from "node:module";
92
+ import { basename, extname, isAbsolute, relative, resolve } from "node:path";
91
93
 
92
94
  // src/adapters/copilot/runtime/client-runtime.ts
93
95
  var CopilotClientRuntime = class {
@@ -1664,8 +1666,7 @@ var TimelineHistory = class {
1664
1666
  // src/copilot-adapter.ts
1665
1667
  import {
1666
1668
  CopilotClient,
1667
- defineTool as defineTool2,
1668
- RuntimeConnection
1669
+ defineTool as defineTool2
1669
1670
  } from "@github/copilot-sdk";
1670
1671
  import { z as z5 } from "zod";
1671
1672
 
@@ -3642,59 +3643,16 @@ var NativeCopilotModelOptionSchema = CopilotModelOptionSchema.extend({
3642
3643
  var GIT_REMOTE_CACHE_TTL_MS = 5 * 60 * 1e3;
3643
3644
  var GIT_REMOTE_FAILURE_CACHE_TTL_MS = 30 * 1e3;
3644
3645
  var GIT_REMOTE_FAILURE_CACHE_LIMIT = 256;
3645
- var require2 = createRequire(import.meta.url);
3646
- function resolveCopilotRuntimePath(environment = process.env) {
3647
- return environment["COPILOT_CLI_PATH"] ?? require2.resolve("@github/copilot/npm-loader.js");
3648
- }
3649
- function assertCopilotInProcessRuntime() {
3650
- try {
3651
- const entrypoint = process.env["COPILOT_CLI_PATH"];
3652
- let platform = process.platform;
3653
- if (platform === "linux") {
3654
- const report = process.report?.getReport();
3655
- const header = z5.object({ header: z5.object({ glibcVersionRuntime: z5.string().optional() }) }).safeParse(report);
3656
- const musl = entrypoint?.includes(`copilot-linuxmusl-${process.arch}`) || !entrypoint?.includes(`copilot-linux-${process.arch}`) && (!header.success || header.data.header.glibcVersionRuntime === void 0);
3657
- if (musl) platform = "linuxmusl";
3658
- }
3659
- const target = `${platform}-${process.arch}`;
3660
- const files = [];
3661
- if (entrypoint) {
3662
- const directory = dirname(resolve(entrypoint));
3663
- const adjacent = join2(directory, "runtime.node");
3664
- files.push(existsSync(adjacent) ? adjacent : join2(directory, "prebuilds", target, "runtime.node"));
3665
- } else {
3666
- const sdkRequire = createRequire(require2.resolve("@github/copilot-sdk"));
3667
- const directory = dirname(sdkRequire.resolve(`@github/copilot-sdk-${target}/package.json`));
3668
- const prebuild = join2(directory, "prebuilds", target);
3669
- files.push(
3670
- join2(prebuild, "runtime.node"),
3671
- join2(prebuild, process.platform === "win32" ? "copilot-runtime.exe" : "copilot-runtime")
3672
- );
3673
- }
3674
- for (const path of files) {
3675
- const file = statSync(path);
3676
- if (!file.isFile() || file.size === 0) throw new Error(`Missing Copilot native runtime file: ${path}`);
3677
- }
3678
- } catch (error) {
3679
- throw new Error(
3680
- "Copilot inprocess runtime is unavailable. Unset COPILOT_SDK_DEFAULT_CONNECTION or set it to stdio to use the bundled CLI; inprocess requires a full SDK installation with its platform runtime, or COPILOT_CLI_PATH with an adjacent native runtime.",
3681
- { cause: error }
3682
- );
3683
- }
3646
+ function copilotSdkVersion() {
3647
+ const manifest = findPackageJSON("@github/copilot-sdk", import.meta.url);
3648
+ if (manifest === void 0) throw new Error("Cannot locate the installed Copilot SDK manifest");
3649
+ return z5.object({ version: z5.string().min(1) }).parse(JSON.parse(readFileSync(manifest, "utf8"))).version;
3684
3650
  }
3685
3651
  function createCopilotClient() {
3686
- const defaultConnection = process.env["COPILOT_SDK_DEFAULT_CONNECTION"]?.toLowerCase() || void 0;
3687
- if (defaultConnection === "inprocess") assertCopilotInProcessRuntime();
3688
- const client = defaultConnection !== void 0 && defaultConnection !== "stdio" ? new CopilotClient({ mode: "copilot-cli" }) : new CopilotClient({
3689
- mode: "copilot-cli",
3690
- connection: RuntimeConnection.forStdio({
3691
- path: resolveCopilotRuntimePath()
3692
- })
3693
- });
3694
- return Object.assign(client, {
3652
+ return Object.assign(new CopilotClient({ mode: "copilot-cli", ...copilotRuntimeOptions() }), {
3695
3653
  supportsFileAttachments: true,
3696
- supportsLocalSubmissionTime: process.env["COPILOT_CLI_PATH"] === void 0,
3697
- supportsAttachmentPreservingQueueEdits: (defaultConnection === void 0 || defaultConnection === "stdio") && process.env["COPILOT_CLI_PATH"] === void 0
3654
+ supportsLocalSubmissionTime: true,
3655
+ supportsAttachmentPreservingQueueEdits: process.env["COPILOT_SDK_DEFAULT_CONNECTION"]?.toLowerCase() !== "inprocess"
3698
3656
  });
3699
3657
  }
3700
3658
  var MAX_HTML_PREVIEW_BYTES = 512 * 1024;
@@ -3948,7 +3906,7 @@ var GithubCopilotAdapter = class {
3948
3906
  resolveImages: (sessionId, session, normalizer, readOnly) => this.#images.resolveTimelineImageAssets(sessionId, session, normalizer, readOnly)
3949
3907
  });
3950
3908
  agentId = "copilot";
3951
- sdkVersion = "1.0.26";
3909
+ sdkVersion = copilotSdkVersion();
3952
3910
  agentModes = ["interactive", "plan", "autopilot"];
3953
3911
  supportsReasoningEffort = true;
3954
3912
  supportsContextTier = true;
@@ -5159,6 +5117,5 @@ export {
5159
5117
  GithubCopilotAdapter,
5160
5118
  mapSessionMetadata,
5161
5119
  openExternalUrl,
5162
- resolveCopilotRuntimePath,
5163
5120
  sanitizeGitRemoteUrl
5164
5121
  };
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  AgentSelectionSchema,
3
3
  assertSelectionSnapshotFits
4
- } from "./chunk-LCA2MWOQ.js";
4
+ } from "./chunk-TFUSRA2B.js";
5
5
  import {
6
6
  isResearchSessionId
7
- } from "./chunk-AWVC5NX4.js";
7
+ } from "./chunk-I42IONUU.js";
8
8
  import {
9
9
  GroupChatError
10
- } from "./chunk-MB3H6HEI.js";
10
+ } from "./chunk-FQ26TSDG.js";
11
11
  import {
12
12
  AgentModelListingError,
13
13
  AgentSessionRenameError,
@@ -16,14 +16,14 @@ import {
16
16
  UnsupportedAgentOperationError,
17
17
  captureWorkbenchAccess,
18
18
  validateSessionName
19
- } from "./chunk-CFQQOAQV.js";
19
+ } from "./chunk-36KL4FSH.js";
20
20
  import {
21
21
  SessionOperationError
22
- } from "./chunk-UHRUQM4D.js";
22
+ } from "./chunk-2UHBY25U.js";
23
23
  import {
24
24
  InteractionResponseSchema,
25
25
  SessionSummarySchema
26
- } from "./chunk-DWTXWVIA.js";
26
+ } from "./chunk-5FJJZCP6.js";
27
27
 
28
28
  // src/managed-agent-adapter.ts
29
29
  import { createHash, randomUUID } from "node:crypto";
@@ -394,6 +394,8 @@ var ManagedCodingAgentAdapter = class {
394
394
  const route = this.#route(id);
395
395
  return {
396
396
  supportsFileAttachments: route.runtime.supportsFileAttachments === true,
397
+ supportsImageAttachments: route.runtime.supportsImageAttachments ?? route.runtime.supportsFileAttachments === true,
398
+ supportsSessionDelete: route.runtime.supportsSessionDelete === true && route.runtime.deleteSession !== void 0,
397
399
  ...route.runtime.getSessionCapabilities?.(route.nativeId) ?? {
398
400
  agentModes: route.runtime.agentModes,
399
401
  supportsReasoningEffort: route.runtime.supportsReasoningEffort,
@@ -694,7 +696,7 @@ var ManagedCodingAgentAdapter = class {
694
696
  deleteSession(id) {
695
697
  return this.#exclusive(async () => {
696
698
  const route = this.#route(id);
697
- if (!route.runtime.supportsSessionDelete || !route.runtime.deleteSession) {
699
+ if (!route.runtime.supportsSessionDelete || !route.runtime.deleteSession || route.runtime.getSessionCapabilities?.(route.nativeId).supportsSessionDelete === false) {
698
700
  throw new UnsupportedAgentOperationError(route.provider.candidate.id, "session deletion");
699
701
  }
700
702
  const previous = this.#deleted;
@@ -1,29 +1,27 @@
1
1
  import {
2
2
  stagePromptAttachments,
3
3
  validatePromptAttachments
4
- } from "./chunk-B777YB6E.js";
5
- import "./chunk-35OF2ZNS.js";
4
+ } from "./chunk-DXHAKWGO.js";
5
+ import "./chunk-E5VHBC55.js";
6
6
  import {
7
7
  decodeTimelineImage,
8
+ latestPreviewItems,
8
9
  normalizeImageMimeType,
9
10
  splitTimelineImages
10
- } from "./chunk-4XT65OSG.js";
11
- import {
12
- latestPreviewItems
13
- } from "./chunk-IXGVSREH.js";
11
+ } from "./chunk-KPHWVNKP.js";
14
12
  import {
15
13
  AgentSessionRenameError,
16
14
  SessionDeletionRejectedError,
17
15
  UnsupportedAgentOperationError,
18
16
  validateSessionName
19
- } from "./chunk-CFQQOAQV.js";
20
- import "./chunk-UHRUQM4D.js";
17
+ } from "./chunk-36KL4FSH.js";
18
+ import "./chunk-2UHBY25U.js";
21
19
  import {
22
20
  ConversationAttachmentSchema,
23
21
  InteractionRequestSchema,
24
22
  REASONING_EFFORTS,
25
23
  SESSION_TIMELINE_PAGE_SIZE
26
- } from "./chunk-DWTXWVIA.js";
24
+ } from "./chunk-5FJJZCP6.js";
27
25
 
28
26
  // src/pi-adapter.ts
29
27
  import { createHash as createHash2, randomUUID } from "node:crypto";
@@ -5,16 +5,16 @@ import {
5
5
  } from "./chunks/chunk-VIWTNPVC.js";
6
6
  import {
7
7
  AgentSelectionSchema
8
- } from "./chunks/chunk-LCA2MWOQ.js";
8
+ } from "./chunks/chunk-TFUSRA2B.js";
9
9
  import {
10
10
  SessionImageRelayUrlSchema,
11
11
  SessionImagesConfigSchema
12
12
  } from "./chunks/chunk-IJPJQF7S.js";
13
13
  import {
14
14
  CODING_AGENT_IDS
15
- } from "./chunks/chunk-CFQQOAQV.js";
16
- import "./chunks/chunk-UHRUQM4D.js";
17
- import "./chunks/chunk-DWTXWVIA.js";
15
+ } from "./chunks/chunk-36KL4FSH.js";
16
+ import "./chunks/chunk-2UHBY25U.js";
17
+ import "./chunks/chunk-5FJJZCP6.js";
18
18
  export {
19
19
  AgentSelectionSchema,
20
20
  CODING_AGENT_IDS,
package/dist/index.d.ts CHANGED
@@ -204,6 +204,141 @@ declare const SecureDeliveryErrorSchema: z.ZodObject<{
204
204
  }, z.core.$strict>;
205
205
  type SecureDeliveryError = z.infer<typeof SecureDeliveryErrorSchema>;
206
206
 
207
+ declare const InventoryPublishSchema: z.ZodObject<{
208
+ requestMessageId: z.ZodString;
209
+ objectId: z.ZodUUID;
210
+ ticket: z.ZodDiscriminatedUnion<[z.ZodObject<{
211
+ version: z.ZodLiteral<1>;
212
+ algorithm: z.ZodLiteral<"A256GCM">;
213
+ messageId: z.ZodString;
214
+ machineId: z.ZodString;
215
+ clientId: z.ZodString;
216
+ recipientClientId: z.ZodOptional<z.ZodString>;
217
+ keyId: z.ZodString;
218
+ sentAt: z.ZodNumber;
219
+ nonce: z.ZodString;
220
+ ciphertext: z.ZodString;
221
+ sender: z.ZodLiteral<"pc">;
222
+ event: z.ZodEnum<{
223
+ "conversation.activity.step.upsert": "conversation.activity.step.upsert";
224
+ "conversation.item.upsert": "conversation.item.upsert";
225
+ "interaction.request": "interaction.request";
226
+ "interaction.respond.result": "interaction.respond.result";
227
+ "permission.request": "permission.request";
228
+ "permission.respond.result": "permission.respond.result";
229
+ "session.abort.result": "session.abort.result";
230
+ "session.activity": "session.activity";
231
+ "session.communication": "session.communication";
232
+ "session.configure.result": "session.configure.result";
233
+ "session.create.result": "session.create.result";
234
+ "session.delete.result": "session.delete.result";
235
+ "session.list.result": "session.list.result";
236
+ "session.options.result": "session.options.result";
237
+ "session.prompt.result": "session.prompt.result";
238
+ "session.remote.result": "session.remote.result";
239
+ "session.timeline.invalidated": "session.timeline.invalidated";
240
+ "session.timeline.page.result": "session.timeline.page.result";
241
+ "session.watch.result": "session.watch.result";
242
+ "sessions.snapshot": "sessions.snapshot";
243
+ }>;
244
+ }, z.core.$strict>, z.ZodObject<{
245
+ version: z.ZodLiteral<1>;
246
+ algorithm: z.ZodLiteral<"A256GCM">;
247
+ messageId: z.ZodString;
248
+ machineId: z.ZodString;
249
+ clientId: z.ZodString;
250
+ recipientClientId: z.ZodOptional<z.ZodString>;
251
+ keyId: z.ZodString;
252
+ sentAt: z.ZodNumber;
253
+ nonce: z.ZodString;
254
+ ciphertext: z.ZodString;
255
+ sender: z.ZodLiteral<"mobile">;
256
+ event: z.ZodEnum<{
257
+ "interaction.respond": "interaction.respond";
258
+ "permission.respond": "permission.respond";
259
+ "session.abort": "session.abort";
260
+ "session.communication": "session.communication";
261
+ "session.configure": "session.configure";
262
+ "session.create": "session.create";
263
+ "session.delete": "session.delete";
264
+ "session.list": "session.list";
265
+ "session.options": "session.options";
266
+ "session.prompt": "session.prompt";
267
+ "session.remote": "session.remote";
268
+ "session.timeline.page": "session.timeline.page";
269
+ "session.watch": "session.watch";
270
+ }>;
271
+ }, z.core.$strict>], "sender">;
272
+ ciphertext: z.ZodOptional<z.ZodString>;
273
+ }, z.core.$strict>;
274
+ type InventoryPublish = z.infer<typeof InventoryPublishSchema>;
275
+ declare const InventoryDeliverySchema: z.ZodObject<{
276
+ ticket: z.ZodDiscriminatedUnion<[z.ZodObject<{
277
+ version: z.ZodLiteral<1>;
278
+ algorithm: z.ZodLiteral<"A256GCM">;
279
+ messageId: z.ZodString;
280
+ machineId: z.ZodString;
281
+ clientId: z.ZodString;
282
+ recipientClientId: z.ZodOptional<z.ZodString>;
283
+ keyId: z.ZodString;
284
+ sentAt: z.ZodNumber;
285
+ nonce: z.ZodString;
286
+ ciphertext: z.ZodString;
287
+ sender: z.ZodLiteral<"pc">;
288
+ event: z.ZodEnum<{
289
+ "conversation.activity.step.upsert": "conversation.activity.step.upsert";
290
+ "conversation.item.upsert": "conversation.item.upsert";
291
+ "interaction.request": "interaction.request";
292
+ "interaction.respond.result": "interaction.respond.result";
293
+ "permission.request": "permission.request";
294
+ "permission.respond.result": "permission.respond.result";
295
+ "session.abort.result": "session.abort.result";
296
+ "session.activity": "session.activity";
297
+ "session.communication": "session.communication";
298
+ "session.configure.result": "session.configure.result";
299
+ "session.create.result": "session.create.result";
300
+ "session.delete.result": "session.delete.result";
301
+ "session.list.result": "session.list.result";
302
+ "session.options.result": "session.options.result";
303
+ "session.prompt.result": "session.prompt.result";
304
+ "session.remote.result": "session.remote.result";
305
+ "session.timeline.invalidated": "session.timeline.invalidated";
306
+ "session.timeline.page.result": "session.timeline.page.result";
307
+ "session.watch.result": "session.watch.result";
308
+ "sessions.snapshot": "sessions.snapshot";
309
+ }>;
310
+ }, z.core.$strict>, z.ZodObject<{
311
+ version: z.ZodLiteral<1>;
312
+ algorithm: z.ZodLiteral<"A256GCM">;
313
+ messageId: z.ZodString;
314
+ machineId: z.ZodString;
315
+ clientId: z.ZodString;
316
+ recipientClientId: z.ZodOptional<z.ZodString>;
317
+ keyId: z.ZodString;
318
+ sentAt: z.ZodNumber;
319
+ nonce: z.ZodString;
320
+ ciphertext: z.ZodString;
321
+ sender: z.ZodLiteral<"mobile">;
322
+ event: z.ZodEnum<{
323
+ "interaction.respond": "interaction.respond";
324
+ "permission.respond": "permission.respond";
325
+ "session.abort": "session.abort";
326
+ "session.communication": "session.communication";
327
+ "session.configure": "session.configure";
328
+ "session.create": "session.create";
329
+ "session.delete": "session.delete";
330
+ "session.list": "session.list";
331
+ "session.options": "session.options";
332
+ "session.prompt": "session.prompt";
333
+ "session.remote": "session.remote";
334
+ "session.timeline.page": "session.timeline.page";
335
+ "session.watch": "session.watch";
336
+ }>;
337
+ }, z.core.$strict>], "sender">;
338
+ ciphertext: z.ZodString;
339
+ }, z.core.$strict>;
340
+ type InventoryDelivery = z.infer<typeof InventoryDeliverySchema>;
341
+
207
342
  declare const V2MachineHelloSchema: z.ZodUnion<readonly [z.ZodObject<{
208
343
  userId: z.ZodString;
209
344
  machineId: z.ZodString;
@@ -465,6 +600,8 @@ type A2aRelayResponse = z.infer<typeof A2aRelayResponseSchema>;
465
600
 
466
601
  type Ack = (ack: OperationAck) => void;
467
602
  interface V2ClientToServerEvents {
603
+ "inventory.publish": (payload: InventoryPublish, ack: Ack) => void;
604
+ "inventory.invalidate": () => void;
468
605
  "machine.hello": (payload: V2MachineHello, ack: Ack) => void;
469
606
  "machine.heartbeat": (payload: MachineHeartbeat) => void;
470
607
  "machine.list": (payload: MachineListRequest) => void;
@@ -472,6 +609,7 @@ interface V2ClientToServerEvents {
472
609
  "peer.message": (payload: PeerMessage, ack?: Ack) => void;
473
610
  }
474
611
  interface V2ServerToClientEvents {
612
+ "inventory.delivery": (payload: InventoryDelivery) => void;
475
613
  "a2a.request": (payload: A2aRelayRequest, ack: (response: A2aRelayResponse) => void) => void;
476
614
  "machine.list.result": (payload: MachineListResult) => void;
477
615
  "machine.online": (payload: MachinePresence) => void;
@@ -528,6 +666,9 @@ declare const SessionSummarySchema: z.ZodObject<{
528
666
  machineId: z.ZodString;
529
667
  summary: z.ZodOptional<z.ZodString>;
530
668
  renameSupported: z.ZodOptional<z.ZodBoolean>;
669
+ deleteSupported: z.ZodOptional<z.ZodBoolean>;
670
+ imageAttachmentsSupported: z.ZodOptional<z.ZodBoolean>;
671
+ fileAttachmentsSupported: z.ZodOptional<z.ZodBoolean>;
531
672
  workingDirectory: z.ZodOptional<z.ZodString>;
532
673
  gitRoot: z.ZodOptional<z.ZodString>;
533
674
  repository: z.ZodOptional<z.ZodString>;
@@ -1925,6 +2066,16 @@ interface CodingAgentSessionCallbacks {
1925
2066
  readonly toolName: string;
1926
2067
  }): void;
1927
2068
  }
2069
+ interface AgentSessionCapabilities {
2070
+ readonly agentModes: readonly SessionAgentMode[];
2071
+ readonly supportsReasoningEffort: boolean;
2072
+ readonly supportsContextTier?: boolean;
2073
+ readonly supportsFileAttachments?: boolean;
2074
+ readonly supportsImageAttachments?: boolean;
2075
+ readonly supportsSessionDelete?: boolean;
2076
+ readonly agentName?: string;
2077
+ readonly supportsPlanRead?: boolean;
2078
+ }
1928
2079
  interface CodingAgentAdapter {
1929
2080
  readonly workbench?: WorkbenchRuntime;
1930
2081
  sessionPublicationSource?(sessionId: string): string;
@@ -1939,6 +2090,7 @@ interface CodingAgentAdapter {
1939
2090
  readonly supportsAssistantPreview?: boolean;
1940
2091
  readonly supportsSessionDelete?: boolean;
1941
2092
  readonly supportsFileAttachments?: boolean;
2093
+ readonly supportsImageAttachments?: boolean;
1942
2094
  readonly groupChatEnabled?: boolean;
1943
2095
  setGroupChatEnabled?(enabled: boolean): Promise<void>;
1944
2096
  setPeerChatEnabled?(enabled: boolean): Promise<void>;
@@ -1952,14 +2104,7 @@ interface CodingAgentAdapter {
1952
2104
  } | undefined>;
1953
2105
  getSessionProjectIdentity?(sessionId: string): Promise<SessionGitProject | undefined>;
1954
2106
  listModels(sessionId?: string): Promise<AgentModelOption[]>;
1955
- getSessionCapabilities?(sessionId?: string): {
1956
- readonly agentModes: readonly SessionAgentMode[];
1957
- readonly supportsReasoningEffort: boolean;
1958
- readonly supportsContextTier?: boolean;
1959
- readonly supportsFileAttachments?: boolean;
1960
- readonly agentName?: string;
1961
- readonly supportsPlanRead?: boolean;
1962
- };
2107
+ getSessionCapabilities?(sessionId?: string): AgentSessionCapabilities;
1963
2108
  isSessionVisible?(sessionId: string): boolean;
1964
2109
  getSessionConfiguration(sessionId: string): Promise<AgentSessionConfiguration>;
1965
2110
  getSessionEnvironment(sessionId: string): Promise<SessionEnvironmentInfo>;