@agentknight/sdk 0.9.64 → 0.9.68

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 (26) hide show
  1. package/dist/chunks/{acp-adapter-MBYKOCA2.js → acp-adapter-RZX5SUB3.js} +4 -4
  2. package/dist/chunks/chunk-35OF2ZNS.js +275 -0
  3. package/dist/chunks/chunk-4XT65OSG.js +72 -0
  4. package/dist/chunks/{chunk-A4YCCQ3I.js → chunk-AWVC5NX4.js} +1 -1
  5. package/dist/chunks/chunk-B777YB6E.js +109 -0
  6. package/dist/chunks/{chunk-7CNBPLNE.js → chunk-CFQQOAQV.js} +5 -2
  7. package/dist/chunks/{chunk-P2PH5KMV.js → chunk-DWTXWVIA.js} +6 -0
  8. package/dist/chunks/{chunk-ZNQ2I5EF.js → chunk-EDYVCZIR.js} +11 -132
  9. package/dist/chunks/{chunk-3AMFPDE5.js → chunk-FY4XTWUF.js} +4 -4
  10. package/dist/chunks/{chunk-H4SHMWQ6.js → chunk-IXGVSREH.js} +1 -1
  11. package/dist/chunks/{chunk-SIFCCGXF.js → chunk-LCA2MWOQ.js} +2 -2
  12. package/dist/chunks/{chunk-ALUQLM54.js → chunk-MB3H6HEI.js} +2 -2
  13. package/dist/chunks/{chunk-CHKNC6PD.js → chunk-Q5OUZJCZ.js} +1 -1
  14. package/dist/chunks/{chunk-7OGTK7KB.js → chunk-UHRUQM4D.js} +1 -1
  15. package/dist/chunks/chunk-Y6NCJB55.js +302 -0
  16. package/dist/chunks/{claude-adapter-D3JWXMNX.js → claude-adapter-FQSQIYUY.js} +4 -4
  17. package/dist/chunks/{codex-adapter-655KHW7H.js → codex-adapter-TOXSRT2W.js} +4 -4
  18. package/dist/chunks/{copilot-adapter-EZUXHBE3.js → copilot-adapter-KUCX7XQW.js} +56 -148
  19. package/dist/chunks/{managed-agent-adapter-RIXRCURU.js → managed-agent-adapter-LGBRXDGP.js} +32 -23
  20. package/dist/chunks/{pi-adapter-LAD5GOCP.js → pi-adapter-RXNZSE4F.js} +330 -53
  21. package/dist/configuration.js +4 -4
  22. package/dist/index.js +19 -30
  23. package/dist/runtime.js +2 -2
  24. package/dist/session-analytics-worker.js +7 -5
  25. package/package.json +1 -1
  26. package/dist/chunks/chunk-CM5LVXVL.js +0 -572
@@ -5,16 +5,16 @@ import {
5
5
  } from "./chunks/chunk-VIWTNPVC.js";
6
6
  import {
7
7
  AgentSelectionSchema
8
- } from "./chunks/chunk-SIFCCGXF.js";
8
+ } from "./chunks/chunk-LCA2MWOQ.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-7CNBPLNE.js";
16
- import "./chunks/chunk-7OGTK7KB.js";
17
- import "./chunks/chunk-P2PH5KMV.js";
15
+ } from "./chunks/chunk-CFQQOAQV.js";
16
+ import "./chunks/chunk-UHRUQM4D.js";
17
+ import "./chunks/chunk-DWTXWVIA.js";
18
18
  export {
19
19
  AgentSelectionSchema,
20
20
  CODING_AGENT_IDS,
package/dist/index.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  PeerChatRequestSchema,
11
11
  PeerChatResultSchema,
12
12
  validateDataDirectory
13
- } from "./chunks/chunk-CHKNC6PD.js";
13
+ } from "./chunks/chunk-Q5OUZJCZ.js";
14
14
  import {
15
15
  DeviceIdentitySchema,
16
16
  codingAgentPresentation,
@@ -20,7 +20,7 @@ import {
20
20
  AgentSelectionSchema,
21
21
  assertSelectionSnapshotFits,
22
22
  supportsAgentSelection
23
- } from "./chunks/chunk-SIFCCGXF.js";
23
+ } from "./chunks/chunk-LCA2MWOQ.js";
24
24
  import {
25
25
  LiveTimelineProjection,
26
26
  OperationDiagnostics,
@@ -46,7 +46,7 @@ import {
46
46
  sessionRestoreFailure,
47
47
  sessionRootIdentity,
48
48
  validateOperationResponse
49
- } from "./chunks/chunk-3AMFPDE5.js";
49
+ } from "./chunks/chunk-FY4XTWUF.js";
50
50
  import {
51
51
  SessionImageRelayUrlSchema,
52
52
  SessionImagesConfigSchema
@@ -54,15 +54,18 @@ import {
54
54
  import {
55
55
  ConversationNormalizer,
56
56
  isDisplayableHumanMessage
57
- } from "./chunks/chunk-ZNQ2I5EF.js";
57
+ } from "./chunks/chunk-EDYVCZIR.js";
58
58
  import {
59
59
  GroupChatError
60
- } from "./chunks/chunk-ALUQLM54.js";
60
+ } from "./chunks/chunk-MB3H6HEI.js";
61
+ import {
62
+ hasImageSignature
63
+ } from "./chunks/chunk-4XT65OSG.js";
61
64
  import {
62
65
  assistantPreview,
63
66
  isContentfulAssistant,
64
67
  userPreview
65
- } from "./chunks/chunk-H4SHMWQ6.js";
68
+ } from "./chunks/chunk-IXGVSREH.js";
66
69
  import {
67
70
  AgentModelListingError,
68
71
  AgentSessionRenameError,
@@ -72,11 +75,11 @@ import {
72
75
  captureResearchAccess,
73
76
  captureWorkbenchAccess,
74
77
  validateSessionName
75
- } from "./chunks/chunk-7CNBPLNE.js";
78
+ } from "./chunks/chunk-CFQQOAQV.js";
76
79
  import {
77
80
  SessionOperationError,
78
81
  SessionOperations
79
- } from "./chunks/chunk-7OGTK7KB.js";
82
+ } from "./chunks/chunk-UHRUQM4D.js";
80
83
  import {
81
84
  A2A_BODY_MAX_LENGTH,
82
85
  A2aRelayRequestSchema,
@@ -295,7 +298,7 @@ import {
295
298
  sessionCommunicationError,
296
299
  sessionCommunicationOperationCapability,
297
300
  workbenchCapability
298
- } from "./chunks/chunk-P2PH5KMV.js";
301
+ } from "./chunks/chunk-DWTXWVIA.js";
299
302
 
