siyuan-sisyphus 0.2.6 → 0.2.10

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
@@ -6,7 +6,9 @@
6
6
 
7
7
  Direct command-line control for [SiYuan Note](https://b3log.org/siyuan). Think of it like `obsidian-cli` but for SiYuan — every MCP tool (fs, block, document, notebook, av, search, tag, file, timeline, system, flashcard, extension, mascot, feedback) is exposed as a subcommand you can call directly from a shell.
8
8
 
9
- > **Latest:** `v0.2.6` exposes the expanded guarded AV, snapshot, image-audit, image-reading, extension-diagnostic, and link-resolution workflows, and preserves mixed text/image results in JSON output. Thanks to [@LoneFireBlossom](https://github.com/LoneFireBlossom) for [PR #48](https://github.com/yangtaihong59/siyuan-plugins-mcp-sisyphus/pull/48) and PRs #50–#56, [@ray24777](https://github.com/ray24777) for [PR #57](https://github.com/yangtaihong59/siyuan-plugins-mcp-sisyphus/pull/57), and [@adminclaw](https://github.com/adminclaw) for [PR #58](https://github.com/yangtaihong59/siyuan-plugins-mcp-sisyphus/pull/58).
9
+ > **Latest:** `v0.2.10` fixes false readback failures after document deletion and misleading asset-reference errors, and includes the shared tool-help improvements.
10
+
11
+ > **v0.2.6:** `v0.2.6` exposes the expanded guarded AV, snapshot, image-audit, image-reading, extension-diagnostic, and link-resolution workflows, and preserves mixed text/image results in JSON output. Thanks to [@LoneFireBlossom](https://github.com/LoneFireBlossom) for [PR #48](https://github.com/yangtaihong59/siyuan-plugins-mcp-sisyphus/pull/48) and PRs #50–#56, [@ray24777](https://github.com/ray24777) for [PR #57](https://github.com/yangtaihong59/siyuan-plugins-mcp-sisyphus/pull/57), and [@adminclaw](https://github.com/adminclaw) for [PR #58](https://github.com/yangtaihong59/siyuan-plugins-mcp-sisyphus/pull/58).
10
12
 
11
13
  > **For AI models and coding agents:** before doing any SiYuan work with this CLI, run `siyuan-sisyphus skill install` first. The bundled skills provide the task-specific operating rules for safe search, reading, editing, export, database, tag, flashcard, timeline, and system workflows.
12
14
 
@@ -27,10 +29,16 @@ siyuan-sisyphus search fulltext --query "keyword" --page-size 10 --json | jq '.d
27
29
 
28
30
  ## Strict safe writes
29
31
 
30
- Strict safe writes are enabled by default in the plugin under Settings → MCP → Settings & Debug. Mutation commands first run the action with `validateOnly=true`, then submit a fresh UUIDv7 `requestId` and the returned `expected*Hash`. The returned value is a temporary in-memory lease credential, normally beginning with four hexadecimal characters; it is never used as a 16-bit state comparison because the HTTP coordinator resolves it to the leased full SHA-256 and compares that full hash with a fresh read before writing.
32
+ Strict safe writes are enabled by default in the plugin under Settings → MCP → Settings & Debug. Mutation commands first run the action with `validateOnly=true`, then copy the server-issued `requestId` and the returned `expected*Hash` (when present) unchanged; additive actions also require preflight to obtain a request ID. The returned value is a temporary in-memory lease credential, normally beginning with four hexadecimal characters; it is never used as a 16-bit state comparison because the HTTP coordinator resolves it to the leased full SHA-256 and compares that full hash with a fresh read before writing.
31
33
 
32
34
  Keep the plugin-hosted MCP HTTP server enabled while using strict CLI mutations. The CLI forwards these writes to that single coordinator so CLI, stdio, and HTTP do not create independent lease pools. Expired, consumed, or restart-invalidated leases require a new preflight. Turning strict writes off restores the legacy direct-call contract without hash concurrency checks, request idempotency, or post-write verification.
33
35
 
36
+ Request IDs and state credentials start at four hexadecimal characters. Copy them completely; do not generate or truncate them. Upgrade the plugin to v0.6.9 alongside this CLI and obtain fresh preflight credentials. The legacy AV `id` input remains accepted with a deprecation warning; use `avID` for new calls.
37
+
38
+ `feedback.submit` is an external operation: after user authorization, submit business parameters directly without `validateOnly`, `requestId`, or hash credentials. A mistaken preflight sends nothing and returns a hint. Feedback does not provide strict state verification or idempotent replay; do not automatically retry an unknown outcome.
39
+
40
+ Clients without MCP Resources can run `siyuan-sisyphus av help --topic ai-layout-guide` for the complete layout guide.
41
+
34
42
  ## Install
35
43
 
36
44
  ```bash
@@ -79,6 +87,7 @@ siyuan-sisyphus list [tool] List tools or a tool's acti
79
87
  siyuan-sisyphus help <tool> [action] Detailed help for a tool or action
80
88
  siyuan-sisyphus init Interactive config setup
81
89
  siyuan-sisyphus config list|get|set|use ... Manage saved SiYuan profiles
90
+ siyuan-sisyphus instances List running local SiYuan kernel APIs
82
91
  siyuan-sisyphus skill list|read|install [--bundle cli|mcp|all]
83
92
  Inspect or install agent skills
84
93
  siyuan-sisyphus --help | -h Top-level help
@@ -215,6 +224,16 @@ If you already used the older config path `~/.siyuan-mcp/config.json`, the CLI s
215
224
 
216
225
  The CLI respects the same plugin UI configuration as MCP clients: disabled tools/actions are hidden from `list`/`help` and cannot be executed. Notebook-level permissions are also enforced by reading the same `/data/storage/petal/...` configuration through the API.
217
226
 
227
+ ## File transfer with the kernel endpoint
228
+
229
+ With the kernel coordinator enabled, `file upload_asset --local-file-path ...` automatically stages bytes before strict preflight/commit. Copy the issued requestId and expectedSourceHash from `--validate-only`. Uploads are capped at 10 MiB and staged for 10 minutes. Preflight also returns uploadSource for replay without reading a local file; supply exactly one source. Changed files require new preflight.
230
+
231
+ `file export_resources --paths-json '["assets/example.png"]' --output-path ./export.zip` and `file extract_doc --id <document-ID> --output-dir ./exports` download and save locally, reporting SHA-256. Existing destinations are refused and siblings preserved. Exports remain external side effects without strict write guarantees; validateOnly does not execute.
232
+
233
+ Kernel delegation supports cooperative Ctrl-C cancellation: stop before commit; once commit starts, wait for its real outcome. Downloads stream to disk with incremental SHA-256 and clean partial output on cancellation/failure (512 MiB export limit; 120 seconds per file). Uploads reuse matching kernel-verified staging via fingerprint lookup.
234
+
235
+ Kernel delegation assigns a transport taskId. On a lost response, the CLI queries that task’s short-lived cached result without repeating the business call. If recovery is unavailable, outcome_unknown includes taskId; reconcile using the original business requestId. Ordinary kernel read actions have an aggregate budget of 128 API calls / 8 MiB; narrow queries or use smaller pages when read_budget_exceeded is returned.
236
+
218
237
  ## License
219
238
 
220
239
  MIT © Taihong Yang