@agentknight/sdk 0.9.62 → 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.
- package/dist/chunks/{acp-adapter-MBYKOCA2.js → acp-adapter-RZX5SUB3.js} +4 -4
- package/dist/chunks/chunk-35OF2ZNS.js +275 -0
- package/dist/chunks/chunk-4XT65OSG.js +72 -0
- package/dist/chunks/{chunk-A4YCCQ3I.js → chunk-AWVC5NX4.js} +1 -1
- package/dist/chunks/chunk-B777YB6E.js +109 -0
- package/dist/chunks/{chunk-7CNBPLNE.js → chunk-CFQQOAQV.js} +5 -2
- package/dist/chunks/{chunk-P2PH5KMV.js → chunk-DWTXWVIA.js} +6 -0
- package/dist/chunks/{chunk-ZNQ2I5EF.js → chunk-EDYVCZIR.js} +11 -132
- package/dist/chunks/{chunk-3AMFPDE5.js → chunk-FY4XTWUF.js} +4 -4
- package/dist/chunks/{chunk-H4SHMWQ6.js → chunk-IXGVSREH.js} +1 -1
- package/dist/chunks/{chunk-SIFCCGXF.js → chunk-LCA2MWOQ.js} +2 -2
- package/dist/chunks/{chunk-ALUQLM54.js → chunk-MB3H6HEI.js} +2 -2
- package/dist/chunks/{chunk-CHKNC6PD.js → chunk-Q5OUZJCZ.js} +1 -1
- package/dist/chunks/{chunk-7OGTK7KB.js → chunk-UHRUQM4D.js} +1 -1
- package/dist/chunks/chunk-VIWTNPVC.js +66 -0
- package/dist/chunks/chunk-Y6NCJB55.js +302 -0
- package/dist/chunks/{claude-adapter-D3JWXMNX.js → claude-adapter-FQSQIYUY.js} +4 -4
- package/dist/chunks/{codex-adapter-655KHW7H.js → codex-adapter-TOXSRT2W.js} +4 -4
- package/dist/chunks/{copilot-adapter-EZUXHBE3.js → copilot-adapter-KUCX7XQW.js} +56 -148
- package/dist/chunks/{managed-agent-adapter-BOJNEJ75.js → managed-agent-adapter-LGBRXDGP.js} +33 -24
- package/dist/chunks/{pi-adapter-LAD5GOCP.js → pi-adapter-RXNZSE4F.js} +330 -53
- package/dist/configuration.js +5 -5
- package/dist/index.js +20 -31
- package/dist/runtime.js +2 -2
- package/dist/session-analytics-worker.js +7 -5
- package/package.json +1 -1
- package/dist/chunks/chunk-CM5LVXVL.js +0 -572
- package/dist/chunks/chunk-XPHAIOKN.js +0 -64
package/dist/configuration.js
CHANGED
|
@@ -2,19 +2,19 @@ import {
|
|
|
2
2
|
DeviceIdentitySchema,
|
|
3
3
|
codingAgentPresentation,
|
|
4
4
|
relayRequestToken
|
|
5
|
-
} from "./chunks/chunk-
|
|
5
|
+
} from "./chunks/chunk-VIWTNPVC.js";
|
|
6
6
|
import {
|
|
7
7
|
AgentSelectionSchema
|
|
8
|
-
} from "./chunks/chunk-
|
|
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-
|
|
16
|
-
import "./chunks/chunk-
|
|
17
|
-
import "./chunks/chunk-
|
|
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,17 +10,17 @@ import {
|
|
|
10
10
|
PeerChatRequestSchema,
|
|
11
11
|
PeerChatResultSchema,
|
|
12
12
|
validateDataDirectory
|
|
13
|
-
} from "./chunks/chunk-
|
|
13
|
+
} from "./chunks/chunk-Q5OUZJCZ.js";
|
|
14
14
|
import {
|
|
15
15
|
DeviceIdentitySchema,
|
|
16
16
|
codingAgentPresentation,
|
|
17
17
|
relayRequestToken
|
|
18
|
-
} from "./chunks/chunk-
|
|
18
|
+
} from "./chunks/chunk-VIWTNPVC.js";
|
|
19
19
|
import {
|
|
20
20
|
AgentSelectionSchema,
|
|
21
21
|
assertSelectionSnapshotFits,
|
|
22
22
|
supportsAgentSelection
|
|
23
|
-
} from "./chunks/chunk-
|
|
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-
|
|
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-
|
|
57
|
+
} from "./chunks/chunk-EDYVCZIR.js";
|
|
58
58
|
import {
|
|
59
59
|
GroupChatError
|
|
60
|
-
} from "./chunks/chunk-
|
|
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-
|
|
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-
|
|
78
|
+
} from "./chunks/chunk-CFQQOAQV.js";
|
|
76
79
|
import {
|
|
77
80
|
SessionOperationError,
|
|
78
81
|
SessionOperations
|
|
79
|
-
} from "./chunks/chunk-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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 || !
|
|
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-
|
|
7
|
-
import "./chunks/chunk-
|
|
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-
|
|
6
|
-
import "./chunks/chunk-
|
|
7
|
-
import "./chunks/chunk-
|
|
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-
|
|
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-
|
|
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";
|