@geravant/sinain 1.0.1 → 1.0.3
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/HEARTBEAT.md +62 -0
- package/install.js +1 -1
- package/package.json +1 -1
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/install.js
CHANGED
|
@@ -38,7 +38,7 @@ const reqFile = path.join(memoryDst, "requirements.txt");
|
|
|
38
38
|
if (fs.existsSync(reqFile)) {
|
|
39
39
|
console.log(" Installing Python dependencies...");
|
|
40
40
|
try {
|
|
41
|
-
execSync(`pip3 install -r "${reqFile}" --quiet`, { stdio: "inherit" });
|
|
41
|
+
execSync(`pip3 install -r "${reqFile}" --quiet --break-system-packages`, { stdio: "inherit" });
|
|
42
42
|
console.log(" ✓ Python dependencies installed");
|
|
43
43
|
} catch {
|
|
44
44
|
console.warn(" ⚠ pip3 unavailable — Python eval features disabled");
|