hanoman 0.9.30 → 0.9.32

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.
Files changed (24) hide show
  1. package/dist/build-info.json +3 -3
  2. package/dist/cli.js +62 -26
  3. package/dist/server.js +471 -336
  4. package/package.json +1 -1
  5. package/web/assets/{DalangHanomanScreen-Fd7_DcSP.js → DalangHanomanScreen-DdsEmtBl.js} +1 -1
  6. package/web/assets/{DocPreviewModal-SMRN2K98.js → DocPreviewModal-BbOqdfaH.js} +1 -1
  7. package/web/assets/{DocsWorkspace-pxj0N6QW.js → DocsWorkspace-Cr7AXz9z.js} +1 -1
  8. package/web/assets/{IdeScreen-Cr9Vqdrc.js → IdeScreen-hdbQW-ui.js} +1 -1
  9. package/web/assets/{LeadScreen-CQXpJy0y.js → LeadScreen-BWE4mfJI.js} +1 -1
  10. package/web/assets/{ReviewScreen-B7NNEjxk.js → ReviewScreen-BIkpEspG.js} +1 -1
  11. package/web/assets/{SchedulerScreen-D3rPdS-F.js → SchedulerScreen-3KVE-d_d.js} +1 -1
  12. package/web/assets/SettingsScreen-B0-W2TeR.js +62 -0
  13. package/web/assets/{TeamScreen-BBAsYLpT.js → TeamScreen-DNdt2P1g.js} +1 -1
  14. package/web/assets/{TerminalScreen-DpVp4h1n.js → TerminalScreen-BjQF48XI.js} +1 -1
  15. package/web/assets/{TriageScreen-wAPnttRe.js → TriageScreen-CzM99CrG.js} +1 -1
  16. package/web/assets/{VpsScreen-DeQVx9Jy.js → VpsScreen-SGB_BpbS.js} +1 -1
  17. package/web/assets/fields-of8G961J.js +1 -0
  18. package/web/assets/{index-BQw6xQI4.js → index-C5P4ykKO.js} +3 -3
  19. package/web/assets/{live-CONO0GTu.js → live-DQen7wLm.js} +1 -1
  20. package/web/assets/{sched-lead-shared-CDR0pOqs.js → sched-lead-shared-C34TvLVv.js} +1 -1
  21. package/web/assets/{settings-rebase-CpaFw0Tm.js → settings-rebase-DHIWk4mV.js} +1 -1
  22. package/web/index.html +1 -1
  23. package/web/assets/SettingsScreen-Bx13PWKQ.js +0 -62
  24. package/web/assets/fields-qnBoIMR_.js +0 -1
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.9.30",
3
- "sha": "fb61f4c7",
4
- "builtAt": "2026-10-18T06:37:42.970Z"
2
+ "version": "0.9.32",
3
+ "sha": "5946ca19",
4
+ "builtAt": "2026-10-19T07:56:38.058Z"
5
5
  }
