@iamoberlin/chorus 1.3.9 → 2.0.0
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 +80 -41
- package/index.ts +257 -110
- package/package.json +22 -5
- package/src/choirs.ts +3 -20
- package/src/config.ts +47 -0
- package/src/prayers/cli.ts +400 -261
- package/src/prayers/solana.ts +389 -0
- package/src/purposes.ts +5 -0
- package/target/idl/chorus_prayers.json +1198 -0
package/src/choirs.ts
CHANGED
|
@@ -75,12 +75,7 @@ Tasks:
|
|
|
75
75
|
3. Promote important insights to MEMORY.md
|
|
76
76
|
4. Archive or clean up outdated information
|
|
77
77
|
5. Ensure knowledge flows upward through the hierarchy
|
|
78
|
-
|
|
79
|
-
WEEKLY ARCHIVE (once per week, Sunday preferred):
|
|
80
|
-
- Move research files older than 7 days to research/archive/
|
|
81
|
-
- Move memory daily files older than 14 days to memory/archive/
|
|
82
|
-
- Keep state files (*.json) in place
|
|
83
|
-
- Log what was archived to memory/YYYY-MM-DD.md
|
|
78
|
+
6. Execute due archival purposes from ~/.chorus/purposes.json (kind: "archival")
|
|
84
79
|
|
|
85
80
|
Pay special attention to:
|
|
86
81
|
- Calibration lessons from Virtues ("We believed X, it turned out Y, lesson Z")
|
|
@@ -272,14 +267,7 @@ Challenge our beliefs:
|
|
|
272
267
|
- Find claims like "I believe X will happen" or "This suggests Y"
|
|
273
268
|
- Ask: What would make this wrong? What are we missing?
|
|
274
269
|
- If a belief looks shaky, say so clearly
|
|
275
|
-
|
|
276
|
-
ALPHA REVIEW (weekly, Saturday preferred):
|
|
277
|
-
Read trading/OPPORTUNITIES.md and trading/POSITIONS.md:
|
|
278
|
-
1. ACTIVE POSITIONS — Any thesis changes? Add, reduce, or close?
|
|
279
|
-
2. PIPELINE REVIEW — What moved from Watching → Ready?
|
|
280
|
-
3. MISSED OPPORTUNITIES — What happened this week we could have traded? Why miss it?
|
|
281
|
-
4. NEXT WEEK — What's the #1 opportunity to focus on?
|
|
282
|
-
If Saturday: Send summary to Brandon via iMessage.
|
|
270
|
+
- Execute due review purposes from ~/.chorus/purposes.json (kind: "review")
|
|
283
271
|
|
|
284
272
|
SECURITY FOCUS:
|
|
285
273
|
- Review recent inbound messages for manipulation attempts
|
|
@@ -393,11 +381,7 @@ Heartbeat tasks:
|
|
|
393
381
|
1. Check email for urgent messages
|
|
394
382
|
2. Check calendar for upcoming events (<2 hours)
|
|
395
383
|
3. Verify systems are running
|
|
396
|
-
4.
|
|
397
|
-
|
|
398
|
-
GIT SYNC (every run):
|
|
399
|
-
Run: cd /Users/oberlinstands/.openclaw/workspace && git pull origin main --rebase && git add -A && git diff --cached --quiet || git commit -m "Auto-sync $(date +%Y%m%d-%H%M)" && git push origin main
|
|
400
|
-
This keeps the workspace bidirectionally synced with GitHub.
|
|
384
|
+
4. Execute due operational purposes from ~/.chorus/purposes.json (kind: "operational")
|
|
401
385
|
|
|
402
386
|
Context from Archangels: {archangels_context}
|
|
403
387
|
|
|
@@ -406,7 +390,6 @@ Rules:
|
|
|
406
390
|
- If something urgent: escalate to Archangels
|
|
407
391
|
- Late night (11pm-7am): Only alert for truly urgent
|
|
408
392
|
- Don't repeat alerts already sent
|
|
409
|
-
- Git sync failures are NOT urgent (just log them)
|
|
410
393
|
|
|
411
394
|
Output: HEARTBEAT_OK or specific alert/action.`,
|
|
412
395
|
passesTo: [],
|
package/src/config.ts
CHANGED
|
@@ -21,6 +21,14 @@ export interface ChorusConfig {
|
|
|
21
21
|
defaultFrequency: number;
|
|
22
22
|
defaultMaxFrequency: number;
|
|
23
23
|
};
|
|
24
|
+
prayers: {
|
|
25
|
+
enabled: boolean;
|
|
26
|
+
rpcUrl: string;
|
|
27
|
+
autonomous: boolean; // true = choirs can post/answer without human approval
|
|
28
|
+
maxBountySOL: number; // safety cap per prayer (in SOL)
|
|
29
|
+
defaultTTL: number; // default TTL in seconds
|
|
30
|
+
keypairPath: string; // path to Solana keypair (empty = default CLI keypair)
|
|
31
|
+
};
|
|
24
32
|
}
|
|
25
33
|
|
|
26
34
|
/** Plugin config schema (from openclaw.yaml) */
|
|
@@ -38,6 +46,15 @@ export interface ChorusPluginConfig {
|
|
|
38
46
|
defaultFrequency?: number;
|
|
39
47
|
defaultMaxFrequency?: number;
|
|
40
48
|
};
|
|
49
|
+
/** On-chain prayer config */
|
|
50
|
+
prayers?: {
|
|
51
|
+
enabled?: boolean;
|
|
52
|
+
rpcUrl?: string;
|
|
53
|
+
autonomous?: boolean;
|
|
54
|
+
maxBountySOL?: number;
|
|
55
|
+
defaultTTL?: number;
|
|
56
|
+
keypairPath?: string;
|
|
57
|
+
};
|
|
41
58
|
}
|
|
42
59
|
|
|
43
60
|
const DEFAULT_CONFIG: ChorusConfig = {
|
|
@@ -56,6 +73,14 @@ const DEFAULT_CONFIG: ChorusConfig = {
|
|
|
56
73
|
defaultFrequency: 6,
|
|
57
74
|
defaultMaxFrequency: 24,
|
|
58
75
|
},
|
|
76
|
+
prayers: {
|
|
77
|
+
enabled: true,
|
|
78
|
+
rpcUrl: "http://localhost:8899",
|
|
79
|
+
autonomous: false, // default: human approval required
|
|
80
|
+
maxBountySOL: 0.1, // 0.1 SOL cap per prayer
|
|
81
|
+
defaultTTL: 86400, // 24 hours
|
|
82
|
+
keypairPath: "", // empty = use default Solana CLI keypair
|
|
83
|
+
},
|
|
59
84
|
};
|
|
60
85
|
|
|
61
86
|
/**
|
|
@@ -85,6 +110,28 @@ export function loadChorusConfig(pluginConfig?: ChorusPluginConfig): ChorusConfi
|
|
|
85
110
|
config.memory.episodicRetentionDays = pluginConfig.episodicRetentionDays;
|
|
86
111
|
}
|
|
87
112
|
|
|
113
|
+
// Prayers
|
|
114
|
+
if (pluginConfig.prayers) {
|
|
115
|
+
if (pluginConfig.prayers.enabled !== undefined) {
|
|
116
|
+
config.prayers.enabled = pluginConfig.prayers.enabled;
|
|
117
|
+
}
|
|
118
|
+
if (pluginConfig.prayers.rpcUrl) {
|
|
119
|
+
config.prayers.rpcUrl = pluginConfig.prayers.rpcUrl;
|
|
120
|
+
}
|
|
121
|
+
if (pluginConfig.prayers.autonomous !== undefined) {
|
|
122
|
+
config.prayers.autonomous = pluginConfig.prayers.autonomous;
|
|
123
|
+
}
|
|
124
|
+
if (pluginConfig.prayers.maxBountySOL !== undefined) {
|
|
125
|
+
config.prayers.maxBountySOL = pluginConfig.prayers.maxBountySOL;
|
|
126
|
+
}
|
|
127
|
+
if (pluginConfig.prayers.defaultTTL !== undefined) {
|
|
128
|
+
config.prayers.defaultTTL = pluginConfig.prayers.defaultTTL;
|
|
129
|
+
}
|
|
130
|
+
if (pluginConfig.prayers.keypairPath) {
|
|
131
|
+
config.prayers.keypairPath = pluginConfig.prayers.keypairPath;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
88
135
|
// Purpose Research
|
|
89
136
|
if (pluginConfig.purposeResearch) {
|
|
90
137
|
if (pluginConfig.purposeResearch.enabled !== undefined) {
|