@geravant/sinain 1.0.9 → 1.0.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.
Files changed (2) hide show
  1. package/HEARTBEAT.md +62 -0
  2. package/package.json +4 -2
package/HEARTBEAT.md ADDED
@@ -0,0 +1,62 @@
1
+ # HEARTBEAT.md
2
+
3
+ > **Execution contract:**
4
+ > 1. Setup → call `sinain_heartbeat_tick` → act on result → HEARTBEAT_OK
5
+ > 2. You MUST call the tool. Do NOT skip it. Do NOT reply HEARTBEAT_OK without calling it first.
6
+
7
+ ---
8
+
9
+ ## Setup
10
+
11
+ 1. `sessions_history({ sessionKey: "agent:main:sinain", limit: 20, includeTools: false })`
12
+ 2. Determine **IDLE** status: no user activity in the last 30 minutes
13
+ 3. Compose **SESSION_SUMMARY**: 2–3 sentences describing the current state (what the user is doing, key topics, errors seen)
14
+
15
+ ---
16
+
17
+ ## Execute Tick
18
+
19
+ Call the `sinain_heartbeat_tick` tool:
20
+
21
+ ```
22
+ sinain_heartbeat_tick({ sessionSummary: "...", idle: true|false })
23
+ ```
24
+
25
+ The tool runs all scripts (git backup, signal analysis, insight synthesis) and writes the log entry automatically.
26
+
27
+ ---
28
+
29
+ ## Act on Result
30
+
31
+ - If `recommendedAction.action === "sessions_spawn"` → spawn a subagent with `.task`
32
+ - If `recommendedAction.action === "telegram_tip"` → send `.task` to Telegram (chat_id: 59835117)
33
+ - If `output` is not null → send to Telegram (chat_id: 59835117): `Suggestion: {suggestion}\n\nInsight: {insight}`
34
+
35
+ ---
36
+
37
+ ## Finish
38
+
39
+ Reply **HEARTBEAT_OK**
40
+
41
+ ---
42
+
43
+ ## Rules
44
+
45
+ - **Proactivity quota:** on active days, at least 2 ticks MUST produce output
46
+ - Max 2 subagents. NEVER repeat a recent action. Prefer depth over breadth.
47
+ - Memory mining, feedback, and curation run via plugin timer — do NOT invoke manually.
48
+ - Module management is on-demand, not per-tick — see SKILL.md for module commands.
49
+
50
+ ---
51
+
52
+ ## NemoClaw Provisioning
53
+
54
+ New Brev instance setup (run in Code-Server terminal):
55
+ ```
56
+ SINAIN_BACKUP_REPO=<git-url> npx sinain
57
+ ```
58
+ - Copies plugin files, patches `openclaw.json`, installs Python deps, restores memory from backup repo, reloads gateway
59
+ - Token printed at end (or visible in Brev dashboard → Gateway Token)
60
+ - Mac side: `./setup-nemoclaw.sh` → 5 prompts → overlay starts
61
+
62
+ Memory is git-backed via `git_backup.sh` on every heartbeat tick. New instances restore instantly via `SINAIN_BACKUP_REPO`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@geravant/sinain",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "sinain OpenClaw plugin — AI overlay for macOS",
5
5
  "type": "module",
6
6
  "bin": {
@@ -16,6 +16,8 @@
16
16
  "sinain-memory",
17
17
  "HEARTBEAT.md"
18
18
  ],
19
- "engines": { "node": ">=18" },
19
+ "engines": {
20
+ "node": ">=18"
21
+ },
20
22
  "license": "MIT"
21
23
  }