hanoman 0.9.8 → 0.9.9
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/build-info.json +3 -3
- package/dist/server.js +109 -68
- package/package.json +1 -1
package/dist/build-info.json
CHANGED
package/dist/server.js
CHANGED
|
@@ -16740,8 +16740,10 @@ var init_stage_machine = __esm({
|
|
|
16740
16740
|
});
|
|
16741
16741
|
|
|
16742
16742
|
// src/services/session-phases.ts
|
|
16743
|
+
import { execFile, execFileSync as execFileSync2 } from "node:child_process";
|
|
16743
16744
|
import { readFileSync as readFileSync6, readdirSync as readdirSync5 } from "node:fs";
|
|
16744
16745
|
import { readFile, readdir, stat } from "node:fs/promises";
|
|
16746
|
+
import { promisify } from "node:util";
|
|
16745
16747
|
function parseRecorded(raw) {
|
|
16746
16748
|
const out4 = /* @__PURE__ */ new Map();
|
|
16747
16749
|
for (const line of raw.split("\n")) {
|
|
@@ -16857,6 +16859,15 @@ function planComplete(worktree, specId, planPhaseDone = false) {
|
|
|
16857
16859
|
}
|
|
16858
16860
|
}
|
|
16859
16861
|
}
|
|
16862
|
+
if (!matched && planPhaseDone) {
|
|
16863
|
+
for (const rel of plansOutsidePlanDirs(gitListSync(worktree), re)) {
|
|
16864
|
+
matched = true;
|
|
16865
|
+
try {
|
|
16866
|
+
if (/^[ \t]*- \[ \]/m.test(readFileSync6(`${worktree}/${rel}`, "utf8"))) return false;
|
|
16867
|
+
} catch {
|
|
16868
|
+
}
|
|
16869
|
+
}
|
|
16870
|
+
}
|
|
16860
16871
|
return matched ? true : !planPhaseDone;
|
|
16861
16872
|
}
|
|
16862
16873
|
async function planCompleteAsync(worktree, specId, planPhaseDone = false) {
|
|
@@ -16879,6 +16890,15 @@ async function planCompleteAsync(worktree, specId, planPhaseDone = false) {
|
|
|
16879
16890
|
}
|
|
16880
16891
|
}
|
|
16881
16892
|
}
|
|
16893
|
+
if (!matched && planPhaseDone) {
|
|
16894
|
+
for (const rel of plansOutsidePlanDirs(await gitListAsync(worktree), re)) {
|
|
16895
|
+
matched = true;
|
|
16896
|
+
try {
|
|
16897
|
+
if (/^[ \t]*- \[ \]/m.test(await readFile(`${worktree}/${rel}`, "utf8"))) return false;
|
|
16898
|
+
} catch {
|
|
16899
|
+
}
|
|
16900
|
+
}
|
|
16901
|
+
}
|
|
16882
16902
|
return matched ? true : !planPhaseDone;
|
|
16883
16903
|
}
|
|
16884
16904
|
function sessionComplete(phases2, worktree, specId) {
|
|
@@ -16901,7 +16921,7 @@ async function sessionCompleteAsync(phases2, worktree, specId) {
|
|
|
16901
16921
|
if (!phasesComplete(phases2)) return false;
|
|
16902
16922
|
return specId ? planCompleteAsync(worktree, specId, phases2.find((p3) => p3.name === "Plan")?.state === "done") : true;
|
|
16903
16923
|
}
|
|
16904
|
-
var phaseFilePath, decisionFilePath, phaseFileMemo, derivePhases, readPhases, REACHED, phasesComplete;
|
|
16924
|
+
var phaseFilePath, decisionFilePath, phaseFileMemo, derivePhases, readPhases, REACHED, GIT_LS, gitListSync, execFileP, gitListAsync, plansOutsidePlanDirs, phasesComplete;
|
|
16905
16925
|
var init_session_phases = __esm({
|
|
16906
16926
|
"src/services/session-phases.ts"() {
|
|
16907
16927
|
"use strict";
|
|
@@ -16937,6 +16957,27 @@ var init_session_phases = __esm({
|
|
|
16937
16957
|
// mencapai `done` — tak ada fase verifikasi untuk menutupnya.
|
|
16938
16958
|
Kerjakan: "done"
|
|
16939
16959
|
};
|
|
16960
|
+
GIT_LS = ["ls-files", "-z", "--cached", "--others", "--exclude-standard"];
|
|
16961
|
+
gitListSync = (worktree) => {
|
|
16962
|
+
try {
|
|
16963
|
+
return execFileSync2("git", ["-C", worktree, ...GIT_LS], { encoding: "utf8", timeout: 5e3, stdio: ["ignore", "pipe", "ignore"], maxBuffer: 64 * 1024 * 1024 }).split("\0");
|
|
16964
|
+
} catch {
|
|
16965
|
+
return [];
|
|
16966
|
+
}
|
|
16967
|
+
};
|
|
16968
|
+
execFileP = promisify(execFile);
|
|
16969
|
+
gitListAsync = async (worktree) => {
|
|
16970
|
+
try {
|
|
16971
|
+
return (await execFileP("git", ["-C", worktree, ...GIT_LS], { encoding: "utf8", timeout: 5e3, maxBuffer: 64 * 1024 * 1024 })).stdout.split("\0");
|
|
16972
|
+
} catch {
|
|
16973
|
+
return [];
|
|
16974
|
+
}
|
|
16975
|
+
};
|
|
16976
|
+
plansOutsidePlanDirs = (paths2, re) => paths2.filter((rel) => {
|
|
16977
|
+
if (!rel.endsWith(".md") || !/(^|\/)plans\//.test(rel)) return false;
|
|
16978
|
+
if (PLAN_DIRS.some((d) => rel.startsWith(`${d}/`) && !rel.slice(d.length + 1).includes("/"))) return false;
|
|
16979
|
+
return re.test(rel.slice(rel.lastIndexOf("/") + 1).toLowerCase());
|
|
16980
|
+
});
|
|
16940
16981
|
phasesComplete = (phases2) => phases2.length > 0 && phases2.every((p3) => p3.state === "done" || p3.state === "skipped");
|
|
16941
16982
|
}
|
|
16942
16983
|
});
|
|
@@ -30261,7 +30302,7 @@ var require_mock_interceptor = __commonJS({
|
|
|
30261
30302
|
var require_mock_client = __commonJS({
|
|
30262
30303
|
"../node_modules/.pnpm/undici@7.29.1/node_modules/undici/lib/mock/mock-client.js"(exports, module) {
|
|
30263
30304
|
"use strict";
|
|
30264
|
-
var { promisify:
|
|
30305
|
+
var { promisify: promisify18 } = __require("node:util");
|
|
30265
30306
|
var Client = require_client();
|
|
30266
30307
|
var { buildMockDispatch } = require_mock_utils();
|
|
30267
30308
|
var {
|
|
@@ -30309,7 +30350,7 @@ var require_mock_client = __commonJS({
|
|
|
30309
30350
|
this[kDispatches] = [];
|
|
30310
30351
|
}
|
|
30311
30352
|
async [kClose]() {
|
|
30312
|
-
await
|
|
30353
|
+
await promisify18(this[kOriginalClose])();
|
|
30313
30354
|
this[kConnected] = 0;
|
|
30314
30355
|
this[kMockAgent][Symbols.kClients].delete(this[kOrigin]);
|
|
30315
30356
|
}
|
|
@@ -30522,7 +30563,7 @@ var require_mock_call_history = __commonJS({
|
|
|
30522
30563
|
var require_mock_pool = __commonJS({
|
|
30523
30564
|
"../node_modules/.pnpm/undici@7.29.1/node_modules/undici/lib/mock/mock-pool.js"(exports, module) {
|
|
30524
30565
|
"use strict";
|
|
30525
|
-
var { promisify:
|
|
30566
|
+
var { promisify: promisify18 } = __require("node:util");
|
|
30526
30567
|
var Pool = require_pool();
|
|
30527
30568
|
var { buildMockDispatch } = require_mock_utils();
|
|
30528
30569
|
var {
|
|
@@ -30570,7 +30611,7 @@ var require_mock_pool = __commonJS({
|
|
|
30570
30611
|
this[kDispatches] = [];
|
|
30571
30612
|
}
|
|
30572
30613
|
async [kClose]() {
|
|
30573
|
-
await
|
|
30614
|
+
await promisify18(this[kOriginalClose])();
|
|
30574
30615
|
this[kConnected] = 0;
|
|
30575
30616
|
this[kMockAgent][Symbols.kClients].delete(this[kOrigin]);
|
|
30576
30617
|
}
|
|
@@ -43707,7 +43748,7 @@ var init_session_event_spool = __esm({
|
|
|
43707
43748
|
|
|
43708
43749
|
// src/services/pty.ts
|
|
43709
43750
|
import { spawn } from "node-pty";
|
|
43710
|
-
import { execFile, execFileSync as
|
|
43751
|
+
import { execFile as execFile2, execFileSync as execFileSync3 } from "node:child_process";
|
|
43711
43752
|
import { createRequire } from "node:module";
|
|
43712
43753
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
43713
43754
|
import { chmodSync as chmodSync6, mkdirSync as mkdirSync7, readFileSync as readFileSync8, rmSync as rmSync4, statSync as statSync2, writeFileSync as writeFileSync8 } from "node:fs";
|
|
@@ -43797,7 +43838,7 @@ function phaseSessionAgentEnv(agent, phaseFile) {
|
|
|
43797
43838
|
}
|
|
43798
43839
|
function tmux(...args) {
|
|
43799
43840
|
try {
|
|
43800
|
-
return
|
|
43841
|
+
return execFileSync3("tmux", ["-L", socket(), "-f", "/dev/null", ...args], {
|
|
43801
43842
|
encoding: "utf8",
|
|
43802
43843
|
stdio: ["ignore", "pipe", "pipe"]
|
|
43803
43844
|
});
|
|
@@ -43812,7 +43853,7 @@ function tmux(...args) {
|
|
|
43812
43853
|
}
|
|
43813
43854
|
function tmuxAsync(...args) {
|
|
43814
43855
|
return new Promise((resolve24, reject2) => {
|
|
43815
|
-
|
|
43856
|
+
execFile2(
|
|
43816
43857
|
"tmux",
|
|
43817
43858
|
["-L", socket(), "-f", "/dev/null", ...args],
|
|
43818
43859
|
{ encoding: "utf8" },
|
|
@@ -44837,7 +44878,7 @@ exit 1
|
|
|
44837
44878
|
return [];
|
|
44838
44879
|
}
|
|
44839
44880
|
};
|
|
44840
|
-
runGitDiff = (cwd, args) =>
|
|
44881
|
+
runGitDiff = (cwd, args) => execFileSync3("git", ["-C", cwd, ...args], {
|
|
44841
44882
|
encoding: "utf8",
|
|
44842
44883
|
stdio: ["ignore", "pipe", "ignore"]
|
|
44843
44884
|
});
|
|
@@ -46002,10 +46043,10 @@ var init_config3 = __esm({
|
|
|
46002
46043
|
});
|
|
46003
46044
|
|
|
46004
46045
|
// src/services/session-launch-gate.ts
|
|
46005
|
-
import { execFile as
|
|
46046
|
+
import { execFile as execFile6 } from "node:child_process";
|
|
46006
46047
|
import { readFile as readFile5 } from "node:fs/promises";
|
|
46007
46048
|
import { cpus, loadavg, platform } from "node:os";
|
|
46008
|
-
import { promisify as
|
|
46049
|
+
import { promisify as promisify5 } from "node:util";
|
|
46009
46050
|
async function readMemAvailablePct() {
|
|
46010
46051
|
try {
|
|
46011
46052
|
if (platform() === "darwin") {
|
|
@@ -46052,7 +46093,7 @@ var init_session_launch_gate = __esm({
|
|
|
46052
46093
|
init_pty();
|
|
46053
46094
|
init_config3();
|
|
46054
46095
|
init_session_admission2();
|
|
46055
|
-
execFileAsync =
|
|
46096
|
+
execFileAsync = promisify5(execFile6);
|
|
46056
46097
|
MEM_CACHE_MS = 5e3;
|
|
46057
46098
|
memCache = null;
|
|
46058
46099
|
readHostLoad = async () => ({
|
|
@@ -49036,8 +49077,8 @@ var init_bootstrap = __esm({
|
|
|
49036
49077
|
});
|
|
49037
49078
|
|
|
49038
49079
|
// src/services/codex-version.ts
|
|
49039
|
-
import { execFile as
|
|
49040
|
-
import { promisify as
|
|
49080
|
+
import { execFile as execFile16 } from "node:child_process";
|
|
49081
|
+
import { promisify as promisify15 } from "node:util";
|
|
49041
49082
|
async function probeCodexVersion(env = process.env, execute = runVersion) {
|
|
49042
49083
|
const probe = codexNativeVersionProbe(env, codexBin2());
|
|
49043
49084
|
try {
|
|
@@ -49074,7 +49115,7 @@ var init_codex_version = __esm({
|
|
|
49074
49115
|
init_src();
|
|
49075
49116
|
init_src2();
|
|
49076
49117
|
init_config2();
|
|
49077
|
-
run3 =
|
|
49118
|
+
run3 = promisify15(execFile16);
|
|
49078
49119
|
CODEX_MIN_CLIENT = "0.144.0";
|
|
49079
49120
|
TTL_MS4 = 5 * 6e4;
|
|
49080
49121
|
cache3 = null;
|
|
@@ -57844,8 +57885,8 @@ init_stage_machine();
|
|
|
57844
57885
|
|
|
57845
57886
|
// src/services/scan.ts
|
|
57846
57887
|
init_src();
|
|
57847
|
-
import { execFile as
|
|
57848
|
-
import { promisify } from "node:util";
|
|
57888
|
+
import { execFile as execFile3 } from "node:child_process";
|
|
57889
|
+
import { promisify as promisify2 } from "node:util";
|
|
57849
57890
|
import { existsSync as existsSync7, rmSync as rmSync5 } from "node:fs";
|
|
57850
57891
|
import { resolve as resolve13 } from "node:path";
|
|
57851
57892
|
|
|
@@ -58035,7 +58076,7 @@ async function writeRepoFileAtomic(root, rel, data) {
|
|
|
58035
58076
|
}
|
|
58036
58077
|
|
|
58037
58078
|
// src/services/scan.ts
|
|
58038
|
-
var exec =
|
|
58079
|
+
var exec = promisify2(execFile3);
|
|
58039
58080
|
async function listRepoDocs(repoDir) {
|
|
58040
58081
|
try {
|
|
58041
58082
|
const { stdout } = await exec(
|
|
@@ -58231,9 +58272,9 @@ async function listPendingDeletes() {
|
|
|
58231
58272
|
}
|
|
58232
58273
|
|
|
58233
58274
|
// src/services/branches.ts
|
|
58234
|
-
import { execFile as
|
|
58235
|
-
import { promisify as
|
|
58236
|
-
var exec2 =
|
|
58275
|
+
import { execFile as execFile4 } from "node:child_process";
|
|
58276
|
+
import { promisify as promisify3 } from "node:util";
|
|
58277
|
+
var exec2 = promisify3(execFile4);
|
|
58237
58278
|
var GIT = { maxBuffer: 1 << 24, encoding: "utf8" };
|
|
58238
58279
|
async function refs(repoDir, glob) {
|
|
58239
58280
|
if (!repoDir) return [];
|
|
@@ -58452,13 +58493,13 @@ init_src2();
|
|
|
58452
58493
|
import { existsSync as existsSync10 } from "node:fs";
|
|
58453
58494
|
|
|
58454
58495
|
// src/services/integrate.ts
|
|
58455
|
-
import { execFile as
|
|
58456
|
-
import { promisify as
|
|
58496
|
+
import { execFile as execFile5 } from "node:child_process";
|
|
58497
|
+
import { promisify as promisify4 } from "node:util";
|
|
58457
58498
|
import { rmSync as rmSync6 } from "node:fs";
|
|
58458
58499
|
import { join as join15 } from "node:path";
|
|
58459
58500
|
var sanitize = (id2) => id2.toLowerCase().replace(/[^a-z0-9_-]/g, "_");
|
|
58460
58501
|
var sourceBranch = (specId) => `hanoman/${sanitize(specId)}`;
|
|
58461
|
-
var exec3 =
|
|
58502
|
+
var exec3 = promisify4(execFile5);
|
|
58462
58503
|
var GIT2 = { timeout: 6e4, maxBuffer: 1 << 24, encoding: "utf8" };
|
|
58463
58504
|
var sh = (cwd, args) => exec3("git", args, { cwd, ...GIT2 }).then(
|
|
58464
58505
|
(r) => ({ status: 0, stdout: r.stdout, stderr: r.stderr }),
|
|
@@ -58644,12 +58685,12 @@ init_codex_trust();
|
|
|
58644
58685
|
init_db();
|
|
58645
58686
|
|
|
58646
58687
|
// src/services/spec-review.ts
|
|
58647
|
-
import { execFile as
|
|
58648
|
-
import { promisify as
|
|
58688
|
+
import { execFile as execFile7 } from "node:child_process";
|
|
58689
|
+
import { promisify as promisify6 } from "node:util";
|
|
58649
58690
|
import { mkdtemp, copyFile, rm as rm2 } from "node:fs/promises";
|
|
58650
58691
|
import { tmpdir as tmpdir4 } from "node:os";
|
|
58651
58692
|
import { join as join16, resolve as resolve14 } from "node:path";
|
|
58652
|
-
var exec4 =
|
|
58693
|
+
var exec4 = promisify6(execFile7);
|
|
58653
58694
|
var GIT3 = { maxBuffer: 1 << 24 };
|
|
58654
58695
|
var MAX = 256 * 1024;
|
|
58655
58696
|
var worktreeDir = (repoDir, specId) => join16(repoDir, ".worktrees", specId.toLowerCase().replace(/[^a-z0-9_-]/g, "_"));
|
|
@@ -58853,10 +58894,10 @@ function appendSourceHistory(current, entry) {
|
|
|
58853
58894
|
}
|
|
58854
58895
|
|
|
58855
58896
|
// src/services/spec-reset.ts
|
|
58856
|
-
import { execFile as
|
|
58897
|
+
import { execFile as execFile10 } from "node:child_process";
|
|
58857
58898
|
import { existsSync as existsSync9 } from "node:fs";
|
|
58858
58899
|
import { join as join18 } from "node:path";
|
|
58859
|
-
import { promisify as
|
|
58900
|
+
import { promisify as promisify9 } from "node:util";
|
|
58860
58901
|
|
|
58861
58902
|
// src/services/stage-artifacts.ts
|
|
58862
58903
|
init_src();
|
|
@@ -58901,14 +58942,14 @@ async function deleteDoc(projectId, path) {
|
|
|
58901
58942
|
// src/services/worktree-reaper.ts
|
|
58902
58943
|
init_src2();
|
|
58903
58944
|
init_db();
|
|
58904
|
-
import { execFile as
|
|
58945
|
+
import { execFile as execFile8 } from "node:child_process";
|
|
58905
58946
|
import { readdir as readdir3, rm as rm3 } from "node:fs/promises";
|
|
58906
|
-
import { promisify as
|
|
58947
|
+
import { promisify as promisify7 } from "node:util";
|
|
58907
58948
|
import { join as join17, resolve as resolve15 } from "node:path";
|
|
58908
58949
|
init_notifications2();
|
|
58909
58950
|
var TICK_MS = 6e4;
|
|
58910
58951
|
var trashDirOf = (repoDir) => resolve15(repoDir, ".worktrees", ".trash");
|
|
58911
|
-
var exec5 =
|
|
58952
|
+
var exec5 = promisify7(execFile8);
|
|
58912
58953
|
var prodReaperDeps = {
|
|
58913
58954
|
rm: (path) => rm3(path, { recursive: true, force: true }),
|
|
58914
58955
|
prune: async (repoDir) => {
|
|
@@ -59016,12 +59057,12 @@ function ownsWorktree(repoDir, cwd) {
|
|
|
59016
59057
|
}
|
|
59017
59058
|
|
|
59018
59059
|
// src/services/git-ide.ts
|
|
59019
|
-
import { execFile as
|
|
59020
|
-
import { promisify as
|
|
59060
|
+
import { execFile as execFile9 } from "node:child_process";
|
|
59061
|
+
import { promisify as promisify8 } from "node:util";
|
|
59021
59062
|
import { existsSync as existsSync8 } from "node:fs";
|
|
59022
59063
|
import { readdir as readdir4 } from "node:fs/promises";
|
|
59023
59064
|
import { resolve as resolve17 } from "node:path";
|
|
59024
|
-
var exec6 =
|
|
59065
|
+
var exec6 = promisify8(execFile9);
|
|
59025
59066
|
var GIT4 = { maxBuffer: 1 << 24 };
|
|
59026
59067
|
var MAX2 = 256 * 1024;
|
|
59027
59068
|
var splitZ2 = (s2) => s2.split("\0").filter(Boolean);
|
|
@@ -59516,7 +59557,7 @@ async function buildGitLive(repoDir, p3) {
|
|
|
59516
59557
|
|
|
59517
59558
|
// src/services/spec-reset.ts
|
|
59518
59559
|
init_session_id();
|
|
59519
|
-
var exec7 =
|
|
59560
|
+
var exec7 = promisify9(execFile10);
|
|
59520
59561
|
var EMPTY = { wouldDelete: [], worktree: null, branch: null };
|
|
59521
59562
|
async function planSpecReset(spec) {
|
|
59522
59563
|
const repoDir = await resolveRepoDir(spec.projectId);
|
|
@@ -67403,14 +67444,14 @@ async function docs_default(app3) {
|
|
|
67403
67444
|
// src/routes/ide.ts
|
|
67404
67445
|
init_src2();
|
|
67405
67446
|
import { basename as basename7 } from "node:path";
|
|
67406
|
-
import { execFile as
|
|
67407
|
-
import { promisify as
|
|
67447
|
+
import { execFile as execFile14, spawn as spawn3 } from "node:child_process";
|
|
67448
|
+
import { promisify as promisify13 } from "node:util";
|
|
67408
67449
|
|
|
67409
67450
|
// src/services/git-remotes.ts
|
|
67410
|
-
import { execFile as
|
|
67411
|
-
import { promisify as
|
|
67451
|
+
import { execFile as execFile11 } from "node:child_process";
|
|
67452
|
+
import { promisify as promisify10 } from "node:util";
|
|
67412
67453
|
import { existsSync as existsSync11 } from "node:fs";
|
|
67413
|
-
var exec8 =
|
|
67454
|
+
var exec8 = promisify10(execFile11);
|
|
67414
67455
|
var GIT5 = { maxBuffer: 1 << 24, encoding: "utf8" };
|
|
67415
67456
|
function parseRemote(url2) {
|
|
67416
67457
|
let m = /^git@([^:]+):(.+?)(?:\.git)?$/.exec(url2);
|
|
@@ -67474,9 +67515,9 @@ init_settings3();
|
|
|
67474
67515
|
init_codex_trust();
|
|
67475
67516
|
|
|
67476
67517
|
// src/services/branch-cleanup.ts
|
|
67477
|
-
import { execFile as
|
|
67478
|
-
import { promisify as
|
|
67479
|
-
var exec9 =
|
|
67518
|
+
import { execFile as execFile12 } from "node:child_process";
|
|
67519
|
+
import { promisify as promisify11 } from "node:util";
|
|
67520
|
+
var exec9 = promisify11(execFile12);
|
|
67480
67521
|
var GIT6 = { timeout: 6e4, maxBuffer: 1 << 24, encoding: "utf8" };
|
|
67481
67522
|
var LOCK_REASON = {
|
|
67482
67523
|
current: "branch aktif (HEAD)",
|
|
@@ -67644,12 +67685,12 @@ async function deleteBranches(repoDir, names, opts) {
|
|
|
67644
67685
|
}
|
|
67645
67686
|
|
|
67646
67687
|
// src/services/worktree-list.ts
|
|
67647
|
-
import { execFile as
|
|
67688
|
+
import { execFile as execFile13 } from "node:child_process";
|
|
67648
67689
|
import { realpathSync as realpathSync6 } from "node:fs";
|
|
67649
67690
|
import { stat as stat4 } from "node:fs/promises";
|
|
67650
67691
|
import { basename as basename6, dirname as dirname11, join as join21, resolve as resolve19, sep as sep6 } from "node:path";
|
|
67651
|
-
import { promisify as
|
|
67652
|
-
var exec10 =
|
|
67692
|
+
import { promisify as promisify12 } from "node:util";
|
|
67693
|
+
var exec10 = promisify12(execFile13);
|
|
67653
67694
|
var GIT7 = { timeout: 6e4, maxBuffer: 1 << 24, encoding: "utf8" };
|
|
67654
67695
|
async function out3(cwd, args) {
|
|
67655
67696
|
try {
|
|
@@ -68263,7 +68304,7 @@ async function lockInputs(id2) {
|
|
|
68263
68304
|
sessionBranches: new Set(sessions)
|
|
68264
68305
|
};
|
|
68265
68306
|
}
|
|
68266
|
-
var execAsync =
|
|
68307
|
+
var execAsync = promisify13(execFile14);
|
|
68267
68308
|
function entryError(reply, e) {
|
|
68268
68309
|
if (e instanceof EntryMissingError) return reply.code(404).send({ error: "not found" });
|
|
68269
68310
|
if (e instanceof EntryExistsError) return reply.code(409).send({ error: "sudah ada" });
|
|
@@ -69037,8 +69078,8 @@ function setBounded(map, key, value, maxKeys) {
|
|
|
69037
69078
|
init_src2();
|
|
69038
69079
|
init_db();
|
|
69039
69080
|
import { randomBytes as randomBytes3, scrypt as scryptCb, timingSafeEqual as timingSafeEqual3, createHash as createHash9 } from "node:crypto";
|
|
69040
|
-
import { promisify as
|
|
69041
|
-
var scrypt =
|
|
69081
|
+
import { promisify as promisify14 } from "node:util";
|
|
69082
|
+
var scrypt = promisify14(scryptCb);
|
|
69042
69083
|
var COOKIE_NAME = "hn_session";
|
|
69043
69084
|
var SESSION_TTL_MS = 7 * 24 * 3600 * 1e3;
|
|
69044
69085
|
async function hashPassword(pw) {
|
|
@@ -69424,7 +69465,7 @@ init_uploads();
|
|
|
69424
69465
|
init_src();
|
|
69425
69466
|
init_db();
|
|
69426
69467
|
import { createHash as createHash11, randomUUID as randomUUID9 } from "node:crypto";
|
|
69427
|
-
import { execFileSync as
|
|
69468
|
+
import { execFileSync as execFileSync4 } from "node:child_process";
|
|
69428
69469
|
import { homedir as homedir5 } from "node:os";
|
|
69429
69470
|
import { readFileSync as readFileSync12, realpathSync as realpathSync7, statSync as statSync4 } from "node:fs";
|
|
69430
69471
|
import { isAbsolute as isAbsolute8, relative as relative4, resolve as resolve22 } from "node:path";
|
|
@@ -69588,7 +69629,7 @@ var keyOf = (x) => `${x.sessionId}\0${x.runtimeInvocationId}`;
|
|
|
69588
69629
|
var hash3 = (value) => createHash11("sha256").update(value).digest("hex");
|
|
69589
69630
|
var defaultGitStatus = (cwd) => {
|
|
69590
69631
|
try {
|
|
69591
|
-
return
|
|
69632
|
+
return execFileSync4("git", ["-C", cwd, "status", "--porcelain=v1", "-z"], {
|
|
69592
69633
|
encoding: "utf8",
|
|
69593
69634
|
stdio: ["ignore", "pipe", "ignore"]
|
|
69594
69635
|
});
|
|
@@ -70516,7 +70557,7 @@ init_src2();
|
|
|
70516
70557
|
init_config2();
|
|
70517
70558
|
init_pty();
|
|
70518
70559
|
init_session_sandbox();
|
|
70519
|
-
import { execFile as
|
|
70560
|
+
import { execFile as execFile15 } from "node:child_process";
|
|
70520
70561
|
import { randomUUID as randomUUID10 } from "node:crypto";
|
|
70521
70562
|
import { mkdirSync as mkdirSync12, rmSync as rmSync8, writeFileSync as writeFileSync10 } from "node:fs";
|
|
70522
70563
|
import { tmpdir as tmpdir5 } from "node:os";
|
|
@@ -70595,7 +70636,7 @@ function leadFailureReason(agent, timeoutMs, err, stdout, stderr) {
|
|
|
70595
70636
|
function think(prompt, o) {
|
|
70596
70637
|
const process2 = leadProcess(prompt, o);
|
|
70597
70638
|
return new Promise((resolve24, reject2) => {
|
|
70598
|
-
const child =
|
|
70639
|
+
const child = execFile15(process2.file, process2.args, {
|
|
70599
70640
|
cwd: process2.cwd,
|
|
70600
70641
|
timeout: o.timeoutMs,
|
|
70601
70642
|
maxBuffer: 16 * 1024 * 1024,
|
|
@@ -72536,7 +72577,7 @@ async function buildChecklist(vpsId) {
|
|
|
72536
72577
|
// src/services/vps-key.ts
|
|
72537
72578
|
init_src2();
|
|
72538
72579
|
init_config2();
|
|
72539
|
-
import { execFileSync as
|
|
72580
|
+
import { execFileSync as execFileSync5 } from "node:child_process";
|
|
72540
72581
|
import { chmodSync as chmodSync7, copyFileSync, existsSync as existsSync16, mkdirSync as mkdirSync13, readFileSync as readFileSync16, unlinkSync as unlinkSync2 } from "node:fs";
|
|
72541
72582
|
import { homedir as homedir6 } from "node:os";
|
|
72542
72583
|
import { join as join30 } from "node:path";
|
|
@@ -72562,7 +72603,7 @@ function ensureHanomanKey() {
|
|
|
72562
72603
|
if (!existsSync16(privPath)) adoptLegacyKey(dir2);
|
|
72563
72604
|
if (!existsSync16(privPath)) {
|
|
72564
72605
|
mkdirSync13(dir2, { recursive: true, mode: 448 });
|
|
72565
|
-
|
|
72606
|
+
execFileSync5(
|
|
72566
72607
|
"ssh-keygen",
|
|
72567
72608
|
["-t", "ed25519", "-N", "", "-C", "hanoman", "-f", privPath],
|
|
72568
72609
|
{ stdio: ["ignore", "ignore", "pipe"] }
|
|
@@ -72867,7 +72908,7 @@ async function vps_default(app3) {
|
|
|
72867
72908
|
|
|
72868
72909
|
// src/services/limits.ts
|
|
72869
72910
|
init_config2();
|
|
72870
|
-
import { execFileSync as
|
|
72911
|
+
import { execFileSync as execFileSync6 } from "node:child_process";
|
|
72871
72912
|
import { readFileSync as readFileSync18 } from "node:fs";
|
|
72872
72913
|
import { homedir as homedir8, userInfo } from "node:os";
|
|
72873
72914
|
import { join as join31 } from "node:path";
|
|
@@ -72885,7 +72926,7 @@ var nowIso = () => (/* @__PURE__ */ new Date()).toISOString();
|
|
|
72885
72926
|
function credsFile() {
|
|
72886
72927
|
return join31(effectiveStr("CLAUDE_CONFIG_DIR") ?? join31(homedir8(), ".claude"), ".credentials.json");
|
|
72887
72928
|
}
|
|
72888
|
-
var securityRun = (args) =>
|
|
72929
|
+
var securityRun = (args) => execFileSync6("security", args, { encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] });
|
|
72889
72930
|
var osAccount = () => {
|
|
72890
72931
|
try {
|
|
72891
72932
|
return userInfo().username || null;
|
|
@@ -76140,8 +76181,8 @@ init_db();
|
|
|
76140
76181
|
|
|
76141
76182
|
// src/services/changelog/collect.ts
|
|
76142
76183
|
init_db();
|
|
76143
|
-
import { execFile as
|
|
76144
|
-
import { promisify as
|
|
76184
|
+
import { execFile as execFile17 } from "node:child_process";
|
|
76185
|
+
import { promisify as promisify16 } from "node:util";
|
|
76145
76186
|
import { existsSync as existsSync18 } from "node:fs";
|
|
76146
76187
|
|
|
76147
76188
|
// src/services/changelog/scrub.ts
|
|
@@ -76203,7 +76244,7 @@ async function collectBacklog(projectId, from, to) {
|
|
|
76203
76244
|
notes.push(`${stampless} item selesai tanpa stempel waktu (selesai sebelum stempel ini ada) dan tak ikut dihitung.`);
|
|
76204
76245
|
return { ok: true, input: { mode: "backlog", title: `${from} \u2013 ${to}`, items, notes } };
|
|
76205
76246
|
}
|
|
76206
|
-
var exec11 =
|
|
76247
|
+
var exec11 = promisify16(execFile17);
|
|
76207
76248
|
var GIT8 = { maxBuffer: 1 << 24, encoding: "utf8" };
|
|
76208
76249
|
var US2 = "";
|
|
76209
76250
|
var RS = "";
|
|
@@ -77071,7 +77112,7 @@ async function resolveGithubRepo(projectId) {
|
|
|
77071
77112
|
|
|
77072
77113
|
// src/services/github-fetch.ts
|
|
77073
77114
|
init_config2();
|
|
77074
|
-
import { execFile as
|
|
77115
|
+
import { execFile as execFile18 } from "node:child_process";
|
|
77075
77116
|
var labelNames = (l) => (l ?? []).map((x) => typeof x === "string" ? x : x.name ?? "").filter(Boolean);
|
|
77076
77117
|
var norm2 = (s2) => s2.toLowerCase() === "closed" ? "closed" : "open";
|
|
77077
77118
|
function issueFromGh(raw) {
|
|
@@ -77112,7 +77153,7 @@ function issuesFromRest(raw) {
|
|
|
77112
77153
|
var GH_FIELDS = "number,title,body,author,labels,url,state,createdAt,updatedAt";
|
|
77113
77154
|
var API2 = "https://api.github.com";
|
|
77114
77155
|
var defaultRunGh = (args, env) => new Promise((resolve24, reject2) => {
|
|
77115
|
-
|
|
77156
|
+
execFile18(
|
|
77116
77157
|
args[0],
|
|
77117
77158
|
args.slice(1),
|
|
77118
77159
|
{ env, maxBuffer: 1 << 26, encoding: "utf8", timeout: 6e4 },
|
|
@@ -78147,7 +78188,7 @@ init_settings3();
|
|
|
78147
78188
|
// src/services/portal-chat/turn.ts
|
|
78148
78189
|
init_src();
|
|
78149
78190
|
init_db();
|
|
78150
|
-
import { execFile as
|
|
78191
|
+
import { execFile as execFile19 } from "node:child_process";
|
|
78151
78192
|
|
|
78152
78193
|
// src/services/portal-chat/guard-input.ts
|
|
78153
78194
|
import { randomBytes as randomBytes10 } from "node:crypto";
|
|
@@ -78434,7 +78475,7 @@ function chatFailureReason(err, stdout, stderr, timeoutMs) {
|
|
|
78434
78475
|
}
|
|
78435
78476
|
function runProcess(p3, timeoutMs) {
|
|
78436
78477
|
return new Promise((resolve24, reject2) => {
|
|
78437
|
-
const child =
|
|
78478
|
+
const child = execFile19(p3.file, p3.args, {
|
|
78438
78479
|
cwd: p3.cwd,
|
|
78439
78480
|
timeout: timeoutMs,
|
|
78440
78481
|
maxBuffer: 16 * 1024 * 1024,
|
|
@@ -80474,13 +80515,13 @@ function startWebhookEngine() {
|
|
|
80474
80515
|
// src/services/auto-merge.ts
|
|
80475
80516
|
init_src();
|
|
80476
80517
|
init_db();
|
|
80477
|
-
import { execFile as
|
|
80478
|
-
import { promisify as
|
|
80518
|
+
import { execFile as execFile20 } from "node:child_process";
|
|
80519
|
+
import { promisify as promisify17 } from "node:util";
|
|
80479
80520
|
init_notifications2();
|
|
80480
80521
|
var AUTO_MERGE_WINDOW_MS = 24 * 60 * 60 * 1e3;
|
|
80481
80522
|
var AUTO_MERGE_GRACE_MS = 15 * 60 * 1e3;
|
|
80482
80523
|
var TICK_MS4 = 6e4;
|
|
80483
|
-
var exec12 =
|
|
80524
|
+
var exec12 = promisify17(execFile20);
|
|
80484
80525
|
var GIT9 = { timeout: 3e4, maxBuffer: 1 << 24, encoding: "utf8" };
|
|
80485
80526
|
var gitOut = async (cwd, args) => {
|
|
80486
80527
|
try {
|