hanoman 0.1.30 → 0.1.31
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 +34 -6
- package/dist/server.js +24019 -10649
- package/package.json +5 -5
- package/prisma/migrations/20260814000000_spec_launch_approval/migration.sql +6 -0
- package/prisma/schema.prisma +4 -0
- package/web/assets/index-Bj0_Y2o8.css +41 -0
- package/web/assets/{index-Bz729E_V.js → index-CFtKJvO8.js} +1549 -1545
- package/web/index.html +2 -2
- package/web/assets/index-B0GzvSQL.css +0 -41
package/dist/build-info.json
CHANGED
package/dist/cli.js
CHANGED
|
@@ -5008,7 +5008,7 @@ var init_cron_expr = __esm({
|
|
|
5008
5008
|
});
|
|
5009
5009
|
|
|
5010
5010
|
// ../shared/src/dto.ts
|
|
5011
|
-
var zIssueDeviceToken, zSessionResult, zSessionHistory, zCreateProject, zProjectId, zRenameProject, zUpdateProject, zCreateSpec, zPatchSpec, zChangeSpecSource, 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, zChangePassword, zCreateClientAccount, zUpdateClientAccount, zVpsCheck, zMarkNa, zMarkNaBulk, zAttest, zRemediate, UPDATE_RESTART_EXIT, zUpdateApplyBody, zTicketView, zTicketAttachmentView, zTicketDetail, zTicketEditInput, zHelpInfo, zPublicTicketStatus, zCronExpr, zCreateCron, zPatchCron, zSchedulerCron, zSchedulerCronRun;
|
|
5011
|
+
var zIssueDeviceToken, zSessionResult, zSessionHistory, zCreateProject, zProjectId, zRenameProject, zUpdateProject, zCreateSpec, zPatchSpec, zChangeSpecSource, 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, zChangePassword, zCreateClientAccount, zUpdateClientAccount, zVpsCheck, zMarkNa, zMarkNaBulk, zAttest, zRemediate, UPDATE_RESTART_EXIT, zUpdateApplyBody, zTicketView, zTicketAttachmentView, zTicketDetail, zTicketEditInput, zHelpInfo, zPublicTicketStatus, zCronExpr, zCreateCron, zPatchCron, zSchedulerCron, zSchedulerCronRun;
|
|
5012
5012
|
var init_dto = __esm({
|
|
5013
5013
|
"../shared/src/dto.ts"() {
|
|
5014
5014
|
"use strict";
|
|
@@ -5439,6 +5439,7 @@ var init_dto = __esm({
|
|
|
5439
5439
|
zUserRole = external_exports.enum(USER_ROLES);
|
|
5440
5440
|
zLogin = external_exports.object({ email: external_exports.string().email(), password: external_exports.string().min(1) });
|
|
5441
5441
|
zSignup = external_exports.object({ email: external_exports.string().email(), password: external_exports.string().min(8) });
|
|
5442
|
+
zSetup = zSignup.extend({ setupToken: external_exports.string().min(1) });
|
|
5442
5443
|
zChangePassword = external_exports.object({
|
|
5443
5444
|
currentPassword: external_exports.string().min(1),
|
|
5444
5445
|
newPassword: external_exports.string().min(8)
|
|
@@ -5668,6 +5669,7 @@ var init_api = __esm({
|
|
|
5668
5669
|
sessionTranscript: (id) => `${API}/terminal/history/${encodeURIComponent(id)}/transcript`,
|
|
5669
5670
|
eventsWs: `${API}/events/ws`,
|
|
5670
5671
|
// SPEC-199 · WebSocket siar dashboard (global, bukan per-sesi)
|
|
5672
|
+
wsTickets: `${API}/ws-tickets`,
|
|
5671
5673
|
vps: `${API}/vps`,
|
|
5672
5674
|
vpsOne: (id) => `${API}/vps/${id}`,
|
|
5673
5675
|
vpsAudit: (id) => `${API}/vps/${id}/audit`,
|
|
@@ -5902,7 +5904,7 @@ var init_config_registry = __esm({
|
|
|
5902
5904
|
label: "URL hub",
|
|
5903
5905
|
kind: "url",
|
|
5904
5906
|
apply: "live",
|
|
5905
|
-
category: "
|
|
5907
|
+
category: "credential",
|
|
5906
5908
|
example: "https://hanoman.nafanesia.id",
|
|
5907
5909
|
help: "Base URL hub tujuan sync (REST + WS). Kosong = instance ini murni HUB."
|
|
5908
5910
|
},
|
|
@@ -7872,6 +7874,7 @@ function runServer(serverJs, env) {
|
|
|
7872
7874
|
}));
|
|
7873
7875
|
}
|
|
7874
7876
|
async function start(argv, ctx) {
|
|
7877
|
+
process.umask(63);
|
|
7875
7878
|
let opts;
|
|
7876
7879
|
try {
|
|
7877
7880
|
opts = parseStartArgs(argv);
|
|
@@ -7894,8 +7897,9 @@ async function start(argv, ctx) {
|
|
|
7894
7897
|
if (notice) ctx.stderr(`${notice}
|
|
7895
7898
|
`);
|
|
7896
7899
|
const home = resolveHome(ctx.env);
|
|
7897
|
-
mkdirSync(home, { recursive: true });
|
|
7898
|
-
|
|
7900
|
+
mkdirSync(home, { recursive: true, mode: 448 });
|
|
7901
|
+
chmodSync(home, 448);
|
|
7902
|
+
mkdirSync(dirname3(dbFilePath(dbUrl)), { recursive: true, mode: 448 });
|
|
7899
7903
|
if (!existsSync2(layout.server)) {
|
|
7900
7904
|
ctx.stderr(`hanoman: bundle server tak ada di ${layout.server} \u2014 jalankan \`pnpm build\` dulu
|
|
7901
7905
|
`);
|
|
@@ -7916,6 +7920,7 @@ ${hint}
|
|
|
7916
7920
|
return 1;
|
|
7917
7921
|
}
|
|
7918
7922
|
}
|
|
7923
|
+
if (existsSync2(dbFilePath(dbUrl))) chmodSync(dbFilePath(dbUrl), 384);
|
|
7919
7924
|
const port = opts.port ?? Number(ctx.env.PORT ?? 8787);
|
|
7920
7925
|
const host = opts.host ?? ctx.env.HOST ?? "127.0.0.1";
|
|
7921
7926
|
ctx.stdout(`hanoman \xB7 http://${host === "0.0.0.0" ? "127.0.0.1" : host}:${port}
|
|
@@ -7998,7 +8003,12 @@ function doctorReport(p) {
|
|
|
7998
8003
|
},
|
|
7999
8004
|
{ mark: p.homeWritable ? "\u2713" : "\u2717", text: `data dir ${p.homeWritable ? "bisa ditulis" : "TAK bisa ditulis"}`, fatal: !p.homeWritable },
|
|
8000
8005
|
{ mark: p.web ? "\u2713" : "!", text: p.web ? "aset dashboard ada" : "aset dashboard tak ada \u2014 API jalan, dashboard tidak", fatal: false },
|
|
8001
|
-
{ mark: "\xB7", text: `db ${p.db}`, fatal: false }
|
|
8006
|
+
{ mark: "\xB7", text: `db ${p.db}`, fatal: false },
|
|
8007
|
+
{
|
|
8008
|
+
mark: p.sandboxReady ? "\u2713" : p.sandboxRequired ? "\u2717" : "!",
|
|
8009
|
+
text: p.sandboxReady ? `sandbox sesi rootless siap (${p.podman})` : `sandbox sesi belum siap${p.podman ? ` (${p.podman})` : " \u2014 podman tak ada"}`,
|
|
8010
|
+
fatal: p.sandboxRequired && !p.sandboxReady
|
|
8011
|
+
}
|
|
8002
8012
|
];
|
|
8003
8013
|
for (const m of p.methods) {
|
|
8004
8014
|
const agent = m.agent === "codex" ? "Codex CLI" : "Claude Code";
|
|
@@ -8046,6 +8056,21 @@ async function doctor(_argv, ctx) {
|
|
|
8046
8056
|
const s2 = scanAgentSkills(a, ctx.env);
|
|
8047
8057
|
return methodStatus(method, a, { skills: s2.skills.map((k) => k.id), packages: s2.packages });
|
|
8048
8058
|
});
|
|
8059
|
+
const podman = version("podman", ["--version"]);
|
|
8060
|
+
const sandboxRequired = ctx.env.NODE_ENV === "production" || !!ctx.env.HANOMAN_PUBLIC_ORIGINS;
|
|
8061
|
+
const rootless = podman ? version("podman", ["info", "--format", "{{.Host.Security.Rootless}}"]) === "true" : false;
|
|
8062
|
+
const credentialDir = ctx.env.HANOMAN_AGENT_CREDENTIAL_DIR;
|
|
8063
|
+
let credentialsReadable = false;
|
|
8064
|
+
if (credentialDir) {
|
|
8065
|
+
try {
|
|
8066
|
+
accessSync(credentialDir, constants.R_OK);
|
|
8067
|
+
credentialsReadable = true;
|
|
8068
|
+
} catch {
|
|
8069
|
+
}
|
|
8070
|
+
}
|
|
8071
|
+
const network = ctx.env.HANOMAN_SESSION_NETWORK ?? "hanoman-egress";
|
|
8072
|
+
const networkReady = podman ? version("podman", ["network", "exists", network]) !== null : false;
|
|
8073
|
+
const sandboxReady = ctx.env.HANOMAN_SESSION_SANDBOX === "podman" && rootless && credentialsReadable && !!ctx.env.HANOMAN_EGRESS_PROXY && networkReady;
|
|
8049
8074
|
const r = doctorReport({
|
|
8050
8075
|
node: process.version,
|
|
8051
8076
|
git: version("git", ["--version"]),
|
|
@@ -8056,7 +8081,10 @@ async function doctor(_argv, ctx) {
|
|
|
8056
8081
|
homeWritable,
|
|
8057
8082
|
web: layout.web !== null,
|
|
8058
8083
|
db,
|
|
8059
|
-
methods
|
|
8084
|
+
methods,
|
|
8085
|
+
podman,
|
|
8086
|
+
sandboxRequired,
|
|
8087
|
+
sandboxReady
|
|
8060
8088
|
});
|
|
8061
8089
|
ctx.stdout(`hanoman doctor
|
|
8062
8090
|
${r.lines.join("\n")}
|