pullfrog 0.1.39 → 0.1.41
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/cli.mjs +1017 -225
- package/dist/index.js +1008 -216
- package/dist/utils/apiKeys.d.ts +12 -0
- package/dist/utils/claudeSubscription.d.ts +3 -1
- package/dist/utils/openCodeModels.d.ts +9 -0
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -13502,7 +13502,7 @@ var require_fetch = __commonJS({
|
|
|
13502
13502
|
}
|
|
13503
13503
|
if (fetchParams.processResponseConsumeBody != null) {
|
|
13504
13504
|
const processBody = (nullOrBytes) => fetchParams.processResponseConsumeBody(response, nullOrBytes);
|
|
13505
|
-
const processBodyError = (
|
|
13505
|
+
const processBodyError = (failure2) => fetchParams.processResponseConsumeBody(response, failure2);
|
|
13506
13506
|
if (response.body == null) {
|
|
13507
13507
|
queueMicrotask(() => processBody(null));
|
|
13508
13508
|
} else {
|
|
@@ -27963,7 +27963,7 @@ var require_cross_spawn = __commonJS({
|
|
|
27963
27963
|
enoent.hookChildProcess(spawned, parsed2);
|
|
27964
27964
|
return spawned;
|
|
27965
27965
|
}
|
|
27966
|
-
function
|
|
27966
|
+
function spawnSync7(command, args2, options) {
|
|
27967
27967
|
const parsed2 = parse5(command, args2, options);
|
|
27968
27968
|
const result = cp.spawnSync(parsed2.command, parsed2.args, parsed2.options);
|
|
27969
27969
|
result.error = result.error || enoent.verifyENOENTSync(result.status, parsed2);
|
|
@@ -27971,7 +27971,7 @@ var require_cross_spawn = __commonJS({
|
|
|
27971
27971
|
}
|
|
27972
27972
|
module.exports = spawn4;
|
|
27973
27973
|
module.exports.spawn = spawn4;
|
|
27974
|
-
module.exports.sync =
|
|
27974
|
+
module.exports.sync = spawnSync7;
|
|
27975
27975
|
module.exports._parse = parse5;
|
|
27976
27976
|
module.exports._enoent = enoent;
|
|
27977
27977
|
}
|
|
@@ -76505,26 +76505,26 @@ var require_uri_templates = __commonJS({
|
|
|
76505
76505
|
}
|
|
76506
76506
|
});
|
|
76507
76507
|
|
|
76508
|
-
// node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod-to-json-schema@3.25.1_zod@4.3.
|
|
76508
|
+
// node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod@4.3.6_zod-to-json-schema@3.25.1_zod@4.3.6_/node_modules/xsschema/dist/arktype-C-GObzDh.js
|
|
76509
76509
|
var arktype_C_GObzDh_exports = {};
|
|
76510
76510
|
__export(arktype_C_GObzDh_exports, {
|
|
76511
76511
|
getToJsonSchemaFn: () => getToJsonSchemaFn
|
|
76512
76512
|
});
|
|
76513
76513
|
var getToJsonSchemaFn;
|
|
76514
76514
|
var init_arktype_C_GObzDh = __esm({
|
|
76515
|
-
"node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod-to-json-schema@3.25.1_zod@4.3.
|
|
76515
|
+
"node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod@4.3.6_zod-to-json-schema@3.25.1_zod@4.3.6_/node_modules/xsschema/dist/arktype-C-GObzDh.js"() {
|
|
76516
76516
|
getToJsonSchemaFn = async () => (schema2) => schema2.toJsonSchema();
|
|
76517
76517
|
}
|
|
76518
76518
|
});
|
|
76519
76519
|
|
|
76520
|
-
// node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod-to-json-schema@3.25.1_zod@4.3.
|
|
76520
|
+
// node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod@4.3.6_zod-to-json-schema@3.25.1_zod@4.3.6_/node_modules/xsschema/dist/effect-Df2gY8Wx.js
|
|
76521
76521
|
var effect_Df2gY8Wx_exports = {};
|
|
76522
76522
|
__export(effect_Df2gY8Wx_exports, {
|
|
76523
76523
|
getToJsonSchemaFn: () => getToJsonSchemaFn2
|
|
76524
76524
|
});
|
|
76525
76525
|
var getToJsonSchemaFn2;
|
|
76526
76526
|
var init_effect_Df2gY8Wx = __esm({
|
|
76527
|
-
"node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod-to-json-schema@3.25.1_zod@4.3.
|
|
76527
|
+
"node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod@4.3.6_zod-to-json-schema@3.25.1_zod@4.3.6_/node_modules/xsschema/dist/effect-Df2gY8Wx.js"() {
|
|
76528
76528
|
init_index_DoHiaFQM();
|
|
76529
76529
|
getToJsonSchemaFn2 = async () => {
|
|
76530
76530
|
const { JSONSchema } = await tryImport(import("effect"), "effect");
|
|
@@ -76533,14 +76533,14 @@ var init_effect_Df2gY8Wx = __esm({
|
|
|
76533
76533
|
}
|
|
76534
76534
|
});
|
|
76535
76535
|
|
|
76536
|
-
// node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod-to-json-schema@3.25.1_zod@4.3.
|
|
76536
|
+
// node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod@4.3.6_zod-to-json-schema@3.25.1_zod@4.3.6_/node_modules/xsschema/dist/sury-BoOvxlMw.js
|
|
76537
76537
|
var sury_BoOvxlMw_exports = {};
|
|
76538
76538
|
__export(sury_BoOvxlMw_exports, {
|
|
76539
76539
|
getToJsonSchemaFn: () => getToJsonSchemaFn3
|
|
76540
76540
|
});
|
|
76541
76541
|
var getToJsonSchemaFn3;
|
|
76542
76542
|
var init_sury_BoOvxlMw = __esm({
|
|
76543
|
-
"node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod-to-json-schema@3.25.1_zod@4.3.
|
|
76543
|
+
"node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod@4.3.6_zod-to-json-schema@3.25.1_zod@4.3.6_/node_modules/xsschema/dist/sury-BoOvxlMw.js"() {
|
|
76544
76544
|
init_index_DoHiaFQM();
|
|
76545
76545
|
getToJsonSchemaFn3 = async () => {
|
|
76546
76546
|
const { toJSONSchema: toJSONSchema2 } = await tryImport(import("sury"), "sury");
|
|
@@ -76549,14 +76549,14 @@ var init_sury_BoOvxlMw = __esm({
|
|
|
76549
76549
|
}
|
|
76550
76550
|
});
|
|
76551
76551
|
|
|
76552
|
-
// node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod-to-json-schema@3.25.1_zod@4.3.
|
|
76552
|
+
// node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod@4.3.6_zod-to-json-schema@3.25.1_zod@4.3.6_/node_modules/xsschema/dist/valibot-_ibN3zSD.js
|
|
76553
76553
|
var valibot_ibN3zSD_exports = {};
|
|
76554
76554
|
__export(valibot_ibN3zSD_exports, {
|
|
76555
76555
|
getToJsonSchemaFn: () => getToJsonSchemaFn4
|
|
76556
76556
|
});
|
|
76557
76557
|
var getToJsonSchemaFn4;
|
|
76558
76558
|
var init_valibot_ibN3zSD = __esm({
|
|
76559
|
-
"node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod-to-json-schema@3.25.1_zod@4.3.
|
|
76559
|
+
"node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod@4.3.6_zod-to-json-schema@3.25.1_zod@4.3.6_/node_modules/xsschema/dist/valibot-_ibN3zSD.js"() {
|
|
76560
76560
|
init_index_DoHiaFQM();
|
|
76561
76561
|
getToJsonSchemaFn4 = async () => {
|
|
76562
76562
|
const { toJsonSchema: toJsonSchema2 } = await tryImport(import("@valibot/to-json-schema"), "@valibot/to-json-schema");
|
|
@@ -76565,14 +76565,14 @@ var init_valibot_ibN3zSD = __esm({
|
|
|
76565
76565
|
}
|
|
76566
76566
|
});
|
|
76567
76567
|
|
|
76568
|
-
// node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod-to-json-schema@3.25.1_zod@4.3.
|
|
76568
|
+
// node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod@4.3.6_zod-to-json-schema@3.25.1_zod@4.3.6_/node_modules/xsschema/dist/zod-DjyNjMBF.js
|
|
76569
76569
|
var zod_DjyNjMBF_exports = {};
|
|
76570
76570
|
__export(zod_DjyNjMBF_exports, {
|
|
76571
76571
|
getToJsonSchemaFn: () => getToJsonSchemaFn5
|
|
76572
76572
|
});
|
|
76573
76573
|
var getToJsonSchemaFn5;
|
|
76574
76574
|
var init_zod_DjyNjMBF = __esm({
|
|
76575
|
-
"node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod-to-json-schema@3.25.1_zod@4.3.
|
|
76575
|
+
"node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod@4.3.6_zod-to-json-schema@3.25.1_zod@4.3.6_/node_modules/xsschema/dist/zod-DjyNjMBF.js"() {
|
|
76576
76576
|
init_index_DoHiaFQM();
|
|
76577
76577
|
getToJsonSchemaFn5 = async () => {
|
|
76578
76578
|
let zodV4toJSONSchema = (_schema) => {
|
|
@@ -76605,10 +76605,10 @@ var init_zod_DjyNjMBF = __esm({
|
|
|
76605
76605
|
}
|
|
76606
76606
|
});
|
|
76607
76607
|
|
|
76608
|
-
// node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod-to-json-schema@3.25.1_zod@4.3.
|
|
76608
|
+
// node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod@4.3.6_zod-to-json-schema@3.25.1_zod@4.3.6_/node_modules/xsschema/dist/index-DoHiaFQM.js
|
|
76609
76609
|
var isStandardJSONSchemaV1, missingDependenciesUrl, tryImport, getToJsonSchemaFn6, toJsonSchema;
|
|
76610
76610
|
var init_index_DoHiaFQM = __esm({
|
|
76611
|
-
"node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod-to-json-schema@3.25.1_zod@4.3.
|
|
76611
|
+
"node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod@4.3.6_zod-to-json-schema@3.25.1_zod@4.3.6_/node_modules/xsschema/dist/index-DoHiaFQM.js"() {
|
|
76612
76612
|
isStandardJSONSchemaV1 = (schema2) => "jsonSchema" in schema2["~standard"];
|
|
76613
76613
|
missingDependenciesUrl = "https://xsai.js.org/docs/packages-top/xsschema#missing-dependencies";
|
|
76614
76614
|
tryImport = async (result, name) => {
|
|
@@ -94838,13 +94838,13 @@ var require_Location = __commonJS({
|
|
|
94838
94838
|
"use strict";
|
|
94839
94839
|
var URL2 = require_URL();
|
|
94840
94840
|
var URLUtils = require_URLUtils();
|
|
94841
|
-
module.exports =
|
|
94842
|
-
function
|
|
94841
|
+
module.exports = Location2;
|
|
94842
|
+
function Location2(window2, href) {
|
|
94843
94843
|
this._window = window2;
|
|
94844
94844
|
this._href = href;
|
|
94845
94845
|
}
|
|
94846
|
-
|
|
94847
|
-
constructor: { value:
|
|
94846
|
+
Location2.prototype = Object.create(URLUtils.prototype, {
|
|
94847
|
+
constructor: { value: Location2 },
|
|
94848
94848
|
// Special behavior when href is set
|
|
94849
94849
|
href: {
|
|
94850
94850
|
get: function() {
|
|
@@ -94945,14 +94945,14 @@ var require_Window = __commonJS({
|
|
|
94945
94945
|
"use strict";
|
|
94946
94946
|
var DOMImplementation = require_DOMImplementation();
|
|
94947
94947
|
var EventTarget2 = require_EventTarget();
|
|
94948
|
-
var
|
|
94948
|
+
var Location2 = require_Location();
|
|
94949
94949
|
var utils = require_utils7();
|
|
94950
94950
|
module.exports = Window;
|
|
94951
94951
|
function Window(document2) {
|
|
94952
94952
|
this.document = document2 || new DOMImplementation(null).createHTMLDocument("");
|
|
94953
94953
|
this.document._scripting_enabled = true;
|
|
94954
94954
|
this.document.defaultView = this;
|
|
94955
|
-
this.location = new
|
|
94955
|
+
this.location = new Location2(this, this.document._address || "about:blank");
|
|
94956
94956
|
}
|
|
94957
94957
|
Window.prototype = Object.create(EventTarget2.prototype, {
|
|
94958
94958
|
console: { value: console },
|
|
@@ -100565,7 +100565,7 @@ async function preflightClaudeSubscription(params) {
|
|
|
100565
100565
|
} catch {
|
|
100566
100566
|
return { usable: true };
|
|
100567
100567
|
}
|
|
100568
|
-
if (res.status !== 401 && res.status !== 429) return { usable: true };
|
|
100568
|
+
if (res.status !== 401 && res.status !== 403 && res.status !== 429) return { usable: true };
|
|
100569
100569
|
const body = await res.text().catch(() => "");
|
|
100570
100570
|
return { usable: false, reason: `${res.status}: ${extractApiErrorMessage(body)}` };
|
|
100571
100571
|
}
|
|
@@ -101068,7 +101068,7 @@ function extractExcerpt(text, matchIndex) {
|
|
|
101068
101068
|
}
|
|
101069
101069
|
return excerpt.trim();
|
|
101070
101070
|
}
|
|
101071
|
-
var ROUTER_KEYLIMIT_EXHAUSTED_PATTERN = /requires more credits.*?fewer max_tokens|requested up to \d+ tokens.*?can only afford/is;
|
|
101071
|
+
var ROUTER_KEYLIMIT_EXHAUSTED_PATTERN = /requires more credits.*?fewer max_tokens|requested up to \d+ tokens.*?can only afford|Key limit exceeded \(total limit\)/is;
|
|
101072
101072
|
function isRouterKeylimitExhaustedError(text) {
|
|
101073
101073
|
return ROUTER_KEYLIMIT_EXHAUSTED_PATTERN.test(text);
|
|
101074
101074
|
}
|
|
@@ -101093,7 +101093,7 @@ var import_semver = __toESM(require_semver2(), 1);
|
|
|
101093
101093
|
// package.json
|
|
101094
101094
|
var package_default = {
|
|
101095
101095
|
name: "pullfrog",
|
|
101096
|
-
version: "0.1.
|
|
101096
|
+
version: "0.1.41",
|
|
101097
101097
|
type: "module",
|
|
101098
101098
|
bin: {
|
|
101099
101099
|
pullfrog: "dist/cli.mjs",
|
|
@@ -101124,7 +101124,7 @@ var package_default = {
|
|
|
101124
101124
|
"@ark/util": "0.56.0",
|
|
101125
101125
|
"@clack/prompts": "^1.2.0",
|
|
101126
101126
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
101127
|
-
"@opencode-ai/sdk": "1.
|
|
101127
|
+
"@opencode-ai/sdk": "1.18.5",
|
|
101128
101128
|
"@octokit/plugin-throttling": "^11.0.3",
|
|
101129
101129
|
"@octokit/rest": "^22.0.0",
|
|
101130
101130
|
"@octokit/webhooks-types": "^7.6.1",
|
|
@@ -101147,7 +101147,7 @@ var package_default = {
|
|
|
101147
101147
|
husky: "^9.0.0",
|
|
101148
101148
|
"lru-cache": "^11.0.0",
|
|
101149
101149
|
"object-hash": "^3.0.0",
|
|
101150
|
-
"opencode-ai": "1.
|
|
101150
|
+
"opencode-ai": "1.18.5",
|
|
101151
101151
|
"package-manager-detector": "^1.6.0",
|
|
101152
101152
|
picocolors: "^1.1.1",
|
|
101153
101153
|
semver: "^7.7.3",
|
|
@@ -102368,12 +102368,12 @@ function getUnsubmittedReview(toolState) {
|
|
|
102368
102368
|
}
|
|
102369
102369
|
return null;
|
|
102370
102370
|
}
|
|
102371
|
-
function buildStopHookPrompt(
|
|
102371
|
+
function buildStopHookPrompt(failure2) {
|
|
102372
102372
|
return [
|
|
102373
|
-
`STOP HOOK FAILED \u2014 the repo-configured stop hook exited with code ${
|
|
102373
|
+
`STOP HOOK FAILED \u2014 the repo-configured stop hook exited with code ${failure2.exitCode}. your work is not done until the hook exits cleanly. address the issue below and push any resulting changes to a pull request.`,
|
|
102374
102374
|
"",
|
|
102375
102375
|
"```",
|
|
102376
|
-
|
|
102376
|
+
failure2.output || "(no output)",
|
|
102377
102377
|
"```"
|
|
102378
102378
|
].join("\n");
|
|
102379
102379
|
}
|
|
@@ -103399,7 +103399,7 @@ import { mkdirSync as mkdirSync6, writeFileSync as writeFileSync5 } from "node:f
|
|
|
103399
103399
|
import { join as join6 } from "node:path";
|
|
103400
103400
|
import { performance as performance6 } from "node:perf_hooks";
|
|
103401
103401
|
|
|
103402
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
103402
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/gen/core/serverSentEvents.gen.js
|
|
103403
103403
|
var createSseClient = ({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url: url4, ...options }) => {
|
|
103404
103404
|
let lastEventId;
|
|
103405
103405
|
const sleep4 = sseSleepFn ?? ((ms) => new Promise((resolve3) => setTimeout(resolve3, ms)));
|
|
@@ -103518,7 +103518,7 @@ var createSseClient = ({ onRequest, onSseError, onSseEvent, responseTransformer,
|
|
|
103518
103518
|
return { stream };
|
|
103519
103519
|
};
|
|
103520
103520
|
|
|
103521
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
103521
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/gen/core/pathSerializer.gen.js
|
|
103522
103522
|
var separatorArrayExplode = (style) => {
|
|
103523
103523
|
switch (style) {
|
|
103524
103524
|
case "label":
|
|
@@ -103621,7 +103621,7 @@ var serializeObjectParam = ({ allowReserved, explode, name, style, value: value2
|
|
|
103621
103621
|
return style === "label" || style === "matrix" ? separator2 + joinedValues : joinedValues;
|
|
103622
103622
|
};
|
|
103623
103623
|
|
|
103624
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
103624
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/gen/core/utils.gen.js
|
|
103625
103625
|
var PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
103626
103626
|
var defaultPathSerializer = ({ path: path4, url: _url4 }) => {
|
|
103627
103627
|
let url4 = _url4;
|
|
@@ -103704,7 +103704,7 @@ function getValidRequestBody(options) {
|
|
|
103704
103704
|
return void 0;
|
|
103705
103705
|
}
|
|
103706
103706
|
|
|
103707
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
103707
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/gen/core/auth.gen.js
|
|
103708
103708
|
var getAuthToken = async (auth2, callback) => {
|
|
103709
103709
|
const token = typeof callback === "function" ? await callback(auth2) : callback;
|
|
103710
103710
|
if (!token) {
|
|
@@ -103719,12 +103719,12 @@ var getAuthToken = async (auth2, callback) => {
|
|
|
103719
103719
|
return token;
|
|
103720
103720
|
};
|
|
103721
103721
|
|
|
103722
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
103722
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/gen/core/bodySerializer.gen.js
|
|
103723
103723
|
var jsonBodySerializer = {
|
|
103724
103724
|
bodySerializer: (body) => JSON.stringify(body, (_key, value2) => typeof value2 === "bigint" ? value2.toString() : value2)
|
|
103725
103725
|
};
|
|
103726
103726
|
|
|
103727
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
103727
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/gen/client/utils.gen.js
|
|
103728
103728
|
var createQuerySerializer = ({ parameters = {}, ...args2 } = {}) => {
|
|
103729
103729
|
const querySerializer = (queryParams) => {
|
|
103730
103730
|
const search2 = [];
|
|
@@ -103934,7 +103934,7 @@ var createConfig = (override = {}) => ({
|
|
|
103934
103934
|
...override
|
|
103935
103935
|
});
|
|
103936
103936
|
|
|
103937
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
103937
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/gen/client/client.gen.js
|
|
103938
103938
|
var createClient = (config3 = {}) => {
|
|
103939
103939
|
let _config = mergeConfigs(createConfig(), config3);
|
|
103940
103940
|
const getConfig = () => ({ ..._config });
|
|
@@ -104142,7 +104142,7 @@ var createClient = (config3 = {}) => {
|
|
|
104142
104142
|
};
|
|
104143
104143
|
};
|
|
104144
104144
|
|
|
104145
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
104145
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/gen/core/params.gen.js
|
|
104146
104146
|
var extraPrefixesMap = {
|
|
104147
104147
|
$body_: "body",
|
|
104148
104148
|
$headers_: "headers",
|
|
@@ -104238,10 +104238,10 @@ var buildClientParams = (args2, fields) => {
|
|
|
104238
104238
|
return params;
|
|
104239
104239
|
};
|
|
104240
104240
|
|
|
104241
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
104241
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/gen/client.gen.js
|
|
104242
104242
|
var client = createClient(createConfig({ baseUrl: "http://localhost:4096" }));
|
|
104243
104243
|
|
|
104244
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
104244
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/gen/sdk.gen.js
|
|
104245
104245
|
var HeyApiClient = class {
|
|
104246
104246
|
client;
|
|
104247
104247
|
constructor(args2) {
|
|
@@ -104401,6 +104401,28 @@ var ControlPlane = class extends HeyApiClient {
|
|
|
104401
104401
|
});
|
|
104402
104402
|
}
|
|
104403
104403
|
};
|
|
104404
|
+
var Capabilities = class extends HeyApiClient {
|
|
104405
|
+
/**
|
|
104406
|
+
* Get experimental capabilities
|
|
104407
|
+
*
|
|
104408
|
+
* Get experimental features enabled on the OpenCode server.
|
|
104409
|
+
*/
|
|
104410
|
+
get(parameters, options) {
|
|
104411
|
+
const params = buildClientParams([parameters], [
|
|
104412
|
+
{
|
|
104413
|
+
args: [
|
|
104414
|
+
{ in: "query", key: "directory" },
|
|
104415
|
+
{ in: "query", key: "workspace" }
|
|
104416
|
+
]
|
|
104417
|
+
}
|
|
104418
|
+
]);
|
|
104419
|
+
return (options?.client ?? this.client).get({
|
|
104420
|
+
url: "/experimental/capabilities",
|
|
104421
|
+
...options,
|
|
104422
|
+
...params
|
|
104423
|
+
});
|
|
104424
|
+
}
|
|
104425
|
+
};
|
|
104404
104426
|
var Console = class extends HeyApiClient {
|
|
104405
104427
|
/**
|
|
104406
104428
|
* Get active Console provider metadata
|
|
@@ -104543,60 +104565,23 @@ var Resource = class extends HeyApiClient {
|
|
|
104543
104565
|
};
|
|
104544
104566
|
var ProjectCopy = class extends HeyApiClient {
|
|
104545
104567
|
/**
|
|
104546
|
-
*
|
|
104547
|
-
*
|
|
104548
|
-
* Remove a local physical copy of a project using the selected strategy.
|
|
104549
|
-
*/
|
|
104550
|
-
remove(parameters, options) {
|
|
104551
|
-
const params = buildClientParams([parameters], [
|
|
104552
|
-
{
|
|
104553
|
-
args: [
|
|
104554
|
-
{ in: "path", key: "projectID" },
|
|
104555
|
-
{
|
|
104556
|
-
in: "query",
|
|
104557
|
-
key: "query_directory",
|
|
104558
|
-
map: "directory"
|
|
104559
|
-
},
|
|
104560
|
-
{ in: "query", key: "workspace" },
|
|
104561
|
-
{
|
|
104562
|
-
in: "body",
|
|
104563
|
-
key: "body_directory",
|
|
104564
|
-
map: "directory"
|
|
104565
|
-
}
|
|
104566
|
-
]
|
|
104567
|
-
}
|
|
104568
|
-
]);
|
|
104569
|
-
return (options?.client ?? this.client).delete({
|
|
104570
|
-
url: "/experimental/project/{projectID}/copy",
|
|
104571
|
-
...options,
|
|
104572
|
-
...params,
|
|
104573
|
-
headers: {
|
|
104574
|
-
"Content-Type": "application/json",
|
|
104575
|
-
...options?.headers,
|
|
104576
|
-
...params.headers
|
|
104577
|
-
}
|
|
104578
|
-
});
|
|
104579
|
-
}
|
|
104580
|
-
/**
|
|
104581
|
-
* Create project copy
|
|
104568
|
+
* Generate project copy name
|
|
104582
104569
|
*
|
|
104583
|
-
*
|
|
104570
|
+
* Generate a short name for a project copy from task context.
|
|
104584
104571
|
*/
|
|
104585
|
-
|
|
104572
|
+
generateName(parameters, options) {
|
|
104586
104573
|
const params = buildClientParams([parameters], [
|
|
104587
104574
|
{
|
|
104588
104575
|
args: [
|
|
104589
104576
|
{ in: "path", key: "projectID" },
|
|
104577
|
+
{ in: "query", key: "directory" },
|
|
104590
104578
|
{ in: "query", key: "workspace" },
|
|
104591
|
-
{ in: "body", key: "strategy" },
|
|
104592
|
-
{ in: "body", key: "directory" },
|
|
104593
|
-
{ in: "body", key: "name" },
|
|
104594
104579
|
{ in: "body", key: "context" }
|
|
104595
104580
|
]
|
|
104596
104581
|
}
|
|
104597
104582
|
]);
|
|
104598
104583
|
return (options?.client ?? this.client).post({
|
|
104599
|
-
url: "/experimental/project/{projectID}/copy",
|
|
104584
|
+
url: "/experimental/project/{projectID}/copy/generate-name",
|
|
104600
104585
|
...options,
|
|
104601
104586
|
...params,
|
|
104602
104587
|
headers: {
|
|
@@ -104606,27 +104591,6 @@ var ProjectCopy = class extends HeyApiClient {
|
|
|
104606
104591
|
}
|
|
104607
104592
|
});
|
|
104608
104593
|
}
|
|
104609
|
-
/**
|
|
104610
|
-
* Refresh project copies
|
|
104611
|
-
*
|
|
104612
|
-
* Discover local project copies using one or all configured strategies.
|
|
104613
|
-
*/
|
|
104614
|
-
refresh(parameters, options) {
|
|
104615
|
-
const params = buildClientParams([parameters], [
|
|
104616
|
-
{
|
|
104617
|
-
args: [
|
|
104618
|
-
{ in: "path", key: "projectID" },
|
|
104619
|
-
{ in: "query", key: "directory" },
|
|
104620
|
-
{ in: "query", key: "workspace" }
|
|
104621
|
-
]
|
|
104622
|
-
}
|
|
104623
|
-
]);
|
|
104624
|
-
return (options?.client ?? this.client).post({
|
|
104625
|
-
url: "/experimental/project/{projectID}/copy/refresh",
|
|
104626
|
-
...options,
|
|
104627
|
-
...params
|
|
104628
|
-
});
|
|
104629
|
-
}
|
|
104630
104594
|
};
|
|
104631
104595
|
var Adapter = class extends HeyApiClient {
|
|
104632
104596
|
/**
|
|
@@ -104799,6 +104763,10 @@ var Experimental = class extends HeyApiClient {
|
|
|
104799
104763
|
get controlPlane() {
|
|
104800
104764
|
return this._controlPlane ??= new ControlPlane({ client: this.client });
|
|
104801
104765
|
}
|
|
104766
|
+
_capabilities;
|
|
104767
|
+
get capabilities() {
|
|
104768
|
+
return this._capabilities ??= new Capabilities({ client: this.client });
|
|
104769
|
+
}
|
|
104802
104770
|
_console;
|
|
104803
104771
|
get console() {
|
|
104804
104772
|
return this._console ??= new Console({ client: this.client });
|
|
@@ -107322,9 +107290,9 @@ var Tui = class extends HeyApiClient {
|
|
|
107322
107290
|
};
|
|
107323
107291
|
var Health = class extends HeyApiClient {
|
|
107324
107292
|
/**
|
|
107325
|
-
* Check
|
|
107293
|
+
* Check server health
|
|
107326
107294
|
*
|
|
107327
|
-
* Check whether the
|
|
107295
|
+
* Check whether the API server is ready to accept requests.
|
|
107328
107296
|
*/
|
|
107329
107297
|
get(options) {
|
|
107330
107298
|
return (options?.client ?? this.client).get({
|
|
@@ -107333,11 +107301,26 @@ var Health = class extends HeyApiClient {
|
|
|
107333
107301
|
});
|
|
107334
107302
|
}
|
|
107335
107303
|
};
|
|
107304
|
+
var Location = class extends HeyApiClient {
|
|
107305
|
+
/**
|
|
107306
|
+
* Get location
|
|
107307
|
+
*
|
|
107308
|
+
* Resolve the requested location or the server default location.
|
|
107309
|
+
*/
|
|
107310
|
+
get(parameters, options) {
|
|
107311
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
107312
|
+
return (options?.client ?? this.client).get({
|
|
107313
|
+
url: "/api/location",
|
|
107314
|
+
...options,
|
|
107315
|
+
...params
|
|
107316
|
+
});
|
|
107317
|
+
}
|
|
107318
|
+
};
|
|
107336
107319
|
var Agent = class extends HeyApiClient {
|
|
107337
107320
|
/**
|
|
107338
|
-
* List
|
|
107321
|
+
* List agents
|
|
107339
107322
|
*
|
|
107340
|
-
* Retrieve currently registered
|
|
107323
|
+
* Retrieve currently registered agents.
|
|
107341
107324
|
*/
|
|
107342
107325
|
list(parameters, options) {
|
|
107343
107326
|
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
@@ -107348,6 +107331,56 @@ var Agent = class extends HeyApiClient {
|
|
|
107348
107331
|
});
|
|
107349
107332
|
}
|
|
107350
107333
|
};
|
|
107334
|
+
var Revert = class extends HeyApiClient {
|
|
107335
|
+
/**
|
|
107336
|
+
* Stage session revert
|
|
107337
|
+
*
|
|
107338
|
+
* Stage or move a reversible session boundary and optionally apply its file changes.
|
|
107339
|
+
*/
|
|
107340
|
+
stage(parameters, options) {
|
|
107341
|
+
const params = buildClientParams([parameters], [
|
|
107342
|
+
{
|
|
107343
|
+
args: [
|
|
107344
|
+
{ in: "path", key: "sessionID" },
|
|
107345
|
+
{ in: "body", key: "messageID" },
|
|
107346
|
+
{ in: "body", key: "files" }
|
|
107347
|
+
]
|
|
107348
|
+
}
|
|
107349
|
+
]);
|
|
107350
|
+
return (options?.client ?? this.client).post({
|
|
107351
|
+
url: "/api/session/{sessionID}/revert/stage",
|
|
107352
|
+
...options,
|
|
107353
|
+
...params,
|
|
107354
|
+
headers: {
|
|
107355
|
+
"Content-Type": "application/json",
|
|
107356
|
+
...options?.headers,
|
|
107357
|
+
...params.headers
|
|
107358
|
+
}
|
|
107359
|
+
});
|
|
107360
|
+
}
|
|
107361
|
+
/**
|
|
107362
|
+
* Clear staged revert
|
|
107363
|
+
*/
|
|
107364
|
+
clear(parameters, options) {
|
|
107365
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
107366
|
+
return (options?.client ?? this.client).post({
|
|
107367
|
+
url: "/api/session/{sessionID}/revert/clear",
|
|
107368
|
+
...options,
|
|
107369
|
+
...params
|
|
107370
|
+
});
|
|
107371
|
+
}
|
|
107372
|
+
/**
|
|
107373
|
+
* Commit staged revert
|
|
107374
|
+
*/
|
|
107375
|
+
commit(parameters, options) {
|
|
107376
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
107377
|
+
return (options?.client ?? this.client).post({
|
|
107378
|
+
url: "/api/session/{sessionID}/revert/commit",
|
|
107379
|
+
...options,
|
|
107380
|
+
...params
|
|
107381
|
+
});
|
|
107382
|
+
}
|
|
107383
|
+
};
|
|
107351
107384
|
var Permission2 = class extends HeyApiClient {
|
|
107352
107385
|
/**
|
|
107353
107386
|
* List session permission requests
|
|
@@ -107357,7 +107390,58 @@ var Permission2 = class extends HeyApiClient {
|
|
|
107357
107390
|
list(parameters, options) {
|
|
107358
107391
|
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
107359
107392
|
return (options?.client ?? this.client).get({
|
|
107360
|
-
url: "/api/session/{sessionID}/permission
|
|
107393
|
+
url: "/api/session/{sessionID}/permission",
|
|
107394
|
+
...options,
|
|
107395
|
+
...params
|
|
107396
|
+
});
|
|
107397
|
+
}
|
|
107398
|
+
/**
|
|
107399
|
+
* Create permission request
|
|
107400
|
+
*
|
|
107401
|
+
* Evaluate and, when approval is required, create a permission request for a session.
|
|
107402
|
+
*/
|
|
107403
|
+
create(parameters, options) {
|
|
107404
|
+
const params = buildClientParams([parameters], [
|
|
107405
|
+
{
|
|
107406
|
+
args: [
|
|
107407
|
+
{ in: "path", key: "sessionID" },
|
|
107408
|
+
{ in: "body", key: "id" },
|
|
107409
|
+
{ in: "body", key: "action" },
|
|
107410
|
+
{ in: "body", key: "resources" },
|
|
107411
|
+
{ in: "body", key: "save" },
|
|
107412
|
+
{ in: "body", key: "metadata" },
|
|
107413
|
+
{ in: "body", key: "source" },
|
|
107414
|
+
{ in: "body", key: "agent" }
|
|
107415
|
+
]
|
|
107416
|
+
}
|
|
107417
|
+
]);
|
|
107418
|
+
return (options?.client ?? this.client).post({
|
|
107419
|
+
url: "/api/session/{sessionID}/permission",
|
|
107420
|
+
...options,
|
|
107421
|
+
...params,
|
|
107422
|
+
headers: {
|
|
107423
|
+
"Content-Type": "application/json",
|
|
107424
|
+
...options?.headers,
|
|
107425
|
+
...params.headers
|
|
107426
|
+
}
|
|
107427
|
+
});
|
|
107428
|
+
}
|
|
107429
|
+
/**
|
|
107430
|
+
* Get permission request
|
|
107431
|
+
*
|
|
107432
|
+
* Retrieve a pending permission request owned by a session.
|
|
107433
|
+
*/
|
|
107434
|
+
get(parameters, options) {
|
|
107435
|
+
const params = buildClientParams([parameters], [
|
|
107436
|
+
{
|
|
107437
|
+
args: [
|
|
107438
|
+
{ in: "path", key: "sessionID" },
|
|
107439
|
+
{ in: "path", key: "requestID" }
|
|
107440
|
+
]
|
|
107441
|
+
}
|
|
107442
|
+
]);
|
|
107443
|
+
return (options?.client ?? this.client).get({
|
|
107444
|
+
url: "/api/session/{sessionID}/permission/{requestID}",
|
|
107361
107445
|
...options,
|
|
107362
107446
|
...params
|
|
107363
107447
|
});
|
|
@@ -107379,7 +107463,7 @@ var Permission2 = class extends HeyApiClient {
|
|
|
107379
107463
|
}
|
|
107380
107464
|
]);
|
|
107381
107465
|
return (options?.client ?? this.client).post({
|
|
107382
|
-
url: "/api/session/{sessionID}/permission/
|
|
107466
|
+
url: "/api/session/{sessionID}/permission/{requestID}/reply",
|
|
107383
107467
|
...options,
|
|
107384
107468
|
...params,
|
|
107385
107469
|
headers: {
|
|
@@ -107391,6 +107475,19 @@ var Permission2 = class extends HeyApiClient {
|
|
|
107391
107475
|
}
|
|
107392
107476
|
};
|
|
107393
107477
|
var Question2 = class extends HeyApiClient {
|
|
107478
|
+
/**
|
|
107479
|
+
* List session question requests
|
|
107480
|
+
*
|
|
107481
|
+
* Retrieve pending question requests owned by a session.
|
|
107482
|
+
*/
|
|
107483
|
+
list(parameters, options) {
|
|
107484
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
107485
|
+
return (options?.client ?? this.client).get({
|
|
107486
|
+
url: "/api/session/{sessionID}/question",
|
|
107487
|
+
...options,
|
|
107488
|
+
...params
|
|
107489
|
+
});
|
|
107490
|
+
}
|
|
107394
107491
|
/**
|
|
107395
107492
|
* Reply to pending question request
|
|
107396
107493
|
*
|
|
@@ -107407,7 +107504,7 @@ var Question2 = class extends HeyApiClient {
|
|
|
107407
107504
|
}
|
|
107408
107505
|
]);
|
|
107409
107506
|
return (options?.client ?? this.client).post({
|
|
107410
|
-
url: "/api/session/{sessionID}/question/
|
|
107507
|
+
url: "/api/session/{sessionID}/question/{requestID}/reply",
|
|
107411
107508
|
...options,
|
|
107412
107509
|
...params,
|
|
107413
107510
|
headers: {
|
|
@@ -107432,7 +107529,7 @@ var Question2 = class extends HeyApiClient {
|
|
|
107432
107529
|
}
|
|
107433
107530
|
]);
|
|
107434
107531
|
return (options?.client ?? this.client).post({
|
|
107435
|
-
url: "/api/session/{sessionID}/question/
|
|
107532
|
+
url: "/api/session/{sessionID}/question/{requestID}/reject",
|
|
107436
107533
|
...options,
|
|
107437
107534
|
...params
|
|
107438
107535
|
});
|
|
@@ -107440,7 +107537,7 @@ var Question2 = class extends HeyApiClient {
|
|
|
107440
107537
|
};
|
|
107441
107538
|
var Session3 = class extends HeyApiClient {
|
|
107442
107539
|
/**
|
|
107443
|
-
* List
|
|
107540
|
+
* List sessions
|
|
107444
107541
|
*
|
|
107445
107542
|
* Retrieve sessions in the requested order. Items keep that order across pages; use cursor.next or cursor.previous to move through the ordered list.
|
|
107446
107543
|
*/
|
|
@@ -107466,9 +107563,110 @@ var Session3 = class extends HeyApiClient {
|
|
|
107466
107563
|
});
|
|
107467
107564
|
}
|
|
107468
107565
|
/**
|
|
107469
|
-
*
|
|
107566
|
+
* Create session
|
|
107567
|
+
*
|
|
107568
|
+
* Create a session at the requested location.
|
|
107569
|
+
*/
|
|
107570
|
+
create(parameters, options) {
|
|
107571
|
+
const params = buildClientParams([parameters], [
|
|
107572
|
+
{
|
|
107573
|
+
args: [
|
|
107574
|
+
{ in: "body", key: "id" },
|
|
107575
|
+
{ in: "body", key: "agent" },
|
|
107576
|
+
{ in: "body", key: "model" },
|
|
107577
|
+
{ in: "body", key: "location" }
|
|
107578
|
+
]
|
|
107579
|
+
}
|
|
107580
|
+
]);
|
|
107581
|
+
return (options?.client ?? this.client).post({
|
|
107582
|
+
url: "/api/session",
|
|
107583
|
+
...options,
|
|
107584
|
+
...params,
|
|
107585
|
+
headers: {
|
|
107586
|
+
"Content-Type": "application/json",
|
|
107587
|
+
...options?.headers,
|
|
107588
|
+
...params.headers
|
|
107589
|
+
}
|
|
107590
|
+
});
|
|
107591
|
+
}
|
|
107592
|
+
/**
|
|
107593
|
+
* List active sessions
|
|
107594
|
+
*
|
|
107595
|
+
* Retrieve foreground Session drains currently owned by this OpenCode process. Sessions absent from the result are inactive.
|
|
107596
|
+
*/
|
|
107597
|
+
active(options) {
|
|
107598
|
+
return (options?.client ?? this.client).get({
|
|
107599
|
+
url: "/api/session/active",
|
|
107600
|
+
...options
|
|
107601
|
+
});
|
|
107602
|
+
}
|
|
107603
|
+
/**
|
|
107604
|
+
* Get session
|
|
107605
|
+
*
|
|
107606
|
+
* Retrieve a session by ID.
|
|
107607
|
+
*/
|
|
107608
|
+
get(parameters, options) {
|
|
107609
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
107610
|
+
return (options?.client ?? this.client).get({
|
|
107611
|
+
url: "/api/session/{sessionID}",
|
|
107612
|
+
...options,
|
|
107613
|
+
...params
|
|
107614
|
+
});
|
|
107615
|
+
}
|
|
107616
|
+
/**
|
|
107617
|
+
* Switch session agent
|
|
107618
|
+
*
|
|
107619
|
+
* Switch the agent used by subsequent provider turns.
|
|
107620
|
+
*/
|
|
107621
|
+
switchAgent(parameters, options) {
|
|
107622
|
+
const params = buildClientParams([parameters], [
|
|
107623
|
+
{
|
|
107624
|
+
args: [
|
|
107625
|
+
{ in: "path", key: "sessionID" },
|
|
107626
|
+
{ in: "body", key: "agent" }
|
|
107627
|
+
]
|
|
107628
|
+
}
|
|
107629
|
+
]);
|
|
107630
|
+
return (options?.client ?? this.client).post({
|
|
107631
|
+
url: "/api/session/{sessionID}/agent",
|
|
107632
|
+
...options,
|
|
107633
|
+
...params,
|
|
107634
|
+
headers: {
|
|
107635
|
+
"Content-Type": "application/json",
|
|
107636
|
+
...options?.headers,
|
|
107637
|
+
...params.headers
|
|
107638
|
+
}
|
|
107639
|
+
});
|
|
107640
|
+
}
|
|
107641
|
+
/**
|
|
107642
|
+
* Switch session model
|
|
107643
|
+
*
|
|
107644
|
+
* Switch the model used by subsequent provider turns.
|
|
107645
|
+
*/
|
|
107646
|
+
switchModel(parameters, options) {
|
|
107647
|
+
const params = buildClientParams([parameters], [
|
|
107648
|
+
{
|
|
107649
|
+
args: [
|
|
107650
|
+
{ in: "path", key: "sessionID" },
|
|
107651
|
+
{ in: "body", key: "model" }
|
|
107652
|
+
]
|
|
107653
|
+
}
|
|
107654
|
+
]);
|
|
107655
|
+
return (options?.client ?? this.client).post({
|
|
107656
|
+
url: "/api/session/{sessionID}/model",
|
|
107657
|
+
...options,
|
|
107658
|
+
...params,
|
|
107659
|
+
headers: {
|
|
107660
|
+
"Content-Type": "application/json",
|
|
107661
|
+
...options?.headers,
|
|
107662
|
+
...params.headers
|
|
107663
|
+
}
|
|
107664
|
+
});
|
|
107665
|
+
}
|
|
107666
|
+
/**
|
|
107667
|
+
* Send message
|
|
107470
107668
|
*
|
|
107471
|
-
* Durably admit one
|
|
107669
|
+
* Durably admit one session input and schedule agent-loop execution unless resume is false.
|
|
107472
107670
|
*/
|
|
107473
107671
|
prompt(parameters, options) {
|
|
107474
107672
|
const params = buildClientParams([parameters], [
|
|
@@ -107494,9 +107692,9 @@ var Session3 = class extends HeyApiClient {
|
|
|
107494
107692
|
});
|
|
107495
107693
|
}
|
|
107496
107694
|
/**
|
|
107497
|
-
* Compact
|
|
107695
|
+
* Compact session
|
|
107498
107696
|
*
|
|
107499
|
-
* Compact a
|
|
107697
|
+
* Compact a session conversation.
|
|
107500
107698
|
*/
|
|
107501
107699
|
compact(parameters, options) {
|
|
107502
107700
|
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
@@ -107507,9 +107705,9 @@ var Session3 = class extends HeyApiClient {
|
|
|
107507
107705
|
});
|
|
107508
107706
|
}
|
|
107509
107707
|
/**
|
|
107510
|
-
* Wait for
|
|
107708
|
+
* Wait for session
|
|
107511
107709
|
*
|
|
107512
|
-
* Wait for a
|
|
107710
|
+
* Wait for a session agent loop to become idle.
|
|
107513
107711
|
*/
|
|
107514
107712
|
wait(parameters, options) {
|
|
107515
107713
|
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
@@ -107520,9 +107718,9 @@ var Session3 = class extends HeyApiClient {
|
|
|
107520
107718
|
});
|
|
107521
107719
|
}
|
|
107522
107720
|
/**
|
|
107523
|
-
* Get
|
|
107721
|
+
* Get session context
|
|
107524
107722
|
*
|
|
107525
|
-
* Retrieve the active context messages for a
|
|
107723
|
+
* Retrieve the active context messages for a session (all messages after the last compaction).
|
|
107526
107724
|
*/
|
|
107527
107725
|
context(parameters, options) {
|
|
107528
107726
|
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
@@ -107533,9 +107731,83 @@ var Session3 = class extends HeyApiClient {
|
|
|
107533
107731
|
});
|
|
107534
107732
|
}
|
|
107535
107733
|
/**
|
|
107536
|
-
* Get
|
|
107734
|
+
* Get session history
|
|
107537
107735
|
*
|
|
107538
|
-
*
|
|
107736
|
+
* Read one finite page of public durable Session events after an exclusive aggregate sequence. Newly committed events may appear on later pages.
|
|
107737
|
+
*/
|
|
107738
|
+
history(parameters, options) {
|
|
107739
|
+
const params = buildClientParams([parameters], [
|
|
107740
|
+
{
|
|
107741
|
+
args: [
|
|
107742
|
+
{ in: "path", key: "sessionID" },
|
|
107743
|
+
{ in: "query", key: "limit" },
|
|
107744
|
+
{ in: "query", key: "after" }
|
|
107745
|
+
]
|
|
107746
|
+
}
|
|
107747
|
+
]);
|
|
107748
|
+
return (options?.client ?? this.client).get({
|
|
107749
|
+
url: "/api/session/{sessionID}/history",
|
|
107750
|
+
...options,
|
|
107751
|
+
...params
|
|
107752
|
+
});
|
|
107753
|
+
}
|
|
107754
|
+
/**
|
|
107755
|
+
* Subscribe to session events
|
|
107756
|
+
*
|
|
107757
|
+
* Replay durable events after an aggregate sequence, then continue with new durable events.
|
|
107758
|
+
*/
|
|
107759
|
+
events(parameters, options) {
|
|
107760
|
+
const params = buildClientParams([parameters], [
|
|
107761
|
+
{
|
|
107762
|
+
args: [
|
|
107763
|
+
{ in: "path", key: "sessionID" },
|
|
107764
|
+
{ in: "query", key: "after" }
|
|
107765
|
+
]
|
|
107766
|
+
}
|
|
107767
|
+
]);
|
|
107768
|
+
return (options?.client ?? this.client).sse.get({
|
|
107769
|
+
url: "/api/session/{sessionID}/event",
|
|
107770
|
+
...options,
|
|
107771
|
+
...params
|
|
107772
|
+
});
|
|
107773
|
+
}
|
|
107774
|
+
/**
|
|
107775
|
+
* Interrupt session execution
|
|
107776
|
+
*
|
|
107777
|
+
* Interrupt active execution owned by this OpenCode process. Idle interruption is a no-op.
|
|
107778
|
+
*/
|
|
107779
|
+
interrupt(parameters, options) {
|
|
107780
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
107781
|
+
return (options?.client ?? this.client).post({
|
|
107782
|
+
url: "/api/session/{sessionID}/interrupt",
|
|
107783
|
+
...options,
|
|
107784
|
+
...params
|
|
107785
|
+
});
|
|
107786
|
+
}
|
|
107787
|
+
/**
|
|
107788
|
+
* Get session message
|
|
107789
|
+
*
|
|
107790
|
+
* Retrieve one projected message owned by the Session.
|
|
107791
|
+
*/
|
|
107792
|
+
message(parameters, options) {
|
|
107793
|
+
const params = buildClientParams([parameters], [
|
|
107794
|
+
{
|
|
107795
|
+
args: [
|
|
107796
|
+
{ in: "path", key: "sessionID" },
|
|
107797
|
+
{ in: "path", key: "messageID" }
|
|
107798
|
+
]
|
|
107799
|
+
}
|
|
107800
|
+
]);
|
|
107801
|
+
return (options?.client ?? this.client).get({
|
|
107802
|
+
url: "/api/session/{sessionID}/message/{messageID}",
|
|
107803
|
+
...options,
|
|
107804
|
+
...params
|
|
107805
|
+
});
|
|
107806
|
+
}
|
|
107807
|
+
/**
|
|
107808
|
+
* Get session messages
|
|
107809
|
+
*
|
|
107810
|
+
* Retrieve projected messages for a session. Items keep the requested order across pages; use cursor.next or cursor.previous to move through the ordered timeline.
|
|
107539
107811
|
*/
|
|
107540
107812
|
messages(parameters, options) {
|
|
107541
107813
|
const params = buildClientParams([parameters], [
|
|
@@ -107554,6 +107826,10 @@ var Session3 = class extends HeyApiClient {
|
|
|
107554
107826
|
...params
|
|
107555
107827
|
});
|
|
107556
107828
|
}
|
|
107829
|
+
_revert;
|
|
107830
|
+
get revert() {
|
|
107831
|
+
return this._revert ??= new Revert({ client: this.client });
|
|
107832
|
+
}
|
|
107557
107833
|
_permission;
|
|
107558
107834
|
get permission() {
|
|
107559
107835
|
return this._permission ??= new Permission2({ client: this.client });
|
|
@@ -107565,9 +107841,9 @@ var Session3 = class extends HeyApiClient {
|
|
|
107565
107841
|
};
|
|
107566
107842
|
var Model = class extends HeyApiClient {
|
|
107567
107843
|
/**
|
|
107568
|
-
* List
|
|
107844
|
+
* List models
|
|
107569
107845
|
*
|
|
107570
|
-
* Retrieve available
|
|
107846
|
+
* Retrieve available models ordered by release date.
|
|
107571
107847
|
*/
|
|
107572
107848
|
list(parameters, options) {
|
|
107573
107849
|
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
@@ -107580,9 +107856,9 @@ var Model = class extends HeyApiClient {
|
|
|
107580
107856
|
};
|
|
107581
107857
|
var Provider2 = class extends HeyApiClient {
|
|
107582
107858
|
/**
|
|
107583
|
-
* List
|
|
107859
|
+
* List providers
|
|
107584
107860
|
*
|
|
107585
|
-
* Retrieve active
|
|
107861
|
+
* Retrieve active AI providers so clients can show provider availability and configuration.
|
|
107586
107862
|
*/
|
|
107587
107863
|
list(parameters, options) {
|
|
107588
107864
|
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
@@ -107593,9 +107869,9 @@ var Provider2 = class extends HeyApiClient {
|
|
|
107593
107869
|
});
|
|
107594
107870
|
}
|
|
107595
107871
|
/**
|
|
107596
|
-
* Get
|
|
107872
|
+
* Get provider
|
|
107597
107873
|
*
|
|
107598
|
-
* Retrieve a single
|
|
107874
|
+
* Retrieve a single AI provider so clients can inspect its availability and endpoint settings.
|
|
107599
107875
|
*/
|
|
107600
107876
|
get(parameters, options) {
|
|
107601
107877
|
const params = buildClientParams([parameters], [
|
|
@@ -107613,6 +107889,222 @@ var Provider2 = class extends HeyApiClient {
|
|
|
107613
107889
|
});
|
|
107614
107890
|
}
|
|
107615
107891
|
};
|
|
107892
|
+
var Connect = class extends HeyApiClient {
|
|
107893
|
+
/**
|
|
107894
|
+
* Connect with key
|
|
107895
|
+
*
|
|
107896
|
+
* Run a key authentication method and store the resulting credential.
|
|
107897
|
+
*/
|
|
107898
|
+
key(parameters, options) {
|
|
107899
|
+
const params = buildClientParams([parameters], [
|
|
107900
|
+
{
|
|
107901
|
+
args: [
|
|
107902
|
+
{ in: "path", key: "integrationID" },
|
|
107903
|
+
{ in: "query", key: "location" },
|
|
107904
|
+
{ in: "body", key: "key" },
|
|
107905
|
+
{ in: "body", key: "label" }
|
|
107906
|
+
]
|
|
107907
|
+
}
|
|
107908
|
+
]);
|
|
107909
|
+
return (options?.client ?? this.client).post({
|
|
107910
|
+
url: "/api/integration/{integrationID}/connect/key",
|
|
107911
|
+
...options,
|
|
107912
|
+
...params,
|
|
107913
|
+
headers: {
|
|
107914
|
+
"Content-Type": "application/json",
|
|
107915
|
+
...options?.headers,
|
|
107916
|
+
...params.headers
|
|
107917
|
+
}
|
|
107918
|
+
});
|
|
107919
|
+
}
|
|
107920
|
+
/**
|
|
107921
|
+
* Begin OAuth connection
|
|
107922
|
+
*
|
|
107923
|
+
* Start an OAuth attempt and return the authorization details.
|
|
107924
|
+
*/
|
|
107925
|
+
oauth(parameters, options) {
|
|
107926
|
+
const params = buildClientParams([parameters], [
|
|
107927
|
+
{
|
|
107928
|
+
args: [
|
|
107929
|
+
{ in: "path", key: "integrationID" },
|
|
107930
|
+
{ in: "query", key: "location" },
|
|
107931
|
+
{ in: "body", key: "methodID" },
|
|
107932
|
+
{ in: "body", key: "inputs" },
|
|
107933
|
+
{ in: "body", key: "label" }
|
|
107934
|
+
]
|
|
107935
|
+
}
|
|
107936
|
+
]);
|
|
107937
|
+
return (options?.client ?? this.client).post({
|
|
107938
|
+
url: "/api/integration/{integrationID}/connect/oauth",
|
|
107939
|
+
...options,
|
|
107940
|
+
...params,
|
|
107941
|
+
headers: {
|
|
107942
|
+
"Content-Type": "application/json",
|
|
107943
|
+
...options?.headers,
|
|
107944
|
+
...params.headers
|
|
107945
|
+
}
|
|
107946
|
+
});
|
|
107947
|
+
}
|
|
107948
|
+
};
|
|
107949
|
+
var Attempt = class extends HeyApiClient {
|
|
107950
|
+
/**
|
|
107951
|
+
* Cancel OAuth connection
|
|
107952
|
+
*
|
|
107953
|
+
* Cancel an OAuth attempt and release its resources.
|
|
107954
|
+
*/
|
|
107955
|
+
cancel(parameters, options) {
|
|
107956
|
+
const params = buildClientParams([parameters], [
|
|
107957
|
+
{
|
|
107958
|
+
args: [
|
|
107959
|
+
{ in: "path", key: "attemptID" },
|
|
107960
|
+
{ in: "query", key: "location" }
|
|
107961
|
+
]
|
|
107962
|
+
}
|
|
107963
|
+
]);
|
|
107964
|
+
return (options?.client ?? this.client).delete({
|
|
107965
|
+
url: "/api/integration/attempt/{attemptID}",
|
|
107966
|
+
...options,
|
|
107967
|
+
...params
|
|
107968
|
+
});
|
|
107969
|
+
}
|
|
107970
|
+
/**
|
|
107971
|
+
* Get OAuth attempt status
|
|
107972
|
+
*
|
|
107973
|
+
* Poll the current status of an OAuth attempt.
|
|
107974
|
+
*/
|
|
107975
|
+
status(parameters, options) {
|
|
107976
|
+
const params = buildClientParams([parameters], [
|
|
107977
|
+
{
|
|
107978
|
+
args: [
|
|
107979
|
+
{ in: "path", key: "attemptID" },
|
|
107980
|
+
{ in: "query", key: "location" }
|
|
107981
|
+
]
|
|
107982
|
+
}
|
|
107983
|
+
]);
|
|
107984
|
+
return (options?.client ?? this.client).get({
|
|
107985
|
+
url: "/api/integration/attempt/{attemptID}",
|
|
107986
|
+
...options,
|
|
107987
|
+
...params
|
|
107988
|
+
});
|
|
107989
|
+
}
|
|
107990
|
+
/**
|
|
107991
|
+
* Complete OAuth connection
|
|
107992
|
+
*
|
|
107993
|
+
* Complete a code-based OAuth attempt and store the resulting credential.
|
|
107994
|
+
*/
|
|
107995
|
+
complete(parameters, options) {
|
|
107996
|
+
const params = buildClientParams([parameters], [
|
|
107997
|
+
{
|
|
107998
|
+
args: [
|
|
107999
|
+
{ in: "path", key: "attemptID" },
|
|
108000
|
+
{ in: "query", key: "location" },
|
|
108001
|
+
{ in: "body", key: "code" }
|
|
108002
|
+
]
|
|
108003
|
+
}
|
|
108004
|
+
]);
|
|
108005
|
+
return (options?.client ?? this.client).post({
|
|
108006
|
+
url: "/api/integration/attempt/{attemptID}/complete",
|
|
108007
|
+
...options,
|
|
108008
|
+
...params,
|
|
108009
|
+
headers: {
|
|
108010
|
+
"Content-Type": "application/json",
|
|
108011
|
+
...options?.headers,
|
|
108012
|
+
...params.headers
|
|
108013
|
+
}
|
|
108014
|
+
});
|
|
108015
|
+
}
|
|
108016
|
+
};
|
|
108017
|
+
var Integration = class extends HeyApiClient {
|
|
108018
|
+
/**
|
|
108019
|
+
* List integrations
|
|
108020
|
+
*
|
|
108021
|
+
* Retrieve available integrations and their authentication methods.
|
|
108022
|
+
*/
|
|
108023
|
+
list(parameters, options) {
|
|
108024
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
108025
|
+
return (options?.client ?? this.client).get({
|
|
108026
|
+
url: "/api/integration",
|
|
108027
|
+
...options,
|
|
108028
|
+
...params
|
|
108029
|
+
});
|
|
108030
|
+
}
|
|
108031
|
+
/**
|
|
108032
|
+
* Get integration
|
|
108033
|
+
*
|
|
108034
|
+
* Retrieve one integration and its authentication methods.
|
|
108035
|
+
*/
|
|
108036
|
+
get(parameters, options) {
|
|
108037
|
+
const params = buildClientParams([parameters], [
|
|
108038
|
+
{
|
|
108039
|
+
args: [
|
|
108040
|
+
{ in: "path", key: "integrationID" },
|
|
108041
|
+
{ in: "query", key: "location" }
|
|
108042
|
+
]
|
|
108043
|
+
}
|
|
108044
|
+
]);
|
|
108045
|
+
return (options?.client ?? this.client).get({
|
|
108046
|
+
url: "/api/integration/{integrationID}",
|
|
108047
|
+
...options,
|
|
108048
|
+
...params
|
|
108049
|
+
});
|
|
108050
|
+
}
|
|
108051
|
+
_connect;
|
|
108052
|
+
get connect() {
|
|
108053
|
+
return this._connect ??= new Connect({ client: this.client });
|
|
108054
|
+
}
|
|
108055
|
+
_attempt;
|
|
108056
|
+
get attempt() {
|
|
108057
|
+
return this._attempt ??= new Attempt({ client: this.client });
|
|
108058
|
+
}
|
|
108059
|
+
};
|
|
108060
|
+
var Credential = class extends HeyApiClient {
|
|
108061
|
+
/**
|
|
108062
|
+
* Remove credential
|
|
108063
|
+
*
|
|
108064
|
+
* Remove a stored integration credential.
|
|
108065
|
+
*/
|
|
108066
|
+
remove(parameters, options) {
|
|
108067
|
+
const params = buildClientParams([parameters], [
|
|
108068
|
+
{
|
|
108069
|
+
args: [
|
|
108070
|
+
{ in: "path", key: "credentialID" },
|
|
108071
|
+
{ in: "query", key: "location" }
|
|
108072
|
+
]
|
|
108073
|
+
}
|
|
108074
|
+
]);
|
|
108075
|
+
return (options?.client ?? this.client).delete({
|
|
108076
|
+
url: "/api/credential/{credentialID}",
|
|
108077
|
+
...options,
|
|
108078
|
+
...params
|
|
108079
|
+
});
|
|
108080
|
+
}
|
|
108081
|
+
/**
|
|
108082
|
+
* Update credential
|
|
108083
|
+
*
|
|
108084
|
+
* Update a stored credential label.
|
|
108085
|
+
*/
|
|
108086
|
+
update(parameters, options) {
|
|
108087
|
+
const params = buildClientParams([parameters], [
|
|
108088
|
+
{
|
|
108089
|
+
args: [
|
|
108090
|
+
{ in: "path", key: "credentialID" },
|
|
108091
|
+
{ in: "query", key: "location" },
|
|
108092
|
+
{ in: "body", key: "label" }
|
|
108093
|
+
]
|
|
108094
|
+
}
|
|
108095
|
+
]);
|
|
108096
|
+
return (options?.client ?? this.client).patch({
|
|
108097
|
+
url: "/api/credential/{credentialID}",
|
|
108098
|
+
...options,
|
|
108099
|
+
...params,
|
|
108100
|
+
headers: {
|
|
108101
|
+
"Content-Type": "application/json",
|
|
108102
|
+
...options?.headers,
|
|
108103
|
+
...params.headers
|
|
108104
|
+
}
|
|
108105
|
+
});
|
|
108106
|
+
}
|
|
108107
|
+
};
|
|
107616
108108
|
var Request2 = class extends HeyApiClient {
|
|
107617
108109
|
/**
|
|
107618
108110
|
* List pending permission requests
|
|
@@ -107670,41 +108162,54 @@ var Fs = class extends HeyApiClient {
|
|
|
107670
108162
|
/**
|
|
107671
108163
|
* Read file
|
|
107672
108164
|
*
|
|
107673
|
-
*
|
|
108165
|
+
* Serve one file relative to the requested location.
|
|
107674
108166
|
*/
|
|
107675
108167
|
read(parameters, options) {
|
|
108168
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
108169
|
+
return (options?.client ?? this.client).get({
|
|
108170
|
+
url: "/api/fs/read/*",
|
|
108171
|
+
...options,
|
|
108172
|
+
...params
|
|
108173
|
+
});
|
|
108174
|
+
}
|
|
108175
|
+
/**
|
|
108176
|
+
* List directory
|
|
108177
|
+
*
|
|
108178
|
+
* List direct children of one directory relative to the requested location.
|
|
108179
|
+
*/
|
|
108180
|
+
list(parameters, options) {
|
|
107676
108181
|
const params = buildClientParams([parameters], [
|
|
107677
108182
|
{
|
|
107678
108183
|
args: [
|
|
107679
108184
|
{ in: "query", key: "location" },
|
|
107680
|
-
{ in: "query", key: "path" }
|
|
107681
|
-
{ in: "query", key: "reference" }
|
|
108185
|
+
{ in: "query", key: "path" }
|
|
107682
108186
|
]
|
|
107683
108187
|
}
|
|
107684
108188
|
]);
|
|
107685
108189
|
return (options?.client ?? this.client).get({
|
|
107686
|
-
url: "/api/fs/
|
|
108190
|
+
url: "/api/fs/list",
|
|
107687
108191
|
...options,
|
|
107688
108192
|
...params
|
|
107689
108193
|
});
|
|
107690
108194
|
}
|
|
107691
108195
|
/**
|
|
107692
|
-
*
|
|
108196
|
+
* Find files
|
|
107693
108197
|
*
|
|
107694
|
-
*
|
|
108198
|
+
* Find recursively ranked filesystem entries relative to the requested location.
|
|
107695
108199
|
*/
|
|
107696
|
-
|
|
108200
|
+
find(parameters, options) {
|
|
107697
108201
|
const params = buildClientParams([parameters], [
|
|
107698
108202
|
{
|
|
107699
108203
|
args: [
|
|
107700
108204
|
{ in: "query", key: "location" },
|
|
107701
|
-
{ in: "query", key: "
|
|
107702
|
-
{ in: "query", key: "
|
|
108205
|
+
{ in: "query", key: "query" },
|
|
108206
|
+
{ in: "query", key: "type" },
|
|
108207
|
+
{ in: "query", key: "limit" }
|
|
107703
108208
|
]
|
|
107704
108209
|
}
|
|
107705
108210
|
]);
|
|
107706
108211
|
return (options?.client ?? this.client).get({
|
|
107707
|
-
url: "/api/fs/
|
|
108212
|
+
url: "/api/fs/find",
|
|
107708
108213
|
...options,
|
|
107709
108214
|
...params
|
|
107710
108215
|
});
|
|
@@ -107712,9 +108217,9 @@ var Fs = class extends HeyApiClient {
|
|
|
107712
108217
|
};
|
|
107713
108218
|
var Command2 = class extends HeyApiClient {
|
|
107714
108219
|
/**
|
|
107715
|
-
* List
|
|
108220
|
+
* List commands
|
|
107716
108221
|
*
|
|
107717
|
-
* Retrieve currently registered
|
|
108222
|
+
* Retrieve currently registered commands.
|
|
107718
108223
|
*/
|
|
107719
108224
|
list(parameters, options) {
|
|
107720
108225
|
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
@@ -107727,9 +108232,9 @@ var Command2 = class extends HeyApiClient {
|
|
|
107727
108232
|
};
|
|
107728
108233
|
var Skill = class extends HeyApiClient {
|
|
107729
108234
|
/**
|
|
107730
|
-
* List
|
|
108235
|
+
* List skills
|
|
107731
108236
|
*
|
|
107732
|
-
* Retrieve currently registered
|
|
108237
|
+
* Retrieve currently registered skills.
|
|
107733
108238
|
*/
|
|
107734
108239
|
list(parameters, options) {
|
|
107735
108240
|
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
@@ -107742,14 +108247,166 @@ var Skill = class extends HeyApiClient {
|
|
|
107742
108247
|
};
|
|
107743
108248
|
var Event22 = class extends HeyApiClient {
|
|
107744
108249
|
/**
|
|
107745
|
-
* Subscribe to
|
|
108250
|
+
* Subscribe to events
|
|
107746
108251
|
*
|
|
107747
|
-
* Subscribe to native
|
|
108252
|
+
* Subscribe to native event payloads for the server.
|
|
107748
108253
|
*/
|
|
107749
|
-
subscribe(
|
|
107750
|
-
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
108254
|
+
subscribe(options) {
|
|
107751
108255
|
return (options?.client ?? this.client).sse.get({
|
|
107752
108256
|
url: "/api/event",
|
|
108257
|
+
...options
|
|
108258
|
+
});
|
|
108259
|
+
}
|
|
108260
|
+
};
|
|
108261
|
+
var Pty2 = class extends HeyApiClient {
|
|
108262
|
+
/**
|
|
108263
|
+
* List PTY sessions
|
|
108264
|
+
*
|
|
108265
|
+
* List PTY sessions for a location, including exited sessions retained until removal.
|
|
108266
|
+
*/
|
|
108267
|
+
list(parameters, options) {
|
|
108268
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
108269
|
+
return (options?.client ?? this.client).get({
|
|
108270
|
+
url: "/api/pty",
|
|
108271
|
+
...options,
|
|
108272
|
+
...params
|
|
108273
|
+
});
|
|
108274
|
+
}
|
|
108275
|
+
/**
|
|
108276
|
+
* Create PTY session
|
|
108277
|
+
*
|
|
108278
|
+
* Create a pseudo-terminal session for a location.
|
|
108279
|
+
*/
|
|
108280
|
+
create(parameters, options) {
|
|
108281
|
+
const params = buildClientParams([parameters], [
|
|
108282
|
+
{
|
|
108283
|
+
args: [
|
|
108284
|
+
{ in: "query", key: "location" },
|
|
108285
|
+
{ in: "body", key: "command" },
|
|
108286
|
+
{ in: "body", key: "args" },
|
|
108287
|
+
{ in: "body", key: "cwd" },
|
|
108288
|
+
{ in: "body", key: "title" },
|
|
108289
|
+
{ in: "body", key: "env" }
|
|
108290
|
+
]
|
|
108291
|
+
}
|
|
108292
|
+
]);
|
|
108293
|
+
return (options?.client ?? this.client).post({
|
|
108294
|
+
url: "/api/pty",
|
|
108295
|
+
...options,
|
|
108296
|
+
...params,
|
|
108297
|
+
headers: {
|
|
108298
|
+
"Content-Type": "application/json",
|
|
108299
|
+
...options?.headers,
|
|
108300
|
+
...params.headers
|
|
108301
|
+
}
|
|
108302
|
+
});
|
|
108303
|
+
}
|
|
108304
|
+
/**
|
|
108305
|
+
* Remove PTY session
|
|
108306
|
+
*
|
|
108307
|
+
* Terminate and remove one PTY session.
|
|
108308
|
+
*/
|
|
108309
|
+
remove(parameters, options) {
|
|
108310
|
+
const params = buildClientParams([parameters], [
|
|
108311
|
+
{
|
|
108312
|
+
args: [
|
|
108313
|
+
{ in: "path", key: "ptyID" },
|
|
108314
|
+
{ in: "query", key: "location" }
|
|
108315
|
+
]
|
|
108316
|
+
}
|
|
108317
|
+
]);
|
|
108318
|
+
return (options?.client ?? this.client).delete({
|
|
108319
|
+
url: "/api/pty/{ptyID}",
|
|
108320
|
+
...options,
|
|
108321
|
+
...params
|
|
108322
|
+
});
|
|
108323
|
+
}
|
|
108324
|
+
/**
|
|
108325
|
+
* Get PTY session
|
|
108326
|
+
*
|
|
108327
|
+
* Get one PTY session, including its exit code once exited.
|
|
108328
|
+
*/
|
|
108329
|
+
get(parameters, options) {
|
|
108330
|
+
const params = buildClientParams([parameters], [
|
|
108331
|
+
{
|
|
108332
|
+
args: [
|
|
108333
|
+
{ in: "path", key: "ptyID" },
|
|
108334
|
+
{ in: "query", key: "location" }
|
|
108335
|
+
]
|
|
108336
|
+
}
|
|
108337
|
+
]);
|
|
108338
|
+
return (options?.client ?? this.client).get({
|
|
108339
|
+
url: "/api/pty/{ptyID}",
|
|
108340
|
+
...options,
|
|
108341
|
+
...params
|
|
108342
|
+
});
|
|
108343
|
+
}
|
|
108344
|
+
/**
|
|
108345
|
+
* Update PTY session
|
|
108346
|
+
*
|
|
108347
|
+
* Update the title or viewport size of one PTY session.
|
|
108348
|
+
*/
|
|
108349
|
+
update(parameters, options) {
|
|
108350
|
+
const params = buildClientParams([parameters], [
|
|
108351
|
+
{
|
|
108352
|
+
args: [
|
|
108353
|
+
{ in: "path", key: "ptyID" },
|
|
108354
|
+
{ in: "query", key: "location" },
|
|
108355
|
+
{ in: "body", key: "title" },
|
|
108356
|
+
{ in: "body", key: "size" }
|
|
108357
|
+
]
|
|
108358
|
+
}
|
|
108359
|
+
]);
|
|
108360
|
+
return (options?.client ?? this.client).put({
|
|
108361
|
+
url: "/api/pty/{ptyID}",
|
|
108362
|
+
...options,
|
|
108363
|
+
...params,
|
|
108364
|
+
headers: {
|
|
108365
|
+
"Content-Type": "application/json",
|
|
108366
|
+
...options?.headers,
|
|
108367
|
+
...params.headers
|
|
108368
|
+
}
|
|
108369
|
+
});
|
|
108370
|
+
}
|
|
108371
|
+
/**
|
|
108372
|
+
* Create PTY WebSocket token
|
|
108373
|
+
*
|
|
108374
|
+
* Create a short-lived single-use ticket for opening a PTY WebSocket connection.
|
|
108375
|
+
*/
|
|
108376
|
+
connectToken(parameters, options) {
|
|
108377
|
+
const params = buildClientParams([parameters], [
|
|
108378
|
+
{
|
|
108379
|
+
args: [
|
|
108380
|
+
{ in: "path", key: "ptyID" },
|
|
108381
|
+
{ in: "query", key: "location" }
|
|
108382
|
+
]
|
|
108383
|
+
}
|
|
108384
|
+
]);
|
|
108385
|
+
return (options?.client ?? this.client).post({
|
|
108386
|
+
url: "/api/pty/{ptyID}/connect-token",
|
|
108387
|
+
...options,
|
|
108388
|
+
...params
|
|
108389
|
+
});
|
|
108390
|
+
}
|
|
108391
|
+
/**
|
|
108392
|
+
* Connect to PTY session
|
|
108393
|
+
*
|
|
108394
|
+
* Establish a WebSocket connection streaming PTY output and accepting terminal input.
|
|
108395
|
+
*/
|
|
108396
|
+
connect(parameters, options) {
|
|
108397
|
+
const params = buildClientParams([parameters], [
|
|
108398
|
+
{
|
|
108399
|
+
args: [
|
|
108400
|
+
{ in: "path", key: "ptyID" },
|
|
108401
|
+
{ in: "query", key: "location[directory]" },
|
|
108402
|
+
{ in: "query", key: "location[workspace]" },
|
|
108403
|
+
{ in: "query", key: "cursor" },
|
|
108404
|
+
{ in: "query", key: "ticket" }
|
|
108405
|
+
]
|
|
108406
|
+
}
|
|
108407
|
+
]);
|
|
108408
|
+
return (options?.client ?? this.client).get({
|
|
108409
|
+
url: "/api/pty/{ptyID}/connect",
|
|
107753
108410
|
...options,
|
|
107754
108411
|
...params
|
|
107755
108412
|
});
|
|
@@ -107776,11 +108433,92 @@ var Question3 = class extends HeyApiClient {
|
|
|
107776
108433
|
return this._request ??= new Request22({ client: this.client });
|
|
107777
108434
|
}
|
|
107778
108435
|
};
|
|
108436
|
+
var Reference = class extends HeyApiClient {
|
|
108437
|
+
/**
|
|
108438
|
+
* List references
|
|
108439
|
+
*
|
|
108440
|
+
* List references available in the requested location.
|
|
108441
|
+
*/
|
|
108442
|
+
list(parameters, options) {
|
|
108443
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
108444
|
+
return (options?.client ?? this.client).get({
|
|
108445
|
+
url: "/api/reference",
|
|
108446
|
+
...options,
|
|
108447
|
+
...params
|
|
108448
|
+
});
|
|
108449
|
+
}
|
|
108450
|
+
};
|
|
108451
|
+
var ProjectCopy2 = class extends HeyApiClient {
|
|
108452
|
+
remove(parameters, options) {
|
|
108453
|
+
const params = buildClientParams([parameters], [
|
|
108454
|
+
{
|
|
108455
|
+
args: [
|
|
108456
|
+
{ in: "path", key: "projectID" },
|
|
108457
|
+
{ in: "query", key: "location" },
|
|
108458
|
+
{ in: "body", key: "directory" },
|
|
108459
|
+
{ in: "body", key: "force" }
|
|
108460
|
+
]
|
|
108461
|
+
}
|
|
108462
|
+
]);
|
|
108463
|
+
return (options?.client ?? this.client).delete({
|
|
108464
|
+
url: "/experimental/project/{projectID}/copy",
|
|
108465
|
+
...options,
|
|
108466
|
+
...params,
|
|
108467
|
+
headers: {
|
|
108468
|
+
"Content-Type": "application/json",
|
|
108469
|
+
...options?.headers,
|
|
108470
|
+
...params.headers
|
|
108471
|
+
}
|
|
108472
|
+
});
|
|
108473
|
+
}
|
|
108474
|
+
create(parameters, options) {
|
|
108475
|
+
const params = buildClientParams([parameters], [
|
|
108476
|
+
{
|
|
108477
|
+
args: [
|
|
108478
|
+
{ in: "path", key: "projectID" },
|
|
108479
|
+
{ in: "query", key: "location" },
|
|
108480
|
+
{ in: "body", key: "strategy" },
|
|
108481
|
+
{ in: "body", key: "directory" },
|
|
108482
|
+
{ in: "body", key: "name" }
|
|
108483
|
+
]
|
|
108484
|
+
}
|
|
108485
|
+
]);
|
|
108486
|
+
return (options?.client ?? this.client).post({
|
|
108487
|
+
url: "/experimental/project/{projectID}/copy",
|
|
108488
|
+
...options,
|
|
108489
|
+
...params,
|
|
108490
|
+
headers: {
|
|
108491
|
+
"Content-Type": "application/json",
|
|
108492
|
+
...options?.headers,
|
|
108493
|
+
...params.headers
|
|
108494
|
+
}
|
|
108495
|
+
});
|
|
108496
|
+
}
|
|
108497
|
+
refresh(parameters, options) {
|
|
108498
|
+
const params = buildClientParams([parameters], [
|
|
108499
|
+
{
|
|
108500
|
+
args: [
|
|
108501
|
+
{ in: "path", key: "projectID" },
|
|
108502
|
+
{ in: "query", key: "location" }
|
|
108503
|
+
]
|
|
108504
|
+
}
|
|
108505
|
+
]);
|
|
108506
|
+
return (options?.client ?? this.client).post({
|
|
108507
|
+
url: "/experimental/project/{projectID}/copy/refresh",
|
|
108508
|
+
...options,
|
|
108509
|
+
...params
|
|
108510
|
+
});
|
|
108511
|
+
}
|
|
108512
|
+
};
|
|
107779
108513
|
var V2 = class extends HeyApiClient {
|
|
107780
108514
|
_health;
|
|
107781
108515
|
get health() {
|
|
107782
108516
|
return this._health ??= new Health({ client: this.client });
|
|
107783
108517
|
}
|
|
108518
|
+
_location;
|
|
108519
|
+
get location() {
|
|
108520
|
+
return this._location ??= new Location({ client: this.client });
|
|
108521
|
+
}
|
|
107784
108522
|
_agent;
|
|
107785
108523
|
get agent() {
|
|
107786
108524
|
return this._agent ??= new Agent({ client: this.client });
|
|
@@ -107797,6 +108535,14 @@ var V2 = class extends HeyApiClient {
|
|
|
107797
108535
|
get provider() {
|
|
107798
108536
|
return this._provider ??= new Provider2({ client: this.client });
|
|
107799
108537
|
}
|
|
108538
|
+
_integration;
|
|
108539
|
+
get integration() {
|
|
108540
|
+
return this._integration ??= new Integration({ client: this.client });
|
|
108541
|
+
}
|
|
108542
|
+
_credential;
|
|
108543
|
+
get credential() {
|
|
108544
|
+
return this._credential ??= new Credential({ client: this.client });
|
|
108545
|
+
}
|
|
107800
108546
|
_permission;
|
|
107801
108547
|
get permission() {
|
|
107802
108548
|
return this._permission ??= new Permission3({ client: this.client });
|
|
@@ -107817,10 +108563,22 @@ var V2 = class extends HeyApiClient {
|
|
|
107817
108563
|
get event() {
|
|
107818
108564
|
return this._event ??= new Event22({ client: this.client });
|
|
107819
108565
|
}
|
|
108566
|
+
_pty;
|
|
108567
|
+
get pty() {
|
|
108568
|
+
return this._pty ??= new Pty2({ client: this.client });
|
|
108569
|
+
}
|
|
107820
108570
|
_question;
|
|
107821
108571
|
get question() {
|
|
107822
108572
|
return this._question ??= new Question3({ client: this.client });
|
|
107823
108573
|
}
|
|
108574
|
+
_reference;
|
|
108575
|
+
get reference() {
|
|
108576
|
+
return this._reference ??= new Reference({ client: this.client });
|
|
108577
|
+
}
|
|
108578
|
+
_projectCopy;
|
|
108579
|
+
get projectCopy() {
|
|
108580
|
+
return this._projectCopy ??= new ProjectCopy2({ client: this.client });
|
|
108581
|
+
}
|
|
107824
108582
|
};
|
|
107825
108583
|
var OpencodeClient = class _OpencodeClient extends HeyApiClient {
|
|
107826
108584
|
static __registry = new HeyApiRegistry();
|
|
@@ -107938,7 +108696,7 @@ var OpencodeClient = class _OpencodeClient extends HeyApiClient {
|
|
|
107938
108696
|
}
|
|
107939
108697
|
};
|
|
107940
108698
|
|
|
107941
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
108699
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/error-interceptor.js
|
|
107942
108700
|
function wrapClientError(error49, response, request2, opts) {
|
|
107943
108701
|
if (!opts?.throwOnError)
|
|
107944
108702
|
return error49;
|
|
@@ -107965,7 +108723,7 @@ function describe(request2, response) {
|
|
|
107965
108723
|
return `${method} ${url4}${status ? " \u2192 " + status : ""}${statusText ? " " + statusText : ""}`;
|
|
107966
108724
|
}
|
|
107967
108725
|
|
|
107968
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
108726
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/client.js
|
|
107969
108727
|
function pick(value2, fallback, encode4) {
|
|
107970
108728
|
if (!value2)
|
|
107971
108729
|
return;
|
|
@@ -108041,7 +108799,7 @@ function createOpencodeClient(config3) {
|
|
|
108041
108799
|
return new OpencodeClient({ client: client2 });
|
|
108042
108800
|
}
|
|
108043
108801
|
|
|
108044
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
108802
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/server.js
|
|
108045
108803
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
108046
108804
|
|
|
108047
108805
|
// agents/opencode_v2.ts
|
|
@@ -108294,25 +109052,30 @@ export default async function pullfrogSubagentGatePlugin() {
|
|
|
108294
109052
|
}
|
|
108295
109053
|
|
|
108296
109054
|
// utils/openCodeModels.ts
|
|
108297
|
-
import {
|
|
109055
|
+
import { spawnSync as spawnSync3 } from "node:child_process";
|
|
108298
109056
|
var baseline;
|
|
108299
109057
|
var authorized;
|
|
109058
|
+
var failure;
|
|
109059
|
+
var ANSI_PATTERN = /\[[0-9;]*m/g;
|
|
108300
109060
|
function readModels(cliPath) {
|
|
108301
|
-
|
|
108302
|
-
|
|
108303
|
-
|
|
108304
|
-
|
|
108305
|
-
|
|
108306
|
-
|
|
108307
|
-
|
|
108308
|
-
|
|
108309
|
-
);
|
|
108310
|
-
} catch (error49) {
|
|
108311
|
-
log.debug(
|
|
108312
|
-
`\xBB \`opencode models\` failed: ${error49 instanceof Error ? error49.message : String(error49)}`
|
|
108313
|
-
);
|
|
109061
|
+
const result = spawnSync3(cliPath, ["models"], {
|
|
109062
|
+
encoding: "utf-8",
|
|
109063
|
+
timeout: 3e4,
|
|
109064
|
+
env: process.env,
|
|
109065
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
109066
|
+
});
|
|
109067
|
+
if (result.status !== 0) {
|
|
109068
|
+
failure = (result.stderr ?? "").replace(ANSI_PATTERN, "").trim() || void 0;
|
|
109069
|
+
log.debug(`\xBB \`opencode models\` failed (${result.status}): ${failure ?? result.error}`);
|
|
108314
109070
|
return /* @__PURE__ */ new Set();
|
|
108315
109071
|
}
|
|
109072
|
+
failure = void 0;
|
|
109073
|
+
return new Set(
|
|
109074
|
+
result.stdout.split("\n").map((line) => line.trim()).filter(Boolean)
|
|
109075
|
+
);
|
|
109076
|
+
}
|
|
109077
|
+
function getModelsFailure() {
|
|
109078
|
+
return failure;
|
|
108316
109079
|
}
|
|
108317
109080
|
function captureBaselineModels(cliPath) {
|
|
108318
109081
|
baseline = readModels(cliPath);
|
|
@@ -108471,17 +109234,21 @@ function parseModel2(value2) {
|
|
|
108471
109234
|
return { providerID: value2.slice(0, slash), modelID: value2.slice(slash + 1) };
|
|
108472
109235
|
}
|
|
108473
109236
|
function bootOpencodeServer(params) {
|
|
108474
|
-
const proc = nodeSpawn2(
|
|
108475
|
-
|
|
108476
|
-
|
|
108477
|
-
|
|
108478
|
-
|
|
108479
|
-
|
|
108480
|
-
|
|
108481
|
-
|
|
108482
|
-
|
|
108483
|
-
|
|
108484
|
-
|
|
109237
|
+
const proc = nodeSpawn2(
|
|
109238
|
+
params.cliPath,
|
|
109239
|
+
["serve", "--port", "0", "--hostname", "127.0.0.1", "--print-logs", "--log-level", "ERROR"],
|
|
109240
|
+
{
|
|
109241
|
+
cwd: params.cwd,
|
|
109242
|
+
env: params.env,
|
|
109243
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
109244
|
+
// detached + killGroup so SIGKILL nukes the whole tree: node_modules/
|
|
109245
|
+
// opencode-ai/bin/opencode is a Node shim that spawnSync's the native
|
|
109246
|
+
// binary; without process-group kill the native binary is reparented
|
|
109247
|
+
// to PID 1 and never dies. mirrors the same fix in runOpenCode's
|
|
109248
|
+
// original spawn().
|
|
109249
|
+
detached: true
|
|
109250
|
+
}
|
|
109251
|
+
);
|
|
108485
109252
|
trackChild({ child: proc, killGroup: true });
|
|
108486
109253
|
const recentStderr = [];
|
|
108487
109254
|
proc.stderr?.on("data", (chunk) => {
|
|
@@ -108574,12 +109341,17 @@ ${tail}` : ""}`
|
|
|
108574
109341
|
bootTimeout.unref?.();
|
|
108575
109342
|
});
|
|
108576
109343
|
}
|
|
109344
|
+
function withServerStderr(message, recentStderr) {
|
|
109345
|
+
const tail = recentStderr.join("\n").trim();
|
|
109346
|
+
return tail ? `${message}
|
|
109347
|
+
opencode server stderr:
|
|
109348
|
+
${tail}` : message;
|
|
109349
|
+
}
|
|
108577
109350
|
function newTurn() {
|
|
108578
109351
|
return {
|
|
108579
109352
|
finalText: "",
|
|
108580
109353
|
tokens: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
|
|
108581
109354
|
costUsd: 0,
|
|
108582
|
-
sessionError: null,
|
|
108583
109355
|
lastToolError: null
|
|
108584
109356
|
};
|
|
108585
109357
|
}
|
|
@@ -108610,7 +109382,6 @@ async function dispatchEvent(ctx, event) {
|
|
|
108610
109382
|
if (sessionID !== ctx.orchestratorSessionID) return;
|
|
108611
109383
|
const err = event.properties.error;
|
|
108612
109384
|
const message = err ? extractErrorMessage(err) : "(no error payload)";
|
|
108613
|
-
if (ctx.currentTurn) ctx.currentTurn.sessionError = message;
|
|
108614
109385
|
log.info(`\xBB ${ctx.label} session error: ${message}`);
|
|
108615
109386
|
return;
|
|
108616
109387
|
}
|
|
@@ -108803,14 +109574,6 @@ async function runPromptTurn(ctx, params) {
|
|
|
108803
109574
|
usage
|
|
108804
109575
|
};
|
|
108805
109576
|
}
|
|
108806
|
-
if (turn.sessionError) {
|
|
108807
|
-
return {
|
|
108808
|
-
success: false,
|
|
108809
|
-
output: finalText,
|
|
108810
|
-
error: `session error: ${turn.sessionError}`,
|
|
108811
|
-
usage
|
|
108812
|
-
};
|
|
108813
|
-
}
|
|
108814
109577
|
return { success: true, output: finalText, usage };
|
|
108815
109578
|
}
|
|
108816
109579
|
async function aggregateTurnUsage(ctx, turnStartMs) {
|
|
@@ -108900,6 +109663,8 @@ function formatPromptError(error49) {
|
|
|
108900
109663
|
const obj = error49;
|
|
108901
109664
|
if (obj.message) return obj.message;
|
|
108902
109665
|
if (obj.error?.message) return obj.error.message;
|
|
109666
|
+
const config3 = formatConfigError(obj.name, obj.data);
|
|
109667
|
+
if (config3) return config3;
|
|
108903
109668
|
try {
|
|
108904
109669
|
return JSON.stringify(error49);
|
|
108905
109670
|
} catch {
|
|
@@ -108908,6 +109673,17 @@ function formatPromptError(error49) {
|
|
|
108908
109673
|
}
|
|
108909
109674
|
return String(error49);
|
|
108910
109675
|
}
|
|
109676
|
+
function formatConfigError(name, data) {
|
|
109677
|
+
if (!name?.startsWith("Config") || !data || typeof data !== "object") return void 0;
|
|
109678
|
+
const at = "path" in data && typeof data.path === "string" ? ` at ${data.path}` : "";
|
|
109679
|
+
const detail = "message" in data && typeof data.message === "string" ? `${at}: ${data.message}` : at;
|
|
109680
|
+
const issues = "issues" in data && Array.isArray(data.issues) ? data.issues : [];
|
|
109681
|
+
const bullets = issues.map(
|
|
109682
|
+
(issue3) => issue3 && typeof issue3 === "object" && "message" in issue3 && typeof issue3.message === "string" ? `
|
|
109683
|
+
\u21B3 ${issue3.message}` : ""
|
|
109684
|
+
).join("");
|
|
109685
|
+
return `${name}${detail}${bullets}`;
|
|
109686
|
+
}
|
|
108911
109687
|
function startInnerActivityWatchdog(params) {
|
|
108912
109688
|
let fired = false;
|
|
108913
109689
|
const id = setInterval(() => {
|
|
@@ -108975,6 +109751,8 @@ var opencode = agent({
|
|
|
108975
109751
|
OPENCODE_PERMISSION: permissionOverride,
|
|
108976
109752
|
GOOGLE_GENERATIVE_AI_API_KEY: process.env.GOOGLE_GENERATIVE_AI_API_KEY || process.env.GEMINI_API_KEY
|
|
108977
109753
|
};
|
|
109754
|
+
delete env2.OPENCODE_EXPERIMENTAL;
|
|
109755
|
+
delete env2.OPENCODE_EXPERIMENTAL_CODE_MODE;
|
|
108978
109756
|
if (codexAuth) {
|
|
108979
109757
|
env2.XDG_DATA_HOME = codexAuth.xdgDataHome;
|
|
108980
109758
|
delete env2.OPENAI_API_KEY;
|
|
@@ -109014,7 +109792,7 @@ var opencode = agent({
|
|
|
109014
109792
|
return {
|
|
109015
109793
|
success: false,
|
|
109016
109794
|
output: "",
|
|
109017
|
-
error: `opencode session.create failed: ${msg}
|
|
109795
|
+
error: withServerStderr(`opencode session.create failed: ${msg}`, server.recentStderr)
|
|
109018
109796
|
};
|
|
109019
109797
|
}
|
|
109020
109798
|
const sessionID = sessionResp.data.id;
|
|
@@ -140255,7 +141033,7 @@ var import_undici2 = __toESM(require_undici2(), 1);
|
|
|
140255
141033
|
var import_uri_templates = __toESM(require_uri_templates(), 1);
|
|
140256
141034
|
import { setTimeout as delay } from "timers/promises";
|
|
140257
141035
|
|
|
140258
|
-
// node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod-to-json-schema@3.25.1_zod@4.3.
|
|
141036
|
+
// node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod@4.3.6_zod-to-json-schema@3.25.1_zod@4.3.6_/node_modules/xsschema/dist/index.js
|
|
140259
141037
|
init_index_DoHiaFQM();
|
|
140260
141038
|
|
|
140261
141039
|
// node_modules/.pnpm/fastmcp@3.34.0_arktype@2.2.0/node_modules/fastmcp/dist/chunk-DMSZ2FEE.js
|
|
@@ -142126,7 +142904,7 @@ import { promisify } from "util";
|
|
|
142126
142904
|
var pbkdf2Async = promisify(pbkdf2);
|
|
142127
142905
|
|
|
142128
142906
|
// utils/browser.ts
|
|
142129
|
-
import { execFileSync as
|
|
142907
|
+
import { execFileSync as execFileSync4, spawnSync as spawnSync4 } from "node:child_process";
|
|
142130
142908
|
import { existsSync as existsSync4 } from "node:fs";
|
|
142131
142909
|
import { dirname as dirname2 } from "node:path";
|
|
142132
142910
|
|
|
@@ -142256,7 +143034,7 @@ function ensureBrowserDaemon(toolState) {
|
|
|
142256
143034
|
}
|
|
142257
143035
|
const agentBrowserVersion = getDevDependencyVersion("agent-browser");
|
|
142258
143036
|
log.info(`installing agent-browser@${agentBrowserVersion}...`);
|
|
142259
|
-
const install =
|
|
143037
|
+
const install = spawnSync4("npm", ["install", "-g", `agent-browser@${agentBrowserVersion}`], {
|
|
142260
143038
|
stdio: "pipe",
|
|
142261
143039
|
encoding: "utf-8"
|
|
142262
143040
|
});
|
|
@@ -142269,7 +143047,7 @@ function ensureBrowserDaemon(toolState) {
|
|
|
142269
143047
|
log.info("agent-browser installed");
|
|
142270
143048
|
let binDir;
|
|
142271
143049
|
try {
|
|
142272
|
-
const binPath =
|
|
143050
|
+
const binPath = execFileSync4("which", ["agent-browser"], { encoding: "utf-8" }).trim();
|
|
142273
143051
|
binDir = dirname2(binPath);
|
|
142274
143052
|
log.info(`agent-browser binary: ${binPath}`);
|
|
142275
143053
|
} catch {
|
|
@@ -142280,7 +143058,7 @@ function ensureBrowserDaemon(toolState) {
|
|
|
142280
143058
|
}
|
|
142281
143059
|
const env2 = buildEnv();
|
|
142282
143060
|
log.info("starting browser daemon...");
|
|
142283
|
-
const seed =
|
|
143061
|
+
const seed = spawnSync4("agent-browser", ["open", "about:blank"], {
|
|
142284
143062
|
env: env2,
|
|
142285
143063
|
stdio: "pipe",
|
|
142286
143064
|
encoding: "utf-8",
|
|
@@ -142305,7 +143083,7 @@ function closeBrowserDaemon(toolState) {
|
|
|
142305
143083
|
delete toolState.browserDaemon;
|
|
142306
143084
|
try {
|
|
142307
143085
|
log.info("closing browser daemon...");
|
|
142308
|
-
|
|
143086
|
+
spawnSync4("agent-browser", ["close"], {
|
|
142309
143087
|
env: filterEnv(),
|
|
142310
143088
|
stdio: "pipe",
|
|
142311
143089
|
timeout: 1e4
|
|
@@ -150395,11 +151173,11 @@ import { readFileSync as readFileSync2, realpathSync, unlinkSync } from "node:fs
|
|
|
150395
151173
|
import { join as join8 } from "node:path";
|
|
150396
151174
|
|
|
150397
151175
|
// utils/shell.ts
|
|
150398
|
-
import { spawnSync as
|
|
151176
|
+
import { spawnSync as spawnSync5 } from "node:child_process";
|
|
150399
151177
|
function $(cmd, args2, options) {
|
|
150400
151178
|
const encoding = options?.encoding ?? "utf-8";
|
|
150401
151179
|
const env2 = resolveEnv(options?.env);
|
|
150402
|
-
const result =
|
|
151180
|
+
const result = spawnSync5(cmd, args2, {
|
|
150403
151181
|
stdio: ["ignore", "pipe", "pipe"],
|
|
150404
151182
|
encoding,
|
|
150405
151183
|
cwd: options?.cwd,
|
|
@@ -150568,19 +151346,19 @@ async function $gitFetchWithDeepen(args2, options, label) {
|
|
|
150568
151346
|
}
|
|
150569
151347
|
|
|
150570
151348
|
// utils/lifecycle.ts
|
|
150571
|
-
function describeSetupFailure(
|
|
150572
|
-
if (!
|
|
150573
|
-
switch (
|
|
151349
|
+
function describeSetupFailure(failure2) {
|
|
151350
|
+
if (!failure2) return "";
|
|
151351
|
+
switch (failure2.kind) {
|
|
150574
151352
|
case "exit":
|
|
150575
|
-
return `It exited with code ${
|
|
151353
|
+
return `It exited with code ${failure2.exitCode}. Output:
|
|
150576
151354
|
|
|
150577
|
-
${
|
|
151355
|
+
${failure2.output || "(empty)"}`;
|
|
150578
151356
|
case "timeout":
|
|
150579
151357
|
return "It timed out and was killed before completing.";
|
|
150580
151358
|
case "spawn":
|
|
150581
|
-
return `It failed to start: ${
|
|
151359
|
+
return `It failed to start: ${failure2.spawnError}`;
|
|
150582
151360
|
default: {
|
|
150583
|
-
const _exhaustive =
|
|
151361
|
+
const _exhaustive = failure2;
|
|
150584
151362
|
return _exhaustive;
|
|
150585
151363
|
}
|
|
150586
151364
|
}
|
|
@@ -151622,7 +152400,7 @@ import { writeFileSync as writeFileSync7 } from "node:fs";
|
|
|
151622
152400
|
import { join as join11 } from "node:path";
|
|
151623
152401
|
|
|
151624
152402
|
// utils/apiCommit.ts
|
|
151625
|
-
import { execFileSync as
|
|
152403
|
+
import { execFileSync as execFileSync5 } from "node:child_process";
|
|
151626
152404
|
import { lstat, readlink } from "node:fs/promises";
|
|
151627
152405
|
import { join as join9 } from "node:path";
|
|
151628
152406
|
var GITHUB_API = "https://api.github.com";
|
|
@@ -151725,7 +152503,7 @@ async function createBlobEntry(params) {
|
|
|
151725
152503
|
} else {
|
|
151726
152504
|
mode = stat.mode & 64 ? "100755" : "100644";
|
|
151727
152505
|
const cleanSha = $("git", ["hash-object", "-w", "--", absPath], { log: false }).trim();
|
|
151728
|
-
content =
|
|
152506
|
+
content = execFileSync5("git", ["cat-file", "blob", cleanSha], {
|
|
151729
152507
|
cwd: params.repoRoot,
|
|
151730
152508
|
maxBuffer: 2 * MAX_BLOB_BYTES
|
|
151731
152509
|
});
|
|
@@ -156756,11 +157534,11 @@ ${integrateStep}
|
|
|
156756
157534
|
});
|
|
156757
157535
|
}
|
|
156758
157536
|
function buildPrepushFailureMessage(params) {
|
|
156759
|
-
const
|
|
156760
|
-
const header =
|
|
157537
|
+
const failure2 = params.failure;
|
|
157538
|
+
const header = failure2.kind === "exit" ? `prepush hook failed with exit code ${failure2.exitCode}.
|
|
156761
157539
|
|
|
156762
157540
|
script output:
|
|
156763
|
-
${
|
|
157541
|
+
${failure2.output || "(empty)"}` : failure2.kind === "timeout" ? `prepush hook timed out \u2014 the script is hung or doing too much work.` : `prepush hook failed to spawn: ${failure2.spawnError}.`;
|
|
156764
157542
|
const ifRealBug = params.shell === "disabled" ? `fix it before pushing again \u2014 shell access is disabled in this run, so you can't re-run the hook command yourself.` : `run the hook command yourself via the shell tool to iterate (${params.retryTool} will NOT re-run it).`;
|
|
156765
157543
|
return `${header}
|
|
156766
157544
|
|
|
@@ -157344,7 +158122,7 @@ async function patchWorkflowRunFields(ctx, fields) {
|
|
|
157344
158122
|
}
|
|
157345
158123
|
)();
|
|
157346
158124
|
} catch (error49) {
|
|
157347
|
-
log.warning(`patchWorkflowRunFields
|
|
158125
|
+
log.warning(`patchWorkflowRunFields failed: ${error49}`);
|
|
157348
158126
|
}
|
|
157349
158127
|
}
|
|
157350
158128
|
var INT4_MAX = 2147483647;
|
|
@@ -158597,7 +159375,7 @@ async function reportReviewNodeId(ctx, params) {
|
|
|
158597
159375
|
}
|
|
158598
159376
|
|
|
158599
159377
|
// utils/setup.ts
|
|
158600
|
-
import { execFileSync as
|
|
159378
|
+
import { execFileSync as execFileSync6, execSync as execSync2 } from "node:child_process";
|
|
158601
159379
|
import { mkdtempSync, readdirSync, realpathSync as realpathSync2, unlinkSync as unlinkSync2 } from "node:fs";
|
|
158602
159380
|
import { tmpdir as tmpdir2 } from "node:os";
|
|
158603
159381
|
import { join as join12 } from "node:path";
|
|
@@ -158690,7 +159468,7 @@ function removeIncludeIfEntries(repoDir) {
|
|
|
158690
159468
|
if (!key || seen.has(key)) continue;
|
|
158691
159469
|
seen.add(key);
|
|
158692
159470
|
try {
|
|
158693
|
-
|
|
159471
|
+
execFileSync6("git", ["config", "--local", "--unset-all", key], {
|
|
158694
159472
|
cwd: repoDir,
|
|
158695
159473
|
stdio: "pipe",
|
|
158696
159474
|
env: env2
|
|
@@ -161936,7 +162714,7 @@ ${summaryAddendum}`,
|
|
|
161936
162714
|
}
|
|
161937
162715
|
|
|
161938
162716
|
// mcp/shell.ts
|
|
161939
|
-
import { spawn as spawn3, spawnSync as
|
|
162717
|
+
import { spawn as spawn3, spawnSync as spawnSync6 } from "node:child_process";
|
|
161940
162718
|
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
161941
162719
|
import { closeSync, openSync, writeFileSync as writeFileSync12 } from "node:fs";
|
|
161942
162720
|
import { userInfo as userInfo2 } from "node:os";
|
|
@@ -161962,7 +162740,7 @@ function detectSandboxMethod() {
|
|
|
161962
162740
|
return "none";
|
|
161963
162741
|
}
|
|
161964
162742
|
try {
|
|
161965
|
-
const result =
|
|
162743
|
+
const result = spawnSync6("unshare", ["--pid", "--fork", "--mount-proc", "true"], {
|
|
161966
162744
|
timeout: 5e3,
|
|
161967
162745
|
stdio: "ignore"
|
|
161968
162746
|
});
|
|
@@ -161974,7 +162752,7 @@ function detectSandboxMethod() {
|
|
|
161974
162752
|
} catch {
|
|
161975
162753
|
}
|
|
161976
162754
|
try {
|
|
161977
|
-
const result =
|
|
162755
|
+
const result = spawnSync6("sudo", ["unshare", "--pid", "--fork", "--mount-proc", "true"], {
|
|
161978
162756
|
timeout: 5e3,
|
|
161979
162757
|
stdio: "ignore"
|
|
161980
162758
|
});
|
|
@@ -162016,7 +162794,7 @@ function resolveRepoRoot() {
|
|
|
162016
162794
|
return _repoRoot;
|
|
162017
162795
|
}
|
|
162018
162796
|
try {
|
|
162019
|
-
_repoRoot =
|
|
162797
|
+
_repoRoot = spawnSync6("git", ["rev-parse", "--show-toplevel"], {
|
|
162020
162798
|
cwd: process.cwd(),
|
|
162021
162799
|
stdio: ["ignore", "pipe", "ignore"],
|
|
162022
162800
|
encoding: "utf-8"
|
|
@@ -162810,6 +163588,8 @@ function validateAgentApiKey(params) {
|
|
|
162810
163588
|
}
|
|
162811
163589
|
if (params.agent.name === "opencode") {
|
|
162812
163590
|
if (params.authorized.has(params.model)) return;
|
|
163591
|
+
const reason = getModelsFailure();
|
|
163592
|
+
if (reason) throw new Error(reason);
|
|
162813
163593
|
throw new Error(
|
|
162814
163594
|
buildMissingApiKeyError({ owner: params.owner, name: params.name, model: params.model })
|
|
162815
163595
|
);
|
|
@@ -162821,6 +163601,8 @@ function validateAgentApiKey(params) {
|
|
|
162821
163601
|
}
|
|
162822
163602
|
if (params.agent.name === "opencode") {
|
|
162823
163603
|
if (params.authorized.size > 0) return;
|
|
163604
|
+
const reason = getModelsFailure();
|
|
163605
|
+
if (reason) throw new Error(reason);
|
|
162824
163606
|
throw new Error(buildMissingApiKeyError({ owner: params.owner, name: params.name }));
|
|
162825
163607
|
}
|
|
162826
163608
|
if (hasEnvVar3("ANTHROPIC_API_KEY") || hasEnvVar3("CLAUDE_CODE_OAUTH_TOKEN")) return;
|
|
@@ -162828,10 +163610,13 @@ function validateAgentApiKey(params) {
|
|
|
162828
163610
|
}
|
|
162829
163611
|
function isApiKeyAuthError(text) {
|
|
162830
163612
|
if (!text) return false;
|
|
162831
|
-
return text.includes(MISSING_KEY_MARKER) || /Invalid API key/i.test(text) || /\bUser not found\b/i.test(text) || /\bInvalid authentication\b/i.test(text) || /authentication_error/i.test(text) || /Invalid bearer token/i.test(text) || /api_error_status\s*=\s*401/i.test(text) || /API Error:\s*401/i.test(text) || /Failed to authenticate\. API Error:/i.test(text) || /Your api key:.*is invalid/i.test(text) || isOAuthCredentialExpiredError(text);
|
|
163613
|
+
return text.includes(MISSING_KEY_MARKER) || /Invalid API key/i.test(text) || /\bUser not found\b/i.test(text) || /\bInvalid authentication\b/i.test(text) || /authentication_error/i.test(text) || /Invalid bearer token/i.test(text) || /api_error_status\s*=\s*401/i.test(text) || /API Error:\s*401/i.test(text) || /Failed to authenticate\. API Error:/i.test(text) || /Your api key:.*is invalid/i.test(text) || isClaudeSubscriptionDisabledError(text) || isOAuthCredentialExpiredError(text);
|
|
162832
163614
|
}
|
|
162833
163615
|
function isOAuthCredentialExpiredError(text) {
|
|
162834
|
-
return /authentication token has expired/i.test(text) || /Token refresh failed/i.test(text);
|
|
163616
|
+
return /authentication token has (expired|been invalidated)/i.test(text) || /OAuth access token has expired/i.test(text) || /Token refresh failed/i.test(text);
|
|
163617
|
+
}
|
|
163618
|
+
function isClaudeSubscriptionDisabledError(text) {
|
|
163619
|
+
return /disabled Claude subscription access/i.test(text);
|
|
162835
163620
|
}
|
|
162836
163621
|
function formatApiKeyErrorSummary(params) {
|
|
162837
163622
|
if (params.raw.includes(MISSING_KEY_MARKER)) {
|
|
@@ -162840,11 +163625,18 @@ function formatApiKeyErrorSummary(params) {
|
|
|
162840
163625
|
}
|
|
162841
163626
|
const githubSecretsUrl = `https://github.com/${params.owner}/${params.name}/settings/secrets/actions`;
|
|
162842
163627
|
const settingsUrl = `${getApiUrl()}/console/${params.owner}/${params.name}`;
|
|
163628
|
+
if (isClaudeSubscriptionDisabledError(params.raw)) {
|
|
163629
|
+
return [
|
|
163630
|
+
`**Your organization has disabled Claude subscription access for Claude Code.** Ask your Claude organization's admin to re-enable it in the Claude Console, or set an \`ANTHROPIC_API_KEY\` for this repo instead, then re-trigger the run.`,
|
|
163631
|
+
"",
|
|
163632
|
+
`[Add repo secret \u2192](${githubSecretsUrl}) \xB7 [Model settings \u2192](${settingsUrl}) \xB7 [Setup docs \u2192](https://docs.pullfrog.com/keys) \xB7 [Ask in Discord \u2192](https://discord.gg/8y96raFg8e)`
|
|
163633
|
+
].join("\n");
|
|
163634
|
+
}
|
|
162843
163635
|
if (isOAuthCredentialExpiredError(params.raw)) {
|
|
162844
163636
|
return [
|
|
162845
|
-
`**Your provider OAuth credential has expired.** Re-authenticate the provider connection (e.g. \`pullfrog auth codex\`), then re-trigger the run.`,
|
|
163637
|
+
`**Your provider OAuth credential has expired or been revoked.** Re-authenticate the provider connection (e.g. \`pullfrog auth claude\` / \`pullfrog auth codex\`), then re-trigger the run.`,
|
|
162846
163638
|
"",
|
|
162847
|
-
`[
|
|
163639
|
+
`[Claude subscription \u2192](https://docs.pullfrog.com/claude-auth) \xB7 [ChatGPT subscription \u2192](https://docs.pullfrog.com/codex-auth) \xB7 [Model settings \u2192](${settingsUrl}) \xB7 [Ask in Discord \u2192](https://discord.gg/8y96raFg8e)`
|
|
162848
163640
|
].join("\n");
|
|
162849
163641
|
}
|
|
162850
163642
|
return [
|
|
@@ -163713,7 +164505,7 @@ function formatBillingErrorSummary(error49, owner) {
|
|
|
163713
164505
|
return [
|
|
163714
164506
|
"**Your Pullfrog Router balance is exhausted.**",
|
|
163715
164507
|
"",
|
|
163716
|
-
"You have a
|
|
164508
|
+
"You have a payment method on file but auto-reload is disabled, so runs paused once your balance went past the overdraft buffer.",
|
|
163717
164509
|
"",
|
|
163718
164510
|
`[Top up balance \u2192](${billingConsoleUrl(owner, "billing")}) \xB7 [Enable auto-reload \u2192](${billingConsoleUrl(owner, "model-access")})`
|
|
163719
164511
|
].join("\n");
|