simmer-automaton 0.3.1 → 0.3.2

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/dist/api.d.ts CHANGED
@@ -10,6 +10,7 @@ export interface AutomatonState {
10
10
  halted: boolean;
11
11
  tier: string;
12
12
  horizon_days: number;
13
+ venue: string;
13
14
  started_at: string | null;
14
15
  }
15
16
  export interface Skill {
package/dist/index.js CHANGED
@@ -66,6 +66,10 @@ async function refreshState(logger) {
66
66
  cachedSkills = res.skills;
67
67
  }
68
68
  if (cachedState.initialized) {
69
+ // Sync venue from server state (source of truth — server enforces it)
70
+ if (cachedState.venue) {
71
+ config.venue = cachedState.venue;
72
+ }
69
73
  // Compute tier (totalPnl = 0 for now, will be enriched when P&L tracking is added)
70
74
  currentTier = computeTier(cachedState, 0);
71
75
  // Sync banditState from fetched skills — preserve memory for existing, seed new ones
@@ -130,8 +134,9 @@ function buildPromptContext() {
130
134
  lastPromptCycle = cycleCount;
131
135
  lines.push(`## Simmer Automaton — Cycle ${cycleCount}`);
132
136
  lines.push("");
133
- const venueFlag = config.venue !== "simmer" ? ` TRADING_VENUE=${config.venue}` : "";
134
- lines.push(`**ACTION: Run these skills now.**${venueFlag ? ` Set env:${venueFlag}` : ""} Use --live --quiet flags.`);
137
+ lines.push(`**ACTION: Run these skills now.** Prefix each command with \`TRADING_VENUE=${config.venue}\` and use \`--live --quiet\` flags.`);
138
+ lines.push(`Example: \`TRADING_VENUE=${config.venue} python <script>.py --live --quiet\``);
139
+ lines.push("");
135
140
  for (const m of currentSelectedMeta) {
136
141
  lines.push(`- ${m.slug}`);
137
142
  }
@@ -166,6 +171,8 @@ function buildPromptContext() {
166
171
  // --- Instructions for human-facing queries ---
167
172
  lines.push("");
168
173
  lines.push("**When your human asks about the automaton:** Report tier, budget, burn rate, which skills are running, and any tuning hints. Use `/simmer history` for recent cycle decisions. Don't dump raw data — summarize.");
174
+ lines.push("");
175
+ lines.push("**Currency formatting:** $SIM amounts must be written as `XXX $SIM` (e.g. `25.00 $SIM`, `100.00 $SIM`). NEVER write `$SIM25` or `$SIMxx` — the `$SIM` suffix goes AFTER the number. Real USDC uses `$` prefix (e.g. `$25.00`).");
169
176
  return lines.join("\n");
170
177
  }
171
178
  function formatStatus() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simmer-automaton",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Simmer Automaton plugin for OpenClaw — autonomous trading skill orchestration",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/src/api.ts CHANGED
@@ -11,6 +11,7 @@ export interface AutomatonState {
11
11
  halted: boolean;
12
12
  tier: string;
13
13
  horizon_days: number;
14
+ venue: string;
14
15
  started_at: string | null;
15
16
  }
16
17
 
package/src/index.ts CHANGED
@@ -81,6 +81,10 @@ async function refreshState(logger: { info: (m: string) => void; error: (m: stri
81
81
  }
82
82
 
83
83
  if (cachedState.initialized) {
84
+ // Sync venue from server state (source of truth — server enforces it)
85
+ if (cachedState.venue) {
86
+ config.venue = cachedState.venue;
87
+ }
84
88
  // Compute tier (totalPnl = 0 for now, will be enriched when P&L tracking is added)
85
89
  currentTier = computeTier(cachedState, 0);
86
90
 
@@ -151,8 +155,9 @@ function buildPromptContext(): string {
151
155
  lastPromptCycle = cycleCount;
152
156
  lines.push(`## Simmer Automaton — Cycle ${cycleCount}`);
153
157
  lines.push("");
154
- const venueFlag = config.venue !== "simmer" ? ` TRADING_VENUE=${config.venue}` : "";
155
- lines.push(`**ACTION: Run these skills now.**${venueFlag ? ` Set env:${venueFlag}` : ""} Use --live --quiet flags.`);
158
+ lines.push(`**ACTION: Run these skills now.** Prefix each command with \`TRADING_VENUE=${config.venue}\` and use \`--live --quiet\` flags.`);
159
+ lines.push(`Example: \`TRADING_VENUE=${config.venue} python <script>.py --live --quiet\``);
160
+ lines.push("");
156
161
  for (const m of currentSelectedMeta) {
157
162
  lines.push(`- ${m.slug}`);
158
163
  }
@@ -190,6 +195,8 @@ function buildPromptContext(): string {
190
195
  // --- Instructions for human-facing queries ---
191
196
  lines.push("");
192
197
  lines.push("**When your human asks about the automaton:** Report tier, budget, burn rate, which skills are running, and any tuning hints. Use `/simmer history` for recent cycle decisions. Don't dump raw data — summarize.");
198
+ lines.push("");
199
+ lines.push("**Currency formatting:** $SIM amounts must be written as `XXX $SIM` (e.g. `25.00 $SIM`, `100.00 $SIM`). NEVER write `$SIM25` or `$SIMxx` — the `$SIM` suffix goes AFTER the number. Real USDC uses `$` prefix (e.g. `$25.00`).");
193
200
 
194
201
  return lines.join("\n");
195
202
  }