@agentsky/sky 2.21.0 → 2.22.0
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/{chunk-ZZ6UF7QA.js → chunk-EBH3KXSU.js} +2 -2
- package/dist/{chunk-6JMFB3CV.js → chunk-XT3W75V3.js} +1 -1
- package/dist/{chunk-GHTAIKQ6.js → chunk-YMYQT6KR.js} +70 -34
- package/dist/index.js +904 -715
- package/dist/{src-QBXMNV2V.js → src-TGRDQ5XR.js} +1 -1
- package/dist/{trace-NMBMU4GS.js → trace-PDIOL2TC.js} +2 -2
- package/dist/{trace-library-OWYB75AR.js → trace-library-TA3QUBHJ.js} +3 -3
- package/package.json +4 -3
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
apiBase,
|
|
4
4
|
apiToken,
|
|
5
5
|
currentUniverse
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-XT3W75V3.js";
|
|
7
7
|
|
|
8
8
|
// src/api.ts
|
|
9
9
|
import { createWriteStream, writeFileSync } from "fs";
|
|
@@ -145,7 +145,7 @@ async function resolveSessionRef(ref) {
|
|
|
145
145
|
return agent.defaultSessionId;
|
|
146
146
|
}
|
|
147
147
|
async function* streamEvents(sessionId, signal) {
|
|
148
|
-
const { parseSseStream } = await import("./src-
|
|
148
|
+
const { parseSseStream } = await import("./src-TGRDQ5XR.js");
|
|
149
149
|
const res = await fetch(
|
|
150
150
|
`${apiBase()}/sessions/${encodeURIComponent(sessionId)}/stream`,
|
|
151
151
|
{
|
|
@@ -18978,7 +18978,7 @@ var CATALOG_MODELS = [
|
|
|
18978
18978
|
"maxPromptTokens": 1048576,
|
|
18979
18979
|
"input": 0.09284,
|
|
18980
18980
|
"output": 0.58025,
|
|
18981
|
-
"cachedInput":
|
|
18981
|
+
"cachedInput": 0.09284
|
|
18982
18982
|
}
|
|
18983
18983
|
],
|
|
18984
18984
|
"maxPrice": {
|
|
@@ -19041,13 +19041,13 @@ var CATALOG_MODELS = [
|
|
|
19041
19041
|
"tiers": [
|
|
19042
19042
|
{
|
|
19043
19043
|
"maxPromptTokens": 1048576,
|
|
19044
|
-
"input": 0.
|
|
19044
|
+
"input": 0.1381,
|
|
19045
19045
|
"output": 0.32494,
|
|
19046
|
-
"cachedInput":
|
|
19046
|
+
"cachedInput": 3482e-6
|
|
19047
19047
|
}
|
|
19048
19048
|
],
|
|
19049
19049
|
"maxPrice": {
|
|
19050
|
-
"prompt": 0.
|
|
19050
|
+
"prompt": 0.119,
|
|
19051
19051
|
"completion": 0.28
|
|
19052
19052
|
},
|
|
19053
19053
|
"reasoningEfforts": [],
|
|
@@ -19101,14 +19101,14 @@ var CATALOG_MODELS = [
|
|
|
19101
19101
|
"tiers": [
|
|
19102
19102
|
{
|
|
19103
19103
|
"maxPromptTokens": 1048576,
|
|
19104
|
-
"input": 0.
|
|
19105
|
-
"output": 0.
|
|
19106
|
-
"cachedInput": 0.
|
|
19104
|
+
"input": 0.1381,
|
|
19105
|
+
"output": 0.276199,
|
|
19106
|
+
"cachedInput": 0.02762
|
|
19107
19107
|
}
|
|
19108
19108
|
],
|
|
19109
19109
|
"maxPrice": {
|
|
19110
|
-
"prompt": 0.
|
|
19111
|
-
"completion": 0.
|
|
19110
|
+
"prompt": 0.119,
|
|
19111
|
+
"completion": 0.238
|
|
19112
19112
|
},
|
|
19113
19113
|
"reasoningEfforts": [
|
|
19114
19114
|
"none",
|
|
@@ -19774,14 +19774,14 @@ var CATALOG_MODELS = [
|
|
|
19774
19774
|
"tiers": [
|
|
19775
19775
|
{
|
|
19776
19776
|
"maxPromptTokens": 202752,
|
|
19777
|
-
"input": 1.
|
|
19778
|
-
"output":
|
|
19779
|
-
"cachedInput": 0.
|
|
19777
|
+
"input": 1.13729,
|
|
19778
|
+
"output": 3.57434,
|
|
19779
|
+
"cachedInput": 0.208194
|
|
19780
19780
|
}
|
|
19781
19781
|
],
|
|
19782
19782
|
"maxPrice": {
|
|
19783
|
-
"prompt":
|
|
19784
|
-
"completion": 3.
|
|
19783
|
+
"prompt": 0.98,
|
|
19784
|
+
"completion": 3.08
|
|
19785
19785
|
},
|
|
19786
19786
|
"reasoningEfforts": [],
|
|
19787
19787
|
"quantizations": [
|
|
@@ -19808,8 +19808,8 @@ var CATALOG_MODELS = [
|
|
|
19808
19808
|
}
|
|
19809
19809
|
],
|
|
19810
19810
|
"maxPrice": {
|
|
19811
|
-
"prompt": 0.
|
|
19812
|
-
"completion": 2
|
|
19811
|
+
"prompt": 0.6,
|
|
19812
|
+
"completion": 2
|
|
19813
19813
|
},
|
|
19814
19814
|
"reasoningEfforts": [
|
|
19815
19815
|
"none",
|
|
@@ -21268,6 +21268,32 @@ var CATALOG_MODELS = [
|
|
|
21268
21268
|
"fp32",
|
|
21269
21269
|
"unknown"
|
|
21270
21270
|
]
|
|
21271
|
+
},
|
|
21272
|
+
{
|
|
21273
|
+
"id": "moonshotai/kimi-k3.1-pro",
|
|
21274
|
+
"openRouterId": "moonshotai/kimi-k3.1-pro",
|
|
21275
|
+
"label": "Kimi K3.1 Pro",
|
|
21276
|
+
"maker": "MoonshotAI",
|
|
21277
|
+
"contextLength": 1048576,
|
|
21278
|
+
"maxOutputTokens": 943718,
|
|
21279
|
+
"tiers": [
|
|
21280
|
+
{
|
|
21281
|
+
"maxPromptTokens": 1048576,
|
|
21282
|
+
"input": 2.321,
|
|
21283
|
+
"output": 11.605,
|
|
21284
|
+
"cachedInput": 0.2321
|
|
21285
|
+
}
|
|
21286
|
+
],
|
|
21287
|
+
"maxPrice": {
|
|
21288
|
+
"prompt": 2,
|
|
21289
|
+
"completion": 10
|
|
21290
|
+
},
|
|
21291
|
+
"reasoningEfforts": [
|
|
21292
|
+
"none",
|
|
21293
|
+
"low",
|
|
21294
|
+
"high",
|
|
21295
|
+
"max"
|
|
21296
|
+
]
|
|
21271
21297
|
}
|
|
21272
21298
|
];
|
|
21273
21299
|
|
|
@@ -24252,6 +24278,30 @@ function mcpServersFromKept(kept) {
|
|
|
24252
24278
|
return { servers, skipped };
|
|
24253
24279
|
}
|
|
24254
24280
|
|
|
24281
|
+
// ../../packages/spec/src/code-review.ts
|
|
24282
|
+
var codeReviewTargetSchema = external_exports.string().trim().max(2048).transform((value, ctx) => {
|
|
24283
|
+
try {
|
|
24284
|
+
const url2 = new URL(value);
|
|
24285
|
+
const match = /^\/([\w.-]+)\/([\w.-]+)\/pull\/([1-9]\d*)(?:\/.*)?$/.exec(url2.pathname);
|
|
24286
|
+
if (url2.protocol !== "https:" || url2.hostname !== "github.com" || url2.port || url2.username || url2.password || !match || !Number.isSafeInteger(Number(match[3]))) throw new Error();
|
|
24287
|
+
return { owner: match[1], repo: match[2], number: Number(match[3]), url: `https://github.com/${match[1]}/${match[2]}/pull/${match[3]}` };
|
|
24288
|
+
} catch {
|
|
24289
|
+
ctx.addIssue({ code: "custom", message: "Enter a GitHub pull request URL." });
|
|
24290
|
+
return external_exports.NEVER;
|
|
24291
|
+
}
|
|
24292
|
+
});
|
|
24293
|
+
var CODE_REVIEW_PR_METADATA_KEY = "code_review_pr";
|
|
24294
|
+
function sessionCodeReviewPr(metadata) {
|
|
24295
|
+
const value = metadata && typeof metadata === "object" && !Array.isArray(metadata) ? metadata[CODE_REVIEW_PR_METADATA_KEY] : void 0;
|
|
24296
|
+
const parsed = codeReviewTargetSchema.safeParse(value);
|
|
24297
|
+
return parsed.success && parsed.data.url === value ? parsed.data.url : null;
|
|
24298
|
+
}
|
|
24299
|
+
var codeReviewRequestSchema = external_exports.discriminatedUnion("action", [
|
|
24300
|
+
external_exports.object({ action: external_exports.literal("read"), url: codeReviewTargetSchema }).strict(),
|
|
24301
|
+
external_exports.object({ action: external_exports.literal("open"), url: codeReviewTargetSchema }).strict(),
|
|
24302
|
+
external_exports.object({ action: external_exports.literal("review"), url: codeReviewTargetSchema, head: external_exports.string().regex(/^[a-f0-9]{40}$/i), body: external_exports.string().trim().max(65536), event: external_exports.enum(["COMMENT", "APPROVE", "REQUEST_CHANGES"]) }).strict().refine((request) => request.event === "APPROVE" || request.body.length > 0, { path: ["body"], message: "Add a review comment." })
|
|
24303
|
+
]);
|
|
24304
|
+
|
|
24255
24305
|
// ../../packages/spec/src/interaction-mode.ts
|
|
24256
24306
|
var interactionModeSchema = external_exports.enum(["plan", "build"]);
|
|
24257
24307
|
var INTERACTION_MODE_METADATA_KEY = "interaction_mode";
|
|
@@ -24260,6 +24310,10 @@ var sessionMetadataSchema = external_exports.record(external_exports.string(), e
|
|
|
24260
24310
|
if (mode !== void 0 && mode !== null && !interactionModeSchema.safeParse(mode).success) {
|
|
24261
24311
|
context.addIssue({ code: "custom", path: [INTERACTION_MODE_METADATA_KEY], message: "Choose plan or build" });
|
|
24262
24312
|
}
|
|
24313
|
+
const pr = metadata[CODE_REVIEW_PR_METADATA_KEY];
|
|
24314
|
+
if (pr !== void 0 && pr !== null && sessionCodeReviewPr(metadata) === null) {
|
|
24315
|
+
context.addIssue({ code: "custom", path: [CODE_REVIEW_PR_METADATA_KEY], message: "Use an exact GitHub pull request URL" });
|
|
24316
|
+
}
|
|
24263
24317
|
});
|
|
24264
24318
|
|
|
24265
24319
|
// ../../packages/spec/src/events.ts
|
|
@@ -24477,24 +24531,6 @@ var replySchema = external_exports.object({
|
|
|
24477
24531
|
answer: external_exports.union([external_exports.object({ optionId: external_exports.string() }), external_exports.object({ optionIds: external_exports.array(external_exports.string()) }), external_exports.object({ text: external_exports.string() })])
|
|
24478
24532
|
});
|
|
24479
24533
|
|
|
24480
|
-
// ../../packages/spec/src/code-review.ts
|
|
24481
|
-
var codeReviewTargetSchema = external_exports.string().trim().max(2048).transform((value, ctx) => {
|
|
24482
|
-
try {
|
|
24483
|
-
const url2 = new URL(value);
|
|
24484
|
-
const match = /^\/([\w.-]+)\/([\w.-]+)\/pull\/([1-9]\d*)(?:\/.*)?$/.exec(url2.pathname);
|
|
24485
|
-
if (url2.protocol !== "https:" || url2.hostname !== "github.com" || url2.port || url2.username || url2.password || !match || !Number.isSafeInteger(Number(match[3]))) throw new Error();
|
|
24486
|
-
return { owner: match[1], repo: match[2], number: Number(match[3]), url: `https://github.com/${match[1]}/${match[2]}/pull/${match[3]}` };
|
|
24487
|
-
} catch {
|
|
24488
|
-
ctx.addIssue({ code: "custom", message: "Enter a GitHub pull request URL." });
|
|
24489
|
-
return external_exports.NEVER;
|
|
24490
|
-
}
|
|
24491
|
-
});
|
|
24492
|
-
var codeReviewRequestSchema = external_exports.discriminatedUnion("action", [
|
|
24493
|
-
external_exports.object({ action: external_exports.literal("read"), url: codeReviewTargetSchema }).strict(),
|
|
24494
|
-
external_exports.object({ action: external_exports.literal("open"), url: codeReviewTargetSchema }).strict(),
|
|
24495
|
-
external_exports.object({ action: external_exports.literal("review"), url: codeReviewTargetSchema, head: external_exports.string().regex(/^[a-f0-9]{40}$/i), body: external_exports.string().trim().max(65536), event: external_exports.enum(["COMMENT", "APPROVE", "REQUEST_CHANGES"]) }).strict().refine((request) => request.event === "APPROVE" || request.body.length > 0, { path: ["body"], message: "Add a review comment." })
|
|
24496
|
-
]);
|
|
24497
|
-
|
|
24498
24534
|
// ../../packages/spec/src/task-kinds.ts
|
|
24499
24535
|
var TASK_KINDS = [
|
|
24500
24536
|
{ id: "coding", label: "Coding" },
|