@agentknight/sdk 0.9.42 → 0.9.44
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-SPIMGGL2.js → acp-adapter-JKSOVQJ7.js} +3 -3
- package/dist/chunks/{chunk-ASHXZ46V.js → chunk-4UAMAGVT.js} +5 -2
- package/dist/chunks/{chunk-RBULXS7T.js → chunk-AK3YVBEP.js} +1 -1
- package/dist/chunks/chunk-EIFNERXM.js +55 -0
- package/dist/chunks/{chunk-SHOE7YAU.js → chunk-EWXFUECA.js} +5 -3
- package/dist/chunks/{chunk-VDC4G7ZG.js → chunk-LRSHP7WN.js} +2 -2
- package/dist/chunks/{chunk-LQIW4ARE.js → chunk-UNRPSTRM.js} +3 -1
- package/dist/chunks/{chunk-QTBB2U7G.js → chunk-W6TZVD7W.js} +34 -2
- package/dist/chunks/{chunk-QN3OD5UE.js → chunk-ZGO2OSQZ.js} +1 -1
- package/dist/chunks/{chunk-J52FWJU4.js → chunk-ZST7M4CD.js} +1 -1
- package/dist/chunks/claude-adapter-A5EFNV5S.js +1040 -0
- package/dist/chunks/codex-adapter-MMQK47KY.js +1249 -0
- package/dist/chunks/{copilot-adapter-A6QB4RD4.js → copilot-adapter-Y5W4ZUFD.js} +9 -9
- package/dist/chunks/{managed-agent-adapter-LMHQX6IH.js → managed-agent-adapter-HDLOSSHZ.js} +10 -8
- package/dist/chunks/{pi-adapter-NWQWUNXO.js → pi-adapter-6EF6Z5CP.js} +3 -3
- package/dist/index.d.ts +229 -218
- package/dist/index.js +406 -305
- package/dist/runtime.js +2 -2
- package/package.json +16 -13
|
@@ -18,25 +18,25 @@ import {
|
|
|
18
18
|
recordTimelineSyncDiagnostic,
|
|
19
19
|
resolveGitProjectIdentity,
|
|
20
20
|
sanitizeGitRemoteUrl
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-EWXFUECA.js";
|
|
22
22
|
import {
|
|
23
23
|
assertMainSessionId,
|
|
24
24
|
isResearchSessionId
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-ZST7M4CD.js";
|
|
26
26
|
import {
|
|
27
27
|
GroupChatError,
|
|
28
28
|
GroupChatMessageSchema,
|
|
29
29
|
GroupChatRuntime
|
|
30
|
-
} from "./chunk-
|
|
30
|
+
} from "./chunk-LRSHP7WN.js";
|
|
31
31
|
import {
|
|
32
32
|
isContentfulAssistant
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-AK3YVBEP.js";
|
|
34
34
|
import {
|
|
35
35
|
AgentSessionRenameError,
|
|
36
36
|
SessionOperationError,
|
|
37
37
|
TimelinePageBudgetError,
|
|
38
38
|
validateSessionName
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-UNRPSTRM.js";
|
|
40
40
|
import {
|
|
41
41
|
ConversationItemSchema,
|
|
42
42
|
CopilotModelOptionSchema,
|
|
@@ -57,7 +57,7 @@ import {
|
|
|
57
57
|
WorkbenchScheduleEntrySchema,
|
|
58
58
|
WorkbenchScheduleProposalSchema,
|
|
59
59
|
WorkbenchScheduleSnapshotSchema
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-W6TZVD7W.js";
|
|
61
61
|
|
|
62
62
|
// src/copilot-adapter.ts
|
|
63
63
|
import { createHash as createHash4, randomUUID as randomUUID6 } from "node:crypto";
|
|
@@ -2781,10 +2781,10 @@ function permissionSessionApproval(request) {
|
|
|
2781
2781
|
}
|
|
2782
2782
|
};
|
|
2783
2783
|
}
|
|
2784
|
-
if (request.kind === "
|
|
2784
|
+
if (request.kind === "workflow" && request.canPersistApproval && request.approvalKey.trim()) {
|
|
2785
2785
|
return {
|
|
2786
2786
|
kind: "approve-for-session",
|
|
2787
|
-
approval: { kind: "
|
|
2787
|
+
approval: { kind: "workflow", approvalKey: request.approvalKey }
|
|
2788
2788
|
};
|
|
2789
2789
|
}
|
|
2790
2790
|
if (request.kind === "url" && URL.canParse(request.url)) {
|
|
@@ -3557,7 +3557,7 @@ var McpAuthCoordinator = class {
|
|
|
3557
3557
|
const staticConfig = event.data.staticClientConfig;
|
|
3558
3558
|
const result = await oauth.login({
|
|
3559
3559
|
serverName,
|
|
3560
|
-
clientName: "
|
|
3560
|
+
clientName: "AgentKnight",
|
|
3561
3561
|
...event.data.reason === "reauth" || event.data.reason === "upscope" ? { forceReauth: true } : {},
|
|
3562
3562
|
...staticConfig?.clientId === void 0 ? {} : { clientId: staticConfig.clientId },
|
|
3563
3563
|
...staticConfig?.clientSecret === void 0 ? {} : { clientSecret: staticConfig.clientSecret },
|
|
@@ -1,32 +1,34 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentSelectionSchema,
|
|
3
3
|
assertSelectionSnapshotFits
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-4UAMAGVT.js";
|
|
5
5
|
import {
|
|
6
6
|
isResearchSessionId
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-ZST7M4CD.js";
|
|
8
8
|
import {
|
|
9
9
|
GroupChatError
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LRSHP7WN.js";
|
|
11
11
|
import {
|
|
12
12
|
AgentModelListingError,
|
|
13
13
|
AgentSessionRenameError,
|
|
14
|
+
CODING_AGENT_IDS,
|
|
14
15
|
SessionOperationError,
|
|
15
16
|
UnsupportedAgentOperationError,
|
|
16
17
|
captureWorkbenchAccess,
|
|
17
18
|
validateSessionName
|
|
18
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-UNRPSTRM.js";
|
|
19
20
|
import {
|
|
20
21
|
InteractionResponseSchema,
|
|
21
22
|
SessionSummarySchema
|
|
22
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-W6TZVD7W.js";
|
|
23
24
|
|
|
24
25
|
// src/managed-agent-adapter.ts
|
|
25
26
|
import { createHash, randomUUID } from "node:crypto";
|
|
26
27
|
import { mkdir, open, readFile, rename, rm } from "node:fs/promises";
|
|
27
28
|
import { join } from "node:path";
|
|
28
29
|
import { z } from "zod";
|
|
29
|
-
var
|
|
30
|
+
var managedSessionIdPattern = new RegExp(`^managed:(${CODING_AGENT_IDS.join("|")}):session:[a-f0-9]{64}$`);
|
|
31
|
+
var ManagedSessionIdSchema = z.string().regex(managedSessionIdPattern);
|
|
30
32
|
var StoredSelectionSchema = AgentSelectionSchema.extend({ version: z.literal(1) });
|
|
31
33
|
var LegacySelectionSchema = AgentSelectionSchema.extend({
|
|
32
34
|
sessionIds: z.array(ManagedSessionIdSchema).max(2e3).refine((ids) => new Set(ids).size === ids.length, "Duplicate managed session selection")
|
|
@@ -108,7 +110,7 @@ var ManagedCodingAgentAdapter = class {
|
|
|
108
110
|
this.#localOwner = SessionSummarySchema.pick({ userId: true, machineId: true }).parse(options.owner);
|
|
109
111
|
const ids = /* @__PURE__ */ new Set();
|
|
110
112
|
this.#providers = options.candidates.map((candidate) => {
|
|
111
|
-
if (!
|
|
113
|
+
if (!CODING_AGENT_IDS.includes(candidate.id) || ids.has(candidate.id)) {
|
|
112
114
|
throw new Error(`Invalid or duplicate managed agent: ${candidate.id}`);
|
|
113
115
|
}
|
|
114
116
|
ids.add(candidate.id);
|
|
@@ -833,7 +835,7 @@ var ManagedCodingAgentAdapter = class {
|
|
|
833
835
|
return join(this.#directory, "managed-session-deletions.json");
|
|
834
836
|
}
|
|
835
837
|
#owner(id) {
|
|
836
|
-
const match =
|
|
838
|
+
const match = managedSessionIdPattern.exec(id);
|
|
837
839
|
return match ? this.#providers.find((provider) => provider.candidate.id === match[1]) : void 0;
|
|
838
840
|
}
|
|
839
841
|
#validateSelection(input) {
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
latestPreviewItems
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-AK3YVBEP.js";
|
|
4
4
|
import {
|
|
5
5
|
AgentSessionRenameError,
|
|
6
6
|
UnsupportedAgentOperationError,
|
|
7
7
|
validateSessionName
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-UNRPSTRM.js";
|
|
9
9
|
import {
|
|
10
10
|
InteractionRequestSchema,
|
|
11
11
|
REASONING_EFFORTS,
|
|
12
12
|
SESSION_TIMELINE_PAGE_SIZE
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-W6TZVD7W.js";
|
|
14
14
|
|
|
15
15
|
// src/pi-adapter.ts
|
|
16
16
|
import { createHash as createHash2, randomUUID } from "node:crypto";
|