Skip to content

Latest commit

 

History

History
183 lines (148 loc) · 10.4 KB

plugin-tools.md

File metadata and controls

183 lines (148 loc) · 10.4 KB

plugin_read and plugin_action

The two tools through which God Mode reads and drives Paseo plugins that describe themselves (the contract). Nothing here is specific to any plugin.

plugin_read

Read-only (readOnlyHint: true).

Argument Meaning
plugin The plugin: its id, its title, an alias, or the words the user said. Empty: the catalog of every installed plugin.
operation A read of that plugin, by id or by its words. Empty: the plugin's main (default) read.
args The read's arguments, an object.
offset Only to read on past a cut answer: the next_offset it gave, with the same plugin, operation and args.

The text the assistant reads gives the read's whole description and the answer in a compact form: key: value lines, a list with objects in it as a key (N): heading and one key=value; key=value line per item, with empty strings, nulls and empty lists or objects left out (false stays). Up to 8000 characters of it come whole. A longer answer is cut after the last whole item that fits, and the text says how much is left and which offset reads on, except for a list the read declares chronological: without an offset its newest items are kept instead.

What it answers (structuredContent, every field optional):

Field When
plugins Without plugin: every installed plugin with id, title, summary, available, reason (when not available), reads (id, title, description, args, main), actions (id, title, description, args, risk, asks_first) and skipped (operations dropped from its description, with the reason). Also returned for a plugin that has no main read.
plugin, title, operation Which read ran.
about The read's description: how to read result.
result The plugin's answer, trimmed to its output.fields; always an object.
offset, next_offset The text was cut or read on: where this part starts, and the offset that reads on (null at the end).
refused, reason The read's outcome says the plugin could not give it.
untrusted The read is marked untrusted.
reads The plugin's other reads (id, title, description, args, main), so a deeper read of the same plugin, such as one item's full detail, needs no catalog first. Left out when it has none.
actions The plugin's actions with their arguments, so plugin_action needs no lookup first.
needs_clarification The plugin or the operation was not clear; candidates to ask the user about.

plugin_action

A write (openWorldHint: true). It needs a signed-in caller; every caller that came through OAuth, Claude or ChatGPT, is one. Any other call gets the error "plugin_action needs a signed-in user."

Argument Meaning
plugin Required. As for plugin_read.
operation Required. An action of that plugin, by id or by its words.
args The action's arguments; the fixed ones may be left out.
confirmation The token from needs_confirmation, only after the user said yes.
Field Meaning
outcome done, needs_confirmation or refused.
delivered true: the action ran, never repeat it. false: nothing happened (yet).
reason Why it was refused.
risk The action's risk, with needs_confirmation.
confirm_text, confirmation, expires_at What to tell the user, the token, and when it expires.
target, target_changed The facts about the action's target, read from the plugin; target_changed when they differ from what the user confirmed.
untrusted The action is marked untrusted.
result The plugin's answer, trimmed to its output.fields.
needs_clarification As for plugin_read.

Discovery

Every call lists the installed plugins (plugin.list) and asks each running one for meta.describe, all at once, with 4 seconds each. A plugin that is not running, has no meta.describe, throws, answers late or answers an unusable description is listed with the reason, and the others still work. When plugin is exactly a plugin's id, only that plugin is asked. Nothing is cached: a plugin reloaded a minute ago is described as it is now.

The catalog as text:

Plugins God Mode can use:
- Desk lamp (lamp): The lamp on the desk: on or off, and how bright.
  Reads (plugin_read): state (main).
  Actions (plugin_action): dim (level: 10 | 50 | 100 (required) – Brightness in percent); off [asks first].
Installed, nothing for God Mode: notes (does not describe itself to God Mode).

A plugin with dropped operations gets one more line, Dropped from its description: <id> (<reason>).

Names

  • A plugin is found by its id, title or an alias, ignoring case; otherwise by the words the user said, against its id, manifest name, title and aliases (words match on a shared start, so inflected forms work). Several candidates, or none, become needs_clarification with the plugins to choose from.
  • A plugin that is installed but does not describe itself answers that it offers nothing to God Mode, with the reason.
  • An operation is found by its id (spaces read as _) or by the words of its id and title. An exact id of the wrong kind is refused, naming the other tool.

Arguments

