@agentknight/sdk 0.9.52 → 0.9.55
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/LICENSE +201 -201
- package/dist/chunks/{acp-adapter-LJQBDWYK.js → acp-adapter-HUNUQGUF.js} +3 -3
- package/dist/chunks/{chunk-2CNJAMAN.js → chunk-5J7BK2Y7.js} +1 -1
- package/dist/chunks/{chunk-6YFGVYI5.js → chunk-6ZPE7VIE.js} +432 -44
- package/dist/chunks/{chunk-HJCNQM4M.js → chunk-E7QL4CBT.js} +1 -1
- package/dist/chunks/{chunk-XL6UB4C3.js → chunk-HFVA7ZOD.js} +2 -2
- package/dist/chunks/chunk-IJPJQF7S.js +16 -0
- package/dist/chunks/{chunk-UZFIXIAS.js → chunk-K5CMKBW6.js} +392 -365
- package/dist/chunks/{chunk-ML6Q2MYH.js → chunk-L3A736SO.js} +1 -1
- package/dist/chunks/{chunk-AAZH6QGV.js → chunk-NTFNQYQ3.js} +2 -2
- package/dist/chunks/{chunk-RPVK6HQV.js → chunk-XPHAIOKN.js} +8 -26
- package/dist/chunks/{chunk-6DYWE5PL.js → chunk-Z5STULMQ.js} +1 -1
- package/dist/chunks/{claude-adapter-UWVOXYNG.js → claude-adapter-G6YTPXRP.js} +3 -3
- package/dist/chunks/{codex-adapter-44N7DBRH.js → codex-adapter-ELYJE2A2.js} +3 -3
- package/dist/chunks/{copilot-adapter-ZM7EUBZ5.js → copilot-adapter-TU2GDFYP.js} +7 -6
- package/dist/chunks/{managed-agent-adapter-5TIM4PBR.js → managed-agent-adapter-KEXZFLGA.js} +5 -5
- package/dist/chunks/{pi-adapter-NADD52CV.js → pi-adapter-5BFIJTPD.js} +3 -3
- package/dist/configuration.d.ts +0 -1
- package/dist/configuration.js +8 -8
- package/dist/index.d.ts +3 -4
- package/dist/index.js +436 -490
- package/dist/runtime.js +2 -2
- package/package.json +1 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
CODING_AGENT_IDS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-L3A736SO.js";
|
|
4
4
|
import {
|
|
5
5
|
SECURE_MESSAGE_MAX_CIPHERTEXT_LENGTH
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-K5CMKBW6.js";
|
|
7
7
|
|
|
8
8
|
// src/agent-selection.ts
|
|
9
9
|
import { z } from "zod";
|
|
@@ -14,26 +14,14 @@ function codingAgentPresentation(agentId) {
|
|
|
14
14
|
return Object.hasOwn(presentations, agentId) ? presentations[agentId] : fallback;
|
|
15
15
|
}
|
|
16
16
|
|
|
17
|
-
// src/config.ts
|
|
18
|
-
import { z } from "zod";
|
|
19
|
-
var SessionImagesConfigSchema = z.object({
|
|
20
|
-
allowUnencryptedStorage: z.literal(true),
|
|
21
|
-
storageAccount: z.string().regex(/^[a-z0-9]{3,24}$/u),
|
|
22
|
-
storageContainer: z.string().min(3).max(63).regex(/^[a-z0-9]+(?:-[a-z0-9]+)*$/u)
|
|
23
|
-
}).strict();
|
|
24
|
-
var SessionImageRelayUrlSchema = z.url().refine((value) => {
|
|
25
|
-
const url = new URL(value);
|
|
26
|
-
return /^https:\/\/[^/?#\\@\s\x00-\x1f\x7f]+\/?$/iu.test(value) && url.protocol === "https:" && url.username === "" && url.password === "" && url.pathname === "/" && url.search === "" && url.hash === "";
|
|
27
|
-
}, "Session images require an HTTPS Relay origin without a path, credentials, query or fragment").transform((value) => new URL(value).origin);
|
|
28
|
-
|
|
29
17
|
// src/device-identity.ts
|
|
30
|
-
import { z
|
|
31
|
-
var DeviceIdentitySchema =
|
|
32
|
-
schemaVersion:
|
|
33
|
-
machineId:
|
|
34
|
-
stableDeviceId:
|
|
35
|
-
machineName:
|
|
36
|
-
createdAt:
|
|
18
|
+
import { z } from "zod";
|
|
19
|
+
var DeviceIdentitySchema = z.object({
|
|
20
|
+
schemaVersion: z.literal(2),
|
|
21
|
+
machineId: z.uuid(),
|
|
22
|
+
stableDeviceId: z.uuid(),
|
|
23
|
+
machineName: z.string().trim().min(1).max(120),
|
|
24
|
+
createdAt: z.iso.datetime({ offset: true })
|
|
37
25
|
});
|
|
38
26
|
|
|
39
27
|
// src/relay-authorization.ts
|
|
@@ -46,16 +34,10 @@ async function relayRequestToken(config) {
|
|
|
46
34
|
return credential.token;
|
|
47
35
|
}
|
|
48
36
|
|
|
49
|
-
// src/legacy-client-state.ts
|
|
50
|
-
var LEGACY_CLIENT_STATE_DIRECTORY = Buffer.from("2e626c7565706177", "hex").toString("utf8");
|
|
51
|
-
|
|
52
37
|
export {
|
|
53
38
|
codingAgentPresentation,
|
|
54
|
-
SessionImagesConfigSchema,
|
|
55
|
-
SessionImageRelayUrlSchema,
|
|
56
39
|
DeviceIdentitySchema,
|
|
57
|
-
relayRequestToken
|
|
58
|
-
LEGACY_CLIENT_STATE_DIRECTORY
|
|
40
|
+
relayRequestToken
|
|
59
41
|
};
|
|
60
42
|
/*!
|
|
61
43
|
* Copilot artwork: https://github.com/primer/octicons
|
|
@@ -3,18 +3,18 @@ import {
|
|
|
3
3
|
} from "./chunk-T6226JFS.js";
|
|
4
4
|
import {
|
|
5
5
|
latestPreviewItems
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-5J7BK2Y7.js";
|
|
7
7
|
import {
|
|
8
8
|
UnsupportedAgentOperationError,
|
|
9
9
|
validateSessionName
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-L3A736SO.js";
|
|
11
11
|
import {
|
|
12
12
|
ConversationItemSchema,
|
|
13
13
|
InteractionRequestSchema,
|
|
14
14
|
InteractionResponseSchema,
|
|
15
15
|
SESSION_TIMELINE_PAGE_SIZE,
|
|
16
16
|
SessionSummarySchema
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-K5CMKBW6.js";
|
|
18
18
|
|
|
19
19
|
// src/claude-adapter.ts
|
|
20
20
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
latestPreviewItems
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5J7BK2Y7.js";
|
|
4
4
|
import {
|
|
5
5
|
UnsupportedAgentOperationError
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-L3A736SO.js";
|
|
7
7
|
import {
|
|
8
8
|
ConversationItemSchema,
|
|
9
9
|
InteractionRequestSchema,
|
|
10
10
|
SESSION_TIMELINE_PAGE_SIZE,
|
|
11
11
|
SessionSummarySchema
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-K5CMKBW6.js";
|
|
13
13
|
|
|
14
14
|
// src/codex-adapter.ts
|
|
15
15
|
import { randomUUID } from "node:crypto";
|
|
@@ -18,25 +18,26 @@ import {
|
|
|
18
18
|
recordTimelineSyncDiagnostic,
|
|
19
19
|
resolveGitProjectIdentity,
|
|
20
20
|
sanitizeGitRemoteUrl
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-6ZPE7VIE.js";
|
|
22
|
+
import "./chunk-IJPJQF7S.js";
|
|
22
23
|
import {
|
|
23
24
|
assertMainSessionId,
|
|
24
25
|
isResearchSessionId
|
|
25
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-E7QL4CBT.js";
|
|
26
27
|
import {
|
|
27
28
|
GroupChatError,
|
|
28
29
|
GroupChatMessageSchema,
|
|
29
30
|
GroupChatRuntime
|
|
30
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-HFVA7ZOD.js";
|
|
31
32
|
import {
|
|
32
33
|
isContentfulAssistant
|
|
33
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-5J7BK2Y7.js";
|
|
34
35
|
import {
|
|
35
36
|
AgentSessionRenameError,
|
|
36
37
|
SessionOperationError,
|
|
37
38
|
TimelinePageBudgetError,
|
|
38
39
|
validateSessionName
|
|
39
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-L3A736SO.js";
|
|
40
41
|
import {
|
|
41
42
|
ConversationItemSchema,
|
|
42
43
|
CopilotModelOptionSchema,
|
|
@@ -57,7 +58,7 @@ import {
|
|
|
57
58
|
WorkbenchScheduleEntrySchema,
|
|
58
59
|
WorkbenchScheduleProposalSchema,
|
|
59
60
|
WorkbenchScheduleSnapshotSchema
|
|
60
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-K5CMKBW6.js";
|
|
61
62
|
|
|
62
63
|
// src/copilot-adapter.ts
|
|
63
64
|
import { createHash as createHash4, randomUUID as randomUUID6 } from "node:crypto";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentSelectionSchema,
|
|
3
3
|
assertSelectionSnapshotFits
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NTFNQYQ3.js";
|
|
5
5
|
import {
|
|
6
6
|
isResearchSessionId
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-E7QL4CBT.js";
|
|
8
8
|
import {
|
|
9
9
|
GroupChatError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HFVA7ZOD.js";
|
|
11
11
|
import {
|
|
12
12
|
AgentModelListingError,
|
|
13
13
|
AgentSessionRenameError,
|
|
@@ -16,11 +16,11 @@ import {
|
|
|
16
16
|
UnsupportedAgentOperationError,
|
|
17
17
|
captureWorkbenchAccess,
|
|
18
18
|
validateSessionName
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-L3A736SO.js";
|
|
20
20
|
import {
|
|
21
21
|
InteractionResponseSchema,
|
|
22
22
|
SessionSummarySchema
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-K5CMKBW6.js";
|
|
24
24
|
|
|
25
25
|
// src/managed-agent-adapter.ts
|
|
26
26
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
latestPreviewItems
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-5J7BK2Y7.js";
|
|
4
4
|
import {
|
|
5
5
|
AgentSessionRenameError,
|
|
6
6
|
UnsupportedAgentOperationError,
|
|
7
7
|
validateSessionName
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-L3A736SO.js";
|
|
9
9
|
import {
|
|
10
10
|
InteractionRequestSchema,
|
|
11
11
|
REASONING_EFFORTS,
|
|
12
12
|
SESSION_TIMELINE_PAGE_SIZE
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-K5CMKBW6.js";
|
|
14
14
|
|
|
15
15
|
// src/pi-adapter.ts
|
|
16
16
|
import { createHash as createHash2, randomUUID } from "node:crypto";
|
package/dist/configuration.d.ts
CHANGED
|
@@ -4,5 +4,4 @@ export { CODING_AGENT_IDS } from "./index.js";
|
|
|
4
4
|
export { AgentSelectionSchema } from "./index.js";
|
|
5
5
|
export type { AgentSelection, AgentSelectionProvider } from "./index.js";
|
|
6
6
|
export { codingAgentPresentation } from "./index.js";
|
|
7
|
-
export { LEGACY_CLIENT_STATE_DIRECTORY } from "./index.js";
|
|
8
7
|
export { relayRequestToken } from "./index.js";
|
package/dist/configuration.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DeviceIdentitySchema,
|
|
3
|
-
LEGACY_CLIENT_STATE_DIRECTORY,
|
|
4
|
-
SessionImageRelayUrlSchema,
|
|
5
|
-
SessionImagesConfigSchema,
|
|
6
3
|
codingAgentPresentation,
|
|
7
4
|
relayRequestToken
|
|
8
|
-
} from "./chunks/chunk-
|
|
5
|
+
} from "./chunks/chunk-XPHAIOKN.js";
|
|
9
6
|
import {
|
|
10
7
|
AgentSelectionSchema
|
|
11
|
-
} from "./chunks/chunk-
|
|
8
|
+
} from "./chunks/chunk-NTFNQYQ3.js";
|
|
9
|
+
import {
|
|
10
|
+
SessionImageRelayUrlSchema,
|
|
11
|
+
SessionImagesConfigSchema
|
|
12
|
+
} from "./chunks/chunk-IJPJQF7S.js";
|
|
12
13
|
import {
|
|
13
14
|
CODING_AGENT_IDS
|
|
14
|
-
} from "./chunks/chunk-
|
|
15
|
-
import "./chunks/chunk-
|
|
15
|
+
} from "./chunks/chunk-L3A736SO.js";
|
|
16
|
+
import "./chunks/chunk-K5CMKBW6.js";
|
|
16
17
|
export {
|
|
17
18
|
AgentSelectionSchema,
|
|
18
19
|
CODING_AGENT_IDS,
|
|
19
20
|
DeviceIdentitySchema,
|
|
20
|
-
LEGACY_CLIENT_STATE_DIRECTORY,
|
|
21
21
|
SessionImageRelayUrlSchema,
|
|
22
22
|
SessionImagesConfigSchema,
|
|
23
23
|
codingAgentPresentation,
|
package/dist/index.d.ts
CHANGED
|
@@ -2095,12 +2095,13 @@ declare const UploaderConfigSchema: z.ZodObject<{
|
|
|
2095
2095
|
}, z.core.$strip>;
|
|
2096
2096
|
type SessionImageUploaderConfig = z.input<typeof UploaderConfigSchema>;
|
|
2097
2097
|
type Stage = "config" | "source" | "reserve" | "put" | "complete";
|
|
2098
|
-
type SessionImageUploadErrorCode = "IMAGE_CONFIG_INVALID" | "IMAGE_CONTENT_INVALID" | "IMAGE_CAPACITY_EXCEEDED" | "IMAGE_UPLOADER_CLOSED" | "IMAGE_ABORTED" | "IMAGE_TIMEOUT" | "IMAGE_NETWORK_ERROR" | "IMAGE_HTTP_ERROR" | "IMAGE_RESPONSE_INVALID" | "IMAGE_RESPONSE_TOO_LARGE" | "IMAGE_UPLOAD_TARGET_INVALID" | "IMAGE_UPLOAD_EXPIRED" | "IMAGE_COMMIT_MISMATCH" | "IMAGE_COMPLETION_FAILED" | "IMAGE_ACCESS_REVOKED" | "IMAGE_STORAGE_UNAVAILABLE";
|
|
2098
|
+
type SessionImageUploadErrorCode = "IMAGE_CONFIG_INVALID" | "IMAGE_CONTENT_INVALID" | "IMAGE_CAPACITY_EXCEEDED" | "IMAGE_UPLOADER_CLOSED" | "IMAGE_ABORTED" | "IMAGE_TIMEOUT" | "IMAGE_NETWORK_ERROR" | "IMAGE_HTTP_ERROR" | "IMAGE_RESPONSE_INVALID" | "IMAGE_RESPONSE_TOO_LARGE" | "IMAGE_UPLOAD_TARGET_INVALID" | "IMAGE_UPLOAD_EXPIRED" | "IMAGE_COMMIT_MISMATCH" | "IMAGE_COMPLETION_FAILED" | "IMAGE_ACCESS_REVOKED" | "IMAGE_STORAGE_UNAVAILABLE" | "IMAGE_QUOTA_EXCEEDED" | "IMAGE_BUSY";
|
|
2099
2099
|
/** Safe to log: never retains a response body, URL, token, or raw transport/schema error. */
|
|
2100
2100
|
declare class SessionImageUploadError extends Error {
|
|
2101
2101
|
readonly code: SessionImageUploadErrorCode;
|
|
2102
2102
|
readonly stage: Stage;
|
|
2103
2103
|
readonly status?: number | undefined;
|
|
2104
|
+
retryAfterMs?: number;
|
|
2104
2105
|
constructor(code: SessionImageUploadErrorCode, stage: Stage, status?: number | undefined, cause?: unknown);
|
|
2105
2106
|
}
|
|
2106
2107
|
/** Uploads already-derived WebP bytes only. Consent and session authorization belong to the caller. */
|
|
@@ -2134,7 +2135,5 @@ declare class ApprovedPairingProvider extends CachedPairingProvider {
|
|
|
2134
2135
|
private scope;
|
|
2135
2136
|
}
|
|
2136
2137
|
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
export { AgentSelectionSchema, ApprovedPairingProvider, CODING_AGENT_IDS, CachedPairingProvider, ContentCipher, DataDirectoryLease, DeviceIdentitySchema, LEGACY_CLIENT_STATE_DIRECTORY, PEER_CHAT_TIMEOUT_MS, PeerChatRequestSchema, PeerChatResultSchema, SessionImageRelayUrlSchema, SessionImageUploadError, SessionImageUploader, SessionImagesConfigSchema, TimelinePageBudgetError, assertPiRuntimeSupported, buildPairingUri, codingAgentPresentation, createCodingAgentAdapter, createPersistentContentCipher, generateContentKey, initialize, loadOrCreateContentKey, parseContentKey, relayRequestToken, requestPairingUri, supportsAgentSelection };
|
|
2138
|
+
export { AgentSelectionSchema, ApprovedPairingProvider, CODING_AGENT_IDS, CachedPairingProvider, ContentCipher, DataDirectoryLease, DeviceIdentitySchema, PEER_CHAT_TIMEOUT_MS, PeerChatRequestSchema, PeerChatResultSchema, SessionImageRelayUrlSchema, SessionImageUploadError, SessionImageUploader, SessionImagesConfigSchema, TimelinePageBudgetError, assertPiRuntimeSupported, buildPairingUri, codingAgentPresentation, createCodingAgentAdapter, createPersistentContentCipher, generateContentKey, initialize, loadOrCreateContentKey, parseContentKey, relayRequestToken, requestPairingUri, supportsAgentSelection };
|
|
2140
2139
|
export type { Agent, AgentSelection, AgentSelectionProvider, AgentSessionConfiguration, AgentSessionConfigureOptions, AgentSessionCreateOptions, CodingAgentAdapter, CodingAgentConfig, CodingAgentId, CodingAgentSessionCallbacks, ContentKeyMaterial, DeviceIdentity, InitializeOptions, PairingProvider, PairingTicket, PcAgentConfig, PeerChatRequest, PeerChatResult, RelayAccessToken, RelayAuthorization, RelayRegistrationStatus, RelaySocket, RelaySocketFactory, SelectableAgent, SessionImageUploadErrorCode, SessionImageUploaderConfig, TimelineImageProjection, TimelineReadOptions };
|