pyre-agent-kit 3.4.24 → 3.4.26
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/agent.js +9 -6
- package/package.json +1 -1
package/dist/agent.js
CHANGED
|
@@ -226,12 +226,12 @@ RD - ready factions, transition from rising to ascended.
|
|
|
226
226
|
ASN - ascended factions, established. 0.04% war tax on every transaction, harvestable into the treasury.
|
|
227
227
|
NB - nearby factions found through social graph using breadth first search.
|
|
228
228
|
UX - unexplored factions. you have not seen these.
|
|
229
|
-
---
|
|
229
|
+
--- YOU ARE:
|
|
230
230
|
NAME: ${agent.publicKey.slice(0, 8)}
|
|
231
231
|
PERSONALITY: ${gameState.personalitySummary ?? defaults_1.personalityDesc[agent.personality]}
|
|
232
232
|
LAST MOVES: ${kit.state.history.length > 0 ? [...kit.state.history].slice(-2).join('; ') : 'none'}
|
|
233
233
|
P&L: ${pnl >= 0 ? '+' : ''}${pnl.toFixed(4)} SOL
|
|
234
|
-
|
|
234
|
+
YOU ARE A FOUNDER OF: ${founded.length > 0 ? founded.join(', ') : 'none'}
|
|
235
235
|
MEMBER OF: ${memberOf.length > 0 ? memberOf.join(', ') : 'none'}
|
|
236
236
|
MEMBERSHIP VALUE: ${valued.length > 0 ? valued.map(v => `${v.id}: ${v.valueSol.toFixed(4)} SOL`).join(', ') : 'no value'}
|
|
237
237
|
SENTIMENT: ${sentimentList}
|
|
@@ -267,14 +267,15 @@ EXAMPLE: (#) ${m} "${(0, util_1.pick)(['founders went quiet.', 'dead faction.',
|
|
|
267
267
|
--- STRATEGY:
|
|
268
268
|
- Your personality is your tone.
|
|
269
269
|
- Promote factions you are in. Attack your rivals.
|
|
270
|
-
- Limit yourself to being a MEMBER OF 5 factions.${memberOf.length > 3 ? ` You are a MEMBER OF ${memberOf.length} factions — consider (-) from your weakest.` : ''}
|
|
271
|
-
-
|
|
270
|
+
- Limit yourself to being AT MOST a MEMBER OF 5 factions.${memberOf.length > 3 ? ` You are a MEMBER OF ${memberOf.length} factions — consider (-) from your weakest.` : ''}
|
|
271
|
+
- $ is ALWAYS a faction (ends in pw), NEVER an @agent. To talk to agents, put @address inside your "*" response.
|
|
272
|
+
- In your RESPONSE, you can mention other agents from ALLIES, RIVALS, and INTEL (format is @address, e.g. @${Math.random().toString(36).slice(2, 10)}), if NOT none.
|
|
272
273
|
- (=)/(#) move sentiment and help coordinate with other agents — use them.
|
|
273
274
|
- To (&), (-) or (#), you MUST be a MEMBER OF the faction.
|
|
274
275
|
- To (^) a faction it MUST be from RD.
|
|
275
276
|
- (-) to lock in profits or downsize on underperforming faction.
|
|
276
277
|
- No factions visible? Use (%) to create one. Anyone can (%).
|
|
277
|
-
- If you
|
|
278
|
+
- If you are a FOUNDER of a faction, (+) and promote it.
|
|
278
279
|
---
|
|
279
280
|
ONLY output exactly ONE action line. Do not list multiple moves or combine actions. ONE move per turn.
|
|
280
281
|
YOUR MOVE:`;
|
|
@@ -369,8 +370,10 @@ function parseLLMDecision(raw, factions, kit, agent, holdings, solRange) {
|
|
|
369
370
|
if (scoutMatch) {
|
|
370
371
|
return { action: 'scout', faction: scoutMatch[1], reasoning: line };
|
|
371
372
|
}
|
|
373
|
+
// Strip YOUR MOVE: prefix before symbol detection
|
|
374
|
+
const stripped = line.trim().replace(/^(?:YOUR MOVE|YOUR MOVE:)\s*:?\s*/i, '');
|
|
372
375
|
// Compact symbol actions like (+), (-), (#) — skip aggressive cleaning that would mangle them
|
|
373
|
-
const symbolActionMatch =
|
|
376
|
+
const symbolActionMatch = stripped.match(/^(\([+\-!&#^~=%]\))\s+(.*)/) || stripped.match(/^([+\-!&#^~=%])\s+(.*)/);
|
|
374
377
|
const cleaned = symbolActionMatch
|
|
375
378
|
? symbolActionMatch[1] + ' ' + symbolActionMatch[2]
|
|
376
379
|
: line
|