@dsiloed/silo-link 1.8.3 → 1.8.4
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.
|
@@ -4,5 +4,5 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Keep this block SHORT. It loads into every SiloLink-launched agent's context.
|
|
6
6
|
*/
|
|
7
|
-
export declare const SILOLINK_CLAUDE_MD_BLOCK = "## Remote Communication (SiloLink)\n\nApplies only when launched via SiloLink (prompt contains `conversation_id` or tells you to `remote_register`). Ignore otherwise.\n\n- Register with `remote_register({ conversation_id })`.\n- Call `remote_load_context()` ONLY on a fresh session. Skip it when you were resumed \u2014 you already have the history.\n- All communication via `remote_notify` / `remote_ask`. Never print to the terminal; the user is in Harmoniq, not watching.\n- **@-mention discipline.** Your launch prompt has a `**Dispatched by:** @<DispatcherHandle>` line. ANY message that needs your dispatcher to act \u2014 mid-task questions, blockers, errors, requests for direction, AND your final completion \u2014 MUST start with that `@<DispatcherHandle
|
|
7
|
+
export declare const SILOLINK_CLAUDE_MD_BLOCK = "## Remote Communication (SiloLink)\n\nApplies only when launched via SiloLink (prompt contains `conversation_id` or tells you to `remote_register`). Ignore otherwise.\n\n- Register with `remote_register({ conversation_id })`.\n- Call `remote_load_context()` ONLY on a fresh session. Skip it when you were resumed \u2014 you already have the history.\n- All communication via `remote_notify` / `remote_ask`. Never print to the terminal; the user is in Harmoniq, not watching.\n- **@-mention discipline.** Your launch prompt has a `**Dispatched by:** @<DispatcherHandle>` line. ANY message that needs your dispatcher to act \u2014 mid-task questions, blockers, errors, requests for direction, AND your final completion \u2014 MUST start with that `@<DispatcherHandle>` **AND be posted to the report conv** (`mcp__silolink__remote_post({ conversation_id: <report_to_conversation_id> })`), not via `remote_notify` to the dispatch conv. Mention-dispatch only wakes the dispatcher's LlmAgent when the @-mention lands in a conversation they're a member of \u2014 the dispatch conv is per-session and they're typically not subscribed; the report conv is the channel they read. Routine progress notes (\"phase 2 done, starting tests\") still go via `remote_notify` (no @-mention needed).\n- Send a `remote_notify` after every major step (file edits, commits, merges, errors). Going silent = user blind.\n- Poll loop: `remote_poll()` blocks up to 30s server-side (longer blocks risk Claude killing the tool as hung \u2014 keep this value as-is). If `{pending:true}`, loop again. The poll loop is the **safety net**, not the primary exit path \u2014 see \"Self-kill when work is done\" below. After **~60 consecutive pending (~30 min idle)**, `remote_notify(\"Going idle\")`, `remote_unregister()`, exit.\n- Every polled message is new; the queue drops it on your next call. Never ignore one. `remote_load_context()` is history-only.\n- Prefer small/cheap models for mechanical work (running specs, PR creation, merges). Use one-shot sub-sessions when possible to keep the main polling session's context lean.\n\n### Two conversations are in play\n\nYou typically have TWO distinct conversation ids in your session:\n- **Dispatch conv** \u2014 the conv you `remote_register`'d on (e.g. `silolink-claude-convN`). SiloLink relays operator messages from this conv to your poll loop.\n- **Report conv** \u2014 the conv where the originating user is watching for your final findings. Passed to you as `report_to_conversation_id` in your launch prompt. Often different from the dispatch conv (e.g. dispatch is per-ticket, report is the user's group/DM channel).\n\nRouting rule, by message kind:\n\n| Message kind | Tool | Lands in | @-mention? |\n|---|---|---|---|\n| Routine progress (\"phase 2 done\", logs, heartbeats) | `remote_notify` | dispatch conv | no |\n| **Mid-task questions / blockers / requests for direction** | `mcp__silolink__remote_post({ conversation_id: <report_to_conversation_id> })` | **report conv** | **YES \u2014 start with `@<DispatcherHandle>`** |\n| Final findings on completion | `mcp__silolink__remote_post({ conversation_id: <report_to_conversation_id> })` | report conv | YES \u2014 start with `@<DispatcherHandle>` |\n\nWhy mid-task questions go to the **report conv** and not the dispatch conv: the dispatch conv (`silolink-claude-convN`) is per-session and the dispatcher's LlmAgent isn't typically subscribed to it. `remote_notify` with an @-mention there lands silently and the dispatcher never wakes. The report conv is the channel they read \u2014 @-mention dispatch fires there.\n\n### Self-kill when work is done\n\nDon't sit in the poll loop after your work for this dispatch is finished. When you reach a true terminal state, call `remote_notify(\"Done \u2014 unregistering\")` then `remote_unregister()` and exit cleanly. Orphan idle CCs each burn ~$0.50/hr on the safety-net timeout, so explicit self-kill is the primary exit path \u2014 when it's actually time.\n\n**HARD PRECONDITIONS \u2014 verify ALL before calling `remote_unregister()`. If any fails, do NOT self-kill; stay in the poll loop and finish.**\n\n1. **No uncommitted changes.** `git status --porcelain` returns empty in your cwd (and in any worktree you opened). If you made edits, commit them first.\n2. **No unpushed commits.** `git log @{u}..` returns empty on every branch you touched. Push before you exit.\n3. **MR opened if your runbook requires one.** Verify via `git_provider_tool get_mr` that the MR exists with `state: \"opened\"`. \"I plan to open it\" is not enough \u2014 open it, then verify.\n4. **No subprocess you started is still running.** Tests, builds, long scripts: wait for the exit code and capture the result. **\"Now running tests\" is NOT a terminal state** \u2014 \"tests passed (or failed with documented next steps)\" is.\n5. **Final findings posted, starting with `@<DispatcherHandle>`** per the @-mention discipline above. Final goes to `report_to_conversation_id` if set, otherwise the dispatch conv via `remote_notify`. Same rule applies to *any* mid-flight message that needed dispatcher action \u2014 they all required the mention, not just this last one.\n\nWhat counts as \"done\" is agent-specific (your runbook may add more preconditions on top of the five above). When in doubt: stay in the poll loop, `remote_notify` what you're waiting on, and let the operator decide.\n\nIf the work fails or you hit a question the operator must answer, do NOT self-kill. Stay in the poll loop and wait \u2014 exiting with unanswered questions strands the operator.\n\n### If a report-conv post fails\n\nIf `remote_post` to your `report_to_conversation_id` returns an error (404 not found, 403 forbidden, etc.):\n1. Retry once. Transient errors do happen.\n2. If the second attempt fails the same way, do NOT silently drop your findings. Post them to your **dispatch conv** instead with a clear note: `\u26A0 remote_post to report conv <X> returned <error> \u2014 posting findings here for triage`. Then exit.\n\nFindings landing somewhere a human can see them matters more than landing in the \"right\" channel. Never let an unreachable report conv strand a completed task.\n\n### Permissions\n\nYou were launched with `--dangerously-skip-permissions` and silolink has pre-cleared the bypass-permissions consent gate, so per-command permission prompts should not appear. If you DO hit one mid-task (usually CC's hardcoded circuit breaker on patterns like `rm -rf /` or `rm -rf ~`):\n\n- Do NOT sit waiting \u2014 there's no human at the keyboard to click \"Yes\".\n- Call `remote_ask` with the prompt text so the operator can decide.\n- The operator can also drive the prompt directly from the web UI's peek dialog (the `send_keys` control command sends keystrokes into your tmux pane).\n\nIf a prompt appeared on a routine command (not a circuit-breaker pattern), report it via `remote_notify` \u2014 it likely means the bypass-consent didn't get pre-written and silolink needs to be restarted.\n";
|
|
8
8
|
//# sourceMappingURL=claude-md-block.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-md-block.d.ts","sourceRoot":"","sources":["../../src/cli/claude-md-block.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,
|
|
1
|
+
{"version":3,"file":"claude-md-block.d.ts","sourceRoot":"","sources":["../../src/cli/claude-md-block.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,wBAAwB,o3NA8DpC,CAAC"}
|
|
@@ -11,7 +11,7 @@ Applies only when launched via SiloLink (prompt contains \`conversation_id\` or
|
|
|
11
11
|
- Register with \`remote_register({ conversation_id })\`.
|
|
12
12
|
- Call \`remote_load_context()\` ONLY on a fresh session. Skip it when you were resumed — you already have the history.
|
|
13
13
|
- All communication via \`remote_notify\` / \`remote_ask\`. Never print to the terminal; the user is in Harmoniq, not watching.
|
|
14
|
-
- **@-mention discipline.** Your launch prompt has a \`**Dispatched by:** @<DispatcherHandle>\` line. ANY message that needs your dispatcher to act — mid-task questions, blockers, errors, requests for direction, AND your final completion — MUST start with that \`@<DispatcherHandle
|
|
14
|
+
- **@-mention discipline.** Your launch prompt has a \`**Dispatched by:** @<DispatcherHandle>\` line. ANY message that needs your dispatcher to act — mid-task questions, blockers, errors, requests for direction, AND your final completion — MUST start with that \`@<DispatcherHandle>\` **AND be posted to the report conv** (\`mcp__silolink__remote_post({ conversation_id: <report_to_conversation_id> })\`), not via \`remote_notify\` to the dispatch conv. Mention-dispatch only wakes the dispatcher's LlmAgent when the @-mention lands in a conversation they're a member of — the dispatch conv is per-session and they're typically not subscribed; the report conv is the channel they read. Routine progress notes ("phase 2 done, starting tests") still go via \`remote_notify\` (no @-mention needed).
|
|
15
15
|
- Send a \`remote_notify\` after every major step (file edits, commits, merges, errors). Going silent = user blind.
|
|
16
16
|
- Poll loop: \`remote_poll()\` blocks up to 30s server-side (longer blocks risk Claude killing the tool as hung — keep this value as-is). If \`{pending:true}\`, loop again. The poll loop is the **safety net**, not the primary exit path — see "Self-kill when work is done" below. After **~60 consecutive pending (~30 min idle)**, \`remote_notify("Going idle")\`, \`remote_unregister()\`, exit.
|
|
17
17
|
- Every polled message is new; the queue drops it on your next call. Never ignore one. \`remote_load_context()\` is history-only.
|
|
@@ -23,7 +23,15 @@ You typically have TWO distinct conversation ids in your session:
|
|
|
23
23
|
- **Dispatch conv** — the conv you \`remote_register\`'d on (e.g. \`silolink-claude-convN\`). SiloLink relays operator messages from this conv to your poll loop.
|
|
24
24
|
- **Report conv** — the conv where the originating user is watching for your final findings. Passed to you as \`report_to_conversation_id\` in your launch prompt. Often different from the dispatch conv (e.g. dispatch is per-ticket, report is the user's group/DM channel).
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Routing rule, by message kind:
|
|
27
|
+
|
|
28
|
+
| Message kind | Tool | Lands in | @-mention? |
|
|
29
|
+
|---|---|---|---|
|
|
30
|
+
| Routine progress ("phase 2 done", logs, heartbeats) | \`remote_notify\` | dispatch conv | no |
|
|
31
|
+
| **Mid-task questions / blockers / requests for direction** | \`mcp__silolink__remote_post({ conversation_id: <report_to_conversation_id> })\` | **report conv** | **YES — start with \`@<DispatcherHandle>\`** |
|
|
32
|
+
| Final findings on completion | \`mcp__silolink__remote_post({ conversation_id: <report_to_conversation_id> })\` | report conv | YES — start with \`@<DispatcherHandle>\` |
|
|
33
|
+
|
|
34
|
+
Why mid-task questions go to the **report conv** and not the dispatch conv: the dispatch conv (\`silolink-claude-convN\`) is per-session and the dispatcher's LlmAgent isn't typically subscribed to it. \`remote_notify\` with an @-mention there lands silently and the dispatcher never wakes. The report conv is the channel they read — @-mention dispatch fires there.
|
|
27
35
|
|
|
28
36
|
### Self-kill when work is done
|
|
29
37
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-md-block.js","sourceRoot":"","sources":["../../src/cli/claude-md-block.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG
|
|
1
|
+
{"version":3,"file":"claude-md-block.js","sourceRoot":"","sources":["../../src/cli/claude-md-block.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8DvC,CAAC"}
|