@repogo/plugins 0.1.44 → 0.1.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +5 -4
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -213,7 +213,8 @@ link previews and crawlers fetch any URL they're shown, so a write answers
213
213
  other error, such as a failed `fetch`, answers 500 `Internal server error`,
214
214
  since its text may hold a token or a path; the host logs the real one. The
215
215
  device address takes calls only from this machine and its containers'
216
- networks, and refuses a browser's, since any web page can reach loopback.
216
+ networks, and refuses a browser's, since any web page can reach loopback:
217
+ call it by an address, `localhost` or `host.docker.internal`, not another name.
217
218
 
218
219
  A body that isn't JSON answers 400, as does one over 1 MB at the device
219
220
  address (413 at the public one), and the public address answers 429 to a
@@ -634,8 +635,8 @@ Write `console.log` (or `warn`, `error`, `debug`); nothing else is needed. The
634
635
  host keeps every line with the plugin, the method and the call that wrote it,
635
636
  who called (`card`, `agent`, `cron`, `code`, or `http` and `device` for HTTP), and the chat for an agent's call, plus
636
637
  the arguments as JSON. An error a method throws, or one nothing caught, is
637
- kept too, with its stack. Read them with the agent's `plugins_logs` tool, or on
638
- a card with `<Data method="repogo:plugins.logs">`, which reloads as lines land:
638
+ kept too, with its stack. Read them with the agent's `plugins_logs` tool, or
639
+ from a plugin with `ctx.host("plugins.logs", …)` for a card to show:
639
640
  `plugin`, `level` (that level and worse), `method`, `since`, `until`, `query`
640
641
  (a substring) and `limit` narrow it. The `plugins` tool shows each plugin's
641
642
  `errors` in the last hour. Lines older than 7 days go, and the oldest hours of
@@ -654,7 +655,7 @@ Every method, handler and cron gets `ctx`:
654
655
  | `collections`, `kv`, `streams`, `buckets` | The plugin's data |
655
656
  | `call(method, input)` | Runs a method of a plugin in the same folder; `"open"` is this plugin's own |
656
657
  | `plugins()` | The plugins in the same folder, with their methods |
657
- | `host(method, params)` | Runs one of the host's methods that agents and cards may call (`git.status`, `chats.list`, `actions.run`, …); others fail with `FORBIDDEN`, and one that doesn't exist with `INTERNAL` |
658
+ | `host(method, params)` | Runs one of the host's methods that agents may call, and `actions.*` (`git.status`, `chats.list`, `actions.run`, …); others fail with `FORBIDDEN`, and one that doesn't exist with `INTERNAL`. It's how a host read reaches a card, which can't call the host's methods itself |
658
659
  | `mcp(server, tool, input)` | Runs a tool of an MCP server the user connected in RepoGo and switched on for the calling project; see below |
659
660
  | `notify({ title, body, page?, url?, collapse? })` | Alerts every paired phone; a tap opens `url` (an `https` or `itms-services` link) if set, else `page`, and alerts sharing `collapse` replace each other |
660
661
  | `activity({ id, title, body?, page?, symbol?, tint?, label?, compactLabel?, progress?, timer?, status? })` | Shows or updates a Live Activity on every paired phone; see below |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@repogo/plugins",
3
- "version": "0.1.44",
3
+ "version": "0.1.45",
4
4
  "description": "Write RepoGo plugins: collections and methods over SQLite that agents and cards call",
5
5
  "type": "module",
6
6
  "exports": {