Skip to content

armgit / mso

Public Imported from GitHub
0

Browser-based graphical shell and control plane for a Linux server you own — real terminal, file manager, live metrics and BYOK AI in one mobile-first workspace. Next.js 16 · React 19 · node-pty · Tailwind v4 · shadcn/ui. Public alpha, self-hosted.

fix: satisfy strict CLI and source parsing checks

Abdurrahman Fakhrul5f7429320d9b
diff --git a/app/api/v1/workflows/run-revision.test.ts b/app/api/v1/workflows/run-revision.test.ts
index c9ec5ff4..7bf9cb54 100644
--- a/app/api/v1/workflows/run-revision.test.ts
+++ b/app/api/v1/workflows/run-revision.test.ts
@@ -1,14 +1,19 @@
import { beforeEach, describe, expect, it, vi } from "vitest";
import { NextRequest } from "next/server";
+type LimitsApi = typeof import("@/lib/host/limits-api");
+type SessionStore = typeof import("@/lib/agent/session-store");
+type GraphStore = typeof import("@/lib/workflow/graph-store");
+type GraphEngine = typeof import("@/lib/workflow/graph-engine");
+
const mocks = vi.hoisted(() => ({
role: "owner" as string | null, get: vi.fn(), createSession: vi.fn(), run: vi.fn(), limited: vi.fn(),
}));
vi.mock("@/lib/auth/require-session", () => ({ getSessionContext: async () => mocks.role ? { role: mocks.role, session: { device_id: "fixture-device" } } : null }));
-vi.mock("@/lib/host/limits-api", async (original) => ({ ...await original<typeof import("@/lib/host/limits-api")>(), rateLimited: mocks.limited }));
-vi.mock("@/lib/agent/session-store", async (original) => ({ ...await original<typeof import("@/lib/agent/session-store")>(), createAgentSession: mocks.createSession }));
-vi.mock("@/lib/workflow/graph-store", async (original) => ({ ...await original<typeof import("@/lib/workflow/graph-store")>(), getWorkflowGraph: mocks.get }));
-vi.mock("@/lib/workflow/graph-engine", async (original) => ({ ...await original<typeof import("@/lib/workflow/graph-engine")>(), startWorkflowGraph: mocks.run }));
+vi.mock("@/lib/host/limits-api", async (original) => ({ ...await original<LimitsApi>(), rateLimited: mocks.limited }));
+vi.mock("@/lib/agent/session-store", async (original) => ({ ...await original<SessionStore>(), createAgentSession: mocks.createSession }));
+vi.mock("@/lib/workflow/graph-store", async (original) => ({ ...await original<GraphStore>(), getWorkflowGraph: mocks.get }));
+vi.mock("@/lib/workflow/graph-engine", async (original) => ({ ...await original<GraphEngine>(), startWorkflowGraph: mocks.run }));
vi.mock("@/lib/mcp/scope", () => ({ maxScope: () => "exec" }));
vi.mock("@/lib/mcp/capability-runtime", () => ({ msoCapabilityRuntime: {} }));
vi.mock("@/lib/mcp/tools", () => ({ TOOLS_BY_NAME: new Map() }));
diff --git a/docs/PROGRESS.md b/docs/PROGRESS.md
index bdbf7ce6..fa2aec76 100644
--- a/docs/PROGRESS.md
+++ b/docs/PROGRESS.md
@@ -10,6 +10,8 @@ The implementation map records five partial requirement groups and 59 pending gr
Integration preserves the current upstream session-turn runner, provider usage accounting, thread search/rename, skills cache and compact `fs_stat` catalog. Two existing UI lint failures prevented the combined gate: the chat controller exceeded the line limit, and the thread drawer synchronously reset state in an effect. Its presentation and scroll handling now live in a same-slice view, and drawer reset follows its open transition. Controller behavior and the upstream CSS budget remain intact.
+PR verification also exposed a sourced CLI usage variable without its module-level fallback and four test-only inline import types that the pinned Semgrep parser could not read. The CLI now follows neighboring modules' explicit fallback, and named type aliases preserve the exact mocks and assertions. Actual ShellCheck 0.11.0 and a complete Semgrep 1.174.0 strict scan pass after these repairs; no scanner rules or exclusions were relaxed.
+
## 2026-10-18: Freeze the complete Nakama target and separate inventory from runtime proof
The approved v0.1 draft spans 64 requirement groups, 24 packages, eight stages and 30 acceptance journeys. The immutable snapshot preserves all original contracts and variants; the generated current reference reads a separate implementation map so progress cannot silently reduce the target. Source receipts identify all 100 distinct referenced files at the pinned Nakama and MSO commits. File identity proves source availability, not runtime behavior.
diff --git a/scripts/cli/agent-profiles.sh b/scripts/cli/agent-profiles.sh
index f25cb06b..da131755 100644
--- a/scripts/cli/agent-profiles.sh
+++ b/scripts/cli/agent-profiles.sh
@@ -9,6 +9,6 @@ run_agent_profiles() {
input="$(json_arg "${1:?JSON or @file with expectedRevision and reason}")"
jpost "/api/v1/agent-profiles" "$(jq -c --arg action "$action" '. + {action:$action}' <<< "$input")" ;;
run) jpost "/api/v1/agent-profiles/run" "$(json_arg "${1:?JSON or @file with profileId, profileRevision and prompt}")" ;;
- *) die "usage: mso $U_agent_profiles" ;;
+ *) die "usage: mso ${U_agent_profiles:-agent-profiles}" ;;
esac
}