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](https://github.com/LispMachineLab/lispm-finder/blob/57b9ef3eebab4663350ca2611bab61776426dcf8/lispm-finder.el#L1267), [Browser show](https://github.com/LispMachineLab/lispm-browser/blob/70ed386d8d18331c6b55c76e85a54c4730eba768/lisp/lispm-browser.el#L245) and [Stickies entry point](https://github.com/LispMachineLab/lispm-stickies/blob/dc6ff0cdf7e8d6cd5bea6919e9dc2e97161b23d8/lispm-stickies.el#L577).
`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](https://github.com/LispMachineLab/lispm-kit/blob/08102312ed356cc2d5a2b4620b35b423fe72018a/lispm-kit-commands.el#L108) and [installation into the mode](https://github.com/LispMachineLab/lispm-kit/blob/08102312ed356cc2d5a2b4620b35b423fe72018a/lispm-kit-commands.el#L205).
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](https://github.com/LispMachineLab/lispm-agent/blob/1b49c47886c677c6feabb4766172f5abc35628a8/lisp/lispm-tools.el#L119) and [Agent permission decisions](https://github.com/LispMachineLab/lispm-agent/blob/1b49c47886c677c6feabb4766172f5abc35628a8/lisp/lispm-tools.el#L1096). 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)`](https://github.com/LispMachineLab/lispm-finder/blob/57b9ef3eebab4663350ca2611bab61776426dcf8/lispm-finder.el#L1285) | None | Show the home folder in Finder. |
| [`(lispm-finder-open-directory STRING)`](https://github.com/LispMachineLab/lispm-finder/blob/57b9ef3eebab4663350ca2611bab61776426dcf8/lispm-finder.el#L1267) | `path` | Show the supplied directory in Finder. |
| [`(lispm-finder-back)`](https://github.com/LispMachineLab/lispm-finder/blob/57b9ef3eebab4663350ca2611bab61776426dcf8/lispm-finder.el#L825) | None | Return to the previous Finder folder. |
| [`(lispm-finder-forward)`](https://github.com/LispMachineLab/lispm-finder/blob/57b9ef3eebab4663350ca2611bab61776426dcf8/lispm-finder.el#L833) | None | Return to the Finder folder navigated back from. |
| [`(lispm-finder-up)`](https://github.com/LispMachineLab/lispm-finder/blob/57b9ef3eebab4663350ca2611bab61776426dcf8/lispm-finder.el#L841) | None | Show the enclosing Finder folder. |
| [`(lispm-finder-refresh)`](https://github.com/LispMachineLab/lispm-finder/blob/57b9ef3eebab4663350ca2611bab61776426dcf8/lispm-finder.el#L851) | None | Read the shown Finder folder again. |
| [`(lispm-finder-new-folder STRING)`](https://github.com/LispMachineLab/lispm-finder/blob/57b9ef3eebab4663350ca2611bab61776426dcf8/lispm-finder.el#L931) | `name` | Create and select a folder under the directory shown in Finder. |
| [`(lispm-browser)`](https://github.com/LispMachineLab/lispm-browser/blob/70ed386d8d18331c6b55c76e85a54c4730eba768/lisp/lispm-browser.el#L251) | None | Show the browser, opening its home page when no tab exists. |
| [`(lispm-browser-open-url STRING)`](https://github.com/LispMachineLab/lispm-browser/blob/70ed386d8d18331c6b55c76e85a54c4730eba768/lisp/lispm-browser.el#L308) | `url` | Navigate the shown browser tab to the supplied URL; create/show a tab when needed. |
| [`(lispm-browser-back)`](https://github.com/LispMachineLab/lispm-browser/blob/70ed386d8d18331c6b55c76e85a54c4730eba768/lisp/lispm-browser.el#L269) | None | Go back one page in the shown browser tab. |
| [`(lispm-browser-forward)`](https://github.com/LispMachineLab/lispm-browser/blob/70ed386d8d18331c6b55c76e85a54c4730eba768/lisp/lispm-browser.el#L274) | None | Go forward one page in the shown browser tab. |
| [`(lispm-browser-reload)`](https://github.com/LispMachineLab/lispm-browser/blob/70ed386d8d18331c6b55c76e85a54c4730eba768/lisp/lispm-browser.el#L279) | None | Reload the shown browser page. |
| [`(lispm-browser-new-tab "about:blank")`](https://github.com/LispMachineLab/lispm-browser/blob/70ed386d8d18331c6b55c76e85a54c4730eba768/lisp/lispm-browser.el#L378) | None | Open and show a new empty browser tab at `about:blank`. |
| [`(lispm-browser-next-tab)`](https://github.com/LispMachineLab/lispm-browser/blob/70ed386d8d18331c6b55c76e85a54c4730eba768/lisp/lispm-browser.el#L368) | None | Select the next browser tab, wrapping around. |
| [`(lispm-browser-previous-tab)`](https://github.com/LispMachineLab/lispm-browser/blob/70ed386d8d18331c6b55c76e85a54c4730eba768/lisp/lispm-browser.el#L373) | None | Select the previous browser tab, wrapping around. |
| [`(lispm-browser-close-shown-tab)`](https://github.com/LispMachineLab/lispm-browser/blob/70ed386d8d18331c6b55c76e85a54c4730eba768/lisp/lispm-browser.el#L418) | None | Close the browser tab currently shown. |
| [`(lispm-stickies)`](https://github.com/LispMachineLab/lispm-stickies/blob/dc6ff0cdf7e8d6cd5bea6919e9dc2e97161b23d8/lispm-stickies.el#L577) | None | Show saved sticky notes, creating the first note if none exists. |
| [`(lispm-stickies-new-note STRING)`](https://github.com/LispMachineLab/lispm-stickies/blob/dc6ff0cdf7e8d6cd5bea6919e9dc2e97161b23d8/lispm-stickies.el#L586) | `text` | Create a sticky note holding the supplied literal text. |
| [`(lispm-stickies-next-note)`](https://github.com/LispMachineLab/lispm-stickies/blob/dc6ff0cdf7e8d6cd5bea6919e9dc2e97161b23d8/lispm-stickies.el#L635) | None | Show the next sticky note, wrapping around. |
| [`(lispm-stickies-previous-note)`](https://github.com/LispMachineLab/lispm-stickies/blob/dc6ff0cdf7e8d6cd5bea6919e9dc2e97161b23d8/lispm-stickies.el#L640) | None | Show the previous sticky note, wrapping around. |
| [`(lispm-rotom)`](https://github.com/LispMachineLab/lispm-rotom/blob/bb9691cfce527726aefc43ba6112d13ab3a04328/lispm-rotom-ui.el#L584) | None | Open Rotom status, accounts and models. |
| [`(lispm-comfyui)`](https://github.com/LispMachineLab/lispm-comfyui/blob/dc63707fab3554d78814d1c79acf5bcf7335f8dd/lispm-comfyui.el#L2443) | None | Show the last ComfyUI workflow, or create an empty one. |
| [`(lispm-office)`](https://github.com/LispMachineLab/lispm-office/blob/eec9f99a686278bd045b1ac6038149a48315015b/lispm-office.el#L928) | None | Show current Agent work, or an overview outside an Agent conversation. |
| [`(lispm-mail)`](https://github.com/LispMachineLab/lispm-mail/blob/dbef17aefc47cecc948a56dd604268b31385d8ab/lispm-mail.el#L1443) | 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](https://github.com/LispMachineLab/lispm-finder/blob/57b9ef3eebab4663350ca2611bab61776426dcf8/lispm-finder.el#L899) and [folder creation](https://github.com/LispMachineLab/lispm-finder/blob/57b9ef3eebab4663350ca2611bab61776426dcf8/lispm-finder.el#L931).
- **Browser:** requires a graphical Emacs with WebKit xwidgets; [`lispm-browser-available-p`](https://github.com/LispMachineLab/lispm-browser/blob/70ed386d8d18331c6b55c76e85a54c4730eba768/lisp/lispm-browser.el#L105) 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](https://github.com/LispMachineLab/lispm-browser/blob/70ed386d8d18331c6b55c76e85a54c4730eba768/lisp/lispm-browser.el#L308) and [tab-close behavior](https://github.com/LispMachineLab/lispm-browser/blob/70ed386d8d18331c6b55c76e85a54c4730eba768/lisp/lispm-browser.el#L401).
- **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](https://github.com/LispMachineLab/lispm-stickies/blob/dc6ff0cdf7e8d6cd5bea6919e9dc2e97161b23d8/lispm-stickies.el#L586).
- **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](https://github.com/LispMachineLab/lispm-rotom/blob/bb9691cfce527726aefc43ba6112d13ab3a04328/lispm-rotom-ui.el#L584).
- **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](https://github.com/LispMachineLab/lispm-comfyui/blob/dc63707fab3554d78814d1c79acf5bcf7335f8dd/lispm-comfyui.el#L2443) and [workflow display](https://github.com/LispMachineLab/lispm-comfyui/blob/dc63707fab3554d78814d1c79acf5bcf7335f8dd/lispm-comfyui.el#L2065).
- **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](https://github.com/LispMachineLab/lispm-office/blob/eec9f99a686278bd045b1ac6038149a48315015b/lispm-office.el#L928).
- **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](https://github.com/LispMachineLab/lispm-mail/blob/dbef17aefc47cecc948a56dd604268b31385d8ab/lispm-mail.el#L1443).
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:
```sh
python -B verify_lispm_api.py
```
To additionally verify file hashes and exact public definitions in local owning
repositories, pass their parent directory:
```sh
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](../lispm_api_catalog.json) 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`](https://github.com/LispMachineLab/lispm-finder/commit/57b9ef3eebab4663350ca2611bab61776426dcf8) | `lispm-finder.el` |
| browser | [`70ed386d8d18`](https://github.com/LispMachineLab/lispm-browser/commit/70ed386d8d18331c6b55c76e85a54c4730eba768) | `lisp/lispm-browser.el` |
| stickies | [`dc6ff0cdf7e8`](https://github.com/LispMachineLab/lispm-stickies/commit/dc6ff0cdf7e8d6cd5bea6919e9dc2e97161b23d8) | `lispm-stickies.el` |
| rotom | [`bb9691cfce52`](https://github.com/LispMachineLab/lispm-rotom/commit/bb9691cfce527726aefc43ba6112d13ab3a04328) | `lispm-rotom-ui.el` |
| comfyui | [`dc63707fab35`](https://github.com/LispMachineLab/lispm-comfyui/commit/dc63707fab3554d78814d1c79acf5bcf7335f8dd) | `lispm-comfyui.el` |
| office | [`eec9f99a6862`](https://github.com/LispMachineLab/lispm-office/commit/eec9f99a686278bd045b1ac6038149a48315015b) | `lispm-office.el` |
| mail | [`dbef17aefc47`](https://github.com/LispMachineLab/lispm-mail/commit/dbef17aefc47cecc948a56dd604268b31385d8ab) | `lispm-mail.el` |
| kit | [`08102312ed35`](https://github.com/LispMachineLab/lispm-kit/commit/08102312ed356cc2d5a2b4620b35b423fe72018a) | `lispm-kit-commands.el` |
| agent | [`1b49c47886c6`](https://github.com/LispMachineLab/lispm-agent/commit/1b49c47886c677c6feabb4766172f5abc35628a8) | `lisp/lispm-tools.el` (working file modified) |