viveworker 0.8.8 → 0.8.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.
@@ -148,7 +148,7 @@ async function handlePermissionRequest() {
148
148
  } else if (toolName === "Bash") {
149
149
  approvalKind = "command";
150
150
  const cmd = String(toolInput.command || "");
151
- messageText = `Command approval needed.\n\`\`\`\n${cmd.slice(0, 500)}\n\`\`\``;
151
+ messageText = `Command approval needed.\n\`\`\`\n${escapeMarkdownCodeFenceBody(cmd.slice(0, 500))}\n\`\`\``;
152
152
  } else if (toolName === "ExitPlanMode") {
153
153
  approvalKind = "plan";
154
154
  messageText = "Plan approval needed.";
@@ -708,6 +708,10 @@ function sanitizeForPath(s) {
708
708
  return s.replace(/[^a-zA-Z0-9_-]/gu, "_").slice(0, 64);
709
709
  }
710
710
 
711
+ function escapeMarkdownCodeFenceBody(text) {
712
+ return String(text || "").replace(/```/gu, "\\`\\`\\`");
713
+ }
714
+
711
715
  function encodeFilePathForSnapshot(filePath) {
712
716
  return filePath.replace(/[/\\]/gu, "_") + ".snap";
713
717
  }
@@ -34,9 +34,14 @@ Keep onboarding calm and step-by-step. Do not make the user debug config files u
34
34
  ## Tool Selection
35
35
 
36
36
  - Use `viveworker_notify` for informational milestones that should appear on the phone or timeline, such as "build finished", "review ready", or "agent is blocked".
37
+ - Use `viveworker_stats` when the user asks for viveworker package adoption or usage stats.
38
+ - Use `viveworker_share_list` when the user asks what is currently in File Share or asks for share usage metrics.
39
+ - Use `viveworker_a2a_activity` or `viveworker_a2a_card` when troubleshooting A2A activity or local agent-card settings.
40
+ - Use `viveworker_moltbook_list`, `viveworker_moltbook_show`, or `viveworker_moltbook_thread` when inspecting Moltbook inbox comments or threads.
37
41
  - Use `viveworker_ask` when the next step depends on a human preference, missing requirement, or choice that should not be guessed.
38
42
  - Use `viveworker_request_approval` before actions that are externally visible, hard to undo, risky, sensitive, delegated, paid, or likely to surprise the user.
39
43
  - Use `viveworker_share_file` when the user wants a workspace deliverable shared as a limited File Share URL. Good fits include `.html`, `.htm`, `.pdf`, `.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`, and `.csv`.
44
+ - Use `viveworker_share_replace` when the user wants to replace or update the file behind an existing File Share slug.
40
45
  - Use `viveworker_thread_share` when context should move to another Codex session, Claude session, or viveworker inbox while preserving a human-visible handoff.
41
46
  - Use `viveworker_send_a2a_task` only for registered A2A target aliases and bounded tasks with clear acceptance criteria.
42
47
 
@@ -47,10 +52,12 @@ Keep onboarding calm and step-by-step. Do not make the user debug config files u
47
52
  - Include relevant file refs, but never include secrets, tokens, private keys, or unnecessary file contents.
48
53
  - Treat timeout, rejection, or transport failure as "not approved". Do not continue as if approval was granted.
49
54
  - After the tool returns, summarize the decision or returned artifact to the user.
55
+ - Read-only inspection tools use fixed command allowlists. Do not try to route arbitrary shell commands or side-effectful viveworker CLI actions through MCP.
50
56
 
51
57
  ## File Share Rules
52
58
 
53
59
  - Share only files inside the workspace root.
60
+ - Replacing an existing share changes what existing recipients see at that URL; require phone approval and make that consequence clear.
54
61
  - Do not share `.env`, credential files, private keys, `.ssh`, `.aws`, `.gnupg`, or secret-looking paths.
55
62
  - Prefer sharing final deliverables, not internal source files, unless the user explicitly asks.
56
63
  - For unsupported file types, explain the accepted types and suggest exporting to HTML, PDF, image, or CSV first.
@@ -23,10 +23,18 @@ Then restart the Claude Code session. If the tools are not available, ask the us
23
23
  ## Tools
24
24
 
25
25
  - `viveworker_status` checks bridge, pairing, Remote connection, A2A, File Share, and Moltbook state.
26
+ - `viveworker_stats` reads package adoption and usage stats.
27
+ - `viveworker_share_list` lists File Share uploads and optional usage metrics.
28
+ - `viveworker_a2a_activity` reads local A2A activity.
29
+ - `viveworker_a2a_card` reads the current local A2A agent card.
30
+ - `viveworker_moltbook_list` lists Moltbook inbox comments.
31
+ - `viveworker_moltbook_show` reads one Moltbook comment.
32
+ - `viveworker_moltbook_thread` reads the thread for one Moltbook comment.
26
33
  - `viveworker_notify` sends an informational phone notification and records a timeline entry.
27
34
  - `viveworker_ask` asks the paired phone a question and waits for the answer.
28
35
  - `viveworker_request_approval` asks the phone to approve or reject a proposed action.
29
36
  - `viveworker_share_file` uploads a workspace file to File Share after phone approval. For password-protected handoff, pass `tokenize: true` to return a short-lived passwordless `?t=` URL.
37
+ - `viveworker_share_replace` replaces the file behind an existing File Share slug after phone approval.
30
38
  - `viveworker_share_link` mints a short-lived passwordless `?t=` URL for an existing password-protected File Share slug after phone approval.
31
39
  - `viveworker_thread_share` shares context into another Codex / Claude / inbox thread.
32
40
  - `viveworker_send_a2a_task` sends a task to a registered A2A target after phone approval.
@@ -36,9 +44,11 @@ Then restart the Claude Code session. If the tools are not available, ask the us
36
44
  - If the user says "ask me on my phone", "スマホに聞いて", or a short decision blocks progress, use `viveworker_ask`.
37
45
  - If the user asks you to proceed with a risky, external, irreversible, payment-related, or user-visible action, use `viveworker_request_approval`.
38
46
  - If the user asks for a report, prototype, screenshot, PDF, CSV, or standalone HTML to become a shareable link, use `viveworker_share_file`.
47
+ - If the user asks to replace or update the file at an existing File Share link, use `viveworker_share_replace`.
39
48
  - If the user asks for a password-protected share but wants the recipient to open it without knowing the password, use `viveworker_share_file` with `password` and `tokenize: true`, or use `viveworker_share_link` for an existing slug.
40
49
  - If the user says "share this with Codex/Claude", "Aの内容をBに共有して", or wants context handed to another session, use `viveworker_thread_share`.
41
50
  - If the user wants another registered agent to do work, use `viveworker_send_a2a_task`.
51
+ - For troubleshooting or inspection, prefer the read-only MCP tools above before asking the user to run CLI commands.
42
52
 
43
53
  ## Prompting rules
44
54
 
@@ -64,6 +74,7 @@ Claude may not automatically notice newly shared messages from another session.
64
74
 
65
75
  - MCP is a control-plane surface, not a shell executor.
66
76
  - Do not run shell strings through MCP.
67
- - File Share and A2A task sending require phone approval.
77
+ - Read-only inspection tools use fixed command allowlists and should not be used to mutate local state.
78
+ - File Share uploads/replacements and A2A task sending require phone approval.
68
79
  - Use registered A2A aliases only; do not ask the user to paste API keys into prompts.
69
80
  - Prefer `viveworker_status` before troubleshooting a missing notification, stale pairing, or remote connectivity issue.