hanoman 0.1.13 → 0.1.15
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 +59 -21
- package/dist/server.js +667 -134
- package/docs/agent-integration.md +429 -0
- package/package.json +2 -1
- package/web/assets/{index-DRwKLKdp.js → index-DRv31V2x.js} +1540 -1536
- package/web/index.html +1 -1
package/dist/build-info.json
CHANGED
package/dist/cli.js
CHANGED
|
@@ -4281,16 +4281,34 @@ var init_enums = __esm({
|
|
|
4281
4281
|
}
|
|
4282
4282
|
});
|
|
4283
4283
|
|
|
4284
|
+
// ../shared/src/agent-engine.ts
|
|
4285
|
+
var zAgentEngine;
|
|
4286
|
+
var init_agent_engine = __esm({
|
|
4287
|
+
"../shared/src/agent-engine.ts"() {
|
|
4288
|
+
"use strict";
|
|
4289
|
+
init_zod();
|
|
4290
|
+
init_enums();
|
|
4291
|
+
zAgentEngine = external_exports.object({
|
|
4292
|
+
enabled: external_exports.boolean().default(false),
|
|
4293
|
+
agent: zAgent.default("claude"),
|
|
4294
|
+
model: external_exports.string().default("claude-opus-5"),
|
|
4295
|
+
effort: external_exports.string().default("xhigh")
|
|
4296
|
+
});
|
|
4297
|
+
}
|
|
4298
|
+
});
|
|
4299
|
+
|
|
4284
4300
|
// ../shared/src/telegram.ts
|
|
4285
4301
|
var zTelegramSettings, TELEGRAM_DEFAULTS, zTelegramReadiness, zTelegramGatewayStatus, zTelegramMemoryRecord, zTelegramChatContext, TELEGRAM_REPLY_KINDS, zTelegramReplyKind, zTelegramConfirmationRequest, zTelegramReplyInput, zTelegramAuditRecord, zTerminalSteerInput;
|
|
4286
4302
|
var init_telegram = __esm({
|
|
4287
4303
|
"../shared/src/telegram.ts"() {
|
|
4288
4304
|
"use strict";
|
|
4289
4305
|
init_zod();
|
|
4306
|
+
init_agent_engine();
|
|
4290
4307
|
init_enums();
|
|
4291
4308
|
zTelegramSettings = external_exports.object({
|
|
4292
4309
|
enabled: external_exports.boolean().default(false),
|
|
4293
|
-
progress: external_exports.boolean().default(true)
|
|
4310
|
+
progress: external_exports.boolean().default(true),
|
|
4311
|
+
engine: zAgentEngine.default({})
|
|
4294
4312
|
});
|
|
4295
4313
|
TELEGRAM_DEFAULTS = zTelegramSettings.parse({});
|
|
4296
4314
|
zTelegramReadiness = external_exports.enum([
|
|
@@ -4407,6 +4425,7 @@ var init_entities = __esm({
|
|
|
4407
4425
|
init_zod();
|
|
4408
4426
|
init_enums();
|
|
4409
4427
|
init_telegram();
|
|
4428
|
+
init_agent_engine();
|
|
4410
4429
|
init_auto_merge();
|
|
4411
4430
|
zProject = external_exports.object({
|
|
4412
4431
|
id: external_exports.string(),
|
|
@@ -4528,12 +4547,7 @@ var init_entities = __esm({
|
|
|
4528
4547
|
effort: external_exports.string().default("xhigh")
|
|
4529
4548
|
});
|
|
4530
4549
|
CONFLICT_DEFAULTS = zConflict.parse({});
|
|
4531
|
-
zLeadEngine =
|
|
4532
|
-
enabled: external_exports.boolean().default(false),
|
|
4533
|
-
agent: zAgent.default("claude"),
|
|
4534
|
-
model: external_exports.string().default("claude-opus-5"),
|
|
4535
|
-
effort: external_exports.string().default("xhigh")
|
|
4536
|
-
});
|
|
4550
|
+
zLeadEngine = zAgentEngine;
|
|
4537
4551
|
zLead = external_exports.object({
|
|
4538
4552
|
enabled: external_exports.boolean().default(false),
|
|
4539
4553
|
// master switch (AC-30)
|
|
@@ -5384,6 +5398,9 @@ var init_api = __esm({
|
|
|
5384
5398
|
limits: `${API}/limits`,
|
|
5385
5399
|
// SPEC-339 · versi codex CLI (peringatan lunak model GPT-5.6).
|
|
5386
5400
|
codexVersion: `${API}/codex/version`,
|
|
5401
|
+
// SPEC-489 · panduan AI agent — markdown MENTAH & PUBLIC (tanpa auth). Satu definisi URL untuk
|
|
5402
|
+
// klien web dan untuk tautan yang disalin operator ke agennya.
|
|
5403
|
+
agentDoc: `${API}/agent-integration.md`,
|
|
5387
5404
|
docs: (id) => `${API}/projects/${id}/docs`,
|
|
5388
5405
|
docFile: (id, path) => `${API}/projects/${id}/docs/${path}`,
|
|
5389
5406
|
// SPEC-210 · dokumen PRD project (freshest-wins: worktree sesi prd hidup > repoDir)
|
|
@@ -5662,6 +5679,7 @@ var init_config_registry = __esm({
|
|
|
5662
5679
|
kind: "url",
|
|
5663
5680
|
apply: "live",
|
|
5664
5681
|
category: "knob",
|
|
5682
|
+
example: "https://hanoman.nafanesia.id",
|
|
5665
5683
|
help: "Base URL hub tujuan sync (REST + WS). Kosong = instance ini murni HUB."
|
|
5666
5684
|
},
|
|
5667
5685
|
{
|
|
@@ -5671,6 +5689,7 @@ var init_config_registry = __esm({
|
|
|
5671
5689
|
kind: "secret",
|
|
5672
5690
|
apply: "live",
|
|
5673
5691
|
category: "credential",
|
|
5692
|
+
example: "43 karakter base64url dari tab Perangkat hub",
|
|
5674
5693
|
help: "Token yang diterbitkan hub (tab Perangkat di hub). Dikirim sebagai Bearer."
|
|
5675
5694
|
},
|
|
5676
5695
|
{
|
|
@@ -5680,6 +5699,7 @@ var init_config_registry = __esm({
|
|
|
5680
5699
|
kind: "int",
|
|
5681
5700
|
apply: "live",
|
|
5682
5701
|
category: "knob",
|
|
5702
|
+
example: "15000",
|
|
5683
5703
|
default: "15000",
|
|
5684
5704
|
min: 1e3
|
|
5685
5705
|
},
|
|
@@ -5691,13 +5711,14 @@ var init_config_registry = __esm({
|
|
|
5691
5711
|
kind: "secret",
|
|
5692
5712
|
apply: "new-session",
|
|
5693
5713
|
category: "credential",
|
|
5714
|
+
example: "sk-ant-oat01-\u2026",
|
|
5694
5715
|
inheritEnv: true,
|
|
5695
5716
|
help: "Token `claude setup-token`. Diwarisi proses claude yang di-spawn."
|
|
5696
5717
|
},
|
|
5697
|
-
{ key: "ANTHROPIC_API_KEY", group: "claude", label: "Anthropic API key", kind: "secret", apply: "new-session", category: "credential", inheritEnv: true },
|
|
5698
|
-
{ key: "HANOMAN_CLAUDE_BIN", group: "claude", label: "Biner claude", kind: "path", apply: "new-session", category: "knob", default: "claude" },
|
|
5718
|
+
{ key: "ANTHROPIC_API_KEY", group: "claude", label: "Anthropic API key", kind: "secret", apply: "new-session", category: "credential", example: "sk-ant-api03-\u2026", inheritEnv: true },
|
|
5719
|
+
{ key: "HANOMAN_CLAUDE_BIN", group: "claude", label: "Biner claude", kind: "path", apply: "new-session", category: "knob", example: "/opt/homebrew/bin/claude", default: "claude" },
|
|
5699
5720
|
// codex (SPEC-338 · ADR-0074)
|
|
5700
|
-
{ key: "HANOMAN_CODEX_BIN", group: "claude", label: "Biner codex", kind: "path", apply: "new-session", category: "knob", default: "codex" },
|
|
5721
|
+
{ key: "HANOMAN_CODEX_BIN", group: "claude", label: "Biner codex", kind: "path", apply: "new-session", category: "knob", example: "/opt/homebrew/bin/codex", default: "codex" },
|
|
5701
5722
|
{
|
|
5702
5723
|
key: "CLAUDE_CONFIG_DIR",
|
|
5703
5724
|
group: "claude",
|
|
@@ -5705,11 +5726,12 @@ var init_config_registry = __esm({
|
|
|
5705
5726
|
kind: "path",
|
|
5706
5727
|
apply: "new-session",
|
|
5707
5728
|
category: "knob",
|
|
5729
|
+
example: "~/.claude",
|
|
5708
5730
|
help: "Default ~/.claude. Sumber .credentials.json untuk panel usage/limit."
|
|
5709
5731
|
},
|
|
5710
5732
|
// vps
|
|
5711
|
-
{ key: "HANOMAN_SSH_KEY_DIR", group: "vps", label: "Dir key SSH", kind: "path", apply: "new-session", category: "knob", help: "Default ~/.hanoman." },
|
|
5712
|
-
{ key: "HANOMAN_SSH_BIN", group: "vps", label: "Biner ssh", kind: "path", apply: "new-session", category: "knob", default: "ssh" },
|
|
5733
|
+
{ key: "HANOMAN_SSH_KEY_DIR", group: "vps", label: "Dir key SSH", kind: "path", apply: "new-session", category: "knob", example: "~/.hanoman", help: "Default ~/.hanoman." },
|
|
5734
|
+
{ key: "HANOMAN_SSH_BIN", group: "vps", label: "Biner ssh", kind: "path", apply: "new-session", category: "knob", example: "/usr/bin/ssh", default: "ssh" },
|
|
5713
5735
|
// github (SPEC-471 · ADR-0095 · tarik issue → backlog). Dua mode auth, satu jalur kode:
|
|
5714
5736
|
// `gh` memakai keyring mesin; bila GITHUB_TOKEN diisi ia diteruskan sebagai GH_TOKEN ke
|
|
5715
5737
|
// proses gh DAN dipakai jalur REST (hub VPS yang tak punya keyring).
|
|
@@ -5720,6 +5742,7 @@ var init_config_registry = __esm({
|
|
|
5720
5742
|
kind: "secret",
|
|
5721
5743
|
apply: "live",
|
|
5722
5744
|
category: "credential",
|
|
5745
|
+
example: "ghp_\u2026",
|
|
5723
5746
|
help: "PAT scope `repo` (atau `public_repo`). Kosong = andalkan `gh auth login` di mesin ini."
|
|
5724
5747
|
},
|
|
5725
5748
|
{
|
|
@@ -5729,6 +5752,7 @@ var init_config_registry = __esm({
|
|
|
5729
5752
|
kind: "path",
|
|
5730
5753
|
apply: "live",
|
|
5731
5754
|
category: "knob",
|
|
5755
|
+
example: "/opt/homebrew/bin/gh",
|
|
5732
5756
|
default: "gh",
|
|
5733
5757
|
help: "Absen = tarik issue lewat HTTPS langsung ke api.github.com."
|
|
5734
5758
|
},
|
|
@@ -5741,6 +5765,7 @@ var init_config_registry = __esm({
|
|
|
5741
5765
|
kind: "secret",
|
|
5742
5766
|
apply: "live",
|
|
5743
5767
|
category: "credential",
|
|
5768
|
+
example: "123456789:AAE\u2026",
|
|
5744
5769
|
pattern: "^\\d{5,}:[A-Za-z0-9_-]{30,}$",
|
|
5745
5770
|
patternError: "format BotFather: <bot_id>:<secret>",
|
|
5746
5771
|
help: "Token dari BotFather. Disimpan terenkripsi; tak pernah dikembalikan utuh."
|
|
@@ -5752,6 +5777,7 @@ var init_config_registry = __esm({
|
|
|
5752
5777
|
kind: "secret",
|
|
5753
5778
|
apply: "live",
|
|
5754
5779
|
category: "credential",
|
|
5780
|
+
example: "hnm_agt_\u2026",
|
|
5755
5781
|
pattern: "^\\S{20,}$",
|
|
5756
5782
|
patternError: "plaintext AgentToken (hnm_agt_\u2026)",
|
|
5757
5783
|
help: "Plaintext AgentToken ber-capability Telegram. Dipakai session operator, bukan bot."
|
|
@@ -5763,6 +5789,7 @@ var init_config_registry = __esm({
|
|
|
5763
5789
|
kind: "string",
|
|
5764
5790
|
apply: "live",
|
|
5765
5791
|
category: "credential",
|
|
5792
|
+
example: "123456789, 987654321",
|
|
5766
5793
|
pattern: "^\\d+(?:[\\s,]+\\d+)*$",
|
|
5767
5794
|
patternError: "numeric user id, dipisah koma/spasi",
|
|
5768
5795
|
help: "Siapa yang boleh memerintah bot. Numeric Telegram user id, bukan username."
|
|
@@ -5774,12 +5801,13 @@ var init_config_registry = __esm({
|
|
|
5774
5801
|
kind: "string",
|
|
5775
5802
|
apply: "live",
|
|
5776
5803
|
category: "knob",
|
|
5804
|
+
example: "-1001234567890",
|
|
5777
5805
|
pattern: "^-?\\d+$",
|
|
5778
5806
|
patternError: "numeric chat id (channel/supergroup negatif)",
|
|
5779
5807
|
help: "Tujuan Test Connection. Kosong = pakai satu-satunya id di allowlist."
|
|
5780
5808
|
},
|
|
5781
5809
|
// runtime
|
|
5782
|
-
{ key: "HANOMAN_EVENTS_TICK_MS", group: "runtime", label: "Interval events (ms)", kind: "int", apply: "live", category: "knob", default: "1000", min: 100 },
|
|
5810
|
+
{ key: "HANOMAN_EVENTS_TICK_MS", group: "runtime", label: "Interval events (ms)", kind: "int", apply: "live", category: "knob", example: "1000", default: "1000", min: 100 },
|
|
5783
5811
|
{ key: "HANOMAN_UPDATE_FETCH", group: "runtime", label: "Deteksi update saat boot", kind: "bool", apply: "live", category: "knob", default: "1" },
|
|
5784
5812
|
// SPEC-398 · ADR-0087 · deteksi update kini membandingkan semver dengan registry npm, bukan
|
|
5785
5813
|
// menghitung commit di repo git (HANOMAN_REPO_ROOT dicabut bersama jalur git itu).
|
|
@@ -5790,6 +5818,7 @@ var init_config_registry = __esm({
|
|
|
5790
5818
|
kind: "string",
|
|
5791
5819
|
apply: "live",
|
|
5792
5820
|
category: "knob",
|
|
5821
|
+
example: "https://registry.npmjs.org",
|
|
5793
5822
|
default: "https://registry.npmjs.org",
|
|
5794
5823
|
help: "Sumber versi terbaru paket `hanoman`."
|
|
5795
5824
|
},
|
|
@@ -5800,15 +5829,16 @@ var init_config_registry = __esm({
|
|
|
5800
5829
|
kind: "string",
|
|
5801
5830
|
apply: "restart",
|
|
5802
5831
|
category: "knob",
|
|
5832
|
+
example: "hanoman",
|
|
5803
5833
|
default: "hanoman",
|
|
5804
5834
|
help: "Mengubah ini TIDAK memindahkan sesi tmux yang sudah hidup \u2014 berlaku setelah restart."
|
|
5805
5835
|
},
|
|
5806
5836
|
// gitGraph (SPEC-233 · preferensi tampilan git graph; semua live, dikonsumsi client)
|
|
5807
|
-
{ key: "gitGraph.style", group: "gitGraph", label: "Gaya graph", kind: "string", apply: "live", category: "knob", default: "rounded", help: "rounded | angular" },
|
|
5808
|
-
{ key: "gitGraph.colours", group: "gitGraph", label: "Warna lane (CSV)", kind: "string", apply: "live", category: "knob", help: "Daftar warna hex dipisah koma; kosong = palet bawaan." },
|
|
5809
|
-
{ key: "gitGraph.dateType", group: "gitGraph", label: "Jenis tanggal", kind: "string", apply: "live", category: "knob", default: "author", help: "author | commit" },
|
|
5810
|
-
{ key: "gitGraph.commitsInitialLoad", group: "gitGraph", label: "Muat awal", kind: "int", apply: "live", category: "knob", default: "200", min: 1 },
|
|
5811
|
-
{ key: "gitGraph.commitsLoadMore", group: "gitGraph", label: "Muat lagi", kind: "int", apply: "live", category: "knob", default: "100", min: 1 },
|
|
5837
|
+
{ key: "gitGraph.style", group: "gitGraph", label: "Gaya graph", kind: "string", apply: "live", category: "knob", example: "rounded", default: "rounded", help: "rounded | angular" },
|
|
5838
|
+
{ key: "gitGraph.colours", group: "gitGraph", label: "Warna lane (CSV)", kind: "string", apply: "live", category: "knob", example: "#c9a227, #6b8f71, #b4614e", help: "Daftar warna hex dipisah koma; kosong = palet bawaan." },
|
|
5839
|
+
{ key: "gitGraph.dateType", group: "gitGraph", label: "Jenis tanggal", kind: "string", apply: "live", category: "knob", example: "author", default: "author", help: "author | commit" },
|
|
5840
|
+
{ key: "gitGraph.commitsInitialLoad", group: "gitGraph", label: "Muat awal", kind: "int", apply: "live", category: "knob", example: "200", default: "200", min: 1 },
|
|
5841
|
+
{ key: "gitGraph.commitsLoadMore", group: "gitGraph", label: "Muat lagi", kind: "int", apply: "live", category: "knob", example: "100", default: "100", min: 1 },
|
|
5812
5842
|
{ key: "gitGraph.showRemoteBranches", group: "gitGraph", label: "Tampilkan remote", kind: "bool", apply: "live", category: "knob", default: "1" },
|
|
5813
5843
|
{ key: "gitGraph.showTags", group: "gitGraph", label: "Tampilkan tag", kind: "bool", apply: "live", category: "knob", default: "1" },
|
|
5814
5844
|
{ key: "gitGraph.showStashes", group: "gitGraph", label: "Tampilkan stash", kind: "bool", apply: "live", category: "knob", default: "1" },
|
|
@@ -5818,7 +5848,7 @@ var init_config_registry = __esm({
|
|
|
5818
5848
|
{ key: "gitGraph.combineLocalRemote", group: "gitGraph", label: "Gabung label local+remote", kind: "bool", apply: "live", category: "knob", default: "0" },
|
|
5819
5849
|
{ key: "gitGraph.markdown", group: "gitGraph", label: "Render markdown pesan", kind: "bool", apply: "live", category: "knob", default: "1" },
|
|
5820
5850
|
{ key: "gitGraph.emoji", group: "gitGraph", label: "Render emoji shortcode", kind: "bool", apply: "live", category: "knob", default: "1" },
|
|
5821
|
-
{ key: "gitGraph.issueLinkPattern", group: "gitGraph", label: "Pola link issue", kind: "string", apply: "live", category: "knob", help: "URL dengan $1 untuk nomor issue, mis. https://github.com/acme/app/issues/$1" },
|
|
5851
|
+
{ key: "gitGraph.issueLinkPattern", group: "gitGraph", label: "Pola link issue", kind: "string", apply: "live", category: "knob", example: "https://github.com/acme/app/issues/$1", help: "URL dengan $1 untuk nomor issue, mis. https://github.com/acme/app/issues/$1" },
|
|
5822
5852
|
// bootstrap (read-only)
|
|
5823
5853
|
{ key: "DATABASE_URL", group: "bootstrap", label: "DATABASE_URL", kind: "secret", apply: "restart", category: "bootstrap" },
|
|
5824
5854
|
{ key: "TEST_DATABASE_URL", group: "bootstrap", label: "TEST_DATABASE_URL", kind: "secret", apply: "restart", category: "bootstrap" },
|
|
@@ -6826,6 +6856,7 @@ var init_src = __esm({
|
|
|
6826
6856
|
"../shared/src/index.ts"() {
|
|
6827
6857
|
"use strict";
|
|
6828
6858
|
init_enums();
|
|
6859
|
+
init_agent_engine();
|
|
6829
6860
|
init_entities();
|
|
6830
6861
|
init_agent();
|
|
6831
6862
|
init_custom_agent();
|
|
@@ -28701,7 +28732,7 @@ function packageJsonFor(version3, deps) {
|
|
|
28701
28732
|
prepublishOnly: "node dist/cli.js __verify"
|
|
28702
28733
|
},
|
|
28703
28734
|
engines: { node: ">=20" },
|
|
28704
|
-
files: ["bin", "dist", "web", "prisma", "README.md", "LICENSE"],
|
|
28735
|
+
files: ["bin", "dist", "web", "prisma", "docs", "README.md", "LICENSE"],
|
|
28705
28736
|
dependencies: deps,
|
|
28706
28737
|
// MIT: paket ini didistribusikan publik supaya orang `npm i -g`. `UNLICENSED` berarti "tak ada
|
|
28707
28738
|
// izin pakai" — 0.1.0 terbit dengan kontradiksi itu, dan versi terbit tak bisa diperbaiki.
|
|
@@ -28723,6 +28754,9 @@ function copyPlan(repo) {
|
|
|
28723
28754
|
{ from: join10(repo, "server/prisma/schema.prisma"), to: "prisma/schema.prisma" },
|
|
28724
28755
|
{ from: join10(repo, "server/prisma/migrations"), to: "prisma/migrations", dir: true },
|
|
28725
28756
|
{ from: join10(repo, "internal/docs/operations/npm-readme.md"), to: "README.md" },
|
|
28757
|
+
// SPEC-489 · dibaca runtime oleh pickGuideFile (kandidat `<pkg>/docs/…`). Bukan README:
|
|
28758
|
+
// README paket adalah npm-readme.md (berhadapan-MANUSIA), ini naskah berhadapan-AGEN.
|
|
28759
|
+
{ from: join10(repo, "docs/agent-integration.md"), to: "docs/agent-integration.md" },
|
|
28726
28760
|
{ from: join10(repo, "LICENSE"), to: "LICENSE" }
|
|
28727
28761
|
];
|
|
28728
28762
|
}
|
|
@@ -28751,7 +28785,11 @@ var init_pack = __esm({
|
|
|
28751
28785
|
"prisma/schema.prisma",
|
|
28752
28786
|
"web/index.html",
|
|
28753
28787
|
"README.md",
|
|
28754
|
-
"LICENSE"
|
|
28788
|
+
"LICENSE",
|
|
28789
|
+
// SPEC-489 · naskah panduan AI agent — dibaca runtime & disajikan di GET /api/agent-integration.md.
|
|
28790
|
+
// Tanpa gerbang ini paket bisa terbit tanpa dokumen dan endpoint-nya 404 di SETIAP instalasi npm,
|
|
28791
|
+
// sementara checkout dev terlihat sehat.
|
|
28792
|
+
"docs/agent-integration.md"
|
|
28755
28793
|
];
|
|
28756
28794
|
BIN_SHIM = `#!/usr/bin/env node
|
|
28757
28795
|
// SPEC-398 \xB7 shim tipis: seluruh logika ada di dist/cli.js (bundle esbuild).
|