300
303
  // src/initialize.ts
301
304
  import { createHash as createHash18 } from "node:crypto";
@@ -315,7 +318,7 @@ async function createCodingAgentAdapter(config, onDiagnostic, owner) {
315
318
  switch (engine.kind) {
316
319
  case "managed": {
317
320
  if (owner === void 0) throw new Error("Managed coding agents require the PC owner identity");
318
- const { ManagedCodingAgentAdapter } = await import("./chunks/managed-agent-adapter-RIXRCURU.js");
321
+ const { ManagedCodingAgentAdapter } = await import("./chunks/managed-agent-adapter-LGBRXDGP.js");
319
322
  return new ManagedCodingAgentAdapter({
320
323
  dataDirectory: config.dataDirectory,
321
324
  owner,
@@ -378,7 +381,7 @@ async function createCodingAgentAdapter(config, onDiagnostic, owner) {
378
381
  });
379
382
  }
380
383
  case "copilot": {
381
- const { GithubCopilotAdapter } = await import("./chunks/copilot-adapter-EZUXHBE3.js");
384
+ const { GithubCopilotAdapter } = await import("./chunks/copilot-adapter-KUCX7XQW.js");
382
385
  if (owner !== void 0) {
383
386
  return new GithubCopilotAdapter(
384
387
  void 0,
@@ -407,13 +410,13 @@ async function createCodingAgentAdapter(config, onDiagnostic, owner) {
407
410
  }
408
411
  case "pi": {
409
412
  assertPiRuntimeSupported();
410
- const { PiCodingAgentAdapter } = await import("./chunks/pi-adapter-LAD5GOCP.js");
413
+ const { PiCodingAgentAdapter } = await import("./chunks/pi-adapter-RXNZSE4F.js");
411
414
  return new PiCodingAgentAdapter(
412
415
  engine.agentDirectory === void 0 ? {} : { agentDirectory: resolve(engine.agentDirectory) }
413
416
  );
414
417
  }
415
418
  case "codex": {
416
- const { CodexCodingAgentAdapter } = await import("./chunks/codex-adapter-655KHW7H.js");
419
+ const { CodexCodingAgentAdapter } = await import("./chunks/codex-adapter-TOXSRT2W.js");
417
420
  return new CodexCodingAgentAdapter({
418
421
  dataDirectory: resolve(config.dataDirectory, "coding-agents"),
419
422
  ...owner === void 0 ? {} : { nativeSessionOwner: owner },
@@ -422,7 +425,7 @@ async function createCodingAgentAdapter(config, onDiagnostic, owner) {
422
425
  });
423
426
  }
424
427
  case "claude": {
425
- const { ClaudeCodingAgentAdapter } = await import("./chunks/claude-adapter-D3JWXMNX.js");
428
+ const { ClaudeCodingAgentAdapter } = await import("./chunks/claude-adapter-FQSQIYUY.js");
426
429
  return new ClaudeCodingAgentAdapter({
427
430
  dataDirectory: resolve(config.dataDirectory, "coding-agents"),
428
431
  ...engine.command === void 0 ? {} : { command: engine.command },
@@ -431,7 +434,7 @@ async function createCodingAgentAdapter(config, onDiagnostic, owner) {
431
434
  });
432
435
  }
433
436
  case "acp": {
434
- const { AcpCodingAgentAdapter } = await import("./chunks/acp-adapter-MBYKOCA2.js");
437
+ const { AcpCodingAgentAdapter } = await import("./chunks/acp-adapter-RZX5SUB3.js");
435
438
  return new AcpCodingAgentAdapter({
436
439
  command: engine.command,
437
440
  args: engine.args,
@@ -3587,7 +3590,7 @@ var TimelineImageCache = class {
3587
3590
  if (attachment.kind !== "image" || attachment.data === void 0) return attachment;
3588
3591
  const parsed = ConversationAttachmentSchema.parse(attachment);
3589
3592
  const bytes = Buffer.from(attachment.data, "base64");
3590
- if (bytes.length !== parsed.byteLength || createHash5("sha256").update(bytes).digest("hex") !== parsed.sha256 || !hasSignature(bytes, parsed.mimeType)) {
3593
+ if (bytes.length !== parsed.byteLength || createHash5("sha256").update(bytes).digest("hex") !== parsed.sha256 || !hasImageSignature(bytes, parsed.mimeType)) {
3591
3594
  throw new TimelineAssetError("IMAGE_INVALID", "Image content does not match its metadata");
3592
3595
  }
3593
3596
  const key = JSON.stringify([sessionId, parsed.sha256]);
@@ -3606,20 +3609,6 @@ var TimelineImageCache = class {
3606
3609
  return { ...metadata, imageRef: "sha256" };
3607
3610
  }
3608
3611
  };
3609
- function hasSignature(bytes, mimeType) {
3610
- switch (mimeType) {
3611
- case "image/png":
3612
- return bytes.subarray(0, 8).equals(Buffer.from([137, 80, 78, 71, 13, 10, 26, 10]));
3613
- case "image/jpeg":
3614
- return bytes.subarray(0, 3).equals(Buffer.from([255, 216, 255]));
3615
- case "image/gif":
3616
- return ["GIF87a", "GIF89a"].includes(bytes.subarray(0, 6).toString("ascii"));
3617
- case "image/webp":
3618
- return bytes.subarray(0, 4).toString("ascii") === "RIFF" && bytes.subarray(8, 12).toString("ascii") === "WEBP";
3619
- default:
3620
- return false;
3621
- }
3622
- }
3623
3612
 
3624
3613
  // src/service/requests/request-errors.ts
3625
3614
  function operationErrorCode(agentId, operation, error) {
package/dist/runtime.js CHANGED
@@ -3,8 +3,8 @@ import {
3
3
  PEER_CHAT_TIMEOUT_MS,
4
4
  PeerChatRequestSchema,
5
5
  PeerChatResultSchema
6
- } from "./chunks/chunk-CHKNC6PD.js";
7
- import "./chunks/chunk-P2PH5KMV.js";
6
+ } from "./chunks/chunk-Q5OUZJCZ.js";
7
+ import "./chunks/chunk-DWTXWVIA.js";
8
8
  export {
9
9
  DataDirectoryLease,
10
10
  PEER_CHAT_TIMEOUT_MS,
@@ -2,12 +2,14 @@ import {
2
2
  AnalyticsCommandSchema,
3
3
  AnalyticsEventSchema,
4
4
  openSessionEventLog
5
- } from "./chunks/chunk-CM5LVXVL.js";
6
- import "./chunks/chunk-ZNQ2I5EF.js";
7
- import "./chunks/chunk-H4SHMWQ6.js";
5
+ } from "./chunks/chunk-Y6NCJB55.js";
6
+ import "./chunks/chunk-EDYVCZIR.js";
7
+ import "./chunks/chunk-35OF2ZNS.js";
8
+ import "./chunks/chunk-4XT65OSG.js";
9
+ import "./chunks/chunk-IXGVSREH.js";
8
10
  import {
9
11
  SessionOperationError
10
- } from "./chunks/chunk-7OGTK7KB.js";
12
+ } from "./chunks/chunk-UHRUQM4D.js";
11
13
  import {
12
14
  SessionAnalyticsResultSchema,
13
15
  SessionSkillInfoSchema,
@@ -15,7 +17,7 @@ import {
15
17
  WorkbenchContextSampleSchema,
16
18
  WorkbenchTelemetrySchema,
17
19
  WorkbenchUsageCallSchema
18
- } from "./chunks/chunk-P2PH5KMV.js";
20
+ } from "./chunks/chunk-DWTXWVIA.js";
19
21
 
20
22
  // src/session-analytics-worker.ts
21
23
  import { parentPort, workerData, isMainThread as isMainThread2 } from "node:worker_threads";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentknight/sdk",
3
- "version": "0.9.64",
3
+ "version": "0.9.68",
4
4
  "description": "AgentKnight runtime SDK for local and remote coding sessions",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",