hanoman 0.3.3 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/build-info.json +3 -3
- package/dist/cli.js +120 -8
- package/dist/server.js +1430 -794
- package/package.json +1 -1
- package/prisma/migrations/20260914120000_agent_invocation_phase/migration.sql +3 -0
- package/prisma/schema.prisma +3 -0
- package/web/assets/{ChangelogScreen-D_-RmJkz.js → ChangelogScreen-aqsJmmfe.js} +1 -1
- package/web/assets/{DalangHanomanScreen-pVfnLx9z.js → DalangHanomanScreen-D3rNURz7.js} +1 -1
- package/web/assets/{DocPreviewModal-ZFjISCL0.js → DocPreviewModal-B7r_7p8N.js} +1 -1
- package/web/assets/{DocsWorkspace-Vp_vik3v.js → DocsWorkspace-_w6pncu9.js} +1 -1
- package/web/assets/{IdeScreen-DQSRs3fr.js → IdeScreen-etZ2QyO-.js} +1 -1
- package/web/assets/{LeadScreen-Bv5LiudD.js → LeadScreen-Bo0K2-ML.js} +1 -1
- package/web/assets/{ReviewScreen-Cime4Tci.js → ReviewScreen-lRf2FW30.js} +1 -1
- package/web/assets/{SchedulerScreen-DKmRNbTs.js → SchedulerScreen-D75twy4J.js} +1 -1
- package/web/assets/SettingsScreen-rMIR22vv.js +62 -0
- package/web/assets/{TeamScreen-5ugoXsOv.js → TeamScreen-nsttkE2J.js} +1 -1
- package/web/assets/TerminalScreen-BG9vRE1-.js +9 -0
- package/web/assets/{TriageScreen-BajACF5K.js → TriageScreen-7eM8gjr_.js} +1 -1
- package/web/assets/{VpsScreen-C7muNRX5.js → VpsScreen-C29j52Tu.js} +1 -1
- package/web/assets/{diff-view-CsZPBznT.js → diff-view-RZNZ9Nz6.js} +1 -1
- package/web/assets/{index-DI7G_sit.js → index-BHI_f9DD.js} +192 -192
- package/web/assets/{live-DVDstDzi.js → live-CniaVDeP.js} +1 -1
- package/web/index.html +1 -1
- package/web/assets/SettingsScreen-Bh8XhyVQ.js +0 -62
- package/web/assets/TerminalScreen-DsAn5dlH.js +0 -9
package/dist/build-info.json
CHANGED
package/dist/cli.js
CHANGED
|
@@ -4422,7 +4422,7 @@ function cmpVersion(a, b) {
|
|
|
4422
4422
|
}
|
|
4423
4423
|
return 0;
|
|
4424
4424
|
}
|
|
4425
|
-
var zProject, zBriefPayload, zQaPayload, zGoalPayload, zSpecBlocker, zSourceChange, zManualDone, zSpec, NOTIFY_SOUNDS, zCodex, CODEX_DEFAULTS, zSourceCommon, zScheduler, SCHEDULER_DEFAULTS, zGoal, GOAL_DEFAULTS, zConflict, CONFLICT_DEFAULTS, CHANGELOG_ENGINE_DEFAULTS, zLeadEngine, zLead, LEAD_DEFAULTS, zPortalChat, PORTAL_CHAT_DEFAULTS, zSetting, zNotification, zDocFile, zDeviceTokenView;
|
|
4425
|
+
var zProject, zBriefPayload, zQaPayload, zGoalPayload, zSpecBlocker, zSourceChange, zManualDone, zSpec, NOTIFY_SOUNDS, zCodex, CODEX_DEFAULTS, zSourceCommon, zScheduler, SCHEDULER_DEFAULTS, zGoal, GOAL_DEFAULTS, zConflict, CONFLICT_DEFAULTS, CHANGELOG_ENGINE_DEFAULTS, zLeadEngine, zLead, LEAD_DEFAULTS, zPortalChat, PORTAL_CHAT_DEFAULTS, zPhaseCell, zFlowOrchestration, zOrchestration, ORCHESTRATION_DEFAULTS, zSetting, zNotification, zDocFile, zDeviceTokenView;
|
|
4426
4426
|
var init_entities = __esm({
|
|
4427
4427
|
"../shared/src/entities.ts"() {
|
|
4428
4428
|
"use strict";
|
|
@@ -4630,6 +4630,27 @@ var init_entities = __esm({
|
|
|
4630
4630
|
timeoutSec: external_exports.number().int().min(10).max(900).default(180)
|
|
4631
4631
|
});
|
|
4632
4632
|
PORTAL_CHAT_DEFAULTS = zPortalChat.parse({});
|
|
4633
|
+
zPhaseCell = external_exports.object({
|
|
4634
|
+
model: external_exports.string().nullable().default(null),
|
|
4635
|
+
effort: external_exports.string().nullable().default(null)
|
|
4636
|
+
});
|
|
4637
|
+
zFlowOrchestration = external_exports.object({
|
|
4638
|
+
enabled: external_exports.boolean().default(true),
|
|
4639
|
+
claude: external_exports.record(external_exports.string(), zPhaseCell).default({}),
|
|
4640
|
+
codex: external_exports.record(external_exports.string(), zPhaseCell).default({})
|
|
4641
|
+
});
|
|
4642
|
+
zOrchestration = external_exports.object({
|
|
4643
|
+
feature: zFlowOrchestration.default({}),
|
|
4644
|
+
qa: zFlowOrchestration.default({}),
|
|
4645
|
+
scaffold: zFlowOrchestration.default({}),
|
|
4646
|
+
reverse: zFlowOrchestration.default({}),
|
|
4647
|
+
prd: zFlowOrchestration.default({}),
|
|
4648
|
+
audit: zFlowOrchestration.default({}),
|
|
4649
|
+
breakdown: zFlowOrchestration.default({}),
|
|
4650
|
+
goal: zFlowOrchestration.default({}),
|
|
4651
|
+
no_effort: zFlowOrchestration.default({})
|
|
4652
|
+
});
|
|
4653
|
+
ORCHESTRATION_DEFAULTS = zOrchestration.parse({});
|
|
4633
4654
|
zSetting = external_exports.object({
|
|
4634
4655
|
model: external_exports.string().default("claude-opus-5"),
|
|
4635
4656
|
effort: external_exports.string().default("xhigh"),
|
|
@@ -4672,6 +4693,8 @@ var init_entities = __esm({
|
|
|
4672
4693
|
// SPEC-518 · agen pembuat changelog (opt-in, mati)
|
|
4673
4694
|
portalChat: zPortalChat.default(PORTAL_CHAT_DEFAULTS),
|
|
4674
4695
|
// SPEC-854 · ADR-0130 · chat portal klien (opt-in, mati)
|
|
4696
|
+
orchestration: zOrchestration.default(ORCHESTRATION_DEFAULTS),
|
|
4697
|
+
// ADR-0164 · orkestrasi subagent per fase (default aktif)
|
|
4675
4698
|
// SPEC-881 · ADR-0136 · sidik jari isi bawaan yang TERAKHIR ditulis seed di mesin ini, per nama
|
|
4676
4699
|
// agen. Dipakai seed untuk membedakan "belum pernah disunting operator" dari "sudah". WAJIB
|
|
4677
4700
|
// dideklarasikan di sini: zod membuang kunci tak dikenal dan `PUT /settings` menulis balik hasil
|
|
@@ -4716,6 +4739,31 @@ var init_entities = __esm({
|
|
|
4716
4739
|
}
|
|
4717
4740
|
});
|
|
4718
4741
|
|
|
4742
|
+
// ../shared/src/orchestration.ts
|
|
4743
|
+
var PHASE_AGENT_PREFIX, isPhaseAgentName;
|
|
4744
|
+
var init_orchestration = __esm({
|
|
4745
|
+
"../shared/src/orchestration.ts"() {
|
|
4746
|
+
"use strict";
|
|
4747
|
+
PHASE_AGENT_PREFIX = "hanoman-fase-";
|
|
4748
|
+
isPhaseAgentName = (name) => name.startsWith(PHASE_AGENT_PREFIX);
|
|
4749
|
+
}
|
|
4750
|
+
});
|
|
4751
|
+
|
|
4752
|
+
// ../shared/src/orchestration-plan.ts
|
|
4753
|
+
function codexNativeAgentsSupported(version3) {
|
|
4754
|
+
const parsed = version3 ? /(\d+)\.(\d+)\.(\d+)/.exec(version3)?.[0] : null;
|
|
4755
|
+
return parsed ? cmpVersion(parsed, CODEX_NATIVE_AGENTS_MIN_CLIENT) >= 0 : false;
|
|
4756
|
+
}
|
|
4757
|
+
var CODEX_NATIVE_AGENTS_MIN_CLIENT;
|
|
4758
|
+
var init_orchestration_plan = __esm({
|
|
4759
|
+
"../shared/src/orchestration-plan.ts"() {
|
|
4760
|
+
"use strict";
|
|
4761
|
+
init_entities();
|
|
4762
|
+
init_orchestration();
|
|
4763
|
+
CODEX_NATIVE_AGENTS_MIN_CLIENT = "0.151.0";
|
|
4764
|
+
}
|
|
4765
|
+
});
|
|
4766
|
+
|
|
4719
4767
|
// ../shared/src/agent.ts
|
|
4720
4768
|
var CAPABILITY_IDS, zCapability, zCapabilityInfo, zAgentTokenView, zAgentTokenCreate, zAgentTokenPatch;
|
|
4721
4769
|
var init_agent = __esm({
|
|
@@ -4819,6 +4867,7 @@ var init_custom_agent = __esm({
|
|
|
4819
4867
|
"../shared/src/custom-agent.ts"() {
|
|
4820
4868
|
"use strict";
|
|
4821
4869
|
init_zod();
|
|
4870
|
+
init_orchestration();
|
|
4822
4871
|
AGENT_RUNTIMES = ["claude", "codex"];
|
|
4823
4872
|
zAgentRuntime = external_exports.enum(AGENT_RUNTIMES);
|
|
4824
4873
|
AGENT_ACTIVATIONS = ["always", "smart"];
|
|
@@ -4858,7 +4907,9 @@ var init_custom_agent = __esm({
|
|
|
4858
4907
|
});
|
|
4859
4908
|
zCreateCustomAgentFields = external_exports.object({
|
|
4860
4909
|
projectId: external_exports.string().nullable().optional(),
|
|
4861
|
-
|
|
4910
|
+
// ADR-0164 · awalan agen fase dicadangkan — registry native berkunci nama, jadi custom agent
|
|
4911
|
+
// bernama sama akan menimpa agen fase sesi orchestrator tanpa satu pun galat.
|
|
4912
|
+
name: external_exports.string().regex(AGENT_NAME_RE).refine((n2) => !isPhaseAgentName(n2), { message: `awalan ${PHASE_AGENT_PREFIX} dicadangkan untuk agen fase hanoman` }),
|
|
4862
4913
|
description: external_exports.string().trim().min(1).max(500),
|
|
4863
4914
|
instructions: external_exports.string().trim().min(1).max(2e4),
|
|
4864
4915
|
tools: external_exports.array(external_exports.string()).nullable().optional(),
|
|
@@ -11408,6 +11459,8 @@ var init_src = __esm({
|
|
|
11408
11459
|
init_method_status();
|
|
11409
11460
|
init_agent_engine();
|
|
11410
11461
|
init_entities();
|
|
11462
|
+
init_orchestration();
|
|
11463
|
+
init_orchestration_plan();
|
|
11411
11464
|
init_agent();
|
|
11412
11465
|
init_custom_agent();
|
|
11413
11466
|
init_builtin_agents();
|
|
@@ -11651,10 +11704,6 @@ var init_runtime_profile = __esm({
|
|
|
11651
11704
|
});
|
|
11652
11705
|
|
|
11653
11706
|
// ../runner/src/codex-agent-config.ts
|
|
11654
|
-
function codexNativeAgentsSupported(version3) {
|
|
11655
|
-
const parsed = version3 ? /(\d+)\.(\d+)\.(\d+)/.exec(version3)?.[0] : null;
|
|
11656
|
-
return parsed ? cmpVersion(parsed, CODEX_NATIVE_AGENTS_MIN_CLIENT) >= 0 : false;
|
|
11657
|
-
}
|
|
11658
11707
|
function codexNativeVersionProbe(env, codexBin = env.HANOMAN_CODEX_BIN ?? "codex") {
|
|
11659
11708
|
const sandbox = env.HANOMAN_SESSION_SANDBOX ?? (resolveHardening(env) ? "required" : "off");
|
|
11660
11709
|
if (sandbox !== "podman") return { bin: codexBin, args: ["--version"] };
|
|
@@ -11675,14 +11724,13 @@ function codexNativeVersionProbe(env, codexBin = env.HANOMAN_CODEX_BIN ?? "codex
|
|
|
11675
11724
|
]
|
|
11676
11725
|
};
|
|
11677
11726
|
}
|
|
11678
|
-
var
|
|
11727
|
+
var shellQuote;
|
|
11679
11728
|
var init_codex_agent_config = __esm({
|
|
11680
11729
|
"../runner/src/codex-agent-config.ts"() {
|
|
11681
11730
|
"use strict";
|
|
11682
11731
|
init_src();
|
|
11683
11732
|
init_custom_agents();
|
|
11684
11733
|
init_runtime_profile();
|
|
11685
|
-
CODEX_NATIVE_AGENTS_MIN_CLIENT = "0.151.0";
|
|
11686
11734
|
shellQuote = (value) => `'${value.replaceAll("'", "'\\''")}'`;
|
|
11687
11735
|
}
|
|
11688
11736
|
});
|
|
@@ -11704,6 +11752,33 @@ var init_agent_definition = __esm({
|
|
|
11704
11752
|
}
|
|
11705
11753
|
});
|
|
11706
11754
|
|
|
11755
|
+
// ../runner/src/phase-agents.ts
|
|
11756
|
+
var PHASE_AGENT_RULES, PHASE_AGENT_REPORT;
|
|
11757
|
+
var init_phase_agents = __esm({
|
|
11758
|
+
"../runner/src/phase-agents.ts"() {
|
|
11759
|
+
"use strict";
|
|
11760
|
+
init_src();
|
|
11761
|
+
init_prompt();
|
|
11762
|
+
init_reverse_standard();
|
|
11763
|
+
PHASE_AGENT_RULES = [
|
|
11764
|
+
"Batas peran fase:",
|
|
11765
|
+
"- JANGAN menulis `$HANOMAN_PHASE_FILE` \u2014 orchestrator satu-satunya penulis marker fase.",
|
|
11766
|
+
"- JANGAN `git push` \u2014 push milik orchestrator. Commit artefak fasemu sendiri sebelum melapor.",
|
|
11767
|
+
`- JANGAN memanggil agen berawalan \`${PHASE_AGENT_PREFIX}\`. Custom agent lain boleh dipanggil bila relevan.`,
|
|
11768
|
+
"- Kerjakan HANYA fase ini; fase lain dikerjakan agen fasenya sendiri."
|
|
11769
|
+
].join("\n");
|
|
11770
|
+
PHASE_AGENT_REPORT = [
|
|
11771
|
+
"Kontrak laporan (wajib, di akhir):",
|
|
11772
|
+
"- Baris pertama: `Status: selesai | sebagian | terhalang`.",
|
|
11773
|
+
"- `Artefak:` path berkas yang kamu tulis/ubah.",
|
|
11774
|
+
"- `Bukti:` perintah yang dijalankan beserta hasil yang benar-benar kamu baca.",
|
|
11775
|
+
"- `Pertanyaan untuk manusia:` (opsional) SATU pertanyaan; bila ada, berhenti di situ.",
|
|
11776
|
+
"- `Rekomendasi fase:` (opsional) mis. `jalur-cepat` sesudah Audit qa.",
|
|
11777
|
+
"Klaim tanpa bukti bukan bukti. Maksimal 1200 kata."
|
|
11778
|
+
].join("\n");
|
|
11779
|
+
}
|
|
11780
|
+
});
|
|
11781
|
+
|
|
11707
11782
|
// ../runner/src/custom-agent-eval-evidence.ts
|
|
11708
11783
|
var init_custom_agent_eval_evidence = __esm({
|
|
11709
11784
|
"../runner/src/custom-agent-eval-evidence.ts"() {
|
|
@@ -12158,6 +12233,41 @@ var init_sandbox_probe = __esm({
|
|
|
12158
12233
|
}
|
|
12159
12234
|
});
|
|
12160
12235
|
|
|
12236
|
+
// ../runner/src/subagent-statusline.ts
|
|
12237
|
+
var SUBAGENT_STATUSLINE_SCRIPT;
|
|
12238
|
+
var init_subagent_statusline = __esm({
|
|
12239
|
+
"../runner/src/subagent-statusline.ts"() {
|
|
12240
|
+
"use strict";
|
|
12241
|
+
init_src();
|
|
12242
|
+
SUBAGENT_STATUSLINE_SCRIPT = [
|
|
12243
|
+
'const fs = require("node:fs");',
|
|
12244
|
+
"const labelsPath = process.argv[2];",
|
|
12245
|
+
'let raw = "";',
|
|
12246
|
+
'process.stdin.setEncoding("utf8");',
|
|
12247
|
+
'process.stdin.on("data", (c) => { raw += c; });',
|
|
12248
|
+
'process.stdin.on("end", () => {',
|
|
12249
|
+
" try {",
|
|
12250
|
+
' const labels = JSON.parse(fs.readFileSync(labelsPath, "utf8"));',
|
|
12251
|
+
" const tasks = JSON.parse(raw).tasks || [];",
|
|
12252
|
+
" const rows = [];",
|
|
12253
|
+
" for (const t of tasks) {",
|
|
12254
|
+
' if (!t || typeof t.id !== "string" || typeof t.model !== "string") continue;',
|
|
12255
|
+
' const parts = [t.label || t.description || "subagent", labels[t.model] || t.model];',
|
|
12256
|
+
' if (typeof t.effort === "string") parts.push(t.effort);',
|
|
12257
|
+
' if (typeof t.startTime === "number") {',
|
|
12258
|
+
" const s = Math.max(0, Math.round((Date.now() - t.startTime) / 1000));",
|
|
12259
|
+
' parts.push(s >= 60 ? Math.floor(s / 60) + "m" + String(s % 60).padStart(2, "0") + "s" : s + "s");',
|
|
12260
|
+
" }",
|
|
12261
|
+
' if (typeof t.tokenCount === "number" && t.tokenCount > 0) parts.push(Math.round(t.tokenCount / 1000) + "k tok");',
|
|
12262
|
+
' rows.push(JSON.stringify({ id: t.id, content: parts.join(" \xB7 ") }));',
|
|
12263
|
+
" }",
|
|
12264
|
+
' if (rows.length) process.stdout.write(rows.join("\\n") + "\\n");',
|
|
12265
|
+
" } catch {}",
|
|
12266
|
+
"});"
|
|
12267
|
+
].join("\n");
|
|
12268
|
+
}
|
|
12269
|
+
});
|
|
12270
|
+
|
|
12161
12271
|
// ../runner/src/index.ts
|
|
12162
12272
|
var init_src2 = __esm({
|
|
12163
12273
|
"../runner/src/index.ts"() {
|
|
@@ -12173,6 +12283,7 @@ var init_src2 = __esm({
|
|
|
12173
12283
|
init_agent_cli();
|
|
12174
12284
|
init_custom_agents();
|
|
12175
12285
|
init_agent_definition();
|
|
12286
|
+
init_phase_agents();
|
|
12176
12287
|
init_agent_readonly();
|
|
12177
12288
|
init_codex_agent_config();
|
|
12178
12289
|
init_custom_agent_eval();
|
|
@@ -12185,6 +12296,7 @@ var init_src2 = __esm({
|
|
|
12185
12296
|
init_config_env();
|
|
12186
12297
|
init_runtime_profile();
|
|
12187
12298
|
init_sandbox_probe();
|
|
12299
|
+
init_subagent_statusline();
|
|
12188
12300
|
}
|
|
12189
12301
|
});
|
|
12190
12302
|
|