pullfrog 0.1.40 → 0.1.42
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/agents/postRun.d.ts +4 -1
- package/dist/cli.mjs +1031 -218
- package/dist/index.js +1022 -209
- package/dist/internal.js +4 -4
- package/dist/utils/openCodeModels.d.ts +9 -0
- package/dist/utils/payload.d.ts +2 -0
- package/dist/utils/runContext.d.ts +1 -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 },
|
|
@@ -99836,8 +99836,8 @@ var providers = {
|
|
|
99836
99836
|
},
|
|
99837
99837
|
"claude-opus": {
|
|
99838
99838
|
displayName: "Claude Opus",
|
|
99839
|
-
resolve: "anthropic/claude-opus-
|
|
99840
|
-
openRouterResolve: "openrouter/anthropic/claude-opus-
|
|
99839
|
+
resolve: "anthropic/claude-opus-5",
|
|
99840
|
+
openRouterResolve: "openrouter/anthropic/claude-opus-5",
|
|
99841
99841
|
preferred: true,
|
|
99842
99842
|
subagentModel: "claude-sonnet"
|
|
99843
99843
|
},
|
|
@@ -100035,8 +100035,8 @@ var providers = {
|
|
|
100035
100035
|
},
|
|
100036
100036
|
"claude-opus": {
|
|
100037
100037
|
displayName: "Claude Opus",
|
|
100038
|
-
resolve: "opencode/claude-opus-
|
|
100039
|
-
openRouterResolve: "openrouter/anthropic/claude-opus-
|
|
100038
|
+
resolve: "opencode/claude-opus-5",
|
|
100039
|
+
openRouterResolve: "openrouter/anthropic/claude-opus-5",
|
|
100040
100040
|
subagentModel: "claude-sonnet"
|
|
100041
100041
|
},
|
|
100042
100042
|
"claude-sonnet": {
|
|
@@ -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.42",
|
|
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",
|
|
@@ -102359,21 +102359,26 @@ var NON_COMMITTING_MODES = /* @__PURE__ */ new Set([
|
|
|
102359
102359
|
]);
|
|
102360
102360
|
|
|
102361
102361
|
// agents/postRun.ts
|
|
102362
|
-
function getUnsubmittedReview(toolState) {
|
|
102362
|
+
function getUnsubmittedReview(toolState, expectsReviewOutput2 = toolState.hadProgressComment) {
|
|
102363
102363
|
const mode = toolState.selectedMode;
|
|
102364
|
-
if (!
|
|
102364
|
+
if (!expectsReviewOutput2) return null;
|
|
102365
102365
|
if (mode === "Review") return toolState.review ? null : "Review";
|
|
102366
102366
|
if (mode === "IncrementalReview") {
|
|
102367
102367
|
return toolState.review || toolState.finalSummaryWritten ? null : "IncrementalReview";
|
|
102368
102368
|
}
|
|
102369
102369
|
return null;
|
|
102370
102370
|
}
|
|
102371
|
-
function
|
|
102371
|
+
function expectsReviewOutput(ctx) {
|
|
102372
|
+
if (ctx.toolState.hadProgressComment) return true;
|
|
102373
|
+
if (ctx.payload.progressComments) return false;
|
|
102374
|
+
return ctx.payload.event.silent !== true && ctx.payload.event.issue_number !== void 0;
|
|
102375
|
+
}
|
|
102376
|
+
function buildStopHookPrompt(failure2) {
|
|
102372
102377
|
return [
|
|
102373
|
-
`STOP HOOK FAILED \u2014 the repo-configured stop hook exited with code ${
|
|
102378
|
+
`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
102379
|
"",
|
|
102375
102380
|
"```",
|
|
102376
|
-
|
|
102381
|
+
failure2.output || "(no output)",
|
|
102377
102382
|
"```"
|
|
102378
102383
|
].join("\n");
|
|
102379
102384
|
}
|
|
@@ -102431,7 +102436,7 @@ async function collectPostRunIssues(ctx, options = {}) {
|
|
|
102431
102436
|
const stale = await isSummaryUnchanged(summaryFilePath2, summarySeed);
|
|
102432
102437
|
if (stale) issues.summaryStale = { filePath: summaryFilePath2 };
|
|
102433
102438
|
}
|
|
102434
|
-
const unsubmittedMode = getUnsubmittedReview(ctx.toolState);
|
|
102439
|
+
const unsubmittedMode = getUnsubmittedReview(ctx.toolState, expectsReviewOutput(ctx));
|
|
102435
102440
|
if (unsubmittedMode) issues.unsubmittedReview = unsubmittedMode;
|
|
102436
102441
|
return issues;
|
|
102437
102442
|
}
|
|
@@ -103399,7 +103404,7 @@ import { mkdirSync as mkdirSync6, writeFileSync as writeFileSync5 } from "node:f
|
|
|
103399
103404
|
import { join as join6 } from "node:path";
|
|
103400
103405
|
import { performance as performance6 } from "node:perf_hooks";
|
|
103401
103406
|
|
|
103402
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
103407
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/gen/core/serverSentEvents.gen.js
|
|
103403
103408
|
var createSseClient = ({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url: url4, ...options }) => {
|
|
103404
103409
|
let lastEventId;
|
|
103405
103410
|
const sleep4 = sseSleepFn ?? ((ms) => new Promise((resolve3) => setTimeout(resolve3, ms)));
|
|
@@ -103518,7 +103523,7 @@ var createSseClient = ({ onRequest, onSseError, onSseEvent, responseTransformer,
|
|
|
103518
103523
|
return { stream };
|
|
103519
103524
|
};
|
|
103520
103525
|
|
|
103521
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
103526
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/gen/core/pathSerializer.gen.js
|
|
103522
103527
|
var separatorArrayExplode = (style) => {
|
|
103523
103528
|
switch (style) {
|
|
103524
103529
|
case "label":
|
|
@@ -103621,7 +103626,7 @@ var serializeObjectParam = ({ allowReserved, explode, name, style, value: value2
|
|
|
103621
103626
|
return style === "label" || style === "matrix" ? separator2 + joinedValues : joinedValues;
|
|
103622
103627
|
};
|
|
103623
103628
|
|
|
103624
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
103629
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/gen/core/utils.gen.js
|
|
103625
103630
|
var PATH_PARAM_RE = /\{[^{}]+\}/g;
|
|
103626
103631
|
var defaultPathSerializer = ({ path: path4, url: _url4 }) => {
|
|
103627
103632
|
let url4 = _url4;
|
|
@@ -103704,7 +103709,7 @@ function getValidRequestBody(options) {
|
|
|
103704
103709
|
return void 0;
|
|
103705
103710
|
}
|
|
103706
103711
|
|
|
103707
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
103712
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/gen/core/auth.gen.js
|
|
103708
103713
|
var getAuthToken = async (auth2, callback) => {
|
|
103709
103714
|
const token = typeof callback === "function" ? await callback(auth2) : callback;
|
|
103710
103715
|
if (!token) {
|
|
@@ -103719,12 +103724,12 @@ var getAuthToken = async (auth2, callback) => {
|
|
|
103719
103724
|
return token;
|
|
103720
103725
|
};
|
|
103721
103726
|
|
|
103722
|
-
// 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/core/bodySerializer.gen.js
|
|
103723
103728
|
var jsonBodySerializer = {
|
|
103724
103729
|
bodySerializer: (body) => JSON.stringify(body, (_key, value2) => typeof value2 === "bigint" ? value2.toString() : value2)
|
|
103725
103730
|
};
|
|
103726
103731
|
|
|
103727
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
103732
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/gen/client/utils.gen.js
|
|
103728
103733
|
var createQuerySerializer = ({ parameters = {}, ...args2 } = {}) => {
|
|
103729
103734
|
const querySerializer = (queryParams) => {
|
|
103730
103735
|
const search2 = [];
|
|
@@ -103934,7 +103939,7 @@ var createConfig = (override = {}) => ({
|
|
|
103934
103939
|
...override
|
|
103935
103940
|
});
|
|
103936
103941
|
|
|
103937
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
103942
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/gen/client/client.gen.js
|
|
103938
103943
|
var createClient = (config3 = {}) => {
|
|
103939
103944
|
let _config = mergeConfigs(createConfig(), config3);
|
|
103940
103945
|
const getConfig = () => ({ ..._config });
|
|
@@ -104142,7 +104147,7 @@ var createClient = (config3 = {}) => {
|
|
|
104142
104147
|
};
|
|
104143
104148
|
};
|
|
104144
104149
|
|
|
104145
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
104150
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/gen/core/params.gen.js
|
|
104146
104151
|
var extraPrefixesMap = {
|
|
104147
104152
|
$body_: "body",
|
|
104148
104153
|
$headers_: "headers",
|
|
@@ -104238,10 +104243,10 @@ var buildClientParams = (args2, fields) => {
|
|
|
104238
104243
|
return params;
|
|
104239
104244
|
};
|
|
104240
104245
|
|
|
104241
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
104246
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/gen/client.gen.js
|
|
104242
104247
|
var client = createClient(createConfig({ baseUrl: "http://localhost:4096" }));
|
|
104243
104248
|
|
|
104244
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
104249
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/gen/sdk.gen.js
|
|
104245
104250
|
var HeyApiClient = class {
|
|
104246
104251
|
client;
|
|
104247
104252
|
constructor(args2) {
|
|
@@ -104401,6 +104406,28 @@ var ControlPlane = class extends HeyApiClient {
|
|
|
104401
104406
|
});
|
|
104402
104407
|
}
|
|
104403
104408
|
};
|
|
104409
|
+
var Capabilities = class extends HeyApiClient {
|
|
104410
|
+
/**
|
|
104411
|
+
* Get experimental capabilities
|
|
104412
|
+
*
|
|
104413
|
+
* Get experimental features enabled on the OpenCode server.
|
|
104414
|
+
*/
|
|
104415
|
+
get(parameters, options) {
|
|
104416
|
+
const params = buildClientParams([parameters], [
|
|
104417
|
+
{
|
|
104418
|
+
args: [
|
|
104419
|
+
{ in: "query", key: "directory" },
|
|
104420
|
+
{ in: "query", key: "workspace" }
|
|
104421
|
+
]
|
|
104422
|
+
}
|
|
104423
|
+
]);
|
|
104424
|
+
return (options?.client ?? this.client).get({
|
|
104425
|
+
url: "/experimental/capabilities",
|
|
104426
|
+
...options,
|
|
104427
|
+
...params
|
|
104428
|
+
});
|
|
104429
|
+
}
|
|
104430
|
+
};
|
|
104404
104431
|
var Console = class extends HeyApiClient {
|
|
104405
104432
|
/**
|
|
104406
104433
|
* Get active Console provider metadata
|
|
@@ -104543,60 +104570,23 @@ var Resource = class extends HeyApiClient {
|
|
|
104543
104570
|
};
|
|
104544
104571
|
var ProjectCopy = class extends HeyApiClient {
|
|
104545
104572
|
/**
|
|
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
|
|
104573
|
+
* Generate project copy name
|
|
104582
104574
|
*
|
|
104583
|
-
*
|
|
104575
|
+
* Generate a short name for a project copy from task context.
|
|
104584
104576
|
*/
|
|
104585
|
-
|
|
104577
|
+
generateName(parameters, options) {
|
|
104586
104578
|
const params = buildClientParams([parameters], [
|
|
104587
104579
|
{
|
|
104588
104580
|
args: [
|
|
104589
104581
|
{ in: "path", key: "projectID" },
|
|
104582
|
+
{ in: "query", key: "directory" },
|
|
104590
104583
|
{ in: "query", key: "workspace" },
|
|
104591
|
-
{ in: "body", key: "strategy" },
|
|
104592
|
-
{ in: "body", key: "directory" },
|
|
104593
|
-
{ in: "body", key: "name" },
|
|
104594
104584
|
{ in: "body", key: "context" }
|
|
104595
104585
|
]
|
|
104596
104586
|
}
|
|
104597
104587
|
]);
|
|
104598
104588
|
return (options?.client ?? this.client).post({
|
|
104599
|
-
url: "/experimental/project/{projectID}/copy",
|
|
104589
|
+
url: "/experimental/project/{projectID}/copy/generate-name",
|
|
104600
104590
|
...options,
|
|
104601
104591
|
...params,
|
|
104602
104592
|
headers: {
|
|
@@ -104606,27 +104596,6 @@ var ProjectCopy = class extends HeyApiClient {
|
|
|
104606
104596
|
}
|
|
104607
104597
|
});
|
|
104608
104598
|
}
|
|
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
104599
|
};
|
|
104631
104600
|
var Adapter = class extends HeyApiClient {
|
|
104632
104601
|
/**
|
|
@@ -104799,6 +104768,10 @@ var Experimental = class extends HeyApiClient {
|
|
|
104799
104768
|
get controlPlane() {
|
|
104800
104769
|
return this._controlPlane ??= new ControlPlane({ client: this.client });
|
|
104801
104770
|
}
|
|
104771
|
+
_capabilities;
|
|
104772
|
+
get capabilities() {
|
|
104773
|
+
return this._capabilities ??= new Capabilities({ client: this.client });
|
|
104774
|
+
}
|
|
104802
104775
|
_console;
|
|
104803
104776
|
get console() {
|
|
104804
104777
|
return this._console ??= new Console({ client: this.client });
|
|
@@ -107322,9 +107295,9 @@ var Tui = class extends HeyApiClient {
|
|
|
107322
107295
|
};
|
|
107323
107296
|
var Health = class extends HeyApiClient {
|
|
107324
107297
|
/**
|
|
107325
|
-
* Check
|
|
107298
|
+
* Check server health
|
|
107326
107299
|
*
|
|
107327
|
-
* Check whether the
|
|
107300
|
+
* Check whether the API server is ready to accept requests.
|
|
107328
107301
|
*/
|
|
107329
107302
|
get(options) {
|
|
107330
107303
|
return (options?.client ?? this.client).get({
|
|
@@ -107333,11 +107306,26 @@ var Health = class extends HeyApiClient {
|
|
|
107333
107306
|
});
|
|
107334
107307
|
}
|
|
107335
107308
|
};
|
|
107309
|
+
var Location = class extends HeyApiClient {
|
|
107310
|
+
/**
|
|
107311
|
+
* Get location
|
|
107312
|
+
*
|
|
107313
|
+
* Resolve the requested location or the server default location.
|
|
107314
|
+
*/
|
|
107315
|
+
get(parameters, options) {
|
|
107316
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
107317
|
+
return (options?.client ?? this.client).get({
|
|
107318
|
+
url: "/api/location",
|
|
107319
|
+
...options,
|
|
107320
|
+
...params
|
|
107321
|
+
});
|
|
107322
|
+
}
|
|
107323
|
+
};
|
|
107336
107324
|
var Agent = class extends HeyApiClient {
|
|
107337
107325
|
/**
|
|
107338
|
-
* List
|
|
107326
|
+
* List agents
|
|
107339
107327
|
*
|
|
107340
|
-
* Retrieve currently registered
|
|
107328
|
+
* Retrieve currently registered agents.
|
|
107341
107329
|
*/
|
|
107342
107330
|
list(parameters, options) {
|
|
107343
107331
|
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
@@ -107348,6 +107336,56 @@ var Agent = class extends HeyApiClient {
|
|
|
107348
107336
|
});
|
|
107349
107337
|
}
|
|
107350
107338
|
};
|
|
107339
|
+
var Revert = class extends HeyApiClient {
|
|
107340
|
+
/**
|
|
107341
|
+
* Stage session revert
|
|
107342
|
+
*
|
|
107343
|
+
* Stage or move a reversible session boundary and optionally apply its file changes.
|
|
107344
|
+
*/
|
|
107345
|
+
stage(parameters, options) {
|
|
107346
|
+
const params = buildClientParams([parameters], [
|
|
107347
|
+
{
|
|
107348
|
+
args: [
|
|
107349
|
+
{ in: "path", key: "sessionID" },
|
|
107350
|
+
{ in: "body", key: "messageID" },
|
|
107351
|
+
{ in: "body", key: "files" }
|
|
107352
|
+
]
|
|
107353
|
+
}
|
|
107354
|
+
]);
|
|
107355
|
+
return (options?.client ?? this.client).post({
|
|
107356
|
+
url: "/api/session/{sessionID}/revert/stage",
|
|
107357
|
+
...options,
|
|
107358
|
+
...params,
|
|
107359
|
+
headers: {
|
|
107360
|
+
"Content-Type": "application/json",
|
|
107361
|
+
...options?.headers,
|
|
107362
|
+
...params.headers
|
|
107363
|
+
}
|
|
107364
|
+
});
|
|
107365
|
+
}
|
|
107366
|
+
/**
|
|
107367
|
+
* Clear staged revert
|
|
107368
|
+
*/
|
|
107369
|
+
clear(parameters, options) {
|
|
107370
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
107371
|
+
return (options?.client ?? this.client).post({
|
|
107372
|
+
url: "/api/session/{sessionID}/revert/clear",
|
|
107373
|
+
...options,
|
|
107374
|
+
...params
|
|
107375
|
+
});
|
|
107376
|
+
}
|
|
107377
|
+
/**
|
|
107378
|
+
* Commit staged revert
|
|
107379
|
+
*/
|
|
107380
|
+
commit(parameters, options) {
|
|
107381
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
107382
|
+
return (options?.client ?? this.client).post({
|
|
107383
|
+
url: "/api/session/{sessionID}/revert/commit",
|
|
107384
|
+
...options,
|
|
107385
|
+
...params
|
|
107386
|
+
});
|
|
107387
|
+
}
|
|
107388
|
+
};
|
|
107351
107389
|
var Permission2 = class extends HeyApiClient {
|
|
107352
107390
|
/**
|
|
107353
107391
|
* List session permission requests
|
|
@@ -107357,7 +107395,58 @@ var Permission2 = class extends HeyApiClient {
|
|
|
107357
107395
|
list(parameters, options) {
|
|
107358
107396
|
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
107359
107397
|
return (options?.client ?? this.client).get({
|
|
107360
|
-
url: "/api/session/{sessionID}/permission
|
|
107398
|
+
url: "/api/session/{sessionID}/permission",
|
|
107399
|
+
...options,
|
|
107400
|
+
...params
|
|
107401
|
+
});
|
|
107402
|
+
}
|
|
107403
|
+
/**
|
|
107404
|
+
* Create permission request
|
|
107405
|
+
*
|
|
107406
|
+
* Evaluate and, when approval is required, create a permission request for a session.
|
|
107407
|
+
*/
|
|
107408
|
+
create(parameters, options) {
|
|
107409
|
+
const params = buildClientParams([parameters], [
|
|
107410
|
+
{
|
|
107411
|
+
args: [
|
|
107412
|
+
{ in: "path", key: "sessionID" },
|
|
107413
|
+
{ in: "body", key: "id" },
|
|
107414
|
+
{ in: "body", key: "action" },
|
|
107415
|
+
{ in: "body", key: "resources" },
|
|
107416
|
+
{ in: "body", key: "save" },
|
|
107417
|
+
{ in: "body", key: "metadata" },
|
|
107418
|
+
{ in: "body", key: "source" },
|
|
107419
|
+
{ in: "body", key: "agent" }
|
|
107420
|
+
]
|
|
107421
|
+
}
|
|
107422
|
+
]);
|
|
107423
|
+
return (options?.client ?? this.client).post({
|
|
107424
|
+
url: "/api/session/{sessionID}/permission",
|
|
107425
|
+
...options,
|
|
107426
|
+
...params,
|
|
107427
|
+
headers: {
|
|
107428
|
+
"Content-Type": "application/json",
|
|
107429
|
+
...options?.headers,
|
|
107430
|
+
...params.headers
|
|
107431
|
+
}
|
|
107432
|
+
});
|
|
107433
|
+
}
|
|
107434
|
+
/**
|
|
107435
|
+
* Get permission request
|
|
107436
|
+
*
|
|
107437
|
+
* Retrieve a pending permission request owned by a session.
|
|
107438
|
+
*/
|
|
107439
|
+
get(parameters, options) {
|
|
107440
|
+
const params = buildClientParams([parameters], [
|
|
107441
|
+
{
|
|
107442
|
+
args: [
|
|
107443
|
+
{ in: "path", key: "sessionID" },
|
|
107444
|
+
{ in: "path", key: "requestID" }
|
|
107445
|
+
]
|
|
107446
|
+
}
|
|
107447
|
+
]);
|
|
107448
|
+
return (options?.client ?? this.client).get({
|
|
107449
|
+
url: "/api/session/{sessionID}/permission/{requestID}",
|
|
107361
107450
|
...options,
|
|
107362
107451
|
...params
|
|
107363
107452
|
});
|
|
@@ -107379,7 +107468,7 @@ var Permission2 = class extends HeyApiClient {
|
|
|
107379
107468
|
}
|
|
107380
107469
|
]);
|
|
107381
107470
|
return (options?.client ?? this.client).post({
|
|
107382
|
-
url: "/api/session/{sessionID}/permission/
|
|
107471
|
+
url: "/api/session/{sessionID}/permission/{requestID}/reply",
|
|
107383
107472
|
...options,
|
|
107384
107473
|
...params,
|
|
107385
107474
|
headers: {
|
|
@@ -107391,6 +107480,19 @@ var Permission2 = class extends HeyApiClient {
|
|
|
107391
107480
|
}
|
|
107392
107481
|
};
|
|
107393
107482
|
var Question2 = class extends HeyApiClient {
|
|
107483
|
+
/**
|
|
107484
|
+
* List session question requests
|
|
107485
|
+
*
|
|
107486
|
+
* Retrieve pending question requests owned by a session.
|
|
107487
|
+
*/
|
|
107488
|
+
list(parameters, options) {
|
|
107489
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
107490
|
+
return (options?.client ?? this.client).get({
|
|
107491
|
+
url: "/api/session/{sessionID}/question",
|
|
107492
|
+
...options,
|
|
107493
|
+
...params
|
|
107494
|
+
});
|
|
107495
|
+
}
|
|
107394
107496
|
/**
|
|
107395
107497
|
* Reply to pending question request
|
|
107396
107498
|
*
|
|
@@ -107407,7 +107509,7 @@ var Question2 = class extends HeyApiClient {
|
|
|
107407
107509
|
}
|
|
107408
107510
|
]);
|
|
107409
107511
|
return (options?.client ?? this.client).post({
|
|
107410
|
-
url: "/api/session/{sessionID}/question/
|
|
107512
|
+
url: "/api/session/{sessionID}/question/{requestID}/reply",
|
|
107411
107513
|
...options,
|
|
107412
107514
|
...params,
|
|
107413
107515
|
headers: {
|
|
@@ -107432,7 +107534,7 @@ var Question2 = class extends HeyApiClient {
|
|
|
107432
107534
|
}
|
|
107433
107535
|
]);
|
|
107434
107536
|
return (options?.client ?? this.client).post({
|
|
107435
|
-
url: "/api/session/{sessionID}/question/
|
|
107537
|
+
url: "/api/session/{sessionID}/question/{requestID}/reject",
|
|
107436
107538
|
...options,
|
|
107437
107539
|
...params
|
|
107438
107540
|
});
|
|
@@ -107440,7 +107542,7 @@ var Question2 = class extends HeyApiClient {
|
|
|
107440
107542
|
};
|
|
107441
107543
|
var Session3 = class extends HeyApiClient {
|
|
107442
107544
|
/**
|
|
107443
|
-
* List
|
|
107545
|
+
* List sessions
|
|
107444
107546
|
*
|
|
107445
107547
|
* 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
107548
|
*/
|
|
@@ -107466,9 +107568,110 @@ var Session3 = class extends HeyApiClient {
|
|
|
107466
107568
|
});
|
|
107467
107569
|
}
|
|
107468
107570
|
/**
|
|
107469
|
-
*
|
|
107571
|
+
* Create session
|
|
107572
|
+
*
|
|
107573
|
+
* Create a session at the requested location.
|
|
107574
|
+
*/
|
|
107575
|
+
create(parameters, options) {
|
|
107576
|
+
const params = buildClientParams([parameters], [
|
|
107577
|
+
{
|
|
107578
|
+
args: [
|
|
107579
|
+
{ in: "body", key: "id" },
|
|
107580
|
+
{ in: "body", key: "agent" },
|
|
107581
|
+
{ in: "body", key: "model" },
|
|
107582
|
+
{ in: "body", key: "location" }
|
|
107583
|
+
]
|
|
107584
|
+
}
|
|
107585
|
+
]);
|
|
107586
|
+
return (options?.client ?? this.client).post({
|
|
107587
|
+
url: "/api/session",
|
|
107588
|
+
...options,
|
|
107589
|
+
...params,
|
|
107590
|
+
headers: {
|
|
107591
|
+
"Content-Type": "application/json",
|
|
107592
|
+
...options?.headers,
|
|
107593
|
+
...params.headers
|
|
107594
|
+
}
|
|
107595
|
+
});
|
|
107596
|
+
}
|
|
107597
|
+
/**
|
|
107598
|
+
* List active sessions
|
|
107599
|
+
*
|
|
107600
|
+
* Retrieve foreground Session drains currently owned by this OpenCode process. Sessions absent from the result are inactive.
|
|
107601
|
+
*/
|
|
107602
|
+
active(options) {
|
|
107603
|
+
return (options?.client ?? this.client).get({
|
|
107604
|
+
url: "/api/session/active",
|
|
107605
|
+
...options
|
|
107606
|
+
});
|
|
107607
|
+
}
|
|
107608
|
+
/**
|
|
107609
|
+
* Get session
|
|
107610
|
+
*
|
|
107611
|
+
* Retrieve a session by ID.
|
|
107612
|
+
*/
|
|
107613
|
+
get(parameters, options) {
|
|
107614
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
107615
|
+
return (options?.client ?? this.client).get({
|
|
107616
|
+
url: "/api/session/{sessionID}",
|
|
107617
|
+
...options,
|
|
107618
|
+
...params
|
|
107619
|
+
});
|
|
107620
|
+
}
|
|
107621
|
+
/**
|
|
107622
|
+
* Switch session agent
|
|
107623
|
+
*
|
|
107624
|
+
* Switch the agent used by subsequent provider turns.
|
|
107625
|
+
*/
|
|
107626
|
+
switchAgent(parameters, options) {
|
|
107627
|
+
const params = buildClientParams([parameters], [
|
|
107628
|
+
{
|
|
107629
|
+
args: [
|
|
107630
|
+
{ in: "path", key: "sessionID" },
|
|
107631
|
+
{ in: "body", key: "agent" }
|
|
107632
|
+
]
|
|
107633
|
+
}
|
|
107634
|
+
]);
|
|
107635
|
+
return (options?.client ?? this.client).post({
|
|
107636
|
+
url: "/api/session/{sessionID}/agent",
|
|
107637
|
+
...options,
|
|
107638
|
+
...params,
|
|
107639
|
+
headers: {
|
|
107640
|
+
"Content-Type": "application/json",
|
|
107641
|
+
...options?.headers,
|
|
107642
|
+
...params.headers
|
|
107643
|
+
}
|
|
107644
|
+
});
|
|
107645
|
+
}
|
|
107646
|
+
/**
|
|
107647
|
+
* Switch session model
|
|
107648
|
+
*
|
|
107649
|
+
* Switch the model used by subsequent provider turns.
|
|
107650
|
+
*/
|
|
107651
|
+
switchModel(parameters, options) {
|
|
107652
|
+
const params = buildClientParams([parameters], [
|
|
107653
|
+
{
|
|
107654
|
+
args: [
|
|
107655
|
+
{ in: "path", key: "sessionID" },
|
|
107656
|
+
{ in: "body", key: "model" }
|
|
107657
|
+
]
|
|
107658
|
+
}
|
|
107659
|
+
]);
|
|
107660
|
+
return (options?.client ?? this.client).post({
|
|
107661
|
+
url: "/api/session/{sessionID}/model",
|
|
107662
|
+
...options,
|
|
107663
|
+
...params,
|
|
107664
|
+
headers: {
|
|
107665
|
+
"Content-Type": "application/json",
|
|
107666
|
+
...options?.headers,
|
|
107667
|
+
...params.headers
|
|
107668
|
+
}
|
|
107669
|
+
});
|
|
107670
|
+
}
|
|
107671
|
+
/**
|
|
107672
|
+
* Send message
|
|
107470
107673
|
*
|
|
107471
|
-
* Durably admit one
|
|
107674
|
+
* Durably admit one session input and schedule agent-loop execution unless resume is false.
|
|
107472
107675
|
*/
|
|
107473
107676
|
prompt(parameters, options) {
|
|
107474
107677
|
const params = buildClientParams([parameters], [
|
|
@@ -107494,9 +107697,9 @@ var Session3 = class extends HeyApiClient {
|
|
|
107494
107697
|
});
|
|
107495
107698
|
}
|
|
107496
107699
|
/**
|
|
107497
|
-
* Compact
|
|
107700
|
+
* Compact session
|
|
107498
107701
|
*
|
|
107499
|
-
* Compact a
|
|
107702
|
+
* Compact a session conversation.
|
|
107500
107703
|
*/
|
|
107501
107704
|
compact(parameters, options) {
|
|
107502
107705
|
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
@@ -107507,9 +107710,9 @@ var Session3 = class extends HeyApiClient {
|
|
|
107507
107710
|
});
|
|
107508
107711
|
}
|
|
107509
107712
|
/**
|
|
107510
|
-
* Wait for
|
|
107713
|
+
* Wait for session
|
|
107511
107714
|
*
|
|
107512
|
-
* Wait for a
|
|
107715
|
+
* Wait for a session agent loop to become idle.
|
|
107513
107716
|
*/
|
|
107514
107717
|
wait(parameters, options) {
|
|
107515
107718
|
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
@@ -107520,9 +107723,9 @@ var Session3 = class extends HeyApiClient {
|
|
|
107520
107723
|
});
|
|
107521
107724
|
}
|
|
107522
107725
|
/**
|
|
107523
|
-
* Get
|
|
107726
|
+
* Get session context
|
|
107524
107727
|
*
|
|
107525
|
-
* Retrieve the active context messages for a
|
|
107728
|
+
* Retrieve the active context messages for a session (all messages after the last compaction).
|
|
107526
107729
|
*/
|
|
107527
107730
|
context(parameters, options) {
|
|
107528
107731
|
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
@@ -107533,9 +107736,83 @@ var Session3 = class extends HeyApiClient {
|
|
|
107533
107736
|
});
|
|
107534
107737
|
}
|
|
107535
107738
|
/**
|
|
107536
|
-
* Get
|
|
107739
|
+
* Get session history
|
|
107537
107740
|
*
|
|
107538
|
-
*
|
|
107741
|
+
* Read one finite page of public durable Session events after an exclusive aggregate sequence. Newly committed events may appear on later pages.
|
|
107742
|
+
*/
|
|
107743
|
+
history(parameters, options) {
|
|
107744
|
+
const params = buildClientParams([parameters], [
|
|
107745
|
+
{
|
|
107746
|
+
args: [
|
|
107747
|
+
{ in: "path", key: "sessionID" },
|
|
107748
|
+
{ in: "query", key: "limit" },
|
|
107749
|
+
{ in: "query", key: "after" }
|
|
107750
|
+
]
|
|
107751
|
+
}
|
|
107752
|
+
]);
|
|
107753
|
+
return (options?.client ?? this.client).get({
|
|
107754
|
+
url: "/api/session/{sessionID}/history",
|
|
107755
|
+
...options,
|
|
107756
|
+
...params
|
|
107757
|
+
});
|
|
107758
|
+
}
|
|
107759
|
+
/**
|
|
107760
|
+
* Subscribe to session events
|
|
107761
|
+
*
|
|
107762
|
+
* Replay durable events after an aggregate sequence, then continue with new durable events.
|
|
107763
|
+
*/
|
|
107764
|
+
events(parameters, options) {
|
|
107765
|
+
const params = buildClientParams([parameters], [
|
|
107766
|
+
{
|
|
107767
|
+
args: [
|
|
107768
|
+
{ in: "path", key: "sessionID" },
|
|
107769
|
+
{ in: "query", key: "after" }
|
|
107770
|
+
]
|
|
107771
|
+
}
|
|
107772
|
+
]);
|
|
107773
|
+
return (options?.client ?? this.client).sse.get({
|
|
107774
|
+
url: "/api/session/{sessionID}/event",
|
|
107775
|
+
...options,
|
|
107776
|
+
...params
|
|
107777
|
+
});
|
|
107778
|
+
}
|
|
107779
|
+
/**
|
|
107780
|
+
* Interrupt session execution
|
|
107781
|
+
*
|
|
107782
|
+
* Interrupt active execution owned by this OpenCode process. Idle interruption is a no-op.
|
|
107783
|
+
*/
|
|
107784
|
+
interrupt(parameters, options) {
|
|
107785
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "sessionID" }] }]);
|
|
107786
|
+
return (options?.client ?? this.client).post({
|
|
107787
|
+
url: "/api/session/{sessionID}/interrupt",
|
|
107788
|
+
...options,
|
|
107789
|
+
...params
|
|
107790
|
+
});
|
|
107791
|
+
}
|
|
107792
|
+
/**
|
|
107793
|
+
* Get session message
|
|
107794
|
+
*
|
|
107795
|
+
* Retrieve one projected message owned by the Session.
|
|
107796
|
+
*/
|
|
107797
|
+
message(parameters, options) {
|
|
107798
|
+
const params = buildClientParams([parameters], [
|
|
107799
|
+
{
|
|
107800
|
+
args: [
|
|
107801
|
+
{ in: "path", key: "sessionID" },
|
|
107802
|
+
{ in: "path", key: "messageID" }
|
|
107803
|
+
]
|
|
107804
|
+
}
|
|
107805
|
+
]);
|
|
107806
|
+
return (options?.client ?? this.client).get({
|
|
107807
|
+
url: "/api/session/{sessionID}/message/{messageID}",
|
|
107808
|
+
...options,
|
|
107809
|
+
...params
|
|
107810
|
+
});
|
|
107811
|
+
}
|
|
107812
|
+
/**
|
|
107813
|
+
* Get session messages
|
|
107814
|
+
*
|
|
107815
|
+
* 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
107816
|
*/
|
|
107540
107817
|
messages(parameters, options) {
|
|
107541
107818
|
const params = buildClientParams([parameters], [
|
|
@@ -107554,6 +107831,10 @@ var Session3 = class extends HeyApiClient {
|
|
|
107554
107831
|
...params
|
|
107555
107832
|
});
|
|
107556
107833
|
}
|
|
107834
|
+
_revert;
|
|
107835
|
+
get revert() {
|
|
107836
|
+
return this._revert ??= new Revert({ client: this.client });
|
|
107837
|
+
}
|
|
107557
107838
|
_permission;
|
|
107558
107839
|
get permission() {
|
|
107559
107840
|
return this._permission ??= new Permission2({ client: this.client });
|
|
@@ -107565,9 +107846,9 @@ var Session3 = class extends HeyApiClient {
|
|
|
107565
107846
|
};
|
|
107566
107847
|
var Model = class extends HeyApiClient {
|
|
107567
107848
|
/**
|
|
107568
|
-
* List
|
|
107849
|
+
* List models
|
|
107569
107850
|
*
|
|
107570
|
-
* Retrieve available
|
|
107851
|
+
* Retrieve available models ordered by release date.
|
|
107571
107852
|
*/
|
|
107572
107853
|
list(parameters, options) {
|
|
107573
107854
|
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
@@ -107580,9 +107861,9 @@ var Model = class extends HeyApiClient {
|
|
|
107580
107861
|
};
|
|
107581
107862
|
var Provider2 = class extends HeyApiClient {
|
|
107582
107863
|
/**
|
|
107583
|
-
* List
|
|
107864
|
+
* List providers
|
|
107584
107865
|
*
|
|
107585
|
-
* Retrieve active
|
|
107866
|
+
* Retrieve active AI providers so clients can show provider availability and configuration.
|
|
107586
107867
|
*/
|
|
107587
107868
|
list(parameters, options) {
|
|
107588
107869
|
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
@@ -107593,9 +107874,9 @@ var Provider2 = class extends HeyApiClient {
|
|
|
107593
107874
|
});
|
|
107594
107875
|
}
|
|
107595
107876
|
/**
|
|
107596
|
-
* Get
|
|
107877
|
+
* Get provider
|
|
107597
107878
|
*
|
|
107598
|
-
* Retrieve a single
|
|
107879
|
+
* Retrieve a single AI provider so clients can inspect its availability and endpoint settings.
|
|
107599
107880
|
*/
|
|
107600
107881
|
get(parameters, options) {
|
|
107601
107882
|
const params = buildClientParams([parameters], [
|
|
@@ -107613,6 +107894,222 @@ var Provider2 = class extends HeyApiClient {
|
|
|
107613
107894
|
});
|
|
107614
107895
|
}
|
|
107615
107896
|
};
|
|
107897
|
+
var Connect = class extends HeyApiClient {
|
|
107898
|
+
/**
|
|
107899
|
+
* Connect with key
|
|
107900
|
+
*
|
|
107901
|
+
* Run a key authentication method and store the resulting credential.
|
|
107902
|
+
*/
|
|
107903
|
+
key(parameters, options) {
|
|
107904
|
+
const params = buildClientParams([parameters], [
|
|
107905
|
+
{
|
|
107906
|
+
args: [
|
|
107907
|
+
{ in: "path", key: "integrationID" },
|
|
107908
|
+
{ in: "query", key: "location" },
|
|
107909
|
+
{ in: "body", key: "key" },
|
|
107910
|
+
{ in: "body", key: "label" }
|
|
107911
|
+
]
|
|
107912
|
+
}
|
|
107913
|
+
]);
|
|
107914
|
+
return (options?.client ?? this.client).post({
|
|
107915
|
+
url: "/api/integration/{integrationID}/connect/key",
|
|
107916
|
+
...options,
|
|
107917
|
+
...params,
|
|
107918
|
+
headers: {
|
|
107919
|
+
"Content-Type": "application/json",
|
|
107920
|
+
...options?.headers,
|
|
107921
|
+
...params.headers
|
|
107922
|
+
}
|
|
107923
|
+
});
|
|
107924
|
+
}
|
|
107925
|
+
/**
|
|
107926
|
+
* Begin OAuth connection
|
|
107927
|
+
*
|
|
107928
|
+
* Start an OAuth attempt and return the authorization details.
|
|
107929
|
+
*/
|
|
107930
|
+
oauth(parameters, options) {
|
|
107931
|
+
const params = buildClientParams([parameters], [
|
|
107932
|
+
{
|
|
107933
|
+
args: [
|
|
107934
|
+
{ in: "path", key: "integrationID" },
|
|
107935
|
+
{ in: "query", key: "location" },
|
|
107936
|
+
{ in: "body", key: "methodID" },
|
|
107937
|
+
{ in: "body", key: "inputs" },
|
|
107938
|
+
{ in: "body", key: "label" }
|
|
107939
|
+
]
|
|
107940
|
+
}
|
|
107941
|
+
]);
|
|
107942
|
+
return (options?.client ?? this.client).post({
|
|
107943
|
+
url: "/api/integration/{integrationID}/connect/oauth",
|
|
107944
|
+
...options,
|
|
107945
|
+
...params,
|
|
107946
|
+
headers: {
|
|
107947
|
+
"Content-Type": "application/json",
|
|
107948
|
+
...options?.headers,
|
|
107949
|
+
...params.headers
|
|
107950
|
+
}
|
|
107951
|
+
});
|
|
107952
|
+
}
|
|
107953
|
+
};
|
|
107954
|
+
var Attempt = class extends HeyApiClient {
|
|
107955
|
+
/**
|
|
107956
|
+
* Cancel OAuth connection
|
|
107957
|
+
*
|
|
107958
|
+
* Cancel an OAuth attempt and release its resources.
|
|
107959
|
+
*/
|
|
107960
|
+
cancel(parameters, options) {
|
|
107961
|
+
const params = buildClientParams([parameters], [
|
|
107962
|
+
{
|
|
107963
|
+
args: [
|
|
107964
|
+
{ in: "path", key: "attemptID" },
|
|
107965
|
+
{ in: "query", key: "location" }
|
|
107966
|
+
]
|
|
107967
|
+
}
|
|
107968
|
+
]);
|
|
107969
|
+
return (options?.client ?? this.client).delete({
|
|
107970
|
+
url: "/api/integration/attempt/{attemptID}",
|
|
107971
|
+
...options,
|
|
107972
|
+
...params
|
|
107973
|
+
});
|
|
107974
|
+
}
|
|
107975
|
+
/**
|
|
107976
|
+
* Get OAuth attempt status
|
|
107977
|
+
*
|
|
107978
|
+
* Poll the current status of an OAuth attempt.
|
|
107979
|
+
*/
|
|
107980
|
+
status(parameters, options) {
|
|
107981
|
+
const params = buildClientParams([parameters], [
|
|
107982
|
+
{
|
|
107983
|
+
args: [
|
|
107984
|
+
{ in: "path", key: "attemptID" },
|
|
107985
|
+
{ in: "query", key: "location" }
|
|
107986
|
+
]
|
|
107987
|
+
}
|
|
107988
|
+
]);
|
|
107989
|
+
return (options?.client ?? this.client).get({
|
|
107990
|
+
url: "/api/integration/attempt/{attemptID}",
|
|
107991
|
+
...options,
|
|
107992
|
+
...params
|
|
107993
|
+
});
|
|
107994
|
+
}
|
|
107995
|
+
/**
|
|
107996
|
+
* Complete OAuth connection
|
|
107997
|
+
*
|
|
107998
|
+
* Complete a code-based OAuth attempt and store the resulting credential.
|
|
107999
|
+
*/
|
|
108000
|
+
complete(parameters, options) {
|
|
108001
|
+
const params = buildClientParams([parameters], [
|
|
108002
|
+
{
|
|
108003
|
+
args: [
|
|
108004
|
+
{ in: "path", key: "attemptID" },
|
|
108005
|
+
{ in: "query", key: "location" },
|
|
108006
|
+
{ in: "body", key: "code" }
|
|
108007
|
+
]
|
|
108008
|
+
}
|
|
108009
|
+
]);
|
|
108010
|
+
return (options?.client ?? this.client).post({
|
|
108011
|
+
url: "/api/integration/attempt/{attemptID}/complete",
|
|
108012
|
+
...options,
|
|
108013
|
+
...params,
|
|
108014
|
+
headers: {
|
|
108015
|
+
"Content-Type": "application/json",
|
|
108016
|
+
...options?.headers,
|
|
108017
|
+
...params.headers
|
|
108018
|
+
}
|
|
108019
|
+
});
|
|
108020
|
+
}
|
|
108021
|
+
};
|
|
108022
|
+
var Integration = class extends HeyApiClient {
|
|
108023
|
+
/**
|
|
108024
|
+
* List integrations
|
|
108025
|
+
*
|
|
108026
|
+
* Retrieve available integrations and their authentication methods.
|
|
108027
|
+
*/
|
|
108028
|
+
list(parameters, options) {
|
|
108029
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
108030
|
+
return (options?.client ?? this.client).get({
|
|
108031
|
+
url: "/api/integration",
|
|
108032
|
+
...options,
|
|
108033
|
+
...params
|
|
108034
|
+
});
|
|
108035
|
+
}
|
|
108036
|
+
/**
|
|
108037
|
+
* Get integration
|
|
108038
|
+
*
|
|
108039
|
+
* Retrieve one integration and its authentication methods.
|
|
108040
|
+
*/
|
|
108041
|
+
get(parameters, options) {
|
|
108042
|
+
const params = buildClientParams([parameters], [
|
|
108043
|
+
{
|
|
108044
|
+
args: [
|
|
108045
|
+
{ in: "path", key: "integrationID" },
|
|
108046
|
+
{ in: "query", key: "location" }
|
|
108047
|
+
]
|
|
108048
|
+
}
|
|
108049
|
+
]);
|
|
108050
|
+
return (options?.client ?? this.client).get({
|
|
108051
|
+
url: "/api/integration/{integrationID}",
|
|
108052
|
+
...options,
|
|
108053
|
+
...params
|
|
108054
|
+
});
|
|
108055
|
+
}
|
|
108056
|
+
_connect;
|
|
108057
|
+
get connect() {
|
|
108058
|
+
return this._connect ??= new Connect({ client: this.client });
|
|
108059
|
+
}
|
|
108060
|
+
_attempt;
|
|
108061
|
+
get attempt() {
|
|
108062
|
+
return this._attempt ??= new Attempt({ client: this.client });
|
|
108063
|
+
}
|
|
108064
|
+
};
|
|
108065
|
+
var Credential = class extends HeyApiClient {
|
|
108066
|
+
/**
|
|
108067
|
+
* Remove credential
|
|
108068
|
+
*
|
|
108069
|
+
* Remove a stored integration credential.
|
|
108070
|
+
*/
|
|
108071
|
+
remove(parameters, options) {
|
|
108072
|
+
const params = buildClientParams([parameters], [
|
|
108073
|
+
{
|
|
108074
|
+
args: [
|
|
108075
|
+
{ in: "path", key: "credentialID" },
|
|
108076
|
+
{ in: "query", key: "location" }
|
|
108077
|
+
]
|
|
108078
|
+
}
|
|
108079
|
+
]);
|
|
108080
|
+
return (options?.client ?? this.client).delete({
|
|
108081
|
+
url: "/api/credential/{credentialID}",
|
|
108082
|
+
...options,
|
|
108083
|
+
...params
|
|
108084
|
+
});
|
|
108085
|
+
}
|
|
108086
|
+
/**
|
|
108087
|
+
* Update credential
|
|
108088
|
+
*
|
|
108089
|
+
* Update a stored credential label.
|
|
108090
|
+
*/
|
|
108091
|
+
update(parameters, options) {
|
|
108092
|
+
const params = buildClientParams([parameters], [
|
|
108093
|
+
{
|
|
108094
|
+
args: [
|
|
108095
|
+
{ in: "path", key: "credentialID" },
|
|
108096
|
+
{ in: "query", key: "location" },
|
|
108097
|
+
{ in: "body", key: "label" }
|
|
108098
|
+
]
|
|
108099
|
+
}
|
|
108100
|
+
]);
|
|
108101
|
+
return (options?.client ?? this.client).patch({
|
|
108102
|
+
url: "/api/credential/{credentialID}",
|
|
108103
|
+
...options,
|
|
108104
|
+
...params,
|
|
108105
|
+
headers: {
|
|
108106
|
+
"Content-Type": "application/json",
|
|
108107
|
+
...options?.headers,
|
|
108108
|
+
...params.headers
|
|
108109
|
+
}
|
|
108110
|
+
});
|
|
108111
|
+
}
|
|
108112
|
+
};
|
|
107616
108113
|
var Request2 = class extends HeyApiClient {
|
|
107617
108114
|
/**
|
|
107618
108115
|
* List pending permission requests
|
|
@@ -107670,41 +108167,54 @@ var Fs = class extends HeyApiClient {
|
|
|
107670
108167
|
/**
|
|
107671
108168
|
* Read file
|
|
107672
108169
|
*
|
|
107673
|
-
*
|
|
108170
|
+
* Serve one file relative to the requested location.
|
|
107674
108171
|
*/
|
|
107675
108172
|
read(parameters, options) {
|
|
108173
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
108174
|
+
return (options?.client ?? this.client).get({
|
|
108175
|
+
url: "/api/fs/read/*",
|
|
108176
|
+
...options,
|
|
108177
|
+
...params
|
|
108178
|
+
});
|
|
108179
|
+
}
|
|
108180
|
+
/**
|
|
108181
|
+
* List directory
|
|
108182
|
+
*
|
|
108183
|
+
* List direct children of one directory relative to the requested location.
|
|
108184
|
+
*/
|
|
108185
|
+
list(parameters, options) {
|
|
107676
108186
|
const params = buildClientParams([parameters], [
|
|
107677
108187
|
{
|
|
107678
108188
|
args: [
|
|
107679
108189
|
{ in: "query", key: "location" },
|
|
107680
|
-
{ in: "query", key: "path" }
|
|
107681
|
-
{ in: "query", key: "reference" }
|
|
108190
|
+
{ in: "query", key: "path" }
|
|
107682
108191
|
]
|
|
107683
108192
|
}
|
|
107684
108193
|
]);
|
|
107685
108194
|
return (options?.client ?? this.client).get({
|
|
107686
|
-
url: "/api/fs/
|
|
108195
|
+
url: "/api/fs/list",
|
|
107687
108196
|
...options,
|
|
107688
108197
|
...params
|
|
107689
108198
|
});
|
|
107690
108199
|
}
|
|
107691
108200
|
/**
|
|
107692
|
-
*
|
|
108201
|
+
* Find files
|
|
107693
108202
|
*
|
|
107694
|
-
*
|
|
108203
|
+
* Find recursively ranked filesystem entries relative to the requested location.
|
|
107695
108204
|
*/
|
|
107696
|
-
|
|
108205
|
+
find(parameters, options) {
|
|
107697
108206
|
const params = buildClientParams([parameters], [
|
|
107698
108207
|
{
|
|
107699
108208
|
args: [
|
|
107700
108209
|
{ in: "query", key: "location" },
|
|
107701
|
-
{ in: "query", key: "
|
|
107702
|
-
{ in: "query", key: "
|
|
108210
|
+
{ in: "query", key: "query" },
|
|
108211
|
+
{ in: "query", key: "type" },
|
|
108212
|
+
{ in: "query", key: "limit" }
|
|
107703
108213
|
]
|
|
107704
108214
|
}
|
|
107705
108215
|
]);
|
|
107706
108216
|
return (options?.client ?? this.client).get({
|
|
107707
|
-
url: "/api/fs/
|
|
108217
|
+
url: "/api/fs/find",
|
|
107708
108218
|
...options,
|
|
107709
108219
|
...params
|
|
107710
108220
|
});
|
|
@@ -107712,9 +108222,9 @@ var Fs = class extends HeyApiClient {
|
|
|
107712
108222
|
};
|
|
107713
108223
|
var Command2 = class extends HeyApiClient {
|
|
107714
108224
|
/**
|
|
107715
|
-
* List
|
|
108225
|
+
* List commands
|
|
107716
108226
|
*
|
|
107717
|
-
* Retrieve currently registered
|
|
108227
|
+
* Retrieve currently registered commands.
|
|
107718
108228
|
*/
|
|
107719
108229
|
list(parameters, options) {
|
|
107720
108230
|
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
@@ -107727,9 +108237,9 @@ var Command2 = class extends HeyApiClient {
|
|
|
107727
108237
|
};
|
|
107728
108238
|
var Skill = class extends HeyApiClient {
|
|
107729
108239
|
/**
|
|
107730
|
-
* List
|
|
108240
|
+
* List skills
|
|
107731
108241
|
*
|
|
107732
|
-
* Retrieve currently registered
|
|
108242
|
+
* Retrieve currently registered skills.
|
|
107733
108243
|
*/
|
|
107734
108244
|
list(parameters, options) {
|
|
107735
108245
|
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
@@ -107742,14 +108252,166 @@ var Skill = class extends HeyApiClient {
|
|
|
107742
108252
|
};
|
|
107743
108253
|
var Event22 = class extends HeyApiClient {
|
|
107744
108254
|
/**
|
|
107745
|
-
* Subscribe to
|
|
108255
|
+
* Subscribe to events
|
|
107746
108256
|
*
|
|
107747
|
-
* Subscribe to native
|
|
108257
|
+
* Subscribe to native event payloads for the server.
|
|
107748
108258
|
*/
|
|
107749
|
-
subscribe(
|
|
107750
|
-
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
108259
|
+
subscribe(options) {
|
|
107751
108260
|
return (options?.client ?? this.client).sse.get({
|
|
107752
108261
|
url: "/api/event",
|
|
108262
|
+
...options
|
|
108263
|
+
});
|
|
108264
|
+
}
|
|
108265
|
+
};
|
|
108266
|
+
var Pty2 = class extends HeyApiClient {
|
|
108267
|
+
/**
|
|
108268
|
+
* List PTY sessions
|
|
108269
|
+
*
|
|
108270
|
+
* List PTY sessions for a location, including exited sessions retained until removal.
|
|
108271
|
+
*/
|
|
108272
|
+
list(parameters, options) {
|
|
108273
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
108274
|
+
return (options?.client ?? this.client).get({
|
|
108275
|
+
url: "/api/pty",
|
|
108276
|
+
...options,
|
|
108277
|
+
...params
|
|
108278
|
+
});
|
|
108279
|
+
}
|
|
108280
|
+
/**
|
|
108281
|
+
* Create PTY session
|
|
108282
|
+
*
|
|
108283
|
+
* Create a pseudo-terminal session for a location.
|
|
108284
|
+
*/
|
|
108285
|
+
create(parameters, options) {
|
|
108286
|
+
const params = buildClientParams([parameters], [
|
|
108287
|
+
{
|
|
108288
|
+
args: [
|
|
108289
|
+
{ in: "query", key: "location" },
|
|
108290
|
+
{ in: "body", key: "command" },
|
|
108291
|
+
{ in: "body", key: "args" },
|
|
108292
|
+
{ in: "body", key: "cwd" },
|
|
108293
|
+
{ in: "body", key: "title" },
|
|
108294
|
+
{ in: "body", key: "env" }
|
|
108295
|
+
]
|
|
108296
|
+
}
|
|
108297
|
+
]);
|
|
108298
|
+
return (options?.client ?? this.client).post({
|
|
108299
|
+
url: "/api/pty",
|
|
108300
|
+
...options,
|
|
108301
|
+
...params,
|
|
108302
|
+
headers: {
|
|
108303
|
+
"Content-Type": "application/json",
|
|
108304
|
+
...options?.headers,
|
|
108305
|
+
...params.headers
|
|
108306
|
+
}
|
|
108307
|
+
});
|
|
108308
|
+
}
|
|
108309
|
+
/**
|
|
108310
|
+
* Remove PTY session
|
|
108311
|
+
*
|
|
108312
|
+
* Terminate and remove one PTY session.
|
|
108313
|
+
*/
|
|
108314
|
+
remove(parameters, options) {
|
|
108315
|
+
const params = buildClientParams([parameters], [
|
|
108316
|
+
{
|
|
108317
|
+
args: [
|
|
108318
|
+
{ in: "path", key: "ptyID" },
|
|
108319
|
+
{ in: "query", key: "location" }
|
|
108320
|
+
]
|
|
108321
|
+
}
|
|
108322
|
+
]);
|
|
108323
|
+
return (options?.client ?? this.client).delete({
|
|
108324
|
+
url: "/api/pty/{ptyID}",
|
|
108325
|
+
...options,
|
|
108326
|
+
...params
|
|
108327
|
+
});
|
|
108328
|
+
}
|
|
108329
|
+
/**
|
|
108330
|
+
* Get PTY session
|
|
108331
|
+
*
|
|
108332
|
+
* Get one PTY session, including its exit code once exited.
|
|
108333
|
+
*/
|
|
108334
|
+
get(parameters, options) {
|
|
108335
|
+
const params = buildClientParams([parameters], [
|
|
108336
|
+
{
|
|
108337
|
+
args: [
|
|
108338
|
+
{ in: "path", key: "ptyID" },
|
|
108339
|
+
{ in: "query", key: "location" }
|
|
108340
|
+
]
|
|
108341
|
+
}
|
|
108342
|
+
]);
|
|
108343
|
+
return (options?.client ?? this.client).get({
|
|
108344
|
+
url: "/api/pty/{ptyID}",
|
|
108345
|
+
...options,
|
|
108346
|
+
...params
|
|
108347
|
+
});
|
|
108348
|
+
}
|
|
108349
|
+
/**
|
|
108350
|
+
* Update PTY session
|
|
108351
|
+
*
|
|
108352
|
+
* Update the title or viewport size of one PTY session.
|
|
108353
|
+
*/
|
|
108354
|
+
update(parameters, options) {
|
|
108355
|
+
const params = buildClientParams([parameters], [
|
|
108356
|
+
{
|
|
108357
|
+
args: [
|
|
108358
|
+
{ in: "path", key: "ptyID" },
|
|
108359
|
+
{ in: "query", key: "location" },
|
|
108360
|
+
{ in: "body", key: "title" },
|
|
108361
|
+
{ in: "body", key: "size" }
|
|
108362
|
+
]
|
|
108363
|
+
}
|
|
108364
|
+
]);
|
|
108365
|
+
return (options?.client ?? this.client).put({
|
|
108366
|
+
url: "/api/pty/{ptyID}",
|
|
108367
|
+
...options,
|
|
108368
|
+
...params,
|
|
108369
|
+
headers: {
|
|
108370
|
+
"Content-Type": "application/json",
|
|
108371
|
+
...options?.headers,
|
|
108372
|
+
...params.headers
|
|
108373
|
+
}
|
|
108374
|
+
});
|
|
108375
|
+
}
|
|
108376
|
+
/**
|
|
108377
|
+
* Create PTY WebSocket token
|
|
108378
|
+
*
|
|
108379
|
+
* Create a short-lived single-use ticket for opening a PTY WebSocket connection.
|
|
108380
|
+
*/
|
|
108381
|
+
connectToken(parameters, options) {
|
|
108382
|
+
const params = buildClientParams([parameters], [
|
|
108383
|
+
{
|
|
108384
|
+
args: [
|
|
108385
|
+
{ in: "path", key: "ptyID" },
|
|
108386
|
+
{ in: "query", key: "location" }
|
|
108387
|
+
]
|
|
108388
|
+
}
|
|
108389
|
+
]);
|
|
108390
|
+
return (options?.client ?? this.client).post({
|
|
108391
|
+
url: "/api/pty/{ptyID}/connect-token",
|
|
108392
|
+
...options,
|
|
108393
|
+
...params
|
|
108394
|
+
});
|
|
108395
|
+
}
|
|
108396
|
+
/**
|
|
108397
|
+
* Connect to PTY session
|
|
108398
|
+
*
|
|
108399
|
+
* Establish a WebSocket connection streaming PTY output and accepting terminal input.
|
|
108400
|
+
*/
|
|
108401
|
+
connect(parameters, options) {
|
|
108402
|
+
const params = buildClientParams([parameters], [
|
|
108403
|
+
{
|
|
108404
|
+
args: [
|
|
108405
|
+
{ in: "path", key: "ptyID" },
|
|
108406
|
+
{ in: "query", key: "location[directory]" },
|
|
108407
|
+
{ in: "query", key: "location[workspace]" },
|
|
108408
|
+
{ in: "query", key: "cursor" },
|
|
108409
|
+
{ in: "query", key: "ticket" }
|
|
108410
|
+
]
|
|
108411
|
+
}
|
|
108412
|
+
]);
|
|
108413
|
+
return (options?.client ?? this.client).get({
|
|
108414
|
+
url: "/api/pty/{ptyID}/connect",
|
|
107753
108415
|
...options,
|
|
107754
108416
|
...params
|
|
107755
108417
|
});
|
|
@@ -107776,11 +108438,92 @@ var Question3 = class extends HeyApiClient {
|
|
|
107776
108438
|
return this._request ??= new Request22({ client: this.client });
|
|
107777
108439
|
}
|
|
107778
108440
|
};
|
|
108441
|
+
var Reference = class extends HeyApiClient {
|
|
108442
|
+
/**
|
|
108443
|
+
* List references
|
|
108444
|
+
*
|
|
108445
|
+
* List references available in the requested location.
|
|
108446
|
+
*/
|
|
108447
|
+
list(parameters, options) {
|
|
108448
|
+
const params = buildClientParams([parameters], [{ args: [{ in: "query", key: "location" }] }]);
|
|
108449
|
+
return (options?.client ?? this.client).get({
|
|
108450
|
+
url: "/api/reference",
|
|
108451
|
+
...options,
|
|
108452
|
+
...params
|
|
108453
|
+
});
|
|
108454
|
+
}
|
|
108455
|
+
};
|
|
108456
|
+
var ProjectCopy2 = class extends HeyApiClient {
|
|
108457
|
+
remove(parameters, options) {
|
|
108458
|
+
const params = buildClientParams([parameters], [
|
|
108459
|
+
{
|
|
108460
|
+
args: [
|
|
108461
|
+
{ in: "path", key: "projectID" },
|
|
108462
|
+
{ in: "query", key: "location" },
|
|
108463
|
+
{ in: "body", key: "directory" },
|
|
108464
|
+
{ in: "body", key: "force" }
|
|
108465
|
+
]
|
|
108466
|
+
}
|
|
108467
|
+
]);
|
|
108468
|
+
return (options?.client ?? this.client).delete({
|
|
108469
|
+
url: "/experimental/project/{projectID}/copy",
|
|
108470
|
+
...options,
|
|
108471
|
+
...params,
|
|
108472
|
+
headers: {
|
|
108473
|
+
"Content-Type": "application/json",
|
|
108474
|
+
...options?.headers,
|
|
108475
|
+
...params.headers
|
|
108476
|
+
}
|
|
108477
|
+
});
|
|
108478
|
+
}
|
|
108479
|
+
create(parameters, options) {
|
|
108480
|
+
const params = buildClientParams([parameters], [
|
|
108481
|
+
{
|
|
108482
|
+
args: [
|
|
108483
|
+
{ in: "path", key: "projectID" },
|
|
108484
|
+
{ in: "query", key: "location" },
|
|
108485
|
+
{ in: "body", key: "strategy" },
|
|
108486
|
+
{ in: "body", key: "directory" },
|
|
108487
|
+
{ in: "body", key: "name" }
|
|
108488
|
+
]
|
|
108489
|
+
}
|
|
108490
|
+
]);
|
|
108491
|
+
return (options?.client ?? this.client).post({
|
|
108492
|
+
url: "/experimental/project/{projectID}/copy",
|
|
108493
|
+
...options,
|
|
108494
|
+
...params,
|
|
108495
|
+
headers: {
|
|
108496
|
+
"Content-Type": "application/json",
|
|
108497
|
+
...options?.headers,
|
|
108498
|
+
...params.headers
|
|
108499
|
+
}
|
|
108500
|
+
});
|
|
108501
|
+
}
|
|
108502
|
+
refresh(parameters, options) {
|
|
108503
|
+
const params = buildClientParams([parameters], [
|
|
108504
|
+
{
|
|
108505
|
+
args: [
|
|
108506
|
+
{ in: "path", key: "projectID" },
|
|
108507
|
+
{ in: "query", key: "location" }
|
|
108508
|
+
]
|
|
108509
|
+
}
|
|
108510
|
+
]);
|
|
108511
|
+
return (options?.client ?? this.client).post({
|
|
108512
|
+
url: "/experimental/project/{projectID}/copy/refresh",
|
|
108513
|
+
...options,
|
|
108514
|
+
...params
|
|
108515
|
+
});
|
|
108516
|
+
}
|
|
108517
|
+
};
|
|
107779
108518
|
var V2 = class extends HeyApiClient {
|
|
107780
108519
|
_health;
|
|
107781
108520
|
get health() {
|
|
107782
108521
|
return this._health ??= new Health({ client: this.client });
|
|
107783
108522
|
}
|
|
108523
|
+
_location;
|
|
108524
|
+
get location() {
|
|
108525
|
+
return this._location ??= new Location({ client: this.client });
|
|
108526
|
+
}
|
|
107784
108527
|
_agent;
|
|
107785
108528
|
get agent() {
|
|
107786
108529
|
return this._agent ??= new Agent({ client: this.client });
|
|
@@ -107797,6 +108540,14 @@ var V2 = class extends HeyApiClient {
|
|
|
107797
108540
|
get provider() {
|
|
107798
108541
|
return this._provider ??= new Provider2({ client: this.client });
|
|
107799
108542
|
}
|
|
108543
|
+
_integration;
|
|
108544
|
+
get integration() {
|
|
108545
|
+
return this._integration ??= new Integration({ client: this.client });
|
|
108546
|
+
}
|
|
108547
|
+
_credential;
|
|
108548
|
+
get credential() {
|
|
108549
|
+
return this._credential ??= new Credential({ client: this.client });
|
|
108550
|
+
}
|
|
107800
108551
|
_permission;
|
|
107801
108552
|
get permission() {
|
|
107802
108553
|
return this._permission ??= new Permission3({ client: this.client });
|
|
@@ -107817,10 +108568,22 @@ var V2 = class extends HeyApiClient {
|
|
|
107817
108568
|
get event() {
|
|
107818
108569
|
return this._event ??= new Event22({ client: this.client });
|
|
107819
108570
|
}
|
|
108571
|
+
_pty;
|
|
108572
|
+
get pty() {
|
|
108573
|
+
return this._pty ??= new Pty2({ client: this.client });
|
|
108574
|
+
}
|
|
107820
108575
|
_question;
|
|
107821
108576
|
get question() {
|
|
107822
108577
|
return this._question ??= new Question3({ client: this.client });
|
|
107823
108578
|
}
|
|
108579
|
+
_reference;
|
|
108580
|
+
get reference() {
|
|
108581
|
+
return this._reference ??= new Reference({ client: this.client });
|
|
108582
|
+
}
|
|
108583
|
+
_projectCopy;
|
|
108584
|
+
get projectCopy() {
|
|
108585
|
+
return this._projectCopy ??= new ProjectCopy2({ client: this.client });
|
|
108586
|
+
}
|
|
107824
108587
|
};
|
|
107825
108588
|
var OpencodeClient = class _OpencodeClient extends HeyApiClient {
|
|
107826
108589
|
static __registry = new HeyApiRegistry();
|
|
@@ -107938,7 +108701,7 @@ var OpencodeClient = class _OpencodeClient extends HeyApiClient {
|
|
|
107938
108701
|
}
|
|
107939
108702
|
};
|
|
107940
108703
|
|
|
107941
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
108704
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/error-interceptor.js
|
|
107942
108705
|
function wrapClientError(error49, response, request2, opts) {
|
|
107943
108706
|
if (!opts?.throwOnError)
|
|
107944
108707
|
return error49;
|
|
@@ -107965,7 +108728,7 @@ function describe(request2, response) {
|
|
|
107965
108728
|
return `${method} ${url4}${status ? " \u2192 " + status : ""}${statusText ? " " + statusText : ""}`;
|
|
107966
108729
|
}
|
|
107967
108730
|
|
|
107968
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
108731
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/client.js
|
|
107969
108732
|
function pick(value2, fallback, encode4) {
|
|
107970
108733
|
if (!value2)
|
|
107971
108734
|
return;
|
|
@@ -108041,7 +108804,7 @@ function createOpencodeClient(config3) {
|
|
|
108041
108804
|
return new OpencodeClient({ client: client2 });
|
|
108042
108805
|
}
|
|
108043
108806
|
|
|
108044
|
-
// node_modules/.pnpm/@opencode-ai+sdk@1.
|
|
108807
|
+
// node_modules/.pnpm/@opencode-ai+sdk@1.18.5/node_modules/@opencode-ai/sdk/dist/v2/server.js
|
|
108045
108808
|
var import_cross_spawn = __toESM(require_cross_spawn(), 1);
|
|
108046
108809
|
|
|
108047
108810
|
// agents/opencode_v2.ts
|
|
@@ -108294,25 +109057,30 @@ export default async function pullfrogSubagentGatePlugin() {
|
|
|
108294
109057
|
}
|
|
108295
109058
|
|
|
108296
109059
|
// utils/openCodeModels.ts
|
|
108297
|
-
import {
|
|
109060
|
+
import { spawnSync as spawnSync3 } from "node:child_process";
|
|
108298
109061
|
var baseline;
|
|
108299
109062
|
var authorized;
|
|
109063
|
+
var failure;
|
|
109064
|
+
var ANSI_PATTERN = /\[[0-9;]*m/g;
|
|
108300
109065
|
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
|
-
);
|
|
109066
|
+
const result = spawnSync3(cliPath, ["models"], {
|
|
109067
|
+
encoding: "utf-8",
|
|
109068
|
+
timeout: 3e4,
|
|
109069
|
+
env: process.env,
|
|
109070
|
+
stdio: ["ignore", "pipe", "pipe"]
|
|
109071
|
+
});
|
|
109072
|
+
if (result.status !== 0) {
|
|
109073
|
+
failure = (result.stderr ?? "").replace(ANSI_PATTERN, "").trim() || void 0;
|
|
109074
|
+
log.debug(`\xBB \`opencode models\` failed (${result.status}): ${failure ?? result.error}`);
|
|
108314
109075
|
return /* @__PURE__ */ new Set();
|
|
108315
109076
|
}
|
|
109077
|
+
failure = void 0;
|
|
109078
|
+
return new Set(
|
|
109079
|
+
result.stdout.split("\n").map((line) => line.trim()).filter(Boolean)
|
|
109080
|
+
);
|
|
109081
|
+
}
|
|
109082
|
+
function getModelsFailure() {
|
|
109083
|
+
return failure;
|
|
108316
109084
|
}
|
|
108317
109085
|
function captureBaselineModels(cliPath) {
|
|
108318
109086
|
baseline = readModels(cliPath);
|
|
@@ -108471,17 +109239,21 @@ function parseModel2(value2) {
|
|
|
108471
109239
|
return { providerID: value2.slice(0, slash), modelID: value2.slice(slash + 1) };
|
|
108472
109240
|
}
|
|
108473
109241
|
function bootOpencodeServer(params) {
|
|
108474
|
-
const proc = nodeSpawn2(
|
|
108475
|
-
|
|
108476
|
-
|
|
108477
|
-
|
|
108478
|
-
|
|
108479
|
-
|
|
108480
|
-
|
|
108481
|
-
|
|
108482
|
-
|
|
108483
|
-
|
|
108484
|
-
|
|
109242
|
+
const proc = nodeSpawn2(
|
|
109243
|
+
params.cliPath,
|
|
109244
|
+
["serve", "--port", "0", "--hostname", "127.0.0.1", "--print-logs", "--log-level", "ERROR"],
|
|
109245
|
+
{
|
|
109246
|
+
cwd: params.cwd,
|
|
109247
|
+
env: params.env,
|
|
109248
|
+
stdio: ["ignore", "pipe", "pipe"],
|
|
109249
|
+
// detached + killGroup so SIGKILL nukes the whole tree: node_modules/
|
|
109250
|
+
// opencode-ai/bin/opencode is a Node shim that spawnSync's the native
|
|
109251
|
+
// binary; without process-group kill the native binary is reparented
|
|
109252
|
+
// to PID 1 and never dies. mirrors the same fix in runOpenCode's
|
|
109253
|
+
// original spawn().
|
|
109254
|
+
detached: true
|
|
109255
|
+
}
|
|
109256
|
+
);
|
|
108485
109257
|
trackChild({ child: proc, killGroup: true });
|
|
108486
109258
|
const recentStderr = [];
|
|
108487
109259
|
proc.stderr?.on("data", (chunk) => {
|
|
@@ -108574,6 +109346,12 @@ ${tail}` : ""}`
|
|
|
108574
109346
|
bootTimeout.unref?.();
|
|
108575
109347
|
});
|
|
108576
109348
|
}
|
|
109349
|
+
function withServerStderr(message, recentStderr) {
|
|
109350
|
+
const tail = recentStderr.join("\n").trim();
|
|
109351
|
+
return tail ? `${message}
|
|
109352
|
+
opencode server stderr:
|
|
109353
|
+
${tail}` : message;
|
|
109354
|
+
}
|
|
108577
109355
|
function newTurn() {
|
|
108578
109356
|
return {
|
|
108579
109357
|
finalText: "",
|
|
@@ -108890,6 +109668,8 @@ function formatPromptError(error49) {
|
|
|
108890
109668
|
const obj = error49;
|
|
108891
109669
|
if (obj.message) return obj.message;
|
|
108892
109670
|
if (obj.error?.message) return obj.error.message;
|
|
109671
|
+
const config3 = formatConfigError(obj.name, obj.data);
|
|
109672
|
+
if (config3) return config3;
|
|
108893
109673
|
try {
|
|
108894
109674
|
return JSON.stringify(error49);
|
|
108895
109675
|
} catch {
|
|
@@ -108898,6 +109678,17 @@ function formatPromptError(error49) {
|
|
|
108898
109678
|
}
|
|
108899
109679
|
return String(error49);
|
|
108900
109680
|
}
|
|
109681
|
+
function formatConfigError(name, data) {
|
|
109682
|
+
if (!name?.startsWith("Config") || !data || typeof data !== "object") return void 0;
|
|
109683
|
+
const at = "path" in data && typeof data.path === "string" ? ` at ${data.path}` : "";
|
|
109684
|
+
const detail = "message" in data && typeof data.message === "string" ? `${at}: ${data.message}` : at;
|
|
109685
|
+
const issues = "issues" in data && Array.isArray(data.issues) ? data.issues : [];
|
|
109686
|
+
const bullets = issues.map(
|
|
109687
|
+
(issue3) => issue3 && typeof issue3 === "object" && "message" in issue3 && typeof issue3.message === "string" ? `
|
|
109688
|
+
\u21B3 ${issue3.message}` : ""
|
|
109689
|
+
).join("");
|
|
109690
|
+
return `${name}${detail}${bullets}`;
|
|
109691
|
+
}
|
|
108901
109692
|
function startInnerActivityWatchdog(params) {
|
|
108902
109693
|
let fired = false;
|
|
108903
109694
|
const id = setInterval(() => {
|
|
@@ -108965,6 +109756,8 @@ var opencode = agent({
|
|
|
108965
109756
|
OPENCODE_PERMISSION: permissionOverride,
|
|
108966
109757
|
GOOGLE_GENERATIVE_AI_API_KEY: process.env.GOOGLE_GENERATIVE_AI_API_KEY || process.env.GEMINI_API_KEY
|
|
108967
109758
|
};
|
|
109759
|
+
delete env2.OPENCODE_EXPERIMENTAL;
|
|
109760
|
+
delete env2.OPENCODE_EXPERIMENTAL_CODE_MODE;
|
|
108968
109761
|
if (codexAuth) {
|
|
108969
109762
|
env2.XDG_DATA_HOME = codexAuth.xdgDataHome;
|
|
108970
109763
|
delete env2.OPENAI_API_KEY;
|
|
@@ -109004,7 +109797,7 @@ var opencode = agent({
|
|
|
109004
109797
|
return {
|
|
109005
109798
|
success: false,
|
|
109006
109799
|
output: "",
|
|
109007
|
-
error: `opencode session.create failed: ${msg}
|
|
109800
|
+
error: withServerStderr(`opencode session.create failed: ${msg}`, server.recentStderr)
|
|
109008
109801
|
};
|
|
109009
109802
|
}
|
|
109010
109803
|
const sessionID = sessionResp.data.id;
|
|
@@ -140245,7 +141038,7 @@ var import_undici2 = __toESM(require_undici2(), 1);
|
|
|
140245
141038
|
var import_uri_templates = __toESM(require_uri_templates(), 1);
|
|
140246
141039
|
import { setTimeout as delay } from "timers/promises";
|
|
140247
141040
|
|
|
140248
|
-
// node_modules/.pnpm/xsschema@0.4.3_arktype@2.2.0_zod-to-json-schema@3.25.1_zod@4.3.
|
|
141041
|
+
// 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
|
|
140249
141042
|
init_index_DoHiaFQM();
|
|
140250
141043
|
|
|
140251
141044
|
// node_modules/.pnpm/fastmcp@3.34.0_arktype@2.2.0/node_modules/fastmcp/dist/chunk-DMSZ2FEE.js
|
|
@@ -142116,7 +142909,7 @@ import { promisify } from "util";
|
|
|
142116
142909
|
var pbkdf2Async = promisify(pbkdf2);
|
|
142117
142910
|
|
|
142118
142911
|
// utils/browser.ts
|
|
142119
|
-
import { execFileSync as
|
|
142912
|
+
import { execFileSync as execFileSync4, spawnSync as spawnSync4 } from "node:child_process";
|
|
142120
142913
|
import { existsSync as existsSync4 } from "node:fs";
|
|
142121
142914
|
import { dirname as dirname2 } from "node:path";
|
|
142122
142915
|
|
|
@@ -142246,7 +143039,7 @@ function ensureBrowserDaemon(toolState) {
|
|
|
142246
143039
|
}
|
|
142247
143040
|
const agentBrowserVersion = getDevDependencyVersion("agent-browser");
|
|
142248
143041
|
log.info(`installing agent-browser@${agentBrowserVersion}...`);
|
|
142249
|
-
const install =
|
|
143042
|
+
const install = spawnSync4("npm", ["install", "-g", `agent-browser@${agentBrowserVersion}`], {
|
|
142250
143043
|
stdio: "pipe",
|
|
142251
143044
|
encoding: "utf-8"
|
|
142252
143045
|
});
|
|
@@ -142259,7 +143052,7 @@ function ensureBrowserDaemon(toolState) {
|
|
|
142259
143052
|
log.info("agent-browser installed");
|
|
142260
143053
|
let binDir;
|
|
142261
143054
|
try {
|
|
142262
|
-
const binPath =
|
|
143055
|
+
const binPath = execFileSync4("which", ["agent-browser"], { encoding: "utf-8" }).trim();
|
|
142263
143056
|
binDir = dirname2(binPath);
|
|
142264
143057
|
log.info(`agent-browser binary: ${binPath}`);
|
|
142265
143058
|
} catch {
|
|
@@ -142270,7 +143063,7 @@ function ensureBrowserDaemon(toolState) {
|
|
|
142270
143063
|
}
|
|
142271
143064
|
const env2 = buildEnv();
|
|
142272
143065
|
log.info("starting browser daemon...");
|
|
142273
|
-
const seed =
|
|
143066
|
+
const seed = spawnSync4("agent-browser", ["open", "about:blank"], {
|
|
142274
143067
|
env: env2,
|
|
142275
143068
|
stdio: "pipe",
|
|
142276
143069
|
encoding: "utf-8",
|
|
@@ -142295,7 +143088,7 @@ function closeBrowserDaemon(toolState) {
|
|
|
142295
143088
|
delete toolState.browserDaemon;
|
|
142296
143089
|
try {
|
|
142297
143090
|
log.info("closing browser daemon...");
|
|
142298
|
-
|
|
143091
|
+
spawnSync4("agent-browser", ["close"], {
|
|
142299
143092
|
env: filterEnv(),
|
|
142300
143093
|
stdio: "pipe",
|
|
142301
143094
|
timeout: 1e4
|
|
@@ -150385,11 +151178,11 @@ import { readFileSync as readFileSync2, realpathSync, unlinkSync } from "node:fs
|
|
|
150385
151178
|
import { join as join8 } from "node:path";
|
|
150386
151179
|
|
|
150387
151180
|
// utils/shell.ts
|
|
150388
|
-
import { spawnSync as
|
|
151181
|
+
import { spawnSync as spawnSync5 } from "node:child_process";
|
|
150389
151182
|
function $(cmd, args2, options) {
|
|
150390
151183
|
const encoding = options?.encoding ?? "utf-8";
|
|
150391
151184
|
const env2 = resolveEnv(options?.env);
|
|
150392
|
-
const result =
|
|
151185
|
+
const result = spawnSync5(cmd, args2, {
|
|
150393
151186
|
stdio: ["ignore", "pipe", "pipe"],
|
|
150394
151187
|
encoding,
|
|
150395
151188
|
cwd: options?.cwd,
|
|
@@ -150558,19 +151351,19 @@ async function $gitFetchWithDeepen(args2, options, label) {
|
|
|
150558
151351
|
}
|
|
150559
151352
|
|
|
150560
151353
|
// utils/lifecycle.ts
|
|
150561
|
-
function describeSetupFailure(
|
|
150562
|
-
if (!
|
|
150563
|
-
switch (
|
|
151354
|
+
function describeSetupFailure(failure2) {
|
|
151355
|
+
if (!failure2) return "";
|
|
151356
|
+
switch (failure2.kind) {
|
|
150564
151357
|
case "exit":
|
|
150565
|
-
return `It exited with code ${
|
|
151358
|
+
return `It exited with code ${failure2.exitCode}. Output:
|
|
150566
151359
|
|
|
150567
|
-
${
|
|
151360
|
+
${failure2.output || "(empty)"}`;
|
|
150568
151361
|
case "timeout":
|
|
150569
151362
|
return "It timed out and was killed before completing.";
|
|
150570
151363
|
case "spawn":
|
|
150571
|
-
return `It failed to start: ${
|
|
151364
|
+
return `It failed to start: ${failure2.spawnError}`;
|
|
150572
151365
|
default: {
|
|
150573
|
-
const _exhaustive =
|
|
151366
|
+
const _exhaustive = failure2;
|
|
150574
151367
|
return _exhaustive;
|
|
150575
151368
|
}
|
|
150576
151369
|
}
|
|
@@ -151612,7 +152405,7 @@ import { writeFileSync as writeFileSync7 } from "node:fs";
|
|
|
151612
152405
|
import { join as join11 } from "node:path";
|
|
151613
152406
|
|
|
151614
152407
|
// utils/apiCommit.ts
|
|
151615
|
-
import { execFileSync as
|
|
152408
|
+
import { execFileSync as execFileSync5 } from "node:child_process";
|
|
151616
152409
|
import { lstat, readlink } from "node:fs/promises";
|
|
151617
152410
|
import { join as join9 } from "node:path";
|
|
151618
152411
|
var GITHUB_API = "https://api.github.com";
|
|
@@ -151715,7 +152508,7 @@ async function createBlobEntry(params) {
|
|
|
151715
152508
|
} else {
|
|
151716
152509
|
mode = stat.mode & 64 ? "100755" : "100644";
|
|
151717
152510
|
const cleanSha = $("git", ["hash-object", "-w", "--", absPath], { log: false }).trim();
|
|
151718
|
-
content =
|
|
152511
|
+
content = execFileSync5("git", ["cat-file", "blob", cleanSha], {
|
|
151719
152512
|
cwd: params.repoRoot,
|
|
151720
152513
|
maxBuffer: 2 * MAX_BLOB_BYTES
|
|
151721
152514
|
});
|
|
@@ -156746,11 +157539,11 @@ ${integrateStep}
|
|
|
156746
157539
|
});
|
|
156747
157540
|
}
|
|
156748
157541
|
function buildPrepushFailureMessage(params) {
|
|
156749
|
-
const
|
|
156750
|
-
const header =
|
|
157542
|
+
const failure2 = params.failure;
|
|
157543
|
+
const header = failure2.kind === "exit" ? `prepush hook failed with exit code ${failure2.exitCode}.
|
|
156751
157544
|
|
|
156752
157545
|
script output:
|
|
156753
|
-
${
|
|
157546
|
+
${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}.`;
|
|
156754
157547
|
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).`;
|
|
156755
157548
|
return `${header}
|
|
156756
157549
|
|
|
@@ -157334,7 +158127,7 @@ async function patchWorkflowRunFields(ctx, fields) {
|
|
|
157334
158127
|
}
|
|
157335
158128
|
)();
|
|
157336
158129
|
} catch (error49) {
|
|
157337
|
-
log.warning(`patchWorkflowRunFields
|
|
158130
|
+
log.warning(`patchWorkflowRunFields failed: ${error49}`);
|
|
157338
158131
|
}
|
|
157339
158132
|
}
|
|
157340
158133
|
var INT4_MAX = 2147483647;
|
|
@@ -157397,6 +158190,7 @@ function validateCompatibility(payloadVersion, actionVersion) {
|
|
|
157397
158190
|
var ShellPermissionInput = type.enumerated("disabled", "restricted", "enabled");
|
|
157398
158191
|
var PushPermissionInput = type.enumerated("disabled", "restricted", "enabled");
|
|
157399
158192
|
var StatusChecksInput = type.enumerated("disabled", "enabled");
|
|
158193
|
+
var ProgressCommentsInput = type.enumerated("disabled", "enabled");
|
|
157400
158194
|
var JsonPayload = type({
|
|
157401
158195
|
"~pullfrog": "true",
|
|
157402
158196
|
version: "string",
|
|
@@ -157436,6 +158230,7 @@ var Inputs = type({
|
|
|
157436
158230
|
"push?": PushPermissionInput.or("undefined"),
|
|
157437
158231
|
"shell?": ShellPermissionInput.or("undefined"),
|
|
157438
158232
|
"status_checks?": StatusChecksInput.or("undefined"),
|
|
158233
|
+
"progress_comments?": ProgressCommentsInput.or("undefined"),
|
|
157439
158234
|
"cwd?": type.string.or("undefined"),
|
|
157440
158235
|
"output_schema?": type.string.or("undefined")
|
|
157441
158236
|
});
|
|
@@ -157489,7 +158284,8 @@ function resolveNonPromptInputs() {
|
|
|
157489
158284
|
cwd: core4.getInput("cwd") || void 0,
|
|
157490
158285
|
push: core4.getInput("push") || void 0,
|
|
157491
158286
|
shell: core4.getInput("shell") || void 0,
|
|
157492
|
-
status_checks: core4.getInput("status_checks") || void 0
|
|
158287
|
+
status_checks: core4.getInput("status_checks") || void 0,
|
|
158288
|
+
progress_comments: core4.getInput("progress_comments") || void 0
|
|
157493
158289
|
});
|
|
157494
158290
|
}
|
|
157495
158291
|
var isPullfrog = (actor) => {
|
|
@@ -157539,6 +158335,9 @@ function resolvePayload(resolvedPromptInput, repoSettings) {
|
|
|
157539
158335
|
// opt-in commit-status check-runs (branch protection). workflow-level
|
|
157540
158336
|
// static input, off unless the repo's pullfrog.yml sets status_checks: enabled.
|
|
157541
158337
|
statusChecks: inputs.status_checks === "enabled",
|
|
158338
|
+
// temporary progress chrome. the workflow input is the source of truth when
|
|
158339
|
+
// set (mirrors `push`); otherwise the repo setting decides. defaults to true.
|
|
158340
|
+
progressComments: inputs.progress_comments === void 0 ? repoSettings.progressComments : inputs.progress_comments === "enabled",
|
|
157542
158341
|
// set by proxy logic in main.ts when routing through OpenRouter
|
|
157543
158342
|
proxyModel: void 0
|
|
157544
158343
|
};
|
|
@@ -157692,6 +158491,9 @@ async function reportProgress(ctx, params) {
|
|
|
157692
158491
|
if (ctx.payload.event.silent) {
|
|
157693
158492
|
return { body, action: "skipped" };
|
|
157694
158493
|
}
|
|
158494
|
+
if (params.liveProgress && !ctx.payload.progressComments) {
|
|
158495
|
+
return { body, action: "skipped" };
|
|
158496
|
+
}
|
|
157695
158497
|
const issueNumber = ctx.payload.event.issue_number ?? primaryRepoState(ctx.toolState).issueNumber;
|
|
157696
158498
|
const isPlanMode = ctx.toolState.selectedMode === "Plan";
|
|
157697
158499
|
const apiCtx = { octokit: ctx.octokit, owner: ctx.repo.owner, repo: ctx.repo.name };
|
|
@@ -157845,6 +158647,7 @@ ${collapsible}`;
|
|
|
157845
158647
|
async function deleteProgressComment(ctx) {
|
|
157846
158648
|
const existing = ctx.toolState.progressComment;
|
|
157847
158649
|
if (!existing) {
|
|
158650
|
+
ctx.toolState.progressComment = null;
|
|
157848
158651
|
return false;
|
|
157849
158652
|
}
|
|
157850
158653
|
try {
|
|
@@ -158587,7 +159390,7 @@ async function reportReviewNodeId(ctx, params) {
|
|
|
158587
159390
|
}
|
|
158588
159391
|
|
|
158589
159392
|
// utils/setup.ts
|
|
158590
|
-
import { execFileSync as
|
|
159393
|
+
import { execFileSync as execFileSync6, execSync as execSync2 } from "node:child_process";
|
|
158591
159394
|
import { mkdtempSync, readdirSync, realpathSync as realpathSync2, unlinkSync as unlinkSync2 } from "node:fs";
|
|
158592
159395
|
import { tmpdir as tmpdir2 } from "node:os";
|
|
158593
159396
|
import { join as join12 } from "node:path";
|
|
@@ -158680,7 +159483,7 @@ function removeIncludeIfEntries(repoDir) {
|
|
|
158680
159483
|
if (!key || seen.has(key)) continue;
|
|
158681
159484
|
seen.add(key);
|
|
158682
159485
|
try {
|
|
158683
|
-
|
|
159486
|
+
execFileSync6("git", ["config", "--local", "--unset-all", key], {
|
|
158684
159487
|
cwd: repoDir,
|
|
158685
159488
|
stdio: "pipe",
|
|
158686
159489
|
env: env2
|
|
@@ -161926,7 +162729,7 @@ ${summaryAddendum}`,
|
|
|
161926
162729
|
}
|
|
161927
162730
|
|
|
161928
162731
|
// mcp/shell.ts
|
|
161929
|
-
import { spawn as spawn3, spawnSync as
|
|
162732
|
+
import { spawn as spawn3, spawnSync as spawnSync6 } from "node:child_process";
|
|
161930
162733
|
import { randomUUID as randomUUID4 } from "node:crypto";
|
|
161931
162734
|
import { closeSync, openSync, writeFileSync as writeFileSync12 } from "node:fs";
|
|
161932
162735
|
import { userInfo as userInfo2 } from "node:os";
|
|
@@ -161952,7 +162755,7 @@ function detectSandboxMethod() {
|
|
|
161952
162755
|
return "none";
|
|
161953
162756
|
}
|
|
161954
162757
|
try {
|
|
161955
|
-
const result =
|
|
162758
|
+
const result = spawnSync6("unshare", ["--pid", "--fork", "--mount-proc", "true"], {
|
|
161956
162759
|
timeout: 5e3,
|
|
161957
162760
|
stdio: "ignore"
|
|
161958
162761
|
});
|
|
@@ -161964,7 +162767,7 @@ function detectSandboxMethod() {
|
|
|
161964
162767
|
} catch {
|
|
161965
162768
|
}
|
|
161966
162769
|
try {
|
|
161967
|
-
const result =
|
|
162770
|
+
const result = spawnSync6("sudo", ["unshare", "--pid", "--fork", "--mount-proc", "true"], {
|
|
161968
162771
|
timeout: 5e3,
|
|
161969
162772
|
stdio: "ignore"
|
|
161970
162773
|
});
|
|
@@ -162006,7 +162809,7 @@ function resolveRepoRoot() {
|
|
|
162006
162809
|
return _repoRoot;
|
|
162007
162810
|
}
|
|
162008
162811
|
try {
|
|
162009
|
-
_repoRoot =
|
|
162812
|
+
_repoRoot = spawnSync6("git", ["rev-parse", "--show-toplevel"], {
|
|
162010
162813
|
cwd: process.cwd(),
|
|
162011
162814
|
stdio: ["ignore", "pipe", "ignore"],
|
|
162012
162815
|
encoding: "utf-8"
|
|
@@ -162800,6 +163603,8 @@ function validateAgentApiKey(params) {
|
|
|
162800
163603
|
}
|
|
162801
163604
|
if (params.agent.name === "opencode") {
|
|
162802
163605
|
if (params.authorized.has(params.model)) return;
|
|
163606
|
+
const reason = getModelsFailure();
|
|
163607
|
+
if (reason) throw new Error(reason);
|
|
162803
163608
|
throw new Error(
|
|
162804
163609
|
buildMissingApiKeyError({ owner: params.owner, name: params.name, model: params.model })
|
|
162805
163610
|
);
|
|
@@ -162811,6 +163616,8 @@ function validateAgentApiKey(params) {
|
|
|
162811
163616
|
}
|
|
162812
163617
|
if (params.agent.name === "opencode") {
|
|
162813
163618
|
if (params.authorized.size > 0) return;
|
|
163619
|
+
const reason = getModelsFailure();
|
|
163620
|
+
if (reason) throw new Error(reason);
|
|
162814
163621
|
throw new Error(buildMissingApiKeyError({ owner: params.owner, name: params.name }));
|
|
162815
163622
|
}
|
|
162816
163623
|
if (hasEnvVar3("ANTHROPIC_API_KEY") || hasEnvVar3("CLAUDE_CODE_OAUTH_TOKEN")) return;
|
|
@@ -163713,7 +164520,7 @@ function formatBillingErrorSummary(error49, owner) {
|
|
|
163713
164520
|
return [
|
|
163714
164521
|
"**Your Pullfrog Router balance is exhausted.**",
|
|
163715
164522
|
"",
|
|
163716
|
-
"You have a
|
|
164523
|
+
"You have a payment method on file but auto-reload is disabled, so runs paused once your balance went past the overdraft buffer.",
|
|
163717
164524
|
"",
|
|
163718
164525
|
`[Top up balance \u2192](${billingConsoleUrl(owner, "billing")}) \xB7 [Enable auto-reload \u2192](${billingConsoleUrl(owner, "model-access")})`
|
|
163719
164526
|
].join("\n");
|
|
@@ -164247,7 +165054,9 @@ async function handleAgentResult(ctx) {
|
|
|
164247
165054
|
const toolState = ctx.toolContext.toolState;
|
|
164248
165055
|
const mode = toolState.selectedMode;
|
|
164249
165056
|
const isReviewMode = mode === "Review" || mode === "IncrementalReview";
|
|
164250
|
-
|
|
165057
|
+
const payload = ctx.toolContext.payload;
|
|
165058
|
+
const hasCommentTarget = toolState.hadProgressComment || !payload.progressComments && payload.event.issue_number !== void 0;
|
|
165059
|
+
if (!isReviewMode && !toolState.wasUpdated && hasCommentTarget && !ctx.silent) {
|
|
164251
165060
|
const tracker = toolState.todoTracker;
|
|
164252
165061
|
if (tracker) {
|
|
164253
165062
|
tracker.cancel();
|
|
@@ -164303,6 +165112,7 @@ var defaultSettings = {
|
|
|
164303
165112
|
prApproveEnabled: false,
|
|
164304
165113
|
autoMergeEnabled: false,
|
|
164305
165114
|
signedCommits: false,
|
|
165115
|
+
progressComments: true,
|
|
164306
165116
|
modeInstructions: {},
|
|
164307
165117
|
learnings: null,
|
|
164308
165118
|
learningsHeadings: [],
|
|
@@ -165211,6 +166021,9 @@ async function main() {
|
|
|
165211
166021
|
toolState.model = payload.model;
|
|
165212
166022
|
toolState.oss = runContext.oss;
|
|
165213
166023
|
toolState.shaPinned = isActionPinnedToSha();
|
|
166024
|
+
if (payload.event.issue_number !== void 0) {
|
|
166025
|
+
primaryRepoState(toolState).issueNumber = payload.event.issue_number;
|
|
166026
|
+
}
|
|
165214
166027
|
if (payload.event.trigger === "pull_request_synchronize") {
|
|
165215
166028
|
primaryRepoState(toolState).beforeSha = payload.event.before_sha;
|
|
165216
166029
|
}
|