hanoman 0.9.39 → 0.9.40
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 +92 -3
- package/dist/server.js +1461 -451
- package/docs/agent-integration.md +6 -0
- package/package.json +1 -1
- package/prisma/migrations/20261101090000_runtime_account/migration.sql +18 -0
- package/prisma/schema.prisma +19 -0
- package/web/assets/{DalangHanomanScreen-wpAO0xvb.js → DalangHanomanScreen-WQ2B2G0F.js} +1 -1
- package/web/assets/{DocPreviewModal-CbhkDUJ2.js → DocPreviewModal-DkuSjeL9.js} +1 -1
- package/web/assets/{DocsWorkspace-CcB0LGFV.js → DocsWorkspace-BJ71xmQ_.js} +1 -1
- package/web/assets/{IdeScreen-DI4v3ZkU.js → IdeScreen-Bc4gR6md.js} +1 -1
- package/web/assets/{LeadScreen-BdS_xX_f.js → LeadScreen-BmRdOMoJ.js} +1 -1
- package/web/assets/{ReviewScreen-Ddw5U2sM.js → ReviewScreen-C83FuzRB.js} +1 -1
- package/web/assets/{SchedulerScreen-D6LGVrhM.js → SchedulerScreen-BKnqWV7j.js} +1 -1
- package/web/assets/{SettingsScreen-DQZ3K43g.css → SettingsScreen-B7CruwHq.css} +1 -1
- package/web/assets/SettingsScreen-FrgI5pzO.js +62 -0
- package/web/assets/{TeamScreen-BkxPDI5P.js → TeamScreen-Dgrvomt0.js} +1 -1
- package/web/assets/TerminalScreen-D2KSQ13m.js +2 -0
- package/web/assets/{TriageScreen-B-HdZsEt.js → TriageScreen-DrPERvDs.js} +1 -1
- package/web/assets/{VpsScreen-CWp29NL_.js → VpsScreen-7sDyg5MI.js} +2 -2
- package/web/assets/fields-BNhNDKOP.js +1 -0
- package/web/assets/{index-B4b6i2tH.css → index-B0VYqeq_.css} +1 -1
- package/web/assets/{index-C4Py9MJV.js → index-NoTUDPfb.js} +212 -212
- package/web/assets/{live-CBa_7-hn.js → live-B4ZwQ4kB.js} +1 -1
- package/web/assets/{sched-lead-shared-CQIoYIzG.js → sched-lead-shared-CZ0_L34F.js} +1 -1
- package/web/assets/{settings-rebase-C3611gs8.js → settings-rebase-DwTIHvhF.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(),
|
|
@@ -5337,6 +5359,10 @@ var init_entities = __esm({
|
|
|
5337
5359
|
// lajur log ke hub (SPEC-1217)
|
|
5338
5360
|
logRetention: zLogRetention.default(LOG_RETENTION_DEFAULTS),
|
|
5339
5361
|
// retensi log di hub (SPEC-1217)
|
|
5362
|
+
// ADR-0234 · default akun runtime per mesin. LOCAL (setting tak ada di SYNCED) dan TAK ditulis
|
|
5363
|
+
// `PUT /settings` (routes/settings.ts mempertahankan nilai tersimpan) — pengelolanya
|
|
5364
|
+
// `PUT /api/runtime-accounts/default`. Absen = akun bawaan `default:<runtime>`.
|
|
5365
|
+
accounts: zRuntimeAccountDefaults.default({}),
|
|
5340
5366
|
// SPEC-881 · ADR-0136 · sidik jari isi bawaan yang TERAKHIR ditulis seed di mesin ini, per nama
|
|
5341
5367
|
// agen. Dipakai seed untuk membedakan "belum pernah disunting operator" dari "sudah". WAJIB
|
|
5342
5368
|
// dideklarasikan di sini: zod membuang kunci tak dikenal dan `PUT /settings` menulis balik hasil
|
|
@@ -6839,6 +6865,7 @@ var init_dto = __esm({
|
|
|
6839
6865
|
init_entities();
|
|
6840
6866
|
init_lead();
|
|
6841
6867
|
init_auto_merge();
|
|
6868
|
+
init_runtime_accounts();
|
|
6842
6869
|
init_handled_by();
|
|
6843
6870
|
init_prd_status();
|
|
6844
6871
|
init_enums();
|
|
@@ -6880,7 +6907,9 @@ var init_dto = __esm({
|
|
|
6880
6907
|
endedReason: external_exports.string().nullable(),
|
|
6881
6908
|
reconciledAt: external_exports.string().nullable(),
|
|
6882
6909
|
exitCode: external_exports.number().nullable(),
|
|
6883
|
-
transcriptBytes: external_exports.number().nullable()
|
|
6910
|
+
transcriptBytes: external_exports.number().nullable(),
|
|
6911
|
+
// ADR-0234 · akun runtime saat sesi lahir. null/absen = akun bawaan (atau baris lama).
|
|
6912
|
+
accountId: external_exports.string().nullable().optional()
|
|
6884
6913
|
});
|
|
6885
6914
|
zCreateProject = external_exports.object({
|
|
6886
6915
|
name: external_exports.string().min(1),
|
|
@@ -7246,6 +7275,8 @@ var init_dto = __esm({
|
|
|
7246
7275
|
agent: zAgent.optional(),
|
|
7247
7276
|
model: external_exports.string().optional(),
|
|
7248
7277
|
effort: external_exports.string().optional(),
|
|
7278
|
+
account: zAccountId.optional(),
|
|
7279
|
+
// ADR-0234 · akun runtime pilihan form "Sesi baru"
|
|
7249
7280
|
force: external_exports.boolean().optional(),
|
|
7250
7281
|
// ADR-0232 · opsional: `worktree:true` → sesi lahir di `.worktrees/<id>` pada branch baru
|
|
7251
7282
|
// `term/<id>` dari `branchFrom` (kosong → HEAD repo), alih-alih langsung di repoDir. Tanpa
|
|
@@ -7270,6 +7301,8 @@ var init_dto = __esm({
|
|
|
7270
7301
|
goal: external_exports.boolean().optional(),
|
|
7271
7302
|
goalCondition: external_exports.string().max(4e3).optional(),
|
|
7272
7303
|
agent: zAgent.optional(),
|
|
7304
|
+
account: zAccountId.optional(),
|
|
7305
|
+
// ADR-0234 · akun runtime pilihan picker Start
|
|
7273
7306
|
verifyScope: zVerifyScope.optional(),
|
|
7274
7307
|
// SPEC-734 · ADR-0113 — metode workflow per SESI: undefined → Spec.payload.method →
|
|
7275
7308
|
// Setting.method → "superpowers". LENIENT (`z.string()`, bukan `z.enum`): id yang tak dikenal
|
|
@@ -7622,6 +7655,13 @@ var init_api = __esm({
|
|
|
7622
7655
|
// ADR-0204 · tandai satu notifikasi terbaca (POST, idempoten).
|
|
7623
7656
|
notificationRead: (id) => `${API}/notifications/${encodeURIComponent(id)}/read`,
|
|
7624
7657
|
limits: `${API}/limits`,
|
|
7658
|
+
// ADR-0234 · akun runtime & limit per akun.
|
|
7659
|
+
limitsAccounts: `${API}/limits/accounts`,
|
|
7660
|
+
runtimeAccounts: `${API}/runtime-accounts`,
|
|
7661
|
+
runtimeAccount: (id) => `${API}/runtime-accounts/${encodeURIComponent(id)}`,
|
|
7662
|
+
runtimeAccountsDefault: `${API}/runtime-accounts/default`,
|
|
7663
|
+
runtimeAccountLogin: (id) => `${API}/runtime-accounts/${encodeURIComponent(id)}/login`,
|
|
7664
|
+
runtimeAccountCheck: (id) => `${API}/runtime-accounts/${encodeURIComponent(id)}/check`,
|
|
7625
7665
|
// SPEC-339 · versi codex CLI (peringatan lunak model GPT-5.6).
|
|
7626
7666
|
codexVersion: `${API}/codex/version`,
|
|
7627
7667
|
antigravityVersion: `${API}/antigravity/version`,
|
|
@@ -10720,6 +10760,38 @@ var init_settings = __esm({
|
|
|
10720
10760
|
sampleMethod: "POST",
|
|
10721
10761
|
build: (a) => ({ method: "POST", path: `/scheduler/queue/${enc(String(a.item))}/requeue` }),
|
|
10722
10762
|
shape: (raw) => raw
|
|
10763
|
+
},
|
|
10764
|
+
// ADR-0234 · akun runtime. Hanya baca & set default — tambah/hapus/login akun tetap di dashboard
|
|
10765
|
+
// (COOKIE_ONLY: pengelolaan kredensial dan login OAuth butuh manusia di browser).
|
|
10766
|
+
{
|
|
10767
|
+
name: "hanoman_runtime_accounts_list",
|
|
10768
|
+
title: "Daftar akun runtime",
|
|
10769
|
+
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.",
|
|
10770
|
+
inputSchema: obj({ properties: {} }),
|
|
10771
|
+
mode: "read",
|
|
10772
|
+
capability: "settings:read",
|
|
10773
|
+
samplePath: "/runtime-accounts",
|
|
10774
|
+
sampleMethod: "GET",
|
|
10775
|
+
build: () => ({ method: "GET", path: "/runtime-accounts" }),
|
|
10776
|
+
shape: (raw) => raw
|
|
10777
|
+
},
|
|
10778
|
+
{
|
|
10779
|
+
name: "hanoman_runtime_account_default_set",
|
|
10780
|
+
title: "Set akun default runtime",
|
|
10781
|
+
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).",
|
|
10782
|
+
inputSchema: obj({
|
|
10783
|
+
properties: {
|
|
10784
|
+
runtime: enumStr(["claude", "codex", "antigravity"], "Runtime yang default-nya diubah."),
|
|
10785
|
+
accountId: str("Id akun dari hanoman_runtime_accounts_list.")
|
|
10786
|
+
},
|
|
10787
|
+
required: ["runtime", "accountId"]
|
|
10788
|
+
}),
|
|
10789
|
+
mode: "write",
|
|
10790
|
+
capability: "settings:write",
|
|
10791
|
+
samplePath: "/runtime-accounts/default",
|
|
10792
|
+
sampleMethod: "PUT",
|
|
10793
|
+
build: (a) => ({ method: "PUT", path: "/runtime-accounts/default", body: { runtime: String(a.runtime), accountId: String(a.accountId) } }),
|
|
10794
|
+
shape: (raw) => raw
|
|
10723
10795
|
}
|
|
10724
10796
|
];
|
|
10725
10797
|
}
|
|
@@ -11678,6 +11750,7 @@ var init_sessions = __esm({
|
|
|
11678
11750
|
),
|
|
11679
11751
|
shell: bool("true = terminal shell biasa di repo project, tanpa agen. Hanya dengan `project`."),
|
|
11680
11752
|
agent: enumStr(["claude", "codex", "antigravity"], "Mesin sesi. Kosong = default global."),
|
|
11753
|
+
account: str("Id akun runtime dari hanoman_runtime_accounts_list (ADR-0234). Kosong = akun default runtime di mesin ini."),
|
|
11681
11754
|
model: str("Model. Kosong = default global."),
|
|
11682
11755
|
effort: str("Effort. Kosong = default global."),
|
|
11683
11756
|
goal: bool("Mode goal per-sesi. Kosong = ikut setelan global."),
|
|
@@ -11714,7 +11787,7 @@ var init_sessions = __esm({
|
|
|
11714
11787
|
build: (a) => {
|
|
11715
11788
|
if (s(a.spec)) {
|
|
11716
11789
|
const body2 = { spec: String(a.spec), flow: String(a.flow) };
|
|
11717
|
-
for (const k of ["model", "effort", "goalCondition", "agent", "verifyScope", "method"])
|
|
11790
|
+
for (const k of ["model", "effort", "goalCondition", "agent", "account", "verifyScope", "method"])
|
|
11718
11791
|
if (s(a[k]) !== void 0) body2[k] = s(a[k]);
|
|
11719
11792
|
if (a.phaseOverrides && typeof a.phaseOverrides === "object" && !Array.isArray(a.phaseOverrides)) body2.phaseOverrides = a.phaseOverrides;
|
|
11720
11793
|
for (const k of ["goal", "force"]) if (typeof a[k] === "boolean") body2[k] = a[k];
|
|
@@ -11726,7 +11799,7 @@ var init_sessions = __esm({
|
|
|
11726
11799
|
if (flow2 === "breakdown") return { method: "POST", path: "/terminal/sessions", body: { project, flow: flow2, prdPath: String(a.prdPath) } };
|
|
11727
11800
|
if (flow2 === "reverse" || flow2 === "scaffold") return { method: "POST", path: "/terminal/sessions", body: { project, flow: flow2 } };
|
|
11728
11801
|
const body = { project };
|
|
11729
|
-
for (const k of ["agent", "model", "effort", "branchFrom"]) if (s(a[k]) !== void 0) body[k] = s(a[k]);
|
|
11802
|
+
for (const k of ["agent", "account", "model", "effort", "branchFrom"]) if (s(a[k]) !== void 0) body[k] = s(a[k]);
|
|
11730
11803
|
if (typeof a.worktree === "boolean") body.worktree = a.worktree;
|
|
11731
11804
|
return { method: "POST", path: "/terminal/sessions", body };
|
|
11732
11805
|
},
|
|
@@ -12896,6 +12969,19 @@ var init_system = __esm({
|
|
|
12896
12969
|
build: () => ({ method: "GET", path: "/limits/antigravity" }),
|
|
12897
12970
|
shape: (raw) => raw
|
|
12898
12971
|
},
|
|
12972
|
+
// ADR-0234 · limit per akun runtime. GLOBAL_READ → tanpa email (identitas di hanoman_runtime_accounts_list).
|
|
12973
|
+
{
|
|
12974
|
+
name: "hanoman_limits_accounts",
|
|
12975
|
+
title: "Limit langganan per akun runtime",
|
|
12976
|
+
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.",
|
|
12977
|
+
inputSchema: obj({ properties: {} }),
|
|
12978
|
+
mode: "read",
|
|
12979
|
+
capability: null,
|
|
12980
|
+
samplePath: "/limits/accounts",
|
|
12981
|
+
sampleMethod: "GET",
|
|
12982
|
+
build: () => ({ method: "GET", path: "/limits/accounts" }),
|
|
12983
|
+
shape: (raw) => raw
|
|
12984
|
+
},
|
|
12899
12985
|
{
|
|
12900
12986
|
name: "hanoman_overview_get",
|
|
12901
12987
|
title: "Ringkasan kinerja hari ini (Overview)",
|
|
@@ -15331,6 +15417,7 @@ var init_src = __esm({
|
|
|
15331
15417
|
"../shared/src/index.ts"() {
|
|
15332
15418
|
"use strict";
|
|
15333
15419
|
init_enums();
|
|
15420
|
+
init_runtime_accounts();
|
|
15334
15421
|
init_spec_source();
|
|
15335
15422
|
init_method_catalog();
|
|
15336
15423
|
init_method_status();
|
|
@@ -38442,6 +38529,8 @@ var init_migrate_pg = __esm({
|
|
|
38442
38529
|
"RuntimeConfig",
|
|
38443
38530
|
"LeadFlow",
|
|
38444
38531
|
"LeadDecision",
|
|
38532
|
+
// ADR-0234 · LOCAL-only; sumber Postgres lama tak punya tabel ini → jalur 42P01 = nol baris.
|
|
38533
|
+
"RuntimeAccount",
|
|
38445
38534
|
// SPEC-476 · ADR-0096 · tabel gateway LOCAL-only; sumber Postgres lama lazimnya tidak punya
|
|
38446
38535
|
// tabel ini dan jalur 42P01 di bawah memperlakukannya sebagai nol baris.
|
|
38447
38536
|
"TelegramGatewayState",
|