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.
TypeScript browser-shellcontrol-planefile-managerhomelabmobile-firstnextjsptyreactself-hostedserver-managementshadcn-uisysadmintailwindcssterminaltypescriptvpsweb-desktopweb-terminal
feat: establish Nakama traceability and first Owner workflows
Abdurrahman Fakhruldcca770fe54e
diff --git a/.env.example b/.env.exampleindex 9a862b85..d5cf96cb 100644--- a/.env.example+++ b/.env.example@@ -222,6 +222,7 @@ OS_SESSION_SECRET=# OS_THREADS_DIR=~/.mso/threads # Alfa assistant chat threads (one file each)# OS_AGENT_MEMORY_DIR=~/.mso/agent-memory # isolated MSO Agent USER.md/MEMORY.md stores# OS_AGENT_SESSIONS_DIR=~/.mso/agent-sessions # durable CLI/MCP agent session records+# OS_AGENT_PROFILES_DIR=~/.mso/agent-profiles # private Owner-device saved profiles and revisions# MSO_AGENT_WORKTREE_ROOT=~/.cache/mso-worktrees # task-owned Git worktrees for source-changing agent workflows# Session artifacts use this same root: temp/<client-hash>/<session-id> (owner-only).# OS_AGENT_ARTIFACT_RETENTION_DAYS=7 # dormant artifacts only; clamped 1-30; active leases preserveddiff --git a/app/api/v1/agent-profiles/route.test.ts b/app/api/v1/agent-profiles/route.test.tsnew file mode 100644index 00000000..1355188a--- /dev/null+++ b/app/api/v1/agent-profiles/route.test.ts@@ -0,0 +1,72 @@+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";+import { mkdtemp, rm } from "node:fs/promises";+import os from "node:os";+import path from "node:path";++const mock = vi.hoisted(() => ({ auth: vi.fn(), live: vi.fn() }));+vi.mock("@/lib/auth/require-session", () => ({ getSessionContext: mock.auth }));+vi.mock("@/lib/auth/live-authorization", () => ({ liveSessionAuthorized: mock.live }));+vi.mock("@/lib/config/store", () => ({ DEFAULT_PROVIDER: "anthropic", readConfig: async () => ({ provider: "private-connection", model: "exact-model", keys: { private: "credential-never-in-catalog" } }) }));+vi.mock("@/lib/mcp/capability-runtime", () => ({ msoCapabilityRuntime: { list: () => [+ { name: "fs_read", scope: "read", description: "Read a file" },+ { name: "exec_run", scope: "exec", description: "Execute" },+] } }));+const { GET, POST } = await import("./route");+const ownerSession = { session: { device_id: "aaaaaaaaaaaaaaaa" }, role: "owner" };+const config = { name: "Reader", avatar: "", instructions: "", runtime: "mso-readonly", model: { provider: "private-connection", model: "exact-model" }, tools: ["fs_read"] };+const request = (body: unknown) => new Request("https://mso.invalid/api/v1/agent-profiles", { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify(body) });+let root: string;+beforeEach(async () => { root = await mkdtemp(path.join(os.tmpdir(), "mso-profile-api-")); vi.stubEnv("OS_AGENT_PROFILES_DIR", root); mock.auth.mockResolvedValue(ownerSession); mock.live.mockResolvedValue(true); });+afterEach(async () => { vi.unstubAllEnvs(); await rm(root, { recursive: true, force: true }); });++describe("profile HTTP lifecycle", () => {+ it.each([null, { ...ownerSession, role: "operator" }, { ...ownerSession, role: "viewer" }])("requires Owner for reads and writes: %j", async auth => {+ mock.auth.mockResolvedValue(auth);+ expect((await GET()).status).toBe(auth ? 403 : 401);+ expect((await POST(request({}))).status).toBe(auth ? 403 : 401);+ });+ it("returns a secret-free catalog and persists to the authenticated owner", async () => {+ const response = await GET();+ expect(response.headers.get("cache-control")).toBe("private, no-store");+ const catalog = await response.json();+ expect(catalog.selectedModel).toEqual(config.model);+ expect(catalog.tools).toEqual([{ name: "fs_read", description: "Read a file" }]);+ expect(JSON.stringify(catalog)).not.toContain("credential-never-in-catalog");+ const created = await POST(request({ action: "create", expectedRevision: 0, config, reason: "Owner created profile" }));+ expect(created.status).toBe(200);+ expect((await created.json()).store.profiles[0].owner).toBe("web:aaaaaaaaaaaaaaaa");+ mock.auth.mockResolvedValue({ session: { device_id: "bbbbbbbbbbbbbbbb" }, role: "owner" });+ expect((await (await GET()).json()).store.profiles).toEqual([]);+ });+ it("rejects spoofed principals, unsupported writes and oversized bodies", async () => {+ expect((await POST(request({ action: "create", expectedRevision: 0, config, owner: "other", reason: "spoof" }))).status).toBe(400);+ expect((await POST(request({ action: "create", expectedRevision: 0, config: { ...config, tools: ["exec_run"] }, reason: "unsupported" }))).status).toBe(422);+ expect((await POST(request({ padding: "x".repeat(17000) }))).status).toBe(413);+ expect((await (await GET()).json()).store.profiles).toEqual([]);+ });+ it("rechecks the session after body read and returns a conflict on a stale revision", async () => {+ mock.live.mockResolvedValue(false);+ expect((await POST(request({ action: "create", expectedRevision: 0, config, reason: "revoked" }))).status).toBe(403);+ mock.live.mockResolvedValue(true);+ const body = { action: "create", expectedRevision: 0, config, reason: "create" };+ expect((await POST(request(body))).status).toBe(200);+ const conflict = await POST(request(body));+ expect(conflict.status).toBe(409);+ expect(await conflict.json()).toEqual({ error: "profile_store_revision_conflict" });+ });+ it("rechecks Owner authority before committing a queued mutation", async () => {+ mock.live.mockResolvedValueOnce(true).mockResolvedValueOnce(true).mockResolvedValueOnce(false);+ const response = await POST(request({ action: "create", expectedRevision: 0, config, reason: "revoked during save" }));+ expect(response.status).toBe(403);+ mock.live.mockResolvedValue(true);+ expect((await (await GET()).json()).store.profiles).toEqual([]);+ });+ it("withholds the private response if Owner authority is withdrawn after commit", async () => {+ mock.live.mockResolvedValueOnce(true).mockResolvedValueOnce(true).mockResolvedValueOnce(true).mockResolvedValueOnce(false);+ const response = await POST(request({ action: "create", expectedRevision: 0, config, reason: "revoked after save" }));+ expect(response.status).toBe(403);+ expect(await response.json()).toEqual({ error: "profile_owner_session_revoked" });+ mock.live.mockResolvedValue(true);+ expect((await (await GET()).json()).store.profiles).toHaveLength(1);+ });+});diff --git a/app/api/v1/agent-profiles/route.ts b/app/api/v1/agent-profiles/route.tsnew file mode 100644index 00000000..40c634b6--- /dev/null+++ b/app/api/v1/agent-profiles/route.ts@@ -0,0 +1,46 @@+import { NextResponse } from "next/server";+import { getSessionContext } from "@/lib/auth/require-session";+import { liveSessionAuthorized } from "@/lib/auth/live-authorization";+import { readRequestJson, RequestBodyError } from "@/lib/security/request-body";+import { DEFAULT_PROVIDER, readConfig } from "@/lib/config/store";+import { defaultModelFor } from "@/lib/models/defaults";+import { msoCapabilityRuntime } from "@/lib/mcp/capability-runtime";+import { PROFILE_READ_TOOLS } from "@/lib/contracts/agent-profile";+import { AgentProfileError } from "@/lib/agent/profile-schema";+import { readAgentProfiles, mutateAgentProfiles } from "@/lib/agent/profile-store";++export const runtime = "nodejs";+export const dynamic = "force-dynamic";+const headers = { "Cache-Control": "private, no-store" };+const fail = (error: string, status: number) => NextResponse.json({ error }, { status, headers });+function failure(error: unknown) {+ return error instanceof AgentProfileError || error instanceof RequestBodyError ? fail(error.message, error.status) : fail("profile_store_unavailable", 500);+}+export async function GET() {+ const context = await getSessionContext();+ if (!context?.session.device_id) return fail("unauthorized", 401);+ if (context.role !== "owner") return fail("profile_owner_required", 403);+ try {+ const principal = `web:${context.session.device_id}`;+ const [store, config] = await Promise.all([readAgentProfiles(principal), readConfig()]);+ const provider = config.provider || DEFAULT_PROVIDER;+ const tools = msoCapabilityRuntime.list("read").filter(tool => tool.scope === "read" && (PROFILE_READ_TOOLS as readonly string[]).includes(tool.name)).map(({ name, description }) => ({ name, description }));+ if (!await liveSessionAuthorized(context.session, "owner")) return fail("profile_owner_session_revoked", 403);+ return NextResponse.json({ store, selectedModel: { provider, model: config.model || defaultModelFor(provider) }, tools }, { headers });+ } catch (error) { return failure(error); }+}+export async function POST(req: Request) {+ const context = await getSessionContext();+ if (!context?.session.device_id) return fail("unauthorized", 401);+ if (context.role !== "owner") return fail("profile_owner_required", 403);+ try {+ const body = await readRequestJson(req, 16 * 1024);+ const authorize = async () => {+ if (!await liveSessionAuthorized(context.session, "owner")) throw new AgentProfileError("profile_owner_session_revoked", 403);+ };+ await authorize();+ const store = await mutateAgentProfiles(`web:${context.session.device_id}`, body, authorize);+ await authorize();+ return NextResponse.json({ store }, { headers });+ } catch (error) { return failure(error); }+}diff --git a/app/api/v1/agent-profiles/run/route.test.ts b/app/api/v1/agent-profiles/run/route.test.tsnew file mode 100644index 00000000..c68245d9--- /dev/null+++ b/app/api/v1/agent-profiles/run/route.test.ts@@ -0,0 +1,49 @@+import { beforeEach, describe, expect, it, vi } from "vitest";++const mock = vi.hoisted(() => ({ auth: vi.fn(), run: vi.fn(), limited: vi.fn() }));+vi.mock("@/lib/auth/require-session", () => ({ getSessionContext: mock.auth }));+vi.mock("@/lib/agent/profile-runtime", () => ({ runAgentProfile: mock.run }));+vi.mock("@/lib/mcp/capability-runtime", () => ({ msoCapabilityRuntime: { list: () => [], invoke: vi.fn() } }));+vi.mock("@/lib/host/rate-limit", () => ({ rateLimited: mock.limited }));+const { POST } = await import("./route");+const { AgentProfileError } = await import("@/lib/agent/profile-schema");+const auth = { session: { device_id: "aaaaaaaaaaaaaaaa" }, role: "owner" };+const request = (body: unknown = { profileId: "profile-fixture", profileRevision: 1, prompt: "read" }) => new Request("https://mso.invalid/api/v1/agent-profiles/run", { method: "POST", body: JSON.stringify(body) });+beforeEach(() => { Object.values(mock).forEach(fn => fn.mockReset()); mock.auth.mockResolvedValue(auth); mock.limited.mockReturnValue(false); mock.run.mockResolvedValue({ runId: "fixture", status: "completed" }); });++describe("profile task HTTP admission", () => {+ it.each([null, { ...auth, role: "operator" }, { ...auth, role: "viewer" }])("requires Owner before running: %j", async context => {+ mock.auth.mockResolvedValue(context);+ expect((await POST(request())).status).toBe(context ? 403 : 401);+ expect(mock.run).not.toHaveBeenCalled();+ });+ it("passes the authenticated session and request cancellation to the runner", async () => {+ const response = await POST(request());+ expect(response.status).toBe(200);+ expect(response.headers.get("cache-control")).toBe("private, no-store");+ expect(mock.run).toHaveBeenCalledWith(expect.objectContaining({ session: auth.session, signal: expect.any(AbortSignal) }));+ });+ it("refuses a simultaneous task on the same device, then admits work after completion", async () => {+ let complete!: (value: unknown) => void;+ mock.run.mockImplementationOnce(() => new Promise(resolve => { complete = resolve; }));+ const first = POST(request());+ await vi.waitFor(() => expect(mock.run).toHaveBeenCalledTimes(1));+ expect((await POST(request())).status).toBe(409);+ complete({ status: "completed" }); await first;+ expect((await POST(request())).status).toBe(200);+ });+ it("bounds body size and rate without starting a model request", async () => {+ expect((await POST(request({ prompt: "x".repeat(17000) }))).status).toBe(413);+ mock.limited.mockReturnValue(true);+ const response = await POST(request());+ expect(response.status).toBe(429); expect(response.headers.get("retry-after")).toBe("60");+ expect(mock.run).not.toHaveBeenCalled();+ });+ it("exposes expected conflicts but sanitizes unexpected provider or filesystem errors", async () => {+ mock.run.mockRejectedValueOnce(new AgentProfileError("profile_revision_conflict", 409));+ expect((await POST(request())).status).toBe(409);+ mock.run.mockRejectedValueOnce(new Error("provider-key-fixture /private/path"));+ const response = await POST(request());+ expect(response.status).toBe(502); expect(await response.json()).toEqual({ error: "profile_run_failed" });+ });+});diff --git a/app/api/v1/agent-profiles/run/route.ts b/app/api/v1/agent-profiles/run/route.tsnew file mode 100644index 00000000..e8912b45--- /dev/null+++ b/app/api/v1/agent-profiles/run/route.ts@@ -0,0 +1,34 @@+import { NextResponse } from "next/server";+import { getSessionContext } from "@/lib/auth/require-session";+import { readRequestJson, RequestBodyError } from "@/lib/security/request-body";+import { rateLimited } from "@/lib/host/limits-api";+import { msoCapabilityRuntime } from "@/lib/mcp/capability-runtime";+import { SelectedModelConfigError } from "@/lib/ai/selected-model-stream";+import { AgentProfileError } from "@/lib/agent/profile-schema";+import { runAgentProfile } from "@/lib/agent/profile-runtime";++export const runtime = "nodejs";+export const dynamic = "force-dynamic";+const active = new Set<string>();+const headers = { "Cache-Control": "private, no-store" };+const fail = (error: string, status: number) => NextResponse.json({ error }, { status, headers });++export async function POST(req: Request) {+ const context = await getSessionContext();+ if (!context) return fail("unauthorized", 401);+ if (context.role !== "owner") return fail("profile_owner_required", 403);+ const device = context.session.device_id;+ if (!device) return fail("unauthorized", 401);+ let admitted = false;+ try {+ const body = await readRequestJson(req, 16 * 1024);+ if (rateLimited(`profile-run:${device}`, 10, 60_000)) return NextResponse.json({ error: "rate_limited" }, { status: 429, headers: { ...headers, "Retry-After": "60" } });+ if (active.has(device)) return fail("profile_run_already_active", 409);+ active.add(device); admitted = true;+ const result = await runAgentProfile({ session: context.session, body, capabilities: msoCapabilityRuntime, signal: req.signal });+ return NextResponse.json(result, { headers });+ } catch (error) {+ if (error instanceof AgentProfileError || error instanceof RequestBodyError || error instanceof SelectedModelConfigError) return fail(error.message, error.status);+ return fail(req.signal.aborted ? "profile_run_cancelled" : "profile_run_failed", req.signal.aborted ? 499 : 502);+ } finally { if (admitted) active.delete(device); }+}diff --git a/app/api/v1/alfa/cockpit/route.test.ts b/app/api/v1/alfa/cockpit/route.test.tsindex e4894399..268203f7 100644--- a/app/api/v1/alfa/cockpit/route.test.ts+++ b/app/api/v1/alfa/cockpit/route.test.ts@@ -81,6 +81,21 @@ describe("Alfa cockpit read model", () => {expect(mocks.typed).not.toHaveBeenCalled();});+ it("returns a bounded project-only page without reading other cockpit domains", async () => {+ const response = await GET(new NextRequest("http://localhost/api/v1/alfa/cockpit?view=projects"));+ expect(response.status).toBe(200);+ await expect(response.json()).resolves.toMatchObject({ projects: { rows: [{ id: "root/mso", name: "mso" }], hasMore: false, scan: { truncated: false } } });+ expect(mocks.listProjects).toHaveBeenCalledWith({ limit: 30 });+ for (const read of [mocks.readConfig, mocks.sessions, mocks.agents, mocks.memories, mocks.typed]) expect(read).not.toHaveBeenCalled();+ });++ it("requires the live Owner role for the project-only view", async () => {+ mocks.context.current = { role: "viewer", session: { device_id: "viewer-device" } };+ const response = await GET(new NextRequest("http://localhost/api/v1/alfa/cockpit?view=projects"));+ expect(response.status).toBe(403);+ expect(mocks.listProjects).not.toHaveBeenCalled();+ });+it("adds a compact selected-project snapshot without returning raw knowledge content", async () => {mocks.resolveProjectHint.mockResolvedValue({ id: "root/mso", name: "mso", path: "/srv/mso", rootId: "root", root: "/srv", aliases: [] });mocks.projectGitSnapshot.mockResolvedValue({ available: true, branch: "main", clean: false, head: { sha: "abcdef123456", subject: "change" } });diff --git a/app/api/v1/alfa/cockpit/route.ts b/app/api/v1/alfa/cockpit/route.tsindex 36f864eb..9d4754f3 100644--- a/app/api/v1/alfa/cockpit/route.ts+++ b/app/api/v1/alfa/cockpit/route.ts@@ -39,8 +39,8 @@ export async function GET(req: NextRequest) {const projectQuery = String(req.nextUrl.searchParams.get("q") || "").trim().slice(0, 120);try {- if (projectQuery) {- const projectList = await listProjects({ query: projectQuery, limit: 30 });+ if (projectQuery || req.nextUrl.searchParams.get("view") === "projects") {+ const projectList = await listProjects({ ...(projectQuery ? { query: projectQuery } : {}), limit: 30 });return NextResponse.json({projects: {total: projectList.total, hasMore: projectList.hasMore, scan: projectList.scan,diff --git a/app/api/v1/workflows/route.ts b/app/api/v1/workflows/route.tsindex cb2dd1d8..37d46e6e 100644--- a/app/api/v1/workflows/route.ts+++ b/app/api/v1/workflows/route.ts@@ -89,5 +89,5 @@ export async function POST(req:NextRequest){const session=await auth("operator")if(action==="run_stop")return NextResponse.json(await requestWorkflowGraphStop(session.principal,String(body.run_id??"")),{headers});if(action==="run_delete")return NextResponse.json(await deleteWorkflowGraphRun(workflowGraphOwner(session.principal),String(body.run_id??"")),{headers});if(action==="run_retry"){const prior=await readWorkflowGraphRun(workflowGraphOwner(session.principal),String(body.run_id??""));if(!prior)throw new Error("workflow execution not found");await requireWorkflowReceiptAuthority(session.principal,prior);if(prior.state==="running")throw new Error("running execution must be stopped before retry");if(!prior.runtimeInput)throw new Error("execution predates retry input retention; run the workflow again instead");const graph=await getWorkflowGraph(session.principal,prior.graphId);if(!graph)throw new Error("workflow graph not found");if(graph.revision!==prior.graphRevision)throw new Error("workflow changed since this execution; run the current workflow instead of retrying stale input");const agentSession=await createAgentSession(session.principal,"cli",{title:`Workflow retry: ${graph.name}`,titleSource:"auto"}),context={principal:session.principal,actor:session.principal,sessionId:agentSession.id,scope:maxScope(),capabilities:msoCapabilityRuntime} as const;return NextResponse.json(await startWorkflowGraph(graph,prior.runtimeInput,String(body.idempotency_key??`retry:${prior.id}:${Date.now()}`),context,(name)=>TOOLS_BY_NAME.get(name)),{headers});}- if(action==="run"){const graph=await getWorkflowGraph(session.principal,String(body.graph_id??""));if(!graph)throw new Error("workflow graph not found");const agentSession=await createAgentSession(session.principal,"cli",{title:`Workflow: ${graph.name}`,titleSource:"auto"}),context={principal:session.principal,actor:session.principal,sessionId:agentSession.id,scope:maxScope(),capabilities:msoCapabilityRuntime} as const;return NextResponse.json(await startWorkflowGraph(graph,body.input??{},String(body.idempotency_key??`${Date.now()}`),context,(name)=>TOOLS_BY_NAME.get(name)),{headers});}+ if(action==="run"){const graph=await getWorkflowGraph(session.principal,String(body.graph_id??""));if(!graph)throw new Error("workflow graph not found");if(body.expected_revision!==undefined){if(typeof body.expected_revision!=="string"||!/^[a-f0-9]{64}$/.test(body.expected_revision))return fail("invalid expected workflow revision",400);if(body.expected_revision!==graph.revision)return fail("workflow graph revision changed; review it before running",409);}const agentSession=await createAgentSession(session.principal,"cli",{title:`Workflow: ${graph.name}`,titleSource:"auto"}),context={principal:session.principal,actor:session.principal,sessionId:agentSession.id,scope:maxScope(),capabilities:msoCapabilityRuntime} as const;return NextResponse.json(await startWorkflowGraph(graph,body.input??{},String(body.idempotency_key??`${Date.now()}`),context,(name)=>TOOLS_BY_NAME.get(name)),{headers});}throw new Error("unknown workflow action");}catch(error){return fail(error);}}diff --git a/app/api/v1/workflows/run-revision.test.ts b/app/api/v1/workflows/run-revision.test.tsnew file mode 100644index 00000000..c9ec5ff4--- /dev/null+++ b/app/api/v1/workflows/run-revision.test.ts@@ -0,0 +1,66 @@+import { beforeEach, describe, expect, it, vi } from "vitest";+import { NextRequest } from "next/server";++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/mcp/scope", () => ({ maxScope: () => "exec" }));+vi.mock("@/lib/mcp/capability-runtime", () => ({ msoCapabilityRuntime: {} }));+vi.mock("@/lib/mcp/tools", () => ({ TOOLS_BY_NAME: new Map() }));++const { POST } = await import("./route");+const revision = "a".repeat(64);+const graph = { id: "graph-1", name: "First project check", revision };+const request = (extra: Record<string, unknown> = {}) => new NextRequest("http://localhost/api/v1/workflows", {+ method: "POST", headers: { "content-type": "application/json" },+ body: JSON.stringify({ action: "run", graph_id: graph.id, input: {}, idempotency_key: "same-request", ...extra }),+});++beforeEach(() => {+ vi.clearAllMocks();+ mocks.role = "owner";+ mocks.limited.mockReturnValue(false);+ mocks.get.mockResolvedValue(graph);+ mocks.createSession.mockResolvedValue({ id: "session-1" });+ mocks.run.mockResolvedValue({ id: "run-1", state: "running" });+});++describe("reviewed workflow dispatch", () => {+ it("rejects a changed revision before creating either a session or run", async () => {+ const response = await POST(request({ expected_revision: "b".repeat(64) }));+ expect(response.status).toBe(409);+ await expect(response.json()).resolves.toEqual({ error: "workflow graph revision changed; review it before running" });+ expect(mocks.createSession).not.toHaveBeenCalled();+ expect(mocks.run).not.toHaveBeenCalled();+ });++ it.each([1, "", "a", { revision }, null])("rejects malformed revision %j", async (expected_revision) => {+ expect((await POST(request({ expected_revision }))).status).toBe(400);+ expect(mocks.createSession).not.toHaveBeenCalled();+ expect(mocks.run).not.toHaveBeenCalled();+ });++ it("passes the reviewed snapshot and initiating principal to the existing runtime", async () => {+ expect((await POST(request({ expected_revision: revision }))).status).toBe(200);+ expect(mocks.get).toHaveBeenCalledWith("web:fixture-device", graph.id);+ expect(mocks.run).toHaveBeenCalledWith(graph, {}, "same-request", expect.objectContaining({ principal: "web:fixture-device", actor: "web:fixture-device", sessionId: "session-1" }), expect.any(Function));+ });++ it("preserves existing callers that do not provide an expected revision", async () => {+ expect((await POST(request())).status).toBe(200);+ expect(mocks.run).toHaveBeenCalledOnce();+ });++ it.each([null, "viewer"])("keeps the existing live role gate for %s", async (role) => {+ mocks.role = role;+ expect((await POST(request({ expected_revision: revision }))).status).toBe(403);+ expect(mocks.get).not.toHaveBeenCalled();+ expect(mocks.createSession).not.toHaveBeenCalled();+ expect(mocks.run).not.toHaveBeenCalled();+ });+});diff --git a/bin/mso b/bin/msoindex 0627a0ae..0c07f134 100755--- a/bin/mso+++ b/bin/mso@@ -73,6 +73,7 @@# cockpit [project] Alfa/MSO runtime context; search with `cockpit search <query>`# threads * Conversation history: list | show | save | rename | rm# agent-sessions * Durable MSO Agent sessions: list | show | create+# agent-profiles * Saved owner profiles: create | edit | clone | default | enable | disable | run# agents * Native local session agents: list | send | inbox# org * Organization chart: units, seats, reporting lines, targets# a2a * Agent-to-Agent v1 + workflow trace: list | discover | send | handoff | trace@@ -167,8 +168,11 @@ while [ $# -gt 0 ]; doesacdone-# Dispatch local maintenance before sourcing credentials or creating a cookie jar.+# Help and local maintenance do not source credentials or create a cookie jar.case "${1-}" in+ help|-h|--help)+ # shellcheck source=../scripts/cli/help.sh+ source "$ROOT/scripts/cli/help.sh"; usage; exit 0 ;;heartbeat)[ -z "$BASE_OVERRIDE" ] || die "heartbeat is local-only; omit --base"shiftdiff --git a/bin/mso-update-offline.test.ts b/bin/mso-update-offline.test.tsindex f530c22f..b52cae47 100644--- a/bin/mso-update-offline.test.ts+++ b/bin/mso-update-offline.test.ts@@ -38,6 +38,7 @@ function fixture() {"scripts/cli/transport.sh","scripts/cli/onboarding.sh", "scripts/cli/onboarding-ai.sh","scripts/cli/commands.sh",+ "scripts/cli/help.sh","scripts/cli/commands-host.sh","scripts/cli/commands-runtime.sh","scripts/cli/commands-state.sh", "scripts/cli/config-command.sh",diff --git a/bin/mso.test.ts b/bin/mso.test.tsindex d9576ddc..c5e71f4c 100644--- a/bin/mso.test.ts+++ b/bin/mso.test.ts@@ -19,6 +19,7 @@ const commandOwnerFiles = ["scripts/cli/agent-groups.sh","scripts/cli/commands-state.sh","scripts/cli/organization.sh",+ "scripts/cli/agent-profiles.sh","scripts/cli/config-command.sh","scripts/cli/commands-admin.sh",];@@ -61,9 +62,9 @@ describe("bin/mso", () => {it("documents the owner-only memory backup command", () => { expect(run("memory-backup", "--help")).toContain("create --confirm"); });- it("prints memory-graph usage instead of the assistant memory verb", () => {- expect(run("memory-graph", "--help")).toContain("memory-graph [project]");- });+ it("prints memory-graph usage instead of the assistant memory verb", () => { expect(run("memory-graph", "--help")).toContain("memory-graph [project]"); });++ it("documents saved-profile lifecycle without starting a request", () => { expect(run("agent-profiles", "--help")).toContain("agent-profiles list|create|edit|clone|default|enable|disable"); });it("exits non-zero on an unknown command", () => {expect(() => run("definitely-not-a-verb")).toThrow();diff --git a/docs/AGENT-PROFILES.md b/docs/AGENT-PROFILES.mdnew file mode 100644index 00000000..ce8cb563--- /dev/null+++ b/docs/AGENT-PROFILES.md@@ -0,0 +1,151 @@+# Saved agent profiles++Saved profiles are a supported intermediate slice of Nakama parity PK08 / NK009–NK010.+They persist an Owner device's configuration and execute foreground read tasks with+server-enforced tool selection. The remaining organization, assignment and isolated+worker requirements are not complete.++## Use++Open **Alfa → Agents → Saved profiles** (`/assistant/agents`). Create a profile with a+name, optional initials, instructions, exact provider/model IDs, and selected read+tools. The selected Settings connection pre-fills the model fields. Saving does not+test that connection; a missing connection stops execution with a visible error.++Save a reason with each configuration edit. The detail panel shows every revision's+actor, time, reason and configuration. Clone creates a new same-device profile from+the selected snapshot. Set default selects the profile used when the run API omits+`profileId`; callers must still send its exact `profileRevision`. The first profile+becomes default. Disabling the default clears that selection; enabling it does not+silently restore the default.++**Run a read task** starts a new native MSO Agent session with the selected saved+revision. Tasks have no earlier browser chat, owner memory, implicit project context+or inherited knowledge snapshot. Native Sessions contain the run and tool receipts.+The result arrives when the foreground task finishes. Stop cancels the request;+completed reads remain recorded. This surface does not stream text or resume tasks.++Browser personas remain under the separate **Browser personas** tab. Their+`alfa.agents` localStorage, active `@mention` and legacy main-chat behavior remain+independent of saved profiles. Browser backup does not back up server profiles.++## Authority and execution++The server derives `web:<device_id>` from a live authenticated Owner session. The+profile API accepts no owner, principal, grant or capability policy from the client.+Each device has a separate profile namespace. This is the existing trusted-owner+deployment model, **not human account, organization or process isolation**. Other+Owner devices retain the deployment's existing owner capabilities and Sessions+monitor. CLI and browser devices therefore normally have different profile lists.++Only runtime `mso-readonly` is supported. The reviewed read allowlist is:++| Tools | Existing authority |+|---|---|+| `fs_list`, `fs_read`, `fs_search`, `fs_usage` | Host read roots, credential denylist and bounded filesystem adapters |+| `projects_list`, `project_get`, `project_candidate_search`, `project_capabilities` | Existing project discovery and read guards |+| `vps_status` | Existing bounded host status adapter |++The saved allowlist only narrows these reads. It does not introduce a per-profile+filesystem jail: allowed paths still come from the deployment's existing roots.+Empty tool selection permits text-only model responses. Unknown tools, mutation or+exec tools, external runtimes, organization moves and assignment fields fail with+an unsupported error. Skills, connected MCPs, knowledge, memory, ACP/CLI runtimes,+delegation, background scheduling, deletion and cross-organization transfer are not+implemented by this profile lifecycle.++`lib/agent/bounded-runner.ts` supplies the same provider-neutral loop as same-session+subagents. It rechecks live authority before and after model/tool steps. The profile+adapter re-reads the saved enabled state and exact revision at each boundary, then+invokes the canonical capability kernel with server-fixed principal, read scope and+allowed tools. Client/model arguments cannot override those values. Editing,+disabling, removing the stored profile, or revoking the Owner session stops further+steps; an already-started read may finish before the next boundary check.++Each run uses the exact saved provider and model reference without changing the+deployment default. Connection credentials remain in the existing owner config or+OAuth store and never become profile fields. Connection changes are observed at+preparation of the next run; model preparation may perform the existing OAuth token+refresh. A run uses its prepared connection for its lifetime. No durable delegation+grant is minted. Public MCP and legacy Alfa tool catalogs are unchanged.++## Storage and concurrency++The default directory is `~/.mso/agent-profiles`; `OS_AGENT_PROFILES_DIR` overrides it.+Per-device files use a SHA-256 principal filename, schema version 1, private file+permissions, checked owner paths, a cross-process lock, fsync and atomic replacement.+The configured directory is also blocked from generic filesystem tools and recursive+archives, including when `OS_FS_ALLOW_SENSITIVE=1`.++Every mutation supplies the current store `expectedRevision`. Existing-profile+mutations also require `profileRevision`. A conflict returns HTTP 409 without+overwriting another edit. Create, edit, default, enable and disable record a revision;+clone records a new profile's first revision with its source ID/revision. The API+rechecks Owner authorization after lock acquisition and immediately before commit.+Revision snapshots are append-only through this API, not a tamper-proof audit ledger+against host administrators.++Missing stores start empty. Corrupt JSON, invalid schemas, unsafe permissions or+symlinked policy paths fail closed and are not overwritten. If directory fsync fails+after replacement, the API reports an uncertain commit; refresh before retrying.+Use deployment-level private backups for this directory. There is no profile+export/import or migration API in this slice.++Limits: 100 profiles per device, 200 revisions per profile, 4 MiB per store, 16 KiB+request bodies, 4,000-character instructions and 8,000-character task text. Runs+allow six model turns, sixteen tool calls and sixty seconds. The HTTP process allows+one foreground task per device and ten starts per minute. The task admission limit+is process-local, not a distributed worker scheduler.++## API and CLI++`GET /api/v1/agent-profiles` returns the authenticated device's store, selected model+reference, and supported read-tool descriptions. `POST` accepts `action`,+`expectedRevision`, `reason`, and fields required for that action. Create/edit use+`config`; clone uses source `id`, `profileRevision` and the new `name`. Default,+enable and disable use `id` and `profileRevision`.++```json+{+ "action": "create",+ "expectedRevision": 0,+ "reason": "Inspect repository files",+ "config": {+ "name": "Repository reader",+ "avatar": "RR",+ "instructions": "Cite the files you inspect.",+ "runtime": "mso-readonly",+ "model": { "provider": "openai", "model": "configured-model-id" },+ "tools": ["fs_read", "fs_list"]+ }+}+```++`POST /api/v1/agent-profiles/run` accepts only `profileId`, `profileRevision` and+`prompt`. It returns `runId` (native session ID), the actual profile/model binding,+status, final text, rounds and tool outcomes. Both APIs require Owner and return+private no-store responses. Run failures return a sanitized error code.++```bash+mso agent-profiles list+mso agent-profiles create @profile.json+mso agent-profiles edit @revision.json+mso agent-profiles clone @clone.json+mso agent-profiles default @selection.json+mso agent-profiles disable @selection.json+mso agent-profiles enable @selection.json+mso agent-profiles run @task.json+```++The CLI uses the same HTTP authority and revision checks. No new public MCP tools or+Workflow Graph profile execution nodes are claimed in this slice.++## Verification boundary++Store, route and runtime tests cover actual private-file persistence, stale/concurrent+edits, clone/default history, cross-device requests, unsupported policy, unsafe store+paths, cancellation and permission changes during a task. Provider responses are+explicit local test doubles. The browser fixture exercises real lifecycle APIs,+reload, reflow and a real missing-connection error; it does not claim live-provider+verification. The UI follows existing AppShell typography, theme tokens, form+controls and list/detail layout, with one-column reflow and visible task/error states.diff --git a/docs/ARCHITECTURE.md b/docs/ARCHITECTURE.mdindex 95466cfb..ef4e1dc8 100644--- a/docs/ARCHITECTURE.md+++ b/docs/ARCHITECTURE.md@@ -45,6 +45,7 @@ flowchart LR| Terminal MSO Agent | `scripts/mso-agent.mjs`, `mso-agent-turn.mjs`, `mso-agent-layout.mjs`, `mso-agent-errors.mjs`, `/api/v1/agent-tools` | Streams through `/api/assistant`, discovers the canonical MCP catalog, renders sectioned Assistant/work/local/error output, and preserves exact approval + recoverable mutation-outcome semantics. || Local Agent messaging | `lib/agent/local-agent-*`, `/api/v1/local-agents`, `scripts/mso-agent-local.mjs` | Same-principal presence + durable mailbox + SSE delivery; active human mentions require a live receiver and never require an Agent Card. || Same-session subagents | `lib/agent/subagent-runner.ts`, `lib/mcp/tools-subagents.ts` | Bounded foreground isolated child runs behind an exec-scope delegation boundary; no recursive/background worker is created. |+| Saved agent profiles | `lib/agent/profile-*`, `bounded-runner.ts`, `/api/v1/agent-profiles` | Owner-device revisioned configuration and foreground read tasks; exact model binding, server-enforced tools and live authorization. See [AGENT-PROFILES.md](./AGENT-PROFILES.md). || Infrastructure providers | `lib/infra/*`, `/api/v1/infra/*` | Owner-private Dokploy/Cloudflare/Hostinger state and bounded provider clients; secrets never enter model tool arguments. || Alfa | `frontend/slices/assistant/host-tools/*` | Stable tool catalog; reads run immediately, mutations require human approval. || MCP | `lib/mcp/*`, `/mcp`, `/oauth/*` | OAuth 2.1 + PKCE; `read < write < exec` token scope. |diff --git a/docs/CLI.md b/docs/CLI.mdindex 50d1625c..3d9e1dd6 100644--- a/docs/CLI.md+++ b/docs/CLI.md@@ -113,6 +113,7 @@ Commands:cockpit [project] Alfa/MSO runtime context; search with `cockpit search <query>`threads * Conversation history: list | show | save | rename | rmagent-sessions * Durable MSO Agent sessions: list | show | create+ agent-profiles * Saved owner profiles: create | edit | clone | default | enable | disable | runagents * Native local session agents: list | send | inboxorg * Organization chart: units, seats, reporting lines, targetsa2a * Agent-to-Agent v1 + workflow trace: list | discover | send | handoff | tracediff --git a/docs/NAKAMA-PARITY.md b/docs/NAKAMA-PARITY.mdnew file mode 100644index 00000000..1f2753f0--- /dev/null+++ b/docs/NAKAMA-PARITY.md@@ -0,0 +1,208 @@+# Paritas Nakama ke MSO++Dokumen ini dihasilkan dari snapshot draf v0.1 yang dibekukan dan peta implementasi terpisah. Status mengacu pada kebutuhan penuh, bukan jumlah layar yang sudah dibuat.++Target tetap **64 kebutuhan, 24 paket, 8 tahap, dan 30 skenario penerimaan**. Status saat ini: **59 pending, 5 partial, 0 implemented**.++Sumber dibekukan pada [Nakama f6c8f26f8a83](https://github.com/ahmadrosid/nakama/tree/f6c8f26f8a831e690016ec70429c3cb5cb114cec) dan [MSO 89d61bb0d73b](https://github.com/rahmanef63/mso/tree/89d61bb0d73b47047c67e51df9a6ee30351c8c3a). Identitas 100 berkas sumber tercatat; identitas berkas tidak membuktikan perilaku runtime.++Kontrak lengkap tersimpan dalam [snapshot](./parity/nakama-v0.1.json), [peta implementasi](./parity/nakama-implementation.json), [identitas sumber](./parity/source-references.json), dan [aturan bukti](./parity/EVIDENCE.md).++## Kebutuhan dan kontrak++| ID | Kebutuhan | Status | Paket | Penerimaan | Kontrak penuh |+|---|---|---|---|---|---|+| NK-001 | Panduan awal dan pemulihan instalasi | partial | PK03, PK06, PK22 | A01, A29 | Satukan instalasi dan pengaturan awal menjadi panduan akun admin, organisasi, provider, serta konteks pengguna. Sediakan pilihan memulihkan backup sebelum membuat state baru, langkah yang boleh dilewati, pemeriksaan kesiapan, dan akses pemulihan owner. Uji agar instalasi pribadi lama tetap dapat dipakai tanpa wajib membentuk tim. |+| NK-002 | Akun pengguna dan kata sandi | pending | PK04, PK05, PK06 | A02, A03, A05 | Lengkapi akun lokal bernama dengan login email dan kata sandi, penyuntingan profil, perubahan serta reset kata sandi, dan penerimaan undangan. Petakan sesi ke principal yang terverifikasi. Login owner berbasis konfigurasi saat ini menjadi jalur kompatibilitas dan pemulihan, bukan akun bersama untuk seluruh anggota. |+| NK-003 | Passkey dan autentikasi berlapis | pending | PK04 | A03, A06 | Audit dukungan autentikator, lalu sediakan pendaftaran dan penghapusan passkey WebAuthn, TOTP, kode pemulihan sekali pakai, serta kebijakan wajib MFA. Ikat proses ke akun dan origin yang benar, tampilkan status perangkat, dan uji pemulihan kehilangan autentikator tanpa membuka akses organisasi lain atau menyamakan fitur ini dengan SSO. |+| NK-004 | Sesi login dan rotasi token | pending | PK04, PK06 | A03, A06 | Perluas pengelolaan perangkat serta token menjadi daftar sesi login per pengguna, pencabutan sesi terpilih atau seluruh sesi, dan rotasi token lokal untuk CLI maupun worker. Pisahkan sesi autentikasi dari percakapan agen; uji kedaluwarsa, audience, revocation selama run, dan penolakan token lama setelah rotasi. |+| NK-005 | Organisasi induk dan tim | pending | PK05, PK06 | A02, A04, A05 | Kembangkan fondasi tenant menjadi pembuatan organisasi dan tim, hubungan induk, pemilihan organisasi aktif, pengarsipan, penghapusan permanen yang ditinjau, serta penonaktifan dan pengaktifan akun. Pisahkan organisasi pengguna dari diagram unit dan seat agen MSO; perubahan struktur tidak otomatis memindahkan data pribadi atau kredensial. |+| NK-006 | Peran anggota dan kepemilikan percakapan | pending | PK05, PK06 | A02, A04, A05, A06 | Lengkapi peran admin platform dan organisasi, undangan, daftar anggota, penambahan atau penghapusan membership, serta perubahan peran. Terapkan kepemilikan percakapan pribadi pada UI dan seluruh transport server. Peran perangkat Viewer, Operator, dan Owner yang sudah ada tidak boleh dianggap otomatis sebagai RBAC pengguna atau hak membaca chat anggota. |+| NK-007 | Publikasi resource ke tim | pending | PK05, PK06, PK12 | A04, A05, A16 | Verifikasi padanan publikasi, lalu sediakan knowledge, skill, template agen, tool, dan model yang dapat diterbitkan organisasi induk kepada tim. Tampilkan sumber dan pencabutan akses. Resource bersama tidak membawa secret atau membuka workspace pribadi; pencabutan template sumber tetap mempertahankan hasil kerja tim yang telah disimpan sesuai kebijakan. |+| NK-008 | Kuota bulanan organisasi | pending | PK23, PK06 | A28, A05 | Audit pencatatan penggunaan sebelum menambahkan batas bulanan jumlah turn dan token LLM per organisasi, ambang peringatan, serta rincian pemakaian. Periksa batas sebelum turn dimulai dan rekonsiliasi hasil provider setelahnya. Uji run bersamaan serta pergantian bulan; bedakan kuota operasional dari tagihan, langganan, dan estimasi biaya. |+| NK-009 | Identitas dan kemampuan profil agen | partial | PK08, PK11, PK13 | A07, A09, A10 | Perluas profil nama, avatar, persona, agen default, identitas serta instruksi soul, memory, model, dan assignment kemampuan. Sediakan asisten pembuat profil yang menampilkan rancangan sebelum penerapan. Terapkan batas tool, MCP, dan skill pada server; metadata allTools atau skills Alfa saat ini tidak menjadi bukti pembatasan akses yang efektif. |+| NK-010 | Salinan, pemindahan, dan riwayat profil | partial | PK08, PK05, PK06 | A07, A05 | Audit operasi profil yang tersedia, lalu lengkapi clone, perpindahan antarorganisasi, dan riwayat konfigurasi yang hanya ditambahkan. Tampilkan revisi, pelaku, alasan, serta perubahan grant. Salinan profil harus menautkan ulang tool atau koneksi sesuai izin tujuan, tanpa menyalin secret atau memindahkan koneksi kanal secara diam-diam. |+| NK-011 | Provider, katalog model, dan multimodal | pending | PK08, PK19, PK23 | A09, A24, A28 | Gunakan ulang resolusi provider dan streaming untuk beberapa instance provider, discovery katalog, pemilihan model, context window, tarif, serta pengaturan reasoning. Lengkapi default vision, audio, dan gambar per profil. Uji setiap adapter baseline yang benar-benar dikonfigurasi, termasuk provider kompatibel OpenAI dan lokal; tampilkan kemampuan yang tidak didukung secara eksplisit. |+| NK-012 | Login langganan model melalui OAuth | pending | PK08, PK11 | A09, A13, A06 | Gunakan ulang jalur Codex OAuth dan verifikasi padanan login langganan ChatGPT serta Grok, penyimpanan sesi, refresh, pencabutan, dan pemilihan akun. Jangan menyalin kredensial antaridentitas. Ketersediaan paket, batas penggunaan, dan izin provider menjadi dependensi yang ditampilkan; keberadaan adapter tidak menjamin semua akun dapat menggunakannya. |+| NK-013 | Runtime percakapan ACP | pending | PK10, PK07, PK11 | A09, A11, A12, A13 | Verifikasi dukungan ACP sebelum menambahkan pilihan runtime Claude atau Codex, model, dan reasoning serta jembatan tool yang terikat sesi MSO. Perlakukan proses ACP sebagai runtime dengan loop tersendiri, bukan sekadar provider LLM. Uji autentikasi, propagasi izin, status proses, pembatalan, dan pemisahan workspace pada adapter yang dipilih. |+| NK-014 | Harness agen coding | pending | PK10, PK07 | A12, A11, A30 | Perluas eksekusi CLI dan worktree untuk harness Codex, Claude Code, OpenCode, pi, serta Cursor. Sediakan konfigurasi provider passthrough atau login milik harness dengan identitas yang jelas. Verifikasi instalasi, input, keluaran, crash, pembatalan, dan cleanup per adapter; isolasi source Git serta sandbox proses dibuktikan sebagai kontrol yang berbeda. |+| NK-015 | Subagent terfokus secara paralel | pending | PK10, PK15 | A21, A06 | Kembangkan worker foreground terbatas menjadi delegasi paralel berprofil sama dengan tugas, konteks eksplisit, progress, status, ringkasan, hasil, serta timeout. Pertahankan larangan rekursi dan batas otoritas induk. Tentukan anggaran concurrency serta durasi melalui kebijakan MSO; uji kegagalan satu child, pembatalan grup, dan provenance setiap hasil. |+| NK-016 | Percakapan streaming dan antrean input | pending | PK09, PK08, PK23 | A08, A29 | Gunakan ulang streaming web dan CLI untuk menampilkan respons, reasoning yang memang disediakan provider, aktivitas tool, status, pembatalan, sambung ulang, dan antrean input. Lengkapi pemilih profil serta model, tema, command palette, empty state, dan error state; uji konsistensi status pada desktop dan mobile tanpa menampilkan penalaran tersembunyi. |+| NK-017 | Riwayat, pemadatan, dan cabang percakapan | pending | PK09, PK06 | A08, A05 | Perluas sesi tersimpan dengan rename, pencarian, pin, penghapusan sesuai kebijakan, pemadatan manual, dan cabang dari indeks pesan terpilih. Pertahankan akses yang diizinkan ke riwayat sebelum pemadatan serta relasi asal cabang. Uji penyimpanan ulang, resume setelah restart, dan larangan membaca cabang atau hasil pencarian milik pengguna lain. |+| NK-018 | Percakapan sementara tanpa penyimpanan normal | pending | PK09, PK06 | A08, A05, A16 | Audit seluruh jalur persistensi sebelum menyediakan mode sementara setara Cognito di Nakama, yaitu percakapan ephemeral dan bukan AWS Cognito. Mode ini melewati penyimpanan riwayat normal serta penulisan memory dan skill. Jelaskan kebijakan artifact, log, provider, dan retention secara terpisah; uji agar pekerjaan latar tidak menyimpan percakapan kembali. |+| NK-019 | Lampiran gambar, dokumen, dan audio | pending | PK09, PK19, PK18 | A24, A05, A29 | Hubungkan artifact privat ke lampiran gambar dan dokumen dalam percakapan, gambar clipboard pada CLI, transkripsi audio, serta fallback vision ketika model utama tidak mendukung gambar. Nyatakan format dan batas per kanal. Validasi jenis file, ukuran, identitas pemilik, pemilihan provider, dan kegagalan parsial tanpa kehilangan berkas sumber. |+| NK-020 | Pertanyaan terstruktur dan daftar tugas | pending | PK09, PK15 | A23, A08 | Audit komponen pertanyaan dan progress yang tersedia, lalu sediakan kuesioner terstruktur dengan pilihan atau jawaban bebas serta panel task dan todo. Kaitkan jawaban dan perubahan status ke sesi serta run. Uji persistence, sambung ulang, pembatalan pertanyaan, dan kelanjutan agen tanpa menganggap jawaban sebagai tambahan izin eksekusi. |+| NK-021 | Penggunaan konteks dan optimasi keluaran tool | pending | PK23, PK09 | A28, A08 | Lengkapi anggaran hasil tool dengan panel penggunaan konteks dan token serta optimasi keluaran yang dapat dipulihkan melalui handle. Simpan sumber utuh dalam scope yang sesuai dan uji pengambilan ulang. Laporkan byte yang dipangkas, token provider, dan estimasi secara terpisah; tetapkan kebijakan pengaturan tanpa menganggap penghematan byte sebagai biaya pasti. |+| NK-022 | Memory agen dan arsip | pending | PK13, PK06, PK08 | A16, A05, A27 | Gunakan ledger bertipe, provenance, resolusi temporal, serta arsip MSO untuk memory persisten per agen dan penyusunan konteks soul. Lengkapi tampilan arsip bulanan atau padanan penelusuran periode yang disepakati. Ikat akses kepada principal dan profil; uji koreksi, retention, resume snapshot, dan backup tanpa mengklaim mutu retrieval sebelum evaluasi. |+| NK-023 | Memory organisasi dan persetujuan perubahan | pending | PK13, PK05, PK06 | A16, A05, A06 | Perluas memory bertipe menjadi memory bersama organisasi dengan fakta pinned dan terbaru, pencarian, proposal perubahan, persetujuan, snapshot riwayat, undo, serta restore. Bedakan memory pribadi, agen, dan tim. Uji konflik revisi, pencabutan publikasi, serta pemulihan yang tidak menghidupkan kembali grant atau fakta yang sudah dicabut. |+| NK-024 | Dokumen knowledge dan impor ZIP | pending | PK12, PK05, PK18 | A16, A24, A05 | Lengkapi file dan sumber proyek dengan upload, penggantian, penghapusan, ekstraksi, pencarian, serta impor ZIP knowledge. Cakup TXT, Markdown, CSV, PDF, dan DOCX sesuai kontrak format; tautkan dokumen organisasi ke profil melalui grant. Uji batas ekstraksi, provenance, pengindeksan ulang, dan pencabutan akses pada dokumen maupun hasil turunannya. |+| NK-025 | Wiki turunan dari knowledge | pending | PK12, PK14 | A16, A15 | Gunakan pengalaman vault dan snapshot sebagai fondasi wiki turunan berisi identifier sumber, tautan, dan riwayat rebuild atau update. Pemrosesan bersifat opt-in melalui permintaan pengguna atau automation, bukan otomatis pada setiap upload. Tetapkan sumber yang boleh dikompilasi; perluasan ke dokumen bersama membutuhkan grant tersendiri dan penelusuran provenance. |+| NK-026 | Backend memory eksternal opsional | pending | PK13, PK11, PK22 | A16, A13, A27 | Verifikasi integrasi backend memory sebelum menyediakan adapter opsional setara Supermemory untuk memory profil, organisasi, dan pencarian knowledge semantik. Pertahankan mode lokal, mapping dataset, grant, serta penghapusan atau pencabutan yang jelas. Backup dataset eksternal menjadi prosedur terpisah; jangan menganggap plugin otomatis menangkap seluruh percakapan atau menjamin retrieval lebih baik. |+| NK-027 | Tool file, artifact, Word, dan SQLite profil | pending | PK11, PK07, PK18 | A10, A11, A24, A05 | Gunakan ulang baca, tulis, edit, hapus, dan pencarian file serta penyimpanan artifact. Verifikasi lalu lengkapi pembuatan dokumen Word dan tool SQLite khusus profil. Setiap operasi memakai workspace, schema input, serta kepemilikan yang diperiksa; uji validitas DOCX, batas query database, persetujuan mutasi, dan larangan mengakses file atau database profil lain. |+| NK-028 | Pengambilan halaman dan pencarian web | pending | PK11, PK19 | A10, A13, A11 | Audit fetch dan pencarian web yang sudah terhubung, lalu sediakan pilihan backend bawaan provider maupun koneksi khusus seperti Exa, Firecrawl, atau endpoint JSON sesuai schema. Tampilkan sumber hasil dan akun yang dipakai. Uji URL, redirect, batas keluaran, kebijakan jaringan, timeout, serta perilaku ketika provider tidak menyediakan pencarian bawaan. |+| NK-029 | Kotak surat IMAP dan SMTP | pending | PK11, PK17, PK18 | A13, A22, A24 | Verifikasi adapter email, lalu lengkapi pembacaan mailbox melalui IMAP, pengiriman melalui SMTP, pengaturan dan pengujian koneksi, serta ekstraksi dokumen lampiran. Ini alur kotak surat, terpisah dari notifikasi webhook. Ikat akun dan penerima secara eksplisit, jaga secret, dan buktikan hasil baca serta delivery menggunakan koneksi yang memang diizinkan. |+| NK-030 | Shell host dan sandbox profil | pending | PK07, PK10 | A11, A12, A06 | Perluas shell host serta fixture sandbox menjadi backend eksekusi terpilih, sandbox hangat per profil, kebijakan jaringan mati atau publik, dan batas CPU, memori, proses, disk, serta waktu. Microsandbox dapat menjadi adapter bila terverifikasi. Hak host tetap khusus principal berwenang; kompatibilitas coding harness diuji terpisah dan tidak diasumsikan dari sandbox shell. |+| NK-031 | Otomasi browser melalui CLI | pending | PK07, PK19 | A11, A24, A30 | Gunakan ulang permukaan browser Camoufox dan artifact, lalu verifikasi padanan agent-browser CLI, Chrome, skill, dan eksekusi shell yang dipakai baseline. Sediakan status kesiapan, instalasi terkontrol, serta profil browser terisolasi. Uji navigasi, interaksi, screenshot, cookie, dan pembatalan; adapter tambahan opsional tidak dianggap otomatis terpasang atau setara. |+| NK-032 | Custom tool JavaScript dan Python | pending | PK11, PK07, PK21 | A14, A10, A11 | Kembangkan pola kandidat inert dan evaluasi Tool Forge menjadi registrasi custom tool JavaScript serta Python, tampilan source, konfigurasi dan kredensial, persetujuan, playground, serta saran parameter AI. Ikat approval pada versi dan digest source. Hak CRUD organisasi tidak otomatis memberi hak eksekusi kode; jalankan tool melalui worker dengan schema serta batas yang diuji. |+| NK-033 | Koneksi MCP dan assignment profil | pending | PK11, PK07, PK08 | A13, A10, A06 | Gunakan ulang transport MCP stdio dan HTTP, discovery, serta koneksi privat untuk pengujian, sinkronisasi, impor, OAuth, dan assignment per profil. Lengkapi discovery tool opsional dengan grant server yang nyata. Uji rotasi token, endpoint, pagination, schema, pencabutan, dan isolasi proses stdio; pertahankan server MCP pengelolaan MSO sebagai kemampuan tersendiri. |+| NK-034 | Toolkit Composio per pengguna | pending | PK11, PK06, PK08 | A13, A05, A06 | Perluas dispatch Composio menjadi katalog toolkit, pengaktifan, assignment profil, serta OAuth akun masing-masing pengguna. Kaitkan credential user dengan principal terverifikasi dan grant koneksi. Uji discovery serta panggilan aktual, kedaluwarsa, revoke, dan pergantian profil tanpa fallback akun lain; jumlah aplikasi dan biaya layanan tetap menjadi dependensi eksternal. |+| NK-035 | Katalog, pemasangan, dan pemanggilan skill | pending | PK14, PK05 | A15, A04, A05 | Gunakan ulang discovery dan pemasangan skill pada VPS untuk CRUD global atau profil, assignment, pelepasan, sinkronisasi disk, dan instalasi SKILL.md dari GitHub. Lengkapi pemanggilan otomatis maupun slash manual dengan sumber dan trust yang terlihat. Skill sistem boleh memiliki aturan tampilan tersendiri; pemasangan instruksi tidak memberikan izin tool. |+| NK-036 | Bundle skill dan dependensi executable | pending | PK14, PK07, PK11 | A15, A14, A11 | Perluas paket skill terkelola agar dapat memuat reference, beberapa tool Python atau JavaScript, serta deklarasi environment dan dependensi. Pisahkan persetujuan instruksi dari instalasi paket dan eksekusi kode. Impor organisasi tidak otomatis mengaktifkan executable; verifikasi digest, provenance, worker, batas jaringan, dan penolakan isi yang belum disetujui. |+| NK-037 | Belajar skill dan proposal pascatugas | pending | PK14, PK13 | A15, A16, A23 | Gunakan pembelajaran workflow sebagai fondasi perintah belajar eksplisit dari catatan, URL, file, atau tugas saat ini. Tambahkan saran pascaturn yang opt-in, preview, penerapan, serta persetujuan admin bila diwajibkan. Bedakan rekomendasi, kandidat, dan skill aktif; review latar tidak boleh langsung menulis instruksi tanpa mengikuti kebijakan persetujuan. |+| NK-038 | Versi, diff, dan pemulihan skill | pending | PK14 | A15, A07 | Verifikasi riwayat skill yang tersedia, lalu sediakan daftar versi, catatan perubahan, perbandingan isi, review, dan pemulihan versi sebelumnya. Simpan pelaku, sumber, serta digest tiap revisi; restore menghasilkan perubahan yang dapat ditelusuri. Uji konflik update, izin reviewer, dan executable yang tidak boleh aktif kembali tanpa evaluasi kebijakan saat ini. |+| NK-039 | Penggunaan dan kurasi skill | pending | PK14, PK23 | A15, A28 | Audit telemetry skill sebelum menambahkan jumlah penggunaan, kebaruan, pengarsipan opsional untuk skill jarang dipakai, konsolidasi berbantuan LLM, dan laporan curator. Jadwal serta kriteria stale harus terlihat dan dapat diubah. Pengarsipan mempertahankan riwayat; hasil konsolidasi tetap proposal yang memerlukan review sesuai trust dan izin penulisan. |+| NK-040 | Bot Telegram dan topik percakapan | pending | PK16, PK17, PK19 | A17, A18, A24, A22 | Perluas webhook dan pengiriman Telegram menjadi bot per agen dengan pairing, allowlist, DM, grup, topik, perintah, input suara, dokumen, gambar, dan delivery artifact. Petakan percakapan ke pengguna serta profil yang tepat. Uji jalur inbound hingga respons nyata, signature atau secret webhook, deduplikasi, batas file, dan pemulihan koneksi. |+| NK-041 | WhatsApp melalui perangkat tertaut | pending | PK16, PK17 | A17, A22, A24 | Verifikasi adapter perangkat tertaut setara baseline: autentikasi QR atau kode, pairing owner, allowlist, DM, grup, perintah, dan lampiran artifact native. Sediakan status koneksi serta pemulihan sesi dengan kepemilikan yang jelas. Jalur ini tidak disamakan dengan WhatsApp Business API; metode autentikasi dan dependensinya harus diverifikasi sebelum operasional. |+| NK-042 | Bot Discord dan thread | pending | PK16, PK17 | A17, A18, A24 | Lengkapi adapter REST dan signed Interactions dengan bot per agen, pairing DM, allowlist, percakapan server serta thread, slash command, dan artifact. Verifikasi ingest pesan Gateway bila dibutuhkan baseline beserta intents dan scope bot. Uji identitas thread, deduplikasi, revoke, serta pengiriman; Interactions yang sudah ada tidak dianggap otomatis mencakup Gateway. |+| NK-043 | Slack Socket Mode | pending | PK16, PK17 | A17, A24, A22 | Audit koneksi Slack, lalu sediakan bridge Socket Mode dengan DM, thread yang dipicu mention, pairing, daftar pengguna yang diizinkan, opsi anggota workspace, dan perintah. Verifikasi app token serta scope bot, pemetaan identitas, sambung ulang, dan delivery. Socket Mode diperlakukan sebagai transport tersendiri yang tidak memerlukan webhook chat publik. |+| NK-044 | Tujuan notifikasi dan webhook terautentikasi | pending | PK17, PK16 | A18, A22, A06 | Perluas pengiriman kanal menjadi tujuan notifikasi untuk topik Telegram, kanal Discord, dan kontak WhatsApp yang dipasangkan. Tambahkan webhook inbound terautentikasi, pengelolaan tujuan, rotasi key, serta Idempotency-Key yang direkonsiliasi sebelum retry. Batasi tujuan sesuai kontrak provider; jangan menganggap pengiriman WhatsApp ke kontak berpasangan mencakup nomor atau grup sembarang. |+| NK-045 | Automation prompt dan jadwal | partial | PK15, PK23 | A19, A20, A28 | Gunakan scheduler serta graph MSO untuk automation prompt tersimpan dengan pemicu manual, cron dan timezone, serta sekali jalan. Lengkapi pembuatan draft, preview waktu berikutnya, enable atau disable, dan pemilihan agen. Uji restart, perubahan zona waktu, serta jadwal terlewat dengan kebijakan catch-up yang eksplisit dan terukur. |+| NK-046 | Riwayat run dan delivery automation | pending | PK15, PK17 | A20, A22, A06 | Perluas receipt workflow menjadi riwayat automation, progress serta hasil tool, resume interupsi, jalankan ulang, status belum dibaca, dan delivery ke kanal atau email. Simpan checkpoint dan upaya pengiriman terpisah. Uji crash serta outcome tidak pasti; resume tidak boleh dianggap menjamin side effect hanya terjadi sekali tanpa idempotency atau rekonsiliasi. |+| NK-047 | Recipe workflow berurutan | pending | PK15 | A20, A10 | Petakan recipe berurutan baseline ke engine workflow MSO: langkah tool, compare, assert, template, substitusi input, receipt per langkah, dan ringkasan akhir dari hasil tercatat. Uji berhenti saat gagal serta penilaian kondisi. Pertahankan kemampuan graph MSO; ringkasan tidak memanggil tool tambahan atau dianggap sebagai verifikasi independen. |+| NK-048 | Lifecycle plugin per organisasi | pending | PK21, PK07, PK06 | A14, A11, A27 | Perluas taxonomy serta paket terkelola menjadi review dan instalasi plugin pada versi tepat, enable, disable, update, uninstall per organisasi, serta pengelolaan UI, tool, skill, worker, dan data. Pisahkan persetujuan paket dari aktivasi organisasi; tampilkan retention dan penghapusan data. Uji permission, digest, restart, downgrade, serta restore tanpa aktivasi executable otomatis. |+| NK-049 | Pembuatan plugin berbantuan agen | pending | PK21, PK11, PK14 | A14, A15, A23 | Verifikasi template dan alur authoring yang tersedia, lalu sediakan pembuatan scaffold plugin berbantuan agen dengan tahapan draft, preview, review source dan izin, enable, connect, serta test. Tampilkan artifact dan hasil pemeriksaan sebelum aktivasi. Tool Forge tidak otomatis setara generator plugin; kode hasil generasi tetap mengikuti approval dan isolasi runtime. |+| NK-050 | Penjelajah dan penyunting artifact | pending | PK18, PK06 | A26, A05 | Satukan pengalaman file dan artifact dengan folder, pencarian, filter, tampilan grid atau daftar, pemilik, pin, preview kaya, rename, download, delete, serta editor Markdown dan CSV. Tentukan ACL yang konsisten pada daftar dan isi. Uji validitas penyimpanan, konflik edit, akses lintas pengguna, dan hubungan artifact dengan run asalnya. |+| NK-051 | Snapshot artifact publik | pending | PK18, PK06 | A26, A05, A06 | Audit mekanisme berbagi sebelum menyediakan publikasi snapshot artifact bertoken, status, pembaruan snapshot, expiry bila ditetapkan, dan pencabutan. Lindungi rendering HTML serta SVG dan pertahankan artifact sumber privat. Perubahan file oleh agen tidak otomatis memperbarui salinan publik; uji isolasi, revocation, serta kebocoran melalui preview, cache, dan metadata. |+| NK-052 | Generasi gambar dan pengiriman hasil | pending | PK19, PK18, PK17, PK23 | A24, A22, A28 | Lengkapi permukaan media dan artifact dengan tool generasi gambar melalui kontrak provider yang sesuai baseline, konfigurasi model serta allowlist ukuran, hasil PNG, lampiran, delivery kanal, dan pencatatan biaya terukur. Uji validitas file, akses model, kepemilikan, dan kegagalan provider. Jangan menyatakan progress streaming atau biaya pasti bila provider tidak memasoknya. |+| NK-053 | Capture Google Meet melalui Chrome | pending | PK20, PK07, PK18 | A25, A05, A24 | Verifikasi alur rapat lalu sediakan extension Chrome untuk capture tab dan mikrofon secara eksplisit, stream transkrip, riwayat, akses rapat sesuai pemilik, serta tool pembacaan transkrip agen. Tampilkan indikator mulai, berhenti, dan koneksi terputus. Ini capture lokal, bukan bot peserta yang masuk rapat; provider transkripsi serta transport capture perlu dikonfigurasi. |+| NK-054 | Impor transkrip dan rekaman rapat | pending | PK20, PK11, PK19 | A25, A13, A24 | Audit koneksi media dan Composio sebelum menambahkan upload Markdown atau audio rapat, discovery rekaman melalui Gmail dan Drive, serta transkripsi video. Ikat impor pada akun dan sumber yang dipilih, tampilkan progress serta hasil parsial, dan tentukan batas ukuran atau durasi. Jangan menjanjikan identifikasi pembicara bila adapter impor tidak menghasilkannya. |+| NK-055 | Backup penuh dan export terlingkup | pending | PK22, PK06, PK21 | A27, A01, A06 | Perluas backup menjadi ZIP data-root penuh dengan preview dan restore, export organisasi, serta export pengguna yang format dan scope-nya jelas. Dukung pemulihan pada panduan awal dan retention data plugin yang aman. Uji checksum, downtime, grant, credential omissions, dan data media; dataset memory eksternal memerlukan backup tersendiri dan tidak diasumsikan tercakup. |+| NK-056 | Agent pack tanpa secret | pending | PK22, PK08, PK11 | A27, A07, A14 | Verifikasi portabilitas profil lalu sediakan export satu agen tanpa secret, preview isi dan konflik, serta impor sebagai profil baru. Tautkan ulang tool dan MCP berdasarkan izin tujuan; batasi executable yang belum disetujui. Format ini berbeda dari backup penuh dan tidak membawa koneksi kanal, browser session, atau token provider asal. |+| NK-057 | Klien terminal lokal dan remote | partial | PK23, PK09, PK14, PK10 | A29, A08, A12, A15 | Perluas CLI interaktif MSO dengan pemilihan organisasi, profil, model, reasoning, pemanggilan skill, gambar clipboard, dan rotasi token pada mode lokal maupun remote. Tegakkan koneksi remote terlindungi dan identitas workspace server untuk coding. Uji streaming, persetujuan, reconnect, perintah slash, serta konsistensi status dengan aplikasi web. |+| NK-058 | Paket aplikasi desktop dan updater | pending | PK23, PK04 | A29, A03, A30 | Audit target desktop native sebelum memilih paket setara Electron yang menggabungkan server lokal, web UI, data persisten, dan updater rilis bertanda tangan. Bedakan paket tersebut dari PWA serta host Linux melalui Lima atau WSL. Verifikasi installer, distribusi, signature, update, dan recovery per platform; target build saja tidak membuktikan installer tersedia. |+| NK-059 | Deployment, worker, dan diagnostik host | pending | PK23, PK07, PK24, PK01 | A29, A30, A11 | Petakan instalasi source Bun dan deployment container tunggal dengan volume persisten, lifecycle serta log worker, health, status sistem, dokumentasi OpenAPI, dan URL callback publik. Pertahankan adapter gateway dan platform MSO. Uji instalasi, restart, update, serta recovery; klaim RAM dan layanan cloud provisioning dicatat sebagai kebutuhan verifikasi terpisah. |+| NK-060 | Pelacakan error dan observabilitas operator | pending | PK23, PK02, PK24 | A30, A05, A28 | Gunakan audit serta status operasional MSO, lalu verifikasi pelacakan error opt-in yang kompatibel Sentry, penyaringan event sebelum keluar, antrean retry crash, dan diagnostik. Pisahkan telemetry dari data percakapan serta secret. Uji kegagalan backend pelaporan, tenant scope, kontrol consent, dan pemulihan agar error tracking tidak menghalangi pekerjaan utama. |+| NK-061 | PWA, cache aset, dan pembaruan aplikasi | pending | PK23, PK24 | A29, A05, A30 | Gunakan manifest PWA dan registrasi service worker MSO untuk instalasi standalone, cache aset, shell fallback saat offline, serta prompt update atau reload yang jelas. Verifikasi bahwa API, autentikasi, dan data privat tidak ikut tersimpan secara tidak sengaja. Shell offline tidak berarti model dapat dijalankan atau percakapan pribadi tersedia tanpa jaringan. |+| NK-062 | Daftar dan filter audit keamanan | pending | PK06, PK24 | A04, A05, A30 | Perluas audit host menjadi event keamanan yang hanya ditambahkan, dengan API daftar, filter action dan organisasi, serta pagination. Catat actor, request, resource, waktu, dan hasil sesuai scope admin. Pisahkan audit dari crash reporting; uji akses langsung, penyaringan secret, serta kegagalan penyimpanan tanpa mengklaim log kebal perubahan hanya karena append-only. |+| NK-063 | Inbox notifikasi dan proposal | pending | PK17, PK14, PK13 | A22, A15, A16, A05 | Audit sumber notifikasi yang ada, lalu satukan run automation belum dibaca, proposal memory organisasi, dan proposal skill yang menunggu review ke dalam satu inbox. Tampilkan tautan ke sumber, jumlah belum dibaca, serta tindakan sesuai peran. Inbox ini berbeda dari push atau webhook outbound; uji perubahan status dan pembatasan proposal admin. |+| NK-064 | Tema dan command palette sesuai izin | pending | PK03 | A04, A29 | Gunakan theme picker dan pencarian shell untuk tema Light, Dark, atau System yang tersimpan serta mengikuti OS. Lengkapi Ctrl atau Cmd+K, pencarian, dan navigasi keyboard ke halaman, agen, serta plugin aktif sesuai izin. Perpindahan organisasi harus terlihat; uji fokus, Escape, pembaca layar, dan penolakan target yang tidak boleh diakses. |++## Bagian yang telah diterapkan++### NK-001++Kode: [frontend/slices/auth/components/first-login-onboarding.tsx](../frontend/slices/auth/components/first-login-onboarding.tsx), [frontend/slices/auth/lib/onboarding-api.ts](../frontend/slices/auth/lib/onboarding-api.ts), [frontend/slices/auth/lib/onboarding-state.ts](../frontend/slices/auth/lib/onboarding-state.ts), [app/api/v1/alfa/cockpit/route.ts](../app/api/v1/alfa/cockpit/route.ts), [app/api/v1/workflows/route.ts](../app/api/v1/workflows/route.ts).++Pengujian: [frontend/slices/auth/lib/onboarding-state.test.ts](../frontend/slices/auth/lib/onboarding-state.test.ts), [frontend/slices/auth/lib/onboarding-api.test.ts](../frontend/slices/auth/lib/onboarding-api.test.ts), [frontend/slices/auth/lib/onboarding-runtime.test.ts](../frontend/slices/auth/lib/onboarding-runtime.test.ts), [app/api/v1/workflows/run-revision.test.ts](../app/api/v1/workflows/run-revision.test.ts), [scripts/e2e/onboarding.mjs](../scripts/e2e/onboarding.mjs).++- Akun manusia, organisasi, migrasi owner dan konteks pengguna yang dapat disunting masih memerlukan PK04–PK06.+- Pemulihan instalasi penuh, installer lintas platform dan kesiapan provider nyata belum dibuktikan; panduan ini memakai instalasi dan perangkat Owner yang sudah ada.++### NK-009++Kode: [lib/contracts/agent-profile.ts](../lib/contracts/agent-profile.ts), [lib/agent/profile-store.ts](../lib/agent/profile-store.ts), [lib/agent/profile-runtime.ts](../lib/agent/profile-runtime.ts), [lib/agent/bounded-runner.ts](../lib/agent/bounded-runner.ts), [app/api/v1/agent-profiles/run/route.ts](../app/api/v1/agent-profiles/run/route.ts), [frontend/slices/assistant/components/profiles-panel.tsx](../frontend/slices/assistant/components/profiles-panel.tsx).++Pengujian: [lib/agent/profile-store.test.ts](../lib/agent/profile-store.test.ts), [lib/agent/profile-runtime.test.ts](../lib/agent/profile-runtime.test.ts), [lib/ai/profile-model-binding.test.ts](../lib/ai/profile-model-binding.test.ts), [app/api/v1/agent-profiles/route.test.ts](../app/api/v1/agent-profiles/route.test.ts), [app/api/v1/agent-profiles/run/route.test.ts](../app/api/v1/agent-profiles/run/route.test.ts), [scripts/e2e/agent-profiles.mjs](../scripts/e2e/agent-profiles.mjs).++- Penugasan skill/MCP/soul/memory/knowledge per profil, hak tulis/exec, organisasi, runtime eksternal dan kesetaraan seluruh transport masih terbuka.+- Profil saat ini milik perangkat Owner dan memakai runtime MSO dengan sembilan alat baca yang diizinkan; inferensi provider nyata serta seluruh varian belum dibuktikan.++### NK-010++Kode: [lib/agent/profile-store.ts](../lib/agent/profile-store.ts), [lib/agent/profile-storage.ts](../lib/agent/profile-storage.ts), [lib/agent/profile-schema.ts](../lib/agent/profile-schema.ts), [lib/host/path-credentials.ts](../lib/host/path-credentials.ts), [lib/host/path-recursive.ts](../lib/host/path-recursive.ts).++Pengujian: [lib/agent/profile-store.test.ts](../lib/agent/profile-store.test.ts), [lib/host/profile-path.test.ts](../lib/host/profile-path.test.ts), [scripts/e2e/agent-profiles.mjs](../scripts/e2e/agent-profiles.mjs).++- Pemindahan antarorganisasi, pemetaan ulang grant, export/import, paket agen dan pemulihan instalasi nyata belum tersedia dalam slice ini.++### NK-045++Kode: [lib/contracts/workflow-schedule.ts](../lib/contracts/workflow-schedule.ts), [lib/workflow/schedule.ts](../lib/workflow/schedule.ts), [lib/workflow/graph-triggers.ts](../lib/workflow/graph-triggers.ts), [lib/workflow/graph-run-store.ts](../lib/workflow/graph-run-store.ts), [lib/workflow/private-file.ts](../lib/workflow/private-file.ts), [frontend/slices/workflows/components/workflow-schedule-fields.tsx](../frontend/slices/workflows/components/workflow-schedule-fields.tsx).++Pengujian: [lib/contracts/workflow-schedule.test.ts](../lib/contracts/workflow-schedule.test.ts), [lib/workflow/schedule.test.ts](../lib/workflow/schedule.test.ts), [lib/workflow/schedule-runtime.test.ts](../lib/workflow/schedule-runtime.test.ts), [lib/workflow/private-file-durable.test.ts](../lib/workflow/private-file-durable.test.ts), [scripts/e2e/workflow-schedules.mjs](../scripts/e2e/workflow-schedules.mjs).++- Pemilih saved prompt/profil, pratinjau waktu berikutnya, batas kuota, UI rekonsiliasi dan fencing terdistribusi masih terbuka.+- Durable intent mencegah pengulangan otomatis pada state tidak pasti; hasil efek eksternal, pemulihan deployment nyata dan eksekusi tenant belum diklaim.++### NK-057++Kode: [bin/mso](../bin/mso), [scripts/cli/help.sh](../scripts/cli/help.sh), [scripts/cli/agent-profiles.sh](../scripts/cli/agent-profiles.sh).++Pengujian: [scripts/cli/help.test.ts](../scripts/cli/help.test.ts), [bin/mso.test.ts](../bin/mso.test.ts), [bin/mso-update-offline.test.ts](../bin/mso-update-offline.test.ts).++- Org/reasoning/skill/clipboard, rotasi token, streaming/reconnect serta identitas workspace lokal/jarak jauh penuh masih memerlukan pembuktian kontrak CLI.++## Paket kerja++| Paket | Tahap | Hasil |+|---|---|---|+| PK01 | T0 | Inventaris per fitur, kontrak paritas, sumber, dan pemilik verifikasi |+| PK02 | T0 | Triage gate CI, regresi yang relevan, dan bukti rilis |+| PK03 | T1 | Onboarding terpadu, navigasi sesuai peran, empty dan error states |+| PK04 | T2 | Principal, login, reset, sesi, TOTP, passkey, recovery |+| PK05 | T2 | Organisasi tim membership undangan dan publikasi resource |+| PK06 | T2 | Scoped storage, migrasi owner, audit, grant dan audience token |+| PK07 | T3 | Worker lease, shell sandbox, browser isolation, jaringan dan quota |+| PK08 | T3 | Profil agen, revisi, clone, move, model dan runtime binding |+| PK09 | T3 | Percakapan privat, branching, attachments, mode sementara dan history |+| PK10 | T3 | ACP dan coding harness, subagent serta handoff |+| PK11 | T3 | MCP OAuth, Composio per pengguna, custom tools dan tool playground |+| PK12 | T4 | Knowledge upload ZIP, ingestion, pencarian dan sumber turunan |+| PK13 | T4 | Memory organisasi, proposal, history, restore dan scope |+| PK14 | T4 | Skill belajar, proposal, revision, approval, usage dan curator |+| PK15 | T5 | Durable run scheduler, cron, runAt, retry, resume dan receipts |+| PK16 | T5 | Telegram WhatsApp Discord Slack dan mapping sesi pengguna |+| PK17 | T5 | Delivery email dan kanal, webhook, notification inbox, idempotency |+| PK18 | T6 | Artifact explorer, edit, snapshot share, expiry dan revocation |+| PK19 | T6 | Image generation, vision, audio, transkripsi dan browser parity |+| PK20 | T6 | Google Meet extension, capture, transcript, recording import |+| PK21 | T7 | Plugin manifest, catalog, permission, worker, update dan restore |+| PK22 | T7 | Agent pack, user org export, backup penuh dan restore drill |+| PK23 | T7 | Usage dan quota, optimasi konteks, platform packaging dan doctor |+| PK24 | T7 | Uji perjalanan pengguna, dokumentasi, benchmark dan rilis paritas |++## Tahap++| Tahap | Hasil | Syarat keluar |+|---|---|---|+| T0 | Baseline paritas dan gate rilis yang dapat dipercaya | Inventaris disetujui secara teknis, finding ditriage, jalur verifikasi dapat direproduksi. |+| T1 | Onboarding dan kontrak profil run yang konsisten | Owner lama tetap dapat bekerja; tindakan pertama menghasilkan receipt. |+| T2 | Identitas organisasi dan storage terpisah | Login, MFA, membership, grant, serta migrasi diuji; akses silang ditolak. |+| T3 | Runtime agen tool MCP dan sandbox | Profil, ACP, coding, custom tool, OAuth, delegasi, serta batas worker terbukti. |+| T4 | Knowledge memory skill dan sharing | Ingestion, proposal, approval, history, publikasi, dan pencabutan konsisten. |+| T5 | Automation workflow kanal dan delivery | Scheduler, resume, idempotency, empat kanal, email, dan notifikasi diuji. |+| T6 | Artifact media dan rapat | Hasil privat, berbagi eksplisit, transkripsi, capture, dan impor rapat bekerja. |+| T7 | Plugin portabilitas desktop dan rilis paritas | Restore, agent pack, plugin lifecycle, platform matrix, dan semua acceptance tercapai. |++## Penerimaan++| ID | Skenario | Hasil yang harus dibuktikan |+|---|---|---|+| A01 | Instalasi dan migrasi owner | Instalasi baru menyelesaikan pekerjaan pertama. Migrasi mempertahankan proyek, file, konfigurasi, workflow, perangkat dan managed apps; manifest cocok, pergantian routing konsisten, dan prosedur pemulihan berhasil tanpa membuang penulisan baru. |+| A02 | Undangan dan membership | Undangan sah dapat diterima. Undangan kedaluwarsa, dicabut atau digunakan ulang ditolak. Perubahan peran serta penghapusan anggota segera memengaruhi sesi, daftar resource dan tindakan berikutnya. |+| A03 | Login MFA dan recovery | Uji password, passkey dengan authenticator nyata, TOTP, backup code, reset dan recovery. Challenge serta kode sekali pakai tidak dapat dipakai ulang. Enrollment, penonaktifan dan pemulihan tercatat tanpa membocorkan secret. |+| A04 | Peran dan semua transport | Uji izin melalui UI dan panggilan API langsung, lalu transport CLI, MCP, channel dan worker yang relevan. Admin organisasi tidak memperoleh terminal host, secret platform atau data tenant lain. Menyembunyikan menu tidak menggantikan penolakan server. |+| A05 | Pemisahan tenant | Dengan dua organisasi dan beberapa anggota, coba ID, header, body, pencarian, cache, SSE, attachment, memory, plugin, artifact dan laporan penggunaan milik organisasi lain. Tidak ada isi atau metadata privat yang bocor melalui jalur tersebut. |+| A06 | Pencabutan saat run aktif | Cabut sesi, token, membership atau grant ketika run berjalan. Langkah baru ditolak dan lease dihentikan sesuai kemampuan backend. Side effect eksternal yang sudah dikirim ditandai untuk rekonsiliasi; jangan mengklaim pembatalan yang tidak terjadi. |+| A07 | Siklus hidup profil agen | Buat, ubah, clone, pindahkan, ekspor dan impor profil. Model, runtime, instruksi, skill serta referensi koneksi tetap benar setelah restart. Revision dan perubahan dapat ditinjau; konflik penulisan ditangani, credential tidak tersalin otomatis. |+| A08 | Percakapan dan pemulihan koneksi | Streaming, antrean input, pembatalan, pencarian, pin, rename, branch, kompaksi dan history bekerja. Klien berizin dapat melanjutkan konteks tanpa pesan ganda. Mode sementara mengikuti kebijakan tanpa penulisan history, memory atau skill yang tidak diminta. |+| A09 | Provider dan model nyata | Untuk setiap adapter yang diklaim didukung, jalankan request nyata: katalog, autentikasi, refresh bila relevan, streaming, tool call, media yang didukung serta error. Pilihan akun dan batas model terlihat; fixture dan daftar model saja tidak membuktikan integrasi. |+| A10 | Tool dan persetujuan | Uji operasi file, web, mailbox, dokumen dan data dengan scope benar, input tidak valid serta argumen yang berubah. Persetujuan mengikat actor, resource, payload dan versi. Konten prompt atau hasil tool tidak dapat menaikkan izin; replay ditolak. |+| A11 | Batas worker dan sandbox | Uji akses ke file tenant lain, secret host, socket berprivilege serta jaringan terlarang. Batas CPU, memori, waktu, proses dan output ditegakkan sesuai backend. Sandbox gagal tidak menyebabkan pekerjaan anggota organisasi dijalankan di host. |+| A12 | Coding harness dan worktree | Setiap harness yang didukung mengerjakan perubahan pada workspace yang benar. Uji proses putus, worker mati dan reconnect. Pisahkan riwayat sesi dari proses hidup; status tidak mengklaim PID atau kemampuan melanjutkan yang sudah hilang. |+| A13 | MCP dan Composio | Hubungkan akun nyata, sinkronkan schema, panggil tool berizin, lalu uji timeout, token refresh, scope berkurang dan revoke. Akun pengguna tidak berganti ke koneksi admin. Transport MCP stdio dan HTTP diuji menurut cakupan yang dinyatakan. |+| A14 | Custom tool dan plugin | Tinjau source, hash, versi dan izin; setujui eksekusi uji sebelum menjalankan playground terisolasi dengan credential uji yang diizinkan. Lalu aktifkan paket. Uji update, perubahan permission, disable, uninstall serta pemulihan versi. Kode yang belum disetujui tetap tidak aktif. |+| A15 | Skill belajar dan history | Buat dan impor bundle, jalankan manual dan otomatis, hasilkan proposal belajar dari sumber yang didukung, lalu setujui atau tolak. History, diff, restore, usage dan curator bekerja. Persetujuan terikat digest konten; archive tidak menghapus data tanpa kontrak jelas. |+| A16 | Memory dan knowledge | Uji upload, ZIP, ekstraksi, pencarian, replace, hapus, wiki turunan dan backend opsional. Memory pribadi, profil dan organisasi menjaga sumber, proposal, approval serta undo. Resource yang dicabut tidak muncul lagi dalam retrieval atau konteks baru. |+| A17 | Empat kanal komunikasi | Telegram, WhatsApp, Discord dan Slack masing-masing menerima pesan nyata, memetakan pengguna dan agen yang benar, lalu mengirim balasan serta artifact dengan ID provider. Uji DM, grup atau thread sesuai adapter, pairing, allowlist dan restart tanpa pesan ganda. |+| A18 | Webhook dan idempotency | Uji signature atau secret yang tepat, request palsu, replay, kunci kedaluwarsa, rotasi dan target tenant salah. Idempotency key mengikat tujuan serta payload; pengiriman ulang tidak menyebabkan side effect yang tidak terkontrol. |+| A19 | Scheduler dan waktu | Uji manual, cron dengan timezone, jadwal satu kali, enable atau disable, overlap dan restart. Perubahan waktu serta jadwal terlewat memiliki aturan catch up atau skip yang terlihat. Dua worker tidak mengambil pekerjaan yang sama tanpa perlindungan. |+| A20 | Workflow dan efek eksternal | Uji recipe serta graph dengan kegagalan sebelum dispatch, setelah provider menerima, dan sebelum hasil disimpan. Receipt, checkpoint, lease serta idempotency menjaga status. Efek yang belum pasti direkonsiliasi; resume tidak mengulang tindakan eksternal secara buta. |+| A21 | Subagent paralel | Delegasi beberapa tugas menghormati batas konteks, otoritas, jumlah child, durasi dan biaya. Progres, kegagalan sebagian, timeout dan cancel sampai ke parent. Hasil menyertakan asal; penulisan bersama tidak saling merusak atau melintasi tenant. |+| A22 | Notifikasi dan pengiriman hasil | Kirim ke tujuan email dan kanal yang dikonfigurasi, lalu verifikasi receipt provider serta tujuan yang benar. Rate limit, credential kedaluwarsa dan timeout menghasilkan status akurat. Retry tidak menyamakan hasil run berhasil dengan delivery berhasil. |+| A23 | Pertanyaan dan daftar tugas | Questionnaire dan todo mengacu pada pertanyaan, pengguna serta sesi yang tepat. Jawaban, perubahan progres dan reconnect tersimpan; pengiriman jawaban ulang tidak melanjutkan pekerjaan dua kali atau menjawab pertanyaan sesi lain. |+| A24 | Attachment gambar dan audio | Unggah tipe yang didukung, jalankan vision, transkripsi dan image generation nyata, lalu buka artifact hasil. MIME, isi, ukuran, izin dan batas model benar. Clipboard serta delivery diuji pada klien yang mendukung; file kosong tidak dianggap hasil. |+| A25 | Google Meet dan impor rapat | Dengan izin tab dan mikrofon yang jelas, mulai serta hentikan capture extension, lihat indikator dan transkrip, lalu uji koneksi putus. Impor Markdown, audio dan rekaman Gmail atau Drive memakai akun yang dipilih. Tool agen hanya membaca rapat berizin. |+| A26 | Artifact dan snapshot publik | Buat, cari, filter, preview, edit dan unduh artifact sesuai hak. Publikasi membuat snapshot eksplisit; perubahan privat tidak otomatis terbit. Uji kedaluwarsa, revoke dan pembaruan snapshot. HTML atau SVG aktif tidak memperoleh akses aplikasi utama. |+| A27 | Portabilitas dan restore | Pulihkan backup pada lingkungan kosong dengan manifest, checksum dan jumlah record yang cocok. Uji export pengguna, organisasi serta agent pack secara terpisah. Data plugin, media dan credential memiliki cakupan terlihat; kegagalan restore dapat dipulihkan, koneksi yang tidak dibawa meminta autentikasi ulang. |+| A28 | Usage quota dan optimasi konteks | Bedakan token aktual, estimasi dan biaya tidak diketahui. Uji batas lunak dan keras, banyak run bersamaan, retry serta streaming terputus tanpa perhitungan ganda. Hasil optimizer dapat dipulihkan; byte yang dipangkas tidak otomatis disebut token atau uang yang dihemat. |+| A29 | Web CLI mobile dan desktop | Untuk setiap OS serta arsitektur yang dinyatakan didukung, verifikasi instalasi, update, pemulihan update, login, chat, tool, file dan notifikasi. Uji keyboard, ukuran layar, reconnect dan remote CLI. Keberhasilan build saja tidak membuktikan installer dapat dipakai. |+| A30 | Regresi dan operasi MSO | Pastikan terminal, file, proyek, workflow, managed apps, gateway, DNS, MCP, update, backup dan observability yang sudah ada tetap berfungsi. Uji disk penuh, worker crash serta provider tidak tersedia; health dan log mencerminkan keadaan nyata tanpa secret. |++## Variasi dan gate++Checklist kandidat menguraikan 69 varian wajib dari draf, termasuk 31 provider, transport, kombinasi shell/network, format/kontainer, dan platform. Tambahan platform yang ditandai ekstensi tetap terpisah dalam snapshot.++`bun run parity:nakama` memeriksa inventaris; `bun run parity:nakama:release --evidence /path/manifest.json` memeriksa bukti kandidat. Kelulusan inventaris bukan kelulusan runtime. Bukti sintetis tidak dapat memenuhi klaim kompatibilitas runtime.++Hak Viewer/Operator/Owner yang ada adalah peran perangkat. Peta ini tidak mengubahnya menjadi akun manusia atau memberikan isolasi organisasi secara otomatis.diff --git a/docs/PROGRESS.md b/docs/PROGRESS.mdindex 6676e05e..bdbf7ce6 100644--- a/docs/PROGRESS.md+++ b/docs/PROGRESS.md@@ -1,3 +1,23 @@+## 2026-10-18: Implement the first three bounded Nakama journeys++Owner onboarding now advances from installation readiness to a selected project and a saved, read-only Workflow receipt. Its first action uses a fixed graph and exact graph revision; it stores the attempt identity before dispatch, reconciles lost responses and reopens the existing receipt after reload. Optional model checks disclose their cost, while the initial project action needs no inference. Viewer and Operator devices can inspect readiness without receiving Owner controls. The backup link describes the actual browser and memory restore surfaces; it does not imply a full installation restore.++Saved Owner profiles now have a private server store, revision history, stale-write protection, same-device cloning, default selection and enable/disable controls in Alfa and the CLI. A foreground run binds the saved provider/model and exact enabled revision, narrows execution to nine reviewed read tools, and uses the canonical capability kernel. Live authority is checked around model and tool work and again after session persistence before returning a result. The shared loop retains existing subagent behavior while profile runs have six turns, sixteen tools and sixty seconds. This establishes a device-owned configuration lifecycle, not human-account, organization or process isolation; the remaining assignment and worker requirements stay explicit in `AGENT-PROFILES.md`.++Workflow schedules now support explicit-offset one-shot timestamps with a required `run_once` missed-tick policy. A private durable intent precedes dispatch and survives receipt deletion or pruning; equivalent timestamp spellings cannot replay the same occurrence. Ancestor, file and parent-directory sync failures block dispatch, and an uncertain post-rename intent requires reconciliation. Existing recurring fields remain readable and inert after old editor mode changes; selected-mode validation still applies. `WORKFLOW-SCHEDULES.md` documents cron day matching, timezone behavior and the limits of local claims and physical durability evidence.++The implementation map records five partial requirement groups and 59 pending groups, with no group marked complete. All 64 frozen groups, 24 packages, eight stages, 30 acceptance journeys and 69 derived compatibility variants remain in scope. The new browser journeys use their own synthetic stores because their real persisted sessions would otherwise contaminate the existing session-monitor pagination fixture.++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.++## 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.++The repository checks now validate the snapshot digest, exact requirement mappings, source identities and generated reference. A separate full-parity candidate gate requires clean HEAD, regular tracked source/test blobs, complete acceptance and compatibility records, all eight completion dimensions and six passing gates. Every receipt is bound to the candidate and hashed artifact bytes. A complete manifest cannot establish that its statements are true: release reviewers must inspect real runtime/provider evidence. Pending or partial scope keeps that release gate blocked.++CLI help previously loaded HTTP credentials and attempted to create a private cookie jar before printing recovery guidance. Help now reads the existing entrypoint header before credential loading; grouped usage shares that helper and the offline-update fixture copies it. Regression tests use an executable synthetic env file and unusable private storage to prove help stays available without either side effect.+## 2026-10-18b: `fs_stat` returns, paid for by a tighter ChatGPT description capThe read-scope `fs_stat` tool (true size/mtime without `exec_run` or reading binary content) was reverteddiff --git a/docs/QUICKSTART.md b/docs/QUICKSTART.mdindex b1d4b7eb..19eebcb1 100644--- a/docs/QUICKSTART.md+++ b/docs/QUICKSTART.md@@ -23,14 +23,43 @@ mso webApprove the device through the supported local/Owner flow if this browser is new. Treat Owner access like SSH-equivalent authority for the MSO service user.+The **Set up MSO** guide opens for a newly signed-in browser. An existing browser that already+closed onboarding keeps that choice. Reopen it at **Settings → Account → About → Maintenance → Setup**.+The guide retains its step, selected project and run reference in this browser; skipping it does+not reset the host or require a new account or team. Viewer/Operator devices see access readiness+without the Owner-only model and project-check controls.++If restoring existing data, choose **Open backup options** before creating work. The current+Settings surface can import browser data and verify server memory snapshots into an isolated+folder. Neither operation is a full installation restore; use the supported installation and+recovery procedures for that scope.+## 3. Connect one model/provider-Open **Settings → Integrations / Models** and configure one supported provider through the private setup flow. Do not paste provider credentials into agent chat.+In the guide's **Readiness** step, review the service user, filesystem roots and access route.+**Open model connections** opens the existing private Integrations form in another tab. Configure+one provider/model, return to the guide, and refresh. The explicit **Test model request** action+uses the saved selection and may consume provider quota. Stored connection metadata alone is+not proof of inference, tool calls or multimodal support. Model setup can be skipped for the+first project check. Do not paste provider credentials into agent chat.## 4. Pick one projectUse the Projects/Files surface or the CLI to identify a real project. Start read-only: inspect its status, current branch and recent work before asking an agent to edit anything.+The guide's **Project** step lists a bounded page from the existing host discovery service and+supports searching by project name. Empty, failed and truncated discovery are shown separately.+Selecting a returned project retains its exact id; execution resolves it again through the host+guards.++Choose **Review first action → Run project check** to save a manual workflow and read that+project's Git, package and knowledge metadata. The run uses the existing Workflow Graph engine+and `project_get`, with no project-file mutation or model call. The guide displays completion only+when the persisted receipt confirms all expected steps and the selected project. A lost response+retains the same request identity; reopening a known receipt reads it without dispatching again.+The saved workflow remains available under **Workflows**. This preflight is separate from the+agent task below.+## 5. Run the first safe agent taskFrom an MCP client or MSO agent, use a request shaped like:diff --git a/docs/README.md b/docs/README.mdindex 788e193a..6c8af1a4 100644--- a/docs/README.md+++ b/docs/README.md@@ -51,8 +51,10 @@ evidence and review freshness. The repository quality gate runs both automatical| [`PROJECT-MCP-CONNECTIONS.md`](./PROJECT-MCP-CONNECTIONS.md) | Named private connections, endpoint binding and identity for modular project MCPs || [`BATONLY-FEDERATION.md`](./BATONLY-FEDERATION.md) | Pull-based Batonly capability federation worker, MSO/SI-Coder execution boundary, polling, security and acceptance contract || [`AUTOMATION-FLOWS.md`](./AUTOMATION-FLOWS.md) | Versioned project API/MCP flows, CLI, sessions, Add MCP, assets and limits |+| [`WORKFLOW-SCHEDULES.md`](./WORKFLOW-SCHEDULES.md) | Interval, cron and durable one-shot scheduling semantics, missed ticks and recovery limits || [`WORKFLOW-GRAPH.md`](./WORKFLOW-GRAPH.md) | Private server-native Workflow Graph v2 with n8n-core triggers/flow control, versions/history, variables, integrations, visual execution and automatic learning || [`SHARED-GRAPH-FOUNDATION.md`](./SHARED-GRAPH-FOUNDATION.md) | Canonical shared graph mechanics, feature adapters, ownership matrix and dense-graph Focus/Map interaction boundary |+| [`NAKAMA-PARITY.md`](./NAKAMA-PARITY.md) | Frozen Nakama scope, current implementation mappings and candidate evidence limits || [`N8N-PARITY.md`](./N8N-PARITY.md) | Core n8n capability map across native Workflows, Organization, Integrations and the dedicated external n8n workspace || [`ORGANIZATION.md`](./ORGANIZATION.md) | Owner-private organization units, seats, reporting lines, live agent bindings, and workflow routing references || [`MCP-HOW-TO.md`](./MCP-HOW-TO.md) | Bahasa Indonesia onboarding: client connection, prompts, workflow, project MCP and troubleshooting |@@ -60,6 +62,7 @@ evidence and review freshness. The repository quality gate runs both automatical| [`A2A.md`](./A2A.md) | A2A v1 peer discovery, delegation/task lifecycle, CLI/MCP surface and trust boundary || [`LOCAL-AGENTS.md`](./LOCAL-AGENTS.md) | Native same-host session presence, identity, mailbox delivery, TUI/tools/API and isolation || [`SUBAGENTS.md`](./SUBAGENTS.md) | Same-session foreground isolated worker lifecycle, context, tool authority and limits |+| [`AGENT-PROFILES.md`](./AGENT-PROFILES.md) | Saved Owner profiles, exact model binding, revision history and bounded read tasks || [`MCP-FEATURE-IMPLEMENTATION.md`](./MCP-FEATURE-IMPLEMENTATION.md) | Stepwise reverse-engineering workflow for MCP tools, trusted skills and project capabilities || [`CHATGPT-PLUGIN.md`](./CHATGPT-PLUGIN.md) | ChatGPT custom MCP app setup, diagrams, scopes and file bridge || [`PLUGIN-REFERENCE-MATRIX.md`](./PLUGIN-REFERENCE-MATRIX.md) | Living cross-plugin architecture matrix, audit decisions and candidate generic primitives |diff --git a/docs/WORKFLOW-GRAPH.md b/docs/WORKFLOW-GRAPH.mdindex c0d3d445..2a12b5dc 100644--- a/docs/WORKFLOW-GRAPH.md+++ b/docs/WORKFLOW-GRAPH.md@@ -28,7 +28,7 @@ Delegated write authority excludes the live MSO checkout, Git control files, use### Triggers- `manual` — UI/CLI/MCP run-- `schedule` — interval or five-field cron, with IANA timezone support+- `schedule` — interval, five-field cron, or one explicit-offset `runAt` instant; see [schedule semantics and recovery](./WORKFLOW-SCHEDULES.md)- `webhook` — GET/POST/PUT/PATCH/DELETE server endpoint; requires a bearer token from a private secret variableTrigger nodes must be roots. Activating a workflow enables its server-side schedule/webhook behavior; drafts remain inert. Stored graphs are data rather than durable privilege grants: execution rechecks the live device role and deployment scope, and unattended stored non-web principals fail closed instead of acquiring fresh exec authority.@@ -147,6 +147,12 @@ Private run receipts retain up to 1000 recent executions and expose:The Workflows canvas reflects live node state and pulses edges while related nodes run. The Executions panel filters one graph's persisted executions and can reopen a complete receipt. A running local execution can be stopped after its current bounded action. Finished/stopped executions can be retried with their owner-private retained input only while the graph revision still matches, and finished receipts can be deleted.+`POST /api/v1/workflows` with `action: "run"` may include `expected_revision`, the exact saved+SHA-256 graph revision reviewed by its caller. A malformed revision is rejected with 400 and a+changed revision with 409 before an agent session or run is created. Callers that omit this field+retain the existing current-graph behavior. The onboarding project check uses this guard alongside+its stable idempotency key; local progress never substitutes for the server run receipt.+## Versions and rollbackCreate/update/restore operations save private snapshots. Up to 100 versions are retained per graph. The Versions panel shows timestamp, reason, revision and node count; restore is compare-and-swap against the current graph revision so concurrent edits cannot be silently overwritten.diff --git a/docs/WORKFLOW-SCHEDULES.md b/docs/WORKFLOW-SCHEDULES.mdnew file mode 100644index 00000000..60328613--- /dev/null+++ b/docs/WORKFLOW-SCHEDULES.md@@ -0,0 +1,93 @@+# Workflow schedules++Schedule nodes use the existing Workflow Graph engine, private graph/run store,+device authority and capability pipeline. An active graph enables its triggers;+draft, archived and disabled triggers do not run. Unattended execution requires a+live approved web device with sufficient authority. A stored graph grants no privilege.++## Modes and time++| Mode | Required configuration | Occurrence |+|---|---|---|+| `interval` | `everyMinutes`: integer 1–10080; legacy omission defaults to 60 | Matching absolute UTC minute, aligned to the Unix epoch |+| `cron` | Five numeric fields: minute, hour, day of month, month, weekday | Matching local minute in the configured IANA timezone |+| `runAt` | Explicit-offset `runAt` plus `missedPolicy: "run_once"` | One normalized absolute instant |++The shared scheduler checks active graph definitions every 15 seconds and starts+at most 50 new runs per tick. It is a polling scheduler; the timestamp is the earliest+eligible time, not a promise to start at that exact millisecond.++For example, `2026-11-01T09:00:00+07:00` and `2026-11-01T02:00:00Z` identify the+same instant. The editor and saved configuration preserve the entered offset.+Identity and the UTC preview normalize it to `2026-11-01T02:00:00.000Z`.+Timezone changes do not move an explicit-offset `runAt` instant.++Before that instant a one-shot trigger is ineligible. At or after it, the first+available active tick runs it once. The same policy applies after downtime, delayed+polling or late activation. `run_once` must be selected explicitly in configuration;+there is no implicit skip, grace window, expiry or recurring reinterpretation.++## Identity, persistence and recovery++The occurrence identity combines graph id, trigger node id and normalized instant.+Equivalent offset spellings, graph revisions, timezone changes, repeated ticks and+module reloads retain that identity. Moving the instant or creating another graph+or trigger identifies a new occurrence.++One-shot claims live beside detailed receipts in the existing private workflow run+directory. The existing run lock commits an `intent_committed` claim before workflow+dispatch. Engine completion records `run_finished` with the observed run state.+Before dispatch, the writer syncs ancestor directory entries, the temporary claim+file, and the pinned parent directory after rename. Any sync failure blocks dispatch;+a failure after rename retains an uncertain intent for reconciliation, without retry.++Claims contain identity, scheduled time and minimal engine-state metadata. They retain+no prompt, action input, output or credential. They have no automatic expiry and are+retained when detailed receipts are deleted or pruned by the 1000-receipt retention+limit. Removing or expiring a claim would permit duplicate execution of its occurrence.++If a claim exists but its receipt is unavailable, automatic ticks and the same+idempotency identity refuse replay. An intent can precede dispatch or an interrupted+effect; it does not prove the external action completed. Inspect the actual target+and reconcile before choosing an explicit new run. This slice adds no automatic+external-effect reconciliation, distributed fencing or tenant isolation.++The writer uses the existing Linux/WSL pinned descriptor authority. Unsupported or+failed filesystem sync operations fail closed; they do not fall back to rename-only+dispatch. Syscall-order and injected-fault tests verify this protocol, not a physical+power-cut experiment or guarantees about storage hardware that ignores sync.++## Cron compatibility++Cron supports five numeric fields, comma lists, inclusive ranges and positive steps.+Weekday is 0–6 with Sunday 0. Names, aliases and extra fields are rejected.+All fields are validated before matching; an earlier nonmatching field cannot hide+a malformed later field. The timezone override inherits the graph timezone when+empty; the graph default is UTC. Invalid IANA timezones are rejected on save.++Existing cron configurations without `dayMatch` retain the original AND behavior+between restricted day-of-month and weekday fields. The editor creates new cron+configurations with explicit `dayMatch: "or"`: either restricted day field may match.+The editor also offers explicit `and` for compatibility. With a wildcard day field,+the other field still constrains the date. A repeated local clock minute during a+daylight-saving transition has two distinct absolute-minute identities; a skipped+local minute has no occurrence. Cron does not backfill missed minutes after downtime.++The editor clears fields belonging to the previous mode when switching modes.+Older editors retained `everyMinutes` on cron records and `cron` on interval+records. Those inactive recurring fields remain stored and inert, so existing+graphs stay readable and run only their selected mode. Saving and execution+validate the active mode's numbers, cron expression and timezone. Unknown modes,+invalid dates, unsupported policies and mixtures of one-shot and recurring fields+are rejected; an inactive field never supplies a fallback schedule.++## Verification scope++The regression suite covers before/due/late evaluation, stable offset identity,+concurrent ticks and direct run guards, module reload, receipt deletion and pruning,+authority revocation, malformed saves, cron compatibility and timezone transitions.+Durability tests observe ancestor/file/directory sync order and verify that failures+prevent dispatch, clean up descriptors and retain uncertain claims without replay.+The browser journey exercises real editor changes, rejected saves, offset preview,+save/reload and an output-only due run through the server timer. Its result belongs+to the release candidate where the browser test was actually executed.diff --git a/docs/parity/EVIDENCE.md b/docs/parity/EVIDENCE.mdnew file mode 100644index 00000000..fce5d540--- /dev/null+++ b/docs/parity/EVIDENCE.md@@ -0,0 +1,88 @@+# Nakama parity evidence++The frozen [v0.1 snapshot](./nakama-v0.1.json) preserves every requirement, clause,+package, stage, acceptance journey, provider, format, transport and platform from+the approved draft. Its complete parsed JSON has a fixed SHA-256 in the validator.+Record progress in [the implementation map](./nakama-implementation.json).+Changing identifiers while retaining counts, or removing a format or contract,+does not preserve this snapshot.++The [source receipts](./source-references.json) identify 100 distinct files at+the two pinned commits. A source hash proves which bytes were read. It does not+prove that a feature works or that a current provider account supports it.++## Development checks++Run `bun run parity:nakama` and `bun run test:parity`. They are also part of+`bun run check`. Regenerate the current reference with+`node scripts/gen-nakama-parity.mjs` after changing the implementation map.++Each requirement is pending, partial, or implemented. Partial rows need code,+tests, and explicit remaining scope. Implemented rows also need a verification+owner and no remaining scope. Neither status alone establishes runtime parity.++## Full parity candidate gate++From the exact clean candidate checkout, run:++```sh+bun run parity:nakama:release --evidence /absolute/path/to/manifest.json --commit EXACT_HEAD_SHA+```++The gate rejects a different HEAD, modified tracked files, untracked files,+index entries marked `skip-worktree` or `assume-unchanged`, and+source/test mappings that are not regular blobs in that candidate's Git tree.+Ignored dependencies, build outputs, symlinks and submodules cannot stand in for+committed implementation evidence. All 64 requirements must be implemented.++The manifest has schema `mso.nakama-parity-evidence.v1`, `candidate_commit`,+`working_tree_clean: true`, a valid `created_at` timestamp, and an environment+with `kind: "runtime"` and nonempty strings for `name`, `platform`, and `node`.+It contains these arrays:++| Array | Required records |+|---|---|+| `gates` | typecheck, lint, tests, build, security, regression |+| `requirements` | Every NK ID, its exact acceptance references, and all eight DOD dimensions |+| `acceptance` | Every A01–A30 journey |+| `compatibility` | Every ID and test dimension from `requiredVariants()` in the variant module |+| `artifacts` | Identified, nonempty evidence files with byte count and SHA-256 |++Each result record has `id`, `status: "pass"`, `candidate_commit`, and a nonempty+array of artifact IDs. Requirements, acceptance journeys, compatibility records+and their dimensions also require `mode: "runtime"`. Requirements include+`acceptance` as the exact set in the snapshot and `dimensions` as an array of+DOD result records. Compatibility records have a `dimensions` array containing+the exact adapter test dimensions. Empty expected dimension sets still use an+empty array. Additional or duplicate IDs do not count as coverage.++An artifact has `id`, `path`, `bytes`, and `sha256`. Its path is relative to+the manifest directory, contains no traversal or symlink, and names a regular+file of 1 byte through 20 MiB. Artifact verification currently requires Linux or+WSL with `/proc/self/fd`; unsupported platforms or unavailable descriptor pinning+block the gate. Every directory is opened from a pinned parent with `O_NOFOLLOW`.+The final file is opened once, checked through that descriptor, and read through+the same descriptor into a bounded buffer. A one-byte sentinel detects growth;+size or modification metadata changes during the read block the artifact.+Pathname replacement cannot redirect the read to another file. This is a checked+byte snapshot, not a filesystem-wide transaction or a physical storage guarantee.+Keep credentials and private tenant data out of public receipts; include only the+bounded evidence needed to assess the result.++The variant list derives providers, transports, harnesses, channels, formats,+the knowledge ZIP container, platforms, and all baseline shell/network+combinations. Merely supporting a model tool does not imply media, MCP resources,+or prompts support. Additional platforms marked as optional extensions in the+snapshot do not become a baseline installer claim.++## What a passing manifest means++This validator checks completeness, candidate identity, file boundaries and+integrity. It cannot establish whether a receipt's statements are true. Reviewers+must inspect actual requests, responses, provider identities, delivery IDs,+authorization denials and recovery outcomes before making a release claim.++Synthetic tests deliberately exercise the validator's success shape. They are+not release manifests. Labeling fixture results as runtime results would still+be false, even if someone could produce a structurally valid manifest. The full+parity gate remains blocked while requirements or real acceptance work remain.diff --git a/docs/parity/nakama-implementation.json b/docs/parity/nakama-implementation.jsonnew file mode 100644index 00000000..f84981a4--- /dev/null+++ b/docs/parity/nakama-implementation.json@@ -0,0 +1,676 @@+{+ "schema_version": "mso.nakama-parity-implementation.v1",+ "baseline": "nakama-v0.1.json",+ "requirements": [+ {+ "id": "NK-001",+ "status": "partial",+ "source_paths": [+ "README.md"+ ],+ "implementation_paths": [+ "frontend/slices/auth/components/first-login-onboarding.tsx",+ "frontend/slices/auth/lib/onboarding-api.ts",+ "frontend/slices/auth/lib/onboarding-state.ts",+ "app/api/v1/alfa/cockpit/route.ts",+ "app/api/v1/workflows/route.ts"+ ],+ "test_paths": [+ "frontend/slices/auth/lib/onboarding-state.test.ts",+ "frontend/slices/auth/lib/onboarding-api.test.ts",+ "frontend/slices/auth/lib/onboarding-runtime.test.ts",+ "app/api/v1/workflows/run-revision.test.ts",+ "scripts/e2e/onboarding.mjs"+ ],+ "remaining": [+ "Akun manusia, organisasi, migrasi owner dan konteks pengguna yang dapat disunting masih memerlukan PK04–PK06.",+ "Pemulihan instalasi penuh, installer lintas platform dan kesiapan provider nyata belum dibuktikan; panduan ini memakai instalasi dan perangkat Owner yang sudah ada."+ ]+ },+ {+ "id": "NK-002",+ "status": "pending",+ "source_paths": [+ "lib/auth/login-password.ts"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-003",+ "status": "pending",+ "source_paths": [],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-004",+ "status": "pending",+ "source_paths": [+ "docs/ARCHITECTURE.md"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-005",+ "status": "pending",+ "source_paths": [+ "docs/TENANT-PREVIEW.md"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-006",+ "status": "pending",+ "source_paths": [+ "lib/auth/roles.ts"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-007",+ "status": "pending",+ "source_paths": [],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-008",+ "status": "pending",+ "source_paths": [],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-009",+ "status": "partial",+ "source_paths": [+ "frontend/slices/assistant/lib/types.ts"+ ],+ "implementation_paths": [+ "lib/contracts/agent-profile.ts",+ "lib/agent/profile-store.ts",+ "lib/agent/profile-runtime.ts",+ "lib/agent/bounded-runner.ts",+ "app/api/v1/agent-profiles/run/route.ts",+ "frontend/slices/assistant/components/profiles-panel.tsx"+ ],+ "test_paths": [+ "lib/agent/profile-store.test.ts",+ "lib/agent/profile-runtime.test.ts",+ "lib/ai/profile-model-binding.test.ts",+ "app/api/v1/agent-profiles/route.test.ts",+ "app/api/v1/agent-profiles/run/route.test.ts",+ "scripts/e2e/agent-profiles.mjs"+ ],+ "remaining": [+ "Penugasan skill/MCP/soul/memory/knowledge per profil, hak tulis/exec, organisasi, runtime eksternal dan kesetaraan seluruh transport masih terbuka.",+ "Profil saat ini milik perangkat Owner dan memakai runtime MSO dengan sembilan alat baca yang diizinkan; inferensi provider nyata serta seluruh varian belum dibuktikan."+ ]+ },+ {+ "id": "NK-010",+ "status": "partial",+ "source_paths": [],+ "implementation_paths": [+ "lib/agent/profile-store.ts",+ "lib/agent/profile-storage.ts",+ "lib/agent/profile-schema.ts",+ "lib/host/path-credentials.ts",+ "lib/host/path-recursive.ts"+ ],+ "test_paths": [+ "lib/agent/profile-store.test.ts",+ "lib/host/profile-path.test.ts",+ "scripts/e2e/agent-profiles.mjs"+ ],+ "remaining": [+ "Pemindahan antarorganisasi, pemetaan ulang grant, export/import, paket agen dan pemulihan instalasi nyata belum tersedia dalam slice ini."+ ]+ },+ {+ "id": "NK-011",+ "status": "pending",+ "source_paths": [+ "lib/ai/selected-model-stream.ts"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-012",+ "status": "pending",+ "source_paths": [+ "lib/ai/selected-model-stream.ts"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-013",+ "status": "pending",+ "source_paths": [],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-014",+ "status": "pending",+ "source_paths": [+ "lib/host/project-worktree.ts"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-015",+ "status": "pending",+ "source_paths": [+ "lib/agent/subagent-runner.ts"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-016",+ "status": "pending",+ "source_paths": [+ "app/api/assistant/route.ts"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-017",+ "status": "pending",+ "source_paths": [+ "lib/agent/session-create.ts"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-018",+ "status": "pending",+ "source_paths": [],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-019",+ "status": "pending",+ "source_paths": [+ "docs/SESSION-ARTIFACTS.md"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-020",+ "status": "pending",+ "source_paths": [],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-021",+ "status": "pending",+ "source_paths": [+ "lib/workflow/graph-runtime.ts"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-022",+ "status": "pending",+ "source_paths": [+ "lib/agent/memory-store.ts"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-023",+ "status": "pending",+ "source_paths": [+ "lib/agent/memory-resolution.ts"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-024",+ "status": "pending",+ "source_paths": [+ "docs/ARCHITECTURE.md"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-025",+ "status": "pending",+ "source_paths": [+ "docs/AGENT-VAULT.md"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-026",+ "status": "pending",+ "source_paths": [],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-027",+ "status": "pending",+ "source_paths": [+ "docs/ARCHITECTURE.md"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-028",+ "status": "pending",+ "source_paths": [],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-029",+ "status": "pending",+ "source_paths": [],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-030",+ "status": "pending",+ "source_paths": [+ "lib/mcp/tools-forge.ts"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-031",+ "status": "pending",+ "source_paths": [+ "docs/ARCHITECTURE.md"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-032",+ "status": "pending",+ "source_paths": [+ "lib/mcp/tools-forge.ts"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-033",+ "status": "pending",+ "source_paths": [+ "docs/PROJECT-MCP-CONNECTIONS.md"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-034",+ "status": "pending",+ "source_paths": [+ "lib/infra/connection-dispatch.ts"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-035",+ "status": "pending",+ "source_paths": [+ "docs/PROJECT-MCP-CONNECTIONS.md"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-036",+ "status": "pending",+ "source_paths": [+ "lib/mcp/tools-forge.ts"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-037",+ "status": "pending",+ "source_paths": [+ "lib/workflow/learning.ts"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-038",+ "status": "pending",+ "source_paths": [],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-039",+ "status": "pending",+ "source_paths": [],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-040",+ "status": "pending",+ "source_paths": [+ "docs/CHANNELS.md"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-041",+ "status": "pending",+ "source_paths": [],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-042",+ "status": "pending",+ "source_paths": [+ "docs/CHANNELS.md"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-043",+ "status": "pending",+ "source_paths": [],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-044",+ "status": "pending",+ "source_paths": [+ "docs/CHANNELS.md"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-045",+ "status": "partial",+ "source_paths": [+ "lib/workflow/graph-triggers.ts"+ ],+ "implementation_paths": [+ "lib/contracts/workflow-schedule.ts",+ "lib/workflow/schedule.ts",+ "lib/workflow/graph-triggers.ts",+ "lib/workflow/graph-run-store.ts",+ "lib/workflow/private-file.ts",+ "frontend/slices/workflows/components/workflow-schedule-fields.tsx"+ ],+ "test_paths": [+ "lib/contracts/workflow-schedule.test.ts",+ "lib/workflow/schedule.test.ts",+ "lib/workflow/schedule-runtime.test.ts",+ "lib/workflow/private-file-durable.test.ts",+ "scripts/e2e/workflow-schedules.mjs"+ ],+ "remaining": [+ "Pemilih saved prompt/profil, pratinjau waktu berikutnya, batas kuota, UI rekonsiliasi dan fencing terdistribusi masih terbuka.",+ "Durable intent mencegah pengulangan otomatis pada state tidak pasti; hasil efek eksternal, pemulihan deployment nyata dan eksekusi tenant belum diklaim."+ ]+ },+ {+ "id": "NK-046",+ "status": "pending",+ "source_paths": [+ "lib/workflow/graph-engine.ts"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-047",+ "status": "pending",+ "source_paths": [+ "lib/workflow/graph-engine.ts"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-048",+ "status": "pending",+ "source_paths": [+ "docs/ARCHITECTURE.md"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-049",+ "status": "pending",+ "source_paths": [],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-050",+ "status": "pending",+ "source_paths": [+ "docs/SESSION-ARTIFACTS.md"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-051",+ "status": "pending",+ "source_paths": [],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-052",+ "status": "pending",+ "source_paths": [+ "frontend/slices/os-shell/shell.manifest.ts"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-053",+ "status": "pending",+ "source_paths": [],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-054",+ "status": "pending",+ "source_paths": [],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-055",+ "status": "pending",+ "source_paths": [+ "docs/MEMORY-SAFETY.md"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-056",+ "status": "pending",+ "source_paths": [],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-057",+ "status": "partial",+ "source_paths": [+ "docs/ARCHITECTURE.md"+ ],+ "implementation_paths": [+ "bin/mso",+ "scripts/cli/help.sh",+ "scripts/cli/agent-profiles.sh"+ ],+ "test_paths": [+ "scripts/cli/help.test.ts",+ "bin/mso.test.ts",+ "bin/mso-update-offline.test.ts"+ ],+ "remaining": [+ "Org/reasoning/skill/clipboard, rotasi token, streaming/reconnect serta identitas workspace lokal/jarak jauh penuh masih memerlukan pembuktian kontrak CLI."+ ]+ },+ {+ "id": "NK-058",+ "status": "pending",+ "source_paths": [+ "docs/PLATFORMS.md"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-059",+ "status": "pending",+ "source_paths": [+ "docs/ARCHITECTURE.md"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-060",+ "status": "pending",+ "source_paths": [+ "docs/ARCHITECTURE.md"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-061",+ "status": "pending",+ "source_paths": [+ "app/register-sw.tsx"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-062",+ "status": "pending",+ "source_paths": [+ "lib/host/audit.ts"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-063",+ "status": "pending",+ "source_paths": [],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ },+ {+ "id": "NK-064",+ "status": "pending",+ "source_paths": [+ "frontend/slices/os-shell/theme-quick-picker.tsx"+ ],+ "implementation_paths": [],+ "test_paths": [],+ "remaining": []+ }+ ]+}diff --git a/docs/parity/nakama-v0.1.json b/docs/parity/nakama-v0.1.jsonnew file mode 100644index 00000000..27426df1--- /dev/null+++ b/docs/parity/nakama-v0.1.json@@ -0,0 +1,9855 @@+{+ "schema_version": "mso.nakama-parity-inventory.v0.1",+ "title": "Inventaris Paritas Nakama ke MSO",+ "language": "id",+ "scope": "Complete lossless extraction of the attached draft requirement groups and mappings; source implementation and runtime parity remain unverified.",+ "source_document": {+ "filename": "Draf-Paritas-Nakama-ke-MSO-v0.1(1).docx",+ "sha256": "1395092e62e680c718ac0a3b002ba3bc747af6e52e87c59d2b4462c12dfbfe1d",+ "version": "0.1",+ "date": "2026-10-18",+ "timezone": "Asia/Jakarta"+ },+ "baselines": {+ "nakama": {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec"+ },+ "mso": {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a"+ }+ },+ "candidate_commit": null,+ "statistics": {+ "requirements": 64,+ "packages": 24,+ "acceptance_scenarios": 30,+ "stages": 8,+ "requirement_categories": 11,+ "provider_identifiers": 31,+ "compatibility_rows": 9,+ "coding_harnesses": 5,+ "acp_presets": 2,+ "channels": 4,+ "source_reference_ids": 15,+ "source_hyperlink_occurrences": 151,+ "source_hyperlink_distinct_urls": 124,+ "requirement_source_links": 108,+ "contract_clauses": 188,+ "baseline_status_counts": {+ "Sebagian": 31,+ "Verifikasi": 21,+ "Fondasi": 12+ },+ "runtime_tested_requirements": 0,+ "completed_features_claimed": 0,+ "assigned_verification_owners": 0,+ "target_module_mappings_verified": 0+ },+ "interpretation_rules": [+ "Paritas berarti pengguna dapat menyelesaikan pekerjaan yang setara di MSO dan memeriksa hasilnya. Setiap kemampuan harus memiliki alur UI yang sesuai, kontrak API atau tool bila relevan, identitas dan izin, penyimpanan yang tepat, penanganan kegagalan, dokumentasi, serta bukti pengujian. Tampilan menu atau endpoint yang belum menyelesaikan pekerjaan tidak memenuhi kriteria selesai.",+ "Dokumen ini adalah rancangan pekerjaan. Nomor kebutuhan dan paket pengerjaan di dalamnya merupakan identitas usulan, bukan issue, PR, atau fitur yang sudah dirilis.",+ "Tidak ada status awal yang otomatis berarti paritas sudah selesai. Status penyelesaian berikutnya adalah dipetakan, dirancang, diimplementasikan, diuji, diintegrasikan, dirilis, dan diverifikasi pada lingkungan target.",+ "Seluruh kemampuan aktif pada inventaris tetap berada dalam cakupan meskipun dikerjakan pada tahap berbeda. Integrasi berbayar atau yang memerlukan akun pengguna tetap dicatat, dengan dependensi dan alur konfigurasi yang nyata. Status belum terhubung harus terlihat dan tidak boleh ditampilkan sebagai hasil sukses.",+ "Penawaran managed hosting Nakama dicatat terpisah karena layanan komersial di luar repo tidak membuktikan adanya modul provisioning atau billing yang dapat diadopsi. Target pengalaman setup yang mudah tetap masuk; detail penawaran hosting MSO memerlukan rancangan produk tersendiri. Fitur lama yang sudah dihapus dari runtime tidak diperlakukan sebagai kemampuan aktif hanya karena masih disebut dokumentasi. N1",+ "Jumlah menu, jumlah tool, jumlah test, atau persentase coverage tidak menggantikan delapan bukti tersebut. Benchmark membandingkan model, input, permission, dan batas biaya yang sama. Target onboarding serta keandalan menjadi sasaran uji, bukan klaim hasil sebelum diukur.",+ "Skenario berikut adalah target penerimaan, belum merupakan hasil pengujian yang lulus. Siapkan sedikitnya dua organisasi independen, beberapa peran pengguna, dua profil agen per organisasi, serta akun uji integrasi yang diperlukan. Uji kegagalan dan akses yang harus ditolak bersama alur normal.",+ "Setiap provider, kanal, jenis media, plugin yang dipasarkan sebagai didukung, serta OS dan arsitektur memiliki baris bukti tersendiri. Satu adapter yang berhasil tidak meluluskan seluruh kategori. Fixture dipakai untuk pengujian deterministik; koneksi nyata tetap diperlukan untuk klaim integrasi.",+ "PK01 menghubungkan source baseline, kebutuhan, modul tujuan, uji dan bukti runtime pada commit kandidat. Typecheck, lint, build, uji relevan, review keamanan dan regresi harus menilai commit yang sama. Temuan scanner ditriage dengan bukti; kegagalan workflow dan kerentanan yang terkonfirmasi dicatat sebagai hal berbeda.",+ "Rilis paritas memerlukan hasil perjalanan pengguna, verifikasi provider yang diklaim, drill migrasi dan restore, serta dokumentasi batas dukungan. Ukur penggunaan sumber daya, latensi dan biaya pada beban yang ditetapkan; jangan membuat klaim performa tanpa pengukuran. Catat versi, asal dan ketentuan penggunaan dependency yang diadopsi. Hash memastikan identitas paket dan tidak menggantikan review kepercayaan.",+ "Inventaris mengelompokkan subfitur untuk perencanaan. PK01 wajib memecah variasi route, setting, provider, transport, format dan platform menjadi checklist yang dapat diverifikasi, lalu membandingkan tree, UI, kontrak API dan dokumentasi agar tidak ada kemampuan aktif yang terlewat. Bukti source menunjukkan implementasi ada; bukti itu belum menyatakan alur berhasil pada runtime.",+ "Knowledge wiki turunan bersifat opt in melalui skill. Alur authoring plugin dan distribusi desktop tetap memerlukan pembuktian runtime. Cognito adalah nama mode percakapan sementara Nakama. Integrasi WhatsApp baseline memakai linked device, sementara Slack memakai Socket Mode. Recipe workflow baseline berurutan dan berhenti ketika langkah gagal; kemampuan graph MSO tetap dapat dipertahankan.",+ "Hak artifact dan scope optimizer memiliki perbedaan antara dokumentasi lama dan source. Tetapkan perilaku target secara eksplisit pada permission serta uji. External Supermemory memiliki dataset yang memerlukan rencana backup sendiri. Managed hosting, akses paket provider, jumlah aplikasi Composio dan publikasi installer merupakan dependensi yang harus diverifikasi sendiri.",+ "PK01 mencatat subfitur ini di bawah NK001, NK006, NK009, NK015, NK027 dan NK057, lalu menambahkan subtest yang relevan ke A04, A05, A07, A08 dan A21. Tidak diperlukan identifier provider atau bentuk arsitektur internal yang sama apabila adapter MSO memberikan perilaku setara dan buktinya jelas.",+ "Pemeriksaan menggunakan snapshot source dan dokumentasi publik pada commit baseline yang dibekukan. Ini merupakan analisis statis untuk rancangan pekerjaan. Tidak ada hasil test runtime baru atau klaim paritas selesai dalam dokumen ini. Tautan per baris inventaris menunjukkan sumber kebutuhan Nakama dan dasar MSO jika tersedia.",+ "Untuk audit lanjutan, mulai dari commit yang tercantum di bagian 2 dan catat selisih terhadap kandidat implementasi. Dokumen ini tidak menganggap branch main tetap sama setelah tanggal baseline."+ ],+ "baseline_status_definitions": [+ {+ "status": "Fondasi",+ "meaning": "Ada implementasi MSO yang relevan pada area tersebut.",+ "work_needed": "Gunakan ulang, petakan detail, lalu buktikan paritas pada skenario penerimaan."+ },+ {+ "status": "Sebagian",+ "meaning": "Implementasi hanya mencakup sebagian kebutuhan atau masih preview.",+ "work_needed": "Lengkapi domain dan alur yang belum terpenuhi."+ },+ {+ "status": "Verifikasi",+ "meaning": "Belum ada bukti cukup untuk menyatakan padanan aktif tersedia.",+ "work_needed": "Lakukan audit singkat; bangun bagian yang belum ada dan uji hasilnya."+ }+ ],+ "requirements": [+ {+ "id": "NK-001",+ "title": "Panduan awal dan pemulihan instalasi",+ "category": "Identitas organisasi dan penggunaan",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Satukan instalasi dan pengaturan awal menjadi panduan akun admin, organisasi, provider, serta konteks pengguna. Sediakan pilihan memulihkan backup sebelum membuat state baru, langkah yang boleh dilewati, pemeriksaan kesiapan, dan akses pemulihan owner. Uji agar instalasi pribadi lama tetap dapat dipakai tanpa wajib membentuk tim.",+ "draft_text_verbatim": "Sebagian. Satukan instalasi dan pengaturan awal menjadi panduan akun admin, organisasi, provider, serta konteks pengguna. Sediakan pilihan memulihkan backup sebelum membuat state baru, langkah yang boleh dilewati, pemeriksaan kesiapan, dan akses pemulihan owner. Uji agar instalasi pribadi lama tetap dapat dipakai tanpa wajib membentuk tim.",+ "contract_clauses": [+ "Satukan instalasi dan pengaturan awal menjadi panduan akun admin, organisasi, provider, serta konteks pengguna.",+ "Sediakan pilihan memulihkan backup sebelum membuat state baru, langkah yang boleh dilewati, pemeriksaan kesiapan, dan akses pemulihan owner.",+ "Uji agar instalasi pribadi lama tetap dapat dipakai tanpa wajib membentuk tim."+ ],+ "packages": [+ "PK03",+ "PK06",+ "PK22"+ ],+ "acceptance": [+ "A01",+ "A29"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/web/src/components/setup-wizard/SetupWizard.tsx#L90-L143",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/web/src/components/setup-wizard/SetupWizard.tsx",+ "line_fragment": "L90-L143",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/README.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "README.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 104,+ "table_row_index": 1+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-002",+ "title": "Akun pengguna dan kata sandi",+ "category": "Identitas organisasi dan penggunaan",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Lengkapi akun lokal bernama dengan login email dan kata sandi, penyuntingan profil, perubahan serta reset kata sandi, dan penerimaan undangan. Petakan sesi ke principal yang terverifikasi. Login owner berbasis konfigurasi saat ini menjadi jalur kompatibilitas dan pemulihan, bukan akun bersama untuk seluruh anggota.",+ "draft_text_verbatim": "Sebagian. Lengkapi akun lokal bernama dengan login email dan kata sandi, penyuntingan profil, perubahan serta reset kata sandi, dan penerimaan undangan. Petakan sesi ke principal yang terverifikasi. Login owner berbasis konfigurasi saat ini menjadi jalur kompatibilitas dan pemulihan, bukan akun bersama untuk seluruh anggota.",+ "contract_clauses": [+ "Lengkapi akun lokal bernama dengan login email dan kata sandi, penyuntingan profil, perubahan serta reset kata sandi, dan penerimaan undangan.",+ "Petakan sesi ke principal yang terverifikasi.",+ "Login owner berbasis konfigurasi saat ini menjadi jalur kompatibilitas dan pemulihan, bukan akun bersama untuk seluruh anggota."+ ],+ "packages": [+ "PK04",+ "PK05",+ "PK06"+ ],+ "acceptance": [+ "A02",+ "A03",+ "A05"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/auth.ts#L254-L579",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/auth.ts",+ "line_fragment": "L254-L579",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/auth/login-password.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/auth/login-password.ts",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 104,+ "table_row_index": 2+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-003",+ "title": "Passkey dan autentikasi berlapis",+ "category": "Identitas organisasi dan penggunaan",+ "in_scope": true,+ "baseline_status": "Verifikasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Audit dukungan autentikator, lalu sediakan pendaftaran dan penghapusan passkey WebAuthn, TOTP, kode pemulihan sekali pakai, serta kebijakan wajib MFA. Ikat proses ke akun dan origin yang benar, tampilkan status perangkat, dan uji pemulihan kehilangan autentikator tanpa membuka akses organisasi lain atau menyamakan fitur ini dengan SSO.",+ "draft_text_verbatim": "Verifikasi. Audit dukungan autentikator, lalu sediakan pendaftaran dan penghapusan passkey WebAuthn, TOTP, kode pemulihan sekali pakai, serta kebijakan wajib MFA. Ikat proses ke akun dan origin yang benar, tampilkan status perangkat, dan uji pemulihan kehilangan autentikator tanpa membuka akses organisasi lain atau menyamakan fitur ini dengan SSO.",+ "contract_clauses": [+ "Audit dukungan autentikator, lalu sediakan pendaftaran dan penghapusan passkey WebAuthn, TOTP, kode pemulihan sekali pakai, serta kebijakan wajib MFA.",+ "Ikat proses ke akun dan origin yang benar, tampilkan status perangkat, dan uji pemulihan kehilangan autentikator tanpa membuka akses organisasi lain atau menyamakan fitur ini dengan SSO."+ ],+ "packages": [+ "PK04"+ ],+ "acceptance": [+ "A03",+ "A06"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/auth.ts#L703-L1508",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/auth.ts",+ "line_fragment": "L703-L1508",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 104,+ "table_row_index": 3+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-004",+ "title": "Sesi login dan rotasi token",+ "category": "Identitas organisasi dan penggunaan",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Perluas pengelolaan perangkat serta token menjadi daftar sesi login per pengguna, pencabutan sesi terpilih atau seluruh sesi, dan rotasi token lokal untuk CLI maupun worker. Pisahkan sesi autentikasi dari percakapan agen; uji kedaluwarsa, audience, revocation selama run, dan penolakan token lama setelah rotasi.",+ "draft_text_verbatim": "Sebagian. Perluas pengelolaan perangkat serta token menjadi daftar sesi login per pengguna, pencabutan sesi terpilih atau seluruh sesi, dan rotasi token lokal untuk CLI maupun worker. Pisahkan sesi autentikasi dari percakapan agen; uji kedaluwarsa, audience, revocation selama run, dan penolakan token lama setelah rotasi.",+ "contract_clauses": [+ "Perluas pengelolaan perangkat serta token menjadi daftar sesi login per pengguna, pencabutan sesi terpilih atau seluruh sesi, dan rotasi token lokal untuk CLI maupun worker.",+ "Pisahkan sesi autentikasi dari percakapan agen; uji kedaluwarsa, audience, revocation selama run, dan penolakan token lama setelah rotasi."+ ],+ "packages": [+ "PK04",+ "PK06"+ ],+ "acceptance": [+ "A03",+ "A06"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/auth.ts#L1726-L1918",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/auth.ts",+ "line_fragment": "L1726-L1918",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/ARCHITECTURE.md#L37-L57",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/ARCHITECTURE.md",+ "line_fragment": "L37-L57",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 104,+ "table_row_index": 4+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-005",+ "title": "Organisasi induk dan tim",+ "category": "Identitas organisasi dan penggunaan",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Kembangkan fondasi tenant menjadi pembuatan organisasi dan tim, hubungan induk, pemilihan organisasi aktif, pengarsipan, penghapusan permanen yang ditinjau, serta penonaktifan dan pengaktifan akun. Pisahkan organisasi pengguna dari diagram unit dan seat agen MSO; perubahan struktur tidak otomatis memindahkan data pribadi atau kredensial.",+ "draft_text_verbatim": "Sebagian. Kembangkan fondasi tenant menjadi pembuatan organisasi dan tim, hubungan induk, pemilihan organisasi aktif, pengarsipan, penghapusan permanen yang ditinjau, serta penonaktifan dan pengaktifan akun. Pisahkan organisasi pengguna dari diagram unit dan seat agen MSO; perubahan struktur tidak otomatis memindahkan data pribadi atau kredensial.",+ "contract_clauses": [+ "Kembangkan fondasi tenant menjadi pembuatan organisasi dan tim, hubungan induk, pemilihan organisasi aktif, pengarsipan, penghapusan permanen yang ditinjau, serta penonaktifan dan pengaktifan akun.",+ "Pisahkan organisasi pengguna dari diagram unit dan seat agen MSO; perubahan struktur tidak otomatis memindahkan data pribadi atau kredensial."+ ],+ "packages": [+ "PK05",+ "PK06"+ ],+ "acceptance": [+ "A02",+ "A04",+ "A05"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/platform-orgs.ts#L73-L537",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/platform-orgs.ts",+ "line_fragment": "L73-L537",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/TENANT-PREVIEW.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/TENANT-PREVIEW.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 104,+ "table_row_index": 5+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-006",+ "title": "Peran anggota dan kepemilikan percakapan",+ "category": "Identitas organisasi dan penggunaan",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Lengkapi peran admin platform dan organisasi, undangan, daftar anggota, penambahan atau penghapusan membership, serta perubahan peran. Terapkan kepemilikan percakapan pribadi pada UI dan seluruh transport server. Peran perangkat Viewer, Operator, dan Owner yang sudah ada tidak boleh dianggap otomatis sebagai RBAC pengguna atau hak membaca chat anggota.",+ "draft_text_verbatim": "Sebagian. Lengkapi peran admin platform dan organisasi, undangan, daftar anggota, penambahan atau penghapusan membership, serta perubahan peran. Terapkan kepemilikan percakapan pribadi pada UI dan seluruh transport server. Peran perangkat Viewer, Operator, dan Owner yang sudah ada tidak boleh dianggap otomatis sebagai RBAC pengguna atau hak membaca chat anggota.",+ "contract_clauses": [+ "Lengkapi peran admin platform dan organisasi, undangan, daftar anggota, penambahan atau penghapusan membership, serta perubahan peran.",+ "Terapkan kepemilikan percakapan pribadi pada UI dan seluruh transport server.",+ "Peran perangkat Viewer, Operator, dan Owner yang sudah ada tidak boleh dianggap otomatis sebagai RBAC pengguna atau hak membaca chat anggota."+ ],+ "packages": [+ "PK05",+ "PK06"+ ],+ "acceptance": [+ "A02",+ "A04",+ "A05",+ "A06"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/org-members.ts#L546-L883",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/org-members.ts",+ "line_fragment": "L546-L883",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/auth/roles.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/auth/roles.ts",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 104,+ "table_row_index": 6+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-007",+ "title": "Publikasi resource ke tim",+ "category": "Identitas organisasi dan penggunaan",+ "in_scope": true,+ "baseline_status": "Verifikasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Verifikasi padanan publikasi, lalu sediakan knowledge, skill, template agen, tool, dan model yang dapat diterbitkan organisasi induk kepada tim. Tampilkan sumber dan pencabutan akses. Resource bersama tidak membawa secret atau membuka workspace pribadi; pencabutan template sumber tetap mempertahankan hasil kerja tim yang telah disimpan sesuai kebijakan.",+ "draft_text_verbatim": "Verifikasi. Verifikasi padanan publikasi, lalu sediakan knowledge, skill, template agen, tool, dan model yang dapat diterbitkan organisasi induk kepada tim. Tampilkan sumber dan pencabutan akses. Resource bersama tidak membawa secret atau membuka workspace pribadi; pencabutan template sumber tetap mempertahankan hasil kerja tim yang telah disimpan sesuai kebijakan.",+ "contract_clauses": [+ "Verifikasi padanan publikasi, lalu sediakan knowledge, skill, template agen, tool, dan model yang dapat diterbitkan organisasi induk kepada tim.",+ "Tampilkan sumber dan pencabutan akses.",+ "Resource bersama tidak membawa secret atau membuka workspace pribadi; pencabutan template sumber tetap mempertahankan hasil kerja tim yang telah disimpan sesuai kebijakan."+ ],+ "packages": [+ "PK05",+ "PK06",+ "PK12"+ ],+ "acceptance": [+ "A04",+ "A05",+ "A16"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/org-members.ts#L145-L423",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/org-members.ts",+ "line_fragment": "L145-L423",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 104,+ "table_row_index": 7+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-008",+ "title": "Kuota bulanan organisasi",+ "category": "Identitas organisasi dan penggunaan",+ "in_scope": true,+ "baseline_status": "Verifikasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Audit pencatatan penggunaan sebelum menambahkan batas bulanan jumlah turn dan token LLM per organisasi, ambang peringatan, serta rincian pemakaian. Periksa batas sebelum turn dimulai dan rekonsiliasi hasil provider setelahnya. Uji run bersamaan serta pergantian bulan; bedakan kuota operasional dari tagihan, langganan, dan estimasi biaya.",+ "draft_text_verbatim": "Verifikasi. Audit pencatatan penggunaan sebelum menambahkan batas bulanan jumlah turn dan token LLM per organisasi, ambang peringatan, serta rincian pemakaian. Periksa batas sebelum turn dimulai dan rekonsiliasi hasil provider setelahnya. Uji run bersamaan serta pergantian bulan; bedakan kuota operasional dari tagihan, langganan, dan estimasi biaya.",+ "contract_clauses": [+ "Audit pencatatan penggunaan sebelum menambahkan batas bulanan jumlah turn dan token LLM per organisasi, ambang peringatan, serta rincian pemakaian.",+ "Periksa batas sebelum turn dimulai dan rekonsiliasi hasil provider setelahnya.",+ "Uji run bersamaan serta pergantian bulan; bedakan kuota operasional dari tagihan, langganan, dan estimasi biaya."+ ],+ "packages": [+ "PK23",+ "PK06"+ ],+ "acceptance": [+ "A28",+ "A05"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/org-usage-quota-service.ts#L5-L111",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/org-usage-quota-service.ts",+ "line_fragment": "L5-L111",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 104,+ "table_row_index": 8+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-009",+ "title": "Identitas dan kemampuan profil agen",+ "category": "Profil model dan runtime agen",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Perluas profil nama, avatar, persona, agen default, identitas serta instruksi soul, memory, model, dan assignment kemampuan. Sediakan asisten pembuat profil yang menampilkan rancangan sebelum penerapan. Terapkan batas tool, MCP, dan skill pada server; metadata allTools atau skills Alfa saat ini tidak menjadi bukti pembatasan akses yang efektif.",+ "draft_text_verbatim": "Sebagian. Perluas profil nama, avatar, persona, agen default, identitas serta instruksi soul, memory, model, dan assignment kemampuan. Sediakan asisten pembuat profil yang menampilkan rancangan sebelum penerapan. Terapkan batas tool, MCP, dan skill pada server; metadata allTools atau skills Alfa saat ini tidak menjadi bukti pembatasan akses yang efektif.",+ "contract_clauses": [+ "Perluas profil nama, avatar, persona, agen default, identitas serta instruksi soul, memory, model, dan assignment kemampuan.",+ "Sediakan asisten pembuat profil yang menampilkan rancangan sebelum penerapan.",+ "Terapkan batas tool, MCP, dan skill pada server; metadata allTools atau skills Alfa saat ini tidak menjadi bukti pembatasan akses yang efektif."+ ],+ "packages": [+ "PK08",+ "PK11",+ "PK13"+ ],+ "acceptance": [+ "A07",+ "A09",+ "A10"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/profiles.ts#L474-L727",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/profiles.ts",+ "line_fragment": "L474-L727",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/frontend/slices/assistant/lib/types.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "frontend/slices/assistant/lib/types.ts",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 106,+ "table_row_index": 1+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-010",+ "title": "Salinan, pemindahan, dan riwayat profil",+ "category": "Profil model dan runtime agen",+ "in_scope": true,+ "baseline_status": "Verifikasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Audit operasi profil yang tersedia, lalu lengkapi clone, perpindahan antarorganisasi, dan riwayat konfigurasi yang hanya ditambahkan. Tampilkan revisi, pelaku, alasan, serta perubahan grant. Salinan profil harus menautkan ulang tool atau koneksi sesuai izin tujuan, tanpa menyalin secret atau memindahkan koneksi kanal secara diam-diam.",+ "draft_text_verbatim": "Verifikasi. Audit operasi profil yang tersedia, lalu lengkapi clone, perpindahan antarorganisasi, dan riwayat konfigurasi yang hanya ditambahkan. Tampilkan revisi, pelaku, alasan, serta perubahan grant. Salinan profil harus menautkan ulang tool atau koneksi sesuai izin tujuan, tanpa menyalin secret atau memindahkan koneksi kanal secara diam-diam.",+ "contract_clauses": [+ "Audit operasi profil yang tersedia, lalu lengkapi clone, perpindahan antarorganisasi, dan riwayat konfigurasi yang hanya ditambahkan.",+ "Tampilkan revisi, pelaku, alasan, serta perubahan grant.",+ "Salinan profil harus menautkan ulang tool atau koneksi sesuai izin tujuan, tanpa menyalin secret atau memindahkan koneksi kanal secara diam-diam."+ ],+ "packages": [+ "PK08",+ "PK05",+ "PK06"+ ],+ "acceptance": [+ "A07",+ "A05"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/profiles.ts#L2052-L2241",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/profiles.ts",+ "line_fragment": "L2052-L2241",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 106,+ "table_row_index": 2+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-011",+ "title": "Provider, katalog model, dan multimodal",+ "category": "Profil model dan runtime agen",+ "in_scope": true,+ "baseline_status": "Fondasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Gunakan ulang resolusi provider dan streaming untuk beberapa instance provider, discovery katalog, pemilihan model, context window, tarif, serta pengaturan reasoning. Lengkapi default vision, audio, dan gambar per profil. Uji setiap adapter baseline yang benar-benar dikonfigurasi, termasuk provider kompatibel OpenAI dan lokal; tampilkan kemampuan yang tidak didukung secara eksplisit.",+ "draft_text_verbatim": "Fondasi. Gunakan ulang resolusi provider dan streaming untuk beberapa instance provider, discovery katalog, pemilihan model, context window, tarif, serta pengaturan reasoning. Lengkapi default vision, audio, dan gambar per profil. Uji setiap adapter baseline yang benar-benar dikonfigurasi, termasuk provider kompatibel OpenAI dan lokal; tampilkan kemampuan yang tidak didukung secara eksplisit.",+ "contract_clauses": [+ "Gunakan ulang resolusi provider dan streaming untuk beberapa instance provider, discovery katalog, pemilihan model, context window, tarif, serta pengaturan reasoning.",+ "Lengkapi default vision, audio, dan gambar per profil.",+ "Uji setiap adapter baseline yang benar-benar dikonfigurasi, termasuk provider kompatibel OpenAI dan lokal; tampilkan kemampuan yang tidak didukung secara eksplisit."+ ],+ "packages": [+ "PK08",+ "PK19",+ "PK23"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/models.ts#L484-L980",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/models.ts",+ "line_fragment": "L484-L980",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/ai/selected-model-stream.ts#L54-L90",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/ai/selected-model-stream.ts",+ "line_fragment": "L54-L90",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 106,+ "table_row_index": 3+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-012",+ "title": "Login langganan model melalui OAuth",+ "category": "Profil model dan runtime agen",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Gunakan ulang jalur Codex OAuth dan verifikasi padanan login langganan ChatGPT serta Grok, penyimpanan sesi, refresh, pencabutan, dan pemilihan akun. Jangan menyalin kredensial antaridentitas. Ketersediaan paket, batas penggunaan, dan izin provider menjadi dependensi yang ditampilkan; keberadaan adapter tidak menjamin semua akun dapat menggunakannya.",+ "draft_text_verbatim": "Sebagian. Gunakan ulang jalur Codex OAuth dan verifikasi padanan login langganan ChatGPT serta Grok, penyimpanan sesi, refresh, pencabutan, dan pemilihan akun. Jangan menyalin kredensial antaridentitas. Ketersediaan paket, batas penggunaan, dan izin provider menjadi dependensi yang ditampilkan; keberadaan adapter tidak menjamin semua akun dapat menggunakannya.",+ "contract_clauses": [+ "Gunakan ulang jalur Codex OAuth dan verifikasi padanan login langganan ChatGPT serta Grok, penyimpanan sesi, refresh, pencabutan, dan pemilihan akun.",+ "Jangan menyalin kredensial antaridentitas.",+ "Ketersediaan paket, batas penggunaan, dan izin provider menjadi dependensi yang ditampilkan; keberadaan adapter tidak menjamin semua akun dapat menggunakannya."+ ],+ "packages": [+ "PK08",+ "PK11"+ ],+ "acceptance": [+ "A09",+ "A13",+ "A06"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/providers/create.ts#L330-L404",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/providers/create.ts",+ "line_fragment": "L330-L404",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/ai/selected-model-stream.ts#L54-L70",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/ai/selected-model-stream.ts",+ "line_fragment": "L54-L70",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 106,+ "table_row_index": 4+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-013",+ "title": "Runtime percakapan ACP",+ "category": "Profil model dan runtime agen",+ "in_scope": true,+ "baseline_status": "Verifikasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Verifikasi dukungan ACP sebelum menambahkan pilihan runtime Claude atau Codex, model, dan reasoning serta jembatan tool yang terikat sesi MSO. Perlakukan proses ACP sebagai runtime dengan loop tersendiri, bukan sekadar provider LLM. Uji autentikasi, propagasi izin, status proses, pembatalan, dan pemisahan workspace pada adapter yang dipilih.",+ "draft_text_verbatim": "Verifikasi. Verifikasi dukungan ACP sebelum menambahkan pilihan runtime Claude atau Codex, model, dan reasoning serta jembatan tool yang terikat sesi MSO. Perlakukan proses ACP sebagai runtime dengan loop tersendiri, bukan sekadar provider LLM. Uji autentikasi, propagasi izin, status proses, pembatalan, dan pemisahan workspace pada adapter yang dipilih.",+ "contract_clauses": [+ "Verifikasi dukungan ACP sebelum menambahkan pilihan runtime Claude atau Codex, model, dan reasoning serta jembatan tool yang terikat sesi MSO.",+ "Perlakukan proses ACP sebagai runtime dengan loop tersendiri, bukan sekadar provider LLM.",+ "Uji autentikasi, propagasi izin, status proses, pembatalan, dan pemisahan workspace pada adapter yang dipilih."+ ],+ "packages": [+ "PK10",+ "PK07",+ "PK11"+ ],+ "acceptance": [+ "A09",+ "A11",+ "A12",+ "A13"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/providers/acp/acp-agent-presets.ts#L7-L22",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/providers/acp/acp-agent-presets.ts",+ "line_fragment": "L7-L22",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 106,+ "table_row_index": 5+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-014",+ "title": "Harness agen coding",+ "category": "Profil model dan runtime agen",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Perluas eksekusi CLI dan worktree untuk harness Codex, Claude Code, OpenCode, pi, serta Cursor. Sediakan konfigurasi provider passthrough atau login milik harness dengan identitas yang jelas. Verifikasi instalasi, input, keluaran, crash, pembatalan, dan cleanup per adapter; isolasi source Git serta sandbox proses dibuktikan sebagai kontrol yang berbeda.",+ "draft_text_verbatim": "Sebagian. Perluas eksekusi CLI dan worktree untuk harness Codex, Claude Code, OpenCode, pi, serta Cursor. Sediakan konfigurasi provider passthrough atau login milik harness dengan identitas yang jelas. Verifikasi instalasi, input, keluaran, crash, pembatalan, dan cleanup per adapter; isolasi source Git serta sandbox proses dibuktikan sebagai kontrol yang berbeda.",+ "contract_clauses": [+ "Perluas eksekusi CLI dan worktree untuk harness Codex, Claude Code, OpenCode, pi, serta Cursor.",+ "Sediakan konfigurasi provider passthrough atau login milik harness dengan identitas yang jelas.",+ "Verifikasi instalasi, input, keluaran, crash, pembatalan, dan cleanup per adapter; isolasi source Git serta sandbox proses dibuktikan sebagai kontrol yang berbeda."+ ],+ "packages": [+ "PK10",+ "PK07"+ ],+ "acceptance": [+ "A12",+ "A11",+ "A30"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/coding-agent-command.ts#L93-L242",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/coding-agent-command.ts",+ "line_fragment": "L93-L242",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/host/project-worktree.ts#L56-L97",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/host/project-worktree.ts",+ "line_fragment": "L56-L97",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 106,+ "table_row_index": 6+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-015",+ "title": "Subagent terfokus secara paralel",+ "category": "Profil model dan runtime agen",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Kembangkan worker foreground terbatas menjadi delegasi paralel berprofil sama dengan tugas, konteks eksplisit, progress, status, ringkasan, hasil, serta timeout. Pertahankan larangan rekursi dan batas otoritas induk. Tentukan anggaran concurrency serta durasi melalui kebijakan MSO; uji kegagalan satu child, pembatalan grup, dan provenance setiap hasil.",+ "draft_text_verbatim": "Sebagian. Kembangkan worker foreground terbatas menjadi delegasi paralel berprofil sama dengan tugas, konteks eksplisit, progress, status, ringkasan, hasil, serta timeout. Pertahankan larangan rekursi dan batas otoritas induk. Tentukan anggaran concurrency serta durasi melalui kebijakan MSO; uji kegagalan satu child, pembatalan grup, dan provenance setiap hasil.",+ "contract_clauses": [+ "Kembangkan worker foreground terbatas menjadi delegasi paralel berprofil sama dengan tugas, konteks eksplisit, progress, status, ringkasan, hasil, serta timeout.",+ "Pertahankan larangan rekursi dan batas otoritas induk.",+ "Tentukan anggaran concurrency serta durasi melalui kebijakan MSO; uji kegagalan satu child, pembatalan grup, dan provenance setiap hasil."+ ],+ "packages": [+ "PK10",+ "PK15"+ ],+ "acceptance": [+ "A21",+ "A06"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/tools/sub-agent-tool.ts#L21-L98",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/tools/sub-agent-tool.ts",+ "line_fragment": "L21-L98",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/agent/subagent-runner.ts#L10-L133",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/agent/subagent-runner.ts",+ "line_fragment": "L10-L133",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 106,+ "table_row_index": 7+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-016",+ "title": "Percakapan streaming dan antrean input",+ "category": "Percakapan dan konteks",+ "in_scope": true,+ "baseline_status": "Fondasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Gunakan ulang streaming web dan CLI untuk menampilkan respons, reasoning yang memang disediakan provider, aktivitas tool, status, pembatalan, sambung ulang, dan antrean input. Lengkapi pemilih profil serta model, tema, command palette, empty state, dan error state; uji konsistensi status pada desktop dan mobile tanpa menampilkan penalaran tersembunyi.",+ "draft_text_verbatim": "Fondasi. Gunakan ulang streaming web dan CLI untuk menampilkan respons, reasoning yang memang disediakan provider, aktivitas tool, status, pembatalan, sambung ulang, dan antrean input. Lengkapi pemilih profil serta model, tema, command palette, empty state, dan error state; uji konsistensi status pada desktop dan mobile tanpa menampilkan penalaran tersembunyi.",+ "contract_clauses": [+ "Gunakan ulang streaming web dan CLI untuk menampilkan respons, reasoning yang memang disediakan provider, aktivitas tool, status, pembatalan, sambung ulang, dan antrean input.",+ "Lengkapi pemilih profil serta model, tema, command palette, empty state, dan error state; uji konsistensi status pada desktop dan mobile tanpa menampilkan penalaran tersembunyi."+ ],+ "packages": [+ "PK09",+ "PK08",+ "PK23"+ ],+ "acceptance": [+ "A08",+ "A29"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/web/src/components/chat/ChatMessageQueuePanel.tsx",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/web/src/components/chat/ChatMessageQueuePanel.tsx",+ "line_fragment": null,+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/app/api/assistant/route.ts#L126-L178",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "app/api/assistant/route.ts",+ "line_fragment": "L126-L178",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 108,+ "table_row_index": 1+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-017",+ "title": "Riwayat, pemadatan, dan cabang percakapan",+ "category": "Percakapan dan konteks",+ "in_scope": true,+ "baseline_status": "Fondasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Perluas sesi tersimpan dengan rename, pencarian, pin, penghapusan sesuai kebijakan, pemadatan manual, dan cabang dari indeks pesan terpilih. Pertahankan akses yang diizinkan ke riwayat sebelum pemadatan serta relasi asal cabang. Uji penyimpanan ulang, resume setelah restart, dan larangan membaca cabang atau hasil pencarian milik pengguna lain.",+ "draft_text_verbatim": "Fondasi. Perluas sesi tersimpan dengan rename, pencarian, pin, penghapusan sesuai kebijakan, pemadatan manual, dan cabang dari indeks pesan terpilih. Pertahankan akses yang diizinkan ke riwayat sebelum pemadatan serta relasi asal cabang. Uji penyimpanan ulang, resume setelah restart, dan larangan membaca cabang atau hasil pencarian milik pengguna lain.",+ "contract_clauses": [+ "Perluas sesi tersimpan dengan rename, pencarian, pin, penghapusan sesuai kebijakan, pemadatan manual, dan cabang dari indeks pesan terpilih.",+ "Pertahankan akses yang diizinkan ke riwayat sebelum pemadatan serta relasi asal cabang.",+ "Uji penyimpanan ulang, resume setelah restart, dan larangan membaca cabang atau hasil pencarian milik pengguna lain."+ ],+ "packages": [+ "PK09",+ "PK06"+ ],+ "acceptance": [+ "A08",+ "A05"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/sessions.ts#L395-L623",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/sessions.ts",+ "line_fragment": "L395-L623",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/agent/session-create.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/agent/session-create.ts",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 108,+ "table_row_index": 2+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-018",+ "title": "Percakapan sementara tanpa penyimpanan normal",+ "category": "Percakapan dan konteks",+ "in_scope": true,+ "baseline_status": "Verifikasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Audit seluruh jalur persistensi sebelum menyediakan mode sementara setara Cognito di Nakama, yaitu percakapan ephemeral dan bukan AWS Cognito. Mode ini melewati penyimpanan riwayat normal serta penulisan memory dan skill. Jelaskan kebijakan artifact, log, provider, dan retention secara terpisah; uji agar pekerjaan latar tidak menyimpan percakapan kembali.",+ "draft_text_verbatim": "Verifikasi. Audit seluruh jalur persistensi sebelum menyediakan mode sementara setara Cognito di Nakama, yaitu percakapan ephemeral dan bukan AWS Cognito. Mode ini melewati penyimpanan riwayat normal serta penulisan memory dan skill. Jelaskan kebijakan artifact, log, provider, dan retention secara terpisah; uji agar pekerjaan latar tidak menyimpan percakapan kembali.",+ "contract_clauses": [+ "Audit seluruh jalur persistensi sebelum menyediakan mode sementara setara Cognito di Nakama, yaitu percakapan ephemeral dan bukan AWS Cognito.",+ "Mode ini melewati penyimpanan riwayat normal serta penulisan memory dan skill.",+ "Jelaskan kebijakan artifact, log, provider, dan retention secara terpisah; uji agar pekerjaan latar tidak menyimpan percakapan kembali."+ ],+ "packages": [+ "PK09",+ "PK06"+ ],+ "acceptance": [+ "A08",+ "A05",+ "A16"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/agent-service.ts#L5613-L5693",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/agent-service.ts",+ "line_fragment": "L5613-L5693",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 108,+ "table_row_index": 3+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-019",+ "title": "Lampiran gambar, dokumen, dan audio",+ "category": "Percakapan dan konteks",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Hubungkan artifact privat ke lampiran gambar dan dokumen dalam percakapan, gambar clipboard pada CLI, transkripsi audio, serta fallback vision ketika model utama tidak mendukung gambar. Nyatakan format dan batas per kanal. Validasi jenis file, ukuran, identitas pemilik, pemilihan provider, dan kegagalan parsial tanpa kehilangan berkas sumber.",+ "draft_text_verbatim": "Sebagian. Hubungkan artifact privat ke lampiran gambar dan dokumen dalam percakapan, gambar clipboard pada CLI, transkripsi audio, serta fallback vision ketika model utama tidak mendukung gambar. Nyatakan format dan batas per kanal. Validasi jenis file, ukuran, identitas pemilik, pemilihan provider, dan kegagalan parsial tanpa kehilangan berkas sumber.",+ "contract_clauses": [+ "Hubungkan artifact privat ke lampiran gambar dan dokumen dalam percakapan, gambar clipboard pada CLI, transkripsi audio, serta fallback vision ketika model utama tidak mendukung gambar.",+ "Nyatakan format dan batas per kanal.",+ "Validasi jenis file, ukuran, identitas pemilik, pemilihan provider, dan kegagalan parsial tanpa kehilangan berkas sumber."+ ],+ "packages": [+ "PK09",+ "PK19",+ "PK18"+ ],+ "acceptance": [+ "A24",+ "A05",+ "A29"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/providers.mdx#L85-L94",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/providers.mdx",+ "line_fragment": "L85-L94",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/SESSION-ARTIFACTS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/SESSION-ARTIFACTS.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 108,+ "table_row_index": 4+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-020",+ "title": "Pertanyaan terstruktur dan daftar tugas",+ "category": "Percakapan dan konteks",+ "in_scope": true,+ "baseline_status": "Verifikasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Audit komponen pertanyaan dan progress yang tersedia, lalu sediakan kuesioner terstruktur dengan pilihan atau jawaban bebas serta panel task dan todo. Kaitkan jawaban dan perubahan status ke sesi serta run. Uji persistence, sambung ulang, pembatalan pertanyaan, dan kelanjutan agen tanpa menganggap jawaban sebagai tambahan izin eksekusi.",+ "draft_text_verbatim": "Verifikasi. Audit komponen pertanyaan dan progress yang tersedia, lalu sediakan kuesioner terstruktur dengan pilihan atau jawaban bebas serta panel task dan todo. Kaitkan jawaban dan perubahan status ke sesi serta run. Uji persistence, sambung ulang, pembatalan pertanyaan, dan kelanjutan agen tanpa menganggap jawaban sebagai tambahan izin eksekusi.",+ "contract_clauses": [+ "Audit komponen pertanyaan dan progress yang tersedia, lalu sediakan kuesioner terstruktur dengan pilihan atau jawaban bebas serta panel task dan todo.",+ "Kaitkan jawaban dan perubahan status ke sesi serta run.",+ "Uji persistence, sambung ulang, pembatalan pertanyaan, dan kelanjutan agen tanpa menganggap jawaban sebagai tambahan izin eksekusi."+ ],+ "packages": [+ "PK09",+ "PK15"+ ],+ "acceptance": [+ "A23",+ "A08"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/tools/ask-user-question-tool.ts#L21-L80",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/tools/ask-user-question-tool.ts",+ "line_fragment": "L21-L80",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 108,+ "table_row_index": 5+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-021",+ "title": "Penggunaan konteks dan optimasi keluaran tool",+ "category": "Percakapan dan konteks",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Lengkapi anggaran hasil tool dengan panel penggunaan konteks dan token serta optimasi keluaran yang dapat dipulihkan melalui handle. Simpan sumber utuh dalam scope yang sesuai dan uji pengambilan ulang. Laporkan byte yang dipangkas, token provider, dan estimasi secara terpisah; tetapkan kebijakan pengaturan tanpa menganggap penghematan byte sebagai biaya pasti.",+ "draft_text_verbatim": "Sebagian. Lengkapi anggaran hasil tool dengan panel penggunaan konteks dan token serta optimasi keluaran yang dapat dipulihkan melalui handle. Simpan sumber utuh dalam scope yang sesuai dan uji pengambilan ulang. Laporkan byte yang dipangkas, token provider, dan estimasi secara terpisah; tetapkan kebijakan pengaturan tanpa menganggap penghematan byte sebagai biaya pasti.",+ "contract_clauses": [+ "Lengkapi anggaran hasil tool dengan panel penggunaan konteks dan token serta optimasi keluaran yang dapat dipulihkan melalui handle.",+ "Simpan sumber utuh dalam scope yang sesuai dan uji pengambilan ulang.",+ "Laporkan byte yang dipangkas, token provider, dan estimasi secara terpisah; tetapkan kebijakan pengaturan tanpa menganggap penghematan byte sebagai biaya pasti."+ ],+ "packages": [+ "PK23",+ "PK09"+ ],+ "acceptance": [+ "A28",+ "A08"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/token-optimization.ts#L43-L205",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/token-optimization.ts",+ "line_fragment": "L43-L205",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/workflow/graph-runtime.ts#L24-L34",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/workflow/graph-runtime.ts",+ "line_fragment": "L24-L34",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 108,+ "table_row_index": 6+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-022",+ "title": "Memory agen dan arsip",+ "category": "Memory dan knowledge",+ "in_scope": true,+ "baseline_status": "Fondasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Gunakan ledger bertipe, provenance, resolusi temporal, serta arsip MSO untuk memory persisten per agen dan penyusunan konteks soul. Lengkapi tampilan arsip bulanan atau padanan penelusuran periode yang disepakati. Ikat akses kepada principal dan profil; uji koreksi, retention, resume snapshot, dan backup tanpa mengklaim mutu retrieval sebelum evaluasi.",+ "draft_text_verbatim": "Fondasi. Gunakan ledger bertipe, provenance, resolusi temporal, serta arsip MSO untuk memory persisten per agen dan penyusunan konteks soul. Lengkapi tampilan arsip bulanan atau padanan penelusuran periode yang disepakati. Ikat akses kepada principal dan profil; uji koreksi, retention, resume snapshot, dan backup tanpa mengklaim mutu retrieval sebelum evaluasi.",+ "contract_clauses": [+ "Gunakan ledger bertipe, provenance, resolusi temporal, serta arsip MSO untuk memory persisten per agen dan penyusunan konteks soul.",+ "Lengkapi tampilan arsip bulanan atau padanan penelusuran periode yang disepakati.",+ "Ikat akses kepada principal dan profil; uji koreksi, retention, resume snapshot, dan backup tanpa mengklaim mutu retrieval sebelum evaluasi."+ ],+ "packages": [+ "PK13",+ "PK06",+ "PK08"+ ],+ "acceptance": [+ "A16",+ "A05",+ "A27"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/packages/core/src/soul/compose.ts",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "packages/core/src/soul/compose.ts",+ "line_fragment": null,+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/agent/memory-store.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/agent/memory-store.ts",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 110,+ "table_row_index": 1+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-023",+ "title": "Memory organisasi dan persetujuan perubahan",+ "category": "Memory dan knowledge",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Perluas memory bertipe menjadi memory bersama organisasi dengan fakta pinned dan terbaru, pencarian, proposal perubahan, persetujuan, snapshot riwayat, undo, serta restore. Bedakan memory pribadi, agen, dan tim. Uji konflik revisi, pencabutan publikasi, serta pemulihan yang tidak menghidupkan kembali grant atau fakta yang sudah dicabut.",+ "draft_text_verbatim": "Sebagian. Perluas memory bertipe menjadi memory bersama organisasi dengan fakta pinned dan terbaru, pencarian, proposal perubahan, persetujuan, snapshot riwayat, undo, serta restore. Bedakan memory pribadi, agen, dan tim. Uji konflik revisi, pencabutan publikasi, serta pemulihan yang tidak menghidupkan kembali grant atau fakta yang sudah dicabut.",+ "contract_clauses": [+ "Perluas memory bertipe menjadi memory bersama organisasi dengan fakta pinned dan terbaru, pencarian, proposal perubahan, persetujuan, snapshot riwayat, undo, serta restore.",+ "Bedakan memory pribadi, agen, dan tim.",+ "Uji konflik revisi, pencabutan publikasi, serta pemulihan yang tidak menghidupkan kembali grant atau fakta yang sudah dicabut."+ ],+ "packages": [+ "PK13",+ "PK05",+ "PK06"+ ],+ "acceptance": [+ "A16",+ "A05",+ "A06"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/org-memory-service.ts#L147-L279",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/org-memory-service.ts",+ "line_fragment": "L147-L279",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/agent/memory-resolution.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/agent/memory-resolution.ts",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 110,+ "table_row_index": 2+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-024",+ "title": "Dokumen knowledge dan impor ZIP",+ "category": "Memory dan knowledge",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Lengkapi file dan sumber proyek dengan upload, penggantian, penghapusan, ekstraksi, pencarian, serta impor ZIP knowledge. Cakup TXT, Markdown, CSV, PDF, dan DOCX sesuai kontrak format; tautkan dokumen organisasi ke profil melalui grant. Uji batas ekstraksi, provenance, pengindeksan ulang, dan pencabutan akses pada dokumen maupun hasil turunannya.",+ "draft_text_verbatim": "Sebagian. Lengkapi file dan sumber proyek dengan upload, penggantian, penghapusan, ekstraksi, pencarian, serta impor ZIP knowledge. Cakup TXT, Markdown, CSV, PDF, dan DOCX sesuai kontrak format; tautkan dokumen organisasi ke profil melalui grant. Uji batas ekstraksi, provenance, pengindeksan ulang, dan pencabutan akses pada dokumen maupun hasil turunannya.",+ "contract_clauses": [+ "Lengkapi file dan sumber proyek dengan upload, penggantian, penghapusan, ekstraksi, pencarian, serta impor ZIP knowledge.",+ "Cakup TXT, Markdown, CSV, PDF, dan DOCX sesuai kontrak format; tautkan dokumen organisasi ke profil melalui grant.",+ "Uji batas ekstraksi, provenance, pengindeksan ulang, dan pencabutan akses pada dokumen maupun hasil turunannya."+ ],+ "packages": [+ "PK12",+ "PK05",+ "PK18"+ ],+ "acceptance": [+ "A16",+ "A24",+ "A05"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/profiles.ts#L894-L1271",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/profiles.ts",+ "line_fragment": "L894-L1271",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/ARCHITECTURE.md#L189-L205",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/ARCHITECTURE.md",+ "line_fragment": "L189-L205",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 110,+ "table_row_index": 3+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-025",+ "title": "Wiki turunan dari knowledge",+ "category": "Memory dan knowledge",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Gunakan pengalaman vault dan snapshot sebagai fondasi wiki turunan berisi identifier sumber, tautan, dan riwayat rebuild atau update. Pemrosesan bersifat opt-in melalui permintaan pengguna atau automation, bukan otomatis pada setiap upload. Tetapkan sumber yang boleh dikompilasi; perluasan ke dokumen bersama membutuhkan grant tersendiri dan penelusuran provenance.",+ "draft_text_verbatim": "Sebagian. Gunakan pengalaman vault dan snapshot sebagai fondasi wiki turunan berisi identifier sumber, tautan, dan riwayat rebuild atau update. Pemrosesan bersifat opt-in melalui permintaan pengguna atau automation, bukan otomatis pada setiap upload. Tetapkan sumber yang boleh dikompilasi; perluasan ke dokumen bersama membutuhkan grant tersendiri dan penelusuran provenance.",+ "contract_clauses": [+ "Gunakan pengalaman vault dan snapshot sebagai fondasi wiki turunan berisi identifier sumber, tautan, dan riwayat rebuild atau update.",+ "Pemrosesan bersifat opt-in melalui permintaan pengguna atau automation, bukan otomatis pada setiap upload.",+ "Tetapkan sumber yang boleh dikompilasi; perluasan ke dokumen bersama membutuhkan grant tersendiri dan penelusuran provenance."+ ],+ "packages": [+ "PK12",+ "PK14"+ ],+ "acceptance": [+ "A16",+ "A15"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/profiles.mdx#L198-L202",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/profiles.mdx",+ "line_fragment": "L198-L202",+ "label": "Dokumentasi dan source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/AGENT-VAULT.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/AGENT-VAULT.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 110,+ "table_row_index": 4+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-026",+ "title": "Backend memory eksternal opsional",+ "category": "Memory dan knowledge",+ "in_scope": true,+ "baseline_status": "Verifikasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Verifikasi integrasi backend memory sebelum menyediakan adapter opsional setara Supermemory untuk memory profil, organisasi, dan pencarian knowledge semantik. Pertahankan mode lokal, mapping dataset, grant, serta penghapusan atau pencabutan yang jelas. Backup dataset eksternal menjadi prosedur terpisah; jangan menganggap plugin otomatis menangkap seluruh percakapan atau menjamin retrieval lebih baik.",+ "draft_text_verbatim": "Verifikasi. Verifikasi integrasi backend memory sebelum menyediakan adapter opsional setara Supermemory untuk memory profil, organisasi, dan pencarian knowledge semantik. Pertahankan mode lokal, mapping dataset, grant, serta penghapusan atau pencabutan yang jelas. Backup dataset eksternal menjadi prosedur terpisah; jangan menganggap plugin otomatis menangkap seluruh percakapan atau menjamin retrieval lebih baik.",+ "contract_clauses": [+ "Verifikasi integrasi backend memory sebelum menyediakan adapter opsional setara Supermemory untuk memory profil, organisasi, dan pencarian knowledge semantik.",+ "Pertahankan mode lokal, mapping dataset, grant, serta penghapusan atau pencabutan yang jelas.",+ "Backup dataset eksternal menjadi prosedur terpisah; jangan menganggap plugin otomatis menangkap seluruh percakapan atau menjamin retrieval lebih baik."+ ],+ "packages": [+ "PK13",+ "PK11",+ "PK22"+ ],+ "acceptance": [+ "A16",+ "A13",+ "A27"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/plugins.mdx#L83-L104",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/plugins.mdx",+ "line_fragment": "L83-L104",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 110,+ "table_row_index": 5+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-027",+ "title": "Tool file, artifact, Word, dan SQLite profil",+ "category": "Tool eksekusi dan integrasi",+ "in_scope": true,+ "baseline_status": "Fondasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Gunakan ulang baca, tulis, edit, hapus, dan pencarian file serta penyimpanan artifact. Verifikasi lalu lengkapi pembuatan dokumen Word dan tool SQLite khusus profil. Setiap operasi memakai workspace, schema input, serta kepemilikan yang diperiksa; uji validitas DOCX, batas query database, persetujuan mutasi, dan larangan mengakses file atau database profil lain.",+ "draft_text_verbatim": "Fondasi. Gunakan ulang baca, tulis, edit, hapus, dan pencarian file serta penyimpanan artifact. Verifikasi lalu lengkapi pembuatan dokumen Word dan tool SQLite khusus profil. Setiap operasi memakai workspace, schema input, serta kepemilikan yang diperiksa; uji validitas DOCX, batas query database, persetujuan mutasi, dan larangan mengakses file atau database profil lain.",+ "contract_clauses": [+ "Gunakan ulang baca, tulis, edit, hapus, dan pencarian file serta penyimpanan artifact.",+ "Verifikasi lalu lengkapi pembuatan dokumen Word dan tool SQLite khusus profil.",+ "Setiap operasi memakai workspace, schema input, serta kepemilikan yang diperiksa; uji validitas DOCX, batas query database, persetujuan mutasi, dan larangan mengakses file atau database profil lain."+ ],+ "packages": [+ "PK11",+ "PK07",+ "PK18"+ ],+ "acceptance": [+ "A10",+ "A11",+ "A24",+ "A05"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/builtin-tools.mdx",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/builtin-tools.mdx",+ "line_fragment": null,+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/ARCHITECTURE.md#L189-L209",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/ARCHITECTURE.md",+ "line_fragment": "L189-L209",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 112,+ "table_row_index": 1+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-028",+ "title": "Pengambilan halaman dan pencarian web",+ "category": "Tool eksekusi dan integrasi",+ "in_scope": true,+ "baseline_status": "Verifikasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Audit fetch dan pencarian web yang sudah terhubung, lalu sediakan pilihan backend bawaan provider maupun koneksi khusus seperti Exa, Firecrawl, atau endpoint JSON sesuai schema. Tampilkan sumber hasil dan akun yang dipakai. Uji URL, redirect, batas keluaran, kebijakan jaringan, timeout, serta perilaku ketika provider tidak menyediakan pencarian bawaan.",+ "draft_text_verbatim": "Verifikasi. Audit fetch dan pencarian web yang sudah terhubung, lalu sediakan pilihan backend bawaan provider maupun koneksi khusus seperti Exa, Firecrawl, atau endpoint JSON sesuai schema. Tampilkan sumber hasil dan akun yang dipakai. Uji URL, redirect, batas keluaran, kebijakan jaringan, timeout, serta perilaku ketika provider tidak menyediakan pencarian bawaan.",+ "contract_clauses": [+ "Audit fetch dan pencarian web yang sudah terhubung, lalu sediakan pilihan backend bawaan provider maupun koneksi khusus seperti Exa, Firecrawl, atau endpoint JSON sesuai schema.",+ "Tampilkan sumber hasil dan akun yang dipakai.",+ "Uji URL, redirect, batas keluaran, kebijakan jaringan, timeout, serta perilaku ketika provider tidak menyediakan pencarian bawaan."+ ],+ "packages": [+ "PK11",+ "PK19"+ ],+ "acceptance": [+ "A10",+ "A13",+ "A11"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/providers.mdx#L85-L94",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/providers.mdx",+ "line_fragment": "L85-L94",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 112,+ "table_row_index": 2+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-029",+ "title": "Kotak surat IMAP dan SMTP",+ "category": "Tool eksekusi dan integrasi",+ "in_scope": true,+ "baseline_status": "Verifikasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Verifikasi adapter email, lalu lengkapi pembacaan mailbox melalui IMAP, pengiriman melalui SMTP, pengaturan dan pengujian koneksi, serta ekstraksi dokumen lampiran. Ini alur kotak surat, terpisah dari notifikasi webhook. Ikat akun dan penerima secara eksplisit, jaga secret, dan buktikan hasil baca serta delivery menggunakan koneksi yang memang diizinkan.",+ "draft_text_verbatim": "Verifikasi. Verifikasi adapter email, lalu lengkapi pembacaan mailbox melalui IMAP, pengiriman melalui SMTP, pengaturan dan pengujian koneksi, serta ekstraksi dokumen lampiran. Ini alur kotak surat, terpisah dari notifikasi webhook. Ikat akun dan penerima secara eksplisit, jaga secret, dan buktikan hasil baca serta delivery menggunakan koneksi yang memang diizinkan.",+ "contract_clauses": [+ "Verifikasi adapter email, lalu lengkapi pembacaan mailbox melalui IMAP, pengiriman melalui SMTP, pengaturan dan pengujian koneksi, serta ekstraksi dokumen lampiran.",+ "Ini alur kotak surat, terpisah dari notifikasi webhook.",+ "Ikat akun dan penerima secara eksplisit, jaga secret, dan buktikan hasil baca serta delivery menggunakan koneksi yang memang diizinkan."+ ],+ "packages": [+ "PK11",+ "PK17",+ "PK18"+ ],+ "acceptance": [+ "A13",+ "A22",+ "A24"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/builtin-tools.mdx#L47-L66",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/builtin-tools.mdx",+ "line_fragment": "L47-L66",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 112,+ "table_row_index": 3+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-030",+ "title": "Shell host dan sandbox profil",+ "category": "Tool eksekusi dan integrasi",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Perluas shell host serta fixture sandbox menjadi backend eksekusi terpilih, sandbox hangat per profil, kebijakan jaringan mati atau publik, dan batas CPU, memori, proses, disk, serta waktu. Microsandbox dapat menjadi adapter bila terverifikasi. Hak host tetap khusus principal berwenang; kompatibilitas coding harness diuji terpisah dan tidak diasumsikan dari sandbox shell.",+ "draft_text_verbatim": "Sebagian. Perluas shell host serta fixture sandbox menjadi backend eksekusi terpilih, sandbox hangat per profil, kebijakan jaringan mati atau publik, dan batas CPU, memori, proses, disk, serta waktu. Microsandbox dapat menjadi adapter bila terverifikasi. Hak host tetap khusus principal berwenang; kompatibilitas coding harness diuji terpisah dan tidak diasumsikan dari sandbox shell.",+ "contract_clauses": [+ "Perluas shell host serta fixture sandbox menjadi backend eksekusi terpilih, sandbox hangat per profil, kebijakan jaringan mati atau publik, dan batas CPU, memori, proses, disk, serta waktu.",+ "Microsandbox dapat menjadi adapter bila terverifikasi.",+ "Hak host tetap khusus principal berwenang; kompatibilitas coding harness diuji terpisah dan tidak diasumsikan dari sandbox shell."+ ],+ "packages": [+ "PK07",+ "PK10"+ ],+ "acceptance": [+ "A11",+ "A12",+ "A06"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/tools/bash.ts#L212-L242",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/tools/bash.ts",+ "line_fragment": "L212-L242",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/mcp/tools-forge.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/mcp/tools-forge.ts",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 112,+ "table_row_index": 4+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-031",+ "title": "Otomasi browser melalui CLI",+ "category": "Tool eksekusi dan integrasi",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Gunakan ulang permukaan browser Camoufox dan artifact, lalu verifikasi padanan agent-browser CLI, Chrome, skill, dan eksekusi shell yang dipakai baseline. Sediakan status kesiapan, instalasi terkontrol, serta profil browser terisolasi. Uji navigasi, interaksi, screenshot, cookie, dan pembatalan; adapter tambahan opsional tidak dianggap otomatis terpasang atau setara.",+ "draft_text_verbatim": "Sebagian. Gunakan ulang permukaan browser Camoufox dan artifact, lalu verifikasi padanan agent-browser CLI, Chrome, skill, dan eksekusi shell yang dipakai baseline. Sediakan status kesiapan, instalasi terkontrol, serta profil browser terisolasi. Uji navigasi, interaksi, screenshot, cookie, dan pembatalan; adapter tambahan opsional tidak dianggap otomatis terpasang atau setara.",+ "contract_clauses": [+ "Gunakan ulang permukaan browser Camoufox dan artifact, lalu verifikasi padanan agent-browser CLI, Chrome, skill, dan eksekusi shell yang dipakai baseline.",+ "Sediakan status kesiapan, instalasi terkontrol, serta profil browser terisolasi.",+ "Uji navigasi, interaksi, screenshot, cookie, dan pembatalan; adapter tambahan opsional tidak dianggap otomatis terpasang atau setara."+ ],+ "packages": [+ "PK07",+ "PK19"+ ],+ "acceptance": [+ "A11",+ "A24",+ "A30"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/agent-browser.mdx#L6-L64",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/agent-browser.mdx",+ "line_fragment": "L6-L64",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/ARCHITECTURE.md#L37-L52",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/ARCHITECTURE.md",+ "line_fragment": "L37-L52",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 112,+ "table_row_index": 5+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-032",+ "title": "Custom tool JavaScript dan Python",+ "category": "Tool eksekusi dan integrasi",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Kembangkan pola kandidat inert dan evaluasi Tool Forge menjadi registrasi custom tool JavaScript serta Python, tampilan source, konfigurasi dan kredensial, persetujuan, playground, serta saran parameter AI. Ikat approval pada versi dan digest source. Hak CRUD organisasi tidak otomatis memberi hak eksekusi kode; jalankan tool melalui worker dengan schema serta batas yang diuji.",+ "draft_text_verbatim": "Sebagian. Kembangkan pola kandidat inert dan evaluasi Tool Forge menjadi registrasi custom tool JavaScript serta Python, tampilan source, konfigurasi dan kredensial, persetujuan, playground, serta saran parameter AI. Ikat approval pada versi dan digest source. Hak CRUD organisasi tidak otomatis memberi hak eksekusi kode; jalankan tool melalui worker dengan schema serta batas yang diuji.",+ "contract_clauses": [+ "Kembangkan pola kandidat inert dan evaluasi Tool Forge menjadi registrasi custom tool JavaScript serta Python, tampilan source, konfigurasi dan kredensial, persetujuan, playground, serta saran parameter AI.",+ "Ikat approval pada versi dan digest source.",+ "Hak CRUD organisasi tidak otomatis memberi hak eksekusi kode; jalankan tool melalui worker dengan schema serta batas yang diuji."+ ],+ "packages": [+ "PK11",+ "PK07",+ "PK21"+ ],+ "acceptance": [+ "A14",+ "A10",+ "A11"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/tools.ts#L198-L424",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/tools.ts",+ "line_fragment": "L198-L424",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/mcp/tools-forge.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/mcp/tools-forge.ts",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 112,+ "table_row_index": 6+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-033",+ "title": "Koneksi MCP dan assignment profil",+ "category": "Tool eksekusi dan integrasi",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Gunakan ulang transport MCP stdio dan HTTP, discovery, serta koneksi privat untuk pengujian, sinkronisasi, impor, OAuth, dan assignment per profil. Lengkapi discovery tool opsional dengan grant server yang nyata. Uji rotasi token, endpoint, pagination, schema, pencabutan, dan isolasi proses stdio; pertahankan server MCP pengelolaan MSO sebagai kemampuan tersendiri.",+ "draft_text_verbatim": "Sebagian. Gunakan ulang transport MCP stdio dan HTTP, discovery, serta koneksi privat untuk pengujian, sinkronisasi, impor, OAuth, dan assignment per profil. Lengkapi discovery tool opsional dengan grant server yang nyata. Uji rotasi token, endpoint, pagination, schema, pencabutan, dan isolasi proses stdio; pertahankan server MCP pengelolaan MSO sebagai kemampuan tersendiri.",+ "contract_clauses": [+ "Gunakan ulang transport MCP stdio dan HTTP, discovery, serta koneksi privat untuk pengujian, sinkronisasi, impor, OAuth, dan assignment per profil.",+ "Lengkapi discovery tool opsional dengan grant server yang nyata.",+ "Uji rotasi token, endpoint, pagination, schema, pencabutan, dan isolasi proses stdio; pertahankan server MCP pengelolaan MSO sebagai kemampuan tersendiri."+ ],+ "packages": [+ "PK11",+ "PK07",+ "PK08"+ ],+ "acceptance": [+ "A13",+ "A10",+ "A06"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/mcp.mdx#L14-L110",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/mcp.mdx",+ "line_fragment": "L14-L110",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/PROJECT-MCP-CONNECTIONS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/PROJECT-MCP-CONNECTIONS.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 112,+ "table_row_index": 7+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-034",+ "title": "Toolkit Composio per pengguna",+ "category": "Tool eksekusi dan integrasi",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Perluas dispatch Composio menjadi katalog toolkit, pengaktifan, assignment profil, serta OAuth akun masing-masing pengguna. Kaitkan credential user dengan principal terverifikasi dan grant koneksi. Uji discovery serta panggilan aktual, kedaluwarsa, revoke, dan pergantian profil tanpa fallback akun lain; jumlah aplikasi dan biaya layanan tetap menjadi dependensi eksternal.",+ "draft_text_verbatim": "Sebagian. Perluas dispatch Composio menjadi katalog toolkit, pengaktifan, assignment profil, serta OAuth akun masing-masing pengguna. Kaitkan credential user dengan principal terverifikasi dan grant koneksi. Uji discovery serta panggilan aktual, kedaluwarsa, revoke, dan pergantian profil tanpa fallback akun lain; jumlah aplikasi dan biaya layanan tetap menjadi dependensi eksternal.",+ "contract_clauses": [+ "Perluas dispatch Composio menjadi katalog toolkit, pengaktifan, assignment profil, serta OAuth akun masing-masing pengguna.",+ "Kaitkan credential user dengan principal terverifikasi dan grant koneksi.",+ "Uji discovery serta panggilan aktual, kedaluwarsa, revoke, dan pergantian profil tanpa fallback akun lain; jumlah aplikasi dan biaya layanan tetap menjadi dependensi eksternal."+ ],+ "packages": [+ "PK11",+ "PK06",+ "PK08"+ ],+ "acceptance": [+ "A13",+ "A05",+ "A06"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/composio.mdx#L70-L96",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/composio.mdx",+ "line_fragment": "L70-L96",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/infra/connection-dispatch.ts#L33-L55",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/infra/connection-dispatch.ts",+ "line_fragment": "L33-L55",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 112,+ "table_row_index": 8+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-035",+ "title": "Katalog, pemasangan, dan pemanggilan skill",+ "category": "Skill dan pembelajaran",+ "in_scope": true,+ "baseline_status": "Fondasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Gunakan ulang discovery dan pemasangan skill pada VPS untuk CRUD global atau profil, assignment, pelepasan, sinkronisasi disk, dan instalasi SKILL.md dari GitHub. Lengkapi pemanggilan otomatis maupun slash manual dengan sumber dan trust yang terlihat. Skill sistem boleh memiliki aturan tampilan tersendiri; pemasangan instruksi tidak memberikan izin tool.",+ "draft_text_verbatim": "Fondasi. Gunakan ulang discovery dan pemasangan skill pada VPS untuk CRUD global atau profil, assignment, pelepasan, sinkronisasi disk, dan instalasi SKILL.md dari GitHub. Lengkapi pemanggilan otomatis maupun slash manual dengan sumber dan trust yang terlihat. Skill sistem boleh memiliki aturan tampilan tersendiri; pemasangan instruksi tidak memberikan izin tool.",+ "contract_clauses": [+ "Gunakan ulang discovery dan pemasangan skill pada VPS untuk CRUD global atau profil, assignment, pelepasan, sinkronisasi disk, dan instalasi SKILL.md dari GitHub.",+ "Lengkapi pemanggilan otomatis maupun slash manual dengan sumber dan trust yang terlihat.",+ "Skill sistem boleh memiliki aturan tampilan tersendiri; pemasangan instruksi tidak memberikan izin tool."+ ],+ "packages": [+ "PK14",+ "PK05"+ ],+ "acceptance": [+ "A15",+ "A04",+ "A05"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/skills.ts#L267-L454",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/skills.ts",+ "line_fragment": "L267-L454",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/PROJECT-MCP-CONNECTIONS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/PROJECT-MCP-CONNECTIONS.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 114,+ "table_row_index": 1+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-036",+ "title": "Bundle skill dan dependensi executable",+ "category": "Skill dan pembelajaran",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Perluas paket skill terkelola agar dapat memuat reference, beberapa tool Python atau JavaScript, serta deklarasi environment dan dependensi. Pisahkan persetujuan instruksi dari instalasi paket dan eksekusi kode. Impor organisasi tidak otomatis mengaktifkan executable; verifikasi digest, provenance, worker, batas jaringan, dan penolakan isi yang belum disetujui.",+ "draft_text_verbatim": "Sebagian. Perluas paket skill terkelola agar dapat memuat reference, beberapa tool Python atau JavaScript, serta deklarasi environment dan dependensi. Pisahkan persetujuan instruksi dari instalasi paket dan eksekusi kode. Impor organisasi tidak otomatis mengaktifkan executable; verifikasi digest, provenance, worker, batas jaringan, dan penolakan isi yang belum disetujui.",+ "contract_clauses": [+ "Perluas paket skill terkelola agar dapat memuat reference, beberapa tool Python atau JavaScript, serta deklarasi environment dan dependensi.",+ "Pisahkan persetujuan instruksi dari instalasi paket dan eksekusi kode.",+ "Impor organisasi tidak otomatis mengaktifkan executable; verifikasi digest, provenance, worker, batas jaringan, dan penolakan isi yang belum disetujui."+ ],+ "packages": [+ "PK14",+ "PK07",+ "PK11"+ ],+ "acceptance": [+ "A15",+ "A14",+ "A11"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/skills.mdx#L96-L225",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/skills.mdx",+ "line_fragment": "L96-L225",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/mcp/tools-forge.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/mcp/tools-forge.ts",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 114,+ "table_row_index": 2+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-037",+ "title": "Belajar skill dan proposal pascatugas",+ "category": "Skill dan pembelajaran",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Gunakan pembelajaran workflow sebagai fondasi perintah belajar eksplisit dari catatan, URL, file, atau tugas saat ini. Tambahkan saran pascaturn yang opt-in, preview, penerapan, serta persetujuan admin bila diwajibkan. Bedakan rekomendasi, kandidat, dan skill aktif; review latar tidak boleh langsung menulis instruksi tanpa mengikuti kebijakan persetujuan.",+ "draft_text_verbatim": "Sebagian. Gunakan pembelajaran workflow sebagai fondasi perintah belajar eksplisit dari catatan, URL, file, atau tugas saat ini. Tambahkan saran pascaturn yang opt-in, preview, penerapan, serta persetujuan admin bila diwajibkan. Bedakan rekomendasi, kandidat, dan skill aktif; review latar tidak boleh langsung menulis instruksi tanpa mengikuti kebijakan persetujuan.",+ "contract_clauses": [+ "Gunakan pembelajaran workflow sebagai fondasi perintah belajar eksplisit dari catatan, URL, file, atau tugas saat ini.",+ "Tambahkan saran pascaturn yang opt-in, preview, penerapan, serta persetujuan admin bila diwajibkan.",+ "Bedakan rekomendasi, kandidat, dan skill aktif; review latar tidak boleh langsung menulis instruksi tanpa mengikuti kebijakan persetujuan."+ ],+ "packages": [+ "PK14",+ "PK13"+ ],+ "acceptance": [+ "A15",+ "A16",+ "A23"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/skill-post-turn-review-service.ts#L133-L216",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/skill-post-turn-review-service.ts",+ "line_fragment": "L133-L216",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/workflow/learning.ts#L99-L149",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/workflow/learning.ts",+ "line_fragment": "L99-L149",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 114,+ "table_row_index": 3+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-038",+ "title": "Versi, diff, dan pemulihan skill",+ "category": "Skill dan pembelajaran",+ "in_scope": true,+ "baseline_status": "Verifikasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Verifikasi riwayat skill yang tersedia, lalu sediakan daftar versi, catatan perubahan, perbandingan isi, review, dan pemulihan versi sebelumnya. Simpan pelaku, sumber, serta digest tiap revisi; restore menghasilkan perubahan yang dapat ditelusuri. Uji konflik update, izin reviewer, dan executable yang tidak boleh aktif kembali tanpa evaluasi kebijakan saat ini.",+ "draft_text_verbatim": "Verifikasi. Verifikasi riwayat skill yang tersedia, lalu sediakan daftar versi, catatan perubahan, perbandingan isi, review, dan pemulihan versi sebelumnya. Simpan pelaku, sumber, serta digest tiap revisi; restore menghasilkan perubahan yang dapat ditelusuri. Uji konflik update, izin reviewer, dan executable yang tidak boleh aktif kembali tanpa evaluasi kebijakan saat ini.",+ "contract_clauses": [+ "Verifikasi riwayat skill yang tersedia, lalu sediakan daftar versi, catatan perubahan, perbandingan isi, review, dan pemulihan versi sebelumnya.",+ "Simpan pelaku, sumber, serta digest tiap revisi; restore menghasilkan perubahan yang dapat ditelusuri.",+ "Uji konflik update, izin reviewer, dan executable yang tidak boleh aktif kembali tanpa evaluasi kebijakan saat ini."+ ],+ "packages": [+ "PK14"+ ],+ "acceptance": [+ "A15",+ "A07"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/skills.ts#L531-L580",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/skills.ts",+ "line_fragment": "L531-L580",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 114,+ "table_row_index": 4+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-039",+ "title": "Penggunaan dan kurasi skill",+ "category": "Skill dan pembelajaran",+ "in_scope": true,+ "baseline_status": "Verifikasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Audit telemetry skill sebelum menambahkan jumlah penggunaan, kebaruan, pengarsipan opsional untuk skill jarang dipakai, konsolidasi berbantuan LLM, dan laporan curator. Jadwal serta kriteria stale harus terlihat dan dapat diubah. Pengarsipan mempertahankan riwayat; hasil konsolidasi tetap proposal yang memerlukan review sesuai trust dan izin penulisan.",+ "draft_text_verbatim": "Verifikasi. Audit telemetry skill sebelum menambahkan jumlah penggunaan, kebaruan, pengarsipan opsional untuk skill jarang dipakai, konsolidasi berbantuan LLM, dan laporan curator. Jadwal serta kriteria stale harus terlihat dan dapat diubah. Pengarsipan mempertahankan riwayat; hasil konsolidasi tetap proposal yang memerlukan review sesuai trust dan izin penulisan.",+ "contract_clauses": [+ "Audit telemetry skill sebelum menambahkan jumlah penggunaan, kebaruan, pengarsipan opsional untuk skill jarang dipakai, konsolidasi berbantuan LLM, dan laporan curator.",+ "Jadwal serta kriteria stale harus terlihat dan dapat diubah.",+ "Pengarsipan mempertahankan riwayat; hasil konsolidasi tetap proposal yang memerlukan review sesuai trust dan izin penulisan."+ ],+ "packages": [+ "PK14",+ "PK23"+ ],+ "acceptance": [+ "A15",+ "A28"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/skill-curator-service.ts#L86-L119",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/skill-curator-service.ts",+ "line_fragment": "L86-L119",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 114,+ "table_row_index": 5+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-040",+ "title": "Bot Telegram dan topik percakapan",+ "category": "Kanal dan notifikasi",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Perluas webhook dan pengiriman Telegram menjadi bot per agen dengan pairing, allowlist, DM, grup, topik, perintah, input suara, dokumen, gambar, dan delivery artifact. Petakan percakapan ke pengguna serta profil yang tepat. Uji jalur inbound hingga respons nyata, signature atau secret webhook, deduplikasi, batas file, dan pemulihan koneksi.",+ "draft_text_verbatim": "Sebagian. Perluas webhook dan pengiriman Telegram menjadi bot per agen dengan pairing, allowlist, DM, grup, topik, perintah, input suara, dokumen, gambar, dan delivery artifact. Petakan percakapan ke pengguna serta profil yang tepat. Uji jalur inbound hingga respons nyata, signature atau secret webhook, deduplikasi, batas file, dan pemulihan koneksi.",+ "contract_clauses": [+ "Perluas webhook dan pengiriman Telegram menjadi bot per agen dengan pairing, allowlist, DM, grup, topik, perintah, input suara, dokumen, gambar, dan delivery artifact.",+ "Petakan percakapan ke pengguna serta profil yang tepat.",+ "Uji jalur inbound hingga respons nyata, signature atau secret webhook, deduplikasi, batas file, dan pemulihan koneksi."+ ],+ "packages": [+ "PK16",+ "PK17",+ "PK19"+ ],+ "acceptance": [+ "A17",+ "A18",+ "A24",+ "A22"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/telegram/chat.mdx#L6-L89",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/telegram/chat.mdx",+ "line_fragment": "L6-L89",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/CHANNELS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/CHANNELS.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 116,+ "table_row_index": 1+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-041",+ "title": "WhatsApp melalui perangkat tertaut",+ "category": "Kanal dan notifikasi",+ "in_scope": true,+ "baseline_status": "Verifikasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Verifikasi adapter perangkat tertaut setara baseline: autentikasi QR atau kode, pairing owner, allowlist, DM, grup, perintah, dan lampiran artifact native. Sediakan status koneksi serta pemulihan sesi dengan kepemilikan yang jelas. Jalur ini tidak disamakan dengan WhatsApp Business API; metode autentikasi dan dependensinya harus diverifikasi sebelum operasional.",+ "draft_text_verbatim": "Verifikasi. Verifikasi adapter perangkat tertaut setara baseline: autentikasi QR atau kode, pairing owner, allowlist, DM, grup, perintah, dan lampiran artifact native. Sediakan status koneksi serta pemulihan sesi dengan kepemilikan yang jelas. Jalur ini tidak disamakan dengan WhatsApp Business API; metode autentikasi dan dependensinya harus diverifikasi sebelum operasional.",+ "contract_clauses": [+ "Verifikasi adapter perangkat tertaut setara baseline: autentikasi QR atau kode, pairing owner, allowlist, DM, grup, perintah, dan lampiran artifact native.",+ "Sediakan status koneksi serta pemulihan sesi dengan kepemilikan yang jelas.",+ "Jalur ini tidak disamakan dengan WhatsApp Business API; metode autentikasi dan dependensinya harus diverifikasi sebelum operasional."+ ],+ "packages": [+ "PK16",+ "PK17"+ ],+ "acceptance": [+ "A17",+ "A22",+ "A24"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/whatsapp.mdx#L62-L139",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/whatsapp.mdx",+ "line_fragment": "L62-L139",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 116,+ "table_row_index": 2+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-042",+ "title": "Bot Discord dan thread",+ "category": "Kanal dan notifikasi",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Lengkapi adapter REST dan signed Interactions dengan bot per agen, pairing DM, allowlist, percakapan server serta thread, slash command, dan artifact. Verifikasi ingest pesan Gateway bila dibutuhkan baseline beserta intents dan scope bot. Uji identitas thread, deduplikasi, revoke, serta pengiriman; Interactions yang sudah ada tidak dianggap otomatis mencakup Gateway.",+ "draft_text_verbatim": "Sebagian. Lengkapi adapter REST dan signed Interactions dengan bot per agen, pairing DM, allowlist, percakapan server serta thread, slash command, dan artifact. Verifikasi ingest pesan Gateway bila dibutuhkan baseline beserta intents dan scope bot. Uji identitas thread, deduplikasi, revoke, serta pengiriman; Interactions yang sudah ada tidak dianggap otomatis mencakup Gateway.",+ "contract_clauses": [+ "Lengkapi adapter REST dan signed Interactions dengan bot per agen, pairing DM, allowlist, percakapan server serta thread, slash command, dan artifact.",+ "Verifikasi ingest pesan Gateway bila dibutuhkan baseline beserta intents dan scope bot.",+ "Uji identitas thread, deduplikasi, revoke, serta pengiriman; Interactions yang sudah ada tidak dianggap otomatis mencakup Gateway."+ ],+ "packages": [+ "PK16",+ "PK17"+ ],+ "acceptance": [+ "A17",+ "A18",+ "A24"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/discord.mdx",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/discord.mdx",+ "line_fragment": null,+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/CHANNELS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/CHANNELS.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 116,+ "table_row_index": 3+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-043",+ "title": "Slack Socket Mode",+ "category": "Kanal dan notifikasi",+ "in_scope": true,+ "baseline_status": "Verifikasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Audit koneksi Slack, lalu sediakan bridge Socket Mode dengan DM, thread yang dipicu mention, pairing, daftar pengguna yang diizinkan, opsi anggota workspace, dan perintah. Verifikasi app token serta scope bot, pemetaan identitas, sambung ulang, dan delivery. Socket Mode diperlakukan sebagai transport tersendiri yang tidak memerlukan webhook chat publik.",+ "draft_text_verbatim": "Verifikasi. Audit koneksi Slack, lalu sediakan bridge Socket Mode dengan DM, thread yang dipicu mention, pairing, daftar pengguna yang diizinkan, opsi anggota workspace, dan perintah. Verifikasi app token serta scope bot, pemetaan identitas, sambung ulang, dan delivery. Socket Mode diperlakukan sebagai transport tersendiri yang tidak memerlukan webhook chat publik.",+ "contract_clauses": [+ "Audit koneksi Slack, lalu sediakan bridge Socket Mode dengan DM, thread yang dipicu mention, pairing, daftar pengguna yang diizinkan, opsi anggota workspace, dan perintah.",+ "Verifikasi app token serta scope bot, pemetaan identitas, sambung ulang, dan delivery.",+ "Socket Mode diperlakukan sebagai transport tersendiri yang tidak memerlukan webhook chat publik."+ ],+ "packages": [+ "PK16",+ "PK17"+ ],+ "acceptance": [+ "A17",+ "A24",+ "A22"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/slack.mdx#L15-L28",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/slack.mdx",+ "line_fragment": "L15-L28",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 116,+ "table_row_index": 4+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-044",+ "title": "Tujuan notifikasi dan webhook terautentikasi",+ "category": "Kanal dan notifikasi",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Perluas pengiriman kanal menjadi tujuan notifikasi untuk topik Telegram, kanal Discord, dan kontak WhatsApp yang dipasangkan. Tambahkan webhook inbound terautentikasi, pengelolaan tujuan, rotasi key, serta Idempotency-Key yang direkonsiliasi sebelum retry. Batasi tujuan sesuai kontrak provider; jangan menganggap pengiriman WhatsApp ke kontak berpasangan mencakup nomor atau grup sembarang.",+ "draft_text_verbatim": "Sebagian. Perluas pengiriman kanal menjadi tujuan notifikasi untuk topik Telegram, kanal Discord, dan kontak WhatsApp yang dipasangkan. Tambahkan webhook inbound terautentikasi, pengelolaan tujuan, rotasi key, serta Idempotency-Key yang direkonsiliasi sebelum retry. Batasi tujuan sesuai kontrak provider; jangan menganggap pengiriman WhatsApp ke kontak berpasangan mencakup nomor atau grup sembarang.",+ "contract_clauses": [+ "Perluas pengiriman kanal menjadi tujuan notifikasi untuk topik Telegram, kanal Discord, dan kontak WhatsApp yang dipasangkan.",+ "Tambahkan webhook inbound terautentikasi, pengelolaan tujuan, rotasi key, serta Idempotency-Key yang direkonsiliasi sebelum retry.",+ "Batasi tujuan sesuai kontrak provider; jangan menganggap pengiriman WhatsApp ke kontak berpasangan mencakup nomor atau grup sembarang."+ ],+ "packages": [+ "PK17",+ "PK16"+ ],+ "acceptance": [+ "A18",+ "A22",+ "A06"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/notification-webhook-service.ts#L49-L116",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/notification-webhook-service.ts",+ "line_fragment": "L49-L116",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/CHANNELS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/CHANNELS.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 116,+ "table_row_index": 5+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-045",+ "title": "Automation prompt dan jadwal",+ "category": "Automation workflow dan plugin",+ "in_scope": true,+ "baseline_status": "Fondasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Gunakan scheduler serta graph MSO untuk automation prompt tersimpan dengan pemicu manual, cron dan timezone, serta sekali jalan. Lengkapi pembuatan draft, preview waktu berikutnya, enable atau disable, dan pemilihan agen. Uji restart, perubahan zona waktu, serta jadwal terlewat dengan kebijakan catch-up yang eksplisit dan terukur.",+ "draft_text_verbatim": "Fondasi. Gunakan scheduler serta graph MSO untuk automation prompt tersimpan dengan pemicu manual, cron dan timezone, serta sekali jalan. Lengkapi pembuatan draft, preview waktu berikutnya, enable atau disable, dan pemilihan agen. Uji restart, perubahan zona waktu, serta jadwal terlewat dengan kebijakan catch-up yang eksplisit dan terukur.",+ "contract_clauses": [+ "Gunakan scheduler serta graph MSO untuk automation prompt tersimpan dengan pemicu manual, cron dan timezone, serta sekali jalan.",+ "Lengkapi pembuatan draft, preview waktu berikutnya, enable atau disable, dan pemilihan agen.",+ "Uji restart, perubahan zona waktu, serta jadwal terlewat dengan kebijakan catch-up yang eksplisit dan terukur."+ ],+ "packages": [+ "PK15",+ "PK23"+ ],+ "acceptance": [+ "A19",+ "A20",+ "A28"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/automations.mdx#L15-L37",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/automations.mdx",+ "line_fragment": "L15-L37",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/workflow/graph-triggers.ts#L15-L23",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/workflow/graph-triggers.ts",+ "line_fragment": "L15-L23",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 118,+ "table_row_index": 1+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-046",+ "title": "Riwayat run dan delivery automation",+ "category": "Automation workflow dan plugin",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Perluas receipt workflow menjadi riwayat automation, progress serta hasil tool, resume interupsi, jalankan ulang, status belum dibaca, dan delivery ke kanal atau email. Simpan checkpoint dan upaya pengiriman terpisah. Uji crash serta outcome tidak pasti; resume tidak boleh dianggap menjamin side effect hanya terjadi sekali tanpa idempotency atau rekonsiliasi.",+ "draft_text_verbatim": "Sebagian. Perluas receipt workflow menjadi riwayat automation, progress serta hasil tool, resume interupsi, jalankan ulang, status belum dibaca, dan delivery ke kanal atau email. Simpan checkpoint dan upaya pengiriman terpisah. Uji crash serta outcome tidak pasti; resume tidak boleh dianggap menjamin side effect hanya terjadi sekali tanpa idempotency atau rekonsiliasi.",+ "contract_clauses": [+ "Perluas receipt workflow menjadi riwayat automation, progress serta hasil tool, resume interupsi, jalankan ulang, status belum dibaca, dan delivery ke kanal atau email.",+ "Simpan checkpoint dan upaya pengiriman terpisah.",+ "Uji crash serta outcome tidak pasti; resume tidak boleh dianggap menjamin side effect hanya terjadi sekali tanpa idempotency atau rekonsiliasi."+ ],+ "packages": [+ "PK15",+ "PK17"+ ],+ "acceptance": [+ "A20",+ "A22",+ "A06"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/automation-runner.ts#L19-L98",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/automation-runner.ts",+ "line_fragment": "L19-L98",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/workflow/graph-engine.ts#L75-L102",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/workflow/graph-engine.ts",+ "line_fragment": "L75-L102",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 118,+ "table_row_index": 2+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-047",+ "title": "Recipe workflow berurutan",+ "category": "Automation workflow dan plugin",+ "in_scope": true,+ "baseline_status": "Fondasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Petakan recipe berurutan baseline ke engine workflow MSO: langkah tool, compare, assert, template, substitusi input, receipt per langkah, dan ringkasan akhir dari hasil tercatat. Uji berhenti saat gagal serta penilaian kondisi. Pertahankan kemampuan graph MSO; ringkasan tidak memanggil tool tambahan atau dianggap sebagai verifikasi independen.",+ "draft_text_verbatim": "Fondasi. Petakan recipe berurutan baseline ke engine workflow MSO: langkah tool, compare, assert, template, substitusi input, receipt per langkah, dan ringkasan akhir dari hasil tercatat. Uji berhenti saat gagal serta penilaian kondisi. Pertahankan kemampuan graph MSO; ringkasan tidak memanggil tool tambahan atau dianggap sebagai verifikasi independen.",+ "contract_clauses": [+ "Petakan recipe berurutan baseline ke engine workflow MSO: langkah tool, compare, assert, template, substitusi input, receipt per langkah, dan ringkasan akhir dari hasil tercatat.",+ "Uji berhenti saat gagal serta penilaian kondisi.",+ "Pertahankan kemampuan graph MSO; ringkasan tidak memanggil tool tambahan atau dianggap sebagai verifikasi independen."+ ],+ "packages": [+ "PK15"+ ],+ "acceptance": [+ "A20",+ "A10"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/packages/plugins/workflows/src/workflow-runner.ts#L104-L277",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "packages/plugins/workflows/src/workflow-runner.ts",+ "line_fragment": "L104-L277",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/workflow/graph-engine.ts#L33-L80",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/workflow/graph-engine.ts",+ "line_fragment": "L33-L80",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 118,+ "table_row_index": 3+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-048",+ "title": "Lifecycle plugin per organisasi",+ "category": "Automation workflow dan plugin",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Perluas taxonomy serta paket terkelola menjadi review dan instalasi plugin pada versi tepat, enable, disable, update, uninstall per organisasi, serta pengelolaan UI, tool, skill, worker, dan data. Pisahkan persetujuan paket dari aktivasi organisasi; tampilkan retention dan penghapusan data. Uji permission, digest, restart, downgrade, serta restore tanpa aktivasi executable otomatis.",+ "draft_text_verbatim": "Sebagian. Perluas taxonomy serta paket terkelola menjadi review dan instalasi plugin pada versi tepat, enable, disable, update, uninstall per organisasi, serta pengelolaan UI, tool, skill, worker, dan data. Pisahkan persetujuan paket dari aktivasi organisasi; tampilkan retention dan penghapusan data. Uji permission, digest, restart, downgrade, serta restore tanpa aktivasi executable otomatis.",+ "contract_clauses": [+ "Perluas taxonomy serta paket terkelola menjadi review dan instalasi plugin pada versi tepat, enable, disable, update, uninstall per organisasi, serta pengelolaan UI, tool, skill, worker, dan data.",+ "Pisahkan persetujuan paket dari aktivasi organisasi; tampilkan retention dan penghapusan data.",+ "Uji permission, digest, restart, downgrade, serta restore tanpa aktivasi executable otomatis."+ ],+ "packages": [+ "PK21",+ "PK07",+ "PK06"+ ],+ "acceptance": [+ "A14",+ "A11",+ "A27"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/plugins.mdx#L20-L30",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/plugins.mdx",+ "line_fragment": "L20-L30",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/ARCHITECTURE.md#L88-L118",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/ARCHITECTURE.md",+ "line_fragment": "L88-L118",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 118,+ "table_row_index": 4+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-049",+ "title": "Pembuatan plugin berbantuan agen",+ "category": "Automation workflow dan plugin",+ "in_scope": true,+ "baseline_status": "Verifikasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Verifikasi template dan alur authoring yang tersedia, lalu sediakan pembuatan scaffold plugin berbantuan agen dengan tahapan draft, preview, review source dan izin, enable, connect, serta test. Tampilkan artifact dan hasil pemeriksaan sebelum aktivasi. Tool Forge tidak otomatis setara generator plugin; kode hasil generasi tetap mengikuti approval dan isolasi runtime.",+ "draft_text_verbatim": "Verifikasi. Verifikasi template dan alur authoring yang tersedia, lalu sediakan pembuatan scaffold plugin berbantuan agen dengan tahapan draft, preview, review source dan izin, enable, connect, serta test. Tampilkan artifact dan hasil pemeriksaan sebelum aktivasi. Tool Forge tidak otomatis setara generator plugin; kode hasil generasi tetap mengikuti approval dan isolasi runtime.",+ "contract_clauses": [+ "Verifikasi template dan alur authoring yang tersedia, lalu sediakan pembuatan scaffold plugin berbantuan agen dengan tahapan draft, preview, review source dan izin, enable, connect, serta test.",+ "Tampilkan artifact dan hasil pemeriksaan sebelum aktivasi.",+ "Tool Forge tidak otomatis setara generator plugin; kode hasil generasi tetap mengikuti approval dan isolasi runtime."+ ],+ "packages": [+ "PK21",+ "PK11",+ "PK14"+ ],+ "acceptance": [+ "A14",+ "A15",+ "A23"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/plugins.mdx#L32-L79",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/plugins.mdx",+ "line_fragment": "L32-L79",+ "label": "Dokumentasi dan source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 118,+ "table_row_index": 5+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-050",+ "title": "Penjelajah dan penyunting artifact",+ "category": "Artifact media dan rapat",+ "in_scope": true,+ "baseline_status": "Fondasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Satukan pengalaman file dan artifact dengan folder, pencarian, filter, tampilan grid atau daftar, pemilik, pin, preview kaya, rename, download, delete, serta editor Markdown dan CSV. Tentukan ACL yang konsisten pada daftar dan isi. Uji validitas penyimpanan, konflik edit, akses lintas pengguna, dan hubungan artifact dengan run asalnya.",+ "draft_text_verbatim": "Fondasi. Satukan pengalaman file dan artifact dengan folder, pencarian, filter, tampilan grid atau daftar, pemilik, pin, preview kaya, rename, download, delete, serta editor Markdown dan CSV. Tentukan ACL yang konsisten pada daftar dan isi. Uji validitas penyimpanan, konflik edit, akses lintas pengguna, dan hubungan artifact dengan run asalnya.",+ "contract_clauses": [+ "Satukan pengalaman file dan artifact dengan folder, pencarian, filter, tampilan grid atau daftar, pemilik, pin, preview kaya, rename, download, delete, serta editor Markdown dan CSV.",+ "Tentukan ACL yang konsisten pada daftar dan isi.",+ "Uji validitas penyimpanan, konflik edit, akses lintas pengguna, dan hubungan artifact dengan run asalnya."+ ],+ "packages": [+ "PK18",+ "PK06"+ ],+ "acceptance": [+ "A26",+ "A05"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/artifacts.mdx#L10-L75",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/artifacts.mdx",+ "line_fragment": "L10-L75",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/SESSION-ARTIFACTS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/SESSION-ARTIFACTS.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 120,+ "table_row_index": 1+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-051",+ "title": "Snapshot artifact publik",+ "category": "Artifact media dan rapat",+ "in_scope": true,+ "baseline_status": "Verifikasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Audit mekanisme berbagi sebelum menyediakan publikasi snapshot artifact bertoken, status, pembaruan snapshot, expiry bila ditetapkan, dan pencabutan. Lindungi rendering HTML serta SVG dan pertahankan artifact sumber privat. Perubahan file oleh agen tidak otomatis memperbarui salinan publik; uji isolasi, revocation, serta kebocoran melalui preview, cache, dan metadata.",+ "draft_text_verbatim": "Verifikasi. Audit mekanisme berbagi sebelum menyediakan publikasi snapshot artifact bertoken, status, pembaruan snapshot, expiry bila ditetapkan, dan pencabutan. Lindungi rendering HTML serta SVG dan pertahankan artifact sumber privat. Perubahan file oleh agen tidak otomatis memperbarui salinan publik; uji isolasi, revocation, serta kebocoran melalui preview, cache, dan metadata.",+ "contract_clauses": [+ "Audit mekanisme berbagi sebelum menyediakan publikasi snapshot artifact bertoken, status, pembaruan snapshot, expiry bila ditetapkan, dan pencabutan.",+ "Lindungi rendering HTML serta SVG dan pertahankan artifact sumber privat.",+ "Perubahan file oleh agen tidak otomatis memperbarui salinan publik; uji isolasi, revocation, serta kebocoran melalui preview, cache, dan metadata."+ ],+ "packages": [+ "PK18",+ "PK06"+ ],+ "acceptance": [+ "A26",+ "A05",+ "A06"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/artifacts.mdx#L77-L104",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/artifacts.mdx",+ "line_fragment": "L77-L104",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 120,+ "table_row_index": 2+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-052",+ "title": "Generasi gambar dan pengiriman hasil",+ "category": "Artifact media dan rapat",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Lengkapi permukaan media dan artifact dengan tool generasi gambar melalui kontrak provider yang sesuai baseline, konfigurasi model serta allowlist ukuran, hasil PNG, lampiran, delivery kanal, dan pencatatan biaya terukur. Uji validitas file, akses model, kepemilikan, dan kegagalan provider. Jangan menyatakan progress streaming atau biaya pasti bila provider tidak memasoknya.",+ "draft_text_verbatim": "Sebagian. Lengkapi permukaan media dan artifact dengan tool generasi gambar melalui kontrak provider yang sesuai baseline, konfigurasi model serta allowlist ukuran, hasil PNG, lampiran, delivery kanal, dan pencatatan biaya terukur. Uji validitas file, akses model, kepemilikan, dan kegagalan provider. Jangan menyatakan progress streaming atau biaya pasti bila provider tidak memasoknya.",+ "contract_clauses": [+ "Lengkapi permukaan media dan artifact dengan tool generasi gambar melalui kontrak provider yang sesuai baseline, konfigurasi model serta allowlist ukuran, hasil PNG, lampiran, delivery kanal, dan pencatatan biaya terukur.",+ "Uji validitas file, akses model, kepemilikan, dan kegagalan provider.",+ "Jangan menyatakan progress streaming atau biaya pasti bila provider tidak memasoknya."+ ],+ "packages": [+ "PK19",+ "PK18",+ "PK17",+ "PK23"+ ],+ "acceptance": [+ "A24",+ "A22",+ "A28"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/image-generation.mdx#L6-L55",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/image-generation.mdx",+ "line_fragment": "L6-L55",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/frontend/slices/os-shell/shell.manifest.ts#L60-L74",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "frontend/slices/os-shell/shell.manifest.ts",+ "line_fragment": "L60-L74",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 120,+ "table_row_index": 3+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-053",+ "title": "Capture Google Meet melalui Chrome",+ "category": "Artifact media dan rapat",+ "in_scope": true,+ "baseline_status": "Verifikasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Verifikasi alur rapat lalu sediakan extension Chrome untuk capture tab dan mikrofon secara eksplisit, stream transkrip, riwayat, akses rapat sesuai pemilik, serta tool pembacaan transkrip agen. Tampilkan indikator mulai, berhenti, dan koneksi terputus. Ini capture lokal, bukan bot peserta yang masuk rapat; provider transkripsi serta transport capture perlu dikonfigurasi.",+ "draft_text_verbatim": "Verifikasi. Verifikasi alur rapat lalu sediakan extension Chrome untuk capture tab dan mikrofon secara eksplisit, stream transkrip, riwayat, akses rapat sesuai pemilik, serta tool pembacaan transkrip agen. Tampilkan indikator mulai, berhenti, dan koneksi terputus. Ini capture lokal, bukan bot peserta yang masuk rapat; provider transkripsi serta transport capture perlu dikonfigurasi.",+ "contract_clauses": [+ "Verifikasi alur rapat lalu sediakan extension Chrome untuk capture tab dan mikrofon secara eksplisit, stream transkrip, riwayat, akses rapat sesuai pemilik, serta tool pembacaan transkrip agen.",+ "Tampilkan indikator mulai, berhenti, dan koneksi terputus.",+ "Ini capture lokal, bukan bot peserta yang masuk rapat; provider transkripsi serta transport capture perlu dikonfigurasi."+ ],+ "packages": [+ "PK20",+ "PK07",+ "PK18"+ ],+ "acceptance": [+ "A25",+ "A05",+ "A24"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/google-meet/service.ts#L228-L258",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/google-meet/service.ts",+ "line_fragment": "L228-L258",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 120,+ "table_row_index": 4+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-054",+ "title": "Impor transkrip dan rekaman rapat",+ "category": "Artifact media dan rapat",+ "in_scope": true,+ "baseline_status": "Verifikasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Audit koneksi media dan Composio sebelum menambahkan upload Markdown atau audio rapat, discovery rekaman melalui Gmail dan Drive, serta transkripsi video. Ikat impor pada akun dan sumber yang dipilih, tampilkan progress serta hasil parsial, dan tentukan batas ukuran atau durasi. Jangan menjanjikan identifikasi pembicara bila adapter impor tidak menghasilkannya.",+ "draft_text_verbatim": "Verifikasi. Audit koneksi media dan Composio sebelum menambahkan upload Markdown atau audio rapat, discovery rekaman melalui Gmail dan Drive, serta transkripsi video. Ikat impor pada akun dan sumber yang dipilih, tampilkan progress serta hasil parsial, dan tentukan batas ukuran atau durasi. Jangan menjanjikan identifikasi pembicara bila adapter impor tidak menghasilkannya.",+ "contract_clauses": [+ "Audit koneksi media dan Composio sebelum menambahkan upload Markdown atau audio rapat, discovery rekaman melalui Gmail dan Drive, serta transkripsi video.",+ "Ikat impor pada akun dan sumber yang dipilih, tampilkan progress serta hasil parsial, dan tentukan batas ukuran atau durasi.",+ "Jangan menjanjikan identifikasi pembicara bila adapter impor tidak menghasilkannya."+ ],+ "packages": [+ "PK20",+ "PK11",+ "PK19"+ ],+ "acceptance": [+ "A25",+ "A13",+ "A24"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/google-meet/actions.ts#L271-L388",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/google-meet/actions.ts",+ "line_fragment": "L271-L388",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 120,+ "table_row_index": 5+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-055",+ "title": "Backup penuh dan export terlingkup",+ "category": "Portabilitas klien dan operasi",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Perluas backup menjadi ZIP data-root penuh dengan preview dan restore, export organisasi, serta export pengguna yang format dan scope-nya jelas. Dukung pemulihan pada panduan awal dan retention data plugin yang aman. Uji checksum, downtime, grant, credential omissions, dan data media; dataset memory eksternal memerlukan backup tersendiri dan tidak diasumsikan tercakup.",+ "draft_text_verbatim": "Sebagian. Perluas backup menjadi ZIP data-root penuh dengan preview dan restore, export organisasi, serta export pengguna yang format dan scope-nya jelas. Dukung pemulihan pada panduan awal dan retention data plugin yang aman. Uji checksum, downtime, grant, credential omissions, dan data media; dataset memory eksternal memerlukan backup tersendiri dan tidak diasumsikan tercakup.",+ "contract_clauses": [+ "Perluas backup menjadi ZIP data-root penuh dengan preview dan restore, export organisasi, serta export pengguna yang format dan scope-nya jelas.",+ "Dukung pemulihan pada panduan awal dan retention data plugin yang aman.",+ "Uji checksum, downtime, grant, credential omissions, dan data media; dataset memory eksternal memerlukan backup tersendiri dan tidak diasumsikan tercakup."+ ],+ "packages": [+ "PK22",+ "PK06",+ "PK21"+ ],+ "acceptance": [+ "A27",+ "A01",+ "A06"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/data-portability.ts#L62-L232",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/data-portability.ts",+ "line_fragment": "L62-L232",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/MEMORY-SAFETY.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/MEMORY-SAFETY.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 122,+ "table_row_index": 1+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-056",+ "title": "Agent pack tanpa secret",+ "category": "Portabilitas klien dan operasi",+ "in_scope": true,+ "baseline_status": "Verifikasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Verifikasi portabilitas profil lalu sediakan export satu agen tanpa secret, preview isi dan konflik, serta impor sebagai profil baru. Tautkan ulang tool dan MCP berdasarkan izin tujuan; batasi executable yang belum disetujui. Format ini berbeda dari backup penuh dan tidak membawa koneksi kanal, browser session, atau token provider asal.",+ "draft_text_verbatim": "Verifikasi. Verifikasi portabilitas profil lalu sediakan export satu agen tanpa secret, preview isi dan konflik, serta impor sebagai profil baru. Tautkan ulang tool dan MCP berdasarkan izin tujuan; batasi executable yang belum disetujui. Format ini berbeda dari backup penuh dan tidak membawa koneksi kanal, browser session, atau token provider asal.",+ "contract_clauses": [+ "Verifikasi portabilitas profil lalu sediakan export satu agen tanpa secret, preview isi dan konflik, serta impor sebagai profil baru.",+ "Tautkan ulang tool dan MCP berdasarkan izin tujuan; batasi executable yang belum disetujui.",+ "Format ini berbeda dari backup penuh dan tidak membawa koneksi kanal, browser session, atau token provider asal."+ ],+ "packages": [+ "PK22",+ "PK08",+ "PK11"+ ],+ "acceptance": [+ "A27",+ "A07",+ "A14"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/profile-portability.ts#L59-L168",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/profile-portability.ts",+ "line_fragment": "L59-L168",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 122,+ "table_row_index": 2+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-057",+ "title": "Klien terminal lokal dan remote",+ "category": "Portabilitas klien dan operasi",+ "in_scope": true,+ "baseline_status": "Fondasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Perluas CLI interaktif MSO dengan pemilihan organisasi, profil, model, reasoning, pemanggilan skill, gambar clipboard, dan rotasi token pada mode lokal maupun remote. Tegakkan koneksi remote terlindungi dan identitas workspace server untuk coding. Uji streaming, persetujuan, reconnect, perintah slash, serta konsistensi status dengan aplikasi web.",+ "draft_text_verbatim": "Fondasi. Perluas CLI interaktif MSO dengan pemilihan organisasi, profil, model, reasoning, pemanggilan skill, gambar clipboard, dan rotasi token pada mode lokal maupun remote. Tegakkan koneksi remote terlindungi dan identitas workspace server untuk coding. Uji streaming, persetujuan, reconnect, perintah slash, serta konsistensi status dengan aplikasi web.",+ "contract_clauses": [+ "Perluas CLI interaktif MSO dengan pemilihan organisasi, profil, model, reasoning, pemanggilan skill, gambar clipboard, dan rotasi token pada mode lokal maupun remote.",+ "Tegakkan koneksi remote terlindungi dan identitas workspace server untuk coding.",+ "Uji streaming, persetujuan, reconnect, perintah slash, serta konsistensi status dengan aplikasi web."+ ],+ "packages": [+ "PK23",+ "PK09",+ "PK14",+ "PK10"+ ],+ "acceptance": [+ "A29",+ "A08",+ "A12",+ "A15"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/cli.mdx#L6-L98",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/cli.mdx",+ "line_fragment": "L6-L98",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/ARCHITECTURE.md#L37-L47",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/ARCHITECTURE.md",+ "line_fragment": "L37-L47",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 122,+ "table_row_index": 3+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-058",+ "title": "Paket aplikasi desktop dan updater",+ "category": "Portabilitas klien dan operasi",+ "in_scope": true,+ "baseline_status": "Verifikasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Audit target desktop native sebelum memilih paket setara Electron yang menggabungkan server lokal, web UI, data persisten, dan updater rilis bertanda tangan. Bedakan paket tersebut dari PWA serta host Linux melalui Lima atau WSL. Verifikasi installer, distribusi, signature, update, dan recovery per platform; target build saja tidak membuktikan installer tersedia.",+ "draft_text_verbatim": "Verifikasi. Audit target desktop native sebelum memilih paket setara Electron yang menggabungkan server lokal, web UI, data persisten, dan updater rilis bertanda tangan. Bedakan paket tersebut dari PWA serta host Linux melalui Lima atau WSL. Verifikasi installer, distribusi, signature, update, dan recovery per platform; target build saja tidak membuktikan installer tersedia.",+ "contract_clauses": [+ "Audit target desktop native sebelum memilih paket setara Electron yang menggabungkan server lokal, web UI, data persisten, dan updater rilis bertanda tangan.",+ "Bedakan paket tersebut dari PWA serta host Linux melalui Lima atau WSL.",+ "Verifikasi installer, distribusi, signature, update, dan recovery per platform; target build saja tidak membuktikan installer tersedia."+ ],+ "packages": [+ "PK23",+ "PK04"+ ],+ "acceptance": [+ "A29",+ "A03",+ "A30"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/desktop.mdx#L6-L40",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/desktop.mdx",+ "line_fragment": "L6-L40",+ "label": "Dokumentasi dan source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/PLATFORMS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/PLATFORMS.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 122,+ "table_row_index": 4+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-059",+ "title": "Deployment, worker, dan diagnostik host",+ "category": "Portabilitas klien dan operasi",+ "in_scope": true,+ "baseline_status": "Fondasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Petakan instalasi source Bun dan deployment container tunggal dengan volume persisten, lifecycle serta log worker, health, status sistem, dokumentasi OpenAPI, dan URL callback publik. Pertahankan adapter gateway dan platform MSO. Uji instalasi, restart, update, serta recovery; klaim RAM dan layanan cloud provisioning dicatat sebagai kebutuhan verifikasi terpisah.",+ "draft_text_verbatim": "Fondasi. Petakan instalasi source Bun dan deployment container tunggal dengan volume persisten, lifecycle serta log worker, health, status sistem, dokumentasi OpenAPI, dan URL callback publik. Pertahankan adapter gateway dan platform MSO. Uji instalasi, restart, update, serta recovery; klaim RAM dan layanan cloud provisioning dicatat sebagai kebutuhan verifikasi terpisah.",+ "contract_clauses": [+ "Petakan instalasi source Bun dan deployment container tunggal dengan volume persisten, lifecycle serta log worker, health, status sistem, dokumentasi OpenAPI, dan URL callback publik.",+ "Pertahankan adapter gateway dan platform MSO.",+ "Uji instalasi, restart, update, serta recovery; klaim RAM dan layanan cloud provisioning dicatat sebagai kebutuhan verifikasi terpisah."+ ],+ "packages": [+ "PK23",+ "PK07",+ "PK24",+ "PK01"+ ],+ "acceptance": [+ "A29",+ "A30",+ "A11"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/Dockerfile#L140-L157",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "Dockerfile",+ "line_fragment": "L140-L157",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/ARCHITECTURE.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/ARCHITECTURE.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 122,+ "table_row_index": 5+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-060",+ "title": "Pelacakan error dan observabilitas operator",+ "category": "Portabilitas klien dan operasi",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Gunakan audit serta status operasional MSO, lalu verifikasi pelacakan error opt-in yang kompatibel Sentry, penyaringan event sebelum keluar, antrean retry crash, dan diagnostik. Pisahkan telemetry dari data percakapan serta secret. Uji kegagalan backend pelaporan, tenant scope, kontrol consent, dan pemulihan agar error tracking tidak menghalangi pekerjaan utama.",+ "draft_text_verbatim": "Sebagian. Gunakan audit serta status operasional MSO, lalu verifikasi pelacakan error opt-in yang kompatibel Sentry, penyaringan event sebelum keluar, antrean retry crash, dan diagnostik. Pisahkan telemetry dari data percakapan serta secret. Uji kegagalan backend pelaporan, tenant scope, kontrol consent, dan pemulihan agar error tracking tidak menghalangi pekerjaan utama.",+ "contract_clauses": [+ "Gunakan audit serta status operasional MSO, lalu verifikasi pelacakan error opt-in yang kompatibel Sentry, penyaringan event sebelum keluar, antrean retry crash, dan diagnostik.",+ "Pisahkan telemetry dari data percakapan serta secret.",+ "Uji kegagalan backend pelaporan, tenant scope, kontrol consent, dan pemulihan agar error tracking tidak menghalangi pekerjaan utama."+ ],+ "packages": [+ "PK23",+ "PK02",+ "PK24"+ ],+ "acceptance": [+ "A30",+ "A05",+ "A28"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/error-tracking.mdx#L17-L105",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/error-tracking.mdx",+ "line_fragment": "L17-L105",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/ARCHITECTURE.md#L37-L57",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/ARCHITECTURE.md",+ "line_fragment": "L37-L57",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 122,+ "table_row_index": 6+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-061",+ "title": "PWA, cache aset, dan pembaruan aplikasi",+ "category": "Pengalaman web dan administrasi",+ "in_scope": true,+ "baseline_status": "Fondasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Gunakan manifest PWA dan registrasi service worker MSO untuk instalasi standalone, cache aset, shell fallback saat offline, serta prompt update atau reload yang jelas. Verifikasi bahwa API, autentikasi, dan data privat tidak ikut tersimpan secara tidak sengaja. Shell offline tidak berarti model dapat dijalankan atau percakapan pribadi tersedia tanpa jaringan.",+ "draft_text_verbatim": "Fondasi. Gunakan manifest PWA dan registrasi service worker MSO untuk instalasi standalone, cache aset, shell fallback saat offline, serta prompt update atau reload yang jelas. Verifikasi bahwa API, autentikasi, dan data privat tidak ikut tersimpan secara tidak sengaja. Shell offline tidak berarti model dapat dijalankan atau percakapan pribadi tersedia tanpa jaringan.",+ "contract_clauses": [+ "Gunakan manifest PWA dan registrasi service worker MSO untuk instalasi standalone, cache aset, shell fallback saat offline, serta prompt update atau reload yang jelas.",+ "Verifikasi bahwa API, autentikasi, dan data privat tidak ikut tersimpan secara tidak sengaja.",+ "Shell offline tidak berarti model dapat dijalankan atau percakapan pribadi tersedia tanpa jaringan."+ ],+ "packages": [+ "PK23",+ "PK24"+ ],+ "acceptance": [+ "A29",+ "A05",+ "A30"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/web/sw/service-worker.ts#L25-L105",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/web/sw/service-worker.ts",+ "line_fragment": "L25-L105",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/app/register-sw.tsx",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "app/register-sw.tsx",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 124,+ "table_row_index": 1+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-062",+ "title": "Daftar dan filter audit keamanan",+ "category": "Pengalaman web dan administrasi",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Perluas audit host menjadi event keamanan yang hanya ditambahkan, dengan API daftar, filter action dan organisasi, serta pagination. Catat actor, request, resource, waktu, dan hasil sesuai scope admin. Pisahkan audit dari crash reporting; uji akses langsung, penyaringan secret, serta kegagalan penyimpanan tanpa mengklaim log kebal perubahan hanya karena append-only.",+ "draft_text_verbatim": "Sebagian. Perluas audit host menjadi event keamanan yang hanya ditambahkan, dengan API daftar, filter action dan organisasi, serta pagination. Catat actor, request, resource, waktu, dan hasil sesuai scope admin. Pisahkan audit dari crash reporting; uji akses langsung, penyaringan secret, serta kegagalan penyimpanan tanpa mengklaim log kebal perubahan hanya karena append-only.",+ "contract_clauses": [+ "Perluas audit host menjadi event keamanan yang hanya ditambahkan, dengan API daftar, filter action dan organisasi, serta pagination.",+ "Catat actor, request, resource, waktu, dan hasil sesuai scope admin.",+ "Pisahkan audit dari crash reporting; uji akses langsung, penyaringan secret, serta kegagalan penyimpanan tanpa mengklaim log kebal perubahan hanya karena append-only."+ ],+ "packages": [+ "PK06",+ "PK24"+ ],+ "acceptance": [+ "A04",+ "A05",+ "A30"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/audit-events.ts#L7-L83",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/audit-events.ts",+ "line_fragment": "L7-L83",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/host/audit.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/host/audit.ts",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 124,+ "table_row_index": 2+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-063",+ "title": "Inbox notifikasi dan proposal",+ "category": "Pengalaman web dan administrasi",+ "in_scope": true,+ "baseline_status": "Verifikasi",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Audit sumber notifikasi yang ada, lalu satukan run automation belum dibaca, proposal memory organisasi, dan proposal skill yang menunggu review ke dalam satu inbox. Tampilkan tautan ke sumber, jumlah belum dibaca, serta tindakan sesuai peran. Inbox ini berbeda dari push atau webhook outbound; uji perubahan status dan pembatasan proposal admin.",+ "draft_text_verbatim": "Verifikasi. Audit sumber notifikasi yang ada, lalu satukan run automation belum dibaca, proposal memory organisasi, dan proposal skill yang menunggu review ke dalam satu inbox. Tampilkan tautan ke sumber, jumlah belum dibaca, serta tindakan sesuai peran. Inbox ini berbeda dari push atau webhook outbound; uji perubahan status dan pembatasan proposal admin.",+ "contract_clauses": [+ "Audit sumber notifikasi yang ada, lalu satukan run automation belum dibaca, proposal memory organisasi, dan proposal skill yang menunggu review ke dalam satu inbox.",+ "Tampilkan tautan ke sumber, jumlah belum dibaca, serta tindakan sesuai peran.",+ "Inbox ini berbeda dari push atau webhook outbound; uji perubahan status dan pembatasan proposal admin."+ ],+ "packages": [+ "PK17",+ "PK14",+ "PK13"+ ],+ "acceptance": [+ "A22",+ "A15",+ "A16",+ "A05"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/web/src/hooks/use-notifications.ts#L8-L105",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/web/src/hooks/use-notifications.ts",+ "line_fragment": "L8-L105",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 124,+ "table_row_index": 3+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ },+ {+ "id": "NK-064",+ "title": "Tema dan command palette sesuai izin",+ "category": "Pengalaman web dan administrasi",+ "in_scope": true,+ "baseline_status": "Sebagian",+ "baseline_status_basis": "attached_draft_static_audit_only",+ "target_contract": "Gunakan theme picker dan pencarian shell untuk tema Light, Dark, atau System yang tersimpan serta mengikuti OS. Lengkapi Ctrl atau Cmd+K, pencarian, dan navigasi keyboard ke halaman, agen, serta plugin aktif sesuai izin. Perpindahan organisasi harus terlihat; uji fokus, Escape, pembaca layar, dan penolakan target yang tidak boleh diakses.",+ "draft_text_verbatim": "Sebagian. Gunakan theme picker dan pencarian shell untuk tema Light, Dark, atau System yang tersimpan serta mengikuti OS. Lengkapi Ctrl atau Cmd+K, pencarian, dan navigasi keyboard ke halaman, agen, serta plugin aktif sesuai izin. Perpindahan organisasi harus terlihat; uji fokus, Escape, pembaca layar, dan penolakan target yang tidak boleh diakses.",+ "contract_clauses": [+ "Gunakan theme picker dan pencarian shell untuk tema Light, Dark, atau System yang tersimpan serta mengikuti OS.",+ "Lengkapi Ctrl atau Cmd+K, pencarian, dan navigasi keyboard ke halaman, agen, serta plugin aktif sesuai izin.",+ "Perpindahan organisasi harus terlihat; uji fokus, Escape, pembaca layar, dan penolakan target yang tidak boleh diakses."+ ],+ "packages": [+ "PK03"+ ],+ "acceptance": [+ "A04",+ "A29"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/web/src/components/CommandPalette.tsx#L222-L408",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/web/src/components/CommandPalette.tsx",+ "line_fragment": "L222-L408",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/frontend/slices/os-shell/theme-quick-picker.tsx",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "frontend/slices/os-shell/theme-quick-picker.tsx",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "draft_locator": {+ "block_index": 124,+ "table_row_index": 4+ },+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "verification_owner": null,+ "target_modules": [],+ "candidate_commit": null,+ "evidence": [],+ "atomic_decomposition_status": "pending_source_tree_route_setting_audit"+ }+ ],+ "packages": [+ {+ "id": "PK01",+ "description": "Inventaris per fitur, kontrak paritas, sumber, dan pemilik verifikasi",+ "stage": "T0",+ "sequence_priority": 0,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-059"+ ],+ "acceptance": [+ "A11",+ "A29",+ "A30"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": "Inventory source contracts owners module mappings and evidence for every NK requirement and A scenario.",+ "crosscutting_requirement_ids": [+ "NK-001",+ "NK-002",+ "NK-003",+ "NK-004",+ "NK-005",+ "NK-006",+ "NK-007",+ "NK-008",+ "NK-009",+ "NK-010",+ "NK-011",+ "NK-012",+ "NK-013",+ "NK-014",+ "NK-015",+ "NK-016",+ "NK-017",+ "NK-018",+ "NK-019",+ "NK-020",+ "NK-021",+ "NK-022",+ "NK-023",+ "NK-024",+ "NK-025",+ "NK-026",+ "NK-027",+ "NK-028",+ "NK-029",+ "NK-030",+ "NK-031",+ "NK-032",+ "NK-033",+ "NK-034",+ "NK-035",+ "NK-036",+ "NK-037",+ "NK-038",+ "NK-039",+ "NK-040",+ "NK-041",+ "NK-042",+ "NK-043",+ "NK-044",+ "NK-045",+ "NK-046",+ "NK-047",+ "NK-048",+ "NK-049",+ "NK-050",+ "NK-051",+ "NK-052",+ "NK-053",+ "NK-054",+ "NK-055",+ "NK-056",+ "NK-057",+ "NK-058",+ "NK-059",+ "NK-060",+ "NK-061",+ "NK-062",+ "NK-063",+ "NK-064"+ ],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK02",+ "description": "Triage gate CI, regresi yang relevan, dan bukti rilis",+ "stage": "T0",+ "sequence_priority": 0,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-060"+ ],+ "acceptance": [+ "A05",+ "A28",+ "A30"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": "CI triage regression and release evidence apply to every candidate change where relevant; explicit NK row references are not the complete gate scope.",+ "crosscutting_requirement_ids": [+ "NK-001",+ "NK-002",+ "NK-003",+ "NK-004",+ "NK-005",+ "NK-006",+ "NK-007",+ "NK-008",+ "NK-009",+ "NK-010",+ "NK-011",+ "NK-012",+ "NK-013",+ "NK-014",+ "NK-015",+ "NK-016",+ "NK-017",+ "NK-018",+ "NK-019",+ "NK-020",+ "NK-021",+ "NK-022",+ "NK-023",+ "NK-024",+ "NK-025",+ "NK-026",+ "NK-027",+ "NK-028",+ "NK-029",+ "NK-030",+ "NK-031",+ "NK-032",+ "NK-033",+ "NK-034",+ "NK-035",+ "NK-036",+ "NK-037",+ "NK-038",+ "NK-039",+ "NK-040",+ "NK-041",+ "NK-042",+ "NK-043",+ "NK-044",+ "NK-045",+ "NK-046",+ "NK-047",+ "NK-048",+ "NK-049",+ "NK-050",+ "NK-051",+ "NK-052",+ "NK-053",+ "NK-054",+ "NK-055",+ "NK-056",+ "NK-057",+ "NK-058",+ "NK-059",+ "NK-060",+ "NK-061",+ "NK-062",+ "NK-063",+ "NK-064"+ ],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK03",+ "description": "Onboarding terpadu, navigasi sesuai peran, empty dan error states",+ "stage": "T1",+ "sequence_priority": 1,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-001",+ "NK-064"+ ],+ "acceptance": [+ "A01",+ "A04",+ "A29"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": null,+ "crosscutting_requirement_ids": [],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK04",+ "description": "Principal, login, reset, sesi, TOTP, passkey, recovery",+ "stage": "T2",+ "sequence_priority": 2,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-002",+ "NK-003",+ "NK-004",+ "NK-058"+ ],+ "acceptance": [+ "A02",+ "A03",+ "A05",+ "A06",+ "A29",+ "A30"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": null,+ "crosscutting_requirement_ids": [],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK05",+ "description": "Organisasi tim membership undangan dan publikasi resource",+ "stage": "T2",+ "sequence_priority": 2,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-002",+ "NK-005",+ "NK-006",+ "NK-007",+ "NK-010",+ "NK-023",+ "NK-024",+ "NK-035"+ ],+ "acceptance": [+ "A02",+ "A03",+ "A04",+ "A05",+ "A06",+ "A07",+ "A15",+ "A16",+ "A24"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": null,+ "crosscutting_requirement_ids": [],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK06",+ "description": "Scoped storage, migrasi owner, audit, grant dan audience token",+ "stage": "T2",+ "sequence_priority": 2,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-001",+ "NK-002",+ "NK-004",+ "NK-005",+ "NK-006",+ "NK-007",+ "NK-008",+ "NK-010",+ "NK-017",+ "NK-018",+ "NK-022",+ "NK-023",+ "NK-034",+ "NK-048",+ "NK-050",+ "NK-051",+ "NK-055",+ "NK-062"+ ],+ "acceptance": [+ "A01",+ "A02",+ "A03",+ "A04",+ "A05",+ "A06",+ "A07",+ "A08",+ "A11",+ "A13",+ "A14",+ "A16",+ "A26",+ "A27",+ "A28",+ "A29",+ "A30"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": null,+ "crosscutting_requirement_ids": [],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK07",+ "description": "Worker lease, shell sandbox, browser isolation, jaringan dan quota",+ "stage": "T3",+ "sequence_priority": 3,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-013",+ "NK-014",+ "NK-027",+ "NK-030",+ "NK-031",+ "NK-032",+ "NK-033",+ "NK-036",+ "NK-048",+ "NK-053",+ "NK-059"+ ],+ "acceptance": [+ "A05",+ "A06",+ "A09",+ "A10",+ "A11",+ "A12",+ "A13",+ "A14",+ "A15",+ "A24",+ "A25",+ "A27",+ "A29",+ "A30"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": null,+ "crosscutting_requirement_ids": [],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK08",+ "description": "Profil agen, revisi, clone, move, model dan runtime binding",+ "stage": "T3",+ "sequence_priority": 3,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-009",+ "NK-010",+ "NK-011",+ "NK-012",+ "NK-016",+ "NK-022",+ "NK-033",+ "NK-034",+ "NK-056"+ ],+ "acceptance": [+ "A05",+ "A06",+ "A07",+ "A08",+ "A09",+ "A10",+ "A13",+ "A14",+ "A16",+ "A24",+ "A27",+ "A28",+ "A29"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": null,+ "crosscutting_requirement_ids": [],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK09",+ "description": "Percakapan privat, branching, attachments, mode sementara dan history",+ "stage": "T3",+ "sequence_priority": 3,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-016",+ "NK-017",+ "NK-018",+ "NK-019",+ "NK-020",+ "NK-021",+ "NK-057"+ ],+ "acceptance": [+ "A05",+ "A08",+ "A12",+ "A15",+ "A16",+ "A23",+ "A24",+ "A28",+ "A29"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": null,+ "crosscutting_requirement_ids": [],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK10",+ "description": "ACP dan coding harness, subagent serta handoff",+ "stage": "T3",+ "sequence_priority": 3,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-013",+ "NK-014",+ "NK-015",+ "NK-030",+ "NK-057"+ ],+ "acceptance": [+ "A06",+ "A08",+ "A09",+ "A11",+ "A12",+ "A13",+ "A15",+ "A21",+ "A29",+ "A30"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": null,+ "crosscutting_requirement_ids": [],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK11",+ "description": "MCP OAuth, Composio per pengguna, custom tools dan tool playground",+ "stage": "T3",+ "sequence_priority": 3,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-009",+ "NK-012",+ "NK-013",+ "NK-026",+ "NK-027",+ "NK-028",+ "NK-029",+ "NK-032",+ "NK-033",+ "NK-034",+ "NK-036",+ "NK-049",+ "NK-054",+ "NK-056"+ ],+ "acceptance": [+ "A05",+ "A06",+ "A07",+ "A09",+ "A10",+ "A11",+ "A12",+ "A13",+ "A14",+ "A15",+ "A16",+ "A22",+ "A23",+ "A24",+ "A25",+ "A27"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": null,+ "crosscutting_requirement_ids": [],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK12",+ "description": "Knowledge upload ZIP, ingestion, pencarian dan sumber turunan",+ "stage": "T4",+ "sequence_priority": 4,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-007",+ "NK-024",+ "NK-025"+ ],+ "acceptance": [+ "A04",+ "A05",+ "A15",+ "A16",+ "A24"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": null,+ "crosscutting_requirement_ids": [],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK13",+ "description": "Memory organisasi, proposal, history, restore dan scope",+ "stage": "T4",+ "sequence_priority": 4,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-009",+ "NK-022",+ "NK-023",+ "NK-026",+ "NK-037",+ "NK-063"+ ],+ "acceptance": [+ "A05",+ "A06",+ "A07",+ "A09",+ "A10",+ "A13",+ "A15",+ "A16",+ "A22",+ "A23",+ "A27"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": null,+ "crosscutting_requirement_ids": [],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK14",+ "description": "Skill belajar, proposal, revision, approval, usage dan curator",+ "stage": "T4",+ "sequence_priority": 4,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-025",+ "NK-035",+ "NK-036",+ "NK-037",+ "NK-038",+ "NK-039",+ "NK-049",+ "NK-057",+ "NK-063"+ ],+ "acceptance": [+ "A04",+ "A05",+ "A07",+ "A08",+ "A11",+ "A12",+ "A14",+ "A15",+ "A16",+ "A22",+ "A23",+ "A28",+ "A29"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": null,+ "crosscutting_requirement_ids": [],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK15",+ "description": "Durable run scheduler, cron, runAt, retry, resume dan receipts",+ "stage": "T5",+ "sequence_priority": 5,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-015",+ "NK-020",+ "NK-045",+ "NK-046",+ "NK-047"+ ],+ "acceptance": [+ "A06",+ "A08",+ "A10",+ "A19",+ "A20",+ "A21",+ "A22",+ "A23",+ "A28"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": null,+ "crosscutting_requirement_ids": [],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK16",+ "description": "Telegram WhatsApp Discord Slack dan mapping sesi pengguna",+ "stage": "T5",+ "sequence_priority": 5,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-040",+ "NK-041",+ "NK-042",+ "NK-043",+ "NK-044"+ ],+ "acceptance": [+ "A06",+ "A17",+ "A18",+ "A22",+ "A24"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": null,+ "crosscutting_requirement_ids": [],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK17",+ "description": "Delivery email dan kanal, webhook, notification inbox, idempotency",+ "stage": "T5",+ "sequence_priority": 5,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-029",+ "NK-040",+ "NK-041",+ "NK-042",+ "NK-043",+ "NK-044",+ "NK-046",+ "NK-052",+ "NK-063"+ ],+ "acceptance": [+ "A05",+ "A06",+ "A13",+ "A15",+ "A16",+ "A17",+ "A18",+ "A20",+ "A22",+ "A24",+ "A28"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": null,+ "crosscutting_requirement_ids": [],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK18",+ "description": "Artifact explorer, edit, snapshot share, expiry dan revocation",+ "stage": "T6",+ "sequence_priority": 6,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-019",+ "NK-024",+ "NK-027",+ "NK-029",+ "NK-050",+ "NK-051",+ "NK-052",+ "NK-053"+ ],+ "acceptance": [+ "A05",+ "A06",+ "A10",+ "A11",+ "A13",+ "A16",+ "A22",+ "A24",+ "A25",+ "A26",+ "A28",+ "A29"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": null,+ "crosscutting_requirement_ids": [],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK19",+ "description": "Image generation, vision, audio, transkripsi dan browser parity",+ "stage": "T6",+ "sequence_priority": 6,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-011",+ "NK-019",+ "NK-028",+ "NK-031",+ "NK-040",+ "NK-052",+ "NK-054"+ ],+ "acceptance": [+ "A05",+ "A09",+ "A10",+ "A11",+ "A13",+ "A17",+ "A18",+ "A22",+ "A24",+ "A25",+ "A28",+ "A29",+ "A30"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": null,+ "crosscutting_requirement_ids": [],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK20",+ "description": "Google Meet extension, capture, transcript, recording import",+ "stage": "T6",+ "sequence_priority": 6,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-053",+ "NK-054"+ ],+ "acceptance": [+ "A05",+ "A13",+ "A24",+ "A25"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": null,+ "crosscutting_requirement_ids": [],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK21",+ "description": "Plugin manifest, catalog, permission, worker, update dan restore",+ "stage": "T7",+ "sequence_priority": 7,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-032",+ "NK-048",+ "NK-049",+ "NK-055"+ ],+ "acceptance": [+ "A01",+ "A06",+ "A10",+ "A11",+ "A14",+ "A15",+ "A23",+ "A27"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": null,+ "crosscutting_requirement_ids": [],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK22",+ "description": "Agent pack, user org export, backup penuh dan restore drill",+ "stage": "T7",+ "sequence_priority": 7,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-001",+ "NK-026",+ "NK-055",+ "NK-056"+ ],+ "acceptance": [+ "A01",+ "A06",+ "A07",+ "A13",+ "A14",+ "A16",+ "A27",+ "A29"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": null,+ "crosscutting_requirement_ids": [],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK23",+ "description": "Usage dan quota, optimasi konteks, platform packaging dan doctor",+ "stage": "T7",+ "sequence_priority": 7,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-008",+ "NK-011",+ "NK-016",+ "NK-021",+ "NK-039",+ "NK-045",+ "NK-052",+ "NK-057",+ "NK-058",+ "NK-059",+ "NK-060",+ "NK-061"+ ],+ "acceptance": [+ "A03",+ "A05",+ "A08",+ "A09",+ "A11",+ "A12",+ "A15",+ "A19",+ "A20",+ "A22",+ "A24",+ "A28",+ "A29",+ "A30"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": null,+ "crosscutting_requirement_ids": [],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "id": "PK24",+ "description": "Uji perjalanan pengguna, dokumentasi, benchmark dan rilis paritas",+ "stage": "T7",+ "sequence_priority": 7,+ "priority_basis": "draft_stage_order_not_a_promised_schedule",+ "requirements": [+ "NK-059",+ "NK-060",+ "NK-061",+ "NK-062"+ ],+ "acceptance": [+ "A04",+ "A05",+ "A11",+ "A28",+ "A29",+ "A30"+ ],+ "mapping_basis": "explicit_requirement_row_references",+ "crosscutting_scope": "User journeys documentation benchmark and full parity release require all NK requirements and acceptance scenarios.",+ "crosscutting_requirement_ids": [+ "NK-001",+ "NK-002",+ "NK-003",+ "NK-004",+ "NK-005",+ "NK-006",+ "NK-007",+ "NK-008",+ "NK-009",+ "NK-010",+ "NK-011",+ "NK-012",+ "NK-013",+ "NK-014",+ "NK-015",+ "NK-016",+ "NK-017",+ "NK-018",+ "NK-019",+ "NK-020",+ "NK-021",+ "NK-022",+ "NK-023",+ "NK-024",+ "NK-025",+ "NK-026",+ "NK-027",+ "NK-028",+ "NK-029",+ "NK-030",+ "NK-031",+ "NK-032",+ "NK-033",+ "NK-034",+ "NK-035",+ "NK-036",+ "NK-037",+ "NK-038",+ "NK-039",+ "NK-040",+ "NK-041",+ "NK-042",+ "NK-043",+ "NK-044",+ "NK-045",+ "NK-046",+ "NK-047",+ "NK-048",+ "NK-049",+ "NK-050",+ "NK-051",+ "NK-052",+ "NK-053",+ "NK-054",+ "NK-055",+ "NK-056",+ "NK-057",+ "NK-058",+ "NK-059",+ "NK-060",+ "NK-061",+ "NK-062",+ "NK-063",+ "NK-064"+ ],+ "verification_owner": null,+ "implementation_status": "unverified",+ "runtime_status": "not_tested",+ "evidence": []+ }+ ],+ "stages": [+ {+ "id": "T0",+ "outcome": "Baseline paritas dan gate rilis yang dapat dipercaya",+ "dependencies_verbatim": "Snapshot repo",+ "exit_criteria": "Inventaris disetujui secara teknis, finding ditriage, jalur verifikasi dapat direproduksi.",+ "sequence": 0,+ "implementation_status": "unverified",+ "evidence": []+ },+ {+ "id": "T1",+ "outcome": "Onboarding dan kontrak profil run yang konsisten",+ "dependencies_verbatim": "T0",+ "exit_criteria": "Owner lama tetap dapat bekerja; tindakan pertama menghasilkan receipt.",+ "sequence": 1,+ "implementation_status": "unverified",+ "evidence": []+ },+ {+ "id": "T2",+ "outcome": "Identitas organisasi dan storage terpisah",+ "dependencies_verbatim": "T0 dan kontrak T1",+ "exit_criteria": "Login, MFA, membership, grant, serta migrasi diuji; akses silang ditolak.",+ "sequence": 2,+ "implementation_status": "unverified",+ "evidence": []+ },+ {+ "id": "T3",+ "outcome": "Runtime agen tool MCP dan sandbox",+ "dependencies_verbatim": "T1 dan T2 untuk mode tim",+ "exit_criteria": "Profil, ACP, coding, custom tool, OAuth, delegasi, serta batas worker terbukti.",+ "sequence": 3,+ "implementation_status": "unverified",+ "evidence": []+ },+ {+ "id": "T4",+ "outcome": "Knowledge memory skill dan sharing",+ "dependencies_verbatim": "T2 dan kontrak T3",+ "exit_criteria": "Ingestion, proposal, approval, history, publikasi, dan pencabutan konsisten.",+ "sequence": 4,+ "implementation_status": "unverified",+ "evidence": []+ },+ {+ "id": "T5",+ "outcome": "Automation workflow kanal dan delivery",+ "dependencies_verbatim": "T2 T3",+ "exit_criteria": "Scheduler, resume, idempotency, empat kanal, email, dan notifikasi diuji.",+ "sequence": 5,+ "implementation_status": "unverified",+ "evidence": []+ },+ {+ "id": "T6",+ "outcome": "Artifact media dan rapat",+ "dependencies_verbatim": "T2 T3 serta storage T4",+ "exit_criteria": "Hasil privat, berbagi eksplisit, transkripsi, capture, dan impor rapat bekerja.",+ "sequence": 6,+ "implementation_status": "unverified",+ "evidence": []+ },+ {+ "id": "T7",+ "outcome": "Plugin portabilitas desktop dan rilis paritas",+ "dependencies_verbatim": "Domain terkait selesai",+ "exit_criteria": "Restore, agent pack, plugin lifecycle, platform matrix, dan semua acceptance tercapai.",+ "sequence": 7,+ "implementation_status": "unverified",+ "evidence": []+ }+ ],+ "acceptance_scenarios": [+ {+ "id": "A01",+ "title": "Instalasi dan migrasi owner",+ "expected_outcome": "Instalasi baru menyelesaikan pekerjaan pertama. Migrasi mempertahankan proyek, file, konfigurasi, workflow, perangkat dan managed apps; manifest cocok, pergantian routing konsisten, dan prosedur pemulihan berhasil tanpa membuang penulisan baru.",+ "requirements": [+ "NK-001",+ "NK-055"+ ],+ "packages": [+ "PK03",+ "PK06",+ "PK21",+ "PK22"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A02",+ "title": "Undangan dan membership",+ "expected_outcome": "Undangan sah dapat diterima. Undangan kedaluwarsa, dicabut atau digunakan ulang ditolak. Perubahan peran serta penghapusan anggota segera memengaruhi sesi, daftar resource dan tindakan berikutnya.",+ "requirements": [+ "NK-002",+ "NK-005",+ "NK-006"+ ],+ "packages": [+ "PK04",+ "PK05",+ "PK06"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A03",+ "title": "Login MFA dan recovery",+ "expected_outcome": "Uji password, passkey dengan authenticator nyata, TOTP, backup code, reset dan recovery. Challenge serta kode sekali pakai tidak dapat dipakai ulang. Enrollment, penonaktifan dan pemulihan tercatat tanpa membocorkan secret.",+ "requirements": [+ "NK-002",+ "NK-003",+ "NK-004",+ "NK-058"+ ],+ "packages": [+ "PK04",+ "PK05",+ "PK06",+ "PK23"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A04",+ "title": "Peran dan semua transport",+ "expected_outcome": "Uji izin melalui UI dan panggilan API langsung, lalu transport CLI, MCP, channel dan worker yang relevan. Admin organisasi tidak memperoleh terminal host, secret platform atau data tenant lain. Menyembunyikan menu tidak menggantikan penolakan server.",+ "requirements": [+ "NK-005",+ "NK-006",+ "NK-007",+ "NK-035",+ "NK-062",+ "NK-064"+ ],+ "packages": [+ "PK03",+ "PK05",+ "PK06",+ "PK12",+ "PK14",+ "PK24"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A05",+ "title": "Pemisahan tenant",+ "expected_outcome": "Dengan dua organisasi dan beberapa anggota, coba ID, header, body, pencarian, cache, SSE, attachment, memory, plugin, artifact dan laporan penggunaan milik organisasi lain. Tidak ada isi atau metadata privat yang bocor melalui jalur tersebut.",+ "requirements": [+ "NK-002",+ "NK-005",+ "NK-006",+ "NK-007",+ "NK-008",+ "NK-010",+ "NK-017",+ "NK-018",+ "NK-019",+ "NK-022",+ "NK-023",+ "NK-024",+ "NK-027",+ "NK-034",+ "NK-035",+ "NK-050",+ "NK-051",+ "NK-053",+ "NK-060",+ "NK-061",+ "NK-062",+ "NK-063"+ ],+ "packages": [+ "PK02",+ "PK04",+ "PK05",+ "PK06",+ "PK07",+ "PK08",+ "PK09",+ "PK11",+ "PK12",+ "PK13",+ "PK14",+ "PK17",+ "PK18",+ "PK19",+ "PK20",+ "PK23",+ "PK24"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A06",+ "title": "Pencabutan saat run aktif",+ "expected_outcome": "Cabut sesi, token, membership atau grant ketika run berjalan. Langkah baru ditolak dan lease dihentikan sesuai kemampuan backend. Side effect eksternal yang sudah dikirim ditandai untuk rekonsiliasi; jangan mengklaim pembatalan yang tidak terjadi.",+ "requirements": [+ "NK-003",+ "NK-004",+ "NK-006",+ "NK-012",+ "NK-015",+ "NK-023",+ "NK-030",+ "NK-033",+ "NK-034",+ "NK-044",+ "NK-046",+ "NK-051",+ "NK-055"+ ],+ "packages": [+ "PK04",+ "PK05",+ "PK06",+ "PK07",+ "PK08",+ "PK10",+ "PK11",+ "PK13",+ "PK15",+ "PK16",+ "PK17",+ "PK18",+ "PK21",+ "PK22"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A07",+ "title": "Siklus hidup profil agen",+ "expected_outcome": "Buat, ubah, clone, pindahkan, ekspor dan impor profil. Model, runtime, instruksi, skill serta referensi koneksi tetap benar setelah restart. Revision dan perubahan dapat ditinjau; konflik penulisan ditangani, credential tidak tersalin otomatis.",+ "requirements": [+ "NK-009",+ "NK-010",+ "NK-038",+ "NK-056"+ ],+ "packages": [+ "PK05",+ "PK06",+ "PK08",+ "PK11",+ "PK13",+ "PK14",+ "PK22"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A08",+ "title": "Percakapan dan pemulihan koneksi",+ "expected_outcome": "Streaming, antrean input, pembatalan, pencarian, pin, rename, branch, kompaksi dan history bekerja. Klien berizin dapat melanjutkan konteks tanpa pesan ganda. Mode sementara mengikuti kebijakan tanpa penulisan history, memory atau skill yang tidak diminta.",+ "requirements": [+ "NK-016",+ "NK-017",+ "NK-018",+ "NK-020",+ "NK-021",+ "NK-057"+ ],+ "packages": [+ "PK06",+ "PK08",+ "PK09",+ "PK10",+ "PK14",+ "PK15",+ "PK23"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A09",+ "title": "Provider dan model nyata",+ "expected_outcome": "Untuk setiap adapter yang diklaim didukung, jalankan request nyata: katalog, autentikasi, refresh bila relevan, streaming, tool call, media yang didukung serta error. Pilihan akun dan batas model terlihat; fixture dan daftar model saja tidak membuktikan integrasi.",+ "requirements": [+ "NK-009",+ "NK-011",+ "NK-012",+ "NK-013"+ ],+ "packages": [+ "PK07",+ "PK08",+ "PK10",+ "PK11",+ "PK13",+ "PK19",+ "PK23"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A10",+ "title": "Tool dan persetujuan",+ "expected_outcome": "Uji operasi file, web, mailbox, dokumen dan data dengan scope benar, input tidak valid serta argumen yang berubah. Persetujuan mengikat actor, resource, payload dan versi. Konten prompt atau hasil tool tidak dapat menaikkan izin; replay ditolak.",+ "requirements": [+ "NK-009",+ "NK-027",+ "NK-028",+ "NK-032",+ "NK-033",+ "NK-047"+ ],+ "packages": [+ "PK07",+ "PK08",+ "PK11",+ "PK13",+ "PK15",+ "PK18",+ "PK19",+ "PK21"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A11",+ "title": "Batas worker dan sandbox",+ "expected_outcome": "Uji akses ke file tenant lain, secret host, socket berprivilege serta jaringan terlarang. Batas CPU, memori, waktu, proses dan output ditegakkan sesuai backend. Sandbox gagal tidak menyebabkan pekerjaan anggota organisasi dijalankan di host.",+ "requirements": [+ "NK-013",+ "NK-014",+ "NK-027",+ "NK-028",+ "NK-030",+ "NK-031",+ "NK-032",+ "NK-036",+ "NK-048",+ "NK-059"+ ],+ "packages": [+ "PK01",+ "PK06",+ "PK07",+ "PK10",+ "PK11",+ "PK14",+ "PK18",+ "PK19",+ "PK21",+ "PK23",+ "PK24"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A12",+ "title": "Coding harness dan worktree",+ "expected_outcome": "Setiap harness yang didukung mengerjakan perubahan pada workspace yang benar. Uji proses putus, worker mati dan reconnect. Pisahkan riwayat sesi dari proses hidup; status tidak mengklaim PID atau kemampuan melanjutkan yang sudah hilang.",+ "requirements": [+ "NK-013",+ "NK-014",+ "NK-030",+ "NK-057"+ ],+ "packages": [+ "PK07",+ "PK09",+ "PK10",+ "PK11",+ "PK14",+ "PK23"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A13",+ "title": "MCP dan Composio",+ "expected_outcome": "Hubungkan akun nyata, sinkronkan schema, panggil tool berizin, lalu uji timeout, token refresh, scope berkurang dan revoke. Akun pengguna tidak berganti ke koneksi admin. Transport MCP stdio dan HTTP diuji menurut cakupan yang dinyatakan.",+ "requirements": [+ "NK-012",+ "NK-013",+ "NK-026",+ "NK-028",+ "NK-029",+ "NK-033",+ "NK-034",+ "NK-054"+ ],+ "packages": [+ "PK06",+ "PK07",+ "PK08",+ "PK10",+ "PK11",+ "PK13",+ "PK17",+ "PK18",+ "PK19",+ "PK20",+ "PK22"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A14",+ "title": "Custom tool dan plugin",+ "expected_outcome": "Tinjau source, hash, versi dan izin; setujui eksekusi uji sebelum menjalankan playground terisolasi dengan credential uji yang diizinkan. Lalu aktifkan paket. Uji update, perubahan permission, disable, uninstall serta pemulihan versi. Kode yang belum disetujui tetap tidak aktif.",+ "requirements": [+ "NK-032",+ "NK-036",+ "NK-048",+ "NK-049",+ "NK-056"+ ],+ "packages": [+ "PK06",+ "PK07",+ "PK08",+ "PK11",+ "PK14",+ "PK21",+ "PK22"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A15",+ "title": "Skill belajar dan history",+ "expected_outcome": "Buat dan impor bundle, jalankan manual dan otomatis, hasilkan proposal belajar dari sumber yang didukung, lalu setujui atau tolak. History, diff, restore, usage dan curator bekerja. Persetujuan terikat digest konten; archive tidak menghapus data tanpa kontrak jelas.",+ "requirements": [+ "NK-025",+ "NK-035",+ "NK-036",+ "NK-037",+ "NK-038",+ "NK-039",+ "NK-049",+ "NK-057",+ "NK-063"+ ],+ "packages": [+ "PK05",+ "PK07",+ "PK09",+ "PK10",+ "PK11",+ "PK12",+ "PK13",+ "PK14",+ "PK17",+ "PK21",+ "PK23"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A16",+ "title": "Memory dan knowledge",+ "expected_outcome": "Uji upload, ZIP, ekstraksi, pencarian, replace, hapus, wiki turunan dan backend opsional. Memory pribadi, profil dan organisasi menjaga sumber, proposal, approval serta undo. Resource yang dicabut tidak muncul lagi dalam retrieval atau konteks baru.",+ "requirements": [+ "NK-007",+ "NK-018",+ "NK-022",+ "NK-023",+ "NK-024",+ "NK-025",+ "NK-026",+ "NK-037",+ "NK-063"+ ],+ "packages": [+ "PK05",+ "PK06",+ "PK08",+ "PK09",+ "PK11",+ "PK12",+ "PK13",+ "PK14",+ "PK17",+ "PK18",+ "PK22"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A17",+ "title": "Empat kanal komunikasi",+ "expected_outcome": "Telegram, WhatsApp, Discord dan Slack masing-masing menerima pesan nyata, memetakan pengguna dan agen yang benar, lalu mengirim balasan serta artifact dengan ID provider. Uji DM, grup atau thread sesuai adapter, pairing, allowlist dan restart tanpa pesan ganda.",+ "requirements": [+ "NK-040",+ "NK-041",+ "NK-042",+ "NK-043"+ ],+ "packages": [+ "PK16",+ "PK17",+ "PK19"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A18",+ "title": "Webhook dan idempotency",+ "expected_outcome": "Uji signature atau secret yang tepat, request palsu, replay, kunci kedaluwarsa, rotasi dan target tenant salah. Idempotency key mengikat tujuan serta payload; pengiriman ulang tidak menyebabkan side effect yang tidak terkontrol.",+ "requirements": [+ "NK-040",+ "NK-042",+ "NK-044"+ ],+ "packages": [+ "PK16",+ "PK17",+ "PK19"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A19",+ "title": "Scheduler dan waktu",+ "expected_outcome": "Uji manual, cron dengan timezone, jadwal satu kali, enable atau disable, overlap dan restart. Perubahan waktu serta jadwal terlewat memiliki aturan catch up atau skip yang terlihat. Dua worker tidak mengambil pekerjaan yang sama tanpa perlindungan.",+ "requirements": [+ "NK-045"+ ],+ "packages": [+ "PK15",+ "PK23"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A20",+ "title": "Workflow dan efek eksternal",+ "expected_outcome": "Uji recipe serta graph dengan kegagalan sebelum dispatch, setelah provider menerima, dan sebelum hasil disimpan. Receipt, checkpoint, lease serta idempotency menjaga status. Efek yang belum pasti direkonsiliasi; resume tidak mengulang tindakan eksternal secara buta.",+ "requirements": [+ "NK-045",+ "NK-046",+ "NK-047"+ ],+ "packages": [+ "PK15",+ "PK17",+ "PK23"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A21",+ "title": "Subagent paralel",+ "expected_outcome": "Delegasi beberapa tugas menghormati batas konteks, otoritas, jumlah child, durasi dan biaya. Progres, kegagalan sebagian, timeout dan cancel sampai ke parent. Hasil menyertakan asal; penulisan bersama tidak saling merusak atau melintasi tenant.",+ "requirements": [+ "NK-015"+ ],+ "packages": [+ "PK10",+ "PK15"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A22",+ "title": "Notifikasi dan pengiriman hasil",+ "expected_outcome": "Kirim ke tujuan email dan kanal yang dikonfigurasi, lalu verifikasi receipt provider serta tujuan yang benar. Rate limit, credential kedaluwarsa dan timeout menghasilkan status akurat. Retry tidak menyamakan hasil run berhasil dengan delivery berhasil.",+ "requirements": [+ "NK-029",+ "NK-040",+ "NK-041",+ "NK-043",+ "NK-044",+ "NK-046",+ "NK-052",+ "NK-063"+ ],+ "packages": [+ "PK11",+ "PK13",+ "PK14",+ "PK15",+ "PK16",+ "PK17",+ "PK18",+ "PK19",+ "PK23"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A23",+ "title": "Pertanyaan dan daftar tugas",+ "expected_outcome": "Questionnaire dan todo mengacu pada pertanyaan, pengguna serta sesi yang tepat. Jawaban, perubahan progres dan reconnect tersimpan; pengiriman jawaban ulang tidak melanjutkan pekerjaan dua kali atau menjawab pertanyaan sesi lain.",+ "requirements": [+ "NK-020",+ "NK-037",+ "NK-049"+ ],+ "packages": [+ "PK09",+ "PK11",+ "PK13",+ "PK14",+ "PK15",+ "PK21"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A24",+ "title": "Attachment gambar dan audio",+ "expected_outcome": "Unggah tipe yang didukung, jalankan vision, transkripsi dan image generation nyata, lalu buka artifact hasil. MIME, isi, ukuran, izin dan batas model benar. Clipboard serta delivery diuji pada klien yang mendukung; file kosong tidak dianggap hasil.",+ "requirements": [+ "NK-011",+ "NK-019",+ "NK-024",+ "NK-027",+ "NK-029",+ "NK-031",+ "NK-040",+ "NK-041",+ "NK-042",+ "NK-043",+ "NK-052",+ "NK-053",+ "NK-054"+ ],+ "packages": [+ "PK05",+ "PK07",+ "PK08",+ "PK09",+ "PK11",+ "PK12",+ "PK16",+ "PK17",+ "PK18",+ "PK19",+ "PK20",+ "PK23"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A25",+ "title": "Google Meet dan impor rapat",+ "expected_outcome": "Dengan izin tab dan mikrofon yang jelas, mulai serta hentikan capture extension, lihat indikator dan transkrip, lalu uji koneksi putus. Impor Markdown, audio dan rekaman Gmail atau Drive memakai akun yang dipilih. Tool agen hanya membaca rapat berizin.",+ "requirements": [+ "NK-053",+ "NK-054"+ ],+ "packages": [+ "PK07",+ "PK11",+ "PK18",+ "PK19",+ "PK20"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A26",+ "title": "Artifact dan snapshot publik",+ "expected_outcome": "Buat, cari, filter, preview, edit dan unduh artifact sesuai hak. Publikasi membuat snapshot eksplisit; perubahan privat tidak otomatis terbit. Uji kedaluwarsa, revoke dan pembaruan snapshot. HTML atau SVG aktif tidak memperoleh akses aplikasi utama.",+ "requirements": [+ "NK-050",+ "NK-051"+ ],+ "packages": [+ "PK06",+ "PK18"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A27",+ "title": "Portabilitas dan restore",+ "expected_outcome": "Pulihkan backup pada lingkungan kosong dengan manifest, checksum dan jumlah record yang cocok. Uji export pengguna, organisasi serta agent pack secara terpisah. Data plugin, media dan credential memiliki cakupan terlihat; kegagalan restore dapat dipulihkan, koneksi yang tidak dibawa meminta autentikasi ulang.",+ "requirements": [+ "NK-022",+ "NK-026",+ "NK-048",+ "NK-055",+ "NK-056"+ ],+ "packages": [+ "PK06",+ "PK07",+ "PK08",+ "PK11",+ "PK13",+ "PK21",+ "PK22"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A28",+ "title": "Usage quota dan optimasi konteks",+ "expected_outcome": "Bedakan token aktual, estimasi dan biaya tidak diketahui. Uji batas lunak dan keras, banyak run bersamaan, retry serta streaming terputus tanpa perhitungan ganda. Hasil optimizer dapat dipulihkan; byte yang dipangkas tidak otomatis disebut token atau uang yang dihemat.",+ "requirements": [+ "NK-008",+ "NK-011",+ "NK-021",+ "NK-039",+ "NK-045",+ "NK-052",+ "NK-060"+ ],+ "packages": [+ "PK02",+ "PK06",+ "PK08",+ "PK09",+ "PK14",+ "PK15",+ "PK17",+ "PK18",+ "PK19",+ "PK23",+ "PK24"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A29",+ "title": "Web CLI mobile dan desktop",+ "expected_outcome": "Untuk setiap OS serta arsitektur yang dinyatakan didukung, verifikasi instalasi, update, pemulihan update, login, chat, tool, file dan notifikasi. Uji keyboard, ukuran layar, reconnect dan remote CLI. Keberhasilan build saja tidak membuktikan installer dapat dipakai.",+ "requirements": [+ "NK-001",+ "NK-016",+ "NK-019",+ "NK-057",+ "NK-058",+ "NK-059",+ "NK-061",+ "NK-064"+ ],+ "packages": [+ "PK01",+ "PK03",+ "PK04",+ "PK06",+ "PK07",+ "PK08",+ "PK09",+ "PK10",+ "PK14",+ "PK18",+ "PK19",+ "PK22",+ "PK23",+ "PK24"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ },+ {+ "id": "A30",+ "title": "Regresi dan operasi MSO",+ "expected_outcome": "Pastikan terminal, file, proyek, workflow, managed apps, gateway, DNS, MCP, update, backup dan observability yang sudah ada tetap berfungsi. Uji disk penuh, worker crash serta provider tidak tersedia; health dan log mencerminkan keadaan nyata tanpa secret.",+ "requirements": [+ "NK-014",+ "NK-031",+ "NK-058",+ "NK-059",+ "NK-060",+ "NK-061",+ "NK-062"+ ],+ "packages": [+ "PK01",+ "PK02",+ "PK04",+ "PK06",+ "PK07",+ "PK10",+ "PK19",+ "PK23",+ "PK24"+ ],+ "status": "not_run",+ "verification_owner": null,+ "candidate_commit": null,+ "evidence": []+ }+ ],+ "compatibility_matrix": [+ {+ "area": "Model dan media",+ "draft_baseline_text_verbatim": "Katalog bawaan serta discovery dinamis; Netra membatasi model agent pada deepseek/deepseek-v4-flash-0731 di snapshot ini. Sumber",+ "target_contract": "Uji akun, katalog, chat, streaming, tool call, reasoning, context limit, usage dan error per adapter. Vision, audio dan image generation hanya diklaim pada konfigurasi yang mendukung.",+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/providers/model-catalog.ts",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/providers/model-catalog.ts",+ "line_fragment": null,+ "label": "Sumber",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "area": "MCP",+ "draft_baseline_text_verbatim": "stdio dan Streamable HTTP; OAuth baseline memakai dynamic client registration. Grant berada pada record server dan dipakai profil yang diberi assignment. Sumber",+ "target_contract": "Uji kedua transport, discovery, test, sync, import serta revocation. Target grant MSO harus eksplisit per pengguna atau organisasi. Dukungan tools tidak otomatis menyatakan resources atau prompts lengkap.",+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/mcp.mdx#L170-L203",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/mcp.mdx",+ "line_fragment": "L170-L203",+ "label": "Sumber",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "area": "ACP dan coding",+ "draft_baseline_text_verbatim": "ACP claude dan codex; harness codex, claude_code, opencode, pi, cursor_agent. Sumber",+ "target_contract": "Uji kelima harness dan kedua preset ACP sesuai kontrak runtime. Kredensial, proses hidup, worktree dan sandbox diperiksa masing-masing.",+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/coding-agent-command.ts#L93-L242",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/coding-agent-command.ts",+ "line_fragment": "L93-L242",+ "label": "Sumber",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "area": "Shell",+ "draft_baseline_text_verbatim": "host dan microsandbox; network off atau public. Coding harness ditolak oleh backend microsandbox baseline. Sumber",+ "target_contract": "Mode host memerlukan otoritas host. Tenant hanya memakai backend isolasi yang terbukti mendukung adapter terkait.",+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/tools/bash.ts#L226-L242",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/tools/bash.ts",+ "line_fragment": "L226-L242",+ "label": "Sumber",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "area": "Telegram dan Discord",+ "draft_baseline_text_verbatim": "Telegram memakai Bot API polling dengan DM, grup dan forum topic; Discord memakai Gateway dengan DM, server dan thread. Telegram · Discord",+ "target_contract": "Lengkapi transport yang menghasilkan pengalaman setara, mapping sesi, perintah, pairing, allowlist dan attachment. Batas format serta ukuran diperiksa per kanal; dukungan webhook tidak otomatis memenuhi Gateway atau thread.",+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/platform/telegram/src/index.ts#L135-L209",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/platform/telegram/src/index.ts",+ "line_fragment": "L135-L209",+ "label": "Telegram",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/platform/discord/src/bot.ts#L26-L66",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/platform/discord/src/bot.ts",+ "line_fragment": "L26-L66",+ "label": "Discord",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "area": "WhatsApp dan Slack",+ "draft_baseline_text_verbatim": "WhatsApp memakai linked device dengan QR atau code; Slack memakai Socket Mode, DM dan mention thread. WhatsApp · Slack",+ "target_contract": "Verifikasi sambungan, pemulihan, DM atau grup, command, pairing serta delivery nyata. Mode anggota workspace Slack membedakan tamu dan pengguna eksternal.",+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/platform/whatsapp/package.json#L10-L15",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/platform/whatsapp/package.json",+ "line_fragment": "L10-L15",+ "label": "WhatsApp",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/platform/slack/src/socket.ts#L28-L38",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/platform/slack/src/socket.ts",+ "line_fragment": "L28-L38",+ "label": "Slack",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "area": "Desktop macOS",+ "draft_baseline_text_verbatim": "Source target macOS 15 atau lebih baru, arm64, DMG dan ZIP. Sumber",+ "target_contract": "Buktikan installer, persistent data, lifecycle server, update dan restart. Permission desktop untuk media tidak diasumsikan sama dengan Chrome.",+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/desktop/electron-builder.yml#L24-L37",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/desktop/electron-builder.yml",+ "line_fragment": "L24-L37",+ "label": "Sumber",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "area": "Desktop Windows",+ "draft_baseline_text_verbatim": "Source target Windows 10 build 19041 atau lebih baru dan Windows 11, x64, NSIS. Distribusi installer bertanda tangan belum dibuktikan oleh audit ini. Sumber",+ "target_contract": "Publikasi installer dan pengujian instalasi menjadi pekerjaan tersendiri. MSIX untuk Store tidak otomatis menjadi installer publik. Linux, Intel macOS dan native mobile memerlukan perluasan target jika dipilih.",+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/desktop/README.md#L5-L34",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/desktop/README.md",+ "line_fragment": "L5-L34",+ "label": "Sumber",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "runtime_status": "not_tested",+ "evidence": []+ },+ {+ "area": "Web dan PWA",+ "draft_baseline_text_verbatim": "Manifest, shell offline dan prompt update tersedia; API serta sesi privat tidak dianggap cache offline. Sumber",+ "target_contract": "Uji instalasi standalone, update dengan persetujuan reload, logout atau pergantian pengguna, serta pembersihan cache. Agent inference offline bukan bagian dari bukti baseline ini.",+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/web/src/lib/sw-strategy.ts#L8-L85",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/web/src/lib/sw-strategy.ts",+ "line_fragment": "L8-L85",+ "label": "Sumber",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "runtime_status": "not_tested",+ "evidence": []+ }+ ],+ "variant_checklists": {+ "providers": [+ {+ "baseline_identifier": "openai",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "anthropic",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "openrouter",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "gemini",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "deepseek",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "netra",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "doubao",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "mistral",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "perplexity",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "cerebras",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "fireworks",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "ollama",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "openai_compatible",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "opencode_go",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "cloudflare",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "chatgpt",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "xai_oauth",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "minimax",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "minimax_cn",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "moonshot",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "moonshot_cn",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "zhipu",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "zhipu_cn",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "xai",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "groq",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "together",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "xiaomi",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "meta",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "qwen",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "qwen_cn",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ },+ {+ "baseline_identifier": "vercel_ai_gateway",+ "mso_adapter_identifier": null,+ "requirements": [+ "NK-011"+ ],+ "acceptance": [+ "A09",+ "A24",+ "A28"+ ],+ "configured": null,+ "supported_capabilities": [],+ "test_dimensions": [+ "account_selection",+ "authentication",+ "catalog",+ "chat",+ "streaming",+ "tool_call",+ "reasoning_if_supported",+ "context_limit",+ "usage",+ "provider_error"+ ],+ "optional_media_dimensions": [+ "vision_if_supported",+ "audio_if_supported",+ "image_generation_if_supported"+ ],+ "status": "not_tested",+ "candidate_commit": null,+ "evidence": []+ }+ ],+ "provider_notes": [+ "Kontrak baseline mencantumkan 31 identifier provider berikut. Daftar ini adalah target adapter dan konfigurasi, bukan klaim seluruh model atau seluruh provider telah berhasil diuji. Varian regional tetap memiliki endpoint dan credential terpisah. Kontrak provider dan factory provider.",+ "Nama adapter MSO boleh berbeda jika perilaku setara dan bukti dinyatakan; varian regional tidak digabungkan sebagai satu hasil uji.",+ "Kontrak Netra pada snapshot draft membatasi model agent ke deepseek/deepseek-v4-flash-0731; status akun dan akses model tetap perlu uji nyata."+ ],+ "provider_sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/packages/core/src/contract.ts#L2908-L2939",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "packages/core/src/contract.ts",+ "line_fragment": "L2908-L2939",+ "label": "Kontrak provider",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/providers/create.ts#L69-L404",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/providers/create.ts",+ "line_fragment": "L69-L404",+ "label": "factory provider",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "mcp": {+ "baseline_transports": [+ "stdio",+ "streamable_http"+ ],+ "baseline_oauth_registration": "dynamic_client_registration",+ "baseline_grant_location": "server_record_assigned_to_profiles",+ "target_grant_scope": "explicit_user_or_organization",+ "requirements": [+ "NK-033"+ ],+ "acceptance": [+ "A13",+ "A10",+ "A06"+ ],+ "test_dimensions": [+ "transport",+ "discovery",+ "test_connection",+ "sync_schema",+ "import",+ "oauth",+ "refresh",+ "rotation",+ "pagination",+ "revocation",+ "stdio_process_isolation"+ ],+ "resources_and_prompts_status": "not_implied_by_tool_support"+ },+ "acp": [+ {+ "preset": "claude",+ "requirements": [+ "NK-013"+ ],+ "acceptance": [+ "A09",+ "A11",+ "A12",+ "A13"+ ],+ "test_dimensions": [+ "authentication",+ "model",+ "reasoning",+ "session_tool_bridge",+ "permission_propagation",+ "process_status",+ "cancel",+ "workspace_isolation"+ ],+ "status": "not_tested",+ "evidence": []+ },+ {+ "preset": "codex",+ "requirements": [+ "NK-013"+ ],+ "acceptance": [+ "A09",+ "A11",+ "A12",+ "A13"+ ],+ "test_dimensions": [+ "authentication",+ "model",+ "reasoning",+ "session_tool_bridge",+ "permission_propagation",+ "process_status",+ "cancel",+ "workspace_isolation"+ ],+ "status": "not_tested",+ "evidence": []+ }+ ],+ "coding_harnesses": [+ {+ "harness": "codex",+ "requirements": [+ "NK-014"+ ],+ "acceptance": [+ "A12",+ "A11",+ "A30"+ ],+ "test_dimensions": [+ "installation",+ "provider_passthrough_or_harness_login",+ "input",+ "output",+ "crash",+ "cancel",+ "cleanup",+ "worktree_identity",+ "process_sandbox"+ ],+ "status": "not_tested",+ "evidence": []+ },+ {+ "harness": "claude_code",+ "requirements": [+ "NK-014"+ ],+ "acceptance": [+ "A12",+ "A11",+ "A30"+ ],+ "test_dimensions": [+ "installation",+ "provider_passthrough_or_harness_login",+ "input",+ "output",+ "crash",+ "cancel",+ "cleanup",+ "worktree_identity",+ "process_sandbox"+ ],+ "status": "not_tested",+ "evidence": []+ },+ {+ "harness": "opencode",+ "requirements": [+ "NK-014"+ ],+ "acceptance": [+ "A12",+ "A11",+ "A30"+ ],+ "test_dimensions": [+ "installation",+ "provider_passthrough_or_harness_login",+ "input",+ "output",+ "crash",+ "cancel",+ "cleanup",+ "worktree_identity",+ "process_sandbox"+ ],+ "status": "not_tested",+ "evidence": []+ },+ {+ "harness": "pi",+ "requirements": [+ "NK-014"+ ],+ "acceptance": [+ "A12",+ "A11",+ "A30"+ ],+ "test_dimensions": [+ "installation",+ "provider_passthrough_or_harness_login",+ "input",+ "output",+ "crash",+ "cancel",+ "cleanup",+ "worktree_identity",+ "process_sandbox"+ ],+ "status": "not_tested",+ "evidence": []+ },+ {+ "harness": "cursor_agent",+ "requirements": [+ "NK-014"+ ],+ "acceptance": [+ "A12",+ "A11",+ "A30"+ ],+ "test_dimensions": [+ "installation",+ "provider_passthrough_or_harness_login",+ "input",+ "output",+ "crash",+ "cancel",+ "cleanup",+ "worktree_identity",+ "process_sandbox"+ ],+ "status": "not_tested",+ "evidence": []+ }+ ],+ "shell": {+ "baseline_backends": [+ "host",+ "microsandbox"+ ],+ "baseline_network_modes": [+ "off",+ "public"+ ],+ "baseline_coding_harness_with_microsandbox": "rejected",+ "requirements": [+ "NK-030",+ "NK-014"+ ],+ "acceptance": [+ "A11",+ "A12",+ "A06"+ ],+ "target_rule": "host_requires_host_authority_and_tenant_execution_requires_a_verified_isolation_backend_for_the_selected_adapter"+ },+ "channels": [+ {+ "channel": "telegram",+ "requirements": [+ "NK-040"+ ],+ "baseline_transport": "bot_api_polling",+ "conversation_types": [+ "dm",+ "group",+ "forum_topic"+ ],+ "acceptance": [+ "A17",+ "A24",+ "A22"+ ],+ "test_dimensions": [+ "real_inbound",+ "identity_mapping",+ "commands",+ "pairing",+ "allowlist",+ "attachment",+ "real_delivery_id",+ "reconnect",+ "deduplication",+ "revoke"+ ],+ "status": "not_tested",+ "evidence": []+ },+ {+ "channel": "whatsapp",+ "requirements": [+ "NK-041"+ ],+ "baseline_transport": "linked_device",+ "authentication": [+ "qr",+ "code"+ ],+ "conversation_types": [+ "dm",+ "group"+ ],+ "acceptance": [+ "A17",+ "A24",+ "A22"+ ],+ "test_dimensions": [+ "real_inbound",+ "identity_mapping",+ "commands",+ "pairing",+ "allowlist",+ "attachment",+ "real_delivery_id",+ "reconnect",+ "deduplication",+ "revoke"+ ],+ "status": "not_tested",+ "evidence": []+ },+ {+ "channel": "discord",+ "requirements": [+ "NK-042"+ ],+ "baseline_transport": "gateway",+ "conversation_types": [+ "dm",+ "server",+ "thread"+ ],+ "acceptance": [+ "A17",+ "A24",+ "A22"+ ],+ "test_dimensions": [+ "real_inbound",+ "identity_mapping",+ "commands",+ "pairing",+ "allowlist",+ "attachment",+ "real_delivery_id",+ "reconnect",+ "deduplication",+ "revoke"+ ],+ "status": "not_tested",+ "evidence": []+ },+ {+ "channel": "slack",+ "requirements": [+ "NK-043"+ ],+ "baseline_transport": "socket_mode",+ "conversation_types": [+ "dm",+ "mention_thread"+ ],+ "workspace_member_policy_dimensions": [+ "member",+ "guest",+ "external_user"+ ],+ "acceptance": [+ "A17",+ "A24",+ "A22"+ ],+ "test_dimensions": [+ "real_inbound",+ "identity_mapping",+ "commands",+ "pairing",+ "allowlist",+ "attachment",+ "real_delivery_id",+ "reconnect",+ "deduplication",+ "revoke"+ ],+ "status": "not_tested",+ "evidence": []+ }+ ],+ "formats": [+ {+ "area": "knowledge",+ "requirements": [+ "NK-024"+ ],+ "formats": [+ "txt",+ "markdown",+ "csv",+ "pdf",+ "docx"+ ],+ "import_container": "zip"+ },+ {+ "area": "custom_tool",+ "requirements": [+ "NK-032"+ ],+ "languages": [+ "javascript",+ "python"+ ]+ },+ {+ "area": "artifact_edit",+ "requirements": [+ "NK-050"+ ],+ "formats": [+ "markdown",+ "csv"+ ]+ },+ {+ "area": "active_artifact_preview",+ "requirements": [+ "NK-051"+ ],+ "formats": [+ "html",+ "svg"+ ],+ "constraint": "separate_origin_or_sandbox_without_main_app_authority"+ },+ {+ "area": "image_generation",+ "requirements": [+ "NK-052"+ ],+ "output_formats": [+ "png"+ ],+ "sizes": "provider_and_allowlist_specific_pending_source_audit"+ },+ {+ "area": "meeting_import",+ "requirements": [+ "NK-054"+ ],+ "inputs": [+ "markdown",+ "audio",+ "gmail_drive_recording",+ "video"+ ],+ "precise_mime_size_duration_limits": "pending_adapter_contract"+ }+ ],+ "platforms": [+ {+ "platform": "macos",+ "minimum_version": "15",+ "architecture": "arm64",+ "baseline_package_targets": [+ "dmg",+ "zip"+ ],+ "requirements": [+ "NK-058"+ ],+ "acceptance": [+ "A29",+ "A03",+ "A30"+ ],+ "installer_availability": "unverified",+ "status": "not_tested"+ },+ {+ "platform": "windows",+ "minimum_version": "10 build 19041",+ "additional_version": "11",+ "architecture": "x64",+ "baseline_package_targets": [+ "nsis"+ ],+ "requirements": [+ "NK-058"+ ],+ "acceptance": [+ "A29",+ "A03",+ "A30"+ ],+ "signed_installer_distribution": "unverified",+ "status": "not_tested"+ },+ {+ "platform": "web_pwa",+ "baseline_capabilities": [+ "manifest",+ "offline_shell",+ "update_prompt"+ ],+ "requirements": [+ "NK-061"+ ],+ "acceptance": [+ "A29",+ "A05",+ "A30"+ ],+ "private_api_cache": "not_inferred",+ "offline_model_inference": "not_in_scope_of_baseline_evidence",+ "status": "not_tested"+ },+ {+ "platform": "local_remote_cli",+ "requirements": [+ "NK-057"+ ],+ "acceptance": [+ "A29",+ "A08",+ "A12",+ "A15"+ ],+ "test_dimensions": [+ "org",+ "profile",+ "model",+ "reasoning",+ "manual_skill",+ "clipboard_image_if_supported",+ "token_rotation",+ "streaming",+ "approval",+ "reconnect",+ "server_workspace_identity"+ ],+ "status": "not_tested"+ }+ ],+ "additional_platforms": {+ "targets": [+ "linux_desktop_installer",+ "intel_macos",+ "native_mobile"+ ],+ "status": "scope_extension_if_chosen_not_an_existing_baseline_installer_claim"+ }+ },+ "additional_subfeatures": [+ {+ "description": "Dua rincian tambahan tetap masuk checklist: pengguna dapat menyunting USER.md setelah onboarding, dan tool list_profile_sessions serta read_profile_session tersedia secara opt in untuk profil supervisi dengan pemeriksaan akses. Batas tersebut tidak memberikan akses umum ke semua percakapan. Konteks pengguna · Tool sesi.",+ "mapping_note": "PK01 mencatat subfitur ini di bawah NK001, NK006, NK009, NK015, NK027 dan NK057, lalu menambahkan subtest yang relevan ke A04, A05, A07, A08 dan A21. Tidak diperlukan identifier provider atau bentuk arsitektur internal yang sama apabila adapter MSO memberikan perilaku setara dan buktinya jelas.",+ "draft_combined_requirement_mapping": [+ "NK-001",+ "NK-006",+ "NK-009",+ "NK-015",+ "NK-027",+ "NK-057"+ ],+ "draft_combined_acceptance_mapping": [+ "A04",+ "A05",+ "A07",+ "A08",+ "A21"+ ],+ "named_capabilities": [+ "post_onboarding_USER.md_edit",+ "list_profile_sessions_opt_in",+ "read_profile_session_opt_in"+ ],+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/user-context.ts#L40-L99",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/user-context.ts",+ "line_fragment": "L40-L99",+ "label": "Konteks pengguna",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/tools/session-tools.ts#L107-L215",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/tools/session-tools.ts",+ "line_fragment": "L107-L215",+ "label": "Tool sesi",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "status": "not_tested",+ "evidence": []+ }+ ],+ "cross_stage_dependencies": [+ {+ "id": "DEP-01",+ "package": "PK07",+ "requires_before": "organization_member_execution",+ "kind": "security_gate",+ "draft_text": "PK07 adalah prasyarat akses eksekusi untuk anggota organisasi.",+ "source_block": 66+ },+ {+ "id": "DEP-02",+ "package": "PK18",+ "requires_before_packages": [+ "PK09",+ "PK15",+ "PK20"+ ],+ "kind": "early_schema_and_api_contract",+ "stage_label_does_not_delay_contract": true,+ "source_block": 66+ },+ {+ "id": "DEP-03",+ "package": "PK23",+ "requires_during_stages": [+ "T2",+ "T3"+ ],+ "kind": "early_quota_enforcement",+ "later_deliverable": "T7_usage_UI_and_reporting",+ "source_block": 66+ },+ {+ "id": "DEP-04",+ "parallel_stages": [+ "T4",+ "T5",+ "T6"+ ],+ "requires": [+ "stable_identity_contract",+ "stable_execution_contract",+ "stable_storage_contract",+ "stable_artifact_contract"+ ],+ "kind": "parallelism_gate",+ "draft_text": "Pekerjaan T4, T5, dan T6 dapat berjalan paralel setelah kontrak identitas, eksekusi, storage, serta artifact stabil. Paritas penuh baru dinyatakan setelah seluruh kebutuhan pada lampiran mempunyai bukti. Rilis antara diberi label parsial beserta cakupannya.",+ "source_block": 62+ },+ {+ "id": "DEP-05",+ "requires_before": "full_parity_release",+ "requires": [+ "all_requirement_evidence",+ "all_claimed_provider_verification",+ "migration_drill",+ "restore_drill",+ "support_documentation",+ "same_candidate_commit_quality_gates"+ ],+ "kind": "release_gate",+ "source_blocks": [+ 99,+ 100+ ]+ }+ ],+ "external_dependencies": [+ {+ "capability": "Model chat dan coding",+ "dependency": "Provider atau runtime yang dipilih, kredensial dan konektivitas",+ "unavailable_behavior": "Tampilkan akun dan model yang belum siap, beserta langkah konfigurasi."+ },+ {+ "capability": "MCP dan Composio",+ "dependency": "Server atau project provider, OAuth dan scope",+ "unavailable_behavior": "Tandai koneksi belum terhubung atau kedaluwarsa; jangan berganti akun diam-diam."+ },+ {+ "capability": "Telegram Discord Slack WhatsApp",+ "dependency": "Adapter, akun atau bot, izin, worker dan transport yang sesuai",+ "unavailable_behavior": "Tampilkan health per kanal dan hentikan delivery yang tidak valid."+ },+ {+ "capability": "Email",+ "dependency": "Provider email terpilih, sender yang valid dan recipient yang tepat",+ "unavailable_behavior": "Bedakan kegagalan eksekusi dari kegagalan pengiriman."+ },+ {+ "capability": "Rapat dan audio",+ "dependency": "Provider transkripsi, browser capture atau media sumber",+ "unavailable_behavior": "Simpan status parsial dan jelaskan kemampuan yang belum siap."+ },+ {+ "capability": "Recording import",+ "dependency": "Koneksi Gmail dan Drive atau adapter yang memenuhi kontrak sumber",+ "unavailable_behavior": "Tampilkan rekaman yang dapat diakses oleh pengguna yang benar."+ },+ {+ "capability": "Sandbox",+ "dependency": "Backend yang didukung, mount dan network policy",+ "unavailable_behavior": "Tolak pekerjaan tenant jika sandbox tidak tersedia; tidak fallback ke host."+ },+ {+ "capability": "Desktop",+ "dependency": "Build target, penandatanganan, channel distribusi dan update",+ "unavailable_behavior": "Tampilkan hanya platform yang benar-benar didukung dan telah diverifikasi."+ }+ ],+ "conceptual_data_domains": [+ {+ "domain": "Identitas",+ "resources": "Principal, Organization, Team, Membership, Session, Authenticator",+ "authority_boundary": "Pengguna, organisasi, audience token, status revocation."+ },+ {+ "domain": "Akses",+ "resources": "RoleTemplate, ResourceGrant, Publication, ConnectionGrant",+ "authority_boundary": "Pemberi grant, penerima, resource, revisi, masa berlaku."+ },+ {+ "domain": "Agen",+ "resources": "AgentProfile, RuntimeBinding, ProfileRevision, AgentPack",+ "authority_boundary": "Pemilik profil, runtime, permission, asal impor."+ },+ {+ "domain": "Percakapan",+ "resources": "Conversation, Message, Branch, Attachment",+ "authority_boundary": "Pemilik chat, organisasi, scope berbagi, retention."+ },+ {+ "domain": "Pekerjaan",+ "resources": "AgentRun, WorkflowRun, StepReceipt, DeliveryAttempt, WorkerLease",+ "authority_boundary": "Actor, organisasi, run, idempotency, scope eksekusi."+ },+ {+ "domain": "Pengetahuan",+ "resources": "KnowledgeItem, IngestionJob, MemoryProposal, SkillProposal",+ "authority_boundary": "Provenance, publikasi, revision, persetujuan."+ },+ {+ "domain": "Hasil dan rapat",+ "resources": "Artifact, ArtifactShare, Meeting, Transcript, CaptureGrant",+ "authority_boundary": "Pemilik, akses publik yang eksplisit, masa berlaku, provenance."+ },+ {+ "domain": "Plugin",+ "resources": "PluginRelease, PluginInstallation, PluginData",+ "authority_boundary": "Hash rilis, izin, organisasi, state worker."+ },+ {+ "domain": "Operasional",+ "resources": "UsageEvent, Quota, AuditEvent, BackupManifest",+ "authority_boundary": "Scope data, actual atau estimated, checksum, pemulihan."+ }+ ],+ "definition_of_done": [+ {+ "id": "DOD-01",+ "criterion": "Alur pengguna menyelesaikan tugas utama dan menampilkan hasil nyata.",+ "required_on_same_candidate_commit": true+ },+ {+ "id": "DOD-02",+ "criterion": "Permission diperiksa pada server untuk setiap transport yang mengekspos kemampuan tersebut.",+ "required_on_same_candidate_commit": true+ },+ {+ "id": "DOD-03",+ "criterion": "State tersimpan dalam scope yang tepat dan dapat dipulihkan sesuai kontraknya.",+ "required_on_same_candidate_commit": true+ },+ {+ "id": "DOD-04",+ "criterion": "Kegagalan provider, timeout, pembatalan, revocation, dan input tidak valid menghasilkan status yang benar.",+ "required_on_same_candidate_commit": true+ },+ {+ "id": "DOD-05",+ "criterion": "Tindakan dengan side effect memiliki idempotency atau prosedur rekonsiliasi yang jelas.",+ "required_on_same_candidate_commit": true+ },+ {+ "id": "DOD-06",+ "criterion": "Secret dan data tenant lain tidak masuk ke UI, prompt, artifact, log, export, atau telemetry yang tidak berhak.",+ "required_on_same_candidate_commit": true+ },+ {+ "id": "DOD-07",+ "criterion": "Dokumentasi, konfigurasi, batas platform, dan dependensi sesuai implementasi.",+ "required_on_same_candidate_commit": true+ },+ {+ "id": "DOD-08",+ "criterion": "Pengujian yang relevan, hasil CI, serta verifikasi lingkungan target ditautkan pada kebutuhan.",+ "required_on_same_candidate_commit": true+ }+ ],+ "architecture_contracts": [+ {+ "draft_block_index": 29,+ "text": "Identitas pengguna terpisah dari struktur agen",+ "sources": []+ },+ {+ "draft_block_index": 30,+ "text": "Principal, organisasi pengguna, membership, dan resource grant menjadi domain identitas. Struktur Organization MSO yang memuat unit, seat, dan execution target tetap menjadi struktur kerja agen. Keduanya dihubungkan melalui identifier dan permission yang eksplisit.",+ "sources": []+ },+ {+ "draft_block_index": 31,+ "text": "Peran Viewer, Operator, dan Owner MSO saat ini adalah peran perangkat pada satu deployment. Pada source baseline terdapat tenant preview untuk empat memory tools. Ini belum menyediakan identitas manusia, membership, atau RBAC browser multiuser yang siap digunakan, dan tidak mengaktifkan browser, job, filesystem, atau workflow tenant. Pengembangan harus memperluas fondasi tersebut dengan pemisahan otoritas yang benar; menyalakan flag preview saja bukan prosedur migrasi. M2",+ "sources": [+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/TENANT-PREVIEW.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/TENANT-PREVIEW.md",+ "line_fragment": null,+ "label": "M2",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ]+ },+ {+ "draft_block_index": 32,+ "text": "Template peran yang diusulkan adalah pemilik platform, admin organisasi, pembuat agen, operator pekerjaan, anggota, dan pembaca. Template dapat menyusun permission granular; hak mengelola server tidak otomatis diberikan kepada admin organisasi. Matriks peran akhir harus memetakan setiap operasi dan menyediakan pengujian negatif.",+ "sources": []+ },+ {+ "draft_block_index": 33,+ "text": "Satu jalur pemeriksaan kemampuan",+ "sources": []+ },+ {+ "draft_block_index": 34,+ "text": "UI, CLI, MCP, A2A, automation, channel, dan plugin worker menyerahkan operasi kepada capability execution yang sama. Keputusan akses menggabungkan membership, grant proyek atau resource, scope token, kebijakan profil agen, grant koneksi, persetujuan run, dan batas worker. Operasi ditolak ketika salah satu syarat tidak terpenuhi.",+ "sources": []+ },+ {+ "draft_block_index": 35,+ "text": "Identitas harus diturunkan dari sesi atau token yang tervalidasi. Parameter JSON seperti orgId atau userId hanya dapat menjadi target yang diperiksa; parameter tersebut tidak boleh menetapkan identitas pemanggil. Label credential user pada Integrations tidak menggantikan login principal.",+ "sources": []+ },+ {+ "draft_block_index": 36,+ "text": "Seluruh operasi yang dimediasi MSO memakai jalur pemeriksaan tersebut. Kode eksternal yang sudah berjalan tidak otomatis tunduk pada dispatcher. Akses filesystem, jaringan, proses dan credential di luar tool bridge tetap dibatasi backend isolasi dan broker kredensial.",+ "sources": []+ },+ {+ "draft_block_index": 37,+ "text": "Penyimpanan terstruktur dan berkas",+ "sources": []+ },+ {+ "draft_block_index": 38,+ "text": "Usulan awal memakai storage port untuk principal, membership, grants, profil, run, receipt, quota, dan publication. Store transaksional lokal seperti SQLite layak dievaluasi untuk metadata tersebut, sementara source repository, artifact, knowledge asli, dan memory ledger tetap memakai adapter penyimpanan yang sesuai. Pemilihan backend final membutuhkan ADR dan pengujian terhadap kebutuhan transaksi, migrasi, pemulihan, serta deployment MSO.",+ "sources": []+ },+ {+ "draft_block_index": 39,+ "text": "Tidak ada migrasi massal implisit terhadap seluruh state owner. Setiap domain memiliki envelope yang memuat identitas pemilik, versi schema, revision, waktu perubahan, dan sumber. List, search, export, cache, notifikasi, serta telemetry harus menggunakan scope yang sama dengan pembacaan resource utama.",+ "sources": []+ },+ {+ "draft_block_index": 40,+ "text": "Worker dan isolasi eksekusi",+ "sources": []+ },+ {+ "draft_block_index": 41,+ "text": "Pisahkan koordinasi run dari proses yang menjalankan shell, browser, coding agent, custom tool, plugin, serta transkripsi. Worker memegang capability lease yang terbatas pada run, workspace, jaringan, kredensial, waktu, dan output. Pembatalan atau pencabutan akses harus menghentikan langkah berikutnya dan menutup akses yang masih aktif sejauh backend mendukungnya.",+ "sources": []+ },+ {+ "draft_block_index": 42,+ "text": "Git worktree menjaga perubahan repository. Sandbox proses menjaga akses host dan jaringan. Keduanya harus dicatat sebagai kontrol yang berbeda. Backend host hanya tersedia untuk principal yang memiliki otoritas host; pekerjaan anggota organisasi tidak boleh otomatis memperoleh Unix account pemilik. Dukungan sandbox coding agent harus dibuktikan per adapter, karena sandbox shell tidak otomatis melindungi semua runtime coding. M3 N3",+ "sources": [+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/host/project-worktree.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/host/project-worktree.ts",+ "line_fragment": null,+ "label": "M3",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/tools/bash-config.ts",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/tools/bash-config.ts",+ "line_fragment": null,+ "label": "N3",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ]+ },+ {+ "draft_block_index": 43,+ "text": "Artifact HTML, preview aktif, dan UI plugin yang tidak dipercaya memakai origin atau iframe sandbox yang terpisah dari sesi aplikasi utama. Konten tersebut tidak menerima cookie atau credential MSO dan hanya meminta tindakan melalui bridge berizin. Konfigurasi frame tidak boleh mengembalikan akses origin utama kepada kode yang sedang dibatasi.",+ "sources": []+ },+ {+ "draft_block_index": 44,+ "text": "Profil agen dan runtime",+ "sources": []+ },+ {+ "draft_block_index": 45,+ "text": "Profil memuat identitas, instruksi, model, reasoning setting, kemampuan multimodal, memory scope, knowledge, tools, MCP, skill, dan koneksi yang boleh dipakai. Runtime dapat berupa agent loop MSO, ACP, coding harness yang didukung, managed agent, atau peer eksternal. Adapter wajib melaporkan kemampuan dan keterbatasan secara eksplisit.",+ "sources": []+ },+ {+ "draft_block_index": 46,+ "text": "Parent, subagent, local agent, dan A2A peer memiliki identitas serta lifetime berbeda. Delegasi tidak boleh memperluas otoritas induk. Riwayat percakapan, memory, inbox, dan kredensial tidak otomatis disalin ke child. M4",+ "sources": [+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/SUBAGENTS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/SUBAGENTS.md",+ "line_fragment": null,+ "label": "M4",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ]+ },+ {+ "draft_block_index": 47,+ "text": "Assignment tool dan skill pada profil harus benar-benar membatasi runtime di server. Metadata kompatibilitas atau pilihan UI saja tidak memenuhi kontrak tersebut. Pada baseline MSO, field kompatibilitas profil masih perlu dipisahkan dari katalog tool host yang efektif. M9",+ "sources": [+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/frontend/slices/assistant/lib/types.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "frontend/slices/assistant/lib/types.ts",+ "line_fragment": null,+ "label": "M9",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ]+ },+ {+ "draft_block_index": 48,+ "text": "Integrasi dan kredensial",+ "sources": []+ },+ {+ "draft_block_index": 49,+ "text": "Integrations tetap menjadi otoritas kredensial. Profil dan workflow menyimpan referensi koneksi. Koneksi pengguna, organisasi, dan platform memiliki grant yang berbeda, termasuk untuk Composio dan MCP OAuth. Pemilihan akun harus dapat diperiksa; fallback tidak boleh diam-diam mengganti akun atau menaikkan scope.",+ "sources": []+ },+ {+ "draft_block_index": 50,+ "text": "Webhooks memerlukan autentikasi provider atau signature yang sesuai, perlindungan replay, idempotency, dan mapping resource yang terikat pada identitas. Secret tidak disalin ke prompt, artifact share, agent pack, atau log biasa.",+ "sources": []+ },+ {+ "draft_block_index": 51,+ "text": "Kontrak hasil pekerjaan",+ "sources": []+ },+ {+ "draft_block_index": 52,+ "text": "Setiap eksekusi menghasilkan runId, status, waktu, actor, target, kebijakan yang digunakan, artifact references, serta step receipts. Receipt memisahkan permintaan, hasil tool, pemeriksaan hasil, error, dan ringkasan agen. Nilai sensitif disaring sebelum ditampilkan.",+ "sources": []+ },+ {+ "draft_block_index": 53,+ "text": "Checkpoint membedakan belum dikirim, sedang berjalan, berhasil, gagal, dan hasil belum diketahui. Intent dicatat sebelum dispatch, lalu hasil dicatat setelahnya. Setelah restart, langkah berefek eksternal tidak diulang otomatis sebelum idempotency atau rekonsiliasi membuktikan tindakan aman dilanjutkan. Lease memakai fencing agar worker lama tidak tetap menulis setelah pekerjaan diambil alih. Resume tidak mengklaim memulihkan proses OS yang sudah mati.",+ "sources": []+ },+ {+ "draft_block_index": 54,+ "text": "Untuk percakapan sementara, tetapkan receipt administratif minimum dan retention secara eksplisit. Audit tidak boleh menjadi jalur tersembunyi yang menyimpan prompt, attachment, riwayat atau hasil tool yang dijanjikan bersifat sementara.",+ "sources": []+ },+ {+ "draft_block_index": 55,+ "text": "Usage event membedakan hitungan provider yang terukur dari estimasi lokal. Byte yang dipangkas dari output tidak dilaporkan sebagai token atau biaya yang pasti dihemat. Harga provider yang tidak diketahui menghasilkan nilai tidak tersedia, bukan nol.",+ "sources": []+ }+ ],+ "migration_and_restore_contracts": [+ {+ "draft_block_index": 68,+ "text": "Migrasi owner ke identitas yang eksplisit",+ "sources": []+ },+ {+ "draft_block_index": 69,+ "text": "Mulai dengan inventaris read only terhadap state owner, workspace, token, koneksi, memory, sesi, workflow, plugin, dan managed app. Buat manifest sumber ke tujuan yang menyertakan checksum, jumlah record, versi schema, dan identitas pemilik. Nama folder atau integration user tidak boleh ditebak sebagai identitas manusia.",+ "sources": []+ },+ {+ "draft_block_index": 70,+ "text": "Jalankan dry run dan pemeriksaan izin sebelum memindahkan data. Gunakan snapshot konsisten atau periode penghentian penulisan yang singkat sesuai domain. Migrasi menyalin data ke tujuan yang terverifikasi, kemudian melakukan pergantian routing secara atomik per domain. Data yang gagal atau tidak memiliki identitas jelas masuk laporan untuk penanganan eksplisit.",+ "sources": []+ },+ {+ "draft_block_index": 71,+ "text": "Mode owner tetap didukung. Token legacy dan token organisasi memiliki audience serta jalur validasi yang terpisah selama transisi. Credential lama tidak diam-diam mendapat hak tenant baru; credential tenant yang gagal tidak boleh kembali memakai state owner. M2",+ "sources": [+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/TENANT-PREVIEW.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/TENANT-PREVIEW.md",+ "line_fragment": null,+ "label": "M2",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ]+ },+ {+ "draft_block_index": 72,+ "text": "Dua jenis pemulihan yang berbeda",+ "sources": []+ },+ {+ "draft_block_index": 73,+ "text": "Sebelum tujuan baru menerima penulisan, rollback dapat mengembalikan routing ke snapshot lama yang konsisten. Setelah ada penulisan baru, rollback tidak boleh membuang perubahan tersebut. Gunakan penghentian sementara penulisan, snapshot terbaru, dan forward recovery atau rekonsiliasi yang disetujui berdasarkan manifest. Prosedur harus diuji pada lingkungan terisolasi.",+ "sources": []+ },+ {+ "draft_block_index": 74,+ "text": "Backup dan portabilitas",+ "sources": []+ },+ {+ "draft_block_index": 75,+ "text": "Bedakan agent pack tanpa secret, export pengguna, export organisasi, dan backup operator penuh. Backup penuh mencakup database yang konsisten, memory history, knowledge, artifact, plugin data, grant, dan metadata run. Raw audio atau video, browser profile, cache, credential, serta external managed app state masing-masing memiliki kebijakan include atau exclude yang terlihat.",+ "sources": []+ },+ {+ "draft_block_index": 76,+ "text": "State tahan lama yang tidak dapat dibuat ulang harus masuk paket atau bundle tambahan dengan referensi dan checksum pada manifest. Pengecualian menyatakan dampaknya terhadap pemulihan. Paket yang memuat secret dilindungi enkripsi dan akses operator; kunci pemulihan tidak disimpan sebagai plaintext bersama paket. Agent pack serta export pengguna atau organisasi tidak otomatis mewarisi secret platform.",+ "sources": []+ },+ {+ "draft_block_index": 77,+ "text": "Restore menampilkan preview dampak, memeriksa checksum, versi schema, ukuran hasil ekstraksi, path traversal, dan izin tujuan. Plugin hasil restore berada dalam keadaan nonaktif sampai validasi hash dan persetujuan selesai. Alur ini mengadopsi pemisahan backup dan agent pack yang sudah terlihat di Nakama serta memperjelas batas media dan secret. N5",+ "sources": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/backup-restore.mdx",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/backup-restore.mdx",+ "line_fragment": null,+ "label": "N5",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ]+ },+ {+ "draft_block_index": 78,+ "text": "Secara default restore tidak langsung mengaktifkan sesi, bearer token, public share atau connection grant dari backup. Sistem mengganti epoch validasi atau merekonsiliasikannya terhadap ledger pencabutan yang tidak ikut mundur. Membership yang dipulihkan ditinjau sebelum akun diaktifkan kembali. Publikasi dan koneksi yang diperlukan diaktifkan melalui pemeriksaan eksplisit, sehingga akses yang dicabut setelah snapshot tidak hidup kembali.",+ "sources": []+ },+ {+ "draft_block_index": 79,+ "text": "Credential yang tidak dipindahkan ditandai perlu autentikasi ulang. Restore lintas domain dapat membutuhkan OAuth ulang dan registrasi passkey baru; private key authenticator bukan data yang dapat diekspor dari server.",+ "sources": []+ }+ ],+ "ambiguities_and_decisions": [+ {+ "id": "AMB-01",+ "topic": "Metadata and durable job backend",+ "description": "Backend metadata dan job. Pilih implementasi setelah menguji transaksi, konkurensi, backup konsisten, dan kebutuhan deployment. Rancangan storage port dan receipt ditetapkan lebih dahulu.",+ "affected_packages": [+ "PK06",+ "PK15"+ ],+ "resolution": "ADR after transaction concurrency migration recovery evaluation",+ "status": "open"+ },+ {+ "id": "AMB-02",+ "topic": "Sandbox backend and adapter coverage",+ "description": "Backend sandbox. Tentukan backend yang memenuhi shell, browser, custom tools, dan coding harness pada platform yang ditargetkan. Setiap adapter yang belum memenuhi isolasi tetap tidak tersedia bagi tenant yang memerlukan batas tersebut.",+ "affected_packages": [+ "PK07",+ "PK10",+ "PK11",+ "PK19",+ "PK21"+ ],+ "resolution": "Explicit per-adapter platform matrix and fail-closed tenant policy",+ "status": "open"+ },+ {+ "id": "AMB-03",+ "topic": "WhatsApp and desktop implementation distribution",+ "description": "Adapter WhatsApp dan desktop. Verifikasi metode yang digunakan baseline, perilaku autentikasi, dependensi, distribusi, serta cakupan platform sebelum menjanjikan jalur instalasi. Jangan menyamakan keberadaan target build dengan installer yang sudah diterbitkan.",+ "affected_packages": [+ "PK16",+ "PK23"+ ],+ "resolution": "Verify auth method dependency contract package distribution and real install",+ "status": "open"+ },+ {+ "id": "AMB-04",+ "topic": "Managed hosting product scope",+ "description": "Layanan hosting MSO. Pengalaman provisioning yang setara perlu rancangan kapasitas, domain, backup, tagihan, dan operasi apabila diputuskan menjadi layanan publik. Ini tetap tercatat sebagai kebutuhan produk yang perlu discovery, terpisah dari bukti kode OSS.",+ "affected_packages": [+ "PK01",+ "PK23"+ ],+ "resolution": "Separate commercial provisioning capacity domain backup billing discovery from OSS source parity",+ "status": "open"+ },+ {+ "id": "AMB-05",+ "topic": "Schedule and verification owners",+ "description": "Jadwal dan penanggung jawab. Tetapkan setelah PK01 memecah kebutuhan, mengukur gap, dan mengidentifikasi dependensi eksternal. Draf ini tidak menetapkan tanggal atau anggaran tanpa dasar.",+ "affected_packages": [+ "PK01",+ "PK02",+ "PK03",+ "PK04",+ "PK05",+ "PK06",+ "PK07",+ "PK08",+ "PK09",+ "PK10",+ "PK11",+ "PK12",+ "PK13",+ "PK14",+ "PK15",+ "PK16",+ "PK17",+ "PK18",+ "PK19",+ "PK20",+ "PK21",+ "PK22",+ "PK23",+ "PK24"+ ],+ "resolution": "Assign owners and dates after detailed gap audit; no dates or owners invented here",+ "status": "open"+ },+ {+ "id": "AMB-06",+ "topic": "Artifact permissions and optimizer scope",+ "description": "Hak artifact dan scope optimizer memiliki perbedaan antara dokumentasi lama dan source. Tetapkan perilaku target secara eksplisit pada permission serta uji. External Supermemory memiliki dataset yang memerlukan rencana backup sendiri. Managed hosting, akses paket provider, jumlah aplikasi Composio dan publikasi installer merupakan dependensi yang harus diverifikasi sendiri.",+ "affected_requirements": [+ "NK-021",+ "NK-050",+ "NK-051"+ ],+ "resolution": "Read source conflicts against documentation and freeze explicit permission target with negative tests",+ "status": "open"+ },+ {+ "id": "AMB-07",+ "topic": "Grouped requirements need atomic source decomposition",+ "description": "Inventaris mengelompokkan subfitur untuk perencanaan. PK01 wajib memecah variasi route, setting, provider, transport, format dan platform menjadi checklist yang dapat diverifikasi, lalu membandingkan tree, UI, kontrak API dan dokumentasi agar tidak ada kemampuan aktif yang terlewat. Bukti source menunjukkan implementasi ada; bukti itu belum menyatakan alur berhasil pada runtime.",+ "affected_packages": [+ "PK01"+ ],+ "resolution": "Compare tree UI route settings provider transport format and platform on frozen commits; clause extraction alone is insufficient",+ "status": "open"+ },+ {+ "id": "AMB-08",+ "topic": "Role templates schema and navigation labels are proposals",+ "description": "Dokumen menyebut matriks peran akhir, nama model/schema/route/tool, dan nama akhir menu sebagai keputusan yang harus ditetapkan, bukan kontrak implementasi yang sudah ada.",+ "source_blocks": [+ 26,+ 32,+ 58+ ],+ "affected_packages": [+ "PK03",+ "PK04",+ "PK05",+ "PK06"+ ],+ "resolution": "Approve ADR and operation-to-permission matrix using repo conventions",+ "status": "open"+ },+ {+ "id": "AMB-09",+ "topic": "Temporary conversation retention",+ "description": "Mode sementara melarang penulisan history memory dan skill normal; retention administratif artifact log dan provider memerlukan kontrak eksplisit.",+ "source_blocks": [+ 54,+ 108+ ],+ "affected_requirements": [+ "NK-018"+ ],+ "resolution": "Audit every persistence path and agree minimal administrative receipts and retention",+ "status": "open"+ },+ {+ "id": "AMB-10",+ "topic": "Additional subfeatures combined mapping",+ "description": "Dua rincian tambahan tetap masuk checklist: pengguna dapat menyunting USER.md setelah onboarding, dan tool list_profile_sessions serta read_profile_session tersedia secara opt in untuk profil supervisi dengan pemeriksaan akses. Batas tersebut tidak memberikan akses umum ke semua percakapan. Konteks pengguna · Tool sesi. PK01 mencatat subfitur ini di bawah NK001, NK006, NK009, NK015, NK027 dan NK057, lalu menambahkan subtest yang relevan ke A04, A05, A07, A08 dan A21. Tidak diperlukan identifier provider atau bentuk arsitektur internal yang sama apabila adapter MSO memberikan perilaku setara dan buktinya jelas.",+ "affected_requirements": [+ "NK-001",+ "NK-006",+ "NK-009",+ "NK-015",+ "NK-027",+ "NK-057"+ ],+ "resolution": "Keep both USER.md editing and opt-in supervision tools in scope and split their exact mapping during PK01 source audit",+ "status": "open"+ },+ {+ "id": "AMB-11",+ "topic": "PK18 PK23 stage labels versus prerequisites",+ "description": "PK07 adalah prasyarat akses eksekusi untuk anggota organisasi. PK18 menjadi kontrak artifact yang dipakai juga oleh PK09, PK15, dan PK20; schema dan API minimumnya perlu disepakati lebih awal. PK23 mengimplementasikan quota pada jalur T2 dan T3 sejak awal, lalu melengkapi tampilan serta pelaporan pada T7.",+ "affected_packages": [+ "PK07",+ "PK09",+ "PK15",+ "PK18",+ "PK20",+ "PK23"+ ],+ "resolution": "Deliver early artifact schema and quota enforcement contracts while retaining later full package stages",+ "status": "open"+ },+ {+ "id": "AMB-12",+ "topic": "Crosscutting packages versus explicit row links",+ "description": "PK01, PK02, dan PK24 hanya disebut pada sebagian baris NK, tetapi deskripsi paket dan gate rilis menerapkan inventaris, quality gate, serta penerimaan penuh pada seluruh perubahan yang relevan. Daftar referensi per baris tidak membatasi scope lintas domain tersebut.",+ "source_blocks": [+ 65,+ 99,+ 100+ ],+ "affected_packages": [+ "PK01",+ "PK02",+ "PK24"+ ],+ "resolution": "Keep explicit row mappings lossless and separately expose crosscutting requirement coverage",+ "status": "resolved_in_inventory_schema"+ }+ ],+ "source_references": [+ {+ "id": "N1",+ "title": "Arsitektur dan batas fitur aktif Nakama",+ "links": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/ARCHITECTURE.md",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "ARCHITECTURE.md",+ "line_fragment": null,+ "label": "Arsitektur dan batas fitur aktif Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ]+ },+ {+ "id": "N2",+ "title": "Organisasi tim dan resource bersama Nakama",+ "links": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/multi-tenancy.mdx",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/multi-tenancy.mdx",+ "line_fragment": null,+ "label": "Organisasi tim dan resource bersama Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ]+ },+ {+ "id": "N3",+ "title": "Konfigurasi shell host dan microsandbox Nakama",+ "links": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/tools/bash-config.ts",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/tools/bash-config.ts",+ "line_fragment": null,+ "label": "Konfigurasi shell host dan microsandbox Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ]+ },+ {+ "id": "N4",+ "title": "Eksekusi shell dan batas coding agent Nakama",+ "links": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/tools/bash.ts",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/tools/bash.ts",+ "line_fragment": null,+ "label": "Eksekusi shell dan batas coding agent Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ]+ },+ {+ "id": "N5",+ "title": "Backup restore dan export Nakama",+ "links": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/backup-restore.mdx",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/backup-restore.mdx",+ "line_fragment": null,+ "label": "Backup restore dan export Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ]+ },+ {+ "id": "N6",+ "title": "Google Meet capture dan impor Nakama",+ "links": [+ {+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/google-meet.mdx",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/google-meet.mdx",+ "line_fragment": null,+ "label": "Google Meet capture dan impor Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ]+ },+ {+ "id": "M1",+ "title": "Arsitektur domain dan transport MSO",+ "links": [+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/ARCHITECTURE.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/ARCHITECTURE.md",+ "line_fragment": null,+ "label": "Arsitektur domain dan transport MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ]+ },+ {+ "id": "M2",+ "title": "Batas tenant preview MSO",+ "links": [+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/TENANT-PREVIEW.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/TENANT-PREVIEW.md",+ "line_fragment": null,+ "label": "Batas tenant preview MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ]+ },+ {+ "id": "M3",+ "title": "Implementasi project worktree MSO",+ "links": [+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/host/project-worktree.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/host/project-worktree.ts",+ "line_fragment": null,+ "label": "Implementasi project worktree MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ]+ },+ {+ "id": "M4",+ "title": "Kontrak subagent dan delegasi MSO",+ "links": [+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/SUBAGENTS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/SUBAGENTS.md",+ "line_fragment": null,+ "label": "Kontrak subagent dan delegasi MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ]+ },+ {+ "id": "M5",+ "title": "Graph workflow dan lifecycle run MSO",+ "links": [+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/workflow/graph-engine.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/workflow/graph-engine.ts",+ "line_fragment": null,+ "label": "Graph workflow dan lifecycle run MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ]+ },+ {+ "id": "M6",+ "title": "Kontrak kanal dan batas transport MSO",+ "links": [+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/CHANNELS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/CHANNELS.md",+ "line_fragment": null,+ "label": "Kontrak kanal dan batas transport MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ]+ },+ {+ "id": "M7",+ "title": "Resolusi memory dan provenance MSO",+ "links": [+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/agent/memory-resolution.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/agent/memory-resolution.ts",+ "line_fragment": null,+ "label": "Resolusi memory dan provenance MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ]+ },+ {+ "id": "M8",+ "title": "Kesiapan rilis dan bukti verifikasi MSO",+ "links": [+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/LAUNCH-READINESS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/LAUNCH-READINESS.md",+ "line_fragment": null,+ "label": "Kesiapan rilis dan bukti verifikasi MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ]+ },+ {+ "id": "M9",+ "title": "Metadata profil Alfa dan katalog tool host MSO",+ "links": [+ {+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/frontend/slices/assistant/lib/types.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "frontend/slices/assistant/lib/types.ts",+ "line_fragment": null,+ "label": "Metadata profil Alfa dan katalog tool host MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ]+ }+ ],+ "all_source_hyperlinks": [+ {+ "draft_block_index": 8,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/ARCHITECTURE.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/ARCHITECTURE.md",+ "line_fragment": null,+ "label": "M1",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 12,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/ARCHITECTURE.md",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "ARCHITECTURE.md",+ "line_fragment": null,+ "label": "N1",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 12,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/ARCHITECTURE.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/ARCHITECTURE.md",+ "line_fragment": null,+ "label": "M1",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 17,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/ARCHITECTURE.md",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "ARCHITECTURE.md",+ "line_fragment": null,+ "label": "N1",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 22,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/multi-tenancy.mdx",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/multi-tenancy.mdx",+ "line_fragment": null,+ "label": "N2",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 31,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/TENANT-PREVIEW.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/TENANT-PREVIEW.md",+ "line_fragment": null,+ "label": "M2",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 42,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/host/project-worktree.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/host/project-worktree.ts",+ "line_fragment": null,+ "label": "M3",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 42,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/tools/bash-config.ts",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/tools/bash-config.ts",+ "line_fragment": null,+ "label": "N3",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 46,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/SUBAGENTS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/SUBAGENTS.md",+ "line_fragment": null,+ "label": "M4",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 47,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/frontend/slices/assistant/lib/types.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "frontend/slices/assistant/lib/types.ts",+ "line_fragment": null,+ "label": "M9",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 71,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/TENANT-PREVIEW.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/TENANT-PREVIEW.md",+ "line_fragment": null,+ "label": "M2",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 77,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/backup-restore.mdx",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/backup-restore.mdx",+ "line_fragment": null,+ "label": "N5",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 82,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/google-meet.mdx",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/google-meet.mdx",+ "line_fragment": null,+ "label": "N6",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 104,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/web/src/components/setup-wizard/SetupWizard.tsx#L90-L143",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/web/src/components/setup-wizard/SetupWizard.tsx",+ "line_fragment": "L90-L143",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 104,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/README.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "README.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 104,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/auth.ts#L254-L579",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/auth.ts",+ "line_fragment": "L254-L579",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 104,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/auth/login-password.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/auth/login-password.ts",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 104,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/auth.ts#L703-L1508",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/auth.ts",+ "line_fragment": "L703-L1508",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 104,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/auth.ts#L1726-L1918",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/auth.ts",+ "line_fragment": "L1726-L1918",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 104,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/ARCHITECTURE.md#L37-L57",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/ARCHITECTURE.md",+ "line_fragment": "L37-L57",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 104,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/platform-orgs.ts#L73-L537",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/platform-orgs.ts",+ "line_fragment": "L73-L537",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 104,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/TENANT-PREVIEW.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/TENANT-PREVIEW.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 104,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/org-members.ts#L546-L883",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/org-members.ts",+ "line_fragment": "L546-L883",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 104,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/auth/roles.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/auth/roles.ts",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 104,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/org-members.ts#L145-L423",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/org-members.ts",+ "line_fragment": "L145-L423",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 104,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/org-usage-quota-service.ts#L5-L111",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/org-usage-quota-service.ts",+ "line_fragment": "L5-L111",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 106,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/profiles.ts#L474-L727",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/profiles.ts",+ "line_fragment": "L474-L727",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 106,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/frontend/slices/assistant/lib/types.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "frontend/slices/assistant/lib/types.ts",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 106,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/profiles.ts#L2052-L2241",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/profiles.ts",+ "line_fragment": "L2052-L2241",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 106,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/models.ts#L484-L980",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/models.ts",+ "line_fragment": "L484-L980",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 106,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/ai/selected-model-stream.ts#L54-L90",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/ai/selected-model-stream.ts",+ "line_fragment": "L54-L90",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 106,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/providers/create.ts#L330-L404",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/providers/create.ts",+ "line_fragment": "L330-L404",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 106,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/ai/selected-model-stream.ts#L54-L70",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/ai/selected-model-stream.ts",+ "line_fragment": "L54-L70",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 106,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/providers/acp/acp-agent-presets.ts#L7-L22",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/providers/acp/acp-agent-presets.ts",+ "line_fragment": "L7-L22",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 106,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/coding-agent-command.ts#L93-L242",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/coding-agent-command.ts",+ "line_fragment": "L93-L242",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 106,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/host/project-worktree.ts#L56-L97",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/host/project-worktree.ts",+ "line_fragment": "L56-L97",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 106,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/tools/sub-agent-tool.ts#L21-L98",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/tools/sub-agent-tool.ts",+ "line_fragment": "L21-L98",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 106,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/agent/subagent-runner.ts#L10-L133",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/agent/subagent-runner.ts",+ "line_fragment": "L10-L133",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 108,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/web/src/components/chat/ChatMessageQueuePanel.tsx",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/web/src/components/chat/ChatMessageQueuePanel.tsx",+ "line_fragment": null,+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 108,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/app/api/assistant/route.ts#L126-L178",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "app/api/assistant/route.ts",+ "line_fragment": "L126-L178",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 108,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/sessions.ts#L395-L623",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/sessions.ts",+ "line_fragment": "L395-L623",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 108,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/agent/session-create.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/agent/session-create.ts",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 108,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/agent-service.ts#L5613-L5693",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/agent-service.ts",+ "line_fragment": "L5613-L5693",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 108,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/providers.mdx#L85-L94",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/providers.mdx",+ "line_fragment": "L85-L94",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 108,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/SESSION-ARTIFACTS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/SESSION-ARTIFACTS.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 108,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/tools/ask-user-question-tool.ts#L21-L80",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/tools/ask-user-question-tool.ts",+ "line_fragment": "L21-L80",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 108,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/token-optimization.ts#L43-L205",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/token-optimization.ts",+ "line_fragment": "L43-L205",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 108,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/workflow/graph-runtime.ts#L24-L34",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/workflow/graph-runtime.ts",+ "line_fragment": "L24-L34",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 110,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/packages/core/src/soul/compose.ts",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "packages/core/src/soul/compose.ts",+ "line_fragment": null,+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 110,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/agent/memory-store.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/agent/memory-store.ts",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 110,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/org-memory-service.ts#L147-L279",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/org-memory-service.ts",+ "line_fragment": "L147-L279",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 110,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/agent/memory-resolution.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/agent/memory-resolution.ts",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 110,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/profiles.ts#L894-L1271",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/profiles.ts",+ "line_fragment": "L894-L1271",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 110,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/ARCHITECTURE.md#L189-L205",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/ARCHITECTURE.md",+ "line_fragment": "L189-L205",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 110,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/profiles.mdx#L198-L202",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/profiles.mdx",+ "line_fragment": "L198-L202",+ "label": "Dokumentasi dan source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 110,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/AGENT-VAULT.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/AGENT-VAULT.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 110,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/plugins.mdx#L83-L104",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/plugins.mdx",+ "line_fragment": "L83-L104",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 112,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/builtin-tools.mdx",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/builtin-tools.mdx",+ "line_fragment": null,+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 112,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/ARCHITECTURE.md#L189-L209",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/ARCHITECTURE.md",+ "line_fragment": "L189-L209",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 112,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/providers.mdx#L85-L94",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/providers.mdx",+ "line_fragment": "L85-L94",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 112,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/builtin-tools.mdx#L47-L66",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/builtin-tools.mdx",+ "line_fragment": "L47-L66",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 112,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/tools/bash.ts#L212-L242",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/tools/bash.ts",+ "line_fragment": "L212-L242",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 112,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/mcp/tools-forge.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/mcp/tools-forge.ts",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 112,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/agent-browser.mdx#L6-L64",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/agent-browser.mdx",+ "line_fragment": "L6-L64",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 112,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/ARCHITECTURE.md#L37-L52",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/ARCHITECTURE.md",+ "line_fragment": "L37-L52",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 112,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/tools.ts#L198-L424",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/tools.ts",+ "line_fragment": "L198-L424",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 112,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/mcp/tools-forge.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/mcp/tools-forge.ts",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 112,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/mcp.mdx#L14-L110",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/mcp.mdx",+ "line_fragment": "L14-L110",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 112,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/PROJECT-MCP-CONNECTIONS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/PROJECT-MCP-CONNECTIONS.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 112,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/composio.mdx#L70-L96",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/composio.mdx",+ "line_fragment": "L70-L96",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 112,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/infra/connection-dispatch.ts#L33-L55",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/infra/connection-dispatch.ts",+ "line_fragment": "L33-L55",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 114,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/skills.ts#L267-L454",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/skills.ts",+ "line_fragment": "L267-L454",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 114,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/PROJECT-MCP-CONNECTIONS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/PROJECT-MCP-CONNECTIONS.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 114,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/skills.mdx#L96-L225",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/skills.mdx",+ "line_fragment": "L96-L225",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 114,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/mcp/tools-forge.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/mcp/tools-forge.ts",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 114,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/skill-post-turn-review-service.ts#L133-L216",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/skill-post-turn-review-service.ts",+ "line_fragment": "L133-L216",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 114,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/workflow/learning.ts#L99-L149",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/workflow/learning.ts",+ "line_fragment": "L99-L149",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 114,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/skills.ts#L531-L580",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/skills.ts",+ "line_fragment": "L531-L580",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 114,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/skill-curator-service.ts#L86-L119",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/skill-curator-service.ts",+ "line_fragment": "L86-L119",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 116,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/telegram/chat.mdx#L6-L89",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/telegram/chat.mdx",+ "line_fragment": "L6-L89",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 116,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/CHANNELS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/CHANNELS.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 116,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/whatsapp.mdx#L62-L139",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/whatsapp.mdx",+ "line_fragment": "L62-L139",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 116,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/discord.mdx",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/discord.mdx",+ "line_fragment": null,+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 116,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/CHANNELS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/CHANNELS.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 116,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/slack.mdx#L15-L28",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/slack.mdx",+ "line_fragment": "L15-L28",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 116,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/notification-webhook-service.ts#L49-L116",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/notification-webhook-service.ts",+ "line_fragment": "L49-L116",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 116,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/CHANNELS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/CHANNELS.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 118,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/automations.mdx#L15-L37",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/automations.mdx",+ "line_fragment": "L15-L37",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 118,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/workflow/graph-triggers.ts#L15-L23",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/workflow/graph-triggers.ts",+ "line_fragment": "L15-L23",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 118,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/automation-runner.ts#L19-L98",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/automation-runner.ts",+ "line_fragment": "L19-L98",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 118,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/workflow/graph-engine.ts#L75-L102",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/workflow/graph-engine.ts",+ "line_fragment": "L75-L102",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 118,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/packages/plugins/workflows/src/workflow-runner.ts#L104-L277",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "packages/plugins/workflows/src/workflow-runner.ts",+ "line_fragment": "L104-L277",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 118,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/workflow/graph-engine.ts#L33-L80",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/workflow/graph-engine.ts",+ "line_fragment": "L33-L80",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 118,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/plugins.mdx#L20-L30",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/plugins.mdx",+ "line_fragment": "L20-L30",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 118,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/ARCHITECTURE.md#L88-L118",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/ARCHITECTURE.md",+ "line_fragment": "L88-L118",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 118,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/plugins.mdx#L32-L79",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/plugins.mdx",+ "line_fragment": "L32-L79",+ "label": "Dokumentasi dan source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 120,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/artifacts.mdx#L10-L75",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/artifacts.mdx",+ "line_fragment": "L10-L75",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 120,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/SESSION-ARTIFACTS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/SESSION-ARTIFACTS.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 120,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/artifacts.mdx#L77-L104",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/artifacts.mdx",+ "line_fragment": "L77-L104",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 120,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/image-generation.mdx#L6-L55",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/image-generation.mdx",+ "line_fragment": "L6-L55",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 120,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/frontend/slices/os-shell/shell.manifest.ts#L60-L74",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "frontend/slices/os-shell/shell.manifest.ts",+ "line_fragment": "L60-L74",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 120,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/google-meet/service.ts#L228-L258",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/google-meet/service.ts",+ "line_fragment": "L228-L258",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 120,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/google-meet/actions.ts#L271-L388",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/google-meet/actions.ts",+ "line_fragment": "L271-L388",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 122,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/data-portability.ts#L62-L232",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/data-portability.ts",+ "line_fragment": "L62-L232",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 122,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/MEMORY-SAFETY.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/MEMORY-SAFETY.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 122,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/profile-portability.ts#L59-L168",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/profile-portability.ts",+ "line_fragment": "L59-L168",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 122,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/cli.mdx#L6-L98",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/cli.mdx",+ "line_fragment": "L6-L98",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 122,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/ARCHITECTURE.md#L37-L47",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/ARCHITECTURE.md",+ "line_fragment": "L37-L47",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 122,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/desktop.mdx#L6-L40",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/desktop.mdx",+ "line_fragment": "L6-L40",+ "label": "Dokumentasi dan source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 122,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/PLATFORMS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/PLATFORMS.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 122,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/Dockerfile#L140-L157",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "Dockerfile",+ "line_fragment": "L140-L157",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 122,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/ARCHITECTURE.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/ARCHITECTURE.md",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 122,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/error-tracking.mdx#L17-L105",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/error-tracking.mdx",+ "line_fragment": "L17-L105",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 122,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/ARCHITECTURE.md#L37-L57",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/ARCHITECTURE.md",+ "line_fragment": "L37-L57",+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 124,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/web/sw/service-worker.ts#L25-L105",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/web/sw/service-worker.ts",+ "line_fragment": "L25-L105",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 124,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/app/register-sw.tsx",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "app/register-sw.tsx",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 124,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/audit-events.ts#L7-L83",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/audit-events.ts",+ "line_fragment": "L7-L83",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 124,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/host/audit.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/host/audit.ts",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 124,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/web/src/hooks/use-notifications.ts#L8-L105",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/web/src/hooks/use-notifications.ts",+ "line_fragment": "L8-L105",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 124,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/web/src/components/CommandPalette.tsx#L222-L408",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/web/src/components/CommandPalette.tsx",+ "line_fragment": "L222-L408",+ "label": "Source Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 124,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/frontend/slices/os-shell/theme-quick-picker.tsx",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "frontend/slices/os-shell/theme-quick-picker.tsx",+ "line_fragment": null,+ "label": "Dasar MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 130,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/packages/core/src/contract.ts#L2908-L2939",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "packages/core/src/contract.ts",+ "line_fragment": "L2908-L2939",+ "label": "Kontrak provider",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 130,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/providers/create.ts#L69-L404",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/providers/create.ts",+ "line_fragment": "L69-L404",+ "label": "factory provider",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 133,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/providers/model-catalog.ts",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/providers/model-catalog.ts",+ "line_fragment": null,+ "label": "Sumber",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 133,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/mcp.mdx#L170-L203",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/mcp.mdx",+ "line_fragment": "L170-L203",+ "label": "Sumber",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 133,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/services/coding-agent-command.ts#L93-L242",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/coding-agent-command.ts",+ "line_fragment": "L93-L242",+ "label": "Sumber",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 133,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/tools/bash.ts#L226-L242",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/tools/bash.ts",+ "line_fragment": "L226-L242",+ "label": "Sumber",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 133,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/platform/telegram/src/index.ts#L135-L209",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/platform/telegram/src/index.ts",+ "line_fragment": "L135-L209",+ "label": "Telegram",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 133,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/platform/discord/src/bot.ts#L26-L66",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/platform/discord/src/bot.ts",+ "line_fragment": "L26-L66",+ "label": "Discord",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 133,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/platform/whatsapp/package.json#L10-L15",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/platform/whatsapp/package.json",+ "line_fragment": "L10-L15",+ "label": "WhatsApp",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 133,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/platform/slack/src/socket.ts#L28-L38",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/platform/slack/src/socket.ts",+ "line_fragment": "L28-L38",+ "label": "Slack",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 133,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/desktop/electron-builder.yml#L24-L37",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/desktop/electron-builder.yml",+ "line_fragment": "L24-L37",+ "label": "Sumber",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 133,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/desktop/README.md#L5-L34",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/desktop/README.md",+ "line_fragment": "L5-L34",+ "label": "Sumber",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 133,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/web/src/lib/sw-strategy.ts#L8-L85",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/web/src/lib/sw-strategy.ts",+ "line_fragment": "L8-L85",+ "label": "Sumber",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 134,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/http/routes/user-context.ts#L40-L99",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/user-context.ts",+ "line_fragment": "L40-L99",+ "label": "Konteks pengguna",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 134,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/tools/session-tools.ts#L107-L215",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/tools/session-tools.ts",+ "line_fragment": "L107-L215",+ "label": "Tool sesi",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 147,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/ARCHITECTURE.md",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "ARCHITECTURE.md",+ "line_fragment": null,+ "label": "Arsitektur dan batas fitur aktif Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 147,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/multi-tenancy.mdx",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/multi-tenancy.mdx",+ "line_fragment": null,+ "label": "Organisasi tim dan resource bersama Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 147,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/tools/bash-config.ts",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/tools/bash-config.ts",+ "line_fragment": null,+ "label": "Konfigurasi shell host dan microsandbox Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 147,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/apps/server/src/tools/bash.ts",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/tools/bash.ts",+ "line_fragment": null,+ "label": "Eksekusi shell dan batas coding agent Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 147,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/backup-restore.mdx",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/backup-restore.mdx",+ "line_fragment": null,+ "label": "Backup restore dan export Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 147,+ "url": "https://github.com/ahmadrosid/nakama/blob/f6c8f26f8a831e690016ec70429c3cb5cb114cec/docs/website/content/docs/google-meet.mdx",+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/google-meet.mdx",+ "line_fragment": null,+ "label": "Google Meet capture dan impor Nakama",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 147,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/ARCHITECTURE.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/ARCHITECTURE.md",+ "line_fragment": null,+ "label": "Arsitektur domain dan transport MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 147,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/TENANT-PREVIEW.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/TENANT-PREVIEW.md",+ "line_fragment": null,+ "label": "Batas tenant preview MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 147,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/host/project-worktree.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/host/project-worktree.ts",+ "line_fragment": null,+ "label": "Implementasi project worktree MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 147,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/SUBAGENTS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/SUBAGENTS.md",+ "line_fragment": null,+ "label": "Kontrak subagent dan delegasi MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 147,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/workflow/graph-engine.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/workflow/graph-engine.ts",+ "line_fragment": null,+ "label": "Graph workflow dan lifecycle run MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 147,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/CHANNELS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/CHANNELS.md",+ "line_fragment": null,+ "label": "Kontrak kanal dan batas transport MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 147,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/lib/agent/memory-resolution.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/agent/memory-resolution.ts",+ "line_fragment": null,+ "label": "Resolusi memory dan provenance MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 147,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/docs/LAUNCH-READINESS.md",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/LAUNCH-READINESS.md",+ "line_fragment": null,+ "label": "Kesiapan rilis dan bukti verifikasi MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ },+ {+ "draft_block_index": 147,+ "url": "https://github.com/rahmanef63/mso/blob/89d61bb0d73b47047c67e51df9a6ee30351c8c3a/frontend/slices/assistant/lib/types.ts",+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "frontend/slices/assistant/lib/types.ts",+ "line_fragment": null,+ "label": "Metadata profil Alfa dan katalog tool host MSO",+ "extraction_status": "copied_from_attached_draft",+ "source_read_status": "not_retrieved_by_inventory_audit"+ }+ ],+ "audit": {+ "audit_type": "read_only_attached_docx_extraction_and_internal_consistency",+ "primary_runtime_used": true,+ "repos_modified": false,+ "source_code_retrieved": false,+ "runtime_tests_executed": false,+ "provided_text_crosscheck_all_requirement_ids_present": true,+ "explicit_not_completed": [+ "source_tree_variant_audit",+ "current_mso_gap_verification",+ "target_module_mapping",+ "verification_owner_assignment",+ "acceptance_execution",+ "release_verification"+ ]+ }+}diff --git a/docs/parity/source-references.json b/docs/parity/source-references.jsonnew file mode 100644index 00000000..bf51b54a--- /dev/null+++ b/docs/parity/source-references.json@@ -0,0 +1,806 @@+{+ "schema_version": "mso.nakama-parity-sources.v1",+ "meaning": "Pinned file identities establish source availability, not runtime behavior.",+ "files": [+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "ARCHITECTURE.md",+ "sha256": "a13b3ed94e506cda50974bcd09d9ea33d895ba7edfa6e297178ed1f6024be95e",+ "bytes": 11435,+ "lines": 249+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "Dockerfile",+ "sha256": "c6b09f780c3c9e34a61f6ba274b60e1ec294d8fceba96e98ddb25f86c8cbb2d5",+ "bytes": 8148,+ "lines": 157+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/desktop/README.md",+ "sha256": "b6fcef72b100d42d9cca1e46a2fad7b74c35fcc140cdb0b3e5975138314a5f47",+ "bytes": 10870,+ "lines": 134+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/desktop/electron-builder.yml",+ "sha256": "60707b0e72e761d7998a0e460ac86c30e93788610d5754fa1332bc7771caeb20",+ "bytes": 1128,+ "lines": 47+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/platform/discord/src/bot.ts",+ "sha256": "690f2246220c12c487fdfa91f1b0babf96cd9d9a82d15a4c761ecbcf57b1b3d1",+ "bytes": 4593,+ "lines": 158+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/platform/slack/src/socket.ts",+ "sha256": "6d9e200a7a2b92470b1e3da15cc01218ab46b61dde23b0b09ff0d36f48af58f7",+ "bytes": 3307,+ "lines": 143+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/platform/telegram/src/index.ts",+ "sha256": "4836bf0b913c6b89b60c79358b838f88b09f93b0278bcf48c8fda3c5e0d370f8",+ "bytes": 6471,+ "lines": 245+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/platform/whatsapp/package.json",+ "sha256": "6856e99bec35af2769edf2105de47f1bc534ffc8ae19f3192a1a42d146c8a378",+ "bytes": 532,+ "lines": 16+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/audit-events.ts",+ "sha256": "3da21b811e0a0dbb4b58c18557bc4246818f305d3347357a0e0f534891e26025",+ "bytes": 2337,+ "lines": 85+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/auth.ts",+ "sha256": "06360c7044eb96cbada498e5705b72a1babada84b2207345b7bc713ae7cdac7e",+ "bytes": 53262,+ "lines": 1922+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/data-portability.ts",+ "sha256": "3852904881524ea98e5960934150951b8e85ad425dbd2903722c1b8c9c01399f",+ "bytes": 10347,+ "lines": 361+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/models.ts",+ "sha256": "eaa4721b194dc1263d9850d635a507b527e1248cc26c0797f876bf2736e8db1e",+ "bytes": 73767,+ "lines": 2625+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/org-members.ts",+ "sha256": "2db1530767818d2609f1fa056e792ee04a6b034f3b018530ae06de9eddd69b90",+ "bytes": 30917,+ "lines": 1048+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/platform-orgs.ts",+ "sha256": "1cb10366a8c2dbe1af1760ac72dfc31dd24107e909580685011d3423a4a03af1",+ "bytes": 15742,+ "lines": 541+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/profile-portability.ts",+ "sha256": "6dc552c72660d85af64aa4ef80aab2176cfcb7ff2bc6e0ccda7fc51d1165cb41",+ "bytes": 8038,+ "lines": 284+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/profiles.ts",+ "sha256": "4c015d86a84bb483be657c5f8c40a369265e328a63f8b44675f445a9b2e4fd10",+ "bytes": 68088,+ "lines": 2249+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/sessions.ts",+ "sha256": "1494eece48937a84967d1836a695523c38905b96273e2abc18b9669fc70864be",+ "bytes": 31024,+ "lines": 1115+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/skills.ts",+ "sha256": "2f7afc928d68e2e1b1e91e0b110cdf26b113899dc965c0c2fc2b7ac0461cc0c1",+ "bytes": 19830,+ "lines": 694+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/token-optimization.ts",+ "sha256": "ebc7f2ad023d779a50d6cf149b33e22216b5894c16968bb10c33b21daedfb552",+ "bytes": 6550,+ "lines": 208+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/tools.ts",+ "sha256": "e99f2ad199a1c99e32c166f0a4a986870833a3a4d669e0e7fae2ff2deb5b60c2",+ "bytes": 19653,+ "lines": 699+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/http/routes/user-context.ts",+ "sha256": "18a0ac087f3edd74a16da049a6858a5cab741b3ed244e180bdfd43c873445b45",+ "bytes": 3645,+ "lines": 135+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/providers/acp/acp-agent-presets.ts",+ "sha256": "92f6db25c3e8fd2fa329309365407586034acfe27a13dcf6bbcdd09ed2bf75f8",+ "bytes": 1894,+ "lines": 71+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/providers/create.ts",+ "sha256": "b8c36bdb8fbc73a3177c3cd18620fa4b34fa89e032abcfcbea2636b8037eaed5",+ "bytes": 11761,+ "lines": 425+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/providers/model-catalog.ts",+ "sha256": "7c3134f52ac2d453f5b7eb689ea8cd4b298a3ffadbe9f75f309d55a2cf8bfc8b",+ "bytes": 23097,+ "lines": 925+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/agent-service.ts",+ "sha256": "34abffbe34b72316e1b62eca029a86b2c26441bd692553ac3aba32463cc59bb1",+ "bytes": 183103,+ "lines": 6513+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/automation-runner.ts",+ "sha256": "34482673ed64761903accdf376c3e0f14eebfe3aaeb4d30b9914a0cb6715845a",+ "bytes": 7178,+ "lines": 256+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/coding-agent-command.ts",+ "sha256": "a8cd2a2eafbdcbc2d751c5258b675ff29239a9fcf60e37c28ca99c97dd34d6cb",+ "bytes": 7933,+ "lines": 298+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/google-meet/actions.ts",+ "sha256": "6b509a7219b792bd70cfac87c2ea922914fcf16d94b876c2594b95b5dcbf9ec5",+ "bytes": 10677,+ "lines": 401+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/google-meet/service.ts",+ "sha256": "583338dd99f41d0798c6e93df4a915f1d9ae258398a7f90cc7782defb2d6b2ab",+ "bytes": 20210,+ "lines": 720+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/notification-webhook-service.ts",+ "sha256": "f50a480c06b027e1dd88edf3a27a15c72f83dc01f219ee83b2da53efd35d0dae",+ "bytes": 5921,+ "lines": 204+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/org-memory-service.ts",+ "sha256": "5a23fde889382ad6a3004d98c32bb57aa7029caf9664155c94fda69dde3cff79",+ "bytes": 25179,+ "lines": 957+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/org-usage-quota-service.ts",+ "sha256": "f7c012dfd4042c4b40f0c9706d6aa37c6a738c2348ed636e7ac8d468fcaa1c53",+ "bytes": 3532,+ "lines": 116+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/skill-curator-service.ts",+ "sha256": "5d521f89c025bc68d1b0977563be0ff8418f93c382d8f2be78d70181f6a38a71",+ "bytes": 15866,+ "lines": 606+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/services/skill-post-turn-review-service.ts",+ "sha256": "96118c07cb504b74393e4c5a374baede7ab04d75bc7afa162cda9ade08af0361",+ "bytes": 7708,+ "lines": 299+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/tools/ask-user-question-tool.ts",+ "sha256": "f2b53eef9cdec4503e3e87420437013fdad5bc8c185f85ca550201f0913c641d",+ "bytes": 3891,+ "lines": 144+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/tools/bash-config.ts",+ "sha256": "843b3deee007c1e664c539c7798104d05a7e45a39a228fd1239c441e5873a3e2",+ "bytes": 1881,+ "lines": 77+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/tools/bash.ts",+ "sha256": "47e6f94f2a877eda94bf913b5ef6185b3f2c68b6576ecd99edf00d24203138bf",+ "bytes": 21352,+ "lines": 751+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/tools/session-tools.ts",+ "sha256": "cde28f63fa8bd8a44b8e1e23c8580dca11e4a4a21361cdf6853f7232075e0dcd",+ "bytes": 7003,+ "lines": 234+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/server/src/tools/sub-agent-tool.ts",+ "sha256": "dbd813437bdbfcfc6e01eb9c1ea381ba23d4182dca669c2caa9af8dea6ab4154",+ "bytes": 3558,+ "lines": 113+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/web/src/components/CommandPalette.tsx",+ "sha256": "a5797c4fb058b37396584e55efd50f7566671fb93dfbbad7a6804114db6f2a82",+ "bytes": 13019,+ "lines": 470+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/web/src/components/chat/ChatMessageQueuePanel.tsx",+ "sha256": "8d05a3d6fd00baf97eb3a7a9859492c5de1d9e3b520dcc04d7266c97f4a887c9",+ "bytes": 3480,+ "lines": 141+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/web/src/components/setup-wizard/SetupWizard.tsx",+ "sha256": "2306e840fe4af41890d98f445a14ac403224da200bbb2b9207cc10751f7d7fcc",+ "bytes": 4504,+ "lines": 162+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/web/src/hooks/use-notifications.ts",+ "sha256": "478c12b95c8055d0457595b2a747552697abfd2502505bd94170686d0e4d9e2a",+ "bytes": 4371,+ "lines": 140+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/web/src/lib/sw-strategy.ts",+ "sha256": "aed9daadb4617c23dcf0190cf651a25794d1d3d7f7551a8412e45da43f36fbea",+ "bytes": 2418,+ "lines": 98+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "apps/web/sw/service-worker.ts",+ "sha256": "d62710efb97537e539c0aa670ce9f49e762f8987010c2e25f405abaf035f22eb",+ "bytes": 3551,+ "lines": 154+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/agent-browser.mdx",+ "sha256": "2e107273e6f2d7274b7da90d3194222c2262129bb08634918a4b65a15fa56e13",+ "bytes": 8228,+ "lines": 161+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/artifacts.mdx",+ "sha256": "1f16b75099e630a0f500e85d38cbb80469b72ca6a9fb9aa3a8a4795c66a888ee",+ "bytes": 7907,+ "lines": 112+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/automations.mdx",+ "sha256": "8fed0eab74b8e147554123332a50d287ffc60944089e3df9f3169d5e52556070",+ "bytes": 5941,+ "lines": 81+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/backup-restore.mdx",+ "sha256": "16bc1cde130434a4ec32e4f595cb75800a94a8302d9368a46fb4bb5bccaea324",+ "bytes": 4259,+ "lines": 73+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/builtin-tools.mdx",+ "sha256": "8cf3ed926083f691e09f340ffd3ae40e539afd566875baace370f709011128b4",+ "bytes": 34099,+ "lines": 608+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/cli.mdx",+ "sha256": "3ee428e739e41654dfaf7d9d460eed3ab1239c3f41eb6de357ae18054af9ef73",+ "bytes": 3936,+ "lines": 104+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/composio.mdx",+ "sha256": "98f416f97b25daf0dbcaf34e5e553ee1391107a5f211b26df05ce5b619deb283",+ "bytes": 7566,+ "lines": 103+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/desktop.mdx",+ "sha256": "a94ed7de886ed42c592e0812b7ba4246cf4de14f6978e186e6bfda31762ae8e3",+ "bytes": 2653,+ "lines": 40+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/discord.mdx",+ "sha256": "280d8e8efcddc86ddac9a1bb771370cd603ca80b08f511998d10aab481d3923d",+ "bytes": 12512,+ "lines": 249+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/error-tracking.mdx",+ "sha256": "d08085315502411f78e64c1da8a5f4df518562e7127cb844950ecd2fa93ebf60",+ "bytes": 8280,+ "lines": 112+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/google-meet.mdx",+ "sha256": "f560b51faaafe5884022ba28c22d3fb3be0b306b43c556a2d9b5eea94d921cb6",+ "bytes": 6255,+ "lines": 134+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/image-generation.mdx",+ "sha256": "fb7fb65172eb470756e14756669c6972f1d4a206c0493019ceb3ffee06e7094d",+ "bytes": 4689,+ "lines": 56+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/mcp.mdx",+ "sha256": "c3444d6e9315dd6bae003bd7499f6d0394e2b9297d0f659ca79e5f99d7c236e5",+ "bytes": 12054,+ "lines": 258+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/multi-tenancy.mdx",+ "sha256": "02fb1fad51ea92845a089cc58808d1f1d9a7e2fd3e5257611badc46f5adc02fd",+ "bytes": 9156,+ "lines": 193+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/plugins.mdx",+ "sha256": "f316917a154cb1ab4e7a9bc3c786339443cf657afcdea0a1910345f268fd5912",+ "bytes": 9568,+ "lines": 130+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/profiles.mdx",+ "sha256": "74f13c8e0bc2c5f6af58c497106044c883caa0041f9a97bd27e1615e43a9f095",+ "bytes": 16813,+ "lines": 299+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/providers.mdx",+ "sha256": "00efb65785e44ba65f17b5a9daedaae251ae8203c81a0c46b8203ecf44d94dd6",+ "bytes": 10840,+ "lines": 176+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/skills.mdx",+ "sha256": "f5d4622af386ba998171693d77ab9f0071ea02fd38b5ac79dd1a9ce21aa3d07c",+ "bytes": 19513,+ "lines": 402+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/slack.mdx",+ "sha256": "5375abc1df3a86374a3ac554703ed5bf9eb784bda87506d00f0b087a06cceec0",+ "bytes": 12442,+ "lines": 240+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/telegram/chat.mdx",+ "sha256": "71598826c109fcc4ddd44fb0bfe7aefd69cc39cad26b5a4213c03e586e4875b8",+ "bytes": 3461,+ "lines": 97+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "docs/website/content/docs/whatsapp.mdx",+ "sha256": "09fe5b84100aec054051795851ac25b9ce9df0b63e35c5643aabba6d5a2e4878",+ "bytes": 9537,+ "lines": 209+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "packages/core/src/contract.ts",+ "sha256": "2b521a3b87a88675966217afbce3c3dd4e5f9dc67e640c0f41a19d65277613b2",+ "bytes": 87190,+ "lines": 3584+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "packages/core/src/soul/compose.ts",+ "sha256": "d103c0fb232ab5bf6307a440391a6b9e99aaa17d1716b40b1c9c06337eeb6a38",+ "bytes": 1268,+ "lines": 45+ },+ {+ "repository": "ahmadrosid/nakama",+ "commit": "f6c8f26f8a831e690016ec70429c3cb5cb114cec",+ "path": "packages/plugins/workflows/src/workflow-runner.ts",+ "sha256": "e4127720aab20d525e4987465f686887adff44939254859527c65d377fdd755a",+ "bytes": 7343,+ "lines": 299+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "README.md",+ "sha256": "8219da8af9588379c92c394cea6455702f7dfe1a33387eb1c2937eb3b4e6f2e9",+ "bytes": 7034,+ "lines": 119+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "app/api/assistant/route.ts",+ "sha256": "7cee3a24783914ba81ea199744daeabe3852e5c365425ce25a4ddbd73096bf58",+ "bytes": 6377,+ "lines": 180+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "app/register-sw.tsx",+ "sha256": "75259a5cd5b60e72c7a6b9a1fce54a6bcc3423226e3a9ff30a8104d2627a5bea",+ "bytes": 5685,+ "lines": 150+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/AGENT-VAULT.md",+ "sha256": "2b8979530939ed9e7e2e0728da12b3c4077aeb998d77c112ef410a6dbc0bded8",+ "bytes": 4805,+ "lines": 86+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/ARCHITECTURE.md",+ "sha256": "f1b843f2736ffc3bc440a408fc7070345fb7c46146daa467706d012dd4686e11",+ "bytes": 28333,+ "lines": 355+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/CHANNELS.md",+ "sha256": "6b394d3ed2d66ff104af48da2b7649f36d7d71b730856ab7e9ac6c9c681d8d72",+ "bytes": 4276,+ "lines": 112+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/LAUNCH-READINESS.md",+ "sha256": "f9fb8b84d68b0ec5af4345a5998cf44dec00b130ea500f75428a1d7fbaba3500",+ "bytes": 9063,+ "lines": 72+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/MEMORY-SAFETY.md",+ "sha256": "a0353e16ec1eb0248eaa37015018f13ea4b73677a0c8f7f25ab5b6de5c078df0",+ "bytes": 6415,+ "lines": 108+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/PLATFORMS.md",+ "sha256": "510578be72f596266cf92c38af5465470071b88dbab1d8fe6d2dd418865928b3",+ "bytes": 5653,+ "lines": 130+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/PROJECT-MCP-CONNECTIONS.md",+ "sha256": "583fdaa49e2d3d838e9a74f2a6888a6a3bdebb70c75504f5d41a0c3b3129ef96",+ "bytes": 8878,+ "lines": 149+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/SESSION-ARTIFACTS.md",+ "sha256": "4b3c0b9a89bbf81299501a92a775aac392db391f5dfb930810a29fb5c1c39553",+ "bytes": 7701,+ "lines": 85+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/SUBAGENTS.md",+ "sha256": "728e8a7ea58437f2e70ab39d44666705429a4033b9dff727857c3e1cdca7ce0f",+ "bytes": 4429,+ "lines": 88+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "docs/TENANT-PREVIEW.md",+ "sha256": "8e1cd12e177752300389b92034e017891dcd67955eb62faf24a220e913fd2f0d",+ "bytes": 10656,+ "lines": 175+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "frontend/slices/assistant/lib/types.ts",+ "sha256": "28e6b2d6654425aa270e2ab93b9a7dea5cbf538c883cb6100d4596f04a209cbd",+ "bytes": 1301,+ "lines": 50+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "frontend/slices/os-shell/shell.manifest.ts",+ "sha256": "dde44f7f02ec9718354a6587d345da4f611a38e6a1aa5b3d9a7a6c18ba4fc619",+ "bytes": 5821,+ "lines": 102+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "frontend/slices/os-shell/theme-quick-picker.tsx",+ "sha256": "24fba6f034e05751023477c37d8795c927adb091230690d704a4d7bcf68a113d",+ "bytes": 4011,+ "lines": 104+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/agent/memory-resolution.ts",+ "sha256": "678423f59e319dc5648474dd23b22adfe8ba43ab82989b0e063639670871c4fd",+ "bytes": 3810,+ "lines": 80+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/agent/memory-store.ts",+ "sha256": "d51624e898df0c108842c49c8eda33af10eda1fd2beb559ef91a23d0bbe5e55c",+ "bytes": 11839,+ "lines": 189+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/agent/session-create.ts",+ "sha256": "ae83c929545ee7680b6769a283f33402e5585ea3dd0db8ebb08140cfa22c5a96",+ "bytes": 3530,+ "lines": 94+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/agent/subagent-runner.ts",+ "sha256": "9ed1f8866383d6d309ff8e86135527cd6b0e5cad465dbbb9c90538d2a543dbf3",+ "bytes": 7799,+ "lines": 134+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/ai/selected-model-stream.ts",+ "sha256": "2216c43fcab6d11c229f15eb31b4fddde55af88c4286f08fac4ffc7d764957a5",+ "bytes": 5921,+ "lines": 199+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/auth/login-password.ts",+ "sha256": "0d052fa414fc21af5e361f9dbdf6bcdfd9ae8e43b5f2357006c91e52eb744749",+ "bytes": 5720,+ "lines": 147+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/auth/roles.ts",+ "sha256": "ab2c6d03aa9f6d74121e5693601b5a974bf4f6a17e864ce8f0cea8931bfad1af",+ "bytes": 1468,+ "lines": 43+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/host/audit.ts",+ "sha256": "550943a5d7465613163037f71e7fbab68c86d38403611226390dfd90552a49f7",+ "bytes": 7663,+ "lines": 214+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/host/project-worktree.ts",+ "sha256": "31784cdb7afe226a824c9c5b4a6ff028429b11933281156a244d5a48824eaa73",+ "bytes": 8834,+ "lines": 165+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/infra/connection-dispatch.ts",+ "sha256": "3e0a71a0185e6ddd1a2b818e12335d5ecca562e580423b014cc2f293bb783c5b",+ "bytes": 12593,+ "lines": 94+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/mcp/tools-forge.ts",+ "sha256": "9b320ae4c5ad6ef94ad250a5f272e59be96673f510a6155d19eedf4e1c5abe0e",+ "bytes": 8760,+ "lines": 141+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/workflow/graph-engine.ts",+ "sha256": "c7dd541ae7be0f6170f929cd02089e360f91a635a8e860ea37083731c771e08a",+ "bytes": 15609,+ "lines": 102+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/workflow/graph-runtime.ts",+ "sha256": "619bd52d5c3a189cabf76bc2ce142e875ac8f8522f269e358e55262abf243994",+ "bytes": 22649,+ "lines": 206+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/workflow/graph-triggers.ts",+ "sha256": "7501ea5207f44acad46ea8972dec203d6f981402fdbd2e608661f2417640c8f7",+ "bytes": 4574,+ "lines": 44+ },+ {+ "repository": "rahmanef63/mso",+ "commit": "89d61bb0d73b47047c67e51df9a6ee30351c8c3a",+ "path": "lib/workflow/learning.ts",+ "sha256": "e78bc9493e42bad8ae70d60952d570e3f795c9a28c7ad75d47df1e625ea0e18c",+ "bytes": 11590,+ "lines": 208+ }+ ]+}diff --git a/frontend/slices/assistant/CONTRACT.md b/frontend/slices/assistant/CONTRACT.mdindex c31cb25b..112c6ab6 100644--- a/frontend/slices/assistant/CONTRACT.md+++ b/frontend/slices/assistant/CONTRACT.md@@ -100,9 +100,9 @@ complete. See [`docs/MCP.md`](../../../docs/MCP.md) and [`skills/README.md`](../Organization is a first-class app/domain with a secondary **Organization** tab inside Alfa. Both render the same server-side owner-private SSOT at `~/.mso/private/organization.json` via `lib/agent/organization-store.ts`; Alfa does not own or duplicate it. Units and seats define stable hierarchy/reporting context; a seat can point at an existing Project Agent, Local Agent/session, or A2A peer. Those references grant no extra tools or credentials. Workflows may resolve `orgSeatId` at execution time. See [`docs/ORGANIZATION.md`](../../../docs/ORGANIZATION.md).-## Agent+## Browser persona (the localStorage `Agent` type)-**A persona.** Currently that, and only that.+**A browser persona.** This legacy type does not select a saved server profile.| | ||---|---|@@ -118,6 +118,24 @@ can invoke the engine synchronously in the same tick as a switch, so a ref wouldstill hold the previous agent and the first turn after an `@mention` would carrythe wrong persona.+## Saved agent profile++**An Owner device's persistent configuration for a foreground read task.** The+Agents tab opens `ProfilesPanel`; Browser personas remains a separate selection.+`lib/contracts/agent-profile.ts` defines the DTO, `lib/agent/profile-store.ts` owns+private revisioned state, and `/api/v1/agent-profiles` derives the principal from+the live Owner session. Create, edit, clone, default, enable and disable persist+through compare-and-swap revisions. Browser backup does not include this state.++`/api/v1/agent-profiles/run` binds an exact saved revision and model connection to+the shared provider-neutral bounded runner. The server enforces the saved subset+of nine reviewed read capabilities and rechecks Owner authorization, enabled state+and revision before and after model/tool steps and before returning the result.+Each task starts a native session with no inherited browser history or memory.+This is partial NK009–NK010: organization moves, assignment, writes, execution,+external workers and process isolation remain unsupported. See+[`docs/AGENT-PROFILES.md`](../../../docs/AGENT-PROFILES.md) for the exact contract.+---## Alfa Cockpit: one execution surface, existing sources of truth@@ -136,7 +154,7 @@ The Assistant chat now has a compact **Cockpit** bar + responsive panel (desktopBrowser Automations likewise do not introduce a second executor. `Run` turns the saved ordered recipe into one Alfa task; the normal host-tool schemas, server guards, and approval rendezvous remain the execution path.-## What actually reaches the model+## What reaches the legacy browser-chat modelExactly three things, assembled in `chat-panel.tsx`:@@ -149,15 +167,19 @@ Callers with their own tools pass their own system prompt. The image editor does**not**, so it runs on the route default in `app/api/assistant/route.ts` — thatconstant is reachable and must not be deleted as dead.-## Decided: tool scoping is deleted, not repaired+## Legacy browser persona and public MCP catalog contract-Every agent gets **every** tool, on every turn — no per-agent, no per-playbook, and no-per-project filter. This is the contract, not a gap. `registry.test.ts` pins it: the+Every browser persona gets **every** legacy host tool, on every turn — no+per-persona, per-playbook or per-project filter. `registry.test.ts` pins it: the`HOST_AI_TOOLS` array is the whole catalog in catalog order, it is the same object onevery turn, and `registry.ts` exports nothing that could narrow it. MCP holds the sameinvariant on its own side — an `exec` token sees and can call the entire catalog, andthe read/write/exec ladder is the only thing that narrows it (`lib/mcp/global-tools.test.ts`).+Saved profiles use their explicit read-task endpoint and server-side capability+authority. They do not reinterpret the persisted `Agent.allTools` or `Agent.skills`+fields, change `HOST_AI_TOOLS`, or alter the public MCP catalog/cache signature.+Four reasons, and the third is the one that settles it:1. **The lock is already there and it is better.** Every `mutate` tool parks on adiff --git a/frontend/slices/assistant/app.tsx b/frontend/slices/assistant/app.tsxindex 06769275..a149f5e4 100644--- a/frontend/slices/assistant/app.tsx+++ b/frontend/slices/assistant/app.tsx@@ -9,6 +9,7 @@ import { usePublishInspector } from "./lib/host";import { useAIStore } from "./lib/store";import type { Agent, Automation, Skill } from "./lib/types";import { AgentForm } from "./components/agent-form";+import { AgentLibrary } from "./components/agent-library";import { AgentSwitcher } from "./components/agent-switcher";import { AutomationForm } from "./components/automation-form";import { AutomationView } from "./components/automation-view";@@ -37,8 +38,7 @@ const TABS: [Tab, string][] = [["mcp", "Activity"],];-// Alfa: tabbed assistant. Chat keeps the real Claude stream; the other tabs-// manage agents/skills/automations entirely in localStorage (no Convex).+// Saved profiles use server state; legacy personas and playbooks retain local storage.export default function Assistant({ payload }: AppProps) {const store = useAIStore();const route = assistantRouteFromPayload(payload);@@ -147,11 +147,10 @@ export default function Assistant({ payload }: AppProps) {/>{tab === "agents" ? (- <LibraryGrid- kind="agent"+ <AgentLibrarystore={store}onNew={() => setForm({ kind: "agent" })}- onEdit={(it) => setForm({ kind: "agent", item: it as Agent })}+ onEdit={(item) => setForm({ kind: "agent", item })}/>) : tab === "organization" ? (<OrganizationView />diff --git a/frontend/slices/assistant/components/agent-library.tsx b/frontend/slices/assistant/components/agent-library.tsxnew file mode 100644index 00000000..e79df2ae--- /dev/null+++ b/frontend/slices/assistant/components/agent-library.tsx@@ -0,0 +1,19 @@+"use client";++import { useState } from "react";+import { Button } from "@/components/ui/button";+import type { AIStore } from "../lib/store";+import type { Agent } from "../lib/types";+import { LibraryGrid } from "./library-grid";+import { ProfilesPanel } from "./profiles-panel";++export function AgentLibrary({ store, onNew, onEdit }: { store: AIStore; onNew: () => void; onEdit: (agent: Agent) => void }) {+ const [saved, setSaved] = useState(true);+ return <div className="flex min-h-0 flex-1 flex-col">+ <div className="flex flex-wrap gap-2 border-b border-border px-4 py-2" aria-label="Agent libraries">+ <Button className="min-h-11" variant={saved ? "secondary" : "ghost"} aria-pressed={saved} onClick={() => setSaved(true)}>Saved profiles</Button>+ <Button className="min-h-11" variant={!saved ? "secondary" : "ghost"} aria-pressed={!saved} onClick={() => setSaved(false)}>Browser personas</Button>+ </div>+ {saved ? <div className="min-h-0 flex-1 overflow-auto"><ProfilesPanel /></div> : <LibraryGrid kind="agent" store={store} onNew={onNew} onEdit={item => onEdit(item as Agent)} />}+ </div>;+}diff --git a/frontend/slices/assistant/components/chat-panel-view.tsx b/frontend/slices/assistant/components/chat-panel-view.tsxnew file mode 100644index 00000000..65cc67d7--- /dev/null+++ b/frontend/slices/assistant/components/chat-panel-view.tsx@@ -0,0 +1,63 @@+"use client";++import { useEffect, useRef, type ReactNode } from "react";+import { ScrollArea } from "@/components/ui/scroll-area";+import { cn } from "@/lib/utils";+import { AlfaApprovalGrants, AlfaRunProgress, ChatComposer, sendToAlfa, useActiveShell, type ChatMessage } from "@/features/appshell";+import { ChatTranscript } from "./chat-transcript";+import { EmptyState } from "./empty-state";+import { TurnUsage, type ProviderUsage } from "./turn-usage";++const SUGGESTED = ["Show system stats", "List ~/projects", "Create notes.txt in ~/projects with a TODO"];++export function ChatPanelView({ mode, messages, prompts, switcher, cockpit, streaming, turnUsage, threadUsage, onResolve, onStop }: {+ mode: string;+ messages: ChatMessage[];+ prompts: string[];+ switcher: ReactNode;+ cockpit?: ReactNode;+ streaming: boolean;+ turnUsage: ProviderUsage | null;+ threadUsage: ProviderUsage | null;+ onResolve: (id: string, approve: boolean, remember: boolean) => void;+ onStop: () => void;+}) {+ const ios = useActiveShell().id === "ios";+ const bottomRef = useRef<HTMLDivElement>(null);+ useEffect(() => {+ // Coalesce token updates into one frame without restarting a smooth scroll.+ const id = requestAnimationFrame(() => bottomRef.current?.scrollIntoView({ behavior: "auto", block: "end" }));+ return () => cancelAnimationFrame(id);+ }, [messages]);++ return (+ <div className="flex h-full flex-col">+ <div className="flex items-center gap-2 overflow-x-auto border-b border-border bg-card/40 px-3 py-2 [scrollbar-width:none]">+ {switcher}+ </div>+ {cockpit}+ <AlfaRunProgress />+ <AlfaApprovalGrants />+ <div className={cn("px-3 py-1 text-center text-[11px] font-medium", mode === "live" ? "bg-destructive/10 text-destructive" : "bg-muted text-muted-foreground")}>+ {mode === "live"+ ? "● LIVE — Alfa acts on your real VPS; every change needs your approval"+ : "MOCK — actions are simulated (switch to Live in Settings → Server)"}+ </div>+ {messages.length === 0 ? (+ <div className="flex-1 overflow-y-auto">+ <EmptyState prompts={[...new Set([...prompts, ...SUGGESTED])].slice(0, 6)} onPick={(t) => void sendToAlfa(t)} />+ </div>+ ) : (+ <ScrollArea className="flex-1">+ <div data-native-context-menu onContextMenu={(e) => e.stopPropagation()} className={cn("flex flex-col p-4", ios ? "gap-1.5" : "gap-4")}>+ <ChatTranscript messages={messages} ios={ios} onResolve={onResolve} />+ <div ref={bottomRef} />+ </div>+ </ScrollArea>+ )}+ <TurnUsage turnUsage={messages.length > 0 ? turnUsage : null} threadTotal={messages.length > 0 ? threadUsage : null} />+ {/* All surfaces share the sendToAlfa single-flight guard and busy state. */}+ <ChatComposer onSend={(t) => void sendToAlfa(t)} streaming={streaming} onStop={onStop} />+ </div>+ );+}diff --git a/frontend/slices/assistant/components/chat-panel.tsx b/frontend/slices/assistant/components/chat-panel.tsxindex 6d957125..04a1555c 100644--- a/frontend/slices/assistant/components/chat-panel.tsx+++ b/frontend/slices/assistant/components/chat-panel.tsx@@ -9,22 +9,18 @@ import {useState,type Ref} from "react";-import { ScrollArea } from "@/components/ui/scroll-area";-import { cn } from "@/lib/utils";import { errText } from "./error-text";import {updateAlfa,- useActiveShell,useAlfaMessages,awaitAlfaApproval,resolveAlfaApproval,clearAlfaApprovals,useAlfaBusy,sendToAlfa,- ChatComposer,type AlfaMessage} from "@/features/appshell";-import { AlfaRunProgress, AlfaApprovalGrants, alfaRunState, setAlfaOperation, pulseAlfaRun, recordAlfaRunActivity, endAlfaRunState, stopAlfaRunState } from "@/features/appshell";+import { alfaRunState, setAlfaOperation, pulseAlfaRun, recordAlfaRunActivity, endAlfaRunState, stopAlfaRunState } from "@/features/appshell";import { runToolAgent, useOsApi, type AgentMsg } from "../lib/host";import type { Agent, Automation } from "../lib/types";import { activeAgent } from "../lib/store";@@ -32,17 +28,14 @@ import { composeSystem } from "../lib/agent-request";import { composeAutomationRequest } from "../lib/automation-request";import { useHostCommands, type HostToolUi } from "../host-tools/use-host-commands";import { type ChatMessage, type ToolCard } from "@/features/appshell";-import { ChatTranscript } from "./chat-transcript";-import { TurnUsage, addUsage, type ProviderUsage } from "./turn-usage";+import { ChatPanelView } from "./chat-panel-view";+import { addUsage, type ProviderUsage } from "./turn-usage";-import { EmptyState } from "./empty-state";import { useThreadPersistence } from "./use-thread-persistence";import { useAlfaRunner } from "./use-alfa-runner";import { beginAlfaRun, finishAlfaRun } from "../lib/alfa-activity";import { alfaProjectContext } from "@/features/appshell";-const SUGGESTED = ["Show system stats", "List ~/projects", "Create notes.txt in ~/projects with a TODO"];-let seq = 0;const nextId = () => `m${Date.now()}-${seq++}`;@@ -74,7 +67,6 @@ export function ChatPanel({ref?: Ref<ChatHandle>;}) {const api = useOsApi();- const ios = useActiveShell().id === "ios";// The display list lives in the SHARED Alfa store, not in this component. That// is what makes the per-app Alfa sheet show this very conversation instead of a// second, disconnected one — and it is less memory, not more: one array for@@ -93,20 +85,11 @@ export function ChatPanel({const streaming = useAlfaBusy();const [turnUsage, setTurnUsage] = useState<ProviderUsage | null>(null);const [threadUsage, setThreadUsage] = useState<ProviderUsage | null>(null);- const bottomRef = useRef<HTMLDivElement>(null);const abortRef = useRef<AbortController | null>(null);const agentRef = useRef(agent);const historyRef = useRef<AgentMsg[]>([]);useEffect(() => { agentRef.current = agent; }, [agent]);- useEffect(() => {- // Coalesce into one rAF (streaming appends `messages` per token) and use- // instant behavior — a smooth scroll restarted every token both janks and- // forces a layout each frame.- const id = requestAnimationFrame(() => bottomRef.current?.scrollIntoView({ behavior: "auto", block: "end" }));- return () => cancelAnimationFrame(id);- }, [messages]);-// Stable UI seam for the tool binding: push/patch tool cards + await approval.const pushCard = useCallback((id: string, card: ToolCard) => {setAlfaOperation(card.name, card.status === "pending");@@ -256,44 +239,6 @@ export function ChatPanel({newThread: handleNewThread,}));- return (- <div className="flex h-full flex-col">- <div className="flex items-center gap-2 overflow-x-auto border-b border-border bg-card/40 px-3 py-2 [scrollbar-width:none]">- {switcher}- </div>- {cockpit}- <AlfaRunProgress />- <AlfaApprovalGrants />- <div- className={cn(- "px-3 py-1 text-center text-[11px] font-medium",- api.mode === "live" ? "bg-destructive/10 text-destructive" : "bg-muted text-muted-foreground",- )}- >- {api.mode === "live"- ? "● LIVE — Alfa acts on your real VPS; every change needs your approval"- : "MOCK — actions are simulated (switch to Live in Settings → Server)"}- </div>- {messages.length === 0 ? (- <div className="flex-1 overflow-y-auto">- <EmptyState prompts={[...new Set([...prompts, ...SUGGESTED])].slice(0, 6)} onPick={(t) => void sendToAlfa(t)} />- </div>- ) : (- <ScrollArea className="flex-1">- <div- data-native-context-menu- onContextMenu={(e) => e.stopPropagation()}- className={cn("flex flex-col p-4", ios ? "gap-1.5" : "gap-4")}- >- <ChatTranscript messages={messages} ios={ios} onResolve={resolve}/>- <div ref={bottomRef} />- </div>- </ScrollArea>- )}- <TurnUsage turnUsage={messages.length > 0 ? turnUsage : null} threadTotal={messages.length > 0 ? threadUsage : null} />- {/* Through sendToAlfa, not send(): one entry point means one single-flight- guard and one busy flag for every surface. */}- <ChatComposer onSend={(t) => void sendToAlfa(t)} streaming={streaming} onStop={stop} />- </div>- );+ return <ChatPanelView mode={api.mode} messages={messages} prompts={prompts} switcher={switcher} cockpit={cockpit}+ streaming={streaming} turnUsage={turnUsage} threadUsage={threadUsage} onResolve={resolve} onStop={stop} />;}diff --git a/frontend/slices/assistant/components/profile-form.tsx b/frontend/slices/assistant/components/profile-form.tsxnew file mode 100644index 00000000..fca58287--- /dev/null+++ b/frontend/slices/assistant/components/profile-form.tsx@@ -0,0 +1,55 @@+"use client";++import { useId, useState } from "react";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";+import { Textarea } from "@/components/ui/textarea";+import type { AgentProfile, AgentProfileCatalog, AgentProfileConfig } from "@/lib/contracts/agent-profile";++export function ProfileForm({ profile, catalog, onSave, onCancel }: {+ profile?: AgentProfile;+ catalog: AgentProfileCatalog;+ onSave: (config: AgentProfileConfig, reason: string) => Promise<void>;+ onCancel: () => void;+}) {+ const instructionsId = useId();+ const [config, setConfig] = useState<AgentProfileConfig>(profile?.config ?? {+ name: "", avatar: "", instructions: "", runtime: "mso-readonly", model: catalog.selectedModel, tools: [],+ });+ const [reason, setReason] = useState(profile ? "" : "Create saved profile");+ const [busy, setBusy] = useState(false);+ const [error, setError] = useState("");+ const save = async (event: React.FormEvent) => {+ event.preventDefault(); setBusy(true); setError("");+ try { await onSave(config, reason); } catch (cause) { setError(cause instanceof Error ? cause.message : "Could not save profile."); }+ finally { setBusy(false); }+ };+ return <form onSubmit={(event) => void save(event)} className="space-y-5 rounded-lg border border-border bg-card p-4">+ <h2 className="text-lg font-semibold">{profile ? `Edit ${profile.config.name}` : "Create saved profile"}</h2>+ <div className="grid gap-4 @md:grid-cols-[1fr_6rem]">+ <label className="space-y-1 text-sm">Name<Input required maxLength={80} value={config.name} onChange={(event) => setConfig({ ...config, name: event.target.value })} /></label>+ <label className="space-y-1 text-sm">Initials<Input maxLength={8} value={config.avatar} onChange={(event) => setConfig({ ...config, avatar: event.target.value })} placeholder="Optional" /></label>+ </div>+ <div className="space-y-1 text-sm"><label htmlFor={instructionsId}>Instructions</label><Textarea id={instructionsId} maxLength={4000} value={config.instructions} onChange={(event) => setConfig({ ...config, instructions: event.target.value })} placeholder="Describe the work and response style for this profile." className="min-h-28" /></div>+ <fieldset className="space-y-3">+ <legend className="text-sm font-medium">Model connection</legend>+ <p className="text-xs text-muted-foreground">Uses the exact provider and model configured in Settings. Credentials stay in that connection.</p>+ <div className="grid gap-3 @lg:grid-cols-2">+ <label className="space-y-1 text-sm">Provider ID<Input required maxLength={64} value={config.model.provider} onChange={(event) => setConfig({ ...config, model: { ...config.model, provider: event.target.value } })} /></label>+ <label className="space-y-1 text-sm">Model ID<Input required maxLength={200} value={config.model.model} onChange={(event) => setConfig({ ...config, model: { ...config.model, model: event.target.value } })} /></label>+ </div>+ </fieldset>+ <fieldset className="space-y-2">+ <legend className="text-sm font-medium">Allowed read tools</legend>+ <p className="text-xs text-muted-foreground">Only selected tools can run. With none selected, the profile answers from its instructions and the task text.</p>+ {catalog.tools.map(tool => <label key={tool.name} className="flex min-h-11 cursor-pointer items-start gap-3 rounded-md px-2 py-2 hover:bg-muted">+ <Input type="checkbox" className="mt-0.5 size-4 shrink-0" checked={config.tools.includes(tool.name)} onChange={(event) => setConfig({ ...config, tools: event.target.checked ? [...config.tools, tool.name] : config.tools.filter(name => name !== tool.name) })} />+ <span className="min-w-0 text-sm"><span className="break-all font-medium">{tool.name}</span><span className="mt-0.5 block text-xs text-muted-foreground">{tool.description}</span></span>+ </label>)}+ </fieldset>+ <label className="block space-y-1 text-sm">Reason for this revision<Input required maxLength={400} value={reason} onChange={(event) => setReason(event.target.value)} placeholder="What changed and why?" /></label>+ <p className="text-xs text-muted-foreground">Runtime: MSO read task. Write tools, external runtimes, organization moves, and memory or skill assignment are not available in this version.</p>+ {error && <p role="alert" className="text-sm text-destructive">{error}</p>}+ <div className="flex flex-wrap gap-2"><Button className="min-h-11" type="submit" disabled={busy || !config.name.trim() || !reason.trim()}>{busy ? "Saving…" : "Save profile"}</Button><Button className="min-h-11" type="button" variant="outline" onClick={onCancel} disabled={busy}>Cancel</Button></div>+ </form>;+}diff --git a/frontend/slices/assistant/components/profile-task.tsx b/frontend/slices/assistant/components/profile-task.tsxnew file mode 100644index 00000000..7f4abaa2--- /dev/null+++ b/frontend/slices/assistant/components/profile-task.tsx@@ -0,0 +1,46 @@+"use client";++import { useEffect, useRef, useState } from "react";+import { Button } from "@/components/ui/button";+import { Textarea } from "@/components/ui/textarea";+import type { AgentProfile, AgentProfileRunResult } from "@/lib/contracts/agent-profile";+import { profileResponse } from "../lib/profile-errors";++export function ProfileTask({ profile }: { profile: AgentProfile }) {+ const [prompt, setPrompt] = useState("");+ const [busy, setBusy] = useState(false);+ const [result, setResult] = useState<AgentProfileRunResult | null>(null);+ const [error, setError] = useState("");+ const controller = useRef<AbortController | null>(null);+ useEffect(() => () => controller.current?.abort(), []);+ const run = async (event: React.FormEvent) => {+ event.preventDefault();+ const abort = new AbortController(); controller.current = abort;+ setBusy(true); setError(""); setResult(null);+ try {+ const response = await fetch("/api/v1/agent-profiles/run", { method: "POST", headers: { "Content-Type": "application/json" }, signal: abort.signal,+ body: JSON.stringify({ profileId: profile.id, profileRevision: profile.revision, prompt }) });+ setResult(await profileResponse<AgentProfileRunResult>(response));+ } catch (cause) { setError(abort.signal.aborted ? "Stopped. Completed reads remain in the run session." : cause instanceof Error ? cause.message : "The task failed."); }+ finally { setBusy(false); controller.current = null; }+ };+ return <section className="space-y-3 border-t border-border pt-4" aria-labelledby="profile-task-heading">+ <h3 id="profile-task-heading" className="font-semibold">Run a read task</h3>+ <p className="text-sm text-muted-foreground">{profile.config.name}, revision {profile.revision}, uses {profile.config.model.provider}/{profile.config.model.model}. Each task starts a new session without earlier chat or memory.</p>+ <form onSubmit={(event) => void run(event)} className="space-y-3">+ <label className="block space-y-1 text-sm">Task<Textarea required maxLength={8000} value={prompt} disabled={busy || !profile.enabled} onChange={(event) => setPrompt(event.target.value)} placeholder="Describe what to inspect or explain." className="min-h-24" /></label>+ <div className="flex flex-wrap items-center gap-3">+ <Button className="min-h-11" disabled={busy || !profile.enabled || !prompt.trim()}>{busy ? "Running…" : "Run read task"}</Button>+ {busy && <Button className="min-h-11" type="button" variant="outline" onClick={() => controller.current?.abort()}>Stop task</Button>}+ {busy && <span role="status" className="text-sm text-muted-foreground">Reading with the saved profile. Maximum one minute.</span>}+ </div>+ </form>+ {error && <p role="alert" className="text-sm text-destructive">{error}</p>}+ {result && <div className="space-y-3 rounded-md bg-muted p-4">+ <p className="text-sm font-medium">{result.status === "completed" ? "Completed" : "Stopped at the configured limit"} · {result.rounds} model turns</p>+ <div className="whitespace-pre-wrap break-words text-sm leading-relaxed">{result.text || "The provider returned no text."}</div>+ {result.toolCalls.length > 0 && <ul className="space-y-1 text-xs">{result.toolCalls.map((call, index) => <li key={index}>{call.name}: {call.ok ? "completed" : "denied or failed"}</li>)}</ul>}+ <p className="break-all text-xs text-muted-foreground">Run session: {result.runId}. The session and tool receipts are available in Sessions.</p>+ </div>}+ </section>;+}diff --git a/frontend/slices/assistant/components/profiles-panel.tsx b/frontend/slices/assistant/components/profiles-panel.tsxnew file mode 100644index 00000000..6c510fb6--- /dev/null+++ b/frontend/slices/assistant/components/profiles-panel.tsx@@ -0,0 +1,90 @@+"use client";++import { useEffect, useState } from "react";+import { Button } from "@/components/ui/button";+import type { AgentProfile, AgentProfileCatalog, AgentProfileConfig, AgentProfileStore } from "@/lib/contracts/agent-profile";+import { profileResponse } from "../lib/profile-errors";+import { ProfileForm } from "./profile-form";+import { ProfileTask } from "./profile-task";++export function ProfilesPanel() {+ const [catalog, setCatalog] = useState<AgentProfileCatalog | null>(null);+ const [selected, setSelected] = useState("");+ const [editing, setEditing] = useState<{ profile?: AgentProfile } | null>(null);+ const [loading, setLoading] = useState(true);+ const [busy, setBusy] = useState(false);+ const [error, setError] = useState("");+ const [notice, setNotice] = useState("");+ const [reload, setReload] = useState(0);+ const refresh = () => { setLoading(true); setError(""); setReload(value => value + 1); };+ useEffect(() => {+ const abort = new AbortController();+ void fetch("/api/v1/agent-profiles", { cache: "no-store", signal: abort.signal })+ .then(response => profileResponse<AgentProfileCatalog>(response))+ .then(data => {+ if (abort.signal.aborted) return;+ setCatalog(data); setSelected(current => data.store.profiles.some(profile => profile.id === current) ? current : data.store.defaultProfileId ?? data.store.profiles[0]?.id ?? "");+ })+ .catch(cause => { if (!abort.signal.aborted) setError(cause instanceof Error ? cause.message : "Could not load profiles."); })+ .finally(() => { if (!abort.signal.aborted) setLoading(false); });+ return () => abort.abort();+ }, [reload]);++ const mutate = async (action: string, profile?: AgentProfile, extra: Record<string, unknown> = {}) => {+ if (!catalog) return;+ const data = await profileResponse<{ store: AgentProfileStore }>(await fetch("/api/v1/agent-profiles", {+ method: "POST", headers: { "Content-Type": "application/json" },+ body: JSON.stringify({ action, expectedRevision: catalog.store.revision, ...(profile ? { id: profile.id, profileRevision: profile.revision } : {}), reason: `${action} saved profile`, ...extra }),+ }));+ setCatalog({ ...catalog, store: data.store });+ if (action === "create" || action === "clone") setSelected(data.store.profiles.at(-1)?.id ?? "");+ setNotice("Saved on the server.");+ };+ const act = async (action: string, profile: AgentProfile) => {+ setBusy(true); setError(""); setNotice("");+ try { await mutate(action, profile, action === "clone" ? { name: `${profile.config.name.slice(0, 74)} copy` } : {}); }+ catch (cause) { setError(cause instanceof Error ? cause.message : "The profile could not be updated."); }+ finally { setBusy(false); }+ };+ const save = async (config: AgentProfileConfig, reason: string) => {+ await mutate(editing?.profile ? "edit" : "create", editing?.profile, { config, reason });+ setEditing(null);+ };+ const profile = catalog?.store.profiles.find(row => row.id === selected);++ return <div className="@container space-y-5 p-4 [padding-bottom:calc(1rem+var(--sai-bottom))]">+ <header className="flex flex-wrap items-start justify-between gap-3">+ <div><h1 className="text-lg font-semibold">Saved agent profiles</h1><p className="mt-1 max-w-prose text-sm text-muted-foreground">Profiles and revisions are saved for this Owner device. Select a profile to inspect its configuration or run a read task.</p></div>+ <div className="flex flex-wrap gap-2"><Button className="min-h-11" variant="outline" disabled={loading || busy} onClick={() => void refresh()}>{loading ? "Loading…" : "Refresh"}</Button><Button className="min-h-11" disabled={!catalog || busy} onClick={() => { setEditing({}); setNotice(""); }}>New saved profile</Button></div>+ </header>+ {error && <p role="alert" className="text-sm text-destructive">{error}</p>}+ {notice && <p role="status" className="text-sm text-muted-foreground">{notice}</p>}+ {loading && !catalog && <p role="status" className="text-sm text-muted-foreground">Loading saved profiles…</p>}+ {editing && catalog ? <ProfileForm key={editing.profile?.id ?? "new"} profile={editing.profile} catalog={catalog} onSave={save} onCancel={() => setEditing(null)} /> : catalog && <>+ {!catalog.store.profiles.length ? <div className="rounded-lg border border-border bg-card p-6"><h2 className="font-medium">No saved profiles yet</h2><p className="mt-2 text-sm text-muted-foreground">Create a profile, choose its exact model, and select the read tools it may use. Browser personas are available in the other tab.</p></div> : <div className="grid min-w-0 gap-5 @xl:grid-cols-[minmax(10rem,1fr)_minmax(0,3fr)]">+ <nav aria-label="Saved profiles" className="flex min-w-0 flex-col gap-1">+ {catalog.store.profiles.map(row => <Button key={row.id} variant={row.id === selected ? "secondary" : "ghost"} className="h-auto min-h-11 justify-start whitespace-normal text-left" onClick={() => { setSelected(row.id); setNotice(""); }}>+ <span className="min-w-0 break-words">{row.config.avatar ? `${row.config.avatar} ` : ""}{row.config.name}<span className="block text-xs font-normal text-muted-foreground">Revision {row.revision}{catalog.store.defaultProfileId === row.id ? " · Default" : ""}{!row.enabled ? " · Disabled" : ""}</span></span>+ </Button>)}+ </nav>+ {profile && <section className="min-w-0 space-y-4 rounded-lg border border-border bg-card p-4">+ <div><h2 className="break-words text-lg font-semibold">{profile.config.name}</h2><p className="mt-1 break-all text-sm text-muted-foreground">{profile.config.model.provider}/{profile.config.model.model}</p></div>+ <p className="whitespace-pre-wrap break-words text-sm">{profile.config.instructions || "No additional instructions."}</p>+ <p className="text-sm text-muted-foreground">MSO read task · {profile.config.tools.length} selected tools</p>+ <p className="break-words text-xs text-muted-foreground">{profile.config.tools.join(", ") || "No tools: text responses only."}</p>+ <div className="flex flex-wrap gap-2">+ <Button className="min-h-11" size="sm" variant="outline" disabled={busy} onClick={() => setEditing({ profile })}>Edit profile</Button>+ <Button className="min-h-11" size="sm" variant="outline" disabled={busy} onClick={() => void act("clone", profile)}>Clone profile</Button>+ <Button className="min-h-11" size="sm" variant="outline" disabled={busy || !profile.enabled || catalog.store.defaultProfileId === profile.id} onClick={() => void act("default", profile)}>{catalog.store.defaultProfileId === profile.id ? "Default profile" : "Set default"}</Button>+ <Button className="min-h-11" size="sm" variant="outline" disabled={busy} onClick={() => void act(profile.enabled ? "disable" : "enable", profile)}>{profile.enabled ? "Disable profile" : "Enable profile"}</Button>+ </div>+ <details className="text-sm"><summary className="cursor-pointer rounded py-2 font-medium focus-visible:outline-2 focus-visible:outline-ring">Revision history ({profile.history.length})</summary><ol className="mt-2 space-y-3">{[...profile.history].reverse().map(entry => <li key={entry.revision} className="border-t border-border pt-3">+ <p className="font-medium">Revision {entry.revision} · {entry.action}</p><p className="mt-1 break-words">{entry.reason}</p><p className="mt-1 break-all text-xs text-muted-foreground">{entry.at} · {entry.actor}</p>+ <details><summary className="cursor-pointer py-2 text-xs focus-visible:outline-2 focus-visible:outline-ring">View saved configuration</summary><pre className="overflow-x-auto whitespace-pre-wrap break-words rounded bg-muted p-3 text-xs">{JSON.stringify(entry.config, null, 2)}</pre></details>+ </li>)}</ol></details>+ <ProfileTask key={`${profile.id}:${profile.revision}`} profile={profile} />+ </section>}+ </div>}+ </>}+ </div>;+}diff --git a/frontend/slices/assistant/components/thread-list.tsx b/frontend/slices/assistant/components/thread-list.tsxindex cb1c7635..862594c8 100644--- a/frontend/slices/assistant/components/thread-list.tsx+++ b/frontend/slices/assistant/components/thread-list.tsx@@ -31,8 +31,14 @@ export function ThreadList({const [editingTitle, setEditingTitle] = useState("");const [confirmDeleteId, setConfirmDeleteId] = useState<string | null>(null);const [error, setError] = useState<string | null>(null);+ const [previousOpen, setPreviousOpen] = useState(open);const design = useShellDesign();+ if (open !== previousOpen) {+ setPreviousOpen(open);+ if (open) { setEditingId(null); setConfirmDeleteId(null); setError(null); }+ }+const load = useCallback(() => {fetch("/api/threads", { cache: "no-store" }).then((r) => { if (!r.ok) throw new Error("load_failed"); return r.json(); })@@ -41,12 +47,7 @@ export function ThreadList({}, []);useEffect(() => {- if (open) {- load();- setEditingId(null);- setConfirmDeleteId(null);- setError(null);- }+ if (open) load();}, [open, load]);async function resume(id: string) {diff --git a/frontend/slices/assistant/lib/profile-errors.ts b/frontend/slices/assistant/lib/profile-errors.tsnew file mode 100644index 00000000..e295a0fa--- /dev/null+++ b/frontend/slices/assistant/lib/profile-errors.ts@@ -0,0 +1,19 @@+export function profileErrorText(code: string): string {+ if (code.includes("revision_conflict")) return "This profile changed in another tab. Refresh, then reopen the latest revision before saving or running.";+ if (code === "profile_disabled") return "This profile is disabled. Enable it before running.";+ if (code.includes("owner") || code === "unauthorized") return "An active Owner session is required. Sign in again if this device was revoked or changed.";+ if (code.startsWith("no_api_key:")) return `Connect ${code.slice(11)} in Settings before running this profile.`;+ if (code === "profile_run_already_active") return "A saved-profile task is already running on this device. Wait for it to finish or stop it.";+ if (code === "rate_limited") return "Too many tasks were started. Wait one minute before trying again.";+ if (code.includes("unsupported")) return "This configuration is not supported by the current profile runtime.";+ if (code === "profile_commit_uncertain_refresh_before_retry") return "The save outcome could not be confirmed. Refresh and check the revision before trying again.";+ if (code === "profile_run_timeout") return "The task reached its one-minute limit. Its session records the steps that completed.";+ if (code === "oauth_refresh_failed") return "The selected model connection needs attention. Reconnect it in Settings.";+ return "The profile request failed. Refresh to check its saved state, then try again.";+}++export async function profileResponse<T>(response: Response): Promise<T> {+ const body = await response.json();+ if (!response.ok) throw new Error(profileErrorText(String(body.error ?? "profile_request_failed")));+ return body as T;+}diff --git a/frontend/slices/auth/components/auth-gate.tsx b/frontend/slices/auth/components/auth-gate.tsxindex f783287e..d2241814 100644--- a/frontend/slices/auth/components/auth-gate.tsx+++ b/frontend/slices/auth/components/auth-gate.tsx@@ -1,11 +1,13 @@"use client";import { cn } from "@/lib/utils";-import { useEffect, useState, type ReactNode } from "react";+import { type ReactNode } from "react";import { Loader2 } from "lucide-react";import { useAppearance } from "@/lib/appearance";import { IS_DEMO } from "@/lib/demo";import { useSession } from "../lib/use-session";+import { ONBOARDING_OPEN } from "../lib/onboarding-state";+import { FirstLoginOnboarding } from "./first-login-onboarding";// The shell is PUBLIC: anyone can open it and browse on mock data — no sign-in// wall. Sign-in unlocks device-role-gated live host access (files/terminal/@@ -79,121 +81,6 @@ function Splash() {);}-const ONBOARDING_KEY = "mso:onboarding:v1";-const ONBOARDING_OPEN = "mso:onboarding:open";--type StatusInfo = {- linuxUser: string;- readRoots: string[];- writeRoots: string[];- currentAccess: string;- publicExposureWarning: string | null;-};--function FirstLoginOnboarding() {- const [open, setOpen] = useState(() => {- if (typeof window === "undefined") return false;- return localStorage.getItem(ONBOARDING_KEY) !== "done";- });- const [info, setInfo] = useState<StatusInfo | null>(null);-- useEffect(() => {- const onOpen = () => setOpen(true);- window.addEventListener(ONBOARDING_OPEN, onOpen);- return () => window.removeEventListener(ONBOARDING_OPEN, onOpen);- }, []);-- useEffect(() => {- if (!open || info) return;- let alive = true;- fetch("/api/status", { cache: "no-store" })- .then((r) => (r.ok ? r.json() : null))- .then((body: StatusInfo | null) => {- if (alive && body) setInfo(body);- })- .catch(() => {});- return () => {- alive = false;- };- }, [open, info]);-- function close() {- localStorage.setItem(ONBOARDING_KEY, "done");- setOpen(false);- }-- if (!open) return null;-- const steps = [- "Welcome to MSO",- "Confirm security posture",- "Check filesystem roots",- "Check device approval",- "Open System Monitor",- "Open Files",- "Launch Terminal",- "Configure AI optionally",- ];-- return (- <div className="fixed inset-0 z-[70] grid place-items-center bg-background/65 p-4 backdrop-blur-sm">- <div className="max-h-[min(42rem,calc(100dvh-2rem))] w-full max-w-xl overflow-auto rounded-xl border border-border bg-popover p-5 text-popover-foreground shadow-xl">- <div className="space-y-1">- <h2 className="text-lg font-bold">Welcome to MSO</h2>- <p className="text-sm text-muted-foreground">- MSO gives this browser terminal and file access as the Linux user below. Review this before using live mode.- </p>- </div>-- <div className="mt-4 grid gap-2 rounded-lg border border-border/70 bg-muted/35 p-3 text-sm">- <InfoRow label="MSO is running as" value={info?.linuxUser ?? "Loading..."} />- <InfoRow label="Read roots" value={info?.readRoots?.join(":") ?? "Loading..."} />- <InfoRow label="Write roots" value={info?.writeRoots?.join(":") ?? "Loading..."} />- <InfoRow label="Current access" value={info?.currentAccess ?? "Loading..."} />- {info?.publicExposureWarning && (- <p className="rounded-md bg-amber-500/15 p-2 text-xs font-medium text-amber-700 dark:text-amber-300">- {info.publicExposureWarning}- </p>- )}- </div>-- <ol className="mt-4 grid gap-2 text-sm">- {steps.map((step, i) => (- <li key={step} className="flex gap-2">- <span className="grid size-5 shrink-0 place-items-center rounded-full bg-primary text-[11px] font-bold text-primary-foreground">- {i + 1}- </span>- <span>{step}</span>- </li>- ))}- </ol>-- <p className="mt-4 text-xs text-muted-foreground">- AI setup is optional. This onboarding does not change security settings.- </p>-- <div className="mt-5 flex justify-end gap-2">- <button type="button" onClick={close} className="rounded-md px-3 py-2 text-sm text-muted-foreground hover:bg-muted">- Skip- </button>- <button type="button" onClick={close} className="rounded-md bg-primary px-3 py-2 text-sm font-semibold text-primary-foreground">- Done- </button>- </div>- </div>- </div>- );-}--function InfoRow({ label, value }: { label: string; value: string }) {- return (- <div className="grid gap-1 sm:grid-cols-[11rem_1fr]">- <span className="text-xs font-semibold text-muted-foreground">{label}</span>- <span className="break-words font-mono text-xs">{value}</span>- </div>- );-}-export function openOnboarding() {window.dispatchEvent(new Event(ONBOARDING_OPEN));}diff --git a/frontend/slices/auth/components/first-login-onboarding.tsx b/frontend/slices/auth/components/first-login-onboarding.tsxnew file mode 100644index 00000000..6f8075a7--- /dev/null+++ b/frontend/slices/auth/components/first-login-onboarding.tsx@@ -0,0 +1,75 @@+"use client";++import { useEffect, useState } from "react";+import { Button } from "@/components/ui/button";+import { ResponsiveDialog } from "@/features/appshell";+import { useSession } from "../lib/use-session";+import { ONBOARDING_KEY, ONBOARDING_OPEN, ONBOARDING_STEPS, onboardingStorage, readOnboardingProgress, shouldOpenOnboarding, writeOnboardingProgress, type OnboardingProgress } from "../lib/onboarding-state";+import { OnboardingReadiness } from "./onboarding-readiness";+import { OnboardingProjectPicker } from "./onboarding-project";+import { OnboardingReceipt } from "./onboarding-receipt";++const LABELS = { welcome: "Start", readiness: "Readiness", project: "Project", receipt: "First result" };++export function FirstLoginOnboarding() {+ const { role } = useSession();+ const [open, setOpen] = useState(() => typeof window !== "undefined" && shouldOpenOnboarding(onboardingStorage()));+ const [progress, setProgress] = useState<OnboardingProgress>(() => readOnboardingProgress(onboardingStorage()));+ const [storageError, setStorageError] = useState(false);++ useEffect(() => {+ const reopen = () => setOpen(true);+ window.addEventListener(ONBOARDING_OPEN, reopen);+ return () => window.removeEventListener(ONBOARDING_OPEN, reopen);+ }, []);++ function save(value: OnboardingProgress) {+ setProgress(value);+ setStorageError(!writeOnboardingProgress(onboardingStorage(), value));+ }++ function close() {+ try { onboardingStorage()?.setItem(ONBOARDING_KEY, "done"); } catch { setStorageError(true); }+ setOpen(false);+ }++ function navigate(href: string) {+ close();+ window.location.assign(href);+ }++ const steps = role === "owner" ? ONBOARDING_STEPS : ONBOARDING_STEPS.slice(0, 2);+ const step = steps.includes(progress.step) ? progress.step : "readiness";+ const index = steps.indexOf(step);+ const next = steps[index + 1];++ return <ResponsiveDialog open={open} onOpenChange={(value) => { if (!value) close(); }} size="lg" contentClassName="z-[70]">+ <ResponsiveDialog.Header>+ <ResponsiveDialog.Title>Set up MSO</ResponsiveDialog.Title>+ <ResponsiveDialog.Description>Check this host, choose a project and keep evidence of your first action.</ResponsiveDialog.Description>+ </ResponsiveDialog.Header>+ <ResponsiveDialog.Body className="space-y-5">+ <nav aria-label="Setup steps"><ol className="flex flex-wrap gap-1">{steps.map((value) => <li key={value}><Button variant={step === value ? "secondary" : "ghost"} className="min-h-11" aria-current={step === value ? "step" : undefined} onClick={() => save({ ...progress, step: value })}>{LABELS[value]}</Button></li>)}</ol></nav>+ {storageError ? <p role="alert" className="text-sm text-destructive">This browser could not save setup progress. Keep this tab open; any run receipt is still available in Workflows on the server.</p> : null}+ {step === "welcome" ? <section className="space-y-4" aria-labelledby="onboarding-start">+ <h3 id="onboarding-start" className="font-semibold">Use this installation as it is</h3>+ <p className="text-sm">Your approved device can continue with the existing host setup. A personal installation does not need a team or a new account to use this guide.</p>+ {role === "owner" ? <div className="space-y-3 rounded-lg border p-4">+ <h4 className="font-medium">Have an existing backup?</h4>+ <p className="text-sm text-muted-foreground">Review backup options before creating new work. Settings can import browser data and verify server memory snapshots in an isolated restore folder. These options do not replace a full installation restore.</p>+ <Button variant="outline" className="min-h-11" onClick={() => navigate("/settings?section=backup")}>Open backup options</Button>+ </div> : <p className="text-sm text-muted-foreground">An Owner manages backup and connection settings. Continue to review the access available to this device.</p>}+ <p className="text-xs text-muted-foreground">For installation or Owner recovery, use the supported local installer and <code>mso doctor</code>. Device approval remains available from the host; this guide does not replace it.</p>+ </section> : null}+ {step === "readiness" ? <OnboardingReadiness role={role} /> : null}+ {step === "project" && role === "owner" ? <OnboardingProjectPicker selected={progress.project} onFiles={() => navigate("/files")} onSelect={(project) => save({ step: "project", project, ...(project.id === progress.project?.id ? { attempt: progress.attempt } : {}) })} /> : null}+ {step === "receipt" && role === "owner" ? <OnboardingReceipt progress={progress} onProgress={save} onWorkflows={() => navigate("/workflows")} /> : null}+ <p className="text-xs text-muted-foreground">You can pause at any step. Reopen the guide from Settings → Account → About → Maintenance → Setup; your last step and receipt reference remain in this browser.</p>+ </ResponsiveDialog.Body>+ <ResponsiveDialog.Footer>+ <Button variant="ghost" className="min-h-11" onClick={close}>{next ? "Skip for now" : "Close guide"}</Button>+ {index > 0 ? <Button variant="outline" className="min-h-11" onClick={() => save({ ...progress, step: steps[index - 1] })}>Back</Button> : null}+ {next ? <Button className="min-h-11" disabled={step === "project" && !progress.project} onClick={() => save({ ...progress, step: next })}>{step === "welcome" ? "Check readiness" : step === "readiness" ? "Choose a project" : "Review first action"}</Button> : null}+ </ResponsiveDialog.Footer>+ </ResponsiveDialog>;+}diff --git a/frontend/slices/auth/components/onboarding-project.tsx b/frontend/slices/auth/components/onboarding-project.tsxnew file mode 100644index 00000000..889b7674--- /dev/null+++ b/frontend/slices/auth/components/onboarding-project.tsx@@ -0,0 +1,48 @@+"use client";++import { useEffect, useState } from "react";+import { Button } from "@/components/ui/button";+import { Input } from "@/components/ui/input";+import { loadOnboardingProjects, onboardingError, type ProjectPage } from "../lib/onboarding-api";+import type { OnboardingProject } from "../lib/onboarding-state";++export function OnboardingProjectPicker({ selected, onSelect, onFiles }: { selected?: OnboardingProject; onSelect: (project: OnboardingProject) => void; onFiles: () => void }) {+ const [query, setQuery] = useState("");+ const [search, setSearch] = useState({ query: "", revision: 0 });+ const [page, setPage] = useState<ProjectPage | null>(null);+ const [error, setError] = useState("");++ useEffect(() => {+ const controller = new AbortController();+ void loadOnboardingProjects(search.query, controller.signal)+ .then((value) => { if (!controller.signal.aborted) setPage(value); })+ .catch((cause) => { if (!controller.signal.aborted) setError(onboardingError(cause)); });+ return () => controller.abort();+ }, [search]);++ function findProjects() {+ setPage(null);+ setError("");+ setSearch((value) => ({ query, revision: value.revision + 1 }));+ }++ return <section className="space-y-4" aria-labelledby="onboarding-project">+ <div className="space-y-2">+ <h3 id="onboarding-project" className="font-semibold">Choose the project to inspect</h3>+ <p className="text-sm text-muted-foreground">Select an existing project from this host. The check resolves it again and reads Git, package and knowledge metadata.</p>+ </div>+ <form className="flex gap-2" onSubmit={(event) => { event.preventDefault(); findProjects(); }}>+ <Input aria-label="Search host projects" value={query} maxLength={120} onChange={(event) => setQuery(event.target.value)} placeholder="Project name" className="min-h-11 min-w-0" />+ <Button type="submit" variant="outline" className="min-h-11">Search</Button>+ </form>+ {!page && !error ? <p role="status" className="text-sm">Finding projects in the configured roots…</p> : null}+ {error ? <div className="space-y-2"><p role="alert" className="text-sm text-destructive">Project discovery failed: {error}</p><Button variant="outline" className="min-h-11" onClick={findProjects}>Retry project discovery</Button></div> : null}+ {page?.rows.length === 0 ? <div className="space-y-2"><p className="text-sm">{search.query ? "No project matches this search. Try another name or clear the search." : "No projects were returned from the configured roots. Open Files to check the project location, then reopen this guide and search again."}</p><Button variant="outline" className="min-h-11" onClick={onFiles}>Open Files</Button></div> : null}+ {page?.rows.length ? <fieldset className="space-y-2"><legend className="sr-only">Available projects</legend>{page.rows.map((project) => <label key={project.id} className="flex min-h-11 cursor-pointer gap-3 rounded-lg border p-3 text-sm focus-within:ring-2 focus-within:ring-ring">+ <input type="radio" name="onboarding-project" value={project.id} checked={selected?.id === project.id} onChange={() => onSelect({ id: project.id, name: project.name })} className="mt-1 size-4 shrink-0 accent-[var(--primary)]" />+ <span className="min-w-0 [overflow-wrap:anywhere]"><span className="block font-medium">{project.name}</span><span className="text-xs text-muted-foreground">{project.path}</span></span>+ </label>)}</fieldset> : null}+ {page?.hasMore || page?.scan.truncated ? <p className="text-sm text-muted-foreground">This is a bounded discovery page; more projects may exist. Narrow the search by project name. If discovery is truncated, use the existing project tools to continue the scan.</p> : null}+ {selected ? <p role="status" className="text-sm [overflow-wrap:anywhere]">Selected: <strong>{selected.name}</strong> ({selected.id}). The run validates this exact project again.</p> : null}+ </section>;+}diff --git a/frontend/slices/auth/components/onboarding-readiness.tsx b/frontend/slices/auth/components/onboarding-readiness.tsxnew file mode 100644index 00000000..dfdd6919--- /dev/null+++ b/frontend/slices/auth/components/onboarding-readiness.tsx@@ -0,0 +1,84 @@+"use client";++import { useEffect, useRef, useState } from "react";+import { Button } from "@/components/ui/button";+import { roleLabel, type DeviceRole } from "@/lib/auth/roles";+import { loadReadiness, modelConfigured, onboardingError, onboardingJson, type ProviderCheck, type Readiness } from "../lib/onboarding-api";++export function OnboardingReadiness({ role }: { role: DeviceRole | null }) {+ const [readiness, setReadiness] = useState<Readiness | null>(null);+ const [revision, setRevision] = useState(0);+ const [check, setCheck] = useState<ProviderCheck | null>(null);+ const [testing, setTesting] = useState(false);+ const request = useRef<AbortController | null>(null);++ useEffect(() => {+ const controller = new AbortController();+ void loadReadiness(role, controller.signal).then((value) => { if (!controller.signal.aborted) setReadiness(value); });+ return () => controller.abort();+ }, [role, revision]);++ useEffect(() => () => request.current?.abort(), []);++ function refresh() {+ setReadiness(null);+ setCheck(null);+ setRevision((value) => value + 1);+ }++ async function testModel() {+ if (request.current) return;+ const controller = new AbortController();+ request.current = controller;+ setTesting(true);+ setCheck(null);+ try {+ const result = await onboardingJson<ProviderCheck>("/api/models/test", { method: "POST", signal: controller.signal });+ if (!controller.signal.aborted) setCheck(result);+ } catch (cause) {+ if (!controller.signal.aborted) setCheck({ ok: false, error: onboardingError(cause) });+ } finally {+ request.current = null;+ if (!controller.signal.aborted) setTesting(false);+ }+ }++ const host = readiness?.host;+ const model = readiness?.model;+ return <div className="space-y-5">+ <section className="space-y-3" aria-labelledby="onboarding-host">+ <h3 id="onboarding-host" className="font-semibold">Check this installation</h3>+ <p className="text-sm text-muted-foreground">Device role: {role ? roleLabel(role) : "Unavailable"}. Device roles apply to this host; they do not create separate user accounts or team workspaces.</p>+ {!readiness ? <p role="status" className="text-sm">Loading the host and saved model settings…</p> : null}+ {readiness?.hostError ? <p role="alert" className="text-sm text-destructive">Host check failed: {readiness.hostError}</p> : null}+ {host ? <dl className="space-y-2 rounded-lg border bg-muted/30 p-3 text-sm">+ <OnboardingValue label="Service user" value={host.linuxUser} />+ <OnboardingValue label="Read roots" value={host.readRoots.join(", ") || "No read roots configured"} />+ <OnboardingValue label="Write roots" value={host.writeRoots.join(", ") || "No write roots configured"} />+ <OnboardingValue label="Access route" value={host.currentAccess} />+ </dl> : null}+ {host?.publicExposureWarning ? <p className="text-sm text-muted-foreground">{host.publicExposureWarning}</p> : null}+ <Button variant="outline" className="min-h-11" onClick={refresh} disabled={!readiness || testing}>Refresh readiness</Button>+ </section>+ {role === "owner" ? <section className="space-y-3 border-t pt-4" aria-labelledby="onboarding-model">+ <h3 id="onboarding-model" className="font-semibold">Connect a model, when needed</h3>+ <p className="text-sm text-muted-foreground">The first project check works without AI. Model setup opens the existing private connection form in another tab; return here and refresh after saving.</p>+ {readiness?.modelError ? <p role="alert" className="text-sm text-destructive">Model settings unavailable: {readiness.modelError}</p> : null}+ {model ? <dl className="space-y-2 text-sm">+ <OnboardingValue label="Selected provider" value={model.provider} />+ <OnboardingValue label="Selected model" value={model.model} />+ <OnboardingValue label="Connection" value={modelConfigured(model) ? "Configured; test a request to verify access" : "Needs a credential or account connection"} />+ </dl> : null}+ <div className="flex flex-wrap gap-2">+ <Button asChild variant="outline" className="min-h-11"><a href="/integrations?section=ai-providers" target="_blank" rel="noopener noreferrer">Open model connections</a></Button>+ <Button variant="outline" className="min-h-11" disabled={!modelConfigured(model) || testing} onClick={() => void testModel()}>{testing ? "Testing model request…" : "Test model request"}</Button>+ </div>+ <p className="text-xs text-muted-foreground">Testing sends a small request to the currently saved model and may use provider quota. It does not verify tool calls or every model capability.</p>+ {check ? <p role={check.ok ? "status" : "alert"} className={check.ok ? "text-sm" : "text-sm text-destructive"}>{check.ok ? `Provider accepted the test for ${check.provider || "the selected provider"}/${check.model || "the selected model"}.` : `Model check failed: ${check.error || "The provider did not confirm access. Reconnect and try again."}`}</p> : null}+ </section> : <p className="text-sm text-muted-foreground">An Owner connects models and runs this setup’s project check. Your current device can use the host features allowed by its role.</p>}+ </div>;+}++export function OnboardingValue({ label, value }: { label: string; value: string }) {+ return <div className="grid gap-1 sm:grid-cols-[9rem_minmax(0,1fr)]"><dt className="text-muted-foreground">{label}</dt><dd className="min-w-0 [overflow-wrap:anywhere]">{value}</dd></div>;+}diff --git a/frontend/slices/auth/components/onboarding-receipt.tsx b/frontend/slices/auth/components/onboarding-receipt.tsxnew file mode 100644index 00000000..350688f3--- /dev/null+++ b/frontend/slices/auth/components/onboarding-receipt.tsx@@ -0,0 +1,92 @@+"use client";++import { useEffect, useRef, useState } from "react";+import { Button } from "@/components/ui/button";+import { firstCheckComplete, onboardingError, readFirstCheckReceipt, runFirstCheck, type FirstCheckReceipt } from "../lib/onboarding-api";+import type { OnboardingProgress } from "../lib/onboarding-state";+import { OnboardingValue } from "./onboarding-readiness";++export function OnboardingReceipt({ progress, onProgress, onWorkflows }: { progress: OnboardingProgress; onProgress: (value: OnboardingProgress) => void; onWorkflows: () => void }) {+ const [run, setRun] = useState<FirstCheckReceipt | null>(null);+ const [error, setError] = useState("");+ const [busy, setBusy] = useState(false);+ const inFlight = useRef(false);+ const alive = useRef(true);+ const [refresh, setRefresh] = useState(0);+ const runId = progress.attempt?.runId;++ useEffect(() => { alive.current = true; return () => { alive.current = false; }; }, []);+ useEffect(() => {+ if (!runId) return;+ const controller = new AbortController();+ let timer: ReturnType<typeof setTimeout> | undefined;+ const started = Date.now();+ async function poll() {+ try {+ const next = await readFirstCheckReceipt(runId!, controller.signal);+ if (controller.signal.aborted) return;+ setRun(next);+ setError("");+ if (next.state === "running" && Date.now() - started < 30_000) timer = setTimeout(() => void poll(), 1500);+ } catch (cause) { if (!controller.signal.aborted) setError(onboardingError(cause)); }+ }+ void poll();+ return () => { controller.abort(); if (timer) clearTimeout(timer); };+ }, [runId, refresh]);++ async function start() {+ if (inFlight.current || !progress.project) return;+ inFlight.current = true;+ setBusy(true);+ setError("");+ const next: OnboardingProgress = {+ ...progress,+ attempt: progress.attempt && (!run || run.state === "running" || run.state === "completed")+ ? progress.attempt : { graphId: progress.attempt?.graphId ?? crypto.randomUUID(), key: `onboarding:${crypto.randomUUID()}` },+ };+ // Persist the request identity before dispatch so a lost response can be reconciled.+ onProgress(next);+ try {+ const result = await runFirstCheck(next);+ if (alive.current) {+ setRun(result);+ onProgress({ ...next, attempt: { ...next.attempt!, runId: result.id } });+ }+ } catch (cause) {+ if (alive.current) setError(onboardingError(cause));+ } finally {+ inFlight.current = false;+ if (alive.current) setBusy(false);+ }+ }++ const complete = firstCheckComplete(run, progress);+ const inspection = run?.nodes.find((node) => node.id === "inspect")?.output as { project?: { name?: string; path?: string }; git?: { available?: boolean; branch?: string; clean?: boolean }; package?: { name?: string; version?: string } } | undefined;+ return <section className="space-y-4" aria-labelledby="onboarding-receipt">+ <div className="space-y-2">+ <h3 id="onboarding-receipt" className="font-semibold">Run a first project check</h3>+ <p className="text-sm text-muted-foreground">MSO saves a manual workflow, resolves <strong>{progress.project?.name || "the selected project"}</strong>, reads its status and records a run receipt. This check changes no project files and makes no model request.</p>+ </div>+ {!progress.project ? <p className="text-sm">Choose a project in the previous step before running a check.</p> : null}+ <div className="flex flex-wrap gap-2">+ {!runId || (run && !["running", "completed"].includes(run.state)) ? <Button className="min-h-11" onClick={() => void start()} disabled={!progress.project || busy}>{busy ? "Starting project check…" : progress.attempt && !run ? "Check previous request" : run ? "Run the check again" : "Run project check"}</Button> : null}+ {runId ? <Button variant="outline" className="min-h-11" disabled={busy} onClick={() => setRefresh((value) => value + 1)}>Refresh receipt</Button> : null}+ {progress.attempt ? <Button variant="outline" className="min-h-11" onClick={onWorkflows}>Open Workflows</Button> : null}+ </div>+ {runId && !run && !error ? <p role="status" className="text-sm">Loading the saved run receipt…</p> : null}+ {error ? <p role="alert" className="text-sm text-destructive">{error} The check is not marked complete. Recheck the existing request or open Workflows to inspect its result.</p> : null}+ {run ? <div className="space-y-3">+ <p role="status" className="text-sm font-medium">{complete ? "Project check completed with a saved receipt." : run.state === "running" ? "The server is still running the check. Refresh its receipt if needed." : `Run status: ${run.state}. Review the steps below.`}</p>+ <dl className="space-y-2 rounded-lg border bg-muted/30 p-3 text-sm">+ <OnboardingValue label="Workflow" value={run.graphName} />+ <OnboardingValue label="Started" value={new Date(run.startedAt).toLocaleString()} />+ {run.finishedAt ? <OnboardingValue label="Finished" value={new Date(run.finishedAt).toLocaleString()} /> : null}+ {inspection?.project?.path ? <OnboardingValue label="Project path" value={inspection.project.path} /> : null}+ {inspection?.git?.available ? <><OnboardingValue label="Git branch" value={inspection.git.branch || "Not reported"} /><OnboardingValue label="Working tree" value={inspection.git.clean === true ? "Clean" : inspection.git.clean === false ? "Has local changes" : "Not reported"} /></> : null}+ </dl>+ <ol className="space-y-2 text-sm">{run.nodes.map((node) => <li key={node.id} className="[overflow-wrap:anywhere]"><span className="font-medium">{node.name}</span>: {node.state}{node.error ? <p className="text-destructive">{node.error}</p> : null}</li>)}</ol>+ <details className="text-xs text-muted-foreground"><summary className="min-h-11 cursor-pointer py-3">Receipt reference</summary><p className="[overflow-wrap:anywhere]">{run.id}</p></details>+ </div> : null}+ <p className="text-xs text-muted-foreground">Run evidence stays in Workflows on the server. Closing this guide does not stop an active check. Model and tool-call readiness require their own verification.</p>+ </section>;+}diff --git a/frontend/slices/auth/lib/onboarding-api.test.ts b/frontend/slices/auth/lib/onboarding-api.test.tsnew file mode 100644index 00000000..0719a37d--- /dev/null+++ b/frontend/slices/auth/lib/onboarding-api.test.ts@@ -0,0 +1,89 @@+import { afterEach, describe, expect, it, vi } from "vitest";+import type { WorkflowGraph, WorkflowGraphRun } from "@/lib/contracts/workflow-graph";+import { firstCheckComplete, loadOnboardingProjects, loadReadiness, modelConfigured, runFirstCheck } from "./onboarding-api";+import { firstCheckGraph, type OnboardingProgress } from "./onboarding-state";++afterEach(() => vi.unstubAllGlobals());+const reply = (body: unknown, status = 200) => new Response(JSON.stringify(body), { status });+const project = { id: "root/project", name: "Project" };+const progress: OnboardingProgress = { step: "receipt", project, attempt: { graphId: "graph-1", key: "onboarding:request-1" } };+const graph = { ...firstCheckGraph(project, "graph-1"), version: 2, revision: "a".repeat(64), createdAt: "", updatedAt: "" } as WorkflowGraph;+const receipt = { id: "run-1", graphId: graph.id, idempotencyKey: progress.attempt!.key, state: "completed", nodes: graph.nodes.map((node) => ({ ...node, state: "completed", output: node.id === "inspect" ? { project } : {} })) } as unknown as WorkflowGraphRun;++describe("onboarding readiness", () => {+ it("never requests owner config for a delegated role", async () => {+ const fetcher = vi.fn(async (_url: string) => reply({ linuxUser: "fixture" }));+ vi.stubGlobal("fetch", fetcher);+ const result = await loadReadiness("viewer");+ expect(fetcher.mock.calls.map((row) => row[0])).toEqual(["/api/status"]);+ expect(result.model).toBeUndefined();+ });++ it("keeps host evidence visible when provider config is unavailable", async () => {+ vi.stubGlobal("fetch", vi.fn(async (url: string) => url === "/api/status" ? reply({ linuxUser: "fixture" }) : reply({ error: "Unauthorized" }, 403)));+ const result = await loadReadiness("owner");+ expect(result.host?.linuxUser).toBe("fixture");+ expect(result.modelError).toContain("required device role");+ expect(result.model).toBeUndefined();+ });++ it("distinguishes stored OAuth connection metadata from inference verification", () => {+ expect(modelConfigured({ provider: "openai-codex", model: "selected", hasApiKey: false, providers: [{ id: "openai-codex", hasKey: true }] })).toBe(true);+ expect(modelConfigured({ provider: "missing", model: "selected", hasApiKey: false, providers: [{ id: "other", hasKey: true }] })).toBe(false);+ });++ it("uses the bounded project-only view and reports discovery failures", async () => {+ const fetcher = vi.fn(async () => reply({ error: "provider unavailable" }, 503));+ vi.stubGlobal("fetch", fetcher);+ await expect(loadOnboardingProjects("project / one")).rejects.toThrow("provider unavailable");+ expect(fetcher).toHaveBeenCalledWith("/api/v1/alfa/cockpit?view=projects&q=project+%2F+one", expect.objectContaining({ cache: "no-store", credentials: "same-origin" }));+ });+});++describe("first-check dispatch and reconciliation", () => {+ it("creates the reviewed workflow and dispatches its exact revision and stable request key", async () => {+ const fetcher = vi.fn().mockResolvedValueOnce(reply({ error: "not found" }, 404)).mockResolvedValueOnce(reply({ graph })).mockResolvedValueOnce(reply(receipt));+ vi.stubGlobal("fetch", fetcher);+ await expect(runFirstCheck(progress)).resolves.toEqual(receipt);+ const posted = fetcher.mock.calls.filter(([, init]) => init.method === "POST").map(([, init]) => JSON.parse(init.body));+ expect(posted).toEqual([{ action: "create", graph: firstCheckGraph(project, graph.id) }, { action: "run", graph_id: graph.id, expected_revision: graph.revision, input: {}, idempotency_key: progress.attempt!.key }]);+ });++ it("reuses the request identity after a lost dispatch response instead of creating another graph", async () => {+ const fetcher = vi.fn().mockResolvedValueOnce(reply({ graph })).mockRejectedValueOnce(new Error("connection lost"))+ .mockResolvedValueOnce(reply({ graph })).mockResolvedValueOnce(reply(receipt));+ vi.stubGlobal("fetch", fetcher);+ await expect(runFirstCheck(progress)).rejects.toThrow("connection lost");+ await expect(runFirstCheck(progress)).resolves.toEqual(receipt);+ const posted = fetcher.mock.calls.filter(([, init]) => init.method === "POST").map(([, init]) => JSON.parse(init.body));+ expect(posted).toHaveLength(2);+ expect(posted[0]).toEqual(posted[1]);+ expect(posted.every((body) => body.action === "run")).toBe(true);+ });++ it("reads a saved receipt without submitting another mutation", async () => {+ const fetcher = vi.fn(async () => reply(receipt));+ vi.stubGlobal("fetch", fetcher);+ await expect(runFirstCheck({ ...progress, attempt: { ...progress.attempt!, runId: receipt.id } })).resolves.toEqual(receipt);+ expect(fetcher).toHaveBeenCalledOnce();+ expect(fetcher).toHaveBeenCalledWith("/api/v1/workflows?run_id=run-1&wait_ms=1500", expect.not.objectContaining({ method: "POST" }));+ });++ it("does not create or run anything after access denial or a modified graph", async () => {+ const fetcher = vi.fn().mockResolvedValueOnce(reply({ error: "unauthorized" }, 403));+ vi.stubGlobal("fetch", fetcher);+ await expect(runFirstCheck(progress)).rejects.toThrow("Access is no longer available");+ expect(fetcher).toHaveBeenCalledOnce();+ fetcher.mockReset().mockResolvedValueOnce(reply({ graph: { ...graph, nodes: [] } }));+ await expect(runFirstCheck(progress)).rejects.toThrow("saved check changed");+ expect(fetcher).toHaveBeenCalledOnce();+ });++ it("requires completed evidence for every expected step, project and request identity", () => {+ expect(firstCheckComplete(receipt, progress)).toBe(true);+ for (const value of [null, { ...receipt, state: "running" }, { ...receipt, state: "failed" }, { ...receipt, nodes: [] }, { ...receipt, idempotencyKey: "another-request" }, { ...receipt, graphId: "another-graph" }, { ...receipt, nodes: receipt.nodes.map((node) => node.id === "inspect" ? { ...node, state: "skipped" } : node) }]) {+ expect(firstCheckComplete(value as WorkflowGraphRun | null, progress)).toBe(false);+ }+ expect(firstCheckComplete(receipt, { ...progress, project: { id: "another/project", name: "other" } })).toBe(false);+ });+});diff --git a/frontend/slices/auth/lib/onboarding-api.ts b/frontend/slices/auth/lib/onboarding-api.tsnew file mode 100644index 00000000..6e88967c--- /dev/null+++ b/frontend/slices/auth/lib/onboarding-api.ts@@ -0,0 +1,80 @@+import type { DeviceRole } from "@/lib/auth/roles";+import type { WorkflowGraph, WorkflowGraphRun } from "@/lib/contracts/workflow-graph";+import { firstCheckGraph, matchesFirstCheck, type OnboardingProgress, type OnboardingProject } from "./onboarding-state";++export type HostReadiness = { linuxUser: string; readRoots: string[]; writeRoots: string[]; currentAccess: string; publicExposureWarning: string | null };+export type ModelReadiness = { provider: string; model: string; hasApiKey: boolean; providers?: Array<{ id: string; hasKey: boolean }> };+export type ProjectPage = { rows: Array<OnboardingProject & { path: string }>; hasMore: boolean; scan: { truncated?: boolean } };+export type Readiness = { host?: HostReadiness; model?: ModelReadiness; hostError?: string; modelError?: string };+export type ProviderCheck = { ok: boolean; provider?: string; model?: string; error?: string };+export type FirstCheckReceipt = Pick<WorkflowGraphRun, "id" | "graphId" | "graphName" | "idempotencyKey" | "state" | "startedAt" | "finishedAt" | "nodes">;++export class OnboardingRequestError extends Error {+ constructor(message: string, readonly status: number) { super(message); }+}++export async function onboardingJson<T>(url: string, init: RequestInit = {}): Promise<T> {+ const response = await fetch(url, { ...init, cache: "no-store", credentials: "same-origin", headers: { "Content-Type": "application/json", ...init.headers } });+ const body = await response.json().catch(() => null);+ if (!response.ok) {+ const message = response.status === 401 || response.status === 403+ ? "Access is no longer available. Sign in with the required device role and reopen setup."+ : typeof body?.error === "string" ? body.error.slice(0, 300) : `The server could not complete the request (${response.status}).`;+ throw new OnboardingRequestError(message, response.status);+ }+ if (!body || typeof body !== "object" || Array.isArray(body)) throw new OnboardingRequestError("The server returned an invalid response. Refresh and try again.", response.status);+ return body as T;+}++export function onboardingError(cause: unknown): string {+ return cause instanceof Error ? cause.message : "The server could not be reached. Try again.";+}++export async function loadReadiness(role: DeviceRole | null, signal?: AbortSignal): Promise<Readiness> {+ const [host, model] = await Promise.allSettled([+ onboardingJson<HostReadiness>("/api/status", { signal }),+ role === "owner" ? onboardingJson<ModelReadiness>("/api/config", { signal }) : Promise.resolve(undefined),+ ]);+ return {+ ...(host.status === "fulfilled" ? { host: host.value } : { hostError: onboardingError(host.reason) }),+ ...(model.status === "fulfilled" ? { model: model.value } : { modelError: onboardingError(model.reason) }),+ };+}++export async function loadOnboardingProjects(query = "", signal?: AbortSignal): Promise<ProjectPage> {+ const params = new URLSearchParams({ view: "projects", ...(query.trim() ? { q: query.trim().slice(0, 120) } : {}) });+ return (await onboardingJson<{ projects: ProjectPage }>(`/api/v1/alfa/cockpit?${params}`, { signal })).projects;+}++export function modelConfigured(model?: ModelReadiness): boolean {+ return Boolean(model?.model && (model.hasApiKey || model.providers?.find((row) => row.id === model.provider)?.hasKey));+}++export function readFirstCheckReceipt(runId: string, signal?: AbortSignal): Promise<FirstCheckReceipt> {+ return onboardingJson(`/api/v1/workflows?run_id=${encodeURIComponent(runId)}&wait_ms=1500`, { signal });+}++export function firstCheckComplete(run: FirstCheckReceipt | null, progress: OnboardingProgress): boolean {+ if (!run || !progress.project || !progress.attempt || run.state !== "completed"+ || run.graphId !== progress.attempt.graphId || run.idempotencyKey !== progress.attempt.key) return false;+ const expected = firstCheckGraph(progress.project, progress.attempt.graphId).nodes;+ if (run.nodes.length !== expected.length || !expected.every((node) => run.nodes.some((row) => row.id === node.id && row.type === node.type && row.state === "completed"))) return false;+ const output = run.nodes.find((node) => node.id === "inspect")?.output as { project?: { id?: string } } | undefined;+ return output?.project?.id === progress.project.id;+}++export async function runFirstCheck(progress: OnboardingProgress): Promise<FirstCheckReceipt> {+ const { project, attempt } = progress;+ if (!project || !attempt) throw new Error("Choose a project before running the check.");+ if (attempt.runId) return readFirstCheckReceipt(attempt.runId);+ const post = <T>(body: Record<string, unknown>) => onboardingJson<T>("/api/v1/workflows", { method: "POST", body: JSON.stringify(body) });+ let graph: WorkflowGraph;+ try {+ graph = (await onboardingJson<{ graph: WorkflowGraph }>(`/api/v1/workflows?graph_id=${encodeURIComponent(attempt.graphId)}`)).graph;+ } catch (cause) {+ if (!(cause instanceof OnboardingRequestError) || cause.status !== 404) throw cause;+ graph = (await post<{ graph: WorkflowGraph }>({ action: "create", graph: firstCheckGraph(project, attempt.graphId) })).graph;+ }+ if (!matchesFirstCheck(graph, project, attempt.graphId)) throw new Error("The saved check changed. Review it in Workflows before running it.");+ return post<FirstCheckReceipt>({ action: "run", graph_id: graph.id, expected_revision: graph.revision, input: {}, idempotency_key: attempt.key });+}diff --git a/frontend/slices/auth/lib/onboarding-runtime.test.ts b/frontend/slices/auth/lib/onboarding-runtime.test.tsnew file mode 100644index 00000000..6df705b5--- /dev/null+++ b/frontend/slices/auth/lib/onboarding-runtime.test.ts@@ -0,0 +1,49 @@+import { afterAll, describe, expect, it, vi } from "vitest";+import { mkdtemp, mkdir, readdir, readFile, rm, writeFile } from "node:fs/promises";+import os from "node:os";+import path from "node:path";+import { firstCheckGraph, type OnboardingProgress } from "./onboarding-state";+import { firstCheckComplete } from "./onboarding-api";++const access = vi.hoisted(() => ({ role: "owner" }));+vi.mock("@/lib/auth/device-store", () => ({ getApprovedDevice: async () => ({ role: access.role }) }));+const dir = await mkdtemp(path.join(os.tmpdir(), "mso-first-check-"));+const projectPath = path.join(dir, "projects", "first-project");+await mkdir(projectPath, { recursive: true, mode: 0o700 });+await writeFile(path.join(projectPath, "package.json"), '{"name":"first-project","version":"1.0.0","private":true}\n', { mode: 0o600 });+vi.stubEnv("OS_AGENT_SESSIONS_DIR", path.join(dir, "sessions"));+vi.stubEnv("OS_FS_READ_ROOTS", dir);+vi.stubEnv("OS_FS_WRITE_ROOTS", dir);+vi.stubEnv("OS_MCP_MAX_SCOPE", "read");+const { listProjects } = await import("@/lib/host/projects-api");+const { PROJECT_STATE_TOOLS } = await import("@/lib/mcp/tools-project-state");+const { createWorkflowGraph } = await import("@/lib/workflow/graph-store");+const { startWorkflowGraph, workflowGraphRunStatus } = await import("@/lib/workflow/graph-engine");+const principal = "web:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";+const context = { principal, actor: principal, sessionId: "first-check-session", scope: "read" as const };+afterAll(async () => { vi.unstubAllEnvs(); await rm(dir, { recursive: true, force: true }); });++describe("first check through the shared workflow runtime", () => {+ it("reads a real bounded project and persists one receipt across duplicate dispatch and reopening", async () => {+ const project = (await listProjects()).projects.find((row) => row.path === projectPath);+ expect(project).toBeDefined();+ const selected = { id: project!.id, name: project!.name };+ const graph = await createWorkflowGraph(principal, firstCheckGraph(selected, "first-project-check"));+ const before = await readFile(path.join(projectPath, "package.json"), "utf8");+ const resolve = (name: string) => PROJECT_STATE_TOOLS.find((tool) => tool.name === name);+ const started = await startWorkflowGraph(graph, {}, "first-request", context, resolve);+ const done = await workflowGraphRunStatus(principal, started.id, 5000, "read");+ const progress: OnboardingProgress = { step: "receipt", project: selected, attempt: { graphId: graph.id, key: "first-request", runId: started.id } };+ expect(done.state, done.error || done.nodes.find((node) => node.state === "failed")?.error).toBe("completed");+ expect(firstCheckComplete(done, progress)).toBe(true);+ expect(done.nodes.find((node) => node.id === "inspect")?.output).toMatchObject({ project: { id: selected.id, path: projectPath }, package: { name: "first-project", version: "1.0.0" } });+ expect((await startWorkflowGraph(graph, {}, "first-request", context, resolve)).id).toBe(started.id);+ expect(firstCheckComplete(await workflowGraphRunStatus(principal, started.id, 0, "read"), progress)).toBe(true);+ expect(await readFile(path.join(projectPath, "package.json"), "utf8")).toBe(before);+ expect(await readdir(projectPath)).toEqual(["package.json"]);+ await expect(workflowGraphRunStatus("web:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", started.id)).rejects.toThrow("not found");+ access.role = "viewer";+ await expect(workflowGraphRunStatus(principal, started.id, 0, "read")).rejects.toThrow();+ access.role = "owner";+ });+});diff --git a/frontend/slices/auth/lib/onboarding-state.test.ts b/frontend/slices/auth/lib/onboarding-state.test.tsnew file mode 100644index 00000000..7f9cc08e--- /dev/null+++ b/frontend/slices/auth/lib/onboarding-state.test.ts@@ -0,0 +1,62 @@+import { describe, expect, it } from "vitest";+import type { WorkflowGraph } from "@/lib/contracts/workflow-graph";+import { parseWorkflowGraphDefinition } from "@/lib/workflow/graph-schema";+import { ONBOARDING_KEY, firstCheckGraph, matchesFirstCheck, readOnboardingProgress, shouldOpenOnboarding, writeOnboardingProgress, type OnboardingProgress } from "./onboarding-state";++const project = { id: "root/project", name: "Project" };+const progress: OnboardingProgress = { step: "receipt", project, attempt: { graphId: "graph-1", key: "onboarding:request-1", runId: "run-1" } };+function storage() {+ const values = new Map<string, string>();+ return { values, getItem: (key: string) => values.get(key) ?? null, setItem: (key: string, value: string) => { values.set(key, value); } };+}+const graph: WorkflowGraph = { ...parseWorkflowGraphDefinition(firstCheckGraph(project, "graph-1")), id: "graph-1", version: 2, revision: "a".repeat(64), createdAt: "", updatedAt: "" };++describe("onboarding progress and reviewed action", () => {+ it("preserves the legacy skip choice independently of resumable progress", () => {+ const saved = storage();+ expect(shouldOpenOnboarding(saved)).toBe(true);+ saved.setItem(ONBOARDING_KEY, "done");+ expect(shouldOpenOnboarding(saved)).toBe(false);+ expect(writeOnboardingProgress(saved, progress)).toBe(true);+ expect(shouldOpenOnboarding(saved)).toBe(false);+ expect(saved.getItem(ONBOARDING_KEY)).toBe("done");+ });++ it("persists only resumable references without trusting a local completion or secret field", () => {+ const saved = storage();+ const injected = { ...progress, completed: true, apiKey: "fixture-private-value", project: { ...project, credential: "fixture-private-value" }, attempt: { ...progress.attempt!, state: "completed" } };+ expect(writeOnboardingProgress(saved, injected)).toBe(true);+ expect(readOnboardingProgress(saved)).toEqual(progress);+ expect([...saved.values.values()].map((value) => JSON.parse(value))).toEqual([progress]);+ });++ it("recovers safely from corrupt, missing or unavailable browser storage", () => {+ expect(readOnboardingProgress({ getItem: () => "{" })).toEqual({ step: "welcome" });+ expect(readOnboardingProgress({ getItem: () => '{"step":"receipt"}' })).toEqual({ step: "project" });+ expect(readOnboardingProgress({ getItem: () => JSON.stringify({ ...progress, attempt: { graphId: "../invalid", key: "request" } }) })).toEqual({ step: "receipt", project });+ expect(readOnboardingProgress({ getItem: () => JSON.stringify({ ...progress, attempt: { ...progress.attempt, runId: "../invalid" } }) })).toEqual({ ...progress, attempt: { graphId: "graph-1", key: "onboarding:request-1" } });+ const unavailable = { getItem: () => { throw new Error("storage blocked"); }, setItem: () => { throw new Error("storage full"); } };+ expect(readOnboardingProgress(unavailable)).toEqual({ step: "welcome" });+ expect(shouldOpenOnboarding(unavailable)).toBe(true);+ expect(writeOnboardingProgress(unavailable, progress)).toBe(false);+ expect(readOnboardingProgress(undefined)).toEqual({ step: "welcome" });+ expect(writeOnboardingProgress(undefined, progress)).toBe(false);+ });++ it("survives the authoritative workflow schema with only the intended project read", () => {+ expect(matchesFirstCheck(graph, project, graph.id)).toBe(true);+ expect(graph.nodes.map((node) => node.type)).toEqual(["manual", "project", "tool", "output"]);+ expect(graph.nodes.find((node) => node.type === "tool")?.config.tool).toBe("project_get");+ });++ it("rejects modified tool, project, disabled node and failure workflow execution semantics", () => {+ const changed: WorkflowGraph[] = [+ { ...graph, nodes: graph.nodes.map((node) => node.id === "inspect" ? { ...node, config: { tool: "exec_run" } } : node) },+ { ...graph, nodes: graph.nodes.map((node) => node.id === "project" ? { ...node, config: { project: "another/project" } } : node) },+ { ...graph, nodes: graph.nodes.map((node) => node.id === "inspect" ? { ...node, disabled: true } : node) },+ { ...graph, metadata: { ...graph.metadata, errorWorkflowId: "another-workflow" } },+ ];+ for (const value of changed) expect(matchesFirstCheck(value, project, graph.id)).toBe(false);+ expect(matchesFirstCheck({ ...graph, name: "Owner renamed the check" }, project, graph.id)).toBe(true);+ });+});diff --git a/frontend/slices/auth/lib/onboarding-state.ts b/frontend/slices/auth/lib/onboarding-state.tsnew file mode 100644index 00000000..2610d3e0--- /dev/null+++ b/frontend/slices/auth/lib/onboarding-state.ts@@ -0,0 +1,81 @@+import type { WorkflowGraph } from "@/lib/contracts/workflow-graph";++export const ONBOARDING_KEY = "mso:onboarding:v1";+export const ONBOARDING_OPEN = "mso:onboarding:open";+const PROGRESS_KEY = "mso:onboarding:progress:v2";+export const ONBOARDING_STEPS = ["welcome", "readiness", "project", "receipt"] as const;+export type OnboardingStep = (typeof ONBOARDING_STEPS)[number];+export type OnboardingProject = { id: string; name: string };+export type OnboardingProgress = {+ step: OnboardingStep;+ project?: OnboardingProject;+ attempt?: { graphId: string; key: string; runId?: string };+};+type StorageReader = Pick<Storage, "getItem">;+type StorageWriter = Pick<Storage, "setItem">;+const text = (value: unknown, max = 160): value is string => typeof value === "string" && value.length > 0 && value.length <= max;+const id = (value: unknown): value is string => text(value, 96) && /^[A-Za-z0-9][A-Za-z0-9_.:-]*$/.test(value);++export function onboardingStorage(): Storage | undefined {+ try { return globalThis.localStorage; } catch { return undefined; }+}++export function readOnboardingProgress(storage: StorageReader | undefined): OnboardingProgress {+ try {+ const value = JSON.parse(storage?.getItem(PROGRESS_KEY) || "null");+ if (!value || !ONBOARDING_STEPS.includes(value.step)) return { step: "welcome" };+ const project = value.project;+ if (!project || !text(project.id, 1000) || !text(project.name, 255)) return { step: value.step === "receipt" ? "project" : value.step };+ const attempt = value.attempt;+ return {+ step: value.step, project: { id: project.id, name: project.name },+ ...(attempt && id(attempt.graphId) && id(attempt.key) ? {+ attempt: { graphId: attempt.graphId, key: attempt.key, ...(id(attempt.runId) ? { runId: attempt.runId } : {}) },+ } : {}),+ };+ } catch { return { step: "welcome" }; }+}++export function writeOnboardingProgress(storage: StorageWriter | undefined, progress: OnboardingProgress): boolean {+ if (!storage) return false;+ const value: OnboardingProgress = {+ step: progress.step,+ ...(progress.project ? { project: { id: progress.project.id, name: progress.project.name } } : {}),+ ...(progress.attempt ? { attempt: { graphId: progress.attempt.graphId, key: progress.attempt.key, ...(progress.attempt.runId ? { runId: progress.attempt.runId } : {}) } } : {}),+ };+ try { storage.setItem(PROGRESS_KEY, JSON.stringify(value)); return true; }+ catch { return false; }+}++export function shouldOpenOnboarding(storage: StorageReader | undefined): boolean {+ try { return storage?.getItem(ONBOARDING_KEY) !== "done"; }+ catch { return true; }+}++export function firstCheckGraph(project: OnboardingProject, graphId: string) {+ return {+ id: graphId, name: `First project check: ${project.name}`.slice(0, 160),+ description: "Resolve an exact project and read its status. Saves workflow evidence without changing project files or calling a model.",+ status: "draft" as const, inputs: {}, metadata: { project: project.id, provenance: "user" as const, tags: ["onboarding"] },+ nodes: [+ { id: "start", name: "Manual check", type: "manual" as const, position: { x: 60, y: 120 }, config: {} },+ { id: "project", name: "Resolve project", type: "project" as const, position: { x: 300, y: 120 }, config: { project: project.id } },+ { id: "inspect", name: "Read project status", type: "tool" as const, position: { x: 540, y: 120 }, config: { tool: "project_get", arguments: { project: { $ref: "nodes.project.output.id" } } } },+ { id: "receipt", name: "Project result", type: "output" as const, position: { x: 780, y: 120 }, config: { value: { $ref: "nodes.inspect.output" } } },+ ],+ edges: [+ { id: "resolve", source: "start", target: "project" },+ { id: "inspect", source: "project", target: "inspect" },+ { id: "record", source: "inspect", target: "receipt" },+ ],+ };+}++export function matchesFirstCheck(graph: WorkflowGraph, project: OnboardingProject, graphId: string): boolean {+ const expected = firstCheckGraph(project, graphId);+ return Boolean(graph) && graph.id === graphId && graph.status === "draft"+ && JSON.stringify(graph.inputs) === JSON.stringify(expected.inputs)+ && JSON.stringify(graph.nodes) === JSON.stringify(expected.nodes)+ && JSON.stringify(graph.edges) === JSON.stringify(expected.edges)+ && JSON.stringify(graph.metadata) === JSON.stringify(expected.metadata);+}diff --git a/frontend/slices/workflows/components/workflow-inspector.tsx b/frontend/slices/workflows/components/workflow-inspector.tsxindex 6d569bf4..c755bd8f 100644--- a/frontend/slices/workflows/components/workflow-inspector.tsx+++ b/frontend/slices/workflows/components/workflow-inspector.tsx@@ -12,6 +12,7 @@ import { resolveNode } from "../lib/api";import { WorkflowAgentSeatField } from "./workflow-agent-seat-field";import { WorkflowToolDirectoryField } from "./workflow-tool-directory-field";import { WorkflowScriptField } from "./workflow-script-field";+import { WorkflowScheduleFields } from "./workflow-schedule-fields";const selectClass="h-9 w-full rounded-md border bg-background px-2";function Field({label,children}:{label:string;children:React.ReactNode}){return <label className="block space-y-1"><span className="text-muted-foreground">{label}</span>{children}</label>;}function number(value:unknown,fallback:number){const n=Number(value);return Number.isFinite(n)?n:fallback;}@@ -33,7 +34,7 @@ export function WorkflowInspector({graph,graphs,node,onNode,onDeleteNode,onGraphreturn <div className="space-y-4 p-3 text-xs"><Field label="Name"><Input value={node.name} onChange={(e)=>patch({name:e.target.value})}/></Field><Field label="Type"><select className={selectClass} value={node.type} onChange={(e)=>patch({type:e.target.value as WorkflowGraphNodeType})}>{WORKFLOW_GRAPH_NODE_TYPES.map((type)=><option key={type} value={type}>{type}</option>)}</select></Field>- {node.type==="schedule"&&<><Field label="Schedule mode"><select className={selectClass} value={String(node.config.mode??"interval")} onChange={(e)=>setConfig("mode",e.target.value)}><option value="interval">Interval</option><option value="cron">Cron</option></select></Field>{node.config.mode==="cron"?<Field label="Cron (5 fields)"><Input value={String(node.config.cron??"0 * * * *")} onChange={(e)=>setConfig("cron",e.target.value)}/></Field>:<Field label="Every minutes"><Input type="number" min={1} max={10080} value={number(node.config.everyMinutes,60)} onChange={(e)=>setConfig("everyMinutes",Number(e.target.value))}/></Field>}<Field label="Timezone override"><Input value={String(node.config.timezone??"")} placeholder={graph.metadata.timezone??"UTC"} onChange={(e)=>setConfig("timezone",e.target.value)}/></Field></>}+ {node.type==="schedule"&&<WorkflowScheduleFields config={node.config} timezone={graph.metadata.timezone??"UTC"} onChange={(config)=>patch({config})}/>}{node.type==="webhook"&&<><Field label="Methods"><Input value={Array.isArray(node.config.methods)?node.config.methods.join(", "):"POST"} onChange={(e)=>setConfig("methods",e.target.value.split(",").map((v)=>v.trim().toUpperCase()).filter(Boolean))}/></Field><Field label="Response"><select className={selectClass} value={String(node.config.responseMode??"onReceived")} onChange={(e)=>setConfig("responseMode",e.target.value)}><option value="onReceived">202 immediately</option><option value="lastNode">Wait for output</option></select></Field><Field label="Auth variable"><Input value={String(node.config.authVariable??"")} placeholder="WEBHOOK_TOKEN (optional)" onChange={(e)=>e.target.value?setConfig("authVariable",e.target.value.toUpperCase()):removeConfig("authVariable")}/></Field><div className="rounded border p-2"><div className="break-all font-mono text-[10px]">/api/v1/workflows/webhook/{graph.id}/{node.id}</div><Button className="mt-2" size="sm" variant="outline" onClick={copyWebhook}><Copy className="mr-1 size-3"/>Copy URL</Button></div></>}{node.type==="channel_trigger"&&<><Field label="Channel ID"><Input value={String(node.config.channelId??"")} placeholder="Leave blank for any channel bound to this workflow" onChange={(e)=>e.target.value?setConfig("channelId",e.target.value):removeConfig("channelId")}/></Field><Button size="sm" variant="outline" className="w-full" onClick={()=>openWindow("channels","Channels")}>Open Channels</Button></>}\n {node.type==="agent"&&<WorkflowAgentSeatField value={String(node.config.orgSeatId??"")} onChange={(value)=>value?setConfig("orgSeatId",value):removeConfig("orgSeatId")}/>}{(node.type==="project"||node.type==="folder"||node.type==="knowledge"||(node.type==="agent"&&!node.config.orgSeatId)||node.type==="script"||node.type==="project_function"||node.type==="project_mcp"||node.type==="subflow"||(node.type==="memory"&&node.config.scope==="project"))&&<Field label="Project"><Input value={String(node.config.project??graph.metadata.project??"")} placeholder="Canonical project id/name" onChange={(e)=>setConfig("project",e.target.value)}/></Field>}diff --git a/frontend/slices/workflows/components/workflow-schedule-fields.tsx b/frontend/slices/workflows/components/workflow-schedule-fields.tsxnew file mode 100644index 00000000..f10c006b--- /dev/null+++ b/frontend/slices/workflows/components/workflow-schedule-fields.tsx@@ -0,0 +1,41 @@+"use client";+import { useId } from "react";+import { Input } from "@/components/ui/input";+import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select";+import { normalizeWorkflowRunAt, validateWorkflowSchedule } from "@/lib/contracts/workflow-schedule";++function Field({ label, children }: { label: string; children: React.ReactNode }) {+ return <div className="space-y-1"><span className="text-muted-foreground">{label}</span>{children}</div>;+}+function Choice({ label, value, options, onChange }: { label: string; value: string; options: Array<[string, string]>; onChange: (value: string) => void }) {+ return <Field label={label}><Select value={value} onValueChange={onChange}><SelectTrigger aria-label={label} className="w-full"><SelectValue /></SelectTrigger><SelectContent>{options.map(([key, text]) => <SelectItem key={key} value={key}>{text}</SelectItem>)}</SelectContent></Select></Field>;+}++export function WorkflowScheduleFields({ config, timezone, onChange }: { config: Record<string, unknown>; timezone: string; onChange: (config: Record<string, unknown>) => void }) {+ const errorId = useId(), mode = String(config.mode ?? "interval");+ const set = (key: string, value: unknown) => onChange({ ...config, [key]: value });+ let error = "", normalized = "";+ try { validateWorkflowSchedule(config, timezone); } catch (cause) { error = cause instanceof Error ? cause.message : "Invalid schedule"; }+ if (mode === "runAt") try { normalized = normalizeWorkflowRunAt(config.runAt); } catch {}+ const changeMode = (value: string) => {+ const next: Record<string, unknown> = { ...config, mode: value };+ for (const field of ["everyMinutes", "cron", "dayMatch", "runAt", "missedPolicy"]) delete next[field];+ Object.assign(next, value === "interval" ? { everyMinutes: 60 } : value === "cron" ? { cron: "0 * * * *", dayMatch: "or" } : { runAt: "", missedPolicy: "run_once" });+ onChange(next);+ };+ return <>+ <Choice label="Schedule mode" value={mode} onChange={changeMode} options={[["interval", "Interval"], ["cron", "Cron"], ["runAt", "Once at a date and time"]]} />+ {mode === "interval" && <Field label="Every minutes"><Input aria-label="Every minutes" type="number" min={1} max={10080} required value={String(config.everyMinutes ?? 60)} onChange={event => set("everyMinutes", Number(event.target.value))} /></Field>}+ {mode === "cron" && <>+ <Field label="Cron (minute hour day month weekday)"><Input aria-label="Cron (minute hour day month weekday)" required value={String(config.cron ?? "")} onChange={event => set("cron", event.target.value)} /></Field>+ <Choice label="When both day fields are restricted" value={String(config.dayMatch ?? "and")} onChange={value => set("dayMatch", value)} options={[["or", "Either day field matches"], ["and", "Both day fields match (legacy)"]]} />+ </>}+ {mode === "runAt" && <>+ <Field label="Run at (date, time and UTC offset)"><Input aria-label="Run at (date, time and UTC offset)" required aria-invalid={!normalized} aria-describedby={error ? errorId : undefined} placeholder="2026-11-01T09:00:00+07:00" value={String(config.runAt ?? "")} onChange={event => set("runAt", event.target.value)} /></Field>+ {normalized && <p className="break-all text-muted-foreground">UTC: <time dateTime={normalized}>{normalized}</time></p>}+ <p className="text-muted-foreground">If this time has passed, run once on the next active scheduler tick. The UTC offset fixes the instant; the timezone below does not move it.</p>+ </>}+ <Field label="Timezone override"><Input aria-label="Timezone override" value={String(config.timezone ?? "")} placeholder={timezone} onChange={event => { const next = { ...config }; if (event.target.value) next.timezone = event.target.value; else delete next.timezone; onChange(next); }} /></Field>+ {error && <p id={errorId} role="alert" className="text-destructive">{error}</p>}+ </>;+}diff --git a/lib/agent/bounded-runner.ts b/lib/agent/bounded-runner.tsnew file mode 100644index 00000000..f1194d8d--- /dev/null+++ b/lib/agent/bounded-runner.ts@@ -0,0 +1,83 @@+import { streamPreparedSelectedModel, type PreparedSelectedModel } from "@/lib/ai/selected-model-stream";+import type { OaMsg, OaToolUse } from "@/lib/ai/openai-stream";+import { allows } from "@/lib/capabilities/scope";+import { liveCapabilityContext } from "@/lib/capabilities/live-authority";+import type { CapabilityDescriptor, CapabilityRuntime } from "@/lib/capabilities/runtime";+import type { CapabilityRunContext } from "@/lib/capabilities/tool";++export interface BoundedAgentProgress { text: string; toolCalls: Array<{ name: string; ok: boolean }>; }+function bounded(value: string, max = 64 * 1024): string {+ if (Buffer.byteLength(value, "utf8") <= max) return value;+ let out = value;+ while (Buffer.byteLength(out, "utf8") > max - 80) out = out.slice(0, Math.floor(out.length * 0.9));+ return `${out}\n…[truncated by MSO agent result budget]`;+}++export async function runBoundedAgent(input: {+ prepared: PreparedSelectedModel;+ objective: string;+ system: string;+ capabilities: CapabilityRuntime;+ authority: CapabilityRunContext;+ actor: string;+ tools: (context: CapabilityRunContext) => CapabilityDescriptor[];+ maxTurns: number;+ maxToolCalls?: number;+ signal: AbortSignal;+ progress?: BoundedAgentProgress;+}) {+ const progress = input.progress ?? { text: "", toolCalls: [] };+ const messages: OaMsg[] = [{ role: "user", text: input.objective }];+ const authority = { ...input.authority, capabilities: input.capabilities, signal: input.signal };+ const live = async (name?: string, args?: Record<string, unknown>) => {+ input.signal.throwIfAborted();+ await authority.liveAuthorization?.();+ const context = await liveCapabilityContext(authority, name, args);+ input.signal.throwIfAborted();+ return context;+ };+ const finish = (status: "completed" | "partial", rounds: number, fallback = "") => ({+ status, rounds, text: progress.text.trim() || fallback, toolCalls: progress.toolCalls, messages,+ });+ for (let round = 1; round <= input.maxTurns; round += 1) {+ const current = await live();+ const tools = input.tools(current).map(tool => ({ name: tool.name, description: tool.description, input_schema: tool.inputSchema }));+ let text = "";+ const uses: OaToolUse[] = [];+ await streamPreparedSelectedModel({ prepared: input.prepared, messages, tools, system: input.system, signal: input.signal,+ emit(event, data) {+ if (event === "delta") text += String(data ?? "");+ else if (event === "tool_use") uses.push(data as OaToolUse);+ },+ });+ await live();+ if (text) progress.text = bounded(text);+ messages.push({ role: "assistant", text, toolUses: uses });+ if (!uses.length) return finish("completed", round);+ const results: { id: string; content: string; isError?: boolean }[] = [];+ for (const [index, call] of uses.entries()) {+ if (input.maxToolCalls !== undefined && progress.toolCalls.length >= input.maxToolCalls) {+ // Keep completed outcomes and close every proposed tool-use id before persisting this partial turn.+ for (const pending of uses.slice(index)) results.push({ id: pending.id, content: "error: not executed; agent tool-call limit reached", isError: true });+ messages.push({ role: "tool", results });+ await live();+ return finish("partial", round, "Agent reached its tool-call limit before a final answer.");+ }+ const context = await live(call.name, call.input ?? {});+ const tool = input.tools(context).find(entry => entry.name === call.name);+ if (!tool || !allows(context.scope, tool.scope) || context.allowedTools && !context.allowedTools.includes(call.name)) {+ results.push({ id: call.id, content: "error: tool unavailable to this agent", isError: true });+ progress.toolCalls.push({ name: call.name, ok: false });+ continue;+ }+ const result = await input.capabilities.invoke({ ...context, name: call.name, args: call.input ?? {}, actor: input.actor });+ await live();+ const content = result.content.filter(row => row.type === "text").map(row => row.text).join("\n") || JSON.stringify(result.content);+ results.push({ id: call.id, content: bounded(content), ...(result.isError ? { isError: true } : {}) });+ progress.toolCalls.push({ name: call.name, ok: !result.isError });+ }+ messages.push({ role: "tool", results });+ }+ await live();+ return finish("partial", input.maxTurns, "Agent reached its turn limit before a final answer.");+}diff --git a/lib/agent/profile-runtime.test.ts b/lib/agent/profile-runtime.test.tsnew file mode 100644index 00000000..e79a815c--- /dev/null+++ b/lib/agent/profile-runtime.test.ts@@ -0,0 +1,122 @@+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";+import { mkdtemp, rm } from "node:fs/promises";+import path from "node:path";+import os from "node:os";+import type { SessionPayload } from "@/lib/auth/session";++const mock = vi.hoisted(() => ({ authorized: vi.fn(), prepare: vi.fn(), stream: vi.fn(), create: vi.fn(), event: vi.fn(), history: vi.fn(), invoke: vi.fn() }));+vi.mock("@/lib/auth/live-authorization", () => ({ liveSessionAuthorized: mock.authorized }));+vi.mock("@/lib/auth/device-store", () => ({ getApprovedDevice: async () => ({ role: "owner" }) }));+vi.mock("@/lib/ai/selected-model-stream", () => ({ prepareSelectedModel: mock.prepare, streamPreparedSelectedModel: mock.stream }));+vi.mock("./session-store", () => ({ createAgentSession: mock.create, appendAgentSessionEvent: mock.event, updateAgentSessionHistory: mock.history }));+const { mutateAgentProfiles } = await import("./profile-store");+const { agentProfileFile } = await import("./profile-storage");+const { runAgentProfile, profileRuntimeAuthority } = await import("./profile-runtime");+const session = { device_id: "aaaaaaaaaaaaaaaa" } as SessionPayload;+const owner = `web:${session.device_id}`;+const config = { name: "Reader", avatar: "", instructions: "Show concise findings.", runtime: "mso-readonly", model: { provider: "selected-account", model: "exact-model" }, tools: ["fs_read"] };+const capability = (name: string, scope: "read" | "exec") => ({ name, scope, description: name, inputSchema: { type: "object" as const, properties: {} } });+const capabilities = { list: () => [capability("fs_read", "read"), capability("vps_status", "read"), capability("exec_run", "exec")], invoke: mock.invoke };+let root: string;+beforeEach(async () => {+ root = await mkdtemp(path.join(os.tmpdir(), "mso-profile-run-")); vi.stubEnv("OS_AGENT_PROFILES_DIR", root);+ Object.values(mock).forEach(fn => fn.mockReset()); mock.authorized.mockResolvedValue(true); mock.prepare.mockResolvedValue({});+ mock.create.mockResolvedValue({ id: "run-fixture" }); mock.invoke.mockResolvedValue({ content: [{ type: "text", text: "source evidence" }] });+ mock.event.mockResolvedValue(undefined); mock.history.mockResolvedValue(undefined);+});+afterEach(async () => { vi.unstubAllEnvs(); await rm(root, { recursive: true, force: true }); });+async function profile() { return (await mutateAgentProfiles(owner, { action: "create", expectedRevision: 0, config, reason: "Create reader" })).profiles[0]; }+const run = (id: string) => runAgentProfile({ session, body: { profileId: id, profileRevision: 1, prompt: "Inspect source" }, capabilities, signal: new AbortController().signal });++describe("server execution of saved profiles", () => {+ it("uses the saved exact model, limits the kernel call, and writes native receipts", async () => {+ const saved = await profile();+ mock.stream.mockImplementationOnce(async ({ tools, emit, system }) => {+ expect(tools.map((tool: { name: string }) => tool.name)).toEqual(["fs_read"]);+ expect(system).toContain(config.instructions);+ emit("tool_use", { id: "read", name: "fs_read", input: { path: "/project/source.ts", owner: "different", scope: "exec" } });+ }).mockImplementationOnce(async ({ emit }) => emit("delta", "Verified source"));+ expect(await run(saved.id)).toMatchObject({ profileId: saved.id, profileRevision: 1, model: config.model, status: "completed", text: "Verified source", rounds: 2, toolCalls: [{ name: "fs_read", ok: true }] });+ expect(mock.prepare).toHaveBeenCalledWith(config.model);+ expect(mock.invoke).toHaveBeenCalledWith(expect.objectContaining({ principal: owner, actor: owner, scope: "read", allowedTools: ["fs_read"], sessionId: "run-fixture", liveAuthorization: expect.any(Function) }));+ expect(mock.create).toHaveBeenCalledWith(owner, "alfa", expect.objectContaining({ memorySnapshot: expect.objectContaining({ user: "", memory: "", recordCount: 0 }) }));+ expect(mock.history).toHaveBeenCalledWith(owner, "run-fixture", expect.arrayContaining([expect.objectContaining({ role: "tool" })]));+ expect(mock.event).toHaveBeenLastCalledWith(owner, "run-fixture", expect.objectContaining({ state: "completed", detail: expect.stringContaining("revision 1") }));+ });+ it("denies unassigned reads and mutations even when the model calls unseen names", async () => {+ const saved = await profile();+ mock.stream.mockImplementationOnce(async ({ emit }) => {+ emit("tool_use", { id: "one", name: "vps_status", input: {} });+ emit("tool_use", { id: "two", name: "exec_run", input: {} });+ }).mockImplementationOnce(async ({ emit }) => emit("delta", "Unavailable"));+ const result = await run(saved.id);+ expect(result.toolCalls).toEqual([{ name: "vps_status", ok: false }, { name: "exec_run", ok: false }]);+ expect(mock.invoke).not.toHaveBeenCalled();+ const authority = profileRuntimeAuthority(session, saved, capabilities);+ await expect(authority.runtime.invoke({ name: "exec_run", scope: "exec", allowedTools: ["exec_run"] })).rejects.toThrow("profile_tool_denied");+ });+ it.each(["edit", "disable", "revoke"])("stops a %s during model execution before any tool starts", async action => {+ const saved = await profile();+ mock.stream.mockImplementationOnce(async ({ emit }) => {+ if (action === "revoke") mock.authorized.mockResolvedValue(false);+ else await mutateAgentProfiles(owner, { action, expectedRevision: 1, id: saved.id, profileRevision: 1, config: { ...config, tools: [] }, reason: "Withdraw permission" });+ emit("tool_use", { id: "read", name: "fs_read", input: {} });+ });+ await expect(run(saved.id)).rejects.toThrow(/profile_(revision_conflict|disabled|owner_session_revoked)/);+ expect(mock.invoke).not.toHaveBeenCalled();+ expect(mock.event).toHaveBeenLastCalledWith(owner, "run-fixture", expect.objectContaining({ state: "failed" }));+ });+ it("stops before the next model turn when the owner grant changes during a read", async () => {+ const saved = await profile();+ mock.stream.mockImplementationOnce(async ({ emit }) => emit("tool_use", { id: "read", name: "fs_read", input: {} }));+ mock.invoke.mockImplementationOnce(async () => { mock.authorized.mockResolvedValue(false); return { content: [] }; });+ await expect(run(saved.id)).rejects.toThrow("profile_owner_session_revoked");+ expect(mock.stream).toHaveBeenCalledTimes(1);+ });+ it("rejects client-supplied policy and cross-device profile identifiers", async () => {+ const saved = await profile();+ await expect(runAgentProfile({ session, body: { profileId: saved.id, profileRevision: 1, prompt: "inspect", tools: ["exec_run"] }, capabilities, signal: new AbortController().signal })).rejects.toThrow("unsupported_profile_field");+ await expect(runAgentProfile({ session: { device_id: "bbbbbbbbbbbbbbbb" } as SessionPayload, body: { profileId: saved.id, profileRevision: 1, prompt: "inspect" }, capabilities, signal: new AbortController().signal })).rejects.toThrow("profile_not_found");+ expect(mock.prepare).not.toHaveBeenCalled();+ });+ it("honors cancellation before model or tool dispatch", async () => {+ const saved = await profile(), abort = new AbortController(); abort.abort(new Error("cancelled"));+ await expect(runAgentProfile({ session, body: { profileId: saved.id, profileRevision: 1, prompt: "inspect" }, capabilities, signal: abort.signal })).rejects.toThrow("cancelled");+ expect(mock.stream).not.toHaveBeenCalled(); expect(mock.invoke).not.toHaveBeenCalled();+ });+ it.each(["history", "event"] as const)("withholds the final response when authority is withdrawn during %s persistence", async persistence => {+ const saved = await profile();+ mock.stream.mockImplementationOnce(async ({ emit }) => emit("delta", "private final response"));+ mock[persistence].mockImplementationOnce(async () => { mock.authorized.mockResolvedValue(false); });+ await expect(run(saved.id)).rejects.toThrow("profile_owner_session_revoked");+ expect(mock.event).toHaveBeenLastCalledWith(owner, "run-fixture", expect.objectContaining({ state: "failed" }));+ });+ it("honors cancellation during persistence before returning the final response", async () => {+ const saved = await profile(), abort = new AbortController();+ mock.stream.mockImplementationOnce(async ({ emit }) => emit("delta", "private response"));+ mock.history.mockImplementationOnce(async () => abort.abort(new Error("cancelled after history")));+ await expect(runAgentProfile({ session, body: { profileId: saved.id, profileRevision: 1, prompt: "inspect" }, capabilities, signal: abort.signal })).rejects.toThrow("cancelled after history");+ });+ it("stops when the saved policy disappears during a model round", async () => {+ const saved = await profile();+ mock.stream.mockImplementationOnce(async ({ emit }) => {+ await rm(agentProfileFile(owner)); emit("delta", "private response");+ });+ await expect(run(saved.id)).rejects.toThrow("profile_not_found");+ expect(mock.invoke).not.toHaveBeenCalled();+ });+ it("retains completed tool results and closes pending calls at the sixteen-call limit", async () => {+ const saved = await profile();+ mock.stream.mockImplementationOnce(async ({ emit }) => {+ for (let index = 0; index < 17; index++) emit("tool_use", { id: `read-${index}`, name: "fs_read", input: {} });+ });+ const result = await run(saved.id);+ expect(result.status).toBe("partial"); expect(result.toolCalls).toHaveLength(16);+ expect(mock.invoke).toHaveBeenCalledTimes(16); expect(mock.stream).toHaveBeenCalledTimes(1);+ const history = mock.history.mock.calls[0][2];+ const results = history.find((message: { role: string }) => message.role === "tool").results;+ expect(results).toHaveLength(17);+ expect(results.slice(0, 16).every((entry: { content: string }) => entry.content === "source evidence")).toBe(true);+ expect(results[16]).toMatchObject({ id: "read-16", isError: true, content: expect.stringContaining("not executed") });+ });+});diff --git a/lib/agent/profile-runtime.ts b/lib/agent/profile-runtime.tsnew file mode 100644index 00000000..15f59a32--- /dev/null+++ b/lib/agent/profile-runtime.ts@@ -0,0 +1,75 @@+import { liveSessionAuthorized } from "@/lib/auth/live-authorization";+import type { SessionPayload } from "@/lib/auth/session";+import { prepareSelectedModel } from "@/lib/ai/selected-model-stream";+import { PROFILE_READ_TOOLS, type AgentProfile, type AgentProfileRunResult } from "@/lib/contracts/agent-profile";+import type { CapabilityRuntime } from "@/lib/capabilities/runtime";+import type { CapabilityRunContext } from "@/lib/capabilities/tool";+import { createAgentSession, updateAgentSessionHistory, appendAgentSessionEvent } from "./session-store";+import { AgentProfileError, profileFields, profileObject, profilePrincipal, profileRevision, profileText } from "./profile-schema";+import { requireAgentProfile } from "./profile-store";+import { runBoundedAgent } from "./bounded-runner";++export function profileRuntimeAuthority(session: SessionPayload, profile: AgentProfile, capabilities: CapabilityRuntime, options: { signal?: AbortSignal; sessionId?: string } = {}) {+ if (!session.device_id) throw new AgentProfileError("profile_owner_unsupported", 403);+ const principal = profilePrincipal(`web:${session.device_id}`), id = profile.id, revision = profile.revision;+ if (profile.owner !== principal) throw new AgentProfileError("profile_not_found", 404);+ const allowedTools = [...profile.config.tools];+ const liveAuthorization = async () => {+ options.signal?.throwIfAborted();+ if (!await liveSessionAuthorized(session, "owner")) throw new AgentProfileError("profile_owner_session_revoked", 403);+ await requireAgentProfile(principal, id, revision);+ options.signal?.throwIfAborted();+ };+ const listed = () => capabilities.list("read").filter(tool => tool.scope === "read" && (PROFILE_READ_TOOLS as readonly string[]).includes(tool.name) && allowedTools.includes(tool.name));+ const runtime: CapabilityRuntime = {+ list: listed,+ async invoke(input) {+ await liveAuthorization();+ if (!listed().some(tool => tool.name === input.name)) throw new AgentProfileError("profile_tool_denied", 403);+ const result = await capabilities.invoke({ name: input.name, args: input.args ?? {}, principal, actor: principal, scope: "read",+ allowedTools, sessionId: options.sessionId, signal: options.signal, liveAuthorization });+ await liveAuthorization();+ return result;+ },+ };+ const context: CapabilityRunContext = { principal, actor: principal, scope: "read", allowedTools, capabilities: runtime,+ signal: options.signal, sessionId: options.sessionId, liveAuthorization };+ return { runtime, context, liveAuthorization };+}++export async function runAgentProfile(input: { session: SessionPayload; body: unknown; capabilities: CapabilityRuntime; signal: AbortSignal }): Promise<AgentProfileRunResult> {+ if (!input.session.device_id) throw new AgentProfileError("profile_owner_unsupported", 403);+ const body = profileObject(input.body); profileFields(body, ["profileId", "profileRevision", "prompt"]);+ const principal = profilePrincipal(`web:${input.session.device_id}`), revision = profileRevision(body.profileRevision);+ const prompt = profileText(body.prompt, "prompt", 8000);+ const id = body.profileId === undefined ? undefined : profileText(body.profileId, "id", 80);+ input.signal.throwIfAborted();+ if (!await liveSessionAuthorized(input.session, "owner")) throw new AgentProfileError("profile_owner_session_revoked", 403);+ const profile = await requireAgentProfile(principal, id, revision);+ const controller = new AbortController(), timeout = setTimeout(() => controller.abort(new AgentProfileError("profile_run_timeout", 504)), 60_000);+ const signal = AbortSignal.any([input.signal, controller.signal]);+ let runId: string | undefined;+ try {+ const initial = profileRuntimeAuthority(input.session, profile, input.capabilities, { signal });+ await initial.liveAuthorization();+ const prepared = await prepareSelectedModel(profile.config.model);+ await initial.liveAuthorization();+ const run = await createAgentSession(principal, "alfa", { title: profile.config.name, titleSource: "manual",+ memorySnapshot: { capturedAt: new Date().toISOString(), user: "", memory: "", schemaVersion: 1, recordCount: 0 } });+ runId = run.id;+ const authority = profileRuntimeAuthority(input.session, profile, input.capabilities, { signal, sessionId: runId });+ const result = await runBoundedAgent({ prepared, objective: prompt,+ system: `You are MSO saved profile ${profile.config.name}. Work on the requested read task. Only the saved read tools may run. Do not claim to change files or run commands. No earlier chat or owner memory is included.\n${profile.config.instructions}`,+ capabilities: authority.runtime, authority: authority.context, actor: principal,+ tools: context => authority.runtime.list(context.scope, context), maxTurns: 6, maxToolCalls: 16, signal });+ await updateAgentSessionHistory(principal, runId, result.messages);+ await appendAgentSessionEvent(principal, runId, { kind: "note", state: result.status, detail: `Profile ${profile.id}, revision ${profile.revision}` });+ await authority.liveAuthorization();+ signal.throwIfAborted();+ return { runId, profileId: profile.id, profileRevision: profile.revision, model: profile.config.model,+ status: result.status, text: result.text, rounds: result.rounds, toolCalls: result.toolCalls };+ } catch (error) {+ if (runId) await appendAgentSessionEvent(principal, runId, { kind: "note", state: "failed", detail: `Profile ${profile.id}, revision ${profile.revision}; task stopped` }).catch(() => undefined);+ throw controller.signal.aborted ? controller.signal.reason : error;+ } finally { clearTimeout(timeout); }+}diff --git a/lib/agent/profile-schema.ts b/lib/agent/profile-schema.tsnew file mode 100644index 00000000..ab8f2ec4--- /dev/null+++ b/lib/agent/profile-schema.ts@@ -0,0 +1,65 @@+import { PROFILE_READ_TOOLS, type AgentProfileConfig, type AgentProfileStore } from "@/lib/contracts/agent-profile";++export class AgentProfileError extends Error {+ constructor(message: string, public readonly status = 400) { super(message); this.name = "AgentProfileError"; }+}+export function profilePrincipal(principal: string) {+ if (!/^web:[A-Za-z0-9][A-Za-z0-9._:-]{0,159}$/.test(principal)) throw new AgentProfileError("profile_owner_unsupported", 403);+ return principal;+}+export function profileObject(raw: unknown): Record<string, unknown> {+ if (!raw || typeof raw !== "object" || Array.isArray(raw)) throw new AgentProfileError("profile_object_required");+ return raw as Record<string, unknown>;+}+export function profileFields(raw: Record<string, unknown>, fields: string[]) {+ if (Object.keys(raw).some(key => !fields.includes(key))) throw new AgentProfileError("unsupported_profile_field");+}+export function profileText(raw: unknown, field: string, max: number, empty = false): string {+ if (typeof raw !== "string" || raw.length > max || (!empty && !raw.trim()) || raw.includes("\0")) throw new AgentProfileError(`invalid_profile_${field}`);+ return raw.trim();+}+export function profileRevision(raw: unknown, zero = false): number {+ if (typeof raw !== "number" || !Number.isSafeInteger(raw) || raw < (zero ? 0 : 1)) throw new AgentProfileError("invalid_profile_revision");+ return raw;+}+export function parseProfileConfig(input: unknown): AgentProfileConfig {+ const raw = profileObject(input);+ profileFields(raw, ["name", "avatar", "instructions", "model", "runtime", "tools"]);+ if (raw.runtime !== "mso-readonly") throw new AgentProfileError("profile_runtime_unsupported", 422);+ const model = profileObject(raw.model); profileFields(model, ["provider", "model"]);+ const provider = profileText(model.provider, "provider", 64), modelId = profileText(model.model, "model", 200);+ if (!/^[a-z0-9][a-z0-9-]{0,63}$/.test(provider) || ["constructor", "prototype"].includes(provider) || /\s/.test(modelId)) throw new AgentProfileError("invalid_profile_model");+ if (!Array.isArray(raw.tools) || raw.tools.length > PROFILE_READ_TOOLS.length || new Set(raw.tools).size !== raw.tools.length) throw new AgentProfileError("invalid_profile_tools");+ if (raw.tools.some((name) => !(PROFILE_READ_TOOLS as readonly unknown[]).includes(name))) throw new AgentProfileError("profile_tool_unsupported", 422);+ return { name: profileText(raw.name, "name", 80), avatar: profileText(raw.avatar ?? "", "avatar", 8, true),+ instructions: profileText(raw.instructions ?? "", "instructions", 4000, true), runtime: "mso-readonly", model: { provider, model: modelId }, tools: [...raw.tools] };+}+export function emptyProfileStore(): AgentProfileStore { return { version: 1, revision: 0, defaultProfileId: null, profiles: [] }; }+export function validateProfileStore(input: unknown, owner: string): AgentProfileStore {+ const raw = profileObject(input) as unknown as AgentProfileStore;+ profileFields(raw as unknown as Record<string, unknown>, ["version", "revision", "defaultProfileId", "profiles"]);+ if (raw.version !== 1 || !Array.isArray(raw.profiles) || raw.profiles.length > 100) throw new AgentProfileError("invalid_profile_store", 500);+ profileRevision(raw.revision, true); profilePrincipal(owner);+ const ids = new Set<string>();+ for (const row of raw.profiles) {+ if (!row || !/^profile_[a-f0-9-]{36}$/.test(row.id) || ids.has(row.id) || row.owner !== owner || typeof row.enabled !== "boolean") throw new AgentProfileError("invalid_profile_record", 500);+ profileFields(row as unknown as Record<string, unknown>, ["id", "owner", "revision", "createdAt", "updatedAt", "enabled", "config", "clonedFrom", "history"]);+ ids.add(row.id); profileRevision(row.revision);+ if (!Array.isArray(row.history) || row.history.length !== row.revision || row.history.length > 200) throw new AgentProfileError("invalid_profile_history", 500);+ for (const [index, item] of row.history.entries()) {+ if (!item || item.revision !== index + 1 || item.actor !== owner || typeof item.at !== "string" || !Number.isFinite(Date.parse(item.at)) || typeof item.enabled !== "boolean" || !["create", "edit", "clone", "default", "enable", "disable"].includes(item.action)) throw new AgentProfileError("invalid_profile_history", 500);+ profileFields(item as unknown as Record<string, unknown>, ["revision", "at", "actor", "action", "reason", "config", "enabled"]);+ profileText(item.reason, "reason", 400); parseProfileConfig(item.config);+ }+ const last = row.history.at(-1)!;+ if (JSON.stringify(parseProfileConfig(row.config)) !== JSON.stringify(last.config) || last.enabled !== row.enabled || row.updatedAt !== last.at || row.createdAt !== row.history[0].at) throw new AgentProfileError("invalid_profile_head", 500);+ if (row.clonedFrom) {+ profileFields(profileObject(row.clonedFrom), ["id", "revision"]);+ if (!/^profile_[a-f0-9-]{36}$/.test(row.clonedFrom.id)) throw new AgentProfileError("invalid_profile_clone", 500);+ profileRevision(row.clonedFrom.revision);+ }+ }+ if (raw.defaultProfileId !== null && !raw.profiles.some(row => row.id === raw.defaultProfileId && row.enabled)) throw new AgentProfileError("invalid_profile_default", 500);+ if (raw.profiles.reduce((sum, row) => sum + row.revision, 0) !== raw.revision) throw new AgentProfileError("invalid_profile_store_revision", 500);+ return raw;+}diff --git a/lib/agent/profile-storage.ts b/lib/agent/profile-storage.tsnew file mode 100644index 00000000..7e090ce7--- /dev/null+++ b/lib/agent/profile-storage.ts@@ -0,0 +1,54 @@+import { constants, promises as fs } from "node:fs";+import { createHash, randomUUID } from "node:crypto";+import os from "node:os";+import path from "node:path";+import { expandOwnerStorePath } from "@/lib/owner-store-path.js";+import { pinSecurityStorePath } from "@/lib/security-store-path";+import type { AgentProfileStore } from "@/lib/contracts/agent-profile";+import { AgentProfileError, emptyProfileStore, profilePrincipal, validateProfileStore } from "./profile-schema";++const MAX_BYTES = 4 * 1024 * 1024;+export function agentProfileFile(principal: string) {+ const root = path.resolve(expandOwnerStorePath(process.env.OS_AGENT_PROFILES_DIR ?? path.join(os.homedir(), ".mso", "agent-profiles")));+ const owner = createHash("sha256").update(profilePrincipal(principal)).digest("hex");+ return path.join(root, `${owner}.json`);+}+export async function readProfileStore(principal: string): Promise<AgentProfileStore> {+ const pinned = await pinSecurityStorePath(agentProfileFile(principal));+ let handle;+ try {+ handle = await fs.open(pinned.file, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);+ const stat = await handle.stat();+ if (!stat.isFile() || stat.size < 1 || stat.size > MAX_BYTES) throw new AgentProfileError("profile_store_invalid_shape", 500);+ if (stat.uid !== process.getuid?.() || (stat.mode & 0o077)) throw new AgentProfileError("profile_store_unsafe_permissions", 500);+ return validateProfileStore(JSON.parse(await handle.readFile("utf8")), principal);+ } catch (error) {+ if ((error as NodeJS.ErrnoException).code === "ENOENT") return emptyProfileStore();+ throw error;+ } finally { await handle?.close().catch(() => undefined); await pinned.directory.close(); }+}+export async function writeProfileStore(principal: string, store: AgentProfileStore, authorize: () => Promise<void>) {+ validateProfileStore(store, principal);+ const body = JSON.stringify(store) + "\n";+ if (Buffer.byteLength(body) > MAX_BYTES) throw new AgentProfileError("profile_store_limit", 413);+ const pinned = await pinSecurityStorePath(agentProfileFile(principal));+ const temp = `${pinned.file}.${randomUUID()}.tmp`;+ let handle, renamed = false;+ try {+ await pinned.directory.chmod(0o700);+ handle = await fs.open(temp, "wx", 0o600);+ await handle.writeFile(body, "utf8");+ await handle.sync();+ await handle.close(); handle = undefined;+ await authorize();+ await fs.rename(temp, pinned.file); renamed = true;+ await pinned.directory.sync();+ } catch (error) {+ if (renamed) throw new AgentProfileError("profile_commit_uncertain_refresh_before_retry", 503);+ throw error;+ } finally {+ await handle?.close().catch(() => undefined);+ await fs.unlink(temp).catch(() => undefined);+ await pinned.directory.close().catch(() => undefined);+ }+}diff --git a/lib/agent/profile-store.test.ts b/lib/agent/profile-store.test.tsnew file mode 100644index 00000000..a4e4b357--- /dev/null+++ b/lib/agent/profile-store.test.ts@@ -0,0 +1,102 @@+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";+import { chmod, mkdtemp, readFile, rm, stat, symlink, writeFile } from "node:fs/promises";+import os from "node:os";+import path from "node:path";+import { mutateAgentProfiles, readAgentProfiles, requireAgentProfile } from "./profile-store";+import { agentProfileFile } from "./profile-storage";+import type { AgentProfileConfig } from "@/lib/contracts/agent-profile";++const owner = "web:aaaaaaaaaaaaaaaa", other = "web:bbbbbbbbbbbbbbbb";+const config: AgentProfileConfig = { name: "Repository reader", avatar: "RR", instructions: "Inspect the requested repository.", runtime: "mso-readonly", model: { provider: "owner-provider", model: "exact/model" }, tools: ["fs_read"] };+let root: string;+beforeEach(async () => { root = await mkdtemp(path.join(os.tmpdir(), "mso-profiles-")); vi.stubEnv("OS_AGENT_PROFILES_DIR", root); });+afterEach(async () => { vi.unstubAllEnvs(); await rm(root, { recursive: true, force: true }); });+const create = () => mutateAgentProfiles(owner, { action: "create", expectedRevision: 0, config, reason: "First profile" });++describe("saved owner profiles", () => {+ it("persists the exact config, revision, actor and default after a fresh read", async () => {+ const store = await create(), profile = store.profiles[0];+ expect(await readAgentProfiles(owner)).toEqual(store);+ expect(store.defaultProfileId).toBe(profile.id);+ expect(profile.history[0]).toMatchObject({ revision: 1, actor: owner, reason: "First profile", config });+ expect((await stat(agentProfileFile(owner))).mode & 0o777).toBe(0o600);+ expect(profile.config.model).toEqual(config.model);+ });+ it("isolates list, read and mutations by the server-derived device principal", async () => {+ const store = await create(), profile = store.profiles[0];+ expect((await readAgentProfiles(other)).profiles).toEqual([]);+ await expect(requireAgentProfile(other, profile.id, 1)).rejects.toThrow("profile_not_found");+ await expect(mutateAgentProfiles(other, { action: "edit", expectedRevision: 0, id: profile.id, profileRevision: 1, config, reason: "spoof" })).rejects.toThrow("profile_not_found");+ await expect(readAgentProfiles("../../owner")).rejects.toThrow("profile_owner_unsupported");+ await expect(mutateAgentProfiles(owner, { action: "create", expectedRevision: 1, owner: other, config, reason: "spoof" })).rejects.toThrow("unsupported_profile_field");+ });+ it("retains previous configurations, and clones only a new same-owner snapshot", async () => {+ let store = await create();+ const original = store.profiles[0];+ store = await mutateAgentProfiles(owner, { action: "edit", expectedRevision: 1, id: original.id, profileRevision: 1, config: { ...config, instructions: "New instructions" }, reason: "Refine instructions" });+ expect(store.profiles[0].history.map(row => row.config.instructions)).toEqual([config.instructions, "New instructions"]);+ store = await mutateAgentProfiles(owner, { action: "clone", expectedRevision: 2, id: original.id, profileRevision: 2, name: "Reader copy", reason: "Independent reader" });+ const clone = store.profiles[1];+ expect(clone.id).not.toBe(original.id);+ expect(clone.clonedFrom).toEqual({ id: original.id, revision: 2 });+ expect(clone.history).toHaveLength(1);+ expect(clone.config).toEqual({ ...store.profiles[0].config, name: "Reader copy" });+ expect(store.defaultProfileId).toBe(original.id);+ store = await mutateAgentProfiles(owner, { action: "default", expectedRevision: 3, id: clone.id, profileRevision: 1, reason: "Use reader copy" });+ expect((await readAgentProfiles(owner)).defaultProfileId).toBe(clone.id);+ expect(store.profiles[1].history.at(-1)).toMatchObject({ action: "default", reason: "Use reader copy" });+ store = await mutateAgentProfiles(owner, { action: "disable", expectedRevision: 4, id: clone.id, profileRevision: 2, reason: "Pause profile" });+ expect(store.defaultProfileId).toBeNull();+ await expect(requireAgentProfile(owner, clone.id, 3)).rejects.toThrow("profile_disabled");+ store = await mutateAgentProfiles(owner, { action: "enable", expectedRevision: 5, id: clone.id, profileRevision: 3, reason: "Resume profile" });+ expect(store.profiles[1]).toMatchObject({ enabled: true, revision: 4 });+ });+ it("serializes simultaneous revisions without silently losing either writer", async () => {+ const initial = await create(), id = initial.profiles[0].id;+ const outcomes = await Promise.allSettled(["first", "second"].map(name => mutateAgentProfiles(owner, { action: "edit", expectedRevision: 1, id, profileRevision: 1, config: { ...config, name }, reason: name })));+ expect(outcomes.filter(result => result.status === "fulfilled")).toHaveLength(1);+ expect(outcomes.find(result => result.status === "rejected")).toMatchObject({ reason: { message: "profile_store_revision_conflict" } });+ const saved = await readAgentProfiles(owner);+ expect(saved.revision).toBe(2); expect(saved.profiles[0].history).toHaveLength(2);+ await expect(requireAgentProfile(owner, id, 1)).rejects.toThrow("profile_revision_conflict");+ });+ it.each([+ { ...config, apiKey: "never-store-this" },+ { ...config, model: { ...config.model, token: "never-store-this" } },+ { ...config, tools: ["exec_run"] },+ { ...config, runtime: "acp" },+ { ...config, skills: ["unreviewed"] },+ ])("rejects secrets, unsupported assignments and stronger runtimes: %j", async candidate => {+ await expect(mutateAgentProfiles(owner, { action: "create", expectedRevision: 0, config: candidate, reason: "unsupported" })).rejects.toThrow();+ expect((await readAgentProfiles(owner)).profiles).toEqual([]);+ });+ it("rejects organization moves without creating a substitute identity boundary", async () => {+ await create();+ await expect(mutateAgentProfiles(owner, { action: "move", expectedRevision: 1, organizationId: "team", reason: "move" })).rejects.toThrow("profile_organization_move_unsupported");+ expect((await readAgentProfiles(owner)).revision).toBe(1);+ });+ it("does not commit when live authorization is withdrawn during the transaction", async () => {+ const authorize = vi.fn().mockResolvedValueOnce(undefined).mockRejectedValue(new Error("owner revoked"));+ await expect(mutateAgentProfiles(owner, { action: "create", expectedRevision: 0, config, reason: "revoked save" }, authorize)).rejects.toThrow("owner revoked");+ expect(authorize).toHaveBeenCalledTimes(2);+ expect((await readAgentProfiles(owner)).revision).toBe(0);+ });+ it("does not overwrite a corrupt or overly readable policy store", async () => {+ await create(); const file = agentProfileFile(owner), before = await readFile(file, "utf8");+ await chmod(file, 0o644);+ await expect(readAgentProfiles(owner)).rejects.toThrow(/permissions/);+ expect(await readFile(file, "utf8")).toBe(before);+ await chmod(file, 0o600); await writeFile(file, "{broken");+ await expect(create()).rejects.toThrow();+ expect(await readFile(file, "utf8")).toBe("{broken");+ });+ it("refuses symlinked policy files and parent directories", async () => {+ const target = path.join(root, "target.json"); await writeFile(target, "sensitive", { mode: 0o600 });+ await symlink(target, agentProfileFile(owner));+ await expect(readAgentProfiles(owner)).rejects.toThrow();+ const alias = path.join(root, "alias"); await symlink(root, alias);+ vi.stubEnv("OS_AGENT_PROFILES_DIR", alias);+ await expect(readAgentProfiles(other)).rejects.toThrow();+ expect(await readFile(target, "utf8")).toBe("sensitive");+ });+});diff --git a/lib/agent/profile-store.ts b/lib/agent/profile-store.tsnew file mode 100644index 00000000..c36161f8--- /dev/null+++ b/lib/agent/profile-store.ts@@ -0,0 +1,60 @@+import { randomUUID } from "node:crypto";+import { withSecurityStoreLock } from "@/lib/security-store-lock";+import type { AgentProfile, AgentProfileAction, AgentProfileStore } from "@/lib/contracts/agent-profile";+import { AgentProfileError, parseProfileConfig, profileFields, profileObject, profileRevision, profileText } from "./profile-schema";+import { agentProfileFile, readProfileStore, writeProfileStore } from "./profile-storage";++export const readAgentProfiles = readProfileStore;+export async function requireAgentProfile(principal: string, id: string | undefined, revision: number): Promise<AgentProfile> {+ const store = await readProfileStore(principal);+ const profile = store.profiles.find(row => row.id === (id ?? store.defaultProfileId));+ if (!profile) throw new AgentProfileError("profile_not_found", 404);+ if (!profile.enabled) throw new AgentProfileError("profile_disabled", 409);+ if (profile.revision !== profileRevision(revision)) throw new AgentProfileError("profile_revision_conflict", 409);+ return profile;+}+export async function mutateAgentProfiles(principal: string, input: unknown, authorize: () => Promise<void> = async () => {}) {+ const body = profileObject(input);+ if (body.action === "move") throw new AgentProfileError("profile_organization_move_unsupported", 501);+ profileFields(body, ["action", "expectedRevision", "id", "profileRevision", "config", "name", "reason"]);+ const action = String(body.action || "") as AgentProfileAction;+ if (!["create", "edit", "clone", "default", "enable", "disable"].includes(action)) throw new AgentProfileError("profile_action_unsupported", 422);+ const expected = profileRevision(body.expectedRevision, true), reason = profileText(body.reason, "reason", 400);+ return withSecurityStoreLock(agentProfileFile(principal), async () => {+ await authorize();+ const store = await readProfileStore(principal);+ if (store.revision !== expected) throw new AgentProfileError("profile_store_revision_conflict", 409);+ const now = new Date().toISOString(), previous = store.profiles.find(row => row.id === body.id);+ if (action !== "create") {+ if (!previous) throw new AgentProfileError("profile_not_found", 404);+ if (previous.revision !== profileRevision(body.profileRevision)) throw new AgentProfileError("profile_revision_conflict", 409);+ }+ if (["create", "clone"].includes(action) && store.profiles.length >= 100) throw new AgentProfileError("profile_count_limit", 409);+ let profile: AgentProfile;+ if (action === "create" || action === "clone") {+ const config = action === "create" ? parseProfileConfig(body.config) : { ...structuredClone(previous!.config), name: profileText(body.name, "name", 80) };+ profile = { id: `profile_${randomUUID()}`, owner: principal, revision: 1, createdAt: now, updatedAt: now, enabled: true, config, history: [],+ ...(action === "clone" ? { clonedFrom: { id: previous!.id, revision: previous!.revision } } : {}) };+ if (!store.profiles.length) store.defaultProfileId = profile.id;+ } else {+ profile = structuredClone(previous!);+ if (profile.history.length >= 200) throw new AgentProfileError("profile_revision_limit", 409);+ profile.revision += 1; profile.updatedAt = now;+ if (action === "edit") profile.config = parseProfileConfig(body.config);+ if (action === "disable") {+ profile.enabled = false;+ if (store.defaultProfileId === profile.id) store.defaultProfileId = null;+ }+ if (action === "enable") profile.enabled = true;+ if (action === "default") {+ if (!profile.enabled) throw new AgentProfileError("profile_disabled", 409);+ store.defaultProfileId = profile.id;+ }+ }+ profile.history.push({ revision: profile.revision, at: now, actor: principal, action, reason, config: structuredClone(profile.config), enabled: profile.enabled });+ const profiles = previous && action !== "clone" ? store.profiles.map(row => row.id === profile.id ? profile : row) : [...store.profiles, profile];+ const next: AgentProfileStore = { version: 1, revision: store.revision + 1, defaultProfileId: store.defaultProfileId, profiles };+ await writeProfileStore(principal, next, authorize);+ return next;+ });+}diff --git a/lib/agent/subagent-runner.test.ts b/lib/agent/subagent-runner.test.tsindex e30add83..a4cf2735 100644--- a/lib/agent/subagent-runner.test.ts+++ b/lib/agent/subagent-runner.test.ts@@ -79,4 +79,13 @@ describe("same-session subagent runner", () => {expect(names).not.toContain("project_agent_run");expect(result.status).toBe("completed");});+ it("preserves the existing subagent behavior beyond the profile-only tool budget", async () => {+ stream.mockImplementationOnce(async ({ emit }) => {+ for (let index = 0; index < 17; index++) emit("tool_use", { id: `read-${index}`, name: "fs_read", input: {} });+ }).mockImplementationOnce(async ({ emit }) => emit("delta", "done"));+ dispatch.mockResolvedValue({ content: [{ type: "text", text: "evidence" }] });+ const result = await runSessionSubagent({ principal: "mcp-client:x", parentSessionId: "session-a", objective: "inspect", capabilities, authority: { principal: "mcp-client:x", scope: "read" } });+ expect(dispatch).toHaveBeenCalledTimes(17); expect(result.toolCalls).toHaveLength(17);+ expect(result).toMatchObject({ status: "completed", rounds: 2, text: "done" });+ });});diff --git a/lib/agent/subagent-runner.ts b/lib/agent/subagent-runner.tsindex a2deb3d7..651cf8bb 100644--- a/lib/agent/subagent-runner.ts+++ b/lib/agent/subagent-runner.ts@@ -1,13 +1,11 @@import { randomUUID } from "node:crypto";import { getAgentSession } from "./session-store";-import { prepareSelectedModel, streamPreparedSelectedModel } from "@/lib/ai/selected-model-stream";-import type { OaMsg, OaTool, OaToolUse } from "@/lib/ai/openai-stream";+import { prepareSelectedModel } from "@/lib/ai/selected-model-stream";import { allows, parseScope, type Scope } from "@/lib/capabilities/scope";import type { CapabilityRuntime } from "@/lib/capabilities/runtime";import type { CapabilityRunContext } from "@/lib/capabilities/tool";-import { liveCapabilityContext } from "@/lib/capabilities/live-authority";+import { runBoundedAgent, type BoundedAgentProgress } from "./bounded-runner";-const MAX_RESULT_BYTES = 64 * 1024;const DEFAULT_TURNS = 6;const ABSOLUTE_MAX_TURNS = 48;function maxTurnsLimit(): number {@@ -20,25 +18,9 @@ const DEFAULT_TIMEOUT_MS = 60_000;const MAX_TIMEOUT_MS = 120_000;const DENY_PREFIXES = ["agent_session_", "agent_memory_", "local_agent_", "a2a_"];const DENY_EXACT = new Set(["agent_subagent_run", "project_agent_run"]);--function bounded(value: string, max = MAX_RESULT_BYTES): string {- if (Buffer.byteLength(value, "utf8") <= max) return value;- let out = value;- while (Buffer.byteLength(out, "utf8") > max - 80) out = out.slice(0, Math.floor(out.length * 0.9));- return `${out}\n…[truncated by MSO subagent result budget]`;-}-function allowedTool(name: string): boolean {- return !DENY_EXACT.has(name) && !DENY_PREFIXES.some((prefix) => name.startsWith(prefix));+ return !DENY_EXACT.has(name) && !DENY_PREFIXES.some(prefix => name.startsWith(prefix));}--function resultText(rpc: Record<string, unknown>): { content: string; isError: boolean } {- if (rpc.error) return { content: bounded(`error: ${JSON.stringify(rpc.error)}`), isError: true };- const result = (rpc.result ?? {}) as { content?: Array<{ type?: string; text?: string }>; isError?: boolean };- const text = (result.content ?? []).filter((row) => row.type === "text").map((row) => row.text ?? "").join("\n");- return { content: bounded(text || JSON.stringify(result.content ?? [])), isError: Boolean(result.isError) };-}-function systemPrompt(input: { name: string; objective: string; cwd?: string; maxScope: Scope; explicitContext?: string }): string {return [`You are MSO subagent ${input.name}, a focused worker spawned inside one parent MSO Agent session.`,@@ -51,7 +33,6 @@ function systemPrompt(input: { name: string; objective: string; cwd?: string; ma"Do not spawn another subagent. Do not message other sessions. Never expose credentials, authorization headers, private keys, tool arguments, or hidden reasoning.",].filter(Boolean).join(" ");}-export async function runSessionSubagent(input: {principal: string;parentSessionId: string;@@ -76,59 +57,19 @@ export async function runSessionSubagent(input: {const timeoutMs = Math.max(1_000, Math.min(MAX_TIMEOUT_MS, Math.trunc(input.timeoutMs || DEFAULT_TIMEOUT_MS)));const subagentId = `subagent_${randomUUID()}`;const authority = { ...input.authority, principal: input.authority.principal ?? input.principal, scope: maxScope, capabilities: input.capabilities };- const toolDefs = (context: CapabilityRunContext) => input.capabilities.list(context.scope, context).filter((tool) => allows(context.scope, tool.scope) && allowedTool(tool.name) && (!context.allowedTools || context.allowedTools.includes(tool.name)));+ const toolDefs = (context: CapabilityRunContext) => input.capabilities.list(context.scope, context).filter(tool => allows(context.scope, tool.scope) && allowedTool(tool.name) && (!context.allowedTools || context.allowedTools.includes(tool.name)));const prepared = await prepareSelectedModel();- const messages: OaMsg[] = [{ role: "user", text: objective }];- const toolCalls: Array<{ name: string; ok: boolean }> = [];const controller = new AbortController();const timeout = setTimeout(() => controller.abort(new Error("subagent timeout")), timeoutMs);const signal = AbortSignal.any([controller.signal, ...(authority.signal ? [authority.signal] : [])]);- authority.signal = signal;- let finalText = "";+ const progress: BoundedAgentProgress = { text: "", toolCalls: [] };try {- for (let round = 1; round <= maxTurns; round += 1) {- const live = await liveCapabilityContext(authority);- const tools: OaTool[] = toolDefs(live).map((tool) => ({ name: tool.name, description: tool.description, input_schema: tool.inputSchema }));- let text = "";- const uses: OaToolUse[] = [];- await streamPreparedSelectedModel({- prepared, messages, tools,- system: systemPrompt({ name, objective, cwd: parent.cwd, maxScope, explicitContext: input.explicitContext }),- signal,- emit(event, data) {- if (event === "delta") text += String(data ?? "");- else if (event === "tool_use") uses.push(data as OaToolUse);- },- });- await liveCapabilityContext(authority);- if (controller.signal.aborted) throw controller.signal.reason;- if (text) finalText = bounded(text);- messages.push({ role: "assistant", text, toolUses: uses });- if (!uses.length) return { subagentId, name, status: "completed" as const, text: finalText.trim(), rounds: round, toolCalls, maxScope };- const results: { id: string; content: string; isError?: boolean }[] = [];- for (const call of uses) {- const current = await liveCapabilityContext(authority, call.name, call.input ?? {});- const tool = toolDefs(current).find((entry) => entry.name === call.name);- if (!tool) {- results.push({ id: call.id, content: "error: tool unavailable to this subagent", isError: true });- toolCalls.push({ name: call.name, ok: false });- continue;- }- const invoked = await input.capabilities.invoke({- ...current, name: call.name, args: call.input ?? {},- actor: `${input.principal}#${subagentId}`, principal: current.principal,- });- const outcome = resultText({ result: invoked });- results.push({ id: call.id, content: outcome.content, ...(outcome.isError ? { isError: true } : {}) });- toolCalls.push({ name: call.name, ok: !outcome.isError });- }- messages.push({ role: "tool", results });- }- return { subagentId, name, status: "partial" as const, text: finalText.trim() || "Subagent reached its turn limit before a final answer.", rounds: maxTurns, toolCalls, maxScope };+ const result = await runBoundedAgent({ prepared, objective, system: systemPrompt({ name, objective, cwd: parent.cwd, maxScope, explicitContext: input.explicitContext }),+ capabilities: input.capabilities, authority, actor: `${input.principal}#${subagentId}`, tools: toolDefs, maxTurns, signal, progress });+ const text = result.status === "partial" && !progress.text.trim() ? "Subagent reached its turn limit before a final answer." : result.text;+ return { subagentId, name, status: result.status, text, rounds: result.rounds, toolCalls: result.toolCalls, maxScope };} catch (error) {- if (controller.signal.aborted) return { subagentId, name, status: "timeout" as const, text: finalText.trim(), rounds: 0, toolCalls, maxScope };+ if (controller.signal.aborted) return { subagentId, name, status: "timeout" as const, text: progress.text.trim(), rounds: 0, toolCalls: progress.toolCalls, maxScope };throw error;- } finally {- clearTimeout(timeout);- }+ } finally { clearTimeout(timeout); }}diff --git a/lib/ai/profile-model-binding.test.ts b/lib/ai/profile-model-binding.test.tsnew file mode 100644index 00000000..c23d02a7--- /dev/null+++ b/lib/ai/profile-model-binding.test.ts@@ -0,0 +1,44 @@+import { beforeEach, describe, expect, it, vi } from "vitest";+import { PROVIDERS } from "@/lib/models";++const mock = vi.hoisted(() => ({ config: vi.fn(), key: vi.fn(), selected: vi.fn(), ref: vi.fn(), oauth: vi.fn(), refresh: vi.fn(), save: vi.fn() }));+vi.mock("@/lib/config/store", () => ({ DEFAULT_PROVIDER: "anthropic", readConfig: mock.config,+ safeProviderId: (id: string) => id, hostCredentialStore: () => ({ getKey: mock.key }),+ selectedCustomConn: mock.selected, resolveModelRef: mock.ref, readOAuthBundle: mock.oauth, writeOAuthBundle: mock.save }));+vi.mock("@/lib/ai/oauth/codex", () => ({ ensureFreshCodex: mock.refresh }));+const { prepareSelectedModel } = await import("./selected-model-stream");+const active = { baseUrl: "https://active.invalid/v1", protocol: "openai" }, saved = { baseUrl: "https://saved.invalid/v1", protocol: "anthropic" };+beforeEach(() => {+ Object.values(mock).forEach(fn => fn.mockReset());+ mock.config.mockResolvedValue({ provider: "active", model: "active-model", customProviders: { active, saved } });+ mock.key.mockImplementation(async (_tenant: unknown, provider: string) => `fixture-key:${provider}`);+ mock.selected.mockResolvedValue(active); mock.ref.mockResolvedValue("active/active-model");+});+describe("saved profile model binding", () => {+ it("pairs the saved provider's key and endpoint and preserves namespaced model ids", async () => {+ const prepared = await prepareSelectedModel({ provider: "saved", model: "organization/exact-model" });+ expect(prepared).toMatchObject({ kind: "anthropic", provider: "saved", model: "organization/exact-model", customProvider: true,+ resolved: { provider: "saved", model: "organization/exact-model", baseUrl: saved.baseUrl, apiKey: "fixture-key:saved" } });+ expect(mock.key).toHaveBeenCalledWith(undefined, "saved");+ expect(mock.selected).not.toHaveBeenCalled(); expect(mock.ref).not.toHaveBeenCalled();+ });+ it("keeps known provider endpoints pinned while honoring the exact saved model", async () => {+ const prepared = await prepareSelectedModel({ provider: "openai", model: "explicit-account-model" });+ expect(prepared).toMatchObject({ provider: "openai", model: "explicit-account-model", resolved: { baseUrl: PROVIDERS.openai.baseUrl, apiKey: "fixture-key:openai" } });+ });+ it("preserves the deployment-selected path for existing callers without a binding", async () => {+ expect(await prepareSelectedModel()).toMatchObject({ provider: "active", model: "active-model", resolved: { baseUrl: active.baseUrl } });+ expect(mock.selected).toHaveBeenCalledTimes(1); expect(mock.ref).toHaveBeenCalledTimes(1);+ });+ it("uses the existing Codex authority with the explicitly saved account model", async () => {+ const bundle = { kind: "oauth", access: "fixture-access", expires: 100 };+ mock.oauth.mockResolvedValue(bundle); mock.refresh.mockResolvedValue(bundle);+ expect(await prepareSelectedModel({ provider: "openai-codex", model: "account/model" })).toEqual({ kind: "codex", provider: "openai-codex", model: "account/model", bundle });+ expect(mock.oauth).toHaveBeenCalledWith("openai-codex"); expect(mock.key).not.toHaveBeenCalled();+ });+ it("does not fall back to another provider when the saved connection is absent", async () => {+ mock.key.mockResolvedValue(null);+ await expect(prepareSelectedModel({ provider: "saved", model: "exact" })).rejects.toMatchObject({ code: "no_api_key:saved", status: 501 });+ expect(mock.selected).not.toHaveBeenCalled(); expect(mock.ref).not.toHaveBeenCalled();+ });+});diff --git a/lib/ai/selected-model-stream.ts b/lib/ai/selected-model-stream.tsindex e70bfab9..1af3d2bd 100644--- a/lib/ai/selected-model-stream.ts+++ b/lib/ai/selected-model-stream.ts@@ -5,6 +5,7 @@ import {readConfig,readOAuthBundle,resolveModelRef,+ safeProviderId,selectedCustomConn,writeOAuthBundle,type OAuthBundle,@@ -51,9 +52,11 @@ export class SelectedModelConfigError extends Error {}}-export async function prepareSelectedModel(): Promise<PreparedSelectedModel> {+export async function prepareSelectedModel(binding?: { provider: string; model: string }): Promise<PreparedSelectedModel> {const cfg = await readConfig();- const provider = cfg.provider || DEFAULT_PROVIDER;+ const provider = binding ? safeProviderId(binding.provider) : cfg.provider || DEFAULT_PROVIDER;+ const model = binding?.model ?? cfg.model;+ if (binding && (!model || model.length > 200 || /\s|\0/.test(model))) throw new SelectedModelConfigError("invalid_model_binding", 400);if (provider === "openai-codex") {const existing = await readOAuthBundle("openai-codex");if (!existing)@@ -61,9 +64,9 @@ export async function prepareSelectedModel(): Promise<PreparedSelectedModel> {try {const bundle = await ensureFreshCodex(existing);if (bundle !== existing) await writeOAuthBundle("openai-codex", bundle);- if (!cfg.model)+ if (!model)throw new SelectedModelConfigError("model_not_selected", 400);- return { kind: "codex", provider, model: cfg.model, bundle };+ return { kind: "codex", provider, model, bundle };} catch (error) {if (error instanceof SelectedModelConfigError) throw error;throw new SelectedModelConfigError("oauth_refresh_failed", 502);@@ -71,8 +74,8 @@ export async function prepareSelectedModel(): Promise<PreparedSelectedModel> {}try {- const custom = await selectedCustomConn();- const resolved = await resolveModel(await resolveModelRef(), {+ const custom = binding ? Object.entries(cfg.customProviders ?? {}).find(([id]) => id === provider)?.[1] ?? null : await selectedCustomConn();+ const resolved = await resolveModel(binding ? `${provider}/${model}` : await resolveModelRef(), {store: hostCredentialStore(),baseUrl: custom?.baseUrl,protocol: custom?.protocol,diff --git a/lib/contracts/agent-profile.ts b/lib/contracts/agent-profile.tsnew file mode 100644index 00000000..97e7b7e2--- /dev/null+++ b/lib/contracts/agent-profile.ts@@ -0,0 +1,54 @@+export const PROFILE_READ_TOOLS = [+ "vps_status", "fs_list", "fs_read", "fs_search", "fs_usage", "projects_list",+ "project_get", "project_candidate_search", "project_capabilities",+] as const;+export interface AgentProfileConfig {+ name: string;+ avatar: string;+ instructions: string;+ runtime: "mso-readonly";+ model: { provider: string; model: string };+ tools: string[];+}+export type AgentProfileAction = "create" | "edit" | "clone" | "default" | "enable" | "disable";+export interface AgentProfileRevision {+ revision: number;+ at: string;+ actor: string;+ action: AgentProfileAction;+ reason: string;+ config: AgentProfileConfig;+ enabled: boolean;+}+export interface AgentProfile {+ id: string;+ owner: string;+ revision: number;+ createdAt: string;+ updatedAt: string;+ enabled: boolean;+ config: AgentProfileConfig;+ clonedFrom?: { id: string; revision: number };+ history: AgentProfileRevision[];+}+export interface AgentProfileStore {+ version: 1;+ revision: number;+ defaultProfileId: string | null;+ profiles: AgentProfile[];+}+export interface AgentProfileCatalog {+ store: AgentProfileStore;+ selectedModel: AgentProfileConfig["model"];+ tools: Array<{ name: string; description: string }>;+}+export interface AgentProfileRunResult {+ runId: string;+ profileId: string;+ profileRevision: number;+ model: AgentProfileConfig["model"];+ status: "completed" | "partial";+ text: string;+ rounds: number;+ toolCalls: Array<{ name: string; ok: boolean }>;+}diff --git a/lib/contracts/workflow-graph.ts b/lib/contracts/workflow-graph.tsindex 3b092b83..d550f4bf 100644--- a/lib/contracts/workflow-graph.ts+++ b/lib/contracts/workflow-graph.ts@@ -102,7 +102,7 @@ export type WorkflowGraphRun = {instance: string;nodes: WorkflowGraphRunNode[];edges?: WorkflowGraphRunEdge[];- trigger?: { type: "manual" | "schedule" | "webhook" | "channel" | "system"; nodeId?: string; receivedAt: string };+ trigger?: { type: "manual" | "schedule" | "webhook" | "channel" | "system"; nodeId?: string; receivedAt: string; scheduleMode?: "interval" | "cron" | "runAt"; scheduledAt?: string };ancestry?: string[];/** Owner-private runtime input retained only so an execution can be retried safely. Public receipts strip this field. */runtimeInput?: Record<string, unknown>;diff --git a/lib/contracts/workflow-schedule.test.ts b/lib/contracts/workflow-schedule.test.tsnew file mode 100644index 00000000..a3f26e07--- /dev/null+++ b/lib/contracts/workflow-schedule.test.ts@@ -0,0 +1,41 @@+import { describe, expect, it } from "vitest";+import { normalizeWorkflowRunAt, parseWorkflowCron, validateWorkflowSchedule, validateWorkflowTimezone } from "./workflow-schedule";++describe("workflow schedule input contract", () => {+ it("normalizes explicit offsets without changing the saved input", () => {+ const config = { mode: "runAt", runAt: "2026-10-19T09:00:30+07:00", missedPolicy: "run_once" };+ expect(validateWorkflowSchedule(config)).toBe("runAt");+ expect(normalizeWorkflowRunAt(config.runAt)).toBe("2026-10-19T02:00:30.000Z");+ expect(config.runAt).toBe("2026-10-19T09:00:30+07:00");+ expect(normalizeWorkflowRunAt("2026-10-18T22:00:30-04:00")).toBe(normalizeWorkflowRunAt(config.runAt));+ expect(normalizeWorkflowRunAt("2024-02-29T00:00:00.123Z")).toBe("2024-02-29T00:00:00.123Z");+ });+ it.each([undefined, null, 0, "", "2026-10-19", "2026-10-19T09:00:30", "2026-02-29T00:00:00Z", "2026-04-31T00:00:00Z", "2026-13-01T00:00:00Z", "2026-01-00T00:00:00Z", "2026-10-19T24:00:00Z", "2026-10-19T09:60:00Z", "2026-10-19T09:00:60Z", "2026-10-19T09:00:00+24:00", "2026-10-19T09:00:00+07:60", "2026-10-19T09:00:00.1234Z"])("rejects ambiguous or invalid instant %s", value => {+ expect(() => normalizeWorkflowRunAt(value)).toThrow(/runAt/);+ });+ it.each([null, 7, "Mars/Olympus", " UTC", "+07:00"])("rejects invalid IANA timezone %s", value => expect(() => validateWorkflowTimezone(value)).toThrow(/timezone/));+ it.each(["0001-01-01T00:00:00+23:59", "9999-12-31T23:59:59-23:59"])("rejects offsets outside the stored UTC year range: %s", value => expect(() => normalizeWorkflowRunAt(value)).toThrow(/runAt/));+ it("accepts valid timezone aliases and an explicitly inherited empty override", () => {+ expect(validateWorkflowTimezone("UTC")).toBe("UTC"); expect(validateWorkflowTimezone("Asia/Jakarta")).toBe("Asia/Jakarta");+ expect(validateWorkflowSchedule({ mode: "interval", everyMinutes: 5, timezone: "" }, "Asia/Jakarta")).toBe("interval");+ });+ it.each([+ { mode: "once" }, { mode: null }, { mode: 0 }, { mode: "interval", everyMinutes: 0 }, { mode: "interval", everyMinutes: 10081 },+ { mode: "interval", everyMinutes: 1.5 }, { mode: "interval", everyMinutes: "5" }, { mode: "interval", everyMinutes: null },+ { mode: "interval", runAt: "2026-10-19T02:00:30Z" }, { mode: "cron", cron: "* * * * *", runAt: "2026-10-19T02:00:30Z" },+ { mode: "cron", cron: "* * * * *", dayMatch: "either" }, { mode: "cron", cron: "* * * * *", missedPolicy: "run_once" },+ { mode: "runAt", runAt: "2026-10-19T02:00:30Z" }, { mode: "runAt", runAt: "2026-10-19T02:00:30Z", missedPolicy: "skip" },+ { mode: "runAt", runAt: "2026-10-19T02:00:30Z", missedPolicy: "run_once", cron: "* * * * *" },+ ])("rejects invalid or mixed mode config %j", config => expect(() => validateWorkflowSchedule(config)).toThrow());+ it.each([+ { mode: "interval", everyMinutes: 60, cron: "unused legacy text", dayMatch: "unused" },+ { mode: "cron", cron: "30 12 * * *", everyMinutes: "unused legacy text" },+ ])("keeps legacy inactive recurring fields inert for $mode", config => {+ const original = structuredClone(config); expect(validateWorkflowSchedule(config)).toBe(config.mode); expect(config).toEqual(original);+ });+ it.each(["* * *", "* * * * * *", "* * * * 7", "* * 32 * *", "* 24 * * *", "* * * 13 *", "0,,1 * * * *", "*/0 * * * *", "1-0 * * * *", "*/2/3 * * * *", "* * * * MON"])("validates every cron field in %s", expression => expect(() => parseWorkflowCron(expression)).toThrow());+ it("supports bounded numeric lists, ranges and steps", () => {+ const fields = parseWorkflowCron("0,15-45/15 9-17 * * 1-5");+ expect(fields[0]).toEqual([0, 15, 30, 45]); expect(fields[1]).toHaveLength(9); expect(fields[4]).toEqual([1, 2, 3, 4, 5]);+ });+});diff --git a/lib/contracts/workflow-schedule.ts b/lib/contracts/workflow-schedule.tsnew file mode 100644index 00000000..685c9c75--- /dev/null+++ b/lib/contracts/workflow-schedule.ts@@ -0,0 +1,58 @@+export type WorkflowScheduleMode = "interval" | "cron" | "runAt";++export function validateWorkflowTimezone(value: unknown): string {+ if (typeof value !== "string" || !/^[A-Za-z][A-Za-z0-9_+./-]{0,99}$/.test(value)) throw new Error("schedule timezone must be an IANA timezone");+ try { new Intl.DateTimeFormat("en-US", { timeZone: value }).format(0); }+ catch { throw new Error("schedule timezone must be an IANA timezone"); }+ return value;+}++export function normalizeWorkflowRunAt(value: unknown): string {+ const match = typeof value === "string" && /^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,3}))?(Z|[+-]\d{2}:\d{2})$/.exec(value);+ if (!match) throw new Error("runAt requires a date and time with an explicit UTC offset");+ const [year, month, day, hour, minute, second] = match.slice(1, 7).map(Number);+ const calendar = new Date(0); calendar.setUTCFullYear(year, month - 1, day);+ const offset = match[8], offsetHour = offset === "Z" ? 0 : Number(offset.slice(1, 3)), offsetMinute = offset === "Z" ? 0 : Number(offset.slice(4, 6));+ if (year < 1 || calendar.getUTCFullYear() !== year || calendar.getUTCMonth() !== month - 1 || calendar.getUTCDate() !== day || hour > 23 || minute > 59 || second > 59 || offsetHour > 23 || offsetMinute > 59) throw new Error("runAt contains an invalid date, time or UTC offset");+ const instant = new Date(value as string);+ if (!Number.isFinite(instant.getTime()) || instant.getUTCFullYear() < 1 || instant.getUTCFullYear() > 9999) throw new Error("runAt contains an invalid date, time or UTC offset");+ return instant.toISOString();+}++export function parseWorkflowCron(value: unknown): number[][] {+ if (typeof value !== "string" || value.length > 256) throw new Error("cron requires 5 fields: minute hour day month weekday");+ const fields = value.trim().split(/\s+/);+ if (fields.length !== 5) throw new Error("cron requires 5 fields: minute hour day month weekday");+ return fields.map((field, index) => {+ const [minimum, maximum] = [[0, 59], [0, 23], [1, 31], [1, 12], [0, 6]][index], values = new Set<number>();+ for (const token of field.split(",")) {+ const match = /^(\*|\d+(?:-\d+)?)(?:\/([1-9]\d*))?$/.exec(token);+ if (!match) throw new Error("invalid cron field");+ const range = match[1], step = Number(match[2] ?? 1);+ const [low, high] = range === "*" ? [minimum, maximum] : range.includes("-") ? range.split("-").map(Number) : [Number(range), Number(range)];+ if (!Number.isSafeInteger(step) || !Number.isSafeInteger(low) || !Number.isSafeInteger(high) || low < minimum || high > maximum || low > high) throw new Error("invalid cron field");+ for (let number = low; number <= high; number += step) values.add(number);+ }+ return [...values];+ });+}++export function validateWorkflowSchedule(config: Record<string, unknown>, fallbackTimezone = "UTC"): WorkflowScheduleMode {+ const mode = config.mode === undefined ? "interval" : config.mode;+ if (!["interval", "cron", "runAt"].includes(String(mode)) || typeof mode !== "string") throw new Error("invalid schedule mode");+ validateWorkflowTimezone(config.timezone === undefined || config.timezone === "" ? fallbackTimezone : config.timezone);+ // The previous editor retained inactive interval/cron fields when switching modes.+ const fields = { interval: ["runAt", "missedPolicy"], cron: ["runAt", "missedPolicy"], runAt: ["everyMinutes", "cron", "dayMatch"] };+ for (const field of fields[mode as WorkflowScheduleMode]) if (config[field] !== undefined) throw new Error(`${field} is not supported for schedule mode ${mode}`);+ if (mode === "interval") {+ const every = config.everyMinutes === undefined ? 60 : config.everyMinutes;+ if (typeof every !== "number" || !Number.isInteger(every) || every < 1 || every > 10080) throw new Error("everyMinutes must be an integer from 1 to 10080");+ } else if (mode === "cron") {+ parseWorkflowCron(config.cron);+ if (config.dayMatch !== undefined && config.dayMatch !== "and" && config.dayMatch !== "or") throw new Error("cron dayMatch must be and or or");+ } else {+ normalizeWorkflowRunAt(config.runAt);+ if (config.missedPolicy !== "run_once") throw new Error("runAt requires missedPolicy run_once");+ }+ return mode as WorkflowScheduleMode;+}diff --git a/lib/host/path-credentials.ts b/lib/host/path-credentials.tsindex 5a23d9e6..1d1e8c4b 100644--- a/lib/host/path-credentials.ts+++ b/lib/host/path-credentials.ts@@ -1,5 +1,6 @@import { realpathSync } from "fs";import path from "path";+import { expandOwnerStorePath } from "@/lib/owner-store-path.js";import { homeDir, isUnderRoot } from "./path-roots";// Credential denylist: even inside a legal root, the app's OWN secret files are@@ -92,8 +93,10 @@ export function isAppSecret(real: string): boolean {* rather than discover it one `resolveReadable` too late. */export function credentialRoots(): string[] {const names = process.env.OS_FS_ALLOW_SENSITIVE === "1" ? [".mso"] : [".mso", ...SENSITIVE_HOME];- return names.flatMap((name) => {- const lexical = path.join(homeDir(), name);+ const roots = names.map(name => path.join(homeDir(), name));+ // Saved tool policy stays private even when its configured directory is outside ~/.mso.+ if (process.env.OS_AGENT_PROFILES_DIR !== undefined) roots.push(path.resolve(expandOwnerStorePath(process.env.OS_AGENT_PROFILES_DIR)));+ return roots.flatMap((lexical) => {try { return [lexical, realpathSync.native(lexical)]; } catch { return [lexical]; }});}@@ -122,4 +125,3 @@ export function looseCredentialExcludes(): string[] {// SENSITIVE_HOME escape hatch; keep that contract while extending id_* safely.return ["*.pem", ".env*", "*/.env*", ...[".mcp.json", ".npmrc", ".pypirc", ".netrc"].flatMap((name) => [name, `*/${name}`, `${name}.*`, `*/${name}.*`]), ...privateNames];}-diff --git a/lib/host/path-recursive.ts b/lib/host/path-recursive.tsindex a136cc40..ea780124 100644--- a/lib/host/path-recursive.ts+++ b/lib/host/path-recursive.ts@@ -1,8 +1,8 @@-import { existsSync, promises as fs, readdirSync, realpathSync } from "fs";+import { existsSync, promises as fs, readdirSync } from "fs";import path from "path";import { HostError } from "./host-error";-import { appDir, isAppSecret, isCredentialPath, SENSITIVE_HOME } from "./path-credentials";-import { homeDir, isUnderRoot } from "./path-roots";+import { appDir, credentialRoots, isAppSecret, isCredentialPath } from "./path-credentials";+import { isUnderRoot } from "./path-roots";import { descriptorPath, pinDirectory } from "./fs-descriptors";/** The app's own secrets sitting UNDER `realBase` — empty when APP_DIR is not a@@ -26,10 +26,7 @@ function appSecretsUnder(realBase: string): string[] {// explicitly. Filtered by existence so the callers never refuse (or exclude) over// a path that isn't on this box.function sensitiveUnder(realBase: string): string[] {- const h = homeDir();- return [...(process.env.OS_FS_ALLOW_SENSITIVE === "1" ? [] : SENSITIVE_HOME), ".mso"]- .map((n) => path.join(h, n))- .flatMap((p) => { try { return [p, realpathSync(p)]; } catch { return [p]; } })+ return credentialRoots().filter((p) => p !== realBase && isUnderRoot(p, realBase) && existsSync(p));}diff --git a/lib/host/profile-path.test.ts b/lib/host/profile-path.test.tsnew file mode 100644index 00000000..e7bebd1a--- /dev/null+++ b/lib/host/profile-path.test.ts@@ -0,0 +1,31 @@+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";+import { mkdir, mkdtemp, rm, symlink, writeFile } from "node:fs/promises";+import os from "node:os";+import path from "node:path";+import { assertNoCredentialDescendants, isCredentialPath, resolveReadable, safeWritePath, sensitiveExcludes } from "./paths";++let root: string, profiles: string;+beforeEach(async () => {+ root = await mkdtemp(path.join(os.tmpdir(), "mso-profile-path-")); profiles = path.join(root, "profiles");+ await mkdir(profiles); await writeFile(path.join(profiles, "owner.json"), "synthetic-policy");+ vi.stubEnv("OS_AGENT_PROFILES_DIR", profiles); vi.stubEnv("OS_FS_READ_ROOTS", root); vi.stubEnv("OS_FS_WRITE_ROOTS", root);+});+afterEach(async () => { vi.unstubAllEnvs(); await rm(root, { recursive: true, force: true }); });++describe("saved profile filesystem boundary", () => {+ it.each(["0", "1"])("blocks direct and recursive access with OS_FS_ALLOW_SENSITIVE=%s", async sensitive => {+ vi.stubEnv("OS_FS_ALLOW_SENSITIVE", sensitive);+ const file = path.join(profiles, "owner.json");+ await expect(resolveReadable(file)).rejects.toThrow(/credential/);+ await expect(safeWritePath(file, true)).rejects.toThrow(/credential/);+ await expect(assertNoCredentialDescendants(root)).rejects.toThrow(/credential/);+ expect(sensitiveExcludes(root)).toContain("profiles/*");+ expect(isCredentialPath(path.join(root, "profiles-other", "owner.json"))).toBe(false);+ });+ it("blocks canonical aliases of an explicitly configured profile directory", async () => {+ const alias = path.join(root, "alias"); await symlink(profiles, alias);+ vi.stubEnv("OS_AGENT_PROFILES_DIR", alias); vi.stubEnv("OS_FS_ALLOW_SENSITIVE", "1");+ expect(isCredentialPath(path.join(profiles, "owner.json"))).toBe(true);+ await expect(resolveReadable(path.join(alias, "owner.json"))).rejects.toThrow(/credential/);+ });+});diff --git a/lib/security-store-path.ts b/lib/security-store-path.tsindex c3735daa..01c8e2cf 100644--- a/lib/security-store-path.ts+++ b/lib/security-store-path.ts@@ -12,10 +12,10 @@ const STORE_ENV = ["OS_A2A_LOCAL_AUTH_STORE", "OS_LOCAL_AGENT_MESSAGE_STORE", "OS_LOCAL_AGENT_PRESENCE_STORE","OS_CONFIG_STORE", "OS_PREFS_PATH", "OS_SKILL_MEMORY_STORE", "MSO_SURFACE_APPS_FILE",] as const;-const DIRECTORY_ENV = ["OS_TOOL_FORGE_DIR", "OS_AGENT_MEMORY_DIR", "OS_AGENT_SESSIONS_DIR", "OS_PROJECT_AGENT_TASKS_DIR"] as const;+const DIRECTORY_ENV = ["OS_TOOL_FORGE_DIR", "OS_AGENT_MEMORY_DIR", "OS_AGENT_SESSIONS_DIR", "OS_PROJECT_AGENT_TASKS_DIR", "OS_AGENT_PROFILES_DIR"] as const;const expand = (value: string) => path.resolve(expandOwnerStorePath(value));-export async function pinSecurityStorePath(storePath: string) {+export async function pinSecurityStorePath(storePath: string, { durable = false }: { durable?: boolean } = {}) {if (process.platform !== "linux") throw new Error("Pinned security-store operations require Linux or WSL");storePath = expandOwnerStorePath(storePath);if (typeof storePath !== "string" || storePath.includes("\0") || !path.isAbsolute(storePath)) throw new Error("Security store needs an absolute path");@@ -29,7 +29,7 @@ export async function pinSecurityStorePath(storePath: string) {...(process.env.VITEST ? [os.tmpdir()] : [])];if (!allowed.some((root) => absolute.startsWith(`${expand(root)}${path.sep}`))) throw new Error("Security store is outside configured owner roots");const parent = path.dirname(absolute);- const directory = await openDirectoryChain(parent);+ const directory = await openDirectoryChain(parent, durable);try {const stat = await directory.stat();if (!stat.isDirectory() || stat.uid !== process.getuid?.() || (stat.mode & 0o022)) throw new Error("Security-store parent must be owned and not writable by others");@@ -45,7 +45,7 @@ export async function pinSecurityStorePath(storePath: string) {// Walk from a stable descriptor, opening one basename at a time with O_NOFOLLOW.// Creating a missing parent must not follow an attacker-controlled intermediate link.-async function openDirectoryChain(parent: string) {+async function openDirectoryChain(parent: string, durable: boolean) {let directory = await fs.open("/", constants.O_RDONLY | constants.O_DIRECTORY);try {const parts = parent.split(path.sep).filter(Boolean);@@ -60,9 +60,13 @@ async function openDirectoryChain(parent: string) {await fs.mkdir(child, { mode: 0o700 }).catch((cause: NodeJS.ErrnoException) => { if (cause.code !== "EEXIST") throw cause; });next = await fs.open(child, constants.O_RDONLY | constants.O_DIRECTORY | constants.O_NOFOLLOW);}- await directory.close();+ try {+ // A prior lock/read may have created this child; flush its parent entry even if it already exists.+ if (durable) await directory.sync();+ await directory.close();+ } catch (error) { await next.close().catch(() => undefined); throw error; }directory = next;}return directory;- } catch (error) { await directory.close(); throw error; }+ } catch (error) { await directory.close().catch(() => undefined); throw error; }}diff --git a/lib/workflow/graph-engine.ts b/lib/workflow/graph-engine.tsindex d0b510fe..93bef464 100644--- a/lib/workflow/graph-engine.ts+++ b/lib/workflow/graph-engine.ts@@ -9,7 +9,7 @@ import { redactText } from "@/lib/security/redact-text";import { graphObject } from "./graph-schema";import { workflowGraphOwner } from "./graph-store";import { compact, executeNode } from "./graph-runtime";-import { lockWorkflowGraphRun, pruneWorkflowGraphRuns, publicWorkflowGraphRun, readWorkflowGraphRun, writeWorkflowGraphRun } from "./graph-run-store";+import { lockWorkflowGraphRun, pruneWorkflowGraphRuns, publicWorkflowGraphRun, readWorkflowGraphRun, readWorkflowGraphScheduleClaim, writeWorkflowGraphRun } from "./graph-run-store";import { workflowSecretValues } from "./variables";const state = globalThis as typeof globalThis & { msoGraphInstance?: string; msoGraphPending?: Map<string, Promise<void>>; msoGraphCancelled?: Set<string> };@@ -77,7 +77,7 @@ export async function startWorkflowGraph(graph: WorkflowGraph, rawInput: unknownconst principal=storagePrincipal??context.principal;if(!principal||!context.sessionId)throw new Error("workflow graph requires an authenticated principal/session");if(ancestry.includes(graph.id)||ancestry.length>=16)throw new Error("recursive workflow subflow detected");if(graph.status==="archived")throw new Error("archived workflow graph cannot run");if(!/^[A-Za-z0-9_.:-]{1,128}$/.test(idempotencyKey))throw new Error("idempotency_key must be 1-128 simple characters");const triggerNodeId=trigger?.nodeId??graph.nodes.find((node)=>node.type==="manual")?.id??graph.nodes.find((node)=>["schedule","webhook","channel_trigger"].includes(node.type))?.id??"";const owner=workflowGraphOwner(principal),input=inputObject(rawInput),fingerprint=hash(canonical({graphId:graph.id,revision:graph.revision,input})),id=workflowGraphRunId(owner,idempotencyKey,graph.id,triggerNodeId);- return lockWorkflowGraphRun(owner,id,async()=>{const legacy=await readWorkflowGraphRun(owner,hash(`${owner}:${idempotencyKey}`).slice(0,32));const existing=await readWorkflowGraphRun(owner,id)??(legacy?.graphId===graph.id&&(legacy.trigger?.nodeId??"")===triggerNodeId?legacy:null);if(existing){await requireWorkflowReceiptAuthority(principal,existing,context.scope);if(existing.fingerprint!==fingerprint)throw new Error("idempotency_key already identifies a different graph/input/revision");return publicWorkflowGraphRun(existing);}const device=principal.startsWith("web:")?await getApprovedDevice(principal.slice(4)):null;if(principal.startsWith("web:")&&(!device||device.role==="viewer"))throw new Error("workflow device is revoked or lacks operator authority");await pruneWorkflowGraphRuns(owner);const run:WorkflowGraphRun={version:1,id,owner,sessionId:context.sessionId!,graphId:graph.id,graphRevision:graph.revision,graphName:graph.name,idempotencyKey,fingerprint,executionScope:context.scope,executionRole:device?.role==="owner"?"owner":device?.role==="operator"?"operator":undefined,state:"running",startedAt:new Date().toISOString(),updatedAt:new Date().toISOString(),pid:process.pid,instance:INSTANCE,nodes:graph.nodes.map((node)=>({id:node.id,name:node.name,type:node.type,state:"queued",logs:[]})),edges:graph.edges.map((edge)=>({id:edge.id,source:edge.source,target:edge.target,...(edge.sourceHandle?{sourceHandle:edge.sourceHandle}:{}),state:edge.disabled?"disabled":"pending"})),trigger:trigger??{type:"manual",nodeId:graph.nodes.find((node)=>node.type==="manual")?.id??graph.nodes.find((node)=>["schedule","webhook","channel_trigger"].includes(node.type))?.id,receivedAt:new Date().toISOString()},ancestry:[...ancestry,graph.id],runtimeInput:structuredClone(input)};await writeWorkflowGraphRun(run);await appendAgentSessionEvent(principal,run.sessionId,{kind:"workflow",tool:"workflow_graph",state:"started",workflowId:graph.id,detail:graph.name}).catch(()=>undefined);const work=execute(run,graph,input,context,resolve).then(()=>maybeRunErrorWorkflow(run,graph,context,resolve,principal)).catch(()=>undefined).finally(()=>{pending.delete(id);cancelled.delete(id);});pending.set(id,work);return publicWorkflowGraphRun(run);});+ return lockWorkflowGraphRun(owner,id,async()=>{const legacy=await readWorkflowGraphRun(owner,hash(`${owner}:${idempotencyKey}`).slice(0,32));const existing=await readWorkflowGraphRun(owner,id)??(legacy?.graphId===graph.id&&(legacy.trigger?.nodeId??"")===triggerNodeId?legacy:null);if(existing){await requireWorkflowReceiptAuthority(principal,existing,context.scope);if(existing.fingerprint!==fingerprint)throw new Error("idempotency_key already identifies a different graph/input/revision");return publicWorkflowGraphRun(existing);}if(await readWorkflowGraphScheduleClaim(owner,id))throw new Error("one-shot schedule intent already committed; receipt unavailable, reconcile before an explicit new run");const device=principal.startsWith("web:")?await getApprovedDevice(principal.slice(4)):null;if(principal.startsWith("web:")&&(!device||device.role==="viewer"))throw new Error("workflow device is revoked or lacks operator authority");await pruneWorkflowGraphRuns(owner);const run:WorkflowGraphRun={version:1,id,owner,sessionId:context.sessionId!,graphId:graph.id,graphRevision:graph.revision,graphName:graph.name,idempotencyKey,fingerprint,executionScope:context.scope,executionRole:device?.role==="owner"?"owner":device?.role==="operator"?"operator":undefined,state:"running",startedAt:new Date().toISOString(),updatedAt:new Date().toISOString(),pid:process.pid,instance:INSTANCE,nodes:graph.nodes.map((node)=>({id:node.id,name:node.name,type:node.type,state:"queued",logs:[]})),edges:graph.edges.map((edge)=>({id:edge.id,source:edge.source,target:edge.target,...(edge.sourceHandle?{sourceHandle:edge.sourceHandle}:{}),state:edge.disabled?"disabled":"pending"})),trigger:trigger??{type:"manual",nodeId:graph.nodes.find((node)=>node.type==="manual")?.id??graph.nodes.find((node)=>["schedule","webhook","channel_trigger"].includes(node.type))?.id,receivedAt:new Date().toISOString()},ancestry:[...ancestry,graph.id],runtimeInput:structuredClone(input)};await writeWorkflowGraphRun(run);await appendAgentSessionEvent(principal,run.sessionId,{kind:"workflow",tool:"workflow_graph",state:"started",workflowId:graph.id,detail:graph.name}).catch(()=>undefined);const work=execute(run,graph,input,context,resolve).then(()=>maybeRunErrorWorkflow(run,graph,context,resolve,principal)).catch(()=>undefined).finally(()=>{pending.delete(id);cancelled.delete(id);});pending.set(id,work);return publicWorkflowGraphRun(run);});}export async function workflowGraphRunStatus(principal:string,id:string,waitMs=0,scope:CapabilityRunContext["scope"]="exec"){if(!Number.isSafeInteger(waitMs)||waitMs<0||waitMs>25_000)throw new Error("wait_ms must be 0-25000");diff --git a/lib/workflow/graph-run-store.ts b/lib/workflow/graph-run-store.tsindex 5da19d25..f04e36e6 100644--- a/lib/workflow/graph-run-store.ts+++ b/lib/workflow/graph-run-store.ts@@ -2,6 +2,7 @@ import path from "node:path";import { agentSessionsDir } from "@/lib/agent/session-paths";import { withSecurityStoreLock } from "@/lib/security-store-lock";import type { WorkflowGraphRun } from "@/lib/contracts/workflow-graph";+import { normalizeWorkflowRunAt } from "@/lib/contracts/workflow-schedule";import { listWorkflowFiles, readWorkflowJson, removeWorkflowFile, workflowFileMtime, writeWorkflowFile } from "./private-file";@@ -25,9 +26,42 @@ export async function readWorkflowGraphRun(owner: string, id: string): Promise<W}}+export type WorkflowScheduleClaim = {+ version: 1; owner: string; id: string; graphId: string; nodeId: string; scheduledAt: string;+ committedAt: string; updatedAt: string; phase: "intent_committed" | "run_finished"; runState: WorkflowGraphRun["state"];+};++export async function readWorkflowGraphScheduleClaim(owner: string, id: string): Promise<WorkflowScheduleClaim | null> {+ try {+ const claim = await readWorkflowJson(`${file(owner, id)}.schedule-claim`, 4096, "workflow schedule claim") as WorkflowScheduleClaim;+ if (claim.version !== 1 || claim.owner !== owner || claim.id !== id || typeof claim.graphId !== "string" || typeof claim.nodeId !== "string" || !["intent_committed", "run_finished"].includes(claim.phase)) throw new Error("invalid workflow schedule claim");+ normalizeWorkflowRunAt(claim.scheduledAt);+ return claim;+ } catch (error) {+ if ((error as NodeJS.ErrnoException).code === "ENOENT") return null;+ throw error;+ }+}++async function recordScheduleClaim(run: WorkflowGraphRun): Promise<void> {+ if (run.trigger?.type !== "schedule" || run.trigger.scheduleMode !== "runAt") return;+ if (!run.trigger.nodeId) throw new Error("one-shot schedule requires a trigger node");+ const scheduledAt = normalizeWorkflowRunAt(run.trigger.scheduledAt), existing = await readWorkflowGraphScheduleClaim(run.owner, run.id);+ if (existing && (existing.graphId !== run.graphId || existing.nodeId !== run.trigger.nodeId || existing.scheduledAt !== scheduledAt)) throw new Error("workflow schedule claim identity changed");+ if (existing && run.state === "running") return;+ const claim: WorkflowScheduleClaim = {+ version: 1, owner: run.owner, id: run.id, graphId: run.graphId, nodeId: run.trigger.nodeId, scheduledAt,+ committedAt: existing?.committedAt ?? run.startedAt, updatedAt: run.updatedAt,+ phase: run.state === "running" ? "intent_committed" : "run_finished", runState: run.state,+ };+ await writeWorkflowFile(`${file(run.owner, run.id)}.schedule-claim`, JSON.stringify(claim), { durable: true });+}+export async function writeWorkflowGraphRun(run: WorkflowGraphRun): Promise<void> {const body = JSON.stringify(run);if (Buffer.byteLength(body) > MAX_RUN_BYTES) throw new Error("workflow graph run receipt exceeds 1 MiB");+ // Retain the committed intent before dispatch, even when receipt retention removes the detailed run.+ await recordScheduleClaim(run);await writeWorkflowFile(file(run.owner, run.id), body);}diff --git a/lib/workflow/graph-schema.test.ts b/lib/workflow/graph-schema.test.tsindex 2044bd82..58a0cab9 100644--- a/lib/workflow/graph-schema.test.ts+++ b/lib/workflow/graph-schema.test.ts@@ -11,6 +11,15 @@ const base = () => ({describe("workflow graph schema", () => {it("accepts a bounded acyclic metadata-only graph", () => expect(parseWorkflowGraphDefinition(base()).nodes).toHaveLength(2));+ it("preserves a valid offset schedule and rejects invalid schedules before save", () => {+ const config = { mode: "runAt", runAt: "2026-10-19T09:00:30+07:00", missedPolicy: "run_once" };+ const definition = { ...base(), nodes: [{ ...base().nodes[0], type: "schedule", config }, base().nodes[1]] };+ expect(parseWorkflowGraphDefinition(definition).nodes[0].config).toEqual(config);+ for (const invalid of [{ ...config, runAt: "2026-10-19T09:00:30" }, { ...config, mode: "once" }, { ...config, missedPolicy: "skip" }, { ...config, timezone: "Mars/Olympus" }]) {+ expect(() => parseWorkflowGraphDefinition({ ...definition, nodes: [{ ...definition.nodes[0], config: invalid }, definition.nodes[1]] })).toThrow();+ }+ expect(() => parseWorkflowGraphDefinition({ ...definition, metadata: { timezone: "Mars/Olympus" } })).toThrow(/timezone/);+ });it("rejects cycles", () => expect(() => parseWorkflowGraphDefinition({ ...base(), nodes: [{ id: "a", name: "A", type: "tool", position: { x: 0, y: 0 }, config: { tool: "x" } }, { id: "b", name: "B", type: "output", position: { x: 200, y: 0 }, config: {} }], edges: [{ id: "e1", source: "a", target: "b" }, { id: "e2", source: "b", target: "a" }] })).toThrow("cycle"));it("rejects secret-like config fields recursively", () => expect(() => parseWorkflowGraphDefinition({ ...base(), nodes: [{ id: "start", name: "Start", type: "tool", position: { x: 0, y: 0 }, config: { nested: { accessToken: "x" } } }, base().nodes[1]] })).toThrow("secret_input_forbidden"));diff --git a/lib/workflow/graph-schema.ts b/lib/workflow/graph-schema.tsindex 9cbc7f3a..66a2570f 100644--- a/lib/workflow/graph-schema.ts+++ b/lib/workflow/graph-schema.ts@@ -1,4 +1,5 @@import { parseGraphCustomNodes } from "@/lib/contracts/graph-custom-nodes";+import { validateWorkflowSchedule, validateWorkflowTimezone } from "@/lib/contracts/workflow-schedule";import { WORKFLOW_GRAPH_NODE_TYPES, type WorkflowGraphEdge, type WorkflowGraphMetadata, type WorkflowGraphNode, type WorkflowGraphStatus } from "@/lib/contracts/workflow-graph";const ID = /^[A-Za-z0-9][A-Za-z0-9_.:-]{0,95}$/;@@ -49,6 +50,7 @@ function parseNode(value: unknown): WorkflowGraphNode {if (typeof value.type !== "string" || !NODE_TYPES.has(value.type)) throw new Error("invalid workflow node type");if (!graphObject(value.config)) throw new Error("workflow node config must be an object");assertWorkflowMetadataOnly(value.config);+ if (value.type === "schedule") validateWorkflowSchedule(value.config);if (value.disabled !== undefined && typeof value.disabled !== "boolean") throw new Error("invalid workflow node disabled flag");return { id: value.id, name: value.name, type: value.type as WorkflowGraphNode["type"], position: safePosition(value.position), config: structuredClone(value.config), ...(value.disabled ? { disabled: true } : {}) };}@@ -86,6 +88,7 @@ function parseMetadata(value: unknown, nodeIds: ReadonlySet<string>): WorkflowGrif (!graphObject(value)) throw new Error("workflow metadata must be an object");assertWorkflowMetadataOnly(value);const out: WorkflowGraphMetadata = {};+ if (value.timezone !== undefined) validateWorkflowTimezone(value.timezone);if (value.customNodes !== undefined) out.customNodes = parseGraphCustomNodes(value.customNodes, nodeIds);for (const key of ["intent", "normalizedIntent", "project", "fingerprint", "folder", "errorWorkflowId", "timezone"] as const) if (typeof value[key] === "string" && value[key]) out[key] = String(value[key]).slice(0, 1000);if (["user", "learned-from-session", "clone", "import", "template", "ai-assisted"].includes(String(value.provenance))) out.provenance = value.provenance as WorkflowGraphMetadata["provenance"];diff --git a/lib/workflow/graph-triggers.ts b/lib/workflow/graph-triggers.tsindex add03538..3c9af204 100644--- a/lib/workflow/graph-triggers.ts+++ b/lib/workflow/graph-triggers.ts@@ -6,20 +6,45 @@ import type { CapabilityRuntime } from "@/lib/capabilities/runtime";import { listWorkflowGraphTriggerSources } from "./graph-store";import { scheduleBucket } from "./schedule";import { startWorkflowGraph, workflowGraphRunId } from "./graph-engine";-import { readWorkflowGraphRun } from "./graph-run-store";+import { readWorkflowGraphRun, readWorkflowGraphScheduleClaim } from "./graph-run-store";import { getApprovedDevice } from "@/lib/auth/device-store";-const g=globalThis as typeof globalThis&{__msoWorkflowScheduler?:ReturnType<typeof setInterval>;__msoWorkflowSchedulerBusy?:boolean};-function key(parts:string[]){return `trigger:${createHash("sha256").update(parts.join(":" )).digest("hex").slice(0,48)}`;}-type Resolver=(name:string)=>CapabilityTool|undefined;-async function runScheduled(principal:string,owner:string,graph:Awaited<ReturnType<typeof listWorkflowGraphTriggerSources>>[number]["graph"],node:WorkflowGraphNode,bucket:string,resolve:Resolver,capabilities?:CapabilityRuntime){- const idempotency=key([graph.id,node.id,bucket]);if(await readWorkflowGraphRun(owner,workflowGraphRunId(owner,idempotency,graph.id,node.id)))return;- const session=await createAgentSession(principal,"cli",{title:`Schedule: ${graph.name}`,titleSource:"auto"});- const context={principal,actor:principal,sessionId:session.id,scope:"exec" as const,...(capabilities?{capabilities}:{})};- await startWorkflowGraph(graph,{trigger:{type:"schedule",nodeId:node.id,bucket,at:new Date().toISOString()}},idempotency,context,resolve,principal,{type:"schedule",nodeId:node.id,receivedAt:new Date().toISOString()});+const g = globalThis as typeof globalThis & { __msoWorkflowScheduler?: ReturnType<typeof setInterval>; __msoWorkflowSchedulerBusy?: boolean };+function key(parts: string[]) { return `trigger:${createHash("sha256").update(parts.join(":")).digest("hex").slice(0, 48)}`; }+type Resolver = (name: string) => CapabilityTool | undefined;++async function runScheduled(principal: string, owner: string, graph: Awaited<ReturnType<typeof listWorkflowGraphTriggerSources>>[number]["graph"], node: WorkflowGraphNode, bucket: string, now: Date, resolve: Resolver, capabilities?: CapabilityRuntime) {+ const idempotency = key([graph.id, node.id, bucket]), id = workflowGraphRunId(owner, idempotency, graph.id, node.id);+ if (await readWorkflowGraphRun(owner, id) || await readWorkflowGraphScheduleClaim(owner, id)) return false;+ const device = principal.startsWith("web:") ? await getApprovedDevice(principal.slice(4)) : null;+ if (!device || device.role === "viewer") return false;+ const mode = node.config.mode === "runAt" ? "runAt" as const : node.config.mode === "cron" ? "cron" as const : "interval" as const;+ const scheduledAt = mode === "runAt" ? bucket.slice("runAt:".length) : new Date(Math.floor(now.getTime() / 60000) * 60000).toISOString();+ const session = await createAgentSession(principal, "cli", { title: `Schedule: ${graph.name}`, titleSource: "auto" });+ const context = { principal, actor: principal, sessionId: session.id, scope: "exec" as const, ...(capabilities ? { capabilities } : {}) };+ await startWorkflowGraph(graph, { trigger: { type: "schedule", nodeId: node.id, bucket, at: scheduledAt } }, idempotency, context, resolve, principal, { type: "schedule", nodeId: node.id, receivedAt: now.toISOString(), scheduleMode: mode, scheduledAt });+ return true;+}++export async function tickWorkflowScheduler(resolve: Resolver, now = new Date(), capabilities?: CapabilityRuntime) {+ if (g.__msoWorkflowSchedulerBusy) return;+ g.__msoWorkflowSchedulerBusy = true;+ try {+ const sources = await listWorkflowGraphTriggerSources(); let started = 0;+ for (const source of sources) for (const node of source.graph.nodes.filter(row => row.type === "schedule" && !row.disabled)) {+ if (started >= 50) return;+ let bucket: string | null = null;+ try { bucket = scheduleBucket(node, now, source.graph.metadata.timezone || "UTC"); } catch { continue; }+ if (bucket && await runScheduled(source.principal, source.owner, source.graph, node, bucket, now, resolve, capabilities).catch(() => false)) started += 1;+ }+ } finally { g.__msoWorkflowSchedulerBusy = false; }+}+export function startWorkflowScheduler(resolve: Resolver, capabilities?: CapabilityRuntime) {+ if (process.env.NODE_ENV === "test" || g.__msoWorkflowScheduler) return;+ void tickWorkflowScheduler(resolve, new Date(), capabilities);+ g.__msoWorkflowScheduler = setInterval(() => void tickWorkflowScheduler(resolve, new Date(), capabilities), 15_000);+ g.__msoWorkflowScheduler.unref();}-export async function tickWorkflowScheduler(resolve:Resolver,now=new Date(),capabilities?:CapabilityRuntime){if(g.__msoWorkflowSchedulerBusy)return;g.__msoWorkflowSchedulerBusy=true;try{const sources=await listWorkflowGraphTriggerSources();let started=0;for(const source of sources){for(const node of source.graph.nodes.filter((row)=>row.type==="schedule"&&!row.disabled)){if(started>=50)return;let bucket:string|null=null;try{bucket=scheduleBucket(node,now,source.graph.metadata.timezone||"UTC");}catch{continue;}if(!bucket)continue;await runScheduled(source.principal,source.owner,source.graph,node,bucket,resolve,capabilities).catch(()=>undefined);started+=1;}}}finally{g.__msoWorkflowSchedulerBusy=false;}}-export function startWorkflowScheduler(resolve:Resolver,capabilities?:CapabilityRuntime){if(process.env.NODE_ENV==="test"||g.__msoWorkflowScheduler)return;void tickWorkflowScheduler(resolve,new Date(),capabilities);g.__msoWorkflowScheduler=setInterval(()=>void tickWorkflowScheduler(resolve,new Date(),capabilities),15_000);g.__msoWorkflowScheduler.unref();}export async function findActiveWebhookSource(graphId:string,nodeId:string){for(const source of await listWorkflowGraphTriggerSources()){if(source.graph.id!==graphId)continue;const node=source.graph.nodes.find((row)=>row.id===nodeId&&row.type==="webhook"&&!row.disabled);if(node)return{...source,node};}return null;}type ChannelBinding = { owner: string; nodeId: string; revision: string };diff --git a/lib/workflow/node-catalog.ts b/lib/workflow/node-catalog.tsindex 9d2b4a8c..5cb8a372 100644--- a/lib/workflow/node-catalog.ts+++ b/lib/workflow/node-catalog.ts@@ -2,7 +2,7 @@ import type { WorkflowGraphNodeType } from "@/lib/contracts/workflow-graph";export type WorkflowNodeCatalogItem={type:WorkflowGraphNodeType;title:string;category:string;description:string;handles?:string[];defaults:Record<string,unknown>};export const WORKFLOW_NODE_CATALOG:WorkflowNodeCatalogItem[]=[{type:"manual",title:"Manual Trigger",category:"Triggers",description:"Start from UI, CLI or MCP.",defaults:{}},- {type:"schedule",title:"Schedule Trigger",category:"Triggers",description:"Run by cron or minute interval on the MSO server.",defaults:{mode:"interval",everyMinutes:60}},+ {type:"schedule",title:"Schedule Trigger",category:"Triggers",description:"Run once at a date and time, or by cron or minute interval on the MSO server.",defaults:{mode:"interval",everyMinutes:60}},{type:"webhook",title:"Webhook Trigger",category:"Triggers",description:"Public HTTP trigger with optional private-variable bearer auth.",defaults:{methods:["POST"],responseMode:"onReceived"}},{type:"channel_trigger",title:"Channel Trigger",category:"Triggers",description:"Start from a verified MSO Channel inbound event. Bind a Channel ID from the Channels app.",defaults:{channelId:""}},{type:"condition",title:"If",category:"Flow",description:"Route to true/false handles.",handles:["true","false"],defaults:{path:"input"}},diff --git a/lib/workflow/private-file-durable.test.ts b/lib/workflow/private-file-durable.test.tsnew file mode 100644index 00000000..68e8d4d2--- /dev/null+++ b/lib/workflow/private-file-durable.test.ts@@ -0,0 +1,64 @@+import { promises as fs } from "node:fs";+import os from "node:os";+import path from "node:path";+import { afterEach, describe, expect, it, vi } from "vitest";+import { pinSecurityStorePath } from "@/lib/security-store-path";+import { writeWorkflowFile } from "./private-file";++const roots: string[] = [];+async function fixture() {+ const root = await fs.mkdtemp(path.join(os.tmpdir(), "mso-workflow-durable-")); roots.push(root);+ const target = path.join(root, "cold", "owner", "run.json.schedule-claim");+ // The run lock can create the directory chain before the claim writer opens it.+ const pinned = await pinSecurityStorePath(target); await pinned.directory.close();+ return { root, target, folder: path.dirname(target) };+}+afterEach(async () => { vi.restoreAllMocks(); for (const root of roots.splice(0)) await fs.rm(root, { recursive: true, force: true }); });++describe("durable workflow intent writes", () => {+ it("awaits existing ancestor syncs, file sync before rename, and pinned directory sync after rename", async () => {+ const { target, folder } = await fixture(), events: string[] = [];+ const open = fs.open.bind(fs), rename = fs.rename.bind(fs); let temporary = "";+ vi.spyOn(fs, "open").mockImplementation(async (...args) => {+ const handle = await open(...args), name = await fs.realpath(`/proc/self/fd/${handle.fd}`), sync = handle.sync.bind(handle);+ if (name.endsWith(".tmp")) temporary = name;+ vi.spyOn(handle, "sync").mockImplementation(async () => { await sync(); events.push(`synced:${name}`); });+ return handle;+ });+ vi.spyOn(fs, "rename").mockImplementation(async (...args) => { events.push("rename:start"); await rename(...args); events.push("rename:done"); });+ await writeWorkflowFile(target, '{"phase":"intent_committed"}', { durable: true }); events.push("returned");+ const ancestors: string[] = [];+ for (let parent = path.dirname(folder);; parent = path.dirname(parent)) { ancestors.unshift(parent); if (parent === path.parse(parent).root) break; }+ expect(temporary).toContain(".schedule-claim.");+ expect(events).toEqual([...ancestors.map(name => `synced:${name}`), `synced:${temporary}`, "rename:start", "rename:done", `synced:${folder}`, "returned"]);+ expect(await fs.readFile(target, "utf8")).toBe('{"phase":"intent_committed"}');+ expect(await fs.readdir(folder)).toEqual([path.basename(target)]);+ });+ it.each(["ancestor", "file", "directory"] as const)("fails closed and closes pinned descriptors on %s sync failure", async (stage) => {+ const { target, folder } = await fixture(), open = fs.open.bind(fs), handles: Awaited<ReturnType<typeof fs.open>>[] = [];+ const failure = Object.assign(new Error("fixture filesystem cannot sync"), { code: "EINVAL" }); let failures = 0;+ vi.spyOn(fs, "open").mockImplementation(async (...args) => {+ const handle = await open(...args), name = await fs.realpath(`/proc/self/fd/${handle.fd}`); handles.push(handle);+ const selected = stage === "ancestor" ? name === path.dirname(folder) : stage === "directory" ? name === folder : name.endsWith(".tmp");+ if (selected) vi.spyOn(handle, "sync").mockImplementation(async () => { failures += 1; throw failure; });+ return handle;+ });+ const write = writeWorkflowFile(target, "intent", { durable: true });+ if (stage === "directory") await expect(write).rejects.toMatchObject({ message: "workflow file commit uncertain; reconcile before retrying", cause: failure });+ else await expect(write).rejects.toBe(failure);+ expect(failures).toBe(1); expect(handles.every(handle => handle.fd === -1)).toBe(true);+ if (stage === "directory") expect(await fs.readFile(target, "utf8")).toBe("intent");+ else await expect(fs.stat(target)).rejects.toMatchObject({ code: "ENOENT" });+ expect((await fs.readdir(folder)).some(name => name.endsWith(".tmp"))).toBe(false);+ });+ it("keeps durable syncing opt-in for ordinary workflow writes", async () => {+ const { target } = await fixture(), open = fs.open.bind(fs); let syncs = 0;+ vi.spyOn(fs, "open").mockImplementation(async (...args) => {+ const handle = await open(...args);+ vi.spyOn(handle, "sync").mockImplementation(async () => { syncs += 1; throw new Error("unexpected durable operation"); });+ return handle;+ });+ await writeWorkflowFile(target, "receipt");+ expect(syncs).toBe(0); expect(await fs.readFile(target, "utf8")).toBe("receipt");+ });+});diff --git a/lib/workflow/private-file.ts b/lib/workflow/private-file.tsindex 118840d0..9a051265 100644--- a/lib/workflow/private-file.ts+++ b/lib/workflow/private-file.ts@@ -40,20 +40,27 @@ export async function readWorkflowJson(file: string, maximumBytes: number, label}/** Preserve the existing atomic JSON format; never chmod or reopen a renamed pathname. */-export async function writeWorkflowFile(file: string, body: string): Promise<void> {- const pinned = await pinSecurityStorePath(file);+export async function writeWorkflowFile(file: string, body: string, { durable = false }: { durable?: boolean } = {}): Promise<void> {+ const pinned = await pinSecurityStorePath(file, { durable });const temporary = `${pinned.file}.${randomUUID()}.tmp`;let handle: Awaited<ReturnType<typeof fs.open>> | undefined;+ let renamed = false;try {await pinned.directory.chmod(0o700);handle = await fs.open(temporary, constants.O_WRONLY | constants.O_CREAT | constants.O_EXCL | constants.O_NOFOLLOW, 0o600);await handle.writeFile(body, "utf8");+ if (durable) await handle.sync();await handle.close(); handle = undefined;await fs.rename(temporary, pinned.file);+ renamed = true;+ if (durable) await pinned.directory.sync();+ } catch (error) {+ if (durable && renamed) throw new Error("workflow file commit uncertain; reconcile before retrying", { cause: error });+ throw error;} finally {- await handle?.close();+ await handle?.close().catch(() => undefined);await fs.unlink(temporary).catch(() => undefined);- await pinned.directory.close();+ await pinned.directory.close().catch(() => undefined);}}diff --git a/lib/workflow/schedule-runtime.test.ts b/lib/workflow/schedule-runtime.test.tsnew file mode 100644index 00000000..86b52e44--- /dev/null+++ b/lib/workflow/schedule-runtime.test.ts@@ -0,0 +1,152 @@+import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";+import { mkdtemp, readdir, readFile, rm, utimes, writeFile } from "node:fs/promises";+import { promises as fs } from "node:fs";+import os from "node:os";+import path from "node:path";+import type { CapabilityTool } from "@/lib/capabilities/tool";+import type { WorkflowGraph } from "@/lib/contracts/workflow-graph";++const mocks = vi.hoisted(() => ({ device: vi.fn(), run: vi.fn() }));+vi.mock("@/lib/auth/device-store", () => ({ getApprovedDevice: mocks.device }));+vi.mock("@/lib/capabilities/execute", () => ({ executeCapabilityCall: async ({ tool, args, context }: { tool: CapabilityTool; args: Record<string, unknown>; context: never }) => {+ try { return { kind: "success", result: await tool.run(args, context) }; } catch (error) { return { kind: "error", message: String(error) }; }+} }));+const principal = "web:aaaaaaaaaaaaaaaa", due = new Date("2026-10-19T02:00:30Z");+let dir: string;+const tool: CapabilityTool = { name: "fixture_schedule", scope: "read", description: "fixture", inputSchema: { type: "object", properties: {} }, run: mocks.run };+const resolve = (name: string) => name === tool.name ? tool : undefined;++beforeEach(async () => {+ dir = await mkdtemp(path.join(os.tmpdir(), "mso-schedule-"));+ vi.stubEnv("OS_AGENT_SESSIONS_DIR", dir); vi.stubEnv("OS_MCP_MAX_SCOPE", "exec");+ mocks.device.mockReset().mockResolvedValue({ role: "owner" }); mocks.run.mockReset().mockResolvedValue({ ok: true });+});+afterEach(async () => { vi.restoreAllMocks(); vi.unstubAllEnvs(); await rm(dir, { recursive: true, force: true }); });++async function graph(status = "active", disabled = false): Promise<WorkflowGraph> {+ const { createWorkflowGraph } = await import("./graph-store");+ return createWorkflowGraph(principal, { name: "Once", description: "", status, inputs: {}, metadata: {}, nodes: [+ { id: "schedule", name: "Once", type: "schedule", disabled, position: { x: 0, y: 0 }, config: { mode: "runAt", runAt: "2026-10-19T09:00:30+07:00", missedPolicy: "run_once" } },+ { id: "action", name: "Count", type: "tool", position: { x: 100, y: 0 }, config: { tool: tool.name, arguments: {} } },+ ], edges: [{ id: "edge", source: "schedule", target: "action" }] });+}+async function runs() {+ const { workflowGraphOwner } = await import("./graph-store"), { listWorkflowGraphRuns } = await import("./graph-run-store");+ return listWorkflowGraphRuns(workflowGraphOwner(principal));+}+async function finish() {+ const { workflowGraphRunStatus } = await import("./graph-engine");+ const rows = await runs(); expect(rows.total).toBe(1);+ const done = await workflowGraphRunStatus(principal, rows.runs[0].id, 5000);+ expect(done.state).toBe("completed"); return done;+}++describe("persisted one-shot schedule execution", () => {+ it.each([+ { mode: "cron", config: { mode: "cron", everyMinutes: 60, cron: "30 9 * * *", timezone: "Asia/Jakarta" }, before: "2026-10-19T02:00:30Z", at: "2026-10-19T02:30:30Z", invalid: { cron: "not cron" } },+ { mode: "interval", config: { mode: "interval", everyMinutes: 60, cron: "30 9 * * *", timezone: "Asia/Jakarta" }, before: "2026-10-19T02:30:30Z", at: "2026-10-19T03:00:30Z", invalid: { everyMinutes: 0 } },+ ])("loads baseline UI-shaped $mode records and executes only the selected mode", async ({ mode, config, before, at, invalid }) => {+ const saved = await graph(); await graph("draft");+ const { workflowGraphOwner } = await import("./graph-store");+ const target = path.join(dir, ".workflow-graphs", workflowGraphOwner(principal), "graphs.json");+ const stored = JSON.parse(await readFile(target, "utf8"));+ stored.graphs.find((row: WorkflowGraph) => row.id === saved.id).nodes[0].config = config;+ await writeFile(target, JSON.stringify(stored), { mode: 0o600 }); vi.resetModules();+ const { listWorkflowGraphs, createWorkflowGraph } = await import("./graph-store");+ const loaded = await listWorkflowGraphs(principal); expect(loaded).toHaveLength(2);+ const current = loaded.find(row => row.id === saved.id)!; expect(current.nodes[0].config).toEqual(config);+ const { tickWorkflowScheduler } = await import("./graph-triggers");+ await tickWorkflowScheduler(resolve, new Date(before)); expect((await runs()).total).toBe(0);+ await tickWorkflowScheduler(resolve, new Date(at)); expect((await finish()).trigger).toMatchObject({ scheduleMode: mode });+ expect(mocks.run).toHaveBeenCalledTimes(1);+ const invalidNode = { ...current.nodes[0], config: { ...config, ...invalid } };+ await expect(createWorkflowGraph(principal, { ...current, id: undefined, nodes: [invalidNode, current.nodes[1]] })).rejects.toThrow();+ const { scheduleBucket } = await import("./schedule");+ expect(() => scheduleBucket(invalidNode, new Date(at))).toThrow();+ });+ it("dispatches once across concurrent ticks, late ticks, module reload and receipt deletion", async () => {+ await graph(); const { tickWorkflowScheduler } = await import("./graph-triggers");+ await tickWorkflowScheduler(resolve, new Date(due.getTime() - 1)); expect((await runs()).total).toBe(0);+ await Promise.all(Array.from({ length: 8 }, () => tickWorkflowScheduler(resolve, due)));+ const done = await finish(); expect(mocks.run).toHaveBeenCalledTimes(1);+ expect(done.trigger).toMatchObject({ type: "schedule", scheduleMode: "runAt", scheduledAt: due.toISOString() });+ vi.resetModules(); const { tickWorkflowScheduler: restarted } = await import("./graph-triggers");+ await restarted(resolve, new Date("2026-11-20T00:00:00Z")); expect((await runs()).total).toBe(1);+ const { workflowGraphOwner } = await import("./graph-store");+ const { deleteWorkflowGraphRun, readWorkflowGraphScheduleClaim } = await import("./graph-run-store");+ await deleteWorkflowGraphRun(workflowGraphOwner(principal), done.id);+ expect(await readWorkflowGraphScheduleClaim(workflowGraphOwner(principal), done.id)).toMatchObject({ phase: "run_finished", runState: "completed" });+ await restarted(resolve, due); expect((await runs()).total).toBe(0); expect(mocks.run).toHaveBeenCalledTimes(1);+ });+ it("catches up once when the first available tick is late", async () => {+ await graph(); const { tickWorkflowScheduler } = await import("./graph-triggers");+ const late = new Date("2026-11-01T00:00:00Z"); await tickWorkflowScheduler(resolve, late);+ const done = await finish();+ expect(done.trigger).toMatchObject({ scheduledAt: due.toISOString(), receivedAt: late.toISOString() });+ expect(mocks.run).toHaveBeenCalledTimes(1);+ });+ it("retains the one-shot identity when old detailed receipts are pruned", async () => {+ await graph(); const { tickWorkflowScheduler } = await import("./graph-triggers");+ await tickWorkflowScheduler(resolve, due); const done = await finish();+ const { workflowGraphOwner } = await import("./graph-store"), owner = workflowGraphOwner(principal);+ const folder = path.join(dir, ".workflow-graph-runs", owner);+ await utimes(path.join(folder, `${done.id}.json`), new Date(0), new Date(0));+ await Promise.all(Array.from({ length: 1000 }, (_, index) => writeFile(path.join(folder, `${(index + 1).toString(16).padStart(32, "0")}.json`), "{}", { mode: 0o600 })));+ const { pruneWorkflowGraphRuns, readWorkflowGraphRun, readWorkflowGraphScheduleClaim } = await import("./graph-run-store");+ await pruneWorkflowGraphRuns(owner); expect(await readWorkflowGraphRun(owner, done.id)).toBeNull();+ expect(await readWorkflowGraphScheduleClaim(owner, done.id)).toMatchObject({ phase: "run_finished" });+ await tickWorkflowScheduler(resolve, due); expect(mocks.run).toHaveBeenCalledTimes(1);+ });+ it("does not dispatch or retry an intent whose initial receipt write failed", async () => {+ await graph(); const privateFile = await import("./private-file"), write = privateFile.writeWorkflowFile;+ vi.spyOn(privateFile, "writeWorkflowFile").mockImplementation(async (target, body, options) => {+ if (target.includes(".workflow-graph-runs") && target.endsWith(".json")) throw new Error("fixture disk full after intent");+ await write(target, body, options);+ });+ const { tickWorkflowScheduler } = await import("./graph-triggers"); await tickWorkflowScheduler(resolve, due);+ const { workflowGraphOwner } = await import("./graph-store"), owner = workflowGraphOwner(principal);+ const files = await readdir(path.join(dir, ".workflow-graph-runs", owner)), marker = files.find(name => name.endsWith(".schedule-claim"));+ expect(marker).toBeTruthy(); const { readWorkflowGraphScheduleClaim } = await import("./graph-run-store");+ expect(await readWorkflowGraphScheduleClaim(owner, marker!.slice(0, 32))).toMatchObject({ phase: "intent_committed", runState: "running" });+ vi.restoreAllMocks(); vi.resetModules(); await (await import("./graph-triggers")).tickWorkflowScheduler(resolve, due);+ expect((await runs()).total).toBe(0); expect(mocks.run).not.toHaveBeenCalled();+ });+ it.each(["ancestor", "file", "directory"] as const)("blocks dispatch when the intent %s sync fails", async (stage) => {+ await graph(); const { workflowGraphOwner } = await import("./graph-store"), owner = workflowGraphOwner(principal);+ const folder = path.join(dir, ".workflow-graph-runs", owner), open = fs.open.bind(fs); let failures = 0;+ vi.spyOn(fs, "open").mockImplementation(async (...args) => {+ const handle = await open(...args), name = await fs.realpath(`/proc/self/fd/${handle.fd}`);+ const selected = stage === "ancestor" ? name === path.dirname(folder) : stage === "directory" ? name === folder : name.includes(".schedule-claim.") && name.endsWith(".tmp");+ if (selected) vi.spyOn(handle, "sync").mockImplementation(async () => { failures += 1; throw Object.assign(new Error("fixture sync failure"), { code: "EIO" }); });+ return handle;+ });+ await (await import("./graph-triggers")).tickWorkflowScheduler(resolve, due);+ expect(failures).toBe(1); expect(mocks.run).not.toHaveBeenCalled(); expect((await runs()).total).toBe(0);+ const files = await readdir(folder), claims = files.filter(name => name.endsWith(".schedule-claim"));+ expect(files.some(name => name.endsWith(".tmp"))).toBe(false);+ expect(claims).toHaveLength(stage === "directory" ? 1 : 0);+ if (stage === "directory") {+ const { readWorkflowGraphScheduleClaim } = await import("./graph-run-store");+ expect(await readWorkflowGraphScheduleClaim(owner, claims[0].slice(0, 32))).toMatchObject({ phase: "intent_committed", runState: "running" });+ }+ vi.restoreAllMocks(); vi.resetModules(); await (await import("./graph-triggers")).tickWorkflowScheduler(resolve, due);+ if (stage === "directory") { expect((await runs()).total).toBe(0); expect(mocks.run).not.toHaveBeenCalled(); }+ else { await finish(); expect(mocks.run).toHaveBeenCalledTimes(1); }+ });+ it("uses the existing atomic run guard for concurrent dispatch and refuses replay after receipt deletion", async () => {+ const saved = await graph(), { startWorkflowGraph, workflowGraphRunStatus } = await import("./graph-engine");+ const context = { principal, actor: principal, sessionId: "fixture", scope: "exec" as const };+ const trigger = { type: "schedule" as const, nodeId: "schedule", receivedAt: due.toISOString(), scheduleMode: "runAt" as const, scheduledAt: due.toISOString() };+ const attempts = await Promise.all(Array.from({ length: 6 }, () => startWorkflowGraph(saved, { scheduledAt: due.toISOString() }, "same-instant", context, resolve, principal, trigger)));+ expect(new Set(attempts.map(run => run.id)).size).toBe(1);+ await workflowGraphRunStatus(principal, attempts[0].id, 5000); expect(mocks.run).toHaveBeenCalledTimes(1);+ const { workflowGraphOwner } = await import("./graph-store"), { deleteWorkflowGraphRun } = await import("./graph-run-store");+ await deleteWorkflowGraphRun(workflowGraphOwner(principal), attempts[0].id);+ await expect(startWorkflowGraph(saved, { scheduledAt: due.toISOString() }, "same-instant", context, resolve, principal, trigger)).rejects.toThrow("intent already committed");+ });+ it("does not run drafts, disabled triggers or revoked owners", async () => {+ await graph("draft"); await graph("active", true); await graph(); mocks.device.mockResolvedValue(null);+ await (await import("./graph-triggers")).tickWorkflowScheduler(resolve, due);+ expect((await runs()).total).toBe(0); expect(mocks.run).not.toHaveBeenCalled();+ });+});diff --git a/lib/workflow/schedule.test.ts b/lib/workflow/schedule.test.tsindex ac5633f3..3dc4d1dd 100644--- a/lib/workflow/schedule.test.ts+++ b/lib/workflow/schedule.test.ts@@ -6,4 +6,26 @@ describe("workflow schedule",()=>{it("matches deterministic minute intervals",()=>{const now=new Date("2026-09-15T05:30:00Z");expect(scheduleBucket(node({mode:"interval",everyMinutes:15}),now,"UTC")).toBeTruthy();expect(scheduleBucket(node({mode:"interval",everyMinutes:7}),now,"UTC")).toBeNull();});it("matches five-field cron in the configured timezone",()=>{const now=new Date("2026-09-15T05:30:00Z");expect(scheduleBucket(node({mode:"cron",cron:"30 12 * * *",timezone:"Asia/Jakarta"}),now,"UTC")).toContain("Asia/Jakarta");expect(scheduleBucket(node({mode:"cron",cron:"31 12 * * *",timezone:"Asia/Jakarta"}),now,"UTC")).toBeNull();});it("rejects malformed cron fields",()=>expect(()=>scheduleBucket(node({mode:"cron",cron:"* * *"}),new Date(),"UTC")).toThrow("5 fields"));+ it("has one immutable occurrence before, at and after the specified instant",()=>{+ const config={mode:"runAt",runAt:"2026-10-19T09:00:30+07:00",missedPolicy:"run_once"};+ expect(scheduleBucket(node(config),new Date("2026-10-19T02:00:29.999Z"))).toBeNull();+ const id=scheduleBucket(node(config),new Date("2026-10-19T02:00:30Z"));expect(id).toBe("runAt:2026-10-19T02:00:30.000Z");+ expect(scheduleBucket(node(config),new Date("2027-01-01T00:00:00Z"))).toBe(id);+ expect(scheduleBucket(node({...config,runAt:"2026-10-19T02:00:30Z",timezone:"America/New_York"}),new Date("2027-01-01T00:00:00Z"))).toBe(id);+ });+ it("keeps legacy AND and makes new cron OR explicit for restricted day fields",()=>{+ const config={mode:"cron",cron:"0 9 1 * 1",timezone:"UTC"};+ expect(scheduleBucket(node(config),new Date("2026-10-01T09:00:00Z"))).toBeNull();+ expect(scheduleBucket(node({...config,dayMatch:"and"}),new Date("2027-02-01T09:00:00Z"))).toBeTruthy();+ for(const at of ["2026-10-01T09:00:00Z","2026-10-05T09:00:00Z"])expect(scheduleBucket(node({...config,dayMatch:"or"}),new Date(at))).toBeTruthy();+ expect(scheduleBucket(node({...config,dayMatch:"or"}),new Date("2026-10-06T09:00:00Z"))).toBeNull();+ expect(scheduleBucket(node({...config,cron:"0 9 * * 1",dayMatch:"or"}),new Date("2026-10-06T09:00:00Z"))).toBeNull();+ });+ it("uses real timezone instants across skipped and repeated daylight-saving hours",()=>{+ const config={mode:"cron",cron:"30 2 * * *",timezone:"America/New_York"};+ expect(scheduleBucket(node(config),new Date("2026-03-08T07:30:00Z"))).toBeNull();+ const repeated={...config,cron:"30 1 * * *"},first=scheduleBucket(node(repeated),new Date("2026-11-01T05:30:00Z")),second=scheduleBucket(node(repeated),new Date("2026-11-01T06:30:00Z"));+ expect(first).toBeTruthy();expect(second).toBeTruthy();expect(second).not.toBe(first);+ });+ it("rejects malformed later cron fields even when the minute would not match",()=>expect(()=>scheduleBucket(node({mode:"cron",cron:"0 0 99 * *"}),new Date("2026-10-19T02:01:00Z"))).toThrow("cron field"));});diff --git a/lib/workflow/schedule.ts b/lib/workflow/schedule.tsindex e4529c49..38fb783b 100644--- a/lib/workflow/schedule.ts+++ b/lib/workflow/schedule.ts@@ -1,5 +1,26 @@import type { WorkflowGraphNode } from "@/lib/contracts/workflow-graph";-type Parts={minute:number;hour:number;day:number;month:number;weekday:number};-function parts(date:Date,timeZone:string):Parts{const values=Object.fromEntries(new Intl.DateTimeFormat("en-US",{timeZone,minute:"2-digit",hour:"2-digit",day:"2-digit",month:"2-digit",weekday:"short",hourCycle:"h23"}).formatToParts(date).map(p=>[p.type,p.value]));const wd=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].indexOf(values.weekday);return{minute:Number(values.minute),hour:Number(values.hour),day:Number(values.day),month:Number(values.month),weekday:wd};}-function field(expr:string,value:number,min:number,max:number):boolean{for(const token of expr.split(",")){const [range,stepRaw]=token.split("/"),step=stepRaw?Number(stepRaw):1;if(!Number.isInteger(step)||step<1)throw new Error("invalid cron step");let lo=min,hi=max;if(range&&range!=="*"){if(range.includes("-")){const [a,b]=range.split("-").map(Number);lo=a;hi=b;}else lo=hi=Number(range);}if(!Number.isInteger(lo)||!Number.isInteger(hi)||lo<min||hi>max||lo>hi)throw new Error("invalid cron field");if(value>=lo&&value<=hi&&(value-lo)%step===0)return true;}return false;}-export function scheduleBucket(node:WorkflowGraphNode,now=new Date(),fallbackZone="UTC"):string|null{if(node.type!=="schedule")return null;const c=node.config,mode=String(c.mode??"interval"),zone=typeof c.timezone==="string"&&c.timezone?c.timezone:fallbackZone;const p=parts(now,zone);if(mode==="interval"){const n=Math.max(1,Math.min(10080,Math.trunc(Number(c.everyMinutes)||60)));const minute=Math.floor(now.getTime()/60000);return minute%n===0?`${zone}:${minute}`:null;}const expr=String(c.cron??"").trim(),fields=expr.split(/\s+/);if(fields.length!==5)throw new Error("cron requires 5 fields: minute hour day month weekday");const hit=field(fields[0]!,p.minute,0,59)&&field(fields[1]!,p.hour,0,23)&&field(fields[2]!,p.day,1,31)&&field(fields[3]!,p.month,1,12)&&field(fields[4]!,p.weekday,0,6);return hit?`${zone}:${Math.floor(now.getTime()/60000)}`:null;}+import { normalizeWorkflowRunAt, parseWorkflowCron, validateWorkflowSchedule } from "@/lib/contracts/workflow-schedule";++function parts(date: Date, timeZone: string): number[] {+ const values = Object.fromEntries(new Intl.DateTimeFormat("en-US", { timeZone, minute: "2-digit", hour: "2-digit", day: "2-digit", month: "2-digit", weekday: "short", hourCycle: "h23" }).formatToParts(date).map(part => [part.type, part.value]));+ return [Number(values.minute), Number(values.hour), Number(values.day), Number(values.month), ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"].indexOf(values.weekday)];+}++export function scheduleBucket(node: WorkflowGraphNode, now = new Date(), fallbackZone = "UTC"): string | null {+ if (node.type !== "schedule") return null;+ if (!Number.isFinite(now.getTime())) throw new Error("invalid scheduler clock");+ const config = node.config, mode = validateWorkflowSchedule(config, fallbackZone);+ const zone = typeof config.timezone === "string" && config.timezone ? config.timezone : fallbackZone;+ if (mode === "runAt") {+ const instant = normalizeWorkflowRunAt(config.runAt);+ return now.getTime() >= Date.parse(instant) ? `runAt:${instant}` : null;+ }+ const minute = Math.floor(now.getTime() / 60000);+ if (mode === "interval") return minute % Number(config.everyMinutes ?? 60) === 0 ? `${zone}:${minute}` : null;+ const cron = String(config.cron), fields = parseWorkflowCron(cron), local = parts(now, zone);+ const matches = fields.map((field, index) => field.includes(local[index]));+ const tokens = cron.trim().split(/\s+/), restrictedDays = !tokens[2].startsWith("*") && !tokens[4].startsWith("*");+ // Legacy graphs retain AND. New editor configs explicitly choose conventional OR.+ const day = config.dayMatch === "or" && restrictedDays ? matches[2] || matches[4] : matches[2] && matches[4];+ return matches[0] && matches[1] && matches[3] && day ? `${zone}:${minute}` : null;+}diff --git a/package.json b/package.jsonindex da0f2cfe..fcc6d3f5 100644--- a/package.json+++ b/package.json@@ -14,7 +14,7 @@"typecheck": "tsc --noEmit","test": "node scripts/check-test-toolchain.mjs && vitest run","coverage": "node scripts/check-test-toolchain.mjs && vitest run --coverage",- "check": "node scripts/check-cycles.mjs && node scripts/check-architecture.mjs && node scripts/check-docs.mjs && node scripts/gen-comparison.mjs --check && node scripts/check-contrast.mjs && bun scripts/check-skill-flows.mjs && bun run check:instance-literals && bun run test:ci",+ "check": "node scripts/check-cycles.mjs && node scripts/check-architecture.mjs && node scripts/check-docs.mjs && node scripts/gen-comparison.mjs --check && node scripts/check-contrast.mjs && bun scripts/check-skill-flows.mjs && bun run check:instance-literals && bun run test:ci && bun run parity:nakama && bun run test:parity","audit": "node scripts/audit.mjs","verify": "bun run typecheck && bun run lint && bun run coverage && bun run check && bun run audit","security:ultimate": "bash scripts/security-ultimate.sh",@@ -54,7 +54,10 @@"ci:verify": "node scripts/ci/run.mjs --profile verify","ci:security": "node scripts/ci/run.mjs --profile security","ci:release": "node scripts/ci/run.mjs --profile release",- "test:ci": "node --test scripts/ci/contract.node.mjs"+ "test:ci": "node --test scripts/ci/contract.node.mjs",+ "parity:nakama": "node scripts/check-nakama-parity.mjs && node scripts/gen-nakama-parity.mjs --check",+ "parity:nakama:release": "node scripts/check-nakama-parity.mjs --release",+ "test:parity": "node --test scripts/parity/inventory.node.mjs"},"dependencies": {"@anthropic-ai/sdk": "^0.131.0",diff --git a/scripts/check-nakama-parity.mjs b/scripts/check-nakama-parity.mjsnew file mode 100644index 00000000..1233883c--- /dev/null+++ b/scripts/check-nakama-parity.mjs@@ -0,0 +1,28 @@+#!/usr/bin/env node+import { readFileSync } from "node:fs";+import { dirname, resolve } from "node:path";+import { fileURLToPath } from "node:url";+import { readInventory, statusCounts, validateInventory } from "./parity/inventory.mjs";+import { validateSources } from "./parity/sources.mjs";+import { candidateHead, validateCandidateMappings } from "./parity/candidate.mjs";+import { validateEvidence } from "./parity/evidence.mjs";+const root = resolve(dirname(fileURLToPath(import.meta.url)), "..");+try {+ const args = process.argv.slice(2), release = args.includes("--release");+ let evidencePath, requested;+ for (let i = 0; i < args.length; i++) {+ if (args[i] === "--release") continue;+ if (!["--evidence", "--commit"].includes(args[i]) || !args[i + 1]) throw new Error("Usage: --release [--evidence manifest.json] [--commit SHA]");+ if (args[i] === "--evidence") evidencePath = resolve(args[++i]); else requested = args[++i];+ }+ const { inventory, implementation, sources } = readInventory(root);+ validateInventory(inventory, implementation, root); validateSources(inventory, sources);+ console.log(`Nakama parity inventory: 64 requirements, 24 packages, 30 acceptance scenarios; ${JSON.stringify(statusCounts(implementation))}`);+ if (release) {+ const commit = candidateHead(root, requested); validateCandidateMappings(implementation, root, commit);+ const evidence = evidencePath ? JSON.parse(readFileSync(evidencePath, "utf8")) : null;+ const blockers = validateEvidence(inventory, implementation, evidence, evidencePath ? dirname(evidencePath) : root, commit);+ if (blockers.length) { console.error("BLOCKED: " + blockers.join("\nBLOCKED: ")); process.exitCode = 2; }+ else console.log("Candidate evidence structure and hashes passed; reviewers must inspect the actual runtime receipts.");+ } else console.log("Inventory validation checks traceability. Runtime parity requires separate candidate evidence.");+} catch (error) { console.error(error.message); process.exitCode = 1; }diff --git a/scripts/cli/agent-profiles.sh b/scripts/cli/agent-profiles.shnew file mode 100644index 00000000..f25cb06b--- /dev/null+++ b/scripts/cli/agent-profiles.sh@@ -0,0 +1,14 @@+#!/usr/bin/env bash++run_agent_profiles() {+ local action="${1:-list}"; shift || true+ case "$action" in+ list) jget "/api/v1/agent-profiles" ;;+ create|edit|clone|default|enable|disable)+ local input+ 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" ;;+ esac+}diff --git a/scripts/cli/commands-state.sh b/scripts/cli/commands-state.shindex 553f530d..7a738e0f 100755--- a/scripts/cli/commands-state.sh+++ b/scripts/cli/commands-state.sh@@ -55,6 +55,7 @@ case "$cmd" in*) die "usage: mso $U_agents" ;;esac ;;org) source "$ROOT/scripts/cli/organization.sh"; run_org "$@" ;;+ agent-profiles) source "$ROOT/scripts/cli/agent-profiles.sh"; run_agent_profiles "$@" ;;a2a)sub="${1:-list}"; shift || truecase "$sub" indiff --git a/scripts/cli/commands.sh b/scripts/cli/commands.shindex 8705f79f..db91c951 100755--- a/scripts/cli/commands.sh+++ b/scripts/cli/commands.sh@@ -1,8 +1,7 @@#!/usr/bin/env bash# User-facing command usage + dispatch. Sourced by bin/mso.-# Print the header block verbatim — stops at the first non-comment line, so the-# help can never drift out of sync with the comment above.-usage() { awk 'NR>1 { if ($0 !~ /^#/) exit; sub(/^# ?/, ""); print }' "$0"; }+# shellcheck source=help.sh+source "$ROOT/scripts/cli/help.sh"# Every verb the dispatch table implements, one per line, aliases split out. Read# from the table itself so a new arm can never be missing from did-you-mean.@@ -43,6 +42,7 @@ U_update="update [--rebuild] | status | reconcile | log"U_cockpit="cockpit [project] | cockpit show [project] | cockpit search <query…>"U_threads="threads list|show <id>|save <json>|rename <json>|rm <id>"U_agent_sessions="agent-sessions list [limit]|show <id>|create [title]"+U_agent_profiles="agent-profiles list|create|edit|clone|default|enable|disable <JSON|@file>|run <JSON|@file>"U_agents="agents list [current-session-id]|send <source-session-id> <target> <message> [message|task]|inbox <session-id> [--all]"U_org="org flow-custom-nodes|flow-nodes-move|flow-update|flow-replace|flow-node-upsert|flow-node-delete|flow-edge-upsert|flow-edge-delete <revision> <JSON with unitId|@file>|show|unit-upsert <revision> <JSON|@file>|seat-upsert <revision> <JSON|@file>|unit-delete <revision> <id>|seat-delete <revision> <id>|replace <revision> <JSON|@file>"U_a2a="a2a list|state|sessions|spawn <source-session> <objective> [title]|inbox <session>|discover <url>|add <url> [alias]|rm <target>|send <target> <message> [--wait]|stream <target> <message>|task <target> <taskId> [history]|cancel <target> <taskId>|handoff <target> <objective> [context] [--wait]|local sessions|local handoff <session> <objective>|local spawn <sourceSession> <objective> [title]|local inbox <session>|trace <start|progress|plan|action|evidence|blocker|result|handoff|status|context|attach|finish|cancel|list> [...]|auth list [target]|auth add <target> [label] [bearer|api-key|oauth2]|auth use <target> <credentialId|none>|auth rm <credentialId>|inbound list|inbound create [label] [read|write|exec]|inbound rm <tokenId>"@@ -104,7 +104,7 @@ mso_cli_main() {mso_cmd_host "$cmd" "$@" ;;agent|chat|model|setup|onboard|provider|providers|integrations|channels|agent-groups|flow|workflow|gateway|heartbeat|web|camoufox|apps|mapp|term)mso_cmd_runtime "$cmd" "$@" ;;- ai|cockpit|threads|agent-sessions|agents|org|a2a|memory|memory-graph|agent-vault|config|prefs|federation|models|jev|skills|changelog|stock)+ ai|cockpit|threads|agent-sessions|agent-profiles|agents|org|a2a|memory|memory-graph|agent-vault|config|prefs|federation|models|jev|skills|changelog|stock)mso_cmd_state "$cmd" "$@" ;;devices|device|approve|revoke|oauth|mcp|audit|whoami|login|logout|service|build|deploy|update|reset|uninstall|crud|api|completion)mso_cmd_admin "$cmd" "$@" ;;diff --git a/scripts/cli/help.sh b/scripts/cli/help.shnew file mode 100644index 00000000..e824863f--- /dev/null+++ b/scripts/cli/help.sh@@ -0,0 +1,3 @@+#!/usr/bin/env bash+# Read the entrypoint header without loading credentials or HTTP transport.+usage() { awk 'NR>1 { if ($0 !~ /^#/) exit; sub(/^# ?/, ""); print }' "$0"; }diff --git a/scripts/cli/help.test.ts b/scripts/cli/help.test.tsnew file mode 100644index 00000000..5a30387f--- /dev/null+++ b/scripts/cli/help.test.ts@@ -0,0 +1,22 @@+import { execFileSync } from "node:child_process";+import fs from "node:fs";+import os from "node:os";+import path from "node:path";+import { describe, expect, it } from "vitest";++describe("help before private state", () => {+ for (const option of ["help", "-h", "--help"]) it(option, () => {+ const dir = fs.mkdtempSync(path.join(os.tmpdir(), "mso-offline-help-"));+ try {+ const marker = path.join(dir, "env-executed"), envFile = path.join(dir, "secrets.env"), state = path.join(dir, "not-a-directory");+ fs.writeFileSync(envFile, `touch "${marker}"\nexit 93\n`, { mode: 0o600 });+ fs.writeFileSync(state, "unusable private store");+ const output = execFileSync("bash", ["bin/mso", "--env", envFile, option], {+ cwd: path.resolve(__dirname, "../.."), encoding: "utf8", env: { ...process.env, MSO_PRIVATE_STATE_DIR: state },+ });+ expect(output).toContain("Usage: mso");+ expect(fs.existsSync(marker)).toBe(false);+ expect(fs.readFileSync(state, "utf8")).toBe("unusable private store");+ } finally { fs.rmSync(dir, { recursive: true, force: true }); }+ });+});diff --git a/scripts/e2e/agent-profiles.mjs b/scripts/e2e/agent-profiles.mjsnew file mode 100644index 00000000..8965a425--- /dev/null+++ b/scripts/e2e/agent-profiles.mjs@@ -0,0 +1,90 @@+import { expect } from "@playwright/test";+import AxeBuilder from "@axe-core/playwright";++export async function agentProfilesJourney(page, fixture) {+ const call = (route, body) => page.evaluate(async ([route, body]) => {+ const response = await fetch(route, body === undefined ? { cache: "no-store" } : {+ method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(body),+ });+ return { status: response.status, body: await response.json() };+ }, [route, body]);+ const read = async () => {+ const result = await call("/api/v1/agent-profiles"); expect(result.status).toBe(200); return result.body.store;+ };+ await page.goto(fixture.base + "/assistant/agents");+ await expect(page.getByRole("heading", { name: "Saved agent profiles", exact: true })).toBeVisible();+ const personas = await page.evaluate(() => localStorage.getItem("alfa.agents"));+ await page.getByRole("button", { name: "New saved profile", exact: true }).click();+ await page.getByLabel("Name", { exact: true }).fill("Fixture reader");+ await page.getByLabel("Initials", { exact: true }).fill("FR");+ await page.getByLabel("Instructions", { exact: true }).fill("Report the fixture files you inspect.");+ await page.getByLabel("Provider ID", { exact: true }).fill("fixture-unconfigured");+ await page.getByLabel("Model ID", { exact: true }).fill("fixture/reader");+ await page.getByRole("checkbox", { name: /^fs_read\b/ }).check();+ await page.getByRole("button", { name: "Save profile", exact: true }).click();+ await expect(page.getByRole("heading", { name: "Fixture reader", exact: true })).toBeVisible();+ let store = await read(), profile = store.profiles.find(row => row.config.name === "Fixture reader");+ expect(profile.config.tools).toEqual(["fs_read"]); expect(profile.revision).toBe(1);+ expect(store.defaultProfileId).toBe(profile.id);+ const originalId = profile.id;++ await page.reload();+ await page.getByRole("button", { name: "Edit profile", exact: true }).click();+ await expect(page.getByLabel("Instructions", { exact: true })).toHaveValue("Report the fixture files you inspect.");+ await page.getByLabel("Instructions", { exact: true }).fill("Include exact fixture paths in the response.");+ await page.getByLabel("Reason for this revision", { exact: true }).fill("Verify a persisted edit after reload");+ await page.getByRole("button", { name: "Save profile", exact: true }).click();+ await expect(page.getByRole("heading", { name: "Fixture reader", exact: true })).toBeVisible();+ store = await read(); profile = store.profiles.find(row => row.id === originalId);+ expect(profile.revision).toBe(2); expect(profile.history[0].config.instructions).toBe("Report the fixture files you inspect.");+ expect(profile.config.model).toEqual({ provider: "fixture-unconfigured", model: "fixture/reader" });+ expect((await call("/api/v1/agent-profiles", { action: "create", expectedRevision: store.revision, reason: "Rejected fixture policy", config: { ...profile.config, tools: ["exec_run"] } })).status).toBe(422);+ expect((await call("/api/v1/agent-profiles", { action: "move", expectedRevision: store.revision, reason: "Unsupported organization move" })).status).toBe(501);+ expect((await read()).revision).toBe(store.revision);++ await page.getByRole("button", { name: "Clone profile", exact: true }).click();+ await expect(page.getByRole("heading", { name: "Fixture reader copy", exact: true })).toBeVisible();+ store = await read(); profile = store.profiles.find(row => row.config.name === "Fixture reader copy");+ expect(profile.clonedFrom).toEqual({ id: originalId, revision: 2 }); expect(store.defaultProfileId).toBe(originalId);+ const cloneId = profile.id;+ await page.getByRole("button", { name: "Set default", exact: true }).click();+ await expect(page.getByRole("button", { name: "Default profile", exact: true })).toBeDisabled();+ await page.getByRole("button", { name: "Disable profile", exact: true }).click();+ await expect(page.getByRole("button", { name: "Enable profile", exact: true })).toBeVisible();+ expect((await read()).defaultProfileId).toBeNull();+ await page.getByRole("button", { name: "Enable profile", exact: true }).click();+ await expect(page.getByRole("button", { name: "Disable profile", exact: true })).toBeVisible();+ expect((await read()).defaultProfileId).toBeNull();+ await page.getByRole("button", { name: "Set default", exact: true }).click();+ await expect(page.getByRole("button", { name: "Default profile", exact: true })).toBeDisabled();+ await page.reload();+ await expect(page.getByRole("heading", { name: "Fixture reader copy", exact: true })).toBeVisible();++ store = await read(); profile = store.profiles.find(row => row.id === cloneId);+ expect((await call("/api/v1/agent-profiles", { action: "edit", expectedRevision: store.revision, id: cloneId, profileRevision: profile.revision, reason: "Concurrent fixture edit", config: profile.config })).status).toBe(200);+ await page.getByRole("button", { name: "Edit profile", exact: true }).click();+ await page.getByLabel("Reason for this revision", { exact: true }).fill("Stale browser edit must not overwrite");+ await page.getByRole("button", { name: "Save profile", exact: true }).click();+ await expect(page.locator("form").filter({ has: page.getByRole("heading", { name: "Edit Fixture reader copy", exact: true }) }).getByRole("alert")).toContainText("changed in another tab");+ await page.getByRole("button", { name: "Cancel", exact: true }).click();+ await page.getByRole("button", { name: "Refresh", exact: true }).click();+ await expect(page.getByRole("button", { name: "Refresh", exact: true })).toBeEnabled();++ const task = page.getByRole("region", { name: "Run a read task", exact: true });+ await task.getByLabel("Task", { exact: true }).fill("Inspect the synthetic fixture.");+ const rejectedRun = page.waitForResponse(response => response.url().endsWith("/api/v1/agent-profiles/run") && response.request().method() === "POST");+ await task.getByRole("button", { name: "Run read task", exact: true }).click();+ expect((await rejectedRun).status()).toBe(501);+ await expect(task.getByRole("alert")).toHaveText("Connect fixture-unconfigured in Settings before running this profile.");+ expect(await page.evaluate(() => localStorage.getItem("alfa.agents"))).toBe(personas);+ const viewport = page.viewportSize();+ await page.setViewportSize({ width: 390, height: 844 });+ expect(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1)).toBe(true);+ const accessibility = await new AxeBuilder({ page }).withTags(["wcag2a", "wcag2aa", "wcag21aa"]).analyze();+ expect(accessibility.violations.map(row => ({ id: row.id, targets: row.nodes.map(node => node.target) }))).toEqual([]);+ if (viewport) await page.setViewportSize(viewport);+ await fixture.setRole("operator");+ try { expect((await call("/api/v1/agent-profiles")).status).toBe(403); expect((await call("/api/v1/agent-profiles/run", {})).status).toBe(403); }+ finally { await fixture.setRole("owner"); }+ console.log("PASS synthetic saved-profile persistence, revision conflicts, clone/default lifecycle, read-only policy, missing connection, reflow and Owner boundary");+}diff --git a/scripts/e2e/nakama-slices.mjs b/scripts/e2e/nakama-slices.mjsnew file mode 100644index 00000000..3fdac16d--- /dev/null+++ b/scripts/e2e/nakama-slices.mjs@@ -0,0 +1,31 @@+import { chromium, expect } from "@playwright/test";+import { releaseFixture } from "./release-fixture.mjs";+import { onboardingJourney } from "./onboarding.mjs";+import { agentProfilesJourney } from "./agent-profiles.mjs";+import { workflowSchedulesJourney } from "./workflow-schedules.mjs";++// These journeys persist real sessions; give them their own synthetic stores.+const fixture = await releaseFixture();+let browser;+try {+ browser = await chromium.launch({ headless: true });+ const context = await browser.newContext({ viewport: { width: 1280, height: 900 } });+ await context.addInitScript(device => {+ localStorage.setItem("mso.device.id", device);+ localStorage.setItem("mso:onboarding:v1", "done");+ }, fixture.device);+ const page = await context.newPage(), errors = [];+ page.on("pageerror", error => errors.push(error.message));+ await page.goto(fixture.base + "/login?returnTo=%2Fintegrations");+ await page.locator('input[type="password"]').fill(fixture.password);+ await page.getByRole("button", { name: "Unlock", exact: true }).click();+ await expect(page).toHaveURL(fixture.base + "/integrations");+ await onboardingJourney(page, fixture);+ await agentProfilesJourney(page, fixture);+ await workflowSchedulesJourney(page, fixture);+ expect(errors).toEqual([]);+ await context.close();+} finally {+ await browser?.close();+ await fixture.close();+}diff --git a/scripts/e2e/onboarding.mjs b/scripts/e2e/onboarding.mjsnew file mode 100644index 00000000..2b0c84cb--- /dev/null+++ b/scripts/e2e/onboarding.mjs@@ -0,0 +1,102 @@+import { expect } from "@playwright/test";+import AxeBuilder from "@axe-core/playwright";++export async function onboardingJourney(page, fixture) {+ const maintenance = fixture.base + "/settings?section=about&page=maintenance";+ const errors = [];+ const captureError = error => errors.push(error.message);+ page.on("pageerror", captureError);+ await page.goto(maintenance);+ await page.evaluate(() => { localStorage.removeItem("mso:onboarding:progress:v2"); localStorage.setItem("mso:onboarding:v1", "done"); });+ await page.reload();+ const open = () => page.getByRole("button", { name: "Open onboarding", exact: true }).click();+ const dialog = page.getByRole("dialog", { name: "Set up MSO", exact: true });+ await expect(dialog).toHaveCount(0);+ await open();+ await expect(dialog.getByRole("heading", { name: "Use this installation as it is" })).toBeVisible();+ await dialog.getByRole("button", { name: "Open backup options" }).click();+ await expect(page).toHaveURL(fixture.base + "/settings?section=backup");+ await expect(page.getByText("Browser backup", { exact: true })).toBeVisible();+ await page.goto(maintenance);+ await open();+ await dialog.getByRole("button", { name: "Check readiness", exact: true }).click();+ await expect(dialog.getByText("Service user", { exact: true })).toBeVisible();+ await page.route("**/api/config", route => route.fulfill({ status: 503, contentType: "application/json", body: '{"error":"fixture configuration unavailable"}' }));+ await dialog.getByRole("button", { name: "Refresh readiness" }).click();+ await expect(dialog.getByRole("alert")).toContainText("Model settings unavailable");+ await expect(dialog.getByText("Service user", { exact: true })).toBeVisible();+ await page.unroute("**/api/config");+ await dialog.getByRole("button", { name: "Refresh readiness" }).click();+ await expect(dialog.getByText("Selected provider", { exact: true })).toBeVisible();+ const providerLink = dialog.getByRole("link", { name: "Open model connections" });+ await expect(providerLink).toHaveAttribute("href", "/integrations?section=ai-providers");+ const [connections] = await Promise.all([page.waitForEvent("popup"), providerLink.click()]);+ await expect(connections).toHaveURL(fixture.base + "/integrations");+ await expect(connections.getByRole("heading", { name: "AI Providers", exact: true })).toBeVisible();+ await connections.close();+ await dialog.getByRole("button", { name: "Choose a project", exact: true }).click();+ await expect(dialog.getByRole("radio", { name: /fixture-project/ })).toBeVisible();+ await dialog.getByRole("textbox", { name: "Search host projects" }).fill("onboarding-no-such-project");+ await dialog.getByRole("button", { name: "Search", exact: true }).click();+ await expect(dialog.getByText("No project matches this search.", { exact: false })).toBeVisible();+ await dialog.getByRole("textbox", { name: "Search host projects" }).fill("fixture-project");+ await dialog.getByRole("button", { name: "Search", exact: true }).click();+ await dialog.getByRole("radio", { name: /fixture-project/ }).check();+ await dialog.getByRole("button", { name: "Review first action", exact: true }).click();+ let dispatches = 0;+ const captureDispatch = request => {+ if (request.url() === fixture.base + "/api/v1/workflows" && request.method() === "POST" && request.postDataJSON()?.action === "run") dispatches++;+ };+ page.on("request", captureDispatch);+ await dialog.getByRole("button", { name: "Run project check", exact: true }).dblclick();+ await expect(dialog.getByText("Project check completed with a saved receipt.", { exact: true })).toBeVisible({ timeout: 30_000 });+ expect(dispatches).toBe(1);+ const progress = await page.evaluate(() => JSON.parse(localStorage.getItem("mso:onboarding:progress:v2")));+ expect(progress.attempt.runId).toBeTruthy();+ await page.reload();+ await open();+ await expect(dialog.getByText("Project check completed with a saved receipt.", { exact: true })).toBeVisible();+ await dialog.getByRole("button", { name: "Refresh receipt" }).click();+ expect(dispatches).toBe(1);+ await dialog.getByText("Receipt reference", { exact: true }).click();+ await expect(dialog.getByText(progress.attempt.runId, { exact: true })).toBeVisible();+ for (const colorScheme of ["light", "dark"]) {+ await page.emulateMedia({ colorScheme });+ await page.evaluate(theme => { document.documentElement.dataset.theme = theme; }, colorScheme);+ expect(await page.locator("body").evaluate(element => getComputedStyle(element).colorScheme)).toBe(colorScheme);+ for (const viewport of [{ width: 1280, height: 900 }, { width: 390, height: 844 }]) {+ await page.setViewportSize(viewport);+ await expect(dialog).toBeVisible();+ const dimensions = await dialog.evaluate(element => ({ scroll: element.scrollWidth, client: element.clientWidth, width: element.getBoundingClientRect().width }));+ expect(dimensions.scroll).toBeLessThanOrEqual(dimensions.client + 1);+ expect(dimensions.width).toBeLessThanOrEqual(viewport.width);+ const axe = await new AxeBuilder({ page }).include('[role="dialog"]').withTags(["wcag2a", "wcag2aa"]).analyze();+ expect(axe.violations).toEqual([]);+ }+ }+ await dialog.getByRole("button", { name: "Close guide", exact: true }).click();+ await expect(dialog).toHaveCount(0);+ await open();+ await page.keyboard.press("Escape");+ await expect(dialog).toHaveCount(0);+ await fixture.setRole("viewer");+ await page.reload();+ await open();+ await expect(dialog.getByText("Device role: Viewer.", { exact: false })).toBeVisible();+ await expect(dialog.getByRole("button", { name: "Project", exact: true })).toHaveCount(0);+ await expect(dialog.getByRole("link", { name: "Open model connections" })).toHaveCount(0);+ const denied = await page.evaluate(async runId => {+ const response = await fetch(`/api/v1/workflows?run_id=${runId}`);+ return response.status;+ }, progress.attempt.runId);+ expect(denied).toBeGreaterThanOrEqual(400);+ await dialog.getByRole("button", { name: "Close guide", exact: true }).click();+ await fixture.setRole("owner");+ await page.setViewportSize({ width: 1280, height: 900 });+ await page.emulateMedia({ colorScheme: "light" });+ await page.reload();+ page.off("request", captureDispatch);+ page.off("pageerror", captureError);+ expect(errors).toEqual([]);+ console.log("PASS onboarding: legacy skip/reopen, backup route, model setup link/error, project search, one persisted read-only run, reload, responsive themes, keyboard and live role denial");+}diff --git a/scripts/e2e/release.mjs b/scripts/e2e/release.mjsindex 80511771..8782bdb3 100644--- a/scripts/e2e/release.mjs+++ b/scripts/e2e/release.mjs@@ -22,6 +22,7 @@ execFileSync(process.execPath, ["scripts/e2e/mcp-page.mjs"], { stdio: "inherit"execFileSync(process.execPath, ["scripts/e2e/workflow-embeds.mjs"], { stdio: "inherit" });execFileSync(process.execPath, ["scripts/e2e/organization-flow.mjs"], { stdio: "inherit" });execFileSync(process.execPath, ["scripts/e2e/graph-custom.mjs"], { stdio: "inherit" });+execFileSync(process.execPath, ["scripts/e2e/nakama-slices.mjs"], { stdio: "inherit" });const fixture = await releaseFixture();let browser;try {diff --git a/scripts/e2e/workflow-schedules.mjs b/scripts/e2e/workflow-schedules.mjsnew file mode 100644index 00000000..a0e0670c--- /dev/null+++ b/scripts/e2e/workflow-schedules.mjs@@ -0,0 +1,137 @@+import { expect } from "@playwright/test";++async function api(page, query = "", body) {+ return page.evaluate(async ({ query, body }) => {+ const response = await fetch(`/api/v1/workflows${query ? `?${query}` : ""}`, {+ ...(body ? { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify(body) } : {}),+ signal: AbortSignal.timeout(5000),+ });+ return { status: response.status, body: await response.json() };+ }, { query, body });+}+const offsetTime = instant => new Date(instant + 7 * 3600_000).toISOString().replace(/Z$/, "+07:00");++export async function workflowSchedulesJourney(page, fixture) {+ await page.setViewportSize({ width: 1440, height: 1000 });+ await page.goto(fixture.base + "/workflows");+ const name = `E2E Schedule ${Date.now()}`, output = { schedule: "one-shot browser receipt" };+ const created = await api(page, "", { action: "create", graph: {+ name, description: "Schedule editor and output-only runtime", status: "draft", inputs: {},+ metadata: { provenance: "user", timezone: "UTC" },+ nodes: [+ { id: "schedule", name: "Schedule Trigger", type: "schedule", position: { x: 80, y: 160 }, config: { mode: "interval", everyMinutes: 60 } },+ { id: "output", name: "Schedule Output", type: "output", position: { x: 420, y: 160 }, config: { value: output } },+ ],+ edges: [{ id: "schedule-output", source: "schedule", target: "output" }],+ } });+ expect(created.status).toBe(200);+ const graphId = created.body.graph.id, query = `graph_id=${encodeURIComponent(graphId)}`;+ const feature = page.locator('[data-slot="workflows-feature"]').last();+ const openSchedule = () => feature.locator('.react-flow__node[data-id="schedule"]').click();+ const closeDrawer = async () => { if (await page.getByRole("dialog").count()) await page.keyboard.press("Escape"); };+ const choose = async (label, option) => {+ await page.getByRole("combobox", { name: label, exact: true }).click();+ await page.getByRole("option", { name: option, exact: true }).click();+ };+ const persisted = async () => {+ const response = await api(page, query); expect(response.status).toBe(200); return response.body.graph;+ };+ const runs = async () => {+ const response = await api(page, `runs=1&${query}`); expect(response.status).toBe(200); return response.body.runs;+ };+ const config = graph => graph.nodes.find(node => node.id === "schedule").config;+ const reload = async () => {+ await page.reload();+ await expect(feature.getByLabel("Workflow name")).toBeVisible();+ const entry = page.getByRole("button", { name: new RegExp(`^${name}\\b`) });+ if (!await entry.isVisible()) await feature.getByRole("button", { name: "Workflow library", exact: true }).click();+ await entry.click();+ await expect(feature.getByLabel("Workflow name")).toHaveValue(name);+ await openSchedule();+ };+ const save = async (status = 200) => {+ await closeDrawer();+ const pending = page.waitForResponse(response => new URL(response.url()).pathname === "/api/v1/workflows" &&+ response.request().method() === "POST" && response.request().postDataJSON()?.action === "update" &&+ response.request().postDataJSON()?.graph_id === graphId);+ await feature.getByRole("button", { name: "Save", exact: true }).click();+ const response = await pending; expect(response.status()).toBe(status);+ if (status === 200) await expect(feature.getByText("Unsaved", { exact: true })).toBeHidden();+ return response.json();+ };++ try {+ await reload();+ await expect(page.getByLabel("Every minutes", { exact: true })).toHaveValue("60");+ await choose("Schedule mode", "Cron");+ await expect(page.getByLabel("When both day fields are restricted")).toHaveText("Either day field matches");+ await page.getByLabel("Cron (minute hour day month weekday)").fill("0 9 1 * 1");+ await page.getByLabel("Timezone override", { exact: true }).fill("Asia/Jakarta");+ await save();+ expect(config(await persisted())).toEqual({ mode: "cron", cron: "0 9 1 * 1", dayMatch: "or", timezone: "Asia/Jakarta" });++ await openSchedule();+ await choose("Schedule mode", "Interval");+ await page.getByLabel("Every minutes", { exact: true }).fill("7");+ await save();+ const beforeInvalid = await persisted();+ expect(config(beforeInvalid)).toEqual({ mode: "interval", everyMinutes: 7, timezone: "Asia/Jakarta" });++ await openSchedule();+ await choose("Schedule mode", "Once at a date and time");+ const runAt = page.getByLabel("Run at (date, time and UTC offset)", { exact: true });+ await expect(runAt).toHaveAttribute("required", "");+ await runAt.fill("2026-11-01T09:00:00");+ await expect(runAt).toHaveAttribute("aria-invalid", "true");+ await expect(page.getByRole("alert").filter({ hasText: /runAt.*explicit UTC offset/ })).toBeVisible();+ expect((await save(400)).error).toMatch(/runAt.*explicit UTC offset/);+ expect((await persisted()).revision).toBe(beforeInvalid.revision);++ await openSchedule();+ const future = offsetTime(Date.now() + 3600_000), futureUtc = new Date(future).toISOString();+ await runAt.fill(future);+ await expect(runAt).toHaveAttribute("aria-invalid", "false");+ await expect(page.locator(`time[datetime="${futureUtc}"]`)).toHaveText(futureUtc);+ await save();+ expect(config(await persisted())).toEqual({ mode: "runAt", runAt: future, missedPolicy: "run_once", timezone: "Asia/Jakarta" });+ await reload();+ await expect(runAt).toHaveValue(future);+ await expect(page.getByLabel("Timezone override", { exact: true })).toHaveValue("Asia/Jakarta");+ await expect(page.getByLabel("Schedule mode", { exact: true })).toHaveText("Once at a date and time");+ await expect(page.locator(`time[datetime="${futureUtc}"]`)).toHaveText(futureUtc);+ expect(await runs()).toEqual([]);++ // An overdue instant exercises the documented next-active-tick policy on the real server timer.+ const due = offsetTime(Date.now() - 1000), dueUtc = new Date(due).toISOString();+ await runAt.fill(due);+ await closeDrawer();+ await feature.getByLabel("Workflow status").selectOption("active");+ await save();+ const active = await persisted(); expect(active.status).toBe("active");+ await expect.poll(async () => (await runs())[0]?.state, { timeout: 35000, intervals: [500, 1000] }).toBe("completed");+ const completed = await runs(); expect(completed).toHaveLength(1);+ const result = await api(page, `run_id=${encodeURIComponent(completed[0].id)}`);+ expect(result.status).toBe(200);+ expect(result.body.graphRevision).toBe(active.revision);+ expect(result.body.trigger).toMatchObject({ type: "schedule", scheduleMode: "runAt", nodeId: "schedule", scheduledAt: dueUtc });+ expect(result.body.nodes.find(node => node.id === "output")).toMatchObject({ state: "completed", output });++ await openSchedule();+ await runAt.fill(dueUtc);+ await page.getByLabel("Timezone override", { exact: true }).fill("UTC");+ await save();+ expect(config(await persisted())).toEqual({ mode: "runAt", runAt: dueUtc, missedPolicy: "run_once", timezone: "UTC" });+ await reload();+ await expect(runAt).toHaveValue(dueUtc);+ const observeUntil = Date.now() + 16000;+ await expect.poll(async () => {+ expect((await runs()).map(run => run.id)).toEqual([completed[0].id]);+ return Date.now() >= observeUntil;+ }, { timeout: 20000, intervals: [1000] }).toBe(true);+ } finally {+ const current = await persisted();+ const removed = await api(page, "", { action: "delete", graph_id: graphId, expected_revision: current.revision });+ expect(removed.status).toBe(200);+ }+ console.log("PASS Workflow schedule mode switching, invalid-save rejection, offset normalization, persistence/reload, real overdue one-shot receipt and repeated-tick identity");+}diff --git a/scripts/gen-nakama-parity.mjs b/scripts/gen-nakama-parity.mjsnew file mode 100644index 00000000..aedf4ff5--- /dev/null+++ b/scripts/gen-nakama-parity.mjs@@ -0,0 +1,37 @@+#!/usr/bin/env node+import { readFileSync, writeFileSync } from "node:fs";+import { dirname, resolve } from "node:path";+import { fileURLToPath } from "node:url";+import { readInventory, statusCounts } from "./parity/inventory.mjs";+import { requiredVariants } from "./parity/variants.mjs";+const root = resolve(dirname(fileURLToPath(import.meta.url)), "..");+const { inventory: x, implementation } = readInventory(root), counts = statusCounts(implementation);+const rows = new Map(implementation.requirements.map(row => [row.id, row]));+const cell = text => String(text).replaceAll("|", "\\|").replaceAll("\n", " ");+const lines = ["# Paritas Nakama ke MSO", "",+ "Dokumen ini dihasilkan dari snapshot draf v0.1 yang dibekukan dan peta implementasi terpisah. Status mengacu pada kebutuhan penuh, bukan jumlah layar yang sudah dibuat.", "",+ `Target tetap **64 kebutuhan, 24 paket, 8 tahap, dan 30 skenario penerimaan**. Status saat ini: **${counts.pending} pending, ${counts.partial} partial, ${counts.implemented} implemented**.`, "",+ `Sumber dibekukan pada [Nakama ${x.baselines.nakama.commit.slice(0,12)}](https://github.com/${x.baselines.nakama.repository}/tree/${x.baselines.nakama.commit}) dan [MSO ${x.baselines.mso.commit.slice(0,12)}](https://github.com/${x.baselines.mso.repository}/tree/${x.baselines.mso.commit}). Identitas 100 berkas sumber tercatat; identitas berkas tidak membuktikan perilaku runtime.`, "",+ "Kontrak lengkap tersimpan dalam [snapshot](./parity/nakama-v0.1.json), [peta implementasi](./parity/nakama-implementation.json), [identitas sumber](./parity/source-references.json), dan [aturan bukti](./parity/EVIDENCE.md).", "",+ "## Kebutuhan dan kontrak", "", "| ID | Kebutuhan | Status | Paket | Penerimaan | Kontrak penuh |", "|---|---|---|---|---|---|"];+for (const r of x.requirements) lines.push(`| ${r.id} | ${cell(r.title)} | ${rows.get(r.id).status} | ${r.packages.join(", ")} | ${r.acceptance.join(", ")} | ${cell(r.target_contract)} |`);+lines.push("", "## Bagian yang telah diterapkan", "");+for (const r of implementation.requirements.filter(row => row.status !== "pending")) {+ lines.push(`### ${r.id}`, "", `Kode: ${r.implementation_paths.map(p => `[${p}](../${p})`).join(", ")}.`, "",+ `Pengujian: ${r.test_paths.map(p => `[${p}](../${p})`).join(", ")}.`, "", ...r.remaining.map(text => "- " + text), "");+}+lines.push("## Paket kerja", "", "| Paket | Tahap | Hasil |", "|---|---|---|");+for (const r of x.packages) lines.push(`| ${r.id} | ${r.stage} | ${cell(r.description)} |`);+lines.push("", "## Tahap", "", "| Tahap | Hasil | Syarat keluar |", "|---|---|---|");+for (const r of x.stages) lines.push(`| ${r.id} | ${cell(r.outcome)} | ${cell(r.exit_criteria)} |`);+lines.push("", "## Penerimaan", "", "| ID | Skenario | Hasil yang harus dibuktikan |", "|---|---|---|");+for (const r of x.acceptance_scenarios) lines.push(`| ${r.id} | ${cell(r.title)} | ${cell(r.expected_outcome)} |`);+lines.push("", "## Variasi dan gate", "",+ `Checklist kandidat menguraikan ${requiredVariants(x).length} varian wajib dari draf, termasuk 31 provider, transport, kombinasi shell/network, format/kontainer, dan platform. Tambahan platform yang ditandai ekstensi tetap terpisah dalam snapshot.`, "",+ "`bun run parity:nakama` memeriksa inventaris; `bun run parity:nakama:release --evidence /path/manifest.json` memeriksa bukti kandidat. Kelulusan inventaris bukan kelulusan runtime. Bukti sintetis tidak dapat memenuhi klaim kompatibilitas runtime.", "",+ "Hak Viewer/Operator/Owner yang ada adalah peran perangkat. Peta ini tidak mengubahnya menjadi akun manusia atau memberikan isolasi organisasi secara otomatis.", "");+const content = lines.join("\n"), target = resolve(root, "docs/NAKAMA-PARITY.md");+if (process.argv.includes("--check")) {+ if (readFileSync(target, "utf8") !== content) { console.error("Nakama parity documentation is stale"); process.exitCode = 1; }+ else console.log("Nakama parity documentation is current");+} else { writeFileSync(target, content); console.log("Generated docs/NAKAMA-PARITY.md"); }diff --git a/scripts/parity/artifacts.node.mjs b/scripts/parity/artifacts.node.mjsnew file mode 100644index 00000000..72cd38ac--- /dev/null+++ b/scripts/parity/artifacts.node.mjs@@ -0,0 +1,113 @@+import { test } from "node:test";+import assert from "node:assert/strict";+import fs from "node:fs";+import { createHash } from "node:crypto";+import { syncBuiltinESMExports } from "node:module";+import { dirname, join, resolve } from "node:path";+import { fileURLToPath } from "node:url";+import { readInventory } from "./inventory.mjs";+import { validateEvidence } from "./evidence.mjs";+import { evidenceFixture } from "./fixtures.mjs";+import { MAX_ARTIFACT_BYTES, readArtifactSnapshot } from "./paths.mjs";++const root = resolve(dirname(fileURLToPath(import.meta.url)), "../..");+const { inventory, implementation } = readInventory(root);+function fixture(t) {+ const result = evidenceFixture(inventory, implementation);+ t.after(() => fs.rmSync(result.root, { recursive: true, force: true })); return result;+}+const check = f => validateEvidence(inventory, f.implementation, f.evidence, f.root, f.commit);+function patchFs(t, method, replacement) {+ t.mock.method(fs, method, replacement); syncBuiltinESMExports();+ t.after(() => { t.mock.restoreAll(); syncBuiltinESMExports(); });+}++test("artifact snapshots reject final and ancestor symlinks before reading", t => {+ const f = fixture(t); fs.mkdirSync(join(f.root, "nested"));+ fs.writeFileSync(join(f.root, "nested", "regular"), "safe");+ fs.symlinkSync(join(f.root, "receipt.txt"), join(f.root, "alias"));+ fs.symlinkSync(join(f.root, "nested"), join(f.root, "linked-directory"));+ for (const name of ["alias", "linked-directory/regular", "../receipt.txt", "nested"])+ assert.throws(() => readArtifactSnapshot(f.root, name));+ assert.equal(readArtifactSnapshot(f.root, "nested/regular").toString(), "safe");+});++test("a final symlink swap before open cannot supply matching outside bytes", t => {+ const f = fixture(t), outside = fixture(t), originalOpen = fs.openSync, originalRead = fs.readSync; let swapped = false, reads = 0;+ patchFs(t, "readSync", (...args) => { reads += 1; return originalRead(...args); });+ patchFs(t, "openSync", (name, ...args) => {+ if (String(name).endsWith("/receipt.txt") && !swapped) {+ fs.unlinkSync(join(f.root, "receipt.txt")); fs.symlinkSync(join(outside.root, "receipt.txt"), join(f.root, "receipt.txt")); swapped = true;+ }+ return originalOpen(name, ...args);+ });+ assert.ok(check(f).length); assert.equal(swapped, true); assert.equal(reads, 0);+});++test("a replaced ancestor cannot redirect a pinned artifact read", t => {+ const f = fixture(t), outside = fixture(t), originalOpen = fs.openSync;+ fs.mkdirSync(join(f.root, "nested")); fs.renameSync(join(f.root, "receipt.txt"), join(f.root, "nested", "receipt.txt"));+ f.evidence.artifacts[0].path = "nested/receipt.txt"; let swapped = false;+ patchFs(t, "openSync", (name, ...args) => {+ const descriptor = originalOpen(name, ...args);+ if (String(name).endsWith("/nested") && !swapped) {+ fs.renameSync(join(f.root, "nested"), join(f.root, "detached")); fs.symlinkSync(outside.root, join(f.root, "nested")); swapped = true;+ }+ return descriptor;+ });+ assert.match(check(f).join("\n"), /directory changed/); assert.equal(swapped, true);+});++test("growth after descriptor stat is blocked with a bounded read and no path reopen", t => {+ const f = fixture(t), originalStat = fs.fstatSync, originalRead = fs.readSync;+ const initialSize = f.evidence.artifacts[0].bytes; let grown = false, readBytes = 0;+ patchFs(t, "readFileSync", () => { throw new Error("Unbounded pathname read is forbidden"); });+ patchFs(t, "fstatSync", (...args) => {+ const result = originalStat(...args);+ if (result.isFile() && !grown) { fs.truncateSync(join(f.root, "receipt.txt"), MAX_ARTIFACT_BYTES + 128); grown = true; }+ return result;+ });+ patchFs(t, "readSync", (...args) => { const count = originalRead(...args); readBytes += count; return count; });+ assert.match(check(f).join("\n"), /changed while reading/);+ assert.equal(grown, true); assert.equal(readBytes, initialSize + 1);+});++test("the size bound includes 20 MiB and rejects empty or oversized files before reading", t => {+ const f = fixture(t), receipt = join(f.root, "receipt.txt");+ fs.truncateSync(receipt, MAX_ARTIFACT_BYTES);+ const bytes = readArtifactSnapshot(f.root, "receipt.txt"); assert.equal(bytes.length, MAX_ARTIFACT_BYTES);+ f.evidence.artifacts[0] = { ...f.evidence.artifacts[0], bytes: bytes.length, sha256: createHash("sha256").update(bytes).digest("hex") };+ assert.deepEqual(check(f), []);+ let reads = 0; const originalRead = fs.readSync;+ patchFs(t, "readSync", (...args) => { reads += 1; return originalRead(...args); });+ for (const size of [0, MAX_ARTIFACT_BYTES + 1]) {+ fs.truncateSync(receipt, size); assert.throws(() => readArtifactSnapshot(f.root, "receipt.txt"), /1 byte through 20 MiB/);+ }+ assert.equal(reads, 0);+});++test("snapshot descriptors close after successful and failed validation", t => {+ const f = fixture(t), originalOpen = fs.openSync, originalStat = fs.fstatSync, descriptors = new Set();+ patchFs(t, "openSync", (...args) => { const descriptor = originalOpen(...args); descriptors.add(descriptor); return descriptor; });+ readArtifactSnapshot(f.root, "receipt.txt"); fs.truncateSync(join(f.root, "receipt.txt"), 0);+ assert.throws(() => readArtifactSnapshot(f.root, "receipt.txt"));+ assert.ok(descriptors.size); for (const descriptor of descriptors) assert.throws(() => originalStat(descriptor), { code: "EBADF" });+});++test("runtime environment identity requires nonempty strings", t => {+ const f = fixture(t); assert.deepEqual(check(f), []);+ for (const key of ["name", "platform", "node"]) {+ const original = f.evidence.environment[key];+ for (const value of [true, {}, [], null, 42, "", " \t"]) {+ f.evidence.environment[key] = value; assert.match(check(f).join("\n"), /Runtime environment and timestamp required/);+ }+ f.evidence.environment[key] = original;+ }+});++test("unsupported platforms explicitly block artifact snapshots", t => {+ const f = fixture(t), original = Object.getOwnPropertyDescriptor(process, "platform");+ Object.defineProperty(process, "platform", { ...original, value: "darwin" });+ try { assert.match(check(f).join("\n"), /require Linux or WSL/); }+ finally { Object.defineProperty(process, "platform", original); }+});diff --git a/scripts/parity/candidate.mjs b/scripts/parity/candidate.mjsnew file mode 100644index 00000000..e2cb7b14--- /dev/null+++ b/scripts/parity/candidate.mjs@@ -0,0 +1,23 @@+import { execFileSync } from "node:child_process";+import { PATH_FIELDS } from "./inventory.mjs";+export function validateCandidateMappings(implementation, root, commit = "HEAD") {+ const entries = execFileSync("git", ["ls-tree", "-rz", "--full-tree", commit], { cwd: root, encoding: "utf8", maxBuffer: 8 * 1024 * 1024 });+ const paths = new Map(entries.split("\0").filter(Boolean).map(entry => {+ const tab = entry.indexOf("\t"), [mode, type] = entry.slice(0, tab).split(" ");+ return [entry.slice(tab + 1), { mode, type }];+ }));+ for (const row of implementation.requirements) for (const field of PATH_FIELDS) for (const name of row[field]) {+ const entry = paths.get(name);+ if (!entry || entry.type !== "blob" || !["100644", "100755"].includes(entry.mode))+ throw new Error(`${row.id}: ${name} is not a tracked regular blob in the candidate`);+ }+}+export function candidateHead(root, requested) {+ const git = args => execFileSync("git", args, { cwd: root, encoding: "utf8" }).trim();+ const head = git(["rev-parse", "HEAD"]);+ if (requested && requested !== head) throw new Error("Requested commit is not HEAD");+ if (git(["ls-files", "-v", "-z"]).split("\0").some(entry => /^[a-zS] /.test(entry)))+ throw new Error("Candidate index hides tracked changes with assume-unchanged or skip-worktree flags");+ if (git(["status", "--porcelain", "--untracked-files=all"])) throw new Error("Candidate working tree is not clean");+ return head;+}diff --git a/scripts/parity/evidence.mjs b/scripts/parity/evidence.mjsnew file mode 100644index 00000000..19c986c1--- /dev/null+++ b/scripts/parity/evidence.mjs@@ -0,0 +1,50 @@+import { createHash } from "node:crypto";+import { readArtifactSnapshot, sameIds } from "./paths.mjs";+import { requiredVariants } from "./variants.mjs";++export const GATES = ["typecheck", "lint", "tests", "build", "security", "regression"];+export function validateEvidence(inventory, implementation, evidence, root, commit) {+ if (!evidence) return ["Full parity evidence is absent"];+ const errors = [], check = operation => { try { operation(); } catch (error) { errors.push(error.message); } };+ check(() => {+ if (evidence.schema_version !== "mso.nakama-parity-evidence.v1" || !/^[a-f0-9]{40}$/.test(commit)+ || evidence.candidate_commit !== commit || evidence.working_tree_clean !== true) throw new Error("Evidence must name this clean candidate");+ if (evidence.environment?.kind !== "runtime" || ["name", "platform", "node"].some(key => typeof evidence.environment[key] !== "string" || !evidence.environment[key].trim())+ || !Number.isFinite(Date.parse(evidence.created_at))) throw new Error("Runtime environment and timestamp required");+ });+ const artifacts = new Map();+ check(() => {+ if (!Array.isArray(evidence.artifacts) || !evidence.artifacts.length) throw new Error("Evidence artifacts required");+ sameIds(evidence.artifacts.map(row => row.id), [...new Set(evidence.artifacts.map(row => row.id))], "artifact ids");+ for (const row of evidence.artifacts) {+ const bytes = readArtifactSnapshot(root, row.path);+ if (row.bytes !== bytes.length || !/^[a-f0-9]{64}$/.test(row.sha256)+ || createHash("sha256").update(bytes).digest("hex") !== row.sha256) throw new Error(`Artifact bytes changed: ${row.id}`);+ artifacts.set(row.id, row);+ }+ });+ const receipt = (row, id, runtime = false) => {+ if (row?.status !== "pass" || row.candidate_commit !== commit || (runtime && row.mode !== "runtime"))+ throw new Error(`${id}: passing candidate runtime receipt required`);+ if (!Array.isArray(row.artifacts) || !row.artifacts.length || new Set(row.artifacts).size !== row.artifacts.length+ || row.artifacts.some(key => !artifacts.has(key))) throw new Error(`${id}: valid artifact references required`);+ };+ const group = (rows, ids, label, runtime) => {+ check(() => sameIds(rows?.map(row => row.id), ids, label));+ return new Map((Array.isArray(rows) ? rows : []).map(row => {+ check(() => receipt(row, row.id, runtime)); return [row.id, row];+ }));+ };+ group(evidence.gates, GATES, "gates", false);+ group(evidence.acceptance, inventory.acceptance_scenarios.map(row => row.id), "acceptance", true);+ const requirements = group(evidence.requirements, inventory.requirements.map(row => row.id), "requirements", true);+ for (const row of inventory.requirements) {+ if (implementation.requirements.find(item => item.id === row.id)?.status !== "implemented") errors.push(`${row.id}: implementation remains pending or partial`);+ const record = requirements.get(row.id);+ check(() => sameIds(record?.acceptance, row.acceptance, `${row.id} acceptance`));+ group(record?.dimensions, inventory.definition_of_done.map(item => item.id), `${row.id} completion dimensions`, true);+ }+ const variants = requiredVariants(inventory), records = group(evidence.compatibility, variants.map(row => row.id), "compatibility", true);+ for (const row of variants) group(records.get(row.id)?.dimensions, row.dimensions, `${row.id} adapter dimensions`, true);+ return errors;+}diff --git a/scripts/parity/fixtures.mjs b/scripts/parity/fixtures.mjsnew file mode 100644index 00000000..3ad0b98a--- /dev/null+++ b/scripts/parity/fixtures.mjs@@ -0,0 +1,22 @@+import { mkdtempSync, writeFileSync } from "node:fs";+import { tmpdir } from "node:os";+import { join } from "node:path";+import { createHash } from "node:crypto";+import { GATES } from "./evidence.mjs";+import { requiredVariants } from "./variants.mjs";+export function evidenceFixture(inventory, implementation) {+ const root = mkdtempSync(join(tmpdir(), "mso-parity-evidence-")), commit = "a".repeat(40);+ const bytes = Buffer.from("SYNTHETIC validator fixture. This is not release evidence.\n");+ writeFileSync(join(root, "receipt.txt"), bytes, { mode: 0o600 });+ const receipt = id => ({ id, status: "pass", mode: "runtime", candidate_commit: commit, artifacts: ["receipt"] });+ const map = structuredClone(implementation);+ for (const row of map.requirements) { row.status = "implemented"; row.remaining = []; row.verification_owner = "Synthetic fixture"; }+ return { root, commit, implementation: map, evidence: {+ schema_version: "mso.nakama-parity-evidence.v1", candidate_commit: commit, working_tree_clean: true,+ environment: { kind: "runtime", name: "synthetic schema fixture", platform: "test", node: "test" }, created_at: "2026-10-18T00:00:00Z",+ artifacts: [{ id: "receipt", path: "receipt.txt", bytes: bytes.length, sha256: createHash("sha256").update(bytes).digest("hex") }],+ gates: GATES.map(receipt), acceptance: inventory.acceptance_scenarios.map(row => receipt(row.id)),+ requirements: inventory.requirements.map(row => ({ ...receipt(row.id), acceptance: row.acceptance, dimensions: inventory.definition_of_done.map(row => receipt(row.id)) })),+ compatibility: requiredVariants(inventory).map(row => ({ ...receipt(row.id), dimensions: row.dimensions.map(receipt) })),+ } };+}diff --git a/scripts/parity/inventory.mjs b/scripts/parity/inventory.mjsnew file mode 100644index 00000000..f5fd03f6--- /dev/null+++ b/scripts/parity/inventory.mjs@@ -0,0 +1,33 @@+import { createHash } from "node:crypto";+import { readFileSync } from "node:fs";+import { join } from "node:path";+import { safeFile, sameIds } from "./paths.mjs";++export const SNAPSHOT_SHA256 = "affef4135ff5cc7afc115d49966f4160bc10c5ca756a977f223f7d56e0f1bbef";+export const PATH_FIELDS = ["source_paths", "implementation_paths", "test_paths"];+export function readInventory(root) {+ const read = name => JSON.parse(readFileSync(join(root, "docs/parity", name), "utf8"));+ return { inventory: read("nakama-v0.1.json"), implementation: read("nakama-implementation.json"), sources: read("source-references.json") };+}+export function validateInventory(inventory, implementation, root) {+ const digest = createHash("sha256").update(JSON.stringify(inventory)).digest("hex");+ if (digest !== SNAPSHOT_SHA256) throw new Error("Frozen v0.1 snapshot changed; record progress separately");+ if (implementation?.schema_version !== "mso.nakama-parity-implementation.v1" || implementation.baseline !== "nakama-v0.1.json")+ throw new Error("Unknown implementation map schema");+ sameIds(implementation.requirements?.map(row => row.id), inventory.requirements.map(row => row.id), "requirements");+ for (const row of implementation.requirements) {+ if (!["pending", "partial", "implemented"].includes(row.status)) throw new Error(`${row.id}: invalid status`);+ for (const field of PATH_FIELDS) {+ if (!Array.isArray(row[field]) || new Set(row[field]).size !== row[field].length) throw new Error(`${row.id}: invalid ${field}`);+ for (const name of row[field]) safeFile(root, name);+ }+ if (!Array.isArray(row.remaining) || row.remaining.some(text => typeof text !== "string" || !text.trim())) throw new Error(`${row.id}: invalid remaining scope`);+ if (row.status !== "pending" && (!row.implementation_paths.length || !row.test_paths.length)) throw new Error(`${row.id}: unsupported completion mapping`);+ if (row.status === "partial" && !row.remaining.length) throw new Error(`${row.id}: partial scope must name remaining work`);+ if (row.status === "implemented" && (row.remaining.length || typeof row.verification_owner !== "string" || !row.verification_owner.trim()))+ throw new Error(`${row.id}: implemented status requires a verification owner and no remaining scope`);+ }+}+export function statusCounts(implementation) {+ return Object.fromEntries(["pending", "partial", "implemented"].map(status => [status, implementation.requirements.filter(row => row.status === status).length]));+}diff --git a/scripts/parity/inventory.node.mjs b/scripts/parity/inventory.node.mjsnew file mode 100644index 00000000..a7ea82f3--- /dev/null+++ b/scripts/parity/inventory.node.mjs@@ -0,0 +1,99 @@+import { test } from "node:test";+import "./artifacts.node.mjs";+import assert from "node:assert/strict";+import { execFileSync } from "node:child_process";+import { mkdtempSync, rmSync, symlinkSync, writeFileSync } from "node:fs";+import { tmpdir } from "node:os";+import { dirname, join, resolve } from "node:path";+import { fileURLToPath } from "node:url";+import { readInventory, validateInventory } from "./inventory.mjs";+import { validateSources } from "./sources.mjs";+import { safeFile } from "./paths.mjs";+import { candidateHead, validateCandidateMappings } from "./candidate.mjs";+import { validateEvidence } from "./evidence.mjs";+import { requiredVariants } from "./variants.mjs";+import { evidenceFixture } from "./fixtures.mjs";+const root = resolve(dirname(fileURLToPath(import.meta.url)), "../..");+const { inventory, implementation, sources } = readInventory(root);+const clone = value => structuredClone(value);+function fixture(t) { const result = evidenceFixture(inventory, implementation); t.after(() => rmSync(result.root, { recursive: true, force: true })); return result; }+const check = f => validateEvidence(inventory, f.implementation, f.evidence, f.root, f.commit);++test("the entire frozen draft and source identity map validate", () => {+ validateInventory(inventory, implementation, root); validateSources(inventory, sources);+ assert.equal(inventory.requirements.length, 64); assert.equal(inventory.packages.length, 24);+ assert.equal(inventory.acceptance_scenarios.length, 30); assert.equal(sources.files.length, 100);+});+test("requirement removal or duplicate mapping cannot reduce scope", () => {+ const map = clone(implementation); map.requirements.pop();+ assert.throws(() => validateInventory(inventory, map, root), /identifiers/);+ map.requirements.push(map.requirements[0]); assert.throws(() => validateInventory(inventory, map, root), /identifiers/);+});+test("equal-count provider edits, format removal and contract changes cannot alter the frozen draft", () => {+ for (const mutate of [x => x.variant_checklists.providers[0].baseline_identifier = "substitute",+ x => x.variant_checklists.formats[0].formats.pop(), x => x.requirements[0].target_contract += " changed"]) {+ const x = clone(inventory); mutate(x); assert.throws(() => validateInventory(x, implementation, root), /Frozen/);+ }+});+test("source commit substitutions and malformed receipts fail", () => {+ const refs = clone(sources); refs.files[0].commit = "b".repeat(40);+ assert.throws(() => validateSources(inventory, refs));+ refs.files[0] = { ...sources.files[0], bytes: 0 }; assert.throws(() => validateSources(inventory, refs));+});+test("partial and implemented claims need mappings, remaining scope and an owner", () => {+ const map = clone(implementation), row = map.requirements[1]; row.status = "partial";+ assert.throws(() => validateInventory(inventory, map, root), /unsupported/);+ row.implementation_paths = ["package.json"]; row.test_paths = ["scripts/parity/inventory.node.mjs"];+ assert.throws(() => validateInventory(inventory, map, root), /remaining/);+ row.status = "implemented"; assert.throws(() => validateInventory(inventory, map, root), /verification owner/);+});+test("file paths reject traversal, absolute paths and symlinks", t => {+ const dir = mkdtempSync(join(tmpdir(), "mso-parity-path-")); t.after(() => rmSync(dir, { recursive: true, force: true }));+ writeFileSync(join(dir, "regular"), "safe"); symlinkSync(join(dir, "regular"), join(dir, "alias"));+ for (const name of ["../regular", "/etc/passwd", "alias", "./regular"]) assert.throws(() => safeFile(dir, name));+ assert.equal(safeFile(dir, "regular"), join(dir, "regular"));+});+test("candidate source evidence excludes ignored files and requires exact clean HEAD", t => {+ const dir = mkdtempSync(join(tmpdir(), "mso-parity-git-")); t.after(() => rmSync(dir, { recursive: true, force: true }));+ const git = args => execFileSync("git", args, { cwd: dir, encoding: "utf8", stdio: ["ignore", "pipe", "pipe"] }).trim();+ git(["init", "-q"]); writeFileSync(join(dir, ".gitignore"), "ignored.txt\n"); writeFileSync(join(dir, "tracked.txt"), "source");+ writeFileSync(join(dir, "ignored.txt"), "not source"); git(["add", "."]);+ git(["-c", "user.name=Fixture", "-c", "[email protected]", "commit", "-qm", "synthetic candidate"]);+ const map = { requirements: [{ id: "NK-001", source_paths: ["tracked.txt"], implementation_paths: [], test_paths: [] }] };+ assert.equal(candidateHead(dir), git(["rev-parse", "HEAD"])); validateCandidateMappings(map, dir);+ map.requirements[0].source_paths = ["ignored.txt"]; assert.throws(() => validateCandidateMappings(map, dir), /tracked regular blob/);+ assert.throws(() => candidateHead(dir, "b".repeat(40)), /not HEAD/);+ for (const flag of ["skip-worktree", "assume-unchanged"]) {+ git(["update-index", `--${flag}`, "tracked.txt"]); writeFileSync(join(dir, "tracked.txt"), "hidden runtime change");+ assert.equal(git(["status", "--porcelain", "--untracked-files=all"]), "");+ assert.throws(() => candidateHead(dir), /index hides tracked changes/);+ writeFileSync(join(dir, "tracked.txt"), "source"); git(["update-index", `--no-${flag}`, "tracked.txt"]);+ }+ writeFileSync(join(dir, "untracked.txt"), "edit"); assert.throws(() => candidateHead(dir), /not clean/);+});+test("absent full-parity evidence is blocked", () => {+ assert.match(validateEvidence(inventory, implementation, null, root, "a".repeat(40))[0], /absent/);+});+test("synthetic evidence exercises the complete structure only, including every adapter dimension", t => {+ const f = fixture(t); assert.deepEqual(check(f), []);+ assert.equal(requiredVariants(inventory).length, 69);+ f.evidence.candidate_commit = "b".repeat(40); assert.ok(check(f).some(error => /clean candidate/.test(error)));+});+test("pending or partial implementation remains blocked despite a complete manifest shape", t => {+ const f = fixture(t); f.implementation.requirements[0].status = "partial";+ assert.ok(check(f).some(error => /NK-001: implementation remains/.test(error)));+});+test("fixture-only adapters, missing dimensions and failed gates do not pass", t => {+ const f = fixture(t); f.evidence.compatibility[0].mode = "fixture"; f.evidence.requirements[0].dimensions.pop();+ f.evidence.gates[0].status = "fail"; const errors = check(f).join("\n");+ assert.match(errors, /provider:openai/); assert.match(errors, /completion dimensions/); assert.match(errors, /typecheck/);+});+test("unknown or duplicate acceptance mappings cannot pass", t => {+ const f = fixture(t); f.evidence.requirements[0].acceptance = ["A999", "A999"];+ assert.ok(check(f).some(error => /NK-001 acceptance/.test(error)));+});+test("artifact integrity, size and file boundary are checked from actual bytes", t => {+ const f = fixture(t); writeFileSync(join(f.root, "receipt.txt"), "changed");+ assert.ok(check(f).some(error => /Artifact bytes changed/.test(error)));+ f.evidence.artifacts[0].path = "../escape.txt"; assert.ok(check(f).some(error => /Invalid relative/.test(error)));+});diff --git a/scripts/parity/paths.mjs b/scripts/parity/paths.mjsnew file mode 100644index 00000000..7c79c98c--- /dev/null+++ b/scripts/parity/paths.mjs@@ -0,0 +1,66 @@+import { closeSync, constants, fstatSync, lstatSync, openSync, readSync, realpathSync } from "node:fs";+import { dirname, isAbsolute, relative, resolve } from "node:path";++function evidencePath(root, name) {+ if (typeof name !== "string" || !name || isAbsolute(name) || /[\\\\:\0]/.test(name)+ || name.split("/").some(part => !part || part === "." || part === "..")) throw new Error("Invalid relative file path");+ const base = realpathSync(root), target = resolve(base, name);+ if (relative(base, target).startsWith("..")) throw new Error("Path escapes root");+ return { base, target, parts: name.split("/") };+}+export function safeFile(root, name) {+ const { base, target } = evidencePath(root, name);+ for (let current = target; current !== base; current = dirname(current)) {+ const info = lstatSync(current);+ if (info.isSymbolicLink()) throw new Error("Symlink is not evidence");+ if (current === target ? !info.isFile() : !info.isDirectory()) throw new Error("Evidence must be a regular file");+ }+ return target;+}++export const MAX_ARTIFACT_BYTES = 20 * 1024 * 1024;++function pinDirectory(base, parts) {+ if (process.platform !== "linux" || !constants.O_NOFOLLOW || !constants.O_DIRECTORY)+ throw new Error("Evidence artifact snapshots require Linux or WSL with /proc/self/fd");+ const components = [...base.split("/").filter(Boolean), ...parts];+ if (components.length > 128) throw new Error("Evidence path is too deep");+ let directory = openSync("/", constants.O_RDONLY | constants.O_DIRECTORY | constants.O_NOFOLLOW);+ try {+ for (const part of components) {+ const next = openSync(`/proc/self/fd/${directory}/${part}`, constants.O_RDONLY | constants.O_DIRECTORY | constants.O_NOFOLLOW);+ try { closeSync(directory); } catch (error) { closeSync(next); throw error; }+ directory = next;+ }+ if (realpathSync(`/proc/self/fd/${directory}`) !== resolve(base, ...parts)) throw new Error("Evidence directory changed while opening");+ return directory;+ } catch (error) { closeSync(directory); throw error; }+}++// Validate and read the same pinned inode; never reopen its checked pathname.+export function readArtifactSnapshot(root, name) {+ const { base, parts } = evidencePath(root, name), leaf = parts.pop();+ const directory = pinDirectory(base, parts);+ let file;+ try {+ file = openSync(`/proc/self/fd/${directory}/${leaf}`, constants.O_RDONLY | constants.O_NOFOLLOW | constants.O_NONBLOCK);+ const before = fstatSync(file, { bigint: true });+ if (!before.isFile() || before.size < 1n || before.size > BigInt(MAX_ARTIFACT_BYTES)) throw new Error("Evidence must be a regular file of 1 byte through 20 MiB");+ const bytes = Buffer.alloc(Number(before.size) + 1);+ let used = 0;+ while (used < bytes.length) {+ const count = readSync(file, bytes, used, bytes.length - used, used);+ if (!count) break;+ used += count;+ }+ const after = fstatSync(file, { bigint: true });+ if (used !== Number(before.size) || after.size !== before.size || after.mtimeNs !== before.mtimeNs || after.ctimeNs !== before.ctimeNs)+ throw new Error("Evidence artifact changed while reading");+ return bytes.subarray(0, used);+ } finally { try { if (file !== undefined) closeSync(file); } finally { closeSync(directory); } }+}+export function sameIds(actual, expected, label) {+ if (!Array.isArray(actual) || actual.some(id => typeof id !== "string")+ || new Set(actual).size !== actual.length || actual.length !== expected.length+ || expected.some(id => !actual.includes(id))) throw new Error(`${label}: missing, duplicate or unknown identifiers`);+}diff --git a/scripts/parity/sources.mjs b/scripts/parity/sources.mjsnew file mode 100644index 00000000..b93e2336--- /dev/null+++ b/scripts/parity/sources.mjs@@ -0,0 +1,12 @@+import { sameIds } from "./paths.mjs";+const identity = row => [row.repository, row.commit, row.path].join("@");+export function validateSources(inventory, sources) {+ if (sources?.schema_version !== "mso.nakama-parity-sources.v1") throw new Error("Unknown source identity schema");+ const expected = [...new Set(inventory.all_source_hyperlinks.filter(row => row.path).map(identity))];+ sameIds(sources.files?.map(identity), expected, "source identities");+ if (expected.length !== 100) throw new Error("Pinned source identity count changed");+ for (const row of sources.files) {+ if (!/^[a-f0-9]{64}$/.test(row.sha256) || !Number.isSafeInteger(row.bytes) || row.bytes < 1+ || !Number.isSafeInteger(row.lines) || row.lines < 1) throw new Error(`Invalid source receipt: ${row.path}`);+ }+}diff --git a/scripts/parity/variants.mjs b/scripts/parity/variants.mjsnew file mode 100644index 00000000..ec4e3c3b--- /dev/null+++ b/scripts/parity/variants.mjs@@ -0,0 +1,16 @@+export function requiredVariants(inventory) {+ const v = inventory.variant_checklists, result = [];+ const add = (id, row) => result.push({ id, dimensions: row.test_dimensions ?? [] });+ for (const row of v.providers) add(`provider:${row.baseline_identifier}`, row);+ for (const id of v.mcp.baseline_transports) add(`mcp:${id}`, v.mcp);+ for (const row of v.acp) add(`acp:${row.preset}`, row);+ for (const row of v.coding_harnesses) add(`harness:${row.harness}`, row);+ for (const backend of v.shell.baseline_backends) for (const network of v.shell.baseline_network_modes) add(`shell:${backend}:${network}`, v.shell);+ for (const row of v.channels) add(`channel:${row.channel}`, row);+ for (const row of v.formats) {+ for (const id of row.formats ?? row.languages ?? row.output_formats ?? row.inputs) add(`format:${row.area}:${id}`, row);+ if (row.import_container) add(`format:${row.area}:container:${row.import_container}`, row);+ }+ for (const row of v.platforms) add(`platform:${row.platform}`, row);+ return result;+}