Protocol methods
Call one with omfp_call { method, params }; read omfp://protocol/methods/thread.* method without threadId reads the calling thread, and a method of one workspace
(workspaces.read_file, workspaces.find_file, workspaces.mcp_servers, workspaces.check, mcp.test, mcp.tools, jobs.list, jobs.runs, views.errors, windows.check_widget, views.mount, views.mount_update, views.unmount, views.reset, windows.run) without
workspaceId acts on the calling thread’s workspace.
fs.complete— Child directories of a path on the daemon host (DMN-021).workspaces.create— Creates a workspace: a new folder under the workspaces root, optionally holding a link to a directory.workspaces.update— Renames a workspace.workspaces.remove— Removes a workspace without threads and its folder (links unlinked, never followed).workspaces.rescan— Lists the workspace folder’s top-level folders again.workspaces.read_file— A file of a workspace with its hash andHEADtext (DMN-1442).workspaces.find_file— Files across the workspace folder and its git working trees: strict name/path lookup or fuzzy path search (DMN-092).workspaces.write_file— Writes a file of a workspace unless it changed since it was read (DMN-090).workspaces.reorder— Puts a workspace just before another in the left column, or last (PRT-170, DMN-281).threads.create— Creates a thread in an existing or a new workspace; an agent’sparentThreadId(its own thread) makes it a child, nested under the parent (readOnlyby default for windows, AGT-420, AGT-421).toolslimits its agent to the tools named (exact names the model sees),[]to none at all (AGT-500, AGT-501).ephemeral: truemakes a disposable thread, deleted with its session once its run settled and nothing waits for it, listed in the left column only while it needs the user (DMN-1400).threads.update— Renames a thread or changes its approval mode.threads.reorder— Puts a thread just before another of a workspace in the left column, or last; another workspace moves it there (PRT-171, DMN-282).threads.archive— Archives a thread;jobssays what happens to the runs its agent started (DMN-1075). Your own thread’s host ends once your turn does (DMN-1078).threads.unarchive— Brings an archived thread back.threads.delete— Deletes a thread; its workspace is kept;jobsas forthreads.archive(DMN-1075). Your own thread’s host ends once your turn does (DMN-1078).threads.fork— Forks a thread into a new thread of the same workspace, with its conversation up to an entry (DMN-1072); the source is untouched.threads.search— Threads whose conversation text contains a query (DMN-076).thread.prompt— Sends a prompt.thread.steer— Steers the running turn.thread.follow_up— Queues a follow-up.thread.abort— Aborts and returns the queued messages.thread.queue.remove— Removes a queued message.thread.queue.promote— Promotes a queued message.thread.set_model— Changes the model.thread.set_thinking— Changes the thinking level.thread.models— Available models. Each entry suppliesproviderandid: usethreads.create { model: "<provider>/<id>", workspace: ... }, orthread.set_model { threadId: ..., provider: "<provider>", modelId: "<id>" }.thread.thinking_levels— Available thinking levels.thread.commands— Available slash commands; never starts the thread host: without a running pi, the commands it last announced.thread.compact— Compacts the context.thread.tree— Session tree.thread.navigate— Moves the session leaf.thread.label— Labels a session entry.thread.bash— Runs a shell command in the session.thread.state— The thread’s whole state as itsthread/<id>topic holds it (transcript, queue, pending requests, …), with its session’s model and thinking level; starts the thread host.thread.session— The small facts of the thread’s pi session (id, file, model, state, usage) without starting the thread host (DMN-1067).thread.restart— Restarts the thread host. Your own thread’s host ends once your turn does (DMN-1078).thread.resume— Continues a turn a daemon restart interrupted (interruptedAt, PRT-230): starts the thread host and sends a notice asking the agent to check what was in progress and continue;conflictwhen the thread has no interrupted turn.thread.stop— Stops the thread host; withcascade, those of every thread it spawned too (PRT-085). Your own thread’s host ends once your turn does (DMN-1078).interaction.respond— Answers an interactive request;already_resolvedif another client answered first.card.answer— Ends the wait of a thread’somfp_cardcall with a submitted value or a cancel;already_resolvedwhen the call does not wait (PRT-224).theme.get— The user’s theme CSS (DMN-1273).theme.set— Replaces the user’s theme CSS (the config folder’stheme.css);nullrestores the built-in themes (DMN-1273).settings.get— The effective daemon-wide settings: what the user’s init.ts declares (ctx.settings,ctx.keys.bind) with the runtime changes over it (DMN-1206, UI-097).settings.set— Applies settings at once until the daemon restarts or the nextworkspaces.reload_init; nothing is written: to keep a value, declare it withctx.settingsin the user’s init.ts (DMN-1206).views.set— Replaces the workspace’s live views manifest, shown instead of the declared views untilworkspaces.reload_init,views.resetor a change of the declared views; never writes a file (DMN-977).views.reset— Drops the workspace’s live views changes (live manifest, mounts, live widgets), stored copy included: windows show the declared views again (PRT-457).widgets.copy— Copies a built-in or user widget into the workspace’s.omfp/widgets/(DMN-981).widgets.state_set— Stores one key of a widget instance’s state (DMN-086).widgets.compile— Compiles a card’s one-file widget source to an ES module, writing nothing (PRT-225).jobs.start— Runs a shell command in the workspace folder as a job (DMN-080).jobs.kill— Kills a job’s process group (DMN-081).jobs.output— A job’s state, exit and newest output (PRT-353).terminals.start— Starts an interactive PTY session in a workspace (TRM-100).terminals.screen— The current plain-text terminal screen, optionally waiting for a revision change (TRM-106).terminals.input— Writes base64-encoded bytes to a PTY session (TRM-101).terminals.resize— Resizes a PTY session (TRM-101).terminals.kill— Kills a PTY session (TRM-101).jobs.list— The declared jobs of a workspace, as onjobs/<id>(PRT-202).jobs.runs— The stored runs of a declared job, newest first (PRT-203).jobs.run— Starts a run of a declared job (PRT-204).jobs.define— Alwaysbad_request: jobs are declared withctx.jobs.definein an init file or an eval, thenworkspaces.reload_init(PRT-352).jobs.remove— Alwaysbad_request: remove thectx.jobs.definedeclaration from the init file or eval instead (PRT-352).jobs.enable— Enables or disables a declared job in the daemon’s memory, writing nothing: it lasts until the job’s declaration changes or the daemon restarts, then the declaredenabledapplies again; to keep it, changeenabledin the declaration (PRT-350).views.errors— The init file errors every window showing the workspace reports (PRT-116).windows.list— The windows that reported to the daemon, the most recently focused first: workspace, thread, view, errors, and the native window of anomfp desktopwindow (desktop: { host, pid, title }, PRT-123, PRT-460). The title follows the window’s thread or view (<thread> — omfp · <n>): to match a window manager’s window bypidandtitle, read this right before matching.windows.state— All a window reports: its views and where each comes from (builtin,manifest,user_init,workspace_init;live: truewhen live changes made one differ from the declared views,hiddenTabsthe declared tabs that window closed), its added commands and bindings, its errors and widgets, its native desktop window (PRT-123, PRT-460, PRT-511, UI-1160).windows.run— Runs a registered command (id or alias) in a window, by default the most recently focused one showing the workspace; a<widget>.<…>command of a widget of the shown view in a tab not selected, or a declared tab that window closed, selects the tab and runs once registered (UI-1132); never JavaScript (PRT-124).windows.check_widget— Renders a widget out of sight in a window and returns what it rendered: the name resolves in the window’s workspace (workspaceId, else the one the window shows), then among the user’s init file’s widgets, so a window without a workspace checks the user’s (PRT-124, PRT-610, DMN-1440).notify.send— Notifies the user: an omfp window shows it, and the devices subscribed to Web Push get it while no window has the focus (always withurgency: "high") (PRT-240).agents.notify— For a thread’s agent: notifies the user about its thread, in the omfp window they use and, while no window has the focus (always withurgency: "high"), on their subscribed devices; opening it shows the thread. For a finished long task or when the user is needed, once per occasion, never for progress (PRT-452, DMN-1022).agents.open_file— For a thread’s agent: opens a file (pathrelative to the workspace, absolute or a partial name;line) as a file tab of the user’s window following its thread (PRT-452, DMN-1023).agents.set_title— For a thread’s agent: renames its thread in the thread list (PRT-452, DMN-1024).push.key— The daemon’s VAPID public key, forPushManager.subscribe(PRT-241).push.subscribe— Adds a device’s push subscription, or replaces the one of the same endpoint (PRT-242).push.unsubscribe— Removes a device’s push subscription; an unknown endpoint is no error (PRT-242).push.devices— The devices the daemon pushes to, the newest first (PRT-243).views.mount— Mounts a widget (a reference or inline code) into a view or as a floating panel; replaces an earlier mount of the same id (DMN-1275).views.mount_update— Merges props into a mounted widget, or rewrites its inline code (AGT-062).views.unmount— Removes a mounted widget or floating panel from the views (DMN-1275).prompts.history— The prompts the user sent from omfp: the thread’s first, then its workspace’s, then the rest, newest first within each (PRT-127, DMN-216).threads.list— Thread summaries as on theindextopic, without archived threads unless asked (PRT-400).workspaces.list— Every workspace as on theindextopic.workspaces.mcp_servers— The MCP servers configured for a workspace, where each comes from, not started (configured;mcp.testtries them, PRT-430).workspace.call— Calls a method the workspace’s init files or evals define (ctx.methods.define) withparams(PRT-331).workspaces.reload_init— Evaluates the init files of the workspace (every workspace withoutworkspaceId) again, and the user’s init file in the user host (dropping the runtime changes ofsettings.set), and answers what loaded and what failed (PRT-330, DMN-1206).workspaces.check— Checks the workspace’s init files and widgets without touching what runs: one type-check of the init files and of the widgets, window modules and live widgets (with the files they import, against omfp/sdk, omfp/kit and React’s types), a dry run in a throwaway host, every declared widget and every live mounted widget (named by its mount id) rendered out of sight in an open window with its errors; answers a Markdown report (AGT-342, AGT-485, DMN-1431).thread.mcp_servers— The MCP servers of a thread’s workspace as its running session connected them (connecting,connectedwith the tool count,failedwith the error and a stdio server’s stderr; a dropped server is reconnected on its own, waits doubling from 1 s to 30 s); a stopped thread’sconfigured, never started (PRT-431).thread.mcp_reconnect— Reconnects one MCP server (name) or each in the thread’s session, started first when stopped, and answers their states (PRT-432).mcp.test— Starts the workspace’s enabled MCP servers (orname) afresh from the daemon, stdio and HTTP, waits forinitializeandtools/list(timeoutSeconds, default the entry’stimeout, else 60), stops them and answers eachconnectedwith its tool names orfailedwith the error and stderr tail (PRT-500).mcp.tools— The tools of a workspace’s remote MCP server, listed by the daemon itself, no thread needed (PRT-434).mcp.call— Calls a tool of a workspace’s remote MCP server from the daemon, with pi’s OAuth login for it (PRT-435).auth.status— How many models pi can use with omfp’s credentials, counted again on every call (a changed count is published asmodels_changed), andkeysFile, omfp’sauth.json, where an API key goes (PRT-140).auth.models— The models pi can use with the credentials omfp stores, without any thread (PRT-140). Each entry suppliesproviderandid: usethreads.create { model: "<provider>/<id>", workspace: ... }, orthread.set_model { threadId: ..., provider: "<provider>", modelId: "<id>" }.auth.providers— The providers pi can log in to with OAuth and whether a credential authenticates each (omfp’s stored login or key, or an environment variable) (PRT-129).auth.login— Logs in to a provider with pi’s OAuth flow, run by the daemon; the flow (the URL to open, progress, a code to paste) goes to the calling window aslogin_*window requests (PRT-130, PRT-131).auth.login_cancel— Cancels the running login, if any; itsauth.loginfails (PRT-132).auth.logout— Removes every credential omfp stored for a provider (PRT-133).