@agentsky/sky 2.24.0 → 2.25.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-277AZSSG.js → chunk-D3WG4BMK.js} +7 -2
- package/dist/{chunk-RAFHOB5S.js → chunk-LPUGEMCV.js} +1 -1
- package/dist/{chunk-UHMKEYJN.js → chunk-QROAAJN2.js} +7 -3
- package/dist/index.js +2147 -1850
- package/dist/{src-FB5IETJP.js → src-BMXKAMOB.js} +1 -1
- package/dist/{trace-CFHCOGKB.js → trace-HV4E2BPX.js} +2 -2
- package/dist/{trace-library-2VHTJCOY.js → trace-library-HJWI7KM7.js} +3 -3
- package/package.json +1 -1
|
@@ -24462,6 +24462,11 @@ var usageReportSchema = external_exports.object({
|
|
|
24462
24462
|
/** The supplier that actually served the call (gateway reports only), e.g.
|
|
24463
24463
|
* `subscription-pool` or `socheap` for the `socheap-anthropic` family. */
|
|
24464
24464
|
supplier: external_exports.string().max(100).nullish(),
|
|
24465
|
+
/** Subscription-pool account (its auth file name, never token material)
|
|
24466
|
+
* that answered, when `supplier` is `subscription-pool`. */
|
|
24467
|
+
poolAccount: external_exports.string().min(1).max(200).nullish(),
|
|
24468
|
+
/** Every subscription-pool account tried for the call, in order. */
|
|
24469
|
+
poolAttempts: external_exports.array(external_exports.string().min(1).max(200)).max(16).nullish(),
|
|
24465
24470
|
basis: external_exports.enum(["provider", "estimated"]).default("provider"),
|
|
24466
24471
|
interrupted: external_exports.boolean().default(false),
|
|
24467
24472
|
durationMs: external_exports.number().int().min(0).nullish(),
|
|
@@ -24503,7 +24508,7 @@ var connectionSupportSchema = external_exports.object({
|
|
|
24503
24508
|
}).strict();
|
|
24504
24509
|
|
|
24505
24510
|
// ../../packages/spec/src/question.ts
|
|
24506
|
-
var QUESTION_REQUEST_KINDS = ["connect_app", "connect_account", "spend", "start", "browser_handoff"];
|
|
24511
|
+
var QUESTION_REQUEST_KINDS = ["connect_app", "connect_account", "spend", "start", "browser_handoff", "reflection"];
|
|
24507
24512
|
var questionSchema = external_exports.object({
|
|
24508
24513
|
requestId: external_exports.string().min(1),
|
|
24509
24514
|
question: external_exports.string().trim().min(1),
|
|
@@ -24529,7 +24534,7 @@ var questionSchema = external_exports.object({
|
|
|
24529
24534
|
/** What the platform is asking for when the question is one of its own
|
|
24530
24535
|
* requests rather than an agent's free question. Absent on an ordinary question. */
|
|
24531
24536
|
kind: external_exports.enum(QUESTION_REQUEST_KINDS).optional(),
|
|
24532
|
-
/** What the request is about: the app to connect for `connect_app`, the vendor for `connect_account`, the agent's handle for `spend`, the rule that asks for `start`, the site the agent's browser is on for `browser_handoff`. */
|
|
24537
|
+
/** What the request is about: the app to connect for `connect_app`, the vendor for `connect_account`, the agent's handle for `spend`, the rule that asks for `start`, the site the agent's browser is on for `browser_handoff`, the skill or lesson a finished task suggests changing for `reflection`. */
|
|
24533
24538
|
subject: external_exports.string().trim().min(1).max(200).optional()
|
|
24534
24539
|
}).superRefine((value, context) => {
|
|
24535
24540
|
if (new Set(value.options.map((option) => option.id)).size !== value.options.length) {
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
apiBase,
|
|
4
4
|
apiToken,
|
|
5
5
|
currentUniverse
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-LPUGEMCV.js";
|
|
7
7
|
|
|
8
8
|
// src/api.ts
|
|
9
9
|
import { createWriteStream, writeFileSync } from "fs";
|
|
@@ -42,7 +42,7 @@ async function parseError(res) {
|
|
|
42
42
|
throw new ApiError(res.status, code, message);
|
|
43
43
|
}
|
|
44
44
|
async function api(method, path, body, opts = {}) {
|
|
45
|
-
const res = await fetch(`${apiBase()}${path}`, {
|
|
45
|
+
const res = await fetch(`${opts.base ?? apiBase()}${path}`, {
|
|
46
46
|
method,
|
|
47
47
|
headers: {
|
|
48
48
|
"user-agent": USER_AGENT,
|
|
@@ -97,6 +97,9 @@ async function downloadFileTo(fileId, outPath) {
|
|
|
97
97
|
headers: { "user-agent": USER_AGENT, ...authHeaders() }
|
|
98
98
|
});
|
|
99
99
|
if (!res.ok) await parseError(res);
|
|
100
|
+
return writeResponseFile(res, outPath);
|
|
101
|
+
}
|
|
102
|
+
async function writeResponseFile(res, outPath) {
|
|
100
103
|
if (!res.body) {
|
|
101
104
|
writeFileSync(outPath, new Uint8Array(0));
|
|
102
105
|
return 0;
|
|
@@ -145,7 +148,7 @@ async function resolveSessionRef(ref) {
|
|
|
145
148
|
return agent.defaultSessionId;
|
|
146
149
|
}
|
|
147
150
|
async function* streamEvents(sessionId, signal) {
|
|
148
|
-
const { parseSseStream } = await import("./src-
|
|
151
|
+
const { parseSseStream } = await import("./src-BMXKAMOB.js");
|
|
149
152
|
const res = await fetch(
|
|
150
153
|
`${apiBase()}/sessions/${encodeURIComponent(sessionId)}/stream`,
|
|
151
154
|
{
|
|
@@ -189,6 +192,7 @@ export {
|
|
|
189
192
|
uploadFile,
|
|
190
193
|
apiForm,
|
|
191
194
|
downloadFileTo,
|
|
195
|
+
writeResponseFile,
|
|
192
196
|
apiBytes,
|
|
193
197
|
resolveSessionRef,
|
|
194
198
|
streamEvents,
|