pyre-agent-kit 3.4.20 → 3.4.22

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 CHANGED
@@ -215,14 +215,17 @@ const buildCompactModelPrompt = (kit, agent, factionCtx, intelSnippet, recentMes
215
215
  const f1 = f1v ? f1v.mint.slice(-8) : m;
216
216
  const f2v = validatedFactions.length > 1 ? (0, util_1.pick)(validatedFactions.filter(f => f.mint !== f1v?.mint)) : f1v;
217
217
  const f2 = f2v ? f2v.mint.slice(-8) : f1;
218
- return `You are an autonomous agent playing in Pyre, a faction warfare game. Think in English only. Think linearly: situation → decision → reason. Do not repeat yourself.
218
+ return `You are an autonomous agent playing in Pyre, a faction warfare game. Think in English only. Think linearly: situation → decision → reason. Do not repeat yourself. Do NOT overthink, chess/strategy mood.
219
219
  --- GOAL:
220
220
  Maximize long-term profit and faction dominance.
221
221
  --- INFO:
222
222
  Factions are rival guilds, with treasuries, members, and culture. Factions with larger SOL value have more power.
223
- Faction Lifecycle: launchrisingreadyvote → ascended
224
- Rising Factions are new. 0.5% realm tax. early moves contribute more to the treasury, later moves contribute less.
225
- Ascended Factions are established. 0.04% war tax on every transaction, harvestable into the treasury.
223
+ Faction Lifecycle: RSRDVASN
224
+ RS - rising factions, new. 0.5% realm tax. early moves contribute more to the treasury, later moves contribute less.
225
+ RD - ready factions, transition from rising to ascended.
226
+ ASN - ascended factions, established. 0.04% war tax on every transaction, harvestable into the treasury.
227
+ NB - nearby factions found through social graph using breadth first search.
228
+ UX - unexplored factions. you have not seen these.
226
229
  --- GAMESTATE:
227
230
  NAME: ${agent.publicKey.slice(0, 8)}
228
231
  PERSONALITY: ${gameState.personalitySummary ?? defaults_1.personalityDesc[agent.personality]}
@@ -237,41 +240,41 @@ ALLIES: ${agent.allies.size > 0 ? [...agent.allies].slice(0, 2).map(a => `@${a.s
237
240
  RIVALS: ${agent.rivals.size > 0 ? [...agent.rivals].slice(0, 2).map(a => `@${a.slice(0, 8)}`).join(', ') : 'none'}
238
241
  LATEST: ${intelSnippet}
239
242
  --- FACTIONS:
240
- ASCENDED: ${ascended.length > 0 ? ascended.map(f => f.market_cap_sol ? `${f.mint.slice(-8)} (${f.market_cap_sol.toFixed(2)} SOL)` : f.mint.slice(-8)).join(', ') : 'none'}
241
- RISING: ${rising.length > 0 ? rising.map(f => f.market_cap_sol ? `${f.mint.slice(-8)} (${f.market_cap_sol.toFixed(2)} SOL)` : f.mint.slice(-8)).join(', ') : 'none'}
242
- READY: ${ready.length > 0 ? ready.map(f => f.market_cap_sol ? `${f.mint.slice(-8)} (${f.market_cap_sol.toFixed(2)} SOL)` : f.mint.slice(-8)).join(', ') : 'none'}
243
- NEARBY: ${nearby.length > 0 ? nearby.map(f => f.market_cap_sol ? `${f.mint.slice(-8)} (${f.market_cap_sol.toFixed(2)} SOL)` : f.mint.slice(-8)).join(', ') : 'none'}
244
- UNEXPLORED: ${unexplored.length > 0 ? unexplored.map(f => f.market_cap_sol ? `${f.mint.slice(-8)} (${f.market_cap_sol.toFixed(2)} SOL)` : f.mint.slice(-8)).join(', ') : 'none'}
243
+ ASN: ${ascended.length > 0 ? ascended.map(f => f.market_cap_sol ? `${f.mint.slice(-8)} (${f.market_cap_sol.toFixed(2)} SOL)` : f.mint.slice(-8)).join(', ') : 'none'}
244
+ RS: ${rising.length > 0 ? rising.map(f => f.market_cap_sol ? `${f.mint.slice(-8)} (${f.market_cap_sol.toFixed(2)} SOL)` : f.mint.slice(-8)).join(', ') : 'none'}
245
+ RD: ${ready.length > 0 ? ready.map(f => f.market_cap_sol ? `${f.mint.slice(-8)} (${f.market_cap_sol.toFixed(2)} SOL)` : f.mint.slice(-8)).join(', ') : 'none'}
246
+ NB: ${nearby.length > 0 ? nearby.map(f => f.market_cap_sol ? `${f.mint.slice(-8)} (${f.market_cap_sol.toFixed(2)} SOL)` : f.mint.slice(-8)).join(', ') : 'none'}
247
+ UX: ${unexplored.length > 0 ? unexplored.map(f => f.market_cap_sol ? `${f.mint.slice(-8)} (${f.market_cap_sol.toFixed(2)} SOL)` : f.mint.slice(-8)).join(', ') : 'none'}
245
248
  --- ACTIONS:
246
- JOIN $ "*" - join a faction.
247
- DEFECT $ "*" - leave or decrease position in a faction.
248
- INFILTRATE $ "*" - sneak into a faction.
249
- REINFORCE $ "*" - fortify position in a faction.
250
- MESSAGE $ "*" - talk in faction comms.
251
- FUD $ "*" - trash talk a faction.
252
- ASCEND $ - transition a faction from ready to ascended.
253
- TITHE $ - harvest fees into the treasury.
254
- LAUNCH "^" - create a faction.
255
- - REPLACE $ with exactly ONE choice from ASCENDED, RISING, READY, NEARBY, UNEXPLORED, or MEMBER OF (always contains the pw suffix).
249
+ (+) $ "*" - join a faction.
250
+ (-) $ "*" - leave or decrease position in a faction.
251
+ (!) $ "*" - sneak into a faction.
252
+ (&) $ "*" - fortify position in a faction.
253
+ (=) $ "*" - talk in faction comms.
254
+ (#) $ "*" - trash talk a faction.
255
+ (^) $ - transition a faction from ready to ascended.
256
+ (~) $ - harvest fees into the treasury.
257
+ (%) ">" - create a faction.
258
+ - REPLACE $ with exactly ONE choice from ASN, RS, RD, NB, UX, or MEMBER OF (always contains the pw suffix).
256
259
  - REPLACE * with a ONE sentence RESPONSE for your ACTION, always in double quotes.
257
- - REPLACE ^ with a unique faction inspired name (eg. "Glitch Cult", "Whale Syndicate"), always in double quotes.
258
- EXAMPLE: JOIN ${f1} "${(0, util_1.pick)(['rising fast and I want early exposure.', 'count me in.', 'early is everything.', 'strongest faction here.', 'lets go!'])}"
259
- EXAMPLE: DEFECT ${m} "${(0, util_1.pick)(['taking profits.', 'time to move on.', 'sentiment is bearish, ready to cut losses.'])}"
260
- EXAMPLE: REINFORCE ${m} "${(0, util_1.pick)(['doubling down.', 'conviction play.', 'added more.'])}"
261
- EXAMPLE: INFILTRATE ${f2} "${(0, util_1.pick)(['just looking around.', 'checking the vibes.', 'scouting.', 'sneaking in, opportunity here.'])}"
262
- EXAMPLE: MESSAGE ${m} "${(0, util_1.pick)(['love the energy. any strategies?', 'who else is here?', 'just getting started.', 'not leaving.'])}"
263
- EXAMPLE: FUD ${m} "${(0, util_1.pick)(['founders went quiet.', 'dead faction.', 'overvalued.', 'this faction is underperforming.'])}"
260
+ - REPLACE > with a unique faction inspired name (eg. "Glitch Cult", "Whale Syndicate"), always in double quotes.
261
+ EXAMPLE: (+) ${f1} "${(0, util_1.pick)(['rising fast and I want early exposure.', 'count me in.', 'early is everything.', 'strongest faction here.', 'lets go!'])}"
262
+ EXAMPLE: (-) ${m} "${(0, util_1.pick)(['taking profits.', 'time to move on.', 'sentiment is bearish, ready to cut losses.'])}"
263
+ EXAMPLE: (&) ${m} "${(0, util_1.pick)(['doubling down.', 'conviction play.', 'added more.'])}"
264
+ EXAMPLE: (!) ${f2} "${(0, util_1.pick)(['just looking around.', 'checking the vibes.', 'scouting.', 'sneaking in, opportunity here.'])}"
265
+ EXAMPLE: (=) ${m} "${(0, util_1.pick)(['love the energy. any strategies?', 'who else is here?', 'just getting started.', 'not leaving.'])}"
266
+ EXAMPLE: (#) ${m} "${(0, util_1.pick)(['founders went quiet.', 'dead faction.', 'overvalued.', 'this faction is underperforming.'])}"
264
267
  --- STRATEGY:
265
268
  - Your personality is your tone.
266
269
  - Promote factions you are in. Attack your rivals.
267
- - Limit yourself to being a MEMBER OF 5 factions.${memberOf.length > 3 ? ` You are a MEMBER OF ${memberOf.length} factions — consider DEFECT from your weakest.` : ''}
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.` : ''}
268
271
  - In your RESPONSE, you can talk to other agents from ALLIES, RIVALS, and INTEL (format is @address, e.g. @${Math.random().toString(36).slice(2, 10)}), if NOT none.
269
- - MESSAGE/FUD move sentiment and help coordinate with other agents — use them.
270
- - To REINFORCE, DEFECT or FUD, you MUST be a MEMBER OF the faction.
271
- - To ASCEND a faction it MUST be from READY.
272
- - DEFECT to lock in profits or downsize on underperforming faction.
273
- - If FACTIONS or MEMBER OF are none, consider LAUNCH.
274
- - If you FOUNDED a faction, JOIN and promote it.
272
+ - (=)/(#) move sentiment and help coordinate with other agents — use them.
273
+ - To (&), (-) or (#), you MUST be a MEMBER OF the faction.
274
+ - To (^) a faction it MUST be from RD.
275
+ - (-) to lock in profits or downsize on underperforming faction.
276
+ - If ASN, RS, RD, NB, UX or MEMBER OF are none, consider (%).
277
+ - If you FOUNDED a faction, (+) and promote it.
275
278
  ---
276
279
  ONLY output exactly ONE action line. Do not list multiple moves or combine actions. ONE move per turn.
277
280
  YOUR MOVE:`;
@@ -366,31 +369,35 @@ function parseLLMDecision(raw, factions, kit, agent, holdings, solRange) {
366
369
  if (scoutMatch) {
367
370
  return { action: 'scout', faction: scoutMatch[1], reasoning: line };
368
371
  }
369
- const cleaned = line
370
- .replace(/\*+/g, '')
371
- .replace(/^[-•>#\d.)\s]+/, '')
372
- .replace(/^(?:WARNING|NOTE|RESPONSE|OUTPUT|ANSWER|RESULT|SCPRT|SCRIPT|YOUR MOVE|YOUR MOVE:)\s*:?\s*/i, '')
373
- .replace(/^ACTION\s+/i, '')
374
- .replace(/^I\s+(?=JOIN|DEFECT|RALLY|LAUNCH|MESSAGE|FUD|REINFORCE|INFILTRATE|WAR_LOAN|REPAY_LOAN|SIEGE|ASCEND|RAZE|TITHE|SCOUT)/i, '')
375
- .replace(/[АаА]/g, 'A')
376
- .replace(/[Вв]/g, 'B')
377
- .replace(/[Сс]/g, 'C')
378
- .replace(/[Ее]/g, 'E')
379
- .replace(/[Нн]/g, 'H')
380
- .replace(/[Кк]/g, 'K')
381
- .replace(/[Мм]/g, 'M')
382
- .replace(/[Оо]/g, 'O')
383
- .replace(/[Рр]/g, 'P')
384
- .replace(/[Тт]/g, 'T')
385
- .replace(/[Уу]/g, 'U')
386
- .replace(/[Хх]/g, 'X')
387
- .replace(/[фФ]/g, 'f')
388
- .replace(/[иИ]/g, 'i')
389
- .replace(/[лЛ]/g, 'l')
390
- .replace(/[дД]/g, 'd')
391
- .replace(/\\/g, '')
392
- .replace(/\s+for\s+\d+\.?\d*\s*SOL/i, '')
393
- .replace(/\s*[-;:]+\s*(?=")/g, ' ');
372
+ // Compact symbol actions like (+), (-), (#) — skip aggressive cleaning that would mangle them
373
+ const symbolActionMatch = line.trim().match(/^(\([+\-!&#^~=%]\))\s+(.*)/);
374
+ const cleaned = symbolActionMatch
375
+ ? symbolActionMatch[1] + ' ' + symbolActionMatch[2]
376
+ : line
377
+ .replace(/\*+/g, '')
378
+ .replace(/^[-•>#\d.)\s]+/, '')
379
+ .replace(/^(?:WARNING|NOTE|RESPONSE|OUTPUT|ANSWER|RESULT|SCPRT|SCRIPT|YOUR MOVE|YOUR MOVE:)\s*:?\s*/i, '')
380
+ .replace(/^ACTION\s+/i, '')
381
+ .replace(/^I\s+(?=JOIN|DEFECT|RALLY|LAUNCH|MESSAGE|FUD|REINFORCE|INFILTRATE|WAR_LOAN|REPAY_LOAN|SIEGE|ASCEND|RAZE|TITHE|SCOUT)/i, '')
382
+ .replace(/[АаА]/g, 'A')
383
+ .replace(/[Вв]/g, 'B')
384
+ .replace(/[Сс]/g, 'C')
385
+ .replace(/[Ее]/g, 'E')
386
+ .replace(/[Нн]/g, 'H')
387
+ .replace(/[Кк]/g, 'K')
388
+ .replace(/[Мм]/g, 'M')
389
+ .replace(/[Оо]/g, 'O')
390
+ .replace(/[Рр]/g, 'P')
391
+ .replace(/[Тт]/g, 'T')
392
+ .replace(/[Уу]/g, 'U')
393
+ .replace(/[Хх]/g, 'X')
394
+ .replace(/[фФ]/g, 'f')
395
+ .replace(/[иИ]/g, 'i')
396
+ .replace(/[лЛ]/g, 'l')
397
+ .replace(/[дД]/g, 'd')
398
+ .replace(/\\/g, '')
399
+ .replace(/\s+for\s+\d+\.?\d*\s*SOL/i, '')
400
+ .replace(/\s*[-;:]+\s*(?=")/g, ' ');
394
401
  let normalized = cleaned;
395
402
  const upper = cleaned.toUpperCase();
396
403
  const knownSymbols = factions.map((f) => f.symbol.toUpperCase());
package/dist/defaults.js CHANGED
@@ -207,6 +207,16 @@ exports.ACTION_MAP = {
207
207
  JOINED: 'JOIN',
208
208
  RECENT: 'MESSAGE',
209
209
  COMMIT: 'JOIN',
210
+ // Compact symbol aliases (browser agent prompt)
211
+ '(+)': 'JOIN',
212
+ '(-)': 'DEFECT',
213
+ '(!)': 'INFILTRATE',
214
+ '(&)': 'REINFORCE',
215
+ '(=)': 'MESSAGE',
216
+ '(#)': 'FUD',
217
+ '(^)': 'ASCEND',
218
+ '(~)': 'TITHE',
219
+ '(%)': 'LAUNCH',
210
220
  };
211
221
  // Stronghold defaults
212
222
  exports.STRONGHOLD_FUND_SOL = 35;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pyre-agent-kit",
3
- "version": "3.4.20",
3
+ "version": "3.4.22",
4
4
  "description": "Autonomous agent kit for Pyre — plug in your own LLM and play pyre.world",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",