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 +1 -0
- package/dist/index.js +9 -2
- package/package.json +1 -1
- package/src/api.ts +1 -0
- package/src/index.ts +9 -2
package/dist/api.d.ts
CHANGED
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
|
-
|
|
134
|
-
lines.push(
|
|
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
package/src/api.ts
CHANGED
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
|
-
|
|
155
|
-
lines.push(
|
|
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
|
}
|