package/dist/cli.js CHANGED
@@ -5155,6 +5155,8 @@ var init_entities = __esm({
5155
5155
  // SPEC-184
5156
5156
  notifyDecisionSound: external_exports.enum(NOTIFY_SOUNDS).default("alert"),
5157
5157
  // SPEC-184
5158
+ notifyDecisionTelegram: external_exports.boolean().default(true),
5159
+ // ADR-0226 · dorong "menunggu keputusan" ke Telegram
5158
5160
  agentAccessEnabled: external_exports.boolean().default(false),
5159
5161
  // SPEC-257 · master switch akses AI agent
5160
5162
  scheduler: zScheduler.default(SCHEDULER_DEFAULTS),
@@ -6781,7 +6783,11 @@ var init_session_admission = __esm({
6781
6783
  });
6782
6784
 
6783
6785
  // ../shared/src/dto.ts
6784
- var zIssueDeviceToken, zSessionResult, zSessionHistory, zCreateProject, zProjectId, zRenameProject, zUpdateProject, zCreateSpec, zPatchSpec, zChangeSpecSource, zMarkSpecDone, zMarkSpecReviewed, zIntegrate, zSessionSummary, zProjectView, zSchedulerQueueItem, zSchedulerSourceView, zSchedulerSessionView, zSchedulerQueueCounts, zSchedulerState, zLeadDecisionView, zLeadFlowView, zLeadAnswer, zLeadProjectStatus, zLeadStatusView, zFlow, zPrdBrief, zPrdDoc, zBreakdownItem, zBreakdownDoc, zBatchCreateSpec, zEscalationTarget, zEscalationPrefill, zAuditEscalation, zAuditEscalationView, zTerminalSession, zDocFileContent, zDocIndexCat, zDocIndex, HOST_RE, USER_RE, zCreateVps, zPatchVps, USER_ROLES, zUserRole, zLogin, zSignup, zSetup, zSetupApply, zChangePassword, zAdminPasswordReset, zCreateClientAccount, zUpdateClientAccount, zVpsCheck, zMarkNa, zMarkNaBulk, zAttest, zRemediate, PROVISION_PROFILES, COMPONENT_IDS, zProvision, UPDATE_RESTART_EXIT, CONFIG_RESTART_EXIT, MANUAL_RESTART_EXIT, zUpdateApplyBody, MAX_SUBS, zSubPage, zSubLimit, zTopicParams, zEventsClientMsg, zTicketView, zTicketAttachmentView, zSpecAttachmentView, zTicketDetail, zTicketEditInput, zHelpInfo, zPublicTicketStatus, zCronExpr, zCreateCron, zPatchCron, zSchedulerCron, zSchedulerCronRun;
6786
+ function parseExitIntent(text) {
6787
+ const m = /^(\d+) (\d+)\s*$/.exec(text ?? "");
6788
+ return m ? { pid: Number(m[1]), code: Number(m[2]) } : null;
6789
+ }
6790
+ var zIssueDeviceToken, zSessionResult, zSessionHistory, zCreateProject, zProjectId, zRenameProject, zUpdateProject, zCreateSpec, zPatchSpec, zChangeSpecSource, zMarkSpecDone, zMarkSpecReviewed, zIntegrate, zSessionSummary, zProjectView, zSchedulerQueueItem, zSchedulerSourceView, zSchedulerSessionView, zSchedulerQueueCounts, zSchedulerState, zLeadDecisionView, zLeadFlowView, zLeadAnswer, zLeadProjectStatus, zLeadStatusView, zFlow, zPrdBrief, zPrdDoc, zBreakdownItem, zBreakdownDoc, zBatchCreateSpec, zEscalationTarget, zEscalationPrefill, zAuditEscalation, zAuditEscalationView, zTerminalSession, zDocFileContent, zDocIndexCat, zDocIndex, HOST_RE, USER_RE, zCreateVps, zPatchVps, USER_ROLES, zUserRole, zLogin, zSignup, zSetup, zSetupApply, zChangePassword, zAdminPasswordReset, zCreateClientAccount, zUpdateClientAccount, zVpsCheck, zMarkNa, zMarkNaBulk, zAttest, zRemediate, PROVISION_PROFILES, COMPONENT_IDS, zProvision, UPDATE_RESTART_EXIT, CONFIG_RESTART_EXIT, MANUAL_RESTART_EXIT, EXIT_INTENT_FILE, zUpdateApplyBody, MAX_SUBS, zSubPage, zSubLimit, zTopicParams, zEventsClientMsg, zTicketView, zTicketAttachmentView, zSpecAttachmentView, zTicketDetail, zTicketEditInput, zHelpInfo, zPublicTicketStatus, zCronExpr, zCreateCron, zPatchCron, zSchedulerCron, zSchedulerCronRun;
6785
6791
  var init_dto = __esm({
6786
6792
  "../shared/src/dto.ts"() {
6787
6793
  "use strict";
@@ -7315,6 +7321,7 @@ var init_dto = __esm({
7315
7321
  UPDATE_RESTART_EXIT = 75;
7316
7322
  CONFIG_RESTART_EXIT = 76;
7317
7323
  MANUAL_RESTART_EXIT = 77;
7324
+ EXIT_INTENT_FILE = "exit-intent";
7318
7325
  zUpdateApplyBody = external_exports.object({ confirm: external_exports.boolean().optional() });
7319
7326
  MAX_SUBS = 16;
7320
7327
  zSubPage = external_exports.number().int().min(1).max(1e4);
@@ -15214,6 +15221,11 @@ var init_verify_scope = __esm({
15214
15221
  ' test-nya memang berjalan, jangan menerima "no test files" sebagai bukti.',
15215
15222
  "- Typecheck: hanya paket yang tersentuh (mis. `pnpm --filter ./server typecheck`).",
15216
15223
  " JANGAN `pnpm -r typecheck` \u2014 itu menyalakan satu proses tsc per paket sekaligus.",
15224
+ "- Ritme: per task jalankan berkas test yang task itu sentuh saja.",
15225
+ " JANGAN menjalankan ulang berkas test yang sudah hijau selama kode yang diujinya",
15226
+ " tak berubah sejak itu. Typecheck paket tersentuh sesudah task yang mengubah",
15227
+ " tipe/kontrak ekspor, bukan tiap task. Gabungan semua test tersentuh + typecheck",
15228
+ " dijalankan SEKALI di akhir, sebelum melapor.",
15217
15229
  "- Lint: hanya berkas yang berubah, bukan seluruh repo.",
15218
15230
  "- Build penuh: hanya bila yang kamu ubah memang soal build/bundling.",
15219
15231
  "- Boot server + curl / smoke end-to-end: hanya bila task ini menyentuh endpoint atau perilaku",
@@ -15451,7 +15463,7 @@ var init_agent_definition = __esm({
15451
15463
  });
15452
15464
 
15453
15465
  // ../runner/src/phase-agents.ts
15454
- var REVIEWER_AGENT_NAME, PHASE_AGENT_AUTONOMY, PHASE_AGENT_RULES, PHASE_AGENT_REPORT, REVIEWER_RULES;
15466
+ var REVIEWER_AGENT_NAME, PHASE_AGENT_AUTONOMY, FOREGROUND_RULE, PHASE_AGENT_RULES, PHASE_AGENT_REPORT, REVIEWER_RULES;
15455
15467
  var init_phase_agents = __esm({
15456
15468
  "../runner/src/phase-agents.ts"() {
15457
15469
  "use strict";
@@ -15459,13 +15471,15 @@ var init_phase_agents = __esm({
15459
15471
  init_prompt();
15460
15472
  init_reverse_standard();
15461
15473
  REVIEWER_AGENT_NAME = phaseAgentName(REVIEWER_CELL);
15462
- PHASE_AGENT_AUTONOMY = `Kamu dipanggil orchestrator sesi hanoman, bukan manusia. Checkpoint "review"/"approval" milik skill BUKAN titik berhenti. Tetapi kamu TIDAK BOLEH memutuskan sendiri hal yang masih ambigu dan akan mempengaruhi hasil \u2014 percabangan data model, kontrak API, scope, perilaku yang terlihat pengguna, atau asumsi yang terpaksa kamu ambil agar bisa lanjut \u2014 dan kamu tak bisa bertanya langsung. Daftarkan SEMUANYA di bagian \`Keputusan terbuka:\` laporanmu (tanpa batas jumlah; tiap butir berupa pertanyaan bernomor diakhiri \`?\` beserta opsi dan rekomendasimu), begitu juga bila panduan fase menyuruhmu bertanya ke manusia, lalu tulis \`Status: menunggu-keputusan\` dan berhenti. Jawabannya datang sebagai pesan susulan ke agen yang sama \u2014 lanjutkan dari sana; bila jawaban itu memunculkan ambiguitas baru, laporkan lagi dengan cara yang sama. Yang menjawab ditentukan hanoman \u2014 ${DECIDER}.`;
15474
+ PHASE_AGENT_AUTONOMY = `Kamu dipanggil orchestrator sesi hanoman, bukan manusia. Checkpoint "review"/"approval" milik skill BUKAN titik berhenti. Tetapi kamu TIDAK BOLEH memutuskan sendiri hal yang masih ambigu dan akan mempengaruhi hasil \u2014 percabangan data model, kontrak API, scope, perilaku yang terlihat pengguna, atau asumsi yang terpaksa kamu ambil agar bisa lanjut \u2014 dan kamu tak bisa bertanya langsung. Daftarkan SEMUANYA di bagian \`Keputusan terbuka:\` laporanmu (tanpa batas jumlah; tiap butir berupa pertanyaan bernomor diakhiri \`?\` beserta opsi dan rekomendasimu), begitu juga bila panduan fase menyuruhmu bertanya ke manusia, lalu tulis \`Status: menunggu-keputusan\` dan berhenti. Jawabannya datang sebagai pesan susulan ke agen yang sama \u2014 lanjutkan dari sana; bila jawaban itu memunculkan ambiguitas baru, laporkan lagi dengan cara yang sama. Yang menjawab ditentukan hanoman \u2014 ${DECIDER}. Keputusan yang sudah dijawab (baris \`Keputusan manusia sejauh ini:\` serah-terima, bagian keputusan dokumen spec atau dokumen audit) sudah final \u2014 JANGAN menanyakannya ulang; kumpulkan ambiguitas baru fasemu dan laporkan sekaligus.`;
15475
+ FOREGROUND_RULE = "- Jalankan test/typecheck/build di FOREGROUND dengan batas waktu dan baca hasilnya di giliran yang sama. JANGAN melepasnya ke latar lalu menunggu dengan jeda tidur berdurasi tetap (`sleep N` berulang) \u2014 itu menit yang terbuang tanpa hasil; set yang terlalu lama untuk satu perintah dipecah. Proses yang memang harus hidup di latar (server untuk smoke) ditunggu dengan pemeriksaan kesiapan berbatas waktu yang berhenti sendiri begitu siap.";
15463
15476
  PHASE_AGENT_RULES = [
15464
15477
  "Batas peran fase:",
15465
15478
  "- JANGAN menulis `$HANOMAN_PHASE_FILE` \u2014 orchestrator satu-satunya penulis marker fase.",
15466
15479
  "- JANGAN `git push` \u2014 push milik orchestrator. Commit artefak fasemu sendiri sebelum melapor.",
15467
15480
  `- JANGAN memanggil agen berawalan \`${PHASE_AGENT_PREFIX}\`. Custom agent lain boleh dipanggil bila relevan.`,
15468
15481
  "- Kerjakan HANYA fase ini; fase lain dikerjakan agen fasenya sendiri.",
15482
+ FOREGROUND_RULE,
15469
15483
  // T1 · ADR-0164 amandemen 2026-09-23 · 22 laporan tanpa `Status:` di audit: agen fase mengakhiri
15470
15484
  // gilirannya sambil menunggu proses latarnya sendiri, dan teks "menunggu" itu dibaca orchestrator
15471
15485
  // sebagai laporan final. Giliranmu yang berakhir = laporanmu, jadi menunggu harus terjadi DI DALAM giliran.
@@ -15485,6 +15499,7 @@ var init_phase_agents = __esm({
15485
15499
  "- JANGAN mengubah, membuat, atau menghapus berkas apa pun di worktree, JANGAN commit, JANGAN `git push`/`git stash`/`git checkout`/`git reset`. Kamu membaca dan menjalankan perintah verifikasi saja.",
15486
15500
  "- JANGAN menulis `$HANOMAN_PHASE_FILE` dan JANGAN memperbaiki temuanmu sendiri \u2014 perbaikan milik agen Execute, marker milik orchestrator.",
15487
15501
  `- JANGAN memanggil agen berawalan \`${PHASE_AGENT_PREFIX}\`.`,
15502
+ FOREGROUND_RULE,
15488
15503
  "- JANGAN mengakhiri giliran atau melapor selama masih menunggu proses/tugas latar milikmu sendiri (test yang kamu jalankan di latar): tunggu sampai selesai dan baca hasilnya, lalu tulis laporan lengkap berawalan `Status:`."
15489
15504
  ].join("\n");
15490
15505
  }
@@ -16177,13 +16192,14 @@ __export(start_exports, {
16177
16192
  parseStartArgs: () => parseStartArgs,
16178
16193
  planSupervisorStep: () => planSupervisorStep,
16179
16194
  prismaClientUsable: () => prismaClientUsable,
16195
+ resolveChildExit: () => resolveChildExit,
16180
16196
  serverEnv: () => serverEnv,
16181
16197
  spawnEnv: () => spawnEnv
16182
16198
  });
16183
16199
  import { spawn, execFileSync as execFileSync3 } from "node:child_process";
16184
16200
  import { createRequire as createRequire2 } from "node:module";
16185
- import { existsSync as existsSync3, mkdirSync as mkdirSync2, chmodSync as chmodSync3 } from "node:fs";
16186
- import { dirname as dirname4, resolve as resolvePath } from "node:path";
16201
+ import { existsSync as existsSync3, mkdirSync as mkdirSync2, chmodSync as chmodSync3, readFileSync as readFileSync3, rmSync } from "node:fs";
16202
+ import { dirname as dirname4, join as join6, resolve as resolvePath } from "node:path";
16187
16203
  import { fileURLToPath } from "node:url";
16188
16204
  function parseStartArgs(argv) {
16189
16205
  const out = { port: null, host: null, db: null, migrate: true };
@@ -16308,6 +16324,23 @@ function installLatest() {
16308
16324
  function spawnEnv(fileEnv, processEnv, server) {
16309
16325
  return { ...fileEnv, ...processEnv, ...server };
16310
16326
  }
16327
+ function resolveChildExit(exit, intentText) {
16328
+ const intent = parseExitIntent(intentText);
16329
+ if (exit.signal === "SIGKILL" && intent && exit.pid !== void 0 && intent.pid === exit.pid) {
16330
+ return { code: intent.code, forced: true };
16331
+ }
16332
+ return { code: exit.code ?? 0, forced: false };
16333
+ }
16334
+ function takeExitIntent(home) {
16335
+ const path = join6(home, EXIT_INTENT_FILE);
16336
+ try {
16337
+ const text = readFileSync3(path, "utf8");
16338
+ rmSync(path, { force: true });
16339
+ return text;
16340
+ } catch {
16341
+ return null;
16342
+ }
16343
+ }
16311
16344
  function runServer(serverJs, env, fileEnv) {
16312
16345
  const child = spawn(process.execPath, [serverJs], {
16313
16346
  stdio: "inherit",
@@ -16315,9 +16348,9 @@ function runServer(serverJs, env, fileEnv) {
16315
16348
  });
16316
16349
  const handlers = ["SIGINT", "SIGTERM"].map((sig) => [sig, () => child.kill(sig)]);
16317
16350
  for (const [sig, h] of handlers) process.on(sig, h);
16318
- return new Promise((res) => child.on("exit", (code) => {
16351
+ return new Promise((res) => child.on("exit", (code, signal) => {
16319
16352
  for (const [sig, h] of handlers) process.off(sig, h);
16320
- res(code ?? 0);
16353
+ res({ code, signal, pid: child.pid });
16321
16354
  }));
16322
16355
  }
16323
16356
  async function start(argv, ctx) {
@@ -16376,7 +16409,10 @@ ${hint}
16376
16409
  let restartsUsed = 0;
16377
16410
  let configRestartsUsed = 0;
16378
16411
  for (; ; ) {
16379
- const code = await runServer(layout.server, env, readConfigEnv(home));
16412
+ const exit = await runServer(layout.server, env, readConfigEnv(home));
16413
+ const { code, forced } = resolveChildExit(exit, takeExitIntent(home));
16414
+ if (forced) ctx.stderr(`hanoman: server macet saat keluar \u2014 dihentikan watchdog; dilanjutkan sebagai exit ${code} (ADR-0227)
16415
+ `);
16380
16416
  const step = planSupervisorStep(code, restartsUsed, configRestartsUsed);
16381
16417
  if (step.action === "exit") {
16382
16418
  if (code === UPDATE_RESTART_EXIT) {
@@ -37823,7 +37859,7 @@ __export(mcp_exports, {
37823
37859
  agentTokenPath: () => agentTokenPath,
37824
37860
  default: () => mcp
37825
37861
  });
37826
- import { readFileSync as readFileSync3 } from "node:fs";
37862
+ import { readFileSync as readFileSync4 } from "node:fs";
37827
37863
  import { join as join8 } from "node:path";
37828
37864
  async function mcp(argv, ctx) {
37829
37865
  const cfg = resolveMcpConfig(argv, ctx.env, () => tokenFile(ctx.env));
@@ -37858,7 +37894,7 @@ var init_mcp2 = __esm({
37858
37894
  agentTokenPath = (env) => join8(resolveHome(env), "agent-token");
37859
37895
  tokenFile = (env) => {
37860
37896
  try {
37861
- return readFileSync3(agentTokenPath(env), "utf8");
37897
+ return readFileSync4(agentTokenPath(env), "utf8");
37862
37898
  } catch {
37863
37899
  return null;
37864
37900
  }
@@ -38199,11 +38235,11 @@ var init_migrate_pg = __esm({
38199
38235
  });
38200
38236
 
38201
38237
  // src/config.ts
38202
- import { readFileSync as readFileSync4, existsSync as existsSync7 } from "node:fs";
38238
+ import { readFileSync as readFileSync5, existsSync as existsSync7 } from "node:fs";
38203
38239
  import { join as join10 } from "node:path";
38204
38240
  function loadConfig(repoRoot) {
38205
38241
  const p3 = join10(repoRoot, "hanoman.config.json");
38206
- const raw = existsSync7(p3) ? JSON.parse(readFileSync4(p3, "utf8")) : {};
38242
+ const raw = existsSync7(p3) ? JSON.parse(readFileSync5(p3, "utf8")) : {};
38207
38243
  return zHanomanConfig.parse(raw);
38208
38244
  }
38209
38245
  var init_config3 = __esm({
@@ -38230,10 +38266,10 @@ var init_repo = __esm({
38230
38266
  });
38231
38267
 
38232
38268
  // src/docs-model.ts
38233
- import { readFileSync as readFileSync5, readdirSync as readdirSync3, statSync as statSync2 } from "node:fs";
38269
+ import { readFileSync as readFileSync6, readdirSync as readdirSync3, statSync as statSync2 } from "node:fs";
38234
38270
  import { join as join12, relative as relative2 } from "node:path";
38235
38271
  function parseIndex(indexPath) {
38236
- const md = readFileSync5(indexPath, "utf8");
38272
+ const md = readFileSync6(indexPath, "utf8");
38237
38273
  const out = /* @__PURE__ */ new Set();
38238
38274
  for (const m of md.matchAll(LINK_RE2)) {
38239
38275
  let t = m[1].trim();
@@ -38281,7 +38317,7 @@ var init_docs_model = __esm({
38281
38317
 
38282
38318
  // src/verify.ts
38283
38319
  import { join as join13 } from "node:path";
38284
- import { existsSync as existsSync8, readFileSync as readFileSync6 } from "node:fs";
38320
+ import { existsSync as existsSync8, readFileSync as readFileSync7 } from "node:fs";
38285
38321
  function scanCoverage(cwd) {
38286
38322
  const { root, docsDir, indexPath } = resolveRepo(cwd);
38287
38323
  const docsRoot = join13(root, docsDir);
@@ -38290,7 +38326,7 @@ function scanCoverage(cwd) {
38290
38326
  const corpus = walkDocs(docsRoot);
38291
38327
  const read = (rel) => {
38292
38328
  try {
38293
- return readFileSync6(join13(docsRoot, rel), "utf8");
38329
+ return readFileSync7(join13(docsRoot, rel), "utf8");
38294
38330
  } catch {
38295
38331
  return null;
38296
38332
  }
@@ -38333,9 +38369,9 @@ var init_docs_scan = __esm({
38333
38369
  });
38334
38370
 
38335
38371
  // src/index-edit.ts
38336
- import { readFileSync as readFileSync7, writeFileSync as writeFileSync2 } from "node:fs";
38372
+ import { readFileSync as readFileSync8, writeFileSync as writeFileSync2 } from "node:fs";
38337
38373
  function addLink(indexPath, relPath, category) {
38338
- let md = readFileSync7(indexPath, "utf8");
38374
+ let md = readFileSync8(indexPath, "utf8");
38339
38375
  if (md.includes(`(${relPath})`)) return;
38340
38376
  const base2 = relPath.split("/").pop().replace(/\.md$/, "");
38341
38377
  const line = `- [${base2}](${relPath})`;
@@ -38365,7 +38401,7 @@ __export(docs_index_exports, {
38365
38401
  });
38366
38402
  import { parseArgs as parseArgs2 } from "node:util";
38367
38403
  import { join as join14 } from "node:path";
38368
- import { existsSync as existsSync9, readFileSync as readFileSync8 } from "node:fs";
38404
+ import { existsSync as existsSync9, readFileSync as readFileSync9 } from "node:fs";
38369
38405
  async function docs_index_default(args, ctx) {
38370
38406
  const { values } = parseArgs2({ args, options: { check: { type: "boolean" }, fix: { type: "boolean" } }, allowPositionals: true });
38371
38407
  const { root, docsDir, indexPath } = resolveRepo(ctx.cwd);
@@ -38373,7 +38409,7 @@ async function docs_index_default(args, ctx) {
38373
38409
  const corpus = walkDocs(docsRoot);
38374
38410
  const read = (rel) => {
38375
38411
  try {
38376
- return readFileSync8(join14(docsRoot, rel), "utf8");
38412
+ return readFileSync9(join14(docsRoot, rel), "utf8");
38377
38413
  } catch {
38378
38414
  return null;
38379
38415
  }
@@ -38538,10 +38574,10 @@ var pack_exports = {};
38538
38574
  __export(pack_exports, {
38539
38575
  default: () => pack
38540
38576
  });
38541
- import { cpSync, existsSync as existsSync10, mkdirSync as mkdirSync3, readFileSync as readFileSync9, rmSync, writeFileSync as writeFileSync3 } from "node:fs";
38577
+ import { cpSync, existsSync as existsSync10, mkdirSync as mkdirSync3, readFileSync as readFileSync10, rmSync as rmSync2, writeFileSync as writeFileSync3 } from "node:fs";
38542
38578
  import { dirname as dirname8, join as join16 } from "node:path";
38543
38579
  function depVersions(repo) {
38544
- const read = (p3) => JSON.parse(readFileSync9(join16(repo, p3), "utf8"));
38580
+ const read = (p3) => JSON.parse(readFileSync10(join16(repo, p3), "utf8"));
38545
38581
  const server = read("server/package.json"), cli = read("cli/package.json");
38546
38582
  const pools = [server.dependencies, server.devDependencies, cli.dependencies, cli.devDependencies];
38547
38583
  const out = {};
@@ -38567,7 +38603,7 @@ async function pack(argv, ctx) {
38567
38603
  }
38568
38604
  const outIdx = argv.indexOf("--out");
38569
38605
  const out = outIdx === -1 ? join16(repo, "dist-npm") : join16(repo, argv[outIdx + 1] ?? "dist-npm");
38570
- const version2 = JSON.parse(readFileSync9(join16(repo, "package.json"), "utf8")).version;
38606
+ const version2 = JSON.parse(readFileSync10(join16(repo, "package.json"), "utf8")).version;
38571
38607
  if (!version2) {
38572
38608
  ctx.stderr("pack: root package.json tanpa field version\n");
38573
38609
  return 1;
@@ -38580,7 +38616,7 @@ async function pack(argv, ctx) {
38580
38616
  `);
38581
38617
  return 1;
38582
38618
  }
38583
- rmSync(out, { recursive: true, force: true });
38619
+ rmSync2(out, { recursive: true, force: true });
38584
38620
  mkdirSync3(join16(out, "bin"), { recursive: true });
38585
38621
  for (const item of copyPlan(repo)) {
38586
38622
  if (!existsSync10(item.from)) {
@@ -38619,13 +38655,13 @@ var verify_packed_exports = {};
38619
38655
  __export(verify_packed_exports, {
38620
38656
  default: () => verifyPacked
38621
38657
  });
38622
- import { readFileSync as readFileSync10 } from "node:fs";
38658
+ import { readFileSync as readFileSync11 } from "node:fs";
38623
38659
  import { join as join17 } from "node:path";
38624
38660
  function verifyPacked(_argv, ctx) {
38625
38661
  const path = join17(process.cwd(), "package.json");
38626
38662
  let pkg;
38627
38663
  try {
38628
- pkg = JSON.parse(readFileSync10(path, "utf8"));
38664
+ pkg = JSON.parse(readFileSync11(path, "utf8"));
38629
38665
  } catch {
38630
38666
  ctx.stderr(`verify: tak bisa membaca ${path}
38631
38667
  `);