hanoman 0.9.39 → 0.9.41
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 +95 -3
- package/dist/server.js +1771 -621
- package/docs/agent-integration.md +6 -0
- package/package.json +1 -1
- package/prisma/migrations/20261101090000_runtime_account/migration.sql +18 -0
- package/prisma/migrations/20261108090000_session_agent_session_id/migration.sql +2 -0
- package/prisma/schema.prisma +22 -0
- package/web/assets/{DalangHanomanScreen-wpAO0xvb.js → DalangHanomanScreen-BBByhG99.js} +1 -1
- package/web/assets/{DocPreviewModal-CbhkDUJ2.js → DocPreviewModal-CQY4THbu.js} +1 -1
- package/web/assets/{DocsWorkspace-CcB0LGFV.js → DocsWorkspace-C6pT1E7m.js} +1 -1
- package/web/assets/{IdeScreen-DI4v3ZkU.js → IdeScreen-BLFtTk_L.js} +1 -1
- package/web/assets/{LeadScreen-BdS_xX_f.js → LeadScreen-jkt1heEV.js} +1 -1
- package/web/assets/{ReviewScreen-Ddw5U2sM.js → ReviewScreen-wUPVe5KU.js} +1 -1
- package/web/assets/{SchedulerScreen-D6LGVrhM.js → SchedulerScreen-DWz8dSHR.js} +1 -1
- package/web/assets/{SettingsScreen-DQZ3K43g.css → SettingsScreen-B7CruwHq.css} +1 -1
- package/web/assets/SettingsScreen-CK252KAu.js +62 -0
- package/web/assets/{TeamScreen-BkxPDI5P.js → TeamScreen-PNeLa4KQ.js} +1 -1
- package/web/assets/TerminalScreen-D_nXSBk6.js +2 -0
- package/web/assets/{TriageScreen-B-HdZsEt.js → TriageScreen-Bntfin0b.js} +1 -1
- package/web/assets/{VpsScreen-CWp29NL_.js → VpsScreen-DugFaqzS.js} +2 -2
- package/web/assets/fields-ADsZ83ci.js +1 -0
- package/web/assets/{index-B4b6i2tH.css → index-B0VYqeq_.css} +1 -1
- package/web/assets/{index-C4Py9MJV.js → index-BIwgmLXG.js} +212 -212
- package/web/assets/{live-CBa_7-hn.js → live-BIDo2oKi.js} +1 -1
- package/web/assets/{sched-lead-shared-CQIoYIzG.js → sched-lead-shared-BGQiQkHX.js} +1 -1
- package/web/assets/{settings-rebase-C3611gs8.js → settings-rebase-CF06reBv.js} +1 -1
- package/web/index.html +2 -2
- package/web/assets/SettingsScreen-CFNcg1T8.js +0 -62
- package/web/assets/TerminalScreen-CEQFK9Rc.js +0 -2
- package/web/assets/fields-BY7SYerd.js +0 -1
package/dist/build-info.json
CHANGED
package/dist/cli.js
CHANGED
|
@@ -4142,6 +4142,27 @@ var init_enums = __esm({
|
|
|
4142
4142
|
}
|
|
4143
4143
|
});
|
|
4144
4144
|
|
|
4145
|
+
// ../shared/src/runtime-accounts.ts
|
|
4146
|
+
var zAccountId, zAccountLabel, zRuntimeAccountCreate, zRuntimeAccountPatch, zRuntimeAccountDefault, zRuntimeAccountLogin, zRuntimeAccountDefaults;
|
|
4147
|
+
var init_runtime_accounts = __esm({
|
|
4148
|
+
"../shared/src/runtime-accounts.ts"() {
|
|
4149
|
+
"use strict";
|
|
4150
|
+
init_zod();
|
|
4151
|
+
init_enums();
|
|
4152
|
+
zAccountId = external_exports.string().min(1).max(80);
|
|
4153
|
+
zAccountLabel = external_exports.string().trim().min(1).max(40);
|
|
4154
|
+
zRuntimeAccountCreate = external_exports.object({ runtime: zAgent, label: zAccountLabel }).strict();
|
|
4155
|
+
zRuntimeAccountPatch = external_exports.object({ label: zAccountLabel }).strict();
|
|
4156
|
+
zRuntimeAccountDefault = external_exports.object({ runtime: zAgent, accountId: zAccountId }).strict();
|
|
4157
|
+
zRuntimeAccountLogin = external_exports.object({ deviceAuth: external_exports.boolean().optional() }).strict();
|
|
4158
|
+
zRuntimeAccountDefaults = external_exports.object({
|
|
4159
|
+
claude: zAccountId.optional(),
|
|
4160
|
+
codex: zAccountId.optional(),
|
|
4161
|
+
antigravity: zAccountId.optional()
|
|
4162
|
+
});
|
|
4163
|
+
}
|
|
4164
|
+
});
|
|
4165
|
+
|
|
4145
4166
|
// ../shared/src/spec-source.ts
|
|
4146
4167
|
function payloadShapeFor(source) {
|
|
4147
4168
|
return source === "qa" ? "qa" : GOAL_SHAPED_SOURCES.has(source) ? "goal" : "brief";
|
|
@@ -5038,6 +5059,7 @@ var init_entities = __esm({
|
|
|
5038
5059
|
init_method_catalog();
|
|
5039
5060
|
init_relay();
|
|
5040
5061
|
init_logs();
|
|
5062
|
+
init_runtime_accounts();
|
|
5041
5063
|
init_runtime_defaults();
|
|
5042
5064
|
zProject = external_exports.object({
|
|
5043
5065
|
id: external_exports.string(),
|
|
@@ -5299,6 +5321,9 @@ var init_entities = __esm({
|
|
|
5299
5321
|
// SPEC-184
|
|
5300
5322
|
notifyDecisionTelegram: external_exports.boolean().default(true),
|
|
5301
5323
|
// ADR-0226 · dorong "menunggu keputusan" ke Telegram
|
|
5324
|
+
// ADR-0235 · saklar tunggal auto-resume SEMUA sesi (backlog + bebas) yang terputus paksa (reboot/crash).
|
|
5325
|
+
// Default MATI — mengamandemen ADR-0169 (dulu selalu nyala untuk backlog).
|
|
5326
|
+
autoResumeSessions: external_exports.boolean().default(false),
|
|
5302
5327
|
agentAccessEnabled: external_exports.boolean().default(false),
|
|
5303
5328
|
// SPEC-257 · master switch akses AI agent
|
|
5304
5329
|
scheduler: zScheduler.default(SCHEDULER_DEFAULTS),
|
|
@@ -5337,6 +5362,10 @@ var init_entities = __esm({
|
|
|
5337
5362
|
// lajur log ke hub (SPEC-1217)
|
|
5338
5363
|
logRetention: zLogRetention.default(LOG_RETENTION_DEFAULTS),
|
|
5339
5364
|
// retensi log di hub (SPEC-1217)
|
|
5365
|
+
// ADR-0234 · default akun runtime per mesin. LOCAL (setting tak ada di SYNCED) dan TAK ditulis
|
|
5366
|
+
// `PUT /settings` (routes/settings.ts mempertahankan nilai tersimpan) — pengelolanya
|
|
5367
|
+
// `PUT /api/runtime-accounts/default`. Absen = akun bawaan `default:<runtime>`.
|
|
5368
|
+
accounts: zRuntimeAccountDefaults.default({}),
|
|
5340
5369
|
// SPEC-881 · ADR-0136 · sidik jari isi bawaan yang TERAKHIR ditulis seed di mesin ini, per nama
|
|
5341
5370
|
// agen. Dipakai seed untuk membedakan "belum pernah disunting operator" dari "sudah". WAJIB
|
|
5342
5371
|
// dideklarasikan di sini: zod membuang kunci tak dikenal dan `PUT /settings` menulis balik hasil
|
|
@@ -6839,6 +6868,7 @@ var init_dto = __esm({
|
|
|
6839
6868
|
init_entities();
|
|
6840
6869
|
init_lead();
|
|
6841
6870
|
init_auto_merge();
|
|
6871
|
+
init_runtime_accounts();
|
|
6842
6872
|
init_handled_by();
|
|
6843
6873
|
init_prd_status();
|
|
6844
6874
|
init_enums();
|
|
@@ -6880,7 +6910,9 @@ var init_dto = __esm({
|
|
|
6880
6910
|
endedReason: external_exports.string().nullable(),
|
|
6881
6911
|
reconciledAt: external_exports.string().nullable(),
|
|
6882
6912
|
exitCode: external_exports.number().nullable(),
|
|
6883
|
-
transcriptBytes: external_exports.number().nullable()
|
|
6913
|
+
transcriptBytes: external_exports.number().nullable(),
|
|
6914
|
+
// ADR-0234 · akun runtime saat sesi lahir. null/absen = akun bawaan (atau baris lama).
|
|
6915
|
+
accountId: external_exports.string().nullable().optional()
|
|
6884
6916
|
});
|
|
6885
6917
|
zCreateProject = external_exports.object({
|
|
6886
6918
|
name: external_exports.string().min(1),
|
|
@@ -7246,6 +7278,8 @@ var init_dto = __esm({
|
|
|
7246
7278
|
agent: zAgent.optional(),
|
|
7247
7279
|
model: external_exports.string().optional(),
|
|
7248
7280
|
effort: external_exports.string().optional(),
|
|
7281
|
+
account: zAccountId.optional(),
|
|
7282
|
+
// ADR-0234 · akun runtime pilihan form "Sesi baru"
|
|
7249
7283
|
force: external_exports.boolean().optional(),
|
|
7250
7284
|
// ADR-0232 · opsional: `worktree:true` → sesi lahir di `.worktrees/<id>` pada branch baru
|
|
7251
7285
|
// `term/<id>` dari `branchFrom` (kosong → HEAD repo), alih-alih langsung di repoDir. Tanpa
|
|
@@ -7270,6 +7304,8 @@ var init_dto = __esm({
|
|
|
7270
7304
|
goal: external_exports.boolean().optional(),
|
|
7271
7305
|
goalCondition: external_exports.string().max(4e3).optional(),
|
|
7272
7306
|
agent: zAgent.optional(),
|
|
7307
|
+
account: zAccountId.optional(),
|
|
7308
|
+
// ADR-0234 · akun runtime pilihan picker Start
|
|
7273
7309
|
verifyScope: zVerifyScope.optional(),
|
|
7274
7310
|
// SPEC-734 · ADR-0113 — metode workflow per SESI: undefined → Spec.payload.method →
|
|
7275
7311
|
// Setting.method → "superpowers". LENIENT (`z.string()`, bukan `z.enum`): id yang tak dikenal
|
|
@@ -7622,6 +7658,13 @@ var init_api = __esm({
|
|
|
7622
7658
|
// ADR-0204 · tandai satu notifikasi terbaca (POST, idempoten).
|
|
7623
7659
|
notificationRead: (id) => `${API}/notifications/${encodeURIComponent(id)}/read`,
|
|
7624
7660
|
limits: `${API}/limits`,
|
|
7661
|
+
// ADR-0234 · akun runtime & limit per akun.
|
|
7662
|
+
limitsAccounts: `${API}/limits/accounts`,
|
|
7663
|
+
runtimeAccounts: `${API}/runtime-accounts`,
|
|
7664
|
+
runtimeAccount: (id) => `${API}/runtime-accounts/${encodeURIComponent(id)}`,
|
|
7665
|
+
runtimeAccountsDefault: `${API}/runtime-accounts/default`,
|
|
7666
|
+
runtimeAccountLogin: (id) => `${API}/runtime-accounts/${encodeURIComponent(id)}/login`,
|
|
7667
|
+
runtimeAccountCheck: (id) => `${API}/runtime-accounts/${encodeURIComponent(id)}/check`,
|
|
7625
7668
|
// SPEC-339 · versi codex CLI (peringatan lunak model GPT-5.6).
|
|
7626
7669
|
codexVersion: `${API}/codex/version`,
|
|
7627
7670
|
antigravityVersion: `${API}/antigravity/version`,
|
|
@@ -10720,6 +10763,38 @@ var init_settings = __esm({
|
|
|
10720
10763
|
sampleMethod: "POST",
|
|
10721
10764
|
build: (a) => ({ method: "POST", path: `/scheduler/queue/${enc(String(a.item))}/requeue` }),
|
|
10722
10765
|
shape: (raw) => raw
|
|
10766
|
+
},
|
|
10767
|
+
// ADR-0234 · akun runtime. Hanya baca & set default — tambah/hapus/login akun tetap di dashboard
|
|
10768
|
+
// (COOKIE_ONLY: pengelolaan kredensial dan login OAuth butuh manusia di browser).
|
|
10769
|
+
{
|
|
10770
|
+
name: "hanoman_runtime_accounts_list",
|
|
10771
|
+
title: "Daftar akun runtime",
|
|
10772
|
+
description: "Akun langganan Claude Code/Codex/Antigravity yang terdaftar di mesin ini \u2014 termasuk akun bawaan `default:<runtime>` \u2014 dengan status login (belum-login|aktif|perlu-login-ulang), email & paket, drift konfigurasi, dan akun mana yang jadi default tiap runtime. `id`-nya dipakai di `account` pada hanoman_session_create. Menambah/menghapus/login akun hanya lewat dashboard.",
|
|
10773
|
+
inputSchema: obj({ properties: {} }),
|
|
10774
|
+
mode: "read",
|
|
10775
|
+
capability: "settings:read",
|
|
10776
|
+
samplePath: "/runtime-accounts",
|
|
10777
|
+
sampleMethod: "GET",
|
|
10778
|
+
build: () => ({ method: "GET", path: "/runtime-accounts" }),
|
|
10779
|
+
shape: (raw) => raw
|
|
10780
|
+
},
|
|
10781
|
+
{
|
|
10782
|
+
name: "hanoman_runtime_account_default_set",
|
|
10783
|
+
title: "Set akun default runtime",
|
|
10784
|
+
description: "Menjadikan satu akun sebagai default runtime-nya untuk SETIAP sesi baru di mesin ini, termasuk sesi otomatis (scheduler, lead, reverse/prd). `accountId` dari hanoman_runtime_accounts_list; `default:<runtime>` mengembalikan ke akun bawaan. Sesi yang sedang berjalan tak berubah. Ditolak 409 bila runtime akun tak cocok atau sandbox sesi aktif (hanya akun bawaan).",
|
|
10785
|
+
inputSchema: obj({
|
|
10786
|
+
properties: {
|
|
10787
|
+
runtime: enumStr(["claude", "codex", "antigravity"], "Runtime yang default-nya diubah."),
|
|
10788
|
+
accountId: str("Id akun dari hanoman_runtime_accounts_list.")
|
|
10789
|
+
},
|
|
10790
|
+
required: ["runtime", "accountId"]
|
|
10791
|
+
}),
|
|
10792
|
+
mode: "write",
|
|
10793
|
+
capability: "settings:write",
|
|
10794
|
+
samplePath: "/runtime-accounts/default",
|
|
10795
|
+
sampleMethod: "PUT",
|
|
10796
|
+
build: (a) => ({ method: "PUT", path: "/runtime-accounts/default", body: { runtime: String(a.runtime), accountId: String(a.accountId) } }),
|
|
10797
|
+
shape: (raw) => raw
|
|
10723
10798
|
}
|
|
10724
10799
|
];
|
|
10725
10800
|
}
|
|
@@ -11678,6 +11753,7 @@ var init_sessions = __esm({
|
|
|
11678
11753
|
),
|
|
11679
11754
|
shell: bool("true = terminal shell biasa di repo project, tanpa agen. Hanya dengan `project`."),
|
|
11680
11755
|
agent: enumStr(["claude", "codex", "antigravity"], "Mesin sesi. Kosong = default global."),
|
|
11756
|
+
account: str("Id akun runtime dari hanoman_runtime_accounts_list (ADR-0234). Kosong = akun default runtime di mesin ini."),
|
|
11681
11757
|
model: str("Model. Kosong = default global."),
|
|
11682
11758
|
effort: str("Effort. Kosong = default global."),
|
|
11683
11759
|
goal: bool("Mode goal per-sesi. Kosong = ikut setelan global."),
|
|
@@ -11714,7 +11790,7 @@ var init_sessions = __esm({
|
|
|
11714
11790
|
build: (a) => {
|
|
11715
11791
|
if (s(a.spec)) {
|
|
11716
11792
|
const body2 = { spec: String(a.spec), flow: String(a.flow) };
|
|
11717
|
-
for (const k of ["model", "effort", "goalCondition", "agent", "verifyScope", "method"])
|
|
11793
|
+
for (const k of ["model", "effort", "goalCondition", "agent", "account", "verifyScope", "method"])
|
|
11718
11794
|
if (s(a[k]) !== void 0) body2[k] = s(a[k]);
|
|
11719
11795
|
if (a.phaseOverrides && typeof a.phaseOverrides === "object" && !Array.isArray(a.phaseOverrides)) body2.phaseOverrides = a.phaseOverrides;
|
|
11720
11796
|
for (const k of ["goal", "force"]) if (typeof a[k] === "boolean") body2[k] = a[k];
|
|
@@ -11726,7 +11802,7 @@ var init_sessions = __esm({
|
|
|
11726
11802
|
if (flow2 === "breakdown") return { method: "POST", path: "/terminal/sessions", body: { project, flow: flow2, prdPath: String(a.prdPath) } };
|
|
11727
11803
|
if (flow2 === "reverse" || flow2 === "scaffold") return { method: "POST", path: "/terminal/sessions", body: { project, flow: flow2 } };
|
|
11728
11804
|
const body = { project };
|
|
11729
|
-
for (const k of ["agent", "model", "effort", "branchFrom"]) if (s(a[k]) !== void 0) body[k] = s(a[k]);
|
|
11805
|
+
for (const k of ["agent", "account", "model", "effort", "branchFrom"]) if (s(a[k]) !== void 0) body[k] = s(a[k]);
|
|
11730
11806
|
if (typeof a.worktree === "boolean") body.worktree = a.worktree;
|
|
11731
11807
|
return { method: "POST", path: "/terminal/sessions", body };
|
|
11732
11808
|
},
|
|
@@ -12896,6 +12972,19 @@ var init_system = __esm({
|
|
|
12896
12972
|
build: () => ({ method: "GET", path: "/limits/antigravity" }),
|
|
12897
12973
|
shape: (raw) => raw
|
|
12898
12974
|
},
|
|
12975
|
+
// ADR-0234 · limit per akun runtime. GLOBAL_READ → tanpa email (identitas di hanoman_runtime_accounts_list).
|
|
12976
|
+
{
|
|
12977
|
+
name: "hanoman_limits_accounts",
|
|
12978
|
+
title: "Limit langganan per akun runtime",
|
|
12979
|
+
description: "Limit (window 5 jam, mingguan, dst) untuk SETIAP akun runtime terdaftar di mesin ini \u2014 Claude, Codex, Antigravity \u2014 termasuk akun bawaan `default:<runtime>`. Tanpa email. `limits.status` stale = data terakhir (akun belum dipakai sejak tokennya kedaluwarsa); window yang `resetsAt`-nya sudah lewat berarti sudah reset. `isDefault` menandai akun yang dipakai sesi baru.",
|
|
12980
|
+
inputSchema: obj({ properties: {} }),
|
|
12981
|
+
mode: "read",
|
|
12982
|
+
capability: null,
|
|
12983
|
+
samplePath: "/limits/accounts",
|
|
12984
|
+
sampleMethod: "GET",
|
|
12985
|
+
build: () => ({ method: "GET", path: "/limits/accounts" }),
|
|
12986
|
+
shape: (raw) => raw
|
|
12987
|
+
},
|
|
12899
12988
|
{
|
|
12900
12989
|
name: "hanoman_overview_get",
|
|
12901
12990
|
title: "Ringkasan kinerja hari ini (Overview)",
|
|
@@ -15331,6 +15420,7 @@ var init_src = __esm({
|
|
|
15331
15420
|
"../shared/src/index.ts"() {
|
|
15332
15421
|
"use strict";
|
|
15333
15422
|
init_enums();
|
|
15423
|
+
init_runtime_accounts();
|
|
15334
15424
|
init_spec_source();
|
|
15335
15425
|
init_method_catalog();
|
|
15336
15426
|
init_method_status();
|
|
@@ -38442,6 +38532,8 @@ var init_migrate_pg = __esm({
|
|
|
38442
38532
|
"RuntimeConfig",
|
|
38443
38533
|
"LeadFlow",
|
|
38444
38534
|
"LeadDecision",
|
|
38535
|
+
// ADR-0234 · LOCAL-only; sumber Postgres lama tak punya tabel ini → jalur 42P01 = nol baris.
|
|
38536
|
+
"RuntimeAccount",
|
|
38445
38537
|
// SPEC-476 · ADR-0096 · tabel gateway LOCAL-only; sumber Postgres lama lazimnya tidak punya
|
|
38446
38538
|
// tabel ini dan jalur 42P01 di bawah memperlakukannya sebagai nol baris.
|
|
38447
38539
|
"TelegramGatewayState",
|