lispm-llm / docs /lispm-api.md
Ryan.K
Publish LispM Emacs agent harness classifier
6ae9156 unverified
|
Raw History Blame Contribute Delete
15 kB

LispM public command exposure

This audit maps 24 additional model intents to fixed public LispM application functions. It was taken on 2026-11-25 from the owning repositories. It does not load the applications, execute their commands, or establish that they are installed in a particular running Emacs. The model remains a proposal generator.

Each accepted intent names one function with zero arguments, one validated literal string, or a fixed allowlisted constant. Optional arguments are omitted except that the new-tab mapping supplies "about:blank". No private -- function, arbitrary Lisp evaluator, shell command, generic Agent tool dispatcher, or permission approval command is exposed.

Ownership and command declarations

LispM applications own their behavior. Finder, Browser and Stickies expose presentation hooks so a host can display them differently; a Desktop integration should adapt those hooks and call the public application API. This catalog does not route application behavior through private Desktop helpers. See Finder open-directory, Browser show and Stickies entry point.

lispm-kit-define-commands declares keys, labels, help, enablement and selection state for a major mode. The declaration is stored in the mode symbol's lispm-kit-commands property and can be read by a UI. It is a command/UI declaration, not a model schema or authorization grant. See the Kit declaration contract and installation into the mode.

LispM Agent tool authorization is a separate boundary: lispm-deftool declares tools and permission classes; lispm-tool-action delegates to policy and returns auto, ask or deny. A future Agent integration must keep that owning permission path, target checks and host state validation. Classifier confidence cannot substitute for authorization. See Agent tool declarations and Agent permission decisions. The Agent working file was locally modified during this audit; these two links intentionally refer to the committed contract. Both committed and working-file hashes are recorded in the catalog.

Fixed mappings

STRING below is a separately parsed argument, escaped by the deterministic Lisp renderer. Each link pins the owning source commit and definition line.

Intent and emitted call Literal field Meaning
(lispm-finder-home) None Show the home folder in Finder.
(lispm-finder-open-directory STRING) path Show the supplied directory in Finder.
(lispm-finder-back) None Return to the previous Finder folder.
(lispm-finder-forward) None Return to the Finder folder navigated back from.
(lispm-finder-up) None Show the enclosing Finder folder.
(lispm-finder-refresh) None Read the shown Finder folder again.
(lispm-finder-new-folder STRING) name Create and select a folder under the directory shown in Finder.
(lispm-browser) None Show the browser, opening its home page when no tab exists.
(lispm-browser-open-url STRING) url Navigate the shown browser tab to the supplied URL; create/show a tab when needed.
(lispm-browser-back) None Go back one page in the shown browser tab.
(lispm-browser-forward) None Go forward one page in the shown browser tab.
(lispm-browser-reload) None Reload the shown browser page.
(lispm-browser-new-tab "about:blank") None Open and show a new empty browser tab at about:blank.
(lispm-browser-next-tab) None Select the next browser tab, wrapping around.
(lispm-browser-previous-tab) None Select the previous browser tab, wrapping around.
(lispm-browser-close-shown-tab) None Close the browser tab currently shown.
(lispm-stickies) None Show saved sticky notes, creating the first note if none exists.
(lispm-stickies-new-note STRING) text Create a sticky note holding the supplied literal text.
(lispm-stickies-next-note) None Show the next sticky note, wrapping around.
(lispm-stickies-previous-note) None Show the previous sticky note, wrapping around.
(lispm-rotom) None Open Rotom status, accounts and models.
(lispm-comfyui) None Show the last ComfyUI workflow, or create an empty one.
(lispm-office) None Show current Agent work, or an overview outside an Agent conversation.
(lispm-mail) None Open LispM Mail mailboxes, messages and selected message.

Runtime prerequisites and effects

  • Finder: requires lispm-finder and LispM UI. Directory navigation reads the shown folder and history. New-folder creation applies to the real directory currently shown, not an arbitrary supplied path. The owner trims the name and rejects empty names, ./.., path separators, virtual folders and existing targets. See name validation and folder creation.
  • Browser: requires a graphical Emacs with WebKit xwidgets; lispm-browser-available-p is the public capability predicate. The open-app entry checks it. The raw lispm-browser-open-url function does not normalize or restrict the URI and does not make that check itself. The model boundary accepts only explicit absolute http:// or https:// URLs, excluding executable, data and local-file schemes. Navigation operates on the shown tab. The mapped new-tab operation supplies the fixed "about:blank" argument, deliberately overriding the upstream function's configured-home-page default; this is not a user-supplied URI. Closing the shown tab bypasses confirmation, and closing the last tab quits the browser. See raw URL navigation and tab-close behavior.
  • Stickies: requires lispm-stickies and LispM UI. Opening restores saved notes or creates an initial note. Creating a note stores the supplied text and schedules persistence; next/previous selects an existing note. No note deletion or arbitrary file import/export is in this subset. See new-note behavior.
  • Rotom: loads the lispm-rotom-ui feature. Opening the app reads status, accounts and models; the backend invokes fixed status/model commands and daemon health requests. It does not start or stop the daemon or change the active model. Missing Rotom is displayed as a missing state. See Rotom entry point.
  • ComfyUI: requires its workflow modules, LispM UI and the websocket package. Opening shows the last workflow or an empty one and can refresh server workflow metadata. It does not queue generation. See ComfyUI entry point and workflow display.
  • Office: requires LispM Agent host APIs and Office dependencies. With no explicit argument it shows the current conversation's work, or an overview outside an Agent buffer. It does not send a message, approve a pending action or stop an agent. See Office entry point.
  • Mail: requires LispM Mail and LispM UI. Opening restores the mail layout and checks mail when accounts are configured, so opening can perform background network reads. It does not send mail. See Mail entry point.

These effects describe what the application functions would do if a host executed a proposal. This project does not currently perform that execution. Package availability, directory accessibility, focused application state and host permissions remain runtime preconditions.

Reproduce the structural check

The portable check requires Emacs and uses the catalog for LispM function declarations. It reads every generated form, checks literal arguments and action order, and verifies native function arities without running any operation:

python -B verify_lispm_api.py

To additionally verify file hashes and exact public definitions in local owning repositories, pass their parent directory:

python -B verify_lispm_api.py --source-root /path/to/checkouts

The source-backed audit passed 2,304 forms and 4,560 calls under Emacs 31.1: 23 native function arities, 24 public LispM declarations and nine source-file hashes. The verifier imposes a 30-second Emacs subprocess timeout. Portable mode reports source_verification: not_requested; a source-backed run requires every snapshot hash to match. Neither mode loads application code or evaluates a generated operation.

Source snapshot

The machine-readable catalog contains full commits, per-file SHA-256 hashes, declared Lisp argument lists, literal-field types, effects and per-action source links. All seven application source files matched their pinned commits. Kit also matched; the supplemental Agent permission file had local modifications. No files in these upstream repositories were edited.

Owner Pinned commit Audited file
finder 57b9ef3eebab lispm-finder.el
browser 70ed386d8d18 lisp/lispm-browser.el
stickies dc6ff0cdf7e8 lispm-stickies.el
rotom bb9691cfce52 lispm-rotom-ui.el
comfyui dc63707fab35 lispm-comfyui.el
office eec9f99a6862 lispm-office.el
mail dbef17aefc47 lispm-mail.el
kit 08102312ed35 lispm-kit-commands.el
agent 1b49c47886c6 lisp/lispm-tools.el (working file modified)