@appsoftwareltd/etherpk-mcp 0.14.0 → 0.15.0

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.
package/README.md CHANGED
@@ -64,7 +64,7 @@ every tool refuses a protected document.
64
64
  | Tasks handed over | `read_task`, `add_task_note`, `set_task` | Paste the agent a task reference copied in EtherPK. The reference still finds the task after lines are added above it, and refuses once the task's words change. |
65
65
  | Rename | `plan_rename`, `rename` | Links to the old name are rewritten. Renaming onto a name in use merges two documents and needs confirming. |
66
66
  | Images and files | `upload_asset`, `read_asset`, `list_assets` | `upload_asset` returns the markdown to paste into a document. It refuses hidden files and folders (`.ssh`, `.env`), the Headless Client's own config and cache, and files over 100 MiB. |
67
- | Publishing | `list_publications`, `create_publication`, `update_publication`, `publish` | `publish` writes to the folder set with the `publish` command. The agent can't choose one. |
67
+ | Publishing | `list_publications`, `create_publication`, `update_publication`, `publish` | `publish` writes to the folder set with the `publish` command. The agent can't choose one, and it never publishes to a GitHub repository, which only the `publish` command commits to. |
68
68
  | Themes | `list_themes`, `read_theme`, `read_theme_file`, `create_theme`, `customise_publication_theme`, `write_theme_file`, `delete_theme_file`, `import_theme_folder`, `delete_theme`, `preview_theme` | Bundled themes are read-only, and customising one copies it into the graph. `preview_theme` renders a site, with screenshots when a browser is set up. |
69
69
 
70
70
  `read_asset`, `read_theme` and `preview_theme` write only in the graph's `downloads` folder in the
@@ -187,6 +187,21 @@ npx @appsoftwareltd/etherpk-mcp publish --graph <id or name> --publication <id>
187
187
  computer instead, which NixOS needs.
188
188
  - `list_publications`, or **Settings → Publish** in EtherPK, shows the publication ids.
189
189
 
190
+ To publish straight to a branch of a GitHub repository, as one commit that the host watching the
191
+ branch deploys, give `--github` in place of `--out`, with a GitHub token that may read and write the
192
+ repository's Contents:
193
+
194
+ ```sh
195
+ ETHERPK_GITHUB_TOKEN=<token> npx @appsoftwareltd/etherpk-mcp publish --graph <id or name> --publication <id> --github <owner/name[#branch]>
196
+ ```
197
+
198
+ - The branch is `main` unless `#branch` names another. A publish never creates the branch.
199
+ - `--github` is remembered in place of the folder, so later runs need only the token.
200
+ - A publish that changes nothing makes no commit. The first publish to a branch that already holds
201
+ other files lists the files it would replace and stops, and `--replace` publishes anyway.
202
+ - The agent's `publish` tool never commits to a repository, because a commit can put the site
203
+ live. It can check the publication with `dryRun: true`.
204
+
190
205
  ## The agent skill
191
206
 
192
207
  The `etherpk` agent skill teaches an agent to make a blog, docs site or wiki folder in EtherPK's
@@ -218,7 +233,7 @@ install the package globally once with `npm install -g @appsoftwareltd/etherpk-m
218
233
  | `semantic setup` | Install the embedding runtime and model into the cache directory. |
219
234
  | `semantic status` | Whether semantic search is set up, and each cached graph's embedding progress. |
220
235
  | `semantic remove` | Delete the runtime and model. Stored embeddings stay, and are reused if you set up again. |
221
- | `publish (--graph <id or name> \| --folder <path>) --publication <id> [--out <dir>]` | Publish one publication of a graph to a folder and print the report. |
236
+ | `publish (--graph <id or name> \| --folder <path>) --publication <id> [--out <dir> \| --github <owner/name[#branch]> \| --dry-run] [--replace]` | Publish one publication of a graph to a folder, or as a commit to a GitHub repository, and print the report. |
222
237
  | `diagrams setup` | Install a Chromium into the cache directory, so a publish can draw Mermaid diagrams and maps. |
223
238
  | `diagrams status` | Which browser a publish would use, if any. |
224
239
 
@@ -236,6 +251,9 @@ install the package globally once with `npm install -g @appsoftwareltd/etherpk-m
236
251
  | `--all` | `logout`, `stop` | Every server, or every graph. |
237
252
  | `--publication <id>` | `publish` | Which publication of the graph. |
238
253
  | `--out <dir>` | `publish` | Where the site goes. Remembered for the graph and publication. |
254
+ | `--github <owner/name[#branch]>` | `publish` | Commit the site to this repository's branch instead. Remembered in place of `--out`. |
255
+ | `--replace` | `publish` | Let a first publish to a repository replace files on a branch that holds something else. |
256
+ | `--dry-run` | `publish` | Render and check the publication, print the whole report, and write nothing. |
239
257
 
240
258
  ### Environment variables
241
259
 
@@ -249,7 +267,9 @@ because the agent starts `serve` with its own environment.
249
267
  | `ETHERPK_MCP_SECRETS` | `file` keeps the agent token and Encryption Keys in the login file even where there is a keychain. |
250
268
  | `ETHERPK_MCP_CONFIG` | The login file. Default `~/.config/etherpk/mcp.json`, or under `XDG_CONFIG_HOME` when that is set. |
251
269
  | `ETHERPK_MCP_CACHE_DIR` | The cache directory for graphs, the semantic runtime and the model. Default `~/.cache/etherpk/mcp`, or under `XDG_CACHE_HOME` when that is set. |
252
- | `ETHERPK_MCP_PUBLISH_CONFIG` | The file that remembers each publication's folder. Default `publish.json` beside the login file. |
270
+ | `ETHERPK_MCP_PUBLISH_CONFIG` | The file that remembers each publication's folder or repository. Default `publish.json` beside the login file. |
271
+ | `ETHERPK_GITHUB_TOKEN` | The GitHub token `publish --github` commits with. Read from the shell that runs `publish`. |
272
+ | `ETHERPK_GITHUB_API_URL` | GitHub Enterprise Server's API (`https://<host>/api/v3`) in place of github.com's. |
253
273
  | `ETHERPK_MCP_SEMANTIC_THREADS` | Threads for the embedding model. Default a quarter of the cores, at most four. |
254
274
  | `ETHERPK_MCP_HOST_IDLE_SECONDS` | How long a graph's background process stays after its last agent has gone. Default 300. |
255
275
  | `ETHERPK_CHROMIUM` | A Chromium on this computer for drawing diagrams and maps, instead of the one `diagrams setup` installs. |