Checked before anything is called; a refusal is a JSON-RPC error that says what the operation takes, such as level: 10 | 50 | 100 (required) – Brightness in percent.

  • args must be an object.
  • At every level, a key the schema does not name is refused unless that object's additionalProperties is true or a schema.
  • Checked: type (integer included), const, enum, anyOf/oneOf (one alternative must fit), minimum, maximum, minLength, maxLength, required, nested properties, items. Not checked here: $ref, allOf, pattern, format, exclusive bounds, array lengths. The plugin's own contract checks again.
  • fixed arguments are merged in last: repeating a fixed value is harmless, a different one is refused.

Results

  • With output.fields, only those top-level fields are kept.
  • A key whose name contains token, secret, password, passwd, credential, cookie, bearer, authorization, api key or private key (any case, any depth) has its value replaced by "[redacted]" when the value is text; counts and flags stay.
  • A list or a bare value is wrapped as { "value": … }, so result is always an object.
  • The text is key: value lines (empty strings and nulls left out, nested values as JSON), cut at 1,500 characters for a read and 800 for an action. A read's text starts with its title and description (the first 300 characters of it) and ends with the plugin's other reads and then its actions. The cut applies to the result lines only, and a value is cut from its end, except a list the plugin declares in output.chronological (it runs oldest to newest): that one is shortened from its start, keeping the newest items, one per line, and says how many earlier ones are not shown. The whole answer is always in structuredContent. ChatGPT's model sees both; Claude's model sees only the text.

Outcomes

What happened Answer
The action ran outcome: "done", delivered: true, "It ran once; never repeat it for this request."
The answer's outcome fields say it was not done outcome: "refused", delivered: false, reason, "Nothing happened; tell the user why." A read: refused: true, reason.
The plugin threw, or the call timed out An error: "Paseo request failed: …"; for an action also "Unknown whether it took effect: never say it did."
God Mode cannot reach the Paseo daemon An error: "Paseo is offline: the computer running it is probably asleep or disconnected." For an action also "Nothing was sent."

Actions that ask first

An action asks first when its risk is above low, or when it says confirm: "always".

  1. First call. Arguments are checked. With a target, its read runs and its shown fields become the facts. Nothing else runs. The answer is outcome: "needs_confirmation", delivered: false, confirm_text, confirmation, expires_at (and target), with the instruction to say confirm_text and call again only after the user's yes.
  2. What the user hears. confirm_text is the plugin's confirmText with {argument} and {target.field} filled in; any argument or fact it does not name follows in brackets. Without a confirmText: <plugin title>: <action title>. plus the same brackets.
  3. Second call. With a target, its read runs again first. The action runs only if the token fits this exact call and these facts. Otherwise a new confirmation comes back, after "That confirmation expired.", "That confirmation was for something else." or "The target changed since the user confirmed; tell them what it is now." (target_changed: true).
  4. Target unavailable. If the target's read fails on either call, the answer is outcome: "refused" with reason: "its target could not be read: …", and nothing runs.

Example, first call of an action with a target:

{
  "plugin": "desk", "title": "Help desk", "operation": "close",
  "outcome": "needs_confirmation", "delivered": false, "risk": "destructive",
  "confirm_text": "Close «Printer jams» filed by Ann?",
  "target": { "title": "Printer jams", "owner": "Ann" },
  "confirmation": "mfz9k2c0.N2Vh…Kq0.Xp4c…a1w",
  "expires_at": "2026-10-18T09:02:00.000Z"
}

The same call after the yes, when the plugin refused:

{ "plugin": "desk", "title": "Help desk", "operation": "close",
  "outcome": "refused", "delivered": false, "reason": "already closed",
  "result": { "ok": false, "error": "already closed" } }

The token is <expiry in base 36>.<signature>, plus .<facts signature> when the action has a target: HMAC-SHA256 over the plugin, operation, method and canonical arguments (and, separately, over the shown facts), keyed with the plugin's own secret stored on the Mac (~/.paseo/god-mode/secret), valid two minutes. It is not spent on use. What it does and does not prove: security.md.

Timing

A tool call has 30 seconds in all, the connection to the Paseo daemon (up to 5 seconds) and the descriptions included. Paseo 0.11 stops waiting for a plugin RPC after 30 seconds without stopping the handler. A confirmed action with a target makes two extra reads (one per call).